* 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
* feat: implementing axis selection for point and click revolve
* feat: enforcing selection of 2 options for axis rotation
* feat: added negative rotations for the revolve
* fix: fmt, tsc fixes
* migrate a more selections types
* Revert "migrate a more selections types"
This reverts commit 0d0e453bbb
.
* migrate a more selections types
* clean up1
* clean up 2
* chore: improving the copy after discussing with Frank
* fix: merge main fixes
* chore: was able to add a seg to a line. Does not check if one exists already
* saving off some code
* chore: moving revolveSketch into own file for readability, improving variable names instead of node1
* chore: renaming more variables for readability
* chore: more renaming
* fix: allows creating a custom rotation on axis
* fix: added opposite edge logic and adj, need to error handle still
* fix: use other import
* feat: point and click on edges, crude implementation
* feat: implemented toast message and returned error message from validation
* fix: auto linter
* fix: addressing tsc errors
* fix: fighting typescript
* fix: cleaning up PR
* fix: trying to resolve more typescript issues
* fix: save off tsc fixes
* fix: adding comments
* fix: resolving tsc errors
* fix: tsc errors
* fix: auto linter fixes and tsc fixes
* fix:??
* fix: revolve ast works with declaration
* fix: retry logic to make sure the disable dry run actually runs
* fix: codespell typo
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
121 lines
4.3 KiB
TypeScript
121 lines
4.3 KiB
TypeScript
export const APP_NAME = 'Modeling App'
|
|
/** Search string in new project names to increment as an index */
|
|
export const INDEX_IDENTIFIER = '$n'
|
|
/** The maximum number of 0's to pad a default project name's index with */
|
|
export const MAX_PADDING = 7
|
|
/** The default name for a newly-created project.
|
|
* This is used as a template for new projects, with $nnn being replaced by an index
|
|
* This is available for users to edit as a setting.
|
|
*/
|
|
export const DEFAULT_PROJECT_NAME = 'project-$nnn'
|
|
export const DEFAULT_PROJECT_KCL_FILE = 'main.kcl'
|
|
/** Name given the temporary "project" in the browser version of the app */
|
|
export const BROWSER_PROJECT_NAME = 'browser'
|
|
/** Name given the temporary file in the browser version of the app */
|
|
export const BROWSER_FILE_NAME = 'main'
|
|
/**
|
|
* The default name of the project in Desktop.
|
|
* This is prefixed by the Documents directory path.
|
|
*/
|
|
export const PROJECT_FOLDER = 'zoo-modeling-app-projects'
|
|
/**
|
|
* File extension for Modeling App's files, which are written in kcl
|
|
* @link - https://zoo.dev/docs/kcl
|
|
* */
|
|
export const FILE_EXT = '.kcl'
|
|
/** Default file to open when a project is opened */
|
|
export const PROJECT_ENTRYPOINT = `main${FILE_EXT}` as const
|
|
/** Thumbnail file name */
|
|
export const PROJECT_IMAGE_NAME = `main.jpg` as const
|
|
/** The localStorage key for last-opened projects */
|
|
export const FILE_PERSIST_KEY = `${PROJECT_FOLDER}-last-opened` as const
|
|
/** The default name given to new kcl files in a project */
|
|
export const DEFAULT_FILE_NAME = 'Untitled'
|
|
/** The file endings that will appear in
|
|
* the file explorer if found in a project directory */
|
|
export const RELEVANT_FILE_TYPES = [
|
|
'kcl',
|
|
'fbx',
|
|
'gltf',
|
|
'glb',
|
|
'obj',
|
|
'ply',
|
|
'step',
|
|
'stl',
|
|
] as const
|
|
/** The default name for a tutorial project */
|
|
export const ONBOARDING_PROJECT_NAME = 'Tutorial Project $nn'
|
|
/**
|
|
* The default starting constant name for various modeling operations.
|
|
* These are used to generate unique names for new objects.
|
|
* */
|
|
export const KCL_DEFAULT_CONSTANT_PREFIXES = {
|
|
SKETCH: 'sketch',
|
|
EXTRUDE: 'extrude',
|
|
LOFT: 'loft',
|
|
SHELL: 'shell',
|
|
SEGMENT: 'seg',
|
|
REVOLVE: 'revolve',
|
|
PLANE: 'plane',
|
|
} as const
|
|
/** The default KCL length expression */
|
|
export const KCL_DEFAULT_LENGTH = `5`
|
|
|
|
/** The default KCL degree expression */
|
|
export const KCL_DEFAULT_DEGREE = `360`
|
|
|
|
/** localStorage key for the playwright test-specific app settings file */
|
|
export const TEST_SETTINGS_FILE_KEY = 'playwright-test-settings'
|
|
|
|
export const DEFAULT_HOST = 'https://api.zoo.dev'
|
|
export const SETTINGS_FILE_NAME = 'settings.toml'
|
|
export const TOKEN_FILE_NAME = 'token.txt'
|
|
export const PROJECT_SETTINGS_FILE_NAME = 'project.toml'
|
|
export const COOKIE_NAME = '__Secure-next-auth.session-token'
|
|
export const TELEMETRY_FILE_NAME = 'boot.txt'
|
|
export const TELEMETRY_RAW_FILE_NAME = 'raw-metrics.txt'
|
|
|
|
/** localStorage key to determine if we're in Playwright tests */
|
|
export const PLAYWRIGHT_KEY = 'playwright'
|
|
|
|
/** Custom error message to match when rejectAllModelCommands is called
|
|
* allows us to match if the execution of executeAst was interrupted */
|
|
export const EXECUTE_AST_INTERRUPT_ERROR_MESSAGE =
|
|
'Force interrupt, executionIsStale, new AST requested'
|
|
|
|
/** The messages that appear for exporting toasts */
|
|
export const EXPORT_TOAST_MESSAGES = {
|
|
START: 'Exporting...',
|
|
SUCCESS: 'Exported successfully',
|
|
FAILED: 'Export failed',
|
|
}
|
|
|
|
/** The messages that appear for "make" command toasts */
|
|
export const MAKE_TOAST_MESSAGES = {
|
|
START: 'Starting print...',
|
|
NO_MACHINES: 'No machines available',
|
|
NO_MACHINE_API_IP: 'No machine api ip available',
|
|
NO_CURRENT_MACHINE: 'No current machine available',
|
|
NO_MACHINE_ID: 'No machine id available',
|
|
NO_NAME: 'No name provided',
|
|
ERROR_STARTING_PRINT: 'Error while starting print',
|
|
SUCCESS: 'Started print successfully',
|
|
}
|
|
|
|
/** The URL for the KCL samples manifest files */
|
|
export const KCL_SAMPLES_MANIFEST_URLS = {
|
|
remote:
|
|
'https://raw.githubusercontent.com/KittyCAD/kcl-samples/main/manifest.json',
|
|
localFallback: '/kcl-samples-manifest-fallback.json',
|
|
} as const
|
|
|
|
/** Toast id for the app auto-updater toast */
|
|
export const AUTO_UPDATER_TOAST_ID = 'auto-updater-toast'
|
|
|
|
/** Local sketch axis values in KCL for operations, it could either be 'X' or 'Y' */
|
|
export const KCL_AXIS_X = 'X'
|
|
export const KCL_AXIS_Y = 'Y'
|
|
export const KCL_AXIS_NEG_X = '-X'
|
|
export const KCL_AXIS_NEG_Y = '-Y'
|
|
export const KCL_DEFAULT_AXIS = 'X'
|