@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,62 @@
|
|
|
1
|
+
import type { Disposable } from './disposable.js';
|
|
2
|
+
import type { WhenClause } from './when.js';
|
|
3
|
+
import type { EventBus } from './events.js';
|
|
4
|
+
import type { ReactiveStore } from './reactive-store.js';
|
|
5
|
+
import type { MountSurfaceRegistry } from './mount-surface.js';
|
|
6
|
+
import type { BindingPath } from './component-graph.js';
|
|
7
|
+
import type { Scena } from './scena.js';
|
|
8
|
+
import type { ResourceColor } from './colors.js';
|
|
9
|
+
import type { HostCtx } from './host.js';
|
|
10
|
+
export type CommandSource = 'palette' | 'menu' | 'keybinding' | 'graph' | 'programmatic';
|
|
11
|
+
export type ArgType = 'string' | 'string?' | 'number' | 'number?' | 'boolean' | 'boolean?' | readonly string[];
|
|
12
|
+
export type ArgsSchema = Record<string, ArgType>;
|
|
13
|
+
export interface CommandContext {
|
|
14
|
+
scena: Scena;
|
|
15
|
+
store: ReactiveStore;
|
|
16
|
+
surfaces: MountSurfaceRegistry;
|
|
17
|
+
commands: CommandRegistry;
|
|
18
|
+
events: EventBus;
|
|
19
|
+
source: CommandSource;
|
|
20
|
+
dataContext?: BindingPath;
|
|
21
|
+
host?: HostCtx;
|
|
22
|
+
}
|
|
23
|
+
export interface ExecuteOpts {
|
|
24
|
+
source?: CommandSource;
|
|
25
|
+
dataContext?: BindingPath;
|
|
26
|
+
host?: HostCtx;
|
|
27
|
+
}
|
|
28
|
+
export interface Command<TArgs = unknown> {
|
|
29
|
+
id: string;
|
|
30
|
+
title: string | ((ctx?: CommandContext) => string);
|
|
31
|
+
description?: string | ((ctx?: CommandContext) => string);
|
|
32
|
+
category?: string;
|
|
33
|
+
icon?: string;
|
|
34
|
+
color?: ResourceColor;
|
|
35
|
+
keywords?: string[];
|
|
36
|
+
shortcut?: string | string[];
|
|
37
|
+
keys?: string | string[];
|
|
38
|
+
slots?: string[];
|
|
39
|
+
active?: (ctx: CommandContext) => boolean;
|
|
40
|
+
disabled?: (ctx: CommandContext) => boolean;
|
|
41
|
+
when?: WhenClause;
|
|
42
|
+
acceptsQuery?: boolean;
|
|
43
|
+
submenu?: () => Promise<Command[]>;
|
|
44
|
+
args?: ArgsSchema;
|
|
45
|
+
dispatch?: 'client' | 'remote' | 'either';
|
|
46
|
+
run?: (ctx: CommandContext, args?: TArgs) => unknown | Promise<unknown>;
|
|
47
|
+
}
|
|
48
|
+
export interface CommandListFilter {
|
|
49
|
+
category?: string;
|
|
50
|
+
enabled?: boolean;
|
|
51
|
+
slot?: string | string[];
|
|
52
|
+
q?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface CommandRegistry {
|
|
55
|
+
register<TArgs>(cmd: Command<TArgs>): Disposable;
|
|
56
|
+
unregister(id: string): void;
|
|
57
|
+
get(id: string): Command | undefined;
|
|
58
|
+
list(filter?: CommandListFilter): Command[];
|
|
59
|
+
listEnabled(filter?: Omit<CommandListFilter, 'enabled'>): Command[];
|
|
60
|
+
execute(id: string, args?: unknown, opts?: ExecuteOpts): Promise<unknown>;
|
|
61
|
+
executeFrom(source: CommandSource, id: string, args?: unknown, opts?: Omit<ExecuteOpts, 'source'>): Promise<unknown>;
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export type NodeId = string;
|
|
2
|
+
export type BindingPath = `$/${string}` | `/${string}`;
|
|
3
|
+
export type DataBinding = {
|
|
4
|
+
path: BindingPath;
|
|
5
|
+
};
|
|
6
|
+
export type FunctionCall = {
|
|
7
|
+
call: string;
|
|
8
|
+
args?: Record<string, PropValue>;
|
|
9
|
+
callableFrom?: 'clientOnly';
|
|
10
|
+
returnType?: string;
|
|
11
|
+
};
|
|
12
|
+
export type DynamicValue = string | number | boolean | string[] | DataBinding | FunctionCall;
|
|
13
|
+
export type DynamicString = string | DataBinding | FunctionCall;
|
|
14
|
+
export type DynamicNumber = number | DataBinding | FunctionCall;
|
|
15
|
+
export type DynamicBoolean = boolean | DataBinding | FunctionCall;
|
|
16
|
+
export type DynamicStringList = string[] | DataBinding | FunctionCall;
|
|
17
|
+
export type ChildList = ComponentNode[] | {
|
|
18
|
+
template: ComponentNode;
|
|
19
|
+
path: BindingPath;
|
|
20
|
+
};
|
|
21
|
+
export type Action = {
|
|
22
|
+
event: {
|
|
23
|
+
name: string;
|
|
24
|
+
context?: Record<string, PropValue>;
|
|
25
|
+
wantResponse?: boolean;
|
|
26
|
+
responsePath?: BindingPath;
|
|
27
|
+
};
|
|
28
|
+
} | {
|
|
29
|
+
functionCall: FunctionCall;
|
|
30
|
+
};
|
|
31
|
+
export type CheckRule = {
|
|
32
|
+
condition: DynamicBoolean;
|
|
33
|
+
message?: DynamicString;
|
|
34
|
+
};
|
|
35
|
+
export type Checkable = {
|
|
36
|
+
checks?: CheckRule[];
|
|
37
|
+
};
|
|
38
|
+
export type AccessibilityAttributes = {
|
|
39
|
+
label?: DynamicString;
|
|
40
|
+
description?: DynamicString;
|
|
41
|
+
};
|
|
42
|
+
export type PropValue = string | number | boolean | null | DataBinding | FunctionCall | Action | ComponentNode | ComponentNode[] | {
|
|
43
|
+
template: ComponentNode;
|
|
44
|
+
path: BindingPath;
|
|
45
|
+
} | {
|
|
46
|
+
[k: string]: PropValue;
|
|
47
|
+
} | PropValue[];
|
|
48
|
+
export type NodeMeta = {
|
|
49
|
+
origin?: {
|
|
50
|
+
format: string;
|
|
51
|
+
version?: string;
|
|
52
|
+
sourceNodeId?: NodeId;
|
|
53
|
+
};
|
|
54
|
+
fallback?: ComponentNode;
|
|
55
|
+
};
|
|
56
|
+
export type ComponentNode = {
|
|
57
|
+
id?: NodeId;
|
|
58
|
+
component: string;
|
|
59
|
+
$meta?: NodeMeta;
|
|
60
|
+
child?: PropValue | unknown;
|
|
61
|
+
children?: PropValue | unknown;
|
|
62
|
+
[prop: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
export type PageState = ComponentNode;
|
|
65
|
+
export declare function isComponentNode(v: unknown): v is ComponentNode;
|
|
66
|
+
export declare function isDataBinding(v: unknown): v is DataBinding;
|
|
67
|
+
export declare function isFunctionCall(v: unknown): v is FunctionCall;
|
|
68
|
+
export declare function isAction(v: unknown): v is Action;
|
|
69
|
+
export declare function isDynamicChildList(v: unknown): v is {
|
|
70
|
+
template: ComponentNode;
|
|
71
|
+
path: BindingPath;
|
|
72
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// a2ui v0.10 component graph types.
|
|
2
|
+
//
|
|
3
|
+
// A page IS its root ComponentNode. Children are nested inline as ComponentNode
|
|
4
|
+
// values on `child` / `children` props (no flat-by-id map, no slots bag).
|
|
5
|
+
// Three structural keys are reserved on every node: `id`, `component`, `$meta`.
|
|
6
|
+
export function isComponentNode(v) {
|
|
7
|
+
return (typeof v === 'object' &&
|
|
8
|
+
v !== null &&
|
|
9
|
+
'component' in v &&
|
|
10
|
+
typeof v.component === 'string');
|
|
11
|
+
}
|
|
12
|
+
export function isDataBinding(v) {
|
|
13
|
+
return (typeof v === 'object' &&
|
|
14
|
+
v !== null &&
|
|
15
|
+
'path' in v &&
|
|
16
|
+
typeof v.path === 'string' &&
|
|
17
|
+
!('component' in v) &&
|
|
18
|
+
!('template' in v) &&
|
|
19
|
+
!('componentId' in v));
|
|
20
|
+
}
|
|
21
|
+
export function isFunctionCall(v) {
|
|
22
|
+
return (typeof v === 'object' &&
|
|
23
|
+
v !== null &&
|
|
24
|
+
'call' in v &&
|
|
25
|
+
typeof v.call === 'string' &&
|
|
26
|
+
!('component' in v));
|
|
27
|
+
}
|
|
28
|
+
export function isAction(v) {
|
|
29
|
+
return (typeof v === 'object' &&
|
|
30
|
+
v !== null &&
|
|
31
|
+
('event' in v || 'functionCall' in v) &&
|
|
32
|
+
!('component' in v));
|
|
33
|
+
}
|
|
34
|
+
export function isDynamicChildList(v) {
|
|
35
|
+
return (typeof v === 'object' &&
|
|
36
|
+
v !== null &&
|
|
37
|
+
'template' in v &&
|
|
38
|
+
'path' in v &&
|
|
39
|
+
isComponentNode(v.template));
|
|
40
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { Disposable } from './disposable.js';
|
|
2
|
+
import type { BindingPath, ComponentNode } from './component-graph.js';
|
|
3
|
+
import type { WhenClause } from './when.js';
|
|
4
|
+
import type { ResourceColor } from './colors.js';
|
|
5
|
+
import type { MountDisplay, SurfaceName } from './mount-surface.js';
|
|
6
|
+
import type { ReactiveStore } from './reactive-store.js';
|
|
7
|
+
import type { Scena } from './scena.js';
|
|
8
|
+
import type { Label } from './label.js';
|
|
9
|
+
export type ComponentCategory = 'chrome' | 'page' | 'inline' | 'statusbar' | 'picker';
|
|
10
|
+
export interface ComponentOpensSpec {
|
|
11
|
+
resourceKinds?: string[];
|
|
12
|
+
selector?: WhenClause;
|
|
13
|
+
title?: Label;
|
|
14
|
+
icon?: string;
|
|
15
|
+
color?: ResourceColor;
|
|
16
|
+
priority?: number;
|
|
17
|
+
preferredSurface?: SurfaceName;
|
|
18
|
+
namespace?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ComponentMountContext {
|
|
21
|
+
scena: Scena;
|
|
22
|
+
store: ReactiveStore;
|
|
23
|
+
mountKey: string | null;
|
|
24
|
+
dataContext?: BindingPath;
|
|
25
|
+
}
|
|
26
|
+
export type ComponentMountHandler = (ctx: ComponentMountContext) => (() => void) | void;
|
|
27
|
+
export type PropsSchema = Record<string, string | readonly string[]>;
|
|
28
|
+
export interface EditorMetadata {
|
|
29
|
+
insertable?: boolean;
|
|
30
|
+
acceptsChildren?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export type RendererKind = {
|
|
33
|
+
kind: 'react';
|
|
34
|
+
load: () => Promise<{
|
|
35
|
+
default: unknown;
|
|
36
|
+
}>;
|
|
37
|
+
} | {
|
|
38
|
+
kind: 'template';
|
|
39
|
+
template: ComponentNode;
|
|
40
|
+
} | {
|
|
41
|
+
kind: 'html';
|
|
42
|
+
mount: (host: HTMLElement, props: unknown) => Disposable;
|
|
43
|
+
};
|
|
44
|
+
export interface ComponentDefinition {
|
|
45
|
+
component: string;
|
|
46
|
+
renderer: RendererKind;
|
|
47
|
+
propsSchema?: PropsSchema;
|
|
48
|
+
category?: ComponentCategory;
|
|
49
|
+
editor?: EditorMetadata;
|
|
50
|
+
fallback?: ComponentNode;
|
|
51
|
+
onMount?: ComponentMountHandler;
|
|
52
|
+
opens?: ComponentOpensSpec;
|
|
53
|
+
props?: MountDisplay;
|
|
54
|
+
}
|
|
55
|
+
export interface ResolvedRenderer {
|
|
56
|
+
component: string;
|
|
57
|
+
renderer: RendererKind;
|
|
58
|
+
definition: ComponentDefinition;
|
|
59
|
+
}
|
|
60
|
+
export interface ComponentRegistry {
|
|
61
|
+
register(def: ComponentDefinition): Disposable;
|
|
62
|
+
unregister(component: string): void;
|
|
63
|
+
get(component: string): ComponentDefinition | undefined;
|
|
64
|
+
list(): ComponentDefinition[];
|
|
65
|
+
findOpeners(resourceKind: string): ComponentDefinition[];
|
|
66
|
+
resolve(component: string, options?: {
|
|
67
|
+
timeoutMs?: number;
|
|
68
|
+
}): Promise<ResolvedRenderer>;
|
|
69
|
+
pending(): string[];
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentNode } from './component-graph.js';
|
|
2
|
+
import type { Disposable } from './disposable.js';
|
|
3
|
+
export type SchemaMatcher = {
|
|
4
|
+
header: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
} | ((input: unknown) => boolean);
|
|
7
|
+
export interface Converter {
|
|
8
|
+
id: string;
|
|
9
|
+
accepts: SchemaMatcher;
|
|
10
|
+
translate(input: unknown): ComponentNode;
|
|
11
|
+
}
|
|
12
|
+
export interface ConverterRegistry {
|
|
13
|
+
register(converter: Converter): Disposable;
|
|
14
|
+
unregister(id: string): void;
|
|
15
|
+
list(): Converter[];
|
|
16
|
+
translate(input: unknown): ComponentNode;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { Disposable } from './disposable.js';
|
|
2
|
+
import type { ComponentNode, PropValue, BindingPath } from './component-graph.js';
|
|
3
|
+
import type { SurfaceName } from './mount-surface.js';
|
|
4
|
+
import type { ScenaLayout } from './layout.js';
|
|
5
|
+
export type ScenaSystemEvent = 'scena:mount:opened' | 'scena:mount:closed' | 'scena:mount:focused' | 'scena:mount:blurred' | 'scena:registry:changed' | 'scena:store:changed' | 'scena:menu:changed' | 'scena:layout:changed' | 'scena:shell:changed' | 'scena:plugin:contributed' | 'scena:plugin:unloaded' | 'scena:session:skipped' | 'scena:converter:applied' | 'scena:permission:denied' | 'scena:action:event';
|
|
6
|
+
export interface ScenaEventMap {
|
|
7
|
+
'scena:mount:opened': {
|
|
8
|
+
key: string;
|
|
9
|
+
surface: SurfaceName;
|
|
10
|
+
component: ComponentNode;
|
|
11
|
+
};
|
|
12
|
+
'scena:mount:closed': {
|
|
13
|
+
key: string;
|
|
14
|
+
reason?: string;
|
|
15
|
+
};
|
|
16
|
+
'scena:mount:focused': {
|
|
17
|
+
key: string;
|
|
18
|
+
surface: SurfaceName;
|
|
19
|
+
};
|
|
20
|
+
'scena:mount:blurred': {
|
|
21
|
+
key: string;
|
|
22
|
+
surface: SurfaceName;
|
|
23
|
+
};
|
|
24
|
+
'scena:registry:changed': {
|
|
25
|
+
registry: 'components' | 'commands' | 'converters' | 'menus' | 'keybindings' | 'shells' | 'layouts';
|
|
26
|
+
};
|
|
27
|
+
'scena:store:changed': {
|
|
28
|
+
path: string;
|
|
29
|
+
value: unknown;
|
|
30
|
+
previous: unknown;
|
|
31
|
+
};
|
|
32
|
+
'scena:menu:changed': {
|
|
33
|
+
slot: string;
|
|
34
|
+
};
|
|
35
|
+
'scena:layout:changed': ScenaLayout;
|
|
36
|
+
'scena:shell:changed': {
|
|
37
|
+
shellId: string;
|
|
38
|
+
};
|
|
39
|
+
'scena:plugin:contributed': {
|
|
40
|
+
sourceId: string;
|
|
41
|
+
version?: string;
|
|
42
|
+
};
|
|
43
|
+
'scena:plugin:unloaded': {
|
|
44
|
+
sourceId: string;
|
|
45
|
+
};
|
|
46
|
+
'scena:session:skipped': {
|
|
47
|
+
key: string;
|
|
48
|
+
surface: SurfaceName;
|
|
49
|
+
reason: string;
|
|
50
|
+
};
|
|
51
|
+
'scena:converter:applied': {
|
|
52
|
+
converterId: string;
|
|
53
|
+
sourceFormat: string;
|
|
54
|
+
nodeId?: string;
|
|
55
|
+
};
|
|
56
|
+
'scena:permission:denied': {
|
|
57
|
+
sourceId: string;
|
|
58
|
+
kind: 'read' | 'write' | 'command' | 'surface' | 'register';
|
|
59
|
+
path?: string;
|
|
60
|
+
};
|
|
61
|
+
'scena:action:event': {
|
|
62
|
+
mountKey: string | null;
|
|
63
|
+
name: string;
|
|
64
|
+
context?: Record<string, PropValue>;
|
|
65
|
+
wantResponse?: boolean;
|
|
66
|
+
responsePath?: BindingPath;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export interface EventBus {
|
|
70
|
+
emit<K extends keyof ScenaEventMap>(event: K, payload: ScenaEventMap[K]): void;
|
|
71
|
+
emit(event: string, payload?: unknown): void;
|
|
72
|
+
on<K extends keyof ScenaEventMap>(event: K, fn: (payload: ScenaEventMap[K]) => void): Disposable;
|
|
73
|
+
on(event: string, fn: (payload: unknown) => void): Disposable;
|
|
74
|
+
off(event: string, fn: (payload: unknown) => void): void;
|
|
75
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ResourceColor } from './colors.js';
|
|
2
|
+
export interface HostCtx {
|
|
3
|
+
pushList(spec: ListSpec): void;
|
|
4
|
+
replaceList(spec: ListSpec): void;
|
|
5
|
+
openInline(componentId: string, props?: Record<string, unknown>): void;
|
|
6
|
+
openPopover(componentId: string, props?: Record<string, unknown>, anchor?: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
}): void;
|
|
10
|
+
back(): void;
|
|
11
|
+
closeMenu(): void;
|
|
12
|
+
keepOpen(): void;
|
|
13
|
+
insertAtCursor(text: string): void;
|
|
14
|
+
replaceActiveToken(replacement: string): void;
|
|
15
|
+
query: string;
|
|
16
|
+
}
|
|
17
|
+
export type PickerAction = {
|
|
18
|
+
commandId: string;
|
|
19
|
+
args?: Record<string, unknown>;
|
|
20
|
+
} | {
|
|
21
|
+
title: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
icon?: string;
|
|
24
|
+
color?: ResourceColor;
|
|
25
|
+
shortcut?: string;
|
|
26
|
+
keys?: string;
|
|
27
|
+
group?: string;
|
|
28
|
+
active?: boolean;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
onSelect(host: HostCtx): void | Promise<void>;
|
|
31
|
+
};
|
|
32
|
+
export type ListLayout = 'list' | 'info-list' | 'header-list';
|
|
33
|
+
export interface ListSpec {
|
|
34
|
+
items?: PickerAction[];
|
|
35
|
+
extraItems?: PickerAction[];
|
|
36
|
+
provider?: (host: HostCtx) => PickerAction[] | Promise<PickerAction[]>;
|
|
37
|
+
query?: {
|
|
38
|
+
slot: string | string[];
|
|
39
|
+
q?: string;
|
|
40
|
+
};
|
|
41
|
+
layout?: ListLayout;
|
|
42
|
+
rich?: boolean;
|
|
43
|
+
header?: (host: HostCtx) => unknown;
|
|
44
|
+
detail?: (host: HostCtx, focused?: PickerAction) => unknown;
|
|
45
|
+
customHeader?: (host: HostCtx) => unknown;
|
|
46
|
+
footerHints?: boolean;
|
|
47
|
+
groupOrder?: string[];
|
|
48
|
+
title?: string;
|
|
49
|
+
sentinel?: string | string[];
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from './disposable.js';
|
|
2
|
+
export * from './component-graph.js';
|
|
3
|
+
export * from './when.js';
|
|
4
|
+
export * from './reactive-store.js';
|
|
5
|
+
export * from './scope-backend.js';
|
|
6
|
+
export * from './query.js';
|
|
7
|
+
export * from './label.js';
|
|
8
|
+
export * from './binding-resolver.js';
|
|
9
|
+
export * from './mount-surface.js';
|
|
10
|
+
export * from './mount-menu.js';
|
|
11
|
+
export * from './component-registry.js';
|
|
12
|
+
export * from './converter-registry.js';
|
|
13
|
+
export * from './permissions.js';
|
|
14
|
+
export * from './events.js';
|
|
15
|
+
export * from './command.js';
|
|
16
|
+
export * from './colors.js';
|
|
17
|
+
export * from './host.js';
|
|
18
|
+
export * from './keybinding.js';
|
|
19
|
+
export * from './session.js';
|
|
20
|
+
export * from './layout.js';
|
|
21
|
+
export * from './shell.js';
|
|
22
|
+
export * from './manifest.js';
|
|
23
|
+
export * from './scena.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from './disposable.js';
|
|
2
|
+
export * from './component-graph.js';
|
|
3
|
+
export * from './when.js';
|
|
4
|
+
export * from './reactive-store.js';
|
|
5
|
+
export * from './scope-backend.js';
|
|
6
|
+
export * from './query.js';
|
|
7
|
+
export * from './label.js';
|
|
8
|
+
export * from './binding-resolver.js';
|
|
9
|
+
export * from './mount-surface.js';
|
|
10
|
+
export * from './mount-menu.js';
|
|
11
|
+
export * from './component-registry.js';
|
|
12
|
+
export * from './converter-registry.js';
|
|
13
|
+
export * from './permissions.js';
|
|
14
|
+
export * from './events.js';
|
|
15
|
+
export * from './command.js';
|
|
16
|
+
export * from './colors.js';
|
|
17
|
+
export * from './host.js';
|
|
18
|
+
export * from './keybinding.js';
|
|
19
|
+
export * from './session.js';
|
|
20
|
+
export * from './layout.js';
|
|
21
|
+
export * from './shell.js';
|
|
22
|
+
export * from './manifest.js';
|
|
23
|
+
export * from './scena.js';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Disposable } from './disposable.js';
|
|
2
|
+
import type { WhenClause } from './when.js';
|
|
3
|
+
import type { SurfaceName } from './mount-surface.js';
|
|
4
|
+
export interface KeyEventLike {
|
|
5
|
+
key: string;
|
|
6
|
+
ctrlKey?: boolean;
|
|
7
|
+
shiftKey?: boolean;
|
|
8
|
+
altKey?: boolean;
|
|
9
|
+
metaKey?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface Keybinding {
|
|
12
|
+
keys: string;
|
|
13
|
+
commandId: string;
|
|
14
|
+
args?: unknown[];
|
|
15
|
+
when?: WhenClause;
|
|
16
|
+
scope?: {
|
|
17
|
+
surfaceName?: SurfaceName;
|
|
18
|
+
viewId?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export type KeybindingResolution = {
|
|
22
|
+
kind: 'none';
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'chord-pending';
|
|
25
|
+
depth: number;
|
|
26
|
+
} | {
|
|
27
|
+
kind: 'fire';
|
|
28
|
+
commandId: string;
|
|
29
|
+
args?: unknown[];
|
|
30
|
+
};
|
|
31
|
+
export interface KeybindingRegistry {
|
|
32
|
+
register(binding: Keybinding): Disposable;
|
|
33
|
+
unregister(keys: string, commandId: string): void;
|
|
34
|
+
list(): Keybinding[];
|
|
35
|
+
resolve(event: KeyEventLike): KeybindingResolution;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { Disposable } from './disposable.js';
|
|
2
|
+
import type { SurfaceName, ResolvedMount } from './mount-surface.js';
|
|
3
|
+
import type { ReactiveStore } from './reactive-store.js';
|
|
4
|
+
export interface SpatialBounds {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
w: number;
|
|
8
|
+
h: number;
|
|
9
|
+
}
|
|
10
|
+
export type SpatialArrangement = 'cascade' | 'grid' | 'manual';
|
|
11
|
+
export interface SpatialViewport {
|
|
12
|
+
scale: number;
|
|
13
|
+
panX: number;
|
|
14
|
+
panY: number;
|
|
15
|
+
}
|
|
16
|
+
export type TabPanelNode = TabPanelLeaf | TabPanelSplit;
|
|
17
|
+
export interface TabPanelLeaf {
|
|
18
|
+
kind: 'leaf';
|
|
19
|
+
id: string;
|
|
20
|
+
tabs: string[];
|
|
21
|
+
activeKey?: string;
|
|
22
|
+
}
|
|
23
|
+
export type TabPanelDirection = 'row' | 'column';
|
|
24
|
+
export interface TabPanelSplit {
|
|
25
|
+
kind: 'split';
|
|
26
|
+
direction: TabPanelDirection;
|
|
27
|
+
ratio?: number;
|
|
28
|
+
first: TabPanelNode;
|
|
29
|
+
second: TabPanelNode;
|
|
30
|
+
}
|
|
31
|
+
export type SurfacePresentation = 'docked' | 'floating' | 'sheet' | 'bar';
|
|
32
|
+
export interface SurfaceLayoutState {
|
|
33
|
+
visible: boolean;
|
|
34
|
+
size?: number;
|
|
35
|
+
side?: 'left' | 'right' | 'top' | 'bottom';
|
|
36
|
+
layout?: string;
|
|
37
|
+
activeContainerKey?: string;
|
|
38
|
+
section?: string;
|
|
39
|
+
split?: {
|
|
40
|
+
ratios?: number[];
|
|
41
|
+
order?: string[];
|
|
42
|
+
collapsed?: string[];
|
|
43
|
+
pinned?: string[];
|
|
44
|
+
};
|
|
45
|
+
tabPanel?: {
|
|
46
|
+
tree: TabPanelNode;
|
|
47
|
+
};
|
|
48
|
+
spatial?: {
|
|
49
|
+
arrangement?: SpatialArrangement;
|
|
50
|
+
bounds?: Record<string, SpatialBounds>;
|
|
51
|
+
selectedKey?: string;
|
|
52
|
+
viewport?: SpatialViewport;
|
|
53
|
+
};
|
|
54
|
+
stack?: {
|
|
55
|
+
container?: {
|
|
56
|
+
title?: string;
|
|
57
|
+
icon?: string;
|
|
58
|
+
color?: string;
|
|
59
|
+
};
|
|
60
|
+
hidden?: string[];
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export interface ScenaLayout {
|
|
64
|
+
surfaces: Partial<Record<SurfaceName, SurfaceLayoutState>>;
|
|
65
|
+
}
|
|
66
|
+
export type DeepPartial<T> = T extends object ? {
|
|
67
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
68
|
+
} : T;
|
|
69
|
+
export interface SetSurfaceOptions {
|
|
70
|
+
transient?: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface LayoutAPI {
|
|
73
|
+
get(): ScenaLayout;
|
|
74
|
+
set(layout: ScenaLayout): void;
|
|
75
|
+
patch(patch: DeepPartial<ScenaLayout>): void;
|
|
76
|
+
setSurface(surface: SurfaceName, state: Partial<SurfaceLayoutState>, opts?: SetSurfaceOptions): void;
|
|
77
|
+
subscribe(fn: (layout: ScenaLayout) => void): Disposable;
|
|
78
|
+
}
|
|
79
|
+
export interface LayoutStorage {
|
|
80
|
+
load(): Promise<ScenaLayout | null>;
|
|
81
|
+
save(layout: ScenaLayout): Promise<void>;
|
|
82
|
+
clear(): Promise<void>;
|
|
83
|
+
}
|
|
84
|
+
export interface LayoutLifecycleContext {
|
|
85
|
+
surface: SurfaceName;
|
|
86
|
+
mounts: ResolvedMount[];
|
|
87
|
+
store: ReactiveStore;
|
|
88
|
+
previousLayoutId?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface LayoutProps {
|
|
91
|
+
surface: SurfaceName;
|
|
92
|
+
mounts: ResolvedMount[];
|
|
93
|
+
state: SurfaceLayoutState;
|
|
94
|
+
presentation?: SurfacePresentation;
|
|
95
|
+
setState(patch: Partial<SurfaceLayoutState>): void;
|
|
96
|
+
renderMount(mount: ResolvedMount): unknown;
|
|
97
|
+
onActivate(key: string): void;
|
|
98
|
+
onClose(key: string, opts?: {
|
|
99
|
+
reason?: string;
|
|
100
|
+
}): void;
|
|
101
|
+
onReorder(fromIndex: number, toIndex: number): void;
|
|
102
|
+
}
|
|
103
|
+
export interface LayoutDefinition {
|
|
104
|
+
id: string;
|
|
105
|
+
title: string;
|
|
106
|
+
component: unknown;
|
|
107
|
+
appliesTo?: SurfaceName[];
|
|
108
|
+
icon?: string;
|
|
109
|
+
onActivate?(ctx: LayoutLifecycleContext): void;
|
|
110
|
+
onDeactivate?(ctx: LayoutLifecycleContext): void;
|
|
111
|
+
}
|
|
112
|
+
export interface LayoutRegistry {
|
|
113
|
+
register(layout: LayoutDefinition): Disposable;
|
|
114
|
+
unregister(id: string): void;
|
|
115
|
+
get(id: string): LayoutDefinition | undefined;
|
|
116
|
+
list(): LayoutDefinition[];
|
|
117
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|