@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,11 @@
|
|
|
1
|
+
export { List } from './List.js';
|
|
2
|
+
export { DataTable } from './DataTable.js';
|
|
3
|
+
export type { DataTableProps, DataColumn, DataRow } from './DataTable.js';
|
|
4
|
+
export { Tree } from './Tree.js';
|
|
5
|
+
export type { TreeProps, TreeNode } from './Tree.js';
|
|
6
|
+
export { Listable } from './Listable.js';
|
|
7
|
+
export type { ListableProps, ListableColumn, ListableCellProps, ListableTitleProps, ListableSort, ListableRenderContext, } from './Listable.js';
|
|
8
|
+
export { Pagination } from './Pagination.js';
|
|
9
|
+
export type { PaginationProps } from './Pagination.js';
|
|
10
|
+
export { Filter } from './Filter.js';
|
|
11
|
+
export type { FilterProps, FilterField } from './Filter.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Direct-React re-exports. Catalog registration lives in ../catalog.ts.
|
|
2
|
+
export { List } from './List.js';
|
|
3
|
+
export { DataTable } from './DataTable.js';
|
|
4
|
+
export { Tree } from './Tree.js';
|
|
5
|
+
export { Listable } from './Listable.js';
|
|
6
|
+
export { Pagination } from './Pagination.js';
|
|
7
|
+
export { Filter } from './Filter.js';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// A subtle full-width "add" affordance rendered AFTER an explorer list (mirrors
|
|
3
|
+
// web's AddPlaceholder). The primary New action lives in the section header;
|
|
4
|
+
// this is the convenient end-of-list shortcut.
|
|
5
|
+
export function AddPlaceholder({ label, onClick }) {
|
|
6
|
+
return (_jsxs("button", { type: "button", className: "oo-add-placeholder", onClick: onClick, style: style, children: [_jsx("span", { "aria-hidden": true, children: "\uFF0B" }), " ", label] }));
|
|
7
|
+
}
|
|
8
|
+
const style = {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
gap: 6,
|
|
12
|
+
width: '100%',
|
|
13
|
+
boxSizing: 'border-box',
|
|
14
|
+
padding: '8px 12px',
|
|
15
|
+
margin: 0,
|
|
16
|
+
background: 'transparent',
|
|
17
|
+
border: '1px dashed var(--oo-color-border, #2b2f37)',
|
|
18
|
+
borderRadius: 6,
|
|
19
|
+
color: 'var(--oo-color-muted, #8a8f98)',
|
|
20
|
+
cursor: 'pointer',
|
|
21
|
+
font: 'inherit',
|
|
22
|
+
fontSize: 'var(--oo-font-size-xs, 12px)',
|
|
23
|
+
textAlign: 'left',
|
|
24
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.oo-alert {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: flex-start;
|
|
4
|
+
gap: var(--oo-spacing-sm);
|
|
5
|
+
padding: var(--oo-spacing-md);
|
|
6
|
+
border-radius: var(--oo-radius-md, 8px);
|
|
7
|
+
font-size: var(--oo-font-size-sm);
|
|
8
|
+
line-height: 1.5;
|
|
9
|
+
background: rgb(var(--oo-color, var(--oo-color-blue)) / 0.1);
|
|
10
|
+
color: rgb(var(--oo-color, var(--oo-color-blue)));
|
|
11
|
+
border: 1px solid rgb(var(--oo-color, var(--oo-color-blue)) / 0.25);
|
|
12
|
+
}
|
|
13
|
+
.oo-alert[data-tone='info'] { --oo-color: var(--oo-color-blue); }
|
|
14
|
+
.oo-alert[data-tone='success'] { --oo-color: var(--oo-color-green); }
|
|
15
|
+
.oo-alert[data-tone='warning'] { --oo-color: var(--oo-color-amber); }
|
|
16
|
+
.oo-alert[data-tone='danger'] { --oo-color: var(--oo-color-red); }
|
|
17
|
+
.oo-alert__icon {
|
|
18
|
+
flex: 0 0 auto;
|
|
19
|
+
margin-top: 2px;
|
|
20
|
+
}
|
|
21
|
+
.oo-alert__body {
|
|
22
|
+
flex: 1 1 auto;
|
|
23
|
+
min-width: 0;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
gap: 2px;
|
|
27
|
+
color: var(--oo-color-fg);
|
|
28
|
+
}
|
|
29
|
+
.oo-alert__title {
|
|
30
|
+
color: rgb(var(--oo-color));
|
|
31
|
+
}
|
|
32
|
+
.oo-alert__close {
|
|
33
|
+
background: none;
|
|
34
|
+
border: none;
|
|
35
|
+
color: inherit;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
font: inherit;
|
|
38
|
+
padding: 0 4px;
|
|
39
|
+
line-height: 1;
|
|
40
|
+
opacity: 0.7;
|
|
41
|
+
}
|
|
42
|
+
.oo-alert__close:hover { opacity: 1; }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import './Alert.css';
|
|
3
|
+
export type AlertTone = 'info' | 'success' | 'warning' | 'danger';
|
|
4
|
+
export interface AlertProps {
|
|
5
|
+
tone?: AlertTone;
|
|
6
|
+
title?: string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
message?: ReactNode;
|
|
9
|
+
icon?: string;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function Alert({ tone, title, children, message, icon, onClose, style, className, }: AlertProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './Alert.css';
|
|
3
|
+
import { NAMED_GLYPH } from './Icon.js';
|
|
4
|
+
const TONE_ICON = {
|
|
5
|
+
info: 'ℹ',
|
|
6
|
+
success: '✓',
|
|
7
|
+
warning: '⚠',
|
|
8
|
+
danger: '✕',
|
|
9
|
+
};
|
|
10
|
+
export function Alert({ tone = 'info', title, children, message, icon, onClose, style, className, }) {
|
|
11
|
+
const body = children ?? message;
|
|
12
|
+
return (_jsxs("div", { className: ['oo-alert', className].filter(Boolean).join(' '), "data-tone": tone, role: "status", style: style, children: [_jsx("span", { className: "oo-alert__icon", "aria-hidden": true, children: icon ?? TONE_ICON[tone] }), _jsxs("div", { className: "oo-alert__body", children: [title ? _jsx("strong", { className: "oo-alert__title", children: title }) : null, body ? _jsx("span", { className: "oo-alert__message", children: body }) : null] }), onClose ? (_jsx("button", { type: "button", className: "oo-alert__close", onClick: onClose, "aria-label": "Dismiss", children: NAMED_GLYPH.closePanel })) : null] }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.oo-avatar {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
border-radius: 50%;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
user-select: none;
|
|
9
|
+
color: #fff;
|
|
10
|
+
font-weight: 600;
|
|
11
|
+
line-height: 1;
|
|
12
|
+
text-transform: uppercase;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.oo-avatar__img {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
object-fit: cover;
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import { type IconName } from './Icon.js';
|
|
3
|
+
import './Avatar.css';
|
|
4
|
+
export type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
export interface AvatarProps {
|
|
6
|
+
name?: string;
|
|
7
|
+
icon?: IconName | string | {
|
|
8
|
+
path: string;
|
|
9
|
+
};
|
|
10
|
+
imgSrc?: string;
|
|
11
|
+
size?: AvatarSize | number;
|
|
12
|
+
color?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
export declare function Avatar({ name, icon, imgSrc, size, color, className, style, }: AvatarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from './Icon.js';
|
|
3
|
+
import './Avatar.css';
|
|
4
|
+
// Palette tuned for both light and dark themes — enough chroma to be
|
|
5
|
+
// distinct, enough lightness to read white text on top.
|
|
6
|
+
const PALETTE = [
|
|
7
|
+
'#3b82f6', '#8b5cf6', '#ec4899', '#f59e0b',
|
|
8
|
+
'#10b981', '#06b6d4', '#f97316', '#84cc16',
|
|
9
|
+
];
|
|
10
|
+
const SIZE_PX = {
|
|
11
|
+
sm: 24,
|
|
12
|
+
md: 32,
|
|
13
|
+
lg: 40,
|
|
14
|
+
xl: 56,
|
|
15
|
+
};
|
|
16
|
+
function hashColor(name) {
|
|
17
|
+
if (!name)
|
|
18
|
+
return PALETTE[0];
|
|
19
|
+
let hash = 0;
|
|
20
|
+
for (let i = 0; i < name.length; i++) {
|
|
21
|
+
hash = name.charCodeAt(i) + ((hash << 5) - hash);
|
|
22
|
+
}
|
|
23
|
+
return PALETTE[Math.abs(hash) % PALETTE.length];
|
|
24
|
+
}
|
|
25
|
+
function getInitials(name) {
|
|
26
|
+
if (!name)
|
|
27
|
+
return '??';
|
|
28
|
+
const parts = name.trim().split(/\s+/);
|
|
29
|
+
if (parts.length === 1)
|
|
30
|
+
return (parts[0]?.slice(0, 2) ?? '??').toUpperCase();
|
|
31
|
+
return ((parts[0]?.[0] ?? '') + (parts[1]?.[0] ?? '')).toUpperCase();
|
|
32
|
+
}
|
|
33
|
+
export function Avatar({ name, icon, imgSrc, size = 'md', color, className, style, }) {
|
|
34
|
+
const px = typeof size === 'number' ? size : SIZE_PX[size];
|
|
35
|
+
const bg = color ?? (name ? hashColor(name) : PALETTE[0]);
|
|
36
|
+
const baseStyle = {
|
|
37
|
+
width: px,
|
|
38
|
+
height: px,
|
|
39
|
+
background: imgSrc ? undefined : bg,
|
|
40
|
+
...style,
|
|
41
|
+
};
|
|
42
|
+
const classes = ['oo-avatar', className].filter(Boolean).join(' ');
|
|
43
|
+
if (imgSrc) {
|
|
44
|
+
return (_jsx("span", { className: classes, style: baseStyle, "aria-label": name, children: _jsx("img", { src: imgSrc, alt: name ?? '', className: "oo-avatar__img" }) }));
|
|
45
|
+
}
|
|
46
|
+
if (icon !== undefined) {
|
|
47
|
+
// Icon component sizes itself; pick ~60% of the circle so it sits
|
|
48
|
+
// comfortably inside without crowding the edges.
|
|
49
|
+
return (_jsx("span", { className: classes, style: baseStyle, "aria-label": name, children: _jsx(Icon, { name: icon, size: Math.round(px * 0.6), color: "#fff" }) }));
|
|
50
|
+
}
|
|
51
|
+
return (_jsx("span", { className: classes, style: { ...baseStyle, fontSize: Math.round(px * 0.4) }, "aria-label": name, children: getInitials(name ?? '') }));
|
|
52
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.oo-badge {
|
|
2
|
+
--oo-badge-padding-y: 2px;
|
|
3
|
+
--oo-badge-padding-x: 8px;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 4px;
|
|
7
|
+
padding: var(--oo-badge-padding-y) var(--oo-badge-padding-x);
|
|
8
|
+
border-radius: 9999px;
|
|
9
|
+
font-size: var(--oo-font-size-xs);
|
|
10
|
+
font-weight: 500;
|
|
11
|
+
line-height: 1.4;
|
|
12
|
+
background: rgb(var(--oo-color, var(--oo-rgb-muted)) / 0.15);
|
|
13
|
+
color: rgb(var(--oo-color, var(--oo-rgb-muted)));
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
}
|
|
16
|
+
.oo-badge[data-variant='default'] {
|
|
17
|
+
--oo-color: var(--oo-rgb-muted);
|
|
18
|
+
}
|
|
19
|
+
.oo-badge[data-variant='success'] { --oo-color: var(--oo-rgb-green); }
|
|
20
|
+
.oo-badge[data-variant='warning'] { --oo-color: var(--oo-rgb-amber); }
|
|
21
|
+
.oo-badge[data-variant='danger'] { --oo-color: var(--oo-rgb-red); }
|
|
22
|
+
.oo-badge[data-variant='info'] { --oo-color: var(--oo-rgb-blue); }
|
|
23
|
+
.oo-badge[data-outline='true'] {
|
|
24
|
+
background: transparent;
|
|
25
|
+
border: 1px solid rgb(var(--oo-color, var(--oo-rgb-muted)) / 0.5);
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { type ResourceColor } from '../../types/colors.js';
|
|
3
|
+
import './Badge.css';
|
|
4
|
+
export type BadgeTone = 'default' | 'success' | 'warning' | 'danger' | 'info';
|
|
5
|
+
export interface BadgeProps {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
label?: string | number;
|
|
8
|
+
text?: string | number;
|
|
9
|
+
tone?: BadgeTone;
|
|
10
|
+
variant?: BadgeTone;
|
|
11
|
+
color?: ResourceColor;
|
|
12
|
+
outline?: boolean;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function Badge({ children, text, label, tone, variant, color, outline, style, className, }: BadgeProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { resolveColorVar } from '../../types/colors.js';
|
|
3
|
+
import './Badge.css';
|
|
4
|
+
export function Badge({ children, text, label, tone, variant, color, outline, style, className, }) {
|
|
5
|
+
const inline = color
|
|
6
|
+
? { ['--oo-color']: resolveColorVar(color), ...style }
|
|
7
|
+
: (style ?? {});
|
|
8
|
+
return (_jsx("span", { className: ['oo-badge', className].filter(Boolean).join(' '), "data-tone": tone, "data-variant": tone ?? variant, "data-outline": outline ? 'true' : undefined, style: inline, children: label ?? text ?? children }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.oo-card {
|
|
2
|
+
border: 1px solid var(--oo-color-border);
|
|
3
|
+
border-radius: var(--oo-radius-sm);
|
|
4
|
+
padding: var(--oo-spacing-md);
|
|
5
|
+
background: var(--oo-card-bg);
|
|
6
|
+
}
|
|
7
|
+
.oo-card__title {
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
margin-bottom: var(--oo-spacing-xs);
|
|
10
|
+
}
|
|
11
|
+
.oo-card__subtitle {
|
|
12
|
+
color: var(--oo-color-muted);
|
|
13
|
+
font-size: var(--oo-font-size-xs);
|
|
14
|
+
margin-bottom: var(--oo-spacing-sm);
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import './Card.css';
|
|
3
|
+
export interface CardProps {
|
|
4
|
+
child?: ReactNode;
|
|
5
|
+
weight?: number;
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare function Card({ title, subtitle, child, children, weight, style }: CardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { weightStyle } from '../_utils.js';
|
|
3
|
+
import './Card.css';
|
|
4
|
+
export function Card({ title, subtitle, child, children, weight, style }) {
|
|
5
|
+
const body = child ?? children;
|
|
6
|
+
const inlineStyle = { ...weightStyle(weight), ...style };
|
|
7
|
+
return (_jsxs("div", { className: "oo-card", style: inlineStyle, children: [title ? _jsx("div", { className: "oo-card__title", children: title }) : null, subtitle ? _jsx("div", { className: "oo-card__subtitle", children: subtitle }) : null, body] }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// The outer wrapper for a resource detail page: full height, column flow,
|
|
3
|
+
// scrollable. Pairs with DetailHeader + Tabs. Replaces the repeated inline
|
|
4
|
+
// `<div style={{ height:'100%', display:'flex', flexDirection:'column', overflow:'auto' }}>`.
|
|
5
|
+
export function DetailContainer({ children, style }) {
|
|
6
|
+
return (_jsx("div", { className: "oo-detail", style: { height: '100%', display: 'flex', flexDirection: 'column', overflow: 'auto', ...style }, children: children }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.oo-detail-header {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: flex-start;
|
|
4
|
+
gap: var(--oo-spacing-md);
|
|
5
|
+
padding: var(--oo-spacing-md);
|
|
6
|
+
}
|
|
7
|
+
.oo-detail-header__body {
|
|
8
|
+
flex: 1;
|
|
9
|
+
min-width: 0;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: 4px;
|
|
13
|
+
}
|
|
14
|
+
.oo-detail-header__titleline {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: var(--oo-spacing-sm);
|
|
18
|
+
}
|
|
19
|
+
.oo-detail-header__title {
|
|
20
|
+
font-size: var(--oo-font-size-lg);
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
color: var(--oo-color-text);
|
|
23
|
+
}
|
|
24
|
+
.oo-detail-header__subtitle {
|
|
25
|
+
font-size: var(--oo-font-size-sm);
|
|
26
|
+
color: var(--oo-color-muted);
|
|
27
|
+
}
|
|
28
|
+
.oo-detail-header__meta {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
gap: var(--oo-spacing-md);
|
|
32
|
+
margin-top: 4px;
|
|
33
|
+
}
|
|
34
|
+
.oo-detail-header__meta-item {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
gap: 1px;
|
|
38
|
+
}
|
|
39
|
+
.oo-detail-header__meta-label {
|
|
40
|
+
font-size: var(--oo-font-size-xs);
|
|
41
|
+
text-transform: uppercase;
|
|
42
|
+
letter-spacing: 0.05em;
|
|
43
|
+
color: var(--oo-color-muted);
|
|
44
|
+
}
|
|
45
|
+
.oo-detail-header__meta-value {
|
|
46
|
+
font-size: var(--oo-font-size-sm);
|
|
47
|
+
color: var(--oo-color-text);
|
|
48
|
+
}
|
|
49
|
+
.oo-detail-header__actions {
|
|
50
|
+
display: flex;
|
|
51
|
+
gap: var(--oo-spacing-sm);
|
|
52
|
+
align-items: center;
|
|
53
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { type BadgeTone } from './Badge.js';
|
|
3
|
+
import './DetailHeader.css';
|
|
4
|
+
export interface DetailHeaderMeta {
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
value: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface DetailHeaderProps {
|
|
9
|
+
title: ReactNode;
|
|
10
|
+
subtitle?: ReactNode;
|
|
11
|
+
avatarName?: string;
|
|
12
|
+
avatarSrc?: string;
|
|
13
|
+
avatarColor?: string;
|
|
14
|
+
status?: {
|
|
15
|
+
label: string;
|
|
16
|
+
tone?: BadgeTone;
|
|
17
|
+
};
|
|
18
|
+
meta?: DetailHeaderMeta[];
|
|
19
|
+
actions?: ReactNode;
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
}
|
|
22
|
+
export declare function DetailHeader({ title, subtitle, avatarName, avatarSrc, avatarColor, status, meta, actions, style, }: DetailHeaderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar } from './Avatar.js';
|
|
3
|
+
import { Badge } from './Badge.js';
|
|
4
|
+
import './DetailHeader.css';
|
|
5
|
+
export function DetailHeader({ title, subtitle, avatarName, avatarSrc, avatarColor, status, meta, actions, style, }) {
|
|
6
|
+
const showAvatar = Boolean(avatarName || avatarSrc);
|
|
7
|
+
return (_jsxs("header", { className: "oo-detail-header", style: style, children: [showAvatar ? (_jsx(Avatar, { name: avatarName, imgSrc: avatarSrc, color: avatarColor, size: 56 })) : null, _jsxs("div", { className: "oo-detail-header__body", children: [_jsxs("div", { className: "oo-detail-header__titleline", children: [_jsx("span", { className: "oo-detail-header__title", children: title }), status ? _jsx(Badge, { tone: status.tone, label: status.label }) : null] }), subtitle ? _jsx("div", { className: "oo-detail-header__subtitle", children: subtitle }) : null, meta && meta.length > 0 ? (_jsx("div", { className: "oo-detail-header__meta", children: meta.map((m, i) => (_jsxs("span", { className: "oo-detail-header__meta-item", children: [_jsx("span", { className: "oo-detail-header__meta-label", children: m.label }), _jsx("span", { className: "oo-detail-header__meta-value", children: m.value })] }, i))) })) : null] }), actions ? _jsx("div", { className: "oo-detail-header__actions", children: actions }) : null] }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.oo-detail-list {
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: var(--oo-spacing-md);
|
|
4
|
+
margin: 0;
|
|
5
|
+
}
|
|
6
|
+
.oo-detail-list__item {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
gap: 2px;
|
|
10
|
+
min-width: 0;
|
|
11
|
+
}
|
|
12
|
+
.oo-detail-list__item--span {
|
|
13
|
+
grid-column: 1 / -1;
|
|
14
|
+
}
|
|
15
|
+
.oo-detail-list__label {
|
|
16
|
+
font-size: var(--oo-font-size-xs);
|
|
17
|
+
text-transform: uppercase;
|
|
18
|
+
letter-spacing: 0.05em;
|
|
19
|
+
color: var(--oo-color-muted);
|
|
20
|
+
}
|
|
21
|
+
.oo-detail-list__value {
|
|
22
|
+
margin: 0;
|
|
23
|
+
font-size: var(--oo-font-size-sm);
|
|
24
|
+
color: var(--oo-color-text);
|
|
25
|
+
overflow-wrap: anywhere;
|
|
26
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import './DetailList.css';
|
|
3
|
+
export interface DetailItem {
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
value: ReactNode;
|
|
6
|
+
span?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface DetailListProps {
|
|
9
|
+
items: DetailItem[];
|
|
10
|
+
columns?: number;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
export declare function DetailList({ items, columns, style }: DetailListProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './DetailList.css';
|
|
3
|
+
export function DetailList({ items, columns = 2, style }) {
|
|
4
|
+
return (_jsx("dl", { className: "oo-detail-list", style: { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`, ...style }, children: items.map((item, i) => (_jsxs("div", { className: `oo-detail-list__item${item.span ? ' oo-detail-list__item--span' : ''}`, children: [_jsx("dt", { className: "oo-detail-list__label", children: item.label }), _jsx("dd", { className: "oo-detail-list__value", children: item.value })] }, i))) }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type ButtonProps } from '../control/Button.js';
|
|
3
|
+
import type { ResourceColor } from '../../types/colors.js';
|
|
4
|
+
export interface DetailNotFoundAction {
|
|
5
|
+
label: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
variant?: ButtonProps['variant'];
|
|
8
|
+
}
|
|
9
|
+
export interface DetailNotFoundProps {
|
|
10
|
+
title: string;
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
color?: ResourceColor;
|
|
13
|
+
actions?: DetailNotFoundAction[];
|
|
14
|
+
onRetry?: () => void;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function DetailNotFound({ title, icon, color, actions, onRetry, onClose }: DetailNotFoundProps): ReactNode;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { translate } from '../../i18n/registry.js';
|
|
3
|
+
import { Button } from '../control/Button.js';
|
|
4
|
+
// Centered empty/error state for a detail surface: a colored icon, a title, and
|
|
5
|
+
// optional action buttons. Replaces the ad-hoc `<div>… not found</div>` each
|
|
6
|
+
// resource Detail used. Close/Retry labels use the shared `common/*` messages.
|
|
7
|
+
export function DetailNotFound({ title, icon, color, actions, onRetry, onClose }) {
|
|
8
|
+
const buttons = [
|
|
9
|
+
...(actions ?? []),
|
|
10
|
+
...(onRetry ? [{ label: translate('common/retry', 'Retry'), onClick: onRetry, variant: 'primary' }] : []),
|
|
11
|
+
...(onClose ? [{ label: translate('common/close', 'Close'), onClick: onClose, variant: 'default' }] : []),
|
|
12
|
+
];
|
|
13
|
+
return (_jsxs("div", { style: wrap, children: [icon ? (_jsx("div", { className: "oo-detail-notfound__icon", "data-color": color, style: iconCircle, children: icon })) : null, _jsx("div", { style: titleStyle, children: title }), buttons.length ? (_jsx("div", { style: { display: 'flex', gap: 8 }, children: buttons.map((a, i) => (_jsx(Button, { label: a.label, variant: a.variant ?? 'default', onClick: a.onClick }, i))) })) : null] }));
|
|
14
|
+
}
|
|
15
|
+
const wrap = {
|
|
16
|
+
height: '100%',
|
|
17
|
+
display: 'flex',
|
|
18
|
+
flexDirection: 'column',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
justifyContent: 'center',
|
|
21
|
+
gap: 'var(--oo-spacing-md, 12px)',
|
|
22
|
+
padding: 'var(--oo-spacing-lg, 24px)',
|
|
23
|
+
textAlign: 'center',
|
|
24
|
+
};
|
|
25
|
+
const iconCircle = {
|
|
26
|
+
display: 'inline-flex',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
width: 48,
|
|
30
|
+
height: 48,
|
|
31
|
+
borderRadius: '50%',
|
|
32
|
+
fontSize: 24,
|
|
33
|
+
background: 'var(--oo-color-surface, #1e2128)',
|
|
34
|
+
border: '1px solid var(--oo-color-border, #2b2f37)',
|
|
35
|
+
};
|
|
36
|
+
const titleStyle = {
|
|
37
|
+
fontSize: 'var(--oo-font-size-md, 15px)',
|
|
38
|
+
color: 'var(--oo-color-text, #e6e8eb)',
|
|
39
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './Divider.css';
|
|
2
|
+
export interface DividerProps {
|
|
3
|
+
axis?: 'horizontal' | 'vertical';
|
|
4
|
+
weight?: number;
|
|
5
|
+
thickness?: number;
|
|
6
|
+
orientation?: 'horizontal' | 'vertical';
|
|
7
|
+
}
|
|
8
|
+
export declare function Divider({ axis, orientation, weight, thickness }: DividerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { appearance } from '../../styles/index.js';
|
|
3
|
+
import { weightStyle } from '../_utils.js';
|
|
4
|
+
import './Divider.css';
|
|
5
|
+
export function Divider({ axis, orientation, weight, thickness }) {
|
|
6
|
+
const effectiveAxis = axis ?? orientation ?? 'horizontal';
|
|
7
|
+
const sizeStyle = thickness !== undefined
|
|
8
|
+
? effectiveAxis === 'horizontal'
|
|
9
|
+
? { height: thickness }
|
|
10
|
+
: { width: thickness }
|
|
11
|
+
: undefined;
|
|
12
|
+
const flexStyle = weightStyle(weight);
|
|
13
|
+
const hasFlex = Object.keys(flexStyle).length > 0;
|
|
14
|
+
const style = sizeStyle || hasFlex ? { ...sizeStyle, ...flexStyle } : undefined;
|
|
15
|
+
return (_jsx("div", { role: "separator", className: appearance('oo-divider', { variant: effectiveAxis }), style: style }));
|
|
16
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.oo-divisor {
|
|
2
|
+
flex: 0 0 auto;
|
|
3
|
+
background: var(--oo-color-border);
|
|
4
|
+
user-select: none;
|
|
5
|
+
touch-action: none;
|
|
6
|
+
|
|
7
|
+
height: 100%;
|
|
8
|
+
transition: background 0.15s;
|
|
9
|
+
position: relative;
|
|
10
|
+
|
|
11
|
+
flex-basis: auto;
|
|
12
|
+
flex-grow: 0;
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
touch-action: none;
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.oo-divisor:hover {
|
|
19
|
+
background: var(--oo-color-accent);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.oo-divisor__row {
|
|
23
|
+
width: 1px;
|
|
24
|
+
cursor: ew-resize;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.oo-divisor__col {
|
|
28
|
+
height: 1px;
|
|
29
|
+
cursor: ns-resize;
|
|
30
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './Divisor.css';
|
|
2
|
+
export interface DivisorProps {
|
|
3
|
+
id?: string | number;
|
|
4
|
+
direction: 'row' | 'col';
|
|
5
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onCommit: (ratio: number, id?: string | number) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function Divisor({ id, direction, containerRef, min, max, disabled, onCommit, }: DivisorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
3
|
+
import './Divisor.css';
|
|
4
|
+
export function Divisor({ id, direction, containerRef, min = 0.01, max = 0.99, disabled = false, onCommit, }) {
|
|
5
|
+
const draggingRef = useRef(false);
|
|
6
|
+
const rafRef = useRef(null);
|
|
7
|
+
const pendingRef = useRef(null);
|
|
8
|
+
function flush() {
|
|
9
|
+
if (pendingRef.current !== null) {
|
|
10
|
+
onCommit(pendingRef.current, id);
|
|
11
|
+
pendingRef.current = null;
|
|
12
|
+
}
|
|
13
|
+
rafRef.current = null;
|
|
14
|
+
}
|
|
15
|
+
function onPointerDown(e) {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
18
|
+
draggingRef.current = true;
|
|
19
|
+
}
|
|
20
|
+
function onPointerMove(e) {
|
|
21
|
+
if (!draggingRef.current || !containerRef.current)
|
|
22
|
+
return;
|
|
23
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
24
|
+
const ratio = direction === 'row'
|
|
25
|
+
? (e.clientX - rect.left) / Math.max(1, rect.width)
|
|
26
|
+
: (e.clientY - rect.top) / Math.max(1, rect.height);
|
|
27
|
+
pendingRef.current = clamp(ratio, min, max);
|
|
28
|
+
if (rafRef.current === null)
|
|
29
|
+
rafRef.current = requestAnimationFrame(flush);
|
|
30
|
+
}
|
|
31
|
+
function onPointerUp(e) {
|
|
32
|
+
if (rafRef.current !== null) {
|
|
33
|
+
cancelAnimationFrame(rafRef.current);
|
|
34
|
+
flush();
|
|
35
|
+
}
|
|
36
|
+
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
37
|
+
draggingRef.current = false;
|
|
38
|
+
}
|
|
39
|
+
return (_jsx("div", { className: `oo-divisor oo-divisor__${direction}`, "data-divisor-id": id, "aria-disabled": disabled || undefined, "aria-direction": direction, "aria-valuemax": max, "aria-valuemin": min, "aria-valuenow": pendingRef.current ?? undefined, onPointerDown: onPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onMouseDown: (e) => e.preventDefault() }));
|
|
40
|
+
}
|
|
41
|
+
function clamp(v, min, max) {
|
|
42
|
+
return Math.max(min, Math.min(max, v));
|
|
43
|
+
}
|