@flanksource/clicky-ui 0.3.34 → 0.3.35
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 +4 -0
- package/dist/ai.cjs +3 -0
- package/dist/ai.cjs.map +1 -1
- package/dist/ai.js +3 -0
- package/dist/ai.js.map +1 -1
- package/dist/comments/CommentCard.d.ts +1 -1
- package/dist/comments/CommentProvider.d.ts +1 -1
- package/dist/comments/CommentThread.d.ts +1 -1
- package/dist/comments/CommentThreadList.d.ts +1 -1
- package/dist/comments/MentionTextarea.d.ts +1 -1
- package/dist/comments/comment-context.d.ts +4 -4
- package/dist/comments/comment-fixtures.d.ts +1 -1
- package/dist/comments/comment-types.d.ts +1 -1
- package/dist/components/AccordionList.d.ts +1 -1
- package/dist/components/ComboboxControl.d.ts +1 -1
- package/dist/components/ComboboxMenu.d.ts +2 -2
- package/dist/components/ComboboxTags.cjs +41 -11
- package/dist/components/ComboboxTags.cjs.map +1 -1
- package/dist/components/ComboboxTags.d.ts +6 -0
- package/dist/components/ComboboxTags.d.ts.map +1 -1
- package/dist/components/ComboboxTags.js +41 -11
- package/dist/components/ComboboxTags.js.map +1 -1
- package/dist/components/DateField.d.ts +3 -3
- package/dist/components/DatePicker.d.ts +3 -3
- package/dist/components/DateTimePicker.d.ts +3 -3
- package/dist/components/ErrorWrapper.d.ts +2 -2
- package/dist/components/Field.d.ts +1 -1
- package/dist/components/FilterBar.d.ts +1 -1
- package/dist/components/FormLookupProvider.d.ts +1 -1
- package/dist/components/FormatOptionsDropdown.d.ts +1 -1
- package/dist/components/IconButton.d.ts +3 -3
- package/dist/components/InputField.d.ts +2 -2
- package/dist/components/ItemActions.d.ts +1 -1
- package/dist/components/JsonSchemaForm.cjs +17 -36
- 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 +17 -36
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/ListMenu.d.ts +1 -1
- package/dist/components/MultiSelect.d.ts +1 -1
- package/dist/components/SearchInput.d.ts +1 -1
- package/dist/components/SegmentedControl.d.ts +1 -1
- package/dist/components/SplitButton.d.ts +1 -1
- package/dist/components/Switch.d.ts +1 -1
- package/dist/components/TreePickerField.cjs +11 -2
- package/dist/components/TreePickerField.cjs.map +1 -1
- package/dist/components/TreePickerField.d.ts +13 -4
- package/dist/components/TreePickerField.d.ts.map +1 -1
- package/dist/components/TreePickerField.js +11 -2
- package/dist/components/TreePickerField.js.map +1 -1
- package/dist/components/UnitStepControls.d.ts +1 -1
- package/dist/components/button.d.ts +3 -3
- package/dist/components/combobox-types.d.ts +1 -1
- package/dist/components/density-switcher.d.ts +1 -1
- package/dist/components/filter-bar-context.d.ts +1 -1
- package/dist/components/filter-bar-field-utils.d.ts +2 -2
- package/dist/components/form-lookup-context.d.ts +1 -1
- package/dist/components/icon-menu-picker.d.ts +1 -1
- package/dist/components/json-schema-form-accordion-array.cjs +44 -21
- package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
- package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-accordion-array.js +47 -24
- package/dist/components/json-schema-form-accordion-array.js.map +1 -1
- package/dist/components/json-schema-form-array.cjs +53 -30
- 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 +54 -31
- package/dist/components/json-schema-form-array.js.map +1 -1
- package/dist/components/json-schema-form-cards-array.cjs +32 -22
- package/dist/components/json-schema-form-cards-array.cjs.map +1 -1
- package/dist/components/json-schema-form-cards-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-cards-array.js +33 -23
- package/dist/components/json-schema-form-cards-array.js.map +1 -1
- package/dist/components/json-schema-form-collection-layouts.fixtures.d.ts +44 -0
- package/dist/components/json-schema-form-collection-layouts.fixtures.d.ts.map +1 -0
- package/dist/components/json-schema-form-discriminator.d.ts +1 -1
- package/dist/components/json-schema-form-errors.cjs +5 -1
- package/dist/components/json-schema-form-errors.cjs.map +1 -1
- package/dist/components/json-schema-form-errors.d.ts +2 -1
- package/dist/components/json-schema-form-errors.d.ts.map +1 -1
- package/dist/components/json-schema-form-errors.js +6 -2
- package/dist/components/json-schema-form-errors.js.map +1 -1
- package/dist/components/json-schema-form-extensions.d.ts +1 -1
- package/dist/components/json-schema-form-filter-input.cjs +50 -0
- package/dist/components/json-schema-form-filter-input.cjs.map +1 -0
- package/dist/components/json-schema-form-filter-input.d.ts +5 -0
- package/dist/components/json-schema-form-filter-input.d.ts.map +1 -0
- package/dist/components/json-schema-form-filter-input.js +50 -0
- package/dist/components/json-schema-form-filter-input.js.map +1 -0
- package/dist/components/json-schema-form-filter.cjs +49 -0
- package/dist/components/json-schema-form-filter.cjs.map +1 -0
- package/dist/components/json-schema-form-filter.d.ts +8 -0
- package/dist/components/json-schema-form-filter.d.ts.map +1 -0
- package/dist/components/json-schema-form-filter.js +49 -0
- package/dist/components/json-schema-form-filter.js.map +1 -0
- package/dist/components/json-schema-form-layout.cjs +84 -17
- package/dist/components/json-schema-form-layout.cjs.map +1 -1
- package/dist/components/json-schema-form-layout.d.ts +1 -1
- package/dist/components/json-schema-form-layout.d.ts.map +1 -1
- package/dist/components/json-schema-form-layout.js +84 -17
- package/dist/components/json-schema-form-layout.js.map +1 -1
- package/dist/components/json-schema-form-list-array.cjs +16 -5
- package/dist/components/json-schema-form-list-array.cjs.map +1 -1
- package/dist/components/json-schema-form-list-array.d.ts +2 -1
- package/dist/components/json-schema-form-list-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-list-array.js +16 -5
- package/dist/components/json-schema-form-list-array.js.map +1 -1
- package/dist/components/json-schema-form-object.cjs +239 -85
- package/dist/components/json-schema-form-object.cjs.map +1 -1
- package/dist/components/json-schema-form-object.d.ts +2 -2
- package/dist/components/json-schema-form-object.d.ts.map +1 -1
- package/dist/components/json-schema-form-object.js +241 -87
- package/dist/components/json-schema-form-object.js.map +1 -1
- package/dist/components/json-schema-form-preferences.cjs +1 -1
- package/dist/components/json-schema-form-preferences.cjs.map +1 -1
- package/dist/components/json-schema-form-preferences.d.ts +1 -1
- package/dist/components/json-schema-form-preferences.d.ts.map +1 -1
- package/dist/components/json-schema-form-preferences.js +1 -1
- package/dist/components/json-schema-form-preferences.js.map +1 -1
- package/dist/components/json-schema-form-properties-errors.fixtures.d.ts +14 -0
- package/dist/components/json-schema-form-properties-errors.fixtures.d.ts.map +1 -0
- package/dist/components/json-schema-form-properties-size.cjs +19 -0
- package/dist/components/json-schema-form-properties-size.cjs.map +1 -0
- package/dist/components/json-schema-form-properties-size.d.ts +4 -0
- package/dist/components/json-schema-form-properties-size.d.ts.map +1 -0
- package/dist/components/json-schema-form-properties-size.js +19 -0
- package/dist/components/json-schema-form-properties-size.js.map +1 -0
- package/dist/components/json-schema-form-properties.cjs +305 -0
- package/dist/components/json-schema-form-properties.cjs.map +1 -0
- package/dist/components/json-schema-form-properties.d.ts +20 -0
- package/dist/components/json-schema-form-properties.d.ts.map +1 -0
- package/dist/components/json-schema-form-properties.fixtures.d.ts +157 -0
- package/dist/components/json-schema-form-properties.fixtures.d.ts.map +1 -0
- package/dist/components/json-schema-form-properties.js +305 -0
- package/dist/components/json-schema-form-properties.js.map +1 -0
- package/dist/components/json-schema-form-property-actions-context.cjs +6 -0
- package/dist/components/json-schema-form-property-actions-context.cjs.map +1 -0
- package/dist/components/json-schema-form-property-actions-context.d.ts +2 -0
- package/dist/components/json-schema-form-property-actions-context.d.ts.map +1 -0
- package/dist/components/json-schema-form-property-actions-context.js +6 -0
- package/dist/components/json-schema-form-property-actions-context.js.map +1 -0
- package/dist/components/json-schema-form-property-collection.cjs +31 -0
- package/dist/components/json-schema-form-property-collection.cjs.map +1 -0
- package/dist/components/json-schema-form-property-collection.d.ts +6 -0
- package/dist/components/json-schema-form-property-collection.d.ts.map +1 -0
- package/dist/components/json-schema-form-property-collection.js +31 -0
- package/dist/components/json-schema-form-property-collection.js.map +1 -0
- package/dist/components/json-schema-form-property-draft.cjs +45 -0
- package/dist/components/json-schema-form-property-draft.cjs.map +1 -0
- package/dist/components/json-schema-form-property-draft.d.ts +8 -0
- package/dist/components/json-schema-form-property-draft.d.ts.map +1 -0
- package/dist/components/json-schema-form-property-draft.js +45 -0
- package/dist/components/json-schema-form-property-draft.js.map +1 -0
- package/dist/components/json-schema-form-property-preview.cjs +68 -0
- package/dist/components/json-schema-form-property-preview.cjs.map +1 -0
- package/dist/components/json-schema-form-property-preview.d.ts +7 -0
- package/dist/components/json-schema-form-property-preview.d.ts.map +1 -0
- package/dist/components/json-schema-form-property-preview.js +68 -0
- package/dist/components/json-schema-form-property-preview.js.map +1 -0
- package/dist/components/json-schema-form-property-selection.cjs +89 -0
- package/dist/components/json-schema-form-property-selection.cjs.map +1 -0
- package/dist/components/json-schema-form-property-selection.d.ts +6 -0
- package/dist/components/json-schema-form-property-selection.d.ts.map +1 -0
- package/dist/components/json-schema-form-property-selection.js +89 -0
- package/dist/components/json-schema-form-property-selection.js.map +1 -0
- package/dist/components/json-schema-form-render.cjs +41 -4
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +42 -5
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +2 -0
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +2 -0
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-runtime-types.d.ts +222 -0
- package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -0
- package/dist/components/json-schema-form-table-array.cjs +82 -51
- package/dist/components/json-schema-form-table-array.cjs.map +1 -1
- package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.js +84 -53
- package/dist/components/json-schema-form-table-array.js.map +1 -1
- package/dist/components/json-schema-form-template-menu.d.ts +1 -1
- package/dist/components/json-schema-form-template.d.ts +1 -1
- package/dist/components/json-schema-form-types.d.ts +7 -179
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.cjs +10 -9
- package/dist/components/json-schema-form-utils.cjs.map +1 -1
- package/dist/components/json-schema-form-utils.d.ts +11 -1
- package/dist/components/json-schema-form-utils.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.js +10 -9
- package/dist/components/json-schema-form-utils.js.map +1 -1
- package/dist/components/loading.d.ts +4 -4
- package/dist/components/mdx-editor-callout.d.ts +1 -1
- package/dist/components/mdx-editor-options.d.ts +1 -1
- package/dist/components/select.d.ts +3 -3
- package/dist/components/theme-switcher.d.ts +1 -1
- package/dist/components/use-list-menu-selection.d.ts +1 -1
- package/dist/components/useComboboxLayout.d.ts +1 -1
- package/dist/components/workload-picker-utils.d.ts +1 -1
- package/dist/data/Avatar.d.ts +1 -1
- package/dist/data/AvatarBadge.d.ts +1 -1
- package/dist/data/Badge.d.ts +1 -1
- package/dist/data/Callout.d.ts +1 -1
- package/dist/data/DataTable.cjs +575 -435
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +21 -13
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.grouping.d.ts +1 -1
- package/dist/data/DataTable.js +575 -435
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/ExecutionTree.d.ts +1 -1
- package/dist/data/FilterPill.d.ts +1 -1
- package/dist/data/FixtureEditor/RawFenceEditor.d.ts +1 -1
- package/dist/data/FixtureEditor/types.d.ts +1 -1
- package/dist/data/Gauge.d.ts +1 -1
- package/dist/data/GaugeHoverCard.d.ts +1 -1
- package/dist/data/Icon.d.ts +1 -1
- package/dist/data/KeyValueList.d.ts +1 -1
- package/dist/data/MarkdownEditor.d.ts +1 -1
- package/dist/data/MatrixTable.d.ts +1 -1
- package/dist/data/ObjectGraph.d.ts +1 -1
- package/dist/data/ProgressBars.d.ts +1 -1
- package/dist/data/Properties.cjs +86 -35
- package/dist/data/Properties.cjs.map +1 -1
- package/dist/data/Properties.d.ts +2 -2
- package/dist/data/Properties.d.ts.map +1 -1
- package/dist/data/Properties.js +87 -36
- package/dist/data/Properties.js.map +1 -1
- package/dist/data/RadialGauge.d.ts +1 -1
- package/dist/data/SchemaViewer.d.ts +1 -1
- package/dist/data/SortableHeader.d.ts +1 -1
- package/dist/data/StatStrip.d.ts +1 -1
- package/dist/data/StatusBreakdown.d.ts +1 -1
- package/dist/data/TabButton.d.ts +1 -1
- package/dist/data/TaskManager.cjs +9 -17
- package/dist/data/TaskManager.cjs.map +1 -1
- package/dist/data/TaskManager.d.ts.map +1 -1
- package/dist/data/TaskManager.js +9 -17
- package/dist/data/TaskManager.js.map +1 -1
- package/dist/data/TaskManagerButton.cjs +17 -34
- package/dist/data/TaskManagerButton.cjs.map +1 -1
- package/dist/data/TaskManagerButton.d.ts.map +1 -1
- package/dist/data/TaskManagerButton.js +18 -35
- package/dist/data/TaskManagerButton.js.map +1 -1
- package/dist/data/TaskProcessDetails.cjs +5 -26
- package/dist/data/TaskProcessDetails.cjs.map +1 -1
- package/dist/data/TaskProcessDetails.d.ts +2 -1
- package/dist/data/TaskProcessDetails.d.ts.map +1 -1
- package/dist/data/TaskProcessDetails.js +5 -26
- package/dist/data/TaskProcessDetails.js.map +1 -1
- package/dist/data/TaskProgress.cjs +24 -15
- package/dist/data/TaskProgress.cjs.map +1 -1
- package/dist/data/TaskProgress.d.ts +2 -1
- package/dist/data/TaskProgress.d.ts.map +1 -1
- package/dist/data/TaskProgress.js +24 -15
- package/dist/data/TaskProgress.js.map +1 -1
- package/dist/data/TaskResourceReadings.cjs +42 -0
- package/dist/data/TaskResourceReadings.cjs.map +1 -0
- package/dist/data/TaskResourceReadings.d.ts +6 -0
- package/dist/data/TaskResourceReadings.d.ts.map +1 -0
- package/dist/data/TaskResourceReadings.js +42 -0
- package/dist/data/TaskResourceReadings.js.map +1 -0
- package/dist/data/TaskSnapshot.cjs.map +1 -1
- package/dist/data/TaskSnapshot.d.ts +14 -1
- package/dist/data/TaskSnapshot.d.ts.map +1 -1
- package/dist/data/TaskSnapshot.js.map +1 -1
- package/dist/data/Timeline.d.ts +1 -1
- package/dist/data/Tree.d.ts +1 -1
- package/dist/data/TreeGroupHeader.d.ts +1 -1
- package/dist/data/TreeNode.d.ts +1 -1
- package/dist/data/Version.d.ts +3 -3
- package/dist/data/ai/ChatWindow.cjs +22 -12
- package/dist/data/ai/ChatWindow.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.js +22 -12
- package/dist/data/ai/ChatWindow.js.map +1 -1
- package/dist/data/ai/ChatWindow.test-utils.d.ts +4 -2
- package/dist/data/ai/ChatWindow.test-utils.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.types.d.ts +1 -1
- package/dist/data/ai/ChatWindowManager.cjs +2 -0
- package/dist/data/ai/ChatWindowManager.cjs.map +1 -1
- package/dist/data/ai/ChatWindowManager.d.ts +1 -1
- package/dist/data/ai/ChatWindowManager.d.ts.map +1 -1
- package/dist/data/ai/ChatWindowManager.js +2 -0
- package/dist/data/ai/ChatWindowManager.js.map +1 -1
- package/dist/data/ai/PolicyTree.d.ts +1 -1
- package/dist/data/ai/PromptCatalog/PromptPageHeader.d.ts +1 -1
- package/dist/data/ai/PromptCatalog/types.d.ts +1 -1
- package/dist/data/ai/PromptRunEditor/index.cjs +4 -0
- package/dist/data/ai/PromptRunEditor/index.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.d.ts +5 -2
- package/dist/data/ai/PromptRunEditor/index.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.js +4 -0
- package/dist/data/ai/PromptRunEditor/index.js.map +1 -1
- package/dist/data/ai/SessionChatComposer.d.ts +1 -1
- package/dist/data/ai/SessionInspector.approvals.cjs +147 -0
- package/dist/data/ai/SessionInspector.approvals.cjs.map +1 -0
- package/dist/data/ai/SessionInspector.approvals.d.ts +21 -0
- package/dist/data/ai/SessionInspector.approvals.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.approvals.js +147 -0
- package/dist/data/ai/SessionInspector.approvals.js.map +1 -0
- package/dist/data/ai/SessionInspector.cjs +21 -8
- package/dist/data/ai/SessionInspector.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.d.ts +6 -2
- package/dist/data/ai/SessionInspector.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.hierarchy.d.ts +1 -1
- package/dist/data/ai/SessionInspector.js +21 -8
- package/dist/data/ai/SessionInspector.js.map +1 -1
- package/dist/data/ai/SessionInspector.panel-parts.cjs +47 -0
- package/dist/data/ai/SessionInspector.panel-parts.cjs.map +1 -0
- package/dist/data/ai/SessionInspector.panel-parts.d.ts +20 -0
- package/dist/data/ai/SessionInspector.panel-parts.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.panel-parts.js +47 -0
- package/dist/data/ai/SessionInspector.panel-parts.js.map +1 -0
- package/dist/data/ai/SessionInspector.panels.cjs +40 -99
- package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.panels.d.ts +3 -1
- package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.panels.js +12 -71
- package/dist/data/ai/SessionInspector.panels.js.map +1 -1
- package/dist/data/ai/SessionViewer.d.ts +1 -1
- package/dist/data/ai/SessionViewer.rows.d.ts +1 -1
- package/dist/data/ai/SessionViewer.tool-details.d.ts +1 -1
- package/dist/data/ai/SessionViewer.unified.d.ts +23 -0
- package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/Footer.d.ts +1 -1
- package/dist/data/ai/SpecRuntimeEditor/Rail.d.ts +1 -1
- package/dist/data/ai/SpecRuntimeEditor/SectionCard.d.ts +1 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.cjs +3 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.d.ts +3 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.js +3 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/fields.d.ts +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.cjs +3 -1
- package/dist/data/ai/SpecRuntimeEditor/index.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts +5 -2
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.js +3 -1
- package/dist/data/ai/SpecRuntimeEditor/index.js.map +1 -1
- package/dist/data/ai/chat-window-context.cjs +1 -0
- package/dist/data/ai/chat-window-context.cjs.map +1 -1
- package/dist/data/ai/chat-window-context.d.ts +13 -5
- package/dist/data/ai/chat-window-context.d.ts.map +1 -1
- package/dist/data/ai/chat-window-context.js +1 -0
- package/dist/data/ai/chat-window-context.js.map +1 -1
- package/dist/data/ai/index.d.ts +2 -1
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/use-session-scroll.d.ts +1 -1
- package/dist/data/cache-browser/adapter.d.ts +1 -1
- package/dist/data/cells/CellFilterActions.d.ts +1 -1
- package/dist/data/cells/EntityCell.d.ts +1 -1
- package/dist/data/cells/tag-utils.d.ts +1 -1
- package/dist/data/chat/Chat.cjs +42 -46
- package/dist/data/chat/Chat.cjs.map +1 -1
- package/dist/data/chat/Chat.d.ts +16 -5
- package/dist/data/chat/Chat.d.ts.map +1 -1
- package/dist/data/chat/Chat.js +43 -47
- package/dist/data/chat/Chat.js.map +1 -1
- package/dist/data/chat/ModelSelector.d.ts +1 -1
- package/dist/data/chat/PromptInput.cjs +13 -0
- package/dist/data/chat/PromptInput.cjs.map +1 -1
- package/dist/data/chat/PromptInput.d.ts +8 -2
- package/dist/data/chat/PromptInput.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.js +14 -1
- package/dist/data/chat/PromptInput.js.map +1 -1
- package/dist/data/chat/tool-render/ToolArgs.d.ts +1 -1
- package/dist/data/chat/tool-render/ToolParams.d.ts +1 -1
- package/dist/data/chat/tool-render/ToolValue.d.ts +1 -1
- package/dist/data/chat/tool-render/adapter.d.ts +1 -1
- package/dist/data/chat/tool-render/context.d.ts +1 -1
- package/dist/data/chat/tool-render/defaults.d.ts +1 -1
- package/dist/data/chat/tool-render/known-tool-views.d.ts +1 -1
- package/dist/data/chat/tool-render/summary.d.ts +1 -1
- package/dist/data/chat/types.d.ts +1 -1
- package/dist/data/clicky-export/useClickyExport.d.ts +1 -1
- package/dist/data/data-table-server-filters.d.ts +1 -1
- package/dist/data/diagnostics/DiagnosticsDetailPanel.d.ts +1 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts +1 -1
- package/dist/data/diagnostics/StackFrameRow.d.ts +1 -1
- package/dist/data/git/GitChangeList.d.ts +1 -1
- package/dist/data/icon-fallback.d.ts +1 -1
- package/dist/data/properties-context.cjs +6 -0
- package/dist/data/properties-context.cjs.map +1 -0
- package/dist/data/properties-context.d.ts +7 -0
- package/dist/data/properties-context.d.ts.map +1 -0
- package/dist/data/properties-context.js +6 -0
- package/dist/data/properties-context.js.map +1 -0
- package/dist/data/query-browser/QueryBrowser.types.d.ts +1 -1
- package/dist/data/runtime/RuntimeBar.cjs +7 -3
- package/dist/data/runtime/RuntimeBar.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBar.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBar.js +7 -3
- package/dist/data/runtime/RuntimeBar.js.map +1 -1
- package/dist/data/task-copy.cjs +1 -1
- package/dist/data/task-copy.cjs.map +1 -1
- package/dist/data/task-copy.js +1 -1
- package/dist/data/task-copy.js.map +1 -1
- package/dist/data/task-resource-summary.cjs +30 -0
- package/dist/data/task-resource-summary.cjs.map +1 -0
- package/dist/data/task-resource-summary.d.ts +15 -0
- package/dist/data/task-resource-summary.d.ts.map +1 -0
- package/dist/data/task-resource-summary.js +30 -0
- package/dist/data/task-resource-summary.js.map +1 -0
- package/dist/data/task-status.cjs +8 -2
- package/dist/data/task-status.cjs.map +1 -1
- package/dist/data/task-status.d.ts +3 -0
- package/dist/data/task-status.d.ts.map +1 -1
- package/dist/data/task-status.js +8 -2
- package/dist/data/task-status.js.map +1 -1
- package/dist/data/task-work-progress.cjs +24 -0
- package/dist/data/task-work-progress.cjs.map +1 -0
- package/dist/data/task-work-progress.d.ts +21 -0
- package/dist/data/task-work-progress.d.ts.map +1 -0
- package/dist/data/task-work-progress.js +24 -0
- package/dist/data/task-work-progress.js.map +1 -0
- package/dist/data/test-runner/TestRunner.d.ts +1 -1
- package/dist/data/test-runner/adapter.d.ts +1 -1
- package/dist/data/test-runner/context.d.ts +1 -1
- package/dist/data/use-data-table-virtual.cjs +73 -0
- package/dist/data/use-data-table-virtual.cjs.map +1 -0
- package/dist/data/use-data-table-virtual.d.ts +40 -0
- package/dist/data/use-data-table-virtual.d.ts.map +1 -0
- package/dist/data/use-data-table-virtual.js +73 -0
- package/dist/data/use-data-table-virtual.js.map +1 -0
- package/dist/data/verification/VerificationResults.d.ts +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/expressions/lang/attributes.cjs +56 -0
- package/dist/expressions/lang/attributes.cjs.map +1 -0
- package/dist/expressions/lang/attributes.d.ts +22 -0
- package/dist/expressions/lang/attributes.d.ts.map +1 -0
- package/dist/expressions/lang/attributes.js +56 -0
- package/dist/expressions/lang/attributes.js.map +1 -0
- package/dist/expressions/lang/completion.cjs +164 -0
- package/dist/expressions/lang/completion.cjs.map +1 -0
- package/dist/expressions/lang/completion.d.ts +29 -0
- package/dist/expressions/lang/completion.d.ts.map +1 -0
- package/dist/expressions/lang/completion.js +164 -0
- package/dist/expressions/lang/completion.js.map +1 -0
- package/dist/expressions/lang/environment.cjs +115 -0
- package/dist/expressions/lang/environment.cjs.map +1 -0
- package/dist/expressions/lang/environment.d.ts +54 -0
- package/dist/expressions/lang/environment.d.ts.map +1 -0
- package/dist/expressions/lang/environment.js +115 -0
- package/dist/expressions/lang/environment.js.map +1 -0
- package/dist/expressions/lang/generated/conformance.json.d.ts +4962 -0
- package/dist/expressions/lang/generated/index.cjs +18 -0
- package/dist/expressions/lang/generated/index.cjs.map +1 -0
- package/dist/expressions/lang/generated/index.d.ts +9 -0
- package/dist/expressions/lang/generated/index.d.ts.map +1 -0
- package/dist/expressions/lang/generated/index.js +18 -0
- package/dist/expressions/lang/generated/index.js.map +1 -0
- package/dist/expressions/lang/generated/languages.json.cjs +18 -0
- package/dist/expressions/lang/generated/languages.json.cjs.map +1 -0
- package/dist/expressions/lang/generated/languages.json.d.ts +2305 -0
- package/dist/expressions/lang/generated/languages.json.js +18 -0
- package/dist/expressions/lang/generated/languages.json.js.map +1 -0
- package/dist/expressions/lang/generated/spec.json.cjs +12 -0
- package/dist/expressions/lang/generated/spec.json.cjs.map +1 -0
- package/dist/expressions/lang/generated/spec.json.d.ts +6260 -0
- package/dist/expressions/lang/generated/spec.json.js +12 -0
- package/dist/expressions/lang/generated/spec.json.js.map +1 -0
- package/dist/expressions/lang/hover.cjs +106 -0
- package/dist/expressions/lang/hover.cjs.map +1 -0
- package/dist/expressions/lang/hover.d.ts +54 -0
- package/dist/expressions/lang/hover.d.ts.map +1 -0
- package/dist/expressions/lang/hover.js +106 -0
- package/dist/expressions/lang/hover.js.map +1 -0
- package/dist/expressions/lang/index.cjs +87 -0
- package/dist/expressions/lang/index.cjs.map +1 -0
- package/dist/expressions/lang/index.d.ts +65 -0
- package/dist/expressions/lang/index.d.ts.map +1 -0
- package/dist/expressions/lang/index.js +90 -0
- package/dist/expressions/lang/index.js.map +1 -0
- package/dist/expressions/lang/merge.cjs +52 -0
- package/dist/expressions/lang/merge.cjs.map +1 -0
- package/dist/expressions/lang/merge.d.ts +12 -0
- package/dist/expressions/lang/merge.d.ts.map +1 -0
- package/dist/expressions/lang/merge.js +52 -0
- package/dist/expressions/lang/merge.js.map +1 -0
- package/dist/expressions/lang/prefix.cjs +91 -0
- package/dist/expressions/lang/prefix.cjs.map +1 -0
- package/dist/expressions/lang/prefix.d.ts +36 -0
- package/dist/expressions/lang/prefix.d.ts.map +1 -0
- package/dist/expressions/lang/prefix.js +91 -0
- package/dist/expressions/lang/prefix.js.map +1 -0
- package/dist/expressions/lang/spec.d.ts +13 -0
- package/dist/expressions/lang/spec.d.ts.map +1 -0
- package/dist/expressions/lang/theme.cjs +97 -0
- package/dist/expressions/lang/theme.cjs.map +1 -0
- package/dist/expressions/lang/theme.d.ts +6 -0
- package/dist/expressions/lang/theme.d.ts.map +1 -0
- package/dist/expressions/lang/theme.js +97 -0
- package/dist/expressions/lang/theme.js.map +1 -0
- package/dist/expressions/lang/types.d.ts +81 -0
- package/dist/expressions/lang/types.d.ts.map +1 -0
- package/dist/expressions/playground/ExpressionPlayground.cjs +308 -0
- package/dist/expressions/playground/ExpressionPlayground.cjs.map +1 -0
- package/dist/expressions/playground/ExpressionPlayground.d.ts +42 -0
- package/dist/expressions/playground/ExpressionPlayground.d.ts.map +1 -0
- package/dist/expressions/playground/ExpressionPlayground.js +291 -0
- package/dist/expressions/playground/ExpressionPlayground.js.map +1 -0
- package/dist/expressions/playground/RunControls.cjs +51 -0
- package/dist/expressions/playground/RunControls.cjs.map +1 -0
- package/dist/expressions/playground/RunControls.d.ts +7 -0
- package/dist/expressions/playground/RunControls.d.ts.map +1 -0
- package/dist/expressions/playground/RunControls.js +51 -0
- package/dist/expressions/playground/RunControls.js.map +1 -0
- package/dist/expressions/playground/VerticalSplit.cjs +109 -0
- package/dist/expressions/playground/VerticalSplit.cjs.map +1 -0
- package/dist/expressions/playground/VerticalSplit.d.ts +23 -0
- package/dist/expressions/playground/VerticalSplit.d.ts.map +1 -0
- package/dist/expressions/playground/VerticalSplit.js +109 -0
- package/dist/expressions/playground/VerticalSplit.js.map +1 -0
- package/dist/expressions/playground/api.cjs +49 -0
- package/dist/expressions/playground/api.cjs.map +1 -0
- package/dist/expressions/playground/api.d.ts +53 -0
- package/dist/expressions/playground/api.d.ts.map +1 -0
- package/dist/expressions/playground/api.js +49 -0
- package/dist/expressions/playground/api.js.map +1 -0
- package/dist/expressions/playground/languages.cjs +88 -0
- package/dist/expressions/playground/languages.cjs.map +1 -0
- package/dist/expressions/playground/languages.d.ts +43 -0
- package/dist/expressions/playground/languages.d.ts.map +1 -0
- package/dist/expressions/playground/languages.js +88 -0
- package/dist/expressions/playground/languages.js.map +1 -0
- package/dist/expressions/playground/panels/GraphPanel.cjs +72 -0
- package/dist/expressions/playground/panels/GraphPanel.cjs.map +1 -0
- package/dist/expressions/playground/panels/GraphPanel.d.ts +19 -0
- package/dist/expressions/playground/panels/GraphPanel.d.ts.map +1 -0
- package/dist/expressions/playground/panels/GraphPanel.js +72 -0
- package/dist/expressions/playground/panels/GraphPanel.js.map +1 -0
- package/dist/expressions/playground/panels/ResultPanel.cjs +82 -0
- package/dist/expressions/playground/panels/ResultPanel.cjs.map +1 -0
- package/dist/expressions/playground/panels/ResultPanel.d.ts +11 -0
- package/dist/expressions/playground/panels/ResultPanel.d.ts.map +1 -0
- package/dist/expressions/playground/panels/ResultPanel.js +82 -0
- package/dist/expressions/playground/panels/ResultPanel.js.map +1 -0
- package/dist/expressions/playground/panels/SpecPanel.cjs +76 -0
- package/dist/expressions/playground/panels/SpecPanel.cjs.map +1 -0
- package/dist/expressions/playground/panels/SpecPanel.d.ts +18 -0
- package/dist/expressions/playground/panels/SpecPanel.d.ts.map +1 -0
- package/dist/expressions/playground/panels/SpecPanel.js +76 -0
- package/dist/expressions/playground/panels/SpecPanel.js.map +1 -0
- package/dist/expressions/playground/panels/TokensPanel.cjs +89 -0
- package/dist/expressions/playground/panels/TokensPanel.cjs.map +1 -0
- package/dist/expressions/playground/panels/TokensPanel.d.ts +15 -0
- package/dist/expressions/playground/panels/TokensPanel.d.ts.map +1 -0
- package/dist/expressions/playground/panels/TokensPanel.js +72 -0
- package/dist/expressions/playground/panels/TokensPanel.js.map +1 -0
- package/dist/expressions/playground/panels/graphNodes.cjs +35 -0
- package/dist/expressions/playground/panels/graphNodes.cjs.map +1 -0
- package/dist/expressions/playground/panels/graphNodes.d.ts +19 -0
- package/dist/expressions/playground/panels/graphNodes.d.ts.map +1 -0
- package/dist/expressions/playground/panels/graphNodes.js +35 -0
- package/dist/expressions/playground/panels/graphNodes.js.map +1 -0
- package/dist/expressions/playground/runAction.cjs +12 -0
- package/dist/expressions/playground/runAction.cjs.map +1 -0
- package/dist/expressions/playground/runAction.d.ts +15 -0
- package/dist/expressions/playground/runAction.d.ts.map +1 -0
- package/dist/expressions/playground/runAction.js +12 -0
- package/dist/expressions/playground/runAction.js.map +1 -0
- package/dist/expressions/playground/runShortcut.cjs +9 -0
- package/dist/expressions/playground/runShortcut.cjs.map +1 -0
- package/dist/expressions/playground/runShortcut.d.ts +2 -0
- package/dist/expressions/playground/runShortcut.d.ts.map +1 -0
- package/dist/expressions/playground/runShortcut.js +9 -0
- package/dist/expressions/playground/runShortcut.js.map +1 -0
- package/dist/expressions/playground/useEditorTheme.cjs +40 -0
- package/dist/expressions/playground/useEditorTheme.cjs.map +1 -0
- package/dist/expressions/playground/useEditorTheme.d.ts +16 -0
- package/dist/expressions/playground/useEditorTheme.d.ts.map +1 -0
- package/dist/expressions/playground/useEditorTheme.js +23 -0
- package/dist/expressions/playground/useEditorTheme.js.map +1 -0
- package/dist/expressions/playground/useEvaluator.cjs +72 -0
- package/dist/expressions/playground/useEvaluator.cjs.map +1 -0
- package/dist/expressions/playground/useEvaluator.d.ts +25 -0
- package/dist/expressions/playground/useEvaluator.d.ts.map +1 -0
- package/dist/expressions/playground/useEvaluator.js +72 -0
- package/dist/expressions/playground/useEvaluator.js.map +1 -0
- package/dist/expressions/playground/useParsedInput.cjs +22 -0
- package/dist/expressions/playground/useParsedInput.cjs.map +1 -0
- package/dist/expressions/playground/useParsedInput.d.ts +20 -0
- package/dist/expressions/playground/useParsedInput.d.ts.map +1 -0
- package/dist/expressions/playground/useParsedInput.js +22 -0
- package/dist/expressions/playground/useParsedInput.js.map +1 -0
- package/dist/expressions/playground/verticalSplitModel.cjs +11 -0
- package/dist/expressions/playground/verticalSplitModel.cjs.map +1 -0
- package/dist/expressions/playground/verticalSplitModel.d.ts +3 -0
- package/dist/expressions/playground/verticalSplitModel.d.ts.map +1 -0
- package/dist/expressions/playground/verticalSplitModel.js +11 -0
- package/dist/expressions/playground/verticalSplitModel.js.map +1 -0
- package/dist/expressions/playground.cjs +18 -0
- package/dist/expressions/playground.cjs.map +1 -0
- package/dist/expressions/playground.d.ts +18 -0
- package/dist/expressions/playground.d.ts.map +1 -0
- package/dist/expressions/playground.js +18 -0
- package/dist/expressions/playground.js.map +1 -0
- package/dist/expressions.cjs +28 -0
- package/dist/expressions.cjs.map +1 -0
- package/dist/expressions.d.ts +10 -0
- package/dist/expressions.d.ts.map +1 -0
- package/dist/expressions.js +28 -0
- package/dist/expressions.js.map +1 -0
- package/dist/hooks/density-provider.d.ts +1 -1
- package/dist/hooks/theme-provider.d.ts +1 -1
- package/dist/hooks/use-density.d.ts +1 -1
- package/dist/hooks/use-resource-clock.cjs +14 -0
- package/dist/hooks/use-resource-clock.cjs.map +1 -0
- package/dist/hooks/use-resource-clock.d.ts +2 -0
- package/dist/hooks/use-resource-clock.d.ts.map +1 -0
- package/dist/hooks/use-resource-clock.js +14 -0
- package/dist/hooks/use-resource-clock.js.map +1 -0
- package/dist/hooks/use-task-run.cjs +12 -3
- 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 +12 -3
- package/dist/hooks/use-task-run.js.map +1 -1
- package/dist/hooks/use-theme.d.ts +1 -1
- package/dist/icons/registry.d.ts +1 -1
- package/dist/icons/types.d.ts +1 -1
- package/dist/layout/AppShell.d.ts +1 -1
- package/dist/layout/AppShell.nav.drag.d.ts +1 -1
- package/dist/layout/AppSidebar.d.ts +1 -1
- package/dist/layout/Panel.d.ts +1 -1
- package/dist/layout/PanelFrame.d.ts +1 -1
- package/dist/layout/Section.d.ts +1 -1
- package/dist/layout/SplitPane.d.ts +1 -1
- package/dist/layout/Tabs.d.ts +1 -1
- package/dist/layout/Workspace.d.ts +1 -1
- package/dist/layout/Workspace.model.d.ts +1 -1
- package/dist/lib/combobox-values.d.ts +1 -1
- package/dist/monaco/MonacoEditor.cjs +3 -3
- package/dist/monaco/MonacoEditor.cjs.map +1 -1
- package/dist/monaco/MonacoEditor.js +2 -2
- package/dist/monaco/MonacoEditor.js.map +1 -1
- package/dist/monaco/types.d.ts +1 -1
- package/dist/monaco/use-monaco-worker.d.ts +1 -1
- package/dist/overlay/CellActions.d.ts +1 -1
- package/dist/overlay/CommandPalette.d.ts +2 -2
- package/dist/overlay/CommandPalette.model.d.ts +1 -1
- package/dist/overlay/CommandPaletteList.d.ts +1 -1
- package/dist/overlay/DropdownMenu.d.ts +1 -1
- package/dist/overlay/HoverCard.d.ts +1 -1
- package/dist/overlay/Modal.d.ts +2 -2
- package/dist/overlay/Toast.d.ts +1 -1
- package/dist/overlay/TourCard.d.ts +1 -1
- package/dist/overlay/TourProvider.d.ts +1 -1
- package/dist/overlay/dropdownMenuContext.d.ts +1 -1
- package/dist/overlay/toast-context.d.ts +2 -2
- package/dist/overlay/tour-context.d.ts +1 -1
- package/dist/overlay/tour-types.d.ts +1 -1
- package/dist/profiles/connections/connectionBrowserModel.d.ts +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.d.ts +1 -1
- package/dist/profiles/editor/profileBuilder.d.ts +1 -1
- package/dist/profiles/elasticsearch/esParamOperandExtension.d.ts +1 -1
- package/dist/profiles/fields/profileFieldControls.d.ts +1 -1
- package/dist/profiles/fields/profileFieldIcons.d.ts +1 -1
- package/dist/profiles/fields/profileFieldState.d.ts +1 -1
- package/dist/profiles/query/jsonPathSample.d.ts +1 -1
- package/dist/profiles/query/jsonPathSampleRow.d.ts +1 -1
- package/dist/profiles/query/prometheusResults.d.ts +2 -2
- package/dist/rpc/EndpointList.d.ts +1 -1
- package/dist/rpc/EntityExplorerApp.d.ts +1 -1
- package/dist/rpc/OperationCatalog.d.ts +1 -1
- package/dist/rpc/OperationEntityContextPicker.d.ts +1 -1
- package/dist/rpc/OperationEntityPage.d.ts +1 -1
- package/dist/rpc/OperationResultView.d.ts +1 -1
- package/dist/rpc/RouterProvider.d.ts +1 -1
- package/dist/rpc/SchemaActionForm.d.ts +1 -1
- package/dist/rpc/formMetadata.d.ts +1 -1
- package/dist/rpc/router.d.ts +1 -1
- package/dist/rpc/rpc-story.fixtures.d.ts +1 -1
- package/dist/styles.css +1 -1
- package/package.json +21 -2
|
@@ -23,12 +23,22 @@ export declare const DEFAULT_COLUMN_MIN_WIDTH = "15rem";
|
|
|
23
23
|
export declare function cssLength(value: unknown, fallback: string): string;
|
|
24
24
|
export declare function withSyntheticValue(options: FieldOption[], value: string): FieldOption[];
|
|
25
25
|
export declare function keyPickerOptions(options: FieldOption[], usedKeys: string[], currentKey: string): FieldOption[];
|
|
26
|
-
export declare function matchesFieldFilter(key: string, prop: JsonSchemaProperty, filter: string): boolean;
|
|
27
26
|
export declare function orderByXOrder<T>(entries: [string, T][], order: unknown): [string, T][];
|
|
28
27
|
export declare function orderByClickyOrder(entries: [string, JsonSchemaProperty][]): [string, JsonSchemaProperty][];
|
|
29
28
|
export declare function orderRequiredFirst<T>(entries: [string, T][], required: string[]): [string, T][];
|
|
30
29
|
export declare function isEmptyValue(value: unknown): boolean;
|
|
31
30
|
export declare function orderByPriority<T>(entries: [string, T][], required: string[], values: Record<string, unknown>): [string, T][];
|
|
32
31
|
export declare function softError(field: FieldControl): string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* canAddItem / canRemoveItem read the array's maxItems/minItems bounds.
|
|
34
|
+
*
|
|
35
|
+
* The bounds gate the controls rather than validate the value: an array already
|
|
36
|
+
* at or past a bound offers no way to make it worse, but one that arrives
|
|
37
|
+
* outside its bounds is never trapped — removal stays available above minItems
|
|
38
|
+
* whatever the schema says, and an array the producer owns end to end simply
|
|
39
|
+
* declares min === max and offers neither.
|
|
40
|
+
*/
|
|
41
|
+
export declare function canAddItem(field: FieldControl, count: number): boolean;
|
|
42
|
+
export declare function canRemoveItem(field: FieldControl, count: number): boolean;
|
|
33
43
|
export declare function seedFromSchema(schema: JsonSchemaProperty): unknown;
|
|
34
44
|
//# sourceMappingURL=json-schema-form-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-utils.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAOlC,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAEjD;AAwBD,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAM1E;AAID,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpD;AAKD,wBAAgB,cAAc,CAC5B,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,MAAM,GACd;IACD,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAKA;AAID,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,MAAM,GACd;I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 @@ function keyPickerOptions(options, usedKeys, currentKey) {
|
|
|
68
68
|
const taken = new Set(usedKeys.filter((k) => k !== currentKey));
|
|
69
69
|
return options.filter((o) => !taken.has(o.value));
|
|
70
70
|
}
|
|
71
|
-
function matchesFieldFilter(key, prop, filter) {
|
|
72
|
-
const query = filter.trim().toLowerCase();
|
|
73
|
-
if (!query) return true;
|
|
74
|
-
const label = typeof prop.title === "string" && prop.title ? prop.title : key;
|
|
75
|
-
return key.toLowerCase().includes(query) || label.toLowerCase().includes(query);
|
|
76
|
-
}
|
|
77
71
|
function orderByXOrder(entries, order) {
|
|
78
72
|
if (!Array.isArray(order) || order.length === 0) return entries;
|
|
79
73
|
const rank = new Map(
|
|
@@ -98,8 +92,8 @@ function orderRequiredFirst(entries, required) {
|
|
|
98
92
|
}
|
|
99
93
|
function isEmptyValue(value) {
|
|
100
94
|
if (value === void 0 || value === null || value === "") return true;
|
|
101
|
-
if (Array.isArray(value)) return value.
|
|
102
|
-
if (typeof value === "object") return Object.
|
|
95
|
+
if (Array.isArray(value)) return value.every(isEmptyValue);
|
|
96
|
+
if (typeof value === "object") return Object.values(value).every(isEmptyValue);
|
|
103
97
|
return false;
|
|
104
98
|
}
|
|
105
99
|
function orderByPriority(entries, required, values) {
|
|
@@ -120,6 +114,12 @@ function softError(field) {
|
|
|
120
114
|
}
|
|
121
115
|
return void 0;
|
|
122
116
|
}
|
|
117
|
+
function canAddItem(field, count) {
|
|
118
|
+
return field.maxItems === void 0 || count < field.maxItems;
|
|
119
|
+
}
|
|
120
|
+
function canRemoveItem(field, count) {
|
|
121
|
+
return field.minItems === void 0 || count > field.minItems;
|
|
122
|
+
}
|
|
123
123
|
function seedFromSchema(schema) {
|
|
124
124
|
if (schema.default !== void 0) return schema.default;
|
|
125
125
|
const type = Array.isArray(schema.type) ? schema.type[0] : schema.type;
|
|
@@ -130,6 +130,8 @@ function seedFromSchema(schema) {
|
|
|
130
130
|
}
|
|
131
131
|
export {
|
|
132
132
|
DEFAULT_COLUMN_MIN_WIDTH,
|
|
133
|
+
canAddItem,
|
|
134
|
+
canRemoveItem,
|
|
133
135
|
comboboxAriaProps,
|
|
134
136
|
cssLength,
|
|
135
137
|
defaultPlaceholder,
|
|
@@ -140,7 +142,6 @@ export {
|
|
|
140
142
|
inputClass,
|
|
141
143
|
isEmptyValue,
|
|
142
144
|
keyPickerOptions,
|
|
143
|
-
matchesFieldFilter,
|
|
144
145
|
normalizeColSpan,
|
|
145
146
|
normalizeColumns,
|
|
146
147
|
orderByClickyOrder,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-utils.js","sources":["../../src/components/json-schema-form-utils.ts"],"sourcesContent":["import { cn } from \"../lib/utils\";\nimport { inputSizeClass, type FormSize } from \"./json-schema-form-size\";\nimport type {\n FieldControl,\n FieldOption,\n GridColumns,\n JsonSchemaProperty,\n} from \"./json-schema-form-types\";\n\n// Non-size styling shared by every text-like input box; the size token supplies\n// height, horizontal padding, and text size (see inputSizeClass).\nconst INPUT_BASE =\n \"w-full min-w-0 rounded-md border border-input bg-background text-foreground outline-none placeholder:text-placeholder disabled:cursor-not-allowed disabled:bg-muted/40 focus-visible:ring-2 focus-visible:ring-ring\";\n\nexport function inputClass(size: FormSize): string {\n return cn(INPUT_BASE, inputSizeClass[size]);\n}\n\n// encodeIdPart escapes one path token (or the id prefix) injectively: every\n// character outside [A-Za-z0-9] becomes `_<hex char code>_`, and the empty token\n// — a legal JSON Schema property name — becomes a lone `_`. The escape is\n// self-delimiting (it always starts and ends with `_`, and a literal `_` escapes\n// to `_5f_`), so distinct tokens can never share an encoding and `-` stays free\n// as a segment separator. Percent-encoding was rejected because `%` in an id,\n// while legal HTML, has to be escaped again inside a `#id` CSS selector; this\n// alphabet ([A-Za-z0-9_-]) is safe as-is for `document.querySelector`.\nfunction encodeIdPart(value: string): string {\n if (value === \"\") return \"_\";\n return value.replace(/[^A-Za-z0-9]/g, (char) => `_${char.charCodeAt(0).toString(16)}_`);\n}\n\n// fieldInputId derives a control's DOM id from its JSON-pointer instance path,\n// not from its leaf key: a schema that repeats a property name under two parents\n// (e.g. /journalLine1/asset and /journalLine2/asset) must not produce the same\n// id, or every `label[for]` binds to the first control. Each decoded pointer\n// token is escaped with encodeIdPart and joined with \"-\", so distinct paths\n// always produce distinct ids: \"/asset-class\", \"/asset_class\", \"/asset.class\"\n// and \"/asset/class\" are four different ids, and an empty token is preserved\n// (\"/a//b\" ≠ \"/a/b\"). The prefix is escaped the same way, so prefix \"a\" + \"/b-c\"\n// cannot collide with prefix \"a-b\" + \"/c\".\nexport function fieldInputId(instancePath: string, prefix?: string): string {\n const tokens = instancePath === \"\" ? [] : instancePath.replace(/^\\//, \"\").split(\"/\");\n const safe = tokens\n .map((token) => encodeIdPart(token.replaceAll(\"~1\", \"/\").replaceAll(\"~0\", \"~\")))\n .join(\"-\");\n return prefix ? `jsf-${encodeIdPart(prefix)}-${safe}` : `jsf-${safe}`;\n}\n\n// fieldErrorId names the element that holds a field's validation messages, so a\n// control can point at it with aria-describedby.\nexport function fieldErrorId(fieldId: string): string {\n return `${fieldId}-error`;\n}\n\n// fieldAriaProps is the assistive-technology half of a control: the visual `*`\n// and red message mean nothing to a screen reader on their own, so every\n// editable control spreads these onto its input element.\nexport function fieldAriaProps(\n field: FieldControl,\n fieldId: string,\n): {\n \"aria-required\"?: true;\n \"aria-invalid\"?: true;\n \"aria-describedby\"?: string;\n} {\n return {\n ...(field.required ? { \"aria-required\": true as const } : {}),\n ...(field.invalid ? { \"aria-invalid\": true as const, \"aria-describedby\": fieldErrorId(fieldId) } : {}),\n };\n}\n\n// comboboxAriaProps is the fieldAriaProps equivalent for Combobox, which takes\n// the same state as named props rather than raw aria-* attributes.\nexport function comboboxAriaProps(\n field: FieldControl,\n fieldId: string,\n): { ariaRequired?: true; invalid?: true; describedBy?: string } {\n return {\n ...(field.required ? { ariaRequired: true as const } : {}),\n ...(field.invalid ? { invalid: true as const, describedBy: fieldErrorId(fieldId) } : {}),\n };\n}\n\nexport function defaultPlaceholder(schema: JsonSchemaProperty): string {\n if (schema.default != null && typeof schema.default !== \"object\") return String(schema.default);\n return \"\";\n}\n\nexport function toText(value: unknown): string {\n if (value === undefined || value === null) return \"\";\n if (typeof value === \"object\") return \"\";\n return String(value);\n}\n\n// toStringArray normalises the committed value of a multi-value control. The\n// schema types it as an array of strings, but a form mid-edit can hold anything,\n// so a non-string entry is dropped rather than rendered as a broken tag.\nexport function toStringArray(value: unknown): string[] {\n if (!Array.isArray(value)) return [];\n return value.filter((entry): entry is string => typeof entry === \"string\");\n}\n\n// hasObjectItemProperties reports whether an array's items are objects with a\n// fixed `properties` set — the precondition for both the column-per-property\n// table and the summary-row accordion, which need to know the item's shape.\nexport function hasObjectItemProperties(\n items: JsonSchemaProperty | undefined,\n): boolean {\n return (\n !!items && !!items.properties && Object.keys(items.properties).length > 0\n );\n}\n\n// Object-level `x-columns`: how many equal columns to split a stacked object\n// into. \"auto\" fits as many as the width allows. A number is clamped to [1, 12]\n// (a standard 12-track grid, so a 3-across row of span-4 fields and a 4-across\n// row of span-3 fields share one object); anything invalid is a single column.\nexport function normalizeColumns(value: unknown): GridColumns {\n if (value === \"auto\") return \"auto\";\n const n = typeof value === \"number\" ? value : Number(value);\n if (!Number.isFinite(n) || n < 1) return 1;\n return Math.min(Math.trunc(n), 12);\n}\n\n// Per-field `x-col-span`: how many of the object's columns a field occupies.\n// \"full\" spans the whole row. Under `x-columns: \"auto\"` a numeric span cannot be\n// clamped against a track count that only exists at layout time, so it is capped\n// at the 12-track maximum instead. Invalid falls back to 1.\nexport function normalizeColSpan(\n value: unknown,\n columns: GridColumns,\n): number | \"full\" {\n if (value === \"full\") return \"full\";\n const n = typeof value === \"number\" ? value : Number(value);\n if (!Number.isFinite(n) || n < 1) return 1;\n return Math.min(Math.trunc(n), columns === \"auto\" ? 12 : columns);\n}\n\n// The `x-columns: \"auto\"` column floor: wide enough for a labelled control to\n// stay readable, narrow enough that a 1440px pane gets three columns, not two.\nexport const DEFAULT_COLUMN_MIN_WIDTH = \"15rem\";\n\n// cssLength guards a schema-supplied CSS length before it reaches an inline\n// style. Non-strings (and the empty string) fall back rather than emitting a\n// declaration the browser will drop.\nexport function cssLength(value: unknown, fallback: string): string {\n return typeof value === \"string\" && value.trim() ? value.trim() : fallback;\n}\n\n// withSyntheticValue prepends the current value as an option when it is not in\n// the enum, so an out-of-enum value (e.g. a template token) still displays.\nexport function withSyntheticValue(options: FieldOption[], value: string): FieldOption[] {\n if (!value || options.some((o) => o.value === value)) return options;\n return [{ value, label: value }, ...options];\n}\n\n// keyPickerOptions narrows the map-key enum to keys not already used by another\n// entry, while always keeping this row's current key so it stays selectable.\nexport function keyPickerOptions(\n options: FieldOption[],\n usedKeys: string[],\n currentKey: string,\n): FieldOption[] {\n const taken = new Set(usedKeys.filter((k) => k !== currentKey));\n return options.filter((o) => !taken.has(o.value));\n}\n\n// matchesFieldFilter reports whether a property should stay visible under the\n// display-options field filter: a case-insensitive substring match against the\n// field's key and its display label (`title` when set, otherwise the key). A\n// blank filter matches everything, so an empty box never hides fields.\nexport function matchesFieldFilter(\n key: string,\n prop: JsonSchemaProperty,\n filter: string,\n): boolean {\n const query = filter.trim().toLowerCase();\n if (!query) return true;\n const label = typeof prop.title === \"string\" && prop.title ? prop.title : key;\n return key.toLowerCase().includes(query) || label.toLowerCase().includes(query);\n}\n\n// orderByXOrder reorders property entries by the schema's `x-order` hint: keys\n// named there render first (in that order), the rest keep document order. A\n// missing/empty hint is a no-op, so document order remains the default.\nexport function orderByXOrder<T>(entries: [string, T][], order: unknown): [string, T][] {\n if (!Array.isArray(order) || order.length === 0) return entries;\n const rank = new Map(\n order.filter((k): k is string => typeof k === \"string\").map((k, i) => [k, i]),\n );\n const listed = entries\n .filter(([key]) => rank.has(key))\n .sort((a, b) => rank.get(a[0])! - rank.get(b[0])!);\n const rest = entries.filter(([key]) => !rank.has(key));\n return [...listed, ...rest];\n}\n\n// orderByClickyOrder stably sorts property entries by each property's numeric\n// `x-clicky-order` (lower first); entries without it keep their incoming order\n// after the ordered ones. An explicit index tie-break keeps it stable regardless\n// of the engine's sort stability. Unlike the object-level `x-order` array, this\n// composes across merged if/then branches because each property carries its own\n// order — the right tool when fields come from different (embedded) sources.\nexport function orderByClickyOrder(\n entries: [string, JsonSchemaProperty][],\n): [string, JsonSchemaProperty][] {\n const rank = (prop: JsonSchemaProperty): number => {\n const o = prop[\"x-clicky-order\"];\n return typeof o === \"number\" ? o : Number.POSITIVE_INFINITY;\n };\n return entries\n .map((entry, index) => ({ entry, index, rank: rank(entry[1]) }))\n .sort((a, b) => a.rank - b.rank || a.index - b.index)\n .map((ranked) => ranked.entry);\n}\n\n// orderRequiredFirst stably partitions property entries so the keys named in\n// `required` come first (in their original order), then the rest (in theirs).\n// A stable two-pass partition, so it never reshuffles within either group.\nexport function orderRequiredFirst<T>(\n entries: [string, T][],\n required: string[],\n): [string, T][] {\n const isRequired = new Set(required);\n const head = entries.filter(([key]) => isRequired.has(key));\n const tail = entries.filter(([key]) => !isRequired.has(key));\n return [...head, ...tail];\n}\n\n// isEmptyValue reports whether a field's value carries no data, so priority\n// sorting can sink unfilled fields. Empty = undefined/null/\"\" plus empty arrays\n// and empty plain objects; `false` and `0` count as filled (they are choices).\nexport function isEmptyValue(value: unknown): boolean {\n if (value === undefined || value === null || value === \"\") return true;\n if (Array.isArray(value)) return value.length === 0;\n if (typeof value === \"object\") return Object.keys(value).length === 0;\n return false;\n}\n\n// orderByPriority sorts property entries so the fields that matter most surface\n// first, ranking each by a score: +2 if required, +1 if its value is non-empty.\n// Required-and-filled lead, then required-and-empty, then optional-and-filled,\n// then optional-and-empty. Ties keep their incoming order (explicit index\n// tie-break, so it does not depend on the engine's sort stability).\nexport function orderByPriority<T>(\n entries: [string, T][],\n required: string[],\n values: Record<string, unknown>,\n): [string, T][] {\n const isRequired = new Set(required);\n const score = (key: string): number =>\n (isRequired.has(key) ? 2 : 0) + (isEmptyValue(values[key]) ? 0 : 1);\n return entries\n .map((entry, index) => ({ entry, index, score: score(entry[0]) }))\n .sort((a, b) => b.score - a.score || a.index - b.index)\n .map((ranked) => ranked.entry);\n}\n\n// softError computes a display-only validation hint. It never blocks onChange.\n// Consumers suppress the unknown-enum hint by setting allowCustomValue.\nexport function softError(field: FieldControl): string | undefined {\n const v = field.value;\n const isEmpty = v === undefined || v === null || v === \"\";\n if (field.required && isEmpty) return \"Required\";\n\n if (field.kind === \"number\" && typeof field.minimum === \"number\" && typeof v === \"number\") {\n if (v < field.minimum) return `Must be ≥ ${field.minimum}`;\n }\n\n if (field.kind === \"enum\" && !field.allowCustomValue && !isEmpty) {\n const known = (field.options ?? []).some((o) => o.value === String(v));\n if (!known) return \"Unknown value (allowed)\";\n }\n return undefined;\n}\n\n// seedFromSchema produces the initial value for a freshly-added array item or\n// object field, honouring an explicit default.\nexport function seedFromSchema(schema: JsonSchemaProperty): unknown {\n if (schema.default !== undefined) return schema.default;\n const type = Array.isArray(schema.type) ? schema.type[0] : schema.type;\n if (type === \"array\") return [];\n if (type === \"object\") return {};\n if (type === \"boolean\") return false;\n // Numbers seed as \"\" so the soft Required hint can show without coercion\n // surprises; the number control coerces on first real input.\n return \"\";\n}\n"],"names":[],"mappings":";;AAWA,MAAM,aACJ;AAEK,SAAS,WAAW,MAAwB;AACjD,SAAO,GAAG,YAAY,eAAe,IAAI,CAAC;AAC5C;AAUA,SAAS,aAAa,OAAuB;AAC3C,MAAI,UAAU,GAAI,QAAO;AACzB,SAAO,MAAM,QAAQ,iBAAiB,CAAC,SAAS,IAAI,KAAK,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG;AACxF;AAWO,SAAS,aAAa,cAAsB,QAAyB;AAC1E,QAAM,SAAS,iBAAiB,KAAK,KAAK,aAAa,QAAQ,OAAO,EAAE,EAAE,MAAM,GAAG;AACnF,QAAM,OAAO,OACV,IAAI,CAAC,UAAU,aAAa,MAAM,WAAW,MAAM,GAAG,EAAE,WAAW,MAAM,GAAG,CAAC,CAAC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sources":["../../src/components/json-schema-form-utils.ts"],"sourcesContent":["import { cn } from \"../lib/utils\";\nimport { inputSizeClass, type FormSize } from \"./json-schema-form-size\";\nimport type {\n FieldControl,\n FieldOption,\n GridColumns,\n JsonSchemaProperty,\n} from \"./json-schema-form-types\";\n\n// Non-size styling shared by every text-like input box; the size token supplies\n// height, horizontal padding, and text size (see inputSizeClass).\nconst INPUT_BASE =\n \"w-full min-w-0 rounded-md border border-input bg-background text-foreground outline-none placeholder:text-placeholder disabled:cursor-not-allowed disabled:bg-muted/40 focus-visible:ring-2 focus-visible:ring-ring\";\n\nexport function inputClass(size: FormSize): string {\n return cn(INPUT_BASE, inputSizeClass[size]);\n}\n\n// encodeIdPart escapes one path token (or the id prefix) injectively: every\n// character outside [A-Za-z0-9] becomes `_<hex char code>_`, and the empty token\n// — a legal JSON Schema property name — becomes a lone `_`. The escape is\n// self-delimiting (it always starts and ends with `_`, and a literal `_` escapes\n// to `_5f_`), so distinct tokens can never share an encoding and `-` stays free\n// as a segment separator. Percent-encoding was rejected because `%` in an id,\n// while legal HTML, has to be escaped again inside a `#id` CSS selector; this\n// alphabet ([A-Za-z0-9_-]) is safe as-is for `document.querySelector`.\nfunction encodeIdPart(value: string): string {\n if (value === \"\") return \"_\";\n return value.replace(/[^A-Za-z0-9]/g, (char) => `_${char.charCodeAt(0).toString(16)}_`);\n}\n\n// fieldInputId derives a control's DOM id from its JSON-pointer instance path,\n// not from its leaf key: a schema that repeats a property name under two parents\n// (e.g. /journalLine1/asset and /journalLine2/asset) must not produce the same\n// id, or every `label[for]` binds to the first control. Each decoded pointer\n// token is escaped with encodeIdPart and joined with \"-\", so distinct paths\n// always produce distinct ids: \"/asset-class\", \"/asset_class\", \"/asset.class\"\n// and \"/asset/class\" are four different ids, and an empty token is preserved\n// (\"/a//b\" ≠ \"/a/b\"). The prefix is escaped the same way, so prefix \"a\" + \"/b-c\"\n// cannot collide with prefix \"a-b\" + \"/c\".\nexport function fieldInputId(instancePath: string, prefix?: string): string {\n const tokens = instancePath === \"\" ? [] : instancePath.replace(/^\\//, \"\").split(\"/\");\n const safe = tokens\n .map((token) => encodeIdPart(token.replaceAll(\"~1\", \"/\").replaceAll(\"~0\", \"~\")))\n .join(\"-\");\n return prefix ? `jsf-${encodeIdPart(prefix)}-${safe}` : `jsf-${safe}`;\n}\n\n// fieldErrorId names the element that holds a field's validation messages, so a\n// control can point at it with aria-describedby.\nexport function fieldErrorId(fieldId: string): string {\n return `${fieldId}-error`;\n}\n\n// fieldAriaProps is the assistive-technology half of a control: the visual `*`\n// and red message mean nothing to a screen reader on their own, so every\n// editable control spreads these onto its input element.\nexport function fieldAriaProps(\n field: FieldControl,\n fieldId: string,\n): {\n \"aria-required\"?: true;\n \"aria-invalid\"?: true;\n \"aria-describedby\"?: string;\n} {\n return {\n ...(field.required ? { \"aria-required\": true as const } : {}),\n ...(field.invalid ? { \"aria-invalid\": true as const, \"aria-describedby\": fieldErrorId(fieldId) } : {}),\n };\n}\n\n// comboboxAriaProps is the fieldAriaProps equivalent for Combobox, which takes\n// the same state as named props rather than raw aria-* attributes.\nexport function comboboxAriaProps(\n field: FieldControl,\n fieldId: string,\n): { ariaRequired?: true; invalid?: true; describedBy?: string } {\n return {\n ...(field.required ? { ariaRequired: true as const } : {}),\n ...(field.invalid ? { invalid: true as const, describedBy: fieldErrorId(fieldId) } : {}),\n };\n}\n\nexport function defaultPlaceholder(schema: JsonSchemaProperty): string {\n if (schema.default != null && typeof schema.default !== \"object\") return String(schema.default);\n return \"\";\n}\n\nexport function toText(value: unknown): string {\n if (value === undefined || value === null) return \"\";\n if (typeof value === \"object\") return \"\";\n return String(value);\n}\n\n// toStringArray normalises the committed value of a multi-value control. The\n// schema types it as an array of strings, but a form mid-edit can hold anything,\n// so a non-string entry is dropped rather than rendered as a broken tag.\nexport function toStringArray(value: unknown): string[] {\n if (!Array.isArray(value)) return [];\n return value.filter((entry): entry is string => typeof entry === \"string\");\n}\n\n// hasObjectItemProperties reports whether an array's items are objects with a\n// fixed `properties` set — the precondition for both the column-per-property\n// table and the summary-row accordion, which need to know the item's shape.\nexport function hasObjectItemProperties(\n items: JsonSchemaProperty | undefined,\n): boolean {\n return (\n !!items && !!items.properties && Object.keys(items.properties).length > 0\n );\n}\n\n// Object-level `x-columns`: how many equal columns to split a stacked object\n// into. \"auto\" fits as many as the width allows. A number is clamped to [1, 12]\n// (a standard 12-track grid, so a 3-across row of span-4 fields and a 4-across\n// row of span-3 fields share one object); anything invalid is a single column.\nexport function normalizeColumns(value: unknown): GridColumns {\n if (value === \"auto\") return \"auto\";\n const n = typeof value === \"number\" ? value : Number(value);\n if (!Number.isFinite(n) || n < 1) return 1;\n return Math.min(Math.trunc(n), 12);\n}\n\n// Per-field `x-col-span`: how many of the object's columns a field occupies.\n// \"full\" spans the whole row. Under `x-columns: \"auto\"` a numeric span cannot be\n// clamped against a track count that only exists at layout time, so it is capped\n// at the 12-track maximum instead. Invalid falls back to 1.\nexport function normalizeColSpan(\n value: unknown,\n columns: GridColumns,\n): number | \"full\" {\n if (value === \"full\") return \"full\";\n const n = typeof value === \"number\" ? value : Number(value);\n if (!Number.isFinite(n) || n < 1) return 1;\n return Math.min(Math.trunc(n), columns === \"auto\" ? 12 : columns);\n}\n\n// The `x-columns: \"auto\"` column floor: wide enough for a labelled control to\n// stay readable, narrow enough that a 1440px pane gets three columns, not two.\nexport const DEFAULT_COLUMN_MIN_WIDTH = \"15rem\";\n\n// cssLength guards a schema-supplied CSS length before it reaches an inline\n// style. Non-strings (and the empty string) fall back rather than emitting a\n// declaration the browser will drop.\nexport function cssLength(value: unknown, fallback: string): string {\n return typeof value === \"string\" && value.trim() ? value.trim() : fallback;\n}\n\n// withSyntheticValue prepends the current value as an option when it is not in\n// the enum, so an out-of-enum value (e.g. a template token) still displays.\nexport function withSyntheticValue(options: FieldOption[], value: string): FieldOption[] {\n if (!value || options.some((o) => o.value === value)) return options;\n return [{ value, label: value }, ...options];\n}\n\n// keyPickerOptions narrows the map-key enum to keys not already used by another\n// entry, while always keeping this row's current key so it stays selectable.\nexport function keyPickerOptions(\n options: FieldOption[],\n usedKeys: string[],\n currentKey: string,\n): FieldOption[] {\n const taken = new Set(usedKeys.filter((k) => k !== currentKey));\n return options.filter((o) => !taken.has(o.value));\n}\n\n// orderByXOrder reorders property entries by the schema's `x-order` hint: keys\n// named there render first (in that order), the rest keep document order. A\n// missing/empty hint is a no-op, so document order remains the default.\nexport function orderByXOrder<T>(entries: [string, T][], order: unknown): [string, T][] {\n if (!Array.isArray(order) || order.length === 0) return entries;\n const rank = new Map(\n order.filter((k): k is string => typeof k === \"string\").map((k, i) => [k, i]),\n );\n const listed = entries\n .filter(([key]) => rank.has(key))\n .sort((a, b) => rank.get(a[0])! - rank.get(b[0])!);\n const rest = entries.filter(([key]) => !rank.has(key));\n return [...listed, ...rest];\n}\n\n// orderByClickyOrder stably sorts property entries by each property's numeric\n// `x-clicky-order` (lower first); entries without it keep their incoming order\n// after the ordered ones. An explicit index tie-break keeps it stable regardless\n// of the engine's sort stability. Unlike the object-level `x-order` array, this\n// composes across merged if/then branches because each property carries its own\n// order — the right tool when fields come from different (embedded) sources.\nexport function orderByClickyOrder(\n entries: [string, JsonSchemaProperty][],\n): [string, JsonSchemaProperty][] {\n const rank = (prop: JsonSchemaProperty): number => {\n const o = prop[\"x-clicky-order\"];\n return typeof o === \"number\" ? o : Number.POSITIVE_INFINITY;\n };\n return entries\n .map((entry, index) => ({ entry, index, rank: rank(entry[1]) }))\n .sort((a, b) => a.rank - b.rank || a.index - b.index)\n .map((ranked) => ranked.entry);\n}\n\n// orderRequiredFirst stably partitions property entries so the keys named in\n// `required` come first (in their original order), then the rest (in theirs).\n// A stable two-pass partition, so it never reshuffles within either group.\nexport function orderRequiredFirst<T>(\n entries: [string, T][],\n required: string[],\n): [string, T][] {\n const isRequired = new Set(required);\n const head = entries.filter(([key]) => isRequired.has(key));\n const tail = entries.filter(([key]) => !isRequired.has(key));\n return [...head, ...tail];\n}\n\n// isEmptyValue reports whether a field's value carries no data, so priority\n// sorting can sink unfilled fields and `hideEmpty` can drop them. Empty =\n// undefined/null/\"\" plus empty arrays and objects; `false` and `0` count as\n// filled (they are choices).\n//\n// An object is empty when everything inside it is, not merely when it has no\n// keys: a section whose every field is blank carries no more data than a missing\n// one, and rendering it as a titled, empty block says otherwise.\nexport function isEmptyValue(value: unknown): boolean {\n if (value === undefined || value === null || value === \"\") return true;\n if (Array.isArray(value)) return value.every(isEmptyValue);\n if (typeof value === \"object\") return Object.values(value).every(isEmptyValue);\n return false;\n}\n\n// orderByPriority sorts property entries so the fields that matter most surface\n// first, ranking each by a score: +2 if required, +1 if its value is non-empty.\n// Required-and-filled lead, then required-and-empty, then optional-and-filled,\n// then optional-and-empty. Ties keep their incoming order (explicit index\n// tie-break, so it does not depend on the engine's sort stability).\nexport function orderByPriority<T>(\n entries: [string, T][],\n required: string[],\n values: Record<string, unknown>,\n): [string, T][] {\n const isRequired = new Set(required);\n const score = (key: string): number =>\n (isRequired.has(key) ? 2 : 0) + (isEmptyValue(values[key]) ? 0 : 1);\n return entries\n .map((entry, index) => ({ entry, index, score: score(entry[0]) }))\n .sort((a, b) => b.score - a.score || a.index - b.index)\n .map((ranked) => ranked.entry);\n}\n\n// softError computes a display-only validation hint. It never blocks onChange.\n// Consumers suppress the unknown-enum hint by setting allowCustomValue.\nexport function softError(field: FieldControl): string | undefined {\n const v = field.value;\n const isEmpty = v === undefined || v === null || v === \"\";\n if (field.required && isEmpty) return \"Required\";\n\n if (field.kind === \"number\" && typeof field.minimum === \"number\" && typeof v === \"number\") {\n if (v < field.minimum) return `Must be ≥ ${field.minimum}`;\n }\n\n if (field.kind === \"enum\" && !field.allowCustomValue && !isEmpty) {\n const known = (field.options ?? []).some((o) => o.value === String(v));\n if (!known) return \"Unknown value (allowed)\";\n }\n return undefined;\n}\n\n/**\n * canAddItem / canRemoveItem read the array's maxItems/minItems bounds.\n *\n * The bounds gate the controls rather than validate the value: an array already\n * at or past a bound offers no way to make it worse, but one that arrives\n * outside its bounds is never trapped — removal stays available above minItems\n * whatever the schema says, and an array the producer owns end to end simply\n * declares min === max and offers neither.\n */\nexport function canAddItem(field: FieldControl, count: number): boolean {\n return field.maxItems === undefined || count < field.maxItems;\n}\n\nexport function canRemoveItem(field: FieldControl, count: number): boolean {\n return field.minItems === undefined || count > field.minItems;\n}\n\n// seedFromSchema produces the initial value for a freshly-added array item or\n// object field, honouring an explicit default.\nexport function seedFromSchema(schema: JsonSchemaProperty): unknown {\n if (schema.default !== undefined) return schema.default;\n const type = Array.isArray(schema.type) ? schema.type[0] : schema.type;\n if (type === \"array\") return [];\n if (type === \"object\") return {};\n if (type === \"boolean\") return false;\n // Numbers seed as \"\" so the soft Required hint can show without coercion\n // surprises; the number control coerces on first real input.\n return \"\";\n}\n"],"names":[],"mappings":";;AAWA,MAAM,aACJ;AAEK,SAAS,WAAW,MAAwB;AACjD,SAAO,GAAG,YAAY,eAAe,IAAI,CAAC;AAC5C;AAUA,SAAS,aAAa,OAAuB;AAC3C,MAAI,UAAU,GAAI,QAAO;AACzB,SAAO,MAAM,QAAQ,iBAAiB,CAAC,SAAS,IAAI,KAAK,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG;AACxF;AAWO,SAAS,aAAa,cAAsB,QAAyB;AAC1E,QAAM,SAAS,iBAAiB,KAAK,KAAK,aAAa,QAAQ,OAAO,EAAE,EAAE,MAAM,GAAG;AACnF,QAAM,OAAO,OACV,IAAI,CAAC,UAAU,aAAa,MAAM,WAAW,MAAM,GAAG,EAAE,WAAW,MAAM,GAAG,CAAC,CAAC,EAC9E,KAAK,GAAG;AACX,SAAO,SAAS,OAAO,aAAa,MAAM,CAAC,IAAI,IAAI,KAAK,OAAO,IAAI;AACrE;AAIO,SAAS,aAAa,SAAyB;AACpD,SAAO,GAAG,OAAO;AACnB;AAKO,SAAS,eACd,OACA,SAKA;AACA,SAAO;AAAA,IACL,GAAI,MAAM,WAAW,EAAE,iBAAiB,KAAA,IAAkB,CA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AU,MAAM,UAAa,MAAM,QAAQ,MAAM;AACvD,MAAI,MAAM,YAAY,QAAS,QAAO;AAEtC,MAAI,MAAM,SAAS,YAAY,OAAO,MAAM,YAAY,YAAY,OAAO,MAAM,UAAU;AACzF,QAAI,IAAI,MAAM,QAAS,QAAO,aAAa,MAAM,OAAO;AAAA,EAC1D;AAEA,MAAI,MAAM,SAAS,UAAU,CAAC,MAAM,oBAAoB,CAAC,SAAS;AAChE,UAAM,SAAS,MAAM,WAAW,CAAA,GAAI,KAAK,CAAC,MAAM,EAAE,UAAU,OAAO,CAAC,CAAC;AACrE,QAAI,CAAC,MAAO,QAAO;AAAA,EACrB;AACA,SAAO;AACT;AAWO,SAAS,WAAW,OAAqB,OAAwB;AACtE,SAAO,MAAM,aAAa,UAAa,QAAQ,MAAM;AACvD;AAEO,SAAS,cAAc,OAAqB,OAAwB;AACzE,SAAO,MAAM,aAAa,UAAa,QAAQ,MAAM;AACvD;AAIO,SAAS,eAAe,QAAqC;AAClE,MAAI,OAAO,YAAY,OAAW,QAAO,OAAO;AAChD,QAAM,OAAO,MAAM,QAAQ,OAAO,IAAI,IAAI,OAAO,KAAK,CAAC,IAAI,OAAO;AAClE,MAAI,SAAS,QAAS,QAAO,CAAA;AAC7B,MAAI,SAAS,SAAU,QAAO,CAAA;AAC9B,MAAI,SAAS,UAAW,QAAO;AAG/B,SAAO;AACT;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode, SVGProps } from '
|
|
1
|
+
import { HTMLAttributes, ReactNode, SVGProps } from 'react';
|
|
2
2
|
export type LoadingSize = "sm" | "md" | "lg" | "responsive";
|
|
3
3
|
export type LoadingVariant = "inline" | "centered";
|
|
4
4
|
export interface LoadingProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -14,7 +14,7 @@ export interface LoadingProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
14
14
|
* theme text color (works in light and dark). Size is driven entirely by the
|
|
15
15
|
* className (width + height); the viewBox keeps the 1:1 aspect.
|
|
16
16
|
*/
|
|
17
|
-
export declare const LoadingDots: import('
|
|
17
|
+
export declare const LoadingDots: import('react').ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
18
18
|
/**
|
|
19
19
|
* Loading indicator built on the shared 3-dot animation.
|
|
20
20
|
*
|
|
@@ -33,6 +33,6 @@ export declare const LoadingDots: import('../../../../node_modules/@types/react/
|
|
|
33
33
|
* Pass `className` to tune corners/offset (e.g. `rounded-t-md` inside a rounded
|
|
34
34
|
* card). Purely decorative — announce busy state with `aria-busy` on the host.
|
|
35
35
|
*/
|
|
36
|
-
export declare const LoadingBar: import('
|
|
37
|
-
export declare const Loading: import('
|
|
36
|
+
export declare const LoadingBar: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
37
|
+
export declare const Loading: import('react').ForwardRefExoticComponent<LoadingProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
38
38
|
//# sourceMappingURL=loading.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from '
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { MdxEditorCalloutOptions, MdxEditorJsxComponentDescriptor, MdxEditorRuntime } from './mdx-editor-options';
|
|
3
3
|
/**
|
|
4
4
|
* The tag a callout is authored as.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType, ReactNode } from '
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import { FormSize } from './json-schema-form-size';
|
|
3
3
|
export type MdxEditorHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
4
4
|
export type MdxEditorViewMode = "rich-text" | "source" | "diff";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SelectHTMLAttributes } from '
|
|
1
|
+
import { SelectHTMLAttributes } from 'react';
|
|
2
2
|
export type SelectOption = {
|
|
3
3
|
value: string;
|
|
4
4
|
label: string;
|
|
@@ -8,8 +8,8 @@ export type SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {
|
|
|
8
8
|
options?: SelectOption[];
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
};
|
|
11
|
-
export declare const Select: import('
|
|
11
|
+
export declare const Select: import('react').ForwardRefExoticComponent<SelectHTMLAttributes<HTMLSelectElement> & {
|
|
12
12
|
options?: SelectOption[];
|
|
13
13
|
placeholder?: string;
|
|
14
|
-
} & import('
|
|
14
|
+
} & import('react').RefAttributes<HTMLSelectElement>>;
|
|
15
15
|
//# sourceMappingURL=select.d.ts.map
|
|
@@ -6,5 +6,5 @@ export type ThemeSwitcherProps = {
|
|
|
6
6
|
/** Classes applied to the popup menu. */
|
|
7
7
|
menuClassName?: string;
|
|
8
8
|
};
|
|
9
|
-
export declare const ThemeSwitcher: import('
|
|
9
|
+
export declare const ThemeSwitcher: import('react').ForwardRefExoticComponent<ThemeSwitcherProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
10
|
//# sourceMappingURL=theme-switcher.d.ts.map
|
|
@@ -35,6 +35,6 @@ export interface ListMenuSelectionContextValue {
|
|
|
35
35
|
/** Whether selectable rows render a leading checkbox. */
|
|
36
36
|
showCheckboxes: boolean;
|
|
37
37
|
}
|
|
38
|
-
export declare const ListMenuSelectionContext: import('
|
|
38
|
+
export declare const ListMenuSelectionContext: import('react').Context<ListMenuSelectionContextValue | null>;
|
|
39
39
|
export declare function useListMenuSelectionContext(): ListMenuSelectionContextValue | null;
|
|
40
40
|
//# sourceMappingURL=use-list-menu-selection.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, RefObject } from '
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
2
|
import { ComboboxMenuPosition } from '../lib/combobox';
|
|
3
3
|
export declare function useComboboxLabelWidth(label: ReactNode, labelRef: RefObject<HTMLSpanElement | null>): number;
|
|
4
4
|
export declare function useComboboxMenuPosition(open: boolean, anchorRef: RefObject<HTMLDivElement | null>, listRef: RefObject<HTMLDivElement | null>): ComboboxMenuPosition | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType } from '
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
2
|
import { ComboboxOption } from './Combobox';
|
|
3
3
|
export type WorkloadKind = "service" | "ingress" | "pod" | "deployment" | "statefulset" | "daemonset";
|
|
4
4
|
/** One exposed port of a workload/service. */
|
package/dist/data/Avatar.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SyntheticEvent } from '
|
|
1
|
+
import { SyntheticEvent } from 'react';
|
|
2
2
|
import { SizeToken } from '../lib/size';
|
|
3
3
|
export type AvatarVariant = "duotone" | "solid" | "stamp" | "mono";
|
|
4
4
|
export type AvatarKind = "user" | "group";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from '
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { AvatarKind, AvatarVariant } from './Avatar';
|
|
3
3
|
import { IconTone, StaticIconComponent } from './Icon';
|
|
4
4
|
import { SizeToken } from '../lib/size';
|
package/dist/data/Badge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnchorHTMLAttributes, ReactNode } from '
|
|
1
|
+
import { AnchorHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { badgeVariants } from './badge-variants';
|
|
4
4
|
import { StaticIconComponent } from './Icon';
|
package/dist/data/Callout.d.ts
CHANGED