@selvajs/ui 6.6.0-beta.9 → 7.0.1-beta.0
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/README.md +0 -3
- package/dist/components/ErrorScreen.svelte +1 -1
- package/dist/components/compute/AppLayout.svelte +230 -85
- package/dist/components/compute/AppLayout.svelte.d.ts +14 -2
- package/dist/components/compute/CollapsedPanelStrip.svelte +4 -2
- package/dist/components/compute/ComputeApp.svelte +6 -2
- package/dist/components/compute/ComputeApp.svelte.d.ts +1 -1
- package/dist/components/compute/ComputeMessagesDialog.svelte +3 -3
- package/dist/components/compute/ParameterPresetManager.svelte +1 -1
- package/dist/components/compute/SolveMessages.svelte +79 -88
- package/dist/components/compute/SolveMessages.svelte.d.ts +5 -0
- package/dist/components/layout/AppShell.svelte +2 -2
- package/dist/components/layout/FooterItemRenderer.svelte +2 -2
- package/dist/components/layout/FooterItemRenderer.svelte.d.ts +1 -1
- package/dist/components/layout/PageContent.svelte +3 -2
- package/dist/components/layout/PageFooter.svelte +9 -6
- package/dist/components/layout/PageHeader.svelte +3 -3
- package/dist/components/layout/SideNav.svelte +3 -3
- package/dist/components/layout/SubNav.svelte +2 -2
- package/dist/components/preview/ChartOutput.svelte +141 -50
- package/dist/components/preview/Group.svelte +9 -9
- package/dist/components/preview/HelpButton.svelte +1 -1
- package/dist/components/preview/ImageOutput.svelte +13 -10
- package/dist/components/preview/InputControl.svelte +13 -12
- package/dist/components/preview/OutputDisplay.svelte +26 -17
- package/dist/components/preview/TabBar.svelte +8 -6
- package/dist/components/preview/TabBar.svelte.d.ts +2 -0
- package/dist/components/preview/TabContent.svelte +8 -8
- package/dist/components/preview/TabLayout.svelte +6 -7
- package/dist/components/preview/inputs/CheckboxInput.svelte +1 -1
- package/dist/components/preview/inputs/ChecklistInput.svelte +5 -5
- package/dist/components/preview/inputs/ColorInput.svelte +356 -14
- package/dist/components/preview/inputs/ColorInput.svelte.d.ts +1 -0
- package/dist/components/preview/inputs/DropdownInput.svelte +3 -3
- package/dist/components/preview/inputs/FileInput.svelte +17 -12
- package/dist/components/preview/inputs/GeometryInput.svelte +4 -4
- package/dist/components/preview/inputs/GeometryInput.svelte.d.ts +1 -1
- package/dist/components/preview/inputs/NumberInput.svelte +8 -8
- package/dist/components/preview/inputs/OptionGlyph.svelte +1 -1
- package/dist/components/preview/inputs/OptionGlyph.svelte.d.ts +1 -1
- package/dist/components/preview/inputs/SegmentedInput.svelte +3 -2
- package/dist/components/preview/inputs/TextInput.svelte +5 -5
- package/dist/components/preview/inputs/TileInput.svelte +8 -5
- package/dist/components/primitives/CalculateButton.svelte +10 -4
- package/dist/components/primitives/Callout.svelte +8 -6
- package/dist/components/primitives/Callout.svelte.d.ts +4 -4
- package/dist/components/primitives/DataTable.svelte +1 -1
- package/dist/components/primitives/FilterableDropdown.svelte +13 -1
- package/dist/components/primitives/FilterableDropdown.svelte.d.ts +5 -0
- package/dist/components/primitives/ImageUploadField.svelte +1 -1
- package/dist/components/primitives/SolvingIndicator.svelte +242 -41
- package/dist/components/primitives/SolvingIndicator.svelte.d.ts +13 -5
- package/dist/components/primitives/alert-dialog/alert-dialog-content.svelte +1 -1
- package/dist/components/primitives/badge/badge.svelte +2 -2
- package/dist/components/primitives/badge/badge.svelte.d.ts +6 -6
- package/dist/components/primitives/button/button.svelte +7 -8
- package/dist/components/primitives/button/button.svelte.d.ts +19 -19
- package/dist/components/primitives/card/card.svelte +1 -1
- package/dist/components/primitives/card/card.svelte.d.ts +1 -1
- package/dist/components/primitives/checkbox/checkbox.svelte +1 -1
- package/dist/components/primitives/command/command-input.svelte +1 -1
- package/dist/components/primitives/command/command-item.svelte +1 -1
- package/dist/components/primitives/command/command-link-item.svelte +1 -1
- package/dist/components/primitives/command/command.svelte +1 -1
- package/dist/components/primitives/context-menu/context-menu-checkbox-item.svelte +1 -1
- package/dist/components/primitives/context-menu/context-menu-content.svelte +1 -1
- package/dist/components/primitives/context-menu/context-menu-item.svelte +1 -1
- package/dist/components/primitives/context-menu/context-menu-radio-item.svelte +1 -1
- package/dist/components/primitives/context-menu/context-menu-sub-content.svelte +1 -1
- package/dist/components/primitives/context-menu/context-menu-sub-trigger.svelte +1 -1
- package/dist/components/primitives/dialog/dialog-content.svelte +3 -3
- package/dist/components/primitives/drawer/Drawer.svelte +1 -1
- package/dist/components/primitives/dropdown-menu/dropdown-menu-checkbox-item.svelte +31 -11
- package/dist/components/primitives/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +2 -0
- package/dist/components/primitives/dropdown-menu/dropdown-menu-content.svelte +5 -1
- package/dist/components/primitives/dropdown-menu/dropdown-menu-content.svelte.d.ts +2 -0
- package/dist/components/primitives/dropdown-menu/dropdown-menu-item.svelte +4 -2
- package/dist/components/primitives/dropdown-menu/dropdown-menu-item.svelte.d.ts +2 -1
- package/dist/components/primitives/dropdown-menu/dropdown-menu-radio-item.svelte +1 -1
- package/dist/components/primitives/dropdown-menu/dropdown-menu-shortcut.svelte +1 -1
- package/dist/components/primitives/dropdown-menu/dropdown-menu-sub-content.svelte +1 -1
- package/dist/components/primitives/dropdown-menu/dropdown-menu-sub-trigger.svelte +1 -1
- package/dist/components/primitives/index.d.ts +1 -1
- package/dist/components/primitives/index.js +1 -1
- package/dist/components/primitives/input/input.svelte +2 -2
- package/dist/components/primitives/input-group/input-group-input.svelte.d.ts +1 -1
- package/dist/components/primitives/input-group/input-group.svelte +1 -1
- package/dist/components/primitives/mode-toggle/mode-toggle.svelte +2 -2
- package/dist/components/primitives/popover/popover-content.svelte +1 -1
- package/dist/components/primitives/resizable/resizable-handle.svelte +2 -2
- package/dist/components/primitives/search/search.svelte +1 -1
- package/dist/components/primitives/select/select-content.svelte +1 -1
- package/dist/components/primitives/select/select-item.svelte +1 -1
- package/dist/components/primitives/select/select-trigger.svelte +1 -1
- package/dist/components/primitives/slider/slider.svelte +1 -1
- package/dist/components/primitives/switch/switch.svelte +1 -1
- package/dist/components/primitives/tabs/tabs-list.svelte +2 -2
- package/dist/components/primitives/tabs/tabs-list.svelte.d.ts +6 -6
- package/dist/components/primitives/tabs/tabs-trigger.svelte +2 -2
- package/dist/components/primitives/tabs/tabs-trigger.svelte.d.ts +6 -6
- package/dist/components/primitives/textarea/textarea.svelte +1 -1
- package/dist/components/primitives/toggle/toggle.svelte +8 -2
- package/dist/components/primitives/toggle/toggle.svelte.d.ts +10 -4
- package/dist/components/primitives/toggle-group/toggle-group-item.svelte +1 -1
- package/dist/components/primitives/toggle-group/toggle-group.svelte +1 -1
- package/dist/components/primitives/tooltip/index.d.ts +6 -0
- package/dist/components/primitives/tooltip/index.js +8 -0
- package/dist/components/primitives/tooltip/tooltip-content.svelte +34 -0
- package/dist/components/primitives/tooltip/tooltip-content.svelte.d.ts +10 -0
- package/dist/components/primitives/tooltip/tooltip-portal.svelte +7 -0
- package/dist/components/primitives/tooltip/tooltip-portal.svelte.d.ts +4 -0
- package/dist/components/primitives/tooltip/tooltip-provider.svelte +7 -0
- package/dist/components/primitives/tooltip/tooltip-provider.svelte.d.ts +4 -0
- package/dist/components/primitives/tooltip/tooltip-trigger.svelte +7 -0
- package/dist/components/primitives/tooltip/tooltip-trigger.svelte.d.ts +4 -0
- package/dist/components/primitives/tooltip/tooltip.svelte +7 -0
- package/dist/components/primitives/tooltip/tooltip.svelte.d.ts +4 -0
- package/dist/components/viewer/MeshMetadataPanel.svelte +2 -2
- package/dist/components/viewer/SceneManager.svelte +32 -21
- package/dist/components/viewer/SceneManager.svelte.d.ts +3 -1
- package/dist/components/viewer/Viewer.svelte +128 -178
- package/dist/components/viewer/Viewer.svelte.d.ts +7 -2
- package/dist/components/viewer/ViewerDock.svelte +452 -0
- package/dist/components/viewer/ViewerDock.svelte.d.ts +42 -0
- package/dist/composables/useFooterItem.svelte.d.ts +1 -1
- package/dist/composables/useFooterItem.svelte.js +1 -1
- package/dist/compute/liveProgress.svelte.d.ts +16 -0
- package/dist/compute/liveProgress.svelte.js +90 -0
- package/dist/compute/solving.svelte.d.ts +7 -9
- package/dist/compute/solving.svelte.js +56 -48
- package/dist/constants.d.ts +6 -8
- package/dist/constants.js +8 -11
- package/dist/contexts/hostContext.svelte.d.ts +1 -1
- package/dist/features/chart/plotly-compat.d.ts +15 -0
- package/dist/features/chart/plotly-compat.js +124 -0
- package/dist/i18n/messages.d.ts +17 -0
- package/dist/i18n/messages.js +26 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/public.d.ts +1 -0
- package/dist/public.js +1 -0
- package/dist/schema/visibility-rules.d.ts +7 -1
- package/dist/schema/visibility-rules.js +17 -0
- package/dist/styles/base.css +100 -86
- package/dist/utils/color-space.d.ts +21 -0
- package/dist/utils/color-space.js +90 -0
- package/package.json +31 -23
- package/src/lib/components/ErrorScreen.svelte +1 -1
- package/src/lib/components/compute/AppLayout.svelte +231 -86
- package/src/lib/components/compute/CollapsedPanelStrip.svelte +4 -2
- package/src/lib/components/compute/ComputeApp.svelte +6 -2
- package/src/lib/components/compute/ComputeMessagesDialog.svelte +4 -4
- package/src/lib/components/compute/ParameterPresetManager.svelte +1 -1
- package/src/lib/components/compute/SolveMessages.svelte +81 -90
- package/src/lib/components/layout/AppShell.svelte +2 -2
- package/src/lib/components/layout/FooterItemRenderer.svelte +2 -2
- package/src/lib/components/layout/PageContent.svelte +3 -2
- package/src/lib/components/layout/PageFooter.svelte +9 -6
- package/src/lib/components/layout/PageHeader.svelte +3 -3
- package/src/lib/components/layout/SideNav.svelte +4 -4
- package/src/lib/components/layout/SubNav.svelte +2 -2
- package/src/lib/components/preview/ChartOutput.svelte +141 -50
- package/src/lib/components/preview/Group.svelte +9 -9
- package/src/lib/components/preview/HelpButton.svelte +1 -1
- package/src/lib/components/preview/ImageOutput.svelte +13 -10
- package/src/lib/components/preview/InputControl.svelte +13 -12
- package/src/lib/components/preview/OutputDisplay.svelte +26 -17
- package/src/lib/components/preview/TabBar.svelte +8 -6
- package/src/lib/components/preview/TabContent.svelte +8 -8
- package/src/lib/components/preview/TabLayout.svelte +6 -7
- package/src/lib/components/preview/inputs/CheckboxInput.svelte +1 -1
- package/src/lib/components/preview/inputs/ChecklistInput.svelte +5 -5
- package/src/lib/components/preview/inputs/ColorInput.svelte +356 -14
- package/src/lib/components/preview/inputs/DropdownInput.svelte +3 -3
- package/src/lib/components/preview/inputs/FileInput.svelte +17 -12
- package/src/lib/components/preview/inputs/GeometryInput.svelte +4 -4
- package/src/lib/components/preview/inputs/NumberInput.svelte +8 -8
- package/src/lib/components/preview/inputs/OptionGlyph.svelte +2 -2
- package/src/lib/components/preview/inputs/SegmentedInput.svelte +3 -2
- package/src/lib/components/preview/inputs/TextInput.svelte +5 -5
- package/src/lib/components/preview/inputs/TileInput.svelte +8 -5
- package/src/lib/components/primitives/CalculateButton.svelte +10 -4
- package/src/lib/components/primitives/Callout.svelte +9 -7
- package/src/lib/components/primitives/DataTable.svelte +1 -1
- package/src/lib/components/primitives/FilterableDropdown.svelte +14 -2
- package/src/lib/components/primitives/ImageUploadField.svelte +1 -1
- package/src/lib/components/primitives/IssueList.svelte +1 -1
- package/src/lib/components/primitives/SeverityIcon.svelte +1 -1
- package/src/lib/components/primitives/SolvingIndicator.svelte +242 -41
- package/src/lib/components/primitives/StateDisplay.svelte +1 -1
- package/src/lib/components/primitives/alert-dialog/alert-dialog-action.svelte +2 -2
- package/src/lib/components/primitives/alert-dialog/alert-dialog-cancel.svelte +2 -2
- package/src/lib/components/primitives/alert-dialog/alert-dialog-content.svelte +2 -2
- package/src/lib/components/primitives/alert-dialog/alert-dialog-description.svelte +1 -1
- package/src/lib/components/primitives/alert-dialog/alert-dialog-footer.svelte +1 -1
- package/src/lib/components/primitives/alert-dialog/alert-dialog-header.svelte +1 -1
- package/src/lib/components/primitives/alert-dialog/alert-dialog-overlay.svelte +1 -1
- package/src/lib/components/primitives/alert-dialog/alert-dialog-title.svelte +1 -1
- package/src/lib/components/primitives/badge/badge.svelte +3 -3
- package/src/lib/components/primitives/button/button.svelte +7 -8
- package/src/lib/components/primitives/button-group/button-group-separator.svelte +2 -2
- package/src/lib/components/primitives/button-group/button-group-text.svelte +1 -1
- package/src/lib/components/primitives/button-group/button-group.svelte +1 -1
- package/src/lib/components/primitives/card/card-content.svelte +1 -1
- package/src/lib/components/primitives/card/card-description.svelte +1 -1
- package/src/lib/components/primitives/card/card-footer.svelte +1 -1
- package/src/lib/components/primitives/card/card-header.svelte +1 -1
- package/src/lib/components/primitives/card/card-title.svelte +1 -1
- package/src/lib/components/primitives/card/card.svelte +2 -2
- package/src/lib/components/primitives/checkbox/checkbox.svelte +2 -2
- package/src/lib/components/primitives/command/command-dialog.svelte +2 -2
- package/src/lib/components/primitives/command/command-empty.svelte +1 -1
- package/src/lib/components/primitives/command/command-group.svelte +1 -1
- package/src/lib/components/primitives/command/command-input.svelte +3 -3
- package/src/lib/components/primitives/command/command-item.svelte +2 -2
- package/src/lib/components/primitives/command/command-link-item.svelte +2 -2
- package/src/lib/components/primitives/command/command-list.svelte +1 -1
- package/src/lib/components/primitives/command/command-separator.svelte +1 -1
- package/src/lib/components/primitives/command/command-shortcut.svelte +1 -1
- package/src/lib/components/primitives/command/command.svelte +2 -2
- package/src/lib/components/primitives/context-menu/context-menu-checkbox-item.svelte +2 -2
- package/src/lib/components/primitives/context-menu/context-menu-content.svelte +2 -2
- package/src/lib/components/primitives/context-menu/context-menu-group-heading.svelte +1 -1
- package/src/lib/components/primitives/context-menu/context-menu-item.svelte +2 -2
- package/src/lib/components/primitives/context-menu/context-menu-label.svelte +1 -1
- package/src/lib/components/primitives/context-menu/context-menu-radio-item.svelte +2 -2
- package/src/lib/components/primitives/context-menu/context-menu-separator.svelte +1 -1
- package/src/lib/components/primitives/context-menu/context-menu-shortcut.svelte +1 -1
- package/src/lib/components/primitives/context-menu/context-menu-sub-content.svelte +2 -2
- package/src/lib/components/primitives/context-menu/context-menu-sub-trigger.svelte +2 -2
- package/src/lib/components/primitives/dialog/dialog-content.svelte +4 -4
- package/src/lib/components/primitives/dialog/dialog-description.svelte +1 -1
- package/src/lib/components/primitives/dialog/dialog-footer.svelte +1 -1
- package/src/lib/components/primitives/dialog/dialog-header.svelte +1 -1
- package/src/lib/components/primitives/dialog/dialog-overlay.svelte +1 -1
- package/src/lib/components/primitives/dialog/dialog-title.svelte +1 -1
- package/src/lib/components/primitives/drawer/Drawer.svelte +1 -1
- package/src/lib/components/primitives/dropdown-menu/dropdown-menu-checkbox-item.svelte +32 -12
- package/src/lib/components/primitives/dropdown-menu/dropdown-menu-content.svelte +6 -2
- package/src/lib/components/primitives/dropdown-menu/dropdown-menu-group-heading.svelte +1 -1
- package/src/lib/components/primitives/dropdown-menu/dropdown-menu-item.svelte +5 -3
- package/src/lib/components/primitives/dropdown-menu/dropdown-menu-label.svelte +1 -1
- package/src/lib/components/primitives/dropdown-menu/dropdown-menu-radio-item.svelte +2 -2
- package/src/lib/components/primitives/dropdown-menu/dropdown-menu-separator.svelte +1 -1
- package/src/lib/components/primitives/dropdown-menu/dropdown-menu-shortcut.svelte +2 -2
- package/src/lib/components/primitives/dropdown-menu/dropdown-menu-sub-content.svelte +2 -2
- package/src/lib/components/primitives/dropdown-menu/dropdown-menu-sub-trigger.svelte +2 -2
- package/src/lib/components/primitives/empty/empty-content.svelte +1 -1
- package/src/lib/components/primitives/empty/empty-description.svelte +1 -1
- package/src/lib/components/primitives/empty/empty-header.svelte +1 -1
- package/src/lib/components/primitives/empty/empty-media.svelte +1 -1
- package/src/lib/components/primitives/empty/empty-title.svelte +1 -1
- package/src/lib/components/primitives/empty/empty.svelte +1 -1
- package/src/lib/components/primitives/field/field-content.svelte +1 -1
- package/src/lib/components/primitives/field/field-description.svelte +1 -1
- package/src/lib/components/primitives/field/field-error.svelte +1 -1
- package/src/lib/components/primitives/field/field-group.svelte +1 -1
- package/src/lib/components/primitives/field/field-label.svelte +2 -2
- package/src/lib/components/primitives/field/field-legend.svelte +1 -1
- package/src/lib/components/primitives/field/field-separator.svelte +2 -2
- package/src/lib/components/primitives/field/field-set.svelte +1 -1
- package/src/lib/components/primitives/field/field-title.svelte +1 -1
- package/src/lib/components/primitives/field/field.svelte +1 -1
- package/src/lib/components/primitives/index.ts +1 -1
- package/src/lib/components/primitives/input/input.svelte +3 -3
- package/src/lib/components/primitives/input-group/input-group-addon.svelte +1 -1
- package/src/lib/components/primitives/input-group/input-group-button.svelte +2 -2
- package/src/lib/components/primitives/input-group/input-group-input.svelte +2 -2
- package/src/lib/components/primitives/input-group/input-group-text.svelte +1 -1
- package/src/lib/components/primitives/input-group/input-group-textarea.svelte +2 -2
- package/src/lib/components/primitives/input-group/input-group.svelte +2 -2
- package/src/lib/components/primitives/label/label.svelte +1 -1
- package/src/lib/components/primitives/mode-toggle/mode-toggle.svelte +2 -2
- package/src/lib/components/primitives/popover/popover-content.svelte +2 -2
- package/src/lib/components/primitives/popover/popover-description.svelte +1 -1
- package/src/lib/components/primitives/popover/popover-header.svelte +1 -1
- package/src/lib/components/primitives/popover/popover-title.svelte +1 -1
- package/src/lib/components/primitives/popover/popover-trigger.svelte +1 -1
- package/src/lib/components/primitives/resizable/resizable-handle.svelte +3 -3
- package/src/lib/components/primitives/resizable/resizable-pane-group.svelte +1 -1
- package/src/lib/components/primitives/scroll-area/scroll-area-scrollbar.svelte +1 -1
- package/src/lib/components/primitives/scroll-area/scroll-area.svelte +1 -1
- package/src/lib/components/primitives/search/search.svelte +2 -2
- package/src/lib/components/primitives/select/select-content.svelte +2 -2
- package/src/lib/components/primitives/select/select-group-heading.svelte +1 -1
- package/src/lib/components/primitives/select/select-item.svelte +2 -2
- package/src/lib/components/primitives/select/select-label.svelte +1 -1
- package/src/lib/components/primitives/select/select-scroll-down-button.svelte +1 -1
- package/src/lib/components/primitives/select/select-scroll-up-button.svelte +1 -1
- package/src/lib/components/primitives/select/select-separator.svelte +2 -2
- package/src/lib/components/primitives/select/select-trigger.svelte +2 -2
- package/src/lib/components/primitives/separator/separator.svelte +1 -1
- package/src/lib/components/primitives/slider/slider.svelte +2 -2
- package/src/lib/components/primitives/spinner/spinner.svelte +1 -1
- package/src/lib/components/primitives/switch/switch.svelte +2 -2
- package/src/lib/components/primitives/tabs/tabs-content.svelte +1 -1
- package/src/lib/components/primitives/tabs/tabs-list.svelte +3 -3
- package/src/lib/components/primitives/tabs/tabs-trigger.svelte +3 -3
- package/src/lib/components/primitives/tabs/tabs.svelte +1 -1
- package/src/lib/components/primitives/textarea/textarea.svelte +2 -2
- package/src/lib/components/primitives/toggle/toggle.svelte +9 -3
- package/src/lib/components/primitives/toggle-group/toggle-group-item.svelte +3 -3
- package/src/lib/components/primitives/toggle-group/toggle-group.svelte +3 -3
- package/src/lib/components/primitives/tooltip/index.ts +19 -0
- package/src/lib/components/primitives/tooltip/tooltip-content.svelte +34 -0
- package/src/lib/components/primitives/tooltip/tooltip-portal.svelte +7 -0
- package/src/lib/components/primitives/tooltip/tooltip-provider.svelte +7 -0
- package/src/lib/components/primitives/tooltip/tooltip-trigger.svelte +7 -0
- package/src/lib/components/primitives/tooltip/tooltip.svelte +7 -0
- package/src/lib/components/viewer/MeshMetadataPanel.svelte +2 -2
- package/src/lib/components/viewer/SceneManager.svelte +32 -21
- package/src/lib/components/viewer/Viewer.svelte +129 -179
- package/src/lib/components/viewer/ViewerDock.svelte +452 -0
- package/src/lib/composables/useFooterItem.svelte.ts +1 -1
- package/src/lib/compute/liveProgress.svelte.ts +103 -0
- package/src/lib/compute/solving.svelte.ts +56 -55
- package/src/lib/constants.ts +8 -11
- package/src/lib/contexts/hostContext.svelte.ts +1 -1
- package/src/lib/features/chart/plotly-compat.ts +141 -0
- package/src/lib/i18n/messages.ts +43 -0
- package/src/lib/index.ts +2 -0
- package/src/lib/public.ts +1 -0
- package/src/lib/schema/visibility-rules.ts +27 -1
- package/src/lib/styles/base.css +100 -86
- package/src/lib/utils/color-space.ts +107 -0
- package/dist/components/primitives/theme-switcher/ThemeSwitcher.svelte +0 -39
- package/dist/components/primitives/theme-switcher/ThemeSwitcher.svelte.d.ts +0 -3
- package/dist/components/primitives/theme-switcher/index.d.ts +0 -1
- package/dist/components/primitives/theme-switcher/index.js +0 -1
- package/dist/styles/themes/cyberpunk.css +0 -98
- package/dist/styles/themes/neutral.css +0 -72
- package/dist/styles/themes/ocean.css +0 -75
- package/dist/styles/themes/selva.css +0 -105
- package/dist/theme/themeStore.svelte.d.ts +0 -12
- package/dist/theme/themeStore.svelte.js +0 -40
- package/dist/theme/themes.d.ts +0 -5
- package/dist/theme/themes.js +0 -13
- package/src/lib/components/primitives/theme-switcher/ThemeSwitcher.svelte +0 -39
- package/src/lib/components/primitives/theme-switcher/index.ts +0 -1
- package/src/lib/styles/themes/cyberpunk.css +0 -98
- package/src/lib/styles/themes/neutral.css +0 -72
- package/src/lib/styles/themes/ocean.css +0 -75
- package/src/lib/styles/themes/selva.css +0 -105
- package/src/lib/theme/themeStore.svelte.ts +0 -50
- package/src/lib/theme/themes.ts +0 -18
|
@@ -1,79 +1,87 @@
|
|
|
1
1
|
import { untrack } from 'svelte';
|
|
2
2
|
import { APP_DEFAULTS } from '../constants';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* - Average over SLOW_THRESHOLD_MS: shown immediately
|
|
9
|
-
* - Between the two: shown after a proportional slice of ANIMATION_DELAY
|
|
10
|
-
* - First solve: shown immediately, there is no history yet
|
|
4
|
+
* When to show that a solve is running. A solve that ends within `SHOW_AFTER_MS` shows nothing:
|
|
5
|
+
* the result updating is feedback enough, and a spinner that flashes for a frame reads as jank.
|
|
6
|
+
* Once shown, the indicator stays `MIN_VISIBLE_MS` for the same reason. `slow` turns on past
|
|
7
|
+
* `SLOW_AFTER_MS`, the case of a Rhino.Compute round trip or a heavy definition.
|
|
11
8
|
*
|
|
12
9
|
* `freezesDuringSolve` is for a host that can't paint while it solves (an embedded WebView on
|
|
13
|
-
* the solver's thread).
|
|
14
|
-
*
|
|
10
|
+
* the solver's thread). A delay can't run there, so the indicator shows on every solve, before
|
|
11
|
+
* the solve takes the thread: it is the only place that host can say Esc aborts.
|
|
15
12
|
*/
|
|
16
13
|
export function createSolvingIndicator(isSolving, options = {}) {
|
|
14
|
+
const { SHOW_AFTER_MS, MIN_VISIBLE_MS, SLOW_AFTER_MS } = APP_DEFAULTS.SOLVING_INDICATOR;
|
|
17
15
|
if (options.freezesDuringSolve) {
|
|
18
16
|
return {
|
|
17
|
+
// Read straight from `isSolving`, not through an effect: an effect would run a tick
|
|
18
|
+
// later, after the solve has already frozen the page.
|
|
19
19
|
get show() {
|
|
20
20
|
return isSolving();
|
|
21
|
-
}
|
|
21
|
+
},
|
|
22
|
+
slow: false
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
|
-
const { FAST_THRESHOLD_MS, SLOW_THRESHOLD_MS, HISTORY_SIZE, ANIMATION_DELAY } = APP_DEFAULTS.SOLVING_INDICATOR;
|
|
25
25
|
let show = $state(false);
|
|
26
|
-
let
|
|
27
|
-
let
|
|
28
|
-
|
|
26
|
+
let slow = $state(false);
|
|
27
|
+
let shownAt = 0;
|
|
28
|
+
let showTimer = null;
|
|
29
|
+
let slowTimer = null;
|
|
30
|
+
let hideTimer = null;
|
|
31
|
+
function clear(timer) {
|
|
32
|
+
if (timer)
|
|
33
|
+
clearTimeout(timer);
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
function hide() {
|
|
37
|
+
hideTimer = null;
|
|
38
|
+
show = false;
|
|
39
|
+
slow = false;
|
|
40
|
+
}
|
|
29
41
|
$effect(() => {
|
|
30
42
|
const solving = isSolving();
|
|
31
43
|
untrack(() => {
|
|
32
44
|
if (solving) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return;
|
|
39
|
-
const delay = avg === Infinity || avg >= SLOW_THRESHOLD_MS
|
|
40
|
-
? 0
|
|
41
|
-
: ((avg - FAST_THRESHOLD_MS) / (SLOW_THRESHOLD_MS - FAST_THRESHOLD_MS)) *
|
|
42
|
-
ANIMATION_DELAY;
|
|
43
|
-
if (!timeout) {
|
|
44
|
-
if (delay === 0) {
|
|
45
|
+
// A solve that starts while the last one's indicator is held keeps it up.
|
|
46
|
+
hideTimer = clear(hideTimer);
|
|
47
|
+
if (!show) {
|
|
48
|
+
showTimer ??= setTimeout(() => {
|
|
49
|
+
showTimer = null;
|
|
45
50
|
show = true;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
timeout = setTimeout(() => {
|
|
49
|
-
show = true;
|
|
50
|
-
timeout = null;
|
|
51
|
-
}, delay);
|
|
52
|
-
}
|
|
51
|
+
shownAt = performance.now();
|
|
52
|
+
}, SHOW_AFTER_MS);
|
|
53
53
|
}
|
|
54
|
+
slowTimer ??= setTimeout(() => {
|
|
55
|
+
slowTimer = null;
|
|
56
|
+
slow = true;
|
|
57
|
+
}, SLOW_AFTER_MS);
|
|
54
58
|
}
|
|
55
59
|
else {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
show = false;
|
|
60
|
+
showTimer = clear(showTimer);
|
|
61
|
+
slowTimer = clear(slowTimer);
|
|
62
|
+
if (!show)
|
|
63
|
+
return;
|
|
64
|
+
const remaining = MIN_VISIBLE_MS - (performance.now() - shownAt);
|
|
65
|
+
if (remaining > 0)
|
|
66
|
+
hideTimer ??= setTimeout(hide, remaining);
|
|
67
|
+
else
|
|
68
|
+
hide();
|
|
67
69
|
}
|
|
68
70
|
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
});
|
|
72
|
+
// Separate from the effect above: a cleanup there would run on every `isSolving` flip and
|
|
73
|
+
// cancel the timers it just set.
|
|
74
|
+
$effect(() => () => {
|
|
75
|
+
clear(showTimer);
|
|
76
|
+
clear(slowTimer);
|
|
77
|
+
clear(hideTimer);
|
|
73
78
|
});
|
|
74
79
|
return {
|
|
75
80
|
get show() {
|
|
76
81
|
return show;
|
|
82
|
+
},
|
|
83
|
+
get slow() {
|
|
84
|
+
return slow;
|
|
77
85
|
}
|
|
78
86
|
};
|
|
79
87
|
}
|
package/dist/constants.d.ts
CHANGED
|
@@ -10,14 +10,12 @@ export declare const APP_DEFAULTS: {
|
|
|
10
10
|
DRAWER_ANIMATION_MS: number;
|
|
11
11
|
};
|
|
12
12
|
SOLVING_INDICATOR: {
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
/** Number of solve durations to keep in history for averaging */
|
|
20
|
-
HISTORY_SIZE: number;
|
|
13
|
+
/** A solve that ends sooner shows no indicator (ms) */
|
|
14
|
+
SHOW_AFTER_MS: number;
|
|
15
|
+
/** Once shown, the indicator stays at least this long (ms) */
|
|
16
|
+
MIN_VISIBLE_MS: number;
|
|
17
|
+
/** Past this a solve counts as slow and the viewer dims its stale result (ms) */
|
|
18
|
+
SLOW_AFTER_MS: number;
|
|
21
19
|
};
|
|
22
20
|
FILE_SIZE: {
|
|
23
21
|
/** Bytes per kilobyte */
|
package/dist/constants.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export const APP_DEFAULTS = {
|
|
2
2
|
// File upload limits
|
|
3
3
|
// TEMP (dev): raised 150 MB → 300 MB so large dev file-widget inputs aren't
|
|
4
|
-
// blocked client-side. The server request cap
|
|
5
|
-
// still defaults to 256 MB, and base64 inflates a raw file by ~4/3, so
|
|
4
|
+
// blocked client-side. The server request cap is 256 MB, and base64 inflates a raw file by ~4/3, so
|
|
6
5
|
// anything over ~192 MB is rejected with a 413 after the client accepts it.
|
|
7
6
|
// Revert to 150 before release.
|
|
8
7
|
FILE_UPLOAD: {
|
|
@@ -16,16 +15,14 @@ export const APP_DEFAULTS = {
|
|
|
16
15
|
/** Drawer open/close animation duration (ms) — matches the CSS transition. */
|
|
17
16
|
DRAWER_ANIMATION_MS: 350
|
|
18
17
|
},
|
|
19
|
-
//
|
|
18
|
+
// See createSolvingIndicator.
|
|
20
19
|
SOLVING_INDICATOR: {
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
/** Number of solve durations to keep in history for averaging */
|
|
28
|
-
HISTORY_SIZE: 3
|
|
20
|
+
/** A solve that ends sooner shows no indicator (ms) */
|
|
21
|
+
SHOW_AFTER_MS: 400,
|
|
22
|
+
/** Once shown, the indicator stays at least this long (ms) */
|
|
23
|
+
MIN_VISIBLE_MS: 500,
|
|
24
|
+
/** Past this a solve counts as slow and the viewer dims its stale result (ms) */
|
|
25
|
+
SLOW_AFTER_MS: 2000
|
|
29
26
|
},
|
|
30
27
|
// File size formatting
|
|
31
28
|
FILE_SIZE: {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type Json = Record<string, unknown>;
|
|
2
|
+
export interface PlotlyFigure {
|
|
3
|
+
data: Json[];
|
|
4
|
+
layout?: Json;
|
|
5
|
+
config?: Json;
|
|
6
|
+
frames?: Json[];
|
|
7
|
+
}
|
|
8
|
+
/** Returns a rewritten copy; the input is not modified. */
|
|
9
|
+
export declare function upgradePlotlyFigure(figure: PlotlyFigure): PlotlyFigure;
|
|
10
|
+
/**
|
|
11
|
+
* Rewrites colour spellings Plotly 3 accepted but Plotly 4 rejects (hex without `#`, `hsv()`)
|
|
12
|
+
* into valid CSS. Anything else is returned unchanged.
|
|
13
|
+
*/
|
|
14
|
+
export declare function normalizePlotlyColor(color: string): string;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { hsvToRgb } from '../../utils/color-space.js';
|
|
2
|
+
const REMOVED_MAP_TRACES = {
|
|
3
|
+
scattermapbox: 'scattermap',
|
|
4
|
+
choroplethmapbox: 'choroplethmap',
|
|
5
|
+
densitymapbox: 'densitymap'
|
|
6
|
+
};
|
|
7
|
+
const MAPBOX_SUBPLOT = /^mapbox(\d*)$/;
|
|
8
|
+
const BARE_HEX = /^(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
|
9
|
+
const HSV_FUNCTION = /^hsva?[\s(]+([-+\d.]+)%?[\s,]+([\d.]+)(%?)[\s,]+([\d.]+)(%?)(?:[\s,/]+([\d.]+)(%?))?[\s)]*$/i;
|
|
10
|
+
const isObject = (v) => typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
11
|
+
/** Returns a rewritten copy; the input is not modified. */
|
|
12
|
+
export function upgradePlotlyFigure(figure) {
|
|
13
|
+
const out = structuredClone(figure);
|
|
14
|
+
const layout = out.layout ?? {};
|
|
15
|
+
normalizeColors(layout);
|
|
16
|
+
let migratedMaps = false;
|
|
17
|
+
for (const trace of out.data ?? []) {
|
|
18
|
+
if (!isObject(trace))
|
|
19
|
+
continue;
|
|
20
|
+
normalizeColors(trace);
|
|
21
|
+
const replacement = REMOVED_MAP_TRACES[trace.type];
|
|
22
|
+
if (replacement) {
|
|
23
|
+
trace.type = replacement;
|
|
24
|
+
if (typeof trace.subplot === 'string')
|
|
25
|
+
trace.subplot = trace.subplot.replace(MAPBOX_SUBPLOT, 'map$1');
|
|
26
|
+
migratedMaps = true;
|
|
27
|
+
}
|
|
28
|
+
else if (trace.type === 'splom') {
|
|
29
|
+
keepSplomAxesUnlinked(trace);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (migratedMaps)
|
|
33
|
+
migrateMapLayout(layout);
|
|
34
|
+
// Frame data replaces trace data during playback, so it needs the same colour fixes.
|
|
35
|
+
for (const frame of out.frames ?? [])
|
|
36
|
+
if (isObject(frame))
|
|
37
|
+
normalizeColors(frame);
|
|
38
|
+
return { ...out, layout };
|
|
39
|
+
}
|
|
40
|
+
// Plotly 4 links each dimension's x and y axes by default.
|
|
41
|
+
function keepSplomAxesUnlinked(trace) {
|
|
42
|
+
if (!Array.isArray(trace.dimensions))
|
|
43
|
+
return;
|
|
44
|
+
for (const dim of trace.dimensions) {
|
|
45
|
+
if (!isObject(dim))
|
|
46
|
+
continue;
|
|
47
|
+
const axis = isObject(dim.axis) ? dim.axis : (dim.axis = {});
|
|
48
|
+
if (!('matches' in axis))
|
|
49
|
+
axis.matches = false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function migrateMapLayout(layout) {
|
|
53
|
+
for (const key of Object.keys(layout)) {
|
|
54
|
+
const match = MAPBOX_SUBPLOT.exec(key);
|
|
55
|
+
if (!match)
|
|
56
|
+
continue;
|
|
57
|
+
const map = layout[key];
|
|
58
|
+
delete layout[key];
|
|
59
|
+
const newKey = `map${match[1]}`;
|
|
60
|
+
if (newKey in layout || !isObject(map))
|
|
61
|
+
continue;
|
|
62
|
+
delete map.accesstoken;
|
|
63
|
+
// Stamen and mapbox:// styles have no map equivalent.
|
|
64
|
+
if (typeof map.style === 'string' && /^(stamen|mapbox:\/\/)/.test(map.style))
|
|
65
|
+
map.style = 'open-street-map';
|
|
66
|
+
layout[newKey] = map;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// Plotly attributes that hold colours: *color, colorway, colorscale and pie's marker.colors.
|
|
70
|
+
const isColorKey = (key) => key.toLowerCase().endsWith('color') ||
|
|
71
|
+
key === 'colors' ||
|
|
72
|
+
key === 'colorway' ||
|
|
73
|
+
key === 'colorscale';
|
|
74
|
+
function normalizeColors(props) {
|
|
75
|
+
for (const [key, value] of Object.entries(props)) {
|
|
76
|
+
if (isColorKey(key))
|
|
77
|
+
props[key] = normalizeColorValue(value, false);
|
|
78
|
+
else if (isObject(value))
|
|
79
|
+
normalizeColors(value);
|
|
80
|
+
else if (Array.isArray(value))
|
|
81
|
+
for (const item of value)
|
|
82
|
+
if (isObject(item))
|
|
83
|
+
normalizeColors(item);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
// Covers a single colour, a per-point list and colorscale stops ([[0, "ff0000"], ...]).
|
|
87
|
+
function normalizeColorValue(value, inList) {
|
|
88
|
+
if (Array.isArray(value))
|
|
89
|
+
return value.map((v) => normalizeColorValue(v, true));
|
|
90
|
+
if (typeof value !== 'string')
|
|
91
|
+
return value;
|
|
92
|
+
// Plotly reads numeric strings in a per-point list as numbers for the colorscale.
|
|
93
|
+
if (inList && /^\s*\d+\s*$/.test(value))
|
|
94
|
+
return value;
|
|
95
|
+
return normalizePlotlyColor(value);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Rewrites colour spellings Plotly 3 accepted but Plotly 4 rejects (hex without `#`, `hsv()`)
|
|
99
|
+
* into valid CSS. Anything else is returned unchanged.
|
|
100
|
+
*/
|
|
101
|
+
export function normalizePlotlyColor(color) {
|
|
102
|
+
const value = color.trim();
|
|
103
|
+
if (BARE_HEX.test(value))
|
|
104
|
+
return `#${value}`;
|
|
105
|
+
const hsv = HSV_FUNCTION.exec(value);
|
|
106
|
+
if (!hsv)
|
|
107
|
+
return color;
|
|
108
|
+
const { r, g, b } = hsvToRgb({
|
|
109
|
+
h: Number(hsv[1]),
|
|
110
|
+
s: unit(hsv[2], hsv[3] === '%'),
|
|
111
|
+
v: unit(hsv[4], hsv[5] === '%')
|
|
112
|
+
});
|
|
113
|
+
const rgb = `${Math.round(r)},${Math.round(g)},${Math.round(b)}`;
|
|
114
|
+
if (hsv[6] === undefined)
|
|
115
|
+
return `rgb(${rgb})`;
|
|
116
|
+
return `rgba(${rgb},${+unit(hsv[6], hsv[7] === '%').toFixed(3)})`;
|
|
117
|
+
}
|
|
118
|
+
// Plotly 3 (TinyColor) read 0..1 as a fraction and anything above 1 as a percentage.
|
|
119
|
+
function unit(s, percent) {
|
|
120
|
+
let x = Number(s);
|
|
121
|
+
if (percent || x > 1)
|
|
122
|
+
x /= 100;
|
|
123
|
+
return Math.min(1, Math.max(0, x));
|
|
124
|
+
}
|
package/dist/i18n/messages.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export interface ViewerMessages {
|
|
|
23
23
|
lookTechnical: string;
|
|
24
24
|
lookStudio: string;
|
|
25
25
|
lookShowcase: string;
|
|
26
|
+
lookNight: string;
|
|
27
|
+
nightMode: string;
|
|
26
28
|
lookArctic: string;
|
|
27
29
|
lookXray: string;
|
|
28
30
|
lookLineart: string;
|
|
@@ -54,6 +56,10 @@ export interface ViewerMessages {
|
|
|
54
56
|
solveMessagesEscHint: string;
|
|
55
57
|
solveMessagesDismiss: string;
|
|
56
58
|
solveSolving: string;
|
|
59
|
+
/** A visible solve has landed; followed by how long it took. */
|
|
60
|
+
solveDone: string;
|
|
61
|
+
/** A visible solve was aborted; the previous result stays. */
|
|
62
|
+
solveStopped: string;
|
|
57
63
|
parametersTab: string;
|
|
58
64
|
moreTab: string;
|
|
59
65
|
scrollTabsBack: string;
|
|
@@ -102,6 +108,16 @@ export interface ViewerMessages {
|
|
|
102
108
|
/** `{max}` is replaced with the field's character limit. */
|
|
103
109
|
maxLength: string;
|
|
104
110
|
invalidFormat: string;
|
|
111
|
+
/** Trigger label; `{color}` is the current hex value. */
|
|
112
|
+
colorPick: string;
|
|
113
|
+
colorArea: string;
|
|
114
|
+
/** `{s}` and `{v}` are percentages. */
|
|
115
|
+
colorAreaValue: string;
|
|
116
|
+
colorHue: string;
|
|
117
|
+
colorHex: string;
|
|
118
|
+
colorHexInvalid: string;
|
|
119
|
+
colorPresets: string;
|
|
120
|
+
colorEyedropper: string;
|
|
105
121
|
invalidPattern: string;
|
|
106
122
|
/** The pick button when the input takes several kinds of object. */
|
|
107
123
|
geometryPickAnyOne: string;
|
|
@@ -183,6 +199,7 @@ export interface ViewerMessages {
|
|
|
183
199
|
copied: string;
|
|
184
200
|
chartReceiving: string;
|
|
185
201
|
chartRenderFailed: string;
|
|
202
|
+
downloadChartImage: string;
|
|
186
203
|
/** `{error}` is replaced with the browser's reason. */
|
|
187
204
|
fullscreenUnavailable: string;
|
|
188
205
|
/** `{error}` is replaced with the browser's reason. */
|
package/dist/i18n/messages.js
CHANGED
|
@@ -32,6 +32,8 @@ const en = {
|
|
|
32
32
|
lookTechnical: 'Technical',
|
|
33
33
|
lookStudio: 'Studio',
|
|
34
34
|
lookShowcase: 'Showcase',
|
|
35
|
+
lookNight: 'Night',
|
|
36
|
+
nightMode: 'Night mode',
|
|
35
37
|
lookArctic: 'Arctic',
|
|
36
38
|
lookXray: 'X-Ray',
|
|
37
39
|
lookLineart: 'Line Art',
|
|
@@ -61,6 +63,8 @@ const en = {
|
|
|
61
63
|
solveMessagesEscHint: 'Esc aborts the solve',
|
|
62
64
|
solveMessagesDismiss: 'Dismiss',
|
|
63
65
|
solveSolving: 'Solving…',
|
|
66
|
+
solveDone: 'Done',
|
|
67
|
+
solveStopped: 'Stopped',
|
|
64
68
|
parametersTab: 'Parameters',
|
|
65
69
|
moreTab: 'More',
|
|
66
70
|
scrollTabsBack: 'Previous tabs',
|
|
@@ -98,6 +102,14 @@ const en = {
|
|
|
98
102
|
fineDragHint: 'Hold Shift to drag finely',
|
|
99
103
|
maxLength: 'Maximum {max} characters allowed',
|
|
100
104
|
invalidFormat: 'Invalid format',
|
|
105
|
+
colorPick: 'Choose color, currently {color}',
|
|
106
|
+
colorArea: 'Saturation and brightness',
|
|
107
|
+
colorAreaValue: 'Saturation {s}%, brightness {v}%',
|
|
108
|
+
colorHue: 'Hue',
|
|
109
|
+
colorHex: 'Hex color',
|
|
110
|
+
colorHexInvalid: 'Enter a hex color such as #2f6fd6',
|
|
111
|
+
colorPresets: 'Presets',
|
|
112
|
+
colorEyedropper: 'Pick a color from the screen',
|
|
101
113
|
invalidPattern: 'Invalid validation pattern configured',
|
|
102
114
|
geometryPickAnyOne: 'Pick an object',
|
|
103
115
|
geometryPickAnyOther: 'Pick objects',
|
|
@@ -166,6 +178,7 @@ const en = {
|
|
|
166
178
|
copied: 'Copied!',
|
|
167
179
|
chartReceiving: 'Receiving chart data...',
|
|
168
180
|
chartRenderFailed: 'Failed to render chart',
|
|
181
|
+
downloadChartImage: 'Download plot as image',
|
|
169
182
|
fullscreenUnavailable: 'Fullscreen unavailable: {error}',
|
|
170
183
|
exitFullscreenFailed: 'Exit fullscreen failed: {error}',
|
|
171
184
|
imageViewer: 'image viewer',
|
|
@@ -206,6 +219,8 @@ const de = {
|
|
|
206
219
|
lookTechnical: 'Technisch',
|
|
207
220
|
lookStudio: 'Studio',
|
|
208
221
|
lookShowcase: 'Präsentation',
|
|
222
|
+
lookNight: 'Nacht',
|
|
223
|
+
nightMode: 'Nachtmodus',
|
|
209
224
|
lookArctic: 'Arktis',
|
|
210
225
|
lookXray: 'Röntgen',
|
|
211
226
|
lookLineart: 'Strichzeichnung',
|
|
@@ -235,6 +250,8 @@ const de = {
|
|
|
235
250
|
solveMessagesEscHint: 'Esc bricht die Berechnung ab',
|
|
236
251
|
solveMessagesDismiss: 'Schliessen',
|
|
237
252
|
solveSolving: 'Berechnung läuft…',
|
|
253
|
+
solveDone: 'Fertig',
|
|
254
|
+
solveStopped: 'Abgebrochen',
|
|
238
255
|
parametersTab: 'Parameter',
|
|
239
256
|
moreTab: 'Mehr',
|
|
240
257
|
scrollTabsBack: 'Vorherige Tabs',
|
|
@@ -272,6 +289,14 @@ const de = {
|
|
|
272
289
|
fineDragHint: 'Umschalttaste halten für feine Schritte',
|
|
273
290
|
maxLength: 'Höchstens {max} Zeichen erlaubt',
|
|
274
291
|
invalidFormat: 'Ungültiges Format',
|
|
292
|
+
colorPick: 'Farbe wählen, aktuell {color}',
|
|
293
|
+
colorArea: 'Sättigung und Helligkeit',
|
|
294
|
+
colorAreaValue: 'Sättigung {s} %, Helligkeit {v} %',
|
|
295
|
+
colorHue: 'Farbton',
|
|
296
|
+
colorHex: 'Hex-Farbe',
|
|
297
|
+
colorHexInvalid: 'Hex-Farbe eingeben, z. B. #2f6fd6',
|
|
298
|
+
colorPresets: 'Vorgaben',
|
|
299
|
+
colorEyedropper: 'Farbe vom Bildschirm aufnehmen',
|
|
275
300
|
invalidPattern: 'Ungültiges Prüfmuster hinterlegt',
|
|
276
301
|
geometryPickAnyOne: 'Objekt wählen',
|
|
277
302
|
geometryPickAnyOther: 'Objekte wählen',
|
|
@@ -340,6 +365,7 @@ const de = {
|
|
|
340
365
|
copied: 'Kopiert!',
|
|
341
366
|
chartReceiving: 'Diagrammdaten werden empfangen…',
|
|
342
367
|
chartRenderFailed: 'Diagramm konnte nicht dargestellt werden',
|
|
368
|
+
downloadChartImage: 'Diagramm als Bild herunterladen',
|
|
343
369
|
fullscreenUnavailable: 'Vollbild nicht verfügbar: {error}',
|
|
344
370
|
exitFullscreenFailed: 'Vollbild konnte nicht beendet werden: {error}',
|
|
345
371
|
imageViewer: 'Bildbetrachter',
|
package/dist/index.d.ts
CHANGED
|
@@ -5,10 +5,12 @@ export { default as SolveMessages } from './components/compute/SolveMessages.sve
|
|
|
5
5
|
export { default as ErrorScreen } from './components/ErrorScreen.svelte';
|
|
6
6
|
export * from './components/primitives';
|
|
7
7
|
export { default as StateDisplay } from './components/primitives/StateDisplay.svelte';
|
|
8
|
+
export { default as ColorInput } from './components/preview/inputs/ColorInput.svelte';
|
|
8
9
|
export { default as Viewer } from './components/viewer/Viewer.svelte';
|
|
9
10
|
export * from './schema/defaults';
|
|
10
11
|
export * from './schema/dynamic-value-list';
|
|
11
12
|
export * from './schema/traversal';
|
|
13
|
+
export { visibleInputItems } from './schema/visibility-rules';
|
|
12
14
|
export { type UIHost, type ElementKind, HOST_LABELS, isGeometryParamType, layoutItemKind, hostsFor, isSupportedOn, valuelessInputIds, unsupportedItems } from './schema/host-support';
|
|
13
15
|
export * from './compute/solving.svelte';
|
|
14
16
|
export { useSolveSession } from './compute/useSolveSession.svelte';
|
package/dist/index.js
CHANGED
|
@@ -9,10 +9,12 @@ export { default as ErrorScreen } from './components/ErrorScreen.svelte';
|
|
|
9
9
|
// Design-system primitives (shadcn-svelte + custom)
|
|
10
10
|
export * from './components/primitives';
|
|
11
11
|
export { default as StateDisplay } from './components/primitives/StateDisplay.svelte';
|
|
12
|
+
export { default as ColorInput } from './components/preview/inputs/ColorInput.svelte';
|
|
12
13
|
export { default as Viewer } from './components/viewer/Viewer.svelte';
|
|
13
14
|
export * from './schema/defaults';
|
|
14
15
|
export * from './schema/dynamic-value-list';
|
|
15
16
|
export * from './schema/traversal';
|
|
17
|
+
export { visibleInputItems } from './schema/visibility-rules';
|
|
16
18
|
export { HOST_LABELS, isGeometryParamType, layoutItemKind, hostsFor, isSupportedOn, valuelessInputIds, unsupportedItems } from './schema/host-support';
|
|
17
19
|
export * from './compute/solving.svelte';
|
|
18
20
|
// Solve Session seam. Re-exported so transports outside this package — e.g.
|
package/dist/public.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { writeExternalValue, readExternalValue, clearExternalValue, getExternalI
|
|
|
14
14
|
export * from './schema/defaults';
|
|
15
15
|
export * from './schema/traversal';
|
|
16
16
|
export * from './schema/dynamic-value-list';
|
|
17
|
+
export { visibleInputItems } from './schema/visibility-rules';
|
|
17
18
|
export type { ActionButton } from './types/actionButton';
|
|
18
19
|
export type { SolveFn, SolveResult, SolveDiagnostic } from '@selvajs/solve/shared';
|
|
19
20
|
export { DEFAULT_PRESET_LABELS, type PresetLabels } from './types/presetLabels';
|
package/dist/public.js
CHANGED
|
@@ -28,4 +28,5 @@ export { writeExternalValue, readExternalValue, clearExternalValue, getExternalI
|
|
|
28
28
|
export * from './schema/defaults';
|
|
29
29
|
export * from './schema/traversal';
|
|
30
30
|
export * from './schema/dynamic-value-list';
|
|
31
|
+
export { visibleInputItems } from './schema/visibility-rules';
|
|
31
32
|
export { DEFAULT_PRESET_LABELS } from './types/presetLabels';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LayoutItem, VisibilityRule, VisibilityCondition, GroupVisibilityCondition, TabConfig } from '@selvajs/schemas';
|
|
1
|
+
import type { InputLayoutItem, LayoutItem, VisibilityRule, VisibilityCondition, GroupVisibilityCondition, TabConfig, UISchema } from '@selvajs/schemas';
|
|
2
2
|
export interface VisibilityResult {
|
|
3
3
|
visible: boolean;
|
|
4
4
|
disabled: boolean;
|
|
@@ -20,6 +20,12 @@ export declare function evaluateGroupVisibility(group: {
|
|
|
20
20
|
items?: LayoutItem[];
|
|
21
21
|
}, values: Record<string, unknown>): boolean;
|
|
22
22
|
export declare function isTabVisible(tab: TabConfig, values: Record<string, unknown>): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The input items the form shows for these values: each passes its own condition, inside a
|
|
25
|
+
* shown group and, when tabbed, a shown tab. For a host that repeats the form back, such as a
|
|
26
|
+
* summary before a commit, without re-deriving the renderer's rules.
|
|
27
|
+
*/
|
|
28
|
+
export declare function visibleInputItems(schema: UISchema, values: Record<string, unknown>): InputLayoutItem[];
|
|
23
29
|
/**
|
|
24
30
|
* A linebreak is always "visible" but renders as a divider only, so a group left with
|
|
25
31
|
* nothing but separators counts as empty.
|
|
@@ -106,6 +106,23 @@ export function evaluateGroupVisibility(group, values) {
|
|
|
106
106
|
export function isTabVisible(tab, values) {
|
|
107
107
|
return (tab.visible !== false && tab.groups.some((group) => evaluateGroupVisibility(group, values)));
|
|
108
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* The input items the form shows for these values: each passes its own condition, inside a
|
|
111
|
+
* shown group and, when tabbed, a shown tab. For a host that repeats the form back, such as a
|
|
112
|
+
* summary before a commit, without re-deriving the renderer's rules.
|
|
113
|
+
*/
|
|
114
|
+
export function visibleInputItems(schema, values) {
|
|
115
|
+
const layout = schema?.layout;
|
|
116
|
+
const groups = layout?.type === 'tabbed'
|
|
117
|
+
? (layout.tabs ?? []).filter((t) => isTabVisible(t, values)).flatMap((t) => t.groups ?? [])
|
|
118
|
+
: layout?.type === 'flat'
|
|
119
|
+
? (layout.groups ?? [])
|
|
120
|
+
: [];
|
|
121
|
+
return groups
|
|
122
|
+
.filter((g) => evaluateGroupVisibility(g, values))
|
|
123
|
+
.flatMap((g) => g.items ?? [])
|
|
124
|
+
.filter((i) => i.type === 'input' && evaluateVisibility(i, values).visible);
|
|
125
|
+
}
|
|
109
126
|
/**
|
|
110
127
|
* A linebreak is always "visible" but renders as a divider only, so a group left with
|
|
111
128
|
* nothing but separators counts as empty.
|