@salsita-ai/sdk 0.50.0-develop.ca5894b56c → 0.50.0-develop.cba048b0d7
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/dist/application-spec/errors/diagnostic-codes.d.ts +7 -1
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +14 -1
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/implementations/phx-model.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +96 -31
- package/dist/application-spec/generate-application/runtime-spec/spec-code-id.d.ts +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/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 +25 -20
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.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/spec/application/admin-spec/admin-pages.d.ts +3 -20
- 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/states.d.ts +3 -8
- 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 +4 -10
- package/dist/application-spec/parse-application-files/spec/components/components.d.ts +3 -4
- 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/user-component-entry.d.ts +2 -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 +2 -3
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +2 -2
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +7 -29
- package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -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 +2 -2
- 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 +4 -14
- 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-schema.js +1 -1
- 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/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/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +19 -3
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +70 -56
- 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 +15 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- 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/common/configurator-interface.d.ts +2 -2
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.js +1 -1
- package/dist/configurator/configurator-context/index.d.ts +0 -1
- package/dist/configurator/configurator-context/index.js +1 -1
- package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/tool-chip.d.ts +19 -9
- package/dist/configurator/ui/assistant/tool-chip.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
- 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/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/use-basic-sidebar-footer.js +1 -1
- package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
- package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -1
- package/dist/docs/drag-and-drop/room-planner.mdx +1 -1
- package/dist/docs/index.json +1 -1
- package/dist/docs/phoenix/configurator-interface.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +21 -0
- package/dist/docs/phoenix/phoenix-cli.mdx +1 -0
- package/dist/domain/application/application-config.d.ts +6 -24
- package/dist/domain/application/assistant/assistant-manifest.d.ts +13 -3
- package/dist/domain/application/assistant/assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +5 -9
- package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
- package/dist/domain/application/assistant/build-assistant-lenses.js +1 -1
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +3 -3
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +2 -4
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
- package/dist/domain/application/assistant-mutations.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/{domain-builder.d.ts → domain-builder/domain-builder.d.ts} +2 -2
- 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/index.d.ts +2 -2
- package/dist/domain/index.js +1 -1
- package/dist/domain/spec/application/admin-pages-section.d.ts +29 -0
- package/dist/domain/spec/application/admin-pages.d.ts +26 -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 +4 -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/{application-spec/parse-application-files → domain}/spec/components/component-entry.d.ts +3 -3
- package/dist/domain/spec/components/component-entry.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 +4 -0
- package/dist/domain/spec/{enhanced-json-value.d.ts → enhanced-json/enhanced-json-value.d.ts} +1 -1
- package/dist/domain/spec/enhanced-json/index.d.ts +1 -0
- package/dist/domain/spec/enhanced-json/index.js +1 -0
- package/dist/{application-spec/parse-application-files → domain}/spec/expressions/expression.d.ts +9 -3
- 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 +3 -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/index.d.ts +3 -1
- package/dist/domain/spec/index.js +1 -1
- 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/markers/index.d.ts +1 -0
- package/dist/domain/spec/markers/index.js +1 -1
- package/dist/domain/spec/model/defaults.d.ts +1 -1
- 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/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 +9 -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-definitions.js +1 -1
- package/dist/domain/utils/index.d.ts +2 -0
- package/dist/domain/utils/index.js +1 -0
- package/dist/editor/graphql/GraphQLPanel.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.js +1 -1
- package/dist/react-sdk/domain-application-context/ConfigurationPersistSystemFailureHandler.js +1 -1
- package/dist/react-sdk/index.d.ts +2 -0
- package/dist/react-sdk/index.js +1 -1
- 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/index.d.ts +1 -0
- package/dist/react-sdk/lifecycle-providers/index.js +1 -1
- 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/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/ui-sdk/components/snackbar/Snackbar.d.ts +24 -3
- package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
- 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/package.json +3 -3
- package/dist/configurator/configurator-context/ConfiguratorDataProvider.d.ts +0 -2
- package/dist/configurator/configurator-context/ConfiguratorDataProvider.js +0 -1
- package/dist/configurator/configurator-context/PresetSelectionProvider.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/domain-builder.js +0 -1
- /package/dist/{application-spec/parse-application-files/spec/components/component-entry.js → domain/spec/application/admin-pages-section.js} +0 -0
- /package/dist/{application-spec/parse-application-files/spec/expressions/expression.js → domain/spec/application/admin-pages.js} +0 -0
- /package/dist/domain/spec/{enhanced-json-value.js → enhanced-json/enhanced-json-value.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/{configurator/configurator-context → react-sdk/preset-selection}/PresetSelectionProvider.d.ts +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `$adminPages` section of an admin spec file as it is written, which the parsed admin pages
|
|
3
|
+
* keep as their `spec`. `application-spec` exports it as `RawAdminPages`, and the application
|
|
4
|
+
* config takes it as `AdminPagesSpec`.
|
|
5
|
+
*/
|
|
6
|
+
export interface AdminPagesSection {
|
|
7
|
+
readonly presets?: boolean | {
|
|
8
|
+
readonly categoryNavigationState?: string;
|
|
9
|
+
readonly presetNavigationState?: string;
|
|
10
|
+
};
|
|
11
|
+
readonly recipes?: ReadonlyArray<{
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly navigationState?: string;
|
|
14
|
+
}>;
|
|
15
|
+
readonly pages?: ReadonlyArray<{
|
|
16
|
+
readonly key: string;
|
|
17
|
+
readonly title: string;
|
|
18
|
+
readonly icon?: string;
|
|
19
|
+
readonly navigationState?: string;
|
|
20
|
+
readonly entity?: string;
|
|
21
|
+
readonly component?: string;
|
|
22
|
+
readonly actionsComponent?: string;
|
|
23
|
+
readonly connectedDataEntry?: string;
|
|
24
|
+
readonly sidebar?: {
|
|
25
|
+
readonly title: string;
|
|
26
|
+
readonly component: string;
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { ComponentEntry } from '../components/index.js';
|
|
3
|
+
import type { AdminPagesSection } from './admin-pages-section.js';
|
|
4
|
+
/**
|
|
5
|
+
* The parsed admin pages of an admin spec: the `$adminPages` section as written, the components
|
|
6
|
+
* the pages attach, the items of the admin navigation and the navigation states the pages add.
|
|
7
|
+
*/
|
|
8
|
+
export type AdminPages = Branded<'AdminPages', {
|
|
9
|
+
readonly spec: AdminPagesSection;
|
|
10
|
+
readonly components: readonly ComponentEntry[];
|
|
11
|
+
readonly navigationItems: readonly AdminNavigationItem[];
|
|
12
|
+
readonly navigationStates: readonly string[];
|
|
13
|
+
}>;
|
|
14
|
+
interface AdminNavigationListItem {
|
|
15
|
+
readonly label: string;
|
|
16
|
+
readonly icon?: string;
|
|
17
|
+
readonly navigationStates: readonly string[];
|
|
18
|
+
}
|
|
19
|
+
interface AdminNestedNavigationListItem {
|
|
20
|
+
readonly label: string;
|
|
21
|
+
readonly icon?: string;
|
|
22
|
+
readonly items: ReadonlyArray<Omit<AdminNavigationListItem, 'icon'>>;
|
|
23
|
+
}
|
|
24
|
+
/** One item of the admin navigation: a list item, or a nested list of them. */
|
|
25
|
+
export type AdminNavigationItem = AdminNavigationListItem | AdminNestedNavigationListItem;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { StateValue } from '../sections/index.js';
|
|
3
|
+
export type ConfiguratorStates = Branded<'ConfiguratorStates', {
|
|
4
|
+
readonly navigationStates: readonly StateValue[];
|
|
5
|
+
readonly viewStates: readonly StateValue[];
|
|
6
|
+
readonly toolStates: readonly StateValue[];
|
|
7
|
+
readonly exportStates: readonly StateValue[];
|
|
8
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* A validated `$read` dependency found anywhere in the component props tree.
|
|
4
|
+
* Used for memoEval dependency tracking — the target becomes `self.target` in generated code.
|
|
5
|
+
* Field targets are validated against the entity shape; expression targets ($-prefixed)
|
|
6
|
+
* are accepted without validation (they may be inferred during Phase C).
|
|
7
|
+
*/
|
|
8
|
+
export type ComponentReadBinding = Branded<'ComponentReadBinding', {
|
|
9
|
+
/** The raw target string from `$read` (e.g. "height" or "$price"). */
|
|
10
|
+
readonly target: string;
|
|
11
|
+
/** Whether the target is an expression (starts with `$`) or a shape field. */
|
|
12
|
+
readonly isExpression: boolean;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Runtime type assertion to emit in the write callback.
|
|
4
|
+
* Resolved from the target entity field's schema during parsing.
|
|
5
|
+
*/
|
|
6
|
+
export type AssertionKind = {
|
|
7
|
+
readonly kind: 'declaredType';
|
|
8
|
+
readonly typeName: string;
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: 'declaredTypeId';
|
|
11
|
+
readonly referencedType: string;
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: 'primitive';
|
|
14
|
+
readonly assertFn: 'assertString' | 'assertNumber' | 'assertBoolean';
|
|
15
|
+
} | {
|
|
16
|
+
readonly kind: 'literal';
|
|
17
|
+
readonly value: null;
|
|
18
|
+
} | {
|
|
19
|
+
readonly kind: 'anyOf';
|
|
20
|
+
readonly assertions: readonly AssertionKind[];
|
|
21
|
+
} | {
|
|
22
|
+
readonly kind: 'none';
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A validated `$write` or `$bind` mapping from a component state key to an entity field.
|
|
26
|
+
* Includes the resolved assertion kind for runtime type checking in the write callback.
|
|
27
|
+
*/
|
|
28
|
+
export type ComponentWriteBinding = Branded<'ComponentWriteBinding', {
|
|
29
|
+
readonly propKey: string;
|
|
30
|
+
readonly entityField: string;
|
|
31
|
+
readonly assertion: AssertionKind;
|
|
32
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
-
import type {
|
|
3
|
-
import type { MemoEvalPlan, MemoEvalPlanInput } from '../expressions/memo-eval-plan.js';
|
|
2
|
+
import type { MemoEvalPlan, MemoEvalPlanInput } from '../expressions/index.js';
|
|
4
3
|
import type { EntityOrAliasName, InstanceName } from '../model/index.js';
|
|
5
4
|
import type { ComponentReadBinding, ComponentWriteBinding } from './bindings/index.js';
|
|
6
|
-
import type { ComponentFilters } from './component-
|
|
5
|
+
import type { ComponentFilters } from './component-filters.js';
|
|
6
|
+
import type { SdkCodeRef } from './sdk-code-ref.js';
|
|
7
7
|
/**
|
|
8
8
|
* Root-level `$read` variant — the entire instance state is driven by a single
|
|
9
9
|
* `$read` at the root (components.md §"Root-Level $read"). No `resolvedProps`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { SpecComponentFilter } from './component-filter.js';
|
|
3
|
+
/**
|
|
4
|
+
* Validated set of `$filter` entries on a user-bound component instance. Each
|
|
5
|
+
* {@link SpecComponentFilter} represents one alternative filter condition; multiple
|
|
6
|
+
* entries arise from `$or`. Empty `items` means no filter is applied.
|
|
7
|
+
*/
|
|
8
|
+
export type ComponentFilters = Branded<'ComponentFilters', {
|
|
9
|
+
readonly items: readonly SpecComponentFilter[];
|
|
10
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { ComponentEntry } from './component-entry.js';
|
|
3
|
+
/** Final merged components for a domain, including SDK/spec-derived entries. */
|
|
4
|
+
export type Components = Branded<'Components', readonly ComponentEntry[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './enhanced-json-value.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./enhanced-json-value.js";
|
package/dist/{application-spec/parse-application-files → domain}/spec/expressions/expression.d.ts
RENAMED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { EnhancedJsonSchemaType
|
|
2
|
+
import type { EnhancedJsonSchemaType } from '../../core/index.js';
|
|
3
|
+
import type { EnhancedJsonValue } from '../enhanced-json/index.js';
|
|
3
4
|
import type { EntityOrAliasName, ExpressionName } from '../model/index.js';
|
|
4
5
|
import type { MemoEvalPlan } from './memo-eval-plan.js';
|
|
6
|
+
import type { SdkExpressionImplementation } from './sdk-expression-implementation.js';
|
|
5
7
|
/**
|
|
6
8
|
* How an expression's runtime implementation is provided.
|
|
7
9
|
* - `user`: implementation from `src/expressions/*.ts` (dynamic import)
|
|
@@ -22,8 +24,12 @@ export type ExpressionImplementation = {
|
|
|
22
24
|
readonly value: EnhancedJsonValue;
|
|
23
25
|
readonly plan: MemoEvalPlan;
|
|
24
26
|
};
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
+
/**
|
|
28
|
+
* A single parsed expression declaration of the application spec: the entity or alias it belongs
|
|
29
|
+
* to, its name, its schemas and how its implementation is provided. `application-spec` exports it
|
|
30
|
+
* as `Expression`.
|
|
31
|
+
*/
|
|
32
|
+
export type SpecExpression = Branded<'Expression', {
|
|
27
33
|
readonly entityKey: EntityOrAliasName;
|
|
28
34
|
readonly name: ExpressionName;
|
|
29
35
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { EntityOrAliasName, EntityTypeName, ExpressionName } from '../model/index.js';
|
|
3
|
+
import type { SpecExpression } from './expression.js';
|
|
4
|
+
import type { MemoEvalPlan } from './memo-eval-plan.js';
|
|
5
|
+
/**
|
|
6
|
+
* Resolved expressions for a single entity type. Holds the ordered list of
|
|
7
|
+
* shape source keys (entity itself + aliases it belongs to) — codegen appends
|
|
8
|
+
* `"Expressions"` to each key to reference the typed expression group.
|
|
9
|
+
*/
|
|
10
|
+
export type EntityExpressions = Branded<'EntityExpressions', {
|
|
11
|
+
/** Entity/alias keys whose expressions this entity inherits. Codegen appends "Expressions" suffix. */
|
|
12
|
+
readonly shapeGroups: readonly EntityOrAliasName[];
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* Final merged expressions for a domain — user-declared + inferred.
|
|
16
|
+
* The internal `expressions` map groups by entity/alias for codegen/runtime lookups.
|
|
17
|
+
* `entityExpressions` provides per-entity alias expansion.
|
|
18
|
+
* `constants` projects the self-free `constants:` values, grouped like `expressions`;
|
|
19
|
+
* codegen passes them to the enhanced entity/alias reflections so they are readable at
|
|
20
|
+
* module level (`phx.domain.enhancedModel.$Wall.$maxWidth`). A constant whose plan uses
|
|
21
|
+
* `self` needs an instance, so it stays an ordinary value expression and is absent here.
|
|
22
|
+
*/
|
|
23
|
+
export type Expressions = Branded<'Expressions', {
|
|
24
|
+
readonly expressions: ReadonlyMap<EntityOrAliasName, ReadonlyMap<ExpressionName, SpecExpression>>;
|
|
25
|
+
readonly entityExpressions: ReadonlyMap<EntityTypeName, EntityExpressions>;
|
|
26
|
+
readonly constants: ReadonlyMap<EntityOrAliasName, ReadonlyMap<ExpressionName, MemoEvalPlan>>;
|
|
27
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { ComponentPropTarget, EvalMarker, MsgMarker } from '../markers/index.js';
|
|
3
|
+
export type MemoEvalLiteral = string | number | boolean | null;
|
|
4
|
+
/**
|
|
5
|
+
* A single entry in the memoEval deps array.
|
|
6
|
+
*
|
|
7
|
+
* - `'eval'` — a `$eval` code fragment. At deps-build time the fragment is
|
|
8
|
+
* evaluated under `self` (`new Function('self', …)` at runtime, spliced
|
|
9
|
+
* verbatim under `self => [...]` in codegen). `label` annotates codegen
|
|
10
|
+
* output (e.g. `/* $eval: Entity.instance *\/`).
|
|
11
|
+
* - `'read'` — a read binding that resolves to `self[target]` at deps-build
|
|
12
|
+
* time.
|
|
13
|
+
*/
|
|
14
|
+
export type MemoEvalDep = Branded<'MemoEvalDep', {
|
|
15
|
+
readonly kind: 'eval';
|
|
16
|
+
readonly code: string;
|
|
17
|
+
readonly label: string;
|
|
18
|
+
} | {
|
|
19
|
+
readonly kind: 'read';
|
|
20
|
+
readonly target: string;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Tree of values with slots referencing entries in the plan's `deps` array.
|
|
24
|
+
* Generated by codegen as a JS literal with params spliced in, or by runtime
|
|
25
|
+
* by walking and substituting from the `deps`-materialised values array.
|
|
26
|
+
*/
|
|
27
|
+
export type MemoEvalTemplate = Branded<'MemoEvalTemplate', {
|
|
28
|
+
readonly kind: 'literal';
|
|
29
|
+
readonly value: MemoEvalLiteral;
|
|
30
|
+
} | {
|
|
31
|
+
readonly kind: 'msg';
|
|
32
|
+
readonly marker: MsgMarker;
|
|
33
|
+
} | {
|
|
34
|
+
readonly kind: 'slot';
|
|
35
|
+
readonly depIndex: number;
|
|
36
|
+
} | {
|
|
37
|
+
readonly kind: 'array';
|
|
38
|
+
readonly items: readonly MemoEvalTemplate[];
|
|
39
|
+
} | {
|
|
40
|
+
readonly kind: 'object';
|
|
41
|
+
readonly entries: ReadonlyArray<readonly [string, MemoEvalTemplate]>;
|
|
42
|
+
}>;
|
|
43
|
+
export type MemoEvalPlanInput = MemoEvalLiteral | EvalMarker | MsgMarker | ComponentPropTarget | MemoEvalPlanInputArray | MemoEvalPlanInputObject;
|
|
44
|
+
export interface MemoEvalPlanInputArray extends ReadonlyArray<MemoEvalPlanInput> {
|
|
45
|
+
}
|
|
46
|
+
export interface MemoEvalPlanInputObject {
|
|
47
|
+
readonly [key: string]: MemoEvalPlanInput;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Normalized plan for producing a memoized reader from a tree containing
|
|
51
|
+
* `$eval`, `$target`, `$msg`, and literal nodes. Built once during spec
|
|
52
|
+
* parsing; codegen + runtime both generate from the same plan so their outputs
|
|
53
|
+
* cannot drift.
|
|
54
|
+
*
|
|
55
|
+
* - `deps` — ordered evaluation slots in first-seen walk order. Each slot
|
|
56
|
+
* dedupes (`$eval` by trimmed code, `$target` by name) so a repeated marker
|
|
57
|
+
* shares one dep.
|
|
58
|
+
* - `template` — rebuilt value tree with `slot { depIndex }` nodes in place
|
|
59
|
+
* of the consumed markers.
|
|
60
|
+
* - `usesSelf` — true when deps collection must receive `self`, either
|
|
61
|
+
* because a read dep exists or because an eval dep references `self`.
|
|
62
|
+
*
|
|
63
|
+
* When `deps` is empty the tree is fully static — generators cache
|
|
64
|
+
* non-primitive templates and keep primitive literals as bare thunks.
|
|
65
|
+
*/
|
|
66
|
+
export type MemoEvalPlan = Branded<'MemoEvalPlan', {
|
|
67
|
+
readonly deps: readonly MemoEvalDep[];
|
|
68
|
+
readonly template: MemoEvalTemplate;
|
|
69
|
+
readonly usesSelf: boolean;
|
|
70
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from './application/index.js';
|
|
2
2
|
export * from './components/index.js';
|
|
3
|
-
export * from './enhanced-json
|
|
3
|
+
export * from './enhanced-json/index.js';
|
|
4
4
|
export * from './expressions/index.js';
|
|
5
|
+
export type * from './invariants/index.js';
|
|
5
6
|
export type * from './json-schema.js';
|
|
6
7
|
export * from './markers/index.js';
|
|
7
8
|
export type * from './model/index.js';
|
|
9
|
+
export * from './sections/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./application/index.js";export*from"./components/index.js";export*from"./enhanced-json
|
|
1
|
+
export*from"./application/index.js";export*from"./components/index.js";export*from"./enhanced-json/index.js";export*from"./expressions/index.js";export*from"./markers/index.js";export*from"./sections/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { MsgMarker } from '../markers/index.js';
|
|
3
|
+
import type { InvariantName, ViolationTypeName } from '../model/index.js';
|
|
4
|
+
export type InvariantSeverity = 'fatal' | 'fixable' | 'warning' | 'notice';
|
|
5
|
+
/** A YAML invariant whose violation metadata is fully declared in the application spec. */
|
|
6
|
+
export type StaticInvariant = Branded<'StaticInvariant', {
|
|
7
|
+
readonly kind: 'static';
|
|
8
|
+
readonly name: InvariantName;
|
|
9
|
+
readonly violationType: ViolationTypeName;
|
|
10
|
+
readonly severity: InvariantSeverity;
|
|
11
|
+
readonly message: string | MsgMarker;
|
|
12
|
+
readonly controlViolationPriority?: number;
|
|
13
|
+
}>;
|
|
14
|
+
/** A YAML invariant whose implementation may return any of the declared violation types. */
|
|
15
|
+
export type DynamicInvariant = Branded<'DynamicInvariant', {
|
|
16
|
+
readonly kind: 'dynamic';
|
|
17
|
+
readonly name: InvariantName;
|
|
18
|
+
readonly violationTypes: readonly ViolationTypeName[];
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* A validated static or dynamic invariant declaration of the application spec. `application-spec`
|
|
22
|
+
* exports it as `Invariant`.
|
|
23
|
+
*/
|
|
24
|
+
export type SpecInvariant = StaticInvariant | DynamicInvariant;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { ComponentEntry } from '../components/index.js';
|
|
3
|
+
import type { SpecExpression } from '../expressions/index.js';
|
|
4
|
+
import type { EntityOrAliasName, InvariantName } from '../model/index.js';
|
|
5
|
+
import type { SpecInvariant } from './invariant.js';
|
|
6
|
+
/**
|
|
7
|
+
* Validated invariants and the expressions/components they contribute to the application spec.
|
|
8
|
+
* Entries retain their entity-or-alias declaration keys while artifacts expand to concrete entity types.
|
|
9
|
+
*/
|
|
10
|
+
export type Invariants = Branded<'Invariants', {
|
|
11
|
+
readonly entries: Readonly<Record<EntityOrAliasName, Readonly<Record<InvariantName, SpecInvariant>>>>;
|
|
12
|
+
readonly expressions: readonly SpecExpression[];
|
|
13
|
+
readonly components: readonly ComponentEntry[];
|
|
14
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./eval-marker.js";export*from"./msg-marker.js";
|
|
1
|
+
export*from"./component-prop-target.js";export*from"./eval-marker.js";export*from"./msg-marker.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { EnhancedJsonValue } from '../enhanced-json
|
|
2
|
+
import type { EnhancedJsonValue } from '../enhanced-json/index.js';
|
|
3
3
|
import type { EntityTypeName, ShapePropertyName } from './names/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* A map of shape property names to their default values inside a single entity block.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { EnhancedJsonSchemaType } from '../../core/index.js';
|
|
3
|
+
import type { JsonSchema } from '../json-schema.js';
|
|
4
|
+
import type { ActionName } from '../model/index.js';
|
|
5
|
+
/** One parameter of an action: its declared schema, and whether a call has to pass it (a nullable param is optional). */
|
|
6
|
+
export interface ActionParam {
|
|
7
|
+
readonly schema: EnhancedJsonSchemaType;
|
|
8
|
+
readonly required: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* One validated action declaration. `params` and `result` keep the enhanced schemas for codegen and
|
|
12
|
+
* for consumers that expose the action; `paramsSchema` is the AJV-ready object schema of the parameters, with the
|
|
13
|
+
* refs resolved into `$defs`, which the action system validates the arguments of a call against.
|
|
14
|
+
*/
|
|
15
|
+
export type Action = Branded<'Action', {
|
|
16
|
+
readonly name: ActionName;
|
|
17
|
+
readonly description?: string;
|
|
18
|
+
readonly params: Readonly<Record<string, ActionParam>>;
|
|
19
|
+
readonly result: Readonly<Record<string, EnhancedJsonSchemaType>>;
|
|
20
|
+
readonly paramsSchema: JsonSchema;
|
|
21
|
+
}>;
|
|
22
|
+
/** The validated `actions` section: every declared action by name, in declaration order; empty when the spec declares none. */
|
|
23
|
+
export type Actions = Branded<'Actions', ReadonlyMap<ActionName, Action>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { ApplicationVersion } from './application-version.js';
|
|
3
|
+
/**
|
|
4
|
+
* Validated application metadata — version, auth, infrastructure settings.
|
|
5
|
+
* Used by codegen for ApplicationVersion export and builder chain methods.
|
|
6
|
+
*/
|
|
7
|
+
export type AppMetadata = Branded<'AppMetadata', {
|
|
8
|
+
readonly applicationVersion: ApplicationVersion;
|
|
9
|
+
readonly workspace: boolean;
|
|
10
|
+
readonly webComponentTag: string | undefined;
|
|
11
|
+
readonly pageTitle: string | undefined;
|
|
12
|
+
readonly useAuthHook: boolean;
|
|
13
|
+
readonly useClerk: boolean;
|
|
14
|
+
readonly enableAdminRelease: boolean;
|
|
15
|
+
readonly jsonSchemaValidator: 'ajv' | 'csp-compatible';
|
|
16
|
+
readonly gltfDecoder: 'js' | 'wasm';
|
|
17
|
+
readonly collectFinalizeData: boolean;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Branded semantic version (x.y.z) of the application.
|
|
4
|
+
* Exported by codegen as the `ApplicationVersion` constant and stored as
|
|
5
|
+
* `applicationVersion` on the deployment record.
|
|
6
|
+
*/
|
|
7
|
+
export type ApplicationVersion = Branded<'ApplicationVersion', string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Validated published-data chunk name.
|
|
4
|
+
* Chunk names identify top-level partitions in generated `publishedData`. Data
|
|
5
|
+
* entries point to these names through their `chunk` field, and the parser adds
|
|
6
|
+
* the reserved `system` chunk when user chunks exist.
|
|
7
|
+
*/
|
|
8
|
+
export type ChunkName = Branded<'ChunkName', string>;
|
|
9
|
+
/**
|
|
10
|
+
* A named partition of published data with a scope.
|
|
11
|
+
* `scope` is typically `'project'` (per-project data) or `'public'` (shared).
|
|
12
|
+
*/
|
|
13
|
+
export interface ChunkDefinition {
|
|
14
|
+
/** Visibility/storage scope used by runtime data publishing for this chunk. */
|
|
15
|
+
readonly scope: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Validated chunk definitions, keyed by chunk name.
|
|
19
|
+
* When any user-defined chunks are present, the reserved `system` chunk is
|
|
20
|
+
* auto-injected with `scope: 'public'` to carry admin presets/recipes schemas.
|
|
21
|
+
* When the input is empty, no system injection happens (mirrors domain-spec behavior).
|
|
22
|
+
*/
|
|
23
|
+
export type Chunks = Readonly<Record<ChunkName, ChunkDefinition>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DataCellValue, DataSchema } from '../../../core/index.js';
|
|
2
|
+
/** Parsed `$data.custom` entry with validated definition and normalized row values. */
|
|
3
|
+
export interface CustomDataSpecEntry {
|
|
4
|
+
/** Column/property schema for a custom data row, used by admin pages and published-data schemas. */
|
|
5
|
+
readonly definition: DataSchema;
|
|
6
|
+
/** Optional published-data chunk that receives this entry as an array property. */
|
|
7
|
+
readonly chunk?: string;
|
|
8
|
+
/** Ownership mode deciding whether data is manual, externally connected, or admin-generated. */
|
|
9
|
+
readonly kind: 'manual' | 'connected' | 'generated';
|
|
10
|
+
/** Optional human-readable label used by inferred admin pages and connected-data UI. */
|
|
11
|
+
readonly title?: string;
|
|
12
|
+
/** Optional icon name used in inferred admin navigation. */
|
|
13
|
+
readonly icon?: string;
|
|
14
|
+
/** Default rows normalized to the same column order as `definition`. */
|
|
15
|
+
readonly values?: ReadonlyArray<readonly DataCellValue[]>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Validated `$data` entry key.
|
|
4
|
+
* This is the stable identifier for a data collection declared under `$data.custom`
|
|
5
|
+
* or `$data.swatchOptions`. The same key is used when extending published data,
|
|
6
|
+
* wiring connected/generated admin pages, and linking explicit admin pages through
|
|
7
|
+
* `connectedDataEntry`.
|
|
8
|
+
*/
|
|
9
|
+
export type DataEntryKey = Branded<'DataEntryKey', string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CustomDataSpecEntry } from './custom-data-spec-entry.js';
|
|
2
|
+
import type { DataEntryKey } from './data-entry-key.js';
|
|
3
|
+
import type { SwatchDataSpecEntry } from './swatch-data-spec-entry.js';
|
|
4
|
+
/** Validated `$data` entries grouped by their source section. */
|
|
5
|
+
export interface ParsedDataSpecEntries {
|
|
6
|
+
/** Custom data entries with user-declared schemas. */
|
|
7
|
+
readonly custom: Readonly<Record<DataEntryKey, CustomDataSpecEntry>>;
|
|
8
|
+
/** Swatch data entries with the built-in swatch schema. */
|
|
9
|
+
readonly swatchOptions: Readonly<Record<DataEntryKey, SwatchDataSpecEntry>>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CellValue } from '@salsita-ai/contracts/webhook';
|
|
2
|
+
/** Parsed `$data.swatchOptions` entry using the fixed swatch data shape. */
|
|
3
|
+
export interface SwatchDataSpecEntry {
|
|
4
|
+
/** Optional published-data chunk that receives this swatch entry as an array property. */
|
|
5
|
+
readonly chunk?: string;
|
|
6
|
+
/** Ownership mode deciding whether swatches are manual, externally connected, or admin-generated. */
|
|
7
|
+
readonly kind: 'manual' | 'connected' | 'generated';
|
|
8
|
+
/** Optional human-readable label used by inferred admin pages and connected-data UI. */
|
|
9
|
+
readonly title?: string;
|
|
10
|
+
/** Optional icon name used in inferred admin navigation. */
|
|
11
|
+
readonly icon?: string;
|
|
12
|
+
/** Default swatch rows normalized to `SWATCH_DEFINITION` column order. */
|
|
13
|
+
readonly values?: ReadonlyArray<readonly CellValue[]>;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|