@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,144 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Placement } from '@floating-ui/react';
|
|
3
|
+
/**
|
|
4
|
+
* Public shape of a guided tour. Types only — the runtime lives in tour-model.ts
|
|
5
|
+
* (pure sequencing), tour-geometry.ts (pure spotlight maths), tour-anchor.ts (the
|
|
6
|
+
* only DOM lookups) and Tour.tsx / TourProvider.tsx (rendering and state).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Where a tour looks up its anchors. `document` is the application case; a
|
|
10
|
+
* ShadowRoot or a subtree element scopes the tour to an embedded UI — a docs
|
|
11
|
+
* site rendering the same steps over a mock inside a shadow root, where
|
|
12
|
+
* `document.querySelector` finds nothing.
|
|
13
|
+
*/
|
|
14
|
+
export type TourRoot = Document | ShadowRoot | HTMLElement;
|
|
15
|
+
/**
|
|
16
|
+
* A root, or a getter re-invoked while waiting, so a root that mounts late (a
|
|
17
|
+
* shadow root attached in an effect) resolves inside the same timeout budget
|
|
18
|
+
* rather than needing a second mechanism.
|
|
19
|
+
*/
|
|
20
|
+
export type TourRootSource = TourRoot | (() => TourRoot | null | undefined);
|
|
21
|
+
/**
|
|
22
|
+
* How a step names its anchor. A resolver receives the resolved root, so a
|
|
23
|
+
* consumer can match on things `querySelector` cannot express (visible text, a
|
|
24
|
+
* ref it already holds) without the library learning about them.
|
|
25
|
+
*/
|
|
26
|
+
export type TourTarget = string | HTMLElement | ((root: TourRoot) => HTMLElement | null | undefined);
|
|
27
|
+
/** What happens when a step's anchor never appears within its wait budget. */
|
|
28
|
+
export type TourMissingAnchor =
|
|
29
|
+
/** Render the card centred with no spotlight. The step still counts. */
|
|
30
|
+
"center"
|
|
31
|
+
/** Advance past the step as if it were not in the tour. */
|
|
32
|
+
| "skip"
|
|
33
|
+
/** Throw. For stories and tests, where a broken fixture must fail the build. */
|
|
34
|
+
| "fail";
|
|
35
|
+
/** Pointer behaviour of the dim layer. */
|
|
36
|
+
export type TourInteraction =
|
|
37
|
+
/** Dim swallows clicks; the cutout passes them through to the anchor. Default. */
|
|
38
|
+
"allow-anchor"
|
|
39
|
+
/** Nothing under the overlay is clickable, including the anchor. */
|
|
40
|
+
| "block-all"
|
|
41
|
+
/** The overlay is purely decorative; the whole page stays live. */
|
|
42
|
+
| "allow-all";
|
|
43
|
+
export type TourDirection = "start" | "next" | "back" | "jump";
|
|
44
|
+
export type TourStepContext = {
|
|
45
|
+
step: TourStep;
|
|
46
|
+
/** Zero-based index within the running tour. */
|
|
47
|
+
index: number;
|
|
48
|
+
total: number;
|
|
49
|
+
/** Resolved anchor, or `null` for an anchorless step or one degraded to centred. */
|
|
50
|
+
anchor: HTMLElement | null;
|
|
51
|
+
direction: TourDirection;
|
|
52
|
+
};
|
|
53
|
+
export type TourStep = {
|
|
54
|
+
/** Stable identity: React key, `goTo` target, and the id reported on error. Unique within the tour. */
|
|
55
|
+
id: string;
|
|
56
|
+
/** Element the step points at. Omit for a centred, anchorless step (intro/outro). */
|
|
57
|
+
target?: TourTarget;
|
|
58
|
+
/** Card heading, and the accessible name of the step dialog. */
|
|
59
|
+
title: ReactNode;
|
|
60
|
+
/** Card body. Mutually exclusive with `markdown`. */
|
|
61
|
+
body?: ReactNode;
|
|
62
|
+
/** Markdown body, rendered by the lazily loaded `Markdown`. Mutually exclusive with `body`. */
|
|
63
|
+
markdown?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Route this step lives on. When it differs from the route the tour is already
|
|
66
|
+
* on, `onNavigate` fires before the anchor wait. The tour never waits on a
|
|
67
|
+
* route change — the anchor appearing is the only completion signal, which is
|
|
68
|
+
* what lets the same steps run where there is no router at all.
|
|
69
|
+
*/
|
|
70
|
+
route?: string;
|
|
71
|
+
/** Preferred card placement around the anchor; flips and shifts to fit. Defaults to `"bottom"`. */
|
|
72
|
+
placement?: Placement;
|
|
73
|
+
/** Extra px of spotlight around the anchor's border box. Defaults to the tour's `padding`. */
|
|
74
|
+
padding?: number;
|
|
75
|
+
/** Cutout corner radius in px. Defaults to the anchor's own computed radius, grown by the padding. */
|
|
76
|
+
radius?: number;
|
|
77
|
+
/** Per-step override of the tour's `missingAnchor` policy. */
|
|
78
|
+
onMissing?: TourMissingAnchor;
|
|
79
|
+
/** Per-step override of the tour's anchor wait budget, in ms. */
|
|
80
|
+
timeoutMs?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Shown while the anchor has not appeared, for a step that depends on state the
|
|
83
|
+
* tour does not own ("open a plan from the tree to continue"). Its presence
|
|
84
|
+
* also blocks Next, so the operator is never advanced past a stop they have not
|
|
85
|
+
* reached. Unset means the step is expected to resolve on its own.
|
|
86
|
+
*/
|
|
87
|
+
hint?: ReactNode;
|
|
88
|
+
/** Let Next through even while `hint` is showing. */
|
|
89
|
+
hintOptional?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Extra classes for this step's card, merged after the tour-level `className`.
|
|
92
|
+
* The intended use is widening the card for a step whose body needs the room
|
|
93
|
+
* (e.g. `w-[min(30rem,calc(100vw-2rem))]`) — tailwind-merge resolves the
|
|
94
|
+
* conflict with the default width.
|
|
95
|
+
*/
|
|
96
|
+
cardClassName?: string;
|
|
97
|
+
/** Evaluated on entry in both directions; a `false` result skips the step. For role/feature-gated UI. */
|
|
98
|
+
enabled?: () => boolean;
|
|
99
|
+
/** Runs on entry once the anchor resolves — e.g. open a panel the next step needs. */
|
|
100
|
+
onEnter?: (ctx: TourStepContext) => void | Promise<void>;
|
|
101
|
+
/** Runs on exit, in either direction. */
|
|
102
|
+
onExit?: (ctx: TourStepContext) => void;
|
|
103
|
+
};
|
|
104
|
+
export type TourDefinition = {
|
|
105
|
+
/** Stable identity: the persistence key and the `start(id)` argument. */
|
|
106
|
+
id: string;
|
|
107
|
+
/** Human name, for a "Take a tour" menu. */
|
|
108
|
+
title?: string;
|
|
109
|
+
/** Bump to invalidate prior completions so a reworked tour runs again. Defaults to `1`. */
|
|
110
|
+
version?: number;
|
|
111
|
+
/** Ordered steps. Must be non-empty — an empty tour throws at registration. */
|
|
112
|
+
steps: TourStep[];
|
|
113
|
+
/**
|
|
114
|
+
* Rendered at the foot of every step card. Intended for a link back to the
|
|
115
|
+
* fuller written guide the tour condenses, so the two surfaces point at each
|
|
116
|
+
* other rather than competing.
|
|
117
|
+
*/
|
|
118
|
+
footer?: ReactNode;
|
|
119
|
+
/** Run automatically for a user who has neither completed nor dismissed it. */
|
|
120
|
+
autoStart?: boolean;
|
|
121
|
+
/** Route auto-start is allowed on. Defaults to the first step's `route`. */
|
|
122
|
+
autoStartRoute?: string;
|
|
123
|
+
};
|
|
124
|
+
export type TourStepErrorInfo = {
|
|
125
|
+
tourId: string;
|
|
126
|
+
step: TourStep;
|
|
127
|
+
index: number;
|
|
128
|
+
reason: "anchor-timeout" | "anchor-invalid" | "step-error";
|
|
129
|
+
/** The declared target, stringified for logging. */
|
|
130
|
+
target: string;
|
|
131
|
+
error?: unknown;
|
|
132
|
+
};
|
|
133
|
+
export type TourLabels = {
|
|
134
|
+
back: string;
|
|
135
|
+
next: string;
|
|
136
|
+
done: string;
|
|
137
|
+
skip: string;
|
|
138
|
+
close: string;
|
|
139
|
+
/** `current` is 1-based. */
|
|
140
|
+
counter: (current: number, total: number) => string;
|
|
141
|
+
/** Announced in the polite live region on every step change. */
|
|
142
|
+
announce: (current: number, total: number, title: string) => string;
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=tour-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tour-types.d.ts","sourceRoot":"","sources":["../../src/overlay/tour-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;GAIG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,CAAC;AAE3D;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,CAAC,MAAM,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAE5E;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,CAAC,CAAC,IAAI,EAAE,QAAQ,KAAK,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAErG,8EAA8E;AAC9E,MAAM,MAAM,iBAAiB;AAC3B,wEAAwE;AACtE,QAAQ;AACV,2DAA2D;GACzD,MAAM;AACR,gFAAgF;GAC9E,MAAM,CAAC;AAEX,0CAA0C;AAC1C,MAAM,MAAM,eAAe;AACzB,kFAAkF;AAChF,cAAc;AAChB,oEAAoE;GAClE,WAAW;AACb,mEAAmE;GACjE,WAAW,CAAC;AAEhB,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/D,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,uGAAuG;IACvG,EAAE,EAAE,MAAM,CAAC;IACX,qFAAqF;IACrF,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,gEAAgE;IAChE,KAAK,EAAE,SAAS,CAAC;IACjB,qDAAqD;IACrD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mGAAmG;IACnG,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,8FAA8F;IAC9F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sGAAsG;IACtG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,qDAAqD;IACrD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yGAAyG;IACzG,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC;IACxB,sFAAsF;IACtF,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,yCAAyC;IACzC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,yEAAyE;IACzE,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,GAAG,YAAY,CAAC;IAC3D,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACpD,gEAAgE;IAChE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACrE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const react = require("react");
|
|
4
|
+
const tourAnchor = require("./tour-anchor.cjs");
|
|
5
|
+
function prefersReducedMotion(element) {
|
|
6
|
+
var _a;
|
|
7
|
+
const view = element.ownerDocument.defaultView;
|
|
8
|
+
return ((_a = view == null ? void 0 : view.matchMedia) == null ? void 0 : _a.call(view, "(prefers-reduced-motion: reduce)").matches) ?? false;
|
|
9
|
+
}
|
|
10
|
+
function useTourAnchor(options) {
|
|
11
|
+
const { root, target, timeoutMs, scrollIntoView = true, key } = options;
|
|
12
|
+
const [result, setResult] = react.useState({ anchor: null, state: "idle" });
|
|
13
|
+
const scrollRef = react.useRef(scrollIntoView);
|
|
14
|
+
scrollRef.current = scrollIntoView;
|
|
15
|
+
react.useEffect(() => {
|
|
16
|
+
if (target === void 0) {
|
|
17
|
+
setResult({ anchor: null, state: "idle" });
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
setResult({ anchor: null, state: "waiting" });
|
|
21
|
+
const controller = new AbortController();
|
|
22
|
+
void tourAnchor.resolveAnchor({ root, target, timeoutMs, signal: controller.signal }).then(
|
|
23
|
+
(resolution) => {
|
|
24
|
+
if (controller.signal.aborted) return;
|
|
25
|
+
if (resolution.status !== "found") {
|
|
26
|
+
setResult({ anchor: null, state: "missing" });
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
setResult({ anchor: resolution.element, state: "found" });
|
|
30
|
+
if (!scrollRef.current || !resolution.element.scrollIntoView) return;
|
|
31
|
+
resolution.element.scrollIntoView({
|
|
32
|
+
block: "center",
|
|
33
|
+
inline: "nearest",
|
|
34
|
+
behavior: prefersReducedMotion(resolution.element) ? "auto" : "smooth"
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
return () => controller.abort();
|
|
39
|
+
}, [key, timeoutMs]);
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
exports.useTourAnchor = useTourAnchor;
|
|
43
|
+
//# sourceMappingURL=use-tour-anchor.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-tour-anchor.cjs","sources":["../../src/overlay/use-tour-anchor.ts"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\nimport { resolveAnchor } from \"./tour-anchor\";\nimport type { TourRootSource, TourTarget } from \"./tour-types\";\n\n/**\n * React lifecycle around `resolveAnchor`: one bounded wait per step, aborted when\n * the step changes or the tour unmounts, plus the scroll-into-view that makes the\n * spotlight land somewhere the operator can actually see.\n */\n\nexport type TourAnchorState = \"idle\" | \"waiting\" | \"found\" | \"missing\";\n\nexport type UseTourAnchorOptions = {\n root: TourRootSource;\n /** Omit for an anchorless (centred) step; the hook then reports `idle`. */\n target?: TourTarget | undefined;\n timeoutMs: number;\n /** Scroll the anchor into view once it resolves. Defaults to `true`. */\n scrollIntoView?: boolean | undefined;\n /** Changes to this restart the wait — pass the step id. */\n key: string;\n};\n\nexport type UseTourAnchorResult = {\n anchor: HTMLElement | null;\n state: TourAnchorState;\n};\n\nfunction prefersReducedMotion(element: HTMLElement): boolean {\n const view = element.ownerDocument.defaultView;\n return view?.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches ?? false;\n}\n\nexport function useTourAnchor(options: UseTourAnchorOptions): UseTourAnchorResult {\n const { root, target, timeoutMs, scrollIntoView = true, key } = options;\n const [result, setResult] = useState<UseTourAnchorResult>({ anchor: null, state: \"idle\" });\n const scrollRef = useRef(scrollIntoView);\n scrollRef.current = scrollIntoView;\n\n useEffect(() => {\n if (target === undefined) {\n setResult({ anchor: null, state: \"idle\" });\n return;\n }\n\n setResult({ anchor: null, state: \"waiting\" });\n const controller = new AbortController();\n\n void resolveAnchor({ root, target, timeoutMs, signal: controller.signal }).then(\n (resolution) => {\n if (controller.signal.aborted) return;\n if (resolution.status !== \"found\") {\n setResult({ anchor: null, state: \"missing\" });\n return;\n }\n setResult({ anchor: resolution.element, state: \"found\" });\n if (!scrollRef.current || !resolution.element.scrollIntoView) return;\n resolution.element.scrollIntoView({\n block: \"center\",\n inline: \"nearest\",\n behavior: prefersReducedMotion(resolution.element) ? \"auto\" : \"smooth\",\n });\n },\n );\n\n return () => controller.abort();\n // `root` and `target` are re-created per render by most callers; `key` (the\n // step id) is the identity that should restart the wait.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key, timeoutMs]);\n\n return result;\n}\n"],"names":["useState","useRef","useEffect","resolveAnchor"],"mappings":";;;;AA4BA,SAAS,qBAAqB,SAA+B;;AAC3D,QAAM,OAAO,QAAQ,cAAc;AACnC,WAAO,kCAAM,eAAN,8BAAmB,oCAAoC,YAAW;AAC3E;AAEO,SAAS,cAAc,SAAoD;AAChF,QAAM,EAAE,MAAM,QAAQ,WAAW,iBAAiB,MAAM,QAAQ;AAChE,QAAM,CAAC,QAAQ,SAAS,IAAIA,MAAAA,SAA8B,EAAE,QAAQ,MAAM,OAAO,QAAQ;AACzF,QAAM,YAAYC,MAAAA,OAAO,cAAc;AACvC,YAAU,UAAU;AAEpBC,QAAAA,UAAU,MAAM;AACd,QAAI,WAAW,QAAW;AACxB,gBAAU,EAAE,QAAQ,MAAM,OAAO,QAAQ;AACzC;AAAA,IACF;AAEA,cAAU,EAAE,QAAQ,MAAM,OAAO,WAAW;AAC5C,UAAM,aAAa,IAAI,gBAAA;AAEvB,SAAKC,WAAAA,cAAc,EAAE,MAAM,QAAQ,WAAW,QAAQ,WAAW,OAAA,CAAQ,EAAE;AAAA,MACzE,CAAC,eAAe;AACd,YAAI,WAAW,OAAO,QAAS;AAC/B,YAAI,WAAW,WAAW,SAAS;AACjC,oBAAU,EAAE,QAAQ,MAAM,OAAO,WAAW;AAC5C;AAAA,QACF;AACA,kBAAU,EAAE,QAAQ,WAAW,SAAS,OAAO,SAAS;AACxD,YAAI,CAAC,UAAU,WAAW,CAAC,WAAW,QAAQ,eAAgB;AAC9D,mBAAW,QAAQ,eAAe;AAAA,UAChC,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,UAAU,qBAAqB,WAAW,OAAO,IAAI,SAAS;AAAA,QAAA,CAC/D;AAAA,MACH;AAAA,IAAA;AAGF,WAAO,MAAM,WAAW,MAAA;AAAA,EAI1B,GAAG,CAAC,KAAK,SAAS,CAAC;AAEnB,SAAO;AACT;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TourRootSource, TourTarget } from './tour-types';
|
|
2
|
+
/**
|
|
3
|
+
* React lifecycle around `resolveAnchor`: one bounded wait per step, aborted when
|
|
4
|
+
* the step changes or the tour unmounts, plus the scroll-into-view that makes the
|
|
5
|
+
* spotlight land somewhere the operator can actually see.
|
|
6
|
+
*/
|
|
7
|
+
export type TourAnchorState = "idle" | "waiting" | "found" | "missing";
|
|
8
|
+
export type UseTourAnchorOptions = {
|
|
9
|
+
root: TourRootSource;
|
|
10
|
+
/** Omit for an anchorless (centred) step; the hook then reports `idle`. */
|
|
11
|
+
target?: TourTarget | undefined;
|
|
12
|
+
timeoutMs: number;
|
|
13
|
+
/** Scroll the anchor into view once it resolves. Defaults to `true`. */
|
|
14
|
+
scrollIntoView?: boolean | undefined;
|
|
15
|
+
/** Changes to this restart the wait — pass the step id. */
|
|
16
|
+
key: string;
|
|
17
|
+
};
|
|
18
|
+
export type UseTourAnchorResult = {
|
|
19
|
+
anchor: HTMLElement | null;
|
|
20
|
+
state: TourAnchorState;
|
|
21
|
+
};
|
|
22
|
+
export declare function useTourAnchor(options: UseTourAnchorOptions): UseTourAnchorResult;
|
|
23
|
+
//# sourceMappingURL=use-tour-anchor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-tour-anchor.d.ts","sourceRoot":"","sources":["../../src/overlay/use-tour-anchor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/D;;;;GAIG;AAEH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEvE,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,cAAc,CAAC;IACrB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACrC,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,eAAe,CAAC;CACxB,CAAC;AAOF,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CAuChF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useState, useRef, useEffect } from "react";
|
|
2
|
+
import { resolveAnchor } from "./tour-anchor.js";
|
|
3
|
+
function prefersReducedMotion(element) {
|
|
4
|
+
var _a;
|
|
5
|
+
const view = element.ownerDocument.defaultView;
|
|
6
|
+
return ((_a = view == null ? void 0 : view.matchMedia) == null ? void 0 : _a.call(view, "(prefers-reduced-motion: reduce)").matches) ?? false;
|
|
7
|
+
}
|
|
8
|
+
function useTourAnchor(options) {
|
|
9
|
+
const { root, target, timeoutMs, scrollIntoView = true, key } = options;
|
|
10
|
+
const [result, setResult] = useState({ anchor: null, state: "idle" });
|
|
11
|
+
const scrollRef = useRef(scrollIntoView);
|
|
12
|
+
scrollRef.current = scrollIntoView;
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (target === void 0) {
|
|
15
|
+
setResult({ anchor: null, state: "idle" });
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
setResult({ anchor: null, state: "waiting" });
|
|
19
|
+
const controller = new AbortController();
|
|
20
|
+
void resolveAnchor({ root, target, timeoutMs, signal: controller.signal }).then(
|
|
21
|
+
(resolution) => {
|
|
22
|
+
if (controller.signal.aborted) return;
|
|
23
|
+
if (resolution.status !== "found") {
|
|
24
|
+
setResult({ anchor: null, state: "missing" });
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
setResult({ anchor: resolution.element, state: "found" });
|
|
28
|
+
if (!scrollRef.current || !resolution.element.scrollIntoView) return;
|
|
29
|
+
resolution.element.scrollIntoView({
|
|
30
|
+
block: "center",
|
|
31
|
+
inline: "nearest",
|
|
32
|
+
behavior: prefersReducedMotion(resolution.element) ? "auto" : "smooth"
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
return () => controller.abort();
|
|
37
|
+
}, [key, timeoutMs]);
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
useTourAnchor
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=use-tour-anchor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-tour-anchor.js","sources":["../../src/overlay/use-tour-anchor.ts"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\nimport { resolveAnchor } from \"./tour-anchor\";\nimport type { TourRootSource, TourTarget } from \"./tour-types\";\n\n/**\n * React lifecycle around `resolveAnchor`: one bounded wait per step, aborted when\n * the step changes or the tour unmounts, plus the scroll-into-view that makes the\n * spotlight land somewhere the operator can actually see.\n */\n\nexport type TourAnchorState = \"idle\" | \"waiting\" | \"found\" | \"missing\";\n\nexport type UseTourAnchorOptions = {\n root: TourRootSource;\n /** Omit for an anchorless (centred) step; the hook then reports `idle`. */\n target?: TourTarget | undefined;\n timeoutMs: number;\n /** Scroll the anchor into view once it resolves. Defaults to `true`. */\n scrollIntoView?: boolean | undefined;\n /** Changes to this restart the wait — pass the step id. */\n key: string;\n};\n\nexport type UseTourAnchorResult = {\n anchor: HTMLElement | null;\n state: TourAnchorState;\n};\n\nfunction prefersReducedMotion(element: HTMLElement): boolean {\n const view = element.ownerDocument.defaultView;\n return view?.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches ?? false;\n}\n\nexport function useTourAnchor(options: UseTourAnchorOptions): UseTourAnchorResult {\n const { root, target, timeoutMs, scrollIntoView = true, key } = options;\n const [result, setResult] = useState<UseTourAnchorResult>({ anchor: null, state: \"idle\" });\n const scrollRef = useRef(scrollIntoView);\n scrollRef.current = scrollIntoView;\n\n useEffect(() => {\n if (target === undefined) {\n setResult({ anchor: null, state: \"idle\" });\n return;\n }\n\n setResult({ anchor: null, state: \"waiting\" });\n const controller = new AbortController();\n\n void resolveAnchor({ root, target, timeoutMs, signal: controller.signal }).then(\n (resolution) => {\n if (controller.signal.aborted) return;\n if (resolution.status !== \"found\") {\n setResult({ anchor: null, state: \"missing\" });\n return;\n }\n setResult({ anchor: resolution.element, state: \"found\" });\n if (!scrollRef.current || !resolution.element.scrollIntoView) return;\n resolution.element.scrollIntoView({\n block: \"center\",\n inline: \"nearest\",\n behavior: prefersReducedMotion(resolution.element) ? \"auto\" : \"smooth\",\n });\n },\n );\n\n return () => controller.abort();\n // `root` and `target` are re-created per render by most callers; `key` (the\n // step id) is the identity that should restart the wait.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key, timeoutMs]);\n\n return result;\n}\n"],"names":[],"mappings":";;AA4BA,SAAS,qBAAqB,SAA+B;;AAC3D,QAAM,OAAO,QAAQ,cAAc;AACnC,WAAO,kCAAM,eAAN,8BAAmB,oCAAoC,YAAW;AAC3E;AAEO,SAAS,cAAc,SAAoD;AAChF,QAAM,EAAE,MAAM,QAAQ,WAAW,iBAAiB,MAAM,QAAQ;AAChE,QAAM,CAAC,QAAQ,SAAS,IAAI,SAA8B,EAAE,QAAQ,MAAM,OAAO,QAAQ;AACzF,QAAM,YAAY,OAAO,cAAc;AACvC,YAAU,UAAU;AAEpB,YAAU,MAAM;AACd,QAAI,WAAW,QAAW;AACxB,gBAAU,EAAE,QAAQ,MAAM,OAAO,QAAQ;AACzC;AAAA,IACF;AAEA,cAAU,EAAE,QAAQ,MAAM,OAAO,WAAW;AAC5C,UAAM,aAAa,IAAI,gBAAA;AAEvB,SAAK,cAAc,EAAE,MAAM,QAAQ,WAAW,QAAQ,WAAW,OAAA,CAAQ,EAAE;AAAA,MACzE,CAAC,eAAe;AACd,YAAI,WAAW,OAAO,QAAS;AAC/B,YAAI,WAAW,WAAW,SAAS;AACjC,oBAAU,EAAE,QAAQ,MAAM,OAAO,WAAW;AAC5C;AAAA,QACF;AACA,kBAAU,EAAE,QAAQ,WAAW,SAAS,OAAO,SAAS;AACxD,YAAI,CAAC,UAAU,WAAW,CAAC,WAAW,QAAQ,eAAgB;AAC9D,mBAAW,QAAQ,eAAe;AAAA,UAChC,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,UAAU,qBAAqB,WAAW,OAAO,IAAI,SAAS;AAAA,QAAA,CAC/D;AAAA,MACH;AAAA,IAAA;AAGF,WAAO,MAAM,WAAW,MAAA;AAAA,EAI1B,GAAG,CAAC,KAAK,SAAS,CAAC;AAEnB,SAAO;AACT;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const react = require("react");
|
|
4
|
+
const react$1 = require("@floating-ui/react");
|
|
5
|
+
const tourGeometry = require("./tour-geometry.cjs");
|
|
6
|
+
function useTourRect(anchor, options) {
|
|
7
|
+
const { padding, radius } = options;
|
|
8
|
+
const [rect, setRect] = react.useState(null);
|
|
9
|
+
react.useEffect(() => {
|
|
10
|
+
if (!anchor) {
|
|
11
|
+
setRect(null);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const view = anchor.ownerDocument.defaultView;
|
|
15
|
+
if (!view) return;
|
|
16
|
+
const measure = () => {
|
|
17
|
+
setRect(
|
|
18
|
+
tourGeometry.spotlightRect({
|
|
19
|
+
anchor: anchor.getBoundingClientRect(),
|
|
20
|
+
padding,
|
|
21
|
+
radius: radius ?? tourGeometry.anchorRadius(anchor) + padding,
|
|
22
|
+
viewport: { width: view.innerWidth, height: view.innerHeight }
|
|
23
|
+
})
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
measure();
|
|
27
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
28
|
+
return react$1.autoUpdate(anchor, anchor, measure);
|
|
29
|
+
}, [anchor, padding, radius]);
|
|
30
|
+
return rect;
|
|
31
|
+
}
|
|
32
|
+
exports.useTourRect = useTourRect;
|
|
33
|
+
//# sourceMappingURL=use-tour-rect.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-tour-rect.cjs","sources":["../../src/overlay/use-tour-rect.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { autoUpdate } from \"@floating-ui/react\";\nimport { anchorRadius, spotlightRect, type SpotlightRect } from \"./tour-geometry\";\n\n/**\n * Keeps the spotlight cutout locked to its anchor through scrolling, resizing,\n * and layout shifts. Separate from the card's own `autoUpdate` subscription:\n * both are cheap, and feeding floating-ui a virtual reference built from this\n * rect would still need its own update trigger.\n */\nexport function useTourRect(\n anchor: HTMLElement | null,\n options: { padding: number; radius?: number | undefined },\n): SpotlightRect | null {\n const { padding, radius } = options;\n const [rect, setRect] = useState<SpotlightRect | null>(null);\n\n useEffect(() => {\n if (!anchor) {\n setRect(null);\n return;\n }\n const view = anchor.ownerDocument.defaultView;\n if (!view) return;\n\n const measure = () => {\n setRect(\n spotlightRect({\n anchor: anchor.getBoundingClientRect(),\n padding,\n radius: radius ?? anchorRadius(anchor) + padding,\n viewport: { width: view.innerWidth, height: view.innerHeight },\n }),\n );\n };\n\n measure();\n // jsdom has no ResizeObserver, and autoUpdate constructs one unconditionally.\n if (typeof ResizeObserver === \"undefined\") return;\n return autoUpdate(anchor, anchor, measure);\n }, [anchor, padding, radius]);\n\n return rect;\n}\n"],"names":["useState","useEffect","spotlightRect","anchorRadius","autoUpdate"],"mappings":";;;;;AAUO,SAAS,YACd,QACA,SACsB;AACtB,QAAM,EAAE,SAAS,OAAA,IAAW;AAC5B,QAAM,CAAC,MAAM,OAAO,IAAIA,MAAAA,SAA+B,IAAI;AAE3DC,QAAAA,UAAU,MAAM;AACd,QAAI,CAAC,QAAQ;AACX,cAAQ,IAAI;AACZ;AAAA,IACF;AACA,UAAM,OAAO,OAAO,cAAc;AAClC,QAAI,CAAC,KAAM;AAEX,UAAM,UAAU,MAAM;AACpB;AAAA,QACEC,2BAAc;AAAA,UACZ,QAAQ,OAAO,sBAAA;AAAA,UACf;AAAA,UACA,QAAQ,UAAUC,0BAAa,MAAM,IAAI;AAAA,UACzC,UAAU,EAAE,OAAO,KAAK,YAAY,QAAQ,KAAK,YAAA;AAAA,QAAY,CAC9D;AAAA,MAAA;AAAA,IAEL;AAEA,YAAA;AAEA,QAAI,OAAO,mBAAmB,YAAa;AAC3C,WAAOC,mBAAW,QAAQ,QAAQ,OAAO;AAAA,EAC3C,GAAG,CAAC,QAAQ,SAAS,MAAM,CAAC;AAE5B,SAAO;AACT;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SpotlightRect } from './tour-geometry';
|
|
2
|
+
/**
|
|
3
|
+
* Keeps the spotlight cutout locked to its anchor through scrolling, resizing,
|
|
4
|
+
* and layout shifts. Separate from the card's own `autoUpdate` subscription:
|
|
5
|
+
* both are cheap, and feeding floating-ui a virtual reference built from this
|
|
6
|
+
* rect would still need its own update trigger.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useTourRect(anchor: HTMLElement | null, options: {
|
|
9
|
+
padding: number;
|
|
10
|
+
radius?: number | undefined;
|
|
11
|
+
}): SpotlightRect | null;
|
|
12
|
+
//# sourceMappingURL=use-tour-rect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-tour-rect.d.ts","sourceRoot":"","sources":["../../src/overlay/use-tour-rect.ts"],"names":[],"mappings":"AAEA,OAAO,EAA+B,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAElF;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,WAAW,GAAG,IAAI,EAC1B,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GACxD,aAAa,GAAG,IAAI,CA8BtB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useState, useEffect } from "react";
|
|
2
|
+
import { autoUpdate } from "@floating-ui/react";
|
|
3
|
+
import { spotlightRect, anchorRadius } from "./tour-geometry.js";
|
|
4
|
+
function useTourRect(anchor, options) {
|
|
5
|
+
const { padding, radius } = options;
|
|
6
|
+
const [rect, setRect] = useState(null);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
if (!anchor) {
|
|
9
|
+
setRect(null);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const view = anchor.ownerDocument.defaultView;
|
|
13
|
+
if (!view) return;
|
|
14
|
+
const measure = () => {
|
|
15
|
+
setRect(
|
|
16
|
+
spotlightRect({
|
|
17
|
+
anchor: anchor.getBoundingClientRect(),
|
|
18
|
+
padding,
|
|
19
|
+
radius: radius ?? anchorRadius(anchor) + padding,
|
|
20
|
+
viewport: { width: view.innerWidth, height: view.innerHeight }
|
|
21
|
+
})
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
measure();
|
|
25
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
26
|
+
return autoUpdate(anchor, anchor, measure);
|
|
27
|
+
}, [anchor, padding, radius]);
|
|
28
|
+
return rect;
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
useTourRect
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=use-tour-rect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-tour-rect.js","sources":["../../src/overlay/use-tour-rect.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { autoUpdate } from \"@floating-ui/react\";\nimport { anchorRadius, spotlightRect, type SpotlightRect } from \"./tour-geometry\";\n\n/**\n * Keeps the spotlight cutout locked to its anchor through scrolling, resizing,\n * and layout shifts. Separate from the card's own `autoUpdate` subscription:\n * both are cheap, and feeding floating-ui a virtual reference built from this\n * rect would still need its own update trigger.\n */\nexport function useTourRect(\n anchor: HTMLElement | null,\n options: { padding: number; radius?: number | undefined },\n): SpotlightRect | null {\n const { padding, radius } = options;\n const [rect, setRect] = useState<SpotlightRect | null>(null);\n\n useEffect(() => {\n if (!anchor) {\n setRect(null);\n return;\n }\n const view = anchor.ownerDocument.defaultView;\n if (!view) return;\n\n const measure = () => {\n setRect(\n spotlightRect({\n anchor: anchor.getBoundingClientRect(),\n padding,\n radius: radius ?? anchorRadius(anchor) + padding,\n viewport: { width: view.innerWidth, height: view.innerHeight },\n }),\n );\n };\n\n measure();\n // jsdom has no ResizeObserver, and autoUpdate constructs one unconditionally.\n if (typeof ResizeObserver === \"undefined\") return;\n return autoUpdate(anchor, anchor, measure);\n }, [anchor, padding, radius]);\n\n return rect;\n}\n"],"names":[],"mappings":";;;AAUO,SAAS,YACd,QACA,SACsB;AACtB,QAAM,EAAE,SAAS,OAAA,IAAW;AAC5B,QAAM,CAAC,MAAM,OAAO,IAAI,SAA+B,IAAI;AAE3D,YAAU,MAAM;AACd,QAAI,CAAC,QAAQ;AACX,cAAQ,IAAI;AACZ;AAAA,IACF;AACA,UAAM,OAAO,OAAO,cAAc;AAClC,QAAI,CAAC,KAAM;AAEX,UAAM,UAAU,MAAM;AACpB;AAAA,QACE,cAAc;AAAA,UACZ,QAAQ,OAAO,sBAAA;AAAA,UACf;AAAA,UACA,QAAQ,UAAU,aAAa,MAAM,IAAI;AAAA,UACzC,UAAU,EAAE,OAAO,KAAK,YAAY,QAAQ,KAAK,YAAA;AAAA,QAAY,CAC9D;AAAA,MAAA;AAAA,IAEL;AAEA,YAAA;AAEA,QAAI,OAAO,mBAAmB,YAAa;AAC3C,WAAO,WAAW,QAAQ,QAAQ,OAAO;AAAA,EAC3C,GAAG,CAAC,QAAQ,SAAS,MAAM,CAAC;AAE5B,SAAO;AACT;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const react = require("react");
|
|
4
|
+
const tourModel = require("./tour-model.cjs");
|
|
5
|
+
function useStepRoute(options) {
|
|
6
|
+
const { step, context, onNavigate } = options;
|
|
7
|
+
const routeRef = react.useRef(null);
|
|
8
|
+
const [navigating, setNavigating] = react.useState(false);
|
|
9
|
+
const contextRef = react.useRef(context);
|
|
10
|
+
contextRef.current = context;
|
|
11
|
+
const pendingRoute = (step == null ? void 0 : step.route) !== void 0 && step.route !== routeRef.current;
|
|
12
|
+
react.useEffect(() => {
|
|
13
|
+
if (!step || step.route === void 0 || step.route === routeRef.current) return;
|
|
14
|
+
const route = step.route;
|
|
15
|
+
routeRef.current = route;
|
|
16
|
+
const ctx = contextRef.current;
|
|
17
|
+
if (!onNavigate || !ctx) return;
|
|
18
|
+
setNavigating(true);
|
|
19
|
+
void Promise.resolve(onNavigate(route, ctx)).finally(() => setNavigating(false));
|
|
20
|
+
}, [step == null ? void 0 : step.id]);
|
|
21
|
+
return { navigating, pendingRoute };
|
|
22
|
+
}
|
|
23
|
+
function useMissingAnchorPolicy(options) {
|
|
24
|
+
const { definition, step, index, missing, policy, onStepError, onSkip } = options;
|
|
25
|
+
const skipRef = react.useRef(onSkip);
|
|
26
|
+
skipRef.current = onSkip;
|
|
27
|
+
react.useEffect(() => {
|
|
28
|
+
if (!missing || !step) return;
|
|
29
|
+
const target = tourModel.describeTarget(step.target);
|
|
30
|
+
const message = `Tour "${definition.id}" step "${step.id}": anchor ${target} never appeared`;
|
|
31
|
+
if (policy === "fail") throw new Error(message);
|
|
32
|
+
console.warn(`clicky-ui ${message}`);
|
|
33
|
+
onStepError == null ? void 0 : onStepError({ tourId: definition.id, step, index, reason: "anchor-timeout", target });
|
|
34
|
+
if (policy === "skip") skipRef.current(tourModel.nextStepIndex(definition.steps, index, "next"));
|
|
35
|
+
}, [missing, step == null ? void 0 : step.id, policy]);
|
|
36
|
+
}
|
|
37
|
+
function useActiveAnchorMarker(anchor) {
|
|
38
|
+
react.useEffect(() => {
|
|
39
|
+
if (!anchor) return;
|
|
40
|
+
anchor.dataset.tourActive = "true";
|
|
41
|
+
return () => {
|
|
42
|
+
delete anchor.dataset.tourActive;
|
|
43
|
+
};
|
|
44
|
+
}, [anchor]);
|
|
45
|
+
}
|
|
46
|
+
function useStepLifecycle(options) {
|
|
47
|
+
const { step, context, settled } = options;
|
|
48
|
+
const contextRef = react.useRef(context);
|
|
49
|
+
contextRef.current = context;
|
|
50
|
+
react.useEffect(() => {
|
|
51
|
+
var _a;
|
|
52
|
+
if (!step || !settled) return;
|
|
53
|
+
const ctx = contextRef.current;
|
|
54
|
+
if (!ctx) return;
|
|
55
|
+
void ((_a = step.onEnter) == null ? void 0 : _a.call(step, ctx));
|
|
56
|
+
return () => {
|
|
57
|
+
var _a2;
|
|
58
|
+
return (_a2 = step.onExit) == null ? void 0 : _a2.call(step, ctx);
|
|
59
|
+
};
|
|
60
|
+
}, [step == null ? void 0 : step.id, settled]);
|
|
61
|
+
}
|
|
62
|
+
exports.useActiveAnchorMarker = useActiveAnchorMarker;
|
|
63
|
+
exports.useMissingAnchorPolicy = useMissingAnchorPolicy;
|
|
64
|
+
exports.useStepLifecycle = useStepLifecycle;
|
|
65
|
+
exports.useStepRoute = useStepRoute;
|
|
66
|
+
//# sourceMappingURL=use-tour-step.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-tour-step.cjs","sources":["../../src/overlay/use-tour-step.ts"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\nimport { describeTarget, nextStepIndex } from \"./tour-model\";\nimport type {\n TourDefinition,\n TourMissingAnchor,\n TourStep,\n TourStepContext,\n TourStepErrorInfo,\n} from \"./tour-types\";\n\n/**\n * The per-step effects of a running tour, kept out of the renderer: route\n * hand-off, the missing-anchor policy, `onEnter`/`onExit`, and the active-anchor\n * marker.\n */\n\n/**\n * Asks the host to navigate when the entered step lives on a different route.\n * The tour deliberately does NOT then wait on the route changing — the anchor\n * appearing is the only readiness signal, so one mechanism covers route change,\n * lazy chunk, and data fetch, and the same steps still run where there is no\n * router at all.\n */\nexport function useStepRoute(options: {\n step: TourStep | undefined;\n context: TourStepContext | null;\n onNavigate: ((route: string, ctx: TourStepContext) => void | Promise<void>) | undefined;\n}): { navigating: boolean; pendingRoute: boolean } {\n const { step, context, onNavigate } = options;\n const routeRef = useRef<string | null>(null);\n const [navigating, setNavigating] = useState(false);\n const contextRef = useRef(context);\n contextRef.current = context;\n\n const pendingRoute = step?.route !== undefined && step.route !== routeRef.current;\n\n useEffect(() => {\n if (!step || step.route === undefined || step.route === routeRef.current) return;\n const route = step.route;\n routeRef.current = route;\n const ctx = contextRef.current;\n if (!onNavigate || !ctx) return;\n setNavigating(true);\n void Promise.resolve(onNavigate(route, ctx)).finally(() => setNavigating(false));\n // Once per entered step whose route differs; the context object changes as\n // the anchor resolves and must not retrigger navigation.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [step?.id]);\n\n return { navigating, pendingRoute };\n}\n\n/**\n * Applies the missing-anchor policy. `\"center\"` (the default) keeps the step and\n * its counter but always warns and reports, so a broken anchor is loud without\n * being fatal in front of a user; `\"skip\"` silently rewrites the tour and is\n * opt-in; `\"fail\"` is for stories and tests.\n */\nexport function useMissingAnchorPolicy(options: {\n definition: TourDefinition;\n step: TourStep | undefined;\n index: number;\n missing: boolean;\n policy: TourMissingAnchor;\n onStepError: ((info: TourStepErrorInfo) => void) | undefined;\n onSkip: (nextIndex: number | null) => void;\n}): void {\n const { definition, step, index, missing, policy, onStepError, onSkip } = options;\n const skipRef = useRef(onSkip);\n skipRef.current = onSkip;\n\n useEffect(() => {\n if (!missing || !step) return;\n const target = describeTarget(step.target);\n const message = `Tour \"${definition.id}\" step \"${step.id}\": anchor ${target} never appeared`;\n if (policy === \"fail\") throw new Error(message);\n\n console.warn(`clicky-ui ${message}`);\n onStepError?.({ tourId: definition.id, step, index, reason: \"anchor-timeout\", target });\n if (policy === \"skip\") skipRef.current(nextStepIndex(definition.steps, index, \"next\"));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [missing, step?.id, policy]);\n}\n\n/** Marks the spotlit element so styles and end-to-end tests can find it. */\nexport function useActiveAnchorMarker(anchor: HTMLElement | null): void {\n useEffect(() => {\n if (!anchor) return;\n anchor.dataset.tourActive = \"true\";\n return () => {\n delete anchor.dataset.tourActive;\n };\n }, [anchor]);\n}\n\n/** Runs `onEnter` once the step has settled, and `onExit` when it is left. */\nexport function useStepLifecycle(options: {\n step: TourStep | undefined;\n context: TourStepContext | null;\n settled: boolean;\n}): void {\n const { step, context, settled } = options;\n const contextRef = useRef(context);\n contextRef.current = context;\n\n useEffect(() => {\n if (!step || !settled) return;\n const ctx = contextRef.current;\n if (!ctx) return;\n void step.onEnter?.(ctx);\n return () => step.onExit?.(ctx);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [step?.id, settled]);\n}\n"],"names":["useRef","useState","useEffect","describeTarget","nextStepIndex","_a"],"mappings":";;;;AAuBO,SAAS,aAAa,SAIsB;AACjD,QAAM,EAAE,MAAM,SAAS,WAAA,IAAe;AACtC,QAAM,WAAWA,MAAAA,OAAsB,IAAI;AAC3C,QAAM,CAAC,YAAY,aAAa,IAAIC,MAAAA,SAAS,KAAK;AAClD,QAAM,aAAaD,MAAAA,OAAO,OAAO;AACjC,aAAW,UAAU;AAErB,QAAM,gBAAe,6BAAM,WAAU,UAAa,KAAK,UAAU,SAAS;AAE1EE,QAAAA,UAAU,MAAM;AACd,QAAI,CAAC,QAAQ,KAAK,UAAU,UAAa,KAAK,UAAU,SAAS,QAAS;AAC1E,UAAM,QAAQ,KAAK;AACnB,aAAS,UAAU;AACnB,UAAM,MAAM,WAAW;AACvB,QAAI,CAAC,cAAc,CAAC,IAAK;AACzB,kBAAc,IAAI;AAClB,SAAK,QAAQ,QAAQ,WAAW,OAAO,GAAG,CAAC,EAAE,QAAQ,MAAM,cAAc,KAAK,CAAC;AAAA,EAIjF,GAAG,CAAC,6BAAM,EAAE,CAAC;AAEb,SAAO,EAAE,YAAY,aAAA;AACvB;AAQO,SAAS,uBAAuB,SAQ9B;AACP,QAAM,EAAE,YAAY,MAAM,OAAO,SAAS,QAAQ,aAAa,WAAW;AAC1E,QAAM,UAAUF,MAAAA,OAAO,MAAM;AAC7B,UAAQ,UAAU;AAElBE,QAAAA,UAAU,MAAM;AACd,QAAI,CAAC,WAAW,CAAC,KAAM;AACvB,UAAM,SAASC,UAAAA,eAAe,KAAK,MAAM;AACzC,UAAM,UAAU,SAAS,WAAW,EAAE,WAAW,KAAK,EAAE,aAAa,MAAM;AAC3E,QAAI,WAAW,OAAQ,OAAM,IAAI,MAAM,OAAO;AAE9C,YAAQ,KAAK,aAAa,OAAO,EAAE;AACnC,+CAAc,EAAE,QAAQ,WAAW,IAAI,MAAM,OAAO,QAAQ,kBAAkB;AAC9E,QAAI,WAAW,OAAQ,SAAQ,QAAQC,wBAAc,WAAW,OAAO,OAAO,MAAM,CAAC;AAAA,EAEvF,GAAG,CAAC,SAAS,6BAAM,IAAI,MAAM,CAAC;AAChC;AAGO,SAAS,sBAAsB,QAAkC;AACtEF,QAAAA,UAAU,MAAM;AACd,QAAI,CAAC,OAAQ;AACb,WAAO,QAAQ,aAAa;AAC5B,WAAO,MAAM;AACX,aAAO,OAAO,QAAQ;AAAA,IACxB;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AACb;AAGO,SAAS,iBAAiB,SAIxB;AACP,QAAM,EAAE,MAAM,SAAS,QAAA,IAAY;AACnC,QAAM,aAAaF,MAAAA,OAAO,OAAO;AACjC,aAAW,UAAU;AAErBE,QAAAA,UAAU,MAAM;;AACd,QAAI,CAAC,QAAQ,CAAC,QAAS;AACvB,UAAM,MAAM,WAAW;AACvB,QAAI,CAAC,IAAK;AACV,WAAK,UAAK,YAAL,8BAAe;AACpB,WAAO,MAAA;;AAAM,cAAAG,MAAA,KAAK,WAAL,gBAAAA,IAAA,WAAc;AAAA;AAAA,EAE7B,GAAG,CAAC,6BAAM,IAAI,OAAO,CAAC;AACxB;;;;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { TourDefinition, TourMissingAnchor, TourStep, TourStepContext, TourStepErrorInfo } from './tour-types';
|
|
2
|
+
/**
|
|
3
|
+
* The per-step effects of a running tour, kept out of the renderer: route
|
|
4
|
+
* hand-off, the missing-anchor policy, `onEnter`/`onExit`, and the active-anchor
|
|
5
|
+
* marker.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Asks the host to navigate when the entered step lives on a different route.
|
|
9
|
+
* The tour deliberately does NOT then wait on the route changing — the anchor
|
|
10
|
+
* appearing is the only readiness signal, so one mechanism covers route change,
|
|
11
|
+
* lazy chunk, and data fetch, and the same steps still run where there is no
|
|
12
|
+
* router at all.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useStepRoute(options: {
|
|
15
|
+
step: TourStep | undefined;
|
|
16
|
+
context: TourStepContext | null;
|
|
17
|
+
onNavigate: ((route: string, ctx: TourStepContext) => void | Promise<void>) | undefined;
|
|
18
|
+
}): {
|
|
19
|
+
navigating: boolean;
|
|
20
|
+
pendingRoute: boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Applies the missing-anchor policy. `"center"` (the default) keeps the step and
|
|
24
|
+
* its counter but always warns and reports, so a broken anchor is loud without
|
|
25
|
+
* being fatal in front of a user; `"skip"` silently rewrites the tour and is
|
|
26
|
+
* opt-in; `"fail"` is for stories and tests.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useMissingAnchorPolicy(options: {
|
|
29
|
+
definition: TourDefinition;
|
|
30
|
+
step: TourStep | undefined;
|
|
31
|
+
index: number;
|
|
32
|
+
missing: boolean;
|
|
33
|
+
policy: TourMissingAnchor;
|
|
34
|
+
onStepError: ((info: TourStepErrorInfo) => void) | undefined;
|
|
35
|
+
onSkip: (nextIndex: number | null) => void;
|
|
36
|
+
}): void;
|
|
37
|
+
/** Marks the spotlit element so styles and end-to-end tests can find it. */
|
|
38
|
+
export declare function useActiveAnchorMarker(anchor: HTMLElement | null): void;
|
|
39
|
+
/** Runs `onEnter` once the step has settled, and `onExit` when it is left. */
|
|
40
|
+
export declare function useStepLifecycle(options: {
|
|
41
|
+
step: TourStep | undefined;
|
|
42
|
+
context: TourStepContext | null;
|
|
43
|
+
settled: boolean;
|
|
44
|
+
}): void;
|
|
45
|
+
//# sourceMappingURL=use-tour-step.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-tour-step.d.ts","sourceRoot":"","sources":["../../src/overlay/use-tour-step.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAEtB;;;;GAIG;AAEH;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE;IACpC,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;CACzF,GAAG;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,OAAO,CAAA;CAAE,CAuBjD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAC9C,UAAU,EAAE,cAAc,CAAC;IAC3B,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC7D,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC5C,GAAG,IAAI,CAgBP;AAED,4EAA4E;AAC5E,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI,CAQtE;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACxC,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;CAClB,GAAG,IAAI,CAaP"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useRef, useState, useEffect } from "react";
|
|
2
|
+
import { describeTarget, nextStepIndex } from "./tour-model.js";
|
|
3
|
+
function useStepRoute(options) {
|
|
4
|
+
const { step, context, onNavigate } = options;
|
|
5
|
+
const routeRef = useRef(null);
|
|
6
|
+
const [navigating, setNavigating] = useState(false);
|
|
7
|
+
const contextRef = useRef(context);
|
|
8
|
+
contextRef.current = context;
|
|
9
|
+
const pendingRoute = (step == null ? void 0 : step.route) !== void 0 && step.route !== routeRef.current;
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (!step || step.route === void 0 || step.route === routeRef.current) return;
|
|
12
|
+
const route = step.route;
|
|
13
|
+
routeRef.current = route;
|
|
14
|
+
const ctx = contextRef.current;
|
|
15
|
+
if (!onNavigate || !ctx) return;
|
|
16
|
+
setNavigating(true);
|
|
17
|
+
void Promise.resolve(onNavigate(route, ctx)).finally(() => setNavigating(false));
|
|
18
|
+
}, [step == null ? void 0 : step.id]);
|
|
19
|
+
return { navigating, pendingRoute };
|
|
20
|
+
}
|
|
21
|
+
function useMissingAnchorPolicy(options) {
|
|
22
|
+
const { definition, step, index, missing, policy, onStepError, onSkip } = options;
|
|
23
|
+
const skipRef = useRef(onSkip);
|
|
24
|
+
skipRef.current = onSkip;
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (!missing || !step) return;
|
|
27
|
+
const target = describeTarget(step.target);
|
|
28
|
+
const message = `Tour "${definition.id}" step "${step.id}": anchor ${target} never appeared`;
|
|
29
|
+
if (policy === "fail") throw new Error(message);
|
|
30
|
+
console.warn(`clicky-ui ${message}`);
|
|
31
|
+
onStepError == null ? void 0 : onStepError({ tourId: definition.id, step, index, reason: "anchor-timeout", target });
|
|
32
|
+
if (policy === "skip") skipRef.current(nextStepIndex(definition.steps, index, "next"));
|
|
33
|
+
}, [missing, step == null ? void 0 : step.id, policy]);
|
|
34
|
+
}
|
|
35
|
+
function useActiveAnchorMarker(anchor) {
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (!anchor) return;
|
|
38
|
+
anchor.dataset.tourActive = "true";
|
|
39
|
+
return () => {
|
|
40
|
+
delete anchor.dataset.tourActive;
|
|
41
|
+
};
|
|
42
|
+
}, [anchor]);
|
|
43
|
+
}
|
|
44
|
+
function useStepLifecycle(options) {
|
|
45
|
+
const { step, context, settled } = options;
|
|
46
|
+
const contextRef = useRef(context);
|
|
47
|
+
contextRef.current = context;
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
var _a;
|
|
50
|
+
if (!step || !settled) return;
|
|
51
|
+
const ctx = contextRef.current;
|
|
52
|
+
if (!ctx) return;
|
|
53
|
+
void ((_a = step.onEnter) == null ? void 0 : _a.call(step, ctx));
|
|
54
|
+
return () => {
|
|
55
|
+
var _a2;
|
|
56
|
+
return (_a2 = step.onExit) == null ? void 0 : _a2.call(step, ctx);
|
|
57
|
+
};
|
|
58
|
+
}, [step == null ? void 0 : step.id, settled]);
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
useActiveAnchorMarker,
|
|
62
|
+
useMissingAnchorPolicy,
|
|
63
|
+
useStepLifecycle,
|
|
64
|
+
useStepRoute
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=use-tour-step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-tour-step.js","sources":["../../src/overlay/use-tour-step.ts"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\nimport { describeTarget, nextStepIndex } from \"./tour-model\";\nimport type {\n TourDefinition,\n TourMissingAnchor,\n TourStep,\n TourStepContext,\n TourStepErrorInfo,\n} from \"./tour-types\";\n\n/**\n * The per-step effects of a running tour, kept out of the renderer: route\n * hand-off, the missing-anchor policy, `onEnter`/`onExit`, and the active-anchor\n * marker.\n */\n\n/**\n * Asks the host to navigate when the entered step lives on a different route.\n * The tour deliberately does NOT then wait on the route changing — the anchor\n * appearing is the only readiness signal, so one mechanism covers route change,\n * lazy chunk, and data fetch, and the same steps still run where there is no\n * router at all.\n */\nexport function useStepRoute(options: {\n step: TourStep | undefined;\n context: TourStepContext | null;\n onNavigate: ((route: string, ctx: TourStepContext) => void | Promise<void>) | undefined;\n}): { navigating: boolean; pendingRoute: boolean } {\n const { step, context, onNavigate } = options;\n const routeRef = useRef<string | null>(null);\n const [navigating, setNavigating] = useState(false);\n const contextRef = useRef(context);\n contextRef.current = context;\n\n const pendingRoute = step?.route !== undefined && step.route !== routeRef.current;\n\n useEffect(() => {\n if (!step || step.route === undefined || step.route === routeRef.current) return;\n const route = step.route;\n routeRef.current = route;\n const ctx = contextRef.current;\n if (!onNavigate || !ctx) return;\n setNavigating(true);\n void Promise.resolve(onNavigate(route, ctx)).finally(() => setNavigating(false));\n // Once per entered step whose route differs; the context object changes as\n // the anchor resolves and must not retrigger navigation.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [step?.id]);\n\n return { navigating, pendingRoute };\n}\n\n/**\n * Applies the missing-anchor policy. `\"center\"` (the default) keeps the step and\n * its counter but always warns and reports, so a broken anchor is loud without\n * being fatal in front of a user; `\"skip\"` silently rewrites the tour and is\n * opt-in; `\"fail\"` is for stories and tests.\n */\nexport function useMissingAnchorPolicy(options: {\n definition: TourDefinition;\n step: TourStep | undefined;\n index: number;\n missing: boolean;\n policy: TourMissingAnchor;\n onStepError: ((info: TourStepErrorInfo) => void) | undefined;\n onSkip: (nextIndex: number | null) => void;\n}): void {\n const { definition, step, index, missing, policy, onStepError, onSkip } = options;\n const skipRef = useRef(onSkip);\n skipRef.current = onSkip;\n\n useEffect(() => {\n if (!missing || !step) return;\n const target = describeTarget(step.target);\n const message = `Tour \"${definition.id}\" step \"${step.id}\": anchor ${target} never appeared`;\n if (policy === \"fail\") throw new Error(message);\n\n console.warn(`clicky-ui ${message}`);\n onStepError?.({ tourId: definition.id, step, index, reason: \"anchor-timeout\", target });\n if (policy === \"skip\") skipRef.current(nextStepIndex(definition.steps, index, \"next\"));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [missing, step?.id, policy]);\n}\n\n/** Marks the spotlit element so styles and end-to-end tests can find it. */\nexport function useActiveAnchorMarker(anchor: HTMLElement | null): void {\n useEffect(() => {\n if (!anchor) return;\n anchor.dataset.tourActive = \"true\";\n return () => {\n delete anchor.dataset.tourActive;\n };\n }, [anchor]);\n}\n\n/** Runs `onEnter` once the step has settled, and `onExit` when it is left. */\nexport function useStepLifecycle(options: {\n step: TourStep | undefined;\n context: TourStepContext | null;\n settled: boolean;\n}): void {\n const { step, context, settled } = options;\n const contextRef = useRef(context);\n contextRef.current = context;\n\n useEffect(() => {\n if (!step || !settled) return;\n const ctx = contextRef.current;\n if (!ctx) return;\n void step.onEnter?.(ctx);\n return () => step.onExit?.(ctx);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [step?.id, settled]);\n}\n"],"names":["_a"],"mappings":";;AAuBO,SAAS,aAAa,SAIsB;AACjD,QAAM,EAAE,MAAM,SAAS,WAAA,IAAe;AACtC,QAAM,WAAW,OAAsB,IAAI;AAC3C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,aAAa,OAAO,OAAO;AACjC,aAAW,UAAU;AAErB,QAAM,gBAAe,6BAAM,WAAU,UAAa,KAAK,UAAU,SAAS;AAE1E,YAAU,MAAM;AACd,QAAI,CAAC,QAAQ,KAAK,UAAU,UAAa,KAAK,UAAU,SAAS,QAAS;AAC1E,UAAM,QAAQ,KAAK;AACnB,aAAS,UAAU;AACnB,UAAM,MAAM,WAAW;AACvB,QAAI,CAAC,cAAc,CAAC,IAAK;AACzB,kBAAc,IAAI;AAClB,SAAK,QAAQ,QAAQ,WAAW,OAAO,GAAG,CAAC,EAAE,QAAQ,MAAM,cAAc,KAAK,CAAC;AAAA,EAIjF,GAAG,CAAC,6BAAM,EAAE,CAAC;AAEb,SAAO,EAAE,YAAY,aAAA;AACvB;AAQO,SAAS,uBAAuB,SAQ9B;AACP,QAAM,EAAE,YAAY,MAAM,OAAO,SAAS,QAAQ,aAAa,WAAW;AAC1E,QAAM,UAAU,OAAO,MAAM;AAC7B,UAAQ,UAAU;AAElB,YAAU,MAAM;AACd,QAAI,CAAC,WAAW,CAAC,KAAM;AACvB,UAAM,SAAS,eAAe,KAAK,MAAM;AACzC,UAAM,UAAU,SAAS,WAAW,EAAE,WAAW,KAAK,EAAE,aAAa,MAAM;AAC3E,QAAI,WAAW,OAAQ,OAAM,IAAI,MAAM,OAAO;AAE9C,YAAQ,KAAK,aAAa,OAAO,EAAE;AACnC,+CAAc,EAAE,QAAQ,WAAW,IAAI,MAAM,OAAO,QAAQ,kBAAkB;AAC9E,QAAI,WAAW,OAAQ,SAAQ,QAAQ,cAAc,WAAW,OAAO,OAAO,MAAM,CAAC;AAAA,EAEvF,GAAG,CAAC,SAAS,6BAAM,IAAI,MAAM,CAAC;AAChC;AAGO,SAAS,sBAAsB,QAAkC;AACtE,YAAU,MAAM;AACd,QAAI,CAAC,OAAQ;AACb,WAAO,QAAQ,aAAa;AAC5B,WAAO,MAAM;AACX,aAAO,OAAO,QAAQ;AAAA,IACxB;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AACb;AAGO,SAAS,iBAAiB,SAIxB;AACP,QAAM,EAAE,MAAM,SAAS,QAAA,IAAY;AACnC,QAAM,aAAa,OAAO,OAAO;AACjC,aAAW,UAAU;AAErB,YAAU,MAAM;;AACd,QAAI,CAAC,QAAQ,CAAC,QAAS;AACvB,UAAM,MAAM,WAAW;AACvB,QAAI,CAAC,IAAK;AACV,WAAK,UAAK,YAAL,8BAAe;AACpB,WAAO,MAAA;;AAAM,cAAAA,MAAA,KAAK,WAAL,gBAAAA,IAAA,WAAc;AAAA;AAAA,EAE7B,GAAG,CAAC,6BAAM,IAAI,OAAO,CAAC;AACxB;"}
|
package/dist/overlay/zIndex.cjs
CHANGED
|
@@ -15,6 +15,14 @@ const zIndex = {
|
|
|
15
15
|
modalStep: 10,
|
|
16
16
|
/** How far above the top modal floating content sits (below the next nest). */
|
|
17
17
|
popoverOverModalOffset: 5,
|
|
18
|
+
/**
|
|
19
|
+
* Guided-tour dim/spotlight. Above every app overlay including a modal a step
|
|
20
|
+
* may point at, and below toasts. Floating content opened *during* a tour
|
|
21
|
+
* clears the dim via `useFloatingZIndex` (see ./modalStack).
|
|
22
|
+
*/
|
|
23
|
+
tour: 5e4,
|
|
24
|
+
/** How far above the dim the tour's own step card sits. */
|
|
25
|
+
tourCardOffset: 10,
|
|
18
26
|
/** Toasts / notifications — always the topmost layer. */
|
|
19
27
|
toast: 1e5
|
|
20
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zIndex.cjs","sources":["../../src/overlay/zIndex.ts"],"sourcesContent":["/**\n * Centralized z-index scale for clicky-ui overlays — the single source of truth\n * so stacking conflicts (e.g. a dropdown opened inside a modal rendering behind\n * it) cannot recur.\n *\n * These are applied as inline `style={{ zIndex }}`, never as arbitrary `z-[N]`\n * Tailwind classes: a consumer's Tailwind build only generates the arbitrary\n * classes it can scan from clicky-ui's published dist, so a freshly chosen\n * `z-[N]` may silently emit no rule. Inline styles are immune to that.\n *\n * Floating, transient content (dropdown / combobox / menu / tooltip / popover)\n * must clear whatever modal is open, so its z-index is computed relative to the\n * active modal via `useFloatingZIndex` (see ./modalStack) rather than taken from\n * a constant here.\n *\n * Layers NOT listed here are intentionally local: they live inside their own\n * stacking context and never participate in the global ordering —\n * `Timeline` (`z-[1]`), `RangeSlider` thumbs (20/30), and `Modal`'s\n * `ConfirmClosePrompt` (`z-10`, relative to the modal panel).\n */\nexport const zIndex = {\n /** In-flow raised affordances (sticky bits). */\n raised: 30,\n /** Persistent chat launcher. */\n chatFab: 60,\n /** Floating chat windows; `ChatWindowManager` increments from this base. */\n chatWindow: 61,\n /** Floating transient content when NO modal is open (above app chrome). */\n popover: 9000,\n /** Modal/dialog at depth 0; nested modals add `modalStep` per level. */\n modal: 10000,\n /** Per-level step between stacked modals. */\n modalStep: 10,\n /** How far above the top modal floating content sits (below the next nest). */\n popoverOverModalOffset: 5,\n /** Toasts / notifications — always the topmost layer. */\n toast: 100000,\n} as const;\n"],"names":[],"mappings":";;AAoBO,MAAM,SAAS;AAAA;AAAA,EAEpB,QAAQ;AAAA;AAAA,EAER,SAAS;AAAA;AAAA,EAET,YAAY;AAAA;AAAA,EAEZ,SAAS;AAAA;AAAA,EAET,OAAO;AAAA;AAAA,EAEP,WAAW;AAAA;AAAA,EAEX,wBAAwB;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"zIndex.cjs","sources":["../../src/overlay/zIndex.ts"],"sourcesContent":["/**\n * Centralized z-index scale for clicky-ui overlays — the single source of truth\n * so stacking conflicts (e.g. a dropdown opened inside a modal rendering behind\n * it) cannot recur.\n *\n * These are applied as inline `style={{ zIndex }}`, never as arbitrary `z-[N]`\n * Tailwind classes: a consumer's Tailwind build only generates the arbitrary\n * classes it can scan from clicky-ui's published dist, so a freshly chosen\n * `z-[N]` may silently emit no rule. Inline styles are immune to that.\n *\n * Floating, transient content (dropdown / combobox / menu / tooltip / popover)\n * must clear whatever modal is open, so its z-index is computed relative to the\n * active modal via `useFloatingZIndex` (see ./modalStack) rather than taken from\n * a constant here.\n *\n * Layers NOT listed here are intentionally local: they live inside their own\n * stacking context and never participate in the global ordering —\n * `Timeline` (`z-[1]`), `RangeSlider` thumbs (20/30), and `Modal`'s\n * `ConfirmClosePrompt` (`z-10`, relative to the modal panel).\n */\nexport const zIndex = {\n /** In-flow raised affordances (sticky bits). */\n raised: 30,\n /** Persistent chat launcher. */\n chatFab: 60,\n /** Floating chat windows; `ChatWindowManager` increments from this base. */\n chatWindow: 61,\n /** Floating transient content when NO modal is open (above app chrome). */\n popover: 9000,\n /** Modal/dialog at depth 0; nested modals add `modalStep` per level. */\n modal: 10000,\n /** Per-level step between stacked modals. */\n modalStep: 10,\n /** How far above the top modal floating content sits (below the next nest). */\n popoverOverModalOffset: 5,\n /**\n * Guided-tour dim/spotlight. Above every app overlay including a modal a step\n * may point at, and below toasts. Floating content opened *during* a tour\n * clears the dim via `useFloatingZIndex` (see ./modalStack).\n */\n tour: 50000,\n /** How far above the dim the tour's own step card sits. */\n tourCardOffset: 10,\n /** Toasts / notifications — always the topmost layer. */\n toast: 100000,\n} as const;\n"],"names":[],"mappings":";;AAoBO,MAAM,SAAS;AAAA;AAAA,EAEpB,QAAQ;AAAA;AAAA,EAER,SAAS;AAAA;AAAA,EAET,YAAY;AAAA;AAAA,EAEZ,SAAS;AAAA;AAAA,EAET,OAAO;AAAA;AAAA,EAEP,WAAW;AAAA;AAAA,EAEX,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxB,MAAM;AAAA;AAAA,EAEN,gBAAgB;AAAA;AAAA,EAEhB,OAAO;AACT;;"}
|