@flanksource/clicky-ui 0.3.40 → 0.3.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/ai.cjs +14 -0
- package/dist/ai.cjs.map +1 -1
- package/dist/ai.js +14 -0
- package/dist/ai.js.map +1 -1
- package/dist/comments/CommentCard.cjs +3 -1
- package/dist/comments/CommentCard.cjs.map +1 -1
- package/dist/comments/CommentCard.d.ts.map +1 -1
- package/dist/comments/CommentCard.js +4 -2
- package/dist/comments/CommentCard.js.map +1 -1
- package/dist/comments/CommentCardParts.cjs +16 -0
- package/dist/comments/CommentCardParts.cjs.map +1 -1
- package/dist/comments/CommentCardParts.d.ts +4 -1
- package/dist/comments/CommentCardParts.d.ts.map +1 -1
- package/dist/comments/CommentCardParts.js +16 -0
- package/dist/comments/CommentCardParts.js.map +1 -1
- package/dist/comments/comment-types.cjs.map +1 -1
- package/dist/comments/comment-types.d.ts +4 -0
- package/dist/comments/comment-types.d.ts.map +1 -1
- package/dist/comments/comment-types.js.map +1 -1
- package/dist/components/AccordionList.cjs +5 -1
- package/dist/components/AccordionList.cjs.map +1 -1
- package/dist/components/AccordionList.d.ts +3 -1
- package/dist/components/AccordionList.d.ts.map +1 -1
- package/dist/components/AccordionList.js +5 -1
- package/dist/components/AccordionList.js.map +1 -1
- package/dist/components/Combobox.cjs +54 -8
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +56 -10
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ComboboxMenu.cjs +139 -113
- package/dist/components/ComboboxMenu.cjs.map +1 -1
- package/dist/components/ComboboxMenu.d.ts +3 -1
- package/dist/components/ComboboxMenu.d.ts.map +1 -1
- package/dist/components/ComboboxMenu.js +139 -113
- package/dist/components/ComboboxMenu.js.map +1 -1
- package/dist/components/ComboboxMenuTrigger.cjs +87 -0
- package/dist/components/ComboboxMenuTrigger.cjs.map +1 -0
- package/dist/components/ComboboxMenuTrigger.d.ts +23 -0
- package/dist/components/ComboboxMenuTrigger.d.ts.map +1 -0
- package/dist/components/ComboboxMenuTrigger.js +87 -0
- package/dist/components/ComboboxMenuTrigger.js.map +1 -0
- package/dist/components/JsonSchemaForm.cjs +39 -11
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.d.ts +1 -1
- package/dist/components/JsonSchemaForm.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm.js +38 -10
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/SegmentedControl.cjs +20 -3
- package/dist/components/SegmentedControl.cjs.map +1 -1
- package/dist/components/SegmentedControl.d.ts +11 -0
- package/dist/components/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl.js +21 -4
- package/dist/components/SegmentedControl.js.map +1 -1
- package/dist/components/combobox-types.d.ts +8 -0
- package/dist/components/combobox-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-accordion-array.cjs +3 -1
- package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
- package/dist/components/json-schema-form-accordion-array.d.ts +4 -1
- package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-accordion-array.js +3 -1
- package/dist/components/json-schema-form-accordion-array.js.map +1 -1
- package/dist/components/json-schema-form-array-view.cjs +63 -0
- package/dist/components/json-schema-form-array-view.cjs.map +1 -0
- package/dist/components/json-schema-form-array-view.d.ts +21 -0
- package/dist/components/json-schema-form-array-view.d.ts.map +1 -0
- package/dist/components/json-schema-form-array-view.js +63 -0
- package/dist/components/json-schema-form-array-view.js.map +1 -0
- package/dist/components/json-schema-form-array.cjs +3 -7
- package/dist/components/json-schema-form-array.cjs.map +1 -1
- package/dist/components/json-schema-form-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-array.js +3 -7
- package/dist/components/json-schema-form-array.js.map +1 -1
- package/dist/components/json-schema-form-conditionals.cjs +67 -0
- package/dist/components/json-schema-form-conditionals.cjs.map +1 -0
- package/dist/components/json-schema-form-conditionals.d.ts +9 -0
- package/dist/components/json-schema-form-conditionals.d.ts.map +1 -0
- package/dist/components/json-schema-form-conditionals.js +67 -0
- package/dist/components/json-schema-form-conditionals.js.map +1 -0
- package/dist/components/json-schema-form-debug-badge.cjs +108 -0
- package/dist/components/json-schema-form-debug-badge.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-badge.d.ts +10 -0
- package/dist/components/json-schema-form-debug-badge.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-badge.js +108 -0
- package/dist/components/json-schema-form-debug-badge.js.map +1 -0
- package/dist/components/json-schema-form-debug-glyph-map.cjs +129 -0
- package/dist/components/json-schema-form-debug-glyph-map.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-glyph-map.d.ts +20 -0
- package/dist/components/json-schema-form-debug-glyph-map.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-glyph-map.js +129 -0
- package/dist/components/json-schema-form-debug-glyph-map.js.map +1 -0
- package/dist/components/json-schema-form-debug-glyph.cjs +13 -0
- package/dist/components/json-schema-form-debug-glyph.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-glyph.d.ts +6 -0
- package/dist/components/json-schema-form-debug-glyph.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-glyph.js +13 -0
- package/dist/components/json-schema-form-debug-glyph.js.map +1 -0
- package/dist/components/json-schema-form-debug-groups.cjs +56 -0
- package/dist/components/json-schema-form-debug-groups.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-groups.d.ts +8 -0
- package/dist/components/json-schema-form-debug-groups.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-groups.js +56 -0
- package/dist/components/json-schema-form-debug-groups.js.map +1 -0
- package/dist/components/json-schema-form-debug-keywords.cjs +159 -0
- package/dist/components/json-schema-form-debug-keywords.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-keywords.d.ts +6 -0
- package/dist/components/json-schema-form-debug-keywords.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-keywords.js +159 -0
- package/dist/components/json-schema-form-debug-keywords.js.map +1 -0
- package/dist/components/json-schema-form-debug-listeners.cjs +102 -0
- package/dist/components/json-schema-form-debug-listeners.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-listeners.d.ts +6 -0
- package/dist/components/json-schema-form-debug-listeners.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-listeners.js +102 -0
- package/dist/components/json-schema-form-debug-listeners.js.map +1 -0
- package/dist/components/json-schema-form-debug.cjs +31 -0
- package/dist/components/json-schema-form-debug.cjs.map +1 -0
- package/dist/components/json-schema-form-debug.d.ts +11 -0
- package/dist/components/json-schema-form-debug.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug.js +31 -0
- package/dist/components/json-schema-form-debug.js.map +1 -0
- package/dist/components/json-schema-form-defaults.cjs +68 -0
- package/dist/components/json-schema-form-defaults.cjs.map +1 -0
- package/dist/components/json-schema-form-defaults.d.ts +4 -0
- package/dist/components/json-schema-form-defaults.d.ts.map +1 -0
- package/dist/components/json-schema-form-defaults.js +68 -0
- package/dist/components/json-schema-form-defaults.js.map +1 -0
- package/dist/components/json-schema-form-enum-choice.cjs +114 -0
- package/dist/components/json-schema-form-enum-choice.cjs.map +1 -0
- package/dist/components/json-schema-form-enum-choice.d.ts +14 -0
- package/dist/components/json-schema-form-enum-choice.d.ts.map +1 -0
- package/dist/components/json-schema-form-enum-choice.js +114 -0
- package/dist/components/json-schema-form-enum-choice.js.map +1 -0
- package/dist/components/json-schema-form-errors.cjs +49 -31
- package/dist/components/json-schema-form-errors.cjs.map +1 -1
- package/dist/components/json-schema-form-errors.d.ts +4 -2
- package/dist/components/json-schema-form-errors.d.ts.map +1 -1
- package/dist/components/json-schema-form-errors.js +51 -33
- package/dist/components/json-schema-form-errors.js.map +1 -1
- package/dist/components/json-schema-form-fields.cjs +3 -93
- package/dist/components/json-schema-form-fields.cjs.map +1 -1
- package/dist/components/json-schema-form-fields.d.ts.map +1 -1
- package/dist/components/json-schema-form-fields.js +1 -91
- package/dist/components/json-schema-form-fields.js.map +1 -1
- package/dist/components/json-schema-form-filter.cjs +2 -1
- package/dist/components/json-schema-form-filter.cjs.map +1 -1
- package/dist/components/json-schema-form-filter.js +2 -1
- package/dist/components/json-schema-form-filter.js.map +1 -1
- package/dist/components/json-schema-form-item-summary.cjs +6 -2
- package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
- package/dist/components/json-schema-form-item-summary.js +6 -2
- package/dist/components/json-schema-form-item-summary.js.map +1 -1
- package/dist/components/json-schema-form-layout.cjs +28 -19
- package/dist/components/json-schema-form-layout.cjs.map +1 -1
- package/dist/components/json-schema-form-layout.d.ts +8 -6
- package/dist/components/json-schema-form-layout.d.ts.map +1 -1
- package/dist/components/json-schema-form-layout.js +29 -20
- package/dist/components/json-schema-form-layout.js.map +1 -1
- package/dist/components/json-schema-form-listener-paths.cjs +52 -0
- package/dist/components/json-schema-form-listener-paths.cjs.map +1 -0
- package/dist/components/json-schema-form-listener-paths.d.ts +10 -0
- package/dist/components/json-schema-form-listener-paths.d.ts.map +1 -0
- package/dist/components/json-schema-form-listener-paths.js +52 -0
- package/dist/components/json-schema-form-listener-paths.js.map +1 -0
- package/dist/components/json-schema-form-listener-types.d.ts +22 -0
- package/dist/components/json-schema-form-listener-types.d.ts.map +1 -0
- package/dist/components/json-schema-form-listeners.cjs +256 -0
- package/dist/components/json-schema-form-listeners.cjs.map +1 -0
- package/dist/components/json-schema-form-listeners.d.ts +13 -0
- package/dist/components/json-schema-form-listeners.d.ts.map +1 -0
- package/dist/components/json-schema-form-listeners.js +256 -0
- package/dist/components/json-schema-form-listeners.js.map +1 -0
- package/dist/components/json-schema-form-object-array-view.cjs +62 -0
- package/dist/components/json-schema-form-object-array-view.cjs.map +1 -0
- package/dist/components/json-schema-form-object-array-view.d.ts +14 -0
- package/dist/components/json-schema-form-object-array-view.d.ts.map +1 -0
- package/dist/components/json-schema-form-object-array-view.js +62 -0
- package/dist/components/json-schema-form-object-array-view.js.map +1 -0
- package/dist/components/json-schema-form-object.cjs +3 -0
- 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 +3 -0
- package/dist/components/json-schema-form-object.js.map +1 -1
- package/dist/components/json-schema-form-preferences.cjs +1 -0
- package/dist/components/json-schema-form-preferences.cjs.map +1 -1
- package/dist/components/json-schema-form-preferences.d.ts +1 -0
- package/dist/components/json-schema-form-preferences.d.ts.map +1 -1
- package/dist/components/json-schema-form-preferences.js +1 -0
- package/dist/components/json-schema-form-preferences.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +36 -12
- 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 +38 -14
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +6 -99
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts +1 -8
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +5 -98
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-runtime-types.d.ts +16 -0
- package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.cjs +67 -16
- package/dist/components/json-schema-form-table-array.cjs.map +1 -1
- package/dist/components/json-schema-form-table-array.d.ts +4 -1
- package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.js +70 -19
- package/dist/components/json-schema-form-table-array.js.map +1 -1
- package/dist/components/json-schema-form-tone.cjs +12 -0
- package/dist/components/json-schema-form-tone.cjs.map +1 -1
- package/dist/components/json-schema-form-tone.js +12 -0
- package/dist/components/json-schema-form-tone.js.map +1 -1
- package/dist/components/json-schema-form-types.d.ts +17 -0
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.cjs +7 -1
- package/dist/components/json-schema-form-utils.cjs.map +1 -1
- package/dist/components/json-schema-form-utils.d.ts +2 -1
- package/dist/components/json-schema-form-utils.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.js +7 -1
- package/dist/components/json-schema-form-utils.js.map +1 -1
- package/dist/components.cjs +3 -2
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.ts +3 -2
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +2 -1
- package/dist/components.js.map +1 -1
- package/dist/data/DataTable.cjs +9 -3
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +6 -0
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +9 -3
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/FixtureEditor/FixtureEditor.cjs +43 -24
- package/dist/data/FixtureEditor/FixtureEditor.cjs.map +1 -1
- package/dist/data/FixtureEditor/FixtureEditor.d.ts.map +1 -1
- package/dist/data/FixtureEditor/FixtureEditor.js +43 -24
- package/dist/data/FixtureEditor/FixtureEditor.js.map +1 -1
- package/dist/data/GraphDiagram.cjs +125 -138
- package/dist/data/GraphDiagram.cjs.map +1 -1
- package/dist/data/GraphDiagram.d.ts +30 -23
- package/dist/data/GraphDiagram.d.ts.map +1 -1
- package/dist/data/GraphDiagram.js +128 -141
- package/dist/data/GraphDiagram.js.map +1 -1
- package/dist/data/GraphDiagramEdges.cjs +208 -0
- package/dist/data/GraphDiagramEdges.cjs.map +1 -0
- package/dist/data/GraphDiagramEdges.d.ts +40 -0
- package/dist/data/GraphDiagramEdges.d.ts.map +1 -0
- package/dist/data/GraphDiagramEdges.js +208 -0
- package/dist/data/GraphDiagramEdges.js.map +1 -0
- package/dist/data/GraphDiagramNodes.cjs +142 -0
- package/dist/data/GraphDiagramNodes.cjs.map +1 -0
- package/dist/data/GraphDiagramNodes.d.ts +22 -0
- package/dist/data/GraphDiagramNodes.d.ts.map +1 -0
- package/dist/data/GraphDiagramNodes.js +142 -0
- package/dist/data/GraphDiagramNodes.js.map +1 -0
- package/dist/data/Tree.cjs +10 -2
- package/dist/data/Tree.cjs.map +1 -1
- package/dist/data/Tree.d.ts +6 -1
- package/dist/data/Tree.d.ts.map +1 -1
- package/dist/data/Tree.js +10 -2
- package/dist/data/Tree.js.map +1 -1
- package/dist/data/ai/PromptRunEditor/RuntimeRows.cjs +8 -3
- package/dist/data/ai/PromptRunEditor/RuntimeRows.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/RuntimeRows.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/RuntimeRows.js +8 -3
- package/dist/data/ai/PromptRunEditor/RuntimeRows.js.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.cjs +37 -43
- package/dist/data/ai/PromptRunEditor/index.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.d.ts +3 -1
- package/dist/data/ai/PromptRunEditor/index.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.js +38 -44
- package/dist/data/ai/PromptRunEditor/index.js.map +1 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.cjs +16 -5
- package/dist/data/ai/PromptRunEditor/runtimeActions.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.d.ts +4 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.js +17 -6
- package/dist/data/ai/PromptRunEditor/runtimeActions.js.map +1 -1
- package/dist/data/ai/SessionInspector.approvals-model.cjs +12 -0
- package/dist/data/ai/SessionInspector.approvals-model.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.approvals-model.d.ts +11 -2
- package/dist/data/ai/SessionInspector.approvals-model.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.approvals-model.js +12 -0
- package/dist/data/ai/SessionInspector.approvals-model.js.map +1 -1
- package/dist/data/ai/SessionInspector.approvals.cjs +25 -1
- package/dist/data/ai/SessionInspector.approvals.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.approvals.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.approvals.js +26 -2
- package/dist/data/ai/SessionInspector.approvals.js.map +1 -1
- package/dist/data/ai/SessionInspector.cjs +143 -167
- package/dist/data/ai/SessionInspector.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.collection-types.d.ts +5 -0
- package/dist/data/ai/SessionInspector.collection-types.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.collection.cjs +18 -5
- package/dist/data/ai/SessionInspector.collection.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.collection.d.ts +2 -0
- package/dist/data/ai/SessionInspector.collection.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.collection.fixtures.d.ts +6 -0
- package/dist/data/ai/SessionInspector.collection.fixtures.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.collection.js +18 -5
- package/dist/data/ai/SessionInspector.collection.js.map +1 -1
- package/dist/data/ai/SessionInspector.d.ts +24 -2
- package/dist/data/ai/SessionInspector.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.hierarchy-state.cjs +105 -7
- package/dist/data/ai/SessionInspector.hierarchy-state.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.hierarchy-state.d.ts +12 -1
- package/dist/data/ai/SessionInspector.hierarchy-state.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.hierarchy-state.js +107 -9
- package/dist/data/ai/SessionInspector.hierarchy-state.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.js +144 -168
- package/dist/data/ai/SessionInspector.js.map +1 -1
- package/dist/data/ai/SessionInspector.legacy.cjs +116 -0
- package/dist/data/ai/SessionInspector.legacy.cjs.map +1 -0
- package/dist/data/ai/SessionInspector.legacy.d.ts +19 -0
- package/dist/data/ai/SessionInspector.legacy.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.legacy.js +116 -0
- package/dist/data/ai/SessionInspector.legacy.js.map +1 -0
- package/dist/data/ai/SessionInspector.panels.cjs +3 -0
- package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.panels.js +3 -0
- package/dist/data/ai/SessionInspector.panels.js.map +1 -1
- package/dist/data/ai/SessionInspector.plan.cjs +29 -12
- package/dist/data/ai/SessionInspector.plan.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.plan.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.plan.js +30 -13
- package/dist/data/ai/SessionInspector.plan.js.map +1 -1
- package/dist/data/ai/SessionInspector.remote-view.cjs +44 -0
- package/dist/data/ai/SessionInspector.remote-view.cjs.map +1 -0
- package/dist/data/ai/SessionInspector.remote-view.d.ts +11 -0
- package/dist/data/ai/SessionInspector.remote-view.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.remote-view.js +44 -0
- package/dist/data/ai/SessionInspector.remote-view.js.map +1 -0
- package/dist/data/ai/SessionInspector.remote.cjs +275 -0
- package/dist/data/ai/SessionInspector.remote.cjs.map +1 -0
- package/dist/data/ai/SessionInspector.remote.d.ts +57 -0
- package/dist/data/ai/SessionInspector.remote.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.remote.js +275 -0
- package/dist/data/ai/SessionInspector.remote.js.map +1 -0
- package/dist/data/ai/SessionInspector.summary.cjs +9 -159
- package/dist/data/ai/SessionInspector.summary.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.summary.d.ts +0 -3
- package/dist/data/ai/SessionInspector.summary.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.summary.js +11 -161
- package/dist/data/ai/SessionInspector.summary.js.map +1 -1
- package/dist/data/ai/SessionInspector.tab-state.cjs +15 -0
- package/dist/data/ai/SessionInspector.tab-state.cjs.map +1 -0
- package/dist/data/ai/SessionInspector.tab-state.d.ts +3 -0
- package/dist/data/ai/SessionInspector.tab-state.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.tab-state.js +15 -0
- package/dist/data/ai/SessionInspector.tab-state.js.map +1 -0
- package/dist/data/ai/SessionInspector.tabs.model.cjs +31 -18
- package/dist/data/ai/SessionInspector.tabs.model.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.tabs.model.d.ts +3 -1
- package/dist/data/ai/SessionInspector.tabs.model.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.tabs.model.js +32 -19
- package/dist/data/ai/SessionInspector.tabs.model.js.map +1 -1
- package/dist/data/ai/SessionInspector.transcript.cjs +4 -0
- package/dist/data/ai/SessionInspector.transcript.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.transcript.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.transcript.js +4 -0
- package/dist/data/ai/SessionInspector.transcript.js.map +1 -1
- package/dist/data/ai/SessionInspector.verification.cjs +53 -0
- package/dist/data/ai/SessionInspector.verification.cjs.map +1 -0
- package/dist/data/ai/SessionInspector.verification.d.ts +7 -0
- package/dist/data/ai/SessionInspector.verification.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.verification.js +53 -0
- package/dist/data/ai/SessionInspector.verification.js.map +1 -0
- package/dist/data/ai/SessionViewer.approval-body.cjs +146 -0
- package/dist/data/ai/SessionViewer.approval-body.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.approval-body.d.ts +11 -0
- package/dist/data/ai/SessionViewer.approval-body.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.approval-body.js +146 -0
- package/dist/data/ai/SessionViewer.approval-body.js.map +1 -0
- package/dist/data/ai/SessionViewer.approval-forms.cjs +150 -0
- package/dist/data/ai/SessionViewer.approval-forms.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.approval-forms.d.ts +23 -0
- package/dist/data/ai/SessionViewer.approval-forms.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.approval-forms.js +150 -0
- package/dist/data/ai/SessionViewer.approval-forms.js.map +1 -0
- package/dist/data/ai/SessionViewer.cjs +57 -20
- package/dist/data/ai/SessionViewer.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.d.ts +13 -3
- package/dist/data/ai/SessionViewer.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.decision-controls.cjs +313 -0
- package/dist/data/ai/SessionViewer.decision-controls.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.decision-controls.d.ts +43 -0
- package/dist/data/ai/SessionViewer.decision-controls.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.decision-controls.js +313 -0
- package/dist/data/ai/SessionViewer.decision-controls.js.map +1 -0
- package/dist/data/ai/SessionViewer.decision.cjs +21 -0
- package/dist/data/ai/SessionViewer.decision.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.decision.d.ts +12 -0
- package/dist/data/ai/SessionViewer.decision.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.decision.js +21 -0
- package/dist/data/ai/SessionViewer.decision.js.map +1 -0
- package/dist/data/ai/SessionViewer.input.cjs +14 -0
- package/dist/data/ai/SessionViewer.input.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.input.d.ts +5 -0
- package/dist/data/ai/SessionViewer.input.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.input.js +14 -0
- package/dist/data/ai/SessionViewer.input.js.map +1 -1
- package/dist/data/ai/SessionViewer.js +58 -21
- package/dist/data/ai/SessionViewer.js.map +1 -1
- package/dist/data/ai/SessionViewer.model.cjs +7 -1
- package/dist/data/ai/SessionViewer.model.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.model.d.ts +25 -3
- package/dist/data/ai/SessionViewer.model.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.model.js +7 -1
- package/dist/data/ai/SessionViewer.model.js.map +1 -1
- package/dist/data/ai/SessionViewer.rows.cjs +6 -3
- package/dist/data/ai/SessionViewer.rows.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.rows.d.ts +2 -1
- package/dist/data/ai/SessionViewer.rows.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.rows.js +6 -3
- package/dist/data/ai/SessionViewer.rows.js.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.cjs +29 -237
- package/dist/data/ai/SessionViewer.tool-row.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.js +27 -235
- package/dist/data/ai/SessionViewer.tool-row.js.map +1 -1
- package/dist/data/ai/SessionViewer.unified.d.ts +17 -0
- package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
- package/dist/data/ai/SessionViewerMenu.cjs +8 -2
- package/dist/data/ai/SessionViewerMenu.cjs.map +1 -1
- package/dist/data/ai/SessionViewerMenu.d.ts +4 -1
- package/dist/data/ai/SessionViewerMenu.d.ts.map +1 -1
- package/dist/data/ai/SessionViewerMenu.js +8 -2
- package/dist/data/ai/SessionViewerMenu.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.cjs +28 -17
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.d.ts +10 -2
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.js +29 -18
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.cjs +9 -1
- package/dist/data/ai/SpecRuntimeEditor/index.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts +9 -2
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.js +9 -1
- package/dist/data/ai/SpecRuntimeEditor/index.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/permission-mode-visuals.cjs +1 -1
- package/dist/data/ai/SpecRuntimeEditor/permission-mode-visuals.js +1 -1
- package/dist/data/ai/SpecRuntimeEditor/summaries.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/summaries.d.ts +8 -2
- package/dist/data/ai/SpecRuntimeEditor/summaries.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/summaries.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/update.cjs +14 -6
- package/dist/data/ai/SpecRuntimeEditor/update.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/update.d.ts +1 -0
- package/dist/data/ai/SpecRuntimeEditor/update.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/update.js +14 -6
- package/dist/data/ai/SpecRuntimeEditor/update.js.map +1 -1
- package/dist/data/ai/approval-request.cjs +75 -0
- package/dist/data/ai/approval-request.cjs.map +1 -0
- package/dist/data/ai/approval-request.d.ts +155 -0
- package/dist/data/ai/approval-request.d.ts.map +1 -0
- package/dist/data/ai/approval-request.js +75 -0
- package/dist/data/ai/approval-request.js.map +1 -0
- package/dist/data/ai/index.d.ts +6 -1
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.cjs +125 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.cjs.map +1 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.d.ts +11 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.d.ts.map +1 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.js +125 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.js.map +1 -0
- package/dist/data/ai/runtime-preset-menu/index.d.ts +3 -0
- package/dist/data/ai/runtime-preset-menu/index.d.ts.map +1 -0
- package/dist/data/ai/runtime-preset-menu/model.cjs +73 -0
- package/dist/data/ai/runtime-preset-menu/model.cjs.map +1 -0
- package/dist/data/ai/runtime-preset-menu/model.d.ts +13 -0
- package/dist/data/ai/runtime-preset-menu/model.d.ts.map +1 -0
- package/dist/data/ai/runtime-preset-menu/model.js +73 -0
- package/dist/data/ai/runtime-preset-menu/model.js.map +1 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.cjs +149 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.cjs.map +1 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.d.ts +15 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.d.ts.map +1 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.js +149 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.js.map +1 -0
- package/dist/data/ai/runtime-spec-fields.cjs +166 -0
- package/dist/data/ai/runtime-spec-fields.cjs.map +1 -0
- package/dist/data/ai/runtime-spec-fields.d.ts +13 -0
- package/dist/data/ai/runtime-spec-fields.d.ts.map +1 -0
- package/dist/data/ai/runtime-spec-fields.js +166 -0
- package/dist/data/ai/runtime-spec-fields.js.map +1 -0
- package/dist/data/ai/session-categories.cjs +4 -0
- package/dist/data/ai/session-categories.cjs.map +1 -1
- package/dist/data/ai/session-categories.d.ts +1 -0
- package/dist/data/ai/session-categories.d.ts.map +1 -1
- package/dist/data/ai/session-categories.js +4 -0
- package/dist/data/ai/session-categories.js.map +1 -1
- package/dist/data/ai/use-session-scroll.cjs +49 -21
- package/dist/data/ai/use-session-scroll.cjs.map +1 -1
- package/dist/data/ai/use-session-scroll.d.ts +2 -0
- package/dist/data/ai/use-session-scroll.d.ts.map +1 -1
- package/dist/data/ai/use-session-scroll.js +49 -21
- package/dist/data/ai/use-session-scroll.js.map +1 -1
- package/dist/data/chat/Chat.runtime.cjs +1 -1
- package/dist/data/chat/Chat.runtime.cjs.map +1 -1
- package/dist/data/chat/Chat.runtime.d.ts.map +1 -1
- package/dist/data/chat/Chat.runtime.js +1 -1
- package/dist/data/chat/Chat.runtime.js.map +1 -1
- package/dist/data/graph-columns-layout.cjs +216 -0
- package/dist/data/graph-columns-layout.cjs.map +1 -0
- package/dist/data/graph-columns-layout.d.ts +56 -0
- package/dist/data/graph-columns-layout.d.ts.map +1 -0
- package/dist/data/graph-columns-layout.js +216 -0
- package/dist/data/graph-columns-layout.js.map +1 -0
- package/dist/data/graph-diagram-model.cjs +73 -0
- package/dist/data/graph-diagram-model.cjs.map +1 -0
- package/dist/data/graph-diagram-model.d.ts +90 -0
- package/dist/data/graph-diagram-model.d.ts.map +1 -0
- package/dist/data/graph-diagram-model.js +73 -0
- package/dist/data/graph-diagram-model.js.map +1 -0
- package/dist/data/graph-edge-routing.cjs +235 -0
- package/dist/data/graph-edge-routing.cjs.map +1 -0
- package/dist/data/graph-edge-routing.d.ts +73 -0
- package/dist/data/graph-edge-routing.d.ts.map +1 -0
- package/dist/data/graph-edge-routing.js +235 -0
- package/dist/data/graph-edge-routing.js.map +1 -0
- package/dist/data/graph-layout.cjs +0 -82
- package/dist/data/graph-layout.cjs.map +1 -1
- package/dist/data/graph-layout.d.ts +1 -28
- package/dist/data/graph-layout.d.ts.map +1 -1
- package/dist/data/graph-layout.js +1 -83
- package/dist/data/graph-layout.js.map +1 -1
- package/dist/data/har/HarPanel.cjs +129 -33
- package/dist/data/har/HarPanel.cjs.map +1 -1
- package/dist/data/har/HarPanel.d.ts +13 -1
- package/dist/data/har/HarPanel.d.ts.map +1 -1
- package/dist/data/har/HarPanel.js +130 -34
- package/dist/data/har/HarPanel.js.map +1 -1
- package/dist/data/har/fixtures.d.ts +12 -0
- package/dist/data/har/fixtures.d.ts.map +1 -1
- package/dist/data/har/types.d.ts +12 -0
- package/dist/data/har/types.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBar.cjs +67 -84
- package/dist/data/runtime/RuntimeBar.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBar.d.ts +4 -5
- package/dist/data/runtime/RuntimeBar.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBar.fields.cjs +170 -0
- package/dist/data/runtime/RuntimeBar.fields.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBar.fields.d.ts +16 -0
- package/dist/data/runtime/RuntimeBar.fields.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBar.fields.js +170 -0
- package/dist/data/runtime/RuntimeBar.fields.js.map +1 -0
- package/dist/data/runtime/RuntimeBar.js +70 -87
- package/dist/data/runtime/RuntimeBar.js.map +1 -1
- package/dist/data/runtime/RuntimeBar.selection.cjs +56 -0
- package/dist/data/runtime/RuntimeBar.selection.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBar.selection.d.ts +20 -0
- package/dist/data/runtime/RuntimeBar.selection.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBar.selection.js +56 -0
- package/dist/data/runtime/RuntimeBar.selection.js.map +1 -0
- package/dist/data/runtime/RuntimeBarActions.cjs +10 -6
- package/dist/data/runtime/RuntimeBarActions.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarActions.d.ts +8 -1
- package/dist/data/runtime/RuntimeBarActions.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarActions.js +10 -6
- package/dist/data/runtime/RuntimeBarActions.js.map +1 -1
- package/dist/data/runtime/RuntimeBarIdentity.cjs +166 -0
- package/dist/data/runtime/RuntimeBarIdentity.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBarIdentity.d.ts +25 -0
- package/dist/data/runtime/RuntimeBarIdentity.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBarIdentity.js +166 -0
- package/dist/data/runtime/RuntimeBarIdentity.js.map +1 -0
- package/dist/data/runtime/RuntimeBarLayout.cjs +95 -0
- package/dist/data/runtime/RuntimeBarLayout.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBarLayout.d.ts +9 -0
- package/dist/data/runtime/RuntimeBarLayout.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBarLayout.js +95 -0
- package/dist/data/runtime/RuntimeBarLayout.js.map +1 -0
- package/dist/data/runtime/RuntimeBarSegment.cjs +25 -14
- package/dist/data/runtime/RuntimeBarSegment.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarSegment.d.ts +4 -0
- package/dist/data/runtime/RuntimeBarSegment.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarSegment.js +25 -14
- package/dist/data/runtime/RuntimeBarSegment.js.map +1 -1
- package/dist/data/runtime/RuntimeLimitInput.cjs +41 -0
- package/dist/data/runtime/RuntimeLimitInput.cjs.map +1 -0
- package/dist/data/runtime/RuntimeLimitInput.d.ts +9 -0
- package/dist/data/runtime/RuntimeLimitInput.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeLimitInput.js +41 -0
- package/dist/data/runtime/RuntimeLimitInput.js.map +1 -0
- package/dist/data/runtime/use-runtime-bar-overflow.cjs +70 -0
- package/dist/data/runtime/use-runtime-bar-overflow.cjs.map +1 -0
- package/dist/data/runtime/use-runtime-bar-overflow.d.ts +13 -0
- package/dist/data/runtime/use-runtime-bar-overflow.d.ts.map +1 -0
- package/dist/data/runtime/use-runtime-bar-overflow.js +70 -0
- package/dist/data/runtime/use-runtime-bar-overflow.js.map +1 -0
- package/dist/data/use-edge-focus.cjs +20 -0
- package/dist/data/use-edge-focus.cjs.map +1 -0
- package/dist/data/use-edge-focus.d.ts +23 -0
- package/dist/data/use-edge-focus.d.ts.map +1 -0
- package/dist/data/use-edge-focus.js +20 -0
- package/dist/data/use-edge-focus.js.map +1 -0
- package/dist/data/use-pan-zoom.cjs +159 -0
- package/dist/data/use-pan-zoom.cjs.map +1 -0
- package/dist/data/use-pan-zoom.d.ts +79 -0
- package/dist/data/use-pan-zoom.d.ts.map +1 -0
- package/dist/data/use-pan-zoom.js +159 -0
- package/dist/data/use-pan-zoom.js.map +1 -0
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +5 -1
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.ts +4 -3
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +6 -2
- package/dist/data.js.map +1 -1
- package/dist/devtools/useDebugStream.cjs +5 -1
- package/dist/devtools/useDebugStream.cjs.map +1 -1
- package/dist/devtools/useDebugStream.d.ts.map +1 -1
- package/dist/devtools/useDebugStream.js +6 -2
- package/dist/devtools/useDebugStream.js.map +1 -1
- package/dist/hooks/event-source-provider.cjs +9 -0
- package/dist/hooks/event-source-provider.cjs.map +1 -0
- package/dist/hooks/event-source-provider.d.ts +15 -0
- package/dist/hooks/event-source-provider.d.ts.map +1 -0
- package/dist/hooks/event-source-provider.js +9 -0
- package/dist/hooks/event-source-provider.js.map +1 -0
- package/dist/hooks/event-source.cjs +11 -0
- package/dist/hooks/event-source.cjs.map +1 -0
- package/dist/hooks/event-source.d.ts +22 -0
- package/dist/hooks/event-source.d.ts.map +1 -0
- package/dist/hooks/event-source.js +11 -0
- package/dist/hooks/event-source.js.map +1 -0
- package/dist/hooks/use-log-tail.cjs +5 -1
- package/dist/hooks/use-log-tail.cjs.map +1 -1
- package/dist/hooks/use-log-tail.d.ts.map +1 -1
- package/dist/hooks/use-log-tail.js +5 -1
- package/dist/hooks/use-log-tail.js.map +1 -1
- package/dist/hooks/use-prompts.cjs +5 -1
- package/dist/hooks/use-prompts.cjs.map +1 -1
- package/dist/hooks/use-prompts.d.ts.map +1 -1
- package/dist/hooks/use-prompts.js +6 -2
- package/dist/hooks/use-prompts.js.map +1 -1
- package/dist/hooks/use-task-run.cjs +9 -2
- package/dist/hooks/use-task-run.cjs.map +1 -1
- package/dist/hooks/use-task-run.d.ts.map +1 -1
- package/dist/hooks/use-task-run.js +10 -3
- package/dist/hooks/use-task-run.js.map +1 -1
- package/dist/hooks.cjs +4 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +4 -0
- package/dist/hooks.js.map +1 -1
- package/dist/icons/programmingCatalog.cjs +34 -34
- package/dist/icons/programmingCatalog.cjs.map +1 -1
- package/dist/icons/programmingCatalog.js +34 -34
- package/dist/icons/programmingCatalog.js.map +1 -1
- package/dist/index.cjs +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/monaco/MonacoEditor.cjs +4 -1
- package/dist/monaco/MonacoEditor.cjs.map +1 -1
- package/dist/monaco/MonacoEditor.d.ts +1 -1
- package/dist/monaco/MonacoEditor.d.ts.map +1 -1
- package/dist/monaco/MonacoEditor.js +4 -1
- package/dist/monaco/MonacoEditor.js.map +1 -1
- package/dist/monaco/types.d.ts +2 -1
- package/dist/monaco/types.d.ts.map +1 -1
- package/dist/overlay/CommandPalette.cjs +14 -4
- package/dist/overlay/CommandPalette.cjs.map +1 -1
- package/dist/overlay/CommandPalette.d.ts +5 -1
- package/dist/overlay/CommandPalette.d.ts.map +1 -1
- package/dist/overlay/CommandPalette.js +14 -4
- package/dist/overlay/CommandPalette.js.map +1 -1
- package/dist/overlay/CommandPaletteList.cjs +5 -0
- package/dist/overlay/CommandPaletteList.cjs.map +1 -1
- package/dist/overlay/CommandPaletteList.d.ts +4 -2
- package/dist/overlay/CommandPaletteList.d.ts.map +1 -1
- package/dist/overlay/CommandPaletteList.js +5 -0
- package/dist/overlay/CommandPaletteList.js.map +1 -1
- package/dist/overlay/DropdownMenu.cjs +2 -0
- package/dist/overlay/DropdownMenu.cjs.map +1 -1
- package/dist/overlay/DropdownMenu.d.ts +4 -0
- package/dist/overlay/DropdownMenu.d.ts.map +1 -1
- package/dist/overlay/DropdownMenu.js +2 -0
- package/dist/overlay/DropdownMenu.js.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.cjs +31 -15
- package/dist/overlay/DropdownMenuSubmenu.cjs.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.d.ts.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.js +31 -15
- package/dist/overlay/DropdownMenuSubmenu.js.map +1 -1
- package/dist/rpc/OperationCatalog.cjs +32 -27
- package/dist/rpc/OperationCatalog.cjs.map +1 -1
- package/dist/rpc/OperationCatalog.d.ts +11 -1
- package/dist/rpc/OperationCatalog.d.ts.map +1 -1
- package/dist/rpc/OperationCatalog.js +32 -27
- package/dist/rpc/OperationCatalog.js.map +1 -1
- package/dist/rpc/OperationEntityContextPicker.cjs +62 -256
- package/dist/rpc/OperationEntityContextPicker.cjs.map +1 -1
- package/dist/rpc/OperationEntityContextPicker.d.ts.map +1 -1
- package/dist/rpc/OperationEntityContextPicker.js +64 -258
- package/dist/rpc/OperationEntityContextPicker.js.map +1 -1
- package/dist/rpc/OperationEntityPicker.cjs +185 -0
- package/dist/rpc/OperationEntityPicker.cjs.map +1 -0
- package/dist/rpc/OperationEntityPicker.d.ts +51 -0
- package/dist/rpc/OperationEntityPicker.d.ts.map +1 -0
- package/dist/rpc/OperationEntityPicker.js +185 -0
- package/dist/rpc/OperationEntityPicker.js.map +1 -0
- package/dist/rpc/OperationEntityPicker.model.cjs +39 -0
- package/dist/rpc/OperationEntityPicker.model.cjs.map +1 -0
- package/dist/rpc/OperationEntityPicker.model.d.ts +27 -0
- package/dist/rpc/OperationEntityPicker.model.d.ts.map +1 -0
- package/dist/rpc/OperationEntityPicker.model.js +39 -0
- package/dist/rpc/OperationEntityPicker.model.js.map +1 -0
- package/dist/rpc/operationCatalogRowSelection.cjs +85 -0
- package/dist/rpc/operationCatalogRowSelection.cjs.map +1 -0
- package/dist/rpc/operationCatalogRowSelection.d.ts +57 -0
- package/dist/rpc/operationCatalogRowSelection.d.ts.map +1 -0
- package/dist/rpc/operationCatalogRowSelection.js +85 -0
- package/dist/rpc/operationCatalogRowSelection.js.map +1 -0
- package/dist/rpc/operationEntityPicker.fixtures.d.ts +13 -0
- package/dist/rpc/operationEntityPicker.fixtures.d.ts.map +1 -0
- package/dist/rpc/useOperationPages.cjs +6 -1
- package/dist/rpc/useOperationPages.cjs.map +1 -1
- package/dist/rpc/useOperationPages.d.ts +3 -1
- package/dist/rpc/useOperationPages.d.ts.map +1 -1
- package/dist/rpc/useOperationPages.js +6 -1
- package/dist/rpc/useOperationPages.js.map +1 -1
- package/dist/rpc.cjs +2 -0
- package/dist/rpc.cjs.map +1 -1
- package/dist/rpc.d.ts +2 -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/package.json +4 -1
- package/schemas/json-schema-form.schema.json +571 -0
- package/dist/data/runtime/RuntimeBarCombo.cjs +0 -423
- package/dist/data/runtime/RuntimeBarCombo.cjs.map +0 -1
- package/dist/data/runtime/RuntimeBarCombo.d.ts +0 -33
- package/dist/data/runtime/RuntimeBarCombo.d.ts.map +0 -1
- package/dist/data/runtime/RuntimeBarCombo.js +0 -423
- package/dist/data/runtime/RuntimeBarCombo.js.map +0 -1
- package/dist/data/runtime/RuntimeBarLimits.cjs +0 -262
- package/dist/data/runtime/RuntimeBarLimits.cjs.map +0 -1
- package/dist/data/runtime/RuntimeBarLimits.d.ts +0 -17
- package/dist/data/runtime/RuntimeBarLimits.d.ts.map +0 -1
- package/dist/data/runtime/RuntimeBarLimits.js +0 -262
- package/dist/data/runtime/RuntimeBarLimits.js.map +0 -1
- package/dist/data/runtime/RuntimeBarSegments.cjs +0 -346
- package/dist/data/runtime/RuntimeBarSegments.cjs.map +0 -1
- package/dist/data/runtime/RuntimeBarSegments.d.ts +0 -37
- package/dist/data/runtime/RuntimeBarSegments.d.ts.map +0 -1
- package/dist/data/runtime/RuntimeBarSegments.js +0 -346
- package/dist/data/runtime/RuntimeBarSegments.js.map +0 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const executionPages = require("./executionPages.cjs");
|
|
4
|
+
const rowNavigation = require("./rowNavigation.cjs");
|
|
5
|
+
function nextPickedRowIds(mode, previous, next) {
|
|
6
|
+
if (mode === "multi") return [...next];
|
|
7
|
+
assertSingleSelection(previous);
|
|
8
|
+
const added = next.filter((id) => !previous.includes(id));
|
|
9
|
+
if (added.length === 0) return [...next];
|
|
10
|
+
if (added.length === 1) return [added[0]];
|
|
11
|
+
throw new Error(
|
|
12
|
+
`OperationCatalog single-mode selection was offered ${added.length} new rows at once (${added.join(", ")}); only a row checkbox or row click may change it`
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
function assertSingleSelection(ids) {
|
|
16
|
+
if (ids.length > 1) {
|
|
17
|
+
throw new Error(
|
|
18
|
+
`OperationCatalog single-mode selection holds ${ids.length} ids (${ids.join(", ")}); pass at most one`
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function pickerTableRowSelection(selection, filters) {
|
|
23
|
+
const { mode, selectedRowIds, onSelectionChange, unavailableRows } = selection;
|
|
24
|
+
if (mode === "single") assertSingleSelection(selectedRowIds);
|
|
25
|
+
return {
|
|
26
|
+
selectedRowIds,
|
|
27
|
+
toggleOnRowClick: true,
|
|
28
|
+
selectAll: mode === "multi",
|
|
29
|
+
getRowId: (row, index) => rowNavigation.getClickyRowId(row) ?? `operation-catalog-row-${index}`,
|
|
30
|
+
isRowSelectable: (row) => rowNavigation.getClickyRowId(row) != null && !(unavailableRows == null ? void 0 : unavailableRows.isUnavailable(row)),
|
|
31
|
+
onSelectionChange: (nextIds, rows) => {
|
|
32
|
+
const ids = nextPickedRowIds(mode, selectedRowIds, nextIds);
|
|
33
|
+
const picked = rows.filter((row) => {
|
|
34
|
+
const id = rowNavigation.getClickyRowId(row);
|
|
35
|
+
return id != null && ids.includes(id);
|
|
36
|
+
});
|
|
37
|
+
onSelectionChange(ids, picked, { filters });
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const UNAVAILABLE_COLUMN = "__unavailable";
|
|
42
|
+
function markUnavailableRows(response, unavailable) {
|
|
43
|
+
const document = executionPages.documentOf(response);
|
|
44
|
+
if (!document) return response;
|
|
45
|
+
let marked = false;
|
|
46
|
+
const node = executionPages.mapFirstTable(document.node, (table) => {
|
|
47
|
+
const flags = (table.rows ?? []).map(unavailable.isUnavailable);
|
|
48
|
+
if (!flags.some(Boolean)) return table;
|
|
49
|
+
marked = true;
|
|
50
|
+
return {
|
|
51
|
+
...table,
|
|
52
|
+
columns: [
|
|
53
|
+
...table.columns ?? [],
|
|
54
|
+
{ name: UNAVAILABLE_COLUMN, label: unavailable.columnLabel, shrink: true }
|
|
55
|
+
],
|
|
56
|
+
rows: (table.rows ?? []).map((row, index) => ({
|
|
57
|
+
...row,
|
|
58
|
+
cells: {
|
|
59
|
+
...row.cells,
|
|
60
|
+
[UNAVAILABLE_COLUMN]: flags[index] ? { kind: "badge", badgeLabel: unavailable.label } : { kind: "text", text: "", plain: "" }
|
|
61
|
+
}
|
|
62
|
+
}))
|
|
63
|
+
};
|
|
64
|
+
}).node;
|
|
65
|
+
if (!marked) return response;
|
|
66
|
+
const parsed = { ...document, node };
|
|
67
|
+
return { ...response, parsed, stdout: JSON.stringify(parsed) };
|
|
68
|
+
}
|
|
69
|
+
function operationLookupQuery(client, endpoint, lookupParameters) {
|
|
70
|
+
return {
|
|
71
|
+
queryKey: ["operation-lookup", endpoint == null ? void 0 : endpoint.method, endpoint == null ? void 0 : endpoint.path, lookupParameters],
|
|
72
|
+
queryFn: async () => {
|
|
73
|
+
var _a;
|
|
74
|
+
if (!endpoint) throw new Error("operation lookup ran without a list operation");
|
|
75
|
+
return await ((_a = client.lookupFilters) == null ? void 0 : _a.call(client, endpoint.path, endpoint.method, lookupParameters, {
|
|
76
|
+
Accept: "application/json+clicky"
|
|
77
|
+
})) ?? { filters: {} };
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
exports.markUnavailableRows = markUnavailableRows;
|
|
82
|
+
exports.nextPickedRowIds = nextPickedRowIds;
|
|
83
|
+
exports.operationLookupQuery = operationLookupQuery;
|
|
84
|
+
exports.pickerTableRowSelection = pickerTableRowSelection;
|
|
85
|
+
//# sourceMappingURL=operationCatalogRowSelection.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationCatalogRowSelection.cjs","sources":["../../src/rpc/operationCatalogRowSelection.ts"],"sourcesContent":["import type { ClickyNode, ClickyRow, ClickyTableRowSelection } from \"../data/Clicky\";\nimport { documentOf, mapFirstTable } from \"./executionPages\";\nimport type { ParameterValues } from \"./formMetadata\";\nimport { getClickyRowId } from \"./rowNavigation\";\nimport type {\n ExecutionResponse,\n OperationLookupResponse,\n OperationRequestValues,\n ResolvedOperation,\n} from \"./types\";\nimport type { OperationsApiClient } from \"./useOperations\";\n\nexport type OperationCatalogRowSelectionMode = \"single\" | \"multi\";\n\nexport type OperationCatalogRowSelectionContext = {\n /**\n * The catalog's effective list filters (locked values included) when the\n * selection changed — what a host needs to fetch the picked rows' details\n * under the same scope the list was read in.\n */\n filters: ParameterValues;\n};\n\n/** Rows that are listed but cannot be picked, badged in a trailing column. */\nexport type OperationCatalogUnavailableRows = {\n isUnavailable: (row: ClickyRow) => boolean;\n /** Badge text on an unavailable row, e.g. \"Attached\". */\n label: string;\n /** Header of the badge column. */\n columnLabel: string;\n};\n\nexport type OperationCatalogRowSelection = {\n /** `single` keeps at most one row checked: checking a row replaces the last. */\n mode: OperationCatalogRowSelectionMode;\n /** Controlled ids, read through `getClickyRowId`. */\n selectedRowIds: string[];\n /**\n * Called with the next ids and the rows among them that are loaded on the\n * current page — a row checked on an earlier page is not in `rows`.\n */\n onSelectionChange: (\n ids: string[],\n rows: ClickyRow[],\n context: OperationCatalogRowSelectionContext,\n ) => void;\n unavailableRows?: OperationCatalogUnavailableRows;\n};\n\n/**\n * nextPickedRowIds applies the selection mode to the id set the table\n * proposes. Single mode keeps the one row just checked. The table offers no\n * header or group checkbox in single mode (`selectAll: false`), so a proposal\n * adding several rows at once is a broken invariant and throws.\n */\nexport function nextPickedRowIds(\n mode: OperationCatalogRowSelectionMode,\n previous: readonly string[],\n next: readonly string[],\n): string[] {\n if (mode === \"multi\") return [...next];\n assertSingleSelection(previous);\n const added = next.filter((id) => !previous.includes(id));\n if (added.length === 0) return [...next];\n if (added.length === 1) return [added[0]!];\n throw new Error(\n `OperationCatalog single-mode selection was offered ${added.length} new rows at once (${added.join(\", \")}); only a row checkbox or row click may change it`,\n );\n}\n\nfunction assertSingleSelection(ids: readonly string[]) {\n if (ids.length > 1) {\n throw new Error(\n `OperationCatalog single-mode selection holds ${ids.length} ids (${ids.join(\", \")}); pass at most one`,\n );\n }\n}\n\n/** Adapts a host's picker selection to the result table's row selection. */\nexport function pickerTableRowSelection(\n selection: OperationCatalogRowSelection,\n filters: ParameterValues,\n): ClickyTableRowSelection {\n const { mode, selectedRowIds, onSelectionChange, unavailableRows } = selection;\n if (mode === \"single\") assertSingleSelection(selectedRowIds);\n return {\n selectedRowIds,\n toggleOnRowClick: true,\n selectAll: mode === \"multi\",\n getRowId: (row, index) => getClickyRowId(row) ?? `operation-catalog-row-${index}`,\n isRowSelectable: (row) =>\n getClickyRowId(row) != null && !unavailableRows?.isUnavailable(row),\n onSelectionChange: (nextIds, rows) => {\n const ids = nextPickedRowIds(mode, selectedRowIds, nextIds);\n const picked = rows.filter((row) => {\n const id = getClickyRowId(row);\n return id != null && ids.includes(id);\n });\n onSelectionChange(ids, picked, { filters });\n },\n };\n}\n\nconst UNAVAILABLE_COLUMN = \"__unavailable\";\n\n/**\n * markUnavailableRows appends a badge column naming why a row cannot be\n * picked. A response with no unavailable row is returned by identity.\n */\nexport function markUnavailableRows(\n response: ExecutionResponse,\n unavailable: OperationCatalogUnavailableRows,\n): ExecutionResponse {\n const document = documentOf(response);\n if (!document) return response;\n let marked = false;\n const node = mapFirstTable(document.node, (table): ClickyNode => {\n const flags = (table.rows ?? []).map(unavailable.isUnavailable);\n if (!flags.some(Boolean)) return table;\n marked = true;\n return {\n ...table,\n columns: [\n ...(table.columns ?? []),\n { name: UNAVAILABLE_COLUMN, label: unavailable.columnLabel, shrink: true },\n ],\n rows: (table.rows ?? []).map((row, index) => ({\n ...row,\n cells: {\n ...row.cells,\n [UNAVAILABLE_COLUMN]: flags[index]\n ? { kind: \"badge\", badgeLabel: unavailable.label }\n : { kind: \"text\", text: \"\", plain: \"\" },\n },\n })),\n };\n }).node;\n if (!marked) return response;\n const parsed = { ...document, node };\n return { ...response, parsed, stdout: JSON.stringify(parsed) };\n}\n\n/**\n * The react-query key and fetcher of a list surface's filter lookup. Shared so\n * a host reading the same lookup (the picker's scope line) observes the entry\n * the catalog fetches instead of issuing its own request.\n */\nexport function operationLookupQuery(\n client: OperationsApiClient,\n endpoint: ResolvedOperation | undefined,\n lookupParameters: OperationRequestValues,\n) {\n return {\n queryKey: [\"operation-lookup\", endpoint?.method, endpoint?.path, lookupParameters] as const,\n queryFn: async (): Promise<OperationLookupResponse> => {\n if (!endpoint) throw new Error(\"operation lookup ran without a list operation\");\n return (\n (await client.lookupFilters?.(endpoint.path, endpoint.method, lookupParameters, {\n Accept: \"application/json+clicky\",\n })) ?? { filters: {} }\n );\n },\n };\n}\n"],"names":["getClickyRowId","documentOf","mapFirstTable"],"mappings":";;;;AAuDO,SAAS,iBACd,MACA,UACA,MACU;AACV,MAAI,SAAS,QAAS,QAAO,CAAC,GAAG,IAAI;AACrC,wBAAsB,QAAQ;AAC9B,QAAM,QAAQ,KAAK,OAAO,CAAC,OAAO,CAAC,SAAS,SAAS,EAAE,CAAC;AACxD,MAAI,MAAM,WAAW,EAAG,QAAO,CAAC,GAAG,IAAI;AACvC,MAAI,MAAM,WAAW,UAAU,CAAC,MAAM,CAAC,CAAE;AACzC,QAAM,IAAI;AAAA,IACR,sDAAsD,MAAM,MAAM,sBAAsB,MAAM,KAAK,IAAI,CAAC;AAAA,EAAA;AAE5G;AAEA,SAAS,sBAAsB,KAAwB;AACrD,MAAI,IAAI,SAAS,GAAG;AAClB,UAAM,IAAI;AAAA,MACR,gDAAgD,IAAI,MAAM,SAAS,IAAI,KAA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AAK,WAAW;AAAA,QAC5C,GAAG;AAAA,QACH,OAAO;AAAA,UACL,GAAG,IAAI;AAAA,UACP,CAAC,kBAAkB,GAAG,MAAM,KAAK,IAC7B,EAAE,MAAM,SAAS,YAAY,YAAY,MAAA,IACzC,EAAE,MAAM,QAAQ,MAAM,IAAI,OAAO,GAAA;AAAA,QAAG;AAAA,MAC1C,EACA;AAAA,IAAA;AAAA,EAEN,CAAC,EAAE;AACH,MAAI,CAAC,OAAQ,QAAO;AACpB,QAAM,SAAS,EAAE,GAAG,UAAU,KAAA;AAC9B,SAAO,EAAE,GAAG,UAAU,QAAQ,QAAQ,KAAK,UAAU,MAAM,EAAA;AAC7D;AAOO,SAAS,qBACd,QACA,UACA,kBACA;AACA,SAAO;AAAA,IACL,UAAU,CAAC,oBAAoB,qCAAU,QAAQ,qCAAU,MAAM,gBAAgB;AAAA,IACjF,SAAS,YAA8C;;AACrD,UAAI,CAAC,SAAU,OAAM,IAAI,MAAM,+CAA+C;AAC9E,aACG,QAAM,YAAO,kBAAP,gCAAuB,SAAS,MAAM,SAAS,QAAQ,kBAAkB;AAAA,QAC9E,QAAQ;AAAA,MAAA,OACH,EAAE,SAAS,GAAC;AAAA,IAEvB;AAAA,EAAA;AAEJ;;;;;"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ClickyRow, ClickyTableRowSelection } from '../data/Clicky.js';
|
|
2
|
+
import { ParameterValues } from './formMetadata.js';
|
|
3
|
+
import { ExecutionResponse, OperationLookupResponse, OperationRequestValues, ResolvedOperation } from './types.js';
|
|
4
|
+
import { OperationsApiClient } from './useOperations.js';
|
|
5
|
+
export type OperationCatalogRowSelectionMode = "single" | "multi";
|
|
6
|
+
export type OperationCatalogRowSelectionContext = {
|
|
7
|
+
/**
|
|
8
|
+
* The catalog's effective list filters (locked values included) when the
|
|
9
|
+
* selection changed — what a host needs to fetch the picked rows' details
|
|
10
|
+
* under the same scope the list was read in.
|
|
11
|
+
*/
|
|
12
|
+
filters: ParameterValues;
|
|
13
|
+
};
|
|
14
|
+
/** Rows that are listed but cannot be picked, badged in a trailing column. */
|
|
15
|
+
export type OperationCatalogUnavailableRows = {
|
|
16
|
+
isUnavailable: (row: ClickyRow) => boolean;
|
|
17
|
+
/** Badge text on an unavailable row, e.g. "Attached". */
|
|
18
|
+
label: string;
|
|
19
|
+
/** Header of the badge column. */
|
|
20
|
+
columnLabel: string;
|
|
21
|
+
};
|
|
22
|
+
export type OperationCatalogRowSelection = {
|
|
23
|
+
/** `single` keeps at most one row checked: checking a row replaces the last. */
|
|
24
|
+
mode: OperationCatalogRowSelectionMode;
|
|
25
|
+
/** Controlled ids, read through `getClickyRowId`. */
|
|
26
|
+
selectedRowIds: string[];
|
|
27
|
+
/**
|
|
28
|
+
* Called with the next ids and the rows among them that are loaded on the
|
|
29
|
+
* current page — a row checked on an earlier page is not in `rows`.
|
|
30
|
+
*/
|
|
31
|
+
onSelectionChange: (ids: string[], rows: ClickyRow[], context: OperationCatalogRowSelectionContext) => void;
|
|
32
|
+
unavailableRows?: OperationCatalogUnavailableRows;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* nextPickedRowIds applies the selection mode to the id set the table
|
|
36
|
+
* proposes. Single mode keeps the one row just checked. The table offers no
|
|
37
|
+
* header or group checkbox in single mode (`selectAll: false`), so a proposal
|
|
38
|
+
* adding several rows at once is a broken invariant and throws.
|
|
39
|
+
*/
|
|
40
|
+
export declare function nextPickedRowIds(mode: OperationCatalogRowSelectionMode, previous: readonly string[], next: readonly string[]): string[];
|
|
41
|
+
/** Adapts a host's picker selection to the result table's row selection. */
|
|
42
|
+
export declare function pickerTableRowSelection(selection: OperationCatalogRowSelection, filters: ParameterValues): ClickyTableRowSelection;
|
|
43
|
+
/**
|
|
44
|
+
* markUnavailableRows appends a badge column naming why a row cannot be
|
|
45
|
+
* picked. A response with no unavailable row is returned by identity.
|
|
46
|
+
*/
|
|
47
|
+
export declare function markUnavailableRows(response: ExecutionResponse, unavailable: OperationCatalogUnavailableRows): ExecutionResponse;
|
|
48
|
+
/**
|
|
49
|
+
* The react-query key and fetcher of a list surface's filter lookup. Shared so
|
|
50
|
+
* a host reading the same lookup (the picker's scope line) observes the entry
|
|
51
|
+
* the catalog fetches instead of issuing its own request.
|
|
52
|
+
*/
|
|
53
|
+
export declare function operationLookupQuery(client: OperationsApiClient, endpoint: ResolvedOperation | undefined, lookupParameters: OperationRequestValues): {
|
|
54
|
+
queryKey: readonly ["operation-lookup", string | undefined, string | undefined, OperationRequestValues];
|
|
55
|
+
queryFn: () => Promise<OperationLookupResponse>;
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=operationCatalogRowSelection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationCatalogRowSelection.d.ts","sourceRoot":"","sources":["../../src/rpc/operationCatalogRowSelection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,SAAS,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAErF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,MAAM,MAAM,gCAAgC,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,MAAM,MAAM,mCAAmC,GAAG;IAChD;;;;OAIG;IACH,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,+BAA+B,GAAG;IAC5C,aAAa,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,CAAC;IAC3C,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,gFAAgF;IAChF,IAAI,EAAE,gCAAgC,CAAC;IACvC,qDAAqD;IACrD,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;OAGG;IACH,iBAAiB,EAAE,CACjB,GAAG,EAAE,MAAM,EAAE,EACb,IAAI,EAAE,SAAS,EAAE,EACjB,OAAO,EAAE,mCAAmC,KACzC,IAAI,CAAC;IACV,eAAe,CAAC,EAAE,+BAA+B,CAAC;CACnD,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,gCAAgC,EACtC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,MAAM,EAAE,CASV;AAUD,4EAA4E;AAC5E,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,4BAA4B,EACvC,OAAO,EAAE,eAAe,GACvB,uBAAuB,CAmBzB;AAID;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,iBAAiB,EAC3B,WAAW,EAAE,+BAA+B,GAC3C,iBAAiB,CA4BnB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,EAAE,iBAAiB,GAAG,SAAS,EACvC,gBAAgB,EAAE,sBAAsB;;mBAInB,OAAO,CAAC,uBAAuB,CAAC;EAStD"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { documentOf, mapFirstTable } from "./executionPages.js";
|
|
2
|
+
import { getClickyRowId } from "./rowNavigation.js";
|
|
3
|
+
function nextPickedRowIds(mode, previous, next) {
|
|
4
|
+
if (mode === "multi") return [...next];
|
|
5
|
+
assertSingleSelection(previous);
|
|
6
|
+
const added = next.filter((id) => !previous.includes(id));
|
|
7
|
+
if (added.length === 0) return [...next];
|
|
8
|
+
if (added.length === 1) return [added[0]];
|
|
9
|
+
throw new Error(
|
|
10
|
+
`OperationCatalog single-mode selection was offered ${added.length} new rows at once (${added.join(", ")}); only a row checkbox or row click may change it`
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
function assertSingleSelection(ids) {
|
|
14
|
+
if (ids.length > 1) {
|
|
15
|
+
throw new Error(
|
|
16
|
+
`OperationCatalog single-mode selection holds ${ids.length} ids (${ids.join(", ")}); pass at most one`
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function pickerTableRowSelection(selection, filters) {
|
|
21
|
+
const { mode, selectedRowIds, onSelectionChange, unavailableRows } = selection;
|
|
22
|
+
if (mode === "single") assertSingleSelection(selectedRowIds);
|
|
23
|
+
return {
|
|
24
|
+
selectedRowIds,
|
|
25
|
+
toggleOnRowClick: true,
|
|
26
|
+
selectAll: mode === "multi",
|
|
27
|
+
getRowId: (row, index) => getClickyRowId(row) ?? `operation-catalog-row-${index}`,
|
|
28
|
+
isRowSelectable: (row) => getClickyRowId(row) != null && !(unavailableRows == null ? void 0 : unavailableRows.isUnavailable(row)),
|
|
29
|
+
onSelectionChange: (nextIds, rows) => {
|
|
30
|
+
const ids = nextPickedRowIds(mode, selectedRowIds, nextIds);
|
|
31
|
+
const picked = rows.filter((row) => {
|
|
32
|
+
const id = getClickyRowId(row);
|
|
33
|
+
return id != null && ids.includes(id);
|
|
34
|
+
});
|
|
35
|
+
onSelectionChange(ids, picked, { filters });
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
const UNAVAILABLE_COLUMN = "__unavailable";
|
|
40
|
+
function markUnavailableRows(response, unavailable) {
|
|
41
|
+
const document = documentOf(response);
|
|
42
|
+
if (!document) return response;
|
|
43
|
+
let marked = false;
|
|
44
|
+
const node = mapFirstTable(document.node, (table) => {
|
|
45
|
+
const flags = (table.rows ?? []).map(unavailable.isUnavailable);
|
|
46
|
+
if (!flags.some(Boolean)) return table;
|
|
47
|
+
marked = true;
|
|
48
|
+
return {
|
|
49
|
+
...table,
|
|
50
|
+
columns: [
|
|
51
|
+
...table.columns ?? [],
|
|
52
|
+
{ name: UNAVAILABLE_COLUMN, label: unavailable.columnLabel, shrink: true }
|
|
53
|
+
],
|
|
54
|
+
rows: (table.rows ?? []).map((row, index) => ({
|
|
55
|
+
...row,
|
|
56
|
+
cells: {
|
|
57
|
+
...row.cells,
|
|
58
|
+
[UNAVAILABLE_COLUMN]: flags[index] ? { kind: "badge", badgeLabel: unavailable.label } : { kind: "text", text: "", plain: "" }
|
|
59
|
+
}
|
|
60
|
+
}))
|
|
61
|
+
};
|
|
62
|
+
}).node;
|
|
63
|
+
if (!marked) return response;
|
|
64
|
+
const parsed = { ...document, node };
|
|
65
|
+
return { ...response, parsed, stdout: JSON.stringify(parsed) };
|
|
66
|
+
}
|
|
67
|
+
function operationLookupQuery(client, endpoint, lookupParameters) {
|
|
68
|
+
return {
|
|
69
|
+
queryKey: ["operation-lookup", endpoint == null ? void 0 : endpoint.method, endpoint == null ? void 0 : endpoint.path, lookupParameters],
|
|
70
|
+
queryFn: async () => {
|
|
71
|
+
var _a;
|
|
72
|
+
if (!endpoint) throw new Error("operation lookup ran without a list operation");
|
|
73
|
+
return await ((_a = client.lookupFilters) == null ? void 0 : _a.call(client, endpoint.path, endpoint.method, lookupParameters, {
|
|
74
|
+
Accept: "application/json+clicky"
|
|
75
|
+
})) ?? { filters: {} };
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
markUnavailableRows,
|
|
81
|
+
nextPickedRowIds,
|
|
82
|
+
operationLookupQuery,
|
|
83
|
+
pickerTableRowSelection
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=operationCatalogRowSelection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationCatalogRowSelection.js","sources":["../../src/rpc/operationCatalogRowSelection.ts"],"sourcesContent":["import type { ClickyNode, ClickyRow, ClickyTableRowSelection } from \"../data/Clicky\";\nimport { documentOf, mapFirstTable } from \"./executionPages\";\nimport type { ParameterValues } from \"./formMetadata\";\nimport { getClickyRowId } from \"./rowNavigation\";\nimport type {\n ExecutionResponse,\n OperationLookupResponse,\n OperationRequestValues,\n ResolvedOperation,\n} from \"./types\";\nimport type { OperationsApiClient } from \"./useOperations\";\n\nexport type OperationCatalogRowSelectionMode = \"single\" | \"multi\";\n\nexport type OperationCatalogRowSelectionContext = {\n /**\n * The catalog's effective list filters (locked values included) when the\n * selection changed — what a host needs to fetch the picked rows' details\n * under the same scope the list was read in.\n */\n filters: ParameterValues;\n};\n\n/** Rows that are listed but cannot be picked, badged in a trailing column. */\nexport type OperationCatalogUnavailableRows = {\n isUnavailable: (row: ClickyRow) => boolean;\n /** Badge text on an unavailable row, e.g. \"Attached\". */\n label: string;\n /** Header of the badge column. */\n columnLabel: string;\n};\n\nexport type OperationCatalogRowSelection = {\n /** `single` keeps at most one row checked: checking a row replaces the last. */\n mode: OperationCatalogRowSelectionMode;\n /** Controlled ids, read through `getClickyRowId`. */\n selectedRowIds: string[];\n /**\n * Called with the next ids and the rows among them that are loaded on the\n * current page — a row checked on an earlier page is not in `rows`.\n */\n onSelectionChange: (\n ids: string[],\n rows: ClickyRow[],\n context: OperationCatalogRowSelectionContext,\n ) => void;\n unavailableRows?: OperationCatalogUnavailableRows;\n};\n\n/**\n * nextPickedRowIds applies the selection mode to the id set the table\n * proposes. Single mode keeps the one row just checked. The table offers no\n * header or group checkbox in single mode (`selectAll: false`), so a proposal\n * adding several rows at once is a broken invariant and throws.\n */\nexport function nextPickedRowIds(\n mode: OperationCatalogRowSelectionMode,\n previous: readonly string[],\n next: readonly string[],\n): string[] {\n if (mode === \"multi\") return [...next];\n assertSingleSelection(previous);\n const added = next.filter((id) => !previous.includes(id));\n if (added.length === 0) return [...next];\n if (added.length === 1) return [added[0]!];\n throw new Error(\n `OperationCatalog single-mode selection was offered ${added.length} new rows at once (${added.join(\", \")}); only a row checkbox or row click may change it`,\n );\n}\n\nfunction assertSingleSelection(ids: readonly string[]) {\n if (ids.length > 1) {\n throw new Error(\n `OperationCatalog single-mode selection holds ${ids.length} ids (${ids.join(\", \")}); pass at most one`,\n );\n }\n}\n\n/** Adapts a host's picker selection to the result table's row selection. */\nexport function pickerTableRowSelection(\n selection: OperationCatalogRowSelection,\n filters: ParameterValues,\n): ClickyTableRowSelection {\n const { mode, selectedRowIds, onSelectionChange, unavailableRows } = selection;\n if (mode === \"single\") assertSingleSelection(selectedRowIds);\n return {\n selectedRowIds,\n toggleOnRowClick: true,\n selectAll: mode === \"multi\",\n getRowId: (row, index) => getClickyRowId(row) ?? `operation-catalog-row-${index}`,\n isRowSelectable: (row) =>\n getClickyRowId(row) != null && !unavailableRows?.isUnavailable(row),\n onSelectionChange: (nextIds, rows) => {\n const ids = nextPickedRowIds(mode, selectedRowIds, nextIds);\n const picked = rows.filter((row) => {\n const id = getClickyRowId(row);\n return id != null && ids.includes(id);\n });\n onSelectionChange(ids, picked, { filters });\n },\n };\n}\n\nconst UNAVAILABLE_COLUMN = \"__unavailable\";\n\n/**\n * markUnavailableRows appends a badge column naming why a row cannot be\n * picked. A response with no unavailable row is returned by identity.\n */\nexport function markUnavailableRows(\n response: ExecutionResponse,\n unavailable: OperationCatalogUnavailableRows,\n): ExecutionResponse {\n const document = documentOf(response);\n if (!document) return response;\n let marked = false;\n const node = mapFirstTable(document.node, (table): ClickyNode => {\n const flags = (table.rows ?? []).map(unavailable.isUnavailable);\n if (!flags.some(Boolean)) return table;\n marked = true;\n return {\n ...table,\n columns: [\n ...(table.columns ?? []),\n { name: UNAVAILABLE_COLUMN, label: unavailable.columnLabel, shrink: true },\n ],\n rows: (table.rows ?? []).map((row, index) => ({\n ...row,\n cells: {\n ...row.cells,\n [UNAVAILABLE_COLUMN]: flags[index]\n ? { kind: \"badge\", badgeLabel: unavailable.label }\n : { kind: \"text\", text: \"\", plain: \"\" },\n },\n })),\n };\n }).node;\n if (!marked) return response;\n const parsed = { ...document, node };\n return { ...response, parsed, stdout: JSON.stringify(parsed) };\n}\n\n/**\n * The react-query key and fetcher of a list surface's filter lookup. Shared so\n * a host reading the same lookup (the picker's scope line) observes the entry\n * the catalog fetches instead of issuing its own request.\n */\nexport function operationLookupQuery(\n client: OperationsApiClient,\n endpoint: ResolvedOperation | undefined,\n lookupParameters: OperationRequestValues,\n) {\n return {\n queryKey: [\"operation-lookup\", endpoint?.method, endpoint?.path, lookupParameters] as const,\n queryFn: async (): Promise<OperationLookupResponse> => {\n if (!endpoint) throw new Error(\"operation lookup ran without a list operation\");\n return (\n (await client.lookupFilters?.(endpoint.path, endpoint.method, lookupParameters, {\n Accept: \"application/json+clicky\",\n })) ?? { filters: {} }\n );\n },\n };\n}\n"],"names":[],"mappings":";;AAuDO,SAAS,iBACd,MACA,UACA,MACU;AACV,MAAI,SAAS,QAAS,QAAO,CAAC,GAAG,IAAI;AACrC,wBAAsB,QAAQ;AAC9B,QAAM,QAAQ,KAAK,OAAO,CAAC,OAAO,CAAC,SAAS,SAAS,EAAE,CAAC;AACxD,MAAI,MAAM,WAAW,EAAG,QAAO,CAAC,GAAG,IAAI;AACvC,MAAI,MAAM,WAAW,UAAU,CAAC,MAAM,CAAC,CAAE;AACzC,QAAM,IAAI;AAAA,IACR,sDAAsD,MAAM,MAAM,sBAAsB,MAAM,KAAK,IAAI,CAAC;AAAA,EAAA;AAE5G;AAEA,SAAS,sBAAsB,KAAwB;AACrD,MAAI,IAAI,SAAS,GAAG;AAClB,UAAM,IAAI;AAAA,MACR,gDAAgD,IAAI,MAAM,SAAS,IAAI,KAAK,IAAI,CAAC;AAAA,IAAA;AAAA,EAErF;AACF;AAGO,SAAS,wBACd,WACA,SACyB;AACzB,QAAM,EAAE,MAAM,gBAAgB,mBAAmB,oBAAoB;AACrE,MAAI,SAAS,SAAU,uBAAsB,cAAc;AAC3D,SAAO;AAAA,IACL;AAAA,IACA,kBAAkB;AAAA,IAClB,WAAW,SAAS;AAAA,IACpB,UAAU,CAAC,KAAK,UAAU,eAAe,GAAG,KAAK,yBAAyB,KAAK;AAAA,IAC/E,iBAAiB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AAE,GAAG,UAAU,QAAQ,QAAQ,KAAK,UAAU,MAAM,EAAA;AAC7D;AAOO,SAAS,qBACd,QACA,UACA,kBACA;AACA,SAAO;AAAA,IACL,UAAU,CAAC,oBAAoB,qCAAU,QAAQ,qCAAU,MAAM,gBAAgB;AAAA,IACjF,SAAS,YAA8C;;AACrD,UAAI,CAAC,SAAU,OAAM,IAAI,MAAM,+CAA+C;AAC9E,aACG,QAAM,YAAO,kBAAP,gCAAuB,SAAS,MAAM,SAAS,QAAQ,kBAAkB;AAAA,QAC9E,QAAQ;AAAA,MAAA,OACH,EAAE,SAAS,GAAC;AAAA,IAEvB;AAAA,EAAA;AAEJ;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ClickyRow } from '../data/Clicky.js';
|
|
2
|
+
import { ExecutionResponse, OpenAPISpec, OperationLookupResponse } from './types.js';
|
|
3
|
+
import { OperationsApiClient } from './useOperations.js';
|
|
4
|
+
export declare const SCHEMES_PATH = "/api/v1/schemes";
|
|
5
|
+
export declare function schemeRow(id: string, company: string, status: string): ClickyRow;
|
|
6
|
+
export declare const SCHEME_ROWS: ClickyRow[];
|
|
7
|
+
export declare function schemesSpec(): OpenAPISpec;
|
|
8
|
+
export declare function schemesResponse(rows?: ClickyRow[]): ExecutionResponse;
|
|
9
|
+
export declare const SCHEMES_LOOKUP: OperationLookupResponse;
|
|
10
|
+
export declare const executeSchemes: () => Promise<ExecutionResponse>;
|
|
11
|
+
export declare const lookupSchemes: () => Promise<OperationLookupResponse>;
|
|
12
|
+
export declare function schemesClient(overrides?: Partial<OperationsApiClient>): OperationsApiClient;
|
|
13
|
+
//# sourceMappingURL=operationEntityPicker.fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationEntityPicker.fixtures.d.ts","sourceRoot":"","sources":["../../src/rpc/operationEntityPicker.fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EACV,iBAAiB,EACjB,WAAW,EACX,uBAAuB,EACxB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAS3D,eAAO,MAAM,YAAY,oBAAoB,CAAC;AAE9C,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAShF;AAED,eAAO,MAAM,WAAW,EAAE,SAAS,EAGlC,CAAC;AAEF,wBAAgB,WAAW,IAAI,WAAW,CA+CzC;AAED,wBAAgB,eAAe,CAAC,IAAI,GAAE,SAAS,EAAgB,GAAG,iBAAiB,CAkBlF;AAED,eAAO,MAAM,cAAc,EAAE,uBAW5B,CAAC;AAEF,eAAO,MAAM,cAAc,QAAa,OAAO,CAAC,iBAAiB,CAAsB,CAAC;AACxF,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,uBAAuB,CAAmB,CAAC;AAE1F,wBAAgB,aAAa,CAAC,SAAS,GAAE,OAAO,CAAC,mBAAmB,CAAM,GAAG,mBAAmB,CAO/F"}
|
|
@@ -11,7 +11,8 @@ function useOperationPages({
|
|
|
11
11
|
endpoint,
|
|
12
12
|
parameters,
|
|
13
13
|
filters,
|
|
14
|
-
paginationMode
|
|
14
|
+
paginationMode,
|
|
15
|
+
refreshIntervalMs
|
|
15
16
|
}) {
|
|
16
17
|
var _a;
|
|
17
18
|
const queryClient = reactQuery.useQueryClient();
|
|
@@ -24,6 +25,9 @@ function useOperationPages({
|
|
|
24
25
|
);
|
|
25
26
|
}
|
|
26
27
|
const walkMode = paginationMode === "infinite" || paginationMode === void 0 && !!cursorParam;
|
|
28
|
+
if (refreshIntervalMs !== void 0 && (!Number.isFinite(refreshIntervalMs) || refreshIntervalMs <= 0 || walkMode)) {
|
|
29
|
+
throw new Error("Operation page refresh requires a positive interval and paged mode");
|
|
30
|
+
}
|
|
27
31
|
const walkFilters = react.useMemo(() => {
|
|
28
32
|
if (!cursorParam) return filters;
|
|
29
33
|
const rest = { ...filters };
|
|
@@ -45,6 +49,7 @@ function useOperationPages({
|
|
|
45
49
|
enabled: !!endpoint && !walkMode,
|
|
46
50
|
placeholderData: reactQuery.keepPreviousData,
|
|
47
51
|
staleTime: 3e4,
|
|
52
|
+
...refreshIntervalMs !== void 0 ? { refetchInterval: refreshIntervalMs } : {},
|
|
48
53
|
retry: 0
|
|
49
54
|
});
|
|
50
55
|
const walkKey = react.useMemo(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOperationPages.cjs","sources":["../../src/rpc/useOperationPages.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo } from \"react\";\nimport {\n keepPreviousData,\n useInfiniteQuery,\n useQuery,\n useQueryClient,\n type InfiniteData,\n type QueryKey,\n} from \"@tanstack/react-query\";\n\nimport type { DataTableInfinite } from \"../data/DataTable\";\nimport { cursorParameterName, isCursorStale } from \"./cursorStale\";\nimport { packParameterValues, type ParameterValues } from \"./formMetadata\";\nimport type {\n ExecutionResponse,\n OpenAPIParameter,\n ResolvedOperation,\n} from \"./types\";\nimport type { OperationsApiClient } from \"./useOperations\";\n\nconst LIST_KEY = \"operation-list\";\nconst CLICKY_HEADERS = { Accept: \"application/json+clicky\" };\n\nexport type OperationPagesOptions = {\n client: OperationsApiClient;\n /** The list operation, or undefined for a surface that has none. */\n endpoint: ResolvedOperation | undefined;\n /** Every parameter the operation declares — the source of the cursor role. */\n parameters: OpenAPIParameter[];\n /** Current filter/pagination state, as the catalog holds and URL-mirrors it. */\n filters: ParameterValues;\n /** Omit to infer a cursor walk from the operation; hosts may force either presentation. */\n paginationMode?: \"paged\" | \"infinite\";\n};\n\nexport type OperationPages = {\n /** Every page fetched so far, oldest first. One entry outside a walk. */\n pages: ExecutionResponse[];\n /** The newest page — what every renderer means by \"the response\". */\n response: ExecutionResponse | null;\n /** True while the whole result is being replaced, not while it is growing. */\n isFetching: boolean;\n isPending: boolean;\n isError: boolean;\n error: unknown;\n /** Re-runs the list. A walk restarts rather than replaying its cursors. */\n refetch: () => void;\n /** Load-more handle; absent unless the operation can walk by cursor. */\n infinite?: DataTableInfinite;\n};\n\n/**\n * useOperationPages runs a surface's list operation, walking it forward when it\n * declares a cursor and fetching a single page when it does not. A host can\n * explicitly keep a cursor-capable operation paged when readers need offset\n * controls; omission retains automatic selection.\n *\n * Automatic mode follows the operation: a cursor role is the server saying\n * \"you may resume this query\", and everything else keeps the single-page query\n * it has always had. An explicit host override changes only the presentation;\n * the operation still owns the available cursor and offset capabilities.\n *\n * In walk mode the cursor is deliberately absent from the query key. The key is\n * the identity of the query being walked, and the cursor is a position inside\n * it; keying on it made every page a different query, which is precisely why\n * advancing replaced the rows instead of extending them. Every other filter\n * stays in the key, so any filter, parameter or time-range change starts a new\n * walk on its own, with no reset logic layered on top.\n */\nexport function useOperationPages({\n client,\n endpoint,\n parameters,\n filters,\n paginationMode,\n}: OperationPagesOptions): OperationPages {\n const queryClient = useQueryClient();\n const cursorParam = cursorParameterName(parameters);\n const path = endpoint?.path;\n const method = endpoint?.method;\n if (endpoint && paginationMode === \"infinite\" && !cursorParam) {\n throw new Error(\n `Operation ${method?.toUpperCase()} ${path} cannot use infinite pagination without a cursor parameter`,\n );\n }\n const walkMode = paginationMode === \"infinite\" || (paginationMode === undefined && !!cursorParam);\n\n // The walk's own view of the filters: everything that identifies the query,\n // with the position taken out. A cursor left over in the URL from a shared\n // link names a position in a walk this session never made, so it is dropped\n // rather than replayed.\n const walkFilters = useMemo(() => {\n if (!cursorParam) return filters;\n const rest = { ...filters };\n delete rest[cursorParam];\n return rest;\n }, [cursorParam, filters]);\n\n const execute = useCallback(\n (values: ParameterValues) =>\n client.executeCommand(\n path!,\n method!,\n packParameterValues(values, parameters),\n CLICKY_HEADERS,\n ),\n [client, method, parameters, path],\n );\n\n // Both queries are declared on every render — hooks are not conditional — and\n // exactly one is enabled. Their keys differ in shape as well as content, so a\n // surface that switches modes can never read a page array as a page.\n const single = useQuery<ExecutionResponse>({\n queryKey: [LIST_KEY, method, path, filters],\n queryFn: () => execute(filters),\n enabled: !!endpoint && !walkMode,\n placeholderData: keepPreviousData,\n staleTime: 30_000,\n retry: 0,\n });\n\n // Prefixed with the same LIST_KEY as the single-page query: host apps\n // invalidate [\"operation-list\"] after a mutation, and a walk that fell\n // outside that prefix would keep serving rows the mutation changed.\n const walkKey = useMemo(\n () => [LIST_KEY, \"walk\", method, path, walkFilters],\n [method, path, walkFilters],\n );\n\n const walk = useInfiniteQuery<\n ExecutionResponse,\n Error,\n InfiniteData<ExecutionResponse, string | undefined>,\n QueryKey,\n string | undefined\n >({\n queryKey: walkKey,\n queryFn: ({ pageParam }) =>\n execute(pageParam ? { ...walkFilters, [cursorParam!]: pageParam } : walkFilters),\n initialPageParam: undefined,\n // The server's two answers, both required: it has more, and here is where\n // to resume. A page claiming more without minting a token cannot be walked,\n // and guessing one is how a client forges a position it was never given.\n getNextPageParam: (lastPage) =>\n lastPage.pagination?.hasMore ? lastPage.pagination.nextCursor : undefined,\n enabled: !!endpoint && walkMode,\n placeholderData: keepPreviousData,\n staleTime: 30_000,\n retry: 0,\n });\n\n const walkPages = walk.data?.pages;\n\n // A cursor the server refuses is recoverable by construction: the query is\n // fine and only the position is gone, so the walk starts again instead of\n // stranding the reader on an error panel they cannot page out of. Resetting\n // is what does it — refetching would replay the very cursors that were\n // refused, page by page.\n //\n // Guarded on a page having already been fetched, because only then can a\n // cursor have been sent. A first page refused this way is a server that\n // answers `cursor_stale` to a request carrying no cursor, and restarting on\n // that spins: refuse, restart, refuse.\n const staleWalk = isCursorStale(walk.error) && (walkPages?.length ?? 0) > 0;\n\n useEffect(() => {\n if (!staleWalk) return;\n void queryClient.resetQueries({ queryKey: walkKey });\n }, [queryClient, staleWalk, walkKey]);\n\n const fetchNextPage = walk.fetchNextPage;\n const infinite = useMemo<DataTableInfinite | undefined>(() => {\n if (!walkMode || !cursorParam) return undefined;\n return {\n hasMore: walk.hasNextPage,\n loading: walk.isFetchingNextPage,\n onLoadMore: () => void fetchNextPage(),\n };\n }, [cursorParam, fetchNextPage, walk.hasNextPage, walk.isFetchingNextPage, walkMode]);\n\n const resetWalk = useCallback(() => {\n void queryClient.resetQueries({ queryKey: walkKey });\n }, [queryClient, walkKey]);\n const refetchSingle = single.refetch;\n\n if (!walkMode) {\n return {\n pages: single.data ? [single.data] : [],\n response: single.data ?? null,\n isFetching: single.isFetching,\n isPending: single.isPending,\n isError: single.isError,\n error: single.error,\n refetch: () => void refetchSingle(),\n };\n }\n\n const pages = walkPages ?? [];\n return {\n pages,\n response: pages[pages.length - 1] ?? null,\n // Fetching the next page grows the run; it does not replace it. Reporting\n // it as a load of the whole surface is what drops a spinner over rows the\n // reader is still reading.\n isFetching: walk.isFetching && !walk.isFetchingNextPage,\n isPending: walk.isPending,\n isError: walk.isError && !staleWalk,\n error: staleWalk ? undefined : walk.error,\n // A mutation just changed the rows this walk was cut from, so its cursors\n // no longer name positions in it. Starting over is the only honest refetch.\n refetch: resetWalk,\n ...(infinite ? { infinite } : {}),\n };\n}\n"],"names":["useQueryClient","cursorParameterName","useMemo","useCallback","packParameterValues","useQuery","keepPreviousData","useInfiniteQuery","_a","isCursorStale","useEffect"],"mappings":";;;;;;AAoBA,MAAM,WAAW;AACjB,MAAM,iBAAiB,EAAE,QAAQ,0BAAA;AAgD1B,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA0C;;AACxC,QAAM,cAAcA,WAAAA,eAAA;AACpB,QAAM,cAAcC,YAAAA,oBAAoB,UAAU;AAClD,QAAM,OAAO,qCAAU;AACvB,QAAM,SAAS,qCAAU;AACzB,MAAI,YAAY,mBAAmB,cAAc,CAAC,aAAa;AAC7D,UAAM,IAAI;AAAA,MACR,aAAa,iCAAQ,aAAa,IAAI,IAAI;AAAA,IAAA;AAAA,EAE9C;AACA,QAAM,WAAW,mBAAmB,cAAe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AA;AAAA,IAGpC,SAAS;AAAA,IACT,GAAI,WAAW,EAAE,aAAa,CAAA;AAAA,EAAC;AAEnC;;"}
|
|
1
|
+
{"version":3,"file":"useOperationPages.cjs","sources":["../../src/rpc/useOperationPages.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo } from \"react\";\nimport {\n keepPreviousData,\n useInfiniteQuery,\n useQuery,\n useQueryClient,\n type InfiniteData,\n type QueryKey,\n} from \"@tanstack/react-query\";\n\nimport type { DataTableInfinite } from \"../data/DataTable\";\nimport { cursorParameterName, isCursorStale } from \"./cursorStale\";\nimport { packParameterValues, type ParameterValues } from \"./formMetadata\";\nimport type {\n ExecutionResponse,\n OpenAPIParameter,\n ResolvedOperation,\n} from \"./types\";\nimport type { OperationsApiClient } from \"./useOperations\";\n\nconst LIST_KEY = \"operation-list\";\nconst CLICKY_HEADERS = { Accept: \"application/json+clicky\" };\n\nexport type OperationPagesOptions = {\n client: OperationsApiClient;\n /** The list operation, or undefined for a surface that has none. */\n endpoint: ResolvedOperation | undefined;\n /** Every parameter the operation declares — the source of the cursor role. */\n parameters: OpenAPIParameter[];\n /** Current filter/pagination state, as the catalog holds and URL-mirrors it. */\n filters: ParameterValues;\n /** Omit to infer a cursor walk from the operation; hosts may force either presentation. */\n paginationMode?: \"paged\" | \"infinite\";\n /** Poll the current server page while it can change, in milliseconds. */\n refreshIntervalMs?: number;\n};\n\nexport type OperationPages = {\n /** Every page fetched so far, oldest first. One entry outside a walk. */\n pages: ExecutionResponse[];\n /** The newest page — what every renderer means by \"the response\". */\n response: ExecutionResponse | null;\n /** True while the whole result is being replaced, not while it is growing. */\n isFetching: boolean;\n isPending: boolean;\n isError: boolean;\n error: unknown;\n /** Re-runs the list. A walk restarts rather than replaying its cursors. */\n refetch: () => void;\n /** Load-more handle; absent unless the operation can walk by cursor. */\n infinite?: DataTableInfinite;\n};\n\n/**\n * useOperationPages runs a surface's list operation, walking it forward when it\n * declares a cursor and fetching a single page when it does not. A host can\n * explicitly keep a cursor-capable operation paged when readers need offset\n * controls; omission retains automatic selection.\n *\n * Automatic mode follows the operation: a cursor role is the server saying\n * \"you may resume this query\", and everything else keeps the single-page query\n * it has always had. An explicit host override changes only the presentation;\n * the operation still owns the available cursor and offset capabilities.\n *\n * In walk mode the cursor is deliberately absent from the query key. The key is\n * the identity of the query being walked, and the cursor is a position inside\n * it; keying on it made every page a different query, which is precisely why\n * advancing replaced the rows instead of extending them. Every other filter\n * stays in the key, so any filter, parameter or time-range change starts a new\n * walk on its own, with no reset logic layered on top.\n */\nexport function useOperationPages({\n client,\n endpoint,\n parameters,\n filters,\n paginationMode,\n refreshIntervalMs,\n}: OperationPagesOptions): OperationPages {\n const queryClient = useQueryClient();\n const cursorParam = cursorParameterName(parameters);\n const path = endpoint?.path;\n const method = endpoint?.method;\n if (endpoint && paginationMode === \"infinite\" && !cursorParam) {\n throw new Error(\n `Operation ${method?.toUpperCase()} ${path} cannot use infinite pagination without a cursor parameter`,\n );\n }\n const walkMode = paginationMode === \"infinite\" || (paginationMode === undefined && !!cursorParam);\n if (refreshIntervalMs !== undefined && (!Number.isFinite(refreshIntervalMs) || refreshIntervalMs <= 0 || walkMode)) {\n throw new Error(\"Operation page refresh requires a positive interval and paged mode\");\n }\n\n // The walk's own view of the filters: everything that identifies the query,\n // with the position taken out. A cursor left over in the URL from a shared\n // link names a position in a walk this session never made, so it is dropped\n // rather than replayed.\n const walkFilters = useMemo(() => {\n if (!cursorParam) return filters;\n const rest = { ...filters };\n delete rest[cursorParam];\n return rest;\n }, [cursorParam, filters]);\n\n const execute = useCallback(\n (values: ParameterValues) =>\n client.executeCommand(\n path!,\n method!,\n packParameterValues(values, parameters),\n CLICKY_HEADERS,\n ),\n [client, method, parameters, path],\n );\n\n // Both queries are declared on every render — hooks are not conditional — and\n // exactly one is enabled. Their keys differ in shape as well as content, so a\n // surface that switches modes can never read a page array as a page.\n const single = useQuery<ExecutionResponse>({\n queryKey: [LIST_KEY, method, path, filters],\n queryFn: () => execute(filters),\n enabled: !!endpoint && !walkMode,\n placeholderData: keepPreviousData,\n staleTime: 30_000,\n ...(refreshIntervalMs !== undefined ? { refetchInterval: refreshIntervalMs } : {}),\n retry: 0,\n });\n\n // Prefixed with the same LIST_KEY as the single-page query: host apps\n // invalidate [\"operation-list\"] after a mutation, and a walk that fell\n // outside that prefix would keep serving rows the mutation changed.\n const walkKey = useMemo(\n () => [LIST_KEY, \"walk\", method, path, walkFilters],\n [method, path, walkFilters],\n );\n\n const walk = useInfiniteQuery<\n ExecutionResponse,\n Error,\n InfiniteData<ExecutionResponse, string | undefined>,\n QueryKey,\n string | undefined\n >({\n queryKey: walkKey,\n queryFn: ({ pageParam }) =>\n execute(pageParam ? { ...walkFilters, [cursorParam!]: pageParam } : walkFilters),\n initialPageParam: undefined,\n // The server's two answers, both required: it has more, and here is where\n // to resume. A page claiming more without minting a token cannot be walked,\n // and guessing one is how a client forges a position it was never given.\n getNextPageParam: (lastPage) =>\n lastPage.pagination?.hasMore ? lastPage.pagination.nextCursor : undefined,\n enabled: !!endpoint && walkMode,\n placeholderData: keepPreviousData,\n staleTime: 30_000,\n retry: 0,\n });\n\n const walkPages = walk.data?.pages;\n\n // A cursor the server refuses is recoverable by construction: the query is\n // fine and only the position is gone, so the walk starts again instead of\n // stranding the reader on an error panel they cannot page out of. Resetting\n // is what does it — refetching would replay the very cursors that were\n // refused, page by page.\n //\n // Guarded on a page having already been fetched, because only then can a\n // cursor have been sent. A first page refused this way is a server that\n // answers `cursor_stale` to a request carrying no cursor, and restarting on\n // that spins: refuse, restart, refuse.\n const staleWalk = isCursorStale(walk.error) && (walkPages?.length ?? 0) > 0;\n\n useEffect(() => {\n if (!staleWalk) return;\n void queryClient.resetQueries({ queryKey: walkKey });\n }, [queryClient, staleWalk, walkKey]);\n\n const fetchNextPage = walk.fetchNextPage;\n const infinite = useMemo<DataTableInfinite | undefined>(() => {\n if (!walkMode || !cursorParam) return undefined;\n return {\n hasMore: walk.hasNextPage,\n loading: walk.isFetchingNextPage,\n onLoadMore: () => void fetchNextPage(),\n };\n }, [cursorParam, fetchNextPage, walk.hasNextPage, walk.isFetchingNextPage, walkMode]);\n\n const resetWalk = useCallback(() => {\n void queryClient.resetQueries({ queryKey: walkKey });\n }, [queryClient, walkKey]);\n const refetchSingle = single.refetch;\n\n if (!walkMode) {\n return {\n pages: single.data ? [single.data] : [],\n response: single.data ?? null,\n isFetching: single.isFetching,\n isPending: single.isPending,\n isError: single.isError,\n error: single.error,\n refetch: () => void refetchSingle(),\n };\n }\n\n const pages = walkPages ?? [];\n return {\n pages,\n response: pages[pages.length - 1] ?? null,\n // Fetching the next page grows the run; it does not replace it. Reporting\n // it as a load of the whole surface is what drops a spinner over rows the\n // reader is still reading.\n isFetching: walk.isFetching && !walk.isFetchingNextPage,\n isPending: walk.isPending,\n isError: walk.isError && !staleWalk,\n error: staleWalk ? undefined : walk.error,\n // A mutation just changed the rows this walk was cut from, so its cursors\n // no longer name positions in it. Starting over is the only honest refetch.\n refetch: resetWalk,\n ...(infinite ? { infinite } : {}),\n };\n}\n"],"names":["useQueryClient","cursorParameterName","useMemo","useCallback","packParameterValues","useQuery","keepPreviousData","useInfiniteQuery","_a","isCursorStale","useEffect"],"mappings":";;;;;;AAoBA,MAAM,WAAW;AACjB,MAAM,iBAAiB,EAAE,QAAQ,0BAAA;AAkD1B,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA0C;;AACxC,QAAM,cAAcA,WAAAA,eAAA;AACpB,QAAM,cAAcC,YAAAA,oBAAoB,UAAU;AAClD,QAAM,OAAO,qCAAU;AACvB,QAAM,SAAS,qCAAU;AACzB,MAAI,YAAY,mBAAmB,cAAc,CAAC,aAAa;AAC7D,UAAM,IAAI;AAAA,MACR,aAAa,iCAAQ,aAAa,IAAI,IAAI;AAAA,IAAA;AAAA,EAE9C;AACA,QAAM,WAAW,mBAAmB,cAAe,mBAAmB,UAAa,CAAC,C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;AAAA;AAAA;AAAA;AAAA,IAIrC,YAAY,KAAK,cAAc,CAAC,KAAK;AAAA,IACrC,WAAW,KAAK;AAAA,IAChB,SAAS,KAAK,WAAW,CAAC;AAAA,IAC1B,OAAO,YAAY,SAAY,KAAK;AAAA;AAAA;AAAA,IAGpC,SAAS;AAAA,IACT,GAAI,WAAW,EAAE,aAAa,CAAA;AAAA,EAAC;AAEnC;;"}
|
|
@@ -12,6 +12,8 @@ export type OperationPagesOptions = {
|
|
|
12
12
|
filters: ParameterValues;
|
|
13
13
|
/** Omit to infer a cursor walk from the operation; hosts may force either presentation. */
|
|
14
14
|
paginationMode?: "paged" | "infinite";
|
|
15
|
+
/** Poll the current server page while it can change, in milliseconds. */
|
|
16
|
+
refreshIntervalMs?: number;
|
|
15
17
|
};
|
|
16
18
|
export type OperationPages = {
|
|
17
19
|
/** Every page fetched so far, oldest first. One entry outside a walk. */
|
|
@@ -46,5 +48,5 @@ export type OperationPages = {
|
|
|
46
48
|
* stays in the key, so any filter, parameter or time-range change starts a new
|
|
47
49
|
* walk on its own, with no reset logic layered on top.
|
|
48
50
|
*/
|
|
49
|
-
export declare function useOperationPages({ client, endpoint, parameters, filters, paginationMode, }: OperationPagesOptions): OperationPages;
|
|
51
|
+
export declare function useOperationPages({ client, endpoint, parameters, filters, paginationMode, refreshIntervalMs, }: OperationPagesOptions): OperationPages;
|
|
50
52
|
//# sourceMappingURL=useOperationPages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOperationPages.d.ts","sourceRoot":"","sources":["../../src/rpc/useOperationPages.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,m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,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,2EAA2E;IAC3E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,QAAQ,EACR,UAAU,EACV,OAAO,EACP,cAAc,EACd,iBAAiB,GAClB,EAAE,qBAAqB,GAAG,cAAc,CA8IxC"}
|
|
@@ -9,7 +9,8 @@ function useOperationPages({
|
|
|
9
9
|
endpoint,
|
|
10
10
|
parameters,
|
|
11
11
|
filters,
|
|
12
|
-
paginationMode
|
|
12
|
+
paginationMode,
|
|
13
|
+
refreshIntervalMs
|
|
13
14
|
}) {
|
|
14
15
|
var _a;
|
|
15
16
|
const queryClient = useQueryClient();
|
|
@@ -22,6 +23,9 @@ function useOperationPages({
|
|
|
22
23
|
);
|
|
23
24
|
}
|
|
24
25
|
const walkMode = paginationMode === "infinite" || paginationMode === void 0 && !!cursorParam;
|
|
26
|
+
if (refreshIntervalMs !== void 0 && (!Number.isFinite(refreshIntervalMs) || refreshIntervalMs <= 0 || walkMode)) {
|
|
27
|
+
throw new Error("Operation page refresh requires a positive interval and paged mode");
|
|
28
|
+
}
|
|
25
29
|
const walkFilters = useMemo(() => {
|
|
26
30
|
if (!cursorParam) return filters;
|
|
27
31
|
const rest = { ...filters };
|
|
@@ -43,6 +47,7 @@ function useOperationPages({
|
|
|
43
47
|
enabled: !!endpoint && !walkMode,
|
|
44
48
|
placeholderData: keepPreviousData,
|
|
45
49
|
staleTime: 3e4,
|
|
50
|
+
...refreshIntervalMs !== void 0 ? { refetchInterval: refreshIntervalMs } : {},
|
|
46
51
|
retry: 0
|
|
47
52
|
});
|
|
48
53
|
const walkKey = useMemo(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOperationPages.js","sources":["../../src/rpc/useOperationPages.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo } from \"react\";\nimport {\n keepPreviousData,\n useInfiniteQuery,\n useQuery,\n useQueryClient,\n type InfiniteData,\n type QueryKey,\n} from \"@tanstack/react-query\";\n\nimport type { DataTableInfinite } from \"../data/DataTable\";\nimport { cursorParameterName, isCursorStale } from \"./cursorStale\";\nimport { packParameterValues, type ParameterValues } from \"./formMetadata\";\nimport type {\n ExecutionResponse,\n OpenAPIParameter,\n ResolvedOperation,\n} from \"./types\";\nimport type { OperationsApiClient } from \"./useOperations\";\n\nconst LIST_KEY = \"operation-list\";\nconst CLICKY_HEADERS = { Accept: \"application/json+clicky\" };\n\nexport type OperationPagesOptions = {\n client: OperationsApiClient;\n /** The list operation, or undefined for a surface that has none. */\n endpoint: ResolvedOperation | undefined;\n /** Every parameter the operation declares — the source of the cursor role. */\n parameters: OpenAPIParameter[];\n /** Current filter/pagination state, as the catalog holds and URL-mirrors it. */\n filters: ParameterValues;\n /** Omit to infer a cursor walk from the operation; hosts may force either presentation. */\n paginationMode?: \"paged\" | \"infinite\";\n};\n\nexport type OperationPages = {\n /** Every page fetched so far, oldest first. One entry outside a walk. */\n pages: ExecutionResponse[];\n /** The newest page — what every renderer means by \"the response\". */\n response: ExecutionResponse | null;\n /** True while the whole result is being replaced, not while it is growing. */\n isFetching: boolean;\n isPending: boolean;\n isError: boolean;\n error: unknown;\n /** Re-runs the list. A walk restarts rather than replaying its cursors. */\n refetch: () => void;\n /** Load-more handle; absent unless the operation can walk by cursor. */\n infinite?: DataTableInfinite;\n};\n\n/**\n * useOperationPages runs a surface's list operation, walking it forward when it\n * declares a cursor and fetching a single page when it does not. A host can\n * explicitly keep a cursor-capable operation paged when readers need offset\n * controls; omission retains automatic selection.\n *\n * Automatic mode follows the operation: a cursor role is the server saying\n * \"you may resume this query\", and everything else keeps the single-page query\n * it has always had. An explicit host override changes only the presentation;\n * the operation still owns the available cursor and offset capabilities.\n *\n * In walk mode the cursor is deliberately absent from the query key. The key is\n * the identity of the query being walked, and the cursor is a position inside\n * it; keying on it made every page a different query, which is precisely why\n * advancing replaced the rows instead of extending them. Every other filter\n * stays in the key, so any filter, parameter or time-range change starts a new\n * walk on its own, with no reset logic layered on top.\n */\nexport function useOperationPages({\n client,\n endpoint,\n parameters,\n filters,\n paginationMode,\n}: OperationPagesOptions): OperationPages {\n const queryClient = useQueryClient();\n const cursorParam = cursorParameterName(parameters);\n const path = endpoint?.path;\n const method = endpoint?.method;\n if (endpoint && paginationMode === \"infinite\" && !cursorParam) {\n throw new Error(\n `Operation ${method?.toUpperCase()} ${path} cannot use infinite pagination without a cursor parameter`,\n );\n }\n const walkMode = paginationMode === \"infinite\" || (paginationMode === undefined && !!cursorParam);\n\n // The walk's own view of the filters: everything that identifies the query,\n // with the position taken out. A cursor left over in the URL from a shared\n // link names a position in a walk this session never made, so it is dropped\n // rather than replayed.\n const walkFilters = useMemo(() => {\n if (!cursorParam) return filters;\n const rest = { ...filters };\n delete rest[cursorParam];\n return rest;\n }, [cursorParam, filters]);\n\n const execute = useCallback(\n (values: ParameterValues) =>\n client.executeCommand(\n path!,\n method!,\n packParameterValues(values, parameters),\n CLICKY_HEADERS,\n ),\n [client, method, parameters, path],\n );\n\n // Both queries are declared on every render — hooks are not conditional — and\n // exactly one is enabled. Their keys differ in shape as well as content, so a\n // surface that switches modes can never read a page array as a page.\n const single = useQuery<ExecutionResponse>({\n queryKey: [LIST_KEY, method, path, filters],\n queryFn: () => execute(filters),\n enabled: !!endpoint && !walkMode,\n placeholderData: keepPreviousData,\n staleTime: 30_000,\n retry: 0,\n });\n\n // Prefixed with the same LIST_KEY as the single-page query: host apps\n // invalidate [\"operation-list\"] after a mutation, and a walk that fell\n // outside that prefix would keep serving rows the mutation changed.\n const walkKey = useMemo(\n () => [LIST_KEY, \"walk\", method, path, walkFilters],\n [method, path, walkFilters],\n );\n\n const walk = useInfiniteQuery<\n ExecutionResponse,\n Error,\n InfiniteData<ExecutionResponse, string | undefined>,\n QueryKey,\n string | undefined\n >({\n queryKey: walkKey,\n queryFn: ({ pageParam }) =>\n execute(pageParam ? { ...walkFilters, [cursorParam!]: pageParam } : walkFilters),\n initialPageParam: undefined,\n // The server's two answers, both required: it has more, and here is where\n // to resume. A page claiming more without minting a token cannot be walked,\n // and guessing one is how a client forges a position it was never given.\n getNextPageParam: (lastPage) =>\n lastPage.pagination?.hasMore ? lastPage.pagination.nextCursor : undefined,\n enabled: !!endpoint && walkMode,\n placeholderData: keepPreviousData,\n staleTime: 30_000,\n retry: 0,\n });\n\n const walkPages = walk.data?.pages;\n\n // A cursor the server refuses is recoverable by construction: the query is\n // fine and only the position is gone, so the walk starts again instead of\n // stranding the reader on an error panel they cannot page out of. Resetting\n // is what does it — refetching would replay the very cursors that were\n // refused, page by page.\n //\n // Guarded on a page having already been fetched, because only then can a\n // cursor have been sent. A first page refused this way is a server that\n // answers `cursor_stale` to a request carrying no cursor, and restarting on\n // that spins: refuse, restart, refuse.\n const staleWalk = isCursorStale(walk.error) && (walkPages?.length ?? 0) > 0;\n\n useEffect(() => {\n if (!staleWalk) return;\n void queryClient.resetQueries({ queryKey: walkKey });\n }, [queryClient, staleWalk, walkKey]);\n\n const fetchNextPage = walk.fetchNextPage;\n const infinite = useMemo<DataTableInfinite | undefined>(() => {\n if (!walkMode || !cursorParam) return undefined;\n return {\n hasMore: walk.hasNextPage,\n loading: walk.isFetchingNextPage,\n onLoadMore: () => void fetchNextPage(),\n };\n }, [cursorParam, fetchNextPage, walk.hasNextPage, walk.isFetchingNextPage, walkMode]);\n\n const resetWalk = useCallback(() => {\n void queryClient.resetQueries({ queryKey: walkKey });\n }, [queryClient, walkKey]);\n const refetchSingle = single.refetch;\n\n if (!walkMode) {\n return {\n pages: single.data ? [single.data] : [],\n response: single.data ?? null,\n isFetching: single.isFetching,\n isPending: single.isPending,\n isError: single.isError,\n error: single.error,\n refetch: () => void refetchSingle(),\n };\n }\n\n const pages = walkPages ?? [];\n return {\n pages,\n response: pages[pages.length - 1] ?? null,\n // Fetching the next page grows the run; it does not replace it. Reporting\n // it as a load of the whole surface is what drops a spinner over rows the\n // reader is still reading.\n isFetching: walk.isFetching && !walk.isFetchingNextPage,\n isPending: walk.isPending,\n isError: walk.isError && !staleWalk,\n error: staleWalk ? undefined : walk.error,\n // A mutation just changed the rows this walk was cut from, so its cursors\n // no longer name positions in it. Starting over is the only honest refetch.\n refetch: resetWalk,\n ...(infinite ? { infinite } : {}),\n };\n}\n"],"names":["_a"],"mappings":";;;;AAoBA,MAAM,WAAW;AACjB,MAAM,iBAAiB,EAAE,QAAQ,0BAAA;AAgD1B,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA0C;;AACxC,QAAM,cAAc,eAAA;AACpB,QAAM,cAAc,oBAAoB,UAAU;AAClD,QAAM,OAAO,qCAAU;AACvB,QAAM,SAAS,qCAAU;AACzB,MAAI,YAAY,mBAAmB,cAAc,CAAC,aAAa;AAC7D,UAAM,IAAI;AAAA,MACR,aAAa,iCAAQ,aAAa,IAAI,IAAI;AAAA,IAAA;AAAA,EAE9C;AACA,QAAM,WAAW,mBAAmB,cAAe,mBAAmB,UAAa,CAAC,CAAC;AAMrF,QAAM,cAAc,QAAQ,MAAM;AAChC,QAAI,CAAC,YAAa,QAAO;AACzB,UAAM,OAAO,EAAE,GAAG,QAAA;AAClB,WAAO,KAAK,WAAW;AACvB,WAAO;AAAA,EACT,GAAG,CAAC,aAAa,OAAO,CAAC;AAEzB,QAAM,UAAU;AAAA,IACd,CAAC,WACC,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,oBAAoB,QAAQ,UAAU;AAAA,MACtC;AAAA,IAAA;AAAA,IAEJ,CAAC,QAAQ,QAAQ,YAAY,IAAI;AAAA,EAAA;AAMnC,QAAM,SAAS,SAA4B;AAAA,IACzC,UAAU,CAAC,UAAU,QAAQ,MAAM,OAAO;AAA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ClC,SAAK,YAAY,aAAa,EAAE,UAAU,SAAS;AAAA,EACrD,GAAG,CAAC,aAAa,OAAO,CAAC;AACzB,QAAM,gBAAgB,OAAO;AAE7B,MAAI,CAAC,UAAU;AACb,WAAO;AAAA,MACL,OAAO,OAAO,OAAO,CAAC,OAAO,IAAI,IAAI,CAAA;AAAA,MACrC,UAAU,OAAO,QAAQ;AAAA,MACzB,YAAY,OAAO;AAAA,MACnB,WAAW,OAAO;AAAA,MAClB,SAAS,OAAO;AAAA,MAChB,OAAO,OAAO;AAAA,MACd,SAAS,MAAM,KAAK,cAAA;AAAA,IAAc;AAAA,EAEtC;AAEA,QAAM,QAAQ,aAAa,CAAA;AAC3B,SAAO;AAAA,IACL;AAAA,IACA,UAAU,MAAM,MAAM,SAAS,CAAC,KAAK;AAAA;AAAA;AAAA;AAAA,IAIrC,YAAY,KAAK,cAAc,CAAC,KAAK;AAAA,IACrC,WAAW,KAAK;AAAA,IAChB,SAAS,KAAK,WAAW,CAAC;AAAA,IAC1B,OAAO,YAAY,SAAY,KAAK;AAAA;AAAA;AAAA,IAGpC,SAAS;AAAA,IACT,GAAI,WAAW,EAAE,aAAa,CAAA;AAAA,EAAC;AAEnC;"}
|
|
1
|
+
{"version":3,"file":"useOperationPages.js","sources":["../../src/rpc/useOperationPages.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo } from \"react\";\nimport {\n keepPreviousData,\n useInfiniteQuery,\n useQuery,\n useQueryClient,\n type InfiniteData,\n type QueryKey,\n} from \"@tanstack/react-query\";\n\nimport type { DataTableInfinite } from \"../data/DataTable\";\nimport { cursorParameterName, isCursorStale } from \"./cursorStale\";\nimport { packParameterValues, type ParameterValues } from \"./formMetadata\";\nimport type {\n ExecutionResponse,\n OpenAPIParameter,\n ResolvedOperation,\n} from \"./types\";\nimport type { OperationsApiClient } from \"./useOperations\";\n\nconst LIST_KEY = \"operation-list\";\nconst CLICKY_HEADERS = { Accept: \"application/json+clicky\" };\n\nexport type OperationPagesOptions = {\n client: OperationsApiClient;\n /** The list operation, or undefined for a surface that has none. */\n endpoint: ResolvedOperation | undefined;\n /** Every parameter the operation declares — the source of the cursor role. */\n parameters: OpenAPIParameter[];\n /** Current filter/pagination state, as the catalog holds and URL-mirrors it. */\n filters: ParameterValues;\n /** Omit to infer a cursor walk from the operation; hosts may force either presentation. */\n paginationMode?: \"paged\" | \"infinite\";\n /** Poll the current server page while it can change, in milliseconds. */\n refreshIntervalMs?: number;\n};\n\nexport type OperationPages = {\n /** Every page fetched so far, oldest first. One entry outside a walk. */\n pages: ExecutionResponse[];\n /** The newest page — what every renderer means by \"the response\". */\n response: ExecutionResponse | null;\n /** True while the whole result is being replaced, not while it is growing. */\n isFetching: boolean;\n isPending: boolean;\n isError: boolean;\n error: unknown;\n /** Re-runs the list. A walk restarts rather than replaying its cursors. */\n refetch: () => void;\n /** Load-more handle; absent unless the operation can walk by cursor. */\n infinite?: DataTableInfinite;\n};\n\n/**\n * useOperationPages runs a surface's list operation, walking it forward when it\n * declares a cursor and fetching a single page when it does not. A host can\n * explicitly keep a cursor-capable operation paged when readers need offset\n * controls; omission retains automatic selection.\n *\n * Automatic mode follows the operation: a cursor role is the server saying\n * \"you may resume this query\", and everything else keeps the single-page query\n * it has always had. An explicit host override changes only the presentation;\n * the operation still owns the available cursor and offset capabilities.\n *\n * In walk mode the cursor is deliberately absent from the query key. The key is\n * the identity of the query being walked, and the cursor is a position inside\n * it; keying on it made every page a different query, which is precisely why\n * advancing replaced the rows instead of extending them. Every other filter\n * stays in the key, so any filter, parameter or time-range change starts a new\n * walk on its own, with no reset logic layered on top.\n */\nexport function useOperationPages({\n client,\n endpoint,\n parameters,\n filters,\n paginationMode,\n refreshIntervalMs,\n}: OperationPagesOptions): OperationPages {\n const queryClient = useQueryClient();\n const cursorParam = cursorParameterName(parameters);\n const path = endpoint?.path;\n const method = endpoint?.method;\n if (endpoint && paginationMode === \"infinite\" && !cursorParam) {\n throw new Error(\n `Operation ${method?.toUpperCase()} ${path} cannot use infinite pagination without a cursor parameter`,\n );\n }\n const walkMode = paginationMode === \"infinite\" || (paginationMode === undefined && !!cursorParam);\n if (refreshIntervalMs !== undefined && (!Number.isFinite(refreshIntervalMs) || refreshIntervalMs <= 0 || walkMode)) {\n throw new Error(\"Operation page refresh requires a positive interval and paged mode\");\n }\n\n // The walk's own view of the filters: everything that identifies the query,\n // with the position taken out. A cursor left over in the URL from a shared\n // link names a position in a walk this session never made, so it is dropped\n // rather than replayed.\n const walkFilters = useMemo(() => {\n if (!cursorParam) return filters;\n const rest = { ...filters };\n delete rest[cursorParam];\n return rest;\n }, [cursorParam, filters]);\n\n const execute = useCallback(\n (values: ParameterValues) =>\n client.executeCommand(\n path!,\n method!,\n packParameterValues(values, parameters),\n CLICKY_HEADERS,\n ),\n [client, method, parameters, path],\n );\n\n // Both queries are declared on every render — hooks are not conditional — and\n // exactly one is enabled. Their keys differ in shape as well as content, so a\n // surface that switches modes can never read a page array as a page.\n const single = useQuery<ExecutionResponse>({\n queryKey: [LIST_KEY, method, path, filters],\n queryFn: () => execute(filters),\n enabled: !!endpoint && !walkMode,\n placeholderData: keepPreviousData,\n staleTime: 30_000,\n ...(refreshIntervalMs !== undefined ? { refetchInterval: refreshIntervalMs } : {}),\n retry: 0,\n });\n\n // Prefixed with the same LIST_KEY as the single-page query: host apps\n // invalidate [\"operation-list\"] after a mutation, and a walk that fell\n // outside that prefix would keep serving rows the mutation changed.\n const walkKey = useMemo(\n () => [LIST_KEY, \"walk\", method, path, walkFilters],\n [method, path, walkFilters],\n );\n\n const walk = useInfiniteQuery<\n ExecutionResponse,\n Error,\n InfiniteData<ExecutionResponse, string | undefined>,\n QueryKey,\n string | undefined\n >({\n queryKey: walkKey,\n queryFn: ({ pageParam }) =>\n execute(pageParam ? { ...walkFilters, [cursorParam!]: pageParam } : walkFilters),\n initialPageParam: undefined,\n // The server's two answers, both required: it has more, and here is where\n // to resume. A page claiming more without minting a token cannot be walked,\n // and guessing one is how a client forges a position it was never given.\n getNextPageParam: (lastPage) =>\n lastPage.pagination?.hasMore ? lastPage.pagination.nextCursor : undefined,\n enabled: !!endpoint && walkMode,\n placeholderData: keepPreviousData,\n staleTime: 30_000,\n retry: 0,\n });\n\n const walkPages = walk.data?.pages;\n\n // A cursor the server refuses is recoverable by construction: the query is\n // fine and only the position is gone, so the walk starts again instead of\n // stranding the reader on an error panel they cannot page out of. Resetting\n // is what does it — refetching would replay the very cursors that were\n // refused, page by page.\n //\n // Guarded on a page having already been fetched, because only then can a\n // cursor have been sent. A first page refused this way is a server that\n // answers `cursor_stale` to a request carrying no cursor, and restarting on\n // that spins: refuse, restart, refuse.\n const staleWalk = isCursorStale(walk.error) && (walkPages?.length ?? 0) > 0;\n\n useEffect(() => {\n if (!staleWalk) return;\n void queryClient.resetQueries({ queryKey: walkKey });\n }, [queryClient, staleWalk, walkKey]);\n\n const fetchNextPage = walk.fetchNextPage;\n const infinite = useMemo<DataTableInfinite | undefined>(() => {\n if (!walkMode || !cursorParam) return undefined;\n return {\n hasMore: walk.hasNextPage,\n loading: walk.isFetchingNextPage,\n onLoadMore: () => void fetchNextPage(),\n };\n }, [cursorParam, fetchNextPage, walk.hasNextPage, walk.isFetchingNextPage, walkMode]);\n\n const resetWalk = useCallback(() => {\n void queryClient.resetQueries({ queryKey: walkKey });\n }, [queryClient, walkKey]);\n const refetchSingle = single.refetch;\n\n if (!walkMode) {\n return {\n pages: single.data ? [single.data] : [],\n response: single.data ?? null,\n isFetching: single.isFetching,\n isPending: single.isPending,\n isError: single.isError,\n error: single.error,\n refetch: () => void refetchSingle(),\n };\n }\n\n const pages = walkPages ?? [];\n return {\n pages,\n response: pages[pages.length - 1] ?? null,\n // Fetching the next page grows the run; it does not replace it. Reporting\n // it as a load of the whole surface is what drops a spinner over rows the\n // reader is still reading.\n isFetching: walk.isFetching && !walk.isFetchingNextPage,\n isPending: walk.isPending,\n isError: walk.isError && !staleWalk,\n error: staleWalk ? undefined : walk.error,\n // A mutation just changed the rows this walk was cut from, so its cursors\n // no longer name positions in it. Starting over is the only honest refetch.\n refetch: resetWalk,\n ...(infinite ? { infinite } : {}),\n };\n}\n"],"names":["_a"],"mappings":";;;;AAoBA,MAAM,WAAW;AACjB,MAAM,iBAAiB,EAAE,QAAQ,0BAAA;AAkD1B,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA0C;;AACxC,QAAM,cAAc,eAAA;AACpB,QAAM,cAAc,oBAAoB,UAAU;AAClD,QAAM,OAAO,qCAAU;AACvB,QAAM,SAAS,qCAAU;AACzB,MAAI,YAAY,mBAAmB,cAAc,CAAC,aAAa;AAC7D,UAAM,IAAI;AAAA,MACR,aAAa,iCAAQ,aAAa,IAAI,IAAI;AAAA,IAAA;AAAA,EAE9C;AACA,QAAM,WAAW,mBAAmB,cAAe,mBAAmB,UAAa,CAAC,CAAC;AACrF,MAAI,sBAAsB,WAAc,CAAC,OAAO,SAAS,iBAAiB,KAAK,qBAAqB,KAAK,WAAW;AAClH,UAAM,IAAI,MAAM,oEAAoE;AAAA,EACtF;AAMA,QAAM,cAAc,QAAQ,MAAM;AAChC,QAAI,CAAC,YAAa,QAAO;AACzB,UAAM,OAAO,EAAE,GAAG,QAAA;AAClB,WAAO,KAAK,WAAW;AACvB,WAAO;AAAA,EACT,GAAG,CAAC,aAAa,OAAO,CAAC;AAEzB,QAAM,UAAU;AAAA,IACd,CAAC,WACC,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,oBAAoB,QAAQ,UAAU;AAAA,MACtC;AAAA,IAAA;AAAA,IAEJ,CAAC,QAAQ,QAAQ,YAAY,IAAI;AAAA,EAAA;AAMnC,QAAM,SAAS,SAA4B;AAAA,IACzC,UAAU,CAAC,UAAU,QAAQ,MAAM,OAAO;AAAA,IAC1C,SAAS,MAAM,QAAQ,OAAO;AAAA,IAC9B,SAAS,CAAC,CAAC,YAAY,CAAC;AAAA,IACxB,iBAAiB;AAAA,IACjB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AAA,EACrD,GAAG,CAAC,aAAa,OAAO,CAAC;AACzB,QAAM,gBAAgB,OAAO;AAE7B,MAAI,CAAC,UAAU;AACb,WAAO;AAAA,MACL,OAAO,OAAO,OAAO,CAAC,OAAO,IAAI,IAAI,CAAA;AAAA,MACrC,UAAU,OAAO,QAAQ;AAAA,MACzB,YAAY,OAAO;AAAA,MACnB,WAAW,OAAO;AAAA,MAClB,SAAS,OAAO;AAAA,MAChB,OAAO,OAAO;AAAA,MACd,SAAS,MAAM,KAAK,cAAA;AAAA,IAAc;AAAA,EAEtC;AAEA,QAAM,QAAQ,aAAa,CAAA;AAC3B,SAAO;AAAA,IACL;AAAA,IACA,UAAU,MAAM,MAAM,SAAS,CAAC,KAAK;AAAA;AAAA;AAAA;AAAA,IAIrC,YAAY,KAAK,cAAc,CAAC,KAAK;AAAA,IACrC,WAAW,KAAK;AAAA,IAChB,SAAS,KAAK,WAAW,CAAC;AAAA,IAC1B,OAAO,YAAY,SAAY,KAAK;AAAA;AAAA;AAAA,IAGpC,SAAS;AAAA,IACT,GAAI,WAAW,EAAE,aAAa,CAAA;AAAA,EAAC;AAEnC;"}
|
package/dist/rpc.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const OperationCatalog = require("./rpc/OperationCatalog.cjs");
|
|
4
|
+
const OperationEntityPicker = require("./rpc/OperationEntityPicker.cjs");
|
|
4
5
|
const SessionsCatalog = require("./rpc/SessionsCatalog.cjs");
|
|
5
6
|
const SessionHeader = require("./rpc/SessionHeader.cjs");
|
|
6
7
|
const useSession = require("./rpc/useSession.cjs");
|
|
@@ -38,6 +39,7 @@ const router = require("./rpc/router.cjs");
|
|
|
38
39
|
const RouterProvider = require("./rpc/RouterProvider.cjs");
|
|
39
40
|
const types = require("./rpc/types.cjs");
|
|
40
41
|
exports.OperationCatalog = OperationCatalog.OperationCatalog;
|
|
42
|
+
exports.OperationEntityPicker = OperationEntityPicker.OperationEntityPicker;
|
|
41
43
|
exports.SESSIONS_SURFACE_KEY = SessionsCatalog.SESSIONS_SURFACE_KEY;
|
|
42
44
|
exports.SessionsCatalog = SessionsCatalog.SessionsCatalog;
|
|
43
45
|
exports.SessionHeader = SessionHeader.SessionHeader;
|
package/dist/rpc.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rpc.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/rpc.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { OperationCatalog, type OperationCatalogProps, } from './rpc/OperationCatalog.js';
|
|
2
|
+
export type { OperationCatalogRowSelection, OperationCatalogRowSelectionContext, OperationCatalogRowSelectionMode, OperationCatalogUnavailableRows, } from './rpc/operationCatalogRowSelection.js';
|
|
3
|
+
export { OperationEntityPicker, type OperationEntityPickerProps, } from './rpc/OperationEntityPicker.js';
|
|
2
4
|
export { SESSIONS_SURFACE_KEY, SessionsCatalog, type SessionsCatalogProps, } from './rpc/SessionsCatalog.js';
|
|
3
5
|
export { SessionHeader, type SessionConfirmRenderArgs, type SessionHeaderProps, } from './rpc/SessionHeader.js';
|
|
4
6
|
export { SESSION_POLL_MS, useSession, type SessionAction, type UseSessionOptions, type UseSessionResult, } from './rpc/useSession.js';
|
package/dist/rpc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAA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AC;AACzB,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EACL,KAAK,aAAa,EAClB,SAAS,EACT,gBAAgB,EAChB,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,iBAAiB,GACvB,MAAM,aAAa,CAAC"}
|
package/dist/rpc.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OperationCatalog } from "./rpc/OperationCatalog.js";
|
|
2
|
+
import { OperationEntityPicker } from "./rpc/OperationEntityPicker.js";
|
|
2
3
|
import { SESSIONS_SURFACE_KEY, SessionsCatalog } from "./rpc/SessionsCatalog.js";
|
|
3
4
|
import { SessionHeader } from "./rpc/SessionHeader.js";
|
|
4
5
|
import { SESSION_POLL_MS, useSession } from "./rpc/useSession.js";
|
|
@@ -51,6 +52,7 @@ export {
|
|
|
51
52
|
OperationCommandPage,
|
|
52
53
|
OperationEntityContextPicker,
|
|
53
54
|
OperationEntityPage,
|
|
55
|
+
OperationEntityPicker,
|
|
54
56
|
OperationPicker,
|
|
55
57
|
OperationResultView,
|
|
56
58
|
OperationScheduleDialog,
|
package/dist/rpc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rpc.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|