@salsita-ai/sdk 0.50.0-develop.5a0bcdee42 → 0.50.0-develop.5ac9723d62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -17
- package/dist/admin/AdminShell.js +1 -1
- package/dist/admin/common/admin-interface.d.ts +3 -3
- package/dist/admin/create-admin-pages-from-spec.d.ts +1 -1
- package/dist/admin/default-admin-elements.d.ts +9 -0
- package/dist/admin/default-admin-elements.js +1 -0
- package/dist/admin/default-elements/built-in-entity-element.d.ts +10 -0
- package/dist/admin/default-elements/built-in-entity-element.js +1 -0
- package/dist/admin/default-elements/built-in-layout-element.d.ts +10 -0
- package/dist/admin/default-elements/built-in-layout-element.js +1 -0
- package/dist/admin/default-elements/index.d.ts +2 -0
- package/dist/admin/default-elements/index.js +1 -0
- package/dist/admin/index.d.ts +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/legacy-admin/Application.js +1 -1
- package/dist/application/index.d.ts +1 -0
- package/dist/application/index.js +1 -1
- package/dist/application/mount-application.d.ts +1 -1
- package/dist/application/mount-application.js +1 -1
- package/dist/application/mount-configurator.d.ts +19 -0
- package/dist/application/mount-configurator.js +1 -0
- package/dist/application/mounted-application-runtime.d.ts +4 -0
- package/dist/application/mounted-application-runtime.js +1 -0
- package/dist/application/register-web-component.d.ts +2 -0
- package/dist/application/register-web-component.js +1 -0
- package/dist/application-spec/caching/content-diff.js +1 -1
- package/dist/application-spec/caching/index.d.ts +6 -1
- package/dist/application-spec/caching/index.js +1 -1
- package/dist/application-spec/core/application-file.d.ts +0 -2
- package/dist/application-spec/core/application-file.js +1 -1
- package/dist/application-spec/core/enhanced-json-value.d.ts +2 -99
- package/dist/application-spec/core/enhanced-json-value.js +1 -1
- package/dist/application-spec/core/index.d.ts +1 -1
- package/dist/application-spec/core/index.js +1 -1
- package/dist/application-spec/core/json-schema.d.ts +2 -52
- package/dist/application-spec/core/json-value.d.ts +1 -1
- package/dist/application-spec/core/markers/index.d.ts +1 -1
- package/dist/application-spec/core/markers/index.js +1 -1
- package/dist/application-spec/core/markers/msg-marker.d.ts +2 -28
- package/dist/application-spec/core/markers/msg-marker.js +1 -1
- package/dist/application-spec/core/markers/raw-eval-write-marker.d.ts +1 -1
- package/dist/application-spec/core/markers/raw-eval-write-marker.js +1 -1
- package/dist/application-spec/core/markers/raw-read-write-marker.js +1 -1
- package/dist/application-spec/enhanced-json/eval-to-constant.d.ts +14 -0
- package/dist/application-spec/enhanced-json/index.d.ts +4 -0
- package/dist/application-spec/enhanced-json/index.js +1 -0
- package/dist/application-spec/enhanced-json/is-enhanced-json-array.d.ts +2 -0
- package/dist/application-spec/enhanced-json/is-enhanced-json-array.js +1 -0
- package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.d.ts +18 -0
- package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.js +1 -0
- package/dist/application-spec/enhanced-json/schema-from-value.d.ts +24 -0
- package/dist/application-spec/enhanced-json/schema-from-value.js +1 -0
- package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.d.ts +14 -0
- package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.js +1 -0
- package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.d.ts +12 -0
- package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.js +1 -0
- package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.d.ts +13 -0
- package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.js +1 -0
- package/dist/application-spec/errors/diagnostic-codes.d.ts +32 -1
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +43 -2
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/common/code-imports.js +1 -1
- package/dist/application-spec/generate-application/code/common/env-reader.js +2 -2
- package/dist/application-spec/generate-application/code/common/index.d.ts +2 -0
- package/dist/application-spec/generate-application/code/common/index.js +1 -1
- package/dist/application-spec/generate-application/code/common/project-module-list.d.ts +8 -0
- package/dist/application-spec/generate-application/code/common/project-module-list.js +3 -0
- package/dist/application-spec/generate-application/code/common/single-quoted-string.d.ts +6 -0
- package/dist/application-spec/generate-application/code/common/single-quoted-string.js +1 -0
- package/dist/application-spec/generate-application/code/domain-runtime-files.d.ts +0 -19
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/generate-application-code.d.ts +3 -2
- package/dist/application-spec/generate-application/code/generate-application-code.js +1 -1
- package/dist/application-spec/generate-application/code/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +22 -14
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +6 -5
- package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
- package/dist/application-spec/generate-application/code/story-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.js +3 -0
- package/dist/application-spec/generate-application/code/templates/admin-domain-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/admin-domain-code.js +6 -14
- package/dist/application-spec/generate-application/code/templates/admin-frontend-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/admin-frontend-code.js +4 -4
- package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
- package/dist/application-spec/generate-application/code/templates/common/doc-comment.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/common/doc-comment.js +1 -0
- package/dist/application-spec/generate-application/code/templates/common/format-property-key.d.ts +7 -0
- package/dist/application-spec/generate-application/code/templates/common/format-property-key.js +1 -0
- package/dist/application-spec/generate-application/code/templates/common/schema-to-type-string.js +3 -3
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +6 -4
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +7 -16
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +7 -9
- package/dist/application-spec/generate-application/code/templates/configurator-globals.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/configurator-globals.js +19 -6
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +36 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +5 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.d.ts +2 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-base-configurator-builder.js +2 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +7 -7
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.d.ts +4 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +72 -76
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.d.ts +9 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-locale.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-presets.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-relation-expressions.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.d.ts +6 -8
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +21 -21
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.js +2 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +3 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
- package/dist/application-spec/generate-application/code/templates/domain.js +5 -5
- package/dist/application-spec/generate-application/code/templates/editor.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/editor.js +16 -3
- package/dist/application-spec/generate-application/code/templates/eslint-config.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/eslint-config.js +4 -5
- package/dist/application-spec/generate-application/code/templates/frontend-config.js +3 -5
- package/dist/application-spec/generate-application/code/templates/gitignore.js +2 -4
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +7 -7
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +12 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.d.ts +43 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +33 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/globals.js +24 -43
- package/dist/application-spec/generate-application/code/templates/html-index.d.ts +12 -1
- package/dist/application-spec/generate-application/code/templates/html-index.js +9 -10
- package/dist/application-spec/generate-application/code/templates/index.d.ts +6 -17
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/lingui-rc.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/lingui-rc.js +3 -2
- package/dist/application-spec/generate-application/code/templates/prettier-config.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/prettier-config.js +4 -5
- package/dist/application-spec/generate-application/code/templates/root-tsconfig.d.ts +6 -0
- package/dist/application-spec/generate-application/code/templates/root-tsconfig.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/index.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/sdk.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +89 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +46 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/application-states.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/application-states.js +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/navigation.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/navigation.js +48 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/presets.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/presets.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/selection.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/selection.js +35 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +61 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +7 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/finalization-actions.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/finalization-actions.js +79 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/messages.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/messages.js +52 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.js +49 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/scene-and-safe-area.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/scene-and-safe-area.js +62 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/slots.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/slots.js +40 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/tabs-and-steps.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/tabs-and-steps.js +65 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/toolbar-actions.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/toolbar-actions.js +58 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/view-mode.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/view-mode.js +41 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-components.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-components.js +24 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-hooks.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-hooks.js +44 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.js +74 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/domain-controls.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/domain-controls.js +8 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.js +48 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +64 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/components.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/components.js +62 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/domain-model.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/domain-model.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/entities-and-relations.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/entities-and-relations.js +59 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.js +46 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/transformers.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/transformers.js +43 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/validation-and-repair.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/validation-and-repair.js +30 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/features.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/inspection.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/inspection.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/localization.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/localization.js +87 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/scene-objects.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/scene-objects.js +43 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/slices.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/slices.js +48 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/state.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/state.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/updates.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/updates.js +39 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.js +36 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/variants.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/variants.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/assistant-setup.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/assistant-setup.js +32 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.js +42 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/backend-data.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/backend-data.js +45 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/finalization.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/finalization.js +92 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/callback.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/callback.js +26 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/documents.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/documents.js +51 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/email.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/email.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/integrations.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/integrations.js +88 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/links-and-images.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/links-and-images.js +68 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/tasks.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/tasks.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +68 -0
- package/dist/application-spec/generate-application/code/templates/skills/guide.js +18 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +10 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +14 -0
- package/dist/application-spec/generate-application/code/templates/skills/phx-members-without-guide.d.ts +9 -0
- package/dist/application-spec/generate-application/code/templates/skills/phx-members-without-guide.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +23 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/beta.d.ts +14 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/beta.js +4 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/evaluate.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/evaluate.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/feedback.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/feedback.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +7 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/send.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/send.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +25 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +35 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +9 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +8 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +46 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/hand-over.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/hand-over.js +6 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +13 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/branding.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/branding.js +20 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/catalog.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/catalog.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +22 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +25 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +49 -238
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +3 -61
- package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.d.ts +9 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.d.ts +58 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/index.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.d.ts +18 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.js +41 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.d.ts +20 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.js +6 -0
- package/dist/application-spec/generate-application/code/templates/story/phx-module.d.ts +8 -2
- package/dist/application-spec/generate-application/code/templates/story/phx-module.js +15 -3
- package/dist/application-spec/generate-application/code/templates/story/wrapper.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/story/wrapper.js +4 -5
- package/dist/application-spec/generate-application/code/templates/tsconfig.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/tsconfig.js +2 -1
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +9 -4
- package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +6 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.js +10 -1
- package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -3
- package/dist/application-spec/generate-application/index.d.ts +1 -4
- package/dist/application-spec/generate-application/index.js +1 -1
- package/dist/application-spec/index.d.ts +1 -0
- package/dist/application-spec/index.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +34 -0
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.d.ts +16 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.js +9 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.d.ts +9 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.js +1 -0
- package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +1 -1
- package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-assistant.d.ts +13 -4
- package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-infra.d.ts +4 -11
- package/dist/application-spec/parse-application-files/merge/merged-transformers.d.ts +2 -4
- package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/parse-yaml-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-acl.d.ts +2 -2
- package/dist/application-spec/parse-application-files/raw-spec/raw-acl.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-admin-pages.d.ts +3 -24
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +72 -24
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.d.ts +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-resources.d.ts +19 -64
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-pages.d.ts +3 -20
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/states.d.ts +3 -5
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/states.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.d.ts +3 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/index.d.ts +5 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/index.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.d.ts +6 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.d.ts +8 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.d.ts +10 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.d.ts +98 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.d.ts +13 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/index.d.ts +2 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.d.ts +24 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding.d.ts +3 -13
- package/dist/application-spec/parse-application-files/spec/components/bindings/write-binding.d.ts +4 -32
- package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +3 -62
- package/dist/application-spec/parse-application-files/spec/components/component-filter.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/component-state-type.d.ts +8 -0
- package/dist/application-spec/parse-application-files/spec/components/component-state-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/components.d.ts +3 -4
- package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.d.ts +13 -0
- package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -2
- package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/sdk-component-entry.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/components/static-entity-id.d.ts +14 -0
- package/dist/application-spec/parse-application-files/spec/components/static-entity-id.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +8 -3
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +9 -7
- package/dist/application-spec/parse-application-files/spec/components/user-components.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +24 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.js +1 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read.d.ts +13 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.d.ts +9 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +12 -30
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -2
- package/dist/application-spec/parse-application-files/spec/expressions/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.d.ts +4 -71
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +5 -3
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/invariants/invariant.d.ts +5 -21
- package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +6 -16
- package/dist/application-spec/parse-application-files/spec/invariants/invariants.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/aliases.d.ts +3 -9
- package/dist/application-spec/parse-application-files/spec/model/common-types.d.ts +6 -14
- package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +6 -26
- package/dist/application-spec/parse-application-files/spec/model/defaults.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/entity-types.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/model/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.d.ts +10 -0
- package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.js +1 -0
- package/dist/application-spec/parse-application-files/spec/model/model-version-key.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/alias-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/entity-or-alias-name.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/names/entity-type-name.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/names/expression-name.d.ts +3 -6
- package/dist/application-spec/parse-application-files/spec/model/names/instance-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/invariant-name.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/names/shape-property-name.d.ts +3 -11
- package/dist/application-spec/parse-application-files/spec/model/names/violation-type-name.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/presets.d.ts +6 -29
- package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.d.ts +25 -0
- package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.d.ts +46 -0
- package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.js +1 -0
- package/dist/application-spec/parse-application-files/spec/relations/relations.d.ts +4 -3
- package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +6 -23
- package/dist/application-spec/parse-application-files/spec/sections/app-metadata.d.ts +3 -18
- package/dist/application-spec/parse-application-files/spec/sections/application-version.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +9 -0
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -0
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +13 -44
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +2 -2
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.d.ts +5 -21
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/chunks.d.ts +6 -23
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/custom-data-spec.d.ts +1 -16
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-entry-key.d.ts +3 -9
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-spec.d.ts +1 -10
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/swatch-data-spec.d.ts +1 -14
- package/dist/application-spec/parse-application-files/spec/sections/infra.d.ts +2 -0
- package/dist/application-spec/parse-application-files/spec/sections/infra.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/state-value.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/sections/theme.d.ts +3 -10
- package/dist/application-spec/parse-application-files/spec/sections/transformers.d.ts +4 -11
- package/dist/application-spec/parse-application-files/spec/sections/ui.d.ts +3 -12
- package/dist/client/authorized-client.d.ts +6 -1
- package/dist/client/authorized-client.js +1 -1
- package/dist/client/contract.d.ts +85 -0
- package/dist/client/contract.js +1 -1
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +1 -1
- package/dist/client/local-authorized-client.d.ts +6 -1
- package/dist/client/local-authorized-client.js +1 -1
- package/dist/client/memory-authorized-client.d.ts +7 -1
- package/dist/client/memory-authorized-client.js +1 -1
- package/dist/client/phoenix-api.d.ts +1751 -258
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/agent-at-work/AgentAtWorkFallback.d.ts +7 -0
- package/dist/configurator/agent-at-work/AgentAtWorkFallback.js +1 -0
- package/dist/configurator/agent-at-work/AgentAtWorkPage.d.ts +20 -0
- package/dist/configurator/agent-at-work/AgentAtWorkPage.js +1 -0
- package/dist/configurator/agent-at-work/AgentModeBadge.d.ts +11 -0
- package/dist/configurator/agent-at-work/AgentModeBadge.js +1 -0
- package/dist/configurator/agent-at-work/StudioMark.d.ts +8 -0
- package/dist/configurator/agent-at-work/StudioMark.js +1 -0
- package/dist/configurator/agent-at-work/agent-at-work-copy.d.ts +17 -0
- package/dist/configurator/agent-at-work/agent-at-work-copy.js +1 -0
- package/dist/configurator/agent-at-work/agent-at-work-styles.d.ts +23 -0
- package/dist/configurator/agent-at-work/agent-at-work-styles.js +374 -0
- package/dist/configurator/agent-at-work/index.d.ts +3 -0
- package/dist/configurator/agent-at-work/index.js +1 -0
- package/dist/configurator/app-loader-content/DefaultAppLoaderContent.d.ts +2 -0
- package/dist/configurator/app-loader-content/DefaultAppLoaderContent.js +5 -0
- package/dist/configurator/app-loader-content/index.d.ts +1 -0
- package/dist/configurator/app-loader-content/index.js +1 -0
- package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.d.ts +3 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.d.ts +34 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-image-view.d.ts +18 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-speech-player.d.ts +69 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-speech-player.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +428 -13
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.d.ts +68 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +58 -9
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/rasterize-image.d.ts +13 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/rasterize-image.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/speakable-reply.d.ts +7 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/speakable-reply.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +44 -1
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/canvas-system.d.ts +8 -0
- package/dist/configurator/application-runtime/extensions/systems/canvas-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/drag-and-drop-system/drag-and-drop-system.d.ts +3 -3
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.d.ts +8 -0
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +26 -1
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.d.ts +12 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +82 -55
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +92 -8
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.d.ts +11 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +40 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/capture-next-frame.d.ts +10 -0
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/capture-next-frame.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +22 -5
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +7 -2
- package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +13 -2
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/sketching-system/sketching-system.d.ts +5 -5
- package/dist/configurator/common/configurator-interface.d.ts +160 -10
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/common/index.d.ts +3 -1
- package/dist/configurator/common/index.js +1 -1
- package/dist/configurator/common/use-reset-camera.d.ts +6 -0
- package/dist/configurator/common/use-reset-camera.js +1 -0
- package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.d.ts +5 -0
- package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.js +1 -0
- package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +6 -0
- package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -0
- package/dist/configurator/configuration-not-found-page/index.d.ts +2 -0
- package/dist/configurator/configuration-not-found-page/index.js +1 -0
- package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
- package/dist/configurator/configurator-context/ViewportStateSync.d.ts +2 -2
- package/dist/configurator/configurator-context/ViewportStateSync.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/index.d.ts +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/index.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +11 -1
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.js +1 -1
- package/dist/configurator/configurator-context/index.d.ts +0 -5
- package/dist/configurator/configurator-context/index.js +1 -1
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +6 -0
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -0
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +7 -0
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -0
- package/dist/configurator/configurator-error-page/index.d.ts +2 -0
- package/dist/configurator/configurator-error-page/index.js +1 -0
- package/dist/configurator/index.d.ts +11 -0
- package/dist/configurator/index.js +1 -1
- package/dist/configurator/pages/ConfiguratorErrorPage.d.ts +0 -1
- package/dist/configurator/pages/ConfiguratorErrorPage.js +1 -1
- package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
- package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +7 -0
- package/dist/configurator/pages/DefaultConfiguratorLayout.js +1 -0
- package/dist/configurator/pages/DefaultNotAuthenticatedPage.d.ts +8 -0
- package/dist/configurator/pages/DefaultNotAuthenticatedPage.js +1 -0
- package/dist/configurator/pages/DefaultPresetUi.d.ts +7 -0
- package/dist/configurator/pages/DefaultPresetUi.js +1 -0
- package/dist/configurator/pages/ExportingOverlay.d.ts +6 -0
- package/dist/configurator/pages/ExportingOverlay.js +1 -0
- package/dist/configurator/pages/InertRoot.d.ts +10 -0
- package/dist/configurator/pages/InertRoot.js +1 -0
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
- package/dist/configurator/pages/PresetCreationErrorPage.d.ts +2 -2
- package/dist/configurator/pages/PresetCreationErrorPage.js +1 -1
- package/dist/configurator/pages/RootPage.js +1 -1
- package/dist/configurator/pages/configurator-layout-name.d.ts +2 -0
- package/dist/configurator/pages/configurator-layout-name.js +1 -0
- package/dist/configurator/pages/default-configurator-elements.d.ts +17 -0
- package/dist/configurator/pages/default-configurator-elements.js +1 -0
- package/dist/configurator/pages/default-elements/built-in-entity-element.d.ts +10 -0
- package/dist/configurator/pages/default-elements/built-in-entity-element.js +1 -0
- package/dist/configurator/pages/default-elements/built-in-layout-element.d.ts +10 -0
- package/dist/configurator/pages/default-elements/built-in-layout-element.js +1 -0
- package/dist/configurator/pages/default-elements/domain-control-elements.d.ts +6 -0
- package/dist/configurator/pages/default-elements/domain-control-elements.js +1 -0
- package/dist/configurator/pages/default-elements/index.d.ts +5 -0
- package/dist/configurator/pages/default-elements/index.js +1 -0
- package/dist/configurator/pages/default-elements/recipe-panel-elements.d.ts +3 -0
- package/dist/configurator/pages/default-elements/recipe-panel-elements.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/index.d.ts +6 -0
- package/dist/configurator/pages/default-elements/scene-controls/index.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.d.ts +6 -0
- package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.js +1 -0
- package/dist/configurator/pages/default-elements/sidebar-footer-elements.d.ts +7 -0
- package/dist/configurator/pages/default-elements/sidebar-footer-elements.js +1 -0
- package/dist/configurator/pages/default-elements/toolbar-elements.d.ts +7 -0
- package/dist/configurator/pages/default-elements/toolbar-elements.js +1 -0
- package/dist/configurator/pages/error-boundaries/AgentModeErrorFallback.d.ts +8 -0
- package/dist/configurator/pages/error-boundaries/AgentModeErrorFallback.js +1 -0
- package/dist/configurator/pages/error-boundaries/BuiltInGeneralErrorFallback.d.ts +5 -0
- package/dist/configurator/pages/error-boundaries/BuiltInGeneralErrorFallback.js +1 -0
- package/dist/configurator/pages/error-boundaries/DevContextFallback.d.ts +4 -2
- package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
- package/dist/configurator/pages/error-boundaries/DevLoadingFallback.d.ts +6 -4
- package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
- package/dist/configurator/pages/error-boundaries/GeneralErrorBoundary.js +1 -1
- package/dist/configurator/pages/error-boundaries/LoadingErrorBoundary.js +1 -1
- package/dist/configurator/pages/error-boundaries/index.d.ts +1 -0
- package/dist/configurator/pages/error-boundaries/index.js +1 -1
- package/dist/configurator/pages/index.d.ts +1 -0
- package/dist/configurator/pages/index.js +1 -1
- package/dist/configurator/pages/provider-slots/ConfiguratorResponsiveProvider.d.ts +12 -0
- package/dist/configurator/pages/provider-slots/ConfiguratorResponsiveProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/ContainerSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/ContainerSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/LoaderSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/LoaderSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/MessageHostSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/MessageHostSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/SceneResourcesSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/SceneResourcesSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/ThemeSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/ThemeSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/configurator-provider-slot-elements.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/configurator-provider-slot-elements.js +1 -0
- package/dist/configurator/pages/provider-slots/index.d.ts +6 -0
- package/dist/configurator/pages/provider-slots/index.js +1 -0
- package/dist/configurator/pages/ui-elements/BuiltInInvalidDeploymentReload.d.ts +2 -0
- package/dist/configurator/pages/ui-elements/BuiltInInvalidDeploymentReload.js +1 -0
- package/dist/configurator/pages/ui-elements/configurator-ui-elements.d.ts +3 -0
- package/dist/configurator/pages/ui-elements/configurator-ui-elements.js +1 -0
- package/dist/configurator/pages/ui-elements/index.d.ts +2 -0
- package/dist/configurator/pages/ui-elements/index.js +1 -0
- package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.d.ts +4 -0
- package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.js +1 -0
- package/dist/configurator/preset-screen-elements/PresetPageActionElement.d.ts +4 -0
- package/dist/configurator/preset-screen-elements/PresetPageActionElement.js +1 -0
- package/dist/configurator/preset-screen-elements/index.d.ts +2 -0
- package/dist/configurator/preset-screen-elements/index.js +1 -0
- package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
- package/dist/configurator/scene/index.d.ts +1 -0
- package/dist/configurator/scene/index.js +1 -1
- package/dist/configurator/scene/scene-controls/DeleteEntityFab.js +1 -1
- package/dist/configurator/scene/scene-controls/SelectionHotspot.js +1 -1
- package/dist/configurator/scene/scene-controls/ToolFab.d.ts +4 -0
- package/dist/configurator/scene/scene-controls/ToolFab.js +1 -1
- package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragHandle.d.ts +1 -1
- package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragSceneHandle.d.ts +1 -1
- package/dist/configurator/scene/scene-controls/use-scene-control-tooltip.d.ts +2 -1
- package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicator.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicatorInternal.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/drag-and-drop/shared.d.ts +2 -2
- package/dist/configurator/scene/scene-entity/drag-and-drop/use-drag-object.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
- package/dist/configurator/scene/scene-entity/objects/SceneEntityObjectTextDecal.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/scene-controls/SceneEntityHtmlHotspots.js +1 -1
- package/dist/configurator/toolbar-actions/index.d.ts +3 -0
- package/dist/configurator/toolbar-actions/index.js +1 -0
- package/dist/configurator/toolbar-actions/use-assistant-panel.d.ts +18 -0
- package/dist/configurator/toolbar-actions/use-assistant-panel.js +1 -0
- package/dist/configurator/toolbar-actions/use-measurements.d.ts +35 -0
- package/dist/configurator/toolbar-actions/use-measurements.js +1 -0
- package/dist/configurator/toolbar-actions/use-toolbar-actions.d.ts +100 -0
- package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -0
- package/dist/configurator/toolbar-actions/use-toolbar-help.d.ts +7 -0
- package/dist/configurator/toolbar-actions/use-toolbar-help.js +1 -0
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +92 -3
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +104 -2
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +41 -2
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/AssistantPanel.d.ts +46 -1
- package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +83 -3
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThreadItemView.d.ts +104 -0
- package/dist/configurator/ui/assistant/AssistantThreadItemView.js +1 -0
- package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +45 -0
- package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -0
- package/dist/configurator/ui/assistant/alert/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/alert/index.js +1 -0
- package/dist/configurator/ui/assistant/alert/remark-alerts.d.ts +10 -0
- package/dist/configurator/ui/assistant/alert/remark-alerts.js +1 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationBadge.d.ts +43 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationBadge.js +1 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationOverlay.d.ts +5 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationOverlay.js +1 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationPin.d.ts +14 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationPin.js +1 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationViewer.d.ts +12 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationViewer.js +1 -0
- package/dist/configurator/ui/assistant/annotation/MessageAnnotations.d.ts +11 -0
- package/dist/configurator/ui/assistant/annotation/MessageAnnotations.js +1 -0
- package/dist/configurator/ui/assistant/annotation/annotation-layout.d.ts +80 -0
- package/dist/configurator/ui/assistant/annotation/annotation-layout.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +49 -0
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +18 -0
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-drawing.d.ts +22 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-drawing.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +22 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/flatten-annotation.d.ts +17 -0
- package/dist/configurator/ui/assistant/annotation/editor/flatten-annotation.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/annotation/editor/index.js +1 -0
- package/dist/configurator/ui/assistant/annotation/index.d.ts +6 -0
- package/dist/configurator/ui/assistant/annotation/index.js +1 -0
- package/dist/configurator/ui/assistant/annotation/prefers-reduced-motion.d.ts +2 -0
- package/dist/configurator/ui/assistant/annotation/prefers-reduced-motion.js +1 -0
- package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.d.ts +6 -0
- package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.js +1 -0
- package/dist/configurator/ui/assistant/assistant-failure.d.ts +20 -7
- package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
- package/dist/configurator/ui/assistant/attachments/MessageImages.d.ts +63 -0
- package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -0
- package/dist/configurator/ui/assistant/attachments/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/attachments/index.js +1 -0
- package/dist/configurator/ui/assistant/attachments/prepare-image.d.ts +24 -0
- package/dist/configurator/ui/assistant/attachments/prepare-image.js +1 -0
- package/dist/configurator/ui/assistant/composer/composer-frame.d.ts +20 -0
- package/dist/configurator/ui/assistant/composer/composer-frame.js +1 -0
- package/dist/configurator/ui/assistant/composer/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/composer/index.js +1 -0
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.d.ts +58 -0
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -0
- package/dist/configurator/ui/assistant/drawing/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/drawing/index.js +1 -0
- package/dist/configurator/ui/assistant/drawing/parse-drawing.d.ts +18 -0
- package/dist/configurator/ui/assistant/drawing/parse-drawing.js +1 -0
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +14 -0
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +47 -0
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-selection.d.ts +22 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-selection.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +27 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-state.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/entity-link/index.js +1 -0
- package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +76 -0
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -0
- package/dist/configurator/ui/assistant/form/built-in-form-slots.d.ts +16 -0
- package/dist/configurator/ui/assistant/form/built-in-form-slots.js +1 -0
- package/dist/configurator/ui/assistant/form/compose-answer.d.ts +11 -0
- package/dist/configurator/ui/assistant/form/compose-answer.js +1 -0
- package/dist/configurator/ui/assistant/form/describe-build-errors.d.ts +6 -0
- package/dist/configurator/ui/assistant/form/describe-build-errors.js +1 -0
- package/dist/configurator/ui/assistant/form/form-model.d.ts +37 -0
- package/dist/configurator/ui/assistant/form/form-state.d.ts +4 -0
- package/dist/configurator/ui/assistant/form/index.d.ts +5 -0
- package/dist/configurator/ui/assistant/form/index.js +1 -0
- package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +10 -0
- package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -0
- package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +13 -0
- package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +29 -0
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +31 -0
- package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/form-element-definition.d.ts +16 -0
- package/dist/configurator/ui/assistant/form/registry/form-element-definition.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/form-registry.d.ts +31 -0
- package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/index.d.ts +6 -0
- package/dist/configurator/ui/assistant/form/registry/index.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/use-form-registry.d.ts +8 -0
- package/dist/configurator/ui/assistant/form/registry/use-form-registry.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +68 -0
- package/dist/configurator/ui/assistant/form-elements/FormCard.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +60 -0
- package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +53 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +52 -0
- package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +57 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +49 -0
- package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +61 -0
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +53 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/clamp-form-number.d.ts +10 -0
- package/dist/configurator/ui/assistant/form-elements/clamp-form-number.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +38 -0
- package/dist/configurator/ui/assistant/form-elements/index.d.ts +9 -0
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -0
- package/dist/configurator/ui/assistant/image-view/ImageView.d.ts +66 -0
- package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -0
- package/dist/configurator/ui/assistant/image-view/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/image-view/index.js +1 -0
- package/dist/configurator/ui/assistant/image-view/use-image-blob.d.ts +7 -0
- package/dist/configurator/ui/assistant/image-view/use-image-blob.js +1 -0
- package/dist/configurator/ui/assistant/index.d.ts +25 -1
- package/dist/configurator/ui/assistant/index.js +1 -1
- package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.d.ts +57 -0
- package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.js +1 -0
- package/dist/configurator/ui/assistant/panel/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/panel/index.js +1 -0
- package/dist/configurator/ui/assistant/popover/AssistantPopover.d.ts +24 -0
- package/dist/configurator/ui/assistant/popover/AssistantPopover.js +1 -0
- package/dist/configurator/ui/assistant/popover/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/popover/index.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +58 -0
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-link-target.d.ts +34 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-link-target.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +25 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/reference-link/index.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/reference-styles.d.ts +12 -0
- package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.d.ts +8 -0
- package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/AssistantImage.d.ts +56 -0
- package/dist/configurator/ui/assistant/resource-image/AssistantImage.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/resource-image/index.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +2 -0
- package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.d.ts +5 -0
- package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +43 -0
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/screenshots/index.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +16 -0
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +8 -0
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -0
- package/dist/configurator/ui/assistant/streamed-markdown.d.ts +15 -2
- package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
- package/dist/configurator/ui/assistant/thread-items.d.ts +40 -3
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/configurator/ui/assistant/tool-chip.d.ts +25 -8
- package/dist/configurator/ui/assistant/tool-chip.js +1 -1
- package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +88 -0
- package/dist/configurator/ui/assistant/use-assistant-composer.js +2 -0
- package/dist/configurator/ui/assistant/use-assistant-thread.d.ts +52 -0
- package/dist/configurator/ui/assistant/use-assistant-thread.js +1 -0
- package/dist/configurator/ui/assistant/use-follow-stream.js +1 -1
- package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +22 -0
- package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -0
- package/dist/configurator/ui/assistant/voice/RecordingBar.d.ts +21 -0
- package/dist/configurator/ui/assistant/voice/RecordingBar.js +1 -0
- package/dist/configurator/ui/assistant/voice/ReplyPlayButton.d.ts +43 -0
- package/dist/configurator/ui/assistant/voice/ReplyPlayButton.js +1 -0
- package/dist/configurator/ui/assistant/voice/index.d.ts +4 -0
- package/dist/configurator/ui/assistant/voice/index.js +1 -0
- package/dist/configurator/ui/assistant/voice/use-voice-recording.d.ts +39 -0
- package/dist/configurator/ui/assistant/voice/use-voice-recording.js +1 -0
- package/dist/configurator/ui/assistant/voice/voice-capture.d.ts +22 -0
- package/dist/configurator/ui/assistant/voice/voice-capture.js +1 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/index.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/index.js +1 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.d.ts +11 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/canvas/GPUAccelerationDisabled.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/SharedCanvas.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/WebGLNotSupported.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.d.ts +101 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +16 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/mobile-tabs/use-mobile-tabs.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/slots/mobile-tabs/use-mobile-tabs.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/readonly-banner/CloneToEditDialog.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.d.ts +4 -4
- package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/services/Services.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.d.ts +3 -6
- package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/sidebar-tabs/use-sidebar-tabs.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/slots/sidebar-tabs/use-sidebar-tabs.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/slots.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/slots/slots.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.d.ts +0 -74
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -20
- package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +47 -0
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +11 -26
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.js +1 -1
- package/dist/configurator/ui/index.d.ts +1 -0
- package/dist/configurator/ui/index.js +1 -1
- package/dist/configurator/ui/legacy/chat/MobileChat.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonFinalizeButton.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonSummaryButton.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/ReactiveInterfaceLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/ResponsiveFinalizeButton.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/SummaryReadLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleSidebar.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.d.ts +2 -2
- package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsSideBar.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsSidebarFooter.js +1 -1
- package/dist/configurator/ui/legacy/layout/tabs/TabsOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/tabs/TabsSidebar.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/common/DimensionUnitSelector.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/common/MeasurementsIndicatorsSwitch.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/FullscreenToolbarAction.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/HelpToolbarAction.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/MeasurementsToolbarAction.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/UndoRedoToolbarGroup.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/AppLoader.d.ts +0 -7
- package/dist/configurator/ui/phoenix-layout-elements/AppLoader.js +2 -6
- package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/EnterFullscreenToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/ExitFullscreenToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/HelpToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LanguageMenuAction.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LanguageToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.d.ts +1 -0
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.d.ts +1 -0
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/MeasurementsMenuAction.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/MeasurementsToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/RedoToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/ShareToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/UndoToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/horizontal-tabs/DesktopHorizontalTabs.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.d.ts +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -8
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +8 -1
- package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/DimensionUnitSelector.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/share/ShareModal.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/share/use-share.d.ts +7 -8
- package/dist/configurator/ui/phoenix-layout-elements/share/use-share.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/BasicFinalizeButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/use-basic-sidebar-footer.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/CustomFinalizeButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/EnterSummaryButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/FinalizeActions.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/NextStepButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
- package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
- package/dist/configurator/ui/preset-layout/PresetUi.d.ts +4 -2
- package/dist/configurator/ui/preset-layout/PresetUi.js +1 -1
- package/dist/configurator/ui/preset-layout/index.d.ts +6 -1
- package/dist/configurator/ui/preset-layout/index.js +1 -1
- package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.d.ts +10 -0
- package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -0
- package/dist/configurator/ui/save-message-snackbars/index.d.ts +1 -0
- package/dist/configurator/ui/save-message-snackbars/index.js +1 -0
- package/dist/docs/3d-scene/animations-basic.mdx +0 -4
- package/dist/docs/3d-scene/camera-based-hiding.mdx +0 -2
- package/dist/docs/3d-scene/cameras/custom.mdx +4 -4
- package/dist/docs/3d-scene/cameras/fit-during-drag.mdx +0 -4
- package/dist/docs/3d-scene/cameras/locks.mdx +0 -4
- package/dist/docs/3d-scene/cameras/transitions.mdx +0 -2
- package/dist/docs/3d-scene/engraving.mdx +0 -4
- package/dist/docs/3d-scene/materials/custom.mdx +1 -2
- package/dist/docs/3d-scene/materials/inherit.mdx +0 -4
- package/dist/docs/3d-scene/materials/multilevel.mdx +0 -47
- package/dist/docs/3d-scene/materials/override.mdx +0 -4
- package/dist/docs/3d-scene/materials/simple.mdx +0 -4
- package/dist/docs/3d-scene/materials/transformer.mdx +0 -4
- package/dist/docs/3d-scene/materials/transition.mdx +0 -4
- package/dist/docs/3d-scene/materials/transmissive.mdx +0 -4
- package/dist/docs/3d-scene/postprocessing.mdx +0 -2
- package/dist/docs/3d-scene/rendering/basic.mdx +5 -9
- package/dist/docs/3d-scene/rendering/custom-entity.mdx +0 -6
- package/dist/docs/3d-scene/rendering/lights/ambient-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/lights/directional-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/lights/point-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/lights/rect-area-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/lights/spot-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/object-groups.mdx +0 -2
- package/dist/docs/3d-scene/rendering/objects.mdx +0 -4
- package/dist/docs/3d-scene/rendering/scene-entity-object.mdx +0 -43
- package/dist/docs/3d-scene/rendering/smma.mdx +0 -2
- package/dist/docs/3d-scene/rendering/soft-shadows.mdx +0 -2
- package/dist/docs/3d-scene/rendering/transformer.mdx +1 -3
- package/dist/docs/complex-use-cases/custom-ui-on-root-level.mdx +0 -1
- package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +119 -136
- package/dist/docs/complex-use-cases/focus-mode.mdx +2 -0
- package/dist/docs/complex-use-cases/navigation-guard.mdx +81 -19
- package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +33 -64
- package/dist/docs/complex-use-cases/navigation-reset-undo.mdx +16 -20
- package/dist/docs/complex-use-cases/sketching.mdx +2 -48
- package/dist/docs/controls/custom.mdx +88 -87
- package/dist/docs/controls/manage-child-entities/entitychildrenlist.mdx +0 -4
- package/dist/docs/controls/nullable-attributes.mdx +0 -2
- package/dist/docs/controls/scene/custom-controls.mdx +7 -8
- package/dist/docs/controls/scene/html-hotspots.mdx +0 -4
- package/dist/docs/controls/scene/object-html-hotspots.mdx +0 -4
- package/dist/docs/controls/select-attribute/cardselect.mdx +9 -17
- package/dist/docs/controls/select-attribute/listselect.mdx +0 -4
- package/dist/docs/controls/select-attribute/select.mdx +0 -4
- package/dist/docs/controls/select-attribute/swatchselect.mdx +0 -4
- package/dist/docs/controls/select-attribute/switchselect.mdx +0 -4
- package/dist/docs/controls/select-attribute/toggleselect.mdx +0 -4
- package/dist/docs/controls/select-child-entity/cardselect.mdx +3 -6
- package/dist/docs/controls/select-child-entity/listselect.mdx +5 -11
- package/dist/docs/controls/select-child-entity/toggleselect.mdx +4 -10
- package/dist/docs/controls/text-input.mdx +90 -19
- package/dist/docs/demos/glass.mdx +0 -4
- package/dist/docs/demos/heater.mdx +0 -10
- package/dist/docs/demos/office-chair.mdx +0 -8
- package/dist/docs/demos/office-desk.mdx +0 -8
- package/dist/docs/demos/ring.mdx +0 -9
- package/dist/docs/dimensions/3d-scene-integration/angle-indicators.mdx +0 -2
- package/dist/docs/dimensions/3d-scene-integration/dimension-indicators.mdx +2 -2
- package/dist/docs/dimensions/3d-scene-integration/editable-angle-indicator.mdx +1 -3
- package/dist/docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx +1 -15
- package/dist/docs/dimensions/3d-scene-integration/editable-offset-indicator.mdx +0 -6
- package/dist/docs/dimensions/3d-scene-integration/editable-size-indicator.mdx +0 -4
- package/dist/docs/dimensions/3d-scene-integration/list-selector-dimension-indicator.mdx +1 -17
- package/dist/docs/dimensions/3d-scene-integration/offset-indicator.mdx +0 -6
- package/dist/docs/dimensions/3d-scene-integration/overlap-offset-demo.mdx +0 -6
- package/dist/docs/dimensions/basic-concepts/dimension-data-unit.mdx +0 -12
- package/dist/docs/dimensions/basic-concepts/dimension-unit-config.mdx +0 -12
- package/dist/docs/dimensions/input-controls/distance-input.mdx +0 -12
- package/dist/docs/dimensions/input-controls/distance-slider.mdx +6 -18
- package/dist/docs/dimensions/selection-controls/list-selector.mdx +0 -14
- package/dist/docs/dimensions/selection-controls/toggle-selector.mdx +0 -14
- package/dist/docs/drag-and-drop/drag-handle.mdx +1 -2
- package/dist/docs/drag-and-drop/hotspot-handle.mdx +1 -2
- package/dist/docs/drag-and-drop/no-selection.mdx +0 -1
- package/dist/docs/drag-and-drop/planes.mdx +1 -4
- package/dist/docs/drag-and-drop/room-planner.mdx +1 -7
- package/dist/docs/drag-and-drop/rotatable.mdx +2 -3
- package/dist/docs/drag-and-drop/snapping/auto-rotation-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/label-matching-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/multi-snap-composition-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/nested-entity-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/priority-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/snap-axis-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/snap-edge-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/snap-plane-demo.mdx +0 -5
- package/dist/docs/drag-and-drop/snapping/snap-point-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/spatial-constraints/collision-system.mdx +0 -2
- package/dist/docs/drag-and-drop/spatial-constraints/disjoint-and-within.mdx +0 -6
- package/dist/docs/drag-and-drop/spatial-constraints/geometry-override.mdx +0 -4
- package/dist/docs/drag-and-drop/spatial-constraints/multiple-collision-meshes.mdx +0 -4
- package/dist/docs/drag-and-drop/spatial-constraints/touches.mdx +0 -4
- package/dist/docs/drag-and-drop/swap.mdx +0 -4
- package/dist/docs/fabs/basic.mdx +12 -14
- package/dist/docs/fabs/layout.mdx +0 -7
- package/dist/docs/index.json +141 -6
- package/dist/docs/integrations/lifecycle-providers.mdx +0 -12
- package/dist/docs/integrations/onloadprovider.mdx +0 -3
- package/dist/docs/integrations/webcomponent-api/basics.mdx +8 -2
- package/dist/docs/integrations/webcomponent-api/preset-tags.mdx +4 -1
- package/dist/docs/integrations/woocommerce/local-development.mdx +1 -1
- package/dist/docs/integrations/woocommerce/overview.mdx +4 -2
- package/dist/docs/layouts/custom-layout.mdx +2557 -0
- package/dist/docs/layouts/custom-price.mdx +14 -18
- package/dist/docs/layouts/custom-theme-handler.mdx +0 -4
- package/dist/docs/layouts/gallery/ardent-compressor.mdx +3485 -0
- package/dist/docs/layouts/gallery/corvid-drone.mdx +3399 -0
- package/dist/docs/layouts/gallery/fenwick-window.mdx +2778 -0
- package/dist/docs/layouts/gallery/ferrule-bar-station.mdx +6540 -0
- package/dist/docs/layouts/gallery/kestrel-kettle.mdx +1829 -0
- package/dist/docs/layouts/gallery/nightjar-guitar.mdx +3665 -0
- package/dist/docs/layouts/gallery/sunfold-solar.mdx +2657 -0
- package/dist/docs/layouts/gallery/tidepool-aquascape.mdx +5157 -0
- package/dist/docs/layouts/header/custom.mdx +0 -2
- package/dist/docs/layouts/header/fixed.mdx +2 -2
- package/dist/docs/layouts/header/floating.mdx +2 -2
- package/dist/docs/layouts/icon-sets.mdx +0 -6
- package/dist/docs/layouts/phoenix-elements.mdx +0 -4
- package/dist/docs/layouts/phoenix-handlers.mdx +19 -28
- package/dist/docs/layouts/presets/action-and-overlay.mdx +0 -8
- package/dist/docs/layouts/presets/custom.mdx +6 -13
- package/dist/docs/layouts/preview/always-expand.mdx +4 -14
- package/dist/docs/layouts/preview/always.mdx +4 -14
- package/dist/docs/layouts/preview/auto-presets.mdx +4 -14
- package/dist/docs/layouts/preview/auto.mdx +4 -14
- package/dist/docs/layouts/preview/never.mdx +4 -14
- package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +385 -0
- package/dist/docs/layouts/sidebar/property-page-stack.mdx +0 -2
- package/dist/docs/layouts/sidebar/property-page.mdx +0 -2
- package/dist/docs/layouts/sidebar/tabs.mdx +24 -25
- package/dist/docs/layouts/sidebar-footer/basic.mdx +32 -77
- package/dist/docs/layouts/sidebar-footer/custom.mdx +0 -2
- package/dist/docs/layouts/sidebar-footer/universal.mdx +0 -10
- package/dist/docs/layouts/tool-controls.mdx +0 -1
- package/dist/docs/layouts/toolbar.mdx +0 -4
- package/dist/docs/layouts/universal.mdx +2 -22
- package/dist/docs/other-features/client-side-rendering/camera-padding.mdx +0 -2
- package/dist/docs/other-features/client-side-rendering/custom.mdx +0 -6
- package/dist/docs/other-features/client-side-rendering/declarative.mdx +2 -6
- package/dist/docs/other-features/client-side-rendering/postprocessing.mdx +0 -6
- package/dist/docs/other-features/component-filters.mdx +0 -7
- package/dist/docs/other-features/currency.mdx +5 -6
- package/dist/docs/other-features/domain-actions.mdx +34 -8
- package/dist/docs/other-features/dynamic-component-attachments.mdx +75 -46
- package/dist/docs/other-features/error-5xx.mdx +1 -15
- package/dist/docs/other-features/navigation-hotspot.mdx +2 -5
- package/dist/docs/other-features/not-found-404.mdx +1 -15
- package/dist/docs/other-features/projected-entities.mdx +0 -5
- package/dist/docs/other-features/side-effects.mdx +50 -68
- package/dist/docs/other-features/transformers.mdx +105 -96
- package/dist/docs/other-features/violation-messages.mdx +52 -60
- package/dist/docs/other-features/violation-severity.mdx +2 -3
- package/dist/docs/performance/clone-highlight.mdx +0 -7
- package/dist/docs/performance/dynamic-components.mdx +0 -6
- package/dist/docs/performance/editable-dimension-stress-test.mdx +0 -2
- package/dist/docs/performance/fast-highlight.mdx +0 -7
- package/dist/docs/performance/general.mdx +0 -7
- package/dist/docs/performance/render-isolation.mdx +0 -6
- package/dist/docs/phoenix/admin.mdx +111 -155
- package/dist/docs/phoenix/application-states.mdx +54 -34
- package/dist/docs/phoenix/blender-rendering.mdx +3 -1
- package/dist/docs/phoenix/clerk-sign-in.mdx +1 -1
- package/dist/docs/phoenix/components.mdx +59 -46
- package/dist/docs/phoenix/configurator-interface.mdx +642 -165
- package/dist/docs/phoenix/data-sources.mdx +61 -37
- package/dist/docs/phoenix/deployments.mdx +14 -8
- package/dist/docs/phoenix/domain-model.mdx +30 -16
- package/dist/docs/phoenix/expression-context.mdx +14 -32
- package/dist/docs/phoenix/finalization.mdx +3 -2
- package/dist/docs/phoenix/getting-started.mdx +6 -5
- package/dist/docs/phoenix/integration/authentication-internal.mdx +2 -2
- package/dist/docs/phoenix/integration/finalization-internal.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +137 -0
- package/dist/docs/phoenix/localization.mdx +74 -78
- package/dist/docs/phoenix/migration-guide.mdx +34 -22
- package/dist/docs/phoenix/phoenix-cli.mdx +169 -76
- package/dist/docs/phoenix/project-structure.mdx +121 -74
- package/dist/docs/phoenix/quickstart.mdx +10 -12
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +27 -30
- package/dist/docs/phoenix/sessions-and-access.mdx +54 -34
- package/dist/docs/phoenix/sharing.mdx +1 -1
- package/dist/docs/phoenix/state-management.mdx +18 -16
- package/dist/docs/phoenix/testing.mdx +153 -0
- package/dist/docs/phoenix/webhook-membership.mdx +10 -9
- package/dist/docs/phoenix/webhooks.mdx +394 -245
- package/dist/docs/recipes-and-delete/delete-entity.mdx +3 -6
- package/dist/docs/recipes-and-delete/dynamic-root-entity.mdx +0 -2
- package/dist/docs/recipes-and-delete/grouped-button.mdx +0 -3
- package/dist/docs/recipes-and-delete/grouped-panel.mdx +0 -3
- package/dist/docs/recipes-and-delete/horizontal.mdx +3 -6
- package/dist/docs/recipes-and-delete/recipe-hierarchy-lists.mdx +0 -3
- package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +15 -18
- package/dist/docs/recipes-and-delete/replace-dropdown.mdx +3 -6
- package/dist/docs/recipes-and-delete/replace-panel.mdx +0 -7
- package/dist/docs/recipes-and-delete/simple.mdx +3 -6
- package/dist/docs/recipes-and-delete/vertical.mdx +3 -6
- package/dist/docs/relations/aliases.mdx +0 -2
- package/dist/docs/relations/all-of-type.mdx +0 -4
- package/dist/docs/relations/child-nullable.mdx +0 -4
- package/dist/docs/relations/child-required.mdx +0 -2
- package/dist/docs/relations/collection-direct.mdx +0 -4
- package/dist/docs/relations/collection-indirect.mdx +0 -4
- package/dist/docs/relations/collection-multiple.mdx +0 -2
- package/dist/docs/relations/cross-reference.mdx +0 -2
- package/dist/docs/relations/hierarchy.mdx +13 -4
- package/dist/docs/selection-and-highlight/canvas.mdx +0 -1
- package/dist/docs/selection-and-highlight/disable-highlight-per-object.mdx +0 -1
- package/dist/docs/selection-and-highlight/disable-highlight.mdx +0 -1
- package/dist/docs/selection-and-highlight/effects/outline.mdx +0 -3
- package/dist/docs/selection-and-highlight/effects/overlay.mdx +0 -3
- package/dist/docs/selection-and-highlight/fast-emissive-highlight.mdx +0 -3
- package/dist/docs/selection-and-highlight/group-highlighting.mdx +0 -1
- package/dist/docs/selection-and-highlight/hierarchy.mdx +100 -151
- package/dist/docs/selection-and-highlight/hotspots.mdx +2 -1
- package/dist/docs/ux-guidelines/choosing-a-control.mdx +11 -0
- package/dist/domain/admin-domain/__generated/enhanced-model.d.ts +1 -2
- package/dist/domain/admin-domain/__generated/model/versions/v1.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v2.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v3.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v4.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v5.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v6.d.ts +2 -2
- package/dist/domain/admin-domain/__generated/model/versions/v6.js +1 -1
- package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +26 -14
- package/dist/domain/admin-domain/implementation/common-admin-migrations.d.ts +1 -1
- package/dist/domain/admin-domain/implementation/common-admin-publish.d.ts +1 -2
- package/dist/domain/admin-domain/index.d.ts +10 -6
- package/dist/domain/admin-domain/index.js +1 -1
- package/dist/domain/application/GetApplicationWrapperHandler.d.ts +2 -2
- package/dist/domain/application/GetThemeHandler.d.ts +1 -1
- package/dist/domain/application/GetWebComponentOptions.d.ts +1 -1
- package/dist/domain/application/admin-page-factories.d.ts +1 -2
- package/dist/domain/application/application-config.d.ts +32 -119
- package/dist/domain/application/assistant/assistant-fields.d.ts +12 -0
- package/dist/domain/application/assistant/assistant-fields.js +1 -0
- package/dist/domain/application/assistant/assistant-value-type.d.ts +9 -0
- package/dist/domain/application/assistant/assistant-value-type.js +1 -0
- package/dist/domain/application/assistant/build-assistant-lenses.d.ts +13 -0
- package/dist/domain/application/assistant/build-assistant-lenses.js +5 -0
- package/dist/domain/application/assistant/build-assistant-manifest.d.ts +3 -0
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -0
- package/dist/domain/application/assistant/create-assistant-execution-schema.d.ts +32 -0
- package/dist/domain/application/assistant/create-assistant-execution-schema.js +1 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +5 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -0
- package/dist/domain/application/assistant/index.d.ts +6 -0
- package/dist/domain/application/assistant/index.js +1 -0
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +20 -0
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.js +1 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +10 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +48 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -0
- package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +14 -0
- package/dist/domain/application/assistant/session-setup/create-session-assistant.js +1 -0
- package/dist/domain/application/assistant/session-setup/index.d.ts +4 -0
- package/dist/domain/application/assistant/session-setup/index.js +1 -0
- package/dist/domain/application/assistant-field-options.d.ts +2 -3
- package/dist/domain/application/assistant-mutations.d.ts +3 -5
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +6 -8
- package/dist/domain/application/configurator-builder.d.ts +70 -47
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/application/create-initial-published-data.d.ts +6 -6
- package/dist/domain/application/index.d.ts +4 -7
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/application/published-data/DataRowValidatorHandler.d.ts +1 -1
- package/dist/domain/application/published-data/FilterPublishedChunksHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedChunkedDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedRevisionDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/SheetValidatorHandler.d.ts +1 -1
- package/dist/domain/application/published-data/build-legend-data.d.ts +1 -1
- package/dist/domain/application/published-data/create-finalize-admin-domain.d.ts +1 -2
- package/dist/domain/application/published-data/format-field-type.d.ts +1 -1
- package/dist/domain/application/published-data/map-data-to-sheet.d.ts +1 -1
- package/dist/domain/application/published-data/map-published-chunked-data.d.ts +3 -3
- package/dist/domain/application/published-data/map-published-data.d.ts +7 -4
- package/dist/domain/application/published-data/validate-sheet-data.d.ts +1 -1
- package/dist/domain/application/standard-properties.js +1 -1
- package/dist/domain/application/web-component-property.d.ts +3 -1
- package/dist/domain/application/web-component-property.js +1 -1
- package/dist/domain/available-system-components/available-system-components.d.ts +11 -0
- package/dist/domain/available-system-components/available-system-components.js +1 -0
- package/dist/domain/available-system-components/index.d.ts +1 -0
- package/dist/domain/available-system-components/index.js +1 -0
- package/dist/domain/core/action/action.d.ts +71 -0
- package/dist/domain/core/action/index.d.ts +1 -0
- package/dist/domain/core/action/index.js +1 -0
- package/dist/domain/core/component/component-reader-types.d.ts +43 -0
- package/dist/domain/core/component/component-reader-types.js +1 -0
- package/dist/domain/core/component/debug-state-component.d.ts +14 -0
- package/dist/domain/core/component/debug-state-component.js +1 -0
- package/dist/domain/core/component/domain-component-optic.d.ts +65 -0
- package/dist/domain/core/component/domain-component-optic.js +16 -0
- package/dist/domain/core/component/drag-state-component.d.ts +16 -0
- package/dist/domain/core/component/drag-state-component.js +1 -0
- package/dist/domain/core/component/export-state-component.d.ts +15 -0
- package/dist/domain/core/component/export-state-component.js +1 -0
- package/dist/domain/core/component/fullscreen-state-component.d.ts +14 -0
- package/dist/domain/core/component/fullscreen-state-component.js +1 -0
- package/dist/domain/core/component/group-components-by-entity-id-and-name.d.ts +8 -0
- package/dist/domain/core/component/group-components-by-entity-id-and-name.js +1 -0
- package/dist/domain/core/component/hover-state-component.d.ts +14 -0
- package/dist/domain/core/component/hover-state-component.js +1 -0
- package/dist/domain/core/component/index.d.ts +18 -0
- package/dist/domain/core/component/index.js +1 -0
- package/dist/domain/core/component/legacy-filter.d.ts +498 -0
- package/dist/domain/core/component/navigation-state-component.d.ts +15 -0
- package/dist/domain/core/component/navigation-state-component.js +1 -0
- package/dist/domain/core/component/selection-state-component.d.ts +14 -0
- package/dist/domain/core/component/selection-state-component.js +1 -0
- package/dist/domain/core/component/system-component-builder.d.ts +11 -0
- package/dist/domain/core/component/system-component-builder.js +1 -0
- package/dist/domain/core/component/system-component-filter.d.ts +811 -0
- package/dist/domain/core/component/system-virtual-entity.js +1 -0
- package/dist/domain/core/component/tool-state-component.d.ts +14 -0
- package/dist/domain/core/component/tool-state-component.js +1 -0
- package/dist/domain/core/component/updates.d.ts +123 -0
- package/dist/domain/core/component/view-state-component.d.ts +14 -0
- package/dist/domain/core/component/view-state-component.js +1 -0
- package/dist/domain/core/component/viewport-state-component.d.ts +29 -0
- package/dist/domain/core/component/viewport-state-component.js +1 -0
- package/dist/domain/core/data-schema/data-cell-value.d.ts +4 -0
- package/dist/domain/core/data-schema/data-cell-value.js +1 -0
- package/dist/domain/core/data-schema/data-schema-array-field.d.ts +5 -0
- package/dist/domain/core/data-schema/data-schema-array-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema-field-object.d.ts +4 -0
- package/dist/domain/core/data-schema/data-schema-field-object.js +1 -0
- package/dist/domain/core/data-schema/data-schema-field.d.ts +2 -0
- package/dist/domain/core/data-schema/data-schema-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema-localized-field.d.ts +4 -0
- package/dist/domain/core/data-schema/data-schema-localized-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema-primitive-field.d.ts +5 -0
- package/dist/domain/core/data-schema/data-schema-primitive-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema.d.ts +2 -0
- package/dist/domain/core/data-schema/data-schema.js +1 -0
- package/dist/domain/core/data-schema/index.d.ts +7 -0
- package/dist/domain/core/data-schema/index.js +1 -0
- package/dist/domain/core/decoder/create-decoder.d.ts +6 -0
- package/dist/domain/core/decoder/create-decoder.js +1 -0
- package/dist/domain/core/decoder/decoder.d.ts +6 -0
- package/dist/domain/core/decoder/decoder.js +1 -0
- package/dist/domain/core/decoder/index.d.ts +2 -0
- package/dist/domain/core/decoder/index.js +1 -0
- package/dist/domain/core/domain-factory.d.ts +4 -5
- package/dist/domain/core/domain-factory.js +1 -1
- package/dist/domain/core/domain.d.ts +4 -5
- package/dist/domain/core/domain.js +1 -1
- package/dist/domain/core/emission/index.d.ts +8 -0
- package/dist/domain/core/emission/index.js +1 -0
- package/dist/domain/core/emission/reset-state-emission.d.ts +12 -0
- package/dist/domain/core/emission/reset-state-emission.js +1 -0
- package/dist/domain/core/emission/state-emission.d.ts +4 -0
- package/dist/domain/core/emission/state-emission.js +1 -0
- package/dist/domain/core/emission/state-update-emission.d.ts +14 -0
- package/dist/domain/core/emission/state-update-emission.js +1 -0
- package/dist/domain/core/emission/state-validation-result.d.ts +18 -0
- package/dist/domain/core/emission/state-validation-result.js +1 -0
- package/dist/domain/core/emission/transformation-log.d.ts +2 -0
- package/dist/domain/core/emission/transformation-log.js +1 -0
- package/dist/domain/core/emission/transformer-log-entry.d.ts +6 -0
- package/dist/domain/core/emission/transformer-log-entry.js +1 -0
- package/dist/domain/core/emission/transformer-log.d.ts +11 -0
- package/dist/domain/core/emission/transformer-log.js +1 -0
- package/dist/domain/core/emission/transformer-phase.d.ts +1 -0
- package/dist/domain/core/emission/transformer-phase.js +1 -0
- package/dist/domain/core/expression/aliased-expressions.d.ts +10 -0
- package/dist/domain/core/expression/aliased-expressions.js +1 -0
- package/dist/domain/core/expression/constant-expressions.d.ts +16 -0
- package/dist/domain/core/expression/constant-expressions.js +1 -0
- package/dist/domain/core/expression/custom-expression.d.ts +25 -0
- package/dist/domain/core/expression/custom-expression.js +1 -0
- package/dist/domain/core/expression/expression.d.ts +46 -0
- package/dist/domain/core/expression/expression.js +1 -0
- package/dist/domain/core/expression/index.d.ts +4 -0
- package/dist/domain/core/expression/index.js +1 -0
- package/dist/domain/core/index.d.ts +13 -17
- package/dist/domain/core/index.js +1 -1
- package/dist/domain/core/invariant/builtin-invariant.d.ts +5 -0
- package/dist/domain/core/invariant/custom-invariants.d.ts +13 -0
- package/dist/domain/core/invariant/custom-invariants.js +1 -0
- package/dist/domain/core/invariant/index.d.ts +5 -0
- package/dist/domain/core/invariant/index.js +1 -0
- package/dist/domain/core/invariant/invariants.d.ts +10 -0
- package/dist/domain/core/invariant/invariants.js +1 -0
- package/dist/domain/core/invariant/violation-component.js +1 -0
- package/dist/domain/core/invariant/violation.d.ts +134 -0
- package/dist/domain/core/invariant/violation.js +1 -0
- package/dist/domain/core/model/component.d.ts +46 -0
- package/dist/domain/core/model/index.d.ts +6 -0
- package/dist/domain/core/model/index.js +1 -0
- package/dist/domain/core/model/model.d.ts +127 -0
- package/dist/domain/core/model/reflection.d.ts +114 -0
- package/dist/domain/core/model/reflection.js +1 -0
- package/dist/domain/core/recipe/index.d.ts +1 -0
- package/dist/domain/core/recipe/index.js +1 -0
- package/dist/domain/core/recipe/recipes.d.ts +23 -0
- package/dist/domain/core/recipe/recipes.js +1 -0
- package/dist/domain/core/relation/all-of-type-relation.d.ts +19 -0
- package/dist/domain/core/relation/all-of-type-relation.js +1 -0
- package/dist/domain/core/relation/component-factories.d.ts +14 -0
- package/dist/domain/core/relation/component-factories.js +1 -0
- package/dist/domain/core/relation/composed-of.d.ts +12 -0
- package/dist/domain/core/relation/composed-of.js +1 -0
- package/dist/domain/core/relation/direct-relation.d.ts +17 -0
- package/dist/domain/core/relation/index.d.ts +8 -0
- package/dist/domain/core/relation/index.js +1 -0
- package/dist/domain/core/relation/indirect-relation.d.ts +25 -0
- package/dist/domain/core/relation/indirect-relation.js +1 -0
- package/dist/domain/core/relation/reference-component.d.ts +17 -0
- package/dist/domain/core/relation/reference-component.js +1 -0
- package/dist/domain/core/relation/reference-field.d.ts +7 -0
- package/dist/domain/core/relation/reference-field.js +1 -0
- package/dist/domain/core/relation/relation-factory.d.ts +22 -0
- package/dist/domain/core/relation/relation-factory.js +1 -0
- package/dist/domain/core/schema/enhanced-json-schema.js +1 -0
- package/dist/domain/core/schema/extended-schema-validator.js +1 -0
- package/dist/domain/core/schema/index.d.ts +3 -0
- package/dist/domain/core/schema/index.js +1 -0
- package/dist/domain/core/schema/schema-validator.js +1 -0
- package/dist/domain/core/state/id-sequence.d.ts +15 -0
- package/dist/domain/core/state/id-sequence.js +1 -0
- package/dist/domain/core/state/index.d.ts +3 -0
- package/dist/domain/core/state/index.js +1 -0
- package/dist/domain/core/state/migrations.d.ts +67 -0
- package/dist/domain/core/state/migrations.js +1 -0
- package/dist/domain/core/state/state.d.ts +9 -0
- package/dist/domain/domain-builder/domain-builder.d.ts +46 -0
- package/dist/domain/domain-builder/domain-builder.js +1 -0
- package/dist/domain/domain-builder/index.d.ts +1 -0
- package/dist/domain/domain-builder/index.js +1 -0
- package/dist/domain/domain-context/action-system/action-system.d.ts +32 -8
- package/dist/domain/domain-context/action-system/action-system.js +1 -1
- package/dist/domain/domain-context/action-system/index.d.ts +1 -0
- package/dist/domain/domain-context/action-system/index.js +1 -0
- package/dist/domain/domain-context/analytics-system/index.d.ts +2 -0
- package/dist/domain/domain-context/analytics-system/index.js +1 -0
- package/dist/domain/domain-context/create-transformer.d.ts +2 -2
- package/dist/domain/domain-context/dimension-system/dimension-state.js +1 -1
- package/dist/domain/domain-context/dimension-system/dimension-system.d.ts +3 -4
- package/dist/domain/domain-context/dimension-system/dimension-system.js +1 -1
- package/dist/domain/domain-context/dimension-system/index.d.ts +1 -0
- package/dist/domain/domain-context/dimension-system/index.js +1 -0
- package/dist/domain/domain-context/domain-context-systems.d.ts +9 -11
- package/dist/domain/domain-context/index.d.ts +8 -18
- package/dist/domain/domain-context/index.js +1 -1
- package/dist/domain/domain-context/navigation-system/index.d.ts +3 -0
- package/dist/domain/domain-context/navigation-system/index.js +1 -0
- package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +5 -8
- package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
- package/dist/domain/domain-context/navigation-system/navigation-updates.d.ts +1 -12
- package/dist/domain/domain-context/navigation-system/navigation-updates.js +1 -1
- package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +2 -2
- package/dist/domain/domain-context/navigation-system/selection-transformers.js +1 -1
- package/dist/domain/domain-context/recipe-system/index.d.ts +1 -0
- package/dist/domain/domain-context/recipe-system/index.js +1 -0
- package/dist/domain/domain-context/recipe-system/recipe-cooker-system.d.ts +2 -4
- package/dist/domain/domain-context/recipe-system/recipe-cooker-system.js +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +3 -3
- package/dist/domain/domain-context/relation-transformers/cascade-deletes.js +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +3 -3
- package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.js +1 -1
- package/dist/domain/domain-context/relation-transformers/create-entity-refs.d.ts +3 -3
- package/dist/domain/domain-context/relation-transformers/create-entity-refs.js +2 -2
- package/dist/domain/domain-context/relation-transformers/index.d.ts +4 -0
- package/dist/domain/domain-context/relation-transformers/index.js +1 -0
- package/dist/domain/domain-context/relation-transformers/replace-refs.d.ts +3 -3
- package/dist/domain/domain-context/relation-transformers/replace-refs.js +1 -1
- package/dist/domain/domain-context/store-system/apply-updates.d.ts +1 -3
- package/dist/domain/domain-context/store-system/apply-updates.js +1 -1
- package/dist/domain/domain-context/store-system/index.d.ts +4 -0
- package/dist/domain/domain-context/store-system/index.js +1 -0
- package/dist/domain/domain-context/store-system/next-domain-entity-id.d.ts +1 -13
- package/dist/domain/domain-context/store-system/next-domain-entity-id.js +1 -1
- package/dist/domain/domain-context/store-system/reconcile-projected-entities.d.ts +1 -2
- package/dist/domain/domain-context/store-system/reconcile-projected-entities.js +1 -1
- package/dist/domain/domain-context/store-system/store-system.d.ts +7 -39
- package/dist/domain/domain-context/store-system/store-system.js +2 -2
- package/dist/domain/domain-context/store-system/system-state.d.ts +2 -4
- package/dist/domain/domain-context/store-system/system-state.js +1 -1
- package/dist/domain/domain-context/transformers/actions-builder.d.ts +1 -2
- package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
- package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +6 -10
- package/dist/domain/domain-context/transformers/auto-snap-transformer.js +1 -1
- package/dist/domain/domain-context/transformers/chain-builder.d.ts +3 -3
- package/dist/domain/domain-context/transformers/context.d.ts +6 -9
- package/dist/domain/domain-context/transformers/context.js +1 -1
- package/dist/domain/domain-context/transformers/entity-builder.d.ts +1 -5
- package/dist/domain/domain-context/transformers/entity-builder.js +1 -1
- package/dist/domain/domain-context/transformers/index.d.ts +1 -1
- package/dist/domain/domain-context/transformers/index.js +1 -1
- package/dist/domain/domain-context/transformers/then-builder.d.ts +1 -2
- package/dist/domain/domain-context/transformers/then-builder.js +1 -1
- package/dist/domain/domain-context/transformers/when-builder.d.ts +5 -10
- package/dist/domain/domain-context/transformers/when-builder.js +1 -1
- package/dist/domain/domain-context/undo-system.d.ts +29 -3
- package/dist/domain/domain-context/undo-system.js +1 -1
- package/dist/domain/domain-runtime/access/selectors.d.ts +9 -0
- package/dist/domain/domain-runtime/access/selectors.js +1 -1
- package/dist/domain/domain-runtime/access/types.d.ts +2 -0
- package/dist/domain/domain-runtime/access/types.js +1 -1
- package/dist/domain/domain-runtime/action-factory.d.ts +11 -0
- package/dist/domain/domain-runtime/application.d.ts +39 -0
- package/dist/domain/domain-runtime/application.js +1 -0
- package/dist/domain/domain-runtime/domain-context/action-context.d.ts +11 -0
- package/dist/domain/domain-runtime/domain-context/action-context.js +1 -0
- package/dist/domain/domain-runtime/domain-context/component-reader.d.ts +1 -4
- package/dist/domain/domain-runtime/domain-context/component-reader.js +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
- package/dist/domain/domain-runtime/domain-context/expression-context.d.ts +8 -0
- package/dist/domain/domain-runtime/domain-context/expression-context.js +1 -0
- package/dist/domain/domain-runtime/domain-context/index.d.ts +3 -0
- package/dist/domain/domain-runtime/domain-context/runtime-expression-context.d.ts +18 -0
- package/dist/domain/domain-runtime/domain-context/runtime-expression-context.js +1 -0
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +22 -25
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-context/types.d.ts +4 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +120 -52
- package/dist/domain/domain-runtime/domain-runtime.js +1 -1
- package/dist/domain/domain-runtime/environment/actions.d.ts +1 -0
- package/dist/domain/domain-runtime/environment/actions.js +1 -1
- package/dist/domain/domain-runtime/environment/initialize.d.ts +1 -1
- package/dist/domain/domain-runtime/environment/initialize.js +1 -1
- package/dist/domain/domain-runtime/environment/selectors.d.ts +2 -0
- package/dist/domain/domain-runtime/environment/selectors.js +1 -1
- package/dist/domain/domain-runtime/environment/types.d.ts +7 -1
- package/dist/domain/domain-runtime/index.d.ts +2 -0
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/create-violation-expressions.d.ts +24 -0
- package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -0
- package/dist/domain/domain-runtime/spec/index.d.ts +5 -0
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.d.ts +11 -0
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/memoize-expression.d.ts +16 -0
- package/dist/domain/domain-runtime/spec/prepare-action-implementations.d.ts +15 -0
- package/dist/domain/domain-runtime/spec/prepare-action-implementations.js +5 -0
- package/dist/domain/domain-runtime/spec/prepare-domain-expressions.d.ts +16 -0
- package/dist/domain/domain-runtime/spec/resolve-imported-transformers.d.ts +22 -0
- package/dist/domain/domain-runtime/spec/resolve-imported-transformers.js +1 -0
- package/dist/domain/domain-runtime/spec/selectors.d.ts +6 -5
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +8 -6
- package/dist/domain/domain-runtime/web-component/actions.d.ts +3 -0
- package/dist/domain/domain-runtime/web-component/actions.js +1 -1
- package/dist/domain/domain-runtime/web-component/initialize.d.ts +1 -0
- package/dist/domain/domain-runtime/web-component/initialize.js +1 -1
- package/dist/domain/domain-runtime/web-component/selectors.d.ts +2 -0
- package/dist/domain/domain-runtime/web-component/selectors.js +1 -1
- package/dist/domain/domain-runtime/web-component/types.d.ts +6 -3
- package/dist/domain/extensions/angle-indicator.d.ts +21 -0
- package/dist/domain/extensions/angle-indicator.js +1 -0
- package/dist/domain/extensions/attribute-switch.d.ts +8 -0
- package/dist/domain/extensions/attribute-switch.js +1 -0
- package/dist/domain/extensions/autorotate-camera-component.d.ts +19 -0
- package/dist/domain/extensions/autorotate-camera-component.js +1 -0
- package/dist/domain/extensions/basic-sidebar-footer.d.ts +8 -0
- package/dist/domain/extensions/basic-sidebar-footer.js +1 -0
- package/dist/domain/extensions/camera-based-hidden-entity-object.js +1 -0
- package/dist/domain/extensions/camera-based-hidden-entity.js +1 -0
- package/dist/domain/extensions/canvas-config.d.ts +87 -0
- package/dist/domain/extensions/canvas-config.js +1 -0
- package/dist/domain/extensions/canvas-custom-environment.js +1 -0
- package/dist/domain/extensions/canvas-padding.d.ts +25 -0
- package/dist/domain/extensions/canvas-padding.js +1 -0
- package/dist/domain/extensions/canvas-preset-environment.d.ts +37 -0
- package/dist/domain/extensions/canvas-preset-environment.js +1 -0
- package/dist/domain/extensions/child-entity-recipe-hierarchy.d.ts +21 -0
- package/dist/domain/extensions/child-entity-recipe-hierarchy.js +1 -0
- package/dist/domain/extensions/color-value.js +1 -0
- package/dist/domain/extensions/common/angle-indicator-schema.d.ts +292 -0
- package/dist/domain/extensions/common/angle-indicator-schema.js +1 -0
- package/dist/domain/extensions/common/dimension-indicator-schema.d.ts +607 -0
- package/dist/domain/extensions/common/dimension-indicator-schema.js +1 -0
- package/dist/domain/extensions/common/index.d.ts +4 -0
- package/dist/domain/extensions/common/index.js +1 -0
- package/dist/domain/extensions/custom-header.d.ts +11 -0
- package/dist/domain/extensions/custom-header.js +1 -0
- package/dist/domain/extensions/custom-price-footer.js +1 -0
- package/dist/domain/extensions/custom-sidebar-footer.d.ts +11 -0
- package/dist/domain/extensions/custom-sidebar-footer.js +1 -0
- package/dist/domain/extensions/dimension-indicator.d.ts +31 -0
- package/dist/domain/extensions/dimension-indicator.js +1 -0
- package/dist/domain/extensions/editable-angle-indicator.d.ts +39 -0
- package/dist/domain/extensions/editable-angle-indicator.js +1 -0
- package/dist/domain/extensions/editable-distance-dimension-indicator.d.ts +43 -0
- package/dist/domain/extensions/editable-distance-dimension-indicator.js +1 -0
- package/dist/domain/extensions/editable-offset-indicator.d.ts +42 -0
- package/dist/domain/extensions/editable-offset-indicator.js +1 -0
- package/dist/domain/extensions/editable-size-indicator.d.ts +39 -0
- package/dist/domain/extensions/editable-size-indicator.js +1 -0
- package/dist/domain/extensions/entity-header.d.ts +22 -0
- package/dist/domain/extensions/entity-header.js +1 -0
- package/dist/domain/extensions/exit-tool-mode-fab.d.ts +25 -0
- package/dist/domain/extensions/exit-tool-mode-fab.js +1 -0
- package/dist/domain/extensions/export-images/agent-screenshot.d.ts +30 -0
- package/dist/domain/extensions/export-images/agent-screenshot.js +1 -0
- package/dist/domain/extensions/export-images/client-side-image.d.ts +14 -0
- package/dist/domain/extensions/export-images/client-side-image.js +1 -0
- package/dist/domain/extensions/export-images/index.d.ts +3 -0
- package/dist/domain/extensions/export-images/index.js +1 -0
- package/dist/domain/extensions/export-images/save-template-thumbnail.d.ts +14 -0
- package/dist/domain/extensions/export-images/save-template-thumbnail.js +1 -0
- package/dist/domain/extensions/finalize-action.d.ts +20 -0
- package/dist/domain/extensions/finalize-action.js +1 -0
- package/dist/domain/extensions/finalize-component.js +1 -0
- package/dist/domain/extensions/fit-selection-orthographic-camera-component.js +1 -0
- package/dist/domain/extensions/fit-selection-perspective-camera-component.js +1 -0
- package/dist/domain/extensions/fixed-header.d.ts +10 -0
- package/dist/domain/extensions/fixed-header.js +1 -0
- package/dist/domain/extensions/floating-header.d.ts +10 -0
- package/dist/domain/extensions/floating-header.js +1 -0
- package/dist/domain/extensions/hidden-header.d.ts +8 -0
- package/dist/domain/extensions/hidden-header.js +1 -0
- package/dist/domain/extensions/hidden-sidebar-footer.d.ts +21 -0
- package/dist/domain/extensions/hidden-sidebar-footer.js +1 -0
- package/dist/domain/extensions/horizontal-tabs.d.ts +28 -0
- package/dist/domain/extensions/horizontal-tabs.js +1 -0
- package/dist/domain/extensions/index.d.ts +68 -0
- package/dist/domain/extensions/index.js +1 -0
- package/dist/domain/extensions/list-selector-dimension-indicator.d.ts +31 -0
- package/dist/domain/extensions/list-selector-dimension-indicator.js +1 -0
- package/dist/domain/extensions/multilingual-text-value.js +1 -0
- package/dist/domain/extensions/navigation-steps.d.ts +19 -0
- package/dist/domain/extensions/navigation-steps.js +1 -0
- package/dist/domain/extensions/offset-anchors.d.ts +20 -0
- package/dist/domain/extensions/offset-anchors.js +1 -0
- package/dist/domain/extensions/offset-indicator.d.ts +83 -0
- package/dist/domain/extensions/offset-indicator.js +1 -0
- package/dist/domain/extensions/offset.d.ts +31 -0
- package/dist/domain/extensions/offset.js +1 -0
- package/dist/domain/extensions/other-action.d.ts +14 -0
- package/dist/domain/extensions/other-action.js +1 -0
- package/dist/domain/extensions/property-page.d.ts +16 -0
- package/dist/domain/extensions/property-page.js +1 -0
- package/dist/domain/extensions/read-sidebar-footer.d.ts +8 -0
- package/dist/domain/extensions/read-sidebar-footer.js +1 -0
- package/dist/domain/extensions/replace-entity-recipe-hierarchy.d.ts +21 -0
- package/dist/domain/extensions/replace-entity-recipe-hierarchy.js +1 -0
- package/dist/domain/extensions/rotatable.js +1 -0
- package/dist/domain/extensions/rotation-handle.d.ts +53 -0
- package/dist/domain/extensions/rotation-handle.js +1 -0
- package/dist/domain/extensions/scene-entity-add-fab.d.ts +32 -0
- package/dist/domain/extensions/scene-entity-add-fab.js +1 -0
- package/dist/domain/extensions/scene-entity-animation.js +1 -0
- package/dist/domain/extensions/scene-entity-control.js +1 -0
- package/dist/domain/extensions/scene-entity-delete-fab.d.ts +19 -0
- package/dist/domain/extensions/scene-entity-delete-fab.js +1 -0
- package/dist/domain/extensions/scene-entity-floor-object.js +1 -0
- package/dist/domain/extensions/scene-entity-html-hotspot.d.ts +27 -0
- package/dist/domain/extensions/scene-entity-html-hotspot.js +1 -0
- package/dist/domain/extensions/scene-entity-navigation-hotspot.d.ts +20 -0
- package/dist/domain/extensions/scene-entity-navigation-hotspot.js +1 -0
- package/dist/domain/extensions/scene-entity-object-html-hotspot.d.ts +31 -0
- package/dist/domain/extensions/scene-entity-object-html-hotspot.js +1 -0
- package/dist/domain/extensions/scene-entity-select-hotspot.d.ts +5 -0
- package/dist/domain/extensions/scene-entity-select-hotspot.js +1 -0
- package/dist/domain/extensions/scene-entity-wall-object.js +1 -0
- package/dist/domain/extensions/selectable-component.js +1 -0
- package/dist/domain/extensions/sidebar-tabs.d.ts +29 -0
- package/dist/domain/extensions/sidebar-tabs.js +1 -0
- package/dist/domain/extensions/simple-summary.js +1 -0
- package/dist/domain/extensions/size.d.ts +21 -0
- package/dist/domain/extensions/size.js +1 -0
- package/dist/domain/extensions/sketching-draw.d.ts +17 -0
- package/dist/domain/extensions/sketching-draw.js +1 -0
- package/dist/domain/extensions/sketching-edit.d.ts +28 -0
- package/dist/domain/extensions/sketching-edit.js +1 -0
- package/dist/domain/extensions/summary-component.js +1 -0
- package/dist/domain/extensions/text-value.js +1 -0
- package/dist/domain/extensions/tool-controls.js +1 -0
- package/dist/domain/extensions/tool-menu-fab.d.ts +40 -0
- package/dist/domain/extensions/tool-menu-fab.js +1 -0
- package/dist/domain/extensions/toolbar.d.ts +13 -0
- package/dist/domain/extensions/toolbar.js +1 -0
- package/dist/domain/extensions/universal-sidebar-footer.d.ts +12 -0
- package/dist/domain/extensions/universal-sidebar-footer.js +1 -0
- package/dist/domain/extensions/view-controls.js +1 -0
- package/dist/domain/index.d.ts +16 -33
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-context.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime-services.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +44 -21
- package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
- package/dist/domain/mocks/create-mock-domain.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain.js +1 -1
- package/dist/domain/mocks/create-mock-state.d.ts +2 -2
- package/dist/domain/mocks/create-test-application-config.d.ts +59 -0
- package/dist/domain/mocks/create-test-application-config.js +1 -0
- package/dist/domain/mocks/index.d.ts +1 -0
- package/dist/domain/mocks/index.js +1 -1
- package/dist/domain/projections/blender-projections/blender-projections.d.ts +2 -3
- package/dist/domain/projections/blender-projections/blender-projections.js +1 -1
- package/dist/domain/projections/blender-projections/camera.d.ts +2 -2
- package/dist/domain/projections/collision-projections.d.ts +1 -1
- package/dist/domain/projections/composition-projections.d.ts +1 -1
- package/dist/domain/projections/composition-projections.js +1 -1
- package/dist/domain/projections/constraint-projections.d.ts +1 -1
- package/dist/domain/projections/index.d.ts +1 -1
- package/dist/domain/projections/position-projections.d.ts +1 -1
- package/dist/domain/projections/projected-entities-projections.d.ts +2 -3
- package/dist/domain/projections/snap-matching.d.ts +1 -2
- package/dist/domain/projections/snap-utils.d.ts +1 -2
- package/dist/domain/projections/snapping-projections.d.ts +1 -1
- package/dist/domain/projections/validation-projections.d.ts +3 -20
- package/dist/domain/projections/validation-projections.js +1 -1
- package/dist/domain/sketching/sketching-projections.d.ts +1 -1
- package/dist/domain/spec/application/admin-pages-section.d.ts +29 -0
- package/dist/domain/spec/application/admin-pages-section.js +1 -0
- package/dist/domain/spec/application/admin-pages.d.ts +26 -0
- package/dist/domain/spec/application/admin-pages.js +1 -0
- package/dist/domain/spec/application/admin-states.d.ts +5 -0
- package/dist/domain/spec/application/admin-states.js +1 -0
- package/dist/domain/spec/application/configurator-states.d.ts +8 -0
- package/dist/domain/spec/application/configurator-states.js +1 -0
- package/dist/domain/spec/application/index.d.ts +5 -0
- package/dist/domain/spec/application/index.js +1 -0
- package/dist/domain/spec/components/bindings/index.d.ts +2 -0
- package/dist/domain/spec/components/bindings/index.js +1 -0
- package/dist/domain/spec/components/bindings/read-binding.d.ts +13 -0
- package/dist/domain/spec/components/bindings/read-binding.js +1 -0
- package/dist/domain/spec/components/bindings/write-binding.d.ts +32 -0
- package/dist/domain/spec/components/bindings/write-binding.js +1 -0
- package/dist/domain/spec/components/component-entry.d.ts +90 -0
- package/dist/domain/spec/components/component-entry.js +1 -0
- package/dist/domain/spec/components/component-filter.d.ts +54 -0
- package/dist/domain/spec/components/component-filter.js +1 -0
- package/dist/domain/spec/components/component-filters.d.ts +10 -0
- package/dist/domain/spec/components/component-filters.js +1 -0
- package/dist/domain/spec/components/components.d.ts +4 -0
- package/dist/domain/spec/components/components.js +1 -0
- package/dist/domain/spec/components/index.d.ts +6 -0
- package/dist/domain/spec/components/index.js +1 -0
- package/dist/domain/spec/components/sdk-code-ref.d.ts +9 -0
- package/dist/domain/spec/enhanced-json/enhanced-json-value.d.ts +30 -0
- package/dist/domain/spec/enhanced-json/enhanced-json-value.js +1 -0
- package/dist/domain/spec/enhanced-json/index.d.ts +1 -0
- package/dist/domain/spec/enhanced-json/index.js +1 -0
- package/dist/domain/spec/errors/implementation-error-collector.d.ts +21 -0
- package/dist/domain/spec/errors/implementation-error-collector.js +1 -0
- package/dist/domain/spec/errors/implementation-error.d.ts +46 -0
- package/dist/domain/spec/errors/implementation-error.js +1 -0
- package/dist/domain/spec/errors/implementation-errors.d.ts +13 -0
- package/dist/domain/spec/errors/implementation-errors.js +1 -0
- package/dist/domain/spec/errors/index.d.ts +4 -0
- package/dist/domain/spec/errors/index.js +1 -0
- package/dist/domain/spec/errors/to-implementation-errors.d.ts +10 -0
- package/dist/domain/spec/errors/to-implementation-errors.js +1 -0
- package/dist/domain/spec/expressions/expression.d.ts +49 -0
- package/dist/domain/spec/expressions/expression.js +1 -0
- package/dist/domain/spec/expressions/expressions.d.ts +27 -0
- package/dist/domain/spec/expressions/expressions.js +1 -0
- package/dist/domain/spec/expressions/index.d.ts +5 -0
- package/dist/domain/spec/expressions/index.js +1 -0
- package/dist/domain/spec/expressions/memo-eval-plan.d.ts +70 -0
- package/dist/domain/spec/expressions/memo-eval-plan.js +1 -0
- package/dist/domain/spec/expressions/relation-expression-params.d.ts +11 -0
- package/dist/domain/spec/expressions/relation-expression-params.js +1 -0
- package/dist/domain/spec/expressions/sdk-expression-implementation.d.ts +24 -0
- package/dist/domain/spec/index.d.ts +4 -0
- package/dist/domain/spec/index.js +1 -0
- package/dist/domain/spec/invariants/index.d.ts +2 -0
- package/dist/domain/spec/invariants/index.js +1 -0
- package/dist/domain/spec/invariants/invariant.d.ts +24 -0
- package/dist/domain/spec/invariants/invariant.js +1 -0
- package/dist/domain/spec/invariants/invariants.d.ts +14 -0
- package/dist/domain/spec/invariants/invariants.js +1 -0
- package/dist/domain/spec/json-schema.d.ts +52 -0
- package/dist/domain/spec/json-schema.js +1 -0
- package/dist/domain/spec/markers/index.d.ts +3 -0
- package/dist/domain/spec/markers/index.js +1 -0
- package/dist/domain/spec/markers/msg-marker.d.ts +28 -0
- package/dist/domain/spec/markers/msg-marker.js +1 -0
- package/dist/domain/spec/model/aliases.d.ts +9 -0
- package/dist/domain/spec/model/aliases.js +1 -0
- package/dist/domain/spec/model/common-types.d.ts +15 -0
- package/dist/domain/spec/model/common-types.js +1 -0
- package/dist/domain/spec/model/defaults.d.ts +33 -0
- package/dist/domain/spec/model/defaults.js +1 -0
- package/dist/domain/spec/model/entity-types.d.ts +8 -0
- package/dist/domain/spec/model/entity-types.js +1 -0
- package/dist/domain/spec/model/index.d.ts +7 -0
- package/dist/domain/spec/model/index.js +1 -0
- package/dist/domain/spec/model/model-version-key.d.ts +3 -0
- package/dist/domain/spec/model/model-version-key.js +1 -0
- package/dist/domain/spec/model/names/action-name.d.ts +7 -0
- package/dist/domain/spec/model/names/action-name.js +1 -0
- package/dist/domain/spec/model/names/alias-name.d.ts +7 -0
- package/dist/domain/spec/model/names/alias-name.js +1 -0
- package/dist/domain/spec/model/names/entity-or-alias-name.d.ts +8 -0
- package/dist/domain/spec/model/names/entity-or-alias-name.js +1 -0
- package/dist/domain/spec/model/names/entity-type-name.d.ts +8 -0
- package/dist/domain/spec/model/names/entity-type-name.js +1 -0
- package/dist/domain/spec/model/names/expression-name.d.ts +6 -0
- package/dist/domain/spec/model/names/expression-name.js +1 -0
- package/dist/domain/spec/model/names/index.d.ts +9 -0
- package/dist/domain/spec/model/names/index.js +1 -0
- package/dist/domain/spec/model/names/instance-name.d.ts +7 -0
- package/dist/domain/spec/model/names/instance-name.js +1 -0
- package/dist/domain/spec/model/names/invariant-name.d.ts +3 -0
- package/dist/domain/spec/model/names/invariant-name.js +1 -0
- package/dist/domain/spec/model/names/shape-property-name.d.ts +11 -0
- package/dist/domain/spec/model/names/shape-property-name.js +1 -0
- package/dist/domain/spec/model/names/violation-type-name.d.ts +3 -0
- package/dist/domain/spec/model/names/violation-type-name.js +1 -0
- package/dist/domain/spec/model/presets.d.ts +30 -0
- package/dist/domain/spec/model/presets.js +1 -0
- package/dist/domain/spec/modules/element-registration.d.ts +125 -0
- package/dist/domain/spec/modules/element-registration.js +1 -0
- package/dist/domain/spec/modules/find-assistant-form-element-errors.d.ts +12 -0
- package/dist/domain/spec/modules/find-assistant-form-element-errors.js +1 -0
- package/dist/domain/spec/modules/handler-registration.d.ts +34 -0
- package/dist/domain/spec/modules/handler-registration.js +1 -0
- package/dist/domain/spec/modules/index.d.ts +9 -0
- package/dist/domain/spec/modules/index.js +1 -0
- package/dist/domain/spec/modules/merge-expression-modules.d.ts +23 -0
- package/dist/domain/spec/modules/merge-expression-modules.js +1 -0
- package/dist/domain/spec/modules/project-modules.d.ts +32 -0
- package/dist/domain/spec/modules/project-modules.js +1 -0
- package/dist/domain/spec/modules/resolve-action-modules.d.ts +4 -0
- package/dist/domain/spec/modules/resolve-action-modules.js +1 -0
- package/dist/domain/spec/modules/resolve-component-optic-modules.d.ts +4 -0
- package/dist/domain/spec/modules/resolve-component-optic-modules.js +1 -0
- package/dist/domain/spec/modules/resolve-expression-modules.d.ts +14 -0
- package/dist/domain/spec/modules/resolve-expression-modules.js +1 -0
- package/dist/domain/spec/modules/resolve-invariant-modules.d.ts +6 -0
- package/dist/domain/spec/modules/resolve-invariant-modules.js +1 -0
- package/dist/domain/spec/phx/index.d.ts +1 -0
- package/dist/domain/spec/phx/index.js +1 -0
- package/dist/domain/spec/phx/phx-application-types.d.ts +25 -0
- package/dist/domain/spec/phx/phx-application-types.js +1 -0
- package/dist/domain/spec/phx/phx-domain.d.ts +36 -0
- package/dist/domain/spec/phx/phx-domain.js +1 -0
- package/dist/domain/spec/phx/phx-model.d.ts +24 -0
- package/dist/domain/spec/phx/phx-model.js +1 -0
- package/dist/domain/spec/phx/phx.d.ts +21 -0
- package/dist/domain/spec/phx/phx.js +1 -0
- package/dist/domain/spec/runtime/admin-runtime/admin-runtime.d.ts +32 -0
- package/dist/domain/spec/runtime/admin-runtime/admin-runtime.js +1 -0
- package/dist/domain/spec/runtime/admin-runtime/admin-spec-runtime.d.ts +16 -0
- package/dist/domain/spec/runtime/admin-runtime/admin-spec-runtime.js +1 -0
- package/dist/domain/spec/runtime/admin-runtime/index.d.ts +2 -0
- package/dist/domain/spec/runtime/admin-runtime/index.js +1 -0
- package/dist/domain/spec/runtime/admin-runtime/states-runtime.d.ts +8 -0
- package/dist/domain/spec/runtime/application-runtime.d.ts +62 -0
- package/dist/domain/spec/runtime/application-runtime.js +1 -0
- package/dist/domain/spec/runtime/application-spec-slice.d.ts +73 -0
- package/dist/domain/spec/runtime/application-spec-slice.js +1 -0
- package/dist/domain/spec/runtime/configurator-runtime/configurator-runtime.d.ts +37 -0
- package/dist/domain/spec/runtime/configurator-runtime/configurator-runtime.js +1 -0
- package/dist/domain/spec/runtime/configurator-runtime/configurator-spec-runtime.d.ts +16 -0
- package/dist/domain/spec/runtime/configurator-runtime/configurator-spec-runtime.js +1 -0
- package/dist/domain/spec/runtime/configurator-runtime/index.d.ts +2 -0
- package/dist/domain/spec/runtime/configurator-runtime/index.js +1 -0
- package/dist/domain/spec/runtime/configurator-runtime/states-runtime.d.ts +11 -0
- package/dist/domain/spec/runtime/create-application.d.ts +58 -0
- package/dist/domain/spec/runtime/create-application.js +1 -0
- package/dist/domain/spec/runtime/expressions/expression-runtime.d.ts +57 -0
- package/dist/domain/spec/runtime/expressions/expression-runtime.js +1 -0
- package/dist/domain/spec/runtime/expressions/generate-memo-eval-plan-runtime.d.ts +33 -0
- package/dist/domain/spec/runtime/expressions/generate-memo-eval-plan-runtime.js +1 -0
- package/dist/domain/spec/runtime/expressions/index.d.ts +3 -0
- package/dist/domain/spec/runtime/expressions/index.js +1 -0
- package/dist/domain/spec/runtime/expressions/reflection-constants-runtime.d.ts +11 -0
- package/dist/domain/spec/runtime/expressions/reflection-constants-runtime.js +1 -0
- package/dist/domain/spec/runtime/factory-data/factory-data-runtime.d.ts +44 -0
- package/dist/domain/spec/runtime/factory-data/factory-data-runtime.js +1 -0
- package/dist/domain/spec/runtime/factory-data/index.d.ts +3 -0
- package/dist/domain/spec/runtime/factory-data/index.js +1 -0
- package/dist/domain/spec/runtime/factory-data/recipe-defaults.d.ts +13 -0
- package/dist/domain/spec/runtime/factory-data/recipe-defaults.js +1 -0
- package/dist/domain/spec/runtime/factory-data/static-violations.d.ts +16 -0
- package/dist/domain/spec/runtime/factory-data/static-violations.js +1 -0
- package/dist/domain/spec/runtime/generate-runtime-instance.d.ts +2 -0
- package/dist/domain/spec/runtime/generate-runtime-instance.js +1 -0
- package/dist/domain/spec/runtime/index.d.ts +13 -0
- package/dist/domain/spec/runtime/index.js +1 -0
- package/dist/domain/spec/runtime/migrations/index.d.ts +1 -0
- package/dist/domain/spec/runtime/migrations/index.js +1 -0
- package/dist/domain/spec/runtime/migrations/migration-runtime.d.ts +53 -0
- package/dist/domain/spec/runtime/migrations/migration-runtime.js +1 -0
- package/dist/domain/spec/runtime/model/admin-model-runtime.d.ts +31 -0
- package/dist/domain/spec/runtime/model/admin-model-runtime.js +1 -0
- package/dist/domain/spec/runtime/model/configurator-model-runtime.d.ts +33 -0
- package/dist/domain/spec/runtime/model/configurator-model-runtime.js +1 -0
- package/dist/domain/spec/runtime/model/index.d.ts +2 -0
- package/dist/domain/spec/runtime/model/index.js +1 -0
- package/dist/domain/spec/runtime/optics/build-sdk-optic.d.ts +7 -0
- package/dist/domain/spec/runtime/optics/build-sdk-optic.js +1 -0
- package/dist/domain/spec/runtime/optics/build-user-bound-optic.d.ts +7 -0
- package/dist/domain/spec/runtime/optics/build-user-bound-optic.js +1 -0
- package/dist/domain/spec/runtime/optics/built-component-optic.d.ts +11 -0
- package/dist/domain/spec/runtime/optics/built-component-optic.js +1 -0
- package/dist/domain/spec/runtime/optics/component-optic.d.ts +26 -0
- package/dist/domain/spec/runtime/optics/component-optic.js +1 -0
- package/dist/domain/spec/runtime/optics/index.d.ts +2 -0
- package/dist/domain/spec/runtime/optics/index.js +1 -0
- package/dist/domain/spec/runtime/runtime-reference-store.d.ts +46 -0
- package/dist/domain/spec/runtime/runtime-reference-store.js +1 -0
- package/dist/domain/spec/runtime/sections/actions-runtime.d.ts +14 -0
- package/dist/domain/spec/runtime/sections/assistant-runtime.d.ts +10 -0
- package/dist/domain/spec/runtime/sections/assistant-runtime.js +1 -0
- package/dist/domain/spec/runtime/sections/data-runtime.d.ts +13 -0
- package/dist/domain/spec/runtime/sections/index.d.ts +6 -0
- package/dist/domain/spec/runtime/sections/index.js +1 -0
- package/dist/domain/spec/runtime/sections/preset-runtime.d.ts +20 -0
- package/dist/domain/spec/runtime/sections/theme-runtime.d.ts +10 -0
- package/dist/domain/spec/runtime/sections/transformers-runtime.d.ts +19 -0
- package/dist/domain/spec/runtime/spec-code/index.d.ts +2 -0
- package/dist/domain/spec/runtime/spec-code/index.js +1 -0
- package/dist/domain/spec/runtime/spec-code/resolve-spec-code.d.ts +18 -0
- package/dist/domain/spec/runtime/spec-code/resolve-spec-code.js +1 -0
- package/dist/domain/spec/runtime/spec-code/spec-code-module.d.ts +17 -0
- package/dist/domain/spec/runtime/spec-code/spec-code-module.js +1 -0
- package/dist/domain/spec/runtime/spec-runtime.d.ts +21 -0
- package/dist/domain/spec/runtime/spec-runtime.js +1 -0
- package/dist/domain/spec/runtime-spec/decode-runtime-spec.d.ts +9 -0
- package/dist/domain/spec/runtime-spec/decode-runtime-spec.js +1 -0
- package/dist/domain/spec/runtime-spec/encode-runtime-spec.d.ts +8 -0
- package/dist/domain/spec/runtime-spec/encode-runtime-spec.js +1 -0
- package/dist/domain/spec/runtime-spec/encoded-runtime-spec.d.ts +28 -0
- package/dist/domain/spec/runtime-spec/encoded-runtime-spec.js +1 -0
- package/dist/domain/spec/runtime-spec/index.d.ts +4 -0
- package/dist/domain/spec/runtime-spec/index.js +1 -0
- package/dist/domain/spec/runtime-spec/runtime-spec.d.ts +174 -0
- package/dist/domain/spec/runtime-spec/runtime-spec.js +1 -0
- package/dist/domain/spec/runtime-spec/spec-code-id.d.ts +40 -0
- package/dist/domain/spec/runtime-spec/spec-code-id.js +1 -0
- package/dist/domain/spec/sections/actions.d.ts +23 -0
- package/dist/domain/spec/sections/actions.js +1 -0
- package/dist/domain/spec/sections/app-metadata.d.ts +18 -0
- package/dist/domain/spec/sections/app-metadata.js +1 -0
- package/dist/domain/spec/sections/application-version.d.ts +7 -0
- package/dist/domain/spec/sections/application-version.js +1 -0
- package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +96 -0
- package/dist/domain/spec/sections/assistant/assistant-manifest.js +1 -0
- package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.d.ts +135 -0
- package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.js +1 -0
- package/dist/domain/spec/sections/assistant/form/assistant-form-element-name.d.ts +11 -0
- package/dist/domain/spec/sections/assistant/form/assistant-form-element-name.js +8 -0
- package/dist/domain/spec/sections/assistant/form/assistant-form-elements.d.ts +174 -0
- package/dist/domain/spec/sections/assistant/form/assistant-form-elements.js +1 -0
- package/dist/domain/spec/sections/assistant/form/assistant-resource-path.d.ts +10 -0
- package/dist/domain/spec/sections/assistant/form/assistant-resource-path.js +1 -0
- package/dist/domain/spec/sections/assistant/form/index.d.ts +4 -0
- package/dist/domain/spec/sections/assistant/form/index.js +1 -0
- package/dist/domain/spec/sections/assistant/index.d.ts +4 -0
- package/dist/domain/spec/sections/assistant/index.js +1 -0
- package/dist/domain/spec/sections/data-spec/chunks.d.ts +23 -0
- package/dist/domain/spec/sections/data-spec/chunks.js +1 -0
- package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.d.ts +16 -0
- package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.js +1 -0
- package/dist/domain/spec/sections/data-spec/data-entry-key.d.ts +9 -0
- package/dist/domain/spec/sections/data-spec/data-entry-key.js +1 -0
- package/dist/domain/spec/sections/data-spec/index.d.ts +5 -0
- package/dist/domain/spec/sections/data-spec/index.js +1 -0
- package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.d.ts +10 -0
- package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.js +1 -0
- package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.d.ts +14 -0
- package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.js +1 -0
- package/dist/domain/spec/sections/index.d.ts +10 -0
- package/dist/domain/spec/sections/index.js +1 -0
- package/dist/domain/spec/sections/infra/acl.d.ts +12 -0
- package/dist/domain/spec/sections/infra/acl.js +1 -0
- package/dist/domain/spec/sections/infra/index.d.ts +3 -0
- package/dist/domain/spec/sections/infra/index.js +1 -0
- package/dist/domain/spec/sections/infra/resource-entry.d.ts +46 -0
- package/dist/domain/spec/sections/infra/resource-entry.js +1 -0
- package/dist/domain/spec/sections/infra/resources-config.d.ts +10 -0
- package/dist/domain/spec/sections/infra/resources-config.js +1 -0
- package/dist/domain/spec/sections/state-value.d.ts +7 -0
- package/dist/domain/spec/sections/state-value.js +1 -0
- package/dist/domain/spec/sections/theme.d.ts +10 -0
- package/dist/domain/spec/sections/theme.js +1 -0
- package/dist/domain/spec/sections/transformers.d.ts +15 -0
- package/dist/domain/spec/sections/transformers.js +1 -0
- package/dist/domain/spec/sections/ui.d.ts +12 -0
- package/dist/domain/spec/sections/ui.js +1 -0
- package/dist/domain/system-components/admin-sidebar.d.ts +1 -1
- package/dist/domain/system-components/admin-sidebar.js +1 -1
- package/dist/domain/system-components/angle-dimension.js +1 -1
- package/dist/domain/system-components/application-config.d.ts +3 -3
- package/dist/domain/system-components/application-config.js +1 -1
- package/dist/domain/system-components/attribute-selection.js +1 -1
- package/dist/domain/system-components/bounding-box-component.d.ts +1 -1
- package/dist/domain/system-components/bounding-box-component.js +1 -1
- package/dist/domain/system-components/bounding-sphere-component.d.ts +1 -1
- package/dist/domain/system-components/bounding-sphere-component.js +1 -1
- package/dist/domain/system-components/child-entity-recipes.d.ts +1 -1
- package/dist/domain/system-components/child-entity-recipes.js +1 -1
- package/dist/domain/system-components/child-entity-selection.d.ts +1 -2
- package/dist/domain/system-components/child-entity-selection.js +1 -1
- package/dist/domain/system-components/collision-box-geometry.d.ts +5 -3
- package/dist/domain/system-components/collision-box-geometry.js +1 -1
- package/dist/domain/system-components/collision-geometries.d.ts +1 -1
- package/dist/domain/system-components/collision-geometry.d.ts +5 -3
- package/dist/domain/system-components/collision-geometry.js +1 -1
- package/dist/domain/system-components/collision-point-geometry.d.ts +5 -3
- package/dist/domain/system-components/collision-point-geometry.js +1 -1
- package/dist/domain/system-components/common/index.d.ts +0 -4
- package/dist/domain/system-components/common/index.js +1 -1
- package/dist/domain/system-components/common/material-override-schema.d.ts +2 -2
- package/dist/domain/system-components/common/recipes.d.ts +21 -4
- package/dist/domain/system-components/common/recipes.js +1 -1
- package/dist/domain/system-components/common/scene-entity-control-schema.d.ts +3 -0
- package/dist/domain/system-components/common/scene-entity-control-schema.js +1 -1
- package/dist/domain/system-components/constraint.d.ts +11 -24
- package/dist/domain/system-components/constraint.js +1 -1
- package/dist/domain/system-components/create-blueprint.d.ts +1 -1
- package/dist/domain/system-components/custom-scene-entity.d.ts +1 -1
- package/dist/domain/system-components/custom-scene-entity.js +1 -1
- package/dist/domain/system-components/detail.js +1 -1
- package/dist/domain/system-components/distance-dimension-select.d.ts +1 -1
- package/dist/domain/system-components/distance-dimension-select.js +1 -1
- package/dist/domain/system-components/distance-dimension.d.ts +1 -1
- package/dist/domain/system-components/distance-dimension.js +1 -1
- package/dist/domain/system-components/drag-handle.d.ts +2 -2
- package/dist/domain/system-components/drag-handle.js +1 -1
- package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/generic-dimension.d.ts +1 -1
- package/dist/domain/system-components/generic-dimension.js +1 -1
- package/dist/domain/system-components/hidden-entity.js +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.d.ts +2 -3
- package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
- package/dist/domain/system-components/index.d.ts +0 -68
- package/dist/domain/system-components/index.js +1 -1
- package/dist/domain/system-components/material-override-property-transition.js +1 -1
- package/dist/domain/system-components/material-override-transformer.js +1 -1
- package/dist/domain/system-components/material-swatch.js +1 -1
- package/dist/domain/system-components/navigation-page.js +1 -1
- package/dist/domain/system-components/navigation-panel-list.js +1 -1
- package/dist/domain/system-components/phoenix-entity-elements/admin-data-table-sidebar.d.ts +1 -1
- package/dist/domain/system-components/phoenix-entity-elements/child-entity-card-selector.d.ts +2 -3
- package/dist/domain/system-components/phoenix-entity-elements/child-entity-list-selector.d.ts +2 -3
- package/dist/domain/system-components/phoenix-entity-elements/child-entity-toggle-selector.d.ts +2 -3
- package/dist/domain/system-components/phoenix-layout-elements/admin-connected-resource-page.d.ts +1 -1
- package/dist/domain/system-components/phoenix-layout-elements/admin-data-table-actions.d.ts +1 -1
- package/dist/domain/system-components/phoenix-layout-elements/admin-data-table-page.d.ts +1 -1
- package/dist/domain/system-components/pivot-point.d.ts +1 -1
- package/dist/domain/system-components/pivot-point.js +1 -1
- package/dist/domain/system-components/price.js +1 -1
- package/dist/domain/system-components/projected-entities.d.ts +1 -1
- package/dist/domain/system-components/projected-entities.js +1 -1
- package/dist/domain/system-components/replace-entity-recipes.d.ts +1 -1
- package/dist/domain/system-components/replace-entity-recipes.js +1 -1
- package/dist/domain/system-components/scene-entity-ambient-light.js +1 -1
- package/dist/domain/system-components/scene-entity-box-object.js +1 -1
- package/dist/domain/system-components/scene-entity-directional-light.js +1 -1
- package/dist/domain/system-components/scene-entity-local-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-clip.js +1 -1
- package/dist/domain/system-components/scene-entity-object-decal.js +1 -1
- package/dist/domain/system-components/scene-entity-object-group.js +1 -1
- package/dist/domain/system-components/scene-entity-object-local-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-properties.js +1 -1
- package/dist/domain/system-components/scene-entity-object-remote-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-text-decal.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-text-decal.js +1 -1
- package/dist/domain/system-components/scene-entity-object-transformer.js +1 -1
- package/dist/domain/system-components/scene-entity-object-transimissive-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-transimissive-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object.js +1 -1
- package/dist/domain/system-components/scene-entity-point-light.js +1 -1
- package/dist/domain/system-components/scene-entity-properties.js +1 -1
- package/dist/domain/system-components/scene-entity-rect-area-light.js +1 -1
- package/dist/domain/system-components/scene-entity-remote-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-remote-object.js +1 -1
- package/dist/domain/system-components/scene-entity-spot-light.js +1 -1
- package/dist/domain/system-components/scene-entity-transimissive-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-transimissive-material-override.js +1 -1
- package/dist/domain/system-components/sketching-line.d.ts +1 -1
- package/dist/domain/system-components/sketching-line.js +1 -1
- package/dist/domain/system-components/sketching-rectangle.d.ts +1 -1
- package/dist/domain/system-components/sketching-rectangle.js +1 -1
- package/dist/domain/system-components/sketching.d.ts +1 -1
- package/dist/domain/system-components/sketching.js +1 -1
- package/dist/domain/system-components/snap-axis.d.ts +1 -1
- package/dist/domain/system-components/snap-axis.js +1 -1
- package/dist/domain/system-components/snap-edge.d.ts +1 -1
- package/dist/domain/system-components/snap-edge.js +1 -1
- package/dist/domain/system-components/snap-plane.d.ts +1 -1
- package/dist/domain/system-components/snap-plane.js +1 -1
- package/dist/domain/system-components/snap-point.d.ts +1 -1
- package/dist/domain/system-components/snap-point.js +1 -1
- package/dist/domain/system-components/static-orthographic-camera-component.d.ts +1 -1
- package/dist/domain/system-components/static-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/static-perspective-camera-component.d.ts +1 -1
- package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
- package/dist/domain/system-definitions.js +1 -1
- package/dist/domain/utils/eval-cache.d.ts +2 -3
- package/dist/domain/utils/index.d.ts +2 -0
- package/dist/domain/utils/index.js +1 -0
- package/dist/domain/utils/map-nested-object.d.ts +1 -1
- package/dist/domain/utils/memo-eval.d.ts +2 -4
- package/dist/editor/Editor.d.ts +12 -0
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/EditorMode.d.ts +2 -0
- package/dist/editor/EditorMode.js +1 -1
- package/dist/editor/agent-mode/AgentModeBridge.d.ts +10 -0
- package/dist/editor/agent-mode/AgentModeBridge.js +1 -0
- package/dist/editor/agent-mode/agent-at-work-fonts.d.ts +2 -0
- package/dist/editor/agent-mode/agent-at-work-fonts.js +1 -0
- package/dist/editor/console-reporter/BrowserConsoleReporter.js +1 -1
- package/dist/editor/console-reporter/console-capture.d.ts +20 -0
- package/dist/editor/console-reporter/console-capture.js +1 -0
- package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
- package/dist/editor/domain-editors/apply-spec-update.d.ts +10 -2
- package/dist/editor/domain-editors/apply-spec-update.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +8 -16
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/editor/graphql/GraphQLPanel.js +1 -1
- package/dist/editor/index.d.ts +1 -0
- package/dist/editor/index.js +1 -1
- package/dist/editor/mocks/CreateMockYaml.js +2 -2
- package/dist/editor/mocks/EditorMockContext.d.ts +2 -0
- package/dist/editor/mocks/EditorMockContext.js +1 -1
- package/dist/editor/screenshot/ScreenshotHandler.js +1 -1
- package/dist/editor/variants/VariantAnswerFooter.d.ts +8 -1
- package/dist/editor/variants/VariantAnswerFooter.js +1 -1
- package/dist/editor/variants/VariantPageUnavailable.d.ts +5 -0
- package/dist/editor/variants/VariantPageUnavailable.js +1 -0
- package/dist/editor/variants/VariantPreviewHandler.js +1 -1
- package/dist/editor/variants/variant-preview-fonts.d.ts +2 -0
- package/dist/editor/variants/variant-preview-fonts.js +1 -0
- package/dist/editor/variants/variant-preview-styles.d.ts +40 -48
- package/dist/editor/variants/variant-preview-styles.js +493 -1
- package/dist/globals/index.d.ts +2 -0
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/i18n/merge-catalogs.d.ts +4 -1
- package/dist/i18n/merge-catalogs.js +1 -1
- package/dist/legacy/domain-cli/gen/configurator-builder.js +31 -16
- package/dist/legacy/domain-cli/gen/constant-expressions.js +1 -3
- package/dist/legacy/domain-cli/gen/defaults.js +1 -7
- package/dist/legacy/domain-cli/gen/implementation.js +7 -11
- package/dist/legacy/domain-cli/gen/invariants.js +7 -6
- package/dist/legacy/domain-cli/gen/relations.js +1 -1
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +178 -148
- package/dist/legacy/domain-spec/spec/domain-spec.js +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +13 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/domain-index.js +17 -15
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/env-example.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/env-example.js +4 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -18
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +16 -15
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +24 -24
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +16 -15
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.d.ts +7 -2
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.js +8 -12
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/i18n-index.js +3 -3
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.js +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/webhook-builders.js +7 -7
- package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
- package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.d.ts +1 -0
- package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.js +1 -1
- package/dist/legacy/webhook-cli/lambda-local/index.js +1 -1
- package/dist/phoenix/application-spec/application-spec-builder.d.ts +2 -4
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +3 -3
- package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
- package/dist/phoenix/application-spec/generate-application-spec-story.js +2 -2
- package/dist/phoenix/application-spec/generate-project-files.d.ts +4 -4
- package/dist/phoenix/application-spec/generate-project-files.js +1 -1
- package/dist/phoenix/application-spec/index.d.ts +3 -0
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/application-spec/project-files.d.ts +8 -2
- package/dist/phoenix/application-spec/project-files.js +1 -1
- package/dist/phoenix/application-spec/read-spec-project.d.ts +1 -2
- package/dist/phoenix/application-spec/read-spec-project.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +15 -3
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/bin.d.ts +2 -0
- package/dist/phoenix/bin.js +2 -0
- package/dist/phoenix/check-configs/built-in-eslint-config.d.ts +9 -0
- package/dist/phoenix/check-configs/built-in-eslint-config.js +1 -0
- package/dist/phoenix/check-configs/eslint-config.d.ts +10 -0
- package/dist/phoenix/check-configs/eslint-config.js +1 -0
- package/dist/phoenix/check-configs/index.d.ts +8 -0
- package/dist/phoenix/check-configs/index.js +1 -0
- package/dist/phoenix/check-configs/typescript-project.d.ts +5 -0
- package/dist/phoenix/check-configs/typescript-project.js +1 -0
- package/dist/phoenix/cli.d.ts +0 -1
- package/dist/phoenix/cli.js +1 -2
- package/dist/phoenix/commands/activate-deployment.js +1 -1
- package/dist/phoenix/commands/build.d.ts +2 -1
- package/dist/phoenix/commands/build.js +1 -1
- package/dist/phoenix/commands/changelog.js +1 -1
- package/dist/phoenix/commands/check.js +1 -1
- package/dist/phoenix/commands/clean.d.ts +2 -1
- package/dist/phoenix/commands/clean.js +1 -1
- package/dist/phoenix/commands/cleanup-environment.js +2 -2
- package/dist/phoenix/commands/create-environment.js +1 -1
- package/dist/phoenix/commands/data.js +1 -1
- package/dist/phoenix/commands/deploy.js +3 -3
- package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
- package/dist/phoenix/commands/deps/deps.d.ts +73 -0
- package/dist/phoenix/commands/deps/deps.js +3 -0
- package/dist/phoenix/commands/deps/index.d.ts +1 -0
- package/dist/phoenix/commands/deps/index.js +1 -0
- package/dist/phoenix/commands/deps/sdk-manifest.d.ts +12 -0
- package/dist/phoenix/commands/deps/sdk-manifest.js +1 -0
- package/dist/phoenix/commands/dev.d.ts +2 -1
- package/dist/phoenix/commands/dev.js +4 -5
- package/dist/phoenix/commands/docs.js +1 -1
- package/dist/phoenix/commands/finish-deployment-command.js +1 -1
- package/dist/phoenix/commands/fix.js +1 -1
- package/dist/phoenix/commands/index.d.ts +1 -0
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/init.d.ts +17 -5
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/inspect-assets.js +1 -1
- package/dist/phoenix/commands/link.js +1 -1
- package/dist/phoenix/commands/list-environments.js +1 -1
- package/dist/phoenix/commands/login.d.ts +4 -1
- package/dist/phoenix/commands/login.js +2 -2
- package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
- package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
- package/dist/phoenix/commands/prettier.js +1 -1
- package/dist/phoenix/commands/register-deployment.js +1 -1
- package/dist/phoenix/commands/scene.js +1 -1
- package/dist/phoenix/commands/screenshot.js +1 -1
- package/dist/phoenix/commands/state.js +1 -1
- package/dist/phoenix/commands/story-build.js +3 -3
- package/dist/phoenix/commands/story-create.js +1 -1
- package/dist/phoenix/commands/story-dev.js +2 -2
- package/dist/phoenix/commands/sync.d.ts +2 -1
- package/dist/phoenix/commands/sync.js +1 -1
- package/dist/phoenix/commands/unlink.js +1 -1
- package/dist/phoenix/commands/variants.js +1 -1
- package/dist/phoenix/editor-server/commands-router.js +1 -1
- package/dist/phoenix/editor-server/editor-server.d.ts +2 -13
- package/dist/phoenix/editor-server/editor-server.js +1 -1
- package/dist/phoenix/editor-server/spec-router.js +1 -1
- package/dist/phoenix/editor-server/trpc.d.ts +2 -12
- package/dist/phoenix/lingui/index.d.ts +1 -0
- package/dist/phoenix/lingui/index.js +1 -0
- package/dist/phoenix/lingui/lingui.d.ts +18 -0
- package/dist/phoenix/lingui/lingui.js +1 -0
- package/dist/phoenix/scripts/build-admin.js +1 -1
- package/dist/phoenix/scripts/docs-utils.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +16 -9
- package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
- package/dist/phoenix/services/cli-credentials.d.ts +3 -0
- package/dist/phoenix/services/cli-credentials.js +1 -1
- package/dist/phoenix/services/cli-exit.d.ts +5 -0
- package/dist/phoenix/services/cli-exit.js +1 -0
- package/dist/phoenix/services/deployment/deployment-preparation-service.d.ts +28 -0
- package/dist/phoenix/services/deployment/deployment-preparation-service.js +1 -0
- package/dist/phoenix/services/deployment/generated-env-markers.d.ts +8 -0
- package/dist/phoenix/services/deployment/generated-env-markers.js +1 -0
- package/dist/phoenix/services/deployment/index.d.ts +2 -0
- package/dist/phoenix/services/deployment/index.js +1 -0
- package/dist/phoenix/services/dev-experience/dev-experience.d.ts +31 -0
- package/dist/phoenix/services/dev-experience/dev-experience.js +1 -0
- package/dist/phoenix/services/dev-experience/index.d.ts +3 -0
- package/dist/phoenix/services/dev-experience/index.js +1 -0
- package/dist/phoenix/services/dev-experience/read-explicit-editor-setting.d.ts +7 -0
- package/dist/phoenix/services/dev-experience/read-explicit-editor-setting.js +1 -0
- package/dist/phoenix/services/dev-experience/regenerated-page-experience.d.ts +24 -0
- package/dist/phoenix/services/dev-experience/regenerated-page-experience.js +1 -0
- package/dist/phoenix/services/index.d.ts +7 -2
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/lingui-watcher.js +1 -1
- package/dist/phoenix/services/phoenix-pubsub.d.ts +4 -0
- package/dist/phoenix/services/phoenix-store.d.ts +3 -0
- package/dist/phoenix/services/phoenix-store.js +1 -1
- package/dist/phoenix/services/prepare-development-environment.js +1 -1
- package/dist/phoenix/services/session/editor-server-handle.d.ts +5 -0
- package/dist/phoenix/services/session/editor-server-handle.js +1 -0
- package/dist/phoenix/services/session/index.d.ts +2 -0
- package/dist/phoenix/services/session/index.js +1 -0
- package/dist/phoenix/services/session/phoenix-application.d.ts +83 -0
- package/dist/phoenix/services/session/phoenix-application.js +2 -0
- package/dist/phoenix/services/source-archive.d.ts +3 -0
- package/dist/phoenix/services/source-archive.js +1 -1
- package/dist/phoenix/services/swc.d.ts +5 -4
- package/dist/phoenix/services/swc.js +2 -2
- package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.d.ts +9 -0
- package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.js +1 -0
- package/dist/phoenix/services/telemetry/index.d.ts +3 -0
- package/dist/phoenix/services/telemetry/index.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-client.d.ts +25 -0
- package/dist/phoenix/services/telemetry/telemetry-client.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-command.d.ts +2 -0
- package/dist/phoenix/services/telemetry/telemetry-command.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-event.d.ts +44 -0
- package/dist/phoenix/services/telemetry/telemetry-event.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-state.d.ts +25 -0
- package/dist/phoenix/services/telemetry/telemetry-state.js +2 -0
- package/dist/phoenix/services/variant-file-session.js +1 -1
- package/dist/phoenix/services/vite-config.d.ts +2 -1
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/phoenix/services/webhook-service/transport.js +1 -1
- package/dist/phoenix/services/webhook-service/tunnel.d.ts +1 -0
- package/dist/phoenix/services/webhook-service/tunnel.js +1 -1
- package/dist/phoenix/utils/git/index.d.ts +1 -0
- package/dist/phoenix/utils/git/index.js +1 -0
- package/dist/phoenix/utils/git/is-inside-git-repository.d.ts +6 -0
- package/dist/phoenix/utils/git/is-inside-git-repository.js +1 -0
- package/dist/phoenix/utils/index.d.ts +5 -2
- package/dist/phoenix/utils/index.js +1 -1
- package/dist/phoenix/utils/node-version/index.d.ts +1 -0
- package/dist/phoenix/utils/node-version/index.js +1 -0
- package/dist/phoenix/utils/node-version/supported-node-version.d.ts +12 -0
- package/dist/phoenix/utils/node-version/supported-node-version.js +4 -0
- package/dist/phoenix/utils/package-info.d.ts +0 -9
- package/dist/phoenix/utils/package-info.js +1 -1
- package/dist/phoenix/utils/package-manager/index.d.ts +2 -0
- package/dist/phoenix/utils/package-manager/index.js +1 -0
- package/dist/phoenix/utils/package-manager/package-manager-commands.d.ts +19 -0
- package/dist/phoenix/utils/package-manager/package-manager-commands.js +1 -0
- package/dist/phoenix/utils/package-manager/pnpm-project.d.ts +9 -0
- package/dist/phoenix/utils/package-manager/pnpm-project.js +1 -0
- package/dist/phoenix/utils/run-command.d.ts +11 -0
- package/dist/phoenix/utils/run-command.js +1 -1
- package/dist/phoenix/utils/sdk-tool/index.d.ts +1 -0
- package/dist/phoenix/utils/sdk-tool/index.js +1 -0
- package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.d.ts +15 -0
- package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +1 -1
- package/dist/react-sdk/application-runtime/common-services/analytics/frontend-analytics.d.ts +52 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/frontend-analytics.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/index.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/initialize.d.ts +2 -2
- package/dist/react-sdk/application-runtime/domain-application-context/chat-system.d.ts +1 -1
- package/dist/react-sdk/application-runtime/hooks/index.d.ts +2 -0
- package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/loading/index.d.ts +5 -0
- package/dist/react-sdk/application-runtime/hooks/loading/index.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.d.ts +11 -0
- package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.d.ts +8 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.d.ts +7 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.d.ts +9 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.d.ts +24 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/index.d.ts +3 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/index.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.d.ts +9 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.d.ts +28 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.d.ts +10 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.d.ts +24 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +7 -0
- package/dist/react-sdk/application-runtime/hooks/use-access-service.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-domain-application-props.d.ts +5 -2
- package/dist/react-sdk/application-runtime/hooks/use-environment.d.ts +7 -0
- package/dist/react-sdk/application-runtime/hooks/use-environment.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-phoenix-element-slots.d.ts +2 -1
- package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.d.ts +4 -11
- package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-web-component.d.ts +5 -0
- package/dist/react-sdk/application-runtime/hooks/use-web-component.js +1 -1
- package/dist/react-sdk/application-runtime/host-properties/actions.d.ts +15 -0
- package/dist/react-sdk/application-runtime/host-properties/actions.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.d.ts +30 -0
- package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.d.ts +7 -0
- package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.d.ts +21 -0
- package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.d.ts +42 -0
- package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/index.d.ts +8 -0
- package/dist/react-sdk/application-runtime/host-properties/index.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/initialize.d.ts +7 -0
- package/dist/react-sdk/application-runtime/host-properties/initialize.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/selectors.d.ts +54 -0
- package/dist/react-sdk/application-runtime/host-properties/selectors.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/types.d.ts +18 -0
- package/dist/react-sdk/application-runtime/host-properties/types.js +1 -0
- package/dist/react-sdk/application-runtime/index.d.ts +3 -0
- package/dist/react-sdk/application-runtime/integration/initialize.d.ts +7 -6
- package/dist/react-sdk/application-runtime/integration/initialize.js +1 -1
- package/dist/react-sdk/application-runtime/integration/selectors.d.ts +11 -2
- package/dist/react-sdk/application-runtime/integration/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/integration/types.d.ts +5 -2
- package/dist/react-sdk/application-runtime/loading/actions.d.ts +45 -0
- package/dist/react-sdk/application-runtime/loading/actions.js +1 -0
- package/dist/react-sdk/application-runtime/loading/index.d.ts +4 -0
- package/dist/react-sdk/application-runtime/loading/index.js +1 -0
- package/dist/react-sdk/application-runtime/loading/initialize.d.ts +3 -0
- package/dist/react-sdk/application-runtime/loading/initialize.js +1 -0
- package/dist/react-sdk/application-runtime/loading/selectors.d.ts +18 -0
- package/dist/react-sdk/application-runtime/loading/selectors.js +1 -0
- package/dist/react-sdk/application-runtime/loading/types.d.ts +59 -0
- package/dist/react-sdk/application-runtime/loading/types.js +1 -0
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.d.ts +1 -1
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.d.ts +6 -0
- package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.js +1 -1
- package/dist/react-sdk/application-runtime/provider/ApplicationType.d.ts +7 -0
- package/dist/react-sdk/application-runtime/provider/ApplicationType.js +1 -1
- package/dist/react-sdk/application-runtime/responsive/actions.d.ts +53 -0
- package/dist/react-sdk/application-runtime/responsive/actions.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/index.d.ts +4 -0
- package/dist/react-sdk/application-runtime/responsive/index.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/initialize.d.ts +3 -0
- package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/selectors.d.ts +20 -0
- package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/types.d.ts +113 -0
- package/dist/react-sdk/application-runtime/responsive/types.js +1 -0
- package/dist/react-sdk/application-runtime/routing/access-service.d.ts +1 -0
- package/dist/react-sdk/application-runtime/routing/routing-service.d.ts +34 -2
- package/dist/react-sdk/application-runtime/routing/routing-service.js +1 -1
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +388 -50
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/configurator-routing/ConfiguratorRoutingProvider.d.ts +11 -0
- package/dist/react-sdk/configurator-routing/ConfiguratorRoutingProvider.js +1 -0
- package/dist/react-sdk/configurator-routing/OnGoToIndexHandler.d.ts +9 -0
- package/dist/react-sdk/configurator-routing/OnGoToIndexHandler.js +1 -0
- package/dist/react-sdk/configurator-routing/index.d.ts +3 -0
- package/dist/react-sdk/configurator-routing/index.js +1 -0
- package/dist/react-sdk/configurator-routing/use-power-routing-lifecycle.d.ts +11 -0
- package/dist/react-sdk/configurator-routing/use-power-routing-lifecycle.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/ConfiguratorUiElementHost.d.ts +7 -0
- package/dist/react-sdk/configurator-ui-elements/ConfiguratorUiElementHost.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/ErrorFallbackElement.d.ts +14 -0
- package/dist/react-sdk/configurator-ui-elements/ErrorFallbackElement.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/ErrorFallbackPropsProvider.d.ts +18 -0
- package/dist/react-sdk/configurator-ui-elements/ErrorFallbackPropsProvider.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/PlainErrorFallback.d.ts +5 -0
- package/dist/react-sdk/configurator-ui-elements/PlainErrorFallback.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/configurator-ui-element.d.ts +17 -0
- package/dist/react-sdk/configurator-ui-elements/configurator-ui-element.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/create-configurator-ui-element.d.ts +5 -0
- package/dist/react-sdk/configurator-ui-elements/create-configurator-ui-element.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/index.d.ts +6 -0
- package/dist/react-sdk/configurator-ui-elements/index.js +1 -0
- package/dist/react-sdk/domain-application-context/BackendDataProvider.js +1 -1
- package/dist/react-sdk/domain-application-context/ConfigurationPersistSystemFailureHandler.js +1 -1
- package/dist/react-sdk/domain-application-context/DomainLifecycleBoundary.js +1 -1
- package/dist/react-sdk/domain-application-context/FrontendDataProvider.js +1 -1
- package/dist/react-sdk/domain-application-context/OnPresetLoadedHandler.js +1 -0
- package/dist/react-sdk/domain-application-context/PublishedDataProvider.js +1 -1
- package/dist/react-sdk/domain-application-context/chat-hooks.d.ts +4 -0
- package/dist/react-sdk/domain-application-context/chat-hooks.js +1 -0
- package/dist/react-sdk/domain-application-context/index.d.ts +2 -0
- package/dist/react-sdk/domain-application-context/index.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/index.d.ts +9 -0
- package/dist/react-sdk/domain-context/common-hooks/index.js +1 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.d.ts +23 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.js +1 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +41 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.js +1 -0
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +14 -12
- package/dist/react-sdk/domain-context/common-hooks/use-state-validity.d.ts +6 -1
- package/dist/react-sdk/domain-context/common-hooks/use-state-validity.js +1 -1
- package/dist/react-sdk/domain-context/component-hooks/index.d.ts +1 -0
- package/dist/react-sdk/domain-context/component-hooks/index.js +1 -0
- package/dist/react-sdk/domain-context/component-hooks/use-component.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-domain-entity-state.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-entity-price.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-id.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-state.js +1 -1
- package/dist/react-sdk/domain-context/index.d.ts +9 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/composition-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/dimension-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +8 -0
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/hover-hooks.d.ts +2 -2
- package/dist/react-sdk/domain-context/system-hooks/hover-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.d.ts +24 -0
- package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +11 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/selection-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.d.ts +32 -0
- package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.d.ts +57 -0
- package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.d.ts +61 -0
- package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.d.ts +20 -0
- package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -0
- package/dist/react-sdk/domain-controls/ChildEntityCardSelector.d.ts +2 -3
- package/dist/react-sdk/domain-controls/ChildEntityListSelector.d.ts +2 -3
- package/dist/react-sdk/domain-controls/ChildEntityToggleSelector.d.ts +2 -3
- package/dist/react-sdk/domain-controls/hooks/use-angle-dimension.d.ts +1 -1
- package/dist/react-sdk/domain-controls/hooks/use-cook-replace-recipes.d.ts +3 -3
- package/dist/react-sdk/elements/PhoenixEntityElement.js +1 -1
- package/dist/react-sdk/elements/PhoenixLayoutElement.js +1 -1
- package/dist/react-sdk/handlers/FinalizeActionRunner.d.ts +13 -0
- package/dist/react-sdk/handlers/FinalizeActionRunner.js +1 -0
- package/dist/react-sdk/handlers/FinalizeActionsHost.d.ts +10 -0
- package/dist/react-sdk/handlers/FinalizeActionsHost.js +1 -0
- package/dist/react-sdk/handlers/FinalizeActionsProvider.d.ts +11 -0
- package/dist/react-sdk/handlers/FinalizeActionsProvider.js +1 -0
- package/dist/react-sdk/handlers/finalize-actions-context.d.ts +6 -0
- package/dist/react-sdk/handlers/finalize-actions-context.js +1 -0
- package/dist/react-sdk/handlers/finalize-actions-store.d.ts +23 -0
- package/dist/react-sdk/handlers/finalize-actions-store.js +1 -0
- package/dist/react-sdk/handlers/index.d.ts +6 -0
- package/dist/react-sdk/handlers/index.js +1 -1
- package/dist/react-sdk/handlers/use-finalize-action.d.ts +32 -0
- package/dist/react-sdk/handlers/use-finalize-action.js +1 -0
- package/dist/react-sdk/handlers/use-finalize-actions.d.ts +53 -0
- package/dist/react-sdk/handlers/use-finalize-actions.js +1 -0
- package/dist/react-sdk/index.d.ts +9 -0
- package/dist/react-sdk/index.js +1 -1
- package/dist/react-sdk/integration/IntegrationSubscription.js +1 -0
- package/dist/react-sdk/integration/index.d.ts +1 -0
- package/dist/react-sdk/integration/index.js +1 -0
- package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.d.ts +8 -0
- package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.js +1 -0
- package/dist/react-sdk/lifecycle-providers/LifecycleProviders.js +1 -0
- package/dist/react-sdk/lifecycle-providers/index.d.ts +2 -0
- package/dist/react-sdk/lifecycle-providers/index.js +1 -0
- package/dist/react-sdk/loading-state/LoaderHost.d.ts +20 -0
- package/dist/react-sdk/loading-state/LoaderHost.js +1 -0
- package/dist/react-sdk/loading-state/built-in-loading-phase.d.ts +9 -0
- package/dist/react-sdk/loading-state/built-in-loading-phase.js +1 -0
- package/dist/react-sdk/loading-state/create-app-loader.d.ts +18 -0
- package/dist/react-sdk/loading-state/create-app-loader.js +1 -0
- package/dist/react-sdk/loading-state/index.d.ts +4 -2
- package/dist/react-sdk/loading-state/index.js +1 -1
- package/dist/react-sdk/loading-state/loading-state-hooks.d.ts +22 -0
- package/dist/react-sdk/loading-state/loading-state-hooks.js +1 -0
- package/dist/react-sdk/notifications/index.d.ts +1 -0
- package/dist/react-sdk/notifications/index.js +1 -0
- package/dist/react-sdk/notifications/snackbar-action-button.d.ts +30 -0
- package/dist/react-sdk/notifications/snackbar-action-button.js +1 -0
- package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.d.ts +17 -0
- package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.js +1 -0
- package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.d.ts +17 -0
- package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.js +1 -0
- package/dist/react-sdk/page-elements/configurator-error-page-props.d.ts +20 -0
- package/dist/react-sdk/page-elements/configurator-error-page-props.js +1 -0
- package/dist/react-sdk/page-elements/create-configuration-not-found-page.d.ts +15 -0
- package/dist/react-sdk/page-elements/create-configuration-not-found-page.js +1 -0
- package/dist/react-sdk/page-elements/create-configurator-error-page.d.ts +14 -0
- package/dist/react-sdk/page-elements/create-configurator-error-page.js +1 -0
- package/dist/react-sdk/page-elements/create-preset-ui.d.ts +9 -0
- package/dist/react-sdk/page-elements/create-preset-ui.js +1 -0
- package/dist/react-sdk/page-elements/index.d.ts +6 -0
- package/dist/react-sdk/page-elements/index.js +1 -0
- package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -0
- package/dist/react-sdk/preset-selection/index.d.ts +1 -0
- package/dist/react-sdk/preset-selection/index.js +1 -0
- package/dist/react-sdk/provider-slots/ConfiguratorProviderSlotHost.d.ts +11 -0
- package/dist/react-sdk/provider-slots/ConfiguratorProviderSlotHost.js +1 -0
- package/dist/react-sdk/provider-slots/configurator-provider-slot.d.ts +24 -0
- package/dist/react-sdk/provider-slots/configurator-provider-slot.js +1 -0
- package/dist/react-sdk/provider-slots/create-configurator-provider-slot.d.ts +5 -0
- package/dist/react-sdk/provider-slots/create-configurator-provider-slot.js +1 -0
- package/dist/react-sdk/provider-slots/index.d.ts +3 -0
- package/dist/react-sdk/provider-slots/index.js +1 -0
- package/dist/react-sdk/scene-control-elements/AddEntityFabElement.d.ts +36 -0
- package/dist/react-sdk/scene-control-elements/AddEntityFabElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.d.ts +44 -0
- package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.d.ts +38 -0
- package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.d.ts +30 -0
- package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.d.ts +30 -0
- package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-add-entity-fab.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-add-entity-fab.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.d.ts +10 -0
- package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-selection-hotspot.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-selection-hotspot.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.js +1 -0
- package/dist/react-sdk/scene-control-elements/index.d.ts +11 -0
- package/dist/react-sdk/scene-control-elements/index.js +1 -0
- package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.d.ts +5 -0
- package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.js +1 -0
- package/dist/react-sdk/session/NotAuthenticatedPage.d.ts +4 -0
- package/dist/react-sdk/session/NotAuthenticatedPage.js +1 -1
- package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
- package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
- package/dist/react-sdk/web-component/create-web-component.js +1 -1
- package/dist/react-sdk/web-component/god-mode/god-mode-registry.d.ts +30 -0
- package/dist/react-sdk/web-component/god-mode/god-mode-registry.js +1 -0
- package/dist/react-sdk/web-component/god-mode/index.d.ts +1 -0
- package/dist/react-sdk/web-component/god-mode/index.js +1 -0
- package/dist/ui-sdk/components/numerical-input/InputField.d.ts +2 -0
- package/dist/ui-sdk/components/numerical-input/InputField.js +1 -1
- package/dist/ui-sdk/components/numerical-input/NumericalInput.d.ts +2 -2
- package/dist/ui-sdk/components/numerical-input/Slider.d.ts +3 -1
- package/dist/ui-sdk/components/numerical-input/Slider.js +1 -1
- package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +24 -3
- package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
- package/dist/ui-sdk/icons/__generated/ChatCircleText.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/ChatCircleText.js +1 -0
- package/dist/ui-sdk/icons/__generated/Lightbulb.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Lightbulb.js +1 -0
- package/dist/ui-sdk/icons/__generated/Microphone.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Microphone.js +1 -0
- package/dist/ui-sdk/icons/__generated/MicrophoneSlash.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/MicrophoneSlash.js +1 -0
- package/dist/ui-sdk/icons/__generated/Paperclip.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Paperclip.js +1 -0
- package/dist/ui-sdk/icons/__generated/PencilSimpleLine.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/PencilSimpleLine.js +1 -0
- package/dist/ui-sdk/icons/__generated/SpeakerHigh.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/SpeakerHigh.js +1 -0
- package/dist/ui-sdk/icons/__generated/SpeakerSlash.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/SpeakerSlash.js +1 -0
- package/dist/ui-sdk/icons/__generated/Stop.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Stop.js +1 -0
- package/dist/ui-sdk/icons/__generated/XCircle.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/XCircle.js +1 -0
- package/dist/ui-sdk/icons/__generated/index.d.ts +20 -0
- package/dist/ui-sdk/icons/__generated/index.js +1 -1
- package/dist/ui-sdk/icons/icons-registry.js +1 -1
- package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +9 -0
- package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.js +1 -1
- package/dist/ui-sdk/responsive-application/index.d.ts +1 -0
- package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +59 -0
- package/dist/ui-sdk/responsive-application/responsive-state-store.js +1 -0
- package/dist/ui-sdk/responsive-application/use-store-responsive-info.d.ts +7 -0
- package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -0
- package/dist/ui-sdk/theme/types.d.ts +3 -3
- package/dist/watch/glob-matcher.d.ts +4 -4
- package/dist/watch/glob-matcher.js +1 -1
- package/dist/watch/watch.d.ts +4 -4
- package/dist/watch/watch.js +1 -1
- package/dist/webhook/builders/common.d.ts +10 -2
- package/dist/webhook/builders/webhook-builder.d.ts +1 -1
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +61 -37
- package/schema/domain-spec.json +1425 -217
- package/dist/application-spec/caching/runtime-reference-store.d.ts +0 -50
- package/dist/application-spec/caching/runtime-reference-store.js +0 -1
- package/dist/application-spec/core/eval-to-constant.d.ts +0 -14
- package/dist/application-spec/generate-application/code/templates/env-ci.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/env-ci.js +0 -25
- package/dist/application-spec/generate-application/code/templates/env-example.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/env-example.js +0 -90
- package/dist/application-spec/generate-application/code/templates/nvmrc.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/nvmrc.js +0 -2
- package/dist/application-spec/generate-application/code/templates/package-json.d.ts +0 -10
- package/dist/application-spec/generate-application/code/templates/package-json.js +0 -1
- package/dist/application-spec/generate-application/code/templates/prettier-ignore.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/prettier-ignore.js +0 -6
- package/dist/application-spec/generate-application/code/templates/private-assets-readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/private-assets-readme.js +0 -24
- package/dist/application-spec/generate-application/code/templates/public-assets-readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/public-assets-readme.js +0 -24
- package/dist/application-spec/generate-application/code/templates/readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/readme.js +0 -23
- package/dist/application-spec/generate-application/code/templates/skills/agents-md.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +0 -2
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.d.ts +0 -3
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +0 -142
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +0 -54
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +0 -109
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.d.ts +0 -13
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +0 -6
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.js +0 -7
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +0 -28
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +0 -23
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/states-runtime.d.ts +0 -8
- package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +0 -35
- package/dist/application-spec/generate-application/runtime/application-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +0 -30
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +0 -34
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/states-runtime.d.ts +0 -11
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.d.ts +0 -2
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +0 -14
- package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +0 -9
- package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +0 -7
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +0 -7
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +0 -32
- package/dist/application-spec/generate-application/runtime/sections/component-optic.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/data-runtime.d.ts +0 -13
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +0 -46
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +0 -29
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/index.d.ts +0 -10
- package/dist/application-spec/generate-application/runtime/sections/index.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/preset-runtime.d.ts +0 -20
- package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +0 -8
- package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/theme-runtime.d.ts +0 -10
- package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +0 -21
- package/dist/application-spec/parse-application-files/spec/components/component-entry.d.ts +0 -98
- package/dist/application-spec/parse-application-files/spec/expressions/expression.d.ts +0 -70
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.d.ts +0 -17
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.js +0 -1
- package/dist/configurator/common/frontend-analytics.d.ts +0 -46
- package/dist/configurator/common/frontend-analytics.js +0 -1
- package/dist/configurator/configurator-context/ConfiguratorDataProvider.d.ts +0 -2
- package/dist/configurator/configurator-context/ConfiguratorDataProvider.js +0 -1
- package/dist/configurator/configurator-context/IntegrationSubscription.js +0 -1
- package/dist/configurator/configurator-context/LifecycleProviders.js +0 -1
- package/dist/configurator/configurator-context/OnPresetLoadedHandler.js +0 -1
- package/dist/configurator/configurator-context/PresetSelectionProvider.js +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.d.ts +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.d.ts +0 -11
- package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/OnGoToIndexHandler.d.ts +0 -10
- package/dist/configurator/configurator-context/configurator-routing/OnGoToIndexHandler.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/index.d.ts +0 -2
- package/dist/configurator/configurator-context/configurator-routing/index.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/use-power-routing-lifecycle.d.ts +0 -9
- package/dist/configurator/configurator-context/configurator-routing/use-power-routing-lifecycle.js +0 -1
- package/dist/configurator/ui/assistant/theme.d.ts +0 -2
- package/dist/configurator/ui/assistant/theme.js +0 -1
- package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.d.ts +0 -4
- package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.js +0 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.d.ts +0 -4
- package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.js +0 -1
- package/dist/domain/actions/action-factory.d.ts +0 -10
- package/dist/domain/actions/prepare-action-implementations.d.ts +0 -15
- package/dist/domain/actions/prepare-action-implementations.js +0 -5
- package/dist/domain/application/element-registration.d.ts +0 -105
- package/dist/domain/application/element-registration.js +0 -1
- package/dist/domain/application/handler-registration.d.ts +0 -29
- package/dist/domain/application/handler-registration.js +0 -1
- package/dist/domain/application/resolve-imported-transformers.d.ts +0 -13
- package/dist/domain/application/resolve-imported-transformers.js +0 -1
- package/dist/domain/application/resource-builder.d.ts +0 -13
- package/dist/domain/application/resource-builder.js +0 -1
- package/dist/domain/available-system-components.d.ts +0 -11
- package/dist/domain/available-system-components.js +0 -1
- package/dist/domain/components/component-reader-types.d.ts +0 -44
- package/dist/domain/components/debug-state-component.d.ts +0 -14
- package/dist/domain/components/debug-state-component.js +0 -1
- package/dist/domain/components/domain-component-optic.d.ts +0 -76
- package/dist/domain/components/domain-component-optic.js +0 -16
- package/dist/domain/components/drag-state-component.d.ts +0 -16
- package/dist/domain/components/drag-state-component.js +0 -1
- package/dist/domain/components/export-state-component.d.ts +0 -15
- package/dist/domain/components/export-state-component.js +0 -1
- package/dist/domain/components/fullscreen-state-component.d.ts +0 -14
- package/dist/domain/components/fullscreen-state-component.js +0 -1
- package/dist/domain/components/group-components-by-entity-id-and-name.d.ts +0 -9
- package/dist/domain/components/group-components-by-entity-id-and-name.js +0 -1
- package/dist/domain/components/hover-state-component.d.ts +0 -14
- package/dist/domain/components/hover-state-component.js +0 -1
- package/dist/domain/components/index.d.ts +0 -2
- package/dist/domain/components/index.js +0 -1
- package/dist/domain/components/legacy-filter.d.ts +0 -513
- package/dist/domain/components/navigation-state-component.d.ts +0 -15
- package/dist/domain/components/navigation-state-component.js +0 -1
- package/dist/domain/components/selection-state-component.d.ts +0 -14
- package/dist/domain/components/selection-state-component.js +0 -1
- package/dist/domain/components/system-component-builder.d.ts +0 -12
- package/dist/domain/components/system-component-builder.js +0 -1
- package/dist/domain/components/system-component-filter.d.ts +0 -793
- package/dist/domain/components/system-virtual-entity.js +0 -1
- package/dist/domain/components/tool-state-component.d.ts +0 -14
- package/dist/domain/components/tool-state-component.js +0 -1
- package/dist/domain/components/updates.d.ts +0 -124
- package/dist/domain/components/view-state-component.d.ts +0 -14
- package/dist/domain/components/view-state-component.js +0 -1
- package/dist/domain/components/viewport-state-component.d.ts +0 -29
- package/dist/domain/components/viewport-state-component.js +0 -1
- package/dist/domain/core/action.d.ts +0 -67
- package/dist/domain/core/component.d.ts +0 -46
- package/dist/domain/core/expression.d.ts +0 -50
- package/dist/domain/core/json-schema.js +0 -1
- package/dist/domain/core/migrations.d.ts +0 -99
- package/dist/domain/core/migrations.js +0 -1
- package/dist/domain/core/model.d.ts +0 -127
- package/dist/domain/core/reflection.d.ts +0 -114
- package/dist/domain/core/reflection.js +0 -1
- package/dist/domain/core/state.d.ts +0 -10
- package/dist/domain/domain-builder.d.ts +0 -40
- package/dist/domain/domain-builder.js +0 -1
- package/dist/domain/domain-context/recipe-system/recipes.d.ts +0 -57
- package/dist/domain/domain-context/recipe-system/recipes.js +0 -1
- package/dist/domain/expressions/constant-expressions.d.ts +0 -9
- package/dist/domain/expressions/constant-expressions.js +0 -1
- package/dist/domain/expressions/custom-expression.d.ts +0 -13
- package/dist/domain/expressions/custom-expression.js +0 -1
- package/dist/domain/expressions/index.d.ts +0 -1
- package/dist/domain/expressions/index.js +0 -1
- package/dist/domain/expressions/memoize-expression.d.ts +0 -17
- package/dist/domain/expressions/prepare-domain-expressions.d.ts +0 -16
- package/dist/domain/invariants/builtin-invariant.d.ts +0 -5
- package/dist/domain/invariants/custom-invariants.d.ts +0 -22
- package/dist/domain/invariants/custom-invariants.js +0 -1
- package/dist/domain/invariants/invariants.d.ts +0 -68
- package/dist/domain/invariants/invariants.js +0 -1
- package/dist/domain/invariants/violation-component.js +0 -1
- package/dist/domain/invariants/violation.d.ts +0 -85
- package/dist/domain/invariants/violation.js +0 -1
- package/dist/domain/relations/all-of-type-relation.d.ts +0 -33
- package/dist/domain/relations/all-of-type-relation.js +0 -1
- package/dist/domain/relations/component-factories.d.ts +0 -15
- package/dist/domain/relations/component-factories.js +0 -1
- package/dist/domain/relations/composed-of.d.ts +0 -12
- package/dist/domain/relations/composed-of.js +0 -1
- package/dist/domain/relations/direct-relation.d.ts +0 -29
- package/dist/domain/relations/indirect-relation.d.ts +0 -81
- package/dist/domain/relations/indirect-relation.js +0 -1
- package/dist/domain/relations/reference-component.d.ts +0 -18
- package/dist/domain/relations/reference-component.js +0 -1
- package/dist/domain/relations/reference-field.d.ts +0 -7
- package/dist/domain/relations/relation-factory.d.ts +0 -19
- package/dist/domain/relations/relation-factory.js +0 -1
- package/dist/domain/relations/relation-implementation.d.ts +0 -8
- package/dist/domain/system-components/angle-indicator.d.ts +0 -21
- package/dist/domain/system-components/angle-indicator.js +0 -1
- package/dist/domain/system-components/attribute-switch.d.ts +0 -8
- package/dist/domain/system-components/attribute-switch.js +0 -1
- package/dist/domain/system-components/autorotate-camera-component.d.ts +0 -19
- package/dist/domain/system-components/autorotate-camera-component.js +0 -1
- package/dist/domain/system-components/basic-sidebar-footer.d.ts +0 -8
- package/dist/domain/system-components/basic-sidebar-footer.js +0 -1
- package/dist/domain/system-components/camera-based-hidden-entity-object.js +0 -1
- package/dist/domain/system-components/camera-based-hidden-entity.js +0 -1
- package/dist/domain/system-components/canvas-config.d.ts +0 -87
- package/dist/domain/system-components/canvas-config.js +0 -1
- package/dist/domain/system-components/canvas-custom-environment.js +0 -1
- package/dist/domain/system-components/canvas-padding.d.ts +0 -25
- package/dist/domain/system-components/canvas-padding.js +0 -1
- package/dist/domain/system-components/canvas-preset-environment.d.ts +0 -37
- package/dist/domain/system-components/canvas-preset-environment.js +0 -1
- package/dist/domain/system-components/child-entity-recipe-hierarchy.d.ts +0 -21
- package/dist/domain/system-components/child-entity-recipe-hierarchy.js +0 -1
- package/dist/domain/system-components/client-side-image.d.ts +0 -14
- package/dist/domain/system-components/client-side-image.js +0 -1
- package/dist/domain/system-components/color-value.js +0 -1
- package/dist/domain/system-components/common/angle-indicator-schema.d.ts +0 -292
- package/dist/domain/system-components/common/angle-indicator-schema.js +0 -1
- package/dist/domain/system-components/common/dimension-indicator-schema.d.ts +0 -607
- package/dist/domain/system-components/common/dimension-indicator-schema.js +0 -1
- package/dist/domain/system-components/custom-header.d.ts +0 -11
- package/dist/domain/system-components/custom-header.js +0 -1
- package/dist/domain/system-components/custom-price-footer.js +0 -1
- package/dist/domain/system-components/custom-sidebar-footer.d.ts +0 -11
- package/dist/domain/system-components/custom-sidebar-footer.js +0 -1
- package/dist/domain/system-components/dimension-indicator.d.ts +0 -31
- package/dist/domain/system-components/dimension-indicator.js +0 -1
- package/dist/domain/system-components/editable-angle-indicator.d.ts +0 -38
- package/dist/domain/system-components/editable-angle-indicator.js +0 -1
- package/dist/domain/system-components/editable-distance-dimension-indicator.d.ts +0 -42
- package/dist/domain/system-components/editable-distance-dimension-indicator.js +0 -1
- package/dist/domain/system-components/editable-offset-indicator.d.ts +0 -41
- package/dist/domain/system-components/editable-offset-indicator.js +0 -1
- package/dist/domain/system-components/editable-size-indicator.d.ts +0 -38
- package/dist/domain/system-components/editable-size-indicator.js +0 -1
- package/dist/domain/system-components/entity-header.d.ts +0 -22
- package/dist/domain/system-components/entity-header.js +0 -1
- package/dist/domain/system-components/exit-tool-mode-fab.d.ts +0 -25
- package/dist/domain/system-components/exit-tool-mode-fab.js +0 -1
- package/dist/domain/system-components/finalize-action.d.ts +0 -20
- package/dist/domain/system-components/finalize-action.js +0 -1
- package/dist/domain/system-components/finalize-component.js +0 -1
- package/dist/domain/system-components/fit-selection-orthographic-camera-component.js +0 -1
- package/dist/domain/system-components/fit-selection-perspective-camera-component.js +0 -1
- package/dist/domain/system-components/fixed-header.d.ts +0 -10
- package/dist/domain/system-components/fixed-header.js +0 -1
- package/dist/domain/system-components/floating-header.d.ts +0 -10
- package/dist/domain/system-components/floating-header.js +0 -1
- package/dist/domain/system-components/hidden-header.d.ts +0 -8
- package/dist/domain/system-components/hidden-header.js +0 -1
- package/dist/domain/system-components/hidden-sidebar-footer.d.ts +0 -21
- package/dist/domain/system-components/hidden-sidebar-footer.js +0 -1
- package/dist/domain/system-components/horizontal-tabs.d.ts +0 -28
- package/dist/domain/system-components/horizontal-tabs.js +0 -1
- package/dist/domain/system-components/list-selector-dimension-indicator.d.ts +0 -30
- package/dist/domain/system-components/list-selector-dimension-indicator.js +0 -1
- package/dist/domain/system-components/multilingual-text-value.js +0 -1
- package/dist/domain/system-components/navigation-steps.d.ts +0 -19
- package/dist/domain/system-components/navigation-steps.js +0 -1
- package/dist/domain/system-components/offset-anchors.d.ts +0 -20
- package/dist/domain/system-components/offset-anchors.js +0 -1
- package/dist/domain/system-components/offset-indicator.d.ts +0 -84
- package/dist/domain/system-components/offset-indicator.js +0 -1
- package/dist/domain/system-components/offset.d.ts +0 -31
- package/dist/domain/system-components/offset.js +0 -1
- package/dist/domain/system-components/other-action.d.ts +0 -14
- package/dist/domain/system-components/other-action.js +0 -1
- package/dist/domain/system-components/property-page.d.ts +0 -16
- package/dist/domain/system-components/property-page.js +0 -1
- package/dist/domain/system-components/read-sidebar-footer.d.ts +0 -8
- package/dist/domain/system-components/read-sidebar-footer.js +0 -1
- package/dist/domain/system-components/replace-entity-recipe-hierarchy.d.ts +0 -21
- package/dist/domain/system-components/replace-entity-recipe-hierarchy.js +0 -1
- package/dist/domain/system-components/rotatable.js +0 -1
- package/dist/domain/system-components/rotation-handle.d.ts +0 -53
- package/dist/domain/system-components/rotation-handle.js +0 -1
- package/dist/domain/system-components/save-template-thumbnail.d.ts +0 -14
- package/dist/domain/system-components/save-template-thumbnail.js +0 -1
- package/dist/domain/system-components/scene-entity-add-fab.d.ts +0 -32
- package/dist/domain/system-components/scene-entity-add-fab.js +0 -1
- package/dist/domain/system-components/scene-entity-animation.js +0 -1
- package/dist/domain/system-components/scene-entity-control.js +0 -1
- package/dist/domain/system-components/scene-entity-delete-fab.d.ts +0 -19
- package/dist/domain/system-components/scene-entity-delete-fab.js +0 -1
- package/dist/domain/system-components/scene-entity-floor-object.js +0 -1
- package/dist/domain/system-components/scene-entity-html-hotspot.d.ts +0 -27
- package/dist/domain/system-components/scene-entity-html-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-navigation-hotspot.d.ts +0 -20
- package/dist/domain/system-components/scene-entity-navigation-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-object-html-hotspot.d.ts +0 -31
- package/dist/domain/system-components/scene-entity-object-html-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-select-hotspot.d.ts +0 -5
- package/dist/domain/system-components/scene-entity-select-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-wall-object.js +0 -1
- package/dist/domain/system-components/selectable-component.js +0 -1
- package/dist/domain/system-components/sidebar-tabs.d.ts +0 -29
- package/dist/domain/system-components/sidebar-tabs.js +0 -1
- package/dist/domain/system-components/simple-summary.js +0 -1
- package/dist/domain/system-components/size.d.ts +0 -21
- package/dist/domain/system-components/size.js +0 -1
- package/dist/domain/system-components/sketching-draw.d.ts +0 -17
- package/dist/domain/system-components/sketching-draw.js +0 -1
- package/dist/domain/system-components/sketching-edit.d.ts +0 -28
- package/dist/domain/system-components/sketching-edit.js +0 -1
- package/dist/domain/system-components/summary-component.js +0 -1
- package/dist/domain/system-components/text-value.js +0 -1
- package/dist/domain/system-components/tool-controls.js +0 -1
- package/dist/domain/system-components/tool-menu-fab.d.ts +0 -40
- package/dist/domain/system-components/tool-menu-fab.js +0 -1
- package/dist/domain/system-components/toolbar.d.ts +0 -13
- package/dist/domain/system-components/toolbar.js +0 -1
- package/dist/domain/system-components/universal-sidebar-footer.d.ts +0 -12
- package/dist/domain/system-components/universal-sidebar-footer.js +0 -1
- package/dist/domain/system-components/view-controls.js +0 -1
- package/dist/phoenix/application-spec/generate-assistant-prompt.d.ts +0 -13
- package/dist/phoenix/application-spec/generate-assistant-prompt.js +0 -1
- package/dist/phoenix/commands/generate-project-files.d.ts +0 -6
- package/dist/phoenix/commands/generate-project-files.js +0 -1
- package/dist/phoenix/commands/generated-env-markers.d.ts +0 -7
- package/dist/phoenix/commands/generated-env-markers.js +0 -1
- package/dist/phoenix/services/lingui.d.ts +0 -7
- package/dist/phoenix/services/lingui.js +0 -1
- package/dist/phoenix/services/phoenix-application.d.ts +0 -21
- package/dist/phoenix/services/phoenix-application.js +0 -1
- package/dist/react-sdk/application-runtime/runtime/god-mode.d.ts +0 -19
- package/dist/react-sdk/application-runtime/runtime/god-mode.js +0 -1
- package/dist/react-sdk/loading-state/LoadingStateProvider.d.ts +0 -31
- package/dist/react-sdk/loading-state/LoadingStateProvider.js +0 -1
- package/dist/react-sdk/loading-state/loading-state-manager.d.ts +0 -32
- package/dist/react-sdk/loading-state/loading-state-manager.js +0 -1
- /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.d.ts +0 -0
- /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.js +0 -0
- /package/dist/application-spec/{core → enhanced-json}/eval-to-constant.js +0 -0
- /package/dist/{domain/components/component-reader-types.js → application-spec/parse-application-files/spec/expressions/expression-read.js} +0 -0
- /package/dist/{domain/core/action.js → configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.js} +0 -0
- /package/dist/{domain/core/enhanced-json-schema.js → configurator/application-runtime/extensions/systems/assistant-system/assistant-image-view.js} +0 -0
- /package/dist/{domain/core/schema-validator.js → configurator/ui/assistant/form/form-model.js} +0 -0
- /package/dist/{domain/relations/reference-field.js → configurator/ui/assistant/form/form-state.js} +0 -0
- /package/dist/{domain/core/expression.js → configurator/ui/assistant/form-elements/form-element-props.js} +0 -0
- /package/dist/domain/{relations/relation-implementation.js → core/action/action.js} +0 -0
- /package/dist/domain/{components → core/component}/legacy-filter.js +0 -0
- /package/dist/domain/{components → core/component}/system-component-filter.js +0 -0
- /package/dist/domain/{components → core/component}/system-virtual-entity.d.ts +0 -0
- /package/dist/domain/{components → core/component}/updates.js +0 -0
- /package/dist/domain/{invariants → core/invariant}/builtin-invariant.js +0 -0
- /package/dist/domain/{invariants → core/invariant}/violation-component.d.ts +0 -0
- /package/dist/domain/core/{alias.d.ts → model/alias.d.ts} +0 -0
- /package/dist/domain/core/{alias.js → model/alias.js} +0 -0
- /package/dist/domain/core/{common-definitions.d.ts → model/common-definitions.d.ts} +0 -0
- /package/dist/domain/core/{common-definitions.js → model/common-definitions.js} +0 -0
- /package/dist/domain/core/{component.js → model/component.js} +0 -0
- /package/dist/domain/core/{model.js → model/model.js} +0 -0
- /package/dist/domain/core/{preset.d.ts → model/preset.d.ts} +0 -0
- /package/dist/domain/core/{preset.js → model/preset.js} +0 -0
- /package/dist/domain/{relations → core/relation}/direct-relation.js +0 -0
- /package/dist/domain/core/{schema-validator-ajv.d.ts → schema/create-ajv-schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{schema-validator-ajv.js → schema/create-ajv-schema-validator.js} +0 -0
- /package/dist/domain/core/{schema-validator-csp.d.ts → schema/create-csp-schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{schema-validator-csp.js → schema/create-csp-schema-validator.js} +0 -0
- /package/dist/domain/core/{enhanced-json-schema.d.ts → schema/enhanced-json-schema.d.ts} +0 -0
- /package/dist/domain/core/{json-schema.d.ts → schema/extended-schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{schema-validator.d.ts → schema/schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{state.js → state/state.js} +0 -0
- /package/dist/domain/{actions → domain-runtime}/action-factory.js +0 -0
- /package/dist/domain/{expressions → domain-runtime/spec}/memoize-expression.js +0 -0
- /package/dist/domain/{expressions → domain-runtime/spec}/prepare-domain-expressions.js +0 -0
- /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-custom-environment.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/color-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/common/dimension-indicators.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/common/dimension-indicators.js +0 -0
- /package/dist/domain/{system-components → extensions}/common/editable-indicator-button-variant.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/common/editable-indicator-button-variant.js +0 -0
- /package/dist/domain/{system-components → extensions}/custom-price-footer.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/finalize-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/fit-selection-orthographic-camera-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/fit-selection-perspective-camera-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/multilingual-text-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/rotatable.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-animation.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-control.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-floor-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-wall-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/selectable-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/simple-summary.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/summary-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/text-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/tool-controls.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/view-controls.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec/application}/application-instance.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec/application}/application-instance.js +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components/component-entry.js → domain/spec/components/sdk-code-ref.js} +0 -0
- /package/dist/{application-spec/parse-application-files/spec/expressions/expression.js → domain/spec/expressions/sdk-expression-implementation.js} +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.d.ts +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/states-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/states-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/actions-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/data-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/preset-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/theme-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/transformers-runtime.js +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/domain-application-context}/OnPresetLoadedHandler.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/integration}/IntegrationSubscription.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/lifecycle-providers}/LifecycleProviders.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/preset-selection}/PresetSelectionProvider.d.ts +0 -0
|
@@ -0,0 +1,3665 @@
|
|
|
1
|
+
# Nightjar Guitar
|
|
2
|
+
|
|
3
|
+
Walk a customer through a product one step at a time and end in an order. A custom guitar shop, Northfret, sells its Nightjar electric guitar through a five-step wizard: the body, the neck, the electronics, a signature on the headstock and a summary with **Place order**. A stepper across the top shows where the customer is, each step's choices slide in beside the guitar, the camera moves to what the step changes, and a bar at the bottom keeps the price, **Back** and **Next** in reach. The project writes the wizard as one layout element; the spec holds the steps, which step asks each choice, the cameras, the rules and the order action.
|
|
4
|
+
|
|
5
|
+
- [Try it](#try-it)
|
|
6
|
+
- [What the example demonstrates](#what-the-example-demonstrates)
|
|
7
|
+
- [Steps from the spec](#steps-from-the-spec)
|
|
8
|
+
- [Each step shows the choices the spec gives it](#each-step-shows-the-choices-the-spec-gives-it)
|
|
9
|
+
- [The camera follows the wizard](#the-camera-follows-the-wizard)
|
|
10
|
+
- [Finish swatches](#finish-swatches)
|
|
11
|
+
- [A signature on the headstock](#a-signature-on-the-headstock)
|
|
12
|
+
- [Summary and conflicts](#summary-and-conflicts)
|
|
13
|
+
- [Place the order](#place-the-order)
|
|
14
|
+
- [Pages that slide in](#pages-that-slide-in)
|
|
15
|
+
- [On a phone](#on-a-phone)
|
|
16
|
+
- [The stage and the model](#the-stage-and-the-model)
|
|
17
|
+
- [Test cases](#test-cases)
|
|
18
|
+
- [What this layout leaves out](#what-this-layout-leaves-out)
|
|
19
|
+
- [Related pages](#related-pages)
|
|
20
|
+
- [Complete Implementation](#complete-implementation)
|
|
21
|
+
|
|
22
|
+
## Try it
|
|
23
|
+
|
|
24
|
+
The phone version is under [On a phone](#on-a-phone).
|
|
25
|
+
|
|
26
|
+
## What the example demonstrates
|
|
27
|
+
|
|
28
|
+
[Custom Layout](?path=/docs/layouts-custom-layout--docs) explains how a project layout works: the element name, the scene, the safe area and the hooks. This page is a finished design built the same way, for a product sold in ordered steps, and it shows the pieces Custom Layout does not use:
|
|
29
|
+
|
|
30
|
+
| Piece | Where |
|
|
31
|
+
| ------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |
|
|
32
|
+
| `phx.frontend.useStepNavigation()` for a stepper and **Back** and **Next** from the spec's `navigationSteps` | `StepHeader`, `OrderBar`, [Steps from the spec](#steps-from-the-spec) |
|
|
33
|
+
| A step's fields from the components a `$filter` leaves active, read with `phx.frontend.useComponents()` | `use-active-choices`, [Each step shows…](#each-step-shows-the-choices-the-spec-gives-it) |
|
|
34
|
+
| Cameras filtered by navigation state, so the camera follows the wizard with no camera code | the spec, [The camera follows the wizard](#the-camera-follows-the-wizard) |
|
|
35
|
+
| `phx.frontend.useSwatchSelection()` for a `materialSwatch` | `FinishField`, [Finish swatches](#finish-swatches) |
|
|
36
|
+
| `phx.frontend.useTextValue()` with a `sceneEntityObjectTextDecal`, and a `fixable` rule on the text | `SignatureField`, [A signature on the headstock](#a-signature-on-the-headstock) |
|
|
37
|
+
| A summary read with the control hooks, and warnings from `phx.frontend.useFinalizeViolations()` | `SummaryPanel`, `SummaryRows`, [Summary and conflicts](#summary-and-conflicts) |
|
|
38
|
+
| `phx.frontend.useFinalizeActions()` with its pending state and error, and an `ordered` confirmation | `OrderBar`, `SummaryPanel`, [Place the order](#place-the-order) |
|
|
39
|
+
| `phx.frontend.useSceneSafeArea().update()` once a page has slid in | `DesktopPage`, `PhonePage`, [Pages that slide in](#pages-that-slide-in) |
|
|
40
|
+
| `phx.frontend.useAnalytics()` with `FrontendAnalyticsFactory.SummaryButtonClicked()` | `OrderBar`, [Steps from the spec](#steps-from-the-spec) |
|
|
41
|
+
| `sceneEntityObjectLocalMaterialOverride` with a clearcoat, and a `canvasCustomEnvironment` stage | the spec, `NightjarStage`, [The stage and the model](#the-stage-and-the-model) |
|
|
42
|
+
|
|
43
|
+
## Steps from the spec
|
|
44
|
+
|
|
45
|
+
The steps are product structure, so they live in the spec. Each navigation state is a page of the wizard; `navigationSteps` groups them into the steps the stepper shows, with their labels and their order. The summary step holds two states: `summary`, and `ordered` for the confirmation after the order.
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
navigationStates:
|
|
49
|
+
- body
|
|
50
|
+
- neck
|
|
51
|
+
- electronics
|
|
52
|
+
- details
|
|
53
|
+
- summary
|
|
54
|
+
- ordered
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
components:
|
|
59
|
+
Guitar:
|
|
60
|
+
navigationSteps:
|
|
61
|
+
main:
|
|
62
|
+
steps:
|
|
63
|
+
- label: Body
|
|
64
|
+
navigationStates:
|
|
65
|
+
- body
|
|
66
|
+
- label: Neck
|
|
67
|
+
navigationStates:
|
|
68
|
+
- neck
|
|
69
|
+
- label: Electronics
|
|
70
|
+
navigationStates:
|
|
71
|
+
- electronics
|
|
72
|
+
- label: Details
|
|
73
|
+
navigationStates:
|
|
74
|
+
- details
|
|
75
|
+
- label: Summary
|
|
76
|
+
navigationStates:
|
|
77
|
+
- summary
|
|
78
|
+
- ordered
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`phx.frontend.useStepNavigation()` reads them and returns every step with its label resolved and its `status`, `'complete'`, `'active'` or `'upcoming'`, with `next()`, `previous()` and `goTo(index)` to move. `StepHeader` draws the stepper from `steps`, and `OrderBar` the buttons from `canGoPrevious`, `isLast` and the label of the step after the active one:
|
|
82
|
+
|
|
83
|
+
- **A wizard that remembers.** The hook enforces no order: `goTo` enters any step. `StepHeader` lets the customer go back to any step they have reached and never ahead of it, so after changing the body from the summary they return to the summary in one click. The furthest step is the layout's own state, kept in `ConfiguratorLayout` with `useReachedStep()` so it survives the switch between the desktop and the phone page.
|
|
84
|
+
- **Analytics come with the moves.** `next()` and `previous()` record the built-in step buttons' events and `goTo()` the header stepper's, so the stepper and the bar need no analytics code. The button that opens the summary is the exception: like the built-in **Summary** button, it records `FrontendAnalyticsFactory.SummaryButtonClicked()` from `@salsita-ai/sdk/configurator` through `phx.frontend.useAnalytics().push()` and enters the state with `phx.frontend.useNavigate()`, because `next()` would record the next-step button's event instead.
|
|
85
|
+
- **Locked once ordered.** The stepper takes no clicks while the order is being placed or after it was placed; **Design another** in the bar returns to the first step.
|
|
86
|
+
|
|
87
|
+
## Each step shows the choices the spec gives it
|
|
88
|
+
|
|
89
|
+
The layout does not list which choice belongs to which step. A `$filter` with `navigationStates` makes a spec component active only in those states, so each choice names its step in the spec, plus the summary and the confirmation, which list every choice:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
components:
|
|
93
|
+
Guitar:
|
|
94
|
+
attributeSelection:
|
|
95
|
+
bodyShape:
|
|
96
|
+
value:
|
|
97
|
+
$bind: bodyShape
|
|
98
|
+
options:
|
|
99
|
+
- label: Offset
|
|
100
|
+
description: Contoured waist, 3.4 kg
|
|
101
|
+
value: Offset
|
|
102
|
+
- label: Single-cut
|
|
103
|
+
description: Thicker body, long sustain
|
|
104
|
+
value: SingleCut
|
|
105
|
+
$filter:
|
|
106
|
+
navigationStates:
|
|
107
|
+
- body
|
|
108
|
+
- summary
|
|
109
|
+
- ordered
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
`useActiveChoices` reads the `attributeSelection`, `materialSwatch` and `textValue` components active now with `phx.frontend.useComponents()` and orders them by the layout's field list, which also names each choice: the spec's control components carry no label.
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
import { useMemo } from 'react'
|
|
116
|
+
|
|
117
|
+
import { attributeSelectionComponent, materialSwatchComponent, textValueComponent } from '@salsita-ai/sdk/domain'
|
|
118
|
+
|
|
119
|
+
import { byFieldOrder } from './fields.js'
|
|
120
|
+
|
|
121
|
+
export type ChoiceKind = 'selection' | 'swatch' | 'text'
|
|
122
|
+
|
|
123
|
+
/** A choice of the spec that is active now. */
|
|
124
|
+
export interface ActiveChoice {
|
|
125
|
+
readonly instanceName: string
|
|
126
|
+
readonly kind: ChoiceKind
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// The guitar's choices whose spec component is active in the current navigation state, in the layout's order. A
|
|
130
|
+
// `$filter` with `navigationStates` makes a component active only in those states, so on each step this is the step's
|
|
131
|
+
// choices, and on the summary every choice. The control hooks throw for an inactive component; a field mounts only
|
|
132
|
+
// for a choice listed here.
|
|
133
|
+
export const useActiveChoices = (): readonly ActiveChoice[] => {
|
|
134
|
+
const guitarId = phx.frontend.useRootEntityId()
|
|
135
|
+
const selections = phx.frontend.useComponents({
|
|
136
|
+
componentTypes: [attributeSelectionComponent],
|
|
137
|
+
entityIds: [guitarId],
|
|
138
|
+
})
|
|
139
|
+
const swatches = phx.frontend.useComponents({ componentTypes: [materialSwatchComponent], entityIds: [guitarId] })
|
|
140
|
+
const texts = phx.frontend.useComponents({ componentTypes: [textValueComponent], entityIds: [guitarId] })
|
|
141
|
+
|
|
142
|
+
return useMemo(() => {
|
|
143
|
+
const choices = [
|
|
144
|
+
...(selections ?? []).map(
|
|
145
|
+
({ componentInstance }): ActiveChoice => ({ instanceName: componentInstance.instanceName, kind: 'selection' })
|
|
146
|
+
),
|
|
147
|
+
...(swatches ?? []).map(
|
|
148
|
+
({ componentInstance }): ActiveChoice => ({ instanceName: componentInstance.instanceName, kind: 'swatch' })
|
|
149
|
+
),
|
|
150
|
+
...(texts ?? []).map(
|
|
151
|
+
({ componentInstance }): ActiveChoice => ({ instanceName: componentInstance.instanceName, kind: 'text' })
|
|
152
|
+
),
|
|
153
|
+
]
|
|
154
|
+
|
|
155
|
+
return choices.sort((a, b) => byFieldOrder(a.instanceName, b.instanceName))
|
|
156
|
+
}, [selections, swatches, texts])
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
`StepFields` then mounts one field per active choice, by its kind. Moving a choice to another step is a change of its `$filter` in the spec, and the step follows:
|
|
161
|
+
|
|
162
|
+
```tsx
|
|
163
|
+
import { Box } from '@mui/material'
|
|
164
|
+
|
|
165
|
+
import { ChoiceField } from './ChoiceField.js'
|
|
166
|
+
import { FinishField } from './FinishField.js'
|
|
167
|
+
import { SignatureField } from './SignatureField.js'
|
|
168
|
+
import { fieldOf } from './fields.js'
|
|
169
|
+
import { useActiveChoices } from './use-active-choices.js'
|
|
170
|
+
|
|
171
|
+
interface StepFieldsProps {
|
|
172
|
+
readonly compact: boolean
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// The fields of the active step. The layout does not list which choice belongs to which step: it shows the choices
|
|
176
|
+
// the spec leaves active, so moving a choice to another step is a change of its `$filter` in the spec.
|
|
177
|
+
export const StepFields = ({ compact }: StepFieldsProps) => {
|
|
178
|
+
const choices = useActiveChoices()
|
|
179
|
+
|
|
180
|
+
return (
|
|
181
|
+
<Box component="div" sx={{ display: 'grid', gap: compact ? 2.5 : 4 }}>
|
|
182
|
+
{choices.map(({ instanceName, kind }) => {
|
|
183
|
+
const { label, warningTypes } = fieldOf(instanceName)
|
|
184
|
+
const props = { instanceName, label, warningTypes, compact }
|
|
185
|
+
|
|
186
|
+
switch (kind) {
|
|
187
|
+
case 'selection':
|
|
188
|
+
return <ChoiceField key={instanceName} {...props} />
|
|
189
|
+
case 'swatch':
|
|
190
|
+
return <FinishField key={instanceName} {...props} />
|
|
191
|
+
case 'text':
|
|
192
|
+
return <SignatureField key={instanceName} {...props} />
|
|
193
|
+
}
|
|
194
|
+
})}
|
|
195
|
+
</Box>
|
|
196
|
+
)
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Mount a field only for a choice that is active. The control hooks, such as `useAttributeSelection`, throw for a component that a `$filter` makes inactive, so a layout that renders its fields some other way checks first with `phx.frontend.useComponent({ entityId, componentType, instanceName })`, which returns `null` for an inactive component.
|
|
201
|
+
|
|
202
|
+
## The camera follows the wizard
|
|
203
|
+
|
|
204
|
+
The cameras are spec components too, and the same `$filter` switches them: the whole guitar for the body, the summary and the confirmation, the upper neck and the headstock for the neck, the pickups for the electronics, and the headstock close up for the signature. Entering a step activates its camera and the camera moves there; the layout has no camera code.
|
|
205
|
+
|
|
206
|
+
```yaml
|
|
207
|
+
components:
|
|
208
|
+
Guitar:
|
|
209
|
+
fitRootPerspectiveCamera:
|
|
210
|
+
overview:
|
|
211
|
+
fov: 30
|
|
212
|
+
fitToBox: true
|
|
213
|
+
$filter:
|
|
214
|
+
navigationStates:
|
|
215
|
+
- body
|
|
216
|
+
- summary
|
|
217
|
+
- ordered
|
|
218
|
+
staticPerspectiveCamera:
|
|
219
|
+
neck:
|
|
220
|
+
fov: 30
|
|
221
|
+
lookAtX: 0
|
|
222
|
+
lookAtY: 625
|
|
223
|
+
lookAtZ: 0
|
|
224
|
+
distance: 1350
|
|
225
|
+
azimuthAngle: 0.55
|
|
226
|
+
polarAngle: 1.36
|
|
227
|
+
$filter:
|
|
228
|
+
navigationStates:
|
|
229
|
+
- neck
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
The overview fits the guitar into the safe area the page leaves free. A `staticPerspectiveCamera` looks at a point of the model from a fixed distance, in millimetres, which suits a close-up of one part; the camera padding of the safe area still applies, so the part stays beside the panel. [Cameras / Transitions](?path=/docs/3d-scene-cameras-transitions--docs) describes when the camera moves between cameras.
|
|
233
|
+
|
|
234
|
+
## Finish swatches
|
|
235
|
+
|
|
236
|
+
The finish is a `materialSwatch`: the spec lists each swatch with its name and the colour of its chip.
|
|
237
|
+
|
|
238
|
+
```yaml
|
|
239
|
+
components:
|
|
240
|
+
Guitar:
|
|
241
|
+
materialSwatch:
|
|
242
|
+
finish:
|
|
243
|
+
selectedSwatchKey:
|
|
244
|
+
$bind: finish
|
|
245
|
+
swatches:
|
|
246
|
+
Seafoam:
|
|
247
|
+
swatchName: Seafoam green
|
|
248
|
+
color: '#8fcab6'
|
|
249
|
+
CandyRed:
|
|
250
|
+
swatchName: Candy apple red
|
|
251
|
+
color: '#b0141f'
|
|
252
|
+
Midnight:
|
|
253
|
+
swatchName: Midnight blue metallic
|
|
254
|
+
color: '#1d2b4f'
|
|
255
|
+
NaturalAsh:
|
|
256
|
+
swatchName: Natural ash
|
|
257
|
+
color: '#d8b98a'
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
`FinishField` reads it with `phx.frontend.useSwatchSelection(guitarId, 'finish', [])`. Each option has `swatchKey`, `swatchName`, `color`, `selected`, `disabled`, `hint` and `onClick()`, which writes the swatch; the third argument lists the `fixable` violation types the options ignore. The field draws the swatches as round chips in the spec's colours with the chosen one's name beside the label. How the finish renders on the guitar is the material override's business, see [The stage and the model](#the-stage-and-the-model).
|
|
261
|
+
|
|
262
|
+
## A signature on the headstock
|
|
263
|
+
|
|
264
|
+
The customer can sign the headstock. The signature is a `textValue`, and a `sceneEntityObjectTextDecal` on the `headstock` object prints it in script along the headstock's face:
|
|
265
|
+
|
|
266
|
+
```yaml
|
|
267
|
+
components:
|
|
268
|
+
Guitar:
|
|
269
|
+
textValue:
|
|
270
|
+
signature:
|
|
271
|
+
value:
|
|
272
|
+
$bind: signature
|
|
273
|
+
sceneEntityObjectTextDecal:
|
|
274
|
+
headstock:
|
|
275
|
+
text:
|
|
276
|
+
$read: signature
|
|
277
|
+
font: SignPainter-HouseScript
|
|
278
|
+
preloadFonts:
|
|
279
|
+
- SignPainter-HouseScript
|
|
280
|
+
fontSize: auto
|
|
281
|
+
textColor:
|
|
282
|
+
$read: $signatureColor
|
|
283
|
+
positionX: 0.002
|
|
284
|
+
positionY: 0.76
|
|
285
|
+
positionZ: 0.004
|
|
286
|
+
rotationZ: 1.5708
|
|
287
|
+
sizeX: 0.13
|
|
288
|
+
sizeY: 0.03
|
|
289
|
+
sizeZ: 0.02
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
The decal's instance name is the object's: `headstock` in `sceneEntityRemoteObject`. Its position, rotation and size are in the object's own units, metres for this model, and `fontSize: auto` fits the text into the decal's width. The font must be loaded by the page; `preloadFonts` redraws the decal once it is.
|
|
293
|
+
|
|
294
|
+
The headstock takes 16 characters. The limit is the expression `$signatureLimit`, declared in the spec so the layout can read it, and a `fixable` rule rejects a longer signature with a message that names it:
|
|
295
|
+
|
|
296
|
+
```ts
|
|
297
|
+
export default phx.domain.implementCustomInvariants({
|
|
298
|
+
Guitar: {
|
|
299
|
+
// `fixable`: a change that makes the signature too long is rejected, so the headstock never shows more than fits.
|
|
300
|
+
// The message names the limit, so it is built here rather than in the spec.
|
|
301
|
+
signatureLength: s => {
|
|
302
|
+
if (s.signature.length <= s.$signatureLimit) {
|
|
303
|
+
return []
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
return [
|
|
307
|
+
{
|
|
308
|
+
type: 'signatureTooLong',
|
|
309
|
+
severity: 'fixable',
|
|
310
|
+
message: `The headstock fits ${s.$signatureLimit} characters. Shorten the signature.`,
|
|
311
|
+
},
|
|
312
|
+
]
|
|
313
|
+
},
|
|
314
|
+
// `warning` in the spec: the change is kept, so a body chosen after the pickups does not undo them, and ordering
|
|
315
|
+
// waits until the customer resolves it
|
|
316
|
+
offsetHumbuckers: s => {
|
|
317
|
+
return s.bodyShape !== 'Offset' || s.pickups !== 'Humbuckers'
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
})
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
`SignatureField` writes with `phx.frontend.useTextValue(guitarId, 'signature')`. `update(event, value)` stages each value as the customer types, so the headstock follows every key, and `resolve()` commits it when they leave the field or press Enter. While the staged text breaks the rule, `hasErrors` is set and `hints` holds the rule's message, which the field shows in red with the counter; `resolve()` then rolls back to the committed signature instead, so the guitar never keeps a signature that does not fit.
|
|
324
|
+
|
|
325
|
+
```tsx
|
|
326
|
+
import { Box, InputBase, Typography } from '@mui/material'
|
|
327
|
+
|
|
328
|
+
import { FieldShell } from './FieldShell.js'
|
|
329
|
+
import { NIGHTJAR } from './tokens.js'
|
|
330
|
+
|
|
331
|
+
interface SignatureFieldProps {
|
|
332
|
+
readonly instanceName: string
|
|
333
|
+
readonly label: string
|
|
334
|
+
readonly warningTypes: readonly string[]
|
|
335
|
+
readonly compact: boolean
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// The spec's `textValue`, which the spec prints on the headstock with a text decal. Typing stages each value, so the
|
|
339
|
+
// headstock follows every key; leaving the field or pressing Enter commits it. A value the `fixable` length rule
|
|
340
|
+
// rejects shows the rule's message as the hook's `hints`, and leaving the field rolls back to the last value that
|
|
341
|
+
// fitted. The counter reads the limit from the spec's `$signatureLimit` expression, which the rule checks too.
|
|
342
|
+
export const SignatureField = ({ instanceName, label, warningTypes, compact }: SignatureFieldProps) => {
|
|
343
|
+
const guitarId = phx.frontend.useRootEntityId()
|
|
344
|
+
const guitar = phx.frontend.useRootEntityState()
|
|
345
|
+
const signature = phx.frontend.useTextValue(guitarId, instanceName)
|
|
346
|
+
const limit = guitar.$signatureLimit
|
|
347
|
+
|
|
348
|
+
return (
|
|
349
|
+
<FieldShell
|
|
350
|
+
id={`nightjar-${instanceName}`}
|
|
351
|
+
label={label}
|
|
352
|
+
aside={
|
|
353
|
+
<Typography
|
|
354
|
+
aria-live="polite"
|
|
355
|
+
sx={{
|
|
356
|
+
fontFamily: NIGHTJAR.font,
|
|
357
|
+
fontSize: 13,
|
|
358
|
+
fontVariantNumeric: 'tabular-nums',
|
|
359
|
+
color: signature.hasErrors ? NIGHTJAR.alert : NIGHTJAR.muted,
|
|
360
|
+
}}
|
|
361
|
+
>
|
|
362
|
+
{signature.value.length} / {limit}
|
|
363
|
+
</Typography>
|
|
364
|
+
}
|
|
365
|
+
hint={
|
|
366
|
+
compact ? undefined : 'In gold leaf on dark necks, in black on maple. Leave it empty for a plain headstock.'
|
|
367
|
+
}
|
|
368
|
+
warningTypes={warningTypes}
|
|
369
|
+
compact={compact}
|
|
370
|
+
>
|
|
371
|
+
<Box
|
|
372
|
+
component="div"
|
|
373
|
+
sx={{
|
|
374
|
+
display: 'grid',
|
|
375
|
+
gap: 1,
|
|
376
|
+
paddingInline: 2,
|
|
377
|
+
paddingBlock: compact ? 1 : 1.5,
|
|
378
|
+
borderRadius: 1.5,
|
|
379
|
+
border: `1px solid ${signature.hasErrors ? NIGHTJAR.alert : NIGHTJAR.line}`,
|
|
380
|
+
bgcolor: NIGHTJAR.raised,
|
|
381
|
+
'&:focus-within': { borderColor: signature.hasErrors ? NIGHTJAR.alert : NIGHTJAR.amber },
|
|
382
|
+
}}
|
|
383
|
+
>
|
|
384
|
+
<InputBase
|
|
385
|
+
value={signature.value}
|
|
386
|
+
placeholder="Your name"
|
|
387
|
+
onChange={event => signature.update(event, event.target.value)}
|
|
388
|
+
onBlur={signature.resolve}
|
|
389
|
+
onKeyDown={event => {
|
|
390
|
+
if (event.key === 'Enter') {
|
|
391
|
+
signature.resolve()
|
|
392
|
+
}
|
|
393
|
+
}}
|
|
394
|
+
inputProps={{
|
|
395
|
+
'aria-labelledby': `nightjar-${instanceName}-label`,
|
|
396
|
+
'aria-invalid': signature.hasErrors,
|
|
397
|
+
'aria-describedby': `nightjar-${instanceName}-error`,
|
|
398
|
+
spellCheck: false,
|
|
399
|
+
}}
|
|
400
|
+
sx={{
|
|
401
|
+
fontFamily: NIGHTJAR.script,
|
|
402
|
+
fontSize: compact ? 30 : 38,
|
|
403
|
+
lineHeight: 1.2,
|
|
404
|
+
color: NIGHTJAR.amber,
|
|
405
|
+
'& input::placeholder': { color: NIGHTJAR.faint, opacity: 1 },
|
|
406
|
+
}}
|
|
407
|
+
/>
|
|
408
|
+
</Box>
|
|
409
|
+
<Typography
|
|
410
|
+
id={`nightjar-${instanceName}-error`}
|
|
411
|
+
role="alert"
|
|
412
|
+
sx={{ fontFamily: NIGHTJAR.font, fontSize: 14, color: NIGHTJAR.alert, '&:empty': { display: 'none' } }}
|
|
413
|
+
>
|
|
414
|
+
{signature.hasErrors ? signature.hints : ''}
|
|
415
|
+
</Typography>
|
|
416
|
+
</FieldShell>
|
|
417
|
+
)
|
|
418
|
+
}
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
## Summary and conflicts
|
|
422
|
+
|
|
423
|
+
The last step reviews the guitar. `SummaryRows` lists every choice active in the `summary` state with the control hook of its kind: the option's `title` from `useAttributeSelection`, the swatch's name and colour from `useSwatchSelection`, the text from `useTextValue`. The summary only reviews; a choice is changed on its step.
|
|
424
|
+
|
|
425
|
+
One rule spans two steps: the Offset body is routed for single-coil-sized pickups. It is a `warning`, so a change that breaks it is kept, and a body chosen after the pickups does not undo them:
|
|
426
|
+
|
|
427
|
+
```yaml
|
|
428
|
+
invariants:
|
|
429
|
+
Guitar:
|
|
430
|
+
offsetHumbuckers:
|
|
431
|
+
type: offsetHumbuckers
|
|
432
|
+
severity: warning
|
|
433
|
+
message: The Offset body is routed for single-coil-sized pickups. Choose single coils or P-90s, or the Single-cut body for humbuckers.
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
While it holds, the layout shows it three times, each read from `phx.frontend.useFinalizeViolations().violations`: under the **Pickups** and **Body shape** fields, as a mark on the **Electronics** step, and on the summary with **Go to Electronics**. The layout's `STEP_WARNINGS` names the step that resolves each warning.
|
|
437
|
+
|
|
438
|
+
## Place the order
|
|
439
|
+
|
|
440
|
+
The spec declares the order action, and the handler, `src/handlers/place-order.ts`, stands in for the shop's order service:
|
|
441
|
+
|
|
442
|
+
```yaml
|
|
443
|
+
components:
|
|
444
|
+
Guitar:
|
|
445
|
+
finalizeAction:
|
|
446
|
+
placeOrder:
|
|
447
|
+
variant: primary
|
|
448
|
+
label: Place order
|
|
449
|
+
title: Send the guitar as configured to the Northfret workshop
|
|
450
|
+
icon: ShoppingBag
|
|
451
|
+
handler: placeOrder
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
```ts
|
|
455
|
+
import { useCallback } from 'react'
|
|
456
|
+
|
|
457
|
+
// Stands in for Northfret's order service. Placing an order takes a moment. The service checks stock when the order
|
|
458
|
+
// arrives, which the configurator cannot know beforehand: gold hardware is back-ordered, so it refuses that order with
|
|
459
|
+
// its reason; any other order is accepted and the page shows the confirmation.
|
|
460
|
+
export default phx.frontend.createPhoenixHandler('placeOrder', () => {
|
|
461
|
+
const navigate = phx.frontend.useNavigate()
|
|
462
|
+
const guitar = phx.frontend.useRootEntityState()
|
|
463
|
+
|
|
464
|
+
return {
|
|
465
|
+
handler: useCallback(async () => {
|
|
466
|
+
await new Promise(resolve => setTimeout(resolve, 1600))
|
|
467
|
+
|
|
468
|
+
if (guitar.hardware === 'Gold') {
|
|
469
|
+
throw new Error(
|
|
470
|
+
'Gold hardware is back-ordered until next month. Choose chrome or black hardware, or order later.'
|
|
471
|
+
)
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
navigate('ordered')
|
|
475
|
+
}, [guitar.hardware, navigate]),
|
|
476
|
+
}
|
|
477
|
+
})
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
**Place order** sits in the bar on the summary step. It runs `phx.frontend.useFinalizeActions().primary`:
|
|
481
|
+
|
|
482
|
+
- **Blocked.** While a warning holds, the action is `disabled` and `hints` holds the warnings' text: the bar shows "Settle the choices above first" beside the button, and the summary lists the conflicts. The name and the e-mail are the layout's own state. The button stays clickable; while either blocks the order, a click reveals what is missing from the form instead of ordering.
|
|
483
|
+
- **Pending.** `run()` starts the handler beside the layout; `isPending` turns the button into "Placing order…" with a spinner and locks the stepper, **Back** and the form.
|
|
484
|
+
- **Failed.** The service refuses gold hardware, which the configurator cannot know beforehand. The handler throws, and the action's `error` is shown at the top of the summary; no snackbar is raised. **Place order** stays available to try again.
|
|
485
|
+
- **Placed.** The handler enters `ordered`, where the panel thanks the customer by name with an order number made from the configuration's id, and lists the build.
|
|
486
|
+
|
|
487
|
+
A viewer of a shared configuration sees no **Place order**: neither hook checks read mode, so the bar hides it while `phx.frontend.useAccessService().accessInfo.viewMode` is set.
|
|
488
|
+
|
|
489
|
+
## Pages that slide in
|
|
490
|
+
|
|
491
|
+
`ConfiguratorLayout` keeps the scene mounted and lays the desktop or the phone page over it, by the width of the configurator's container from `phx.frontend.useActiveViewports()`. It also holds the contact form's state and the furthest step reached, so both survive the switch between the two, and the form survives the move to the confirmation.
|
|
492
|
+
|
|
493
|
+
```tsx
|
|
494
|
+
import { Box } from '@mui/material'
|
|
495
|
+
|
|
496
|
+
import { LayoutSlots } from '@salsita-ai/sdk/configurator'
|
|
497
|
+
|
|
498
|
+
import { NIGHTJAR } from '../_fields/index.js'
|
|
499
|
+
import { DesktopPage } from '../_shared/DesktopPage.js'
|
|
500
|
+
import { PhonePage } from '../_shared/PhonePage.js'
|
|
501
|
+
import { useOrderForm } from '../_shared/order-form.js'
|
|
502
|
+
import { useReachedStep } from '../_shared/use-reached-step.js'
|
|
503
|
+
|
|
504
|
+
// A wizard over the scene. The canvas stays mounted the whole time; the desktop or the phone page lies over it. The
|
|
505
|
+
// contact form's state and the furthest step reached live here, so they survive the switch between the two; the form
|
|
506
|
+
// also survives the move to the confirmation.
|
|
507
|
+
const ConfiguratorLayout = () => {
|
|
508
|
+
// `null` until the container has been measured; only the scene shows until then
|
|
509
|
+
const viewports = phx.frontend.useActiveViewports()
|
|
510
|
+
const { activeIndex } = phx.frontend.useStepNavigation()
|
|
511
|
+
const form = useOrderForm()
|
|
512
|
+
const reached = useReachedStep(activeIndex)
|
|
513
|
+
const isDesktop = viewports?.includes('desktop') ?? false
|
|
514
|
+
|
|
515
|
+
return (
|
|
516
|
+
<Box component="div" sx={{ position: 'absolute', inset: 0, overflow: 'clip', bgcolor: NIGHTJAR.ink }}>
|
|
517
|
+
<LayoutSlots.SharedCanvas />
|
|
518
|
+
{viewports !== null &&
|
|
519
|
+
(isDesktop ? <DesktopPage form={form} reached={reached} /> : <PhonePage form={form} reached={reached} />)}
|
|
520
|
+
</Box>
|
|
521
|
+
)
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
export default phx.frontend.createCustomPhoenixLayoutElement('ConfiguratorLayout', ConfiguratorLayout)
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
Each page measures its safe area with `phx.frontend.useSceneSafeArea()`. The summary's panel is wider than a step's, so the steps, the summary and the confirmation are three pages, each with its own safe area, and each slides in when it opens. The safe area slides with its page: the measurement taken when the page mounts sees it shifted, and a `transform` that ends is not a resize, so nothing measures again. The page calls `update()` from the same hook when its own slide ends, not when the step content's slide inside it does. Without it the guitar stays shifted sideways by the slide's 48 pixels.
|
|
528
|
+
|
|
529
|
+
```tsx
|
|
530
|
+
import { Box, Typography } from '@mui/material'
|
|
531
|
+
import type { AnimationEvent } from 'react'
|
|
532
|
+
|
|
533
|
+
import { ENTER_FROM_END, HEADING_SX, NIGHTJAR } from '../_fields/index.js'
|
|
534
|
+
import { OrderBar } from './OrderBar.js'
|
|
535
|
+
import { OrderConfirmation } from './OrderConfirmation.js'
|
|
536
|
+
import { StepHeader } from './StepHeader.js'
|
|
537
|
+
import { StepPanel } from './StepPanel.js'
|
|
538
|
+
import { SummaryPanel } from './SummaryPanel.js'
|
|
539
|
+
import type { OrderForm } from './order-form.js'
|
|
540
|
+
|
|
541
|
+
type Page = 'steps' | 'summary' | 'ordered'
|
|
542
|
+
|
|
543
|
+
// The summary needs room for the contact form, so its panel is wider
|
|
544
|
+
const PANEL_WIDTHS: Readonly<Record<Page, number>> = { steps: 420, summary: 520, ordered: 420 }
|
|
545
|
+
|
|
546
|
+
const pageOf = (navigationState: string): Page => {
|
|
547
|
+
return navigationState === 'ordered' ? 'ordered' : navigationState === 'summary' ? 'summary' : 'steps'
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// The brand's mark: a fret of amber over the name of the shop
|
|
551
|
+
const Brand = () => {
|
|
552
|
+
return (
|
|
553
|
+
<Box component="div" sx={{ display: 'flex', alignItems: 'center', gap: 1.5, flex: 'none' }}>
|
|
554
|
+
<Box component="span" aria-hidden sx={{ inlineSize: 4, blockSize: 28, bgcolor: NIGHTJAR.amber }} />
|
|
555
|
+
<Box component="div" sx={{ display: 'grid' }}>
|
|
556
|
+
<Typography sx={{ ...HEADING_SX, fontSize: 16, letterSpacing: '0.32em', lineHeight: 1.1 }}>
|
|
557
|
+
Northfret
|
|
558
|
+
</Typography>
|
|
559
|
+
<Typography sx={{ ...HEADING_SX, fontSize: 10, letterSpacing: '0.36em', color: NIGHTJAR.muted }}>
|
|
560
|
+
Custom shop
|
|
561
|
+
</Typography>
|
|
562
|
+
</Box>
|
|
563
|
+
</Box>
|
|
564
|
+
)
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
interface DesktopPageProps {
|
|
568
|
+
readonly form: OrderForm
|
|
569
|
+
readonly reached: number
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
// The desktop wizard: the stepper on top, the guitar in the free area on the left, the panel of the step on the
|
|
573
|
+
// right and the bar with the price at the bottom.
|
|
574
|
+
//
|
|
575
|
+
// The summary's panel is wider than a step's, so the steps, the summary and the confirmation are three pages, each
|
|
576
|
+
// with its own safe area, and each slides in when it opens. The safe area slides with its page: the first
|
|
577
|
+
// measurement, taken when the page mounts, sees it shifted, and no resize follows when the slide ends. `update()`
|
|
578
|
+
// from `useSceneSafeArea` measures again once the slide has settled, so the camera frames the guitar in the place the
|
|
579
|
+
// page leaves for it.
|
|
580
|
+
export const DesktopPage = ({ form, reached }: DesktopPageProps) => {
|
|
581
|
+
const { containerRef, safeAreaRef, update } = phx.frontend.useSceneSafeArea()
|
|
582
|
+
const navigationState = phx.frontend.useActiveNavigationState()
|
|
583
|
+
const page = pageOf(navigationState)
|
|
584
|
+
|
|
585
|
+
// The step's own content slides too; only the page's slide moves the safe area
|
|
586
|
+
const handleAnimationEnd = (event: AnimationEvent<HTMLDivElement>) => {
|
|
587
|
+
if (event.target === event.currentTarget) {
|
|
588
|
+
update()
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
return (
|
|
593
|
+
<Box
|
|
594
|
+
component="div"
|
|
595
|
+
ref={containerRef}
|
|
596
|
+
sx={{
|
|
597
|
+
position: 'absolute',
|
|
598
|
+
inset: 0,
|
|
599
|
+
display: 'grid',
|
|
600
|
+
gridTemplateRows: 'auto minmax(0, 1fr) auto',
|
|
601
|
+
fontFamily: NIGHTJAR.font,
|
|
602
|
+
color: NIGHTJAR.cream,
|
|
603
|
+
// The free area lies over the canvas; only the bars and the panel take the pointer
|
|
604
|
+
pointerEvents: 'none',
|
|
605
|
+
}}
|
|
606
|
+
>
|
|
607
|
+
<Box
|
|
608
|
+
component="header"
|
|
609
|
+
sx={{
|
|
610
|
+
display: 'flex',
|
|
611
|
+
alignItems: 'center',
|
|
612
|
+
gap: 5,
|
|
613
|
+
minBlockSize: 72,
|
|
614
|
+
paddingInline: 4,
|
|
615
|
+
bgcolor: NIGHTJAR.ink,
|
|
616
|
+
borderBlockEnd: `1px solid ${NIGHTJAR.line}`,
|
|
617
|
+
pointerEvents: 'auto',
|
|
618
|
+
}}
|
|
619
|
+
>
|
|
620
|
+
<Brand />
|
|
621
|
+
<StepHeader compact={false} reached={reached} />
|
|
622
|
+
</Box>
|
|
623
|
+
|
|
624
|
+
<Box
|
|
625
|
+
component="div"
|
|
626
|
+
key={page}
|
|
627
|
+
onAnimationEnd={handleAnimationEnd}
|
|
628
|
+
sx={{
|
|
629
|
+
display: 'grid',
|
|
630
|
+
gridTemplateColumns: `minmax(0, 1fr) ${PANEL_WIDTHS[page]}px`,
|
|
631
|
+
minBlockSize: 0,
|
|
632
|
+
animation: `${ENTER_FROM_END} 480ms cubic-bezier(0.2, 0.7, 0.2, 1)`,
|
|
633
|
+
'@media (prefers-reduced-motion: reduce)': { animation: 'none' },
|
|
634
|
+
}}
|
|
635
|
+
>
|
|
636
|
+
<Box component="div" sx={{ position: 'relative', minInlineSize: 0 }}>
|
|
637
|
+
{/* The camera fits the guitar into this box, so its inset is the room around the guitar */}
|
|
638
|
+
<Box component="div" ref={safeAreaRef} sx={{ position: 'absolute', inset: '40px 72px 56px' }} />
|
|
639
|
+
<Typography
|
|
640
|
+
sx={{
|
|
641
|
+
position: 'absolute',
|
|
642
|
+
insetBlockEnd: 20,
|
|
643
|
+
insetInline: 0,
|
|
644
|
+
textAlign: 'center',
|
|
645
|
+
fontSize: 12,
|
|
646
|
+
letterSpacing: '0.14em',
|
|
647
|
+
textTransform: 'uppercase',
|
|
648
|
+
color: NIGHTJAR.faint,
|
|
649
|
+
}}
|
|
650
|
+
>
|
|
651
|
+
Drag to turn the guitar
|
|
652
|
+
</Typography>
|
|
653
|
+
</Box>
|
|
654
|
+
<Box
|
|
655
|
+
component="aside"
|
|
656
|
+
aria-label={page === 'steps' ? 'Step' : page === 'summary' ? 'Summary' : 'Order'}
|
|
657
|
+
sx={{
|
|
658
|
+
overflowY: 'auto',
|
|
659
|
+
paddingInline: 4,
|
|
660
|
+
paddingBlock: 4,
|
|
661
|
+
bgcolor: NIGHTJAR.panel,
|
|
662
|
+
borderInlineStart: `1px solid ${NIGHTJAR.line}`,
|
|
663
|
+
pointerEvents: 'auto',
|
|
664
|
+
}}
|
|
665
|
+
>
|
|
666
|
+
{page === 'steps' && <StepPanel compact={false} />}
|
|
667
|
+
{page === 'summary' && <SummaryPanel compact={false} form={form} />}
|
|
668
|
+
{page === 'ordered' && <OrderConfirmation compact={false} contact={form.contact} />}
|
|
669
|
+
</Box>
|
|
670
|
+
</Box>
|
|
671
|
+
|
|
672
|
+
<OrderBar compact={false} form={form} />
|
|
673
|
+
</Box>
|
|
674
|
+
)
|
|
675
|
+
}
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
## On a phone
|
|
679
|
+
|
|
680
|
+
The same layout in a frame 390 pixels wide, as on a phone. A compact "2 / 5 · Neck" line with a thin progress bar replaces the stepper, the choices become chips in a row that scrolls sideways, the guitar keeps the top of the screen and the bar stays fixed at the bottom. Opened on its own from the sidebar, the **Phone** story sets Storybook's viewport to 390 × 844.
|
|
681
|
+
|
|
682
|
+
## The stage and the model
|
|
683
|
+
|
|
684
|
+
The spec's `canvasCustomEnvironment` names `NightjarStage`, a layout element rendered inside the scene: a dark room with a warm glow on the wall behind the guitar, a warm key light and a cool rim. drei's `Lightformer` panels exist only in the reflections, where they draw the long highlights on the clearcoat and the hardware, and no image has to be downloaded.
|
|
685
|
+
|
|
686
|
+
```tsx
|
|
687
|
+
import { Environment, Lightformer } from '@react-three/drei'
|
|
688
|
+
import { useMemo } from 'react'
|
|
689
|
+
import { CanvasTexture, SRGBColorSpace } from 'three'
|
|
690
|
+
|
|
691
|
+
import { NIGHTJAR } from '../_fields/index.js'
|
|
692
|
+
|
|
693
|
+
/** A warm pool of light that fades into the dark, drawn once on a canvas. */
|
|
694
|
+
const createGlow = (): CanvasTexture => {
|
|
695
|
+
const size = 512
|
|
696
|
+
const canvas = document.createElement('canvas')
|
|
697
|
+
canvas.width = size
|
|
698
|
+
canvas.height = size
|
|
699
|
+
const context = canvas.getContext('2d')
|
|
700
|
+
|
|
701
|
+
if (context) {
|
|
702
|
+
const gradient = context.createRadialGradient(size / 2, size / 2, 0, size / 2, size / 2, size / 2)
|
|
703
|
+
gradient.addColorStop(0, 'rgba(242, 163, 58, 0.42)')
|
|
704
|
+
gradient.addColorStop(0.22, 'rgba(214, 112, 46, 0.2)')
|
|
705
|
+
gradient.addColorStop(0.5, 'rgba(122, 30, 43, 0.07)')
|
|
706
|
+
gradient.addColorStop(0.75, 'rgba(14, 15, 18, 0)')
|
|
707
|
+
context.fillStyle = gradient
|
|
708
|
+
context.fillRect(0, 0, size, size)
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
const texture = new CanvasTexture(canvas)
|
|
712
|
+
texture.colorSpace = SRGBColorSpace
|
|
713
|
+
return texture
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
// The stage named by the spec's `canvasCustomEnvironment`: a dark room with a warm glow on the wall behind the guitar,
|
|
717
|
+
// a warm key light and a cool rim. The light panels exist only in the reflections, where they draw the long highlights
|
|
718
|
+
// on the clearcoat and the hardware. The scene is in millimetres.
|
|
719
|
+
export default phx.frontend.createCustomPhoenixLayoutElement('NightjarStage', () => {
|
|
720
|
+
const glow = useMemo(createGlow, [])
|
|
721
|
+
|
|
722
|
+
return (
|
|
723
|
+
<>
|
|
724
|
+
<color attach="background" args={[NIGHTJAR.ink]} />
|
|
725
|
+
<ambientLight intensity={0.4} />
|
|
726
|
+
<directionalLight position={[-900, 1400, 1600]} intensity={2.4} color="#ffe6c7" />
|
|
727
|
+
<directionalLight position={[1400, 700, -900]} intensity={1.2} color="#a9c1ff" />
|
|
728
|
+
|
|
729
|
+
{/* The glow on the wall, behind the guitar and out of the camera's fit */}
|
|
730
|
+
<mesh position={[-250, 300, -900]}>
|
|
731
|
+
<planeGeometry args={[3600, 3600]} />
|
|
732
|
+
<meshBasicMaterial map={glow} transparent depthWrite={false} toneMapped={false} />
|
|
733
|
+
</mesh>
|
|
734
|
+
|
|
735
|
+
<Environment resolution={256} frames={1}>
|
|
736
|
+
<color attach="background" args={['#15161b']} />
|
|
737
|
+
{/* Tall strips at both sides for the long highlights, a softbox above, an amber wash behind */}
|
|
738
|
+
<Lightformer form="rect" intensity={7} position={[-5, 1, 3]} rotation-y={Math.PI / 3} scale={[1.2, 9, 1]} />
|
|
739
|
+
<Lightformer form="rect" intensity={4} position={[5, 1, 2]} rotation-y={-Math.PI / 3} scale={[1, 9, 1]} />
|
|
740
|
+
<Lightformer form="rect" intensity={2.5} position={[0, 6, 1]} rotation-x={Math.PI / 2} scale={[8, 3, 1]} />
|
|
741
|
+
<Lightformer form="rect" intensity={1.2} position={[0, 1, 7]} rotation-y={Math.PI} scale={[8, 4, 1]} />
|
|
742
|
+
<Lightformer form="rect" color={NIGHTJAR.amber} intensity={0.8} position={[0, -2, -7]} scale={[10, 3, 1]} />
|
|
743
|
+
</Environment>
|
|
744
|
+
</>
|
|
745
|
+
)
|
|
746
|
+
})
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
The finish is a physical material with a clearcoat, set per body object with `sceneEntityObjectLocalMaterialOverride`: the override names the object, and only that object's `Finish` material changes. Natural ash shows a wood texture through the clearcoat; the paints have none. The materials many parts share, such as `Hardware` on the tuners, the bridges, the knobs and the switches, use `sceneEntityLocalMaterialOverride`, which changes every object of the entity that carries the material. The values come from expressions in `src/expressions/guitar.ts`, which also price the guitar.
|
|
750
|
+
|
|
751
|
+
```yaml
|
|
752
|
+
components:
|
|
753
|
+
Guitar:
|
|
754
|
+
sceneEntityObjectLocalMaterialOverride:
|
|
755
|
+
bodyOffset:
|
|
756
|
+
materialsToOverride:
|
|
757
|
+
- Finish
|
|
758
|
+
materialType: physical
|
|
759
|
+
color:
|
|
760
|
+
$read: $finishColor
|
|
761
|
+
textureUrl:
|
|
762
|
+
$read: $finishTexture
|
|
763
|
+
metalness:
|
|
764
|
+
$read: $finishMetalness
|
|
765
|
+
roughness:
|
|
766
|
+
$read: $finishRoughness
|
|
767
|
+
clearcoat: 1
|
|
768
|
+
clearcoatRoughness: 0.04
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
The guitar is `public/models/gallery/guitar.glb`, generated by `scripts/models/guitar.ts` in the Storybook package from three.js geometry: two bodies extruded from their outlines with a rounded bevel, a pickguard for each, the neck, fretboard, frets, inlays, headstock, tuners and strings, three pickup sets and the bridges, knobs and switches of each body. Each part is a named node the spec loads with `sceneEntityRemoteObject.<name>.objectName`; `sceneEntityObjectProperties` shows the parts of the chosen body and pickups. The script lives in `scripts/models/`, outside the example's `src/`, because every file under `src/` is part of this page.
|
|
772
|
+
|
|
773
|
+
## Test cases
|
|
774
|
+
|
|
775
|
+
- The page opens on **Body**: the Offset in Seafoam green with a parchment pickguard, maple neck, rosewood board, single coils and chrome, **$1,650.00**, and **Next: Neck**. The stepper shows step 1 active and the rest upcoming, which cannot be clicked yet.
|
|
776
|
+
- **Candy apple red** turns the body red under a glossy clearcoat at $1,830.00; **Natural ash** shows the wood grain. The finish's name appears beside the label.
|
|
777
|
+
- **Single-cut** swaps the body, its small pickguard, the bar bridge with a tailpiece, four knobs and the toggle switch, and adds $150. **None** removes the pickguard.
|
|
778
|
+
- **Next: Neck** slides the neck's choices in from the right and moves the camera to the upper neck and the headstock. **Roasted maple** and **Ebony** change the neck and the board; on a maple board the dots turn black.
|
|
779
|
+
- **Back** slides the body's choices in from the left and returns the camera to the whole guitar.
|
|
780
|
+
- On **Electronics** the camera moves to the pickups. **Humbuckers** on the Offset shows "The Offset body is routed for single-coil-sized pickups. …" under **Pickups**, and the stepper marks **Electronics**. **P-90s** clears both.
|
|
781
|
+
- **Gold** turns the tuners, the bridge, the knobs and the switch gold.
|
|
782
|
+
- On **Details** the camera shows the headstock. Typing a name prints it on the headstock as you type, in gold on a dark neck and in black on maple; the counter shows the characters used of 16, and the price rises by $45.
|
|
783
|
+
- Typing past 16 characters turns the counter and the field red and shows "The headstock fits 16 characters. Shorten the signature."; leaving the field puts back the signature committed before, and the headstock with it.
|
|
784
|
+
- **Review order** opens the summary: a wider panel lists every choice, with the signature in script. With the humbucker conflict, the summary lists it with **Go to Electronics**, the bar shows "Settle the choices above first", and **Place order** reveals "Enter the name the order is for." and "Enter an e-mail address for the build updates." under the empty fields.
|
|
785
|
+
- **Go to Electronics** opens that step; after **P-90s**, the stepper's **Summary** returns to the summary in one click.
|
|
786
|
+
- After going back from the summary to an earlier step, narrowing the window until the phone page shows and widening it again leaves the stepper's **Summary** enabled.
|
|
787
|
+
- With a name and an e-mail, **Place order** shows "Placing order…" with a spinner for under two seconds. With gold hardware it then shows "The order did not go through" and the service's reason at the top of the summary; with chrome or black it opens the confirmation: "Thank you, …", the order number, the e-mail and the build. The stepper no longer takes clicks, and **Design another** returns to **Body**.
|
|
788
|
+
- Each step, the summary and the confirmation leave the guitar centred in the area beside the panel once their slide has settled.
|
|
789
|
+
- With the browser console's Verbose level, **Next** and **Back** log the step buttons' `nextStepButton` and `previousStepButton` events, the stepper the `topNavigation` `step` event, **Review order** the `summaryButton` event and **Place order** the `finalizeButton` event: without a Google Tag Manager id, Storybook's analytics log their events with `console.debug`.
|
|
790
|
+
- In the **Phone** story the guitar keeps the top of the screen, "1 / 5 · Body" and the progress line sit above it, the choices are chips in rows that scroll sideways, and **Next**, **Review order** and **Place order** work as on the desktop.
|
|
791
|
+
- The browser console shows no errors, apart from the "Failed to finalize" line that the refused order with gold hardware logs.
|
|
792
|
+
|
|
793
|
+
## What this layout leaves out
|
|
794
|
+
|
|
795
|
+
- **Messages for rejected changes.** The only rule that rejects a change is the signature's, which the field explains itself, so the layout mounts neither `LayoutSlots.Services` nor `phx.frontend.useConfiguratorMessages()`. A project whose other rules reject changes, or that saves the configuration, mounts one of the two so a rejected change or a failed save is not silent; see [Custom Layout → Show messages](?path=/docs/layouts-custom-layout--docs#show-messages).
|
|
796
|
+
- **Read mode.** **Place order** is hidden while `phx.frontend.useAccessService().accessInfo.viewMode` is set, but the fields stay editable and the example ships no read template; [Custom Layout → Serve read mode](?path=/docs/layouts-custom-layout--docs#serve-read-mode) shows one.
|
|
797
|
+
- **An order that outlives the page.** The order number is made from the configuration's id and the contact details are the layout's state, so a configuration reopened in the `ordered` state thanks no one by name. A deployed project sends the details with the order and shows what its service answers.
|
|
798
|
+
- **The built-in arrangement.** Header, sidebar, sidebar footer, tabs, tool and view controls and the toolbar are not mounted; [Layout Slots](?path=/docs/phoenix-layout-slots--docs) lists every slot a project layout can mount.
|
|
799
|
+
|
|
800
|
+
## Related pages
|
|
801
|
+
|
|
802
|
+
- [Kestrel Kettle](?path=/docs/layouts-gallery-kestrel-kettle--docs) sells a small product from one page, and [Ardent Compressor](?path=/docs/layouts-gallery-ardent-compressor--docs) is a stepped quote builder without a scene.
|
|
803
|
+
- [Custom Layout](?path=/docs/layouts-custom-layout--docs) explains a project layout step by step.
|
|
804
|
+
- [Configurator Interface → Hooks for a Project Layout](?path=/docs/phoenix-configurator-interface--docs#hooks-for-a-project-layout) lists the hooks used here, steps and tabs included.
|
|
805
|
+
- [Floating Header → Adding step navigation](?path=/docs/layouts-header-floating--docs#adding-step-navigation) shows the built-in stepper over the same `navigationSteps`.
|
|
806
|
+
- [Domain Model → Invariants](?path=/docs/phoenix-domain-model--docs#invariants) describes the rules.
|
|
807
|
+
- [Finalization](?path=/docs/phoenix-finalization--docs) describes the server side of a finalize action.
|
|
808
|
+
|
|
809
|
+
## Complete Implementation
|
|
810
|
+
|
|
811
|
+
{/* AUTO-GENERATED SECTION: This section is automatically updated by 'phoenix story build' */}
|
|
812
|
+
|
|
813
|
+
<details>
|
|
814
|
+
<summary>Click to view the complete implementation files</summary>
|
|
815
|
+
|
|
816
|
+
### ./spec/domain.yaml
|
|
817
|
+
|
|
818
|
+
```yaml
|
|
819
|
+
model:
|
|
820
|
+
latest:
|
|
821
|
+
entityTypes:
|
|
822
|
+
- Guitar
|
|
823
|
+
aliases:
|
|
824
|
+
RootEntity:
|
|
825
|
+
- Guitar
|
|
826
|
+
commonTypes:
|
|
827
|
+
BodyShape:
|
|
828
|
+
enum:
|
|
829
|
+
- Offset
|
|
830
|
+
- SingleCut
|
|
831
|
+
Finish:
|
|
832
|
+
enum:
|
|
833
|
+
- Seafoam
|
|
834
|
+
- CandyRed
|
|
835
|
+
- Midnight
|
|
836
|
+
- NaturalAsh
|
|
837
|
+
Pickguard:
|
|
838
|
+
enum:
|
|
839
|
+
- Parchment
|
|
840
|
+
- Black
|
|
841
|
+
- Pearloid
|
|
842
|
+
- None
|
|
843
|
+
NeckWood:
|
|
844
|
+
enum:
|
|
845
|
+
- Maple
|
|
846
|
+
- RoastedMaple
|
|
847
|
+
- Mahogany
|
|
848
|
+
Fretboard:
|
|
849
|
+
enum:
|
|
850
|
+
- Maple
|
|
851
|
+
- Rosewood
|
|
852
|
+
- Ebony
|
|
853
|
+
Pickups:
|
|
854
|
+
enum:
|
|
855
|
+
- SingleCoils
|
|
856
|
+
- Humbuckers
|
|
857
|
+
- P90s
|
|
858
|
+
Hardware:
|
|
859
|
+
enum:
|
|
860
|
+
- Chrome
|
|
861
|
+
- Gold
|
|
862
|
+
- Black
|
|
863
|
+
shapes:
|
|
864
|
+
Guitar:
|
|
865
|
+
bodyShape:
|
|
866
|
+
$ref: '#/model/latest/commonTypes/BodyShape'
|
|
867
|
+
finish:
|
|
868
|
+
$ref: '#/model/latest/commonTypes/Finish'
|
|
869
|
+
pickguard:
|
|
870
|
+
$ref: '#/model/latest/commonTypes/Pickguard'
|
|
871
|
+
neckWood:
|
|
872
|
+
$ref: '#/model/latest/commonTypes/NeckWood'
|
|
873
|
+
fretboard:
|
|
874
|
+
$ref: '#/model/latest/commonTypes/Fretboard'
|
|
875
|
+
pickups:
|
|
876
|
+
$ref: '#/model/latest/commonTypes/Pickups'
|
|
877
|
+
hardware:
|
|
878
|
+
$ref: '#/model/latest/commonTypes/Hardware'
|
|
879
|
+
signature:
|
|
880
|
+
type: string
|
|
881
|
+
|
|
882
|
+
presets:
|
|
883
|
+
- rootEntityType: Guitar
|
|
884
|
+
initialDomainEntities:
|
|
885
|
+
- id: Guitar-1
|
|
886
|
+
type: Guitar
|
|
887
|
+
bodyShape: Offset
|
|
888
|
+
finish: Seafoam
|
|
889
|
+
pickguard: Parchment
|
|
890
|
+
neckWood: Maple
|
|
891
|
+
fretboard: Rosewood
|
|
892
|
+
pickups: SingleCoils
|
|
893
|
+
hardware: Chrome
|
|
894
|
+
signature: ''
|
|
895
|
+
|
|
896
|
+
# One state per wizard step, and `ordered` for the confirmation after the order
|
|
897
|
+
navigationStates:
|
|
898
|
+
- body
|
|
899
|
+
- neck
|
|
900
|
+
- electronics
|
|
901
|
+
- details
|
|
902
|
+
- summary
|
|
903
|
+
- ordered
|
|
904
|
+
|
|
905
|
+
# The longest signature the headstock takes; the invariant and the layout's counter both read it
|
|
906
|
+
expressions:
|
|
907
|
+
Guitar:
|
|
908
|
+
$signatureLimit:
|
|
909
|
+
type: number
|
|
910
|
+
|
|
911
|
+
invariants:
|
|
912
|
+
Guitar:
|
|
913
|
+
signatureLength:
|
|
914
|
+
types:
|
|
915
|
+
- signatureTooLong
|
|
916
|
+
offsetHumbuckers:
|
|
917
|
+
type: offsetHumbuckers
|
|
918
|
+
severity: warning
|
|
919
|
+
message: The Offset body is routed for single-coil-sized pickups. Choose single coils or P-90s, or the Single-cut body for humbuckers.
|
|
920
|
+
|
|
921
|
+
components:
|
|
922
|
+
Guitar:
|
|
923
|
+
detail:
|
|
924
|
+
main:
|
|
925
|
+
title: Nightjar
|
|
926
|
+
subtitle: Northfret Custom Shop
|
|
927
|
+
description: A hand-built electric guitar. Choose the body, the neck, the electronics and the details, then order it from the summary.
|
|
928
|
+
price:
|
|
929
|
+
main:
|
|
930
|
+
price:
|
|
931
|
+
$read: $price
|
|
932
|
+
navigationSteps:
|
|
933
|
+
main:
|
|
934
|
+
steps:
|
|
935
|
+
- label: Body
|
|
936
|
+
navigationStates:
|
|
937
|
+
- body
|
|
938
|
+
- label: Neck
|
|
939
|
+
navigationStates:
|
|
940
|
+
- neck
|
|
941
|
+
- label: Electronics
|
|
942
|
+
navigationStates:
|
|
943
|
+
- electronics
|
|
944
|
+
- label: Details
|
|
945
|
+
navigationStates:
|
|
946
|
+
- details
|
|
947
|
+
- label: Summary
|
|
948
|
+
navigationStates:
|
|
949
|
+
- summary
|
|
950
|
+
- ordered
|
|
951
|
+
finalizeAction:
|
|
952
|
+
placeOrder:
|
|
953
|
+
variant: primary
|
|
954
|
+
label: Place order
|
|
955
|
+
title: Send the guitar as configured to the Northfret workshop
|
|
956
|
+
icon: ShoppingBag
|
|
957
|
+
handler: placeOrder
|
|
958
|
+
|
|
959
|
+
# Each choice is active on its own step, and on the summary and the confirmation, which list every choice
|
|
960
|
+
attributeSelection:
|
|
961
|
+
bodyShape:
|
|
962
|
+
value:
|
|
963
|
+
$bind: bodyShape
|
|
964
|
+
options:
|
|
965
|
+
- label: Offset
|
|
966
|
+
description: Contoured waist, 3.4 kg
|
|
967
|
+
value: Offset
|
|
968
|
+
- label: Single-cut
|
|
969
|
+
description: Thicker body, long sustain
|
|
970
|
+
value: SingleCut
|
|
971
|
+
$filter:
|
|
972
|
+
navigationStates:
|
|
973
|
+
- body
|
|
974
|
+
- summary
|
|
975
|
+
- ordered
|
|
976
|
+
pickguard:
|
|
977
|
+
value:
|
|
978
|
+
$bind: pickguard
|
|
979
|
+
options:
|
|
980
|
+
- label: Parchment
|
|
981
|
+
value: Parchment
|
|
982
|
+
- label: Black
|
|
983
|
+
value: Black
|
|
984
|
+
- label: Pearloid
|
|
985
|
+
description: Shimmers in the light
|
|
986
|
+
value: Pearloid
|
|
987
|
+
- label: None
|
|
988
|
+
value: None
|
|
989
|
+
$filter:
|
|
990
|
+
navigationStates:
|
|
991
|
+
- body
|
|
992
|
+
- summary
|
|
993
|
+
- ordered
|
|
994
|
+
neckWood:
|
|
995
|
+
value:
|
|
996
|
+
$bind: neckWood
|
|
997
|
+
options:
|
|
998
|
+
- label: Maple
|
|
999
|
+
description: Bright and snappy
|
|
1000
|
+
value: Maple
|
|
1001
|
+
- label: Roasted maple
|
|
1002
|
+
description: Baked for stability, caramel colour
|
|
1003
|
+
value: RoastedMaple
|
|
1004
|
+
- label: Mahogany
|
|
1005
|
+
description: Warm and round
|
|
1006
|
+
value: Mahogany
|
|
1007
|
+
$filter:
|
|
1008
|
+
navigationStates:
|
|
1009
|
+
- neck
|
|
1010
|
+
- summary
|
|
1011
|
+
- ordered
|
|
1012
|
+
fretboard:
|
|
1013
|
+
value:
|
|
1014
|
+
$bind: fretboard
|
|
1015
|
+
options:
|
|
1016
|
+
- label: Maple
|
|
1017
|
+
value: Maple
|
|
1018
|
+
- label: Rosewood
|
|
1019
|
+
value: Rosewood
|
|
1020
|
+
- label: Ebony
|
|
1021
|
+
description: Dense and smooth
|
|
1022
|
+
value: Ebony
|
|
1023
|
+
$filter:
|
|
1024
|
+
navigationStates:
|
|
1025
|
+
- neck
|
|
1026
|
+
- summary
|
|
1027
|
+
- ordered
|
|
1028
|
+
pickups:
|
|
1029
|
+
value:
|
|
1030
|
+
$bind: pickups
|
|
1031
|
+
options:
|
|
1032
|
+
- label: Single coils
|
|
1033
|
+
description: Glassy and articulate
|
|
1034
|
+
value: SingleCoils
|
|
1035
|
+
- label: Humbuckers
|
|
1036
|
+
description: Thick and hum-free
|
|
1037
|
+
value: Humbuckers
|
|
1038
|
+
- label: P-90s
|
|
1039
|
+
description: Gritty, with bite
|
|
1040
|
+
value: P90s
|
|
1041
|
+
$filter:
|
|
1042
|
+
navigationStates:
|
|
1043
|
+
- electronics
|
|
1044
|
+
- summary
|
|
1045
|
+
- ordered
|
|
1046
|
+
hardware:
|
|
1047
|
+
value:
|
|
1048
|
+
$bind: hardware
|
|
1049
|
+
options:
|
|
1050
|
+
- label: Chrome
|
|
1051
|
+
value: Chrome
|
|
1052
|
+
- label: Gold
|
|
1053
|
+
value: Gold
|
|
1054
|
+
- label: Black
|
|
1055
|
+
value: Black
|
|
1056
|
+
$filter:
|
|
1057
|
+
navigationStates:
|
|
1058
|
+
- electronics
|
|
1059
|
+
- summary
|
|
1060
|
+
- ordered
|
|
1061
|
+
materialSwatch:
|
|
1062
|
+
finish:
|
|
1063
|
+
selectedSwatchKey:
|
|
1064
|
+
$bind: finish
|
|
1065
|
+
swatches:
|
|
1066
|
+
Seafoam:
|
|
1067
|
+
swatchName: Seafoam green
|
|
1068
|
+
color: '#8fcab6'
|
|
1069
|
+
CandyRed:
|
|
1070
|
+
swatchName: Candy apple red
|
|
1071
|
+
color: '#b0141f'
|
|
1072
|
+
Midnight:
|
|
1073
|
+
swatchName: Midnight blue metallic
|
|
1074
|
+
color: '#1d2b4f'
|
|
1075
|
+
NaturalAsh:
|
|
1076
|
+
swatchName: Natural ash
|
|
1077
|
+
color: '#d8b98a'
|
|
1078
|
+
$filter:
|
|
1079
|
+
navigationStates:
|
|
1080
|
+
- body
|
|
1081
|
+
- summary
|
|
1082
|
+
- ordered
|
|
1083
|
+
textValue:
|
|
1084
|
+
signature:
|
|
1085
|
+
value:
|
|
1086
|
+
$bind: signature
|
|
1087
|
+
$filter:
|
|
1088
|
+
navigationStates:
|
|
1089
|
+
- details
|
|
1090
|
+
- summary
|
|
1091
|
+
- ordered
|
|
1092
|
+
|
|
1093
|
+
canvasConfig:
|
|
1094
|
+
main:
|
|
1095
|
+
highlightingDisabled: true
|
|
1096
|
+
canvasCustomEnvironment:
|
|
1097
|
+
main:
|
|
1098
|
+
name: NightjarStage
|
|
1099
|
+
|
|
1100
|
+
# The camera follows the wizard: the whole guitar for the body and the summary, then a closer view of what each
|
|
1101
|
+
# step changes. Each camera is active only in its step's navigation state; the scene is in millimetres.
|
|
1102
|
+
fitRootPerspectiveCamera:
|
|
1103
|
+
overview:
|
|
1104
|
+
fov: 30
|
|
1105
|
+
near: 10
|
|
1106
|
+
far: 20000
|
|
1107
|
+
minDistance: 600
|
|
1108
|
+
maxDistance: 9000
|
|
1109
|
+
azimuthAngle: 0.28
|
|
1110
|
+
polarAngle: 1.48
|
|
1111
|
+
minPolarAngle: 0.9
|
|
1112
|
+
maxPolarAngle: 2
|
|
1113
|
+
fitToBox: true
|
|
1114
|
+
fitMeshChanges: false
|
|
1115
|
+
$filter:
|
|
1116
|
+
navigationStates:
|
|
1117
|
+
- body
|
|
1118
|
+
- summary
|
|
1119
|
+
- ordered
|
|
1120
|
+
staticPerspectiveCamera:
|
|
1121
|
+
neck:
|
|
1122
|
+
fov: 30
|
|
1123
|
+
near: 10
|
|
1124
|
+
far: 20000
|
|
1125
|
+
lookAtX: 0
|
|
1126
|
+
lookAtY: 625
|
|
1127
|
+
lookAtZ: 0
|
|
1128
|
+
distance: 1350
|
|
1129
|
+
minDistance: 300
|
|
1130
|
+
maxDistance: 3000
|
|
1131
|
+
azimuthAngle: 0.55
|
|
1132
|
+
polarAngle: 1.36
|
|
1133
|
+
$filter:
|
|
1134
|
+
navigationStates:
|
|
1135
|
+
- neck
|
|
1136
|
+
electronics:
|
|
1137
|
+
fov: 30
|
|
1138
|
+
near: 10
|
|
1139
|
+
far: 20000
|
|
1140
|
+
lookAtX: 0
|
|
1141
|
+
lookAtY: 40
|
|
1142
|
+
lookAtZ: 0
|
|
1143
|
+
distance: 1150
|
|
1144
|
+
minDistance: 300
|
|
1145
|
+
maxDistance: 3000
|
|
1146
|
+
azimuthAngle: -0.32
|
|
1147
|
+
polarAngle: 1.22
|
|
1148
|
+
$filter:
|
|
1149
|
+
navigationStates:
|
|
1150
|
+
- electronics
|
|
1151
|
+
details:
|
|
1152
|
+
fov: 30
|
|
1153
|
+
near: 10
|
|
1154
|
+
far: 20000
|
|
1155
|
+
lookAtX: -10
|
|
1156
|
+
lookAtY: 750
|
|
1157
|
+
lookAtZ: 0
|
|
1158
|
+
distance: 520
|
|
1159
|
+
minDistance: 200
|
|
1160
|
+
maxDistance: 3000
|
|
1161
|
+
azimuthAngle: 0.12
|
|
1162
|
+
polarAngle: 1.5
|
|
1163
|
+
$filter:
|
|
1164
|
+
navigationStates:
|
|
1165
|
+
- details
|
|
1166
|
+
|
|
1167
|
+
sceneEntityRemoteObject:
|
|
1168
|
+
bodyOffset:
|
|
1169
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1170
|
+
objectName: BodyOffset
|
|
1171
|
+
dimensionUnit: m
|
|
1172
|
+
bodySingleCut:
|
|
1173
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1174
|
+
objectName: BodySingleCut
|
|
1175
|
+
dimensionUnit: m
|
|
1176
|
+
pickguardOffset:
|
|
1177
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1178
|
+
objectName: PickguardOffset
|
|
1179
|
+
dimensionUnit: m
|
|
1180
|
+
pickguardSingleCut:
|
|
1181
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1182
|
+
objectName: PickguardSingleCut
|
|
1183
|
+
dimensionUnit: m
|
|
1184
|
+
neck:
|
|
1185
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1186
|
+
objectName: Neck
|
|
1187
|
+
dimensionUnit: m
|
|
1188
|
+
headstock:
|
|
1189
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1190
|
+
objectName: Headstock
|
|
1191
|
+
dimensionUnit: m
|
|
1192
|
+
fretboard:
|
|
1193
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1194
|
+
objectName: Fretboard
|
|
1195
|
+
dimensionUnit: m
|
|
1196
|
+
frets:
|
|
1197
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1198
|
+
objectName: Frets
|
|
1199
|
+
dimensionUnit: m
|
|
1200
|
+
inlays:
|
|
1201
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1202
|
+
objectName: Inlays
|
|
1203
|
+
dimensionUnit: m
|
|
1204
|
+
nut:
|
|
1205
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1206
|
+
objectName: Nut
|
|
1207
|
+
dimensionUnit: m
|
|
1208
|
+
strings:
|
|
1209
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1210
|
+
objectName: Strings
|
|
1211
|
+
dimensionUnit: m
|
|
1212
|
+
tuners:
|
|
1213
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1214
|
+
objectName: Tuners
|
|
1215
|
+
dimensionUnit: m
|
|
1216
|
+
pickupsSingleCoil:
|
|
1217
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1218
|
+
objectName: PickupsSingleCoil
|
|
1219
|
+
dimensionUnit: m
|
|
1220
|
+
polesSingleCoil:
|
|
1221
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1222
|
+
objectName: PolesSingleCoil
|
|
1223
|
+
dimensionUnit: m
|
|
1224
|
+
pickupsHumbucker:
|
|
1225
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1226
|
+
objectName: PickupsHumbucker
|
|
1227
|
+
dimensionUnit: m
|
|
1228
|
+
polesHumbucker:
|
|
1229
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1230
|
+
objectName: PolesHumbucker
|
|
1231
|
+
dimensionUnit: m
|
|
1232
|
+
pickupsP90:
|
|
1233
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1234
|
+
objectName: PickupsP90
|
|
1235
|
+
dimensionUnit: m
|
|
1236
|
+
polesP90:
|
|
1237
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1238
|
+
objectName: PolesP90
|
|
1239
|
+
dimensionUnit: m
|
|
1240
|
+
bridgeTremolo:
|
|
1241
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1242
|
+
objectName: BridgeTremolo
|
|
1243
|
+
dimensionUnit: m
|
|
1244
|
+
bridgeTuneOMatic:
|
|
1245
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1246
|
+
objectName: BridgeTuneOMatic
|
|
1247
|
+
dimensionUnit: m
|
|
1248
|
+
knobsOffset:
|
|
1249
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1250
|
+
objectName: KnobsOffset
|
|
1251
|
+
dimensionUnit: m
|
|
1252
|
+
knobsSingleCut:
|
|
1253
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1254
|
+
objectName: KnobsSingleCut
|
|
1255
|
+
dimensionUnit: m
|
|
1256
|
+
switchOffset:
|
|
1257
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1258
|
+
objectName: SwitchOffset
|
|
1259
|
+
dimensionUnit: m
|
|
1260
|
+
switchSingleCut:
|
|
1261
|
+
fileUrl: /models/gallery/guitar.glb
|
|
1262
|
+
objectName: SwitchSingleCut
|
|
1263
|
+
dimensionUnit: m
|
|
1264
|
+
|
|
1265
|
+
# Each body brings its own pickguard, bridge, knobs and switch; the pickups show the chosen set
|
|
1266
|
+
sceneEntityObjectProperties:
|
|
1267
|
+
bodyOffset:
|
|
1268
|
+
visible:
|
|
1269
|
+
$eval: self.bodyShape === 'Offset'
|
|
1270
|
+
bodySingleCut:
|
|
1271
|
+
visible:
|
|
1272
|
+
$eval: self.bodyShape === 'SingleCut'
|
|
1273
|
+
pickguardOffset:
|
|
1274
|
+
visible:
|
|
1275
|
+
$eval: self.bodyShape === 'Offset' && self.pickguard !== 'None'
|
|
1276
|
+
pickguardSingleCut:
|
|
1277
|
+
visible:
|
|
1278
|
+
$eval: self.bodyShape === 'SingleCut' && self.pickguard !== 'None'
|
|
1279
|
+
bridgeTremolo:
|
|
1280
|
+
visible:
|
|
1281
|
+
$eval: self.bodyShape === 'Offset'
|
|
1282
|
+
bridgeTuneOMatic:
|
|
1283
|
+
visible:
|
|
1284
|
+
$eval: self.bodyShape === 'SingleCut'
|
|
1285
|
+
knobsOffset:
|
|
1286
|
+
visible:
|
|
1287
|
+
$eval: self.bodyShape === 'Offset'
|
|
1288
|
+
knobsSingleCut:
|
|
1289
|
+
visible:
|
|
1290
|
+
$eval: self.bodyShape === 'SingleCut'
|
|
1291
|
+
switchOffset:
|
|
1292
|
+
visible:
|
|
1293
|
+
$eval: self.bodyShape === 'Offset'
|
|
1294
|
+
switchSingleCut:
|
|
1295
|
+
visible:
|
|
1296
|
+
$eval: self.bodyShape === 'SingleCut'
|
|
1297
|
+
pickupsSingleCoil:
|
|
1298
|
+
visible:
|
|
1299
|
+
$eval: self.pickups === 'SingleCoils'
|
|
1300
|
+
polesSingleCoil:
|
|
1301
|
+
visible:
|
|
1302
|
+
$eval: self.pickups === 'SingleCoils'
|
|
1303
|
+
pickupsHumbucker:
|
|
1304
|
+
visible:
|
|
1305
|
+
$eval: self.pickups === 'Humbuckers'
|
|
1306
|
+
polesHumbucker:
|
|
1307
|
+
visible:
|
|
1308
|
+
$eval: self.pickups === 'Humbuckers'
|
|
1309
|
+
pickupsP90:
|
|
1310
|
+
visible:
|
|
1311
|
+
$eval: self.pickups === 'P90s'
|
|
1312
|
+
polesP90:
|
|
1313
|
+
visible:
|
|
1314
|
+
$eval: self.pickups === 'P90s'
|
|
1315
|
+
|
|
1316
|
+
# The nitro finish: a physical material with a clearcoat on each body object; natural ash shows the grain
|
|
1317
|
+
sceneEntityObjectLocalMaterialOverride:
|
|
1318
|
+
bodyOffset:
|
|
1319
|
+
materialsToOverride:
|
|
1320
|
+
- Finish
|
|
1321
|
+
materialType: physical
|
|
1322
|
+
color:
|
|
1323
|
+
$read: $finishColor
|
|
1324
|
+
textureUrl:
|
|
1325
|
+
$read: $finishTexture
|
|
1326
|
+
rotation: 1.5708
|
|
1327
|
+
repeatX: 2.2
|
|
1328
|
+
repeatY: 2.2
|
|
1329
|
+
metalness:
|
|
1330
|
+
$read: $finishMetalness
|
|
1331
|
+
roughness:
|
|
1332
|
+
$read: $finishRoughness
|
|
1333
|
+
clearcoat: 1
|
|
1334
|
+
clearcoatRoughness: 0.04
|
|
1335
|
+
bodySingleCut:
|
|
1336
|
+
materialsToOverride:
|
|
1337
|
+
- Finish
|
|
1338
|
+
materialType: physical
|
|
1339
|
+
color:
|
|
1340
|
+
$read: $finishColor
|
|
1341
|
+
textureUrl:
|
|
1342
|
+
$read: $finishTexture
|
|
1343
|
+
rotation: 1.5708
|
|
1344
|
+
repeatX: 2.2
|
|
1345
|
+
repeatY: 2.2
|
|
1346
|
+
metalness:
|
|
1347
|
+
$read: $finishMetalness
|
|
1348
|
+
roughness:
|
|
1349
|
+
$read: $finishRoughness
|
|
1350
|
+
clearcoat: 1
|
|
1351
|
+
clearcoatRoughness: 0.04
|
|
1352
|
+
|
|
1353
|
+
# The materials many parts share change for every object that carries them
|
|
1354
|
+
sceneEntityLocalMaterialOverride:
|
|
1355
|
+
pickguard:
|
|
1356
|
+
materialsToOverride:
|
|
1357
|
+
- Pickguard
|
|
1358
|
+
materialType: physical
|
|
1359
|
+
color:
|
|
1360
|
+
$read: $pickguardColor
|
|
1361
|
+
roughness:
|
|
1362
|
+
$read: $pickguardRoughness
|
|
1363
|
+
metalness: 0
|
|
1364
|
+
iridescence:
|
|
1365
|
+
$read: $pickguardIridescence
|
|
1366
|
+
iridescenceIor: 1.4
|
|
1367
|
+
clearcoat:
|
|
1368
|
+
$read: $pickguardIridescence
|
|
1369
|
+
neck:
|
|
1370
|
+
materialsToOverride:
|
|
1371
|
+
- Neck
|
|
1372
|
+
materialType: physical
|
|
1373
|
+
color:
|
|
1374
|
+
$read: $neckColor
|
|
1375
|
+
textureUrl:
|
|
1376
|
+
$read: $neckTexture
|
|
1377
|
+
repeatX: 5
|
|
1378
|
+
repeatY: 1
|
|
1379
|
+
offsetX: 0.5
|
|
1380
|
+
metalness: 0
|
|
1381
|
+
roughness: 0.42
|
|
1382
|
+
clearcoat: 0.6
|
|
1383
|
+
clearcoatRoughness: 0.2
|
|
1384
|
+
fretboard:
|
|
1385
|
+
materialsToOverride:
|
|
1386
|
+
- Fretboard
|
|
1387
|
+
color:
|
|
1388
|
+
$read: $fretboardColor
|
|
1389
|
+
textureUrl:
|
|
1390
|
+
$read: $fretboardTexture
|
|
1391
|
+
repeatX: 5
|
|
1392
|
+
repeatY: 1
|
|
1393
|
+
offsetX: 0.5
|
|
1394
|
+
metalness: 0
|
|
1395
|
+
roughness: 0.62
|
|
1396
|
+
inlays:
|
|
1397
|
+
materialsToOverride:
|
|
1398
|
+
- Inlay
|
|
1399
|
+
color:
|
|
1400
|
+
$read: $inlayColor
|
|
1401
|
+
metalness: 0
|
|
1402
|
+
roughness: 0.3
|
|
1403
|
+
hardware:
|
|
1404
|
+
materialsToOverride:
|
|
1405
|
+
- Hardware
|
|
1406
|
+
color:
|
|
1407
|
+
$read: $hardwareColor
|
|
1408
|
+
metalness:
|
|
1409
|
+
$read: $hardwareMetalness
|
|
1410
|
+
roughness:
|
|
1411
|
+
$read: $hardwareRoughness
|
|
1412
|
+
pickupCover:
|
|
1413
|
+
materialsToOverride:
|
|
1414
|
+
- PickupCover
|
|
1415
|
+
color:
|
|
1416
|
+
$read: $pickupCoverColor
|
|
1417
|
+
metalness: 0
|
|
1418
|
+
roughness: 0.45
|
|
1419
|
+
|
|
1420
|
+
# The signature in script on the headstock's face, along its length; the text is the customer's own
|
|
1421
|
+
sceneEntityObjectTextDecal:
|
|
1422
|
+
headstock:
|
|
1423
|
+
text:
|
|
1424
|
+
$read: signature
|
|
1425
|
+
font: SignPainter-HouseScript
|
|
1426
|
+
preloadFonts:
|
|
1427
|
+
- SignPainter-HouseScript
|
|
1428
|
+
fontSize: auto
|
|
1429
|
+
textColor:
|
|
1430
|
+
$read: $signatureColor
|
|
1431
|
+
textCanvasHeight: 256
|
|
1432
|
+
positionX: 0.002
|
|
1433
|
+
positionY: 0.76
|
|
1434
|
+
positionZ: 0.004
|
|
1435
|
+
rotationX: 0
|
|
1436
|
+
rotationY: 0
|
|
1437
|
+
rotationZ: 1.5708
|
|
1438
|
+
sizeX: 0.13
|
|
1439
|
+
sizeY: 0.03
|
|
1440
|
+
sizeZ: 0.02
|
|
1441
|
+
roughness: 0.4
|
|
1442
|
+
metalness: 0.2
|
|
1443
|
+
bumpScale: 0.4
|
|
1444
|
+
invertedBump: true
|
|
1445
|
+
```
|
|
1446
|
+
|
|
1447
|
+
### ./src/\_fields/ChoiceField.tsx
|
|
1448
|
+
|
|
1449
|
+
```tsx
|
|
1450
|
+
import { Box, ButtonBase, Typography } from '@mui/material'
|
|
1451
|
+
import type { KeyboardEvent } from 'react'
|
|
1452
|
+
|
|
1453
|
+
import { FieldShell } from './FieldShell.js'
|
|
1454
|
+
import { NIGHTJAR } from './tokens.js'
|
|
1455
|
+
|
|
1456
|
+
// The body outlines of the model, drawn small, with a stub of the neck
|
|
1457
|
+
const BODY_PATHS: Readonly<Record<string, string>> = {
|
|
1458
|
+
Offset:
|
|
1459
|
+
'M20 52L23.2 51.8L26.4 51.6L29.6 50.8L32.5 49.5L35.1 47.6L36.9 45L38.1 41.9L38.6 38.8L38.5 35.6L37.8 32.4L36.8 29.4L35.5 26.4L34.6 23.3L34.3 20.1L34.8 17L35 13.7L34.4 10.6L32.8 7.8L30.1 6.2L27.4 7.7L25.5 10.3L22.6 10.7L19.4 10.1L16.4 8.9L15.2 6L14.1 3L11.7 1L8.7 2L7 4.7L6.1 7.8L5.4 10.9L5.3 14.1L5.8 17.3L5.5 20.5L4.8 23.6L3.8 26.7L2.8 29.8L2.2 33L1.8 36.2L1.8 39.4L2.1 42.6L3.1 45.7L4.9 48.3L7.3 50.4L10.4 51.5L13.6 52L16.8 52.1Z',
|
|
1460
|
+
SingleCut:
|
|
1461
|
+
'M20 51L22.9 50.9L25.7 50.7L28.5 50.2L31.2 49.1L33.6 47.5L35.4 45.3L36.5 42.7L37.1 39.9L37.3 37L36.9 34.2L36 31.5L34.5 29L33.2 26.5L32.2 23.8L32.2 21L31.9 18.1L31 15.4L29.6 12.9L27.7 10.8L25.1 11.6L23.9 14.2L23 12.2L23.1 9.3L21.6 7.1L18.9 6.2L16 6L13.2 6.5L10.6 7.7L8.5 9.6L7.3 12.2L7 15L7.6 17.8L7.3 20.7L6.5 23.4L5.6 26.2L4.6 28.8L3.8 31.6L3.3 34.4L3.1 37.3L3.2 40.1L3.7 43L4.7 45.6L6.4 47.9L8.8 49.5L11.4 50.6L14.3 51L17.1 51.1Z',
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
// Two pickups as seen from the front: thin single coils, double humbuckers, wide P-90s
|
|
1465
|
+
const PICKUP_SHAPES: Readonly<Record<string, readonly { x: number; y: number; width: number; height: number }[]>> = {
|
|
1466
|
+
SingleCoils: [
|
|
1467
|
+
{ x: 8, y: 13, width: 24, height: 5 },
|
|
1468
|
+
{ x: 8, y: 30, width: 24, height: 5 },
|
|
1469
|
+
],
|
|
1470
|
+
Humbuckers: [
|
|
1471
|
+
{ x: 9, y: 9, width: 22, height: 5 },
|
|
1472
|
+
{ x: 9, y: 15, width: 22, height: 5 },
|
|
1473
|
+
{ x: 9, y: 28, width: 22, height: 5 },
|
|
1474
|
+
{ x: 9, y: 34, width: 22, height: 5 },
|
|
1475
|
+
],
|
|
1476
|
+
P90s: [
|
|
1477
|
+
{ x: 6, y: 10, width: 28, height: 10 },
|
|
1478
|
+
{ x: 6, y: 28, width: 28, height: 10 },
|
|
1479
|
+
],
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
// Swatches as CSS backgrounds: wood with a hint of grain, metal with a highlight, the pearloid's shimmer
|
|
1483
|
+
const WOOD_GRAIN = 'repeating-linear-gradient(100deg, rgba(0, 0, 0, 0.08) 0 2px, transparent 2px 6px)'
|
|
1484
|
+
|
|
1485
|
+
const SWATCHES: Readonly<Record<string, Readonly<Record<string, string>>>> = {
|
|
1486
|
+
pickguard: {
|
|
1487
|
+
Parchment: '#ece2cb',
|
|
1488
|
+
Black: 'radial-gradient(circle at 30% 30%, #3a3a40, #0c0c0e 70%)',
|
|
1489
|
+
Pearloid: 'conic-gradient(from 40deg, #f6f1ea, #e6eef6, #f4e6f0, #eef6ea, #f6f1ea)',
|
|
1490
|
+
None: 'transparent',
|
|
1491
|
+
},
|
|
1492
|
+
neckWood: {
|
|
1493
|
+
Maple: `${WOOD_GRAIN}, #ecd3a3`,
|
|
1494
|
+
RoastedMaple: `${WOOD_GRAIN}, #b9804a`,
|
|
1495
|
+
Mahogany: `${WOOD_GRAIN}, #7b3f28`,
|
|
1496
|
+
},
|
|
1497
|
+
fretboard: {
|
|
1498
|
+
Maple: `${WOOD_GRAIN}, #ecd3a3`,
|
|
1499
|
+
Rosewood: `${WOOD_GRAIN}, #4a2a1c`,
|
|
1500
|
+
Ebony: `${WOOD_GRAIN}, #1d1916`,
|
|
1501
|
+
},
|
|
1502
|
+
hardware: {
|
|
1503
|
+
Chrome: 'linear-gradient(135deg, #ffffff, #9aa1a8 55%, #e4e7ea)',
|
|
1504
|
+
Gold: 'linear-gradient(135deg, #fff1c4, #b8862e 55%, #f3d38a)',
|
|
1505
|
+
Black: 'linear-gradient(135deg, #6a6a70, #121214 55%, #3a3a40)',
|
|
1506
|
+
},
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
interface OptionArtProps {
|
|
1510
|
+
readonly instanceName: string
|
|
1511
|
+
readonly value: string
|
|
1512
|
+
readonly size: number
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
// The small picture beside an option: a silhouette for the body, the pickup layout, or a swatch of the material
|
|
1516
|
+
const OptionArt = ({ instanceName, value, size }: OptionArtProps) => {
|
|
1517
|
+
const bodyPath = instanceName === 'bodyShape' ? BODY_PATHS[value] : undefined
|
|
1518
|
+
const pickups = instanceName === 'pickups' ? PICKUP_SHAPES[value] : undefined
|
|
1519
|
+
const swatch = SWATCHES[instanceName]?.[value]
|
|
1520
|
+
|
|
1521
|
+
if (bodyPath) {
|
|
1522
|
+
return (
|
|
1523
|
+
<Box component="svg" viewBox="0 0 40 54" aria-hidden sx={{ inlineSize: size, blockSize: size, flex: 'none' }}>
|
|
1524
|
+
<rect x={17.8} y={0} width={4.4} height={12} rx={1} fill={NIGHTJAR.faint} />
|
|
1525
|
+
<path d={bodyPath} fill={NIGHTJAR.cream} />
|
|
1526
|
+
</Box>
|
|
1527
|
+
)
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
if (pickups) {
|
|
1531
|
+
return (
|
|
1532
|
+
<Box component="svg" viewBox="0 0 40 48" aria-hidden sx={{ inlineSize: size, blockSize: size, flex: 'none' }}>
|
|
1533
|
+
{pickups.map(shape => (
|
|
1534
|
+
<rect key={`${shape.x}-${shape.y}`} {...shape} rx={2.5} fill={NIGHTJAR.cream} />
|
|
1535
|
+
))}
|
|
1536
|
+
</Box>
|
|
1537
|
+
)
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
if (swatch === undefined) {
|
|
1541
|
+
return null
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
return (
|
|
1545
|
+
<Box
|
|
1546
|
+
component="span"
|
|
1547
|
+
aria-hidden
|
|
1548
|
+
sx={{
|
|
1549
|
+
inlineSize: size,
|
|
1550
|
+
blockSize: size,
|
|
1551
|
+
flex: 'none',
|
|
1552
|
+
borderRadius: '50%',
|
|
1553
|
+
background: swatch,
|
|
1554
|
+
boxShadow: `inset 0 0 0 1px ${NIGHTJAR.line}`,
|
|
1555
|
+
// "None" is an empty, dashed ring
|
|
1556
|
+
...(value === 'None' && {
|
|
1557
|
+
border: `1.5px dashed ${NIGHTJAR.faint}`,
|
|
1558
|
+
boxShadow: 'none',
|
|
1559
|
+
}),
|
|
1560
|
+
}}
|
|
1561
|
+
/>
|
|
1562
|
+
)
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
// Arrow keys move the selection between the options, as in a native radio group
|
|
1566
|
+
const ARROW_STEPS: Readonly<Record<string, number | undefined>> = {
|
|
1567
|
+
ArrowRight: 1,
|
|
1568
|
+
ArrowDown: 1,
|
|
1569
|
+
ArrowLeft: -1,
|
|
1570
|
+
ArrowUp: -1,
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
interface ChoiceFieldProps {
|
|
1574
|
+
readonly instanceName: string
|
|
1575
|
+
readonly label: string
|
|
1576
|
+
readonly warningTypes: readonly string[]
|
|
1577
|
+
/** Chips in one scrolling row, for a phone; cards in a grid otherwise */
|
|
1578
|
+
readonly compact: boolean
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
// One `attributeSelection` of the spec: cards with a picture, a title and a description, or chips on a phone. An
|
|
1582
|
+
// option a `fixable` invariant rules out is faded with the reason below; it stays clickable, so the change is tried
|
|
1583
|
+
// and rejected.
|
|
1584
|
+
export const ChoiceField = ({ instanceName, label, warningTypes, compact }: ChoiceFieldProps) => {
|
|
1585
|
+
const resolve = phx.frontend.useResolveLocalizable()
|
|
1586
|
+
const guitarId = phx.frontend.useRootEntityId()
|
|
1587
|
+
const { value, options } = phx.frontend.useAttributeSelection(guitarId, instanceName)
|
|
1588
|
+
const selected = options.find(option => option.value === value)
|
|
1589
|
+
const ruledOut = options.find(option => option.disabled && option.hint)?.hint
|
|
1590
|
+
|
|
1591
|
+
const handleKeyDown = (event: KeyboardEvent<HTMLElement>, index: number) => {
|
|
1592
|
+
const step = ARROW_STEPS[event.key]
|
|
1593
|
+
|
|
1594
|
+
if (step === undefined) {
|
|
1595
|
+
return
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
event.preventDefault()
|
|
1599
|
+
const next = (index + step + options.length) % options.length
|
|
1600
|
+
options[next]?.onSelect()
|
|
1601
|
+
event.currentTarget.parentElement?.querySelectorAll<HTMLElement>('[role="radio"]')[next]?.focus()
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
return (
|
|
1605
|
+
<FieldShell
|
|
1606
|
+
id={`nightjar-${instanceName}`}
|
|
1607
|
+
label={label}
|
|
1608
|
+
aside={
|
|
1609
|
+
compact && selected ? (
|
|
1610
|
+
<Typography sx={{ fontFamily: NIGHTJAR.font, fontSize: 14, color: NIGHTJAR.cream }}>
|
|
1611
|
+
{resolve(selected.title)}
|
|
1612
|
+
</Typography>
|
|
1613
|
+
) : undefined
|
|
1614
|
+
}
|
|
1615
|
+
hint={ruledOut}
|
|
1616
|
+
warningTypes={warningTypes}
|
|
1617
|
+
compact={compact}
|
|
1618
|
+
>
|
|
1619
|
+
<Box
|
|
1620
|
+
component="div"
|
|
1621
|
+
role="radiogroup"
|
|
1622
|
+
aria-labelledby={`nightjar-${instanceName}-label`}
|
|
1623
|
+
sx={
|
|
1624
|
+
compact
|
|
1625
|
+
? {
|
|
1626
|
+
display: 'flex',
|
|
1627
|
+
gap: 1,
|
|
1628
|
+
marginInline: -2,
|
|
1629
|
+
paddingInline: 2,
|
|
1630
|
+
paddingBlockEnd: 0.5,
|
|
1631
|
+
overflowX: 'auto',
|
|
1632
|
+
scrollbarWidth: 'none',
|
|
1633
|
+
}
|
|
1634
|
+
: { display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(150px, 1fr))', gap: 1 }
|
|
1635
|
+
}
|
|
1636
|
+
>
|
|
1637
|
+
{options.map((option, index) => {
|
|
1638
|
+
const isSelected = option.value === value
|
|
1639
|
+
const description = resolve(option.description)
|
|
1640
|
+
|
|
1641
|
+
return (
|
|
1642
|
+
<ButtonBase
|
|
1643
|
+
key={String(option.value)}
|
|
1644
|
+
role="radio"
|
|
1645
|
+
aria-checked={isSelected}
|
|
1646
|
+
aria-disabled={option.disabled}
|
|
1647
|
+
tabIndex={isSelected ? 0 : -1}
|
|
1648
|
+
onClick={option.onSelect}
|
|
1649
|
+
onKeyDown={event => handleKeyDown(event, index)}
|
|
1650
|
+
sx={{
|
|
1651
|
+
display: 'flex',
|
|
1652
|
+
alignItems: 'center',
|
|
1653
|
+
justifyContent: 'flex-start',
|
|
1654
|
+
gap: compact ? 1 : 1.5,
|
|
1655
|
+
flex: compact ? 'none' : undefined,
|
|
1656
|
+
minBlockSize: compact ? 44 : 64,
|
|
1657
|
+
paddingInline: compact ? 1.5 : 1.5,
|
|
1658
|
+
paddingBlock: compact ? 0.75 : 1.25,
|
|
1659
|
+
textAlign: 'start',
|
|
1660
|
+
borderRadius: compact ? 999 : 1.5,
|
|
1661
|
+
border: `1px solid ${isSelected ? NIGHTJAR.amber : NIGHTJAR.line}`,
|
|
1662
|
+
bgcolor: isSelected ? NIGHTJAR.amberTint : NIGHTJAR.raised,
|
|
1663
|
+
color: NIGHTJAR.cream,
|
|
1664
|
+
opacity: option.disabled ? 0.45 : 1,
|
|
1665
|
+
transition: 'border-color 160ms, background-color 160ms',
|
|
1666
|
+
'&:hover': { bgcolor: isSelected ? NIGHTJAR.amberTint : NIGHTJAR.raisedHover },
|
|
1667
|
+
'&.Mui-focusVisible': { outline: `2px solid ${NIGHTJAR.amber}`, outlineOffset: 2 },
|
|
1668
|
+
}}
|
|
1669
|
+
>
|
|
1670
|
+
<OptionArt instanceName={instanceName} value={String(option.value)} size={compact ? 22 : 36} />
|
|
1671
|
+
<Box component="span" sx={{ display: 'grid', gap: 0.25 }}>
|
|
1672
|
+
<Typography
|
|
1673
|
+
component="span"
|
|
1674
|
+
sx={{
|
|
1675
|
+
fontFamily: NIGHTJAR.font,
|
|
1676
|
+
fontSize: compact ? 14 : 15,
|
|
1677
|
+
fontWeight: 500,
|
|
1678
|
+
whiteSpace: 'nowrap',
|
|
1679
|
+
color: NIGHTJAR.cream,
|
|
1680
|
+
}}
|
|
1681
|
+
>
|
|
1682
|
+
{resolve(option.title)}
|
|
1683
|
+
</Typography>
|
|
1684
|
+
{!compact && description && (
|
|
1685
|
+
<Typography
|
|
1686
|
+
component="span"
|
|
1687
|
+
sx={{ fontFamily: NIGHTJAR.font, fontSize: 13, lineHeight: 1.3, color: NIGHTJAR.muted }}
|
|
1688
|
+
>
|
|
1689
|
+
{description}
|
|
1690
|
+
</Typography>
|
|
1691
|
+
)}
|
|
1692
|
+
</Box>
|
|
1693
|
+
</ButtonBase>
|
|
1694
|
+
)
|
|
1695
|
+
})}
|
|
1696
|
+
</Box>
|
|
1697
|
+
</FieldShell>
|
|
1698
|
+
)
|
|
1699
|
+
}
|
|
1700
|
+
```
|
|
1701
|
+
|
|
1702
|
+
### ./src/\_fields/FieldShell.tsx
|
|
1703
|
+
|
|
1704
|
+
```tsx
|
|
1705
|
+
import { Box, Typography } from '@mui/material'
|
|
1706
|
+
import type { ReactNode } from 'react'
|
|
1707
|
+
|
|
1708
|
+
import { LABEL_SX, NIGHTJAR } from './tokens.js'
|
|
1709
|
+
import { useWarnings } from './use-warnings.js'
|
|
1710
|
+
|
|
1711
|
+
interface FieldShellProps {
|
|
1712
|
+
readonly id: string
|
|
1713
|
+
readonly label: string
|
|
1714
|
+
/** Beside the label: the chosen option's name, or a counter */
|
|
1715
|
+
readonly aside?: ReactNode
|
|
1716
|
+
/** Below the field: why an option is ruled out, or what the customer should know */
|
|
1717
|
+
readonly hint?: string | undefined
|
|
1718
|
+
readonly warningTypes: readonly string[]
|
|
1719
|
+
readonly compact: boolean
|
|
1720
|
+
readonly children: ReactNode
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
// A labelled field. A `warning` violation the field explains is shown below it while it holds; it is the same text
|
|
1724
|
+
// the summary lists, and the stepper marks the step until it is resolved.
|
|
1725
|
+
export const FieldShell = ({ id, label, aside, hint, warningTypes, compact, children }: FieldShellProps) => {
|
|
1726
|
+
const warning = useWarnings().find(candidate => warningTypes.includes(candidate.type))
|
|
1727
|
+
|
|
1728
|
+
return (
|
|
1729
|
+
<Box component="section" aria-labelledby={`${id}-label`} sx={{ display: 'grid', gap: compact ? 1 : 1.5 }}>
|
|
1730
|
+
<Box component="div" sx={{ display: 'flex', alignItems: 'baseline', justifyContent: 'space-between', gap: 2 }}>
|
|
1731
|
+
<Typography component="h3" id={`${id}-label`} sx={LABEL_SX}>
|
|
1732
|
+
{label}
|
|
1733
|
+
</Typography>
|
|
1734
|
+
{aside}
|
|
1735
|
+
</Box>
|
|
1736
|
+
{children}
|
|
1737
|
+
{hint && <Typography sx={{ fontFamily: NIGHTJAR.font, fontSize: 13, color: NIGHTJAR.muted }}>{hint}</Typography>}
|
|
1738
|
+
{warning && (
|
|
1739
|
+
<Typography
|
|
1740
|
+
role="status"
|
|
1741
|
+
sx={{
|
|
1742
|
+
paddingInline: 1.5,
|
|
1743
|
+
paddingBlock: 1,
|
|
1744
|
+
borderInlineStart: `3px solid ${NIGHTJAR.amber}`,
|
|
1745
|
+
bgcolor: NIGHTJAR.amberTint,
|
|
1746
|
+
fontFamily: NIGHTJAR.font,
|
|
1747
|
+
fontSize: 14,
|
|
1748
|
+
lineHeight: 1.4,
|
|
1749
|
+
color: NIGHTJAR.cream,
|
|
1750
|
+
}}
|
|
1751
|
+
>
|
|
1752
|
+
{warning.text}
|
|
1753
|
+
</Typography>
|
|
1754
|
+
)}
|
|
1755
|
+
</Box>
|
|
1756
|
+
)
|
|
1757
|
+
}
|
|
1758
|
+
```
|
|
1759
|
+
|
|
1760
|
+
### ./src/\_fields/FinishField.tsx
|
|
1761
|
+
|
|
1762
|
+
```tsx
|
|
1763
|
+
import { Box, ButtonBase, Tooltip, Typography } from '@mui/material'
|
|
1764
|
+
import type { KeyboardEvent } from 'react'
|
|
1765
|
+
|
|
1766
|
+
import { FieldShell } from './FieldShell.js'
|
|
1767
|
+
import { NIGHTJAR } from './tokens.js'
|
|
1768
|
+
|
|
1769
|
+
const ARROW_STEPS: Readonly<Record<string, number | undefined>> = {
|
|
1770
|
+
ArrowRight: 1,
|
|
1771
|
+
ArrowDown: 1,
|
|
1772
|
+
ArrowLeft: -1,
|
|
1773
|
+
ArrowUp: -1,
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
// A highlight over each swatch, so the paint reads as a glossy finish
|
|
1777
|
+
const GLOSS = 'radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 42%)'
|
|
1778
|
+
|
|
1779
|
+
interface FinishFieldProps {
|
|
1780
|
+
readonly instanceName: string
|
|
1781
|
+
readonly label: string
|
|
1782
|
+
readonly warningTypes: readonly string[]
|
|
1783
|
+
readonly compact: boolean
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
// The spec's `materialSwatch`: round swatches in the colours the spec gives each finish, the chosen one's name
|
|
1787
|
+
// beside the label. `useSwatchSelection` takes the `fixable` violation types to ignore as its third argument.
|
|
1788
|
+
export const FinishField = ({ instanceName, label, warningTypes, compact }: FinishFieldProps) => {
|
|
1789
|
+
const resolve = phx.frontend.useResolveLocalizable()
|
|
1790
|
+
const guitarId = phx.frontend.useRootEntityId()
|
|
1791
|
+
const { options } = phx.frontend.useSwatchSelection(guitarId, instanceName, [])
|
|
1792
|
+
const selected = options.find(option => option.selected)
|
|
1793
|
+
const ruledOut = options.find(option => option.disabled && option.hint)?.hint
|
|
1794
|
+
const size = compact ? 40 : 48
|
|
1795
|
+
|
|
1796
|
+
const handleKeyDown = (event: KeyboardEvent<HTMLElement>, index: number) => {
|
|
1797
|
+
const step = ARROW_STEPS[event.key]
|
|
1798
|
+
|
|
1799
|
+
if (step === undefined) {
|
|
1800
|
+
return
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
event.preventDefault()
|
|
1804
|
+
const next = (index + step + options.length) % options.length
|
|
1805
|
+
options[next]?.onClick()
|
|
1806
|
+
event.currentTarget.parentElement?.querySelectorAll<HTMLElement>('[role="radio"]')[next]?.focus()
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
return (
|
|
1810
|
+
<FieldShell
|
|
1811
|
+
id={`nightjar-${instanceName}`}
|
|
1812
|
+
label={label}
|
|
1813
|
+
aside={
|
|
1814
|
+
selected && (
|
|
1815
|
+
<Typography sx={{ fontFamily: NIGHTJAR.font, fontSize: 14, color: NIGHTJAR.cream }}>
|
|
1816
|
+
{resolve(selected.swatchName)}
|
|
1817
|
+
</Typography>
|
|
1818
|
+
)
|
|
1819
|
+
}
|
|
1820
|
+
hint={ruledOut ?? undefined}
|
|
1821
|
+
warningTypes={warningTypes}
|
|
1822
|
+
compact={compact}
|
|
1823
|
+
>
|
|
1824
|
+
<Box
|
|
1825
|
+
component="div"
|
|
1826
|
+
role="radiogroup"
|
|
1827
|
+
aria-labelledby={`nightjar-${instanceName}-label`}
|
|
1828
|
+
sx={{ display: 'flex', flexWrap: 'wrap', gap: compact ? 1.5 : 2 }}
|
|
1829
|
+
>
|
|
1830
|
+
{options.map((option, index) => {
|
|
1831
|
+
const name = resolve(option.swatchName)
|
|
1832
|
+
|
|
1833
|
+
return (
|
|
1834
|
+
<Tooltip key={option.swatchKey} title={name}>
|
|
1835
|
+
<ButtonBase
|
|
1836
|
+
role="radio"
|
|
1837
|
+
aria-label={name}
|
|
1838
|
+
aria-checked={option.selected}
|
|
1839
|
+
aria-disabled={option.disabled}
|
|
1840
|
+
tabIndex={option.selected ? 0 : -1}
|
|
1841
|
+
onClick={option.onClick}
|
|
1842
|
+
onKeyDown={event => handleKeyDown(event, index)}
|
|
1843
|
+
sx={{
|
|
1844
|
+
inlineSize: size,
|
|
1845
|
+
blockSize: size,
|
|
1846
|
+
borderRadius: '50%',
|
|
1847
|
+
background: `${GLOSS}, ${option.color}`,
|
|
1848
|
+
// The ring sits outside the swatch, in the panel's colour, so the swatch keeps its full size
|
|
1849
|
+
boxShadow: option.selected
|
|
1850
|
+
? `0 0 0 3px ${NIGHTJAR.ink}, 0 0 0 5px ${NIGHTJAR.amber}`
|
|
1851
|
+
: `inset 0 0 0 1px ${NIGHTJAR.line}`,
|
|
1852
|
+
opacity: option.disabled ? 0.4 : 1,
|
|
1853
|
+
transition: 'box-shadow 160ms, transform 160ms',
|
|
1854
|
+
'&:hover': { transform: 'scale(1.06)' },
|
|
1855
|
+
'&.Mui-focusVisible': { outline: `2px solid ${NIGHTJAR.cream}`, outlineOffset: 6 },
|
|
1856
|
+
}}
|
|
1857
|
+
/>
|
|
1858
|
+
</Tooltip>
|
|
1859
|
+
)
|
|
1860
|
+
})}
|
|
1861
|
+
</Box>
|
|
1862
|
+
</FieldShell>
|
|
1863
|
+
)
|
|
1864
|
+
}
|
|
1865
|
+
```
|
|
1866
|
+
|
|
1867
|
+
### ./src/\_fields/SignatureField.tsx
|
|
1868
|
+
|
|
1869
|
+
```tsx
|
|
1870
|
+
import { Box, InputBase, Typography } from '@mui/material'
|
|
1871
|
+
|
|
1872
|
+
import { FieldShell } from './FieldShell.js'
|
|
1873
|
+
import { NIGHTJAR } from './tokens.js'
|
|
1874
|
+
|
|
1875
|
+
interface SignatureFieldProps {
|
|
1876
|
+
readonly instanceName: string
|
|
1877
|
+
readonly label: string
|
|
1878
|
+
readonly warningTypes: readonly string[]
|
|
1879
|
+
readonly compact: boolean
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
// The spec's `textValue`, which the spec prints on the headstock with a text decal. Typing stages each value, so the
|
|
1883
|
+
// headstock follows every key; leaving the field or pressing Enter commits it. A value the `fixable` length rule
|
|
1884
|
+
// rejects shows the rule's message as the hook's `hints`, and leaving the field rolls back to the last value that
|
|
1885
|
+
// fitted. The counter reads the limit from the spec's `$signatureLimit` expression, which the rule checks too.
|
|
1886
|
+
export const SignatureField = ({ instanceName, label, warningTypes, compact }: SignatureFieldProps) => {
|
|
1887
|
+
const guitarId = phx.frontend.useRootEntityId()
|
|
1888
|
+
const guitar = phx.frontend.useRootEntityState()
|
|
1889
|
+
const signature = phx.frontend.useTextValue(guitarId, instanceName)
|
|
1890
|
+
const limit = guitar.$signatureLimit
|
|
1891
|
+
|
|
1892
|
+
return (
|
|
1893
|
+
<FieldShell
|
|
1894
|
+
id={`nightjar-${instanceName}`}
|
|
1895
|
+
label={label}
|
|
1896
|
+
aside={
|
|
1897
|
+
<Typography
|
|
1898
|
+
aria-live="polite"
|
|
1899
|
+
sx={{
|
|
1900
|
+
fontFamily: NIGHTJAR.font,
|
|
1901
|
+
fontSize: 13,
|
|
1902
|
+
fontVariantNumeric: 'tabular-nums',
|
|
1903
|
+
color: signature.hasErrors ? NIGHTJAR.alert : NIGHTJAR.muted,
|
|
1904
|
+
}}
|
|
1905
|
+
>
|
|
1906
|
+
{signature.value.length} / {limit}
|
|
1907
|
+
</Typography>
|
|
1908
|
+
}
|
|
1909
|
+
hint={
|
|
1910
|
+
compact ? undefined : 'In gold leaf on dark necks, in black on maple. Leave it empty for a plain headstock.'
|
|
1911
|
+
}
|
|
1912
|
+
warningTypes={warningTypes}
|
|
1913
|
+
compact={compact}
|
|
1914
|
+
>
|
|
1915
|
+
<Box
|
|
1916
|
+
component="div"
|
|
1917
|
+
sx={{
|
|
1918
|
+
display: 'grid',
|
|
1919
|
+
gap: 1,
|
|
1920
|
+
paddingInline: 2,
|
|
1921
|
+
paddingBlock: compact ? 1 : 1.5,
|
|
1922
|
+
borderRadius: 1.5,
|
|
1923
|
+
border: `1px solid ${signature.hasErrors ? NIGHTJAR.alert : NIGHTJAR.line}`,
|
|
1924
|
+
bgcolor: NIGHTJAR.raised,
|
|
1925
|
+
'&:focus-within': { borderColor: signature.hasErrors ? NIGHTJAR.alert : NIGHTJAR.amber },
|
|
1926
|
+
}}
|
|
1927
|
+
>
|
|
1928
|
+
<InputBase
|
|
1929
|
+
value={signature.value}
|
|
1930
|
+
placeholder="Your name"
|
|
1931
|
+
onChange={event => signature.update(event, event.target.value)}
|
|
1932
|
+
onBlur={signature.resolve}
|
|
1933
|
+
onKeyDown={event => {
|
|
1934
|
+
if (event.key === 'Enter') {
|
|
1935
|
+
signature.resolve()
|
|
1936
|
+
}
|
|
1937
|
+
}}
|
|
1938
|
+
inputProps={{
|
|
1939
|
+
'aria-labelledby': `nightjar-${instanceName}-label`,
|
|
1940
|
+
'aria-invalid': signature.hasErrors,
|
|
1941
|
+
'aria-describedby': `nightjar-${instanceName}-error`,
|
|
1942
|
+
spellCheck: false,
|
|
1943
|
+
}}
|
|
1944
|
+
sx={{
|
|
1945
|
+
fontFamily: NIGHTJAR.script,
|
|
1946
|
+
fontSize: compact ? 30 : 38,
|
|
1947
|
+
lineHeight: 1.2,
|
|
1948
|
+
color: NIGHTJAR.amber,
|
|
1949
|
+
'& input::placeholder': { color: NIGHTJAR.faint, opacity: 1 },
|
|
1950
|
+
}}
|
|
1951
|
+
/>
|
|
1952
|
+
</Box>
|
|
1953
|
+
<Typography
|
|
1954
|
+
id={`nightjar-${instanceName}-error`}
|
|
1955
|
+
role="alert"
|
|
1956
|
+
sx={{ fontFamily: NIGHTJAR.font, fontSize: 14, color: NIGHTJAR.alert, '&:empty': { display: 'none' } }}
|
|
1957
|
+
>
|
|
1958
|
+
{signature.hasErrors ? signature.hints : ''}
|
|
1959
|
+
</Typography>
|
|
1960
|
+
</FieldShell>
|
|
1961
|
+
)
|
|
1962
|
+
}
|
|
1963
|
+
```
|
|
1964
|
+
|
|
1965
|
+
### ./src/\_fields/StepFields.tsx
|
|
1966
|
+
|
|
1967
|
+
```tsx
|
|
1968
|
+
import { Box } from '@mui/material'
|
|
1969
|
+
|
|
1970
|
+
import { ChoiceField } from './ChoiceField.js'
|
|
1971
|
+
import { FinishField } from './FinishField.js'
|
|
1972
|
+
import { SignatureField } from './SignatureField.js'
|
|
1973
|
+
import { fieldOf } from './fields.js'
|
|
1974
|
+
import { useActiveChoices } from './use-active-choices.js'
|
|
1975
|
+
|
|
1976
|
+
interface StepFieldsProps {
|
|
1977
|
+
readonly compact: boolean
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
// The fields of the active step. The layout does not list which choice belongs to which step: it shows the choices
|
|
1981
|
+
// the spec leaves active, so moving a choice to another step is a change of its `$filter` in the spec.
|
|
1982
|
+
export const StepFields = ({ compact }: StepFieldsProps) => {
|
|
1983
|
+
const choices = useActiveChoices()
|
|
1984
|
+
|
|
1985
|
+
return (
|
|
1986
|
+
<Box component="div" sx={{ display: 'grid', gap: compact ? 2.5 : 4 }}>
|
|
1987
|
+
{choices.map(({ instanceName, kind }) => {
|
|
1988
|
+
const { label, warningTypes } = fieldOf(instanceName)
|
|
1989
|
+
const props = { instanceName, label, warningTypes, compact }
|
|
1990
|
+
|
|
1991
|
+
switch (kind) {
|
|
1992
|
+
case 'selection':
|
|
1993
|
+
return <ChoiceField key={instanceName} {...props} />
|
|
1994
|
+
case 'swatch':
|
|
1995
|
+
return <FinishField key={instanceName} {...props} />
|
|
1996
|
+
case 'text':
|
|
1997
|
+
return <SignatureField key={instanceName} {...props} />
|
|
1998
|
+
}
|
|
1999
|
+
})}
|
|
2000
|
+
</Box>
|
|
2001
|
+
)
|
|
2002
|
+
}
|
|
2003
|
+
```
|
|
2004
|
+
|
|
2005
|
+
### ./src/\_fields/SummaryRows.tsx
|
|
2006
|
+
|
|
2007
|
+
```tsx
|
|
2008
|
+
import { Box, Typography } from '@mui/material'
|
|
2009
|
+
import type { ReactNode } from 'react'
|
|
2010
|
+
|
|
2011
|
+
import { fieldOf } from './fields.js'
|
|
2012
|
+
import { NIGHTJAR } from './tokens.js'
|
|
2013
|
+
import type { ActiveChoice } from './use-active-choices.js'
|
|
2014
|
+
import { useActiveChoices } from './use-active-choices.js'
|
|
2015
|
+
|
|
2016
|
+
interface RowProps {
|
|
2017
|
+
readonly label: string
|
|
2018
|
+
readonly children: ReactNode
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
const Row = ({ label, children }: RowProps) => {
|
|
2022
|
+
return (
|
|
2023
|
+
<Box
|
|
2024
|
+
component="div"
|
|
2025
|
+
sx={{
|
|
2026
|
+
display: 'flex',
|
|
2027
|
+
alignItems: 'baseline',
|
|
2028
|
+
justifyContent: 'space-between',
|
|
2029
|
+
gap: 2,
|
|
2030
|
+
paddingBlock: 1.1,
|
|
2031
|
+
borderBlockEnd: `1px solid ${NIGHTJAR.line}`,
|
|
2032
|
+
}}
|
|
2033
|
+
>
|
|
2034
|
+
<Typography component="dt" sx={{ fontFamily: NIGHTJAR.font, fontSize: 14, color: NIGHTJAR.muted }}>
|
|
2035
|
+
{label}
|
|
2036
|
+
</Typography>
|
|
2037
|
+
<Typography
|
|
2038
|
+
component="dd"
|
|
2039
|
+
sx={{
|
|
2040
|
+
display: 'flex',
|
|
2041
|
+
alignItems: 'center',
|
|
2042
|
+
gap: 1,
|
|
2043
|
+
margin: 0,
|
|
2044
|
+
fontFamily: NIGHTJAR.font,
|
|
2045
|
+
fontSize: 15,
|
|
2046
|
+
fontWeight: 500,
|
|
2047
|
+
textAlign: 'end',
|
|
2048
|
+
color: NIGHTJAR.cream,
|
|
2049
|
+
}}
|
|
2050
|
+
>
|
|
2051
|
+
{children}
|
|
2052
|
+
</Typography>
|
|
2053
|
+
</Box>
|
|
2054
|
+
)
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
interface ChoiceRowProps {
|
|
2058
|
+
readonly instanceName: string
|
|
2059
|
+
readonly label: string
|
|
2060
|
+
}
|
|
2061
|
+
|
|
2062
|
+
// Each row reads its choice with the same control hook the step uses: the option's title, the swatch's name and
|
|
2063
|
+
// colour, the text as written
|
|
2064
|
+
const SelectionRow = ({ instanceName, label }: ChoiceRowProps) => {
|
|
2065
|
+
const resolve = phx.frontend.useResolveLocalizable()
|
|
2066
|
+
const guitarId = phx.frontend.useRootEntityId()
|
|
2067
|
+
const { value, options } = phx.frontend.useAttributeSelection(guitarId, instanceName)
|
|
2068
|
+
const selected = options.find(option => option.value === value)
|
|
2069
|
+
|
|
2070
|
+
return <Row label={label}>{selected ? resolve(selected.title) : '—'}</Row>
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
const SwatchRow = ({ instanceName, label }: ChoiceRowProps) => {
|
|
2074
|
+
const resolve = phx.frontend.useResolveLocalizable()
|
|
2075
|
+
const guitarId = phx.frontend.useRootEntityId()
|
|
2076
|
+
const { options } = phx.frontend.useSwatchSelection(guitarId, instanceName, [])
|
|
2077
|
+
const selected = options.find(option => option.selected)
|
|
2078
|
+
|
|
2079
|
+
return (
|
|
2080
|
+
<Row label={label}>
|
|
2081
|
+
{selected && (
|
|
2082
|
+
<Box
|
|
2083
|
+
component="span"
|
|
2084
|
+
aria-hidden
|
|
2085
|
+
sx={{ inlineSize: 12, blockSize: 12, borderRadius: '50%', bgcolor: selected.color }}
|
|
2086
|
+
/>
|
|
2087
|
+
)}
|
|
2088
|
+
{selected ? resolve(selected.swatchName) : '—'}
|
|
2089
|
+
</Row>
|
|
2090
|
+
)
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2093
|
+
const TextRow = ({ instanceName, label }: ChoiceRowProps) => {
|
|
2094
|
+
const guitarId = phx.frontend.useRootEntityId()
|
|
2095
|
+
const { value } = phx.frontend.useTextValue(guitarId, instanceName)
|
|
2096
|
+
|
|
2097
|
+
return (
|
|
2098
|
+
<Row label={label}>
|
|
2099
|
+
{value.trim() === '' ? (
|
|
2100
|
+
'None'
|
|
2101
|
+
) : (
|
|
2102
|
+
<Box component="span" sx={{ fontFamily: NIGHTJAR.script, fontSize: 24, lineHeight: 1, color: NIGHTJAR.amber }}>
|
|
2103
|
+
{value}
|
|
2104
|
+
</Box>
|
|
2105
|
+
)}
|
|
2106
|
+
</Row>
|
|
2107
|
+
)
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
const ChoiceRow = ({ instanceName, kind }: ActiveChoice) => {
|
|
2111
|
+
const { label } = fieldOf(instanceName)
|
|
2112
|
+
|
|
2113
|
+
switch (kind) {
|
|
2114
|
+
case 'selection':
|
|
2115
|
+
return <SelectionRow instanceName={instanceName} label={label} />
|
|
2116
|
+
case 'swatch':
|
|
2117
|
+
return <SwatchRow instanceName={instanceName} label={label} />
|
|
2118
|
+
case 'text':
|
|
2119
|
+
return <TextRow instanceName={instanceName} label={label} />
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
// Every choice, read-only: the summary and the confirmation list the choices the spec leaves active in their states
|
|
2124
|
+
export const SummaryRows = () => {
|
|
2125
|
+
const choices = useActiveChoices()
|
|
2126
|
+
|
|
2127
|
+
return (
|
|
2128
|
+
<Box component="dl" sx={{ margin: 0 }}>
|
|
2129
|
+
{choices.map(choice => (
|
|
2130
|
+
<ChoiceRow key={choice.instanceName} {...choice} />
|
|
2131
|
+
))}
|
|
2132
|
+
</Box>
|
|
2133
|
+
)
|
|
2134
|
+
}
|
|
2135
|
+
```
|
|
2136
|
+
|
|
2137
|
+
### ./src/\_fields/fields.ts
|
|
2138
|
+
|
|
2139
|
+
```ts
|
|
2140
|
+
/** A choice of the spec as the layout presents it. */
|
|
2141
|
+
export interface Field {
|
|
2142
|
+
/** The spec component's instance name */
|
|
2143
|
+
readonly instanceName: string
|
|
2144
|
+
/** The spec's `attributeSelection`, `materialSwatch` and `textValue` carry no label; the layout names the choice */
|
|
2145
|
+
readonly label: string
|
|
2146
|
+
/** The `warning` violations the field explains when they hold */
|
|
2147
|
+
readonly warningTypes: readonly string[]
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
// Every choice the layout knows, in the order it lists them. Which ones a step shows is the spec's business: a step
|
|
2151
|
+
// lists the choices whose `$filter` leaves them active in its navigation state.
|
|
2152
|
+
export const FIELDS: readonly Field[] = [
|
|
2153
|
+
{ instanceName: 'bodyShape', label: 'Body shape', warningTypes: ['offsetHumbuckers'] },
|
|
2154
|
+
{ instanceName: 'finish', label: 'Finish', warningTypes: [] },
|
|
2155
|
+
{ instanceName: 'pickguard', label: 'Pickguard', warningTypes: [] },
|
|
2156
|
+
{ instanceName: 'neckWood', label: 'Neck wood', warningTypes: [] },
|
|
2157
|
+
{ instanceName: 'fretboard', label: 'Fretboard', warningTypes: [] },
|
|
2158
|
+
{ instanceName: 'pickups', label: 'Pickups', warningTypes: ['offsetHumbuckers'] },
|
|
2159
|
+
{ instanceName: 'hardware', label: 'Hardware', warningTypes: [] },
|
|
2160
|
+
{ instanceName: 'signature', label: 'Headstock signature', warningTypes: [] },
|
|
2161
|
+
]
|
|
2162
|
+
|
|
2163
|
+
/** The layout's field for an instance name, or a plain one for a choice the layout does not know. */
|
|
2164
|
+
export const fieldOf = (instanceName: string): Field => {
|
|
2165
|
+
return (
|
|
2166
|
+
FIELDS.find(field => field.instanceName === instanceName) ?? { instanceName, label: instanceName, warningTypes: [] }
|
|
2167
|
+
)
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
/** Orders instance names as the layout lists them; unknown ones go last. */
|
|
2171
|
+
export const byFieldOrder = (a: string, b: string): number => {
|
|
2172
|
+
const rank = (instanceName: string) => {
|
|
2173
|
+
const index = FIELDS.findIndex(field => field.instanceName === instanceName)
|
|
2174
|
+
|
|
2175
|
+
return index === -1 ? FIELDS.length : index
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
return rank(a) - rank(b)
|
|
2179
|
+
}
|
|
2180
|
+
```
|
|
2181
|
+
|
|
2182
|
+
### ./src/\_fields/tokens.ts
|
|
2183
|
+
|
|
2184
|
+
```ts
|
|
2185
|
+
import { keyframes } from '@mui/material'
|
|
2186
|
+
|
|
2187
|
+
// Backstage at night: ink panels, amber light and cream type. Barlow is the brand's typeface, loaded by the page;
|
|
2188
|
+
// SignPainter only previews the headstock signature. The stacks fall back to system fonts where they are not loaded.
|
|
2189
|
+
export const NIGHTJAR = {
|
|
2190
|
+
ink: '#0e0f12',
|
|
2191
|
+
panel: 'rgba(14, 15, 18, 0.9)',
|
|
2192
|
+
raised: '#181a20',
|
|
2193
|
+
raisedHover: '#20232a',
|
|
2194
|
+
line: 'rgba(237, 230, 214, 0.14)',
|
|
2195
|
+
amber: '#f2a33a',
|
|
2196
|
+
amberHover: '#ffb54f',
|
|
2197
|
+
amberTint: 'rgba(242, 163, 58, 0.12)',
|
|
2198
|
+
cream: '#ede6d6',
|
|
2199
|
+
muted: 'rgba(237, 230, 214, 0.64)',
|
|
2200
|
+
faint: 'rgba(237, 230, 214, 0.38)',
|
|
2201
|
+
oxblood: '#7a1e2b',
|
|
2202
|
+
alert: '#f07a84',
|
|
2203
|
+
alertTint: 'rgba(122, 30, 43, 0.32)',
|
|
2204
|
+
font: "'Barlow', 'Helvetica Neue', Arial, sans-serif",
|
|
2205
|
+
script: "'SignPainter-HouseScript', 'Brush Script MT', cursive",
|
|
2206
|
+
} as const
|
|
2207
|
+
|
|
2208
|
+
// Bold capitals with wide tracking, for headings and the stepper
|
|
2209
|
+
export const HEADING_SX = {
|
|
2210
|
+
fontFamily: NIGHTJAR.font,
|
|
2211
|
+
fontWeight: 700,
|
|
2212
|
+
letterSpacing: '0.16em',
|
|
2213
|
+
textTransform: 'uppercase',
|
|
2214
|
+
color: NIGHTJAR.cream,
|
|
2215
|
+
} as const
|
|
2216
|
+
|
|
2217
|
+
// Small capitals, for field labels and overlines
|
|
2218
|
+
export const LABEL_SX = {
|
|
2219
|
+
fontFamily: NIGHTJAR.font,
|
|
2220
|
+
fontSize: 12,
|
|
2221
|
+
fontWeight: 500,
|
|
2222
|
+
letterSpacing: '0.2em',
|
|
2223
|
+
textTransform: 'uppercase',
|
|
2224
|
+
color: NIGHTJAR.muted,
|
|
2225
|
+
} as const
|
|
2226
|
+
|
|
2227
|
+
// A page or a step's content enters from the side it comes from, or a phone's sheet from below, fading in
|
|
2228
|
+
export const ENTER_FROM_END = keyframes`
|
|
2229
|
+
from { opacity: 0; transform: translateX(48px); }
|
|
2230
|
+
to { opacity: 1; transform: none; }
|
|
2231
|
+
`
|
|
2232
|
+
|
|
2233
|
+
export const ENTER_FROM_START = keyframes`
|
|
2234
|
+
from { opacity: 0; transform: translateX(-48px); }
|
|
2235
|
+
to { opacity: 1; transform: none; }
|
|
2236
|
+
`
|
|
2237
|
+
|
|
2238
|
+
export const ENTER_FROM_BELOW = keyframes`
|
|
2239
|
+
from { opacity: 0; transform: translateY(56px); }
|
|
2240
|
+
to { opacity: 1; transform: none; }
|
|
2241
|
+
`
|
|
2242
|
+
```
|
|
2243
|
+
|
|
2244
|
+
### ./src/\_fields/use-active-choices.ts
|
|
2245
|
+
|
|
2246
|
+
```ts
|
|
2247
|
+
import { useMemo } from 'react'
|
|
2248
|
+
|
|
2249
|
+
import { attributeSelectionComponent, materialSwatchComponent, textValueComponent } from '@salsita-ai/sdk/domain'
|
|
2250
|
+
|
|
2251
|
+
import { byFieldOrder } from './fields.js'
|
|
2252
|
+
|
|
2253
|
+
export type ChoiceKind = 'selection' | 'swatch' | 'text'
|
|
2254
|
+
|
|
2255
|
+
/** A choice of the spec that is active now. */
|
|
2256
|
+
export interface ActiveChoice {
|
|
2257
|
+
readonly instanceName: string
|
|
2258
|
+
readonly kind: ChoiceKind
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
// The guitar's choices whose spec component is active in the current navigation state, in the layout's order. A
|
|
2262
|
+
// `$filter` with `navigationStates` makes a component active only in those states, so on each step this is the step's
|
|
2263
|
+
// choices, and on the summary every choice. The control hooks throw for an inactive component; a field mounts only
|
|
2264
|
+
// for a choice listed here.
|
|
2265
|
+
export const useActiveChoices = (): readonly ActiveChoice[] => {
|
|
2266
|
+
const guitarId = phx.frontend.useRootEntityId()
|
|
2267
|
+
const selections = phx.frontend.useComponents({
|
|
2268
|
+
componentTypes: [attributeSelectionComponent],
|
|
2269
|
+
entityIds: [guitarId],
|
|
2270
|
+
})
|
|
2271
|
+
const swatches = phx.frontend.useComponents({ componentTypes: [materialSwatchComponent], entityIds: [guitarId] })
|
|
2272
|
+
const texts = phx.frontend.useComponents({ componentTypes: [textValueComponent], entityIds: [guitarId] })
|
|
2273
|
+
|
|
2274
|
+
return useMemo(() => {
|
|
2275
|
+
const choices = [
|
|
2276
|
+
...(selections ?? []).map(
|
|
2277
|
+
({ componentInstance }): ActiveChoice => ({ instanceName: componentInstance.instanceName, kind: 'selection' })
|
|
2278
|
+
),
|
|
2279
|
+
...(swatches ?? []).map(
|
|
2280
|
+
({ componentInstance }): ActiveChoice => ({ instanceName: componentInstance.instanceName, kind: 'swatch' })
|
|
2281
|
+
),
|
|
2282
|
+
...(texts ?? []).map(
|
|
2283
|
+
({ componentInstance }): ActiveChoice => ({ instanceName: componentInstance.instanceName, kind: 'text' })
|
|
2284
|
+
),
|
|
2285
|
+
]
|
|
2286
|
+
|
|
2287
|
+
return choices.sort((a, b) => byFieldOrder(a.instanceName, b.instanceName))
|
|
2288
|
+
}, [selections, swatches, texts])
|
|
2289
|
+
}
|
|
2290
|
+
```
|
|
2291
|
+
|
|
2292
|
+
### ./src/\_fields/use-warnings.ts
|
|
2293
|
+
|
|
2294
|
+
```ts
|
|
2295
|
+
import { useMemo } from 'react'
|
|
2296
|
+
|
|
2297
|
+
export interface Warning {
|
|
2298
|
+
readonly type: string
|
|
2299
|
+
readonly text: string
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
// The warnings of the committed configuration, with their text resolved. A `warning` invariant keeps the change, so
|
|
2303
|
+
// its violation stays until the customer resolves it, and ordering waits for that. `useFinalizeViolations` lists them.
|
|
2304
|
+
export const useWarnings = (): readonly Warning[] => {
|
|
2305
|
+
const { violations } = phx.frontend.useFinalizeViolations()
|
|
2306
|
+
const resolve = phx.frontend.useResolveLocalizable()
|
|
2307
|
+
|
|
2308
|
+
return useMemo(() => {
|
|
2309
|
+
return (violations ?? [])
|
|
2310
|
+
.filter(({ violation }) => violation.severity === 'warning')
|
|
2311
|
+
.map(({ violation }) => ({ type: violation.type, text: resolve(violation.message) ?? violation.type }))
|
|
2312
|
+
}, [violations, resolve])
|
|
2313
|
+
}
|
|
2314
|
+
```
|
|
2315
|
+
|
|
2316
|
+
### ./src/\_shared/DesktopPage.tsx
|
|
2317
|
+
|
|
2318
|
+
```tsx
|
|
2319
|
+
import { Box, Typography } from '@mui/material'
|
|
2320
|
+
import type { AnimationEvent } from 'react'
|
|
2321
|
+
|
|
2322
|
+
import { ENTER_FROM_END, HEADING_SX, NIGHTJAR } from '../_fields/index.js'
|
|
2323
|
+
import { OrderBar } from './OrderBar.js'
|
|
2324
|
+
import { OrderConfirmation } from './OrderConfirmation.js'
|
|
2325
|
+
import { StepHeader } from './StepHeader.js'
|
|
2326
|
+
import { StepPanel } from './StepPanel.js'
|
|
2327
|
+
import { SummaryPanel } from './SummaryPanel.js'
|
|
2328
|
+
import type { OrderForm } from './order-form.js'
|
|
2329
|
+
|
|
2330
|
+
type Page = 'steps' | 'summary' | 'ordered'
|
|
2331
|
+
|
|
2332
|
+
// The summary needs room for the contact form, so its panel is wider
|
|
2333
|
+
const PANEL_WIDTHS: Readonly<Record<Page, number>> = { steps: 420, summary: 520, ordered: 420 }
|
|
2334
|
+
|
|
2335
|
+
const pageOf = (navigationState: string): Page => {
|
|
2336
|
+
return navigationState === 'ordered' ? 'ordered' : navigationState === 'summary' ? 'summary' : 'steps'
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
// The brand's mark: a fret of amber over the name of the shop
|
|
2340
|
+
const Brand = () => {
|
|
2341
|
+
return (
|
|
2342
|
+
<Box component="div" sx={{ display: 'flex', alignItems: 'center', gap: 1.5, flex: 'none' }}>
|
|
2343
|
+
<Box component="span" aria-hidden sx={{ inlineSize: 4, blockSize: 28, bgcolor: NIGHTJAR.amber }} />
|
|
2344
|
+
<Box component="div" sx={{ display: 'grid' }}>
|
|
2345
|
+
<Typography sx={{ ...HEADING_SX, fontSize: 16, letterSpacing: '0.32em', lineHeight: 1.1 }}>
|
|
2346
|
+
Northfret
|
|
2347
|
+
</Typography>
|
|
2348
|
+
<Typography sx={{ ...HEADING_SX, fontSize: 10, letterSpacing: '0.36em', color: NIGHTJAR.muted }}>
|
|
2349
|
+
Custom shop
|
|
2350
|
+
</Typography>
|
|
2351
|
+
</Box>
|
|
2352
|
+
</Box>
|
|
2353
|
+
)
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
interface DesktopPageProps {
|
|
2357
|
+
readonly form: OrderForm
|
|
2358
|
+
readonly reached: number
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
// The desktop wizard: the stepper on top, the guitar in the free area on the left, the panel of the step on the
|
|
2362
|
+
// right and the bar with the price at the bottom.
|
|
2363
|
+
//
|
|
2364
|
+
// The summary's panel is wider than a step's, so the steps, the summary and the confirmation are three pages, each
|
|
2365
|
+
// with its own safe area, and each slides in when it opens. The safe area slides with its page: the first
|
|
2366
|
+
// measurement, taken when the page mounts, sees it shifted, and no resize follows when the slide ends. `update()`
|
|
2367
|
+
// from `useSceneSafeArea` measures again once the slide has settled, so the camera frames the guitar in the place the
|
|
2368
|
+
// page leaves for it.
|
|
2369
|
+
export const DesktopPage = ({ form, reached }: DesktopPageProps) => {
|
|
2370
|
+
const { containerRef, safeAreaRef, update } = phx.frontend.useSceneSafeArea()
|
|
2371
|
+
const navigationState = phx.frontend.useActiveNavigationState()
|
|
2372
|
+
const page = pageOf(navigationState)
|
|
2373
|
+
|
|
2374
|
+
// The step's own content slides too; only the page's slide moves the safe area
|
|
2375
|
+
const handleAnimationEnd = (event: AnimationEvent<HTMLDivElement>) => {
|
|
2376
|
+
if (event.target === event.currentTarget) {
|
|
2377
|
+
update()
|
|
2378
|
+
}
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
return (
|
|
2382
|
+
<Box
|
|
2383
|
+
component="div"
|
|
2384
|
+
ref={containerRef}
|
|
2385
|
+
sx={{
|
|
2386
|
+
position: 'absolute',
|
|
2387
|
+
inset: 0,
|
|
2388
|
+
display: 'grid',
|
|
2389
|
+
gridTemplateRows: 'auto minmax(0, 1fr) auto',
|
|
2390
|
+
fontFamily: NIGHTJAR.font,
|
|
2391
|
+
color: NIGHTJAR.cream,
|
|
2392
|
+
// The free area lies over the canvas; only the bars and the panel take the pointer
|
|
2393
|
+
pointerEvents: 'none',
|
|
2394
|
+
}}
|
|
2395
|
+
>
|
|
2396
|
+
<Box
|
|
2397
|
+
component="header"
|
|
2398
|
+
sx={{
|
|
2399
|
+
display: 'flex',
|
|
2400
|
+
alignItems: 'center',
|
|
2401
|
+
gap: 5,
|
|
2402
|
+
minBlockSize: 72,
|
|
2403
|
+
paddingInline: 4,
|
|
2404
|
+
bgcolor: NIGHTJAR.ink,
|
|
2405
|
+
borderBlockEnd: `1px solid ${NIGHTJAR.line}`,
|
|
2406
|
+
pointerEvents: 'auto',
|
|
2407
|
+
}}
|
|
2408
|
+
>
|
|
2409
|
+
<Brand />
|
|
2410
|
+
<StepHeader compact={false} reached={reached} />
|
|
2411
|
+
</Box>
|
|
2412
|
+
|
|
2413
|
+
<Box
|
|
2414
|
+
component="div"
|
|
2415
|
+
key={page}
|
|
2416
|
+
onAnimationEnd={handleAnimationEnd}
|
|
2417
|
+
sx={{
|
|
2418
|
+
display: 'grid',
|
|
2419
|
+
gridTemplateColumns: `minmax(0, 1fr) ${PANEL_WIDTHS[page]}px`,
|
|
2420
|
+
minBlockSize: 0,
|
|
2421
|
+
animation: `${ENTER_FROM_END} 480ms cubic-bezier(0.2, 0.7, 0.2, 1)`,
|
|
2422
|
+
'@media (prefers-reduced-motion: reduce)': { animation: 'none' },
|
|
2423
|
+
}}
|
|
2424
|
+
>
|
|
2425
|
+
<Box component="div" sx={{ position: 'relative', minInlineSize: 0 }}>
|
|
2426
|
+
{/* The camera fits the guitar into this box, so its inset is the room around the guitar */}
|
|
2427
|
+
<Box component="div" ref={safeAreaRef} sx={{ position: 'absolute', inset: '40px 72px 56px' }} />
|
|
2428
|
+
<Typography
|
|
2429
|
+
sx={{
|
|
2430
|
+
position: 'absolute',
|
|
2431
|
+
insetBlockEnd: 20,
|
|
2432
|
+
insetInline: 0,
|
|
2433
|
+
textAlign: 'center',
|
|
2434
|
+
fontSize: 12,
|
|
2435
|
+
letterSpacing: '0.14em',
|
|
2436
|
+
textTransform: 'uppercase',
|
|
2437
|
+
color: NIGHTJAR.faint,
|
|
2438
|
+
}}
|
|
2439
|
+
>
|
|
2440
|
+
Drag to turn the guitar
|
|
2441
|
+
</Typography>
|
|
2442
|
+
</Box>
|
|
2443
|
+
<Box
|
|
2444
|
+
component="aside"
|
|
2445
|
+
aria-label={page === 'steps' ? 'Step' : page === 'summary' ? 'Summary' : 'Order'}
|
|
2446
|
+
sx={{
|
|
2447
|
+
overflowY: 'auto',
|
|
2448
|
+
paddingInline: 4,
|
|
2449
|
+
paddingBlock: 4,
|
|
2450
|
+
bgcolor: NIGHTJAR.panel,
|
|
2451
|
+
borderInlineStart: `1px solid ${NIGHTJAR.line}`,
|
|
2452
|
+
pointerEvents: 'auto',
|
|
2453
|
+
}}
|
|
2454
|
+
>
|
|
2455
|
+
{page === 'steps' && <StepPanel compact={false} />}
|
|
2456
|
+
{page === 'summary' && <SummaryPanel compact={false} form={form} />}
|
|
2457
|
+
{page === 'ordered' && <OrderConfirmation compact={false} contact={form.contact} />}
|
|
2458
|
+
</Box>
|
|
2459
|
+
</Box>
|
|
2460
|
+
|
|
2461
|
+
<OrderBar compact={false} form={form} />
|
|
2462
|
+
</Box>
|
|
2463
|
+
)
|
|
2464
|
+
}
|
|
2465
|
+
```
|
|
2466
|
+
|
|
2467
|
+
### ./src/\_shared/OrderBar.tsx
|
|
2468
|
+
|
|
2469
|
+
```tsx
|
|
2470
|
+
import { Box, Button, CircularProgress, IconButton, Tooltip, Typography } from '@mui/material'
|
|
2471
|
+
|
|
2472
|
+
import { FrontendAnalyticsFactory } from '@salsita-ai/sdk/configurator'
|
|
2473
|
+
import { detailComponent } from '@salsita-ai/sdk/domain'
|
|
2474
|
+
|
|
2475
|
+
import { HEADING_SX, LABEL_SX, NIGHTJAR } from '../_fields/index.js'
|
|
2476
|
+
import type { OrderForm } from './order-form.js'
|
|
2477
|
+
|
|
2478
|
+
const BACK_ICON = 'M15 5l-7 7 7 7'
|
|
2479
|
+
|
|
2480
|
+
interface OrderBarProps {
|
|
2481
|
+
/** The phone's bar: price and two buttons */
|
|
2482
|
+
readonly compact: boolean
|
|
2483
|
+
readonly form: OrderForm
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
// The bar at the bottom: the guitar's name and price, Back, and the step's main action. On a step that is Next, on
|
|
2487
|
+
// the step before the summary **Review order**, on the summary **Place order**, and after the order **Design another**.
|
|
2488
|
+
export const OrderBar = ({ compact, form }: OrderBarProps) => {
|
|
2489
|
+
const resolve = phx.frontend.useResolveLocalizable()
|
|
2490
|
+
const detail = phx.frontend.useFirstRootComponent(detailComponent)
|
|
2491
|
+
const price = phx.frontend.useRootEntityPrice()
|
|
2492
|
+
const { steps, activeIndex, canGoPrevious, isLast, next, previous } = phx.frontend.useStepNavigation()
|
|
2493
|
+
const navigationState = phx.frontend.useActiveNavigationState()
|
|
2494
|
+
const navigate = phx.frontend.useNavigate()
|
|
2495
|
+
const analytics = phx.frontend.useAnalytics()
|
|
2496
|
+
const { primary, hints } = phx.frontend.useFinalizeActions()
|
|
2497
|
+
const { accessInfo } = phx.frontend.useAccessService()
|
|
2498
|
+
|
|
2499
|
+
const isOrdered = navigationState === 'ordered'
|
|
2500
|
+
const isPending = primary?.isPending ?? false
|
|
2501
|
+
const nextStep = steps[activeIndex + 1]
|
|
2502
|
+
const firstStep = steps[0]
|
|
2503
|
+
|
|
2504
|
+
// The step before the last one leads to the summary. Like the built-in summary button, it records
|
|
2505
|
+
// `SummaryButtonClicked`, which `next()` would not: it records the next-step button's event.
|
|
2506
|
+
const enterSummary = () => {
|
|
2507
|
+
if (nextStep === undefined) {
|
|
2508
|
+
return
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
analytics.push(FrontendAnalyticsFactory.SummaryButtonClicked())
|
|
2512
|
+
navigate(nextStep.state)
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
// A conflict or a missing detail blocks the order; the button stays clickable and shows what is missing instead
|
|
2516
|
+
const placeOrder = () => {
|
|
2517
|
+
if (primary === null) {
|
|
2518
|
+
return
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
if (primary.disabled || !form.isComplete) {
|
|
2522
|
+
form.revealErrors()
|
|
2523
|
+
return
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
void primary.run()
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
const designAnother = () => {
|
|
2530
|
+
if (firstStep) {
|
|
2531
|
+
navigate(firstStep.state)
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2534
|
+
|
|
2535
|
+
const action = isOrdered
|
|
2536
|
+
? { label: 'Design another', onClick: designAnother, blocked: false }
|
|
2537
|
+
: isLast
|
|
2538
|
+
? { label: primary?.label ?? 'Place order', onClick: placeOrder, blocked: primary?.disabled ?? true }
|
|
2539
|
+
: nextStep?.index === steps.length - 1
|
|
2540
|
+
? { label: 'Review order', onClick: enterSummary, blocked: false }
|
|
2541
|
+
: { label: compact ? 'Next' : `Next: ${nextStep?.label ?? ''}`, onClick: next, blocked: false }
|
|
2542
|
+
const showAction = !(isLast && !isOrdered && (primary === null || accessInfo.viewMode))
|
|
2543
|
+
const blockedNote = isLast && !isOrdered && primary?.disabled && hints ? 'Settle the choices above first' : null
|
|
2544
|
+
|
|
2545
|
+
return (
|
|
2546
|
+
<Box
|
|
2547
|
+
component="footer"
|
|
2548
|
+
sx={{
|
|
2549
|
+
display: 'flex',
|
|
2550
|
+
alignItems: 'center',
|
|
2551
|
+
gap: compact ? 1.5 : 3,
|
|
2552
|
+
minBlockSize: compact ? 72 : 84,
|
|
2553
|
+
paddingInline: compact ? 2 : 4,
|
|
2554
|
+
paddingBlock: 1.5,
|
|
2555
|
+
bgcolor: NIGHTJAR.ink,
|
|
2556
|
+
borderBlockStart: `1px solid ${NIGHTJAR.line}`,
|
|
2557
|
+
pointerEvents: 'auto',
|
|
2558
|
+
}}
|
|
2559
|
+
>
|
|
2560
|
+
{!compact && (
|
|
2561
|
+
<Box component="div" sx={{ display: 'grid', gap: 0.25, minInlineSize: 0 }}>
|
|
2562
|
+
<Typography sx={{ ...HEADING_SX, fontSize: 18, letterSpacing: '0.24em' }}>
|
|
2563
|
+
{detail ? resolve(detail.state.title) : 'Nightjar'}
|
|
2564
|
+
</Typography>
|
|
2565
|
+
<Typography sx={{ fontFamily: NIGHTJAR.font, fontSize: 13, color: NIGHTJAR.muted, whiteSpace: 'nowrap' }}>
|
|
2566
|
+
{detail ? resolve(detail.state.subtitle) : ''}
|
|
2567
|
+
</Typography>
|
|
2568
|
+
</Box>
|
|
2569
|
+
)}
|
|
2570
|
+
|
|
2571
|
+
<Box component="div" sx={{ display: 'grid', marginInlineStart: compact ? 0 : 'auto', minInlineSize: 0 }}>
|
|
2572
|
+
<Typography sx={{ ...LABEL_SX, fontSize: 11 }}>{isOrdered ? 'Ordered' : 'Your price'}</Typography>
|
|
2573
|
+
<Typography
|
|
2574
|
+
aria-live="polite"
|
|
2575
|
+
sx={{
|
|
2576
|
+
fontFamily: NIGHTJAR.font,
|
|
2577
|
+
fontSize: compact ? 22 : 28,
|
|
2578
|
+
fontWeight: 700,
|
|
2579
|
+
lineHeight: 1.1,
|
|
2580
|
+
fontVariantNumeric: 'tabular-nums',
|
|
2581
|
+
color: NIGHTJAR.cream,
|
|
2582
|
+
}}
|
|
2583
|
+
>
|
|
2584
|
+
{price}
|
|
2585
|
+
</Typography>
|
|
2586
|
+
</Box>
|
|
2587
|
+
|
|
2588
|
+
<Box
|
|
2589
|
+
component="div"
|
|
2590
|
+
sx={{ display: 'flex', alignItems: 'center', gap: 1.5, marginInlineStart: compact ? 'auto' : 2 }}
|
|
2591
|
+
>
|
|
2592
|
+
{blockedNote && !compact && (
|
|
2593
|
+
<Typography sx={{ fontFamily: NIGHTJAR.font, fontSize: 14, color: NIGHTJAR.amber }}>{blockedNote}</Typography>
|
|
2594
|
+
)}
|
|
2595
|
+
{canGoPrevious && !isOrdered && (
|
|
2596
|
+
<Tooltip title="Back">
|
|
2597
|
+
<span>
|
|
2598
|
+
<IconButton
|
|
2599
|
+
aria-label="Back"
|
|
2600
|
+
onClick={previous}
|
|
2601
|
+
disabled={isPending}
|
|
2602
|
+
sx={{
|
|
2603
|
+
inlineSize: 48,
|
|
2604
|
+
blockSize: 48,
|
|
2605
|
+
border: `1px solid ${NIGHTJAR.line}`,
|
|
2606
|
+
color: NIGHTJAR.cream,
|
|
2607
|
+
'&:hover': { bgcolor: NIGHTJAR.raisedHover },
|
|
2608
|
+
'&.Mui-disabled': { color: NIGHTJAR.faint },
|
|
2609
|
+
}}
|
|
2610
|
+
>
|
|
2611
|
+
<svg viewBox="0 0 24 24" width={20} height={20} fill="none" stroke="currentColor" strokeWidth={2}>
|
|
2612
|
+
<path d={BACK_ICON} strokeLinecap="round" strokeLinejoin="round" />
|
|
2613
|
+
</svg>
|
|
2614
|
+
</IconButton>
|
|
2615
|
+
</span>
|
|
2616
|
+
</Tooltip>
|
|
2617
|
+
)}
|
|
2618
|
+
{showAction && (
|
|
2619
|
+
<Button
|
|
2620
|
+
onClick={action.onClick}
|
|
2621
|
+
disabled={isPending}
|
|
2622
|
+
aria-disabled={action.blocked || undefined}
|
|
2623
|
+
title={isLast && !isOrdered ? (hints ?? primary?.title) : undefined}
|
|
2624
|
+
startIcon={isPending ? <CircularProgress size={16} sx={{ color: NIGHTJAR.ink }} /> : undefined}
|
|
2625
|
+
sx={{
|
|
2626
|
+
...HEADING_SX,
|
|
2627
|
+
minBlockSize: 48,
|
|
2628
|
+
paddingInline: compact ? 2.5 : 3.5,
|
|
2629
|
+
borderRadius: 1,
|
|
2630
|
+
fontSize: 14,
|
|
2631
|
+
whiteSpace: 'nowrap',
|
|
2632
|
+
color: NIGHTJAR.ink,
|
|
2633
|
+
bgcolor: action.blocked ? NIGHTJAR.muted : NIGHTJAR.amber,
|
|
2634
|
+
'&:hover': { bgcolor: action.blocked ? NIGHTJAR.muted : NIGHTJAR.amberHover },
|
|
2635
|
+
'&.Mui-disabled': { color: NIGHTJAR.ink, bgcolor: NIGHTJAR.amber, opacity: 0.75 },
|
|
2636
|
+
'&.Mui-focusVisible': { outline: `2px solid ${NIGHTJAR.cream}`, outlineOffset: 2 },
|
|
2637
|
+
}}
|
|
2638
|
+
>
|
|
2639
|
+
{isPending ? 'Placing order…' : action.label}
|
|
2640
|
+
</Button>
|
|
2641
|
+
)}
|
|
2642
|
+
</Box>
|
|
2643
|
+
</Box>
|
|
2644
|
+
)
|
|
2645
|
+
}
|
|
2646
|
+
```
|
|
2647
|
+
|
|
2648
|
+
### ./src/\_shared/OrderConfirmation.tsx
|
|
2649
|
+
|
|
2650
|
+
```tsx
|
|
2651
|
+
import { Box, Typography } from '@mui/material'
|
|
2652
|
+
|
|
2653
|
+
import { HEADING_SX, LABEL_SX, NIGHTJAR, SummaryRows } from '../_fields/index.js'
|
|
2654
|
+
import type { Contact } from './order-form.js'
|
|
2655
|
+
|
|
2656
|
+
const CHECK_ICON = 'M5 12.5 10 17.5 19 7'
|
|
2657
|
+
|
|
2658
|
+
interface OrderConfirmationProps {
|
|
2659
|
+
readonly compact: boolean
|
|
2660
|
+
readonly contact: Contact
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2663
|
+
// The `ordered` navigation state, which the order handler enters once the order is accepted. The order number is
|
|
2664
|
+
// made from the configuration's id, so it stays the same when the confirmation is shown again.
|
|
2665
|
+
export const OrderConfirmation = ({ compact, contact }: OrderConfirmationProps) => {
|
|
2666
|
+
const configurationId = phx.frontend.useConfigurationId()
|
|
2667
|
+
const price = phx.frontend.useRootEntityPrice()
|
|
2668
|
+
const orderNumber = `NJ-${String(configurationId)
|
|
2669
|
+
.replace(/[^a-z0-9]/gi, '')
|
|
2670
|
+
.slice(-6)
|
|
2671
|
+
.toUpperCase()}`
|
|
2672
|
+
const name = contact.name.trim()
|
|
2673
|
+
|
|
2674
|
+
return (
|
|
2675
|
+
<Box component="div" role="status" sx={{ display: 'grid', gap: compact ? 2.5 : 3 }}>
|
|
2676
|
+
<Box component="header" sx={{ display: 'grid', gap: 1.5, justifyItems: 'start' }}>
|
|
2677
|
+
<Box
|
|
2678
|
+
component="svg"
|
|
2679
|
+
viewBox="0 0 24 24"
|
|
2680
|
+
aria-hidden
|
|
2681
|
+
sx={{ inlineSize: 44, blockSize: 44, padding: 1.25, borderRadius: '50%', bgcolor: NIGHTJAR.amber }}
|
|
2682
|
+
>
|
|
2683
|
+
<path d={CHECK_ICON} fill="none" stroke={NIGHTJAR.ink} strokeWidth={2.6} strokeLinecap="round" />
|
|
2684
|
+
</Box>
|
|
2685
|
+
<Typography sx={LABEL_SX}>Order {orderNumber}</Typography>
|
|
2686
|
+
<Typography component="h2" sx={{ ...HEADING_SX, fontSize: compact ? 24 : 30, lineHeight: 1.05 }}>
|
|
2687
|
+
{name ? `Thank you, ${name}` : 'Thank you'}
|
|
2688
|
+
</Typography>
|
|
2689
|
+
<Typography sx={{ fontFamily: NIGHTJAR.font, fontSize: 15, lineHeight: 1.5, color: NIGHTJAR.muted }}>
|
|
2690
|
+
Your Nightjar goes into the build queue at {price}. We will write to {contact.email.trim() || 'you'} when the
|
|
2691
|
+
shop confirms it; a build takes about eight weeks.
|
|
2692
|
+
</Typography>
|
|
2693
|
+
</Box>
|
|
2694
|
+
<Box component="section" sx={{ display: 'grid', gap: 1.5 }}>
|
|
2695
|
+
<Typography component="h3" sx={LABEL_SX}>
|
|
2696
|
+
What we are building
|
|
2697
|
+
</Typography>
|
|
2698
|
+
<SummaryRows />
|
|
2699
|
+
</Box>
|
|
2700
|
+
</Box>
|
|
2701
|
+
)
|
|
2702
|
+
}
|
|
2703
|
+
```
|
|
2704
|
+
|
|
2705
|
+
### ./src/\_shared/PhonePage.tsx
|
|
2706
|
+
|
|
2707
|
+
```tsx
|
|
2708
|
+
import { Box, Typography } from '@mui/material'
|
|
2709
|
+
import type { AnimationEvent } from 'react'
|
|
2710
|
+
|
|
2711
|
+
import { ENTER_FROM_BELOW, HEADING_SX, NIGHTJAR } from '../_fields/index.js'
|
|
2712
|
+
import { OrderBar } from './OrderBar.js'
|
|
2713
|
+
import { OrderConfirmation } from './OrderConfirmation.js'
|
|
2714
|
+
import { StepHeader } from './StepHeader.js'
|
|
2715
|
+
import { StepPanel } from './StepPanel.js'
|
|
2716
|
+
import { SummaryPanel } from './SummaryPanel.js'
|
|
2717
|
+
import type { OrderForm } from './order-form.js'
|
|
2718
|
+
|
|
2719
|
+
type Page = 'steps' | 'summary' | 'ordered'
|
|
2720
|
+
|
|
2721
|
+
// How much of the screen below the header the guitar keeps: the summary's form needs more of it
|
|
2722
|
+
const SCENE_SHARES: Readonly<Record<Page, string>> = { steps: '46%', summary: '30%', ordered: '40%' }
|
|
2723
|
+
|
|
2724
|
+
const pageOf = (navigationState: string): Page => {
|
|
2725
|
+
return navigationState === 'ordered' ? 'ordered' : navigationState === 'summary' ? 'summary' : 'steps'
|
|
2726
|
+
}
|
|
2727
|
+
|
|
2728
|
+
interface PhonePageProps {
|
|
2729
|
+
readonly form: OrderForm
|
|
2730
|
+
readonly reached: number
|
|
2731
|
+
}
|
|
2732
|
+
|
|
2733
|
+
// The phone wizard: a compact progress line, the guitar at the top, the step's choices in a sheet below it and the
|
|
2734
|
+
// bar fixed at the bottom. Like the desktop pages, each page rises in with its own safe area and measures it again
|
|
2735
|
+
// with `update()` once the slide has settled.
|
|
2736
|
+
export const PhonePage = ({ form, reached }: PhonePageProps) => {
|
|
2737
|
+
const { containerRef, safeAreaRef, update } = phx.frontend.useSceneSafeArea()
|
|
2738
|
+
const navigationState = phx.frontend.useActiveNavigationState()
|
|
2739
|
+
const page = pageOf(navigationState)
|
|
2740
|
+
|
|
2741
|
+
const handleAnimationEnd = (event: AnimationEvent<HTMLDivElement>) => {
|
|
2742
|
+
if (event.target === event.currentTarget) {
|
|
2743
|
+
update()
|
|
2744
|
+
}
|
|
2745
|
+
}
|
|
2746
|
+
|
|
2747
|
+
return (
|
|
2748
|
+
<Box
|
|
2749
|
+
component="div"
|
|
2750
|
+
ref={containerRef}
|
|
2751
|
+
sx={{
|
|
2752
|
+
position: 'absolute',
|
|
2753
|
+
inset: 0,
|
|
2754
|
+
display: 'flex',
|
|
2755
|
+
flexDirection: 'column',
|
|
2756
|
+
fontFamily: NIGHTJAR.font,
|
|
2757
|
+
color: NIGHTJAR.cream,
|
|
2758
|
+
pointerEvents: 'none',
|
|
2759
|
+
}}
|
|
2760
|
+
>
|
|
2761
|
+
<Box
|
|
2762
|
+
component="header"
|
|
2763
|
+
sx={{
|
|
2764
|
+
display: 'grid',
|
|
2765
|
+
gap: 1.25,
|
|
2766
|
+
paddingInline: 2,
|
|
2767
|
+
paddingBlock: 1.5,
|
|
2768
|
+
bgcolor: NIGHTJAR.ink,
|
|
2769
|
+
borderBlockEnd: `1px solid ${NIGHTJAR.line}`,
|
|
2770
|
+
pointerEvents: 'auto',
|
|
2771
|
+
}}
|
|
2772
|
+
>
|
|
2773
|
+
<Box component="div" sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
|
2774
|
+
<Box component="span" aria-hidden sx={{ inlineSize: 3, blockSize: 16, bgcolor: NIGHTJAR.amber }} />
|
|
2775
|
+
<Typography sx={{ ...HEADING_SX, fontSize: 13, letterSpacing: '0.32em' }}>Northfret</Typography>
|
|
2776
|
+
</Box>
|
|
2777
|
+
<StepHeader compact reached={reached} />
|
|
2778
|
+
</Box>
|
|
2779
|
+
|
|
2780
|
+
<Box
|
|
2781
|
+
component="div"
|
|
2782
|
+
key={page}
|
|
2783
|
+
onAnimationEnd={handleAnimationEnd}
|
|
2784
|
+
sx={{
|
|
2785
|
+
display: 'flex',
|
|
2786
|
+
flexDirection: 'column',
|
|
2787
|
+
flex: '1 1 0',
|
|
2788
|
+
minBlockSize: 0,
|
|
2789
|
+
animation: `${ENTER_FROM_BELOW} 460ms cubic-bezier(0.2, 0.7, 0.2, 1)`,
|
|
2790
|
+
'@media (prefers-reduced-motion: reduce)': { animation: 'none' },
|
|
2791
|
+
}}
|
|
2792
|
+
>
|
|
2793
|
+
<Box component="div" sx={{ position: 'relative', flex: `0 0 ${SCENE_SHARES[page]}`, minBlockSize: 0 }}>
|
|
2794
|
+
<Box component="div" ref={safeAreaRef} sx={{ position: 'absolute', inset: '12px 16px 8px' }} />
|
|
2795
|
+
</Box>
|
|
2796
|
+
<Box
|
|
2797
|
+
component="main"
|
|
2798
|
+
sx={{
|
|
2799
|
+
flex: '1 1 0',
|
|
2800
|
+
minBlockSize: 0,
|
|
2801
|
+
overflowY: 'auto',
|
|
2802
|
+
overscrollBehavior: 'contain',
|
|
2803
|
+
paddingInline: 2,
|
|
2804
|
+
paddingBlock: 2.5,
|
|
2805
|
+
bgcolor: NIGHTJAR.panel,
|
|
2806
|
+
borderBlockStart: `1px solid ${NIGHTJAR.line}`,
|
|
2807
|
+
borderStartStartRadius: 16,
|
|
2808
|
+
borderStartEndRadius: 16,
|
|
2809
|
+
pointerEvents: 'auto',
|
|
2810
|
+
}}
|
|
2811
|
+
>
|
|
2812
|
+
{page === 'steps' && <StepPanel compact />}
|
|
2813
|
+
{page === 'summary' && <SummaryPanel compact form={form} />}
|
|
2814
|
+
{page === 'ordered' && <OrderConfirmation compact contact={form.contact} />}
|
|
2815
|
+
</Box>
|
|
2816
|
+
</Box>
|
|
2817
|
+
|
|
2818
|
+
<OrderBar compact form={form} />
|
|
2819
|
+
</Box>
|
|
2820
|
+
)
|
|
2821
|
+
}
|
|
2822
|
+
```
|
|
2823
|
+
|
|
2824
|
+
### ./src/\_shared/StepHeader.tsx
|
|
2825
|
+
|
|
2826
|
+
```tsx
|
|
2827
|
+
import { Box, ButtonBase, Typography } from '@mui/material'
|
|
2828
|
+
|
|
2829
|
+
import { HEADING_SX, NIGHTJAR, useWarnings } from '../_fields/index.js'
|
|
2830
|
+
import { STEP_WARNINGS } from './step-warnings.js'
|
|
2831
|
+
|
|
2832
|
+
const CHECK_ICON = 'M5 12.5 10 17.5 19 7'
|
|
2833
|
+
|
|
2834
|
+
interface StepHeaderProps {
|
|
2835
|
+
/** One line with a progress bar, for a phone; the full stepper otherwise */
|
|
2836
|
+
readonly compact: boolean
|
|
2837
|
+
/** The furthest step the customer has reached; the layout keeps it, so it survives the switch between the pages */
|
|
2838
|
+
readonly reached: number
|
|
2839
|
+
}
|
|
2840
|
+
|
|
2841
|
+
// The spec's `navigationSteps` as a stepper. Labels and order come from the spec; `useStepNavigation` gives each step
|
|
2842
|
+
// its status, and `goTo` enters a step and records the stepper's analytics event. The customer can go back to any step
|
|
2843
|
+
// they have reached, never ahead of it, and nowhere while the order is being placed or after it was placed.
|
|
2844
|
+
export const StepHeader = ({ compact, reached }: StepHeaderProps) => {
|
|
2845
|
+
const { steps, activeIndex, activeStep, goTo } = phx.frontend.useStepNavigation()
|
|
2846
|
+
const navigationState = phx.frontend.useActiveNavigationState()
|
|
2847
|
+
const { primary } = phx.frontend.useFinalizeActions()
|
|
2848
|
+
const warnings = useWarnings()
|
|
2849
|
+
const isLocked = navigationState === 'ordered' || (primary?.isPending ?? false)
|
|
2850
|
+
|
|
2851
|
+
const hasWarning = (state: string) => {
|
|
2852
|
+
return warnings.some(warning => STEP_WARNINGS[state]?.includes(warning.type))
|
|
2853
|
+
}
|
|
2854
|
+
|
|
2855
|
+
if (compact) {
|
|
2856
|
+
const progress = steps.length === 0 ? 0 : (activeIndex + 1) / steps.length
|
|
2857
|
+
|
|
2858
|
+
return (
|
|
2859
|
+
<Box component="nav" aria-label="Build steps" sx={{ display: 'grid', gap: 1 }}>
|
|
2860
|
+
<Typography
|
|
2861
|
+
sx={{ ...HEADING_SX, fontSize: 13, letterSpacing: '0.14em', display: 'flex', alignItems: 'center', gap: 1 }}
|
|
2862
|
+
>
|
|
2863
|
+
<Box component="span" sx={{ color: NIGHTJAR.amber, fontVariantNumeric: 'tabular-nums' }}>
|
|
2864
|
+
{activeIndex + 1} / {steps.length}
|
|
2865
|
+
</Box>
|
|
2866
|
+
<Box component="span" aria-hidden sx={{ color: NIGHTJAR.faint }}>
|
|
2867
|
+
·
|
|
2868
|
+
</Box>
|
|
2869
|
+
<Box component="span" aria-current="step">
|
|
2870
|
+
{activeStep?.label}
|
|
2871
|
+
</Box>
|
|
2872
|
+
</Typography>
|
|
2873
|
+
<Box
|
|
2874
|
+
component="div"
|
|
2875
|
+
role="progressbar"
|
|
2876
|
+
aria-label="Build progress"
|
|
2877
|
+
aria-valuemin={0}
|
|
2878
|
+
aria-valuemax={steps.length}
|
|
2879
|
+
aria-valuenow={activeIndex + 1}
|
|
2880
|
+
sx={{ blockSize: 2, borderRadius: 1, bgcolor: NIGHTJAR.line, overflow: 'hidden' }}
|
|
2881
|
+
>
|
|
2882
|
+
<Box
|
|
2883
|
+
component="div"
|
|
2884
|
+
sx={{
|
|
2885
|
+
blockSize: '100%',
|
|
2886
|
+
inlineSize: `${progress * 100}%`,
|
|
2887
|
+
bgcolor: NIGHTJAR.amber,
|
|
2888
|
+
transition: 'inline-size 400ms ease-out',
|
|
2889
|
+
}}
|
|
2890
|
+
/>
|
|
2891
|
+
</Box>
|
|
2892
|
+
</Box>
|
|
2893
|
+
)
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
return (
|
|
2897
|
+
<Box component="nav" aria-label="Build steps">
|
|
2898
|
+
<Box
|
|
2899
|
+
component="ol"
|
|
2900
|
+
sx={{ display: 'flex', alignItems: 'center', gap: 1, margin: 0, padding: 0, listStyle: 'none' }}
|
|
2901
|
+
>
|
|
2902
|
+
{steps.map(step => {
|
|
2903
|
+
const isActive = step.status === 'active'
|
|
2904
|
+
const isComplete = step.status === 'complete'
|
|
2905
|
+
const canEnter = !isLocked && !isActive && step.index <= reached
|
|
2906
|
+
const warn = hasWarning(step.state)
|
|
2907
|
+
|
|
2908
|
+
return (
|
|
2909
|
+
<Box component="li" key={step.state} sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
|
2910
|
+
{step.index > 0 && (
|
|
2911
|
+
<Box
|
|
2912
|
+
component="span"
|
|
2913
|
+
aria-hidden
|
|
2914
|
+
sx={{
|
|
2915
|
+
inlineSize: 28,
|
|
2916
|
+
blockSize: '1px',
|
|
2917
|
+
bgcolor: step.index <= reached ? NIGHTJAR.muted : NIGHTJAR.line,
|
|
2918
|
+
}}
|
|
2919
|
+
/>
|
|
2920
|
+
)}
|
|
2921
|
+
<ButtonBase
|
|
2922
|
+
aria-label={warn ? `${step.label}, needs attention` : step.label}
|
|
2923
|
+
aria-current={isActive ? 'step' : undefined}
|
|
2924
|
+
disabled={!canEnter}
|
|
2925
|
+
onClick={() => goTo(step.index)}
|
|
2926
|
+
sx={{
|
|
2927
|
+
display: 'flex',
|
|
2928
|
+
alignItems: 'center',
|
|
2929
|
+
gap: 1,
|
|
2930
|
+
paddingInline: 1,
|
|
2931
|
+
paddingBlock: 0.75,
|
|
2932
|
+
borderRadius: 1,
|
|
2933
|
+
color: isActive ? NIGHTJAR.cream : step.index <= reached ? NIGHTJAR.muted : NIGHTJAR.faint,
|
|
2934
|
+
'&:hover': { color: NIGHTJAR.cream },
|
|
2935
|
+
'&.Mui-focusVisible': { outline: `2px solid ${NIGHTJAR.amber}` },
|
|
2936
|
+
}}
|
|
2937
|
+
>
|
|
2938
|
+
<Box
|
|
2939
|
+
component="span"
|
|
2940
|
+
sx={{
|
|
2941
|
+
display: 'grid',
|
|
2942
|
+
placeItems: 'center',
|
|
2943
|
+
inlineSize: 24,
|
|
2944
|
+
blockSize: 24,
|
|
2945
|
+
borderRadius: '50%',
|
|
2946
|
+
fontFamily: NIGHTJAR.font,
|
|
2947
|
+
fontSize: 12,
|
|
2948
|
+
fontWeight: 700,
|
|
2949
|
+
color: isActive ? NIGHTJAR.ink : 'inherit',
|
|
2950
|
+
bgcolor: isActive ? NIGHTJAR.amber : 'transparent',
|
|
2951
|
+
border: isActive ? 'none' : `1px solid ${isComplete ? NIGHTJAR.muted : NIGHTJAR.line}`,
|
|
2952
|
+
}}
|
|
2953
|
+
>
|
|
2954
|
+
{isComplete ? (
|
|
2955
|
+
<Box component="svg" viewBox="0 0 24 24" aria-hidden sx={{ inlineSize: 14, blockSize: 14 }}>
|
|
2956
|
+
<path d={CHECK_ICON} fill="none" stroke="currentColor" strokeWidth={2.6} strokeLinecap="round" />
|
|
2957
|
+
</Box>
|
|
2958
|
+
) : (
|
|
2959
|
+
step.index + 1
|
|
2960
|
+
)}
|
|
2961
|
+
</Box>
|
|
2962
|
+
{/* In a narrow window only the active step keeps its label; the others keep their number */}
|
|
2963
|
+
<Typography
|
|
2964
|
+
component="span"
|
|
2965
|
+
sx={{
|
|
2966
|
+
...HEADING_SX,
|
|
2967
|
+
display: { xs: isActive ? 'inline' : 'none', lg: 'inline' },
|
|
2968
|
+
fontSize: 13,
|
|
2969
|
+
color: 'inherit',
|
|
2970
|
+
}}
|
|
2971
|
+
>
|
|
2972
|
+
{step.label}
|
|
2973
|
+
</Typography>
|
|
2974
|
+
{warn && (
|
|
2975
|
+
<Box
|
|
2976
|
+
component="span"
|
|
2977
|
+
aria-hidden
|
|
2978
|
+
sx={{ inlineSize: 7, blockSize: 7, borderRadius: '50%', bgcolor: NIGHTJAR.amber }}
|
|
2979
|
+
/>
|
|
2980
|
+
)}
|
|
2981
|
+
</ButtonBase>
|
|
2982
|
+
</Box>
|
|
2983
|
+
)
|
|
2984
|
+
})}
|
|
2985
|
+
</Box>
|
|
2986
|
+
</Box>
|
|
2987
|
+
)
|
|
2988
|
+
}
|
|
2989
|
+
```
|
|
2990
|
+
|
|
2991
|
+
### ./src/\_shared/StepPanel.tsx
|
|
2992
|
+
|
|
2993
|
+
```tsx
|
|
2994
|
+
import { Box, Typography } from '@mui/material'
|
|
2995
|
+
import { useState } from 'react'
|
|
2996
|
+
|
|
2997
|
+
import { ENTER_FROM_END, ENTER_FROM_START, HEADING_SX, LABEL_SX, NIGHTJAR, StepFields } from '../_fields/index.js'
|
|
2998
|
+
|
|
2999
|
+
// A line under each step's title; the layout's copy, keyed by the step's navigation state
|
|
3000
|
+
const STEP_INTROS: Readonly<Record<string, string>> = {
|
|
3001
|
+
body: 'The shape sets the feel, the finish and the pickguard the look.',
|
|
3002
|
+
neck: 'What your hand holds: the neck and the board under the strings.',
|
|
3003
|
+
electronics: 'The sound: two pickups, and the metal parts around them.',
|
|
3004
|
+
details: 'Sign the headstock. The shop paints it on by hand.',
|
|
3005
|
+
}
|
|
3006
|
+
|
|
3007
|
+
/** 1 when the active step moved forward, -1 when it moved back; the step's content slides in from that side. */
|
|
3008
|
+
const useStepDirection = (activeIndex: number): 1 | -1 => {
|
|
3009
|
+
const [shown, setShown] = useState<{ readonly index: number; readonly direction: 1 | -1 }>({
|
|
3010
|
+
index: activeIndex,
|
|
3011
|
+
direction: 1,
|
|
3012
|
+
})
|
|
3013
|
+
|
|
3014
|
+
if (activeIndex !== shown.index) {
|
|
3015
|
+
setShown({ index: activeIndex, direction: activeIndex > shown.index ? 1 : -1 })
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
return shown.direction
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3021
|
+
interface StepPanelProps {
|
|
3022
|
+
readonly compact: boolean
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
// The active step: its number, its label from the spec, and its fields. The content is keyed by the step, so each
|
|
3026
|
+
// step slides in from the side the customer moves towards.
|
|
3027
|
+
export const StepPanel = ({ compact }: StepPanelProps) => {
|
|
3028
|
+
const { steps, activeStep, activeIndex } = phx.frontend.useStepNavigation()
|
|
3029
|
+
const direction = useStepDirection(activeIndex)
|
|
3030
|
+
|
|
3031
|
+
if (activeStep === null) {
|
|
3032
|
+
return null
|
|
3033
|
+
}
|
|
3034
|
+
|
|
3035
|
+
return (
|
|
3036
|
+
<Box
|
|
3037
|
+
component="div"
|
|
3038
|
+
key={activeStep.state}
|
|
3039
|
+
sx={{
|
|
3040
|
+
display: 'grid',
|
|
3041
|
+
gap: compact ? 2.5 : 3.5,
|
|
3042
|
+
animation: `${direction === 1 ? ENTER_FROM_END : ENTER_FROM_START} 420ms cubic-bezier(0.2, 0.7, 0.2, 1)`,
|
|
3043
|
+
'@media (prefers-reduced-motion: reduce)': { animation: 'none' },
|
|
3044
|
+
}}
|
|
3045
|
+
>
|
|
3046
|
+
{!compact && (
|
|
3047
|
+
<Box component="header" sx={{ display: 'grid', gap: 1 }}>
|
|
3048
|
+
<Typography sx={LABEL_SX}>
|
|
3049
|
+
Step {activeIndex + 1} of {steps.length}
|
|
3050
|
+
</Typography>
|
|
3051
|
+
<Typography component="h2" sx={{ ...HEADING_SX, fontSize: 30, lineHeight: 1.05 }}>
|
|
3052
|
+
{activeStep.label}
|
|
3053
|
+
</Typography>
|
|
3054
|
+
{STEP_INTROS[activeStep.state] && (
|
|
3055
|
+
<Typography sx={{ fontFamily: NIGHTJAR.font, fontSize: 15, lineHeight: 1.45, color: NIGHTJAR.muted }}>
|
|
3056
|
+
{STEP_INTROS[activeStep.state]}
|
|
3057
|
+
</Typography>
|
|
3058
|
+
)}
|
|
3059
|
+
</Box>
|
|
3060
|
+
)}
|
|
3061
|
+
<StepFields compact={compact} />
|
|
3062
|
+
</Box>
|
|
3063
|
+
)
|
|
3064
|
+
}
|
|
3065
|
+
```
|
|
3066
|
+
|
|
3067
|
+
### ./src/\_shared/SummaryPanel.tsx
|
|
3068
|
+
|
|
3069
|
+
```tsx
|
|
3070
|
+
import { Box, Button, InputBase, Typography } from '@mui/material'
|
|
3071
|
+
import type { ReactNode } from 'react'
|
|
3072
|
+
import { useEffect, useRef } from 'react'
|
|
3073
|
+
|
|
3074
|
+
import { HEADING_SX, LABEL_SX, NIGHTJAR, SummaryRows, useWarnings } from '../_fields/index.js'
|
|
3075
|
+
import type { OrderForm } from './order-form.js'
|
|
3076
|
+
import { STEP_WARNINGS } from './step-warnings.js'
|
|
3077
|
+
|
|
3078
|
+
const SECTION_SX = { display: 'grid', gap: 1.5 } as const
|
|
3079
|
+
|
|
3080
|
+
interface ContactInputProps {
|
|
3081
|
+
readonly id: string
|
|
3082
|
+
readonly label: string
|
|
3083
|
+
readonly value: string
|
|
3084
|
+
readonly onChange: (value: string) => void
|
|
3085
|
+
readonly error: string | undefined
|
|
3086
|
+
readonly type: 'text' | 'email'
|
|
3087
|
+
readonly autoComplete: string
|
|
3088
|
+
readonly disabled: boolean
|
|
3089
|
+
}
|
|
3090
|
+
|
|
3091
|
+
const ContactInput = ({ id, label, value, onChange, error, type, autoComplete, disabled }: ContactInputProps) => {
|
|
3092
|
+
return (
|
|
3093
|
+
<Box component="div" sx={{ display: 'grid', gap: 0.75 }}>
|
|
3094
|
+
<Typography
|
|
3095
|
+
component="label"
|
|
3096
|
+
htmlFor={id}
|
|
3097
|
+
sx={{ fontFamily: NIGHTJAR.font, fontSize: 14, color: NIGHTJAR.muted }}
|
|
3098
|
+
>
|
|
3099
|
+
{label}
|
|
3100
|
+
</Typography>
|
|
3101
|
+
<InputBase
|
|
3102
|
+
id={id}
|
|
3103
|
+
type={type}
|
|
3104
|
+
value={value}
|
|
3105
|
+
disabled={disabled}
|
|
3106
|
+
autoComplete={autoComplete}
|
|
3107
|
+
onChange={event => onChange(event.target.value)}
|
|
3108
|
+
inputProps={{ 'aria-invalid': error !== undefined, 'aria-describedby': error ? `${id}-error` : undefined }}
|
|
3109
|
+
sx={{
|
|
3110
|
+
paddingInline: 1.5,
|
|
3111
|
+
paddingBlock: 0.75,
|
|
3112
|
+
borderRadius: 1.5,
|
|
3113
|
+
border: `1px solid ${error ? NIGHTJAR.alert : NIGHTJAR.line}`,
|
|
3114
|
+
bgcolor: NIGHTJAR.raised,
|
|
3115
|
+
fontFamily: NIGHTJAR.font,
|
|
3116
|
+
fontSize: 16,
|
|
3117
|
+
color: NIGHTJAR.cream,
|
|
3118
|
+
'&.Mui-focused': { borderColor: error ? NIGHTJAR.alert : NIGHTJAR.amber },
|
|
3119
|
+
}}
|
|
3120
|
+
/>
|
|
3121
|
+
{error && (
|
|
3122
|
+
<Typography id={`${id}-error`} sx={{ fontFamily: NIGHTJAR.font, fontSize: 13, color: NIGHTJAR.alert }}>
|
|
3123
|
+
{error}
|
|
3124
|
+
</Typography>
|
|
3125
|
+
)}
|
|
3126
|
+
</Box>
|
|
3127
|
+
)
|
|
3128
|
+
}
|
|
3129
|
+
|
|
3130
|
+
const Card = ({ children, tone }: { readonly children: ReactNode; readonly tone: 'plain' | 'warning' | 'alert' }) => {
|
|
3131
|
+
const borders = { plain: NIGHTJAR.line, warning: NIGHTJAR.amber, alert: NIGHTJAR.alert }
|
|
3132
|
+
const backgrounds = { plain: NIGHTJAR.raised, warning: NIGHTJAR.amberTint, alert: NIGHTJAR.alertTint }
|
|
3133
|
+
|
|
3134
|
+
return (
|
|
3135
|
+
<Box
|
|
3136
|
+
component="section"
|
|
3137
|
+
sx={{
|
|
3138
|
+
display: 'grid',
|
|
3139
|
+
gap: 1.5,
|
|
3140
|
+
padding: 2,
|
|
3141
|
+
borderRadius: 2,
|
|
3142
|
+
border: `1px solid ${borders[tone]}`,
|
|
3143
|
+
bgcolor: backgrounds[tone],
|
|
3144
|
+
}}
|
|
3145
|
+
>
|
|
3146
|
+
{children}
|
|
3147
|
+
</Box>
|
|
3148
|
+
)
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3151
|
+
// The warnings left between choices, each with the way to the step that resolves it. Ordering waits until none is
|
|
3152
|
+
// left: `useFinalizeActions` reports the action `disabled` with the same texts as `hints`.
|
|
3153
|
+
const Conflicts = () => {
|
|
3154
|
+
const warnings = useWarnings()
|
|
3155
|
+
const { steps, goTo } = phx.frontend.useStepNavigation()
|
|
3156
|
+
const conflicts = warnings.flatMap(warning => {
|
|
3157
|
+
const step = steps.find(candidate => STEP_WARNINGS[candidate.state]?.includes(warning.type))
|
|
3158
|
+
|
|
3159
|
+
return step ? [{ ...warning, step }] : []
|
|
3160
|
+
})
|
|
3161
|
+
|
|
3162
|
+
if (conflicts.length === 0) {
|
|
3163
|
+
return null
|
|
3164
|
+
}
|
|
3165
|
+
|
|
3166
|
+
return (
|
|
3167
|
+
<Card tone="warning">
|
|
3168
|
+
<Typography component="h3" sx={{ ...LABEL_SX, color: NIGHTJAR.amber }}>
|
|
3169
|
+
{conflicts.length === 1 ? 'One choice to settle before ordering' : `${conflicts.length} choices to settle`}
|
|
3170
|
+
</Typography>
|
|
3171
|
+
{conflicts.map(conflict => (
|
|
3172
|
+
<Box component="div" key={conflict.type} sx={{ display: 'grid', gap: 1, justifyItems: 'start' }}>
|
|
3173
|
+
<Typography sx={{ fontFamily: NIGHTJAR.font, fontSize: 15, lineHeight: 1.45, color: NIGHTJAR.cream }}>
|
|
3174
|
+
{conflict.text}
|
|
3175
|
+
</Typography>
|
|
3176
|
+
<Button
|
|
3177
|
+
onClick={() => goTo(conflict.step.index)}
|
|
3178
|
+
sx={{
|
|
3179
|
+
...LABEL_SX,
|
|
3180
|
+
minBlockSize: 36,
|
|
3181
|
+
paddingInline: 1.5,
|
|
3182
|
+
color: NIGHTJAR.ink,
|
|
3183
|
+
bgcolor: NIGHTJAR.amber,
|
|
3184
|
+
'&:hover': { bgcolor: NIGHTJAR.amberHover },
|
|
3185
|
+
}}
|
|
3186
|
+
>
|
|
3187
|
+
Go to {conflict.step.label}
|
|
3188
|
+
</Button>
|
|
3189
|
+
</Box>
|
|
3190
|
+
))}
|
|
3191
|
+
</Card>
|
|
3192
|
+
)
|
|
3193
|
+
}
|
|
3194
|
+
|
|
3195
|
+
interface SummaryPanelProps {
|
|
3196
|
+
readonly compact: boolean
|
|
3197
|
+
readonly form: OrderForm
|
|
3198
|
+
}
|
|
3199
|
+
|
|
3200
|
+
// The last step: every choice as the spec's control hooks read it, the conflicts left, the contact form and the
|
|
3201
|
+
// order's error. The summary only reviews; a choice is changed on its step, which the stepper and the conflicts link
|
|
3202
|
+
// to. **Place order** is in the bar at the bottom.
|
|
3203
|
+
export const SummaryPanel = ({ compact, form }: SummaryPanelProps) => {
|
|
3204
|
+
const { primary } = phx.frontend.useFinalizeActions()
|
|
3205
|
+
const { contact, setContact, errors, showErrors, blockedAttempts, isComplete } = form
|
|
3206
|
+
const isPending = primary?.isPending ?? false
|
|
3207
|
+
const topRef = useRef<HTMLDivElement>(null)
|
|
3208
|
+
const detailsRef = useRef<HTMLElement>(null)
|
|
3209
|
+
// The attempts already handled; the summary opens again after a blocked attempt without scrolling
|
|
3210
|
+
const scrolledFor = useRef(blockedAttempts)
|
|
3211
|
+
|
|
3212
|
+
// After each blocked attempt to order, bring what blocks it into view: the missing details, or the conflicts on top.
|
|
3213
|
+
// Typing into the form changes `isComplete` but is no new attempt, so it does not scroll.
|
|
3214
|
+
useEffect(() => {
|
|
3215
|
+
if (blockedAttempts === scrolledFor.current) {
|
|
3216
|
+
return
|
|
3217
|
+
}
|
|
3218
|
+
|
|
3219
|
+
scrolledFor.current = blockedAttempts
|
|
3220
|
+
const target = isComplete ? topRef.current : detailsRef.current
|
|
3221
|
+
target?.scrollIntoView({ block: 'nearest', behavior: 'smooth' })
|
|
3222
|
+
}, [blockedAttempts, isComplete])
|
|
3223
|
+
|
|
3224
|
+
return (
|
|
3225
|
+
<Box component="div" ref={topRef} sx={{ display: 'grid', gap: compact ? 2.5 : 3, scrollMarginBlockStart: 32 }}>
|
|
3226
|
+
{!compact && (
|
|
3227
|
+
<Box component="header" sx={{ display: 'grid', gap: 1 }}>
|
|
3228
|
+
<Typography sx={LABEL_SX}>Last step</Typography>
|
|
3229
|
+
<Typography component="h2" sx={{ ...HEADING_SX, fontSize: 30, lineHeight: 1.05 }}>
|
|
3230
|
+
Your Nightjar
|
|
3231
|
+
</Typography>
|
|
3232
|
+
<Typography sx={{ fontFamily: NIGHTJAR.font, fontSize: 15, lineHeight: 1.45, color: NIGHTJAR.muted }}>
|
|
3233
|
+
Check the build, tell us who it is for, and place the order. Nothing is charged until the shop confirms.
|
|
3234
|
+
</Typography>
|
|
3235
|
+
</Box>
|
|
3236
|
+
)}
|
|
3237
|
+
|
|
3238
|
+
{primary?.error && (
|
|
3239
|
+
<Card tone="alert">
|
|
3240
|
+
<Typography component="h3" sx={{ ...LABEL_SX, color: NIGHTJAR.alert }}>
|
|
3241
|
+
The order did not go through
|
|
3242
|
+
</Typography>
|
|
3243
|
+
<Typography
|
|
3244
|
+
role="alert"
|
|
3245
|
+
sx={{ fontFamily: NIGHTJAR.font, fontSize: 15, lineHeight: 1.45, color: NIGHTJAR.cream }}
|
|
3246
|
+
>
|
|
3247
|
+
{primary.error.message}
|
|
3248
|
+
</Typography>
|
|
3249
|
+
</Card>
|
|
3250
|
+
)}
|
|
3251
|
+
|
|
3252
|
+
<Conflicts />
|
|
3253
|
+
|
|
3254
|
+
<Box component="section" sx={SECTION_SX}>
|
|
3255
|
+
<Typography component="h3" sx={LABEL_SX}>
|
|
3256
|
+
The build
|
|
3257
|
+
</Typography>
|
|
3258
|
+
<SummaryRows />
|
|
3259
|
+
</Box>
|
|
3260
|
+
|
|
3261
|
+
<Box component="section" ref={detailsRef} sx={{ ...SECTION_SX, scrollMarginBlockEnd: 32 }}>
|
|
3262
|
+
<Typography component="h3" sx={LABEL_SX}>
|
|
3263
|
+
Your details
|
|
3264
|
+
</Typography>
|
|
3265
|
+
<Box component="div" sx={{ display: 'grid', gridTemplateColumns: compact ? '1fr' : '1fr 1fr', gap: 1.5 }}>
|
|
3266
|
+
<ContactInput
|
|
3267
|
+
id="nightjar-name"
|
|
3268
|
+
label="Name"
|
|
3269
|
+
type="text"
|
|
3270
|
+
autoComplete="name"
|
|
3271
|
+
value={contact.name}
|
|
3272
|
+
onChange={name => setContact({ ...contact, name })}
|
|
3273
|
+
error={showErrors ? errors.name : undefined}
|
|
3274
|
+
disabled={isPending}
|
|
3275
|
+
/>
|
|
3276
|
+
<ContactInput
|
|
3277
|
+
id="nightjar-email"
|
|
3278
|
+
label="E-mail"
|
|
3279
|
+
type="email"
|
|
3280
|
+
autoComplete="email"
|
|
3281
|
+
value={contact.email}
|
|
3282
|
+
onChange={email => setContact({ ...contact, email })}
|
|
3283
|
+
error={showErrors ? errors.email : undefined}
|
|
3284
|
+
disabled={isPending}
|
|
3285
|
+
/>
|
|
3286
|
+
</Box>
|
|
3287
|
+
</Box>
|
|
3288
|
+
</Box>
|
|
3289
|
+
)
|
|
3290
|
+
}
|
|
3291
|
+
```
|
|
3292
|
+
|
|
3293
|
+
### ./src/\_shared/order-form.ts
|
|
3294
|
+
|
|
3295
|
+
```ts
|
|
3296
|
+
import { useState } from 'react'
|
|
3297
|
+
|
|
3298
|
+
/** The customer's name and e-mail, which the summary asks for. */
|
|
3299
|
+
export interface Contact {
|
|
3300
|
+
readonly name: string
|
|
3301
|
+
readonly email: string
|
|
3302
|
+
}
|
|
3303
|
+
|
|
3304
|
+
/** What is missing from the contact details, per field. */
|
|
3305
|
+
export interface ContactErrors {
|
|
3306
|
+
readonly name?: string
|
|
3307
|
+
readonly email?: string
|
|
3308
|
+
}
|
|
3309
|
+
|
|
3310
|
+
/**
|
|
3311
|
+
* The summary's contact form. It is the layout's own state, not the configuration's: the details are needed only to
|
|
3312
|
+
* place the order, and the confirmation thanks the customer by name.
|
|
3313
|
+
*/
|
|
3314
|
+
export interface OrderForm {
|
|
3315
|
+
readonly contact: Contact
|
|
3316
|
+
readonly setContact: (contact: Contact) => void
|
|
3317
|
+
readonly errors: ContactErrors
|
|
3318
|
+
readonly isComplete: boolean
|
|
3319
|
+
/** Whether the form shows what is missing: from the first attempt to order on */
|
|
3320
|
+
readonly showErrors: boolean
|
|
3321
|
+
/** How many attempts to order were blocked; the summary scrolls to what blocks the order after each */
|
|
3322
|
+
readonly blockedAttempts: number
|
|
3323
|
+
readonly revealErrors: () => void
|
|
3324
|
+
}
|
|
3325
|
+
|
|
3326
|
+
const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/
|
|
3327
|
+
|
|
3328
|
+
export const useOrderForm = (): OrderForm => {
|
|
3329
|
+
const [contact, setContact] = useState<Contact>({ name: '', email: '' })
|
|
3330
|
+
const [blockedAttempts, setBlockedAttempts] = useState(0)
|
|
3331
|
+
const errors: ContactErrors = {
|
|
3332
|
+
...(contact.name.trim() === '' && { name: 'Enter the name the order is for.' }),
|
|
3333
|
+
...(!EMAIL.test(contact.email.trim()) && { email: 'Enter an e-mail address for the build updates.' }),
|
|
3334
|
+
}
|
|
3335
|
+
|
|
3336
|
+
return {
|
|
3337
|
+
contact,
|
|
3338
|
+
setContact,
|
|
3339
|
+
errors,
|
|
3340
|
+
isComplete: errors.name === undefined && errors.email === undefined,
|
|
3341
|
+
showErrors: blockedAttempts > 0,
|
|
3342
|
+
blockedAttempts,
|
|
3343
|
+
revealErrors: () => setBlockedAttempts(attempts => attempts + 1),
|
|
3344
|
+
}
|
|
3345
|
+
}
|
|
3346
|
+
```
|
|
3347
|
+
|
|
3348
|
+
### ./src/\_shared/step-warnings.ts
|
|
3349
|
+
|
|
3350
|
+
```ts
|
|
3351
|
+
// Which step resolves each warning: the stepper marks the step while the warning holds, and the summary sends the
|
|
3352
|
+
// customer there. A warning can involve several steps; this names the one the layout sends the customer to.
|
|
3353
|
+
export const STEP_WARNINGS: Readonly<Record<string, readonly string[]>> = {
|
|
3354
|
+
electronics: ['offsetHumbuckers'],
|
|
3355
|
+
}
|
|
3356
|
+
```
|
|
3357
|
+
|
|
3358
|
+
### ./src/\_shared/use-reached-step.ts
|
|
3359
|
+
|
|
3360
|
+
```ts
|
|
3361
|
+
import { useState } from 'react'
|
|
3362
|
+
|
|
3363
|
+
// The furthest step the customer has reached. The stepper offers every step up to it, so after changing an earlier
|
|
3364
|
+
// step the customer returns to where they were without stepping through the ones between. The layout calls this, where
|
|
3365
|
+
// it stays mounted, so the furthest step survives the switch between the desktop and the phone page.
|
|
3366
|
+
export const useReachedStep = (activeIndex: number): number => {
|
|
3367
|
+
const [reached, setReached] = useState(activeIndex)
|
|
3368
|
+
|
|
3369
|
+
if (activeIndex > reached) {
|
|
3370
|
+
setReached(activeIndex)
|
|
3371
|
+
}
|
|
3372
|
+
|
|
3373
|
+
return Math.max(reached, activeIndex)
|
|
3374
|
+
}
|
|
3375
|
+
```
|
|
3376
|
+
|
|
3377
|
+
### ./src/elements/ConfiguratorLayout.tsx
|
|
3378
|
+
|
|
3379
|
+
```tsx
|
|
3380
|
+
import { Box } from '@mui/material'
|
|
3381
|
+
|
|
3382
|
+
import { LayoutSlots } from '@salsita-ai/sdk/configurator'
|
|
3383
|
+
|
|
3384
|
+
import { NIGHTJAR } from '../_fields/index.js'
|
|
3385
|
+
import { DesktopPage } from '../_shared/DesktopPage.js'
|
|
3386
|
+
import { PhonePage } from '../_shared/PhonePage.js'
|
|
3387
|
+
import { useOrderForm } from '../_shared/order-form.js'
|
|
3388
|
+
import { useReachedStep } from '../_shared/use-reached-step.js'
|
|
3389
|
+
|
|
3390
|
+
// A wizard over the scene. The canvas stays mounted the whole time; the desktop or the phone page lies over it. The
|
|
3391
|
+
// contact form's state and the furthest step reached live here, so they survive the switch between the two; the form
|
|
3392
|
+
// also survives the move to the confirmation.
|
|
3393
|
+
const ConfiguratorLayout = () => {
|
|
3394
|
+
// `null` until the container has been measured; only the scene shows until then
|
|
3395
|
+
const viewports = phx.frontend.useActiveViewports()
|
|
3396
|
+
const { activeIndex } = phx.frontend.useStepNavigation()
|
|
3397
|
+
const form = useOrderForm()
|
|
3398
|
+
const reached = useReachedStep(activeIndex)
|
|
3399
|
+
const isDesktop = viewports?.includes('desktop') ?? false
|
|
3400
|
+
|
|
3401
|
+
return (
|
|
3402
|
+
<Box component="div" sx={{ position: 'absolute', inset: 0, overflow: 'clip', bgcolor: NIGHTJAR.ink }}>
|
|
3403
|
+
<LayoutSlots.SharedCanvas />
|
|
3404
|
+
{viewports !== null &&
|
|
3405
|
+
(isDesktop ? <DesktopPage form={form} reached={reached} /> : <PhonePage form={form} reached={reached} />)}
|
|
3406
|
+
</Box>
|
|
3407
|
+
)
|
|
3408
|
+
}
|
|
3409
|
+
|
|
3410
|
+
export default phx.frontend.createCustomPhoenixLayoutElement('ConfiguratorLayout', ConfiguratorLayout)
|
|
3411
|
+
```
|
|
3412
|
+
|
|
3413
|
+
### ./src/elements/NightjarStage.tsx
|
|
3414
|
+
|
|
3415
|
+
```tsx
|
|
3416
|
+
import { Environment, Lightformer } from '@react-three/drei'
|
|
3417
|
+
import { useMemo } from 'react'
|
|
3418
|
+
import { CanvasTexture, SRGBColorSpace } from 'three'
|
|
3419
|
+
|
|
3420
|
+
import { NIGHTJAR } from '../_fields/index.js'
|
|
3421
|
+
|
|
3422
|
+
/** A warm pool of light that fades into the dark, drawn once on a canvas. */
|
|
3423
|
+
const createGlow = (): CanvasTexture => {
|
|
3424
|
+
const size = 512
|
|
3425
|
+
const canvas = document.createElement('canvas')
|
|
3426
|
+
canvas.width = size
|
|
3427
|
+
canvas.height = size
|
|
3428
|
+
const context = canvas.getContext('2d')
|
|
3429
|
+
|
|
3430
|
+
if (context) {
|
|
3431
|
+
const gradient = context.createRadialGradient(size / 2, size / 2, 0, size / 2, size / 2, size / 2)
|
|
3432
|
+
gradient.addColorStop(0, 'rgba(242, 163, 58, 0.42)')
|
|
3433
|
+
gradient.addColorStop(0.22, 'rgba(214, 112, 46, 0.2)')
|
|
3434
|
+
gradient.addColorStop(0.5, 'rgba(122, 30, 43, 0.07)')
|
|
3435
|
+
gradient.addColorStop(0.75, 'rgba(14, 15, 18, 0)')
|
|
3436
|
+
context.fillStyle = gradient
|
|
3437
|
+
context.fillRect(0, 0, size, size)
|
|
3438
|
+
}
|
|
3439
|
+
|
|
3440
|
+
const texture = new CanvasTexture(canvas)
|
|
3441
|
+
texture.colorSpace = SRGBColorSpace
|
|
3442
|
+
return texture
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
// The stage named by the spec's `canvasCustomEnvironment`: a dark room with a warm glow on the wall behind the guitar,
|
|
3446
|
+
// a warm key light and a cool rim. The light panels exist only in the reflections, where they draw the long highlights
|
|
3447
|
+
// on the clearcoat and the hardware. The scene is in millimetres.
|
|
3448
|
+
export default phx.frontend.createCustomPhoenixLayoutElement('NightjarStage', () => {
|
|
3449
|
+
const glow = useMemo(createGlow, [])
|
|
3450
|
+
|
|
3451
|
+
return (
|
|
3452
|
+
<>
|
|
3453
|
+
<color attach="background" args={[NIGHTJAR.ink]} />
|
|
3454
|
+
<ambientLight intensity={0.4} />
|
|
3455
|
+
<directionalLight position={[-900, 1400, 1600]} intensity={2.4} color="#ffe6c7" />
|
|
3456
|
+
<directionalLight position={[1400, 700, -900]} intensity={1.2} color="#a9c1ff" />
|
|
3457
|
+
|
|
3458
|
+
{/* The glow on the wall, behind the guitar and out of the camera's fit */}
|
|
3459
|
+
<mesh position={[-250, 300, -900]}>
|
|
3460
|
+
<planeGeometry args={[3600, 3600]} />
|
|
3461
|
+
<meshBasicMaterial map={glow} transparent depthWrite={false} toneMapped={false} />
|
|
3462
|
+
</mesh>
|
|
3463
|
+
|
|
3464
|
+
<Environment resolution={256} frames={1}>
|
|
3465
|
+
<color attach="background" args={['#15161b']} />
|
|
3466
|
+
{/* Tall strips at both sides for the long highlights, a softbox above, an amber wash behind */}
|
|
3467
|
+
<Lightformer form="rect" intensity={7} position={[-5, 1, 3]} rotation-y={Math.PI / 3} scale={[1.2, 9, 1]} />
|
|
3468
|
+
<Lightformer form="rect" intensity={4} position={[5, 1, 2]} rotation-y={-Math.PI / 3} scale={[1, 9, 1]} />
|
|
3469
|
+
<Lightformer form="rect" intensity={2.5} position={[0, 6, 1]} rotation-x={Math.PI / 2} scale={[8, 3, 1]} />
|
|
3470
|
+
<Lightformer form="rect" intensity={1.2} position={[0, 1, 7]} rotation-y={Math.PI} scale={[8, 4, 1]} />
|
|
3471
|
+
<Lightformer form="rect" color={NIGHTJAR.amber} intensity={0.8} position={[0, -2, -7]} scale={[10, 3, 1]} />
|
|
3472
|
+
</Environment>
|
|
3473
|
+
</>
|
|
3474
|
+
)
|
|
3475
|
+
})
|
|
3476
|
+
```
|
|
3477
|
+
|
|
3478
|
+
### ./src/expressions/guitar.ts
|
|
3479
|
+
|
|
3480
|
+
```ts
|
|
3481
|
+
const BASE_PRICE = 1650
|
|
3482
|
+
const SIGNATURE_PRICE = 45
|
|
3483
|
+
const SIGNATURE_LIMIT = 16
|
|
3484
|
+
|
|
3485
|
+
const SURCHARGES = {
|
|
3486
|
+
bodyShape: { Offset: 0, SingleCut: 150 },
|
|
3487
|
+
finish: { Seafoam: 0, CandyRed: 180, Midnight: 120, NaturalAsh: 90 },
|
|
3488
|
+
pickguard: { Parchment: 0, Black: 0, Pearloid: 40, None: 0 },
|
|
3489
|
+
neckWood: { Maple: 0, RoastedMaple: 110, Mahogany: 80 },
|
|
3490
|
+
fretboard: { Maple: 0, Rosewood: 0, Ebony: 140 },
|
|
3491
|
+
pickups: { SingleCoils: 0, Humbuckers: 120, P90s: 90 },
|
|
3492
|
+
hardware: { Chrome: 0, Gold: 160, Black: 60 },
|
|
3493
|
+
}
|
|
3494
|
+
|
|
3495
|
+
// The wood textures ship with Storybook; a texture is multiplied by the material's colour
|
|
3496
|
+
const LIGHT_WOOD = '/textures/Material_Lightwood.png'
|
|
3497
|
+
const DARK_WOOD = '/textures/Material_Darkwood.png'
|
|
3498
|
+
const ASH = '/textures/oak_varnished_BaseColor.png'
|
|
3499
|
+
|
|
3500
|
+
// How each finish renders under the clearcoat: the paints are solid, natural ash shows the grain through a tint
|
|
3501
|
+
const FINISHES = {
|
|
3502
|
+
Seafoam: { color: '#9fd8c4', metalness: 0, roughness: 0.38, texture: null },
|
|
3503
|
+
CandyRed: { color: '#a3101c', metalness: 0.35, roughness: 0.3, texture: null },
|
|
3504
|
+
Midnight: { color: '#1b2a52', metalness: 0.55, roughness: 0.34, texture: null },
|
|
3505
|
+
NaturalAsh: { color: '#f4e2c4', metalness: 0, roughness: 0.5, texture: ASH },
|
|
3506
|
+
}
|
|
3507
|
+
|
|
3508
|
+
const PICKGUARDS = {
|
|
3509
|
+
Parchment: { color: '#ece2cb', roughness: 0.5, iridescence: 0 },
|
|
3510
|
+
Black: { color: '#121214', roughness: 0.3, iridescence: 0 },
|
|
3511
|
+
Pearloid: { color: '#f2ede6', roughness: 0.22, iridescence: 1 },
|
|
3512
|
+
None: { color: '#ece2cb', roughness: 0.5, iridescence: 0 },
|
|
3513
|
+
}
|
|
3514
|
+
|
|
3515
|
+
const NECKS = {
|
|
3516
|
+
Maple: { color: '#f6dcae', texture: LIGHT_WOOD },
|
|
3517
|
+
RoastedMaple: { color: '#c58a4e', texture: LIGHT_WOOD },
|
|
3518
|
+
Mahogany: { color: '#c47a5a', texture: DARK_WOOD },
|
|
3519
|
+
}
|
|
3520
|
+
|
|
3521
|
+
const FRETBOARDS = {
|
|
3522
|
+
Maple: { color: '#f6dcae', texture: LIGHT_WOOD, inlay: '#1b1714' },
|
|
3523
|
+
Rosewood: { color: '#ffffff', texture: DARK_WOOD, inlay: '#efe9df' },
|
|
3524
|
+
Ebony: { color: '#3a3330', texture: DARK_WOOD, inlay: '#efe9df' },
|
|
3525
|
+
}
|
|
3526
|
+
|
|
3527
|
+
const HARDWARE = {
|
|
3528
|
+
Chrome: { color: '#eceef0', metalness: 1, roughness: 0.12 },
|
|
3529
|
+
Gold: { color: '#e6b964', metalness: 1, roughness: 0.2 },
|
|
3530
|
+
Black: { color: '#26262a', metalness: 0.7, roughness: 0.32 },
|
|
3531
|
+
}
|
|
3532
|
+
|
|
3533
|
+
export default phx.domain.implementCustomExpressions({
|
|
3534
|
+
Guitar: {
|
|
3535
|
+
$price: s => {
|
|
3536
|
+
return (
|
|
3537
|
+
BASE_PRICE +
|
|
3538
|
+
SURCHARGES.bodyShape[s.bodyShape] +
|
|
3539
|
+
SURCHARGES.finish[s.finish] +
|
|
3540
|
+
SURCHARGES.pickguard[s.pickguard] +
|
|
3541
|
+
SURCHARGES.neckWood[s.neckWood] +
|
|
3542
|
+
SURCHARGES.fretboard[s.fretboard] +
|
|
3543
|
+
SURCHARGES.pickups[s.pickups] +
|
|
3544
|
+
SURCHARGES.hardware[s.hardware] +
|
|
3545
|
+
(s.signature.trim() === '' ? 0 : SIGNATURE_PRICE)
|
|
3546
|
+
)
|
|
3547
|
+
},
|
|
3548
|
+
$signatureLimit: () => {
|
|
3549
|
+
return SIGNATURE_LIMIT
|
|
3550
|
+
},
|
|
3551
|
+
$finishColor: s => {
|
|
3552
|
+
return FINISHES[s.finish].color
|
|
3553
|
+
},
|
|
3554
|
+
$finishMetalness: s => {
|
|
3555
|
+
return FINISHES[s.finish].metalness
|
|
3556
|
+
},
|
|
3557
|
+
$finishRoughness: s => {
|
|
3558
|
+
return FINISHES[s.finish].roughness
|
|
3559
|
+
},
|
|
3560
|
+
$finishTexture: s => {
|
|
3561
|
+
return FINISHES[s.finish].texture
|
|
3562
|
+
},
|
|
3563
|
+
$pickguardColor: s => {
|
|
3564
|
+
return PICKGUARDS[s.pickguard].color
|
|
3565
|
+
},
|
|
3566
|
+
$pickguardRoughness: s => {
|
|
3567
|
+
return PICKGUARDS[s.pickguard].roughness
|
|
3568
|
+
},
|
|
3569
|
+
$pickguardIridescence: s => {
|
|
3570
|
+
return PICKGUARDS[s.pickguard].iridescence
|
|
3571
|
+
},
|
|
3572
|
+
$neckColor: s => {
|
|
3573
|
+
return NECKS[s.neckWood].color
|
|
3574
|
+
},
|
|
3575
|
+
$neckTexture: s => {
|
|
3576
|
+
return NECKS[s.neckWood].texture
|
|
3577
|
+
},
|
|
3578
|
+
$fretboardColor: s => {
|
|
3579
|
+
return FRETBOARDS[s.fretboard].color
|
|
3580
|
+
},
|
|
3581
|
+
$fretboardTexture: s => {
|
|
3582
|
+
return FRETBOARDS[s.fretboard].texture
|
|
3583
|
+
},
|
|
3584
|
+
$inlayColor: s => {
|
|
3585
|
+
return FRETBOARDS[s.fretboard].inlay
|
|
3586
|
+
},
|
|
3587
|
+
$hardwareColor: s => {
|
|
3588
|
+
return HARDWARE[s.hardware].color
|
|
3589
|
+
},
|
|
3590
|
+
$hardwareMetalness: s => {
|
|
3591
|
+
return HARDWARE[s.hardware].metalness
|
|
3592
|
+
},
|
|
3593
|
+
$hardwareRoughness: s => {
|
|
3594
|
+
return HARDWARE[s.hardware].roughness
|
|
3595
|
+
},
|
|
3596
|
+
// Single coils match a black pickguard and are cream otherwise; humbuckers and P-90s are black
|
|
3597
|
+
$pickupCoverColor: s => {
|
|
3598
|
+
return s.pickups === 'SingleCoils' && s.pickguard !== 'Black' ? '#efe7d4' : '#141416'
|
|
3599
|
+
},
|
|
3600
|
+
// Gold leaf on the dark woods, black ink on maple
|
|
3601
|
+
$signatureColor: s => {
|
|
3602
|
+
return s.neckWood === 'Maple' ? '#1c1714' : '#e8c27a'
|
|
3603
|
+
},
|
|
3604
|
+
},
|
|
3605
|
+
})
|
|
3606
|
+
```
|
|
3607
|
+
|
|
3608
|
+
### ./src/handlers/place-order.ts
|
|
3609
|
+
|
|
3610
|
+
```ts
|
|
3611
|
+
import { useCallback } from 'react'
|
|
3612
|
+
|
|
3613
|
+
// Stands in for Northfret's order service. Placing an order takes a moment. The service checks stock when the order
|
|
3614
|
+
// arrives, which the configurator cannot know beforehand: gold hardware is back-ordered, so it refuses that order with
|
|
3615
|
+
// its reason; any other order is accepted and the page shows the confirmation.
|
|
3616
|
+
export default phx.frontend.createPhoenixHandler('placeOrder', () => {
|
|
3617
|
+
const navigate = phx.frontend.useNavigate()
|
|
3618
|
+
const guitar = phx.frontend.useRootEntityState()
|
|
3619
|
+
|
|
3620
|
+
return {
|
|
3621
|
+
handler: useCallback(async () => {
|
|
3622
|
+
await new Promise(resolve => setTimeout(resolve, 1600))
|
|
3623
|
+
|
|
3624
|
+
if (guitar.hardware === 'Gold') {
|
|
3625
|
+
throw new Error(
|
|
3626
|
+
'Gold hardware is back-ordered until next month. Choose chrome or black hardware, or order later.'
|
|
3627
|
+
)
|
|
3628
|
+
}
|
|
3629
|
+
|
|
3630
|
+
navigate('ordered')
|
|
3631
|
+
}, [guitar.hardware, navigate]),
|
|
3632
|
+
}
|
|
3633
|
+
})
|
|
3634
|
+
```
|
|
3635
|
+
|
|
3636
|
+
### ./src/invariants/guitar.ts
|
|
3637
|
+
|
|
3638
|
+
```ts
|
|
3639
|
+
export default phx.domain.implementCustomInvariants({
|
|
3640
|
+
Guitar: {
|
|
3641
|
+
// `fixable`: a change that makes the signature too long is rejected, so the headstock never shows more than fits.
|
|
3642
|
+
// The message names the limit, so it is built here rather than in the spec.
|
|
3643
|
+
signatureLength: s => {
|
|
3644
|
+
if (s.signature.length <= s.$signatureLimit) {
|
|
3645
|
+
return []
|
|
3646
|
+
}
|
|
3647
|
+
|
|
3648
|
+
return [
|
|
3649
|
+
{
|
|
3650
|
+
type: 'signatureTooLong',
|
|
3651
|
+
severity: 'fixable',
|
|
3652
|
+
message: `The headstock fits ${s.$signatureLimit} characters. Shorten the signature.`,
|
|
3653
|
+
},
|
|
3654
|
+
]
|
|
3655
|
+
},
|
|
3656
|
+
// `warning` in the spec: the change is kept, so a body chosen after the pickups does not undo them, and ordering
|
|
3657
|
+
// waits until the customer resolves it
|
|
3658
|
+
offsetHumbuckers: s => {
|
|
3659
|
+
return s.bodyShape !== 'Offset' || s.pickups !== 'Humbuckers'
|
|
3660
|
+
},
|
|
3661
|
+
},
|
|
3662
|
+
})
|
|
3663
|
+
```
|
|
3664
|
+
|
|
3665
|
+
</details>
|