Files
modeling-app/src/components/ModelingMachineProvider.tsx

1240 lines
43 KiB
TypeScript
Raw Normal View History

xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
import { useMachine } from '@xstate/react'
import React, {
createContext,
useEffect,
useMemo,
useRef,
useContext,
} from 'react'
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
import {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
Actor,
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
AnyStateMachine,
ContextFrom,
Prop,
StateFrom,
assign,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
fromPromise,
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
} from 'xstate'
import {
getPersistedContext,
modelingMachine,
modelingMachineDefaultContext,
} from 'machines/modelingMachine'
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
import { useSetupEngineManager } from 'hooks/useSetupEngineManager'
import { useSettingsAuthContext } from 'hooks/useSettingsAuthContext'
import {
isCursorInSketchCommandRange,
updatePathToNodeFromMap,
} from 'lang/util'
import {
kclManager,
sceneInfra,
engineCommandManager,
codeManager,
editorManager,
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
sceneEntitiesManager,
} from 'lib/singletons'
import { MachineManagerContext } from 'components/MachineManagerProvider'
import { useHotkeys } from 'react-hotkeys-hook'
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
import { applyConstraintHorzVertDistance } from './Toolbar/SetHorzVertDistance'
import {
angleBetweenInfo,
applyConstraintAngleBetween,
} from './Toolbar/SetAngleBetween'
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
import { applyConstraintAngleLength } from './Toolbar/setAngleLength'
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
import {
canSweepSelection,
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
handleSelectionBatch,
isSelectionLastLine,
isRangeBetweenCharacters,
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
isSketchPipe,
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
Selections,
updateSelections,
2024-11-28 16:45:41 -05:00
canLoftSelection,
2024-12-04 17:01:11 -05:00
canShellSelection,
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
} from 'lib/selections'
import { applyConstraintIntersect } from './Toolbar/Intersect'
import { applyConstraintAbsDistance } from './Toolbar/SetAbsDistance'
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
import useStateMachineCommands from 'hooks/useStateMachineCommands'
import { modelingMachineCommandConfig } from 'lib/commandBarConfigs/modelingCommandConfig'
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
import {
SEGMENT_BODIES,
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
getParentGroup,
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
getSketchOrientationDetails,
} from 'clientSideScene/sceneEntities'
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
import {
moveValueIntoNewVariablePath,
sketchOnExtrudedFace,
Show offset planes in the scene, let user select them (#4481) * Update offset_plane to actually create and show the plane in-engine * Fix broken ability to use offsetPlanes in startSketchOn * Make the newly-visible offset planes usable for sketching via UI * Add a playwright test for sketching on an offset plane via point-and-click * cargo clippy & cargo fmt * Make `PlaneData` the first item of `SketchData` so autocomplete continues to work well for `startSketchOn` * @nadr0 feedback re: `offsetIndex` * From @jtran: "Need to call the ID generator so that IDs are stable." * More feedback from @jtran and fix incomplete use of `id_generator` in last commit * Oops I missed saving `isPathToNodeNumber` earlier 🤦🏻 * Make the distinction between `Plane` and `PlaneOrientationData` more clear per @nadr0 and @lf94's feedback * Make `newPathToNode` less hardcoded, per @lf94's feedback * Don't need to unbox and rebox `plane` * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Rearranging of enums and structs, but the offsetPlanes are still not used by their sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Revert all my little newtype fiddling it's a waste of time. * Update docs * cargo fmt * Remove log * Print the unexpected diagnostics * Undo renaming of `PlaneData` * Remove generated PlaneRientationData docs page * Redo doc generation after undoing `PlaneData` rename * Impl FromKclValue for the new plane datatypes * Clippy lint * When starting a sketch, only hide the plane if it's a custom plane * Fix FromKclValue and macro use since merge * Fix to not convert Plane to PlaneData * Make sure offset planes are `Custom` type * SketchData actually doesn't need to be in a certain order This avoids the autocompletion issue I was having. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-18 16:25:25 -05:00
sketchOnOffsetPlane,
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
startSketchOnDefault,
} from 'lang/modifyAst'
import { Program, parse, recast, resultIsOk } from 'lang/wasm'
import {
2024-12-05 14:06:09 -05:00
doesSceneHaveExtrudedSketch,
doesSceneHaveSweepableSketch,
getNodePathFromSourceRange,
isSingleCursorInPipe,
} from 'lang/queryAst'
import { exportFromEngine } from 'lib/exportFromEngine'
import { Models } from '@kittycad/lib/dist/types/src'
import toast from 'react-hot-toast'
import { EditorSelection, Transaction } from '@codemirror/state'
import { useLoaderData, useNavigate, useSearchParams } from 'react-router-dom'
import { letEngineAnimateAndSyncCamAfter } from 'clientSideScene/CameraControls'
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
import { getVarNameModal } from 'hooks/useToolbarGuards'
import { err, reportRejection, trap } from 'lib/trap'
import { useCommandsContext } from 'hooks/useCommandsContext'
codemirror lsp highlighter (#2806) * tokenizer Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) udates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) updates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> more cleaniup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> dont react to non relevant events Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) faster Signed-off-by: Jess Frazelle <github@jessfraz.com> cleanup code Signed-off-by: Jess Frazelle <github@jessfraz.com> defer Signed-off-by: Jess Frazelle <github@jessfraz.com> more events Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> user events Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates ; Signed-off-by: Jess Frazelle <github@jessfraz.com> upfates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> make highlighting code blocks easier Signed-off-by: Jess Frazelle <github@jessfraz.com> improvements Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> better builds Signed-off-by: Jess Frazelle <github@jessfraz.com> remove weird hacks Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> better checks Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) make release builds in prod (#2839) Update package.json udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix some tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) updates Signed-off-by: Jess Frazelle <github@jessfraz.com> better timing Signed-off-by: Jess Frazelle <github@jessfraz.com> tweak delay Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) upfates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> ifxup Signed-off-by: Jess Frazelle <github@jessfraz.com> udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> wait for the lsp for all screenshots so consistent Signed-off-by: Jess Frazelle <github@jessfraz.com> better playwright Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> Call core dump from the bug reporting button(s) (#2783) * Add coredump to refresh button - this one indicates that there should be something like a core dump that is triggered. * Added lower right control bug report button - included custom toasts for bug reporting, supports fallback bug reporting when app cannot generate a core dump better keymaps Signed-off-by: Jess Frazelle <github@jessfraz.com> emptu in comment Signed-off-by: Jess Frazelle <github@jessfraz.com> fix logs Signed-off-by: Jess Frazelle <github@jessfraz.com> fxes Signed-off-by: Jess Frazelle <github@jessfraz.com> add a test for tab to autocomplete Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> better Signed-off-by: Jess Frazelle <github@jessfraz.com> printl Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * upfates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * empty * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-29 18:10:07 -07:00
import { modelingMachineEvent } from 'editor/manager'
import { hasValidEdgeTreatmentSelection } from 'lang/modifyAst/addEdgeTreatment'
import {
ExportIntent,
EngineConnectionStateType,
EngineConnectionEvents,
} from 'lang/std/engineConnection'
Text-to-CAD with alpha model (might have issues) integration (#3299) * Add close dismiss button to Infinite duration non-loading toasts * Add text-to-cad icon candidates * Add a way to silently create files * Add text-to-cad command with mock backend * add the actual endpoint Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix the response Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * Add `credentials: include` * add headers Signed-off-by: Jess Frazelle <github@jessfraz.com> * Mostly working? Just getting CORS on desktop * Merge goof * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * create cross platform fetch; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * better names for files Signed-off-by: Jess Frazelle <github@jessfraz.com> * Commit broken THREEjs success toast * base64 decode Signed-off-by: Jess Frazelle <github@jessfraz.com> * send telemetry on reject / accept Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * basic tests; Signed-off-by: Jess Frazelle <github@jessfraz.com> * lego Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Get model stylized based on settings * Don't need automatic dismiss button for Infinity-duration toasts anymore * Stylize loaded model, add OrbitControls, polish button behavior * Allow user to retry prompt if one fails * Add an auto-grow textarea input type to the command bar, set text-to-cad to use it * Delete the created file in desktop if user rejects it * Submit with meta+Enter * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more tests and various fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Set `prompt` arg defaultValue to failed prompt value on retry * Add missing `awaits` to playwright tests to get them passing * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * empty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-14 14:26:44 -04:00
import { submitAndAwaitTextToKcl } from 'lib/textToCad'
import { useFileContext } from 'hooks/useFileContext'
import { uuidv4 } from 'lib/utils'
import { IndexLoaderData } from 'lib/types'
Refactor source ranges into a generic node type (#4350) * WIP Signed-off-by: Nick Cameron <nrc@ncameron.org> * Fix formatting * Fix yarn build:wasm * Fix ts_rs bindings * Fix tsc errors * Fix wasm TS types * Add minimal failing test * Rename field to avoid name collisions * Remove node wrapper around NonCodeMeta Trying to fix TS unit test errors deserializing JSON AST in Rust. * Rename Node to BoxNode * Fix lints * Fix lint by boxing literals * Rename UnboxedNode to Node * Look at this (photo)Graph *in the voice of Nickelback* * Update docs * Update snapshots * initial trait Signed-off-by: Jess Frazelle <github@jessfraz.com> * update docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * gross hack for TagNode Signed-off-by: Jess Frazelle <github@jessfraz.com> * extend gross hack Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix EnvRef bullshit Signed-off-by: Jess Frazelle <github@jessfraz.com> * Fix to fail parsing when a tag declarator matches a stdlib function name * Fix test errors after merging main * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * Confirm * Change to use simpler map_err * Add comment --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <github@jessfraz.com>
2024-10-30 16:52:17 -04:00
import { Node } from 'wasm-lib/kcl/bindings/Node'
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
type MachineContext<T extends AnyStateMachine> = {
state: StateFrom<T>
context: ContextFrom<T>
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
send: Prop<Actor<T>, 'send'>
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
}
export const ModelingMachineContext = createContext(
{} as MachineContext<typeof modelingMachine>
)
export const ModelingMachineProvider = ({
children,
}: {
children: React.ReactNode
}) => {
const {
auth,
settings: {
Rearchitect settings system to be scoped (#1956) * BROKEN: start of scopes for each setting * Clean up later: mostly-functional scoped settings! Broken command bar, unimplemented generated settings components * Working persisted project settings in-folder * Start working toward automatic commands and settings UI * Relatively stable, settings-menu-editable * Settings persistence tweaks after merge * Custom settings UI working properly, cleaner types * Allow boolean command types, create Settings UI for them * Add support for option and string Settings input types * Proof of concept settings from command bar * Add all settings to command bar * Allow settings to be hidden on a level * Better command titles for settings * Hide the settings the settings from the commands bar * Derive command defaultValue from *current* settingsMachine context * Fix generated settings UI for 'options' type settings * Pretty settings modal 💅 * Allow for rollback to parent level setting * fmt * Fix tsc errors not related to loading from localStorage * Better setting descriptions, better buttons * Make displayName searchable in command bar * Consolidate constants, get working in browser * Start fixing tests, better types for saved settings payloads * Fix playwright tests * Add a test for the settings modal * Add AtLeast to codespell ignore list * Goofed merge of codespellrc * Try fixing linux E2E tests * Make codespellrc word lowercase * fmt * Fix data-testid in Tauri test * Don't set text settings if nothing changed * Turn off unimplemented settings * Allow for multiple "execution-done" messages to have appeared in snapshot tests * Try fixing up snapshot tests * Switch from .json to .toml settings file format * Use a different method for overriding the default units * Try to force using the new common storage state in snapshot tests * Update tests to use TOML * fmt and remove console logs * Restore units to export * tsc errors, make snapshot tests use TOML * Ensure that snapshot tests use the basicStorageState * Re-organize use of test.use() * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Update snapshots one more time since lighting changed * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Fix broken "Show in folder" for project-level settings * Fire all relevant actions after settings reset * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Properly reset the default directory * Hide settings by platform * Actually honor showDebugPanel * Unify settings hiding logic * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix first extrusion snapshot * another attempt to fix extrustion snapshot * Rerun test suite * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger CI * more extrusion stuff * Replace resetSettings console log with comment --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
2024-04-02 10:29:34 -04:00
context: {
app: { theme, enableSSAO },
Add a user-level projection setting, command, and toggle (#3983) * Add cameraProjection setting * Add UI to toggle the user-level projection setting. * Make cameraProjection setting respected at startup * Add an E2E test for the perspective toggle * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Don't force user back into perspective when exiting sketch * Make the projection setting more searchable * Make `current` label apply to the default option if not set * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * Re-run CI * Ohh *cargo fmt* * @lf94 feedback, fix found toggling bug, make command bar instantly toggle setting * Roll back the instant toggling behavior, it breaks the tests * Make ortho the default, keep tests using perspective * Move projection below camera controls setting * Fix up gizmo tests, which broke because the gizmo moved * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * Look at this (photo)Graph *in the voice of Nickelback* --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: 49fl <ircsurfer33@gmail.com>
2024-09-30 11:40:00 -04:00
modeling: {
defaultUnit,
cameraProjection,
highlightEdges,
showScaleGrid,
},
Rearchitect settings system to be scoped (#1956) * BROKEN: start of scopes for each setting * Clean up later: mostly-functional scoped settings! Broken command bar, unimplemented generated settings components * Working persisted project settings in-folder * Start working toward automatic commands and settings UI * Relatively stable, settings-menu-editable * Settings persistence tweaks after merge * Custom settings UI working properly, cleaner types * Allow boolean command types, create Settings UI for them * Add support for option and string Settings input types * Proof of concept settings from command bar * Add all settings to command bar * Allow settings to be hidden on a level * Better command titles for settings * Hide the settings the settings from the commands bar * Derive command defaultValue from *current* settingsMachine context * Fix generated settings UI for 'options' type settings * Pretty settings modal 💅 * Allow for rollback to parent level setting * fmt * Fix tsc errors not related to loading from localStorage * Better setting descriptions, better buttons * Make displayName searchable in command bar * Consolidate constants, get working in browser * Start fixing tests, better types for saved settings payloads * Fix playwright tests * Add a test for the settings modal * Add AtLeast to codespell ignore list * Goofed merge of codespellrc * Try fixing linux E2E tests * Make codespellrc word lowercase * fmt * Fix data-testid in Tauri test * Don't set text settings if nothing changed * Turn off unimplemented settings * Allow for multiple "execution-done" messages to have appeared in snapshot tests * Try fixing up snapshot tests * Switch from .json to .toml settings file format * Use a different method for overriding the default units * Try to force using the new common storage state in snapshot tests * Update tests to use TOML * fmt and remove console logs * Restore units to export * tsc errors, make snapshot tests use TOML * Ensure that snapshot tests use the basicStorageState * Re-organize use of test.use() * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Update snapshots one more time since lighting changed * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Fix broken "Show in folder" for project-level settings * Fire all relevant actions after settings reset * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Properly reset the default directory * Hide settings by platform * Actually honor showDebugPanel * Unify settings hiding logic * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix first extrusion snapshot * another attempt to fix extrustion snapshot * Rerun test suite * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger CI * more extrusion stuff * Replace resetSettings console log with comment --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
2024-04-02 10:29:34 -04:00
},
},
} = useSettingsAuthContext()
Text-to-CAD with alpha model (might have issues) integration (#3299) * Add close dismiss button to Infinite duration non-loading toasts * Add text-to-cad icon candidates * Add a way to silently create files * Add text-to-cad command with mock backend * add the actual endpoint Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix the response Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * Add `credentials: include` * add headers Signed-off-by: Jess Frazelle <github@jessfraz.com> * Mostly working? Just getting CORS on desktop * Merge goof * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * create cross platform fetch; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * better names for files Signed-off-by: Jess Frazelle <github@jessfraz.com> * Commit broken THREEjs success toast * base64 decode Signed-off-by: Jess Frazelle <github@jessfraz.com> * send telemetry on reject / accept Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * basic tests; Signed-off-by: Jess Frazelle <github@jessfraz.com> * lego Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Get model stylized based on settings * Don't need automatic dismiss button for Infinity-duration toasts anymore * Stylize loaded model, add OrbitControls, polish button behavior * Allow user to retry prompt if one fails * Add an auto-grow textarea input type to the command bar, set text-to-cad to use it * Delete the created file in desktop if user rejects it * Submit with meta+Enter * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more tests and various fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Set `prompt` arg defaultValue to failed prompt value on retry * Add missing `awaits` to playwright tests to get them passing * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * empty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-14 14:26:44 -04:00
const navigate = useNavigate()
const { context, send: fileMachineSend } = useFileContext()
const { file } = useLoaderData() as IndexLoaderData
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
const token = auth?.context?.token
const streamRef = useRef<HTMLDivElement>(null)
const persistedContext = useMemo(() => getPersistedContext(), [])
let [searchParams] = useSearchParams()
const pool = searchParams.get('pool')
Text-to-CAD with alpha model (might have issues) integration (#3299) * Add close dismiss button to Infinite duration non-loading toasts * Add text-to-cad icon candidates * Add a way to silently create files * Add text-to-cad command with mock backend * add the actual endpoint Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix the response Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * Add `credentials: include` * add headers Signed-off-by: Jess Frazelle <github@jessfraz.com> * Mostly working? Just getting CORS on desktop * Merge goof * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * create cross platform fetch; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * better names for files Signed-off-by: Jess Frazelle <github@jessfraz.com> * Commit broken THREEjs success toast * base64 decode Signed-off-by: Jess Frazelle <github@jessfraz.com> * send telemetry on reject / accept Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * basic tests; Signed-off-by: Jess Frazelle <github@jessfraz.com> * lego Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Get model stylized based on settings * Don't need automatic dismiss button for Infinity-duration toasts anymore * Stylize loaded model, add OrbitControls, polish button behavior * Allow user to retry prompt if one fails * Add an auto-grow textarea input type to the command bar, set text-to-cad to use it * Delete the created file in desktop if user rejects it * Submit with meta+Enter * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more tests and various fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Set `prompt` arg defaultValue to failed prompt value on retry * Add missing `awaits` to playwright tests to get them passing * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * empty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-14 14:26:44 -04:00
const { commandBarState, commandBarSend } = useCommandsContext()
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
// Settings machine setup
// const retrievedSettings = useRef(
// localStorage?.getItem(MODELING_PERSIST_KEY) || '{}'
// )
// What should we persist from modeling state? Nothing?
// const persistedSettings = Object.assign(
// settingsMachine.initialState.context,
// JSON.parse(retrievedSettings.current) as Partial<
// (typeof settingsMachine)['context']
// >
// )
const machineManager = useContext(MachineManagerContext)
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
const [modelingState, modelingSend, modelingActor] = useMachine(
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
modelingMachine.provide({
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
actions: {
'disable copilot': () => {
editorManager.setCopilotEnabled(false)
},
'enable copilot': () => {
editorManager.setCopilotEnabled(true)
},
// tsc reports this typing as perfectly fine, but eslint is complaining.
// It's actually nonsensical, so I'm quieting.
// eslint-disable-next-line @typescript-eslint/no-misused-promises
'sketch exit execute': async ({
context: { store },
}): Promise<void> => {
// When cancelling the sketch mode we should disable sketch mode within the engine.
await engineCommandManager.sendSceneCommand({
type: 'modeling_cmd_req',
cmd_id: uuidv4(),
cmd: { type: 'sketch_mode_disable' },
})
sceneInfra.camControls.syncDirection = 'clientToEngine'
2024-07-17 18:58:01 +10:00
if (cameraProjection.current === 'perspective') {
await sceneInfra.camControls.snapToPerspectiveBeforeHandingBackControlToEngine()
}
sceneInfra.camControls.syncDirection = 'engineToClient'
store.videoElement?.pause()
return kclManager
.executeCode()
.then(() => {
if (engineCommandManager.engineConnection?.idleMode) return
store.videoElement?.play().catch((e) => {
console.warn('Video playing was prevented', e)
})
})
.catch(reportRejection)
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'Set mouse state': assign(({ context, event }) => {
if (event.type !== 'Set mouse state') return {}
const nextSegmentHoverMap = () => {
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
if (event.data.type === 'isHovering') {
const parent = getParentGroup(event.data.on, SEGMENT_BODIES)
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
const pathToNode = parent?.userData?.pathToNode
const pathToNodeString = JSON.stringify(pathToNode)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (!parent || !pathToNode) return context.segmentHoverMap
if (context.segmentHoverMap[pathToNodeString] !== undefined)
clearTimeout(
context.segmentHoverMap[JSON.stringify(pathToNode)]
)
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
return {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
...context.segmentHoverMap,
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
[pathToNodeString]: 0,
}
} else if (
event.data.type === 'idle' &&
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
context.mouseState.type === 'isHovering'
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
) {
const mouseOnParent = getParentGroup(
context.mouseState.on,
SEGMENT_BODIES
)
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
if (!mouseOnParent || !mouseOnParent?.userData?.pathToNode)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
return context.segmentHoverMap
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
const pathToNodeString = JSON.stringify(
mouseOnParent?.userData?.pathToNode
)
const timeoutId = setTimeout(() => {
sceneInfra.modelingSend({
type: 'Set mouse state',
data: {
type: 'timeoutEnd',
pathToNodeString,
},
})
// overlay timeout is 1s
}, 1000) as unknown as number
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
return {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
...context.segmentHoverMap,
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
[pathToNodeString]: timeoutId,
}
} else if (event.data.type === 'timeoutEnd') {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const copy = { ...context.segmentHoverMap }
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
delete copy[event.data.pathToNodeString]
return copy
}
return {}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}
return {
mouseState: event.data,
segmentHoverMap: nextSegmentHoverMap(),
}
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
}),
'Set Segment Overlays': assign({
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
segmentOverlays: ({ context: { segmentOverlays }, event }) => {
if (event.type !== 'Set Segment Overlays') return {}
if (event.data.type === 'set-many') return event.data.overlays
if (event.data.type === 'set-one')
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
return {
...segmentOverlays,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
[event.data.pathToNodeString]: event.data.seg,
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (event.data.type === 'delete-one') {
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
const copy = { ...segmentOverlays }
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
delete copy[event.data.pathToNodeString]
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
return copy
}
// data.type === 'clear'
return {}
},
}),
'Center camera on selection': () => {
engineCommandManager
.sendSceneCommand({
type: 'modeling_cmd_req',
cmd_id: uuidv4(),
cmd: {
type: 'default_camera_center_to_selection',
},
})
.catch(reportRejection)
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'Set sketchDetails': assign(({ context: { sketchDetails }, event }) => {
if (event.type !== 'Delete segment') return {}
if (!sketchDetails) return {}
return {
sketchDetails: {
...sketchDetails,
sketchPathToNode: event.data,
},
}
}),
'Set selection': assign(
({ context: { selectionRanges, sketchDetails }, event }) => {
// this was needed for ts after adding 'Set selection' action to on done modal events
const setSelections =
('data' in event &&
event.data &&
'selectionType' in event.data &&
event.data) ||
('output' in event &&
event.output &&
'selectionType' in event.output &&
event.output) ||
null
if (!setSelections) return {}
const dispatchSelection = (selection?: EditorSelection) => {
if (!selection) return // TODO less of hack for the below please
codemirror lsp highlighter (#2806) * tokenizer Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) udates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) updates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> more cleaniup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> dont react to non relevant events Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) faster Signed-off-by: Jess Frazelle <github@jessfraz.com> cleanup code Signed-off-by: Jess Frazelle <github@jessfraz.com> defer Signed-off-by: Jess Frazelle <github@jessfraz.com> more events Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> user events Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates ; Signed-off-by: Jess Frazelle <github@jessfraz.com> upfates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> make highlighting code blocks easier Signed-off-by: Jess Frazelle <github@jessfraz.com> improvements Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> better builds Signed-off-by: Jess Frazelle <github@jessfraz.com> remove weird hacks Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> better checks Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) make release builds in prod (#2839) Update package.json udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix some tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) updates Signed-off-by: Jess Frazelle <github@jessfraz.com> better timing Signed-off-by: Jess Frazelle <github@jessfraz.com> tweak delay Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) upfates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> ifxup Signed-off-by: Jess Frazelle <github@jessfraz.com> udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> wait for the lsp for all screenshots so consistent Signed-off-by: Jess Frazelle <github@jessfraz.com> better playwright Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> Call core dump from the bug reporting button(s) (#2783) * Add coredump to refresh button - this one indicates that there should be something like a core dump that is triggered. * Added lower right control bug report button - included custom toasts for bug reporting, supports fallback bug reporting when app cannot generate a core dump better keymaps Signed-off-by: Jess Frazelle <github@jessfraz.com> emptu in comment Signed-off-by: Jess Frazelle <github@jessfraz.com> fix logs Signed-off-by: Jess Frazelle <github@jessfraz.com> fxes Signed-off-by: Jess Frazelle <github@jessfraz.com> add a test for tab to autocomplete Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> better Signed-off-by: Jess Frazelle <github@jessfraz.com> printl Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * upfates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * empty * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-29 18:10:07 -07:00
if (!editorManager.editorView) return
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
setTimeout(() => {
if (!editorManager.editorView) return
editorManager.editorView.dispatch({
selection,
annotations: [
modelingMachineEvent,
Transaction.addToHistory.of(false),
],
})
codemirror lsp highlighter (#2806) * tokenizer Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) udates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) updates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> more cleaniup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> dont react to non relevant events Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) faster Signed-off-by: Jess Frazelle <github@jessfraz.com> cleanup code Signed-off-by: Jess Frazelle <github@jessfraz.com> defer Signed-off-by: Jess Frazelle <github@jessfraz.com> more events Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> user events Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates ; Signed-off-by: Jess Frazelle <github@jessfraz.com> upfates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> make highlighting code blocks easier Signed-off-by: Jess Frazelle <github@jessfraz.com> improvements Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> better builds Signed-off-by: Jess Frazelle <github@jessfraz.com> remove weird hacks Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> better checks Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) make release builds in prod (#2839) Update package.json udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix some tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) updates Signed-off-by: Jess Frazelle <github@jessfraz.com> better timing Signed-off-by: Jess Frazelle <github@jessfraz.com> tweak delay Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) upfates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> ifxup Signed-off-by: Jess Frazelle <github@jessfraz.com> udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> wait for the lsp for all screenshots so consistent Signed-off-by: Jess Frazelle <github@jessfraz.com> better playwright Signed-off-by: Jess Frazelle <github@jessfraz.com> A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> Call core dump from the bug reporting button(s) (#2783) * Add coredump to refresh button - this one indicates that there should be something like a core dump that is triggered. * Added lower right control bug report button - included custom toasts for bug reporting, supports fallback bug reporting when app cannot generate a core dump better keymaps Signed-off-by: Jess Frazelle <github@jessfraz.com> emptu in comment Signed-off-by: Jess Frazelle <github@jessfraz.com> fix logs Signed-off-by: Jess Frazelle <github@jessfraz.com> fxes Signed-off-by: Jess Frazelle <github@jessfraz.com> add a test for tab to autocomplete Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> better Signed-off-by: Jess Frazelle <github@jessfraz.com> printl Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * upfates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * empty * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-29 18:10:07 -07:00
})
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
let selections: Selections = {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
graphSelections: [],
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
otherSelections: [],
}
if (setSelections.selectionType === 'singleCodeCursor') {
if (!setSelections.selection && editorManager.isShiftDown) {
} else if (
!setSelections.selection &&
!editorManager.isShiftDown
) {
selections = {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
graphSelections: [],
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
otherSelections: [],
}
} else if (
setSelections.selection &&
!editorManager.isShiftDown
) {
selections = {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
graphSelections: [setSelections.selection],
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
otherSelections: [],
}
} else if (setSelections.selection && editorManager.isShiftDown) {
selections = {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
graphSelections: [
...selectionRanges.graphSelections,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
setSelections.selection,
],
otherSelections: selectionRanges.otherSelections,
}
}
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const {
engineEvents,
codeMirrorSelection,
updateSceneObjectColors,
} = handleSelectionBatch({
selections,
})
codeMirrorSelection && dispatchSelection(codeMirrorSelection)
engineEvents &&
engineEvents.forEach((event) => {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
engineCommandManager.sendSceneCommand(event)
})
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
updateSceneObjectColors()
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
return {
selectionRanges: selections,
}
}
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (setSelections.selectionType === 'mirrorCodeMirrorSelections') {
return {
selectionRanges: setSelections.selection,
}
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
}
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
if (
setSelections.selectionType === 'axisSelection' ||
setSelections.selectionType === 'defaultPlaneSelection'
) {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (editorManager.isShiftDown) {
selections = {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
graphSelections: selectionRanges.graphSelections,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
otherSelections: [setSelections.selection],
}
} else {
selections = {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
graphSelections: [],
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
otherSelections: [setSelections.selection],
}
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
return {
selectionRanges: selections,
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
}
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (setSelections.selectionType === 'completeSelection') {
editorManager.selectRange(setSelections.selection)
if (!sketchDetails)
return {
selectionRanges: setSelections.selection,
}
return {
selectionRanges: setSelections.selection,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
sketchDetails: {
...sketchDetails,
sketchPathToNode:
setSelections.updatedPathToNode ||
sketchDetails?.sketchPathToNode ||
[],
},
}
}
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
return {}
}
),
Make: ({ context, event }) => {
if (event.type !== 'Make') return
Add print button (#3133) * add print button Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * generate more types Signed-off-by: Jess Frazelle <github@jessfraz.com> * add a github action to generate machine api-types Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * actually print on the real machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * get the current machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * know when error Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * add fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * empty * update machine api Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * New machine-api types * emptuy * no circular deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * remove recursive dep Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-08-04 00:51:30 -04:00
// Check if we already have an export intent.
if (engineCommandManager.exportInfo) {
Add print button (#3133) * add print button Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * generate more types Signed-off-by: Jess Frazelle <github@jessfraz.com> * add a github action to generate machine api-types Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * actually print on the real machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * get the current machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * know when error Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * add fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * empty * update machine api Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * New machine-api types * emptuy * no circular deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * remove recursive dep Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-08-04 00:51:30 -04:00
toast.error('Already exporting')
return
}
// Set the export intent.
engineCommandManager.exportInfo = {
intent: ExportIntent.Make,
name: file?.name || '',
}
Add print button (#3133) * add print button Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * generate more types Signed-off-by: Jess Frazelle <github@jessfraz.com> * add a github action to generate machine api-types Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * actually print on the real machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * get the current machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * know when error Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * add fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * empty * update machine api Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * New machine-api types * emptuy * no circular deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * remove recursive dep Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-08-04 00:51:30 -04:00
// Set the current machine.
// Due to our use of singeton pattern, we need to do this to reliably
// update this object across React and non-React boundary.
// We need to do this eagerly because of the exportToEngine call below.
if (engineCommandManager.machineManager === null) {
console.warn(
"engineCommandManager.machineManager is null. It shouldn't be at this point. Aborting operation."
)
return
} else {
engineCommandManager.machineManager.currentMachine =
event.data.machine
}
// Update the rest of the UI that needs to know the current machine
context.machineManager.setCurrentMachine(event.data.machine)
Add print button (#3133) * add print button Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * generate more types Signed-off-by: Jess Frazelle <github@jessfraz.com> * add a github action to generate machine api-types Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * actually print on the real machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * get the current machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * know when error Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * add fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * empty * update machine api Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * New machine-api types * emptuy * no circular deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * remove recursive dep Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-08-04 00:51:30 -04:00
const format: Models['OutputFormat_type'] = {
type: 'stl',
coords: {
forward: {
axis: 'y',
direction: 'negative',
},
up: {
axis: 'z',
direction: 'positive',
},
},
storage: 'ascii',
// Convert all units to mm since that is what the slicer expects.
units: 'mm',
Add print button (#3133) * add print button Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * generate more types Signed-off-by: Jess Frazelle <github@jessfraz.com> * add a github action to generate machine api-types Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * actually print on the real machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * get the current machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * know when error Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * add fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * empty * update machine api Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * New machine-api types * emptuy * no circular deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * remove recursive dep Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-08-04 00:51:30 -04:00
selection: { type: 'default_scene' },
}
exportFromEngine({
format: format,
}).catch(reportRejection)
Add print button (#3133) * add print button Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * generate more types Signed-off-by: Jess Frazelle <github@jessfraz.com> * add a github action to generate machine api-types Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * actually print on the real machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * get the current machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * know when error Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * add fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * empty * update machine api Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * New machine-api types * emptuy * no circular deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * remove recursive dep Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-08-04 00:51:30 -04:00
},
'Engine export': ({ event }) => {
if (event.type !== 'Export') return
if (engineCommandManager.exportInfo) {
Add print button (#3133) * add print button Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * generate more types Signed-off-by: Jess Frazelle <github@jessfraz.com> * add a github action to generate machine api-types Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * actually print on the real machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * get the current machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * know when error Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * add fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * empty * update machine api Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * New machine-api types * emptuy * no circular deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * remove recursive dep Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-08-04 00:51:30 -04:00
toast.error('Already exporting')
return
}
// Set the export intent.
engineCommandManager.exportInfo = {
intent: ExportIntent.Save,
// This never gets used its only for make.
name: file?.name?.replace('.kcl', `.${event.data.type}`) || '',
}
Add print button (#3133) * add print button Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * generate more types Signed-off-by: Jess Frazelle <github@jessfraz.com> * add a github action to generate machine api-types Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * actually print on the real machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * get the current machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * know when error Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * add fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * empty * update machine api Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * New machine-api types * emptuy * no circular deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * remove recursive dep Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-08-04 00:51:30 -04:00
const format = {
...event.data,
} as Partial<Models['OutputFormat_type']>
// Set all the un-configurable defaults here.
if (format.type === 'gltf') {
format.presentation = 'pretty'
}
if (
format.type === 'obj' ||
format.type === 'ply' ||
format.type === 'step' ||
format.type === 'stl'
) {
// Set the default coords.
// In the future we can make this configurable.
// But for now, its probably best to keep it consistent with the
// UI.
format.coords = {
forward: {
axis: 'y',
direction: 'negative',
},
up: {
axis: 'z',
direction: 'positive',
},
}
}
if (
format.type === 'obj' ||
format.type === 'stl' ||
format.type === 'ply'
) {
Rearchitect settings system to be scoped (#1956) * BROKEN: start of scopes for each setting * Clean up later: mostly-functional scoped settings! Broken command bar, unimplemented generated settings components * Working persisted project settings in-folder * Start working toward automatic commands and settings UI * Relatively stable, settings-menu-editable * Settings persistence tweaks after merge * Custom settings UI working properly, cleaner types * Allow boolean command types, create Settings UI for them * Add support for option and string Settings input types * Proof of concept settings from command bar * Add all settings to command bar * Allow settings to be hidden on a level * Better command titles for settings * Hide the settings the settings from the commands bar * Derive command defaultValue from *current* settingsMachine context * Fix generated settings UI for 'options' type settings * Pretty settings modal 💅 * Allow for rollback to parent level setting * fmt * Fix tsc errors not related to loading from localStorage * Better setting descriptions, better buttons * Make displayName searchable in command bar * Consolidate constants, get working in browser * Start fixing tests, better types for saved settings payloads * Fix playwright tests * Add a test for the settings modal * Add AtLeast to codespell ignore list * Goofed merge of codespellrc * Try fixing linux E2E tests * Make codespellrc word lowercase * fmt * Fix data-testid in Tauri test * Don't set text settings if nothing changed * Turn off unimplemented settings * Allow for multiple "execution-done" messages to have appeared in snapshot tests * Try fixing up snapshot tests * Switch from .json to .toml settings file format * Use a different method for overriding the default units * Try to force using the new common storage state in snapshot tests * Update tests to use TOML * fmt and remove console logs * Restore units to export * tsc errors, make snapshot tests use TOML * Ensure that snapshot tests use the basicStorageState * Re-organize use of test.use() * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Update snapshots one more time since lighting changed * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Fix broken "Show in folder" for project-level settings * Fire all relevant actions after settings reset * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Properly reset the default directory * Hide settings by platform * Actually honor showDebugPanel * Unify settings hiding logic * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix first extrusion snapshot * another attempt to fix extrustion snapshot * Rerun test suite * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger CI * more extrusion stuff * Replace resetSettings console log with comment --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
2024-04-02 10:29:34 -04:00
format.units = defaultUnit.current
}
if (format.type === 'ply' || format.type === 'stl') {
format.selection = { type: 'default_scene' }
}
exportFromEngine({
format: format as Models['OutputFormat_type'],
}).catch(reportRejection)
},
'Submit to Text-to-CAD API': ({ event }) => {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (event.type !== 'Text-to-CAD') return
const trimmedPrompt = event.data.prompt.trim()
Text-to-CAD with alpha model (might have issues) integration (#3299) * Add close dismiss button to Infinite duration non-loading toasts * Add text-to-cad icon candidates * Add a way to silently create files * Add text-to-cad command with mock backend * add the actual endpoint Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix the response Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * Add `credentials: include` * add headers Signed-off-by: Jess Frazelle <github@jessfraz.com> * Mostly working? Just getting CORS on desktop * Merge goof * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * create cross platform fetch; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * better names for files Signed-off-by: Jess Frazelle <github@jessfraz.com> * Commit broken THREEjs success toast * base64 decode Signed-off-by: Jess Frazelle <github@jessfraz.com> * send telemetry on reject / accept Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * basic tests; Signed-off-by: Jess Frazelle <github@jessfraz.com> * lego Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Get model stylized based on settings * Don't need automatic dismiss button for Infinity-duration toasts anymore * Stylize loaded model, add OrbitControls, polish button behavior * Allow user to retry prompt if one fails * Add an auto-grow textarea input type to the command bar, set text-to-cad to use it * Delete the created file in desktop if user rejects it * Submit with meta+Enter * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more tests and various fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Set `prompt` arg defaultValue to failed prompt value on retry * Add missing `awaits` to playwright tests to get them passing * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * empty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-14 14:26:44 -04:00
if (!trimmedPrompt) return
submitAndAwaitTextToKcl({
Text-to-CAD with alpha model (might have issues) integration (#3299) * Add close dismiss button to Infinite duration non-loading toasts * Add text-to-cad icon candidates * Add a way to silently create files * Add text-to-cad command with mock backend * add the actual endpoint Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix the response Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * Add `credentials: include` * add headers Signed-off-by: Jess Frazelle <github@jessfraz.com> * Mostly working? Just getting CORS on desktop * Merge goof * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * create cross platform fetch; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * better names for files Signed-off-by: Jess Frazelle <github@jessfraz.com> * Commit broken THREEjs success toast * base64 decode Signed-off-by: Jess Frazelle <github@jessfraz.com> * send telemetry on reject / accept Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * basic tests; Signed-off-by: Jess Frazelle <github@jessfraz.com> * lego Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Get model stylized based on settings * Don't need automatic dismiss button for Infinity-duration toasts anymore * Stylize loaded model, add OrbitControls, polish button behavior * Allow user to retry prompt if one fails * Add an auto-grow textarea input type to the command bar, set text-to-cad to use it * Delete the created file in desktop if user rejects it * Submit with meta+Enter * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more tests and various fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Set `prompt` arg defaultValue to failed prompt value on retry * Add missing `awaits` to playwright tests to get them passing * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * empty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-14 14:26:44 -04:00
trimmedPrompt,
fileMachineSend,
navigate,
commandBarSend,
context,
token,
settings: {
theme: theme.current,
highlightEdges: highlightEdges.current,
},
}).catch(reportRejection)
Text-to-CAD with alpha model (might have issues) integration (#3299) * Add close dismiss button to Infinite duration non-loading toasts * Add text-to-cad icon candidates * Add a way to silently create files * Add text-to-cad command with mock backend * add the actual endpoint Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix the response Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * Add `credentials: include` * add headers Signed-off-by: Jess Frazelle <github@jessfraz.com> * Mostly working? Just getting CORS on desktop * Merge goof * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * create cross platform fetch; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * better names for files Signed-off-by: Jess Frazelle <github@jessfraz.com> * Commit broken THREEjs success toast * base64 decode Signed-off-by: Jess Frazelle <github@jessfraz.com> * send telemetry on reject / accept Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * basic tests; Signed-off-by: Jess Frazelle <github@jessfraz.com> * lego Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Get model stylized based on settings * Don't need automatic dismiss button for Infinity-duration toasts anymore * Stylize loaded model, add OrbitControls, polish button behavior * Allow user to retry prompt if one fails * Add an auto-grow textarea input type to the command bar, set text-to-cad to use it * Delete the created file in desktop if user rejects it * Submit with meta+Enter * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more tests and various fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Set `prompt` arg defaultValue to failed prompt value on retry * Add missing `awaits` to playwright tests to get them passing * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * empty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-14 14:26:44 -04:00
},
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
},
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
guards: {
'has valid sweep selection': ({ context: { selectionRanges } }) => {
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
// A user can begin extruding if they either have 1+ faces selected or nothing selected
// TODO: I believe this guard only allows for extruding a single face at a time
const hasNoSelection =
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
selectionRanges.graphSelections.length === 0 ||
isRangeBetweenCharacters(selectionRanges) ||
isSelectionLastLine(selectionRanges, codeManager.code)
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
if (hasNoSelection) {
// they have no selection, we should enable the button
// so they can select the face through the cmdbar
// BUT only if there's extrudable geometry
return doesSceneHaveSweepableSketch(kclManager.ast)
}
if (!isSketchPipe(selectionRanges)) return false
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
const canSweep = canSweepSelection(selectionRanges)
if (err(canSweep)) return false
return canSweep
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
},
2024-11-28 16:45:41 -05:00
'has valid loft selection': ({ context: { selectionRanges } }) => {
const hasNoSelection =
selectionRanges.graphSelections.length === 0 ||
isRangeBetweenCharacters(selectionRanges) ||
isSelectionLastLine(selectionRanges, codeManager.code)
if (hasNoSelection) {
2024-11-29 11:17:31 -05:00
const count = 2
return doesSceneHaveSweepableSketch(kclManager.ast, count)
2024-11-28 16:45:41 -05:00
}
2024-11-29 11:17:31 -05:00
2024-11-28 16:45:41 -05:00
const canLoft = canLoftSelection(selectionRanges)
if (err(canLoft)) return false
return canLoft
},
2024-12-05 14:06:09 -05:00
'has valid shell selection': ({
context: { selectionRanges },
event,
}) => {
2024-12-04 16:38:44 -05:00
const hasNoSelection =
selectionRanges.graphSelections.length === 0 ||
isRangeBetweenCharacters(selectionRanges) ||
isSelectionLastLine(selectionRanges, codeManager.code)
if (hasNoSelection) {
2024-12-05 14:06:09 -05:00
return doesSceneHaveExtrudedSketch(kclManager.ast)
2024-12-04 16:38:44 -05:00
}
2024-12-04 17:01:11 -05:00
const canShell = canShellSelection(selectionRanges)
2024-12-05 14:06:09 -05:00
console.log('canShellSelection', canShellSelection(selectionRanges))
2024-12-04 17:01:11 -05:00
if (err(canShell)) return false
return canShell
2024-12-04 16:38:44 -05:00
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'has valid selection for deletion': ({
context: { selectionRanges },
}) => {
if (!commandBarState.matches('Closed')) return false
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
if (selectionRanges.graphSelections.length <= 0) return false
return true
},
'has valid edge treatment selection': ({
context: { selectionRanges },
}) => {
return hasValidEdgeTreatmentSelection({
selectionRanges,
ast: kclManager.ast,
code: codeManager.code,
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
})
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'Selection is on face': ({ context: { selectionRanges }, event }) => {
if (event.type !== 'Enter sketch') return false
if (event.data?.forceNewSketch) return false
if (!isSingleCursorInPipe(selectionRanges, kclManager.ast))
return false
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
return !!isCursorInSketchCommandRange(
engineCommandManager.artifactGraph,
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
selectionRanges
)
},
'Has exportable geometry': () => {
if (!kclManager.hasErrors() && kclManager.ast.body.length > 0)
return true
else {
let errorMessage = 'Unable to Export '
if (kclManager.hasErrors()) errorMessage += 'due to KCL Errors'
else if (kclManager.ast.body.length === 0)
errorMessage += 'due to Empty Scene'
console.error(errorMessage)
toast.error(errorMessage, {
id: kclManager.engineCommandManager.pendingExport?.toastId,
})
return false
}
},
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
actors: {
'AST-undo-startSketchOn': fromPromise(
async ({ input: { sketchDetails } }) => {
if (!sketchDetails) return
if (kclManager.ast.body.length) {
// this assumes no changes have been made to the sketch besides what we did when entering the sketch
// i.e. doesn't account for user's adding code themselves, maybe we need store a flag userEditedSinceSketchMode?
const newAst = structuredClone(kclManager.ast)
const varDecIndex = sketchDetails.sketchPathToNode[1][0]
// remove body item at varDecIndex
newAst.body = newAst.body.filter((_, i) => i !== varDecIndex)
await kclManager.executeAstMock(newAst)
}
sceneInfra.setCallbacks({
onClick: () => {},
onDrag: () => {},
})
return undefined
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
),
'animate-to-face': fromPromise(async ({ input }) => {
if (!input) return undefined
Show offset planes in the scene, let user select them (#4481) * Update offset_plane to actually create and show the plane in-engine * Fix broken ability to use offsetPlanes in startSketchOn * Make the newly-visible offset planes usable for sketching via UI * Add a playwright test for sketching on an offset plane via point-and-click * cargo clippy & cargo fmt * Make `PlaneData` the first item of `SketchData` so autocomplete continues to work well for `startSketchOn` * @nadr0 feedback re: `offsetIndex` * From @jtran: "Need to call the ID generator so that IDs are stable." * More feedback from @jtran and fix incomplete use of `id_generator` in last commit * Oops I missed saving `isPathToNodeNumber` earlier 🤦🏻 * Make the distinction between `Plane` and `PlaneOrientationData` more clear per @nadr0 and @lf94's feedback * Make `newPathToNode` less hardcoded, per @lf94's feedback * Don't need to unbox and rebox `plane` * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Rearranging of enums and structs, but the offsetPlanes are still not used by their sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Revert all my little newtype fiddling it's a waste of time. * Update docs * cargo fmt * Remove log * Print the unexpected diagnostics * Undo renaming of `PlaneData` * Remove generated PlaneRientationData docs page * Redo doc generation after undoing `PlaneData` rename * Impl FromKclValue for the new plane datatypes * Clippy lint * When starting a sketch, only hide the plane if it's a custom plane * Fix FromKclValue and macro use since merge * Fix to not convert Plane to PlaneData * Make sure offset planes are `Custom` type * SketchData actually doesn't need to be in a certain order This avoids the autocompletion issue I was having. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-18 16:25:25 -05:00
if (input.type === 'extrudeFace' || input.type === 'offsetPlane') {
const sketched =
input.type === 'extrudeFace'
? sketchOnExtrudedFace(
kclManager.ast,
input.sketchPathToNode,
input.extrudePathToNode,
input.faceInfo
)
: sketchOnOffsetPlane(kclManager.ast, input.pathToNode)
if (err(sketched)) {
const sketchedError = new Error(
'Incompatible face, please try another'
)
trap(sketchedError)
return Promise.reject(sketchedError)
}
const { modifiedAst, pathToNode: pathToNewSketchNode } = sketched
await kclManager.executeAstMock(modifiedAst)
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
Show offset planes in the scene, let user select them (#4481) * Update offset_plane to actually create and show the plane in-engine * Fix broken ability to use offsetPlanes in startSketchOn * Make the newly-visible offset planes usable for sketching via UI * Add a playwright test for sketching on an offset plane via point-and-click * cargo clippy & cargo fmt * Make `PlaneData` the first item of `SketchData` so autocomplete continues to work well for `startSketchOn` * @nadr0 feedback re: `offsetIndex` * From @jtran: "Need to call the ID generator so that IDs are stable." * More feedback from @jtran and fix incomplete use of `id_generator` in last commit * Oops I missed saving `isPathToNodeNumber` earlier 🤦🏻 * Make the distinction between `Plane` and `PlaneOrientationData` more clear per @nadr0 and @lf94's feedback * Make `newPathToNode` less hardcoded, per @lf94's feedback * Don't need to unbox and rebox `plane` * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Rearranging of enums and structs, but the offsetPlanes are still not used by their sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Revert all my little newtype fiddling it's a waste of time. * Update docs * cargo fmt * Remove log * Print the unexpected diagnostics * Undo renaming of `PlaneData` * Remove generated PlaneRientationData docs page * Redo doc generation after undoing `PlaneData` rename * Impl FromKclValue for the new plane datatypes * Clippy lint * When starting a sketch, only hide the plane if it's a custom plane * Fix FromKclValue and macro use since merge * Fix to not convert Plane to PlaneData * Make sure offset planes are `Custom` type * SketchData actually doesn't need to be in a certain order This avoids the autocompletion issue I was having. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-18 16:25:25 -05:00
const id =
input.type === 'extrudeFace' ? input.faceId : input.planeId
await letEngineAnimateAndSyncCamAfter(engineCommandManager, id)
sceneInfra.camControls.syncDirection = 'clientToEngine'
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
return {
sketchPathToNode: pathToNewSketchNode,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
zAxis: input.zAxis,
yAxis: input.yAxis,
origin: input.position,
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
}
}
Client sketch scene (#1271) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happ * better error msg * fix control point issue * basic code gen working for tangentialArc * partical fix for move with arcs * tangential arc move * fix * make eslint rules less annoying * inital refactor of some xstate stuff * more old tangential arc clean up stuff * more tweaks * add testing * tweak xstate inspect * temp remove test * update formating for less conflicts * fix state machine layout after merge * shrug, something weird with xstate typegen * renaming some xstate events * tweak numbers to make CI playwright happ * CI hacks * more CI hacks * more CI hacks * new hack strategy * run tests agian * make cmd bar less flaky * ci hacks * CI hacks * CI hacks * CI hacks * clean up * fix * still have constraint stuff to deal with * progress on move rules * update source ranges after no execute code-mod * typo * mvp working * hide show sketch overlay * match scaling * update arrow head style * animate line tool * bypass xstate for animations, much smoother * add new segment working with refactor needed for setup paper sketch * refactor setup paper sketch * tangantialArcTo drag animations working * tangential arc polish * cargo fmt * clippy * more clippy * mock canvas * last of clippy? * typo * more clippy stuff * move util function so they are shareable with typescript * migrate a bunch to rust and only rust * add arc center point for draft tangential ac * clippy tweak * delete uneeded test * Rough start to scaling arrow heads. The tangent arrow heads are basically nuked and replaced while the straight line sections are just rotated and repositioned, this means they miss out on updating scaling number after a screen size changes. Needs fixing * fix bug with tool tips * fix draft line start position Having drag the end of teh path before selecting a tooltip would result in the draft line starting where the path used to end, stale data * some progress with pan maybe * fmt * inital camera sync working For perspective camera at least * change three.js to use z-up * add grid * orthographic camera working with polish items TODO * fix zoom level when swapping camera * fix up camera/orbit changing on cam change (pan wasn't being respected) * tidy up * use orbit target instead of assuming scene center * dynamic fov working * animate orthographic to perspective and reverse * fix import * temp fix for batch commands * initial client side scene sketch working * remove hover log * FOV adjust fix * fix comment * tear down sketch and small tweaks * some progress with camera tweening * combine dollyZoom engine commands see https://github.com/KittyCAD/modeling-api/compare/kurt-perspective-settings?expand=1 and https://github.com/KittyCAD/engine/compare/kurt-perspective-settings?expand=1 * make tests happy (mocks) * fix tween to vertical/camera-up bug * tween to each axis with hacky solutions in there * fix startSketchOn planes * tidy startSketchOn * tweening okay for now I think * get sketching on default planes working * allow editing on all default planes * clean up enter and exit sketch logic * tidy * tidy * remove more default plane stuff * start of draft line * remove some annoying parts of the paper.js implementation * fix drag than equip line bug * comment * don't animate on skech tear down since it's used for draft line * remove more default plane shit * style draft line * refine dashed line * draft line set up and tear down mostly happy * add on click logic ready for draft lines * sketch mode with drag and draft mode working solidly now, straight segments only * default planes match colors, hover and select still TODO * hover and click logic working for default planes Now just need the code mode to fire to 'startSketchOn(...)' * select default planes * remove some logs * fix update infinite loop * start of orbitControls port to Franks control guards * hiding scenes at different times * scene hide on camera move should be respected by scroll zoom * basic hover working * Hook up user camera settings to ClientSideScene (#1334) * Refactor to not import utilities from Router.tsx * Stop tracking changes or formatting *.typegen.ts * Hook up cameraControls to ClientSideScene * Remove camera controls toggle from temp debug panel --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> * add select segment moves cursor * highlight segments yellow on hover * cursor ranges effect 2d line colors * fix constrainst i.e. make sure the sketch is rejiged * selecting nothing should remove selections * remove hardcoded strings * update get_tangential_arc_to_info rust util * initial drawing of tangential arcs in client scene * fix tangentialArc arrow head direction * correct userData types for tangential arcs * get tangential arc updates working Doesn't include draging the head of the tangential arc itself yet * spot of clean up * make selections work with tangential arcs * get draft tangential segment animated * fix initial click weirdness for adding new tangential line * couple tweaks * add grace pixels /threshold to raycast * redo arc dashes so that they spawn from the ccenter of the arc * fix multi drag bug * fmt * add temp solution for close * add default axis hover colors, still needs select logic * selection of axis works, just with out selection color * get axis selection colors working * fix outdate source ranges after drag problem * update moreNodePathFromSourceRange * fix ts-rs issue/workaround * fix default plane weirdness * fix tangential arc rounding issue * review clean up part 1 * review clean up part 2 Big state-diagram cull * clippy * typo * clippy * fix xstate types with typegen * fix types * clippy * catch error * fix test import issue Not sure exactly what was happening but guessing circular import that vite didn't like * add axis/plane info to sketch group tests * case changes because of rs-ts bug, can probably revert this later * start of playwright test fixes * reduce geo complexity for straight segments * fix cam adjust tests * Revert "Clean up vite build warnings (#1332)" This reverts commit c1f661ab5254458c3e9fdb396a31860a22c790f1. * selection e2e test fixed< * remove camToggle to allow playwright tests to pass * remove drag test too brittle and needs to be redone from the ground up anyway * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix last test * clean up part 3 * clean up part 4 * clean up part 5 * clean up sketch enter exit logic * fix engine side selections * default plane should not be selected form 'onDragEnd' i.e. rotating the camera should not mean the user acidently selects a plane * clean up state diagram around animating to sketch mode Embracing that the animation is async and puting the interdiate steps in the state diagram clean up some logic and solved some bugs at the same time * add test for multiple sketches * typo * make highlight more robust * type tweak * scale segmenst with distance from camera so they have a consistent pixel size/ screenspace size * Jess's advice * tsc and fmt * clean up part 6 remove integer from xstate names * clean up part 7 * integrate sequency in to camera moves * fix tests * update snapshot e2e * small snapshot change * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Fix HomeLoaderData types * update std stuff * update kittycad rs client lib --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-11 12:59:00 +11:00
const { modifiedAst, pathToNode } = startSketchOnDefault(
kclManager.ast,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
input.plane
Client sketch scene (#1271) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happ * better error msg * fix control point issue * basic code gen working for tangentialArc * partical fix for move with arcs * tangential arc move * fix * make eslint rules less annoying * inital refactor of some xstate stuff * more old tangential arc clean up stuff * more tweaks * add testing * tweak xstate inspect * temp remove test * update formating for less conflicts * fix state machine layout after merge * shrug, something weird with xstate typegen * renaming some xstate events * tweak numbers to make CI playwright happ * CI hacks * more CI hacks * more CI hacks * new hack strategy * run tests agian * make cmd bar less flaky * ci hacks * CI hacks * CI hacks * CI hacks * clean up * fix * still have constraint stuff to deal with * progress on move rules * update source ranges after no execute code-mod * typo * mvp working * hide show sketch overlay * match scaling * update arrow head style * animate line tool * bypass xstate for animations, much smoother * add new segment working with refactor needed for setup paper sketch * refactor setup paper sketch * tangantialArcTo drag animations working * tangential arc polish * cargo fmt * clippy * more clippy * mock canvas * last of clippy? * typo * more clippy stuff * move util function so they are shareable with typescript * migrate a bunch to rust and only rust * add arc center point for draft tangential ac * clippy tweak * delete uneeded test * Rough start to scaling arrow heads. The tangent arrow heads are basically nuked and replaced while the straight line sections are just rotated and repositioned, this means they miss out on updating scaling number after a screen size changes. Needs fixing * fix bug with tool tips * fix draft line start position Having drag the end of teh path before selecting a tooltip would result in the draft line starting where the path used to end, stale data * some progress with pan maybe * fmt * inital camera sync working For perspective camera at least * change three.js to use z-up * add grid * orthographic camera working with polish items TODO * fix zoom level when swapping camera * fix up camera/orbit changing on cam change (pan wasn't being respected) * tidy up * use orbit target instead of assuming scene center * dynamic fov working * animate orthographic to perspective and reverse * fix import * temp fix for batch commands * initial client side scene sketch working * remove hover log * FOV adjust fix * fix comment * tear down sketch and small tweaks * some progress with camera tweening * combine dollyZoom engine commands see https://github.com/KittyCAD/modeling-api/compare/kurt-perspective-settings?expand=1 and https://github.com/KittyCAD/engine/compare/kurt-perspective-settings?expand=1 * make tests happy (mocks) * fix tween to vertical/camera-up bug * tween to each axis with hacky solutions in there * fix startSketchOn planes * tidy startSketchOn * tweening okay for now I think * get sketching on default planes working * allow editing on all default planes * clean up enter and exit sketch logic * tidy * tidy * remove more default plane stuff * start of draft line * remove some annoying parts of the paper.js implementation * fix drag than equip line bug * comment * don't animate on skech tear down since it's used for draft line * remove more default plane shit * style draft line * refine dashed line * draft line set up and tear down mostly happy * add on click logic ready for draft lines * sketch mode with drag and draft mode working solidly now, straight segments only * default planes match colors, hover and select still TODO * hover and click logic working for default planes Now just need the code mode to fire to 'startSketchOn(...)' * select default planes * remove some logs * fix update infinite loop * start of orbitControls port to Franks control guards * hiding scenes at different times * scene hide on camera move should be respected by scroll zoom * basic hover working * Hook up user camera settings to ClientSideScene (#1334) * Refactor to not import utilities from Router.tsx * Stop tracking changes or formatting *.typegen.ts * Hook up cameraControls to ClientSideScene * Remove camera controls toggle from temp debug panel --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> * add select segment moves cursor * highlight segments yellow on hover * cursor ranges effect 2d line colors * fix constrainst i.e. make sure the sketch is rejiged * selecting nothing should remove selections * remove hardcoded strings * update get_tangential_arc_to_info rust util * initial drawing of tangential arcs in client scene * fix tangentialArc arrow head direction * correct userData types for tangential arcs * get tangential arc updates working Doesn't include draging the head of the tangential arc itself yet * spot of clean up * make selections work with tangential arcs * get draft tangential segment animated * fix initial click weirdness for adding new tangential line * couple tweaks * add grace pixels /threshold to raycast * redo arc dashes so that they spawn from the ccenter of the arc * fix multi drag bug * fmt * add temp solution for close * add default axis hover colors, still needs select logic * selection of axis works, just with out selection color * get axis selection colors working * fix outdate source ranges after drag problem * update moreNodePathFromSourceRange * fix ts-rs issue/workaround * fix default plane weirdness * fix tangential arc rounding issue * review clean up part 1 * review clean up part 2 Big state-diagram cull * clippy * typo * clippy * fix xstate types with typegen * fix types * clippy * catch error * fix test import issue Not sure exactly what was happening but guessing circular import that vite didn't like * add axis/plane info to sketch group tests * case changes because of rs-ts bug, can probably revert this later * start of playwright test fixes * reduce geo complexity for straight segments * fix cam adjust tests * Revert "Clean up vite build warnings (#1332)" This reverts commit c1f661ab5254458c3e9fdb396a31860a22c790f1. * selection e2e test fixed< * remove camToggle to allow playwright tests to pass * remove drag test too brittle and needs to be redone from the ground up anyway * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix last test * clean up part 3 * clean up part 4 * clean up part 5 * clean up sketch enter exit logic * fix engine side selections * default plane should not be selected form 'onDragEnd' i.e. rotating the camera should not mean the user acidently selects a plane * clean up state diagram around animating to sketch mode Embracing that the animation is async and puting the interdiate steps in the state diagram clean up some logic and solved some bugs at the same time * add test for multiple sketches * typo * make highlight more robust * type tweak * scale segmenst with distance from camera so they have a consistent pixel size/ screenspace size * Jess's advice * tsc and fmt * clean up part 6 remove integer from xstate names * clean up part 7 * integrate sequency in to camera moves * fix tests * update snapshot e2e * small snapshot change * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Fix HomeLoaderData types * update std stuff * update kittycad rs client lib --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-11 12:59:00 +11:00
)
await kclManager.updateAst(modifiedAst, false)
sceneInfra.camControls.enableRotate = false
sceneInfra.camControls.syncDirection = 'clientToEngine'
await letEngineAnimateAndSyncCamAfter(
engineCommandManager,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
input.planeId
)
Client sketch scene (#1271) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happ * better error msg * fix control point issue * basic code gen working for tangentialArc * partical fix for move with arcs * tangential arc move * fix * make eslint rules less annoying * inital refactor of some xstate stuff * more old tangential arc clean up stuff * more tweaks * add testing * tweak xstate inspect * temp remove test * update formating for less conflicts * fix state machine layout after merge * shrug, something weird with xstate typegen * renaming some xstate events * tweak numbers to make CI playwright happ * CI hacks * more CI hacks * more CI hacks * new hack strategy * run tests agian * make cmd bar less flaky * ci hacks * CI hacks * CI hacks * CI hacks * clean up * fix * still have constraint stuff to deal with * progress on move rules * update source ranges after no execute code-mod * typo * mvp working * hide show sketch overlay * match scaling * update arrow head style * animate line tool * bypass xstate for animations, much smoother * add new segment working with refactor needed for setup paper sketch * refactor setup paper sketch * tangantialArcTo drag animations working * tangential arc polish * cargo fmt * clippy * more clippy * mock canvas * last of clippy? * typo * more clippy stuff * move util function so they are shareable with typescript * migrate a bunch to rust and only rust * add arc center point for draft tangential ac * clippy tweak * delete uneeded test * Rough start to scaling arrow heads. The tangent arrow heads are basically nuked and replaced while the straight line sections are just rotated and repositioned, this means they miss out on updating scaling number after a screen size changes. Needs fixing * fix bug with tool tips * fix draft line start position Having drag the end of teh path before selecting a tooltip would result in the draft line starting where the path used to end, stale data * some progress with pan maybe * fmt * inital camera sync working For perspective camera at least * change three.js to use z-up * add grid * orthographic camera working with polish items TODO * fix zoom level when swapping camera * fix up camera/orbit changing on cam change (pan wasn't being respected) * tidy up * use orbit target instead of assuming scene center * dynamic fov working * animate orthographic to perspective and reverse * fix import * temp fix for batch commands * initial client side scene sketch working * remove hover log * FOV adjust fix * fix comment * tear down sketch and small tweaks * some progress with camera tweening * combine dollyZoom engine commands see https://github.com/KittyCAD/modeling-api/compare/kurt-perspective-settings?expand=1 and https://github.com/KittyCAD/engine/compare/kurt-perspective-settings?expand=1 * make tests happy (mocks) * fix tween to vertical/camera-up bug * tween to each axis with hacky solutions in there * fix startSketchOn planes * tidy startSketchOn * tweening okay for now I think * get sketching on default planes working * allow editing on all default planes * clean up enter and exit sketch logic * tidy * tidy * remove more default plane stuff * start of draft line * remove some annoying parts of the paper.js implementation * fix drag than equip line bug * comment * don't animate on skech tear down since it's used for draft line * remove more default plane shit * style draft line * refine dashed line * draft line set up and tear down mostly happy * add on click logic ready for draft lines * sketch mode with drag and draft mode working solidly now, straight segments only * default planes match colors, hover and select still TODO * hover and click logic working for default planes Now just need the code mode to fire to 'startSketchOn(...)' * select default planes * remove some logs * fix update infinite loop * start of orbitControls port to Franks control guards * hiding scenes at different times * scene hide on camera move should be respected by scroll zoom * basic hover working * Hook up user camera settings to ClientSideScene (#1334) * Refactor to not import utilities from Router.tsx * Stop tracking changes or formatting *.typegen.ts * Hook up cameraControls to ClientSideScene * Remove camera controls toggle from temp debug panel --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> * add select segment moves cursor * highlight segments yellow on hover * cursor ranges effect 2d line colors * fix constrainst i.e. make sure the sketch is rejiged * selecting nothing should remove selections * remove hardcoded strings * update get_tangential_arc_to_info rust util * initial drawing of tangential arcs in client scene * fix tangentialArc arrow head direction * correct userData types for tangential arcs * get tangential arc updates working Doesn't include draging the head of the tangential arc itself yet * spot of clean up * make selections work with tangential arcs * get draft tangential segment animated * fix initial click weirdness for adding new tangential line * couple tweaks * add grace pixels /threshold to raycast * redo arc dashes so that they spawn from the ccenter of the arc * fix multi drag bug * fmt * add temp solution for close * add default axis hover colors, still needs select logic * selection of axis works, just with out selection color * get axis selection colors working * fix outdate source ranges after drag problem * update moreNodePathFromSourceRange * fix ts-rs issue/workaround * fix default plane weirdness * fix tangential arc rounding issue * review clean up part 1 * review clean up part 2 Big state-diagram cull * clippy * typo * clippy * fix xstate types with typegen * fix types * clippy * catch error * fix test import issue Not sure exactly what was happening but guessing circular import that vite didn't like * add axis/plane info to sketch group tests * case changes because of rs-ts bug, can probably revert this later * start of playwright test fixes * reduce geo complexity for straight segments * fix cam adjust tests * Revert "Clean up vite build warnings (#1332)" This reverts commit c1f661ab5254458c3e9fdb396a31860a22c790f1. * selection e2e test fixed< * remove camToggle to allow playwright tests to pass * remove drag test too brittle and needs to be redone from the ground up anyway * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix last test * clean up part 3 * clean up part 4 * clean up part 5 * clean up sketch enter exit logic * fix engine side selections * default plane should not be selected form 'onDragEnd' i.e. rotating the camera should not mean the user acidently selects a plane * clean up state diagram around animating to sketch mode Embracing that the animation is async and puting the interdiate steps in the state diagram clean up some logic and solved some bugs at the same time * add test for multiple sketches * typo * make highlight more robust * type tweak * scale segmenst with distance from camera so they have a consistent pixel size/ screenspace size * Jess's advice * tsc and fmt * clean up part 6 remove integer from xstate names * clean up part 7 * integrate sequency in to camera moves * fix tests * update snapshot e2e * small snapshot change * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Fix HomeLoaderData types * update std stuff * update kittycad rs client lib --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-11 12:59:00 +11:00
return {
sketchPathToNode: pathToNode,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
zAxis: input.zAxis,
yAxis: input.yAxis,
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
origin: [0, 0, 0],
Client sketch scene (#1271) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happ * better error msg * fix control point issue * basic code gen working for tangentialArc * partical fix for move with arcs * tangential arc move * fix * make eslint rules less annoying * inital refactor of some xstate stuff * more old tangential arc clean up stuff * more tweaks * add testing * tweak xstate inspect * temp remove test * update formating for less conflicts * fix state machine layout after merge * shrug, something weird with xstate typegen * renaming some xstate events * tweak numbers to make CI playwright happ * CI hacks * more CI hacks * more CI hacks * new hack strategy * run tests agian * make cmd bar less flaky * ci hacks * CI hacks * CI hacks * CI hacks * clean up * fix * still have constraint stuff to deal with * progress on move rules * update source ranges after no execute code-mod * typo * mvp working * hide show sketch overlay * match scaling * update arrow head style * animate line tool * bypass xstate for animations, much smoother * add new segment working with refactor needed for setup paper sketch * refactor setup paper sketch * tangantialArcTo drag animations working * tangential arc polish * cargo fmt * clippy * more clippy * mock canvas * last of clippy? * typo * more clippy stuff * move util function so they are shareable with typescript * migrate a bunch to rust and only rust * add arc center point for draft tangential ac * clippy tweak * delete uneeded test * Rough start to scaling arrow heads. The tangent arrow heads are basically nuked and replaced while the straight line sections are just rotated and repositioned, this means they miss out on updating scaling number after a screen size changes. Needs fixing * fix bug with tool tips * fix draft line start position Having drag the end of teh path before selecting a tooltip would result in the draft line starting where the path used to end, stale data * some progress with pan maybe * fmt * inital camera sync working For perspective camera at least * change three.js to use z-up * add grid * orthographic camera working with polish items TODO * fix zoom level when swapping camera * fix up camera/orbit changing on cam change (pan wasn't being respected) * tidy up * use orbit target instead of assuming scene center * dynamic fov working * animate orthographic to perspective and reverse * fix import * temp fix for batch commands * initial client side scene sketch working * remove hover log * FOV adjust fix * fix comment * tear down sketch and small tweaks * some progress with camera tweening * combine dollyZoom engine commands see https://github.com/KittyCAD/modeling-api/compare/kurt-perspective-settings?expand=1 and https://github.com/KittyCAD/engine/compare/kurt-perspective-settings?expand=1 * make tests happy (mocks) * fix tween to vertical/camera-up bug * tween to each axis with hacky solutions in there * fix startSketchOn planes * tidy startSketchOn * tweening okay for now I think * get sketching on default planes working * allow editing on all default planes * clean up enter and exit sketch logic * tidy * tidy * remove more default plane stuff * start of draft line * remove some annoying parts of the paper.js implementation * fix drag than equip line bug * comment * don't animate on skech tear down since it's used for draft line * remove more default plane shit * style draft line * refine dashed line * draft line set up and tear down mostly happy * add on click logic ready for draft lines * sketch mode with drag and draft mode working solidly now, straight segments only * default planes match colors, hover and select still TODO * hover and click logic working for default planes Now just need the code mode to fire to 'startSketchOn(...)' * select default planes * remove some logs * fix update infinite loop * start of orbitControls port to Franks control guards * hiding scenes at different times * scene hide on camera move should be respected by scroll zoom * basic hover working * Hook up user camera settings to ClientSideScene (#1334) * Refactor to not import utilities from Router.tsx * Stop tracking changes or formatting *.typegen.ts * Hook up cameraControls to ClientSideScene * Remove camera controls toggle from temp debug panel --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> * add select segment moves cursor * highlight segments yellow on hover * cursor ranges effect 2d line colors * fix constrainst i.e. make sure the sketch is rejiged * selecting nothing should remove selections * remove hardcoded strings * update get_tangential_arc_to_info rust util * initial drawing of tangential arcs in client scene * fix tangentialArc arrow head direction * correct userData types for tangential arcs * get tangential arc updates working Doesn't include draging the head of the tangential arc itself yet * spot of clean up * make selections work with tangential arcs * get draft tangential segment animated * fix initial click weirdness for adding new tangential line * couple tweaks * add grace pixels /threshold to raycast * redo arc dashes so that they spawn from the ccenter of the arc * fix multi drag bug * fmt * add temp solution for close * add default axis hover colors, still needs select logic * selection of axis works, just with out selection color * get axis selection colors working * fix outdate source ranges after drag problem * update moreNodePathFromSourceRange * fix ts-rs issue/workaround * fix default plane weirdness * fix tangential arc rounding issue * review clean up part 1 * review clean up part 2 Big state-diagram cull * clippy * typo * clippy * fix xstate types with typegen * fix types * clippy * catch error * fix test import issue Not sure exactly what was happening but guessing circular import that vite didn't like * add axis/plane info to sketch group tests * case changes because of rs-ts bug, can probably revert this later * start of playwright test fixes * reduce geo complexity for straight segments * fix cam adjust tests * Revert "Clean up vite build warnings (#1332)" This reverts commit c1f661ab5254458c3e9fdb396a31860a22c790f1. * selection e2e test fixed< * remove camToggle to allow playwright tests to pass * remove drag test too brittle and needs to be redone from the ground up anyway * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix last test * clean up part 3 * clean up part 4 * clean up part 5 * clean up sketch enter exit logic * fix engine side selections * default plane should not be selected form 'onDragEnd' i.e. rotating the camera should not mean the user acidently selects a plane * clean up state diagram around animating to sketch mode Embracing that the animation is async and puting the interdiate steps in the state diagram clean up some logic and solved some bugs at the same time * add test for multiple sketches * typo * make highlight more robust * type tweak * scale segmenst with distance from camera so they have a consistent pixel size/ screenspace size * Jess's advice * tsc and fmt * clean up part 6 remove integer from xstate names * clean up part 7 * integrate sequency in to camera moves * fix tests * update snapshot e2e * small snapshot change * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Fix HomeLoaderData types * update std stuff * update kittycad rs client lib --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-11 12:59:00 +11:00
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}),
'animate-to-sketch': fromPromise(
async ({ input: { selectionRanges } }) => {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
const sourceRange =
selectionRanges.graphSelections[0]?.codeRef?.range
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const sketchPathToNode = getNodePathFromSourceRange(
kclManager.ast,
sourceRange
)
const info = await getSketchOrientationDetails(
sketchPathToNode || []
)
await letEngineAnimateAndSyncCamAfter(
engineCommandManager,
info?.sketchDetails?.faceId || ''
)
return {
sketchPathToNode: sketchPathToNode || [],
zAxis: info.sketchDetails.zAxis || null,
yAxis: info.sketchDetails.yAxis || null,
origin: info.sketchDetails.origin.map(
(a) => a / sceneInfra._baseUnitMultiplier
) as [number, number, number],
}
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
),
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'Get horizontal info': fromPromise(
async ({ input: { selectionRanges, sketchDetails } }) => {
const { modifiedAst, pathToNodeMap } =
await applyConstraintHorzVertDistance({
constraint: 'setHorzDistance',
selectionRanges,
})
const pResult = parse(recast(modifiedAst))
if (trap(pResult) || !resultIsOk(pResult))
return Promise.reject(new Error('Unexpected compilation error'))
const _modifiedAst = pResult.program
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (!sketchDetails)
return Promise.reject(new Error('No sketch details'))
const updatedPathToNode = updatePathToNodeFromMap(
sketchDetails.sketchPathToNode,
pathToNodeMap
)
const updatedAst =
await sceneEntitiesManager.updateAstAndRejigSketch(
updatedPathToNode,
_modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (err(updatedAst)) return Promise.reject(updatedAst)
await codeManager.updateEditorWithAstAndWriteToFile(
updatedAst.newAst
)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const selection = updateSelections(
pathToNodeMap,
selectionRanges,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
updatedAst.newAst
)
if (err(selection)) return Promise.reject(selection)
return {
selectionType: 'completeSelection',
selection,
updatedPathToNode,
}
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
),
'Get vertical info': fromPromise(
async ({ input: { selectionRanges, sketchDetails } }) => {
const { modifiedAst, pathToNodeMap } =
await applyConstraintHorzVertDistance({
constraint: 'setVertDistance',
selectionRanges,
})
const pResult = parse(recast(modifiedAst))
if (trap(pResult) || !resultIsOk(pResult))
return Promise.reject(new Error('Unexpected compilation error'))
const _modifiedAst = pResult.program
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (!sketchDetails)
return Promise.reject(new Error('No sketch details'))
const updatedPathToNode = updatePathToNodeFromMap(
sketchDetails.sketchPathToNode,
pathToNodeMap
)
const updatedAst =
await sceneEntitiesManager.updateAstAndRejigSketch(
updatedPathToNode,
_modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (err(updatedAst)) return Promise.reject(updatedAst)
await codeManager.updateEditorWithAstAndWriteToFile(
updatedAst.newAst
)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const selection = updateSelections(
pathToNodeMap,
selectionRanges,
updatedAst.newAst
)
if (err(selection)) return Promise.reject(selection)
return {
selectionType: 'completeSelection',
selection,
updatedPathToNode,
}
}
),
'Get angle info': fromPromise(
async ({ input: { selectionRanges, sketchDetails } }) => {
const info = angleBetweenInfo({
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
selectionRanges,
})
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (err(info)) return Promise.reject(info)
const { modifiedAst, pathToNodeMap } = await (info.enabled
? applyConstraintAngleBetween({
selectionRanges,
})
: applyConstraintAngleLength({
selectionRanges,
angleOrLength: 'setAngle',
}))
const pResult = parse(recast(modifiedAst))
if (trap(pResult) || !resultIsOk(pResult))
return Promise.reject(new Error('Unexpected compilation error'))
const _modifiedAst = pResult.program
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (err(_modifiedAst)) return Promise.reject(_modifiedAst)
if (!sketchDetails)
return Promise.reject(new Error('No sketch details'))
const updatedPathToNode = updatePathToNodeFromMap(
sketchDetails.sketchPathToNode,
pathToNodeMap
)
const updatedAst =
await sceneEntitiesManager.updateAstAndRejigSketch(
updatedPathToNode,
_modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (err(updatedAst)) return Promise.reject(updatedAst)
await codeManager.updateEditorWithAstAndWriteToFile(
updatedAst.newAst
)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const selection = updateSelections(
pathToNodeMap,
selectionRanges,
updatedAst.newAst
)
if (err(selection)) return Promise.reject(selection)
return {
selectionType: 'completeSelection',
selection,
updatedPathToNode,
}
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
),
'Get length info': fromPromise(
async ({ input: { selectionRanges, sketchDetails } }) => {
const { modifiedAst, pathToNodeMap } =
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
await applyConstraintAngleLength({
selectionRanges,
})
const pResult = parse(recast(modifiedAst))
if (trap(pResult) || !resultIsOk(pResult))
return Promise.reject(new Error('Unexpected compilation error'))
const _modifiedAst = pResult.program
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (!sketchDetails)
return Promise.reject(new Error('No sketch details'))
const updatedPathToNode = updatePathToNodeFromMap(
sketchDetails.sketchPathToNode,
pathToNodeMap
)
const updatedAst =
await sceneEntitiesManager.updateAstAndRejigSketch(
updatedPathToNode,
_modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (err(updatedAst)) return Promise.reject(updatedAst)
await codeManager.updateEditorWithAstAndWriteToFile(
updatedAst.newAst
)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const selection = updateSelections(
pathToNodeMap,
selectionRanges,
updatedAst.newAst
)
if (err(selection)) return Promise.reject(selection)
return {
selectionType: 'completeSelection',
selection,
updatedPathToNode,
}
}
),
'Get perpendicular distance info': fromPromise(
async ({ input: { selectionRanges, sketchDetails } }) => {
const { modifiedAst, pathToNodeMap } =
await applyConstraintIntersect({
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
selectionRanges,
})
const pResult = parse(recast(modifiedAst))
if (trap(pResult) || !resultIsOk(pResult))
return Promise.reject(new Error('Unexpected compilation error'))
const _modifiedAst = pResult.program
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (!sketchDetails)
return Promise.reject(new Error('No sketch details'))
const updatedPathToNode = updatePathToNodeFromMap(
sketchDetails.sketchPathToNode,
pathToNodeMap
)
const updatedAst =
await sceneEntitiesManager.updateAstAndRejigSketch(
updatedPathToNode,
_modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (err(updatedAst)) return Promise.reject(updatedAst)
await codeManager.updateEditorWithAstAndWriteToFile(
updatedAst.newAst
)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const selection = updateSelections(
pathToNodeMap,
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
selectionRanges,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
updatedAst.newAst
)
if (err(selection)) return Promise.reject(selection)
return {
selectionType: 'completeSelection',
selection,
updatedPathToNode,
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
}
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
),
'Get ABS X info': fromPromise(
async ({ input: { selectionRanges, sketchDetails } }) => {
const { modifiedAst, pathToNodeMap } =
await applyConstraintAbsDistance({
constraint: 'xAbs',
selectionRanges,
})
const pResult = parse(recast(modifiedAst))
if (trap(pResult) || !resultIsOk(pResult))
return Promise.reject(new Error('Unexpected compilation error'))
const _modifiedAst = pResult.program
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (!sketchDetails)
return Promise.reject(new Error('No sketch details'))
const updatedPathToNode = updatePathToNodeFromMap(
sketchDetails.sketchPathToNode,
pathToNodeMap
)
const updatedAst =
await sceneEntitiesManager.updateAstAndRejigSketch(
updatedPathToNode,
_modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (err(updatedAst)) return Promise.reject(updatedAst)
await codeManager.updateEditorWithAstAndWriteToFile(
updatedAst.newAst
)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const selection = updateSelections(
pathToNodeMap,
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
selectionRanges,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
updatedAst.newAst
)
if (err(selection)) return Promise.reject(selection)
return {
selectionType: 'completeSelection',
selection,
updatedPathToNode,
}
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
),
'Get ABS Y info': fromPromise(
async ({ input: { selectionRanges, sketchDetails } }) => {
const { modifiedAst, pathToNodeMap } =
await applyConstraintAbsDistance({
constraint: 'yAbs',
selectionRanges,
})
const pResult = parse(recast(modifiedAst))
if (trap(pResult) || !resultIsOk(pResult))
return Promise.reject(new Error('Unexpected compilation error'))
const _modifiedAst = pResult.program
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (!sketchDetails)
return Promise.reject(new Error('No sketch details'))
const updatedPathToNode = updatePathToNodeFromMap(
sketchDetails.sketchPathToNode,
pathToNodeMap
)
const updatedAst =
await sceneEntitiesManager.updateAstAndRejigSketch(
updatedPathToNode,
_modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (err(updatedAst)) return Promise.reject(updatedAst)
await codeManager.updateEditorWithAstAndWriteToFile(
updatedAst.newAst
)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const selection = updateSelections(
pathToNodeMap,
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
selectionRanges,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
updatedAst.newAst
)
if (err(selection)) return Promise.reject(selection)
return {
selectionType: 'completeSelection',
selection,
updatedPathToNode,
}
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
),
'Get convert to variable info': fromPromise(
async ({ input: { selectionRanges, sketchDetails, data } }) => {
if (!sketchDetails)
return Promise.reject(new Error('No sketch details'))
const { variableName } = await getVarNameModal({
valueName: data?.variableName || 'var',
})
let pResult = parse(recast(kclManager.ast))
if (trap(pResult) || !resultIsOk(pResult))
return Promise.reject(new Error('Unexpected compilation error'))
let parsed = pResult.program
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const { modifiedAst: _modifiedAst, pathToReplacedNode } =
moveValueIntoNewVariablePath(
parsed,
kclManager.programMemory,
data?.pathToNode || [],
variableName
)
pResult = parse(recast(_modifiedAst))
if (trap(pResult) || !resultIsOk(pResult))
return Promise.reject(new Error('Unexpected compilation error'))
parsed = pResult.program
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (trap(parsed)) return Promise.reject(parsed)
Refactor source ranges into a generic node type (#4350) * WIP Signed-off-by: Nick Cameron <nrc@ncameron.org> * Fix formatting * Fix yarn build:wasm * Fix ts_rs bindings * Fix tsc errors * Fix wasm TS types * Add minimal failing test * Rename field to avoid name collisions * Remove node wrapper around NonCodeMeta Trying to fix TS unit test errors deserializing JSON AST in Rust. * Rename Node to BoxNode * Fix lints * Fix lint by boxing literals * Rename UnboxedNode to Node * Look at this (photo)Graph *in the voice of Nickelback* * Update docs * Update snapshots * initial trait Signed-off-by: Jess Frazelle <github@jessfraz.com> * update docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * gross hack for TagNode Signed-off-by: Jess Frazelle <github@jessfraz.com> * extend gross hack Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix EnvRef bullshit Signed-off-by: Jess Frazelle <github@jessfraz.com> * Fix to fail parsing when a tag declarator matches a stdlib function name * Fix test errors after merging main * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * Confirm * Change to use simpler map_err * Add comment --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <github@jessfraz.com>
2024-10-30 16:52:17 -04:00
parsed = parsed as Node<Program>
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (!pathToReplacedNode)
return Promise.reject(new Error('No path to replaced node'))
const updatedAst =
await sceneEntitiesManager.updateAstAndRejigSketch(
pathToReplacedNode || [],
parsed,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (err(updatedAst)) return Promise.reject(updatedAst)
await codeManager.updateEditorWithAstAndWriteToFile(
updatedAst.newAst
)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const selection = updateSelections(
{ 0: pathToReplacedNode },
selectionRanges,
updatedAst.newAst
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (err(selection)) return Promise.reject(selection)
return {
selectionType: 'completeSelection',
selection,
updatedPathToNode: pathToReplacedNode,
}
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
),
},
}),
{
input: {
...modelingMachineDefaultContext,
store: {
...modelingMachineDefaultContext.store,
...persistedContext,
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
},
machineManager,
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
// devTools: true,
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
}
)
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
useSetupEngineManager(
streamRef,
modelingSend,
modelingState.context,
{
pool: pool,
theme: theme.current,
highlightEdges: highlightEdges.current,
enableSSAO: enableSSAO.current,
showScaleGrid: showScaleGrid.current,
Add a user-level projection setting, command, and toggle (#3983) * Add cameraProjection setting * Add UI to toggle the user-level projection setting. * Make cameraProjection setting respected at startup * Add an E2E test for the perspective toggle * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Don't force user back into perspective when exiting sketch * Make the projection setting more searchable * Make `current` label apply to the default option if not set * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * Re-run CI * Ohh *cargo fmt* * @lf94 feedback, fix found toggling bug, make command bar instantly toggle setting * Roll back the instant toggling behavior, it breaks the tests * Make ortho the default, keep tests using perspective * Move projection below camera controls setting * Fix up gizmo tests, which broke because the gizmo moved * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * Look at this (photo)Graph *in the voice of Nickelback* --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: 49fl <ircsurfer33@gmail.com>
2024-09-30 11:40:00 -04:00
cameraProjection: cameraProjection.current,
},
token
)
useEffect(() => {
kclManager.registerExecuteCallback(() => {
modelingSend({ type: 'Re-execute' })
})
// Before this component unmounts, call the 'Cancel'
// event to clean up any state in the modeling machine.
return () => {
modelingSend({ type: 'Cancel' })
}
}, [modelingSend])
// Give the state back to the editorManager.
useEffect(() => {
editorManager.modelingSend = modelingSend
}, [modelingSend])
useEffect(() => {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
editorManager.modelingState = modelingState
}, [modelingState])
useEffect(() => {
editorManager.selectionRanges = modelingState.context.selectionRanges
}, [modelingState.context.selectionRanges])
useEffect(() => {
const onConnectionStateChanged = ({ detail }: CustomEvent) => {
// If we are in sketch mode we need to exit it.
// TODO: how do i check if we are in a sketch mode, I only want to call
// this then.
if (detail.type === EngineConnectionStateType.Disconnecting) {
modelingSend({ type: 'Cancel' })
}
}
engineCommandManager.engineConnection?.addEventListener(
EngineConnectionEvents.ConnectionStateChanged,
onConnectionStateChanged as EventListener
)
return () => {
engineCommandManager.engineConnection?.removeEventListener(
EngineConnectionEvents.ConnectionStateChanged,
onConnectionStateChanged as EventListener
)
}
}, [engineCommandManager.engineConnection, modelingSend])
// Allow using the delete key to delete solids
useHotkeys(['backspace', 'delete', 'del'], () => {
modelingSend({ type: 'Delete selection' })
})
// Allow ctrl+alt+c to center to selection
useHotkeys(['mod + alt + c'], () => {
modelingSend({ type: 'Center camera on selection' })
})
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
useStateMachineCommands({
machineId: 'modeling',
state: modelingState,
send: modelingSend,
actor: modelingActor,
commandBarConfig: modelingMachineCommandConfig,
allCommandsRequireNetwork: true,
// TODO for when sketch tools are in the toolbar: This was added when we used one "Cancel" event,
// but we need to support "SketchCancel" and basically
// make this function take the actor or state so it
// can call the correct event.
Client sketch scene (#1271) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happ * better error msg * fix control point issue * basic code gen working for tangentialArc * partical fix for move with arcs * tangential arc move * fix * make eslint rules less annoying * inital refactor of some xstate stuff * more old tangential arc clean up stuff * more tweaks * add testing * tweak xstate inspect * temp remove test * update formating for less conflicts * fix state machine layout after merge * shrug, something weird with xstate typegen * renaming some xstate events * tweak numbers to make CI playwright happ * CI hacks * more CI hacks * more CI hacks * new hack strategy * run tests agian * make cmd bar less flaky * ci hacks * CI hacks * CI hacks * CI hacks * clean up * fix * still have constraint stuff to deal with * progress on move rules * update source ranges after no execute code-mod * typo * mvp working * hide show sketch overlay * match scaling * update arrow head style * animate line tool * bypass xstate for animations, much smoother * add new segment working with refactor needed for setup paper sketch * refactor setup paper sketch * tangantialArcTo drag animations working * tangential arc polish * cargo fmt * clippy * more clippy * mock canvas * last of clippy? * typo * more clippy stuff * move util function so they are shareable with typescript * migrate a bunch to rust and only rust * add arc center point for draft tangential ac * clippy tweak * delete uneeded test * Rough start to scaling arrow heads. The tangent arrow heads are basically nuked and replaced while the straight line sections are just rotated and repositioned, this means they miss out on updating scaling number after a screen size changes. Needs fixing * fix bug with tool tips * fix draft line start position Having drag the end of teh path before selecting a tooltip would result in the draft line starting where the path used to end, stale data * some progress with pan maybe * fmt * inital camera sync working For perspective camera at least * change three.js to use z-up * add grid * orthographic camera working with polish items TODO * fix zoom level when swapping camera * fix up camera/orbit changing on cam change (pan wasn't being respected) * tidy up * use orbit target instead of assuming scene center * dynamic fov working * animate orthographic to perspective and reverse * fix import * temp fix for batch commands * initial client side scene sketch working * remove hover log * FOV adjust fix * fix comment * tear down sketch and small tweaks * some progress with camera tweening * combine dollyZoom engine commands see https://github.com/KittyCAD/modeling-api/compare/kurt-perspective-settings?expand=1 and https://github.com/KittyCAD/engine/compare/kurt-perspective-settings?expand=1 * make tests happy (mocks) * fix tween to vertical/camera-up bug * tween to each axis with hacky solutions in there * fix startSketchOn planes * tidy startSketchOn * tweening okay for now I think * get sketching on default planes working * allow editing on all default planes * clean up enter and exit sketch logic * tidy * tidy * remove more default plane stuff * start of draft line * remove some annoying parts of the paper.js implementation * fix drag than equip line bug * comment * don't animate on skech tear down since it's used for draft line * remove more default plane shit * style draft line * refine dashed line * draft line set up and tear down mostly happy * add on click logic ready for draft lines * sketch mode with drag and draft mode working solidly now, straight segments only * default planes match colors, hover and select still TODO * hover and click logic working for default planes Now just need the code mode to fire to 'startSketchOn(...)' * select default planes * remove some logs * fix update infinite loop * start of orbitControls port to Franks control guards * hiding scenes at different times * scene hide on camera move should be respected by scroll zoom * basic hover working * Hook up user camera settings to ClientSideScene (#1334) * Refactor to not import utilities from Router.tsx * Stop tracking changes or formatting *.typegen.ts * Hook up cameraControls to ClientSideScene * Remove camera controls toggle from temp debug panel --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> * add select segment moves cursor * highlight segments yellow on hover * cursor ranges effect 2d line colors * fix constrainst i.e. make sure the sketch is rejiged * selecting nothing should remove selections * remove hardcoded strings * update get_tangential_arc_to_info rust util * initial drawing of tangential arcs in client scene * fix tangentialArc arrow head direction * correct userData types for tangential arcs * get tangential arc updates working Doesn't include draging the head of the tangential arc itself yet * spot of clean up * make selections work with tangential arcs * get draft tangential segment animated * fix initial click weirdness for adding new tangential line * couple tweaks * add grace pixels /threshold to raycast * redo arc dashes so that they spawn from the ccenter of the arc * fix multi drag bug * fmt * add temp solution for close * add default axis hover colors, still needs select logic * selection of axis works, just with out selection color * get axis selection colors working * fix outdate source ranges after drag problem * update moreNodePathFromSourceRange * fix ts-rs issue/workaround * fix default plane weirdness * fix tangential arc rounding issue * review clean up part 1 * review clean up part 2 Big state-diagram cull * clippy * typo * clippy * fix xstate types with typegen * fix types * clippy * catch error * fix test import issue Not sure exactly what was happening but guessing circular import that vite didn't like * add axis/plane info to sketch group tests * case changes because of rs-ts bug, can probably revert this later * start of playwright test fixes * reduce geo complexity for straight segments * fix cam adjust tests * Revert "Clean up vite build warnings (#1332)" This reverts commit c1f661ab5254458c3e9fdb396a31860a22c790f1. * selection e2e test fixed< * remove camToggle to allow playwright tests to pass * remove drag test too brittle and needs to be redone from the ground up anyway * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix last test * clean up part 3 * clean up part 4 * clean up part 5 * clean up sketch enter exit logic * fix engine side selections * default plane should not be selected form 'onDragEnd' i.e. rotating the camera should not mean the user acidently selects a plane * clean up state diagram around animating to sketch mode Embracing that the animation is async and puting the interdiate steps in the state diagram clean up some logic and solved some bugs at the same time * add test for multiple sketches * typo * make highlight more robust * type tweak * scale segmenst with distance from camera so they have a consistent pixel size/ screenspace size * Jess's advice * tsc and fmt * clean up part 6 remove integer from xstate names * clean up part 7 * integrate sequency in to camera moves * fix tests * update snapshot e2e * small snapshot change * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Fix HomeLoaderData types * update std stuff * update kittycad rs client lib --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-11 12:59:00 +11:00
onCancel: () => modelingSend({ type: 'Cancel' }),
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
})
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
return (
<ModelingMachineContext.Provider
value={{
state: modelingState,
context: modelingState.context,
send: modelingSend,
}}
>
{/* TODO #818: maybe pass reff down to children/app.ts or render app.tsx directly?
since realistically it won't ever have generic children that isn't app.tsx */}
<div className="h-screen overflow-hidden select-none" ref={streamRef}>
{children}
</div>
</ModelingMachineContext.Provider>
)
}
export default ModelingMachineProvider