2023-12-18 06:15:26 -05:00
|
|
|
export const APP_NAME = 'Modeling App'
|
2024-04-02 10:29:34 -04:00
|
|
|
/** 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.
|
|
|
|
*/
|
2024-03-14 15:56:45 -04:00
|
|
|
export const DEFAULT_PROJECT_NAME = 'project-$nnn'
|
2024-08-28 06:38:14 -04:00
|
|
|
export const DEFAULT_PROJECT_KCL_FILE = 'main.kcl'
|
2024-04-02 10:29:34 -04:00
|
|
|
/** 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
|
2024-05-23 11:47:02 -04:00
|
|
|
/** Thumbnail file name */
|
|
|
|
export const PROJECT_IMAGE_NAME = `main.jpg` as const
|
2024-04-02 10:29:34 -04:00
|
|
|
/** 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
|
2024-04-19 10:50:58 -04:00
|
|
|
/** The default name for a tutorial project */
|
|
|
|
export const ONBOARDING_PROJECT_NAME = 'Tutorial Project $nn'
|
2024-06-04 13:57:01 -04:00
|
|
|
/**
|
|
|
|
* 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',
|
2024-07-15 19:20:32 +10:00
|
|
|
SEGMENT: 'seg',
|
2024-09-17 08:29:52 -05:00
|
|
|
REVOLVE: 'revolve',
|
2024-06-04 13:57:01 -04:00
|
|
|
} as const
|
2024-05-17 10:29:04 -04:00
|
|
|
/** The default KCL length expression */
|
|
|
|
export const KCL_DEFAULT_LENGTH = `5`
|
2024-09-17 08:29:52 -05:00
|
|
|
|
|
|
|
/** The default KCL degree expression */
|
|
|
|
export const KCL_DEFAULT_DEGREE = `360`
|
|
|
|
|
2024-08-16 07:15:42 -04:00
|
|
|
/** 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'
|
2024-08-27 05:59:25 +10:00
|
|
|
export const TOKEN_FILE_NAME = 'token.txt'
|
2024-08-16 07:15:42 -04:00
|
|
|
export const PROJECT_SETTINGS_FILE_NAME = 'project.toml'
|
2024-08-14 14:26:44 -04:00
|
|
|
export const COOKIE_NAME = '__Secure-next-auth.session-token'
|
2024-08-15 14:24:27 -04:00
|
|
|
|
|
|
|
/** localStorage key to determine if we're in Playwright tests */
|
|
|
|
export const PLAYWRIGHT_KEY = 'playwright'
|
2024-08-30 05:14:24 -05:00
|
|
|
|
|
|
|
/** 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'
|
2024-09-17 19:06:06 -04:00
|
|
|
|
|
|
|
/** 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',
|
|
|
|
ERROR_STARTING_PRINT: 'Error while starting print',
|
|
|
|
SUCCESS: 'Started print successfully',
|
|
|
|
}
|
2024-09-23 14:35:38 -04:00
|
|
|
|
|
|
|
/** The URL for the KCL samples manifest files */
|
|
|
|
export const KCL_SAMPLES_MANIFEST_URLS = {
|
|
|
|
remote:
|
2024-10-02 13:15:40 +10:00
|
|
|
'https://raw.githubusercontent.com/KittyCAD/kcl-samples/main/manifest.json',
|
2024-09-23 14:35:38 -04:00
|
|
|
localFallback: '/kcl-samples-manifest-fallback.json',
|
|
|
|
} as const
|