@softov/scena 0.1.2
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/LICENSE +21 -0
- package/README.md +42 -0
- package/dist/controls/command.d.ts +18 -0
- package/dist/controls/command.js +150 -0
- package/dist/controls/events.d.ts +3 -0
- package/dist/controls/events.js +43 -0
- package/dist/controls/index.d.ts +10 -0
- package/dist/controls/index.js +10 -0
- package/dist/controls/keybinding.d.ts +9 -0
- package/dist/controls/keybinding.js +94 -0
- package/dist/controls/layout.d.ts +16 -0
- package/dist/controls/layout.js +201 -0
- package/dist/controls/manifest.d.ts +21 -0
- package/dist/controls/manifest.js +219 -0
- package/dist/controls/session.d.ts +16 -0
- package/dist/controls/session.js +95 -0
- package/dist/controls/shell.d.ts +8 -0
- package/dist/controls/shell.js +48 -0
- package/dist/controls/storage/layout-local.d.ts +6 -0
- package/dist/controls/storage/layout-local.js +47 -0
- package/dist/controls/storage/session-local.d.ts +5 -0
- package/dist/controls/storage/session-local.js +38 -0
- package/dist/controls/when.d.ts +7 -0
- package/dist/controls/when.js +226 -0
- package/dist/converters/a2ui-v0.10.d.ts +23 -0
- package/dist/converters/a2ui-v0.10.js +136 -0
- package/dist/converters/index.d.ts +1 -0
- package/dist/converters/index.js +1 -0
- package/dist/core/backends/modus-backend.d.ts +13 -0
- package/dist/core/backends/modus-backend.js +115 -0
- package/dist/core/backends/storage-backend.d.ts +7 -0
- package/dist/core/backends/storage-backend.js +73 -0
- package/dist/core/backends/yjs-backend.d.ts +3 -0
- package/dist/core/backends/yjs-backend.js +44 -0
- package/dist/core/binding-resolver.d.ts +7 -0
- package/dist/core/binding-resolver.js +106 -0
- package/dist/core/component-graph.d.ts +6 -0
- package/dist/core/component-graph.js +77 -0
- package/dist/core/component-registry.d.ts +7 -0
- package/dist/core/component-registry.js +87 -0
- package/dist/core/computed-dsl.d.ts +2 -0
- package/dist/core/computed-dsl.js +267 -0
- package/dist/core/converter-registry.d.ts +2 -0
- package/dist/core/converter-registry.js +37 -0
- package/dist/core/disposable.d.ts +3 -0
- package/dist/core/disposable.js +19 -0
- package/dist/core/dynamic-resolver.d.ts +12 -0
- package/dist/core/dynamic-resolver.js +134 -0
- package/dist/core/index.d.ts +44 -0
- package/dist/core/index.js +48 -0
- package/dist/core/label.d.ts +2 -0
- package/dist/core/label.js +14 -0
- package/dist/core/mount-menu.d.ts +2 -0
- package/dist/core/mount-menu.js +23 -0
- package/dist/core/mount-surface.d.ts +15 -0
- package/dist/core/mount-surface.js +214 -0
- package/dist/core/path-resolver.d.ts +14 -0
- package/dist/core/path-resolver.js +169 -0
- package/dist/core/permissions.d.ts +2 -0
- package/dist/core/permissions.js +50 -0
- package/dist/core/reactive-store.d.ts +17 -0
- package/dist/core/reactive-store.js +496 -0
- package/dist/core/scena.d.ts +2 -0
- package/dist/core/scena.js +115 -0
- package/dist/core/surface-presentation.d.ts +6 -0
- package/dist/core/surface-presentation.js +12 -0
- package/dist/i18n/i18n-backend.d.ts +2 -0
- package/dist/i18n/i18n-backend.js +35 -0
- package/dist/i18n/registry.d.ts +32 -0
- package/dist/i18n/registry.js +200 -0
- package/dist/porta/Limen.css +50 -0
- package/dist/porta/Limen.d.ts +16 -0
- package/dist/porta/Limen.js +14 -0
- package/dist/porta/PortaContext.d.ts +10 -0
- package/dist/porta/PortaContext.js +20 -0
- package/dist/porta/PortaLock.css +14 -0
- package/dist/porta/PortaLock.d.ts +10 -0
- package/dist/porta/PortaLock.js +13 -0
- package/dist/porta/SigillumGate.d.ts +8 -0
- package/dist/porta/SigillumGate.js +7 -0
- package/dist/porta/commands.d.ts +3 -0
- package/dist/porta/commands.js +125 -0
- package/dist/porta/index.d.ts +18 -0
- package/dist/porta/index.js +22 -0
- package/dist/porta/login-form.block.d.ts +2 -0
- package/dist/porta/login-form.block.js +7 -0
- package/dist/porta/match.d.ts +2 -0
- package/dist/porta/match.js +20 -0
- package/dist/porta/provider.d.ts +59 -0
- package/dist/porta/provider.js +1 -0
- package/dist/porta/providers/examples/google-oauth.d.ts +6 -0
- package/dist/porta/providers/examples/google-oauth.js +21 -0
- package/dist/porta/providers/examples/index.d.ts +6 -0
- package/dist/porta/providers/examples/index.js +3 -0
- package/dist/porta/providers/examples/magic-link.d.ts +8 -0
- package/dist/porta/providers/examples/magic-link.js +31 -0
- package/dist/porta/providers/examples/sms-otp.d.ts +9 -0
- package/dist/porta/providers/examples/sms-otp.js +31 -0
- package/dist/porta/providers/password.d.ts +12 -0
- package/dist/porta/providers/password.js +46 -0
- package/dist/porta/register-blocks.d.ts +3 -0
- package/dist/porta/register-blocks.js +31 -0
- package/dist/porta/register.d.ts +15 -0
- package/dist/porta/register.js +31 -0
- package/dist/porta/sigillum.d.ts +19 -0
- package/dist/porta/sigillum.js +41 -0
- package/dist/react/DefaultShell.d.ts +1 -0
- package/dist/react/DefaultShell.js +37 -0
- package/dist/react/Scena.d.ts +9 -0
- package/dist/react/Scena.js +20 -0
- package/dist/react/ScenaProvider.d.ts +8 -0
- package/dist/react/ScenaProvider.js +13 -0
- package/dist/react/ShellSplitter.d.ts +13 -0
- package/dist/react/ShellSplitter.js +88 -0
- package/dist/react/SurfaceArea.d.ts +13 -0
- package/dist/react/SurfaceArea.js +75 -0
- package/dist/react/Translate.d.ts +8 -0
- package/dist/react/Translate.js +10 -0
- package/dist/react/ViewMount.d.ts +12 -0
- package/dist/react/ViewMount.js +268 -0
- package/dist/react/core.d.ts +6 -0
- package/dist/react/core.js +10 -0
- package/dist/react/hooks/useCommand.d.ts +1 -0
- package/dist/react/hooks/useCommand.js +6 -0
- package/dist/react/hooks/useI18n.d.ts +9 -0
- package/dist/react/hooks/useI18n.js +16 -0
- package/dist/react/hooks/useLabel.d.ts +2 -0
- package/dist/react/hooks/useLabel.js +19 -0
- package/dist/react/hooks/useLayout.d.ts +2 -0
- package/dist/react/hooks/useLayout.js +10 -0
- package/dist/react/hooks/useMounts.d.ts +2 -0
- package/dist/react/hooks/useMounts.js +17 -0
- package/dist/react/hooks/useStore.d.ts +3 -0
- package/dist/react/hooks/useStore.js +40 -0
- package/dist/react/hooks/useStoreLabel.d.ts +3 -0
- package/dist/react/hooks/useStoreLabel.js +25 -0
- package/dist/react/hooks/useSurfacePresentation.d.ts +4 -0
- package/dist/react/hooks/useSurfacePresentation.js +16 -0
- package/dist/react/index.d.ts +20 -0
- package/dist/react/index.js +20 -0
- package/dist/react/mount-context.d.ts +8 -0
- package/dist/react/mount-context.js +20 -0
- package/dist/react/useSurfaceResize.d.ts +39 -0
- package/dist/react/useSurfaceResize.js +135 -0
- package/dist/runtime/args-schema.d.ts +11 -0
- package/dist/runtime/args-schema.js +45 -0
- package/dist/runtime/builtins.d.ts +3 -0
- package/dist/runtime/builtins.js +193 -0
- package/dist/runtime/client-handlers.d.ts +3 -0
- package/dist/runtime/client-handlers.js +19 -0
- package/dist/runtime/in-memory-socket.d.ts +7 -0
- package/dist/runtime/in-memory-socket.js +53 -0
- package/dist/runtime/index.d.ts +10 -0
- package/dist/runtime/index.js +7 -0
- package/dist/runtime/layout-commands.d.ts +5 -0
- package/dist/runtime/layout-commands.js +548 -0
- package/dist/runtime/opener-commands.d.ts +17 -0
- package/dist/runtime/opener-commands.js +96 -0
- package/dist/runtime/surface-bridge.d.ts +15 -0
- package/dist/runtime/surface-bridge.js +116 -0
- package/dist/styles/bar.css +155 -0
- package/dist/styles/base.css +285 -0
- package/dist/styles/geometry.css +32 -0
- package/dist/styles/index.d.ts +29 -0
- package/dist/styles/index.js +109 -0
- package/dist/styles/scrollbar.css +45 -0
- package/dist/styles/surface.css +179 -0
- package/dist/styles/theme.css +3 -0
- package/dist/styles/themes/dark.css +30 -0
- package/dist/styles/themes/light.css +1 -0
- package/dist/styles/themes/tokens.css +222 -0
- package/dist/types/binding-resolver.d.ts +30 -0
- package/dist/types/binding-resolver.js +1 -0
- package/dist/types/colors.d.ts +7 -0
- package/dist/types/colors.js +59 -0
- package/dist/types/command.d.ts +62 -0
- package/dist/types/command.js +1 -0
- package/dist/types/component-graph.d.ts +72 -0
- package/dist/types/component-graph.js +40 -0
- package/dist/types/component-registry.d.ts +70 -0
- package/dist/types/component-registry.js +1 -0
- package/dist/types/converter-registry.d.ts +17 -0
- package/dist/types/converter-registry.js +1 -0
- package/dist/types/disposable.d.ts +3 -0
- package/dist/types/disposable.js +1 -0
- package/dist/types/events.d.ts +75 -0
- package/dist/types/events.js +1 -0
- package/dist/types/host.d.ts +50 -0
- package/dist/types/host.js +1 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/index.js +23 -0
- package/dist/types/keybinding.d.ts +36 -0
- package/dist/types/keybinding.js +1 -0
- package/dist/types/label.d.ts +9 -0
- package/dist/types/label.js +1 -0
- package/dist/types/layout.d.ts +117 -0
- package/dist/types/layout.js +1 -0
- package/dist/types/manifest.d.ts +152 -0
- package/dist/types/manifest.js +1 -0
- package/dist/types/mount-menu.d.ts +8 -0
- package/dist/types/mount-menu.js +1 -0
- package/dist/types/mount-surface.d.ts +87 -0
- package/dist/types/mount-surface.js +1 -0
- package/dist/types/permissions.d.ts +18 -0
- package/dist/types/permissions.js +1 -0
- package/dist/types/query.d.ts +34 -0
- package/dist/types/query.js +7 -0
- package/dist/types/reactive-store.d.ts +39 -0
- package/dist/types/reactive-store.js +1 -0
- package/dist/types/scena.d.ts +53 -0
- package/dist/types/scena.js +1 -0
- package/dist/types/scope-backend.d.ts +16 -0
- package/dist/types/scope-backend.js +1 -0
- package/dist/types/session.d.ts +39 -0
- package/dist/types/session.js +1 -0
- package/dist/types/shell.d.ts +21 -0
- package/dist/types/shell.js +1 -0
- package/dist/types/when.d.ts +10 -0
- package/dist/types/when.js +1 -0
- package/dist/ui/_utils.d.ts +8 -0
- package/dist/ui/_utils.js +53 -0
- package/dist/ui/campus/CampusMappa.d.ts +18 -0
- package/dist/ui/campus/CampusMappa.js +106 -0
- package/dist/ui/campus/CampusNodus.d.ts +25 -0
- package/dist/ui/campus/CampusNodus.js +211 -0
- package/dist/ui/campus/CampusStratum.d.ts +13 -0
- package/dist/ui/campus/CampusStratum.js +20 -0
- package/dist/ui/campus/CampusVelum.d.ts +7 -0
- package/dist/ui/campus/CampusVelum.js +12 -0
- package/dist/ui/campus/CampusView.d.ts +27 -0
- package/dist/ui/campus/CampusView.js +420 -0
- package/dist/ui/campus/context.d.ts +13 -0
- package/dist/ui/campus/context.js +12 -0
- package/dist/ui/campus/index.d.ts +14 -0
- package/dist/ui/campus/index.js +11 -0
- package/dist/ui/campus/stratum-context.d.ts +2 -0
- package/dist/ui/campus/stratum-context.js +10 -0
- package/dist/ui/campus/types.d.ts +47 -0
- package/dist/ui/campus/types.js +4 -0
- package/dist/ui/chart/BarChart.css +53 -0
- package/dist/ui/chart/BarChart.d.ts +24 -0
- package/dist/ui/chart/BarChart.js +32 -0
- package/dist/ui/chart/Donut.css +15 -0
- package/dist/ui/chart/Donut.d.ts +15 -0
- package/dist/ui/chart/Donut.js +18 -0
- package/dist/ui/chart/LineChart.css +8 -0
- package/dist/ui/chart/LineChart.d.ts +24 -0
- package/dist/ui/chart/LineChart.js +29 -0
- package/dist/ui/chart/catalog.d.ts +2 -0
- package/dist/ui/chart/catalog.js +7 -0
- package/dist/ui/chart/index.d.ts +6 -0
- package/dist/ui/chart/index.js +4 -0
- package/dist/ui/control/Button.css +7 -0
- package/dist/ui/control/Button.d.ts +17 -0
- package/dist/ui/control/Button.js +17 -0
- package/dist/ui/control/CheckBox.css +16 -0
- package/dist/ui/control/CheckBox.d.ts +15 -0
- package/dist/ui/control/CheckBox.js +23 -0
- package/dist/ui/control/Checks.css +6 -0
- package/dist/ui/control/Checks.d.ts +9 -0
- package/dist/ui/control/Checks.js +10 -0
- package/dist/ui/control/ChoicePicker.css +16 -0
- package/dist/ui/control/ChoicePicker.d.ts +25 -0
- package/dist/ui/control/ChoicePicker.js +38 -0
- package/dist/ui/control/DateTimeInput.css +1 -0
- package/dist/ui/control/DateTimeInput.d.ts +22 -0
- package/dist/ui/control/DateTimeInput.js +41 -0
- package/dist/ui/control/LocaleToggle.css +38 -0
- package/dist/ui/control/LocaleToggle.d.ts +11 -0
- package/dist/ui/control/LocaleToggle.js +23 -0
- package/dist/ui/control/ReloadButton.d.ts +6 -0
- package/dist/ui/control/ReloadButton.js +9 -0
- package/dist/ui/control/Slider.css +2 -0
- package/dist/ui/control/Slider.d.ts +21 -0
- package/dist/ui/control/Slider.js +37 -0
- package/dist/ui/control/TextField.css +0 -0
- package/dist/ui/control/TextField.d.ts +25 -0
- package/dist/ui/control/TextField.js +36 -0
- package/dist/ui/control/_field-parts.css +102 -0
- package/dist/ui/control/_field-parts.d.ts +15 -0
- package/dist/ui/control/_field-parts.js +17 -0
- package/dist/ui/control/catalog.d.ts +2 -0
- package/dist/ui/control/catalog.js +10 -0
- package/dist/ui/control/index.d.ts +13 -0
- package/dist/ui/control/index.js +11 -0
- package/dist/ui/data/DataTable.d.ts +19 -0
- package/dist/ui/data/DataTable.js +20 -0
- package/dist/ui/data/Filter.d.ts +13 -0
- package/dist/ui/data/Filter.js +56 -0
- package/dist/ui/data/List.css +16 -0
- package/dist/ui/data/List.d.ts +15 -0
- package/dist/ui/data/List.js +18 -0
- package/dist/ui/data/Listable.css +245 -0
- package/dist/ui/data/Listable.d.ts +60 -0
- package/dist/ui/data/Listable.js +209 -0
- package/dist/ui/data/Pagination.d.ts +5 -0
- package/dist/ui/data/Pagination.js +43 -0
- package/dist/ui/data/Tree.css +118 -0
- package/dist/ui/data/Tree.d.ts +45 -0
- package/dist/ui/data/Tree.js +170 -0
- package/dist/ui/data/catalog.d.ts +2 -0
- package/dist/ui/data/catalog.js +7 -0
- package/dist/ui/data/index.d.ts +11 -0
- package/dist/ui/data/index.js +7 -0
- package/dist/ui/display/AddPlaceholder.d.ts +6 -0
- package/dist/ui/display/AddPlaceholder.js +24 -0
- package/dist/ui/display/Alert.css +42 -0
- package/dist/ui/display/Alert.d.ts +14 -0
- package/dist/ui/display/Alert.js +13 -0
- package/dist/ui/display/Avatar.css +19 -0
- package/dist/ui/display/Avatar.d.ts +16 -0
- package/dist/ui/display/Avatar.js +52 -0
- package/dist/ui/display/Badge.css +26 -0
- package/dist/ui/display/Badge.d.ts +16 -0
- package/dist/ui/display/Badge.js +9 -0
- package/dist/ui/display/Card.css +15 -0
- package/dist/ui/display/Card.d.ts +11 -0
- package/dist/ui/display/Card.js +8 -0
- package/dist/ui/display/DetailContainer.d.ts +6 -0
- package/dist/ui/display/DetailContainer.js +7 -0
- package/dist/ui/display/DetailHeader.css +53 -0
- package/dist/ui/display/DetailHeader.d.ts +22 -0
- package/dist/ui/display/DetailHeader.js +8 -0
- package/dist/ui/display/DetailList.css +26 -0
- package/dist/ui/display/DetailList.d.ts +13 -0
- package/dist/ui/display/DetailList.js +5 -0
- package/dist/ui/display/DetailNotFound.d.ts +17 -0
- package/dist/ui/display/DetailNotFound.js +39 -0
- package/dist/ui/display/Divider.css +6 -0
- package/dist/ui/display/Divider.d.ts +8 -0
- package/dist/ui/display/Divider.js +16 -0
- package/dist/ui/display/Divisor.css +30 -0
- package/dist/ui/display/Divisor.d.ts +11 -0
- package/dist/ui/display/Divisor.js +43 -0
- package/dist/ui/display/Icon.css +10 -0
- package/dist/ui/display/Icon.d.ts +14 -0
- package/dist/ui/display/Icon.js +144 -0
- package/dist/ui/display/Image.css +1 -0
- package/dist/ui/display/Image.d.ts +16 -0
- package/dist/ui/display/Image.js +19 -0
- package/dist/ui/display/Markdown.css +38 -0
- package/dist/ui/display/Markdown.d.ts +8 -0
- package/dist/ui/display/Markdown.js +140 -0
- package/dist/ui/display/Progress.css +39 -0
- package/dist/ui/display/Progress.d.ts +15 -0
- package/dist/ui/display/Progress.js +17 -0
- package/dist/ui/display/SectionTitle.d.ts +6 -0
- package/dist/ui/display/SectionTitle.js +6 -0
- package/dist/ui/display/Skeleton.css +20 -0
- package/dist/ui/display/Skeleton.d.ts +11 -0
- package/dist/ui/display/Skeleton.js +11 -0
- package/dist/ui/display/Spinner.css +20 -0
- package/dist/ui/display/Spinner.d.ts +12 -0
- package/dist/ui/display/Spinner.js +12 -0
- package/dist/ui/display/Svg.d.ts +13 -0
- package/dist/ui/display/Svg.js +17 -0
- package/dist/ui/display/Text.css +20 -0
- package/dist/ui/display/Text.d.ts +13 -0
- package/dist/ui/display/Text.js +15 -0
- package/dist/ui/display/catalog.d.ts +2 -0
- package/dist/ui/display/catalog.js +12 -0
- package/dist/ui/display/index.d.ts +22 -0
- package/dist/ui/display/index.js +14 -0
- package/dist/ui/embed/HtmlEmbed.d.ts +12 -0
- package/dist/ui/embed/HtmlEmbed.js +16 -0
- package/dist/ui/embed/index.d.ts +2 -0
- package/dist/ui/embed/index.js +1 -0
- package/dist/ui/forms/DangerZone.d.ts +8 -0
- package/dist/ui/forms/DangerZone.js +31 -0
- package/dist/ui/forms/Field.css +15 -0
- package/dist/ui/forms/Field.d.ts +28 -0
- package/dist/ui/forms/Field.js +25 -0
- package/dist/ui/forms/FieldGroup.css +15 -0
- package/dist/ui/forms/FieldGroup.d.ts +7 -0
- package/dist/ui/forms/FieldGroup.js +7 -0
- package/dist/ui/forms/Form.css +14 -0
- package/dist/ui/forms/Form.d.ts +18 -0
- package/dist/ui/forms/Form.js +17 -0
- package/dist/ui/forms/FormActions.css +11 -0
- package/dist/ui/forms/FormActions.d.ts +18 -0
- package/dist/ui/forms/FormActions.js +10 -0
- package/dist/ui/forms/FormSection.css +19 -0
- package/dist/ui/forms/FormSection.d.ts +7 -0
- package/dist/ui/forms/FormSection.js +7 -0
- package/dist/ui/forms/LoginForm.css +105 -0
- package/dist/ui/forms/LoginForm.d.ts +12 -0
- package/dist/ui/forms/LoginForm.js +137 -0
- package/dist/ui/forms/SchemaForm.css +81 -0
- package/dist/ui/forms/SchemaForm.d.ts +26 -0
- package/dist/ui/forms/SchemaForm.js +186 -0
- package/dist/ui/forms/SettingsContainer.d.ts +8 -0
- package/dist/ui/forms/SettingsContainer.js +8 -0
- package/dist/ui/forms/catalog.d.ts +2 -0
- package/dist/ui/forms/catalog.js +11 -0
- package/dist/ui/forms/index.d.ts +19 -0
- package/dist/ui/forms/index.js +12 -0
- package/dist/ui/forms/schema-walk.d.ts +50 -0
- package/dist/ui/forms/schema-walk.js +116 -0
- package/dist/ui/index.d.ts +58 -0
- package/dist/ui/index.js +63 -0
- package/dist/ui/layout/BarLayout.d.ts +2 -0
- package/dist/ui/layout/BarLayout.js +18 -0
- package/dist/ui/layout/Column.css +6 -0
- package/dist/ui/layout/Column.d.ts +12 -0
- package/dist/ui/layout/Column.js +13 -0
- package/dist/ui/layout/FloatingLayout.d.ts +2 -0
- package/dist/ui/layout/FloatingLayout.js +12 -0
- package/dist/ui/layout/Grid.css +5 -0
- package/dist/ui/layout/Grid.d.ts +13 -0
- package/dist/ui/layout/Grid.js +19 -0
- package/dist/ui/layout/InlineLayout.d.ts +2 -0
- package/dist/ui/layout/InlineLayout.js +13 -0
- package/dist/ui/layout/MountTitle.d.ts +12 -0
- package/dist/ui/layout/MountTitle.js +42 -0
- package/dist/ui/layout/RailLayout.d.ts +2 -0
- package/dist/ui/layout/RailLayout.js +38 -0
- package/dist/ui/layout/Row.css +16 -0
- package/dist/ui/layout/Row.d.ts +13 -0
- package/dist/ui/layout/Row.js +21 -0
- package/dist/ui/layout/SectionHeader.d.ts +10 -0
- package/dist/ui/layout/SectionHeader.js +65 -0
- package/dist/ui/layout/SingleLayout.d.ts +2 -0
- package/dist/ui/layout/SingleLayout.js +25 -0
- package/dist/ui/layout/SpatialCard.d.ts +9 -0
- package/dist/ui/layout/SpatialCard.js +30 -0
- package/dist/ui/layout/SpatialLayout.d.ts +2 -0
- package/dist/ui/layout/SpatialLayout.js +446 -0
- package/dist/ui/layout/SplitLayout.d.ts +2 -0
- package/dist/ui/layout/SplitLayout.js +159 -0
- package/dist/ui/layout/Splitter.d.ts +12 -0
- package/dist/ui/layout/Splitter.js +64 -0
- package/dist/ui/layout/StackHeader.d.ts +9 -0
- package/dist/ui/layout/StackHeader.js +87 -0
- package/dist/ui/layout/StackLayout.d.ts +2 -0
- package/dist/ui/layout/StackLayout.js +137 -0
- package/dist/ui/layout/TabLayout.d.ts +2 -0
- package/dist/ui/layout/TabLayout.js +145 -0
- package/dist/ui/layout/TabPanelLayout.d.ts +20 -0
- package/dist/ui/layout/TabPanelLayout.js +615 -0
- package/dist/ui/layout/catalog.d.ts +2 -0
- package/dist/ui/layout/catalog.js +10 -0
- package/dist/ui/layout/index.d.ts +17 -0
- package/dist/ui/layout/index.js +17 -0
- package/dist/ui/layout/register.d.ts +3 -0
- package/dist/ui/layout/register.js +25 -0
- package/dist/ui/media/Audio.css +1 -0
- package/dist/ui/media/Audio.d.ts +12 -0
- package/dist/ui/media/Audio.js +8 -0
- package/dist/ui/media/Video.css +1 -0
- package/dist/ui/media/Video.d.ts +16 -0
- package/dist/ui/media/Video.js +9 -0
- package/dist/ui/media/catalog.d.ts +2 -0
- package/dist/ui/media/catalog.js +5 -0
- package/dist/ui/media/index.d.ts +2 -0
- package/dist/ui/media/index.js +3 -0
- package/dist/ui/menu/ActionList.css +262 -0
- package/dist/ui/menu/ActionList.d.ts +19 -0
- package/dist/ui/menu/ActionList.js +369 -0
- package/dist/ui/menu/ContainerMenu.d.ts +13 -0
- package/dist/ui/menu/ContainerMenu.js +57 -0
- package/dist/ui/menu/ContextMenu.d.ts +27 -0
- package/dist/ui/menu/ContextMenu.js +93 -0
- package/dist/ui/menu/index.d.ts +10 -0
- package/dist/ui/menu/index.js +7 -0
- package/dist/ui/menu/token.d.ts +22 -0
- package/dist/ui/menu/token.js +145 -0
- package/dist/ui/menu/useChatPicker.d.ts +24 -0
- package/dist/ui/menu/useChatPicker.js +210 -0
- package/dist/ui/navigation/Breadcrumb.css +30 -0
- package/dist/ui/navigation/Breadcrumb.d.ts +14 -0
- package/dist/ui/navigation/Breadcrumb.js +12 -0
- package/dist/ui/navigation/Link.css +13 -0
- package/dist/ui/navigation/Link.d.ts +18 -0
- package/dist/ui/navigation/Link.js +43 -0
- package/dist/ui/navigation/Tabs.css +39 -0
- package/dist/ui/navigation/Tabs.d.ts +18 -0
- package/dist/ui/navigation/Tabs.js +55 -0
- package/dist/ui/navigation/Toolbar.css +25 -0
- package/dist/ui/navigation/Toolbar.d.ts +12 -0
- package/dist/ui/navigation/Toolbar.js +21 -0
- package/dist/ui/navigation/catalog.d.ts +2 -0
- package/dist/ui/navigation/catalog.js +5 -0
- package/dist/ui/navigation/index.d.ts +8 -0
- package/dist/ui/navigation/index.js +5 -0
- package/dist/ui/overlay/Modal.css +35 -0
- package/dist/ui/overlay/Modal.d.ts +12 -0
- package/dist/ui/overlay/Modal.js +57 -0
- package/dist/ui/overlay/Popup.d.ts +12 -0
- package/dist/ui/overlay/Popup.js +74 -0
- package/dist/ui/overlay/catalog.d.ts +2 -0
- package/dist/ui/overlay/catalog.js +4 -0
- package/dist/ui/overlay/index.d.ts +1 -0
- package/dist/ui/overlay/index.js +2 -0
- package/dist/ui/register.d.ts +6 -0
- package/dist/ui/register.js +26 -0
- package/package.json +115 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import type { Disposable } from './disposable.js';
|
|
2
|
+
import type { BindingPath, ComponentNode } from './component-graph.js';
|
|
3
|
+
import type { ContextValue } from './when.js';
|
|
4
|
+
import type { SurfaceName, MountPolicy } from './mount-surface.js';
|
|
5
|
+
import type { Permissions } from './permissions.js';
|
|
6
|
+
import type { ArgsSchema } from './command.js';
|
|
7
|
+
import type { ComponentCategory, ComponentDefinition, PropsSchema } from './component-registry.js';
|
|
8
|
+
import type { Converter } from './converter-registry.js';
|
|
9
|
+
import type { DataProviderDefinition, ComputedDefinition } from './reactive-store.js';
|
|
10
|
+
export type ManifestComponent = ComponentDefinition;
|
|
11
|
+
export type ManifestConverter = Converter;
|
|
12
|
+
export type ManifestDataProvider = DataProviderDefinition;
|
|
13
|
+
export interface ManifestComputedPath {
|
|
14
|
+
path: BindingPath;
|
|
15
|
+
def: ComputedDefinition;
|
|
16
|
+
}
|
|
17
|
+
export interface ManifestCommand {
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
category?: string;
|
|
21
|
+
icon?: string;
|
|
22
|
+
keywords?: string[];
|
|
23
|
+
slots?: string[];
|
|
24
|
+
when?: string;
|
|
25
|
+
args?: ArgsSchema;
|
|
26
|
+
dispatch?: 'client' | 'remote' | 'either';
|
|
27
|
+
run?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ManifestKeybinding {
|
|
30
|
+
keys: string;
|
|
31
|
+
commandId: string;
|
|
32
|
+
args?: unknown[];
|
|
33
|
+
when?: string;
|
|
34
|
+
scope?: {
|
|
35
|
+
surfaceName?: SurfaceName;
|
|
36
|
+
viewId?: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface ManifestView {
|
|
40
|
+
surface: SurfaceName;
|
|
41
|
+
key: string;
|
|
42
|
+
when?: string;
|
|
43
|
+
component: ComponentNode | string;
|
|
44
|
+
policy?: MountPolicy;
|
|
45
|
+
}
|
|
46
|
+
export interface ManifestShell {
|
|
47
|
+
id: string;
|
|
48
|
+
title?: string;
|
|
49
|
+
component: string;
|
|
50
|
+
}
|
|
51
|
+
export interface Contributes {
|
|
52
|
+
components?: ManifestComponent[];
|
|
53
|
+
converters?: ManifestConverter[];
|
|
54
|
+
dataProviders?: ManifestDataProvider[];
|
|
55
|
+
computedPaths?: ManifestComputedPath[];
|
|
56
|
+
commands?: ManifestCommand[];
|
|
57
|
+
keybindings?: ManifestKeybinding[];
|
|
58
|
+
contextKeys?: {
|
|
59
|
+
key: BindingPath;
|
|
60
|
+
value: ContextValue;
|
|
61
|
+
}[];
|
|
62
|
+
views?: ManifestView[];
|
|
63
|
+
shells?: ManifestShell[];
|
|
64
|
+
}
|
|
65
|
+
export interface ScenaManifestSource {
|
|
66
|
+
id: string;
|
|
67
|
+
version?: string;
|
|
68
|
+
displayName?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface ScenaManifest {
|
|
71
|
+
source: ScenaManifestSource;
|
|
72
|
+
requires?: string[];
|
|
73
|
+
engine?: {
|
|
74
|
+
scena: string;
|
|
75
|
+
};
|
|
76
|
+
permissions?: Permissions;
|
|
77
|
+
contributes?: Contributes;
|
|
78
|
+
}
|
|
79
|
+
export interface RuntimeManifestComponent {
|
|
80
|
+
component: string;
|
|
81
|
+
category?: ComponentCategory;
|
|
82
|
+
propsSchema?: PropsSchema;
|
|
83
|
+
fallback?: ComponentNode;
|
|
84
|
+
renderer: {
|
|
85
|
+
kind: 'react';
|
|
86
|
+
module: string;
|
|
87
|
+
} | {
|
|
88
|
+
kind: 'template';
|
|
89
|
+
template: ComponentNode;
|
|
90
|
+
} | {
|
|
91
|
+
kind: 'html';
|
|
92
|
+
module: string;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export interface RuntimeManifestCommand {
|
|
96
|
+
id: string;
|
|
97
|
+
title: string;
|
|
98
|
+
category?: string;
|
|
99
|
+
icon?: string;
|
|
100
|
+
keywords?: string[];
|
|
101
|
+
slots?: string[];
|
|
102
|
+
when?: string;
|
|
103
|
+
args?: ArgsSchema;
|
|
104
|
+
dispatch?: 'client' | 'remote' | 'either';
|
|
105
|
+
run?: string;
|
|
106
|
+
}
|
|
107
|
+
export interface RuntimeManifestJSON {
|
|
108
|
+
source: ScenaManifestSource;
|
|
109
|
+
requires?: string[];
|
|
110
|
+
engine?: {
|
|
111
|
+
scena: string;
|
|
112
|
+
};
|
|
113
|
+
permissions?: Permissions;
|
|
114
|
+
contributes?: {
|
|
115
|
+
components?: RuntimeManifestComponent[];
|
|
116
|
+
converters?: {
|
|
117
|
+
id: string;
|
|
118
|
+
module: string;
|
|
119
|
+
}[];
|
|
120
|
+
dataProviders?: {
|
|
121
|
+
namespace: string;
|
|
122
|
+
module: string;
|
|
123
|
+
load?: 'lazy' | 'eager';
|
|
124
|
+
unloadAfter?: string | number;
|
|
125
|
+
}[];
|
|
126
|
+
computedPaths?: {
|
|
127
|
+
path: BindingPath;
|
|
128
|
+
module: string;
|
|
129
|
+
}[];
|
|
130
|
+
commands?: RuntimeManifestCommand[];
|
|
131
|
+
keybindings?: ManifestKeybinding[];
|
|
132
|
+
contextKeys?: {
|
|
133
|
+
key: BindingPath;
|
|
134
|
+
value: ContextValue;
|
|
135
|
+
}[];
|
|
136
|
+
views?: ManifestView[];
|
|
137
|
+
shells?: {
|
|
138
|
+
id: string;
|
|
139
|
+
title?: string;
|
|
140
|
+
module: string;
|
|
141
|
+
}[];
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
export interface ManifestLoader {
|
|
145
|
+
resolve(spec: string, source: ScenaManifestSource): Promise<unknown>;
|
|
146
|
+
}
|
|
147
|
+
export interface ManifestAPI {
|
|
148
|
+
load(manifest: ScenaManifest, loader: ManifestLoader): Promise<Disposable>;
|
|
149
|
+
loadRuntime(manifest: RuntimeManifestJSON, loader: ManifestLoader): Promise<Disposable>;
|
|
150
|
+
unload(sourceId: string): void;
|
|
151
|
+
listSources(): ScenaManifestSource[];
|
|
152
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Disposable } from './disposable.js';
|
|
2
|
+
import type { PickerAction } from './host.js';
|
|
3
|
+
import type { ResolvedMount } from './mount-surface.js';
|
|
4
|
+
export type MountMenuContributor = (mount: ResolvedMount) => PickerAction[];
|
|
5
|
+
export interface MountMenuRegistry {
|
|
6
|
+
register(slot: string, contributor: MountMenuContributor): Disposable;
|
|
7
|
+
collect(slot: string, mount: ResolvedMount): PickerAction[];
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { Disposable } from './disposable.js';
|
|
2
|
+
import type { ComponentNode, DataBinding } from './component-graph.js';
|
|
3
|
+
import type { WhenClause } from './when.js';
|
|
4
|
+
import type { ResourceColor } from './colors.js';
|
|
5
|
+
import type { Label } from './label.js';
|
|
6
|
+
export type SurfaceName = 'titlebar' | 'activitybar' | 'sidebar:left' | 'sidebar:right' | 'main' | 'panel:bottom' | 'statusbar' | 'overlay' | 'detached';
|
|
7
|
+
export type MountTarget = ComponentNode | DataBinding;
|
|
8
|
+
export type EditTier = 'basic' | 'content' | 'binding' | 'structure' | 'schema';
|
|
9
|
+
export interface MountPolicy {
|
|
10
|
+
editable?: boolean;
|
|
11
|
+
editTier?: EditTier;
|
|
12
|
+
persistent?: boolean;
|
|
13
|
+
transient?: boolean;
|
|
14
|
+
customizable?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface MountDisplay {
|
|
17
|
+
title?: Label;
|
|
18
|
+
icon?: string;
|
|
19
|
+
color?: ResourceColor;
|
|
20
|
+
actions?: MountAction[];
|
|
21
|
+
}
|
|
22
|
+
export interface MountAction {
|
|
23
|
+
command: string;
|
|
24
|
+
label?: Label;
|
|
25
|
+
icon?: string;
|
|
26
|
+
when?: WhenClause;
|
|
27
|
+
}
|
|
28
|
+
export interface MountDeclaration {
|
|
29
|
+
surface: SurfaceName;
|
|
30
|
+
key: string;
|
|
31
|
+
when?: WhenClause;
|
|
32
|
+
resource: MountTarget;
|
|
33
|
+
props?: MountDisplay;
|
|
34
|
+
policy?: MountPolicy;
|
|
35
|
+
dataContext?: `$/${string}`;
|
|
36
|
+
}
|
|
37
|
+
export interface ResolvedMount {
|
|
38
|
+
key: string;
|
|
39
|
+
surface: SurfaceName;
|
|
40
|
+
component: ComponentNode;
|
|
41
|
+
props?: MountDisplay;
|
|
42
|
+
policy: MountPolicy;
|
|
43
|
+
dataContext?: `$/${string}`;
|
|
44
|
+
openedAt: number;
|
|
45
|
+
}
|
|
46
|
+
export interface MountHandle {
|
|
47
|
+
key: string;
|
|
48
|
+
surface: SurfaceName;
|
|
49
|
+
close(opts?: {
|
|
50
|
+
reason?: string;
|
|
51
|
+
}): void;
|
|
52
|
+
focus(): void;
|
|
53
|
+
}
|
|
54
|
+
export interface MountSurfaceRegistry {
|
|
55
|
+
mount(decl: MountDeclaration): Disposable;
|
|
56
|
+
open(opts: {
|
|
57
|
+
surface: SurfaceName;
|
|
58
|
+
key: string;
|
|
59
|
+
resource: MountTarget;
|
|
60
|
+
props?: MountDisplay;
|
|
61
|
+
policy?: MountPolicy;
|
|
62
|
+
dataContext?: `$/${string}`;
|
|
63
|
+
}): MountHandle;
|
|
64
|
+
openResource(kind: string, args?: OpenResourceArgs): MountHandle | null;
|
|
65
|
+
close(key: string, opts?: {
|
|
66
|
+
reason?: string;
|
|
67
|
+
}): void;
|
|
68
|
+
focus(key: string): void;
|
|
69
|
+
listAt(surface: SurfaceName): ResolvedMount[];
|
|
70
|
+
move(opts: {
|
|
71
|
+
key: string;
|
|
72
|
+
toSurface: SurfaceName;
|
|
73
|
+
fromSurface?: SurfaceName;
|
|
74
|
+
}): void;
|
|
75
|
+
}
|
|
76
|
+
export interface OpenResourceOptions {
|
|
77
|
+
surface?: SurfaceName;
|
|
78
|
+
mountKey?: string;
|
|
79
|
+
title?: Label;
|
|
80
|
+
dataContext?: `$/${string}`;
|
|
81
|
+
focus?: boolean;
|
|
82
|
+
}
|
|
83
|
+
export interface OpenResourceArgs {
|
|
84
|
+
resourceId?: string;
|
|
85
|
+
options?: OpenResourceOptions;
|
|
86
|
+
extraProps?: Record<string, unknown>;
|
|
87
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SurfaceName } from './mount-surface.js';
|
|
2
|
+
export type PermissionPath = `$/${string}`;
|
|
3
|
+
export interface Permissions {
|
|
4
|
+
read?: PermissionPath[];
|
|
5
|
+
write?: PermissionPath[];
|
|
6
|
+
commands?: string[];
|
|
7
|
+
surfaces?: SurfaceName[];
|
|
8
|
+
registerComponents?: boolean;
|
|
9
|
+
registerConverters?: boolean;
|
|
10
|
+
registerLayouts?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type PermissionKind = 'read' | 'write' | 'command' | 'surface' | 'register';
|
|
13
|
+
export interface PermissionEngine {
|
|
14
|
+
allows(sourceId: string, kind: PermissionKind, target?: string): boolean;
|
|
15
|
+
grant(sourceId: string, permissions: Permissions): void;
|
|
16
|
+
revoke(sourceId: string): void;
|
|
17
|
+
permissionsFor(sourceId: string): Permissions | undefined;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type WhereOp = 'eq' | 'ne' | 'contains' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
|
|
2
|
+
export interface WhereClause {
|
|
3
|
+
field: string;
|
|
4
|
+
op: WhereOp;
|
|
5
|
+
value: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface Query {
|
|
8
|
+
q?: string;
|
|
9
|
+
where?: WhereClause[];
|
|
10
|
+
page: number;
|
|
11
|
+
pageSize: number;
|
|
12
|
+
sort?: {
|
|
13
|
+
field: string;
|
|
14
|
+
dir: 'asc' | 'desc';
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface ListView {
|
|
18
|
+
ids: string[];
|
|
19
|
+
total: number;
|
|
20
|
+
loading: boolean;
|
|
21
|
+
error?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ResourceApi {
|
|
24
|
+
list: string;
|
|
25
|
+
one?: (id: string) => string;
|
|
26
|
+
pagination?: 'offset' | 'page' | false;
|
|
27
|
+
search?: 'q' | false;
|
|
28
|
+
filter?: 'where' | false;
|
|
29
|
+
sort?: boolean;
|
|
30
|
+
response?: 'array' | {
|
|
31
|
+
items: string;
|
|
32
|
+
total: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// List/query model — shared by the Pagination/Filter components and the
|
|
2
|
+
// app's resource data providers. A list is a query → view window, NOT
|
|
3
|
+
// "load everything": $/<ns>/query drives $/<ns>/view (ids + total). Server
|
|
4
|
+
// capabilities are declared per-resource (ResourceApi); unsupported bits are
|
|
5
|
+
// applied client-side, so flipping a resource to server-paged later is a
|
|
6
|
+
// provider-internal change with no UI impact.
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Disposable } from './disposable.js';
|
|
2
|
+
import type { BindingPath } from './component-graph.js';
|
|
3
|
+
export type ScopeName = 'local' | 'page' | 'workspace' | 'global' | 'summary' | 'active' | 'ui' | 'layout' | `plugins.${string}` | (string & {});
|
|
4
|
+
export type ComputedDefinition = {
|
|
5
|
+
from: BindingPath[];
|
|
6
|
+
select: string;
|
|
7
|
+
} | {
|
|
8
|
+
from: BindingPath[];
|
|
9
|
+
select: (values: Record<string, unknown>) => unknown;
|
|
10
|
+
};
|
|
11
|
+
export interface SocketBridge {
|
|
12
|
+
on(event: string, fn: (payload: unknown) => void): Disposable;
|
|
13
|
+
off(event: string, fn: (payload: unknown) => void): void;
|
|
14
|
+
offAll(events: string[]): void;
|
|
15
|
+
emit(event: string, payload?: unknown): void;
|
|
16
|
+
}
|
|
17
|
+
export interface DataProviderDefinition {
|
|
18
|
+
namespace: string;
|
|
19
|
+
load?: 'lazy' | 'eager';
|
|
20
|
+
unloadAfter?: string | number;
|
|
21
|
+
provider: {
|
|
22
|
+
load(store: ReactiveStore, socket: SocketBridge): Promise<void> | void;
|
|
23
|
+
unload?(store: ReactiveStore, socket: SocketBridge): Promise<void> | void;
|
|
24
|
+
loadOne?(id: string): Promise<unknown>;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface ReactiveStore {
|
|
28
|
+
get<T = unknown>(path: BindingPath): T | undefined;
|
|
29
|
+
set(path: BindingPath, value: unknown): void;
|
|
30
|
+
patch(path: BindingPath, partial: Record<string, unknown>): void;
|
|
31
|
+
patchMany(entries: Record<string, unknown>): void;
|
|
32
|
+
delete(path: BindingPath): void;
|
|
33
|
+
clearNamespace(scope: ScopeName | string): void;
|
|
34
|
+
subscribe(path: BindingPath, fn: (value: unknown) => void): Disposable;
|
|
35
|
+
subscriberCount(scope: ScopeName | string): number;
|
|
36
|
+
computed(path: BindingPath, def: ComputedDefinition): Disposable;
|
|
37
|
+
registerDataProvider(def: DataProviderDefinition): Disposable;
|
|
38
|
+
listDataProviders(): DataProviderDefinition[];
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Disposable } from './disposable.js';
|
|
2
|
+
import type { BindingPath } from './component-graph.js';
|
|
3
|
+
import type { ComponentRegistry } from './component-registry.js';
|
|
4
|
+
import type { ReactiveStore, SocketBridge } from './reactive-store.js';
|
|
5
|
+
import type { BindingResolver } from './binding-resolver.js';
|
|
6
|
+
import type { MountSurfaceRegistry, SurfaceName } from './mount-surface.js';
|
|
7
|
+
import type { MountMenuRegistry } from './mount-menu.js';
|
|
8
|
+
import type { ConverterRegistry } from './converter-registry.js';
|
|
9
|
+
import type { PermissionEngine } from './permissions.js';
|
|
10
|
+
import type { CommandRegistry } from './command.js';
|
|
11
|
+
import type { KeybindingRegistry } from './keybinding.js';
|
|
12
|
+
import type { ShellRegistry } from './shell.js';
|
|
13
|
+
import type { LayoutAPI, LayoutRegistry, LayoutStorage, ScenaLayout } from './layout.js';
|
|
14
|
+
import type { SessionAPI, SessionStorage } from './session.js';
|
|
15
|
+
import type { ManifestAPI } from './manifest.js';
|
|
16
|
+
import type { EventBus } from './events.js';
|
|
17
|
+
import type { WhenEngine, ContextValue } from './when.js';
|
|
18
|
+
import type { ScopeBackendFactory } from './scope-backend.js';
|
|
19
|
+
export interface Scena extends Disposable {
|
|
20
|
+
components: ComponentRegistry;
|
|
21
|
+
store: ReactiveStore;
|
|
22
|
+
bindings: BindingResolver;
|
|
23
|
+
surfaces: MountSurfaceRegistry;
|
|
24
|
+
mountMenus: MountMenuRegistry;
|
|
25
|
+
layouts: LayoutRegistry;
|
|
26
|
+
converters: ConverterRegistry;
|
|
27
|
+
permissions: PermissionEngine;
|
|
28
|
+
commands: CommandRegistry;
|
|
29
|
+
keybindings: KeybindingRegistry;
|
|
30
|
+
shells: ShellRegistry;
|
|
31
|
+
layout: LayoutAPI;
|
|
32
|
+
session: SessionAPI;
|
|
33
|
+
manifest: ManifestAPI;
|
|
34
|
+
events: EventBus;
|
|
35
|
+
when: WhenEngine;
|
|
36
|
+
open: MountSurfaceRegistry['open'];
|
|
37
|
+
openResource: MountSurfaceRegistry['openResource'];
|
|
38
|
+
execute: CommandRegistry['execute'];
|
|
39
|
+
setSessionStorage(s: SessionStorage | null): void;
|
|
40
|
+
setLayoutStorage(s: LayoutStorage | null): void;
|
|
41
|
+
}
|
|
42
|
+
export interface CreateScenaOptions {
|
|
43
|
+
initialActive?: Record<BindingPath, ContextValue>;
|
|
44
|
+
sessionStorage?: SessionStorage;
|
|
45
|
+
layoutStorage?: LayoutStorage;
|
|
46
|
+
events?: EventBus;
|
|
47
|
+
defaultSurface?: SurfaceName;
|
|
48
|
+
initialLayout?: ScenaLayout;
|
|
49
|
+
initialShellId?: string;
|
|
50
|
+
backendFactories?: ScopeBackendFactory[];
|
|
51
|
+
socket?: SocketBridge;
|
|
52
|
+
}
|
|
53
|
+
export type CreateScena = (opts?: CreateScenaOptions) => Scena;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Disposable } from './disposable.js';
|
|
2
|
+
import type { BindingPath } from './component-graph.js';
|
|
3
|
+
export interface ScopeBackend {
|
|
4
|
+
get(segments: string[]): {
|
|
5
|
+
hasValue: boolean;
|
|
6
|
+
value: unknown;
|
|
7
|
+
};
|
|
8
|
+
set(segments: string[], value: unknown): void;
|
|
9
|
+
delete(segments: string[]): void;
|
|
10
|
+
clear(): void;
|
|
11
|
+
attach?(emit: (path: BindingPath, value: unknown) => void): Disposable;
|
|
12
|
+
}
|
|
13
|
+
export interface ScopeBackendFactory {
|
|
14
|
+
scope: string;
|
|
15
|
+
create(): ScopeBackend;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ComponentNode, BindingPath } from './component-graph.js';
|
|
2
|
+
import type { Disposable } from './disposable.js';
|
|
3
|
+
import type { SurfaceName, MountHandle } from './mount-surface.js';
|
|
4
|
+
import type { ContextValue } from './when.js';
|
|
5
|
+
export interface SessionMount {
|
|
6
|
+
key: string;
|
|
7
|
+
surface: SurfaceName;
|
|
8
|
+
component: ComponentNode;
|
|
9
|
+
state: Record<string, unknown>;
|
|
10
|
+
openedAt: number;
|
|
11
|
+
}
|
|
12
|
+
export interface SurfaceState {
|
|
13
|
+
visible?: boolean;
|
|
14
|
+
activeKey?: string;
|
|
15
|
+
order?: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface SessionSnapshot {
|
|
18
|
+
version: 1;
|
|
19
|
+
capturedAt: number;
|
|
20
|
+
mounts: SessionMount[];
|
|
21
|
+
surfaces: Partial<Record<SurfaceName, SurfaceState>>;
|
|
22
|
+
persistedContext?: Record<BindingPath, ContextValue>;
|
|
23
|
+
}
|
|
24
|
+
export interface SessionStorage {
|
|
25
|
+
load(): Promise<SessionSnapshot | null>;
|
|
26
|
+
save(snapshot: SessionSnapshot): Promise<void>;
|
|
27
|
+
clear(): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
export interface SessionAPI {
|
|
30
|
+
snapshot(): SessionSnapshot;
|
|
31
|
+
restore(snapshot: SessionSnapshot): Promise<{
|
|
32
|
+
restored: MountHandle[];
|
|
33
|
+
skipped: SessionMount[];
|
|
34
|
+
}>;
|
|
35
|
+
save(): Promise<void>;
|
|
36
|
+
enableAutoPersist(opts?: {
|
|
37
|
+
debounceMs?: number;
|
|
38
|
+
}): Disposable;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Disposable } from './disposable.js';
|
|
2
|
+
import type { ScenaLayout } from './layout.js';
|
|
3
|
+
import type { SurfaceName } from './mount-surface.js';
|
|
4
|
+
import type { Scena } from './scena.js';
|
|
5
|
+
export interface ShellProps {
|
|
6
|
+
scena: Scena;
|
|
7
|
+
layout: ScenaLayout;
|
|
8
|
+
renderSurface(surface: SurfaceName): unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface ShellDefinition {
|
|
11
|
+
id: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
component: unknown;
|
|
14
|
+
}
|
|
15
|
+
export interface ShellRegistry {
|
|
16
|
+
register(def: ShellDefinition): Disposable;
|
|
17
|
+
unregister(id: string): void;
|
|
18
|
+
list(): ShellDefinition[];
|
|
19
|
+
setActive(id: string): void;
|
|
20
|
+
getActive(): ShellDefinition | null;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Disposable } from './disposable.js';
|
|
2
|
+
import type { BindingPath } from './component-graph.js';
|
|
3
|
+
export type ContextValue = unknown;
|
|
4
|
+
export type ContextSnapshot = Partial<Record<BindingPath, ContextValue>>;
|
|
5
|
+
export type WhenClause = string | ((ctx: ContextSnapshot) => boolean);
|
|
6
|
+
export interface WhenEngine {
|
|
7
|
+
evaluate(clause: WhenClause, ctx?: ContextSnapshot): boolean;
|
|
8
|
+
watch(clause: WhenClause, fn: (value: boolean) => void): Disposable;
|
|
9
|
+
dependencies(clause: WhenClause): BindingPath[];
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { Label } from '../types/label.js';
|
|
3
|
+
export declare function labelText(label?: Label): string;
|
|
4
|
+
export type StyleJustify = 'start' | 'center' | 'end' | 'spaceAround' | 'spaceBetween' | 'spaceEvenly' | 'stretch' | 'space-around' | 'space-between';
|
|
5
|
+
export type StyleAlign = 'start' | 'center' | 'end' | 'stretch';
|
|
6
|
+
export declare function mapJustify(j?: StyleJustify, def?: CSSProperties['justifyContent']): CSSProperties['justifyContent'];
|
|
7
|
+
export declare function mapAlign(a?: StyleAlign, def?: CSSProperties['alignItems']): CSSProperties['alignItems'];
|
|
8
|
+
export declare function weightStyle(weight?: number): CSSProperties;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { resolveLabel } from '../core/label.js';
|
|
2
|
+
import { translate } from '../i18n/registry.js';
|
|
3
|
+
// Resolve a Label (string | { t }) to a plain string for non-reactive contexts.
|
|
4
|
+
// `{ path }` titles are resolved reactively by the layout headers via
|
|
5
|
+
// MountTitle / useMountTitle (which descend + subscribe against the mount's
|
|
6
|
+
// dataContext); this only covers the literal / `{ t }` cases.
|
|
7
|
+
export function labelText(label) {
|
|
8
|
+
return resolveLabel(label, { get: () => undefined, translate });
|
|
9
|
+
}
|
|
10
|
+
export function mapJustify(j, def) {
|
|
11
|
+
switch (j) {
|
|
12
|
+
case 'center':
|
|
13
|
+
return 'center';
|
|
14
|
+
case 'end':
|
|
15
|
+
return 'flex-end';
|
|
16
|
+
case 'spaceAround':
|
|
17
|
+
case 'space-around':
|
|
18
|
+
return 'space-around';
|
|
19
|
+
case 'spaceBetween':
|
|
20
|
+
case 'space-between':
|
|
21
|
+
return 'space-between';
|
|
22
|
+
case 'spaceEvenly':
|
|
23
|
+
return 'space-evenly';
|
|
24
|
+
case 'stretch':
|
|
25
|
+
return 'stretch';
|
|
26
|
+
case 'start':
|
|
27
|
+
return 'flex-start';
|
|
28
|
+
default:
|
|
29
|
+
return def ?? 'flex-start';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export function mapAlign(a, def) {
|
|
33
|
+
switch (a) {
|
|
34
|
+
case 'start':
|
|
35
|
+
return 'flex-start';
|
|
36
|
+
case 'center':
|
|
37
|
+
return 'center';
|
|
38
|
+
case 'end':
|
|
39
|
+
return 'flex-end';
|
|
40
|
+
case 'stretch':
|
|
41
|
+
return 'stretch';
|
|
42
|
+
default:
|
|
43
|
+
return def;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// a2ui CatalogComponentCommon.weight → CSS flex-grow with min-* guards so a
|
|
47
|
+
// weighted child can shrink below its intrinsic content. Returns {} when
|
|
48
|
+
// weight is unset so callers can spread unconditionally.
|
|
49
|
+
export function weightStyle(weight) {
|
|
50
|
+
if (typeof weight !== 'number')
|
|
51
|
+
return {};
|
|
52
|
+
return { flex: `${weight}`, minWidth: 0, minHeight: 0 };
|
|
53
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
2
|
+
import type { CampusMappaNode } from './types.js';
|
|
3
|
+
export interface CampusMappaProps {
|
|
4
|
+
nodes: CampusMappaNode[];
|
|
5
|
+
onJumpTo(worldX: number, worldY: number): void;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
padding?: number;
|
|
9
|
+
anchor?: {
|
|
10
|
+
top?: number;
|
|
11
|
+
right?: number;
|
|
12
|
+
bottom?: number;
|
|
13
|
+
left?: number;
|
|
14
|
+
};
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
export declare function CampusMappa({ nodes, onJumpTo, width, height, padding, anchor, className, style, }: CampusMappaProps): import("react").JSX.Element | null;
|