@restio/ui 0.0.8-SNAPSHOT → 0.0.9-SNAPSHOT
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/dist/components/anchored-overlay/anchored-overlay-types.d.ts +1 -1
- package/dist/components/anchored-overlay/anchored-overlay-types.js +2 -0
- package/dist/components/anchored-overlay/anchored-overlay-types.js.map +1 -0
- package/dist/components/anchored-overlay/anchored-overlay.d.ts +2 -2
- package/dist/components/anchored-overlay/anchored-overlay.js +67 -0
- package/dist/components/anchored-overlay/anchored-overlay.js.map +1 -0
- package/dist/components/banner/banner-types.d.ts +1 -1
- package/dist/components/banner/banner-types.js +2 -0
- package/dist/components/banner/banner-types.js.map +1 -0
- package/dist/components/banner/banner.d.ts +2 -2
- package/dist/components/banner/banner.js +29 -0
- package/dist/components/banner/banner.js.map +1 -0
- package/dist/components/button/button-types.d.ts +1 -1
- package/dist/components/button/button-types.js +2 -0
- package/dist/components/button/button-types.js.map +1 -0
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/button/button.js +20 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button-group/button-group-types.js +2 -0
- package/dist/components/button-group/button-group-types.js.map +1 -0
- package/dist/components/button-group/button-group.d.ts +2 -2
- package/dist/components/button-group/button-group.js +16 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/checkbox/checkbox-types.d.ts +1 -1
- package/dist/components/checkbox/checkbox-types.js +2 -0
- package/dist/components/checkbox/checkbox-types.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +2 -2
- package/dist/components/checkbox/checkbox.js +19 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +1 -1
- package/dist/components/code-block/code-block.js +9 -0
- package/dist/components/code-block/code-block.js.map +1 -0
- package/dist/components/file-upload/file-upload-types.d.ts +1 -1
- package/dist/components/file-upload/file-upload-types.js +2 -0
- package/dist/components/file-upload/file-upload-types.js.map +1 -0
- package/dist/components/file-upload/file-upload-utils.js +10 -0
- package/dist/components/file-upload/file-upload-utils.js.map +1 -0
- package/dist/components/file-upload/file-upload.d.ts +2 -2
- package/dist/components/file-upload/file-upload.js +106 -0
- package/dist/components/file-upload/file-upload.js.map +1 -0
- package/dist/components/graph/graph-types.js +2 -0
- package/dist/components/graph/graph-types.js.map +1 -0
- package/dist/components/graph/graph.d.ts +1 -1
- package/dist/components/graph/graph.js +21 -0
- package/dist/components/graph/graph.js.map +1 -0
- package/dist/components/input/date/date-calendar.d.ts +2 -2
- package/dist/components/input/date/date-calendar.js +114 -0
- package/dist/components/input/date/date-calendar.js.map +1 -0
- package/dist/components/input/date/date-input-field.d.ts +2 -2
- package/dist/components/input/date/date-input-field.js +61 -0
- package/dist/components/input/date/date-input-field.js.map +1 -0
- package/dist/components/input/date/date-picker.d.ts +2 -2
- package/dist/components/input/date/date-picker.js +35 -0
- package/dist/components/input/date/date-picker.js.map +1 -0
- package/dist/components/input/date/date-range-input-field.d.ts +2 -2
- package/dist/components/input/date/date-range-input-field.js +90 -0
- package/dist/components/input/date/date-range-input-field.js.map +1 -0
- package/dist/components/input/date/date-range-picker.d.ts +2 -2
- package/dist/components/input/date/date-range-picker.js +74 -0
- package/dist/components/input/date/date-range-picker.js.map +1 -0
- package/dist/components/input/date/date-shortcuts.d.ts +2 -2
- package/dist/components/input/date/date-shortcuts.js +47 -0
- package/dist/components/input/date/date-shortcuts.js.map +1 -0
- package/dist/components/input/date/date-types.d.ts +1 -1
- package/dist/components/input/date/date-types.js +2 -0
- package/dist/components/input/date/date-types.js.map +1 -0
- package/dist/components/input/date/date-utils.d.ts +1 -1
- package/dist/components/input/date/date-utils.js +203 -0
- package/dist/components/input/date/date-utils.js.map +1 -0
- package/dist/components/input/input-types.js +2 -0
- package/dist/components/input/input-types.js.map +1 -0
- package/dist/components/input/input.d.ts +2 -2
- package/dist/components/input/input.js +14 -0
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/input/number/input-number-types.d.ts +1 -1
- package/dist/components/input/number/input-number-types.js +2 -0
- package/dist/components/input/number/input-number-types.js.map +1 -0
- package/dist/components/input/number/input-number.d.ts +2 -2
- package/dist/components/input/number/input-number.js +11 -0
- package/dist/components/input/number/input-number.js.map +1 -0
- package/dist/components/input/text/input-text-types.d.ts +1 -1
- package/dist/components/input/text/input-text-types.js +2 -0
- package/dist/components/input/text/input-text-types.js.map +1 -0
- package/dist/components/input/text/input-text.d.ts +2 -2
- package/dist/components/input/text/input-text.js +8 -0
- package/dist/components/input/text/input-text.js.map +1 -0
- package/dist/components/kbd/kbd-types.js +2 -0
- package/dist/components/kbd/kbd-types.js.map +1 -0
- package/dist/components/kbd/kbd.d.ts +2 -2
- package/dist/components/kbd/kbd.js +12 -0
- package/dist/components/kbd/kbd.js.map +1 -0
- package/dist/components/kbd-group/kbd-group-types.js +2 -0
- package/dist/components/kbd-group/kbd-group-types.js.map +1 -0
- package/dist/components/kbd-group/kbd-group.d.ts +2 -2
- package/dist/components/kbd-group/kbd-group.js +15 -0
- package/dist/components/kbd-group/kbd-group.js.map +1 -0
- package/dist/components/list/list-types.d.ts +1 -1
- package/dist/components/list/list-types.js +2 -0
- package/dist/components/list/list-types.js.map +1 -0
- package/dist/components/list/list-utils.d.ts +4 -4
- package/dist/components/list/list-utils.js +73 -0
- package/dist/components/list/list-utils.js.map +1 -0
- package/dist/components/list/list.d.ts +1 -1
- package/dist/components/list/list.js +68 -0
- package/dist/components/list/list.js.map +1 -0
- package/dist/components/menu/anchored-navigation-menu.d.ts +3 -3
- package/dist/components/menu/anchored-navigation-menu.js +48 -0
- package/dist/components/menu/anchored-navigation-menu.js.map +1 -0
- package/dist/components/menu/menu-assets.d.ts +1 -1
- package/dist/components/menu/menu-assets.js +35 -0
- package/dist/components/menu/menu-assets.js.map +1 -0
- package/dist/components/menu/menu-types.d.ts +2 -2
- package/dist/components/menu/menu-types.js +2 -0
- package/dist/components/menu/menu-types.js.map +1 -0
- package/dist/components/menu/menu.d.ts +2 -2
- package/dist/components/menu/menu.js +86 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/otp/otp-types.js +2 -0
- package/dist/components/otp/otp-types.js.map +1 -0
- package/dist/components/otp/otp-utils.js +22 -0
- package/dist/components/otp/otp-utils.js.map +1 -0
- package/dist/components/otp/otp.d.ts +3 -2
- package/dist/components/otp/otp.js +85 -0
- package/dist/components/otp/otp.js.map +1 -0
- package/dist/components/select/select-types.d.ts +1 -1
- package/dist/components/select/select-types.js +2 -0
- package/dist/components/select/select-types.js.map +1 -0
- package/dist/components/select/select.d.ts +2 -2
- package/dist/components/select/select.js +52 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/tag/tag-types.d.ts +1 -1
- package/dist/components/tag/tag-types.js +2 -0
- package/dist/components/tag/tag-types.js.map +1 -0
- package/dist/components/tag/tag.d.ts +2 -2
- package/dist/components/tag/tag.js +16 -0
- package/dist/components/tag/tag.js.map +1 -0
- package/dist/components/textarea/textarea-types.d.ts +2 -2
- package/dist/components/textarea/textarea-types.js +2 -0
- package/dist/components/textarea/textarea-types.js.map +1 -0
- package/dist/components/textarea/textarea.d.ts +2 -2
- package/dist/components/textarea/textarea.js +19 -0
- package/dist/components/textarea/textarea.js.map +1 -0
- package/dist/components/toast-group/toast-group-types.d.ts +1 -1
- package/dist/components/toast-group/toast-group-types.js +2 -0
- package/dist/components/toast-group/toast-group-types.js.map +1 -0
- package/dist/components/toast-group/toast-group.d.ts +2 -2
- package/dist/components/toast-group/toast-group.js +25 -0
- package/dist/components/toast-group/toast-group.js.map +1 -0
- package/dist/components/typography/typography-types.d.ts +1 -1
- package/dist/components/typography/typography-types.js +11 -0
- package/dist/components/typography/typography-types.js.map +1 -0
- package/dist/components/typography/typography.d.ts +2 -2
- package/dist/components/typography/typography.js +17 -0
- package/dist/components/typography/typography.js.map +1 -0
- package/dist/custom-components/chat/chat-types.d.ts +1 -1
- package/dist/custom-components/chat/chat-types.js +2 -0
- package/dist/custom-components/chat/chat-types.js.map +1 -0
- package/dist/custom-components/chat/chat.d.ts +1 -1
- package/dist/custom-components/chat/chat.js +14 -0
- package/dist/custom-components/chat/chat.js.map +1 -0
- package/dist/custom-components/layout/layout-types.js +2 -0
- package/dist/custom-components/layout/layout-types.js.map +1 -0
- package/dist/custom-components/layout/layout.d.ts +2 -2
- package/dist/custom-components/layout/layout.js +46 -0
- package/dist/custom-components/layout/layout.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-constants.js +25 -0
- package/dist/custom-components/layout-builder/layout-builder-constants.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-schema.js +169 -0
- package/dist/custom-components/layout-builder/layout-builder-schema.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-templates.js +206 -0
- package/dist/custom-components/layout-builder/layout-builder-templates.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-types.js +2 -0
- package/dist/custom-components/layout-builder/layout-builder-types.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-utils.js +251 -0
- package/dist/custom-components/layout-builder/layout-builder-utils.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-validation.d.ts +8 -2
- package/dist/custom-components/layout-builder/layout-builder-validation.js +445 -0
- package/dist/custom-components/layout-builder/layout-builder-validation.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder.d.ts +2 -2
- package/dist/custom-components/layout-builder/layout-builder.js +908 -0
- package/dist/custom-components/layout-builder/layout-builder.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-json-editor-types.d.ts +1 -1
- package/dist/custom-components/layout-builder/layout-json-editor-types.js +2 -0
- package/dist/custom-components/layout-builder/layout-json-editor-types.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-json-editor.d.ts +2 -2
- package/dist/custom-components/layout-builder/layout-json-editor.js +103 -0
- package/dist/custom-components/layout-builder/layout-json-editor.js.map +1 -0
- package/dist/custom-components/layout-builder/stories/hooks/useHistory.js +100 -0
- package/dist/custom-components/layout-builder/stories/hooks/useHistory.js.map +1 -0
- package/dist/custom-components/markdown/markdown-types.d.ts +3 -3
- package/dist/custom-components/markdown/markdown-types.js +2 -0
- package/dist/custom-components/markdown/markdown-types.js.map +1 -0
- package/dist/custom-components/markdown/markdown-utils.js +10 -0
- package/dist/custom-components/markdown/markdown-utils.js.map +1 -0
- package/dist/custom-components/markdown/markdown.d.ts +2 -2
- package/dist/custom-components/markdown/markdown.js +39 -0
- package/dist/custom-components/markdown/markdown.js.map +1 -0
- package/dist/custom-components/mindmap/index.d.ts +2 -2
- package/dist/custom-components/mindmap/index.js +2 -0
- package/dist/custom-components/mindmap/index.js.map +1 -0
- package/dist/custom-components/mindmap/mind-tree-types.d.ts +1 -1
- package/dist/custom-components/mindmap/mind-tree-types.js +2 -0
- package/dist/custom-components/mindmap/mind-tree-types.js.map +1 -0
- package/dist/custom-components/mindmap/mind-tree.d.ts +1 -1
- package/dist/custom-components/mindmap/mind-tree.js +201 -0
- package/dist/custom-components/mindmap/mind-tree.js.map +1 -0
- package/dist/custom-components/mindmap/reingold-tilford-algorithm.d.ts +1 -1
- package/dist/custom-components/mindmap/reingold-tilford-algorithm.js +277 -0
- package/dist/custom-components/mindmap/reingold-tilford-algorithm.js.map +1 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip-types.js +2 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip-types.js.map +1 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.d.ts +2 -2
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.js +32 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.js.map +1 -0
- package/dist/custom-components/timeline/skeleton/timeline-skeleton.d.ts +1 -1
- package/dist/custom-components/timeline/skeleton/timeline-skeleton.js +19 -0
- package/dist/custom-components/timeline/skeleton/timeline-skeleton.js.map +1 -0
- package/dist/custom-components/timeline/timeline-types.js +2 -0
- package/dist/custom-components/timeline/timeline-types.js.map +1 -0
- package/dist/custom-components/timeline/timeline.d.ts +2 -2
- package/dist/custom-components/timeline/timeline.js +64 -0
- package/dist/custom-components/timeline/timeline.js.map +1 -0
- package/dist/custom-components/workflow/layout/workflow-edge.d.ts +1 -1
- package/dist/custom-components/workflow/layout/workflow-edge.js +31 -0
- package/dist/custom-components/workflow/layout/workflow-edge.js.map +1 -0
- package/dist/custom-components/workflow/layout/workflow-layout-types.d.ts +1 -1
- package/dist/custom-components/workflow/layout/workflow-layout-types.js +2 -0
- package/dist/custom-components/workflow/layout/workflow-layout-types.js.map +1 -0
- package/dist/custom-components/workflow/layout/workflow-layout.d.ts +2 -2
- package/dist/custom-components/workflow/layout/workflow-layout.js +284 -0
- package/dist/custom-components/workflow/layout/workflow-layout.js.map +1 -0
- package/dist/custom-components/workflow/node/workflow-node.d.ts +1 -1
- package/dist/custom-components/workflow/node/workflow-node.js +22 -0
- package/dist/custom-components/workflow/node/workflow-node.js.map +1 -0
- package/dist/custom-components/workflow/panel/workflow-panel-types.d.ts +1 -1
- package/dist/custom-components/workflow/panel/workflow-panel-types.js +2 -0
- package/dist/custom-components/workflow/panel/workflow-panel-types.js.map +1 -0
- package/dist/custom-components/workflow/panel/workflow-panel.d.ts +1 -1
- package/dist/custom-components/workflow/panel/workflow-panel.js +53 -0
- package/dist/custom-components/workflow/panel/workflow-panel.js.map +1 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar-types.js +2 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar-types.js.map +1 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar.d.ts +1 -1
- package/dist/custom-components/workflow/toolbar/workflow-toolbar.js +19 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar.js.map +1 -0
- package/dist/custom-components/workflow/utils/workflow-validation.d.ts +2 -2
- package/dist/custom-components/workflow/utils/workflow-validation.js +257 -0
- package/dist/custom-components/workflow/utils/workflow-validation.js.map +1 -0
- package/dist/custom-components/workflow/workflow-types.d.ts +3 -3
- package/dist/custom-components/workflow/workflow-types.js +2 -0
- package/dist/custom-components/workflow/workflow-types.js.map +1 -0
- package/dist/custom-components/workflow/workflow.d.ts +1 -1
- package/dist/custom-components/workflow/workflow.js +125 -0
- package/dist/custom-components/workflow/workflow.js.map +1 -0
- package/dist/data-components/assets/data-components-asset.js +2 -0
- package/dist/data-components/assets/data-components-asset.js.map +1 -0
- package/dist/data-components/calendar/calendar-types.d.ts +1 -1
- package/dist/data-components/calendar/calendar-types.js +2 -0
- package/dist/data-components/calendar/calendar-types.js.map +1 -0
- package/dist/data-components/calendar/calendar-utils.js +2 -0
- package/dist/data-components/calendar/calendar-utils.js.map +1 -0
- package/dist/data-components/calendar/calendar.d.ts +1 -1
- package/dist/data-components/calendar/calendar.js +78 -0
- package/dist/data-components/calendar/calendar.js.map +1 -0
- package/dist/data-components/cell/cell-switch.d.ts +1 -1
- package/dist/data-components/cell/cell-switch.js +68 -0
- package/dist/data-components/cell/cell-switch.js.map +1 -0
- package/dist/data-components/cell/cell-types.d.ts +2 -2
- package/dist/data-components/cell/cell-types.js +2 -0
- package/dist/data-components/cell/cell-types.js.map +1 -0
- package/dist/data-components/cell/cell-utils.js +60 -0
- package/dist/data-components/cell/cell-utils.js.map +1 -0
- package/dist/data-components/cell/cell.d.ts +1 -1
- package/dist/data-components/cell/cell.js +63 -0
- package/dist/data-components/cell/cell.js.map +1 -0
- package/dist/data-components/chart/chart-types.d.ts +1 -1
- package/dist/data-components/chart/chart-types.js +2 -0
- package/dist/data-components/chart/chart-types.js.map +1 -0
- package/dist/data-components/chart/chart.d.ts +1 -1
- package/dist/data-components/chart/chart.js +121 -0
- package/dist/data-components/chart/chart.js.map +1 -0
- package/dist/data-components/chart/sankey/sankeyChart.d.ts +1 -1
- package/dist/data-components/chart/sankey/sankeyChart.js +111 -0
- package/dist/data-components/chart/sankey/sankeyChart.js.map +1 -0
- package/dist/data-components/data-structure/data-structure-utils.d.ts +1 -1
- package/dist/data-components/data-structure/data-structure-utils.js +28 -0
- package/dist/data-components/data-structure/data-structure-utils.js.map +1 -0
- package/dist/data-components/data-structure/data-structure.d.ts +1 -1
- package/dist/data-components/data-structure/data-structure.js +2 -0
- package/dist/data-components/data-structure/data-structure.js.map +1 -0
- package/dist/data-components/data-structure/stories-assets.d.ts +5 -1
- package/dist/data-components/data-structure/stories-assets.js +199 -0
- package/dist/data-components/data-structure/stories-assets.js.map +1 -0
- package/dist/data-components/form/form-types.d.ts +2 -2
- package/dist/data-components/form/form-types.js +2 -0
- package/dist/data-components/form/form-types.js.map +1 -0
- package/dist/data-components/form/form.d.ts +1 -1
- package/dist/data-components/form/form.js +124 -0
- package/dist/data-components/form/form.js.map +1 -0
- package/dist/data-components/table-grid/aggregation/aggregation-utils.js +31 -0
- package/dist/data-components/table-grid/aggregation/aggregation-utils.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.js +264 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.js +306 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.js +2 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.js +33 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.d.ts +2 -2
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.js +59 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.js +167 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.js +2 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.d.ts +2 -2
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.js +157 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/autoDetect.js +27 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/autoDetect.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.d.ts +1 -1
- package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.js +21 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/csvToObj.js +21 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/csvToObj.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/detectDelimeter.js +12 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/detectDelimeter.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/index.d.ts +6 -6
- package/dist/data-components/table-grid/external-functionalities/import/csv/index.js +7 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/index.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.d.ts +1 -1
- package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.js +15 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/parseDelimeted.js +50 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/parseDelimeted.js.map +1 -0
- package/dist/data-components/table-grid/footer/table-grid-footer-types.d.ts +1 -1
- package/dist/data-components/table-grid/footer/table-grid-footer-types.js +2 -0
- package/dist/data-components/table-grid/footer/table-grid-footer-types.js.map +1 -0
- package/dist/data-components/table-grid/footer/table-grid-footer.d.ts +1 -1
- package/dist/data-components/table-grid/footer/table-grid-footer.js +47 -0
- package/dist/data-components/table-grid/footer/table-grid-footer.js.map +1 -0
- package/dist/data-components/table-grid/formula/evaluator.js +91 -0
- package/dist/data-components/table-grid/formula/evaluator.js.map +1 -0
- package/dist/data-components/table-grid/formula/formula-builder-types.d.ts +1 -1
- package/dist/data-components/table-grid/formula/formula-builder-types.js +2 -0
- package/dist/data-components/table-grid/formula/formula-builder-types.js.map +1 -0
- package/dist/data-components/table-grid/formula/formula-builder.d.ts +1 -1
- package/dist/data-components/table-grid/formula/formula-builder.js +47 -0
- package/dist/data-components/table-grid/formula/formula-builder.js.map +1 -0
- package/dist/data-components/table-grid/formula/formula.test.js +50 -0
- package/dist/data-components/table-grid/formula/formula.test.js.map +1 -0
- package/dist/data-components/table-grid/formula/index.js +40 -0
- package/dist/data-components/table-grid/formula/index.js.map +1 -0
- package/dist/data-components/table-grid/formula/parser.js +179 -0
- package/dist/data-components/table-grid/formula/parser.js.map +1 -0
- package/dist/data-components/table-grid/formula/tokenizer.js +140 -0
- package/dist/data-components/table-grid/formula/tokenizer.js.map +1 -0
- package/dist/data-components/table-grid/formula/types.js +2 -0
- package/dist/data-components/table-grid/formula/types.js.map +1 -0
- package/dist/data-components/table-grid/header/grouping/group-panel-types.d.ts +1 -1
- package/dist/data-components/table-grid/header/grouping/group-panel-types.js +2 -0
- package/dist/data-components/table-grid/header/grouping/group-panel-types.js.map +1 -0
- package/dist/data-components/table-grid/header/grouping/group-panel.d.ts +1 -1
- package/dist/data-components/table-grid/header/grouping/group-panel.js +91 -0
- package/dist/data-components/table-grid/header/grouping/group-panel.js.map +1 -0
- package/dist/data-components/table-grid/header/table-grid-column-menu.d.ts +1 -1
- package/dist/data-components/table-grid/header/table-grid-column-menu.js +84 -0
- package/dist/data-components/table-grid/header/table-grid-column-menu.js.map +1 -0
- package/dist/data-components/table-grid/header/table-grid-header-types.d.ts +1 -1
- package/dist/data-components/table-grid/header/table-grid-header-types.js +2 -0
- package/dist/data-components/table-grid/header/table-grid-header-types.js.map +1 -0
- package/dist/data-components/table-grid/header/table-grid-header.d.ts +1 -1
- package/dist/data-components/table-grid/header/table-grid-header.js +148 -0
- package/dist/data-components/table-grid/header/table-grid-header.js.map +1 -0
- package/dist/data-components/table-grid/hooks/use-table.d.ts +1 -1
- package/dist/data-components/table-grid/hooks/use-table.js +18 -0
- package/dist/data-components/table-grid/hooks/use-table.js.map +1 -0
- package/dist/data-components/table-grid/pinning/pinning-utils.d.ts +1 -1
- package/dist/data-components/table-grid/pinning/pinning-utils.js +70 -0
- package/dist/data-components/table-grid/pinning/pinning-utils.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel-types.d.ts +2 -2
- package/dist/data-components/table-grid/pivot/pivot-config-panel-types.js +2 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel-types.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel.d.ts +1 -1
- package/dist/data-components/table-grid/pivot/pivot-config-panel.js +89 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-table.d.ts +1 -1
- package/dist/data-components/table-grid/pivot/pivot-table.js +26 -0
- package/dist/data-components/table-grid/pivot/pivot-table.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-types.d.ts +1 -1
- package/dist/data-components/table-grid/pivot/pivot-types.js +2 -0
- package/dist/data-components/table-grid/pivot/pivot-types.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-utils.d.ts +2 -2
- package/dist/data-components/table-grid/pivot/pivot-utils.js +150 -0
- package/dist/data-components/table-grid/pivot/pivot-utils.js.map +1 -0
- package/dist/data-components/table-grid/row/table-grid-row-types.d.ts +3 -1
- package/dist/data-components/table-grid/row/table-grid-row-types.d.ts.map +1 -1
- package/dist/data-components/table-grid/row/table-grid-row-types.js +2 -0
- package/dist/data-components/table-grid/row/table-grid-row-types.js.map +1 -0
- package/dist/data-components/table-grid/row/table-grid-row-utils.d.ts +2 -2
- package/dist/data-components/table-grid/row/table-grid-row-utils.js +35 -0
- package/dist/data-components/table-grid/row/table-grid-row-utils.js.map +1 -0
- package/dist/data-components/table-grid/row/table-grid-row.d.ts +2 -2
- package/dist/data-components/table-grid/row/table-grid-row.d.ts.map +1 -1
- package/dist/data-components/table-grid/row/table-grid-row.js +68 -0
- package/dist/data-components/table-grid/row/table-grid-row.js.map +1 -0
- package/dist/data-components/table-grid/selection/selection-types.js +2 -0
- package/dist/data-components/table-grid/selection/selection-types.js.map +1 -0
- package/dist/data-components/table-grid/selection/selection-utils.d.ts +2 -2
- package/dist/data-components/table-grid/selection/selection-utils.js +136 -0
- package/dist/data-components/table-grid/selection/selection-utils.js.map +1 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar-types.js +2 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar-types.js.map +1 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.d.ts +1 -1
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.js +7 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.js.map +1 -0
- package/dist/data-components/table-grid/sorting/sorting.d.ts +1 -1
- package/dist/data-components/table-grid/sorting/sorting.js +45 -0
- package/dist/data-components/table-grid/sorting/sorting.js.map +1 -0
- package/dist/data-components/table-grid/table-context/table-context-types.d.ts +2 -2
- package/dist/data-components/table-grid/table-context/table-context-types.js +2 -0
- package/dist/data-components/table-grid/table-context/table-context-types.js.map +1 -0
- package/dist/data-components/table-grid/table-context/table-context.d.ts +2 -2
- package/dist/data-components/table-grid/table-context/table-context.js +4 -0
- package/dist/data-components/table-grid/table-context/table-context.js.map +1 -0
- package/dist/data-components/table-grid/table-grid-context.d.ts +2 -2
- package/dist/data-components/table-grid/table-grid-context.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid-context.js +258 -0
- package/dist/data-components/table-grid/table-grid-context.js.map +1 -0
- package/dist/data-components/table-grid/table-grid-types.d.ts +9 -7
- package/dist/data-components/table-grid/table-grid-types.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid-types.js +2 -0
- package/dist/data-components/table-grid/table-grid-types.js.map +1 -0
- package/dist/data-components/table-grid/table-grid.d.ts +1 -1
- package/dist/data-components/table-grid/table-grid.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid.js +144 -0
- package/dist/data-components/table-grid/table-grid.js.map +1 -0
- package/dist/data-components/table-grid/table-utils.d.ts +1 -1
- package/dist/data-components/table-grid/table-utils.js +116 -0
- package/dist/data-components/table-grid/table-utils.js.map +1 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-types.js +2 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-types.js.map +1 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.d.ts +1 -1
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.js +61 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.js.map +1 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.d.ts +2 -2
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.js +23 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.js.map +1 -0
- package/dist/experimental-components/filter-builder/filter-builder-types.d.ts +1 -1
- package/dist/experimental-components/filter-builder/filter-builder-types.js +2 -0
- package/dist/experimental-components/filter-builder/filter-builder-types.js.map +1 -0
- package/dist/experimental-components/filter-builder/filter-builder.d.ts +3 -2
- package/dist/experimental-components/filter-builder/filter-builder.js +139 -0
- package/dist/experimental-components/filter-builder/filter-builder.js.map +1 -0
- package/dist/framework-components/appbar/appbar-assets.js +5 -0
- package/dist/framework-components/appbar/appbar-assets.js.map +1 -0
- package/dist/framework-components/appbar/appbar-types.d.ts +1 -1
- package/dist/framework-components/appbar/appbar-types.js +2 -0
- package/dist/framework-components/appbar/appbar-types.js.map +1 -0
- package/dist/framework-components/appbar/appbar.d.ts +2 -2
- package/dist/framework-components/appbar/appbar.js +36 -0
- package/dist/framework-components/appbar/appbar.js.map +1 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs-types.js +2 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs-types.js.map +1 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs.d.ts +2 -2
- package/dist/framework-components/breadcrumbs/breadcrumbs.js +31 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/framework-components/drawer/drawer-types.d.ts +2 -2
- package/dist/framework-components/drawer/drawer-types.js +2 -0
- package/dist/framework-components/drawer/drawer-types.js.map +1 -0
- package/dist/framework-components/drawer/drawer.d.ts +2 -2
- package/dist/framework-components/drawer/drawer.js +10 -0
- package/dist/framework-components/drawer/drawer.js.map +1 -0
- package/dist/framework-components/scaffold/scaffold-context.d.ts +2 -2
- package/dist/framework-components/scaffold/scaffold-context.js +10 -0
- package/dist/framework-components/scaffold/scaffold-context.js.map +1 -0
- package/dist/framework-components/scaffold/scaffold-types.d.ts +1 -1
- package/dist/framework-components/scaffold/scaffold-types.js +2 -0
- package/dist/framework-components/scaffold/scaffold-types.js.map +1 -0
- package/dist/framework-components/scaffold/scaffold.d.ts +2 -2
- package/dist/framework-components/scaffold/scaffold.js +76 -0
- package/dist/framework-components/scaffold/scaffold.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-assets.js +4 -0
- package/dist/framework-components/sidebar/sidebar-assets.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-context.d.ts +2 -2
- package/dist/framework-components/sidebar/sidebar-context.js +9 -0
- package/dist/framework-components/sidebar/sidebar-context.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo-types.js +2 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo-types.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.d.ts +1 -1
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.js +12 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-types.d.ts +1 -1
- package/dist/framework-components/sidebar/sidebar-types.js +2 -0
- package/dist/framework-components/sidebar/sidebar-types.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar.d.ts +3 -3
- package/dist/framework-components/sidebar/sidebar.js +42 -0
- package/dist/framework-components/sidebar/sidebar.js.map +1 -0
- package/dist/hooks/useDynamicVirtualList.d.ts +76 -0
- package/dist/hooks/useDynamicVirtualList.d.ts.map +1 -0
- package/dist/hooks/useDynamicVirtualList.js +208 -0
- package/dist/hooks/useDynamicVirtualList.js.map +1 -0
- package/dist/hooks/useFixedVirtualList.d.ts +1 -1
- package/dist/hooks/useFixedVirtualList.js +64 -0
- package/dist/hooks/useFixedVirtualList.js.map +1 -0
- package/dist/hooks/useShortcut.d.ts +1 -1
- package/dist/hooks/useShortcut.js +86 -0
- package/dist/hooks/useShortcut.js.map +1 -0
- package/dist/hooks/useTour/useTour-context-internal.d.ts +2 -2
- package/dist/hooks/useTour/useTour-context-internal.js +7 -0
- package/dist/hooks/useTour/useTour-context-internal.js.map +1 -0
- package/dist/hooks/useTour/useTour-context.d.ts +3 -3
- package/dist/hooks/useTour/useTour-context.js +54 -0
- package/dist/hooks/useTour/useTour-context.js.map +1 -0
- package/dist/hooks/useTour/useTour-types.d.ts +1 -1
- package/dist/hooks/useTour/useTour-types.js +2 -0
- package/dist/hooks/useTour/useTour-types.js.map +1 -0
- package/dist/hooks/useTour/useTour.d.ts +1 -1
- package/dist/hooks/useTour/useTour.js +408 -0
- package/dist/hooks/useTour/useTour.js.map +1 -0
- package/dist/hooks/useVirtualListScroll.d.ts +1 -1
- package/dist/hooks/useVirtualListScroll.js +79 -0
- package/dist/hooks/useVirtualListScroll.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/ai-assistant/ai-assistant-prompts.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-assistant-prompts.js +98 -0
- package/dist/providers/ai-assistant/ai-assistant-prompts.js.map +1 -0
- package/dist/providers/ai-assistant/ai-assistant-types.js +5 -0
- package/dist/providers/ai-assistant/ai-assistant-types.js.map +1 -0
- package/dist/providers/ai-assistant/ai-assistant-validator.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-assistant-validator.js +74 -0
- package/dist/providers/ai-assistant/ai-assistant-validator.js.map +1 -0
- package/dist/providers/ai-assistant/ai-chat-panel-types.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-chat-panel-types.js +2 -0
- package/dist/providers/ai-assistant/ai-chat-panel-types.js.map +1 -0
- package/dist/providers/ai-assistant/ai-chat-panel.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-chat-panel.js +111 -0
- package/dist/providers/ai-assistant/ai-chat-panel.js.map +1 -0
- package/dist/providers/shortcut/shortcut-context.d.ts +2 -2
- package/dist/providers/shortcut/shortcut-context.js +7 -0
- package/dist/providers/shortcut/shortcut-context.js.map +1 -0
- package/dist/providers/shortcut/shortcut-provider.d.ts +1 -1
- package/dist/providers/shortcut/shortcut-provider.js +267 -0
- package/dist/providers/shortcut/shortcut-provider.js.map +1 -0
- package/dist/providers/theme/index.js +2 -0
- package/dist/providers/theme/index.js.map +1 -0
- package/dist/providers/theme/theme-provider-types.js +2 -0
- package/dist/providers/theme/theme-provider-types.js.map +1 -0
- package/dist/providers/theme/themeProvider.d.ts +2 -2
- package/dist/providers/theme/themeProvider.js +17 -0
- package/dist/providers/theme/themeProvider.js.map +1 -0
- package/dist/test/vitest.utils.js +2 -0
- package/dist/test/vitest.utils.js.map +1 -0
- package/dist/types/global-types.js +10 -0
- package/dist/types/global-types.js.map +1 -0
- package/dist/types/storybook-types.js +2 -0
- package/dist/types/storybook-types.js.map +1 -0
- package/dist/utility-components/avatar/avatar-types.d.ts +1 -1
- package/dist/utility-components/avatar/avatar-types.js +2 -0
- package/dist/utility-components/avatar/avatar-types.js.map +1 -0
- package/dist/utility-components/avatar/avatar.d.ts +2 -2
- package/dist/utility-components/avatar/avatar.js +10 -0
- package/dist/utility-components/avatar/avatar.js.map +1 -0
- package/dist/utility-components/chip/chip-types.d.ts +2 -2
- package/dist/utility-components/chip/chip-types.js +2 -0
- package/dist/utility-components/chip/chip-types.js.map +1 -0
- package/dist/utility-components/chip/chip.d.ts +2 -2
- package/dist/utility-components/chip/chip.js +11 -0
- package/dist/utility-components/chip/chip.js.map +1 -0
- package/dist/utility-components/helper-text/helper-text-types.d.ts +1 -1
- package/dist/utility-components/helper-text/helper-text-types.js +2 -0
- package/dist/utility-components/helper-text/helper-text-types.js.map +1 -0
- package/dist/utility-components/helper-text/helper-text.d.ts +1 -1
- package/dist/utility-components/helper-text/helper-text.js +12 -0
- package/dist/utility-components/helper-text/helper-text.js.map +1 -0
- package/dist/utility-components/icon/icon-assets.js +95 -0
- package/dist/utility-components/icon/icon-assets.js.map +1 -0
- package/dist/utility-components/icon/icon-types.d.ts +1 -1
- package/dist/utility-components/icon/icon-types.js +2 -0
- package/dist/utility-components/icon/icon-types.js.map +1 -0
- package/dist/utility-components/icon/icon.d.ts +2 -2
- package/dist/utility-components/icon/icon.js +28 -0
- package/dist/utility-components/icon/icon.js.map +1 -0
- package/dist/utility-components/label/label-types.js +2 -0
- package/dist/utility-components/label/label-types.js.map +1 -0
- package/dist/utility-components/label/label.d.ts +1 -1
- package/dist/utility-components/label/label.js +10 -0
- package/dist/utility-components/label/label.js.map +1 -0
- package/dist/utility-components/overlay-panel/overlay-panel-types.js +2 -0
- package/dist/utility-components/overlay-panel/overlay-panel-types.js.map +1 -0
- package/dist/utility-components/overlay-panel/overlay-panel.d.ts +2 -2
- package/dist/utility-components/overlay-panel/overlay-panel.js +98 -0
- package/dist/utility-components/overlay-panel/overlay-panel.js.map +1 -0
- package/dist/utility-components/overlay-panel/use-focus-trap.d.ts +1 -1
- package/dist/utility-components/overlay-panel/use-focus-trap.js +61 -0
- package/dist/utility-components/overlay-panel/use-focus-trap.js.map +1 -0
- package/dist/utility-components/skeleton/skeleton-types.js +2 -0
- package/dist/utility-components/skeleton/skeleton-types.js.map +1 -0
- package/dist/utility-components/skeleton/skeleton.d.ts +2 -2
- package/dist/utility-components/skeleton/skeleton.js +14 -0
- package/dist/utility-components/skeleton/skeleton.js.map +1 -0
- package/dist/utility-components/stack/stack-types.js +2 -0
- package/dist/utility-components/stack/stack-types.js.map +1 -0
- package/dist/utility-components/stack/stack.d.ts +2 -2
- package/dist/utility-components/stack/stack.js +12 -0
- package/dist/utility-components/stack/stack.js.map +1 -0
- package/dist/utility-components/toast/toast-types.d.ts +1 -1
- package/dist/utility-components/toast/toast-types.js +2 -0
- package/dist/utility-components/toast/toast-types.js.map +1 -0
- package/dist/utility-components/toast/toast.d.ts +2 -2
- package/dist/utility-components/toast/toast.js +21 -0
- package/dist/utility-components/toast/toast.js.map +1 -0
- package/dist/utils/general.d.ts +1 -1
- package/dist/utils/general.js +27 -0
- package/dist/utils/general.js.map +1 -0
- package/dist/utils/shortcut-utils.js +164 -0
- package/dist/utils/shortcut-utils.js.map +1 -0
- package/package.json +1 -1
- package/dist/assets/svg/alert.svg +0 -1
- package/dist/assets/svg/arrow-down-up.svg +0 -1
- package/dist/assets/svg/arrow-down.svg +0 -1
- package/dist/assets/svg/arrow-left.svg +0 -1
- package/dist/assets/svg/arrow-right.svg +0 -1
- package/dist/assets/svg/arrow-up.svg +0 -1
- package/dist/assets/svg/arrow_drop_down.svg +0 -1
- package/dist/assets/svg/calendar.svg +0 -1
- package/dist/assets/svg/check.svg +0 -1
- package/dist/assets/svg/chevron-down.svg +0 -1
- package/dist/assets/svg/chevron-right.svg +0 -1
- package/dist/assets/svg/clipboard.svg +0 -1
- package/dist/assets/svg/close.svg +0 -1
- package/dist/assets/svg/copy.svg +0 -1
- package/dist/assets/svg/cursor.svg +0 -1
- package/dist/assets/svg/cut.svg +0 -1
- package/dist/assets/svg/delete.svg +0 -1
- package/dist/assets/svg/dock-left-arrow.svg +0 -1
- package/dist/assets/svg/dock-right-arrow.svg +0 -1
- package/dist/assets/svg/document-outline.svg +0 -1
- package/dist/assets/svg/download.svg +0 -1
- package/dist/assets/svg/drag.svg +0 -1
- package/dist/assets/svg/error.svg +0 -1
- package/dist/assets/svg/expand-right.svg +0 -1
- package/dist/assets/svg/expand.svg +0 -1
- package/dist/assets/svg/eye.svg +0 -1
- package/dist/assets/svg/fullscreen.svg +0 -1
- package/dist/assets/svg/gear.svg +0 -1
- package/dist/assets/svg/groups.svg +0 -1
- package/dist/assets/svg/help.svg +0 -1
- package/dist/assets/svg/info.svg +0 -1
- package/dist/assets/svg/logo.svg +0 -9
- package/dist/assets/svg/menu.svg +0 -1
- package/dist/assets/svg/message-bubble-question-mark.svg +0 -1
- package/dist/assets/svg/pencil.svg +0 -1
- package/dist/assets/svg/plus.svg +0 -1
- package/dist/assets/svg/restio.svg +0 -5
- package/dist/assets/svg/search.svg +0 -1
- package/dist/assets/svg/send.svg +0 -1
- package/dist/assets/svg/shrink-right.svg +0 -1
- package/dist/assets/svg/sidebar.svg +0 -1
- package/dist/assets/svg/terminal.svg +0 -1
- package/dist/assets/svg/timer.svg +0 -1
- package/dist/assets/svg/warning.svg +0 -1
- package/dist/assets/svg/zoom-minus.svg +0 -1
- package/dist/assets/svg/zoom-plus.svg +0 -1
- package/dist/restio-ui.cjs.js +0 -109
- package/dist/restio-ui.es.js +0 -34431
- package/dist/ui.css +0 -2
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SidebarLogo } from "./sidebar-logo/sidebar-logo";
|
|
3
|
+
import { SidebarContext, useSidebar } from "./sidebar-context";
|
|
4
|
+
import { useScaffold } from "../../framework-components/scaffold/scaffold-context";
|
|
5
|
+
import style from "./sidebar.module.css";
|
|
6
|
+
import { Button } from "../../components/button/button";
|
|
7
|
+
import Typography from "../../components/typography/typography";
|
|
8
|
+
import Menu from "../../components/menu/menu";
|
|
9
|
+
export const Sidebar = ({ children }) => {
|
|
10
|
+
const { isSidebarOpen, toggleSidebar, isHoveringLogo, setHoveringLogo } = useScaffold();
|
|
11
|
+
// Use scaffold context for all sidebar state
|
|
12
|
+
const toggle = toggleSidebar;
|
|
13
|
+
const sidebar = {
|
|
14
|
+
sidebar: `${style["rst-sidebar"]}`,
|
|
15
|
+
};
|
|
16
|
+
return (_jsx(SidebarContext.Provider, { value: { isOpen: isSidebarOpen, toggle, setHoveringLogo, isHoveringLogo }, children: _jsx("div", { style: {
|
|
17
|
+
width: isSidebarOpen ? 220 : 40,
|
|
18
|
+
alignItems: isSidebarOpen ? "" : "center",
|
|
19
|
+
}, className: sidebar.sidebar, children: children }) }));
|
|
20
|
+
};
|
|
21
|
+
// Keep simple children inside the file for now
|
|
22
|
+
const Item = ({ leadingVisual, label, shortcut, onClick }) => {
|
|
23
|
+
const { isOpen } = useSidebar();
|
|
24
|
+
return isOpen ? (_jsx(Menu.Item, { leadingVisual: leadingVisual, "aria-label": label, shortcut: shortcut, label: label, onClick: onClick })) : (_jsx(Button, { leadingVisual: leadingVisual, "aria-label": label, variant: "invisible", onClick: () => onClick }));
|
|
25
|
+
};
|
|
26
|
+
const Section = ({ title, children }) => {
|
|
27
|
+
const sidebarSection = {
|
|
28
|
+
sectionContainer: `${style["rst-sidebar-section"]}`,
|
|
29
|
+
};
|
|
30
|
+
const { isOpen } = useSidebar();
|
|
31
|
+
return (_jsxs("div", { className: sidebarSection.sectionContainer, children: [title && isOpen && (_jsx("div", { children: _jsx(Typography, { variant: "label", children: title }) })), children] }));
|
|
32
|
+
};
|
|
33
|
+
const User = ({ avatar, name }) => {
|
|
34
|
+
const { isOpen } = useSidebar();
|
|
35
|
+
return (_jsxs("div", { className: style["rst-sidebar-user"], children: [avatar, isOpen && _jsx("span", { style: { marginLeft: 8 }, children: name })] }));
|
|
36
|
+
};
|
|
37
|
+
Sidebar.displayName = "Sidebar";
|
|
38
|
+
Sidebar.Logo = SidebarLogo;
|
|
39
|
+
Sidebar.Item = Item;
|
|
40
|
+
Sidebar.Section = Section;
|
|
41
|
+
Sidebar.User = User;
|
|
42
|
+
//# sourceMappingURL=sidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.js","sourceRoot":"","sources":["../../../src/framework-components/sidebar/sidebar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAEnF,OAAO,KAAK,MAAM,sBAAsB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,UAAU,MAAM,wCAAwC,CAAC;AAChE,OAAO,IAAI,MAAM,4BAA4B,CAAC;AAS9C,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAE,QAAQ,EAAgB,EAAE,EAAE;IACpD,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,WAAW,EAAE,CAAC;IAExF,6CAA6C;IAC7C,MAAM,MAAM,GAAG,aAAa,CAAC;IAE7B,MAAM,OAAO,GAAG;QACd,OAAO,EAAE,GAAG,KAAK,CAAC,aAAa,CAAC,EAAE;KACnC,CAAC;IAEF,OAAO,CACL,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,YAChG,cACE,KAAK,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AI,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAa,EAAE,EAAE;IAC3C,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC;IAChC,OAAO,CACL,eAAK,SAAS,EAAE,KAAK,CAAC,kBAAkB,CAAC,aACtC,MAAM,EACN,MAAM,IAAI,eAAM,KAAK,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,YAAG,IAAI,GAAQ,IACpD,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAChC,OAAO,CAAC,IAAI,GAAG,WAAW,CAAC;AAC3B,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACpB,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1B,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export interface DynamicVirtualItem {
|
|
2
|
+
/** Original item index in the full list */
|
|
3
|
+
index: number;
|
|
4
|
+
/** Top offset from the top of the total scrollable area, in pixels */
|
|
5
|
+
start: number;
|
|
6
|
+
/** Measured (or estimated) height in pixels */
|
|
7
|
+
size: number;
|
|
8
|
+
}
|
|
9
|
+
export interface UseDynamicVirtualListOptions {
|
|
10
|
+
/** Total number of items in the list */
|
|
11
|
+
count: number;
|
|
12
|
+
/** Fallback height used for items that have not been measured yet */
|
|
13
|
+
estimatedItemHeight?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Extra items rendered above and below the visible viewport.
|
|
16
|
+
* A larger value makes scrolling smoother at the cost of slightly more DOM nodes.
|
|
17
|
+
* Defaults to 10.
|
|
18
|
+
*/
|
|
19
|
+
overscan?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface UseDynamicVirtualListResult {
|
|
22
|
+
/** Items that should be rendered right now */
|
|
23
|
+
virtualItems: DynamicVirtualItem[];
|
|
24
|
+
/** Total scrollable height in pixels (for the spacer element) */
|
|
25
|
+
totalSize: number;
|
|
26
|
+
/** Attach this ref to the scrollable container div */
|
|
27
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
28
|
+
/** Attach this handler to the scrollable container's onScroll */
|
|
29
|
+
onScroll: (e: React.UIEvent<HTMLDivElement>) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Callback ref to attach to each rendered item element.
|
|
32
|
+
* Call with `(el, index)` — el will be null when the item unmounts.
|
|
33
|
+
*/
|
|
34
|
+
measureElement: (el: Element | null, index: number) => void;
|
|
35
|
+
/** Scroll the container so the given index is in view */
|
|
36
|
+
scrollToIndex: (index: number) => void;
|
|
37
|
+
/** First rendered index (including overscan) */
|
|
38
|
+
startIndex: number;
|
|
39
|
+
/** Last rendered index (including overscan) */
|
|
40
|
+
endIndex: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A dynamic-height virtual list hook inspired by TanStack Virtual.
|
|
44
|
+
*
|
|
45
|
+
* Unlike fixed-height virtualizers, this hook uses a ResizeObserver to measure
|
|
46
|
+
* each rendered item's actual height and falls back to `estimatedItemHeight` for
|
|
47
|
+
* items that have not yet been rendered. This allows rows with variable content
|
|
48
|
+
* (wrapped text, expandable cells, group headers) to scroll correctly.
|
|
49
|
+
*
|
|
50
|
+
* Usage:
|
|
51
|
+
* ```tsx
|
|
52
|
+
* const { virtualItems, totalSize, containerRef, onScroll, measureElement } =
|
|
53
|
+
* useDynamicVirtualList({ count: rows.length, estimatedItemHeight: 40, overscan: 10 });
|
|
54
|
+
*
|
|
55
|
+
* return (
|
|
56
|
+
* <div ref={containerRef} onScroll={onScroll} style={{ height: 400, overflowY: "auto" }}>
|
|
57
|
+
* <div style={{ height: totalSize, position: "relative" }}>
|
|
58
|
+
* {virtualItems.map(({ index, start }) => (
|
|
59
|
+
* <div
|
|
60
|
+
* key={index}
|
|
61
|
+
* ref={(el) => measureElement(el, index)}
|
|
62
|
+
* style={{ position: "absolute", top: start, width: "100%" }}
|
|
63
|
+
* >
|
|
64
|
+
* {rows[index]}
|
|
65
|
+
* </div>
|
|
66
|
+
* ))}
|
|
67
|
+
* </div>
|
|
68
|
+
* </div>
|
|
69
|
+
* );
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* For table usage, pair with padding `<tr>` spacers at the top and bottom of
|
|
73
|
+
* `<tbody>` and attach `measureElement` to each `<tr>` via a ref callback.
|
|
74
|
+
*/
|
|
75
|
+
export declare function useDynamicVirtualList({ count, estimatedItemHeight, overscan, }: UseDynamicVirtualListOptions): UseDynamicVirtualListResult;
|
|
76
|
+
//# sourceMappingURL=useDynamicVirtualList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDynamicVirtualList.d.ts","sourceRoot":"","sources":["../../src/hooks/useDynamicVirtualList.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,4BAA4B;IAC3C,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,2BAA2B;IAC1C,8CAA8C;IAC9C,YAAY,EAAE,kBAAkB,EAAE,CAAC;IACnC,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD,iEAAiE;IACjE,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACrD;;;OAGG;IACH,cAAc,EAAE,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,yDAAyD;IACzD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,mBAAwB,EACxB,QAAa,GACd,EAAE,4BAA4B,GAAG,2BAA2B,CA6K5D"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Binary search: returns the largest index i in [0, count-1] such that
|
|
4
|
+
* offsets[i] <= target. Assumes offsets is sorted ascending (length = count + 1).
|
|
5
|
+
*/
|
|
6
|
+
function findItemAtOffset(offsets, target, count) {
|
|
7
|
+
if (count === 0)
|
|
8
|
+
return 0;
|
|
9
|
+
let lo = 0;
|
|
10
|
+
let hi = count - 1;
|
|
11
|
+
while (lo < hi) {
|
|
12
|
+
const mid = (lo + hi + 1) >> 1;
|
|
13
|
+
if (offsets[mid] <= target) {
|
|
14
|
+
lo = mid;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
hi = mid - 1;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return lo;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A dynamic-height virtual list hook inspired by TanStack Virtual.
|
|
24
|
+
*
|
|
25
|
+
* Unlike fixed-height virtualizers, this hook uses a ResizeObserver to measure
|
|
26
|
+
* each rendered item's actual height and falls back to `estimatedItemHeight` for
|
|
27
|
+
* items that have not yet been rendered. This allows rows with variable content
|
|
28
|
+
* (wrapped text, expandable cells, group headers) to scroll correctly.
|
|
29
|
+
*
|
|
30
|
+
* Usage:
|
|
31
|
+
* ```tsx
|
|
32
|
+
* const { virtualItems, totalSize, containerRef, onScroll, measureElement } =
|
|
33
|
+
* useDynamicVirtualList({ count: rows.length, estimatedItemHeight: 40, overscan: 10 });
|
|
34
|
+
*
|
|
35
|
+
* return (
|
|
36
|
+
* <div ref={containerRef} onScroll={onScroll} style={{ height: 400, overflowY: "auto" }}>
|
|
37
|
+
* <div style={{ height: totalSize, position: "relative" }}>
|
|
38
|
+
* {virtualItems.map(({ index, start }) => (
|
|
39
|
+
* <div
|
|
40
|
+
* key={index}
|
|
41
|
+
* ref={(el) => measureElement(el, index)}
|
|
42
|
+
* style={{ position: "absolute", top: start, width: "100%" }}
|
|
43
|
+
* >
|
|
44
|
+
* {rows[index]}
|
|
45
|
+
* </div>
|
|
46
|
+
* ))}
|
|
47
|
+
* </div>
|
|
48
|
+
* </div>
|
|
49
|
+
* );
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* For table usage, pair with padding `<tr>` spacers at the top and bottom of
|
|
53
|
+
* `<tbody>` and attach `measureElement` to each `<tr>` via a ref callback.
|
|
54
|
+
*/
|
|
55
|
+
export function useDynamicVirtualList({ count, estimatedItemHeight = 40, overscan = 10, }) {
|
|
56
|
+
// ── Height cache ───────────────────────────────────────────────────────────
|
|
57
|
+
// Stored in refs so mutations don't cause extra renders; a version counter
|
|
58
|
+
// triggers a re-computation of offsets only when a height actually changes.
|
|
59
|
+
const sizeCache = useRef(new Map());
|
|
60
|
+
// ResizeObserver bookkeeping
|
|
61
|
+
const observedElements = useRef(new Map()); // el → index
|
|
62
|
+
const indexToElement = useRef(new Map()); // index → el
|
|
63
|
+
const resizeObserver = useRef(null);
|
|
64
|
+
// Incremented whenever sizeCache changes — drives offsets recomputation
|
|
65
|
+
const [version, setVersion] = useState(0);
|
|
66
|
+
// Scroll position
|
|
67
|
+
const [scrollTop, setScrollTop] = useState(0);
|
|
68
|
+
// Measured viewport height (updated by a second ResizeObserver on the container)
|
|
69
|
+
const [viewportHeight, setViewportHeight] = useState(0);
|
|
70
|
+
const containerRef = useRef(null);
|
|
71
|
+
// ── ResizeObserver for item heights ──────────────────────────────────────
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
const ro = new ResizeObserver((entries) => {
|
|
74
|
+
let changed = false;
|
|
75
|
+
for (const entry of entries) {
|
|
76
|
+
const index = observedElements.current.get(entry.target);
|
|
77
|
+
if (index === undefined)
|
|
78
|
+
continue;
|
|
79
|
+
// borderBoxSize includes padding and border — matches offsetHeight
|
|
80
|
+
const newHeight = entry.borderBoxSize?.[0]?.blockSize ?? entry.contentRect.height;
|
|
81
|
+
if (newHeight > 0 && sizeCache.current.get(index) !== newHeight) {
|
|
82
|
+
sizeCache.current.set(index, newHeight);
|
|
83
|
+
changed = true;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (changed) {
|
|
87
|
+
setVersion((v) => v + 1);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
resizeObserver.current = ro;
|
|
91
|
+
return () => {
|
|
92
|
+
ro.disconnect();
|
|
93
|
+
};
|
|
94
|
+
}, []);
|
|
95
|
+
// ── ResizeObserver for the container viewport ─────────────────────────────
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
const container = containerRef.current;
|
|
98
|
+
if (!container)
|
|
99
|
+
return;
|
|
100
|
+
const ro = new ResizeObserver(([entry]) => {
|
|
101
|
+
setViewportHeight(entry.contentRect.height);
|
|
102
|
+
});
|
|
103
|
+
ro.observe(container);
|
|
104
|
+
// Capture the initial size synchronously so the first paint is correct
|
|
105
|
+
setViewportHeight(container.clientHeight);
|
|
106
|
+
return () => ro.disconnect();
|
|
107
|
+
}, []);
|
|
108
|
+
// ── measureElement callback ───────────────────────────────────────────────
|
|
109
|
+
const measureElement = useCallback((el, index) => {
|
|
110
|
+
if (el === null) {
|
|
111
|
+
// Item unmounted — stop observing
|
|
112
|
+
const existing = indexToElement.current.get(index);
|
|
113
|
+
if (existing) {
|
|
114
|
+
resizeObserver.current?.unobserve(existing);
|
|
115
|
+
observedElements.current.delete(existing);
|
|
116
|
+
indexToElement.current.delete(index);
|
|
117
|
+
}
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
// No-op if the same element is already registered for this index
|
|
121
|
+
if (indexToElement.current.get(index) === el)
|
|
122
|
+
return;
|
|
123
|
+
// Clean up the previous element registered at this index
|
|
124
|
+
const prevEl = indexToElement.current.get(index);
|
|
125
|
+
if (prevEl) {
|
|
126
|
+
resizeObserver.current?.unobserve(prevEl);
|
|
127
|
+
observedElements.current.delete(prevEl);
|
|
128
|
+
}
|
|
129
|
+
// Clean up if this DOM element was previously registered at a different index
|
|
130
|
+
if (observedElements.current.has(el)) {
|
|
131
|
+
resizeObserver.current?.unobserve(el);
|
|
132
|
+
observedElements.current.delete(el);
|
|
133
|
+
}
|
|
134
|
+
observedElements.current.set(el, index);
|
|
135
|
+
indexToElement.current.set(index, el);
|
|
136
|
+
resizeObserver.current?.observe(el);
|
|
137
|
+
}, []);
|
|
138
|
+
// ── Cumulative offsets ────────────────────────────────────────────────────
|
|
139
|
+
// offsets[i] = top of item i
|
|
140
|
+
// offsets[i+1] = bottom of item i
|
|
141
|
+
// offsets[count] = totalSize
|
|
142
|
+
const offsets = useMemo(() => {
|
|
143
|
+
void version; // reactive dependency — recompute when any height changes
|
|
144
|
+
const arr = new Float64Array(count + 1);
|
|
145
|
+
arr[0] = 0;
|
|
146
|
+
for (let i = 0; i < count; i++) {
|
|
147
|
+
arr[i + 1] = arr[i] + (sizeCache.current.get(i) ?? estimatedItemHeight);
|
|
148
|
+
}
|
|
149
|
+
return arr;
|
|
150
|
+
}, [count, estimatedItemHeight, version]);
|
|
151
|
+
const totalSize = count > 0 ? offsets[count] : 0;
|
|
152
|
+
// ── Visible range + overscan ──────────────────────────────────────────────
|
|
153
|
+
const { startIndex, endIndex } = useMemo(() => {
|
|
154
|
+
if (count === 0)
|
|
155
|
+
return { startIndex: 0, endIndex: -1 };
|
|
156
|
+
// Use a conservative viewport estimate on the first render (before the
|
|
157
|
+
// ResizeObserver fires) so the initial paint always has visible items.
|
|
158
|
+
const effectiveViewport = viewportHeight > 0 ? viewportHeight : estimatedItemHeight * 15;
|
|
159
|
+
const rawStart = findItemAtOffset(offsets, scrollTop, count);
|
|
160
|
+
const rawEnd = findItemAtOffset(offsets, scrollTop + effectiveViewport, count);
|
|
161
|
+
return {
|
|
162
|
+
startIndex: Math.max(0, rawStart - overscan),
|
|
163
|
+
endIndex: Math.min(count - 1, rawEnd + overscan),
|
|
164
|
+
};
|
|
165
|
+
}, [offsets, scrollTop, viewportHeight, count, overscan, estimatedItemHeight]);
|
|
166
|
+
// ── Virtual items ─────────────────────────────────────────────────────────
|
|
167
|
+
const virtualItems = useMemo(() => {
|
|
168
|
+
const items = [];
|
|
169
|
+
for (let i = startIndex; i <= endIndex; i++) {
|
|
170
|
+
items.push({
|
|
171
|
+
index: i,
|
|
172
|
+
start: offsets[i],
|
|
173
|
+
size: offsets[i + 1] - offsets[i],
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
return items;
|
|
177
|
+
}, [startIndex, endIndex, offsets]);
|
|
178
|
+
// ── Scroll handlers ───────────────────────────────────────────────────────
|
|
179
|
+
const onScroll = useCallback((e) => {
|
|
180
|
+
setScrollTop(e.currentTarget.scrollTop);
|
|
181
|
+
}, []);
|
|
182
|
+
const scrollToIndex = useCallback((index) => {
|
|
183
|
+
const container = containerRef.current;
|
|
184
|
+
if (!container || index < 0 || index >= count)
|
|
185
|
+
return;
|
|
186
|
+
const itemTop = offsets[index];
|
|
187
|
+
const itemBottom = offsets[index + 1];
|
|
188
|
+
const viewTop = container.scrollTop;
|
|
189
|
+
const viewBottom = viewTop + container.clientHeight;
|
|
190
|
+
if (itemTop < viewTop) {
|
|
191
|
+
container.scrollTop = itemTop;
|
|
192
|
+
}
|
|
193
|
+
else if (itemBottom > viewBottom) {
|
|
194
|
+
container.scrollTop = itemBottom - container.clientHeight;
|
|
195
|
+
}
|
|
196
|
+
}, [offsets, count]);
|
|
197
|
+
return {
|
|
198
|
+
virtualItems,
|
|
199
|
+
totalSize,
|
|
200
|
+
containerRef,
|
|
201
|
+
onScroll,
|
|
202
|
+
measureElement,
|
|
203
|
+
scrollToIndex,
|
|
204
|
+
startIndex,
|
|
205
|
+
endIndex,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=useDynamicVirtualList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDynamicVirtualList.js","sourceRoot":"","sources":["../../src/hooks/useDynamicVirtualList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AA8C1E;;;GAGG;AACH,SAAS,gBAAgB,CAAC,OAAqB,EAAE,MAAc,EAAE,KAAa;IAC5E,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAC1B,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC,CAAC;IACnB,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC;QACf,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,MAAM,EAAE,CAAC;YAC3B,EAAE,GAAG,GAAG,CAAC;QACX,CAAC;aAAM,CAAC;YACN,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,UAAU,qBAAqB,CAAC,EACpC,KAAK,EACL,mBAAmB,GAAG,EAAE,EACxB,QAAQ,GAAG,EAAE,GACgB;IAC7B,8EAA8E;IAC9E,2EAA2E;IAC3E,4EAA4E;IAC5E,MAAM,SAAS,GAAG,MA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SAAS,CAAC,SAAS,GAAG,OAAO,CAAC;QAChC,CAAC;aAAM,IAAI,UAAU,GAAG,UAAU,EAAE,CAAC;YACnC,SAAS,CAAC,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC,YAAY,CAAC;QAC5D,CAAC;IACH,CAAC,EACD,CAAC,OAAO,EAAE,KAAK,CAAC,CACjB,CAAC;IAEF,OAAO;QACL,YAAY;QACZ,SAAS;QACT,YAAY;QACZ,QAAQ;QACR,cAAc;QACd,aAAa;QACb,UAAU;QACV,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
|
@@ -6,7 +6,7 @@ interface UseFixedVirtualListOptions<T> {
|
|
|
6
6
|
}
|
|
7
7
|
export declare function useFixedVirtualList<T>({ items, itemHeight, containerHeight, overscan }: UseFixedVirtualListOptions<T>): {
|
|
8
8
|
containerProps: {
|
|
9
|
-
ref: import(
|
|
9
|
+
ref: import("react").RefObject<HTMLDivElement | null>;
|
|
10
10
|
onScroll: (e: React.UIEvent<HTMLDivElement>) => void;
|
|
11
11
|
style: {
|
|
12
12
|
maxHeight: string;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { useCallback, useMemo, useRef, useState } from "react";
|
|
2
|
+
export function useFixedVirtualList({ items, itemHeight, containerHeight, overscan = 5 }) {
|
|
3
|
+
const [scrollTop, setScrollTop] = useState(0);
|
|
4
|
+
const containerRef = useRef(null);
|
|
5
|
+
const totalHeight = items.length * itemHeight;
|
|
6
|
+
const { startIndex, endIndex } = useMemo(() => {
|
|
7
|
+
const start = Math.max(0, Math.floor(scrollTop / itemHeight) - overscan);
|
|
8
|
+
const end = Math.min(items.length - 1, Math.floor((scrollTop + containerHeight) / itemHeight) + overscan);
|
|
9
|
+
return { startIndex: start, endIndex: end };
|
|
10
|
+
}, [scrollTop, itemHeight, containerHeight, items.length, overscan]);
|
|
11
|
+
const virtualItems = useMemo(() => {
|
|
12
|
+
const result = [];
|
|
13
|
+
for (let i = startIndex; i <= endIndex; i++) {
|
|
14
|
+
result.push({
|
|
15
|
+
item: items[i],
|
|
16
|
+
index: i,
|
|
17
|
+
offsetTop: i * itemHeight,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return result;
|
|
21
|
+
}, [items, startIndex, endIndex, itemHeight]);
|
|
22
|
+
const onScroll = useCallback((e) => {
|
|
23
|
+
setScrollTop(e.currentTarget.scrollTop);
|
|
24
|
+
}, []);
|
|
25
|
+
const scrollToIndex = useCallback((index) => {
|
|
26
|
+
const el = containerRef.current;
|
|
27
|
+
if (!el)
|
|
28
|
+
return;
|
|
29
|
+
const top = index * itemHeight;
|
|
30
|
+
const bottom = top + itemHeight;
|
|
31
|
+
const viewTop = el.scrollTop;
|
|
32
|
+
const viewBottom = viewTop + containerHeight;
|
|
33
|
+
if (top < viewTop) {
|
|
34
|
+
el.scrollTop = top;
|
|
35
|
+
}
|
|
36
|
+
else if (bottom > viewBottom) {
|
|
37
|
+
el.scrollTop = bottom - containerHeight;
|
|
38
|
+
}
|
|
39
|
+
}, [itemHeight, containerHeight]);
|
|
40
|
+
return {
|
|
41
|
+
containerProps: {
|
|
42
|
+
ref: containerRef,
|
|
43
|
+
onScroll,
|
|
44
|
+
style: {
|
|
45
|
+
maxHeight: `${containerHeight}px`,
|
|
46
|
+
overflowY: "auto",
|
|
47
|
+
position: "relative",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
innerProps: {
|
|
51
|
+
style: {
|
|
52
|
+
height: `${totalHeight}px`,
|
|
53
|
+
position: "relative",
|
|
54
|
+
width: "100%",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
virtualItems,
|
|
58
|
+
scrollToIndex,
|
|
59
|
+
scrollTop,
|
|
60
|
+
startIndex,
|
|
61
|
+
endIndex,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=useFixedVirtualList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFixedVirtualList.js","sourceRoot":"","s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,WAAW,IAAI;gBAC1B,QAAQ,EAAE,UAAmB;gBAC7B,KAAK,EAAE,MAAM;aACd;SACF;QACD,YAAY;QACZ,aAAa;QACb,SAAS;QACT,UAAU;QACV,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShortcutConfig, UseShortcutOptions } from
|
|
1
|
+
import type { ShortcutConfig, UseShortcutOptions } from "../custom-components/shortcut-tooltip/shortcut-tooltip-types";
|
|
2
2
|
/**
|
|
3
3
|
* Hook for registering keyboard shortcuts with automatic lifecycle management
|
|
4
4
|
*
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { useContext, useEffect, useCallback, useRef, useMemo } from "react";
|
|
2
|
+
import { ShortcutContext } from "../providers/shortcut/shortcut-context";
|
|
3
|
+
import { useId } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Hook for registering keyboard shortcuts with automatic lifecycle management
|
|
6
|
+
*
|
|
7
|
+
* @param options - Configuration options for shortcut behavior
|
|
8
|
+
* @returns Object with register, unregister, activate, deactivate, and trigger functions
|
|
9
|
+
*/
|
|
10
|
+
export const useShortcut = (options = {}) => {
|
|
11
|
+
const context = useContext(ShortcutContext);
|
|
12
|
+
const registeredShortcuts = useRef([]);
|
|
13
|
+
const { scope = 'component', enabled = true } = options;
|
|
14
|
+
const id = useId();
|
|
15
|
+
// Generate a unique component ID for component-scoped shortcuts
|
|
16
|
+
const componentId = useMemo(() => scope === 'component' ? `component-${id}` : undefined, [scope, id]);
|
|
17
|
+
if (!context) {
|
|
18
|
+
throw new Error('useShortcut must be used within a ShortcutProvider');
|
|
19
|
+
}
|
|
20
|
+
const { registerShortcut, unregisterShortcut, triggerShortcut, registerComponent, unregisterComponent } = context;
|
|
21
|
+
/**
|
|
22
|
+
* Registers a keyboard shortcut with the specified configuration
|
|
23
|
+
*
|
|
24
|
+
* @param keys - Keyboard combination (e.g., "ctrl+y", "cmd+shift+s")
|
|
25
|
+
* @param config - Shortcut configuration including action, name, and optional hold duration
|
|
26
|
+
*
|
|
27
|
+
* Examples:
|
|
28
|
+
* - Instant: register("ctrl+s", { name: "Save", action: () => save() })
|
|
29
|
+
* - Hold: register("ctrl+y", { name: "Delete", action: () => delete(), holdDuration: 3000 })
|
|
30
|
+
*/
|
|
31
|
+
const register = useCallback((keys, config) => {
|
|
32
|
+
if (!enabled)
|
|
33
|
+
return;
|
|
34
|
+
registerShortcut(keys, config, componentId);
|
|
35
|
+
registeredShortcuts.current.push(keys);
|
|
36
|
+
}, [registerShortcut, componentId, enabled]);
|
|
37
|
+
/**
|
|
38
|
+
* Unregisters a previously registered keyboard shortcut
|
|
39
|
+
*
|
|
40
|
+
* @param keys - The keyboard combination to remove (e.g., "ctrl+y")
|
|
41
|
+
*/
|
|
42
|
+
const unregister = useCallback((keys) => {
|
|
43
|
+
unregisterShortcut(keys);
|
|
44
|
+
registeredShortcuts.current = registeredShortcuts.current.filter(k => k !== keys);
|
|
45
|
+
}, [unregisterShortcut]);
|
|
46
|
+
/**
|
|
47
|
+
* Event handlers for activating/deactivating component-scoped shortcuts
|
|
48
|
+
* These should be attached to the target element for focus/hover-based activation
|
|
49
|
+
*/
|
|
50
|
+
const handleActivate = useCallback(() => {
|
|
51
|
+
if (scope === 'component' && componentId && enabled) {
|
|
52
|
+
registerComponent(componentId);
|
|
53
|
+
}
|
|
54
|
+
}, [scope, componentId, registerComponent, enabled]);
|
|
55
|
+
const handleDeactivate = useCallback(() => {
|
|
56
|
+
if (scope === 'component' && componentId) {
|
|
57
|
+
unregisterComponent(componentId);
|
|
58
|
+
}
|
|
59
|
+
}, [scope, componentId, unregisterComponent]);
|
|
60
|
+
// Auto-cleanup component-scoped shortcuts on unmount
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (scope === 'component') {
|
|
63
|
+
return () => {
|
|
64
|
+
registeredShortcuts.current.forEach(keys => {
|
|
65
|
+
unregisterShortcut(keys);
|
|
66
|
+
});
|
|
67
|
+
if (componentId) {
|
|
68
|
+
unregisterComponent(componentId);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}, [scope, unregisterShortcut, componentId, unregisterComponent]);
|
|
73
|
+
return {
|
|
74
|
+
/** Register a new keyboard shortcut */
|
|
75
|
+
register,
|
|
76
|
+
/** Unregister an existing keyboard shortcut */
|
|
77
|
+
unregister,
|
|
78
|
+
/** Programmatically trigger a shortcut (for testing or manual execution) */
|
|
79
|
+
trigger: triggerShortcut,
|
|
80
|
+
/** Activate component-scoped shortcuts (attach to onFocus/onMouseEnter) */
|
|
81
|
+
activate: handleActivate,
|
|
82
|
+
/** Deactivate component-scoped shortcuts (attach to onBlur/onMouseLeave) */
|
|
83
|
+
deactivate: handleDeactivate,
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=useShortcut.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShortcut.js","sourceRoot":"","sources":["../../src/hooks/useShortcut.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAEzE,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,UAA8B,EACzD,EAAE,EAAE;IACH,MAAM,OAAO,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAC5C,MAAM,mBAAmB,GAAG,MAAM,CAAW,EAAE,CAAC,CAAC;IACjD,MAAM,EAAE,KAAK,GAAG,WAAW,EAAE,OAAO,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IACxD,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IAEnB,gEAAgE;IAChE,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAC/B,K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B,GAAG,WAAW,CAAC,GAAG,EAAE;QACxC,IAAI,KAAK,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;YACzC,mBAAmB,CAAC,WAAW,CAAC,CAAC;QACnC,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAE9C,qDAAqD;IACrD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,KAAK,KAAK,WAAW,EAAE,CAAC;YAC1B,OAAO,GAAG,EAAE;gBACV,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;oBACzC,kBAAkB,CAAC,IAAI,CAAC,CAAC;gBAC3B,CAAC,CAAC,CAAC;gBACH,IAAI,WAAW,EAAE,CAAC;oBAChB,mBAAmB,CAAC,WAAW,CAAC,CAAC;gBACnC,CAAC;YACH,CAAC,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAElE,OAAO;QACL,uCAAuC;QACvC,QAAQ;QACR,+CAA+C;QAC/C,UAAU;QACV,4EAA4E;QAC5E,OAAO,EAAE,eAAe;QACxB,2EAA2E;QAC3E,QAAQ,EAAE,cAAc;QACxB,4EAA4E;QAC5E,UAAU,EAAE,gBAAgB;KAC7B,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TourContextValue } from
|
|
1
|
+
import type { TourContextValue } from "./useTour-types";
|
|
2
2
|
/**
|
|
3
3
|
* Internal React context for multi-tour coordination.
|
|
4
4
|
* Import this only in `useTour.tsx` and `useTour-context.tsx`.
|
|
5
5
|
*/
|
|
6
|
-
export declare const TourContext: import(
|
|
6
|
+
export declare const TourContext: import("react").Context<TourContextValue | null>;
|
|
7
7
|
//# sourceMappingURL=useTour-context-internal.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createContext } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Internal React context for multi-tour coordination.
|
|
4
|
+
* Import this only in `useTour.tsx` and `useTour-context.tsx`.
|
|
5
|
+
*/
|
|
6
|
+
export const TourContext = createContext(null);
|
|
7
|
+
//# sourceMappingURL=useTour-context-internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTour-context-internal.js","sourceRoot":"","sources":["../../../src/hooks/useTour/useTour-context-internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAA0B,IAAI,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { TourContext } from
|
|
3
|
-
import { TourManagerInstance } from
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { TourContext } from "./useTour-context-internal";
|
|
3
|
+
import type { TourManagerInstance } from "./useTour-types";
|
|
4
4
|
export { TourContext };
|
|
5
5
|
interface TourProviderProps {
|
|
6
6
|
readonly children: ReactNode;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useContext, useRef, useState, useCallback } from "react";
|
|
3
|
+
import { TourContext } from "./useTour-context-internal";
|
|
4
|
+
export { TourContext };
|
|
5
|
+
export function TourProvider({ children }) {
|
|
6
|
+
const [activeTourId, setActiveTourIdState] = useState(null);
|
|
7
|
+
const [registeredTourIds, setRegisteredTourIds] = useState([]);
|
|
8
|
+
const instancesRef = useRef({});
|
|
9
|
+
const setActiveTourId = useCallback((tourId) => {
|
|
10
|
+
setActiveTourIdState((prev) => {
|
|
11
|
+
if (prev && prev !== tourId) {
|
|
12
|
+
const prevInstance = instancesRef.current[prev];
|
|
13
|
+
prevInstance?.stop();
|
|
14
|
+
}
|
|
15
|
+
return tourId;
|
|
16
|
+
});
|
|
17
|
+
}, []);
|
|
18
|
+
const registerTour = useCallback((tourId, instance) => {
|
|
19
|
+
instancesRef.current[tourId] = instance;
|
|
20
|
+
setRegisteredTourIds((prev) => (prev.includes(tourId) ? prev : [...prev, tourId]));
|
|
21
|
+
}, []);
|
|
22
|
+
const unregisterTour = useCallback((tourId) => {
|
|
23
|
+
delete instancesRef.current[tourId];
|
|
24
|
+
setRegisteredTourIds((prev) => prev.filter((id) => id !== tourId));
|
|
25
|
+
}, []);
|
|
26
|
+
return (_jsx(TourContext.Provider, { value: { activeTourId, setActiveTourId, instancesRef, registeredTourIds, registerTour, unregisterTour }, children: children }));
|
|
27
|
+
}
|
|
28
|
+
// ─── useTourManager ───────────────────────────────────────────────────────────
|
|
29
|
+
export function useTourManager() {
|
|
30
|
+
const ctx = useContext(TourContext);
|
|
31
|
+
if (!ctx) {
|
|
32
|
+
throw new Error("[useTourManager] must be used inside a <TourProvider>. " + "Wrap your component tree with <TourProvider> to enable multi-tour management.");
|
|
33
|
+
}
|
|
34
|
+
const { activeTourId, setActiveTourId, instancesRef, registeredTourIds } = ctx;
|
|
35
|
+
// Derived from state — safe to compute during render
|
|
36
|
+
const tours = Object.fromEntries(registeredTourIds.map((id) => [id, { tourId: id, isActive: id === activeTourId }]));
|
|
37
|
+
const startTour = useCallback((tourId) => {
|
|
38
|
+
const instance = instancesRef.current[tourId];
|
|
39
|
+
if (!instance) {
|
|
40
|
+
console.warn(`[useTourManager] No tour registered with id "${tourId}".`);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
setActiveTourId(tourId);
|
|
44
|
+
instance.start();
|
|
45
|
+
}, [instancesRef, setActiveTourId]);
|
|
46
|
+
const stopActiveTour = useCallback(() => {
|
|
47
|
+
if (!activeTourId)
|
|
48
|
+
return;
|
|
49
|
+
instancesRef.current[activeTourId]?.stop();
|
|
50
|
+
setActiveTourId(null);
|
|
51
|
+
}, [activeTourId, instancesRef, setActiveTourId]);
|
|
52
|
+
return { tours, activeTourId, startTour, stopActiveTour };
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=useTour-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTour-context.js","sourceRoot":"","sources":["../../../src/hooks/useTour/useTour-context.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAGzD,OAAO,EAAE,WAAW,EAAE,CAAC;AAQvB,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAqB;IAC1D,MAAM,CAAC,YAAY,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAC3E,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IACzE,MAAM,YAAY,GAAG,MAAM,CAA+B,EAAE,CAAC,CAAC;IAE9D,MAAM,eAAe,GAAG,WAAW,CAAC,CAAC,MAAqB,EAAE,EAAE;QAC5D,oBAAoB,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5B,IAAI,IAAI,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;gBAC5B,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBAChD,YAAY,EAAE,IAAI,EAAE,CAAC;YACvB,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,MAAc,EAAE,QAAsB,EAAE,EAAE;QAC1E,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;QACxC,oBAAoB,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CA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O,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,CAAC,gDAAgD,MAAM,IAAI,CAAC,CAAC;YACzE,OAAO;QACT,CAAC;QACD,eAAe,CAAC,MAAM,CAAC,CAAC;QACxB,QAAQ,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC,EACD,CAAC,YAAY,EAAE,eAAe,CAAC,CAChC,CAAC;IAEF,MAAM,cAAc,GAAG,WAAW,CAAC,GAAG,EAAE;QACtC,IAAI,CAAC,YAAY;YAAE,OAAO;QAC1B,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;QAC3C,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;IAElD,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;AAC5D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, MutableRefObject } from
|
|
1
|
+
import type { ReactNode, MutableRefObject } from "react";
|
|
2
2
|
export type TourPlacement = "top" | "bottom" | "left" | "right" | "auto";
|
|
3
3
|
/**
|
|
4
4
|
* Defines what interaction on the highlighted element automatically advances
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTour-types.js","sourceRoot":"","sources":["../../../src/hooks/useTour/useTour-types.ts"],"names":[],"mappings":""}
|