2024-03-04 16:06:43 -05:00
|
|
|
import { Models } from '@kittycad/lib'
|
2024-07-12 16:16:26 -04:00
|
|
|
import { StateMachineCommandSetConfig, KclCommandValue } from 'lib/commandTypes'
|
2024-05-17 10:29:04 -04:00
|
|
|
import { KCL_DEFAULT_LENGTH } from 'lib/constants'
|
2024-08-04 00:51:30 -04:00
|
|
|
import { components } from 'lib/machine-api'
|
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 { Selections } from 'lib/selections'
|
2024-08-04 00:51:30 -04:00
|
|
|
import { machineManager } from 'lib/machineManager'
|
2024-07-12 16:16:26 -04:00
|
|
|
import { modelingMachine, SketchTool } from 'machines/modelingMachine'
|
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-03-04 16:06:43 -05:00
|
|
|
type OutputFormat = Models['OutputFormat_type']
|
|
|
|
type OutputTypeKey = OutputFormat['type']
|
|
|
|
type ExtractStorageTypes<T> = T extends { storage: infer U } ? U : never
|
|
|
|
type StorageUnion = ExtractStorageTypes<OutputFormat>
|
|
|
|
|
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
|
|
|
export const EXTRUSION_RESULTS = [
|
|
|
|
'new',
|
|
|
|
'add',
|
|
|
|
'subtract',
|
|
|
|
'intersect',
|
|
|
|
] as const
|
|
|
|
|
|
|
|
export type ModelingCommandSchema = {
|
|
|
|
'Enter sketch': {}
|
2024-03-04 16:06:43 -05:00
|
|
|
Export: {
|
|
|
|
type: OutputTypeKey
|
|
|
|
storage?: StorageUnion
|
|
|
|
}
|
2024-08-04 00:51:30 -04:00
|
|
|
Make: {
|
|
|
|
machine: components['schemas']['Machine']
|
|
|
|
}
|
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
|
|
|
Extrude: {
|
|
|
|
selection: Selections // & { type: 'face' } would be cool to lock that down
|
|
|
|
// result: (typeof EXTRUSION_RESULTS)[number]
|
2024-02-23 11:24:22 -05:00
|
|
|
distance: KclCommandValue
|
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-07-15 19:20:32 +10:00
|
|
|
Fillet: {
|
|
|
|
// todo
|
|
|
|
selection: Selections
|
|
|
|
radius: KclCommandValue
|
|
|
|
}
|
2024-07-12 16:16:26 -04:00
|
|
|
'change tool': {
|
|
|
|
tool: SketchTool
|
|
|
|
}
|
2024-08-14 14:26:44 -04:00
|
|
|
'Text-to-CAD': {
|
|
|
|
prompt: string
|
|
|
|
}
|
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-07-12 16:16:26 -04:00
|
|
|
export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
|
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
|
|
|
typeof modelingMachine,
|
|
|
|
ModelingCommandSchema
|
|
|
|
> = {
|
|
|
|
'Enter sketch': {
|
|
|
|
description: 'Enter sketch mode.',
|
|
|
|
icon: 'sketch',
|
|
|
|
},
|
2024-07-12 16:16:26 -04:00
|
|
|
'change tool': [
|
|
|
|
{
|
|
|
|
description: 'Start drawing straight lines.',
|
|
|
|
icon: 'line',
|
|
|
|
displayName: 'Line',
|
|
|
|
args: {
|
|
|
|
tool: {
|
|
|
|
defaultValue: 'line',
|
|
|
|
required: true,
|
|
|
|
skip: true,
|
|
|
|
inputType: 'string',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
description: 'Start drawing an arc tangent to the current segment.',
|
|
|
|
icon: 'arc',
|
|
|
|
displayName: 'Tangential Arc',
|
|
|
|
args: {
|
|
|
|
tool: {
|
|
|
|
defaultValue: 'tangentialArc',
|
|
|
|
required: true,
|
|
|
|
skip: true,
|
|
|
|
inputType: 'string',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
description: 'Start drawing a rectangle.',
|
|
|
|
icon: 'rectangle',
|
|
|
|
displayName: 'Rectangle',
|
|
|
|
args: {
|
|
|
|
tool: {
|
|
|
|
defaultValue: 'rectangle',
|
|
|
|
required: true,
|
|
|
|
skip: true,
|
|
|
|
inputType: 'string',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2024-03-04 16:06:43 -05:00
|
|
|
Export: {
|
|
|
|
description: 'Export the current model.',
|
2024-07-24 22:02:16 -04:00
|
|
|
icon: 'floppyDiskArrow',
|
2024-03-04 16:06:43 -05:00
|
|
|
needsReview: true,
|
|
|
|
args: {
|
|
|
|
type: {
|
|
|
|
inputType: 'options',
|
|
|
|
defaultValue: 'gltf',
|
|
|
|
required: true,
|
|
|
|
options: [
|
2024-07-28 07:59:38 +01:00
|
|
|
{ name: 'glTF', isCurrent: true, value: 'gltf' },
|
2024-03-04 16:06:43 -05:00
|
|
|
{ name: 'OBJ', isCurrent: false, value: 'obj' },
|
|
|
|
{ name: 'STL', isCurrent: false, value: 'stl' },
|
|
|
|
{ name: 'STEP', isCurrent: false, value: 'step' },
|
|
|
|
{ name: 'PLY', isCurrent: false, value: 'ply' },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
storage: {
|
|
|
|
inputType: 'options',
|
|
|
|
defaultValue: (c) => {
|
|
|
|
switch (c.argumentsToSubmit.type) {
|
|
|
|
case 'gltf':
|
|
|
|
return 'embedded'
|
|
|
|
case 'stl':
|
|
|
|
return 'ascii'
|
|
|
|
case 'ply':
|
|
|
|
return 'ascii'
|
|
|
|
default:
|
|
|
|
return undefined
|
|
|
|
}
|
|
|
|
},
|
|
|
|
skip: true,
|
|
|
|
required: (commandContext) =>
|
|
|
|
['gltf', 'stl', 'ply'].includes(
|
|
|
|
commandContext.argumentsToSubmit.type as string
|
|
|
|
),
|
|
|
|
options: (commandContext) => {
|
|
|
|
const type = commandContext.argumentsToSubmit.type as
|
|
|
|
| OutputTypeKey
|
|
|
|
| undefined
|
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
case 'gltf':
|
|
|
|
return [
|
|
|
|
{ name: 'embedded', isCurrent: true, value: 'embedded' },
|
|
|
|
{ name: 'binary', isCurrent: false, value: 'binary' },
|
|
|
|
{ name: 'standard', isCurrent: false, value: 'standard' },
|
|
|
|
]
|
|
|
|
case 'stl':
|
|
|
|
return [
|
|
|
|
{ name: 'binary', isCurrent: false, value: 'binary' },
|
|
|
|
{ name: 'ascii', isCurrent: true, value: 'ascii' },
|
|
|
|
]
|
|
|
|
case 'ply':
|
|
|
|
return [
|
|
|
|
{ name: 'ascii', isCurrent: true, value: 'ascii' },
|
|
|
|
{
|
|
|
|
name: 'binary_big_endian',
|
|
|
|
isCurrent: false,
|
|
|
|
value: 'binary_big_endian',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'binary_little_endian',
|
|
|
|
isCurrent: false,
|
|
|
|
value: 'binary_little_endian',
|
|
|
|
},
|
|
|
|
]
|
|
|
|
default:
|
|
|
|
return []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-08-04 00:51:30 -04:00
|
|
|
Make: {
|
|
|
|
hide: 'web',
|
|
|
|
displayName: 'Make',
|
|
|
|
description:
|
|
|
|
'Export the current part and send to a 3D printer on the network.',
|
|
|
|
icon: 'printer3d',
|
|
|
|
needsReview: true,
|
|
|
|
args: {
|
|
|
|
machine: {
|
|
|
|
inputType: 'options',
|
|
|
|
required: true,
|
|
|
|
valueSummary: (machine: components['schemas']['Machine']) =>
|
|
|
|
machine.model || machine.manufacturer,
|
|
|
|
options: () => {
|
|
|
|
return Object.entries(machineManager.machines).map(
|
|
|
|
([hostname, machine]) => ({
|
|
|
|
name: `${machine.model || machine.manufacturer}, ${hostname}`,
|
|
|
|
isCurrent: false,
|
|
|
|
value: machine as components['schemas']['Machine'],
|
|
|
|
})
|
|
|
|
)
|
|
|
|
},
|
|
|
|
defaultValue: () => {
|
|
|
|
return Object.values(
|
|
|
|
machineManager.machines
|
|
|
|
)[0] as components['schemas']['Machine']
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
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
|
|
|
Extrude: {
|
|
|
|
description: 'Pull a sketch into 3D along its normal or perpendicular.',
|
|
|
|
icon: 'extrude',
|
|
|
|
needsReview: true,
|
|
|
|
args: {
|
|
|
|
selection: {
|
|
|
|
inputType: 'selection',
|
2024-03-22 10:23:04 +11:00
|
|
|
selectionTypes: ['extrude-wall', 'start-cap', 'end-cap'],
|
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
|
|
|
multiple: false, // TODO: multiple selection
|
|
|
|
required: true,
|
2024-02-08 12:59:01 -05:00
|
|
|
skip: 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
|
|
|
},
|
|
|
|
// result: {
|
|
|
|
// inputType: 'options',
|
2024-02-08 12:59:01 -05:00
|
|
|
// defaultValue: 'add',
|
|
|
|
// skip: 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
|
|
|
// required: true,
|
|
|
|
// options: EXTRUSION_RESULTS.map((r) => ({
|
|
|
|
// name: r,
|
|
|
|
// isCurrent: r === 'add',
|
|
|
|
// value: r,
|
|
|
|
// })),
|
|
|
|
// },
|
|
|
|
distance: {
|
2024-02-23 11:24:22 -05:00
|
|
|
inputType: 'kcl',
|
2024-05-17 10:29:04 -04:00
|
|
|
defaultValue: KCL_DEFAULT_LENGTH,
|
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
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-07-15 19:20:32 +10:00
|
|
|
Fillet: {
|
|
|
|
// todo
|
|
|
|
description: 'Fillet edge',
|
|
|
|
icon: 'fillet',
|
|
|
|
needsReview: true,
|
|
|
|
args: {
|
|
|
|
selection: {
|
|
|
|
inputType: 'selection',
|
|
|
|
selectionTypes: [
|
|
|
|
'default',
|
|
|
|
'line-end',
|
|
|
|
'line-mid',
|
2024-08-03 18:08:51 +10:00
|
|
|
'extrude-wall', // to fix: accepts only this selection type
|
|
|
|
'solid2D',
|
2024-07-15 19:20:32 +10:00
|
|
|
'start-cap',
|
|
|
|
'end-cap',
|
|
|
|
'point',
|
|
|
|
'edge',
|
|
|
|
'line',
|
|
|
|
'arc',
|
|
|
|
'all',
|
|
|
|
],
|
|
|
|
multiple: true, // TODO: multiple selection like in extrude command
|
|
|
|
required: true,
|
|
|
|
skip: true,
|
|
|
|
},
|
|
|
|
radius: {
|
|
|
|
inputType: 'kcl',
|
|
|
|
defaultValue: KCL_DEFAULT_LENGTH,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-08-14 14:26:44 -04:00
|
|
|
'Text-to-CAD': {
|
|
|
|
description: 'Use the Zoo Text-to-CAD API to generate part starters.',
|
|
|
|
icon: 'chat',
|
|
|
|
args: {
|
|
|
|
prompt: {
|
|
|
|
inputType: 'text',
|
|
|
|
required: 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
|
|
|
}
|