@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,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useId, useState } from 'react';
|
|
3
|
+
import { useWriteBack } from '../../react/mount-context.js';
|
|
4
|
+
import { weightStyle } from '../_utils.js';
|
|
5
|
+
import { Checks } from './Checks.js';
|
|
6
|
+
import { ControlLabel, ControlHint, ControlError } from './_field-parts.js';
|
|
7
|
+
import './TextField.css';
|
|
8
|
+
// function getClearId(id?: string, label?: string): string {
|
|
9
|
+
// const base = id ?? label ?? Math.random().toString(16).slice(2, 8);
|
|
10
|
+
// return base.replace(/[^a-zA-Z0-9_-]/g, '');
|
|
11
|
+
// }
|
|
12
|
+
// Bidirectional: pushes user input through useWriteBack('value'). When
|
|
13
|
+
// `value` resolved from a DataBinding, the write-back lands in the store
|
|
14
|
+
// and the next render reflects it. When `value` was a literal, write-back
|
|
15
|
+
// silently no-ops and the field keeps its internal state.
|
|
16
|
+
export function TextField({
|
|
17
|
+
// id: idProps,
|
|
18
|
+
value, defaultValue, placeholder, label, type = 'text', disabled, readOnly, multiline, rows = 3, min, max, checks, weight, hint, error, required, typeTag, onChange: onChangeProp, }) {
|
|
19
|
+
// const id = `oo-${getClearId(idProps, label)}`;
|
|
20
|
+
const id = useId();
|
|
21
|
+
const writeValue = useWriteBack('value');
|
|
22
|
+
const [internal, setInternal] = useState(value ?? defaultValue ?? '');
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (value === undefined)
|
|
25
|
+
return;
|
|
26
|
+
setInternal((current) => (current === value ? current : value));
|
|
27
|
+
}, [value]);
|
|
28
|
+
function onChange(e) {
|
|
29
|
+
const next = e.currentTarget.value;
|
|
30
|
+
setInternal(next);
|
|
31
|
+
writeValue(next);
|
|
32
|
+
onChangeProp?.(next);
|
|
33
|
+
}
|
|
34
|
+
const wrapperStyle = weightStyle(weight);
|
|
35
|
+
return (_jsxs("label", { className: "oo-field", htmlFor: id, style: wrapperStyle, children: [_jsx(ControlLabel, { label: label, required: required, typeTag: typeTag }), _jsx(ControlHint, { text: hint }), _jsx("div", { className: "oo-control", children: multiline ? (_jsx("textarea", { id: id, className: "oo-textarea", value: internal, placeholder: placeholder, disabled: disabled, readOnly: readOnly, rows: rows, onChange: onChange })) : (_jsx("input", { id: id, className: "oo-input", type: type, value: internal, placeholder: placeholder, disabled: disabled, readOnly: readOnly, onChange: onChange, min: type === 'number' ? min : undefined, max: type === 'number' ? max : undefined })) }), _jsx(ControlError, { text: error }), _jsx(Checks, { checks: checks })] }));
|
|
36
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
.oo-field {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: var(--oo-spacing-xs);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* Field chrome shared by controls. The base .oo-field / .oo-field__label live
|
|
8
|
+
in the control CSS; these are the additions for required / type / hint /
|
|
9
|
+
error so every control renders the same field metadata. */
|
|
10
|
+
|
|
11
|
+
.oo-field__label {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
align-items: baseline;
|
|
14
|
+
gap: var(--oo-spacing-xs);
|
|
15
|
+
font-size: var(--oo-font-size-sm);
|
|
16
|
+
color: var(--oo-color-text);
|
|
17
|
+
font-weight: 600;
|
|
18
|
+
}
|
|
19
|
+
.oo-field__required {
|
|
20
|
+
color: var(--oo-color-danger);
|
|
21
|
+
font-size: var(--oo-font-size-xs);
|
|
22
|
+
font-weight: 700;
|
|
23
|
+
}
|
|
24
|
+
.oo-field__type {
|
|
25
|
+
color: var(--oo-color-muted);
|
|
26
|
+
font-family: var(--oo-font-mono);
|
|
27
|
+
font-size: var(--oo-font-size-xs);
|
|
28
|
+
}
|
|
29
|
+
.oo-field__hint {
|
|
30
|
+
font-size: var(--oo-font-size-xs);
|
|
31
|
+
color: var(--oo-color-muted);
|
|
32
|
+
line-height: 1.5;
|
|
33
|
+
}
|
|
34
|
+
.oo-field__error {
|
|
35
|
+
font-size: var(--oo-font-size-xs);
|
|
36
|
+
color: var(--oo-color-danger);
|
|
37
|
+
line-height: 1.4;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
.oo-input,
|
|
42
|
+
.oo-textarea {
|
|
43
|
+
width: 100%;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
.oo-textarea {
|
|
48
|
+
resize: vertical;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.oo-control {
|
|
52
|
+
position: relative;
|
|
53
|
+
border-radius: var(--input-border-radius);
|
|
54
|
+
padding: 1px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Loading state */
|
|
58
|
+
.oo-form[data-loading='true'] {
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Moving light around input/select borders */
|
|
63
|
+
.oo-form[data-loading='true'] .oo-control {
|
|
64
|
+
background:
|
|
65
|
+
conic-gradient(from var(--oo-angle),
|
|
66
|
+
rgb(var(--load-border)) 0deg,
|
|
67
|
+
rgb(var(--load-border)) 70deg,
|
|
68
|
+
rgb(var(--load-accent) / 0.25) 95deg,
|
|
69
|
+
rgb(var(--load-accent-2)) 120deg,
|
|
70
|
+
rgb(var(--load-accent) / 0.25) 145deg,
|
|
71
|
+
rgb(var(--load-border)) 180deg,
|
|
72
|
+
rgb(var(--load-border)) 360deg);
|
|
73
|
+
animation: oo-border-orbit 1.4s linear infinite;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.oo-form[data-loading='true'] .oo-control::after {
|
|
77
|
+
content: '';
|
|
78
|
+
position: absolute;
|
|
79
|
+
inset: -3px;
|
|
80
|
+
z-index: -1;
|
|
81
|
+
border-radius: 14px;
|
|
82
|
+
background:
|
|
83
|
+
conic-gradient(from var(--oo-angle),
|
|
84
|
+
transparent,
|
|
85
|
+
rgb(var(--load-accent) / 0.32),
|
|
86
|
+
transparent 35%);
|
|
87
|
+
filter: blur(8px);
|
|
88
|
+
opacity: 0.65;
|
|
89
|
+
animation: oo-border-orbit 1.4s linear infinite;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@property --oo-angle {
|
|
93
|
+
syntax: '<angle>';
|
|
94
|
+
inherits: false;
|
|
95
|
+
initial-value: 0deg;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@keyframes oo-border-orbit {
|
|
99
|
+
to {
|
|
100
|
+
--oo-angle: 360deg;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import './_field-parts.css';
|
|
3
|
+
export interface ControlLabelProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
typeTag?: string;
|
|
7
|
+
extra?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function ControlLabel({ label, required, typeTag, extra }: ControlLabelProps): import("react").JSX.Element | null;
|
|
10
|
+
export declare function ControlHint({ text }: {
|
|
11
|
+
text?: string;
|
|
12
|
+
}): import("react").JSX.Element | null;
|
|
13
|
+
export declare function ControlError({ text }: {
|
|
14
|
+
text?: string;
|
|
15
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './_field-parts.css';
|
|
3
|
+
export function ControlLabel({ label, required, typeTag, extra }) {
|
|
4
|
+
if (!label && !extra)
|
|
5
|
+
return null;
|
|
6
|
+
return (_jsxs("span", { className: "oo-field__label", children: [label, required ? _jsx("span", { className: "oo-field__required", children: "*" }) : null, typeTag ? _jsx("span", { className: "oo-field__type", children: typeTag }) : null, extra] }));
|
|
7
|
+
}
|
|
8
|
+
export function ControlHint({ text }) {
|
|
9
|
+
if (!text)
|
|
10
|
+
return null;
|
|
11
|
+
return _jsx("span", { className: "oo-field__hint", children: text });
|
|
12
|
+
}
|
|
13
|
+
export function ControlError({ text }) {
|
|
14
|
+
if (!text)
|
|
15
|
+
return null;
|
|
16
|
+
return _jsx("span", { className: "oo-field__error", children: text });
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Catalog registration for control components (dynamic import — no eager load).
|
|
2
|
+
export const CATALOG_CONTROLS_MAP = [
|
|
3
|
+
{ component: 'Button', category: 'inline', renderer: { kind: 'react', load: () => import('./Button.js').then((m) => ({ default: m.Button })) } },
|
|
4
|
+
{ component: 'TextField', category: 'inline', renderer: { kind: 'react', load: () => import('./TextField.js').then((m) => ({ default: m.TextField })) } },
|
|
5
|
+
{ component: 'CheckBox', category: 'inline', renderer: { kind: 'react', load: () => import('./CheckBox.js').then((m) => ({ default: m.CheckBox })) } },
|
|
6
|
+
{ component: 'ChoicePicker', category: 'inline', renderer: { kind: 'react', load: () => import('./ChoicePicker.js').then((m) => ({ default: m.ChoicePicker })) } },
|
|
7
|
+
{ component: 'Slider', category: 'inline', renderer: { kind: 'react', load: () => import('./Slider.js').then((m) => ({ default: m.Slider })) } },
|
|
8
|
+
{ component: 'DateTimeInput', category: 'inline', renderer: { kind: 'react', load: () => import('./DateTimeInput.js').then((m) => ({ default: m.DateTimeInput })) } },
|
|
9
|
+
{ component: 'LocaleToggle', category: 'inline', renderer: { kind: 'react', load: () => import('./LocaleToggle.js').then((m) => ({ default: m.LocaleToggle })) } },
|
|
10
|
+
];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { Button } from './Button.js';
|
|
2
|
+
export { ReloadButton } from './ReloadButton.js';
|
|
3
|
+
export type { ReloadButtonProps } from './ReloadButton.js';
|
|
4
|
+
export { TextField } from './TextField.js';
|
|
5
|
+
export { CheckBox } from './CheckBox.js';
|
|
6
|
+
export { ChoicePicker } from './ChoicePicker.js';
|
|
7
|
+
export type { ChoiceOption } from './ChoicePicker.js';
|
|
8
|
+
export { Slider } from './Slider.js';
|
|
9
|
+
export { DateTimeInput } from './DateTimeInput.js';
|
|
10
|
+
export { Checks } from './Checks.js';
|
|
11
|
+
export type { CheckRuleResolved, ChecksProps } from './Checks.js';
|
|
12
|
+
export { LocaleToggle } from './LocaleToggle.js';
|
|
13
|
+
export type { LocaleToggleProps, LocaleToggleDisplay } from './LocaleToggle.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Direct-React re-exports for the control components. The catalog registration
|
|
2
|
+
// (dynamic-import) lives in ../catalog.ts so booting never loads these.
|
|
3
|
+
export { Button } from './Button.js';
|
|
4
|
+
export { ReloadButton } from './ReloadButton.js';
|
|
5
|
+
export { TextField } from './TextField.js';
|
|
6
|
+
export { CheckBox } from './CheckBox.js';
|
|
7
|
+
export { ChoicePicker } from './ChoicePicker.js';
|
|
8
|
+
export { Slider } from './Slider.js';
|
|
9
|
+
export { DateTimeInput } from './DateTimeInput.js';
|
|
10
|
+
export { Checks } from './Checks.js';
|
|
11
|
+
export { LocaleToggle } from './LocaleToggle.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface DataColumn {
|
|
3
|
+
key: string;
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
width?: string;
|
|
6
|
+
align?: 'left' | 'right';
|
|
7
|
+
}
|
|
8
|
+
export type DataRow = Record<string, unknown>;
|
|
9
|
+
export interface DataTableProps {
|
|
10
|
+
columns: DataColumn[];
|
|
11
|
+
rows: DataRow[];
|
|
12
|
+
rowKey?: string;
|
|
13
|
+
caption?: ReactNode;
|
|
14
|
+
selectedKey?: string | null;
|
|
15
|
+
onSelect?: (row: DataRow) => void;
|
|
16
|
+
onActivate?: (row: DataRow) => void;
|
|
17
|
+
emptyState?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare function DataTable({ columns, rows, rowKey, caption, selectedKey, onSelect, onActivate, emptyState, }: DataTableProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Listable } from './Listable.js';
|
|
3
|
+
function formatCell(value) {
|
|
4
|
+
if (value == null)
|
|
5
|
+
return '';
|
|
6
|
+
if (typeof value === 'object')
|
|
7
|
+
return JSON.stringify(value);
|
|
8
|
+
return String(value);
|
|
9
|
+
}
|
|
10
|
+
export function DataTable({ columns, rows, rowKey = 'id', caption, selectedKey, onSelect, onActivate, emptyState, }) {
|
|
11
|
+
const cols = columns.map((c) => ({
|
|
12
|
+
key: c.key,
|
|
13
|
+
label: c.label ?? c.key,
|
|
14
|
+
width: c.width,
|
|
15
|
+
align: c.align,
|
|
16
|
+
sortable: true,
|
|
17
|
+
render: (row) => formatCell(row[c.key]),
|
|
18
|
+
}));
|
|
19
|
+
return (_jsx(Listable, { items: rows, columns: cols, getKey: (row) => String(row[rowKey] ?? ''), title: caption, selectedKey: selectedKey, onSelect: onSelect, onActivate: onActivate, emptyState: emptyState }));
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { WhereOp } from '../../types/query.js';
|
|
3
|
+
export interface FilterField {
|
|
4
|
+
field: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
op?: WhereOp;
|
|
7
|
+
value?: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface FilterProps {
|
|
10
|
+
namespace: string;
|
|
11
|
+
fields?: FilterField[];
|
|
12
|
+
}
|
|
13
|
+
export declare function Filter({ namespace, fields }: FilterProps): ReactNode;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useScena } from '../../react/ScenaProvider.js';
|
|
3
|
+
import { useStore } from '../../react/hooks/useStore.js';
|
|
4
|
+
import { useI18n } from '../../react/hooks/useI18n.js';
|
|
5
|
+
// Generic search + filter bar bound to a resource's query. Writes `q` and
|
|
6
|
+
// `where[]` into `$/<ns>/query` (resetting page); the provider re-resolves the
|
|
7
|
+
// view (server params or client-applied).
|
|
8
|
+
export function Filter({ namespace, fields }) {
|
|
9
|
+
const scena = useScena();
|
|
10
|
+
const { t } = useI18n('query');
|
|
11
|
+
const query = useStore(`$/${namespace}/query`);
|
|
12
|
+
const where = query?.where ?? [];
|
|
13
|
+
const setQuery = (patch) => scena.store.set(`$/${namespace}/query`, {
|
|
14
|
+
...(query ?? { page: 1, pageSize: 50 }),
|
|
15
|
+
...patch,
|
|
16
|
+
page: 1,
|
|
17
|
+
});
|
|
18
|
+
const valueOf = (f) => f.value ?? true;
|
|
19
|
+
const isOn = (f) => where.some((w) => w.field === f.field && w.value === valueOf(f));
|
|
20
|
+
const toggle = (f) => {
|
|
21
|
+
const rest = where.filter((w) => w.field !== f.field);
|
|
22
|
+
const next = isOn(f)
|
|
23
|
+
? rest
|
|
24
|
+
: [...rest, { field: f.field, op: f.op ?? 'eq', value: valueOf(f) }];
|
|
25
|
+
setQuery({ where: next });
|
|
26
|
+
};
|
|
27
|
+
return (_jsxs("div", { style: wrap, children: [_jsx("input", { style: input, placeholder: t('search', 'Search…'), value: query?.q ?? '', onChange: (e) => setQuery({ q: e.currentTarget.value }) }), fields?.length ? (_jsx("div", { style: chips, children: fields.map((f) => (_jsx("button", { type: "button", style: { ...chip, ...(isOn(f) ? chipOn : {}) }, onClick: () => toggle(f), children: f.label ?? f.field }, f.field))) })) : null] }));
|
|
28
|
+
}
|
|
29
|
+
const wrap = { display: 'flex', flexDirection: 'column', gap: 6, padding: 8 };
|
|
30
|
+
const input = {
|
|
31
|
+
boxSizing: 'border-box',
|
|
32
|
+
width: '100%',
|
|
33
|
+
padding: '6px 8px',
|
|
34
|
+
background: 'var(--oo-color-canvas, #16181d)',
|
|
35
|
+
border: '1px solid var(--oo-color-border, #2b2f37)',
|
|
36
|
+
borderRadius: 4,
|
|
37
|
+
outline: 'none',
|
|
38
|
+
fontSize: 13,
|
|
39
|
+
color: 'var(--oo-color-text, #e6e8eb)',
|
|
40
|
+
};
|
|
41
|
+
const chips = { display: 'flex', flexWrap: 'wrap', gap: 4 };
|
|
42
|
+
const chip = {
|
|
43
|
+
appearance: 'none',
|
|
44
|
+
border: '1px solid var(--oo-color-border, #2b2f37)',
|
|
45
|
+
background: 'none',
|
|
46
|
+
borderRadius: 999,
|
|
47
|
+
padding: '2px 8px',
|
|
48
|
+
fontSize: 11,
|
|
49
|
+
cursor: 'pointer',
|
|
50
|
+
color: 'var(--oo-color-muted, #8a8f98)',
|
|
51
|
+
};
|
|
52
|
+
const chipOn = {
|
|
53
|
+
color: '#fff',
|
|
54
|
+
background: 'var(--oo-color-accent, #4c7fff)',
|
|
55
|
+
borderColor: 'var(--oo-color-accent, #4c7fff)',
|
|
56
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.oo-list {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: var(--oo-list-gap, var(--oo-spacing-sm));
|
|
4
|
+
padding: var(--oo-list-padding, 0);
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
.oo-list[data-direction='vertical'] {
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
overflow-y: auto;
|
|
10
|
+
overflow-x: hidden;
|
|
11
|
+
}
|
|
12
|
+
.oo-list[data-direction='horizontal'] {
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
overflow-x: auto;
|
|
15
|
+
overflow-y: hidden;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { type StyleAlign } from '../_utils.js';
|
|
3
|
+
import './List.css';
|
|
4
|
+
export type ListDirection = 'vertical' | 'horizontal';
|
|
5
|
+
export interface ListProps {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
direction?: ListDirection;
|
|
8
|
+
align?: StyleAlign;
|
|
9
|
+
weight?: number;
|
|
10
|
+
gap?: number | string;
|
|
11
|
+
padding?: number | string;
|
|
12
|
+
maxHeight?: number | string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
export declare function List({ children, direction, align, weight, gap, padding, maxHeight, style, }: ListProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { mapAlign, weightStyle } from '../_utils.js';
|
|
3
|
+
import './List.css';
|
|
4
|
+
// Vertical (or horizontal) scrolling container. a2ui spec children may be a
|
|
5
|
+
// static id array OR a dynamic `{path, componentId}` — both arrive here as a
|
|
6
|
+
// resolved ReactNode array because ViewMount.resolveProp expands
|
|
7
|
+
// DynamicChildList upstream. List itself stays a thin container.
|
|
8
|
+
export function List({ children, direction = 'vertical', align = 'stretch', weight, gap, padding, maxHeight, style, }) {
|
|
9
|
+
const inlineStyle = {
|
|
10
|
+
alignItems: mapAlign(align),
|
|
11
|
+
...(gap !== undefined ? { gap } : null),
|
|
12
|
+
...(padding !== undefined ? { padding } : null),
|
|
13
|
+
...(maxHeight !== undefined ? { maxHeight } : null),
|
|
14
|
+
...weightStyle(weight),
|
|
15
|
+
...style,
|
|
16
|
+
};
|
|
17
|
+
return (_jsx("div", { className: "oo-list", "data-direction": direction, style: inlineStyle, children: children }));
|
|
18
|
+
}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
.oo-listable {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
/* height: 100%; */
|
|
5
|
+
min-height: 0;
|
|
6
|
+
outline: none;
|
|
7
|
+
user-select: none;
|
|
8
|
+
font-size: var(--oo-font-size-sm);
|
|
9
|
+
color: var(--oo-color-fg);
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* A size container, so a column can reposition its cells from a stylesheet
|
|
13
|
+
* instead of from JS.
|
|
14
|
+
*
|
|
15
|
+
* The same list renders in a 300px sidebar and in `main` at 1200px, so a
|
|
16
|
+
* viewport media query would be wrong in both places at once. `@container`
|
|
17
|
+
* asks the only question that matters — how wide is this list — and answers
|
|
18
|
+
* it during a resize drag without a render:
|
|
19
|
+
*
|
|
20
|
+
* .ticket-title { grid-column: 2; }
|
|
21
|
+
* @container (max-width: 520px) {
|
|
22
|
+
* .ticket-title { grid-column: 1 / -1; grid-row: 2; }
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* `inline-size` rather than `size`: containing block size in both axes
|
|
26
|
+
* would require the list to have a height independent of its rows, which is
|
|
27
|
+
* exactly what a list of unknown length does not have.
|
|
28
|
+
*/
|
|
29
|
+
container-type: inline-size;
|
|
30
|
+
container-name: oo-listable;
|
|
31
|
+
}
|
|
32
|
+
.oo-listable:focus-visible {
|
|
33
|
+
outline: 1px solid var(--oo-color-accent);
|
|
34
|
+
outline-offset: -1px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.oo-listable__header {
|
|
38
|
+
flex: 0 0 auto;
|
|
39
|
+
padding: var(--oo-spacing-sm);
|
|
40
|
+
border-bottom: 1px solid var(--oo-color-border);
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: space-between;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: var(--oo-spacing-sm);
|
|
45
|
+
}
|
|
46
|
+
.oo-listable__title {
|
|
47
|
+
margin: 0;
|
|
48
|
+
font-size: var(--oo-font-size-xs);
|
|
49
|
+
font-weight: 700;
|
|
50
|
+
text-transform: uppercase;
|
|
51
|
+
letter-spacing: 0.06em;
|
|
52
|
+
color: var(--oo-color-muted);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.oo-listable__rows {
|
|
56
|
+
flex: 1 1 auto;
|
|
57
|
+
min-height: 0;
|
|
58
|
+
overflow: auto;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* In table mode, the rows container IS the parent grid. Head-row and each
|
|
62
|
+
* data-row are subgrids that inherit these columns — so `auto` and
|
|
63
|
+
* `minmax(0,1fr)` sizing is shared across the header and the rows.
|
|
64
|
+
* --oo-listable-template is set inline from JSX.
|
|
65
|
+
*/
|
|
66
|
+
.oo-listable[data-mode='table'] .oo-listable__rows {
|
|
67
|
+
display: grid;
|
|
68
|
+
grid-template-columns: var(--oo-listable-template);
|
|
69
|
+
grid-auto-rows: max-content;
|
|
70
|
+
align-content: start;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.oo-listable__empty {
|
|
74
|
+
flex: 1 1 auto;
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
color: var(--oo-color-muted);
|
|
79
|
+
font-size: var(--oo-font-size-xs);
|
|
80
|
+
padding: var(--oo-spacing-md);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* ── Table mode ──────────────────────────────────────────────────────── */
|
|
84
|
+
|
|
85
|
+
.oo-listable__head-row {
|
|
86
|
+
display: grid;
|
|
87
|
+
grid-template-columns: subgrid;
|
|
88
|
+
grid-column: 1 / -1;
|
|
89
|
+
position: sticky;
|
|
90
|
+
top: 0;
|
|
91
|
+
z-index: 1;
|
|
92
|
+
background: var(--oo-color-canvas);
|
|
93
|
+
border-bottom: 1px solid var(--oo-color-border);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.oo-listable__head-cell {
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
gap: 4px;
|
|
100
|
+
padding: 6px 8px;
|
|
101
|
+
font-size: var(--oo-font-size-xs);
|
|
102
|
+
font-weight: 600;
|
|
103
|
+
text-transform: uppercase;
|
|
104
|
+
letter-spacing: 0.05em;
|
|
105
|
+
color: var(--oo-color-muted);
|
|
106
|
+
white-space: nowrap;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
text-overflow: ellipsis;
|
|
109
|
+
cursor: default;
|
|
110
|
+
}
|
|
111
|
+
.oo-listable__head-cell[data-align='right'] {
|
|
112
|
+
justify-content: flex-end;
|
|
113
|
+
}
|
|
114
|
+
.oo-listable__head-cell[data-sortable='true'] {
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
}
|
|
117
|
+
.oo-listable__head-cell[data-sortable='true']:hover {
|
|
118
|
+
color: var(--oo-color-fg);
|
|
119
|
+
}
|
|
120
|
+
.oo-listable__head-cell[data-sorted] {
|
|
121
|
+
color: var(--oo-color-fg);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.oo-listable__head-label {
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
text-overflow: ellipsis;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.oo-listable__sort-arrow {
|
|
130
|
+
font-size: 9px;
|
|
131
|
+
line-height: 1;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.oo-listable__row {
|
|
135
|
+
display: grid;
|
|
136
|
+
grid-template-columns: subgrid;
|
|
137
|
+
grid-column: 1 / -1;
|
|
138
|
+
align-items: stretch;
|
|
139
|
+
border-bottom: 1px solid var(--oo-color-border);
|
|
140
|
+
cursor: default;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.oo-listable__cell {
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
padding: 6px 8px;
|
|
147
|
+
font-size: var(--oo-font-size-sm);
|
|
148
|
+
white-space: nowrap;
|
|
149
|
+
overflow: hidden;
|
|
150
|
+
text-overflow: ellipsis;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.oo-listable__cell[data-align='right'] {
|
|
154
|
+
justify-content: flex-end;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* ── List (stacked) mode ─────────────────────────────────────────────── */
|
|
158
|
+
|
|
159
|
+
.oo-listable__stack {
|
|
160
|
+
display: flex;
|
|
161
|
+
/* flex-direction: column; */
|
|
162
|
+
flex-direction: row;
|
|
163
|
+
align-items: start;
|
|
164
|
+
flex-grow: 0;
|
|
165
|
+
justify-content: space-between;
|
|
166
|
+
/* gap: 2px; */
|
|
167
|
+
gap: 6px;
|
|
168
|
+
padding: 6px 12px;
|
|
169
|
+
/* border-bottom: 1px solid var(--oo-color-border); */
|
|
170
|
+
cursor: default;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* ── List (common) mode ─────────────────────────────────────────────── */
|
|
174
|
+
|
|
175
|
+
.oo-listable__item:nth-child(even) {
|
|
176
|
+
background: rgba(0, 0, 0, 0.02);
|
|
177
|
+
}
|
|
178
|
+
.oo-listable__item:hover {
|
|
179
|
+
color: var(--oo-color-text);
|
|
180
|
+
background: var(--oo-color-hover);
|
|
181
|
+
}
|
|
182
|
+
.oo-listable__item[data-selected='true'] {
|
|
183
|
+
color: var(--oo-color-text);
|
|
184
|
+
background: var(--oo-color-hover);
|
|
185
|
+
box-shadow: inset 2px 0 0 var(--oo-color-accent);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* ── List (stacked) mode ─────────────────────────────────────────────── */
|
|
189
|
+
.oo-listable__list-cell {
|
|
190
|
+
display: flex;
|
|
191
|
+
align-items: baseline;
|
|
192
|
+
gap: 6px;
|
|
193
|
+
min-width: 0;
|
|
194
|
+
}
|
|
195
|
+
.oo-listable__list-label {
|
|
196
|
+
flex: 0 0 auto;
|
|
197
|
+
min-width: 64px;
|
|
198
|
+
font-size: 10px;
|
|
199
|
+
color: var(--oo-color-muted);
|
|
200
|
+
text-transform: uppercase;
|
|
201
|
+
letter-spacing: 0.04em;
|
|
202
|
+
}
|
|
203
|
+
.oo-listable__list-value {
|
|
204
|
+
flex: 1 1 auto;
|
|
205
|
+
min-width: 0;
|
|
206
|
+
font-size: var(--oo-font-size-sm);
|
|
207
|
+
color: var(--oo-color-fg);
|
|
208
|
+
overflow: hidden;
|
|
209
|
+
text-overflow: ellipsis;
|
|
210
|
+
white-space: nowrap;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* Track widths interpolate, so the columns either side of a moved cell close
|
|
214
|
+
* and open smoothly even though the cell itself teleports. Two conditions, and
|
|
215
|
+
* both are on the caller: the track COUNT has to hold across the change, and
|
|
216
|
+
* each track has to keep its type - px to px, fr to fr. `0` to `minmax(0,1fr)`
|
|
217
|
+
* is a type change and snaps. */
|
|
218
|
+
.oo-listable[data-mode='table'] .oo-listable__rows {
|
|
219
|
+
transition: grid-template-columns 160ms ease;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* The cell's own paint. Not position - that is discrete - but a cell arriving
|
|
223
|
+
* in a new slot reads as placed rather than teleported if its colour settles
|
|
224
|
+
* rather than cuts. */
|
|
225
|
+
.oo-listable__cell,
|
|
226
|
+
.oo-listable__head-cell {
|
|
227
|
+
transition: color 140ms ease, background-color 140ms ease, opacity 140ms ease;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* Not during a splitter drag. `containerWidth` changes every frame there, so
|
|
231
|
+
* each frame restarts the transition and the grid trails the pointer by the
|
|
232
|
+
* full duration - the exact lag the transition exists to hide. `oo-resizing`
|
|
233
|
+
* is on <html> for the length of a drag (ShellSplitter.tsx:67, and
|
|
234
|
+
* useSurfaceResize.ts:143). */
|
|
235
|
+
html.oo-resizing .oo-listable[data-mode='table'] .oo-listable__rows {
|
|
236
|
+
transition: none;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
@media (prefers-reduced-motion: reduce) {
|
|
240
|
+
.oo-listable[data-mode='table'] .oo-listable__rows,
|
|
241
|
+
.oo-listable__cell,
|
|
242
|
+
.oo-listable__head-cell {
|
|
243
|
+
transition: none;
|
|
244
|
+
}
|
|
245
|
+
}
|