@flanksource/clicky-ui 0.3.17 → 0.3.18
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/ai.cjs +12 -6
- package/dist/ai.cjs.map +1 -1
- package/dist/ai.js +10 -4
- package/dist/ai.js.map +1 -1
- package/dist/chat.cjs +36 -0
- package/dist/chat.cjs.map +1 -1
- package/dist/chat.js +37 -1
- package/dist/chat.js.map +1 -1
- package/dist/components/Combobox.cjs +122 -153
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +124 -155
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ComboboxControl.cjs +145 -0
- package/dist/components/ComboboxControl.cjs.map +1 -0
- package/dist/components/ComboboxControl.d.ts +37 -0
- package/dist/components/ComboboxControl.d.ts.map +1 -0
- package/dist/components/ComboboxControl.js +145 -0
- package/dist/components/ComboboxControl.js.map +1 -0
- package/dist/components/ComboboxMenu.cjs +31 -14
- package/dist/components/ComboboxMenu.cjs.map +1 -1
- package/dist/components/ComboboxMenu.d.ts.map +1 -1
- package/dist/components/ComboboxMenu.js +31 -14
- package/dist/components/ComboboxMenu.js.map +1 -1
- package/dist/components/ComboboxTags.cjs +40 -0
- package/dist/components/ComboboxTags.cjs.map +1 -0
- package/dist/components/ComboboxTags.d.ts +8 -0
- package/dist/components/ComboboxTags.d.ts.map +1 -0
- package/dist/components/ComboboxTags.js +40 -0
- package/dist/components/ComboboxTags.js.map +1 -0
- package/dist/components/ErrorWrapper.cjs +168 -0
- package/dist/components/ErrorWrapper.cjs.map +1 -0
- package/dist/components/ErrorWrapper.d.ts +19 -0
- package/dist/components/ErrorWrapper.d.ts.map +1 -0
- package/dist/components/ErrorWrapper.js +168 -0
- package/dist/components/ErrorWrapper.js.map +1 -0
- package/dist/components/FilterBar.cjs +64 -2
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts +18 -1
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +64 -2
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/JSONPathField.cjs +91 -0
- package/dist/components/JSONPathField.cjs.map +1 -0
- package/dist/components/JSONPathField.d.ts +19 -0
- package/dist/components/JSONPathField.d.ts.map +1 -0
- package/dist/components/JSONPathField.js +91 -0
- package/dist/components/JSONPathField.js.map +1 -0
- package/dist/components/JsonSchemaForm.cjs +8 -4
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm.js +8 -4
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/TreePickerField.cjs +22 -4
- package/dist/components/TreePickerField.cjs.map +1 -1
- package/dist/components/TreePickerField.d.ts +22 -2
- package/dist/components/TreePickerField.d.ts.map +1 -1
- package/dist/components/TreePickerField.js +22 -4
- package/dist/components/TreePickerField.js.map +1 -1
- package/dist/components/TriStateToggle.cjs +53 -0
- package/dist/components/TriStateToggle.cjs.map +1 -0
- package/dist/components/TriStateToggle.d.ts +27 -0
- package/dist/components/TriStateToggle.d.ts.map +1 -0
- package/dist/components/TriStateToggle.js +53 -0
- package/dist/components/TriStateToggle.js.map +1 -0
- package/dist/components/combobox-types.d.ts +16 -1
- package/dist/components/combobox-types.d.ts.map +1 -1
- package/dist/components/combobox-utils.cjs +26 -0
- package/dist/components/combobox-utils.cjs.map +1 -1
- package/dist/components/combobox-utils.d.ts +10 -0
- package/dist/components/combobox-utils.d.ts.map +1 -1
- package/dist/components/combobox-utils.js +26 -0
- package/dist/components/combobox-utils.js.map +1 -1
- package/dist/components/filter-bar-utils.cjs +5 -0
- package/dist/components/filter-bar-utils.cjs.map +1 -1
- package/dist/components/filter-bar-utils.d.ts.map +1 -1
- package/dist/components/filter-bar-utils.js +5 -0
- package/dist/components/filter-bar-utils.js.map +1 -1
- package/dist/components/json-schema-form-accordion-array.cjs +290 -0
- package/dist/components/json-schema-form-accordion-array.cjs.map +1 -0
- package/dist/components/json-schema-form-accordion-array.d.ts +7 -0
- package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -0
- package/dist/components/json-schema-form-accordion-array.js +290 -0
- package/dist/components/json-schema-form-accordion-array.js.map +1 -0
- package/dist/components/json-schema-form-array.cjs +99 -110
- package/dist/components/json-schema-form-array.cjs.map +1 -1
- package/dist/components/json-schema-form-array.d.ts +1 -1
- package/dist/components/json-schema-form-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-array.js +98 -109
- package/dist/components/json-schema-form-array.js.map +1 -1
- package/dist/components/json-schema-form-error-display.cjs +4 -2
- package/dist/components/json-schema-form-error-display.cjs.map +1 -1
- package/dist/components/json-schema-form-error-display.d.ts +4 -2
- package/dist/components/json-schema-form-error-display.d.ts.map +1 -1
- package/dist/components/json-schema-form-error-display.js +4 -2
- package/dist/components/json-schema-form-error-display.js.map +1 -1
- package/dist/components/json-schema-form-extensions.cjs +10 -0
- package/dist/components/json-schema-form-extensions.cjs.map +1 -0
- package/dist/components/json-schema-form-extensions.d.ts +8 -0
- package/dist/components/json-schema-form-extensions.d.ts.map +1 -0
- package/dist/components/json-schema-form-extensions.js +10 -0
- package/dist/components/json-schema-form-extensions.js.map +1 -0
- package/dist/components/json-schema-form-fields.cjs +25 -101
- package/dist/components/json-schema-form-fields.cjs.map +1 -1
- package/dist/components/json-schema-form-fields.d.ts +1 -32
- package/dist/components/json-schema-form-fields.d.ts.map +1 -1
- package/dist/components/json-schema-form-fields.js +28 -104
- package/dist/components/json-schema-form-fields.js.map +1 -1
- package/dist/components/json-schema-form-item-summary.cjs +131 -0
- package/dist/components/json-schema-form-item-summary.cjs.map +1 -0
- package/dist/components/json-schema-form-item-summary.d.ts +13 -0
- package/dist/components/json-schema-form-item-summary.d.ts.map +1 -0
- package/dist/components/json-schema-form-item-summary.js +131 -0
- package/dist/components/json-schema-form-item-summary.js.map +1 -0
- package/dist/components/json-schema-form-layout.cjs +156 -0
- package/dist/components/json-schema-form-layout.cjs.map +1 -0
- package/dist/components/json-schema-form-layout.d.ts +43 -0
- package/dist/components/json-schema-form-layout.d.ts.map +1 -0
- package/dist/components/json-schema-form-layout.js +156 -0
- package/dist/components/json-schema-form-layout.js.map +1 -0
- package/dist/components/json-schema-form-lookup-tree.cjs +149 -0
- package/dist/components/json-schema-form-lookup-tree.cjs.map +1 -0
- package/dist/components/json-schema-form-lookup-tree.d.ts +22 -0
- package/dist/components/json-schema-form-lookup-tree.d.ts.map +1 -0
- package/dist/components/json-schema-form-lookup-tree.js +149 -0
- package/dist/components/json-schema-form-lookup-tree.js.map +1 -0
- package/dist/components/json-schema-form-object.cjs +11 -4
- package/dist/components/json-schema-form-object.cjs.map +1 -1
- package/dist/components/json-schema-form-object.d.ts.map +1 -1
- package/dist/components/json-schema-form-object.js +11 -4
- package/dist/components/json-schema-form-object.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +51 -28
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +51 -28
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +62 -13
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts +1 -0
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +62 -13
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-table-array.cjs +123 -0
- package/dist/components/json-schema-form-table-array.cjs.map +1 -0
- package/dist/components/json-schema-form-table-array.d.ts +7 -0
- package/dist/components/json-schema-form-table-array.d.ts.map +1 -0
- package/dist/components/json-schema-form-table-array.js +123 -0
- package/dist/components/json-schema-form-table-array.js.map +1 -0
- package/dist/components/json-schema-form-tone.cjs +34 -0
- package/dist/components/json-schema-form-tone.cjs.map +1 -0
- package/dist/components/json-schema-form-tone.d.ts +8 -0
- package/dist/components/json-schema-form-tone.d.ts.map +1 -0
- package/dist/components/json-schema-form-tone.js +34 -0
- package/dist/components/json-schema-form-tone.js.map +1 -0
- package/dist/components/json-schema-form-types.d.ts +79 -10
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.cjs +47 -4
- package/dist/components/json-schema-form-utils.cjs.map +1 -1
- package/dist/components/json-schema-form-utils.d.ts +19 -4
- package/dist/components/json-schema-form-utils.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.js +47 -4
- package/dist/components/json-schema-form-utils.js.map +1 -1
- package/dist/components/tri-state.cjs +8 -0
- package/dist/components/tri-state.cjs.map +1 -0
- package/dist/components/tri-state.d.ts +5 -0
- package/dist/components/tri-state.d.ts.map +1 -0
- package/dist/components/tri-state.js +8 -0
- package/dist/components/tri-state.js.map +1 -0
- package/dist/components/useComboboxLayout.cjs +59 -0
- package/dist/components/useComboboxLayout.cjs.map +1 -0
- package/dist/components/useComboboxLayout.d.ts +5 -0
- package/dist/components/useComboboxLayout.d.ts.map +1 -0
- package/dist/components/useComboboxLayout.js +59 -0
- package/dist/components/useComboboxLayout.js.map +1 -0
- package/dist/components.cjs +21 -0
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.ts +14 -4
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +22 -1
- package/dist/components.js.map +1 -1
- package/dist/data/Clicky.cjs +51 -2
- package/dist/data/Clicky.cjs.map +1 -1
- package/dist/data/Clicky.d.ts +10 -1
- package/dist/data/Clicky.d.ts.map +1 -1
- package/dist/data/Clicky.js +51 -2
- package/dist/data/Clicky.js.map +1 -1
- package/dist/data/DataTable.cjs +185 -53
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +63 -3
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +185 -53
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/LogsTable.cjs +10 -1
- package/dist/data/LogsTable.cjs.map +1 -1
- package/dist/data/LogsTable.d.ts +3 -1
- package/dist/data/LogsTable.d.ts.map +1 -1
- package/dist/data/LogsTable.js +10 -1
- package/dist/data/LogsTable.js.map +1 -1
- package/dist/data/TaskManager.cjs +99 -14
- package/dist/data/TaskManager.cjs.map +1 -1
- package/dist/data/TaskManager.d.ts.map +1 -1
- package/dist/data/TaskManager.js +100 -15
- package/dist/data/TaskManager.js.map +1 -1
- package/dist/data/TaskProgress.cjs +50 -11
- package/dist/data/TaskProgress.cjs.map +1 -1
- package/dist/data/TaskProgress.d.ts +2 -1
- package/dist/data/TaskProgress.d.ts.map +1 -1
- package/dist/data/TaskProgress.js +50 -11
- package/dist/data/TaskProgress.js.map +1 -1
- package/dist/data/ai/AdvancedChatConfig.cjs +289 -0
- package/dist/data/ai/AdvancedChatConfig.cjs.map +1 -0
- package/dist/data/ai/AdvancedChatConfig.d.ts +21 -0
- package/dist/data/ai/AdvancedChatConfig.d.ts.map +1 -0
- package/dist/data/ai/AdvancedChatConfig.js +289 -0
- package/dist/data/ai/AdvancedChatConfig.js.map +1 -0
- package/dist/data/ai/AdvancedCostsPanel.cjs +120 -0
- package/dist/data/ai/AdvancedCostsPanel.cjs.map +1 -0
- package/dist/data/ai/AdvancedCostsPanel.d.ts +16 -0
- package/dist/data/ai/AdvancedCostsPanel.d.ts.map +1 -0
- package/dist/data/ai/AdvancedCostsPanel.js +120 -0
- package/dist/data/ai/AdvancedCostsPanel.js.map +1 -0
- package/dist/data/ai/ChatWindow.catalogs.cjs +74 -0
- package/dist/data/ai/ChatWindow.catalogs.cjs.map +1 -0
- package/dist/data/ai/ChatWindow.catalogs.d.ts +16 -0
- package/dist/data/ai/ChatWindow.catalogs.d.ts.map +1 -0
- package/dist/data/ai/ChatWindow.catalogs.js +74 -0
- package/dist/data/ai/ChatWindow.catalogs.js.map +1 -0
- package/dist/data/ai/ChatWindow.cjs +78 -100
- package/dist/data/ai/ChatWindow.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.d.ts +1 -1
- package/dist/data/ai/ChatWindow.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.js +80 -102
- package/dist/data/ai/ChatWindow.js.map +1 -1
- package/dist/data/ai/ChatWindow.preferences.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.preferences.d.ts +2 -4
- package/dist/data/ai/ChatWindow.preferences.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.preferences.js.map +1 -1
- package/dist/data/ai/ChatWindow.runtime.cjs +120 -0
- package/dist/data/ai/ChatWindow.runtime.cjs.map +1 -0
- package/dist/data/ai/ChatWindow.runtime.d.ts +20 -0
- package/dist/data/ai/ChatWindow.runtime.d.ts.map +1 -0
- package/dist/data/ai/ChatWindow.runtime.js +120 -0
- package/dist/data/ai/ChatWindow.runtime.js.map +1 -0
- package/dist/data/ai/ChatWindow.thread.cjs +1 -1
- package/dist/data/ai/ChatWindow.thread.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.thread.js +1 -1
- package/dist/data/ai/ChatWindow.thread.js.map +1 -1
- package/dist/data/ai/ChatWindow.tool-catalog.cjs +20 -0
- package/dist/data/ai/ChatWindow.tool-catalog.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.tool-catalog.d.ts +17 -1
- package/dist/data/ai/ChatWindow.tool-catalog.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.tool-catalog.js +20 -0
- package/dist/data/ai/ChatWindow.tool-catalog.js.map +1 -1
- package/dist/data/ai/ChatWindow.types.d.ts +13 -5
- package/dist/data/ai/ChatWindow.types.d.ts.map +1 -1
- package/dist/data/ai/ChatWindowManager.cjs +3 -1
- package/dist/data/ai/ChatWindowManager.cjs.map +1 -1
- package/dist/data/ai/ChatWindowManager.d.ts.map +1 -1
- package/dist/data/ai/ChatWindowManager.js +3 -1
- package/dist/data/ai/ChatWindowManager.js.map +1 -1
- package/dist/data/ai/PromptPicker/PromptPicker.cjs +1 -1
- package/dist/data/ai/PromptPicker/PromptPicker.cjs.map +1 -1
- package/dist/data/ai/PromptPicker/PromptPicker.d.ts +1 -1
- package/dist/data/ai/PromptPicker/PromptPicker.d.ts.map +1 -1
- package/dist/data/ai/PromptPicker/PromptPicker.js +1 -1
- package/dist/data/ai/PromptPicker/PromptPicker.js.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.cjs +2 -2
- package/dist/data/ai/PromptRunEditor/index.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.d.ts +1 -1
- package/dist/data/ai/PromptRunEditor/index.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.js +2 -2
- package/dist/data/ai/PromptRunEditor/index.js.map +1 -1
- package/dist/data/ai/RuntimeModePicker.cjs +1 -1
- package/dist/data/ai/RuntimeModePicker.cjs.map +1 -1
- package/dist/data/ai/RuntimeModePicker.d.ts +1 -1
- package/dist/data/ai/RuntimeModePicker.d.ts.map +1 -1
- package/dist/data/ai/RuntimeModePicker.js +1 -1
- package/dist/data/ai/RuntimeModePicker.js.map +1 -1
- package/dist/data/ai/SessionInspector.files.cjs +26 -43
- package/dist/data/ai/SessionInspector.files.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.files.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.files.js +26 -43
- package/dist/data/ai/SessionInspector.files.js.map +1 -1
- package/dist/data/ai/SessionInspector.hierarchy.cjs +1 -1
- package/dist/data/ai/SessionInspector.hierarchy.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.hierarchy.js +1 -1
- package/dist/data/ai/SessionInspector.hierarchy.js.map +1 -1
- package/dist/data/ai/SessionInspector.model.cjs +1 -1
- package/dist/data/ai/SessionInspector.model.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.model.js +1 -1
- package/dist/data/ai/SessionInspector.model.js.map +1 -1
- package/dist/data/ai/SessionViewer.rows.cjs +4 -16
- package/dist/data/ai/SessionViewer.rows.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.rows.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.rows.js +4 -16
- package/dist/data/ai/SessionViewer.rows.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/ModelSection.cjs +12 -3
- package/dist/data/ai/SpecRuntimeEditor/ModelSection.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/ModelSection.d.ts +1 -1
- package/dist/data/ai/SpecRuntimeEditor/ModelSection.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/ModelSection.js +12 -3
- package/dist/data/ai/SpecRuntimeEditor/ModelSection.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.d.ts +1 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/fields.js +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts +2 -2
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.js.map +1 -1
- package/dist/data/ai/ThreadPicker.cjs +65 -3
- package/dist/data/ai/ThreadPicker.cjs.map +1 -1
- package/dist/data/ai/ThreadPicker.d.ts +11 -5
- package/dist/data/ai/ThreadPicker.d.ts.map +1 -1
- package/dist/data/ai/ThreadPicker.js +65 -3
- package/dist/data/ai/ThreadPicker.js.map +1 -1
- package/dist/data/ai/ToolPreferences.cjs +65 -685
- package/dist/data/ai/ToolPreferences.cjs.map +1 -1
- package/dist/data/ai/ToolPreferences.d.ts +15 -17
- package/dist/data/ai/ToolPreferences.d.ts.map +1 -1
- package/dist/data/ai/ToolPreferences.js +64 -683
- package/dist/data/ai/ToolPreferences.js.map +1 -1
- package/dist/data/ai/ToolPreferences.model.cjs +148 -0
- package/dist/data/ai/ToolPreferences.model.cjs.map +1 -0
- package/dist/data/ai/ToolPreferences.model.d.ts +31 -0
- package/dist/data/ai/ToolPreferences.model.d.ts.map +1 -0
- package/dist/data/ai/ToolPreferences.model.js +148 -0
- package/dist/data/ai/ToolPreferences.model.js.map +1 -0
- package/dist/data/ai/ToolPreferencesList.cjs +270 -0
- package/dist/data/ai/ToolPreferencesList.cjs.map +1 -0
- package/dist/data/ai/ToolPreferencesList.d.ts +18 -0
- package/dist/data/ai/ToolPreferencesList.d.ts.map +1 -0
- package/dist/data/ai/ToolPreferencesList.js +270 -0
- package/dist/data/ai/ToolPreferencesList.js.map +1 -0
- package/dist/data/ai/agent-action-icons.cjs.map +1 -1
- package/dist/data/ai/agent-action-icons.js.map +1 -1
- package/dist/data/ai/chat-window-context.cjs +4 -1
- package/dist/data/ai/chat-window-context.cjs.map +1 -1
- package/dist/data/ai/chat-window-context.d.ts +7 -0
- package/dist/data/ai/chat-window-context.d.ts.map +1 -1
- package/dist/data/ai/chat-window-context.js +4 -1
- package/dist/data/ai/chat-window-context.js.map +1 -1
- package/dist/data/ai/index.d.ts +6 -3
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/session-tones.cjs +67 -0
- package/dist/data/ai/session-tones.cjs.map +1 -0
- package/dist/data/ai/session-tones.d.ts +34 -0
- package/dist/data/ai/session-tones.d.ts.map +1 -0
- package/dist/data/ai/session-tones.js +67 -0
- package/dist/data/ai/session-tones.js.map +1 -0
- package/dist/data/ai/thread-costs.cjs +39 -0
- package/dist/data/ai/thread-costs.cjs.map +1 -0
- package/dist/data/ai/thread-costs.d.ts +62 -0
- package/dist/data/ai/thread-costs.d.ts.map +1 -0
- package/dist/data/ai/thread-costs.js +39 -0
- package/dist/data/ai/thread-costs.js.map +1 -0
- package/dist/data/cells/CellFilterActions.cjs +68 -0
- package/dist/data/cells/CellFilterActions.cjs.map +1 -0
- package/dist/data/cells/CellFilterActions.d.ts +15 -0
- package/dist/data/cells/CellFilterActions.d.ts.map +1 -0
- package/dist/data/cells/CellFilterActions.js +68 -0
- package/dist/data/cells/CellFilterActions.js.map +1 -0
- package/dist/data/chat/Chat.cjs +156 -113
- package/dist/data/chat/Chat.cjs.map +1 -1
- package/dist/data/chat/Chat.d.ts +24 -7
- package/dist/data/chat/Chat.d.ts.map +1 -1
- package/dist/data/chat/Chat.fixtures.cjs +48 -3
- package/dist/data/chat/Chat.fixtures.cjs.map +1 -1
- package/dist/data/chat/Chat.fixtures.d.ts +1 -1
- package/dist/data/chat/Chat.fixtures.d.ts.map +1 -1
- package/dist/data/chat/Chat.fixtures.js +48 -3
- package/dist/data/chat/Chat.fixtures.js.map +1 -1
- package/dist/data/chat/Chat.js +160 -117
- package/dist/data/chat/Chat.js.map +1 -1
- package/dist/data/chat/Chat.runtime.cjs +63 -0
- package/dist/data/chat/Chat.runtime.cjs.map +1 -0
- package/dist/data/chat/Chat.runtime.d.ts +16 -0
- package/dist/data/chat/Chat.runtime.d.ts.map +1 -0
- package/dist/data/chat/Chat.runtime.js +63 -0
- package/dist/data/chat/Chat.runtime.js.map +1 -0
- package/dist/data/chat/ChatRuntimeToolbar.cjs +62 -0
- package/dist/data/chat/ChatRuntimeToolbar.cjs.map +1 -0
- package/dist/data/chat/ChatRuntimeToolbar.d.ts +14 -0
- package/dist/data/chat/ChatRuntimeToolbar.d.ts.map +1 -0
- package/dist/data/chat/ChatRuntimeToolbar.js +62 -0
- package/dist/data/chat/ChatRuntimeToolbar.js.map +1 -0
- package/dist/data/chat/ToolCall.cjs +86 -24
- package/dist/data/chat/ToolCall.cjs.map +1 -1
- package/dist/data/chat/ToolCall.d.ts +12 -5
- package/dist/data/chat/ToolCall.d.ts.map +1 -1
- package/dist/data/chat/ToolCall.js +86 -24
- package/dist/data/chat/ToolCall.js.map +1 -1
- package/dist/data/chat/approval.cjs +49 -6
- package/dist/data/chat/approval.cjs.map +1 -1
- package/dist/data/chat/approval.d.ts +11 -4
- package/dist/data/chat/approval.d.ts.map +1 -1
- package/dist/data/chat/approval.js +49 -6
- package/dist/data/chat/approval.js.map +1 -1
- package/dist/data/chat/index.d.ts +5 -3
- package/dist/data/chat/index.d.ts.map +1 -1
- package/dist/data/chat/tool-render/ToolArgs.cjs +50 -0
- package/dist/data/chat/tool-render/ToolArgs.cjs.map +1 -0
- package/dist/data/chat/tool-render/ToolArgs.d.ts +7 -0
- package/dist/data/chat/tool-render/ToolArgs.d.ts.map +1 -0
- package/dist/data/chat/tool-render/ToolArgs.js +50 -0
- package/dist/data/chat/tool-render/ToolArgs.js.map +1 -0
- package/dist/data/chat/tool-render/ToolParams.cjs +155 -0
- package/dist/data/chat/tool-render/ToolParams.cjs.map +1 -0
- package/dist/data/chat/tool-render/ToolParams.d.ts +20 -0
- package/dist/data/chat/tool-render/ToolParams.d.ts.map +1 -0
- package/dist/data/chat/tool-render/ToolParams.js +155 -0
- package/dist/data/chat/tool-render/ToolParams.js.map +1 -0
- package/dist/data/chat/tool-render/ToolValue.cjs +140 -0
- package/dist/data/chat/tool-render/ToolValue.cjs.map +1 -0
- package/dist/data/chat/tool-render/ToolValue.d.ts +16 -0
- package/dist/data/chat/tool-render/ToolValue.d.ts.map +1 -0
- package/dist/data/chat/tool-render/ToolValue.js +140 -0
- package/dist/data/chat/tool-render/ToolValue.js.map +1 -0
- package/dist/data/chat/tool-render/adapter.cjs +48 -0
- package/dist/data/chat/tool-render/adapter.cjs.map +1 -0
- package/dist/data/chat/tool-render/adapter.d.ts +57 -0
- package/dist/data/chat/tool-render/adapter.d.ts.map +1 -0
- package/dist/data/chat/tool-render/adapter.js +48 -0
- package/dist/data/chat/tool-render/adapter.js.map +1 -0
- package/dist/data/chat/tool-render/context.cjs +16 -0
- package/dist/data/chat/tool-render/context.cjs.map +1 -0
- package/dist/data/chat/tool-render/context.d.ts +6 -0
- package/dist/data/chat/tool-render/context.d.ts.map +1 -0
- package/dist/data/chat/tool-render/context.js +16 -0
- package/dist/data/chat/tool-render/context.js.map +1 -0
- package/dist/data/chat/tool-render/defaults.cjs +45 -0
- package/dist/data/chat/tool-render/defaults.cjs.map +1 -0
- package/dist/data/chat/tool-render/defaults.d.ts +11 -0
- package/dist/data/chat/tool-render/defaults.d.ts.map +1 -0
- package/dist/data/chat/tool-render/defaults.js +45 -0
- package/dist/data/chat/tool-render/defaults.js.map +1 -0
- package/dist/data/chat/tool-render/index.d.ts +13 -0
- package/dist/data/chat/tool-render/index.d.ts.map +1 -0
- package/dist/data/chat/tool-render/known-tool-views.cjs +208 -0
- package/dist/data/chat/tool-render/known-tool-views.cjs.map +1 -0
- package/dist/data/chat/tool-render/known-tool-views.d.ts +10 -0
- package/dist/data/chat/tool-render/known-tool-views.d.ts.map +1 -0
- package/dist/data/chat/tool-render/known-tool-views.js +208 -0
- package/dist/data/chat/tool-render/known-tool-views.js.map +1 -0
- package/dist/data/chat/tool-render/known-tools.cjs +58 -0
- package/dist/data/chat/tool-render/known-tools.cjs.map +1 -0
- package/dist/data/chat/tool-render/known-tools.d.ts +4 -0
- package/dist/data/chat/tool-render/known-tools.d.ts.map +1 -0
- package/dist/data/chat/tool-render/known-tools.js +58 -0
- package/dist/data/chat/tool-render/known-tools.js.map +1 -0
- package/dist/data/chat/tool-render/normalize.cjs +42 -0
- package/dist/data/chat/tool-render/normalize.cjs.map +1 -0
- package/dist/data/chat/tool-render/normalize.d.ts +13 -0
- package/dist/data/chat/tool-render/normalize.d.ts.map +1 -0
- package/dist/data/chat/tool-render/normalize.js +42 -0
- package/dist/data/chat/tool-render/normalize.js.map +1 -0
- package/dist/data/chat/tool-render/registry.cjs +14 -0
- package/dist/data/chat/tool-render/registry.cjs.map +1 -0
- package/dist/data/chat/tool-render/registry.d.ts +7 -0
- package/dist/data/chat/tool-render/registry.d.ts.map +1 -0
- package/dist/data/chat/tool-render/registry.js +14 -0
- package/dist/data/chat/tool-render/registry.js.map +1 -0
- package/dist/data/chat/tool-render/schema.cjs +57 -0
- package/dist/data/chat/tool-render/schema.cjs.map +1 -0
- package/dist/data/chat/tool-render/schema.d.ts +28 -0
- package/dist/data/chat/tool-render/schema.d.ts.map +1 -0
- package/dist/data/chat/tool-render/schema.js +57 -0
- package/dist/data/chat/tool-render/schema.js.map +1 -0
- package/dist/data/chat/tool-render/shape.cjs +94 -0
- package/dist/data/chat/tool-render/shape.cjs.map +1 -0
- package/dist/data/chat/tool-render/shape.d.ts +39 -0
- package/dist/data/chat/tool-render/shape.d.ts.map +1 -0
- package/dist/data/chat/tool-render/shape.js +94 -0
- package/dist/data/chat/tool-render/shape.js.map +1 -0
- package/dist/data/chat/tool-render/summary.cjs +34 -0
- package/dist/data/chat/tool-render/summary.cjs.map +1 -0
- package/dist/data/chat/tool-render/summary.d.ts +8 -0
- package/dist/data/chat/tool-render/summary.d.ts.map +1 -0
- package/dist/data/chat/tool-render/summary.js +34 -0
- package/dist/data/chat/tool-render/summary.js.map +1 -0
- package/dist/data/chat/types.cjs.map +1 -1
- package/dist/data/chat/types.d.ts +7 -0
- package/dist/data/chat/types.d.ts.map +1 -1
- package/dist/data/chat/types.js.map +1 -1
- package/dist/data/chat/usage-snapshot.cjs +17 -0
- package/dist/data/chat/usage-snapshot.cjs.map +1 -0
- package/dist/data/chat/usage-snapshot.d.ts +21 -0
- package/dist/data/chat/usage-snapshot.d.ts.map +1 -0
- package/dist/data/chat/usage-snapshot.js +17 -0
- package/dist/data/chat/usage-snapshot.js.map +1 -0
- package/dist/data/data-table-filter-values.cjs +83 -0
- package/dist/data/data-table-filter-values.cjs.map +1 -0
- package/dist/data/data-table-filter-values.d.ts +18 -0
- package/dist/data/data-table-filter-values.d.ts.map +1 -0
- package/dist/data/data-table-filter-values.js +83 -0
- package/dist/data/data-table-filter-values.js.map +1 -0
- package/dist/data/data-table-server-filters.cjs +171 -0
- package/dist/data/data-table-server-filters.cjs.map +1 -0
- package/dist/data/data-table-server-filters.d.ts +128 -0
- package/dist/data/data-table-server-filters.d.ts.map +1 -0
- package/dist/data/data-table-server-filters.js +171 -0
- package/dist/data/data-table-server-filters.js.map +1 -0
- package/dist/data/query-browser/QueryBrowser.cjs +96 -19
- package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts +37 -6
- package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.js +96 -19
- package/dist/data/query-browser/QueryBrowser.js.map +1 -1
- package/dist/data/query-browser/index.d.ts +1 -1
- package/dist/data/query-browser/index.d.ts.map +1 -1
- package/dist/data/runtime/ProviderStatusPanel.cjs +187 -0
- package/dist/data/runtime/ProviderStatusPanel.cjs.map +1 -0
- package/dist/data/runtime/ProviderStatusPanel.d.ts +10 -0
- package/dist/data/runtime/ProviderStatusPanel.d.ts.map +1 -0
- package/dist/data/runtime/ProviderStatusPanel.js +187 -0
- package/dist/data/runtime/ProviderStatusPanel.js.map +1 -0
- package/dist/data/runtime/RuntimeBar.cjs +147 -0
- package/dist/data/runtime/RuntimeBar.cjs.map +1 -0
- package/dist/data/{ai → runtime}/RuntimeBar.d.ts +8 -6
- package/dist/data/runtime/RuntimeBar.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBar.js +147 -0
- package/dist/data/runtime/RuntimeBar.js.map +1 -0
- package/dist/data/runtime/RuntimeBar.model.cjs.map +1 -0
- package/dist/data/{ai → runtime}/RuntimeBar.model.d.ts +2 -2
- package/dist/data/runtime/RuntimeBar.model.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBar.model.js.map +1 -0
- package/dist/data/{ai → runtime}/RuntimeBarCombo.cjs +25 -30
- package/dist/data/runtime/RuntimeBarCombo.cjs.map +1 -0
- package/dist/data/{ai → runtime}/RuntimeBarCombo.d.ts +4 -3
- package/dist/data/runtime/RuntimeBarCombo.d.ts.map +1 -0
- package/dist/data/{ai → runtime}/RuntimeBarCombo.js +25 -30
- package/dist/data/runtime/RuntimeBarCombo.js.map +1 -0
- package/dist/data/{ai/RuntimeBar.cjs → runtime/RuntimeBarSegments.cjs} +54 -120
- package/dist/data/runtime/RuntimeBarSegments.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBarSegments.d.ts +25 -0
- package/dist/data/runtime/RuntimeBarSegments.d.ts.map +1 -0
- package/dist/data/{ai/RuntimeBar.js → runtime/RuntimeBarSegments.js} +58 -124
- package/dist/data/runtime/RuntimeBarSegments.js.map +1 -0
- package/dist/data/runtime/availability.cjs +11 -0
- package/dist/data/runtime/availability.cjs.map +1 -0
- package/dist/data/runtime/availability.d.ts +6 -0
- package/dist/data/runtime/availability.d.ts.map +1 -0
- package/dist/data/runtime/availability.js +11 -0
- package/dist/data/runtime/availability.js.map +1 -0
- package/dist/data/runtime/model-capabilities.cjs.map +1 -0
- package/dist/data/runtime/model-capabilities.d.ts.map +1 -0
- package/dist/data/runtime/model-capabilities.js.map +1 -0
- package/dist/data/runtime/provider-status.cjs +106 -0
- package/dist/data/runtime/provider-status.cjs.map +1 -0
- package/dist/data/runtime/provider-status.d.ts +24 -0
- package/dist/data/runtime/provider-status.d.ts.map +1 -0
- package/dist/data/runtime/provider-status.js +106 -0
- package/dist/data/runtime/provider-status.js.map +1 -0
- package/dist/data/{ai → runtime}/runtime-mode.cjs +119 -27
- package/dist/data/runtime/runtime-mode.cjs.map +1 -0
- package/dist/data/{ai → runtime}/runtime-mode.d.ts +7 -1
- package/dist/data/runtime/runtime-mode.d.ts.map +1 -0
- package/dist/data/{ai → runtime}/runtime-mode.js +120 -28
- package/dist/data/runtime/runtime-mode.js.map +1 -0
- package/dist/data/task-query-keys.cjs +26 -0
- package/dist/data/task-query-keys.cjs.map +1 -0
- package/dist/data/task-query-keys.d.ts +27 -0
- package/dist/data/task-query-keys.d.ts.map +1 -0
- package/dist/data/task-query-keys.js +26 -0
- package/dist/data/task-query-keys.js.map +1 -0
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +16 -0
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.ts +6 -2
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +16 -0
- package/dist/data.js.map +1 -1
- package/dist/hooks/use-hotkey.cjs +6 -1
- package/dist/hooks/use-hotkey.cjs.map +1 -1
- package/dist/hooks/use-hotkey.d.ts.map +1 -1
- package/dist/hooks/use-hotkey.js +6 -1
- package/dist/hooks/use-hotkey.js.map +1 -1
- package/dist/hooks/use-task-run.cjs +7 -4
- package/dist/hooks/use-task-run.cjs.map +1 -1
- package/dist/hooks/use-task-run.d.ts +12 -0
- package/dist/hooks/use-task-run.d.ts.map +1 -1
- package/dist/hooks/use-task-run.js +7 -4
- package/dist/hooks/use-task-run.js.map +1 -1
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/registry.cjs +692 -0
- package/dist/icons/registry.cjs.map +1 -0
- package/dist/icons/registry.d.ts +21 -0
- package/dist/icons/registry.d.ts.map +1 -0
- package/dist/icons/registry.js +692 -0
- package/dist/icons/registry.js.map +1 -0
- package/dist/icons.cjs +3 -0
- package/dist/icons.cjs.map +1 -1
- package/dist/icons.js +4 -1
- package/dist/icons.js.map +1 -1
- package/dist/index.cjs +47 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +49 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/AppShell.cjs +92 -56
- package/dist/layout/AppShell.cjs.map +1 -1
- package/dist/layout/AppShell.d.ts +49 -1
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/AppShell.js +92 -56
- package/dist/layout/AppShell.js.map +1 -1
- package/dist/layout/AppShell.nav.cjs +144 -19
- package/dist/layout/AppShell.nav.cjs.map +1 -1
- package/dist/layout/AppShell.nav.d.ts +6 -1
- package/dist/layout/AppShell.nav.d.ts.map +1 -1
- package/dist/layout/AppShell.nav.js +144 -19
- package/dist/layout/AppShell.nav.js.map +1 -1
- package/dist/layout/SplitPane.cjs +23 -7
- package/dist/layout/SplitPane.cjs.map +1 -1
- package/dist/layout/SplitPane.d.ts +3 -1
- package/dist/layout/SplitPane.d.ts.map +1 -1
- package/dist/layout/SplitPane.js +23 -7
- package/dist/layout/SplitPane.js.map +1 -1
- package/dist/lib/format.cjs +86 -4
- package/dist/lib/format.cjs.map +1 -1
- package/dist/lib/format.d.ts +69 -0
- package/dist/lib/format.d.ts.map +1 -1
- package/dist/lib/format.js +86 -4
- package/dist/lib/format.js.map +1 -1
- package/dist/lib/path-tree.cjs +69 -0
- package/dist/lib/path-tree.cjs.map +1 -0
- package/dist/lib/path-tree.d.ts +54 -0
- package/dist/lib/path-tree.d.ts.map +1 -0
- package/dist/lib/path-tree.js +69 -0
- package/dist/lib/path-tree.js.map +1 -0
- package/dist/monaco.d.ts +1 -0
- package/dist/monaco.d.ts.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.cjs +13 -7
- package/dist/overlay/DropdownMenuSubmenu.cjs.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.d.ts.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.js +13 -7
- package/dist/overlay/DropdownMenuSubmenu.js.map +1 -1
- package/dist/overlay/Tour.cjs +173 -0
- package/dist/overlay/Tour.cjs.map +1 -0
- package/dist/overlay/Tour.d.ts +61 -0
- package/dist/overlay/Tour.d.ts.map +1 -0
- package/dist/overlay/Tour.js +173 -0
- package/dist/overlay/Tour.js.map +1 -0
- package/dist/overlay/TourCard.cjs +108 -0
- package/dist/overlay/TourCard.cjs.map +1 -0
- package/dist/overlay/TourCard.d.ts +23 -0
- package/dist/overlay/TourCard.d.ts.map +1 -0
- package/dist/overlay/TourCard.js +108 -0
- package/dist/overlay/TourCard.js.map +1 -0
- package/dist/overlay/TourProvider.cjs +160 -0
- package/dist/overlay/TourProvider.cjs.map +1 -0
- package/dist/overlay/TourProvider.d.ts +31 -0
- package/dist/overlay/TourProvider.d.ts.map +1 -0
- package/dist/overlay/TourProvider.js +160 -0
- package/dist/overlay/TourProvider.js.map +1 -0
- package/dist/overlay/TourSpotlight.cjs +47 -0
- package/dist/overlay/TourSpotlight.cjs.map +1 -0
- package/dist/overlay/TourSpotlight.d.ts +12 -0
- package/dist/overlay/TourSpotlight.d.ts.map +1 -0
- package/dist/overlay/TourSpotlight.js +47 -0
- package/dist/overlay/TourSpotlight.js.map +1 -0
- package/dist/overlay/modalStack.cjs +18 -4
- package/dist/overlay/modalStack.cjs.map +1 -1
- package/dist/overlay/modalStack.d.ts +10 -2
- package/dist/overlay/modalStack.d.ts.map +1 -1
- package/dist/overlay/modalStack.js +19 -5
- package/dist/overlay/modalStack.js.map +1 -1
- package/dist/overlay/tour-anchor.cjs +114 -0
- package/dist/overlay/tour-anchor.cjs.map +1 -0
- package/dist/overlay/tour-anchor.d.ts +30 -0
- package/dist/overlay/tour-anchor.d.ts.map +1 -0
- package/dist/overlay/tour-anchor.js +114 -0
- package/dist/overlay/tour-anchor.js.map +1 -0
- package/dist/overlay/tour-context.cjs +12 -0
- package/dist/overlay/tour-context.cjs.map +1 -0
- package/dist/overlay/tour-context.d.ts +40 -0
- package/dist/overlay/tour-context.d.ts.map +1 -0
- package/dist/overlay/tour-context.js +12 -0
- package/dist/overlay/tour-context.js.map +1 -0
- package/dist/overlay/tour-geometry.cjs +65 -0
- package/dist/overlay/tour-geometry.cjs.map +1 -0
- package/dist/overlay/tour-geometry.d.ts +47 -0
- package/dist/overlay/tour-geometry.d.ts.map +1 -0
- package/dist/overlay/tour-geometry.js +65 -0
- package/dist/overlay/tour-geometry.js.map +1 -0
- package/dist/overlay/tour-model.cjs +79 -0
- package/dist/overlay/tour-model.cjs.map +1 -0
- package/dist/overlay/tour-model.d.ts +29 -0
- package/dist/overlay/tour-model.d.ts.map +1 -0
- package/dist/overlay/tour-model.js +79 -0
- package/dist/overlay/tour-model.js.map +1 -0
- package/dist/overlay/tour-progress.cjs +54 -0
- package/dist/overlay/tour-progress.cjs.map +1 -0
- package/dist/overlay/tour-progress.d.ts +40 -0
- package/dist/overlay/tour-progress.d.ts.map +1 -0
- package/dist/overlay/tour-progress.js +54 -0
- package/dist/overlay/tour-progress.js.map +1 -0
- package/dist/overlay/tour-types.d.ts +144 -0
- package/dist/overlay/tour-types.d.ts.map +1 -0
- package/dist/overlay/use-tour-anchor.cjs +43 -0
- package/dist/overlay/use-tour-anchor.cjs.map +1 -0
- package/dist/overlay/use-tour-anchor.d.ts +23 -0
- package/dist/overlay/use-tour-anchor.d.ts.map +1 -0
- package/dist/overlay/use-tour-anchor.js +43 -0
- package/dist/overlay/use-tour-anchor.js.map +1 -0
- package/dist/overlay/use-tour-rect.cjs +33 -0
- package/dist/overlay/use-tour-rect.cjs.map +1 -0
- package/dist/overlay/use-tour-rect.d.ts +12 -0
- package/dist/overlay/use-tour-rect.d.ts.map +1 -0
- package/dist/overlay/use-tour-rect.js +33 -0
- package/dist/overlay/use-tour-rect.js.map +1 -0
- package/dist/overlay/use-tour-step.cjs +66 -0
- package/dist/overlay/use-tour-step.cjs.map +1 -0
- package/dist/overlay/use-tour-step.d.ts +45 -0
- package/dist/overlay/use-tour-step.d.ts.map +1 -0
- package/dist/overlay/use-tour-step.js +66 -0
- package/dist/overlay/use-tour-step.js.map +1 -0
- package/dist/overlay/zIndex.cjs +8 -0
- package/dist/overlay/zIndex.cjs.map +1 -1
- package/dist/overlay/zIndex.d.ts +8 -0
- package/dist/overlay/zIndex.d.ts.map +1 -1
- package/dist/overlay/zIndex.js +8 -0
- package/dist/overlay/zIndex.js.map +1 -1
- package/dist/rpc/CommandOutput.cjs +8 -0
- package/dist/rpc/CommandOutput.cjs.map +1 -1
- package/dist/rpc/CommandOutput.d.ts +4 -1
- package/dist/rpc/CommandOutput.d.ts.map +1 -1
- package/dist/rpc/CommandOutput.js +8 -0
- package/dist/rpc/CommandOutput.js.map +1 -1
- package/dist/rpc/EntityExplorerApp.cjs +10 -16
- package/dist/rpc/EntityExplorerApp.cjs.map +1 -1
- package/dist/rpc/EntityExplorerApp.d.ts.map +1 -1
- package/dist/rpc/EntityExplorerApp.js +10 -16
- package/dist/rpc/EntityExplorerApp.js.map +1 -1
- package/dist/rpc/OperationActionBar.cjs +1 -1
- package/dist/rpc/OperationActionBar.cjs.map +1 -1
- package/dist/rpc/OperationActionBar.js +1 -1
- package/dist/rpc/OperationActionBar.js.map +1 -1
- package/dist/rpc/OperationCatalog.cjs +83 -7
- package/dist/rpc/OperationCatalog.cjs.map +1 -1
- package/dist/rpc/OperationCatalog.d.ts.map +1 -1
- package/dist/rpc/OperationCatalog.js +84 -8
- package/dist/rpc/OperationCatalog.js.map +1 -1
- package/dist/rpc/OperationResultView.cjs +2 -0
- package/dist/rpc/OperationResultView.cjs.map +1 -1
- package/dist/rpc/OperationResultView.d.ts +6 -0
- package/dist/rpc/OperationResultView.d.ts.map +1 -1
- package/dist/rpc/OperationResultView.js +2 -0
- package/dist/rpc/OperationResultView.js.map +1 -1
- package/dist/rpc/SchemaActionForm.cjs +2 -21
- package/dist/rpc/SchemaActionForm.cjs.map +1 -1
- package/dist/rpc/SchemaActionForm.d.ts.map +1 -1
- package/dist/rpc/SchemaActionForm.js +3 -22
- package/dist/rpc/SchemaActionForm.js.map +1 -1
- package/dist/rpc/apiClient.cjs +16 -2
- package/dist/rpc/apiClient.cjs.map +1 -1
- package/dist/rpc/apiClient.d.ts.map +1 -1
- package/dist/rpc/apiClient.js +16 -2
- package/dist/rpc/apiClient.js.map +1 -1
- package/dist/rpc/formMetadata.cjs +89 -49
- package/dist/rpc/formMetadata.cjs.map +1 -1
- package/dist/rpc/formMetadata.d.ts +14 -6
- package/dist/rpc/formMetadata.d.ts.map +1 -1
- package/dist/rpc/formMetadata.js +87 -47
- package/dist/rpc/formMetadata.js.map +1 -1
- package/dist/rpc/operationFilterSearch.cjs +23 -0
- package/dist/rpc/operationFilterSearch.cjs.map +1 -0
- package/dist/rpc/operationFilterSearch.d.ts +22 -0
- package/dist/rpc/operationFilterSearch.d.ts.map +1 -0
- package/dist/rpc/operationFilterSearch.js +23 -0
- package/dist/rpc/operationFilterSearch.js.map +1 -0
- package/dist/rpc/operationLookupFetcher.cjs +28 -0
- package/dist/rpc/operationLookupFetcher.cjs.map +1 -0
- package/dist/rpc/operationLookupFetcher.d.ts +17 -0
- package/dist/rpc/operationLookupFetcher.d.ts.map +1 -0
- package/dist/rpc/operationLookupFetcher.js +28 -0
- package/dist/rpc/operationLookupFetcher.js.map +1 -0
- package/dist/rpc/surfaceNav.cjs +77 -0
- package/dist/rpc/surfaceNav.cjs.map +1 -0
- package/dist/rpc/surfaceNav.d.ts +19 -0
- package/dist/rpc/surfaceNav.d.ts.map +1 -0
- package/dist/rpc/surfaceNav.js +77 -0
- package/dist/rpc/surfaceNav.js.map +1 -0
- package/dist/rpc/types.cjs.map +1 -1
- package/dist/rpc/types.d.ts +12 -1
- package/dist/rpc/types.d.ts.map +1 -1
- package/dist/rpc/types.js.map +1 -1
- package/dist/rpc.cjs +2 -0
- package/dist/rpc.cjs.map +1 -1
- package/dist/rpc.d.ts +1 -0
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +2 -0
- package/dist/rpc.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utils.cjs +8 -0
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +2 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +10 -2
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/data/ai/RuntimeBar.cjs.map +0 -1
- package/dist/data/ai/RuntimeBar.d.ts.map +0 -1
- package/dist/data/ai/RuntimeBar.js.map +0 -1
- package/dist/data/ai/RuntimeBar.model.cjs.map +0 -1
- package/dist/data/ai/RuntimeBar.model.d.ts.map +0 -1
- package/dist/data/ai/RuntimeBar.model.js.map +0 -1
- package/dist/data/ai/RuntimeBarCombo.cjs.map +0 -1
- package/dist/data/ai/RuntimeBarCombo.d.ts.map +0 -1
- package/dist/data/ai/RuntimeBarCombo.js.map +0 -1
- package/dist/data/ai/model-capabilities.cjs.map +0 -1
- package/dist/data/ai/model-capabilities.d.ts.map +0 -1
- package/dist/data/ai/model-capabilities.js.map +0 -1
- package/dist/data/ai/runtime-mode.cjs.map +0 -1
- package/dist/data/ai/runtime-mode.d.ts.map +0 -1
- package/dist/data/ai/runtime-mode.js.map +0 -1
- /package/dist/data/{ai → runtime}/RuntimeBar.model.cjs +0 -0
- /package/dist/data/{ai → runtime}/RuntimeBar.model.js +0 -0
- /package/dist/data/{ai → runtime}/model-capabilities.cjs +0 -0
- /package/dist/data/{ai → runtime}/model-capabilities.d.ts +0 -0
- /package/dist/data/{ai → runtime}/model-capabilities.js +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useContext, createContext } from "react";
|
|
2
|
+
const TourContext = createContext(null);
|
|
3
|
+
function useTour() {
|
|
4
|
+
const ctx = useContext(TourContext);
|
|
5
|
+
if (!ctx) throw new Error("useTour must be used within a <TourProvider>");
|
|
6
|
+
return ctx;
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
TourContext,
|
|
10
|
+
useTour
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=tour-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tour-context.js","sources":["../../src/overlay/tour-context.ts"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport type { TourCompletionStatus } from \"./tour-progress\";\nimport type { TourDefinition } from \"./tour-types\";\n\n/** Status of the running tour. `waiting` means its anchor has not appeared yet. */\nexport type TourStatus = \"idle\" | \"navigating\" | \"waiting\" | \"active\";\n\nexport type TourState = {\n /** Running tour, or null. */\n tourId: string | null;\n /** Zero-based index within the running tour. */\n index: number;\n /** Enabled step count of the running tour — the denominator of \"2 of 6\". */\n total: number;\n status: TourStatus;\n};\n\nexport type TourContextValue = TourState & {\n /**\n * Start a registered tour. `at` jumps to a step id or index; `force` ignores a\n * recorded completion, which is what a \"Take a tour\" button passes.\n */\n start: (tourId: string, options?: { at?: string | number; force?: boolean }) => void;\n /** Advance; completes the tour on the last step. */\n next: () => void;\n back: () => void;\n /** Jump within the running tour by step id or zero-based index. */\n goTo: (step: string | number) => void;\n /** End the running tour and record the outcome. Defaults to `\"dismissed\"`. */\n finish: (status?: TourCompletionStatus) => void;\n /** Has this tour been completed or dismissed at its current `version`? */\n isFinished: (tourId: string) => boolean;\n /** Forget completions so tours are eligible again — a \"Replay tours\" button. */\n reset: (tourId?: string) => void;\n /** Registered tours, for building a \"Take a tour\" menu. */\n tours: TourDefinition[];\n};\n\nexport const TourContext = createContext<TourContextValue | null>(null);\n\n/** Access the tour API. Must be called under a `<TourProvider>`. */\nexport function useTour(): TourContextValue {\n const ctx = useContext(TourContext);\n if (!ctx) throw new Error(\"useTour must be used within a <TourProvider>\");\n return ctx;\n}\n"],"names":[],"mappings":";AAsCO,MAAM,cAAc,cAAuC,IAAI;AAG/D,SAAS,UAA4B;AAC1C,QAAM,MAAM,WAAW,WAAW;AAClC,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,8CAA8C;AACxE,SAAO;AACT;"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function clamp(value, min, max) {
|
|
4
|
+
return Math.min(Math.max(value, min), max);
|
|
5
|
+
}
|
|
6
|
+
function anchorRadius(element) {
|
|
7
|
+
const view = element.ownerDocument.defaultView;
|
|
8
|
+
if (!view) return 0;
|
|
9
|
+
const raw = view.getComputedStyle(element).borderTopLeftRadius;
|
|
10
|
+
if (!raw) return 0;
|
|
11
|
+
if (raw.endsWith("%")) {
|
|
12
|
+
const percent = Number.parseFloat(raw);
|
|
13
|
+
if (!Number.isFinite(percent)) return 0;
|
|
14
|
+
return element.getBoundingClientRect().width * percent / 100;
|
|
15
|
+
}
|
|
16
|
+
const px = Number.parseFloat(raw);
|
|
17
|
+
return Number.isFinite(px) ? px : 0;
|
|
18
|
+
}
|
|
19
|
+
function spotlightRect(options) {
|
|
20
|
+
const { anchor, padding, radius, viewport } = options;
|
|
21
|
+
const left = clamp(anchor.left - padding, 0, viewport.width);
|
|
22
|
+
const top = clamp(anchor.top - padding, 0, viewport.height);
|
|
23
|
+
const right = clamp(anchor.right + padding, 0, viewport.width);
|
|
24
|
+
const bottom = clamp(anchor.bottom + padding, 0, viewport.height);
|
|
25
|
+
const width = Math.max(right - left, 0);
|
|
26
|
+
const height = Math.max(bottom - top, 0);
|
|
27
|
+
const requested = radius ?? 0;
|
|
28
|
+
return {
|
|
29
|
+
x: left,
|
|
30
|
+
y: top,
|
|
31
|
+
width,
|
|
32
|
+
height,
|
|
33
|
+
radius: clamp(requested, 0, Math.min(width, height) / 2)
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function roundedRectPath(rect) {
|
|
37
|
+
const { x, y, width, height, radius: r } = rect;
|
|
38
|
+
if (r <= 0) {
|
|
39
|
+
return `M${x},${y} H${x + width} V${y + height} H${x} Z`;
|
|
40
|
+
}
|
|
41
|
+
return [
|
|
42
|
+
`M${x + r},${y}`,
|
|
43
|
+
`H${x + width - r}`,
|
|
44
|
+
`A${r},${r} 0 0 1 ${x + width},${y + r}`,
|
|
45
|
+
`V${y + height - r}`,
|
|
46
|
+
`A${r},${r} 0 0 1 ${x + width - r},${y + height}`,
|
|
47
|
+
`H${x + r}`,
|
|
48
|
+
`A${r},${r} 0 0 1 ${x},${y + height - r}`,
|
|
49
|
+
`V${y + r}`,
|
|
50
|
+
`A${r},${r} 0 0 1 ${x + r},${y}`,
|
|
51
|
+
"Z"
|
|
52
|
+
].join(" ");
|
|
53
|
+
}
|
|
54
|
+
function spotlightClipPath(options) {
|
|
55
|
+
const { viewport, cutout } = options;
|
|
56
|
+
const outer = `M0,0 H${viewport.width} V${viewport.height} H0 Z`;
|
|
57
|
+
if (!cutout || cutout.width <= 0 || cutout.height <= 0) {
|
|
58
|
+
return `path(evenodd, "${outer}")`;
|
|
59
|
+
}
|
|
60
|
+
return `path(evenodd, "${outer} ${roundedRectPath(cutout)}")`;
|
|
61
|
+
}
|
|
62
|
+
exports.anchorRadius = anchorRadius;
|
|
63
|
+
exports.spotlightClipPath = spotlightClipPath;
|
|
64
|
+
exports.spotlightRect = spotlightRect;
|
|
65
|
+
//# sourceMappingURL=tour-geometry.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tour-geometry.cjs","sources":["../../src/overlay/tour-geometry.ts"],"sourcesContent":["/**\n * Pure spotlight maths. The dim layer is one full-viewport element clipped with\n * `clip-path: path(evenodd, ...)`: the clipped-away hole does not hit-test, so\n * the dim blocks clicks while the anchor underneath stays live — the pointer\n * semantics come free, which no other cutout technique gives us (a\n * `box-shadow: 0 0 0 9999px` ring has them exactly inverted).\n */\n\nexport type Viewport = { width: number; height: number };\n\nexport type SpotlightRect = {\n x: number;\n y: number;\n width: number;\n height: number;\n radius: number;\n};\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\n/**\n * The anchor's own computed corner radius, so the cutout traces the control\n * rather than boxing it. A percentage radius resolves against the element's\n * width, matching how the browser paints it.\n */\nexport function anchorRadius(element: HTMLElement): number {\n const view = element.ownerDocument.defaultView;\n if (!view) return 0;\n const raw = view.getComputedStyle(element).borderTopLeftRadius;\n if (!raw) return 0;\n if (raw.endsWith(\"%\")) {\n const percent = Number.parseFloat(raw);\n if (!Number.isFinite(percent)) return 0;\n return (element.getBoundingClientRect().width * percent) / 100;\n }\n const px = Number.parseFloat(raw);\n return Number.isFinite(px) ? px : 0;\n}\n\n/**\n * Anchor rect grown by `padding` and clamped to the viewport. The radius grows\n * with the padding so the cutout stays concentric with the control it traces,\n * and is capped at half the shorter side so an over-large radius cannot fold the\n * path in on itself.\n */\nexport function spotlightRect(options: {\n anchor: DOMRect;\n padding: number;\n radius?: number | undefined;\n viewport: Viewport;\n}): SpotlightRect {\n const { anchor, padding, radius, viewport } = options;\n const left = clamp(anchor.left - padding, 0, viewport.width);\n const top = clamp(anchor.top - padding, 0, viewport.height);\n const right = clamp(anchor.right + padding, 0, viewport.width);\n const bottom = clamp(anchor.bottom + padding, 0, viewport.height);\n\n const width = Math.max(right - left, 0);\n const height = Math.max(bottom - top, 0);\n const requested = radius ?? 0;\n\n return {\n x: left,\n y: top,\n width,\n height,\n radius: clamp(requested, 0, Math.min(width, height) / 2),\n };\n}\n\nfunction roundedRectPath(rect: SpotlightRect): string {\n const { x, y, width, height, radius: r } = rect;\n if (r <= 0) {\n return `M${x},${y} H${x + width} V${y + height} H${x} Z`;\n }\n return [\n `M${x + r},${y}`,\n `H${x + width - r}`,\n `A${r},${r} 0 0 1 ${x + width},${y + r}`,\n `V${y + height - r}`,\n `A${r},${r} 0 0 1 ${x + width - r},${y + height}`,\n `H${x + r}`,\n `A${r},${r} 0 0 1 ${x},${y + height - r}`,\n `V${y + r}`,\n `A${r},${r} 0 0 1 ${x + r},${y}`,\n \"Z\",\n ].join(\" \");\n}\n\n/**\n * `path(evenodd, \"...\")` for the dim: the viewport rect minus a rounded cutout.\n * A missing or degenerate cutout yields the plain viewport rect, so a zero-size\n * anchor dims the page rather than emitting an invalid path the browser drops\n * (which would leave the dim uncut and the page unusable).\n */\nexport function spotlightClipPath(options: {\n viewport: Viewport;\n cutout: SpotlightRect | null;\n}): string {\n const { viewport, cutout } = options;\n const outer = `M0,0 H${viewport.width} V${viewport.height} H0 Z`;\n if (!cutout || cutout.width <= 0 || cutout.height <= 0) {\n return `path(evenodd, \"${outer}\")`;\n }\n return `path(evenodd, \"${outer} ${roundedRectPath(cutout)}\")`;\n}\n"],"names":[],"mappings":";;AAkBA,SAAS,MAAM,OAAe,KAAa,KAAqB;AAC9D,SAAO,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,GAAG;AAC3C;AAOO,SAAS,aAAa,SAA8B;AACzD,QAAM,OAAO,QAAQ,cAAc;AACnC,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,MAAM,KAAK,iBAAiB,OAAO,EAAE;AAC3C,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI,IAAI,SAAS,GAAG,GAAG;AACrB,UAAM,UAAU,OAAO,WAAW,GAAG;AACrC,QAAI,CAAC,OAAO,SAAS,OAAO,EAAG,QAAO;AACtC,WAAQ,QAAQ,sBAAA,EAAwB,QAAQ,UAAW;AAAA,EAC7D;AACA,QAAM,KAAK,OAAO,WAAW,GAAG;AAChC,SAAO,OAAO,SAAS,EAAE,IAAI,KAAK;AACpC;AAQO,SAAS,cAAc,SAKZ;AAChB,QAAM,EAAE,QAAQ,SAAS,QAAQ,aAAa;AAC9C,QAAM,OAAO,MAAM,OAAO,OAAO,SAAS,GAAG,SAAS,KAAK;AAC3D,QAAM,MAAM,MAAM,OAAO,MAAM,SAAS,GAAG,SAAS,MAAM;AAC1D,QAAM,QAAQ,MAAM,OAAO,QAAQ,SAAS,GAAG,SAAS,KAAK;AAC7D,QAAM,SAAS,MAAM,OAAO,SAAS,SAAS,GAAG,SAAS,MAAM;AAEhE,QAAM,QAAQ,KAAK,IAAI,QAAQ,MAAM,CAAC;AACtC,QAAM,SAAS,KAAK,IAAI,SAAS,KAAK,CAAC;AACvC,QAAM,YAAY,UAAU;AAE5B,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA,QAAQ,MAAM,WAAW,GAAG,KAAK,IAAI,OAAO,MAAM,IAAI,CAAC;AAAA,EAAA;AAE3D;AAEA,SAAS,gBAAgB,MAA6B;AACpD,QAAM,EAAE,GAAG,GAAG,OAAO,QAAQ,QAAQ,MAAM;AAC3C,MAAI,KAAK,GAAG;AACV,WAAO,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,IAAI,MAAM,KAAK,CAAC;AAAA,EACtD;AACA,SAAO;AAAA,IACL,IAAI,IAAI,CAAC,IAAI,CAAC;AAAA,IACd,IAAI,IAAI,QAAQ,CAAC;AAAA,IACjB,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,KAAK,IAAI,IAAI,CAAC;AAAA,IACtC,IAAI,IAAI,SAAS,CAAC;AAAA,IAClB,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,QAAQ,CAAC,IAAI,IAAI,MAAM;AAAA,IAC/C,IAAI,IAAI,CAAC;AAAA,IACT,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,SAAS,CAAC;AAAA,IACvC,IAAI,IAAI,CAAC;AAAA,IACT,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC;AAAA,IAC9B;AAAA,EAAA,EACA,KAAK,GAAG;AACZ;AAQO,SAAS,kBAAkB,SAGvB;AACT,QAAM,EAAE,UAAU,OAAA,IAAW;AAC7B,QAAM,QAAQ,SAAS,SAAS,KAAK,KAAK,SAAS,MAAM;AACzD,MAAI,CAAC,UAAU,OAAO,SAAS,KAAK,OAAO,UAAU,GAAG;AACtD,WAAO,kBAAkB,KAAK;AAAA,EAChC;AACA,SAAO,kBAAkB,KAAK,IAAI,gBAAgB,MAAM,CAAC;AAC3D;;;;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure spotlight maths. The dim layer is one full-viewport element clipped with
|
|
3
|
+
* `clip-path: path(evenodd, ...)`: the clipped-away hole does not hit-test, so
|
|
4
|
+
* the dim blocks clicks while the anchor underneath stays live — the pointer
|
|
5
|
+
* semantics come free, which no other cutout technique gives us (a
|
|
6
|
+
* `box-shadow: 0 0 0 9999px` ring has them exactly inverted).
|
|
7
|
+
*/
|
|
8
|
+
export type Viewport = {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
export type SpotlightRect = {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
radius: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The anchor's own computed corner radius, so the cutout traces the control
|
|
21
|
+
* rather than boxing it. A percentage radius resolves against the element's
|
|
22
|
+
* width, matching how the browser paints it.
|
|
23
|
+
*/
|
|
24
|
+
export declare function anchorRadius(element: HTMLElement): number;
|
|
25
|
+
/**
|
|
26
|
+
* Anchor rect grown by `padding` and clamped to the viewport. The radius grows
|
|
27
|
+
* with the padding so the cutout stays concentric with the control it traces,
|
|
28
|
+
* and is capped at half the shorter side so an over-large radius cannot fold the
|
|
29
|
+
* path in on itself.
|
|
30
|
+
*/
|
|
31
|
+
export declare function spotlightRect(options: {
|
|
32
|
+
anchor: DOMRect;
|
|
33
|
+
padding: number;
|
|
34
|
+
radius?: number | undefined;
|
|
35
|
+
viewport: Viewport;
|
|
36
|
+
}): SpotlightRect;
|
|
37
|
+
/**
|
|
38
|
+
* `path(evenodd, "...")` for the dim: the viewport rect minus a rounded cutout.
|
|
39
|
+
* A missing or degenerate cutout yields the plain viewport rect, so a zero-size
|
|
40
|
+
* anchor dims the page rather than emitting an invalid path the browser drops
|
|
41
|
+
* (which would leave the dim uncut and the page unusable).
|
|
42
|
+
*/
|
|
43
|
+
export declare function spotlightClipPath(options: {
|
|
44
|
+
viewport: Viewport;
|
|
45
|
+
cutout: SpotlightRect | null;
|
|
46
|
+
}): string;
|
|
47
|
+
//# sourceMappingURL=tour-geometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tour-geometry.d.ts","sourceRoot":"","sources":["../../src/overlay/tour-geometry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,QAAQ,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAMF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAYzD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE,QAAQ,CAAC;CACpB,GAAG,aAAa,CAkBhB;AAqBD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;CAC9B,GAAG,MAAM,CAOT"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
function clamp(value, min, max) {
|
|
2
|
+
return Math.min(Math.max(value, min), max);
|
|
3
|
+
}
|
|
4
|
+
function anchorRadius(element) {
|
|
5
|
+
const view = element.ownerDocument.defaultView;
|
|
6
|
+
if (!view) return 0;
|
|
7
|
+
const raw = view.getComputedStyle(element).borderTopLeftRadius;
|
|
8
|
+
if (!raw) return 0;
|
|
9
|
+
if (raw.endsWith("%")) {
|
|
10
|
+
const percent = Number.parseFloat(raw);
|
|
11
|
+
if (!Number.isFinite(percent)) return 0;
|
|
12
|
+
return element.getBoundingClientRect().width * percent / 100;
|
|
13
|
+
}
|
|
14
|
+
const px = Number.parseFloat(raw);
|
|
15
|
+
return Number.isFinite(px) ? px : 0;
|
|
16
|
+
}
|
|
17
|
+
function spotlightRect(options) {
|
|
18
|
+
const { anchor, padding, radius, viewport } = options;
|
|
19
|
+
const left = clamp(anchor.left - padding, 0, viewport.width);
|
|
20
|
+
const top = clamp(anchor.top - padding, 0, viewport.height);
|
|
21
|
+
const right = clamp(anchor.right + padding, 0, viewport.width);
|
|
22
|
+
const bottom = clamp(anchor.bottom + padding, 0, viewport.height);
|
|
23
|
+
const width = Math.max(right - left, 0);
|
|
24
|
+
const height = Math.max(bottom - top, 0);
|
|
25
|
+
const requested = radius ?? 0;
|
|
26
|
+
return {
|
|
27
|
+
x: left,
|
|
28
|
+
y: top,
|
|
29
|
+
width,
|
|
30
|
+
height,
|
|
31
|
+
radius: clamp(requested, 0, Math.min(width, height) / 2)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function roundedRectPath(rect) {
|
|
35
|
+
const { x, y, width, height, radius: r } = rect;
|
|
36
|
+
if (r <= 0) {
|
|
37
|
+
return `M${x},${y} H${x + width} V${y + height} H${x} Z`;
|
|
38
|
+
}
|
|
39
|
+
return [
|
|
40
|
+
`M${x + r},${y}`,
|
|
41
|
+
`H${x + width - r}`,
|
|
42
|
+
`A${r},${r} 0 0 1 ${x + width},${y + r}`,
|
|
43
|
+
`V${y + height - r}`,
|
|
44
|
+
`A${r},${r} 0 0 1 ${x + width - r},${y + height}`,
|
|
45
|
+
`H${x + r}`,
|
|
46
|
+
`A${r},${r} 0 0 1 ${x},${y + height - r}`,
|
|
47
|
+
`V${y + r}`,
|
|
48
|
+
`A${r},${r} 0 0 1 ${x + r},${y}`,
|
|
49
|
+
"Z"
|
|
50
|
+
].join(" ");
|
|
51
|
+
}
|
|
52
|
+
function spotlightClipPath(options) {
|
|
53
|
+
const { viewport, cutout } = options;
|
|
54
|
+
const outer = `M0,0 H${viewport.width} V${viewport.height} H0 Z`;
|
|
55
|
+
if (!cutout || cutout.width <= 0 || cutout.height <= 0) {
|
|
56
|
+
return `path(evenodd, "${outer}")`;
|
|
57
|
+
}
|
|
58
|
+
return `path(evenodd, "${outer} ${roundedRectPath(cutout)}")`;
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
anchorRadius,
|
|
62
|
+
spotlightClipPath,
|
|
63
|
+
spotlightRect
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=tour-geometry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tour-geometry.js","sources":["../../src/overlay/tour-geometry.ts"],"sourcesContent":["/**\n * Pure spotlight maths. The dim layer is one full-viewport element clipped with\n * `clip-path: path(evenodd, ...)`: the clipped-away hole does not hit-test, so\n * the dim blocks clicks while the anchor underneath stays live — the pointer\n * semantics come free, which no other cutout technique gives us (a\n * `box-shadow: 0 0 0 9999px` ring has them exactly inverted).\n */\n\nexport type Viewport = { width: number; height: number };\n\nexport type SpotlightRect = {\n x: number;\n y: number;\n width: number;\n height: number;\n radius: number;\n};\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\n/**\n * The anchor's own computed corner radius, so the cutout traces the control\n * rather than boxing it. A percentage radius resolves against the element's\n * width, matching how the browser paints it.\n */\nexport function anchorRadius(element: HTMLElement): number {\n const view = element.ownerDocument.defaultView;\n if (!view) return 0;\n const raw = view.getComputedStyle(element).borderTopLeftRadius;\n if (!raw) return 0;\n if (raw.endsWith(\"%\")) {\n const percent = Number.parseFloat(raw);\n if (!Number.isFinite(percent)) return 0;\n return (element.getBoundingClientRect().width * percent) / 100;\n }\n const px = Number.parseFloat(raw);\n return Number.isFinite(px) ? px : 0;\n}\n\n/**\n * Anchor rect grown by `padding` and clamped to the viewport. The radius grows\n * with the padding so the cutout stays concentric with the control it traces,\n * and is capped at half the shorter side so an over-large radius cannot fold the\n * path in on itself.\n */\nexport function spotlightRect(options: {\n anchor: DOMRect;\n padding: number;\n radius?: number | undefined;\n viewport: Viewport;\n}): SpotlightRect {\n const { anchor, padding, radius, viewport } = options;\n const left = clamp(anchor.left - padding, 0, viewport.width);\n const top = clamp(anchor.top - padding, 0, viewport.height);\n const right = clamp(anchor.right + padding, 0, viewport.width);\n const bottom = clamp(anchor.bottom + padding, 0, viewport.height);\n\n const width = Math.max(right - left, 0);\n const height = Math.max(bottom - top, 0);\n const requested = radius ?? 0;\n\n return {\n x: left,\n y: top,\n width,\n height,\n radius: clamp(requested, 0, Math.min(width, height) / 2),\n };\n}\n\nfunction roundedRectPath(rect: SpotlightRect): string {\n const { x, y, width, height, radius: r } = rect;\n if (r <= 0) {\n return `M${x},${y} H${x + width} V${y + height} H${x} Z`;\n }\n return [\n `M${x + r},${y}`,\n `H${x + width - r}`,\n `A${r},${r} 0 0 1 ${x + width},${y + r}`,\n `V${y + height - r}`,\n `A${r},${r} 0 0 1 ${x + width - r},${y + height}`,\n `H${x + r}`,\n `A${r},${r} 0 0 1 ${x},${y + height - r}`,\n `V${y + r}`,\n `A${r},${r} 0 0 1 ${x + r},${y}`,\n \"Z\",\n ].join(\" \");\n}\n\n/**\n * `path(evenodd, \"...\")` for the dim: the viewport rect minus a rounded cutout.\n * A missing or degenerate cutout yields the plain viewport rect, so a zero-size\n * anchor dims the page rather than emitting an invalid path the browser drops\n * (which would leave the dim uncut and the page unusable).\n */\nexport function spotlightClipPath(options: {\n viewport: Viewport;\n cutout: SpotlightRect | null;\n}): string {\n const { viewport, cutout } = options;\n const outer = `M0,0 H${viewport.width} V${viewport.height} H0 Z`;\n if (!cutout || cutout.width <= 0 || cutout.height <= 0) {\n return `path(evenodd, \"${outer}\")`;\n }\n return `path(evenodd, \"${outer} ${roundedRectPath(cutout)}\")`;\n}\n"],"names":[],"mappings":"AAkBA,SAAS,MAAM,OAAe,KAAa,KAAqB;AAC9D,SAAO,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,GAAG;AAC3C;AAOO,SAAS,aAAa,SAA8B;AACzD,QAAM,OAAO,QAAQ,cAAc;AACnC,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,MAAM,KAAK,iBAAiB,OAAO,EAAE;AAC3C,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI,IAAI,SAAS,GAAG,GAAG;AACrB,UAAM,UAAU,OAAO,WAAW,GAAG;AACrC,QAAI,CAAC,OAAO,SAAS,OAAO,EAAG,QAAO;AACtC,WAAQ,QAAQ,sBAAA,EAAwB,QAAQ,UAAW;AAAA,EAC7D;AACA,QAAM,KAAK,OAAO,WAAW,GAAG;AAChC,SAAO,OAAO,SAAS,EAAE,IAAI,KAAK;AACpC;AAQO,SAAS,cAAc,SAKZ;AAChB,QAAM,EAAE,QAAQ,SAAS,QAAQ,aAAa;AAC9C,QAAM,OAAO,MAAM,OAAO,OAAO,SAAS,GAAG,SAAS,KAAK;AAC3D,QAAM,MAAM,MAAM,OAAO,MAAM,SAAS,GAAG,SAAS,MAAM;AAC1D,QAAM,QAAQ,MAAM,OAAO,QAAQ,SAAS,GAAG,SAAS,KAAK;AAC7D,QAAM,SAAS,MAAM,OAAO,SAAS,SAAS,GAAG,SAAS,MAAM;AAEhE,QAAM,QAAQ,KAAK,IAAI,QAAQ,MAAM,CAAC;AACtC,QAAM,SAAS,KAAK,IAAI,SAAS,KAAK,CAAC;AACvC,QAAM,YAAY,UAAU;AAE5B,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA,QAAQ,MAAM,WAAW,GAAG,KAAK,IAAI,OAAO,MAAM,IAAI,CAAC;AAAA,EAAA;AAE3D;AAEA,SAAS,gBAAgB,MAA6B;AACpD,QAAM,EAAE,GAAG,GAAG,OAAO,QAAQ,QAAQ,MAAM;AAC3C,MAAI,KAAK,GAAG;AACV,WAAO,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,IAAI,MAAM,KAAK,CAAC;AAAA,EACtD;AACA,SAAO;AAAA,IACL,IAAI,IAAI,CAAC,IAAI,CAAC;AAAA,IACd,IAAI,IAAI,QAAQ,CAAC;AAAA,IACjB,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,KAAK,IAAI,IAAI,CAAC;AAAA,IACtC,IAAI,IAAI,SAAS,CAAC;AAAA,IAClB,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,QAAQ,CAAC,IAAI,IAAI,MAAM;AAAA,IAC/C,IAAI,IAAI,CAAC;AAAA,IACT,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,SAAS,CAAC;AAAA,IACvC,IAAI,IAAI,CAAC;AAAA,IACT,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC;AAAA,IAC9B;AAAA,EAAA,EACA,KAAK,GAAG;AACZ;AAQO,SAAS,kBAAkB,SAGvB;AACT,QAAM,EAAE,UAAU,OAAA,IAAW;AAC7B,QAAM,QAAQ,SAAS,SAAS,KAAK,KAAK,SAAS,MAAM;AACzD,MAAI,CAAC,UAAU,OAAO,SAAS,KAAK,OAAO,UAAU,GAAG;AACtD,WAAO,kBAAkB,KAAK;AAAA,EAChC;AACA,SAAO,kBAAkB,KAAK,IAAI,gBAAgB,MAAM,CAAC;AAC3D;"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const DEFAULT_TOUR_LABELS = {
|
|
4
|
+
back: "Back",
|
|
5
|
+
next: "Next",
|
|
6
|
+
done: "Done",
|
|
7
|
+
skip: "Skip tour",
|
|
8
|
+
close: "Close tour",
|
|
9
|
+
counter: (current, total) => `${current} of ${total}`,
|
|
10
|
+
announce: (current, total, title) => `Step ${current} of ${total}: ${title}`
|
|
11
|
+
};
|
|
12
|
+
function validateTourDefinition(definition) {
|
|
13
|
+
const where = `tour "${definition.id}"`;
|
|
14
|
+
if (!definition.id) throw new Error("Tour definition is missing an id");
|
|
15
|
+
if (definition.steps.length === 0) throw new Error(`${where} has no steps`);
|
|
16
|
+
if (definition.version !== void 0 && definition.version < 1) {
|
|
17
|
+
throw new Error(`${where} has version ${definition.version}; versions start at 1`);
|
|
18
|
+
}
|
|
19
|
+
const seen = /* @__PURE__ */ new Set();
|
|
20
|
+
for (const step of definition.steps) {
|
|
21
|
+
if (!step.id) throw new Error(`${where} has a step with no id`);
|
|
22
|
+
if (seen.has(step.id)) throw new Error(`${where} has duplicate step id "${step.id}"`);
|
|
23
|
+
seen.add(step.id);
|
|
24
|
+
if (step.body !== void 0 && step.markdown !== void 0) {
|
|
25
|
+
throw new Error(`${where} step "${step.id}" sets both body and markdown; pick one`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function isEnabled(step) {
|
|
30
|
+
return step.enabled ? step.enabled() : true;
|
|
31
|
+
}
|
|
32
|
+
function activeSteps(steps) {
|
|
33
|
+
return steps.filter(isEnabled);
|
|
34
|
+
}
|
|
35
|
+
function seekEnabledIndex(steps, from, direction) {
|
|
36
|
+
const delta = direction === "next" ? 1 : -1;
|
|
37
|
+
for (let index = from; index >= 0 && index < steps.length; index += delta) {
|
|
38
|
+
const step = steps[index];
|
|
39
|
+
if (step && isEnabled(step)) return index;
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
function nextStepIndex(steps, from, direction) {
|
|
44
|
+
return seekEnabledIndex(steps, direction === "next" ? from + 1 : from - 1, direction);
|
|
45
|
+
}
|
|
46
|
+
function resolveStepIndex(steps, at) {
|
|
47
|
+
if (typeof at === "number") {
|
|
48
|
+
if (at < 0 || at >= steps.length) {
|
|
49
|
+
throw new Error(`Tour step index ${at} is out of range (0..${steps.length - 1})`);
|
|
50
|
+
}
|
|
51
|
+
return at;
|
|
52
|
+
}
|
|
53
|
+
const index = steps.findIndex((step) => step.id === at);
|
|
54
|
+
if (index === -1) throw new Error(`Unknown tour step id "${at}"`);
|
|
55
|
+
return index;
|
|
56
|
+
}
|
|
57
|
+
function displayPosition(steps, index) {
|
|
58
|
+
let position = 0;
|
|
59
|
+
for (let cursor = 0; cursor <= index && cursor < steps.length; cursor += 1) {
|
|
60
|
+
const step = steps[cursor];
|
|
61
|
+
if (step && isEnabled(step)) position += 1;
|
|
62
|
+
}
|
|
63
|
+
return Math.max(position, 1);
|
|
64
|
+
}
|
|
65
|
+
function describeTarget(target) {
|
|
66
|
+
if (target === void 0) return "(none)";
|
|
67
|
+
if (typeof target === "string") return target;
|
|
68
|
+
if (typeof target === "function") return "(resolver)";
|
|
69
|
+
return `<${target.tagName.toLowerCase()}>`;
|
|
70
|
+
}
|
|
71
|
+
exports.DEFAULT_TOUR_LABELS = DEFAULT_TOUR_LABELS;
|
|
72
|
+
exports.activeSteps = activeSteps;
|
|
73
|
+
exports.describeTarget = describeTarget;
|
|
74
|
+
exports.displayPosition = displayPosition;
|
|
75
|
+
exports.nextStepIndex = nextStepIndex;
|
|
76
|
+
exports.resolveStepIndex = resolveStepIndex;
|
|
77
|
+
exports.seekEnabledIndex = seekEnabledIndex;
|
|
78
|
+
exports.validateTourDefinition = validateTourDefinition;
|
|
79
|
+
//# sourceMappingURL=tour-model.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tour-model.cjs","sources":["../../src/overlay/tour-model.ts"],"sourcesContent":["import type { TourDefinition, TourLabels, TourStep, TourTarget } from \"./tour-types\";\n\n/**\n * Pure sequencing for a tour: validation, step arithmetic, and default copy. No\n * DOM and no React, so the whole traversal is testable without rendering — the\n * counter and skip rules are where the subtle bugs live.\n */\n\nexport const DEFAULT_TOUR_LABELS: TourLabels = {\n back: \"Back\",\n next: \"Next\",\n done: \"Done\",\n skip: \"Skip tour\",\n close: \"Close tour\",\n counter: (current, total) => `${current} of ${total}`,\n announce: (current, total, title) => `Step ${current} of ${total}: ${title}`,\n};\n\n/**\n * Rejects a definition that cannot run, at registration rather than mid-render in\n * front of a user. Duplicate ids are fatal because `goTo` and the persistence key\n * both address steps by id.\n */\nexport function validateTourDefinition(definition: TourDefinition): void {\n const where = `tour \"${definition.id}\"`;\n if (!definition.id) throw new Error(\"Tour definition is missing an id\");\n if (definition.steps.length === 0) throw new Error(`${where} has no steps`);\n if (definition.version !== undefined && definition.version < 1) {\n throw new Error(`${where} has version ${definition.version}; versions start at 1`);\n }\n\n const seen = new Set<string>();\n for (const step of definition.steps) {\n if (!step.id) throw new Error(`${where} has a step with no id`);\n if (seen.has(step.id)) throw new Error(`${where} has duplicate step id \"${step.id}\"`);\n seen.add(step.id);\n if (step.body !== undefined && step.markdown !== undefined) {\n throw new Error(`${where} step \"${step.id}\" sets both body and markdown; pick one`);\n }\n }\n}\n\nfunction isEnabled(step: TourStep): boolean {\n return step.enabled ? step.enabled() : true;\n}\n\n/** Steps whose `enabled()` passes — the denominator for \"2 of 6\". */\nexport function activeSteps(steps: TourStep[]): TourStep[] {\n return steps.filter(isEnabled);\n}\n\n/**\n * Index of the first enabled step at or after `from` when moving forward, or at\n * or before it when moving back. `null` means the tour has run off that end.\n */\nexport function seekEnabledIndex(\n steps: TourStep[],\n from: number,\n direction: \"next\" | \"back\",\n): number | null {\n const delta = direction === \"next\" ? 1 : -1;\n for (let index = from; index >= 0 && index < steps.length; index += delta) {\n const step = steps[index];\n if (step && isEnabled(step)) return index;\n }\n return null;\n}\n\n/** Next/previous enabled index, skipping the step at `from`. `null` past either end. */\nexport function nextStepIndex(\n steps: TourStep[],\n from: number,\n direction: \"next\" | \"back\",\n): number | null {\n return seekEnabledIndex(steps, direction === \"next\" ? from + 1 : from - 1, direction);\n}\n\n/** Resolve a step id or raw index to a raw index, throwing on an unknown id. */\nexport function resolveStepIndex(steps: TourStep[], at: string | number): number {\n if (typeof at === \"number\") {\n if (at < 0 || at >= steps.length) {\n throw new Error(`Tour step index ${at} is out of range (0..${steps.length - 1})`);\n }\n return at;\n }\n const index = steps.findIndex((step) => step.id === at);\n if (index === -1) throw new Error(`Unknown tour step id \"${at}\"`);\n return index;\n}\n\n/** 1-based position of a raw index among the enabled steps, for the counter. */\nexport function displayPosition(steps: TourStep[], index: number): number {\n let position = 0;\n for (let cursor = 0; cursor <= index && cursor < steps.length; cursor += 1) {\n const step = steps[cursor];\n if (step && isEnabled(step)) position += 1;\n }\n return Math.max(position, 1);\n}\n\n/** Human-readable target, for warnings and `TourStepErrorInfo.target`. */\nexport function describeTarget(target: TourTarget | undefined): string {\n if (target === undefined) return \"(none)\";\n if (typeof target === \"string\") return target;\n if (typeof target === \"function\") return \"(resolver)\";\n return `<${target.tagName.toLowerCase()}>`;\n}\n"],"names":[],"mappings":";;AAQO,MAAM,sBAAkC;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS,CAAC,SAAS,UAAU,GAAG,OAAO,OAAO,KAAK;AAAA,EACnD,UAAU,CAAC,SAAS,OAAO,UAAU,QAAQ,OAAO,OAAO,KAAK,KAAK,KAAK;AAC5E;AAOO,SAAS,uBAAuB,YAAkC;AACvE,QAAM,QAAQ,SAAS,WAAW,EAAE;AACpC,MAAI,CAAC,WAAW,GAAI,OAAM,IAAI,MAAM,kCAAkC;AACtE,MAAI,WAAW,MAAM,WAAW,SAAS,IAAI,MAAM,GAAG,KAAK,eAAe;AAC1E,MAAI,WAAW,YAAY,UAAa,WAAW,UAAU,GAAG;AAC9D,UAAM,IAAI,MAAM,GAAG,KAAK,gBAAgB,WAAW,OAAO,uBAAuB;AAAA,EACnF;AAEA,QAAM,2BAAW,IAAA;AACjB,aAAW,QAAQ,WAAW,OAAO;AACnC,QAAI,CAAC,KAAK,GAAI,OAAM,IAAI,MAAM,GAAG,KAAK,wBAAwB;AAC9D,QAAI,KAAK,IAAI,KAAK,EAAE,EAAG,OAAM,IAAI,MAAM,GAAG,KAAK,2BAA2B,KAAK,EAAE,GAAG;AACpF,SAAK,IAAI,KAAK,EAAE;AAChB,QAAI,KAAK,SAAS,UAAa,KAAK,aAAa,QAAW;AAC1D,YAAM,IAAI,MAAM,GAAG,KAAK,UAAU,KAAK,EAAE,yCAAyC;AAAA,IACpF;AAAA,EACF;AACF;AAEA,SAAS,UAAU,MAAyB;AAC1C,SAAO,KAAK,UAAU,KAAK,QAAA,IAAY;AACzC;AAGO,SAAS,YAAY,OAA+B;AACzD,SAAO,MAAM,OAAO,SAAS;AAC/B;AAMO,SAAS,iBACd,OACA,MACA,WACe;AACf,QAAM,QAAQ,cAAc,SAAS,IAAI;AACzC,WAAS,QAAQ,MAAM,SAAS,KAAK,QAAQ,MAAM,QAAQ,SAAS,OAAO;AACzE,UAAM,OAAO,MAAM,KAAK;AACxB,QAAI,QAAQ,UAAU,IAAI,EAAG,QAAO;AAAA,EACtC;AACA,SAAO;AACT;AAGO,SAAS,cACd,OACA,MACA,WACe;AACf,SAAO,iBAAiB,OAAO,cAAc,SAAS,OAAO,IAAI,OAAO,GAAG,SAAS;AACtF;AAGO,SAAS,iBAAiB,OAAmB,IAA6B;AAC/E,MAAI,OAAO,OAAO,UAAU;AAC1B,QAAI,KAAK,KAAK,MAAM,MAAM,QAAQ;AAChC,YAAM,IAAI,MAAM,mBAAmB,EAAE,wBAAwB,MAAM,SAAS,CAAC,GAAG;AAAA,IAClF;AACA,WAAO;AAAA,EACT;AACA,QAAM,QAAQ,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO,EAAE;AACtD,MAAI,UAAU,GAAI,OAAM,IAAI,MAAM,yBAAyB,EAAE,GAAG;AAChE,SAAO;AACT;AAGO,SAAS,gBAAgB,OAAmB,OAAuB;AACxE,MAAI,WAAW;AACf,WAAS,SAAS,GAAG,UAAU,SAAS,SAAS,MAAM,QAAQ,UAAU,GAAG;AAC1E,UAAM,OAAO,MAAM,MAAM;AACzB,QAAI,QAAQ,UAAU,IAAI,EAAG,aAAY;AAAA,EAC3C;AACA,SAAO,KAAK,IAAI,UAAU,CAAC;AAC7B;AAGO,SAAS,eAAe,QAAwC;AACrE,MAAI,WAAW,OAAW,QAAO;AACjC,MAAI,OAAO,WAAW,SAAU,QAAO;AACvC,MAAI,OAAO,WAAW,WAAY,QAAO;AACzC,SAAO,IAAI,OAAO,QAAQ,YAAA,CAAa;AACzC;;;;;;;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TourDefinition, TourLabels, TourStep, TourTarget } from './tour-types';
|
|
2
|
+
/**
|
|
3
|
+
* Pure sequencing for a tour: validation, step arithmetic, and default copy. No
|
|
4
|
+
* DOM and no React, so the whole traversal is testable without rendering — the
|
|
5
|
+
* counter and skip rules are where the subtle bugs live.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_TOUR_LABELS: TourLabels;
|
|
8
|
+
/**
|
|
9
|
+
* Rejects a definition that cannot run, at registration rather than mid-render in
|
|
10
|
+
* front of a user. Duplicate ids are fatal because `goTo` and the persistence key
|
|
11
|
+
* both address steps by id.
|
|
12
|
+
*/
|
|
13
|
+
export declare function validateTourDefinition(definition: TourDefinition): void;
|
|
14
|
+
/** Steps whose `enabled()` passes — the denominator for "2 of 6". */
|
|
15
|
+
export declare function activeSteps(steps: TourStep[]): TourStep[];
|
|
16
|
+
/**
|
|
17
|
+
* Index of the first enabled step at or after `from` when moving forward, or at
|
|
18
|
+
* or before it when moving back. `null` means the tour has run off that end.
|
|
19
|
+
*/
|
|
20
|
+
export declare function seekEnabledIndex(steps: TourStep[], from: number, direction: "next" | "back"): number | null;
|
|
21
|
+
/** Next/previous enabled index, skipping the step at `from`. `null` past either end. */
|
|
22
|
+
export declare function nextStepIndex(steps: TourStep[], from: number, direction: "next" | "back"): number | null;
|
|
23
|
+
/** Resolve a step id or raw index to a raw index, throwing on an unknown id. */
|
|
24
|
+
export declare function resolveStepIndex(steps: TourStep[], at: string | number): number;
|
|
25
|
+
/** 1-based position of a raw index among the enabled steps, for the counter. */
|
|
26
|
+
export declare function displayPosition(steps: TourStep[], index: number): number;
|
|
27
|
+
/** Human-readable target, for warnings and `TourStepErrorInfo.target`. */
|
|
28
|
+
export declare function describeTarget(target: TourTarget | undefined): string;
|
|
29
|
+
//# sourceMappingURL=tour-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tour-model.d.ts","sourceRoot":"","sources":["../../src/overlay/tour-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAErF;;;;GAIG;AAEH,eAAO,MAAM,mBAAmB,EAAE,UAQjC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,CAiBvE;AAMD,qEAAqE;AACrE,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAEzD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,QAAQ,EAAE,EACjB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,MAAM,GACzB,MAAM,GAAG,IAAI,CAOf;AAED,wFAAwF;AACxF,wBAAgB,aAAa,CAC3B,KAAK,EAAE,QAAQ,EAAE,EACjB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,MAAM,GACzB,MAAM,GAAG,IAAI,CAEf;AAED,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAU/E;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAOxE;AAED,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM,CAKrE"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
const DEFAULT_TOUR_LABELS = {
|
|
2
|
+
back: "Back",
|
|
3
|
+
next: "Next",
|
|
4
|
+
done: "Done",
|
|
5
|
+
skip: "Skip tour",
|
|
6
|
+
close: "Close tour",
|
|
7
|
+
counter: (current, total) => `${current} of ${total}`,
|
|
8
|
+
announce: (current, total, title) => `Step ${current} of ${total}: ${title}`
|
|
9
|
+
};
|
|
10
|
+
function validateTourDefinition(definition) {
|
|
11
|
+
const where = `tour "${definition.id}"`;
|
|
12
|
+
if (!definition.id) throw new Error("Tour definition is missing an id");
|
|
13
|
+
if (definition.steps.length === 0) throw new Error(`${where} has no steps`);
|
|
14
|
+
if (definition.version !== void 0 && definition.version < 1) {
|
|
15
|
+
throw new Error(`${where} has version ${definition.version}; versions start at 1`);
|
|
16
|
+
}
|
|
17
|
+
const seen = /* @__PURE__ */ new Set();
|
|
18
|
+
for (const step of definition.steps) {
|
|
19
|
+
if (!step.id) throw new Error(`${where} has a step with no id`);
|
|
20
|
+
if (seen.has(step.id)) throw new Error(`${where} has duplicate step id "${step.id}"`);
|
|
21
|
+
seen.add(step.id);
|
|
22
|
+
if (step.body !== void 0 && step.markdown !== void 0) {
|
|
23
|
+
throw new Error(`${where} step "${step.id}" sets both body and markdown; pick one`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function isEnabled(step) {
|
|
28
|
+
return step.enabled ? step.enabled() : true;
|
|
29
|
+
}
|
|
30
|
+
function activeSteps(steps) {
|
|
31
|
+
return steps.filter(isEnabled);
|
|
32
|
+
}
|
|
33
|
+
function seekEnabledIndex(steps, from, direction) {
|
|
34
|
+
const delta = direction === "next" ? 1 : -1;
|
|
35
|
+
for (let index = from; index >= 0 && index < steps.length; index += delta) {
|
|
36
|
+
const step = steps[index];
|
|
37
|
+
if (step && isEnabled(step)) return index;
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
function nextStepIndex(steps, from, direction) {
|
|
42
|
+
return seekEnabledIndex(steps, direction === "next" ? from + 1 : from - 1, direction);
|
|
43
|
+
}
|
|
44
|
+
function resolveStepIndex(steps, at) {
|
|
45
|
+
if (typeof at === "number") {
|
|
46
|
+
if (at < 0 || at >= steps.length) {
|
|
47
|
+
throw new Error(`Tour step index ${at} is out of range (0..${steps.length - 1})`);
|
|
48
|
+
}
|
|
49
|
+
return at;
|
|
50
|
+
}
|
|
51
|
+
const index = steps.findIndex((step) => step.id === at);
|
|
52
|
+
if (index === -1) throw new Error(`Unknown tour step id "${at}"`);
|
|
53
|
+
return index;
|
|
54
|
+
}
|
|
55
|
+
function displayPosition(steps, index) {
|
|
56
|
+
let position = 0;
|
|
57
|
+
for (let cursor = 0; cursor <= index && cursor < steps.length; cursor += 1) {
|
|
58
|
+
const step = steps[cursor];
|
|
59
|
+
if (step && isEnabled(step)) position += 1;
|
|
60
|
+
}
|
|
61
|
+
return Math.max(position, 1);
|
|
62
|
+
}
|
|
63
|
+
function describeTarget(target) {
|
|
64
|
+
if (target === void 0) return "(none)";
|
|
65
|
+
if (typeof target === "string") return target;
|
|
66
|
+
if (typeof target === "function") return "(resolver)";
|
|
67
|
+
return `<${target.tagName.toLowerCase()}>`;
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
DEFAULT_TOUR_LABELS,
|
|
71
|
+
activeSteps,
|
|
72
|
+
describeTarget,
|
|
73
|
+
displayPosition,
|
|
74
|
+
nextStepIndex,
|
|
75
|
+
resolveStepIndex,
|
|
76
|
+
seekEnabledIndex,
|
|
77
|
+
validateTourDefinition
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=tour-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tour-model.js","sources":["../../src/overlay/tour-model.ts"],"sourcesContent":["import type { TourDefinition, TourLabels, TourStep, TourTarget } from \"./tour-types\";\n\n/**\n * Pure sequencing for a tour: validation, step arithmetic, and default copy. No\n * DOM and no React, so the whole traversal is testable without rendering — the\n * counter and skip rules are where the subtle bugs live.\n */\n\nexport const DEFAULT_TOUR_LABELS: TourLabels = {\n back: \"Back\",\n next: \"Next\",\n done: \"Done\",\n skip: \"Skip tour\",\n close: \"Close tour\",\n counter: (current, total) => `${current} of ${total}`,\n announce: (current, total, title) => `Step ${current} of ${total}: ${title}`,\n};\n\n/**\n * Rejects a definition that cannot run, at registration rather than mid-render in\n * front of a user. Duplicate ids are fatal because `goTo` and the persistence key\n * both address steps by id.\n */\nexport function validateTourDefinition(definition: TourDefinition): void {\n const where = `tour \"${definition.id}\"`;\n if (!definition.id) throw new Error(\"Tour definition is missing an id\");\n if (definition.steps.length === 0) throw new Error(`${where} has no steps`);\n if (definition.version !== undefined && definition.version < 1) {\n throw new Error(`${where} has version ${definition.version}; versions start at 1`);\n }\n\n const seen = new Set<string>();\n for (const step of definition.steps) {\n if (!step.id) throw new Error(`${where} has a step with no id`);\n if (seen.has(step.id)) throw new Error(`${where} has duplicate step id \"${step.id}\"`);\n seen.add(step.id);\n if (step.body !== undefined && step.markdown !== undefined) {\n throw new Error(`${where} step \"${step.id}\" sets both body and markdown; pick one`);\n }\n }\n}\n\nfunction isEnabled(step: TourStep): boolean {\n return step.enabled ? step.enabled() : true;\n}\n\n/** Steps whose `enabled()` passes — the denominator for \"2 of 6\". */\nexport function activeSteps(steps: TourStep[]): TourStep[] {\n return steps.filter(isEnabled);\n}\n\n/**\n * Index of the first enabled step at or after `from` when moving forward, or at\n * or before it when moving back. `null` means the tour has run off that end.\n */\nexport function seekEnabledIndex(\n steps: TourStep[],\n from: number,\n direction: \"next\" | \"back\",\n): number | null {\n const delta = direction === \"next\" ? 1 : -1;\n for (let index = from; index >= 0 && index < steps.length; index += delta) {\n const step = steps[index];\n if (step && isEnabled(step)) return index;\n }\n return null;\n}\n\n/** Next/previous enabled index, skipping the step at `from`. `null` past either end. */\nexport function nextStepIndex(\n steps: TourStep[],\n from: number,\n direction: \"next\" | \"back\",\n): number | null {\n return seekEnabledIndex(steps, direction === \"next\" ? from + 1 : from - 1, direction);\n}\n\n/** Resolve a step id or raw index to a raw index, throwing on an unknown id. */\nexport function resolveStepIndex(steps: TourStep[], at: string | number): number {\n if (typeof at === \"number\") {\n if (at < 0 || at >= steps.length) {\n throw new Error(`Tour step index ${at} is out of range (0..${steps.length - 1})`);\n }\n return at;\n }\n const index = steps.findIndex((step) => step.id === at);\n if (index === -1) throw new Error(`Unknown tour step id \"${at}\"`);\n return index;\n}\n\n/** 1-based position of a raw index among the enabled steps, for the counter. */\nexport function displayPosition(steps: TourStep[], index: number): number {\n let position = 0;\n for (let cursor = 0; cursor <= index && cursor < steps.length; cursor += 1) {\n const step = steps[cursor];\n if (step && isEnabled(step)) position += 1;\n }\n return Math.max(position, 1);\n}\n\n/** Human-readable target, for warnings and `TourStepErrorInfo.target`. */\nexport function describeTarget(target: TourTarget | undefined): string {\n if (target === undefined) return \"(none)\";\n if (typeof target === \"string\") return target;\n if (typeof target === \"function\") return \"(resolver)\";\n return `<${target.tagName.toLowerCase()}>`;\n}\n"],"names":[],"mappings":"AAQO,MAAM,sBAAkC;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS,CAAC,SAAS,UAAU,GAAG,OAAO,OAAO,KAAK;AAAA,EACnD,UAAU,CAAC,SAAS,OAAO,UAAU,QAAQ,OAAO,OAAO,KAAK,KAAK,KAAK;AAC5E;AAOO,SAAS,uBAAuB,YAAkC;AACvE,QAAM,QAAQ,SAAS,WAAW,EAAE;AACpC,MAAI,CAAC,WAAW,GAAI,OAAM,IAAI,MAAM,kCAAkC;AACtE,MAAI,WAAW,MAAM,WAAW,SAAS,IAAI,MAAM,GAAG,KAAK,eAAe;AAC1E,MAAI,WAAW,YAAY,UAAa,WAAW,UAAU,GAAG;AAC9D,UAAM,IAAI,MAAM,GAAG,KAAK,gBAAgB,WAAW,OAAO,uBAAuB;AAAA,EACnF;AAEA,QAAM,2BAAW,IAAA;AACjB,aAAW,QAAQ,WAAW,OAAO;AACnC,QAAI,CAAC,KAAK,GAAI,OAAM,IAAI,MAAM,GAAG,KAAK,wBAAwB;AAC9D,QAAI,KAAK,IAAI,KAAK,EAAE,EAAG,OAAM,IAAI,MAAM,GAAG,KAAK,2BAA2B,KAAK,EAAE,GAAG;AACpF,SAAK,IAAI,KAAK,EAAE;AAChB,QAAI,KAAK,SAAS,UAAa,KAAK,aAAa,QAAW;AAC1D,YAAM,IAAI,MAAM,GAAG,KAAK,UAAU,KAAK,EAAE,yCAAyC;AAAA,IACpF;AAAA,EACF;AACF;AAEA,SAAS,UAAU,MAAyB;AAC1C,SAAO,KAAK,UAAU,KAAK,QAAA,IAAY;AACzC;AAGO,SAAS,YAAY,OAA+B;AACzD,SAAO,MAAM,OAAO,SAAS;AAC/B;AAMO,SAAS,iBACd,OACA,MACA,WACe;AACf,QAAM,QAAQ,cAAc,SAAS,IAAI;AACzC,WAAS,QAAQ,MAAM,SAAS,KAAK,QAAQ,MAAM,QAAQ,SAAS,OAAO;AACzE,UAAM,OAAO,MAAM,KAAK;AACxB,QAAI,QAAQ,UAAU,IAAI,EAAG,QAAO;AAAA,EACtC;AACA,SAAO;AACT;AAGO,SAAS,cACd,OACA,MACA,WACe;AACf,SAAO,iBAAiB,OAAO,cAAc,SAAS,OAAO,IAAI,OAAO,GAAG,SAAS;AACtF;AAGO,SAAS,iBAAiB,OAAmB,IAA6B;AAC/E,MAAI,OAAO,OAAO,UAAU;AAC1B,QAAI,KAAK,KAAK,MAAM,MAAM,QAAQ;AAChC,YAAM,IAAI,MAAM,mBAAmB,EAAE,wBAAwB,MAAM,SAAS,CAAC,GAAG;AAAA,IAClF;AACA,WAAO;AAAA,EACT;AACA,QAAM,QAAQ,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO,EAAE;AACtD,MAAI,UAAU,GAAI,OAAM,IAAI,MAAM,yBAAyB,EAAE,GAAG;AAChE,SAAO;AACT;AAGO,SAAS,gBAAgB,OAAmB,OAAuB;AACxE,MAAI,WAAW;AACf,WAAS,SAAS,GAAG,UAAU,SAAS,SAAS,MAAM,QAAQ,UAAU,GAAG;AAC1E,UAAM,OAAO,MAAM,MAAM;AACzB,QAAI,QAAQ,UAAU,IAAI,EAAG,aAAY;AAAA,EAC3C;AACA,SAAO,KAAK,IAAI,UAAU,CAAC;AAC7B;AAGO,SAAS,eAAe,QAAwC;AACrE,MAAI,WAAW,OAAW,QAAO;AACjC,MAAI,OAAO,WAAW,SAAU,QAAO;AACvC,MAAI,OAAO,WAAW,WAAY,QAAO;AACzC,SAAO,IAAI,OAAO,QAAQ,YAAA,CAAa;AACzC;"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const DEFAULT_KEY = "clicky-ui-tours";
|
|
4
|
+
function isCompletion(value) {
|
|
5
|
+
if (!value || typeof value !== "object") return false;
|
|
6
|
+
const entry = value;
|
|
7
|
+
return typeof entry.tourId === "string" && (entry.status === "completed" || entry.status === "dismissed") && typeof entry.version === "number";
|
|
8
|
+
}
|
|
9
|
+
function localStorageTourStorage(key = DEFAULT_KEY) {
|
|
10
|
+
const load = () => {
|
|
11
|
+
if (typeof localStorage === "undefined") return [];
|
|
12
|
+
try {
|
|
13
|
+
const raw = localStorage.getItem(key);
|
|
14
|
+
if (!raw) return [];
|
|
15
|
+
const parsed = JSON.parse(raw);
|
|
16
|
+
return Array.isArray(parsed) ? parsed.filter(isCompletion) : [];
|
|
17
|
+
} catch {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const save = (entries) => {
|
|
22
|
+
if (typeof localStorage === "undefined") return;
|
|
23
|
+
try {
|
|
24
|
+
localStorage.setItem(key, JSON.stringify(entries));
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
return {
|
|
29
|
+
read: load,
|
|
30
|
+
write: (entry) => save([...load().filter((e) => e.tourId !== entry.tourId), entry]),
|
|
31
|
+
clear: (tourId) => save(tourId ? load().filter((e) => e.tourId !== tourId) : [])
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function memoryTourStorage(seed = []) {
|
|
35
|
+
let entries = [...seed];
|
|
36
|
+
return {
|
|
37
|
+
read: () => entries,
|
|
38
|
+
write: (entry) => {
|
|
39
|
+
entries = [...entries.filter((e) => e.tourId !== entry.tourId), entry];
|
|
40
|
+
},
|
|
41
|
+
clear: (tourId) => {
|
|
42
|
+
entries = tourId ? entries.filter((e) => e.tourId !== tourId) : [];
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function isTourFinished(completions, definition) {
|
|
47
|
+
const entry = completions.find((completion) => completion.tourId === definition.id);
|
|
48
|
+
if (!entry) return false;
|
|
49
|
+
return entry.version >= (definition.version ?? 1);
|
|
50
|
+
}
|
|
51
|
+
exports.isTourFinished = isTourFinished;
|
|
52
|
+
exports.localStorageTourStorage = localStorageTourStorage;
|
|
53
|
+
exports.memoryTourStorage = memoryTourStorage;
|
|
54
|
+
//# sourceMappingURL=tour-progress.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tour-progress.cjs","sources":["../../src/overlay/tour-progress.ts"],"sourcesContent":["import type { TourDefinition } from \"./tour-types\";\n\n/**\n * Completion persistence for tours.\n *\n * The default is a localStorage store so the zero-config path works, but the\n * seam is an adapter rather than a boolean because completion is *user* state,\n * not device state: someone who signs in on a second machine should not re-see a\n * first-run tour, and an admin may want to reset one for a whole org. Both are\n * expressible as a `TourStorage`; neither is expressible as \"the library owns\n * localStorage\" or as a bare `completed` prop.\n */\n\nexport type TourCompletionStatus = \"completed\" | \"dismissed\";\n\nexport type TourCompletion = {\n tourId: string;\n status: TourCompletionStatus;\n /** The definition `version` this was recorded against. */\n version: number;\n /** ISO timestamp. */\n at: string;\n};\n\nexport type TourStorage = {\n read: () => TourCompletion[] | Promise<TourCompletion[]>;\n write: (entry: TourCompletion) => void | Promise<void>;\n clear: (tourId?: string) => void | Promise<void>;\n};\n\nconst DEFAULT_KEY = \"clicky-ui-tours\";\n\nfunction isCompletion(value: unknown): value is TourCompletion {\n if (!value || typeof value !== \"object\") return false;\n const entry = value as Partial<TourCompletion>;\n return (\n typeof entry.tourId === \"string\" &&\n (entry.status === \"completed\" || entry.status === \"dismissed\") &&\n typeof entry.version === \"number\"\n );\n}\n\n/**\n * localStorage-backed store, keyed like `clicky-ui-theme` / `clicky-ui-density`.\n * A corrupt or unreadable value reads as \"nothing recorded\" — the cost of being\n * wrong is re-offering a tour, so refusing to boot over it would be worse.\n */\nexport function localStorageTourStorage(key: string = DEFAULT_KEY): TourStorage {\n const load = (): TourCompletion[] => {\n if (typeof localStorage === \"undefined\") return [];\n try {\n const raw = localStorage.getItem(key);\n if (!raw) return [];\n const parsed: unknown = JSON.parse(raw);\n return Array.isArray(parsed) ? parsed.filter(isCompletion) : [];\n } catch {\n return [];\n }\n };\n\n const save = (entries: TourCompletion[]) => {\n if (typeof localStorage === \"undefined\") return;\n try {\n localStorage.setItem(key, JSON.stringify(entries));\n } catch {\n // A full or blocked quota must not break the tour that just finished.\n }\n };\n\n return {\n read: load,\n write: (entry) => save([...load().filter((e) => e.tourId !== entry.tourId), entry]),\n clear: (tourId) => save(tourId ? load().filter((e) => e.tourId !== tourId) : []),\n };\n}\n\n/** In-memory store, for tests, stories, and embedded/mocked renderings. */\nexport function memoryTourStorage(seed: TourCompletion[] = []): TourStorage {\n let entries = [...seed];\n return {\n read: () => entries,\n write: (entry) => {\n entries = [...entries.filter((e) => e.tourId !== entry.tourId), entry];\n },\n clear: (tourId) => {\n entries = tourId ? entries.filter((e) => e.tourId !== tourId) : [];\n },\n };\n}\n\n/**\n * True when a recorded completion still covers the definition's current version.\n * Bumping `version` on a reworked tour makes prior completions stale, so it is\n * offered again with no migration step.\n */\nexport function isTourFinished(\n completions: TourCompletion[],\n definition: TourDefinition,\n): boolean {\n const entry = completions.find((completion) => completion.tourId === definition.id);\n if (!entry) return false;\n return entry.version >= (definition.version ?? 1);\n}\n"],"names":[],"mappings":";;AA8BA,MAAM,cAAc;AAEpB,SAAS,aAAa,OAAyC;AAC7D,MAAI,CAAC,SAAS,OAAO,UAAU,SAAU,QAAO;AAChD,QAAM,QAAQ;AACd,SACE,OAAO,MAAM,WAAW,aACvB,MAAM,WAAW,eAAe,MAAM,WAAW,gBAClD,OAAO,MAAM,YAAY;AAE7B;AAOO,SAAS,wBAAwB,MAAc,aAA0B;AAC9E,QAAM,OAAO,MAAwB;AACnC,QAAI,OAAO,iBAAiB,YAAa,QAAO,CAAA;AAChD,QAAI;AACF,YAAM,MAAM,aAAa,QAAQ,GAAG;AACpC,UAAI,CAAC,IAAK,QAAO,CAAA;AACjB,YAAM,SAAkB,KAAK,MAAM,GAAG;AACtC,aAAO,MAAM,QAAQ,MAAM,IAAI,OAAO,OAAO,YAAY,IAAI,CAAA;AAAA,IAC/D,QAAQ;AACN,aAAO,CAAA;AAAA,IACT;AAAA,EACF;AAEA,QAAM,OAAO,CAAC,YAA8B;AAC1C,QAAI,OAAO,iBAAiB,YAAa;AACzC,QAAI;AACF,mBAAa,QAAQ,KAAK,KAAK,UAAU,OAAO,CAAC;AAAA,IACnD,QAAQ;AAAA,IAER;AAAA,EACF;AAEA,SAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO,CAAC,UAAU,KAAK,CAAC,GAAG,KAAA,EAAO,OAAO,CAAC,MAAM,EAAE,WAAW,MAAM,MAAM,GAAG,KAAK,CAAC;AAAA,IAClF,OAAO,CAAC,WAAW,KAAK,SAAS,KAAA,EAAO,OAAO,CAAC,MAAM,EAAE,WAAW,MAAM,IAAI,CAAA,CAAE;AAAA,EAAA;AAEnF;AAGO,SAAS,kBAAkB,OAAyB,IAAiB;AAC1E,MAAI,UAAU,CAAC,GAAG,IAAI;AACtB,SAAO;AAAA,IACL,MAAM,MAAM;AAAA,IACZ,OAAO,CAAC,UAAU;AAChB,gBAAU,CAAC,GAAG,QAAQ,OAAO,CAAC,MAAM,EAAE,WAAW,MAAM,MAAM,GAAG,KAAK;AAAA,IACvE;AAAA,IACA,OAAO,CAAC,WAAW;AACjB,gBAAU,SAAS,QAAQ,OAAO,CAAC,MAAM,EAAE,WAAW,MAAM,IAAI,CAAA;AAAA,IAClE;AAAA,EAAA;AAEJ;AAOO,SAAS,eACd,aACA,YACS;AACT,QAAM,QAAQ,YAAY,KAAK,CAAC,eAAe,WAAW,WAAW,WAAW,EAAE;AAClF,MAAI,CAAC,MAAO,QAAO;AACnB,SAAO,MAAM,YAAY,WAAW,WAAW;AACjD;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TourDefinition } from './tour-types';
|
|
2
|
+
/**
|
|
3
|
+
* Completion persistence for tours.
|
|
4
|
+
*
|
|
5
|
+
* The default is a localStorage store so the zero-config path works, but the
|
|
6
|
+
* seam is an adapter rather than a boolean because completion is *user* state,
|
|
7
|
+
* not device state: someone who signs in on a second machine should not re-see a
|
|
8
|
+
* first-run tour, and an admin may want to reset one for a whole org. Both are
|
|
9
|
+
* expressible as a `TourStorage`; neither is expressible as "the library owns
|
|
10
|
+
* localStorage" or as a bare `completed` prop.
|
|
11
|
+
*/
|
|
12
|
+
export type TourCompletionStatus = "completed" | "dismissed";
|
|
13
|
+
export type TourCompletion = {
|
|
14
|
+
tourId: string;
|
|
15
|
+
status: TourCompletionStatus;
|
|
16
|
+
/** The definition `version` this was recorded against. */
|
|
17
|
+
version: number;
|
|
18
|
+
/** ISO timestamp. */
|
|
19
|
+
at: string;
|
|
20
|
+
};
|
|
21
|
+
export type TourStorage = {
|
|
22
|
+
read: () => TourCompletion[] | Promise<TourCompletion[]>;
|
|
23
|
+
write: (entry: TourCompletion) => void | Promise<void>;
|
|
24
|
+
clear: (tourId?: string) => void | Promise<void>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* localStorage-backed store, keyed like `clicky-ui-theme` / `clicky-ui-density`.
|
|
28
|
+
* A corrupt or unreadable value reads as "nothing recorded" — the cost of being
|
|
29
|
+
* wrong is re-offering a tour, so refusing to boot over it would be worse.
|
|
30
|
+
*/
|
|
31
|
+
export declare function localStorageTourStorage(key?: string): TourStorage;
|
|
32
|
+
/** In-memory store, for tests, stories, and embedded/mocked renderings. */
|
|
33
|
+
export declare function memoryTourStorage(seed?: TourCompletion[]): TourStorage;
|
|
34
|
+
/**
|
|
35
|
+
* True when a recorded completion still covers the definition's current version.
|
|
36
|
+
* Bumping `version` on a reworked tour makes prior completions stale, so it is
|
|
37
|
+
* offered again with no migration step.
|
|
38
|
+
*/
|
|
39
|
+
export declare function isTourFinished(completions: TourCompletion[], definition: TourDefinition): boolean;
|
|
40
|
+
//# sourceMappingURL=tour-progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tour-progress.d.ts","sourceRoot":"","sources":["../../src/overlay/tour-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD;;;;;;;;;GASG;AAEH,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,WAAW,CAAC;AAE7D,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,oBAAoB,CAAC;IAC7B,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,cAAc,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IACzD,KAAK,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClD,CAAC;AAcF;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,MAAoB,GAAG,WAAW,CA2B9E;AAED,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,cAAc,EAAO,GAAG,WAAW,CAW1E;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,cAAc,EAAE,EAC7B,UAAU,EAAE,cAAc,GACzB,OAAO,CAIT"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const DEFAULT_KEY = "clicky-ui-tours";
|
|
2
|
+
function isCompletion(value) {
|
|
3
|
+
if (!value || typeof value !== "object") return false;
|
|
4
|
+
const entry = value;
|
|
5
|
+
return typeof entry.tourId === "string" && (entry.status === "completed" || entry.status === "dismissed") && typeof entry.version === "number";
|
|
6
|
+
}
|
|
7
|
+
function localStorageTourStorage(key = DEFAULT_KEY) {
|
|
8
|
+
const load = () => {
|
|
9
|
+
if (typeof localStorage === "undefined") return [];
|
|
10
|
+
try {
|
|
11
|
+
const raw = localStorage.getItem(key);
|
|
12
|
+
if (!raw) return [];
|
|
13
|
+
const parsed = JSON.parse(raw);
|
|
14
|
+
return Array.isArray(parsed) ? parsed.filter(isCompletion) : [];
|
|
15
|
+
} catch {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const save = (entries) => {
|
|
20
|
+
if (typeof localStorage === "undefined") return;
|
|
21
|
+
try {
|
|
22
|
+
localStorage.setItem(key, JSON.stringify(entries));
|
|
23
|
+
} catch {
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
read: load,
|
|
28
|
+
write: (entry) => save([...load().filter((e) => e.tourId !== entry.tourId), entry]),
|
|
29
|
+
clear: (tourId) => save(tourId ? load().filter((e) => e.tourId !== tourId) : [])
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function memoryTourStorage(seed = []) {
|
|
33
|
+
let entries = [...seed];
|
|
34
|
+
return {
|
|
35
|
+
read: () => entries,
|
|
36
|
+
write: (entry) => {
|
|
37
|
+
entries = [...entries.filter((e) => e.tourId !== entry.tourId), entry];
|
|
38
|
+
},
|
|
39
|
+
clear: (tourId) => {
|
|
40
|
+
entries = tourId ? entries.filter((e) => e.tourId !== tourId) : [];
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function isTourFinished(completions, definition) {
|
|
45
|
+
const entry = completions.find((completion) => completion.tourId === definition.id);
|
|
46
|
+
if (!entry) return false;
|
|
47
|
+
return entry.version >= (definition.version ?? 1);
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
isTourFinished,
|
|
51
|
+
localStorageTourStorage,
|
|
52
|
+
memoryTourStorage
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=tour-progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tour-progress.js","sources":["../../src/overlay/tour-progress.ts"],"sourcesContent":["import type { TourDefinition } from \"./tour-types\";\n\n/**\n * Completion persistence for tours.\n *\n * The default is a localStorage store so the zero-config path works, but the\n * seam is an adapter rather than a boolean because completion is *user* state,\n * not device state: someone who signs in on a second machine should not re-see a\n * first-run tour, and an admin may want to reset one for a whole org. Both are\n * expressible as a `TourStorage`; neither is expressible as \"the library owns\n * localStorage\" or as a bare `completed` prop.\n */\n\nexport type TourCompletionStatus = \"completed\" | \"dismissed\";\n\nexport type TourCompletion = {\n tourId: string;\n status: TourCompletionStatus;\n /** The definition `version` this was recorded against. */\n version: number;\n /** ISO timestamp. */\n at: string;\n};\n\nexport type TourStorage = {\n read: () => TourCompletion[] | Promise<TourCompletion[]>;\n write: (entry: TourCompletion) => void | Promise<void>;\n clear: (tourId?: string) => void | Promise<void>;\n};\n\nconst DEFAULT_KEY = \"clicky-ui-tours\";\n\nfunction isCompletion(value: unknown): value is TourCompletion {\n if (!value || typeof value !== \"object\") return false;\n const entry = value as Partial<TourCompletion>;\n return (\n typeof entry.tourId === \"string\" &&\n (entry.status === \"completed\" || entry.status === \"dismissed\") &&\n typeof entry.version === \"number\"\n );\n}\n\n/**\n * localStorage-backed store, keyed like `clicky-ui-theme` / `clicky-ui-density`.\n * A corrupt or unreadable value reads as \"nothing recorded\" — the cost of being\n * wrong is re-offering a tour, so refusing to boot over it would be worse.\n */\nexport function localStorageTourStorage(key: string = DEFAULT_KEY): TourStorage {\n const load = (): TourCompletion[] => {\n if (typeof localStorage === \"undefined\") return [];\n try {\n const raw = localStorage.getItem(key);\n if (!raw) return [];\n const parsed: unknown = JSON.parse(raw);\n return Array.isArray(parsed) ? parsed.filter(isCompletion) : [];\n } catch {\n return [];\n }\n };\n\n const save = (entries: TourCompletion[]) => {\n if (typeof localStorage === \"undefined\") return;\n try {\n localStorage.setItem(key, JSON.stringify(entries));\n } catch {\n // A full or blocked quota must not break the tour that just finished.\n }\n };\n\n return {\n read: load,\n write: (entry) => save([...load().filter((e) => e.tourId !== entry.tourId), entry]),\n clear: (tourId) => save(tourId ? load().filter((e) => e.tourId !== tourId) : []),\n };\n}\n\n/** In-memory store, for tests, stories, and embedded/mocked renderings. */\nexport function memoryTourStorage(seed: TourCompletion[] = []): TourStorage {\n let entries = [...seed];\n return {\n read: () => entries,\n write: (entry) => {\n entries = [...entries.filter((e) => e.tourId !== entry.tourId), entry];\n },\n clear: (tourId) => {\n entries = tourId ? entries.filter((e) => e.tourId !== tourId) : [];\n },\n };\n}\n\n/**\n * True when a recorded completion still covers the definition's current version.\n * Bumping `version` on a reworked tour makes prior completions stale, so it is\n * offered again with no migration step.\n */\nexport function isTourFinished(\n completions: TourCompletion[],\n definition: TourDefinition,\n): boolean {\n const entry = completions.find((completion) => completion.tourId === definition.id);\n if (!entry) return false;\n return entry.version >= (definition.version ?? 1);\n}\n"],"names":[],"mappings":"AA8BA,MAAM,cAAc;AAEpB,SAAS,aAAa,OAAyC;AAC7D,MAAI,CAAC,SAAS,OAAO,UAAU,SAAU,QAAO;AAChD,QAAM,QAAQ;AACd,SACE,OAAO,MAAM,WAAW,aACvB,MAAM,WAAW,eAAe,MAAM,WAAW,gBAClD,OAAO,MAAM,YAAY;AAE7B;AAOO,SAAS,wBAAwB,MAAc,aAA0B;AAC9E,QAAM,OAAO,MAAwB;AACnC,QAAI,OAAO,iBAAiB,YAAa,QAAO,CAAA;AAChD,QAAI;AACF,YAAM,MAAM,aAAa,QAAQ,GAAG;AACpC,UAAI,CAAC,IAAK,QAAO,CAAA;AACjB,YAAM,SAAkB,KAAK,MAAM,GAAG;AACtC,aAAO,MAAM,QAAQ,MAAM,IAAI,OAAO,OAAO,YAAY,IAAI,CAAA;AAAA,IAC/D,QAAQ;AACN,aAAO,CAAA;AAAA,IACT;AAAA,EACF;AAEA,QAAM,OAAO,CAAC,YAA8B;AAC1C,QAAI,OAAO,iBAAiB,YAAa;AACzC,QAAI;AACF,mBAAa,QAAQ,KAAK,KAAK,UAAU,OAAO,CAAC;AAAA,IACnD,QAAQ;AAAA,IAER;AAAA,EACF;AAEA,SAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO,CAAC,UAAU,KAAK,CAAC,GAAG,KAAA,EAAO,OAAO,CAAC,MAAM,EAAE,WAAW,MAAM,MAAM,GAAG,KAAK,CAAC;AAAA,IAClF,OAAO,CAAC,WAAW,KAAK,SAAS,KAAA,EAAO,OAAO,CAAC,MAAM,EAAE,WAAW,MAAM,IAAI,CAAA,CAAE;AAAA,EAAA;AAEnF;AAGO,SAAS,kBAAkB,OAAyB,IAAiB;AAC1E,MAAI,UAAU,CAAC,GAAG,IAAI;AACtB,SAAO;AAAA,IACL,MAAM,MAAM;AAAA,IACZ,OAAO,CAAC,UAAU;AAChB,gBAAU,CAAC,GAAG,QAAQ,OAAO,CAAC,MAAM,EAAE,WAAW,MAAM,MAAM,GAAG,KAAK;AAAA,IACvE;AAAA,IACA,OAAO,CAAC,WAAW;AACjB,gBAAU,SAAS,QAAQ,OAAO,CAAC,MAAM,EAAE,WAAW,MAAM,IAAI,CAAA;AAAA,IAClE;AAAA,EAAA;AAEJ;AAOO,SAAS,eACd,aACA,YACS;AACT,QAAM,QAAQ,YAAY,KAAK,CAAC,eAAe,WAAW,WAAW,WAAW,EAAE;AAClF,MAAI,CAAC,MAAO,QAAO;AACnB,SAAO,MAAM,YAAY,WAAW,WAAW;AACjD;"}
|