@flanksource/clicky-ui 0.3.39 → 0.3.41

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.
Files changed (1557) hide show
  1. package/README.md +29 -5
  2. package/dist/ai.cjs +10 -0
  3. package/dist/ai.cjs.map +1 -1
  4. package/dist/ai.d.ts +1 -1
  5. package/dist/ai.js +10 -0
  6. package/dist/ai.js.map +1 -1
  7. package/dist/chat.d.ts +1 -1
  8. package/dist/clicky.d.ts +1 -1
  9. package/dist/comments/CommentAuthor.d.ts +2 -2
  10. package/dist/comments/CommentCard.d.ts +1 -1
  11. package/dist/comments/CommentCardParts.d.ts +1 -1
  12. package/dist/comments/CommentComposer.d.ts +1 -1
  13. package/dist/comments/CommentFilterBar.d.ts +1 -1
  14. package/dist/comments/CommentProgress.d.ts +1 -1
  15. package/dist/comments/CommentProvider.d.ts +2 -2
  16. package/dist/comments/CommentSidePanel.d.ts +1 -1
  17. package/dist/comments/CommentThread.d.ts +1 -1
  18. package/dist/comments/CommentThreadList.d.ts +1 -1
  19. package/dist/comments/GroupedComments.d.ts +1 -1
  20. package/dist/comments/MentionTextarea.d.ts +1 -1
  21. package/dist/comments/comment-context.d.ts +1 -1
  22. package/dist/comments/comment-fixtures.d.ts +1 -1
  23. package/dist/comments/comment-types.d.ts +1 -1
  24. package/dist/comments/comment-utils.d.ts +2 -2
  25. package/dist/comments.d.ts +16 -16
  26. package/dist/components/AccordionList.cjs +5 -1
  27. package/dist/components/AccordionList.cjs.map +1 -1
  28. package/dist/components/AccordionList.d.ts +4 -2
  29. package/dist/components/AccordionList.d.ts.map +1 -1
  30. package/dist/components/AccordionList.js +5 -1
  31. package/dist/components/AccordionList.js.map +1 -1
  32. package/dist/components/Combobox.d.ts +2 -2
  33. package/dist/components/ComboboxControl.d.ts +2 -2
  34. package/dist/components/ComboboxMenu.d.ts +2 -2
  35. package/dist/components/ComboboxTags.d.ts +1 -1
  36. package/dist/components/ConnectionLoggingPolicy.d.ts +1 -1
  37. package/dist/components/CountryPicker.d.ts +1 -1
  38. package/dist/components/EndpointSelector.d.ts +1 -1
  39. package/dist/components/EndpointSelector.model.d.ts +4 -4
  40. package/dist/components/FilterBar.d.ts +8 -8
  41. package/dist/components/FormLookupProvider.d.ts +1 -1
  42. package/dist/components/FormatOptionsDropdown.d.ts +2 -2
  43. package/dist/components/IconButton.d.ts +1 -1
  44. package/dist/components/ItemActions.d.ts +1 -1
  45. package/dist/components/JSONPathField.d.ts +4 -4
  46. package/dist/components/JsonSchemaForm.cjs +9 -4
  47. package/dist/components/JsonSchemaForm.cjs.map +1 -1
  48. package/dist/components/JsonSchemaForm.d.ts +2 -2
  49. package/dist/components/JsonSchemaForm.d.ts.map +1 -1
  50. package/dist/components/JsonSchemaForm.js +8 -3
  51. package/dist/components/JsonSchemaForm.js.map +1 -1
  52. package/dist/components/ListMenu.d.ts +2 -2
  53. package/dist/components/MdxEditorCallout.d.ts +1 -1
  54. package/dist/components/MdxEditorField.d.ts +2 -2
  55. package/dist/components/MdxEditorToolbar.d.ts +1 -1
  56. package/dist/components/MultiSelect.d.ts +1 -1
  57. package/dist/components/OnePasswordSelector.d.ts +1 -1
  58. package/dist/components/ScheduleEditor.d.ts +1 -1
  59. package/dist/components/SearchInput.d.ts +1 -1
  60. package/dist/components/SecretFormField.d.ts +2 -2
  61. package/dist/components/SecretKeySelector.d.ts +1 -1
  62. package/dist/components/SecretKeySelector.model.d.ts +1 -1
  63. package/dist/components/SegmentedControl.d.ts +1 -1
  64. package/dist/components/SplitButton.d.ts +3 -3
  65. package/dist/components/TreePickerField.d.ts +2 -2
  66. package/dist/components/TriStateToggle.d.ts +1 -1
  67. package/dist/components/WorkloadPicker.d.ts +2 -2
  68. package/dist/components/button.d.ts +1 -1
  69. package/dist/components/combobox-types.d.ts +2 -2
  70. package/dist/components/endpoint-port.d.ts +1 -1
  71. package/dist/components/filter-bar-field-utils.d.ts +3 -3
  72. package/dist/components/filter-bar-multi.d.ts +4 -4
  73. package/dist/components/filter-bar-utils.d.ts +1 -1
  74. package/dist/components/form-lookup-context.d.ts +1 -1
  75. package/dist/components/format-options.d.ts +1 -1
  76. package/dist/components/icon-menu-picker.d.ts +1 -1
  77. package/dist/components/jotai-bindings-core.d.ts +2 -2
  78. package/dist/components/jotai-bindings.d.ts +1 -1
  79. package/dist/components/json-schema-form-accordion-array.cjs +3 -1
  80. package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
  81. package/dist/components/json-schema-form-accordion-array.d.ts +5 -2
  82. package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
  83. package/dist/components/json-schema-form-accordion-array.js +3 -1
  84. package/dist/components/json-schema-form-accordion-array.js.map +1 -1
  85. package/dist/components/json-schema-form-array-view.cjs +63 -0
  86. package/dist/components/json-schema-form-array-view.cjs.map +1 -0
  87. package/dist/components/json-schema-form-array-view.d.ts +21 -0
  88. package/dist/components/json-schema-form-array-view.d.ts.map +1 -0
  89. package/dist/components/json-schema-form-array-view.js +63 -0
  90. package/dist/components/json-schema-form-array-view.js.map +1 -0
  91. package/dist/components/json-schema-form-array.cjs +3 -7
  92. package/dist/components/json-schema-form-array.cjs.map +1 -1
  93. package/dist/components/json-schema-form-array.d.ts +1 -1
  94. package/dist/components/json-schema-form-array.d.ts.map +1 -1
  95. package/dist/components/json-schema-form-array.js +3 -7
  96. package/dist/components/json-schema-form-array.js.map +1 -1
  97. package/dist/components/json-schema-form-cards-array.d.ts +1 -1
  98. package/dist/components/json-schema-form-collection-layouts.fixtures.d.ts +1 -1
  99. package/dist/components/json-schema-form-conditionals.cjs +67 -0
  100. package/dist/components/json-schema-form-conditionals.cjs.map +1 -0
  101. package/dist/components/json-schema-form-conditionals.d.ts +9 -0
  102. package/dist/components/json-schema-form-conditionals.d.ts.map +1 -0
  103. package/dist/components/json-schema-form-conditionals.js +67 -0
  104. package/dist/components/json-schema-form-conditionals.js.map +1 -0
  105. package/dist/components/json-schema-form-defaults.cjs +68 -0
  106. package/dist/components/json-schema-form-defaults.cjs.map +1 -0
  107. package/dist/components/json-schema-form-defaults.d.ts +4 -0
  108. package/dist/components/json-schema-form-defaults.d.ts.map +1 -0
  109. package/dist/components/json-schema-form-defaults.js +68 -0
  110. package/dist/components/json-schema-form-defaults.js.map +1 -0
  111. package/dist/components/json-schema-form-discriminator.d.ts +1 -1
  112. package/dist/components/json-schema-form-error-display.d.ts +1 -1
  113. package/dist/components/json-schema-form-errors.cjs +49 -31
  114. package/dist/components/json-schema-form-errors.cjs.map +1 -1
  115. package/dist/components/json-schema-form-errors.d.ts +5 -3
  116. package/dist/components/json-schema-form-errors.d.ts.map +1 -1
  117. package/dist/components/json-schema-form-errors.js +51 -33
  118. package/dist/components/json-schema-form-errors.js.map +1 -1
  119. package/dist/components/json-schema-form-extensions.d.ts +1 -1
  120. package/dist/components/json-schema-form-fields.d.ts +2 -2
  121. package/dist/components/json-schema-form-filter.cjs +2 -1
  122. package/dist/components/json-schema-form-filter.cjs.map +1 -1
  123. package/dist/components/json-schema-form-filter.d.ts +1 -1
  124. package/dist/components/json-schema-form-filter.js +2 -1
  125. package/dist/components/json-schema-form-filter.js.map +1 -1
  126. package/dist/components/json-schema-form-grid.d.ts +2 -2
  127. package/dist/components/json-schema-form-item-row.d.ts +1 -1
  128. package/dist/components/json-schema-form-item-summary.cjs +6 -2
  129. package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
  130. package/dist/components/json-schema-form-item-summary.d.ts +1 -1
  131. package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
  132. package/dist/components/json-schema-form-item-summary.js +6 -2
  133. package/dist/components/json-schema-form-item-summary.js.map +1 -1
  134. package/dist/components/json-schema-form-layout.cjs +28 -19
  135. package/dist/components/json-schema-form-layout.cjs.map +1 -1
  136. package/dist/components/json-schema-form-layout.d.ts +10 -8
  137. package/dist/components/json-schema-form-layout.d.ts.map +1 -1
  138. package/dist/components/json-schema-form-layout.js +29 -20
  139. package/dist/components/json-schema-form-layout.js.map +1 -1
  140. package/dist/components/json-schema-form-list-array.d.ts +1 -1
  141. package/dist/components/json-schema-form-listener-paths.cjs +52 -0
  142. package/dist/components/json-schema-form-listener-paths.cjs.map +1 -0
  143. package/dist/components/json-schema-form-listener-paths.d.ts +10 -0
  144. package/dist/components/json-schema-form-listener-paths.d.ts.map +1 -0
  145. package/dist/components/json-schema-form-listener-paths.js +52 -0
  146. package/dist/components/json-schema-form-listener-paths.js.map +1 -0
  147. package/dist/components/json-schema-form-listener-types.d.ts +22 -0
  148. package/dist/components/json-schema-form-listener-types.d.ts.map +1 -0
  149. package/dist/components/json-schema-form-listeners.cjs +250 -0
  150. package/dist/components/json-schema-form-listeners.cjs.map +1 -0
  151. package/dist/components/json-schema-form-listeners.d.ts +13 -0
  152. package/dist/components/json-schema-form-listeners.d.ts.map +1 -0
  153. package/dist/components/json-schema-form-listeners.js +250 -0
  154. package/dist/components/json-schema-form-listeners.js.map +1 -0
  155. package/dist/components/json-schema-form-lookup-tree.d.ts +2 -2
  156. package/dist/components/json-schema-form-object-array-view.cjs +62 -0
  157. package/dist/components/json-schema-form-object-array-view.cjs.map +1 -0
  158. package/dist/components/json-schema-form-object-array-view.d.ts +14 -0
  159. package/dist/components/json-schema-form-object-array-view.d.ts.map +1 -0
  160. package/dist/components/json-schema-form-object-array-view.js +62 -0
  161. package/dist/components/json-schema-form-object-array-view.js.map +1 -0
  162. package/dist/components/json-schema-form-object.cjs +3 -0
  163. package/dist/components/json-schema-form-object.cjs.map +1 -1
  164. package/dist/components/json-schema-form-object.d.ts +1 -1
  165. package/dist/components/json-schema-form-object.d.ts.map +1 -1
  166. package/dist/components/json-schema-form-object.js +3 -0
  167. package/dist/components/json-schema-form-object.js.map +1 -1
  168. package/dist/components/json-schema-form-preferences.d.ts +1 -1
  169. package/dist/components/json-schema-form-properties-errors.fixtures.d.ts +2 -2
  170. package/dist/components/json-schema-form-properties-size.d.ts +1 -1
  171. package/dist/components/json-schema-form-properties.d.ts +2 -2
  172. package/dist/components/json-schema-form-properties.fixtures.d.ts +1 -1
  173. package/dist/components/json-schema-form-property-collection.d.ts +1 -1
  174. package/dist/components/json-schema-form-property-preview.d.ts +1 -1
  175. package/dist/components/json-schema-form-property-selection.d.ts +1 -1
  176. package/dist/components/json-schema-form-refs.d.ts +1 -1
  177. package/dist/components/json-schema-form-render.cjs +17 -9
  178. package/dist/components/json-schema-form-render.cjs.map +1 -1
  179. package/dist/components/json-schema-form-render.d.ts +1 -1
  180. package/dist/components/json-schema-form-render.d.ts.map +1 -1
  181. package/dist/components/json-schema-form-render.js +19 -11
  182. package/dist/components/json-schema-form-render.js.map +1 -1
  183. package/dist/components/json-schema-form-resolve.cjs +6 -99
  184. package/dist/components/json-schema-form-resolve.cjs.map +1 -1
  185. package/dist/components/json-schema-form-resolve.d.ts +1 -8
  186. package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
  187. package/dist/components/json-schema-form-resolve.js +5 -98
  188. package/dist/components/json-schema-form-resolve.js.map +1 -1
  189. package/dist/components/json-schema-form-runtime-types.d.ts +19 -4
  190. package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
  191. package/dist/components/json-schema-form-size.d.ts +1 -1
  192. package/dist/components/json-schema-form-table-array.cjs +67 -16
  193. package/dist/components/json-schema-form-table-array.cjs.map +1 -1
  194. package/dist/components/json-schema-form-table-array.d.ts +5 -2
  195. package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
  196. package/dist/components/json-schema-form-table-array.js +70 -19
  197. package/dist/components/json-schema-form-table-array.js.map +1 -1
  198. package/dist/components/json-schema-form-tags-combobox.d.ts +2 -2
  199. package/dist/components/json-schema-form-template-menu.d.ts +1 -1
  200. package/dist/components/json-schema-form-template.d.ts +3 -3
  201. package/dist/components/json-schema-form-types.d.ts +21 -5
  202. package/dist/components/json-schema-form-types.d.ts.map +1 -1
  203. package/dist/components/json-schema-form-utils.cjs +7 -1
  204. package/dist/components/json-schema-form-utils.cjs.map +1 -1
  205. package/dist/components/json-schema-form-utils.d.ts +3 -2
  206. package/dist/components/json-schema-form-utils.d.ts.map +1 -1
  207. package/dist/components/json-schema-form-utils.js +7 -1
  208. package/dist/components/json-schema-form-utils.js.map +1 -1
  209. package/dist/components/mdx-editor-callout-model.d.ts +1 -1
  210. package/dist/components/mdx-editor-callout.d.ts +1 -1
  211. package/dist/components/mdx-editor-field-plugins.d.ts +1 -1
  212. package/dist/components/mdx-editor-jsx-attributes.d.ts +1 -1
  213. package/dist/components/mdx-editor-options.d.ts +1 -1
  214. package/dist/components/secret-form-extension.d.ts +4 -4
  215. package/dist/components/unit-form-extension.d.ts +1 -1
  216. package/dist/components/useComboboxLayout.d.ts +1 -1
  217. package/dist/components/workload-picker-utils.d.ts +1 -1
  218. package/dist/components.cjs +3 -2
  219. package/dist/components.cjs.map +1 -1
  220. package/dist/components.d.ts +103 -102
  221. package/dist/components.d.ts.map +1 -1
  222. package/dist/components.js +2 -1
  223. package/dist/components.js.map +1 -1
  224. package/dist/data/Avatar.d.ts +1 -1
  225. package/dist/data/AvatarBadge.d.ts +3 -3
  226. package/dist/data/Badge.d.ts +2 -2
  227. package/dist/data/Callout.d.ts +1 -1
  228. package/dist/data/Clicky.d.ts +10 -10
  229. package/dist/data/Clicky.fixtures.d.ts +1 -1
  230. package/dist/data/DataTable.cjs +9 -3
  231. package/dist/data/DataTable.cjs.map +1 -1
  232. package/dist/data/DataTable.d.ts +17 -11
  233. package/dist/data/DataTable.d.ts.map +1 -1
  234. package/dist/data/DataTable.js +9 -3
  235. package/dist/data/DataTable.js.map +1 -1
  236. package/dist/data/DataTableMenuSections.d.ts +3 -3
  237. package/dist/data/DataTablePreferencesSheet.d.ts +3 -3
  238. package/dist/data/FilterPill.d.ts +1 -1
  239. package/dist/data/FixtureEditor/FenceForm.d.ts +2 -2
  240. package/dist/data/FixtureEditor/FixtureEditor.cjs +43 -24
  241. package/dist/data/FixtureEditor/FixtureEditor.cjs.map +1 -1
  242. package/dist/data/FixtureEditor/FixtureEditor.d.ts +1 -1
  243. package/dist/data/FixtureEditor/FixtureEditor.d.ts.map +1 -1
  244. package/dist/data/FixtureEditor/FixtureEditor.js +43 -24
  245. package/dist/data/FixtureEditor/FixtureEditor.js.map +1 -1
  246. package/dist/data/FixtureEditor/FixtureFenceCodeBlockEditor.d.ts +2 -2
  247. package/dist/data/FixtureEditor/FixtureFrontmatterDialog.d.ts +1 -1
  248. package/dist/data/FixtureEditor/fixture-blocks.d.ts +2 -2
  249. package/dist/data/FixtureEditor/fixture-code-block-model.d.ts +1 -1
  250. package/dist/data/FixtureEditor/fixture-frontmatter.d.ts +1 -1
  251. package/dist/data/FixtureEditor/index.d.ts +4 -4
  252. package/dist/data/FixtureEditor/types.d.ts +3 -3
  253. package/dist/data/Gauge.d.ts +1 -1
  254. package/dist/data/GaugeHoverCard.d.ts +1 -1
  255. package/dist/data/GraphDiagram.d.ts +1 -1
  256. package/dist/data/HighlightedTokens.d.ts +1 -1
  257. package/dist/data/Icon.d.ts +1 -1
  258. package/dist/data/LogDetails.d.ts +3 -3
  259. package/dist/data/LogsTable.d.ts +3 -3
  260. package/dist/data/MarkdownEditor.d.ts +2 -2
  261. package/dist/data/MarkdownEditor.model.d.ts +1 -1
  262. package/dist/data/ObjectGraph.d.ts +2 -2
  263. package/dist/data/ProgressBars.d.ts +1 -1
  264. package/dist/data/PromptBanner.d.ts +1 -1
  265. package/dist/data/PromptBanner.model.d.ts +1 -1
  266. package/dist/data/PromptDialog.d.ts +1 -1
  267. package/dist/data/Properties.d.ts +1 -1
  268. package/dist/data/RadialGauge.d.ts +1 -1
  269. package/dist/data/SchemaViewer.d.ts +2 -2
  270. package/dist/data/SelectionActionBar.d.ts +1 -1
  271. package/dist/data/ServerTimingBadge.d.ts +2 -2
  272. package/dist/data/SortableHeader.d.ts +1 -1
  273. package/dist/data/StatStrip.d.ts +2 -2
  274. package/dist/data/TabButton.d.ts +1 -1
  275. package/dist/data/TaskExecDetails.d.ts +1 -1
  276. package/dist/data/TaskHeaderExtras.d.ts +1 -1
  277. package/dist/data/TaskManager.d.ts +2 -2
  278. package/dist/data/TaskProcessDetails.d.ts +1 -1
  279. package/dist/data/TaskProcessMetadata.d.ts +1 -1
  280. package/dist/data/TaskProgress.d.ts +3 -3
  281. package/dist/data/TaskResourceReadings.d.ts +1 -1
  282. package/dist/data/TaskStreamTabs.d.ts +1 -1
  283. package/dist/data/Timeline.d.ts +2 -2
  284. package/dist/data/TimeseriesCoreBars.d.ts +4 -4
  285. package/dist/data/TimeseriesGauge.d.ts +2 -2
  286. package/dist/data/TimeseriesPanel.axes.d.ts +1 -1
  287. package/dist/data/TimeseriesPanel.d.ts +3 -3
  288. package/dist/data/TimeseriesPanel.model.d.ts +1 -1
  289. package/dist/data/Tree.cjs +10 -2
  290. package/dist/data/Tree.cjs.map +1 -1
  291. package/dist/data/Tree.d.ts +7 -2
  292. package/dist/data/Tree.d.ts.map +1 -1
  293. package/dist/data/Tree.js +10 -2
  294. package/dist/data/Tree.js.map +1 -1
  295. package/dist/data/TreeGroupHeader.d.ts +1 -1
  296. package/dist/data/Version.d.ts +1 -1
  297. package/dist/data/WorkloadCard.d.ts +2 -2
  298. package/dist/data/WorkloadCard.model.d.ts +4 -4
  299. package/dist/data/ai/AdvancedChatConfig.d.ts +2 -2
  300. package/dist/data/ai/ChatButton.d.ts +1 -1
  301. package/dist/data/ai/ChatFab.d.ts +1 -1
  302. package/dist/data/ai/ChatWindow.catalogs.d.ts +2 -2
  303. package/dist/data/ai/ChatWindow.d.ts +2 -2
  304. package/dist/data/ai/ChatWindow.models.d.ts +1 -1
  305. package/dist/data/ai/ChatWindow.preferences.d.ts +2 -2
  306. package/dist/data/ai/ChatWindow.runtime.d.ts +2 -2
  307. package/dist/data/ai/ChatWindow.test-utils.d.ts +2 -2
  308. package/dist/data/ai/ChatWindow.thread-status.d.ts +1 -1
  309. package/dist/data/ai/ChatWindow.thread.d.ts +1 -1
  310. package/dist/data/ai/ChatWindow.tool-catalog.d.ts +1 -1
  311. package/dist/data/ai/ChatWindow.types.d.ts +6 -6
  312. package/dist/data/ai/ChatWindowRequestBody.d.ts +3 -3
  313. package/dist/data/ai/ContextBadges.d.ts +1 -1
  314. package/dist/data/ai/PolicyTree.d.ts +1 -1
  315. package/dist/data/ai/PromptCatalog/PromptCatalogTable.d.ts +1 -1
  316. package/dist/data/ai/PromptCatalog/PromptLayerStrip.d.ts +1 -1
  317. package/dist/data/ai/PromptCatalog/PromptPage.d.ts +4 -4
  318. package/dist/data/ai/PromptCatalog/PromptPageEditor.d.ts +4 -4
  319. package/dist/data/ai/PromptCatalog/PromptPageHeader.d.ts +1 -1
  320. package/dist/data/ai/PromptCatalog/PromptPagePreview.d.ts +1 -1
  321. package/dist/data/ai/PromptCatalog/PromptPageSaveBar.d.ts +1 -1
  322. package/dist/data/ai/PromptCatalog/PromptSourceBadge.d.ts +1 -1
  323. package/dist/data/ai/PromptCatalog/index.d.ts +8 -8
  324. package/dist/data/ai/PromptCatalog/prompt-catalog-model.d.ts +1 -1
  325. package/dist/data/ai/PromptCatalog/prompt-page-model.d.ts +4 -4
  326. package/dist/data/ai/PromptCatalog/types.d.ts +1 -1
  327. package/dist/data/ai/PromptPicker/PromptPicker.d.ts +4 -4
  328. package/dist/data/ai/PromptPicker/PromptSourceRepair.d.ts +1 -1
  329. package/dist/data/ai/PromptPicker/index.d.ts +4 -4
  330. package/dist/data/ai/PromptPicker/prompt-runtime.d.ts +2 -2
  331. package/dist/data/ai/PromptPicker/types.d.ts +1 -1
  332. package/dist/data/ai/PromptRunEditor/PromptBlocks.d.ts +4 -4
  333. package/dist/data/ai/PromptRunEditor/RecentRuntimes.d.ts +3 -3
  334. package/dist/data/ai/PromptRunEditor/RuntimeRows.d.ts +5 -5
  335. package/dist/data/ai/PromptRunEditor/VariablesField.d.ts +1 -1
  336. package/dist/data/ai/PromptRunEditor/index.d.ts +11 -11
  337. package/dist/data/ai/PromptRunEditor/model.d.ts +1 -1
  338. package/dist/data/ai/PromptRunEditor/runtimeActions.d.ts +4 -4
  339. package/dist/data/ai/PromptRunEditor/yaml.d.ts +1 -1
  340. package/dist/data/ai/RuntimeModePicker.d.ts +3 -3
  341. package/dist/data/ai/SandboxConnectionsSection.d.ts +1 -1
  342. package/dist/data/ai/SandboxCreateWizard.d.ts +2 -2
  343. package/dist/data/ai/SandboxCreateWizard.model.d.ts +1 -1
  344. package/dist/data/ai/SessionChatComposer.d.ts +1 -1
  345. package/dist/data/ai/SessionInspector.approvals-model.d.ts +1 -1
  346. package/dist/data/ai/SessionInspector.approvals.d.ts +3 -3
  347. package/dist/data/ai/SessionInspector.cjs +143 -167
  348. package/dist/data/ai/SessionInspector.cjs.map +1 -1
  349. package/dist/data/ai/SessionInspector.collection-types.d.ts +7 -2
  350. package/dist/data/ai/SessionInspector.collection-types.d.ts.map +1 -1
  351. package/dist/data/ai/SessionInspector.collection.cjs +18 -5
  352. package/dist/data/ai/SessionInspector.collection.cjs.map +1 -1
  353. package/dist/data/ai/SessionInspector.collection.d.ts +5 -3
  354. package/dist/data/ai/SessionInspector.collection.d.ts.map +1 -1
  355. package/dist/data/ai/SessionInspector.collection.fixtures.d.ts +6 -0
  356. package/dist/data/ai/SessionInspector.collection.fixtures.d.ts.map +1 -0
  357. package/dist/data/ai/SessionInspector.collection.js +18 -5
  358. package/dist/data/ai/SessionInspector.collection.js.map +1 -1
  359. package/dist/data/ai/SessionInspector.compact.d.ts +2 -2
  360. package/dist/data/ai/SessionInspector.d.ts +30 -8
  361. package/dist/data/ai/SessionInspector.d.ts.map +1 -1
  362. package/dist/data/ai/SessionInspector.files.d.ts +1 -1
  363. package/dist/data/ai/SessionInspector.hierarchy-state.cjs +105 -7
  364. package/dist/data/ai/SessionInspector.hierarchy-state.cjs.map +1 -1
  365. package/dist/data/ai/SessionInspector.hierarchy-state.d.ts +14 -3
  366. package/dist/data/ai/SessionInspector.hierarchy-state.d.ts.map +1 -1
  367. package/dist/data/ai/SessionInspector.hierarchy-state.js +107 -9
  368. package/dist/data/ai/SessionInspector.hierarchy-state.js.map +1 -1
  369. package/dist/data/ai/SessionInspector.hierarchy.cjs +1 -1
  370. package/dist/data/ai/SessionInspector.hierarchy.cjs.map +1 -1
  371. package/dist/data/ai/SessionInspector.hierarchy.d.ts +2 -2
  372. package/dist/data/ai/SessionInspector.hierarchy.js +1 -1
  373. package/dist/data/ai/SessionInspector.hierarchy.js.map +1 -1
  374. package/dist/data/ai/SessionInspector.js +144 -168
  375. package/dist/data/ai/SessionInspector.js.map +1 -1
  376. package/dist/data/ai/SessionInspector.legacy.cjs +116 -0
  377. package/dist/data/ai/SessionInspector.legacy.cjs.map +1 -0
  378. package/dist/data/ai/SessionInspector.legacy.d.ts +19 -0
  379. package/dist/data/ai/SessionInspector.legacy.d.ts.map +1 -0
  380. package/dist/data/ai/SessionInspector.legacy.js +116 -0
  381. package/dist/data/ai/SessionInspector.legacy.js.map +1 -0
  382. package/dist/data/ai/SessionInspector.model.d.ts +1 -1
  383. package/dist/data/ai/SessionInspector.panel-values.d.ts +1 -1
  384. package/dist/data/ai/SessionInspector.panels.cjs +3 -0
  385. package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
  386. package/dist/data/ai/SessionInspector.panels.d.ts +4 -4
  387. package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
  388. package/dist/data/ai/SessionInspector.panels.js +3 -0
  389. package/dist/data/ai/SessionInspector.panels.js.map +1 -1
  390. package/dist/data/ai/SessionInspector.plan.cjs +29 -12
  391. package/dist/data/ai/SessionInspector.plan.cjs.map +1 -1
  392. package/dist/data/ai/SessionInspector.plan.d.ts +1 -1
  393. package/dist/data/ai/SessionInspector.plan.d.ts.map +1 -1
  394. package/dist/data/ai/SessionInspector.plan.js +30 -13
  395. package/dist/data/ai/SessionInspector.plan.js.map +1 -1
  396. package/dist/data/ai/SessionInspector.remote-view.cjs +44 -0
  397. package/dist/data/ai/SessionInspector.remote-view.cjs.map +1 -0
  398. package/dist/data/ai/SessionInspector.remote-view.d.ts +11 -0
  399. package/dist/data/ai/SessionInspector.remote-view.d.ts.map +1 -0
  400. package/dist/data/ai/SessionInspector.remote-view.js +44 -0
  401. package/dist/data/ai/SessionInspector.remote-view.js.map +1 -0
  402. package/dist/data/ai/SessionInspector.remote.cjs +275 -0
  403. package/dist/data/ai/SessionInspector.remote.cjs.map +1 -0
  404. package/dist/data/ai/SessionInspector.remote.d.ts +57 -0
  405. package/dist/data/ai/SessionInspector.remote.d.ts.map +1 -0
  406. package/dist/data/ai/SessionInspector.remote.js +275 -0
  407. package/dist/data/ai/SessionInspector.remote.js.map +1 -0
  408. package/dist/data/ai/SessionInspector.summary.cjs +0 -156
  409. package/dist/data/ai/SessionInspector.summary.cjs.map +1 -1
  410. package/dist/data/ai/SessionInspector.summary.d.ts +1 -4
  411. package/dist/data/ai/SessionInspector.summary.d.ts.map +1 -1
  412. package/dist/data/ai/SessionInspector.summary.js +2 -158
  413. package/dist/data/ai/SessionInspector.summary.js.map +1 -1
  414. package/dist/data/ai/SessionInspector.tab-state.cjs +15 -0
  415. package/dist/data/ai/SessionInspector.tab-state.cjs.map +1 -0
  416. package/dist/data/ai/SessionInspector.tab-state.d.ts +3 -0
  417. package/dist/data/ai/SessionInspector.tab-state.d.ts.map +1 -0
  418. package/dist/data/ai/SessionInspector.tab-state.js +15 -0
  419. package/dist/data/ai/SessionInspector.tab-state.js.map +1 -0
  420. package/dist/data/ai/SessionInspector.tabs.d.ts +2 -2
  421. package/dist/data/ai/SessionInspector.tabs.model.cjs +31 -18
  422. package/dist/data/ai/SessionInspector.tabs.model.cjs.map +1 -1
  423. package/dist/data/ai/SessionInspector.tabs.model.d.ts +5 -3
  424. package/dist/data/ai/SessionInspector.tabs.model.d.ts.map +1 -1
  425. package/dist/data/ai/SessionInspector.tabs.model.js +32 -19
  426. package/dist/data/ai/SessionInspector.tabs.model.js.map +1 -1
  427. package/dist/data/ai/SessionInspector.transcript.d.ts +2 -2
  428. package/dist/data/ai/SessionInspector.turns.d.ts +1 -1
  429. package/dist/data/ai/SessionInspector.verification.cjs +53 -0
  430. package/dist/data/ai/SessionInspector.verification.cjs.map +1 -0
  431. package/dist/data/ai/SessionInspector.verification.d.ts +7 -0
  432. package/dist/data/ai/SessionInspector.verification.d.ts.map +1 -0
  433. package/dist/data/ai/SessionInspector.verification.js +53 -0
  434. package/dist/data/ai/SessionInspector.verification.js.map +1 -0
  435. package/dist/data/ai/SessionViewer.d.ts +5 -5
  436. package/dist/data/ai/SessionViewer.fixtures.d.ts +2 -2
  437. package/dist/data/ai/SessionViewer.grouping.d.ts +1 -1
  438. package/dist/data/ai/SessionViewer.header.d.ts +2 -2
  439. package/dist/data/ai/SessionViewer.model.cjs +7 -1
  440. package/dist/data/ai/SessionViewer.model.cjs.map +1 -1
  441. package/dist/data/ai/SessionViewer.model.d.ts +23 -5
  442. package/dist/data/ai/SessionViewer.model.d.ts.map +1 -1
  443. package/dist/data/ai/SessionViewer.model.js +7 -1
  444. package/dist/data/ai/SessionViewer.model.js.map +1 -1
  445. package/dist/data/ai/SessionViewer.row-metadata.d.ts +1 -1
  446. package/dist/data/ai/SessionViewer.rows.d.ts +3 -3
  447. package/dist/data/ai/SessionViewer.tool-details.d.ts +1 -1
  448. package/dist/data/ai/SessionViewer.tool-row.d.ts +2 -2
  449. package/dist/data/ai/SessionViewer.unified.d.ts +13 -0
  450. package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
  451. package/dist/data/ai/SessionViewerMenu.d.ts +2 -2
  452. package/dist/data/ai/SpecRuntimeEditor/CLIArgsSection.d.ts +2 -2
  453. package/dist/data/ai/SpecRuntimeEditor/CommitSection.d.ts +1 -1
  454. package/dist/data/ai/SpecRuntimeEditor/EnvironmentSection.d.ts +2 -2
  455. package/dist/data/ai/SpecRuntimeEditor/ModelContextAdvanced.d.ts +3 -3
  456. package/dist/data/ai/SpecRuntimeEditor/ModelSection.d.ts +5 -5
  457. package/dist/data/ai/SpecRuntimeEditor/PermissionModeField.d.ts +2 -2
  458. package/dist/data/ai/SpecRuntimeEditor/PermissionPolicyList.d.ts +1 -1
  459. package/dist/data/ai/SpecRuntimeEditor/PermissionsSection.d.ts +4 -4
  460. package/dist/data/ai/SpecRuntimeEditor/PromptSection.d.ts +2 -2
  461. package/dist/data/ai/SpecRuntimeEditor/SandboxSection.d.ts +4 -4
  462. package/dist/data/ai/SpecRuntimeEditor/SectionCard.d.ts +1 -1
  463. package/dist/data/ai/SpecRuntimeEditor/SectionTabs.d.ts +1 -1
  464. package/dist/data/ai/SpecRuntimeEditor/VerifySection.d.ts +5 -5
  465. package/dist/data/ai/SpecRuntimeEditor/WorkspaceSection.d.ts +3 -3
  466. package/dist/data/ai/SpecRuntimeEditor/env-model.d.ts +2 -2
  467. package/dist/data/ai/SpecRuntimeEditor/fields.d.ts +2 -2
  468. package/dist/data/ai/SpecRuntimeEditor/index.d.ts +11 -11
  469. package/dist/data/ai/SpecRuntimeEditor/permission-mode-visuals.d.ts +3 -3
  470. package/dist/data/ai/SpecRuntimeEditor/permissions-model.d.ts +3 -3
  471. package/dist/data/ai/SpecRuntimeEditor/summaries.d.ts +3 -3
  472. package/dist/data/ai/SpecRuntimeEditor/types.d.ts +4 -4
  473. package/dist/data/ai/SpecRuntimeEditor/update.d.ts +1 -1
  474. package/dist/data/ai/SpecRuntimeEditor.model.d.ts +5 -5
  475. package/dist/data/ai/ToolPreferences.d.ts +4 -4
  476. package/dist/data/ai/ToolPreferences.model.d.ts +2 -2
  477. package/dist/data/ai/ToolPreferencesList.d.ts +3 -3
  478. package/dist/data/ai/ToolSchemaBrowser.d.ts +2 -2
  479. package/dist/data/ai/ToolSchemaBrowser.detail.d.ts +2 -2
  480. package/dist/data/ai/ToolSchemaBrowser.model.d.ts +2 -2
  481. package/dist/data/ai/ToolSchemaBrowser.selection-toolbar.d.ts +2 -2
  482. package/dist/data/ai/ToolSchemaBrowser.sidebar.d.ts +4 -4
  483. package/dist/data/ai/agent-action-icons.d.ts +5 -5
  484. package/dist/data/ai/chat-window-context.d.ts +3 -3
  485. package/dist/data/ai/context.d.ts +1 -1
  486. package/dist/data/ai/examples/sessions/claude-complete.d.ts +1 -1
  487. package/dist/data/ai/examples/sessions/claude.d.ts +1 -1
  488. package/dist/data/ai/examples/sessions/codex-complete.d.ts +1 -1
  489. package/dist/data/ai/examples/sessions/codex.d.ts +1 -1
  490. package/dist/data/ai/examples/sessions/index.d.ts +5 -5
  491. package/dist/data/ai/index.d.ts +55 -53
  492. package/dist/data/ai/index.d.ts.map +1 -1
  493. package/dist/data/ai/runtime-profile.d.ts +4 -4
  494. package/dist/data/ai/runtime-profiles/OrderedPresetSelect.d.ts +1 -1
  495. package/dist/data/ai/runtime-profiles/PermissionStrategiesEditor.d.ts +2 -2
  496. package/dist/data/ai/runtime-profiles/PermissionStrategyConditionRow.d.ts +3 -3
  497. package/dist/data/ai/runtime-profiles/PresetSpecEditor.d.ts +3 -3
  498. package/dist/data/ai/runtime-profiles/PresetWorkspace.d.ts +5 -5
  499. package/dist/data/ai/runtime-profiles/ProfilePresetChips.d.ts +1 -1
  500. package/dist/data/ai/runtime-profiles/ProfileSpecEditor.d.ts +4 -4
  501. package/dist/data/ai/runtime-profiles/ProfileWorkspace.d.ts +5 -5
  502. package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts +2 -2
  503. package/dist/data/ai/runtime-profiles/ResolutionTrace.d.ts +1 -1
  504. package/dist/data/ai/runtime-profiles/RuntimeLibraryList.d.ts +1 -1
  505. package/dist/data/ai/runtime-profiles/RuntimePersistenceBar.d.ts +1 -1
  506. package/dist/data/ai/runtime-profiles/RuntimeProfilePicker.d.ts +2 -2
  507. package/dist/data/ai/runtime-profiles/RuntimeProfilePicker.model.d.ts +3 -3
  508. package/dist/data/ai/runtime-profiles/RuntimeProfilesWorkspace.d.ts +4 -4
  509. package/dist/data/ai/runtime-profiles/index.d.ts +19 -19
  510. package/dist/data/ai/runtime-profiles/types.d.ts +3 -3
  511. package/dist/data/ai/runtime-profiles/use-permission-catalog.d.ts +3 -3
  512. package/dist/data/ai/runtime-profiles/use-resolution.d.ts +2 -2
  513. package/dist/data/ai/runtime-profiles/use-runtime-families.d.ts +1 -1
  514. package/dist/data/ai/runtime-profiles/use-runtime-profile-picker.d.ts +3 -3
  515. package/dist/data/ai/sandbox-kind-meta.d.ts +1 -1
  516. package/dist/data/ai/session-categories.d.ts +2 -2
  517. package/dist/data/ai/session-cost.d.ts +2 -2
  518. package/dist/data/ai/session-tones.d.ts +1 -1
  519. package/dist/data/ai/tool-name.d.ts +1 -1
  520. package/dist/data/cache-browser/CacheBrowser.d.ts +2 -2
  521. package/dist/data/cache-browser/CacheDetailPanel.d.ts +3 -3
  522. package/dist/data/cache-browser/CacheStatsOverview.d.ts +2 -2
  523. package/dist/data/cache-browser/CacheTree.d.ts +3 -3
  524. package/dist/data/cache-browser/CacheValue.d.ts +1 -1
  525. package/dist/data/cache-browser/adapter.d.ts +2 -2
  526. package/dist/data/cache-browser/api.d.ts +1 -1
  527. package/dist/data/cache-browser/cache-browser.fixtures.d.ts +2 -2
  528. package/dist/data/cache-browser/index.d.ts +8 -8
  529. package/dist/data/cells/EntityCell.d.ts +2 -2
  530. package/dist/data/cells/StatusDot.d.ts +1 -1
  531. package/dist/data/cells/TagList.d.ts +1 -1
  532. package/dist/data/cells/Timestamp.d.ts +1 -1
  533. package/dist/data/cells/status-mapping.d.ts +1 -1
  534. package/dist/data/cells/tag-utils.d.ts +1 -1
  535. package/dist/data/cells/timestamp-format.d.ts +1 -1
  536. package/dist/data/chat/Attachment.d.ts +2 -2
  537. package/dist/data/chat/Chat.d.ts +5 -5
  538. package/dist/data/chat/Chat.fixtures.d.ts +1 -1
  539. package/dist/data/chat/Chat.runtime.d.ts +2 -2
  540. package/dist/data/chat/ChatRuntimeToolbar.d.ts +2 -2
  541. package/dist/data/chat/ContextMeter.bar.d.ts +1 -1
  542. package/dist/data/chat/ContextMeter.d.ts +1 -1
  543. package/dist/data/chat/Conversation.d.ts +2 -2
  544. package/dist/data/chat/Message.d.ts +1 -1
  545. package/dist/data/chat/ModelSelector.d.ts +3 -3
  546. package/dist/data/chat/PromptInput.d.ts +2 -2
  547. package/dist/data/chat/Suggestion.d.ts +1 -1
  548. package/dist/data/chat/ToolCall.d.ts +2 -2
  549. package/dist/data/chat/approval.d.ts +1 -1
  550. package/dist/data/chat/attachment-upload.d.ts +1 -1
  551. package/dist/data/chat/clickyOperationsToTools.d.ts +2 -2
  552. package/dist/data/chat/effort-icons.d.ts +1 -1
  553. package/dist/data/chat/index.d.ts +20 -20
  554. package/dist/data/chat/models.d.ts +1 -1
  555. package/dist/data/chat/provider-icons.d.ts +1 -1
  556. package/dist/data/chat/tool-policy.d.ts +1 -1
  557. package/dist/data/chat/tool-render/ToolParams.d.ts +2 -2
  558. package/dist/data/chat/tool-render/ToolValue.d.ts +1 -1
  559. package/dist/data/chat/tool-render/adapter.d.ts +1 -1
  560. package/dist/data/chat/tool-render/context.d.ts +1 -1
  561. package/dist/data/chat/tool-render/defaults.d.ts +1 -1
  562. package/dist/data/chat/tool-render/index.d.ts +12 -12
  563. package/dist/data/chat/tool-render/known-tool-views.d.ts +1 -1
  564. package/dist/data/chat/tool-render/known-tools.d.ts +1 -1
  565. package/dist/data/chat/tool-render/registry.d.ts +1 -1
  566. package/dist/data/chat/tool-render/schema.d.ts +2 -2
  567. package/dist/data/chat/tool-render/shape.d.ts +2 -2
  568. package/dist/data/chat/tool-render/summary.d.ts +1 -1
  569. package/dist/data/chat/types.d.ts +1 -1
  570. package/dist/data/chat/usage-snapshot.d.ts +2 -2
  571. package/dist/data/clicky-export/ClickyExportDialog.d.ts +1 -1
  572. package/dist/data/clicky-export/index.d.ts +2 -2
  573. package/dist/data/clicky-export/useClickyExport.d.ts +2 -2
  574. package/dist/data/clicky-parse.d.ts +1 -1
  575. package/dist/data/code-block-actions.d.ts +1 -1
  576. package/dist/data/data-table-filter-values.d.ts +1 -1
  577. package/dist/data/data-table-server-filters.d.ts +4 -4
  578. package/dist/data/data-table-utils.d.ts +1 -1
  579. package/dist/data/diagnostics/DiagnosticsDetailPanel.d.ts +3 -3
  580. package/dist/data/diagnostics/DiagnosticsTree.d.ts +1 -1
  581. package/dist/data/diagnostics/ErrorDetails.d.ts +1 -1
  582. package/dist/data/diagnostics/FrameSourceWindow.d.ts +1 -1
  583. package/dist/data/diagnostics/GoroutineCard.d.ts +1 -1
  584. package/dist/data/diagnostics/JvmStackTrace.d.ts +3 -3
  585. package/dist/data/diagnostics/RenderedStackTrace.d.ts +3 -3
  586. package/dist/data/diagnostics/StackFrameRow.d.ts +1 -1
  587. package/dist/data/diagnostics/ThreadCard.d.ts +3 -3
  588. package/dist/data/diagnostics/fixtures.d.ts +1 -1
  589. package/dist/data/diagnostics/stacktrace-parse.d.ts +1 -1
  590. package/dist/data/diagnostics/stacktrace.d.ts +1 -1
  591. package/dist/data/diagnostics/utils.d.ts +3 -3
  592. package/dist/data/examples/markdown-preview-mock.d.ts +1 -1
  593. package/dist/data/gauge-stats.d.ts +1 -1
  594. package/dist/data/git/index.d.ts +2 -2
  595. package/dist/data/har/HarPanel.d.ts +1 -1
  596. package/dist/data/har/fixtures.d.ts +1 -1
  597. package/dist/data/properties-context.d.ts +1 -1
  598. package/dist/data/query-browser/QueryBrowser.d.ts +1 -1
  599. package/dist/data/query-browser/QueryBrowser.editor.d.ts +1 -1
  600. package/dist/data/query-browser/QueryBrowser.types.d.ts +6 -6
  601. package/dist/data/query-browser/QueryBrowserDiagnosticsPanel.d.ts +1 -1
  602. package/dist/data/query-browser/QueryBrowserResults.d.ts +3 -3
  603. package/dist/data/query-browser/index.d.ts +3 -3
  604. package/dist/data/runtime/ProviderStatusPanel.d.ts +2 -2
  605. package/dist/data/runtime/RuntimeBar.d.ts +3 -3
  606. package/dist/data/runtime/RuntimeBar.model.d.ts +3 -3
  607. package/dist/data/runtime/RuntimeBarActions.d.ts +2 -2
  608. package/dist/data/runtime/RuntimeBarCombo.d.ts +3 -3
  609. package/dist/data/runtime/RuntimeBarSegment.d.ts +1 -1
  610. package/dist/data/runtime/RuntimeBarSegments.d.ts +3 -3
  611. package/dist/data/runtime/availability.d.ts +1 -1
  612. package/dist/data/runtime/model-capabilities.d.ts +1 -1
  613. package/dist/data/runtime/provider-status.d.ts +2 -2
  614. package/dist/data/runtime/runtime-field-support.d.ts +4 -4
  615. package/dist/data/runtime/runtime-mode.d.ts +6 -6
  616. package/dist/data/schema-viewer-model.d.ts +1 -1
  617. package/dist/data/selectionActionSplit.d.ts +1 -1
  618. package/dist/data/status-breakdown-utils.d.ts +1 -1
  619. package/dist/data/task-copy.d.ts +1 -1
  620. package/dist/data/task-exec-details.d.ts +1 -1
  621. package/dist/data/task-process-details.d.ts +2 -2
  622. package/dist/data/task-resource-summary.d.ts +1 -1
  623. package/dist/data/task-status.d.ts +3 -3
  624. package/dist/data/task-streams.d.ts +1 -1
  625. package/dist/data/task-work-progress.d.ts +1 -1
  626. package/dist/data/test-runner/TestFailureDetail.d.ts +1 -1
  627. package/dist/data/test-runner/TestFilterBar.d.ts +2 -2
  628. package/dist/data/test-runner/TestRunSummary.d.ts +1 -1
  629. package/dist/data/test-runner/TestRunner.d.ts +3 -3
  630. package/dist/data/test-runner/TestRunner.fixtures.d.ts +2 -2
  631. package/dist/data/test-runner/TestTreeNode.d.ts +1 -1
  632. package/dist/data/test-runner/adapter.d.ts +2 -2
  633. package/dist/data/test-runner/context.d.ts +3 -3
  634. package/dist/data/test-runner/frameworkIcon.d.ts +1 -1
  635. package/dist/data/test-runner/index.d.ts +14 -14
  636. package/dist/data/test-runner/routePath.d.ts +1 -1
  637. package/dist/data/test-runner/status.d.ts +4 -4
  638. package/dist/data/timeseries-query.d.ts +1 -1
  639. package/dist/data/use-infinite-rows.d.ts +1 -1
  640. package/dist/data/useDebugAction.d.ts +1 -1
  641. package/dist/data/verification/VerificationResults.d.ts +2 -2
  642. package/dist/data/verification/adapterViews.d.ts +1 -1
  643. package/dist/data/verification/adapters.d.ts +1 -1
  644. package/dist/data/verification/index.d.ts +4 -4
  645. package/dist/data/verification/verifyReportTests.d.ts +2 -2
  646. package/dist/data/version-info.cjs +3 -3
  647. package/dist/data/version-info.js +3 -3
  648. package/dist/data.d.ts +119 -119
  649. package/dist/devtools/DebugConsole.d.ts +3 -3
  650. package/dist/devtools/DebugConsoleButton.d.ts +1 -1
  651. package/dist/devtools/DebugConsoleDock.d.ts +2 -2
  652. package/dist/devtools/ExecutionDetail.d.ts +2 -2
  653. package/dist/devtools/debugClient.d.ts +1 -1
  654. package/dist/devtools/debugStore.d.ts +1 -1
  655. package/dist/devtools/dockState.d.ts +1 -1
  656. package/dist/devtools/tabs/ConsoleTab.d.ts +1 -1
  657. package/dist/devtools/tabs/InspectionCaches.d.ts +2 -2
  658. package/dist/devtools/tabs/InspectionTab.d.ts +2 -2
  659. package/dist/devtools/tabs/NetworkTab.d.ts +2 -2
  660. package/dist/devtools/tabs/QueriesTab.d.ts +2 -2
  661. package/dist/devtools/types.d.ts +2 -2
  662. package/dist/devtools/useDebugStream.cjs +5 -1
  663. package/dist/devtools/useDebugStream.cjs.map +1 -1
  664. package/dist/devtools/useDebugStream.d.ts +2 -2
  665. package/dist/devtools/useDebugStream.d.ts.map +1 -1
  666. package/dist/devtools/useDebugStream.js +6 -2
  667. package/dist/devtools/useDebugStream.js.map +1 -1
  668. package/dist/devtools.d.ts +28 -28
  669. package/dist/expressions/lang/attributes.d.ts +1 -1
  670. package/dist/expressions/lang/completion.d.ts +1 -1
  671. package/dist/expressions/lang/generated/index.d.ts +1 -1
  672. package/dist/expressions/lang/hover.d.ts +1 -1
  673. package/dist/expressions/lang/index.d.ts +13 -13
  674. package/dist/expressions/lang/merge.d.ts +1 -1
  675. package/dist/expressions/lang/prefix.d.ts +1 -1
  676. package/dist/expressions/lang/spec.d.ts +2 -2
  677. package/dist/expressions/lang/theme.d.ts +1 -1
  678. package/dist/expressions/playground/ExpressionPlayground.d.ts +3 -3
  679. package/dist/expressions/playground/RunControls.d.ts +1 -1
  680. package/dist/expressions/playground/api.d.ts +2 -2
  681. package/dist/expressions/playground/languages.d.ts +2 -2
  682. package/dist/expressions/playground/panels/ExpectationStrip.d.ts +1 -1
  683. package/dist/expressions/playground/panels/ResultPanel.d.ts +1 -1
  684. package/dist/expressions/playground/panels/ResultView.d.ts +3 -3
  685. package/dist/expressions/playground/panels/SamplesPanel.d.ts +2 -2
  686. package/dist/expressions/playground/panels/SpecPanel.d.ts +1 -1
  687. package/dist/expressions/playground/panels/graphNodes.d.ts +2 -2
  688. package/dist/expressions/playground/sampleOutcome.d.ts +1 -1
  689. package/dist/expressions/playground/useEvaluator.d.ts +1 -1
  690. package/dist/expressions/playground/useSampleRuns.d.ts +3 -3
  691. package/dist/expressions/playground.d.ts +14 -14
  692. package/dist/expressions.d.ts +1 -1
  693. package/dist/hooks/density-provider.d.ts +1 -1
  694. package/dist/hooks/event-source-provider.cjs +9 -0
  695. package/dist/hooks/event-source-provider.cjs.map +1 -0
  696. package/dist/hooks/event-source-provider.d.ts +15 -0
  697. package/dist/hooks/event-source-provider.d.ts.map +1 -0
  698. package/dist/hooks/event-source-provider.js +9 -0
  699. package/dist/hooks/event-source-provider.js.map +1 -0
  700. package/dist/hooks/event-source.cjs +11 -0
  701. package/dist/hooks/event-source.cjs.map +1 -0
  702. package/dist/hooks/event-source.d.ts +22 -0
  703. package/dist/hooks/event-source.d.ts.map +1 -0
  704. package/dist/hooks/event-source.js +11 -0
  705. package/dist/hooks/event-source.js.map +1 -0
  706. package/dist/hooks/theme-provider.d.ts +1 -1
  707. package/dist/hooks/use-log-tail.cjs +5 -1
  708. package/dist/hooks/use-log-tail.cjs.map +1 -1
  709. package/dist/hooks/use-log-tail.d.ts +2 -2
  710. package/dist/hooks/use-log-tail.d.ts.map +1 -1
  711. package/dist/hooks/use-log-tail.js +5 -1
  712. package/dist/hooks/use-log-tail.js.map +1 -1
  713. package/dist/hooks/use-prompts.cjs +5 -1
  714. package/dist/hooks/use-prompts.cjs.map +1 -1
  715. package/dist/hooks/use-prompts.d.ts +1 -1
  716. package/dist/hooks/use-prompts.d.ts.map +1 -1
  717. package/dist/hooks/use-prompts.js +6 -2
  718. package/dist/hooks/use-prompts.js.map +1 -1
  719. package/dist/hooks/use-task-run.cjs +9 -2
  720. package/dist/hooks/use-task-run.cjs.map +1 -1
  721. package/dist/hooks/use-task-run.d.ts +2 -2
  722. package/dist/hooks/use-task-run.d.ts.map +1 -1
  723. package/dist/hooks/use-task-run.js +10 -3
  724. package/dist/hooks/use-task-run.js.map +1 -1
  725. package/dist/hooks.cjs +4 -0
  726. package/dist/hooks.cjs.map +1 -1
  727. package/dist/hooks.d.ts +15 -13
  728. package/dist/hooks.d.ts.map +1 -1
  729. package/dist/hooks.js +4 -0
  730. package/dist/hooks.js.map +1 -1
  731. package/dist/icons/changeIconAliases.d.ts +1 -1
  732. package/dist/icons/components/UiAccessProtected.d.ts +1 -1
  733. package/dist/icons/components/UiAccessPublic.d.ts +1 -1
  734. package/dist/icons/components/UiActivity.d.ts +1 -1
  735. package/dist/icons/components/UiAdd.d.ts +1 -1
  736. package/dist/icons/components/UiAddChangeset.d.ts +1 -1
  737. package/dist/icons/components/UiAggregate.d.ts +1 -1
  738. package/dist/icons/components/UiAlias.d.ts +1 -1
  739. package/dist/icons/components/UiAnnotation.d.ts +1 -1
  740. package/dist/icons/components/UiAopAroundAdvice.d.ts +1 -1
  741. package/dist/icons/components/UiAopBeforeAdvice.d.ts +1 -1
  742. package/dist/icons/components/UiAopPointcut.d.ts +1 -1
  743. package/dist/icons/components/UiArchive.d.ts +1 -1
  744. package/dist/icons/components/UiArray.d.ts +1 -1
  745. package/dist/icons/components/UiArrowDown.d.ts +1 -1
  746. package/dist/icons/components/UiArrowDownRight.d.ts +1 -1
  747. package/dist/icons/components/UiArrowFatUp.d.ts +1 -1
  748. package/dist/icons/components/UiArrowLeft.d.ts +1 -1
  749. package/dist/icons/components/UiArrowRight.d.ts +1 -1
  750. package/dist/icons/components/UiArrowUp.d.ts +1 -1
  751. package/dist/icons/components/UiArrowUpRight.d.ts +1 -1
  752. package/dist/icons/components/UiArrowsCounterClockwise.d.ts +1 -1
  753. package/dist/icons/components/UiArtifact.d.ts +1 -1
  754. package/dist/icons/components/UiAsterisk.d.ts +1 -1
  755. package/dist/icons/components/UiAsyncFn.d.ts +1 -1
  756. package/dist/icons/components/UiAt.d.ts +1 -1
  757. package/dist/icons/components/UiAtom.d.ts +1 -1
  758. package/dist/icons/components/UiAttachDebugger.d.ts +1 -1
  759. package/dist/icons/components/UiAttachToProcess.d.ts +1 -1
  760. package/dist/icons/components/UiAuditLog.d.ts +1 -1
  761. package/dist/icons/components/UiBank.d.ts +1 -1
  762. package/dist/icons/components/UiBatteryChargingVertical.d.ts +1 -1
  763. package/dist/icons/components/UiBatteryVerticalEmpty.d.ts +1 -1
  764. package/dist/icons/components/UiBatteryVerticalFull.d.ts +1 -1
  765. package/dist/icons/components/UiBatteryVerticalHigh.d.ts +1 -1
  766. package/dist/icons/components/UiBatteryVerticalLow.d.ts +1 -1
  767. package/dist/icons/components/UiBatteryVerticalMedium.d.ts +1 -1
  768. package/dist/icons/components/UiBeaker.d.ts +1 -1
  769. package/dist/icons/components/UiBell.d.ts +1 -1
  770. package/dist/icons/components/UiBellSlash.d.ts +1 -1
  771. package/dist/icons/components/UiBinary.d.ts +1 -1
  772. package/dist/icons/components/UiBlueKey.d.ts +1 -1
  773. package/dist/icons/components/UiBoolean.d.ts +1 -1
  774. package/dist/icons/components/UiBox.d.ts +1 -1
  775. package/dist/icons/components/UiBoxes.d.ts +1 -1
  776. package/dist/icons/components/UiBraces.d.ts +1 -1
  777. package/dist/icons/components/UiBrain.d.ts +1 -1
  778. package/dist/icons/components/UiBreakpoint.d.ts +1 -1
  779. package/dist/icons/components/UiBreakpoint1.d.ts +1 -1
  780. package/dist/icons/components/UiBreakpoint2.d.ts +1 -1
  781. package/dist/icons/components/UiBreakpoint3.d.ts +1 -1
  782. package/dist/icons/components/UiBreakpoint4.d.ts +1 -1
  783. package/dist/icons/components/UiBreakpointDisabled.d.ts +1 -1
  784. package/dist/icons/components/UiBreakpointField.d.ts +1 -1
  785. package/dist/icons/components/UiBreakpointMethod.d.ts +1 -1
  786. package/dist/icons/components/UiBroadcast.d.ts +1 -1
  787. package/dist/icons/components/UiBug.d.ts +1 -1
  788. package/dist/icons/components/UiCache.d.ts +1 -1
  789. package/dist/icons/components/UiCalculator.d.ts +1 -1
  790. package/dist/icons/components/UiCalendar.d.ts +1 -1
  791. package/dist/icons/components/UiCalendarBlank.d.ts +1 -1
  792. package/dist/icons/components/UiCalendarCheck.d.ts +1 -1
  793. package/dist/icons/components/UiCamera.d.ts +1 -1
  794. package/dist/icons/components/UiCancel.d.ts +1 -1
  795. package/dist/icons/components/UiChartBar.d.ts +1 -1
  796. package/dist/icons/components/UiChartLineUp.d.ts +1 -1
  797. package/dist/icons/components/UiChartOfAccounts.d.ts +1 -1
  798. package/dist/icons/components/UiChartPie.d.ts +1 -1
  799. package/dist/icons/components/UiChatDots.d.ts +1 -1
  800. package/dist/icons/components/UiCheck.d.ts +1 -1
  801. package/dist/icons/components/UiCheckConstraint.d.ts +1 -1
  802. package/dist/icons/components/UiChevronDown.d.ts +1 -1
  803. package/dist/icons/components/UiChevronRight.d.ts +1 -1
  804. package/dist/icons/components/UiChevronUp.d.ts +1 -1
  805. package/dist/icons/components/UiChevronsDown.d.ts +1 -1
  806. package/dist/icons/components/UiChevronsUp.d.ts +1 -1
  807. package/dist/icons/components/UiChip.d.ts +1 -1
  808. package/dist/icons/components/UiCircleFilled.d.ts +1 -1
  809. package/dist/icons/components/UiCircleOutline.d.ts +1 -1
  810. package/dist/icons/components/UiCircleX.d.ts +1 -1
  811. package/dist/icons/components/UiClass.d.ts +1 -1
  812. package/dist/icons/components/UiClass1.d.ts +1 -1
  813. package/dist/icons/components/UiClass2.d.ts +1 -1
  814. package/dist/icons/components/UiClass3.d.ts +1 -1
  815. package/dist/icons/components/UiClass4.d.ts +1 -1
  816. package/dist/icons/components/UiClass5.d.ts +1 -1
  817. package/dist/icons/components/UiClass6.d.ts +1 -1
  818. package/dist/icons/components/UiClass7.d.ts +1 -1
  819. package/dist/icons/components/UiClearCash.d.ts +1 -1
  820. package/dist/icons/components/UiClipboardText.d.ts +1 -1
  821. package/dist/icons/components/UiClock.d.ts +1 -1
  822. package/dist/icons/components/UiClockCountdown.d.ts +1 -1
  823. package/dist/icons/components/UiClose.d.ts +1 -1
  824. package/dist/icons/components/UiCloud.d.ts +1 -1
  825. package/dist/icons/components/UiCloudDownload.d.ts +1 -1
  826. package/dist/icons/components/UiCloudUpload.d.ts +1 -1
  827. package/dist/icons/components/UiCode2.d.ts +1 -1
  828. package/dist/icons/components/UiCog.d.ts +1 -1
  829. package/dist/icons/components/UiCoins.d.ts +1 -1
  830. package/dist/icons/components/UiCollapseAll.d.ts +1 -1
  831. package/dist/icons/components/UiCollection.d.ts +1 -1
  832. package/dist/icons/components/UiCollectionType.d.ts +1 -1
  833. package/dist/icons/components/UiColumn.d.ts +1 -1
  834. package/dist/icons/components/UiColumn1.d.ts +1 -1
  835. package/dist/icons/components/UiColumn2.d.ts +1 -1
  836. package/dist/icons/components/UiColumn3.d.ts +1 -1
  837. package/dist/icons/components/UiColumn4.d.ts +1 -1
  838. package/dist/icons/components/UiColumn5.d.ts +1 -1
  839. package/dist/icons/components/UiColumns.d.ts +1 -1
  840. package/dist/icons/components/UiCommand.d.ts +1 -1
  841. package/dist/icons/components/UiComment.d.ts +1 -1
  842. package/dist/icons/components/UiCompass.d.ts +1 -1
  843. package/dist/icons/components/UiConfig.d.ts +1 -1
  844. package/dist/icons/components/UiConfigMap.d.ts +1 -1
  845. package/dist/icons/components/UiConnector.d.ts +1 -1
  846. package/dist/icons/components/UiConstant.d.ts +1 -1
  847. package/dist/icons/components/UiConstant1.d.ts +1 -1
  848. package/dist/icons/components/UiConstructor.d.ts +1 -1
  849. package/dist/icons/components/UiConverter.d.ts +1 -1
  850. package/dist/icons/components/UiConverter1.d.ts +1 -1
  851. package/dist/icons/components/UiCopy.d.ts +1 -1
  852. package/dist/icons/components/UiCreateConstraint.d.ts +1 -1
  853. package/dist/icons/components/UiCurrencyDollar.d.ts +1 -1
  854. package/dist/icons/components/UiCursorClick.d.ts +1 -1
  855. package/dist/icons/components/UiCursorText.d.ts +1 -1
  856. package/dist/icons/components/UiCustomResource.d.ts +1 -1
  857. package/dist/icons/components/UiDataSchema.d.ts +1 -1
  858. package/dist/icons/components/UiDataShare.d.ts +1 -1
  859. package/dist/icons/components/UiDatabase.d.ts +1 -1
  860. package/dist/icons/components/UiDatabaseEventStream.d.ts +1 -1
  861. package/dist/icons/components/UiDatabaseLink.d.ts +1 -1
  862. package/dist/icons/components/UiDatabaseZap.d.ts +1 -1
  863. package/dist/icons/components/UiDebug.d.ts +1 -1
  864. package/dist/icons/components/UiDebugContinue.d.ts +1 -1
  865. package/dist/icons/components/UiDebugDisabled.d.ts +1 -1
  866. package/dist/icons/components/UiDebugSelection.d.ts +1 -1
  867. package/dist/icons/components/UiDebugSmall.d.ts +1 -1
  868. package/dist/icons/components/UiDebugStepInto.d.ts +1 -1
  869. package/dist/icons/components/UiDebugStepOut.d.ts +1 -1
  870. package/dist/icons/components/UiDebugStepOver.d.ts +1 -1
  871. package/dist/icons/components/UiDebugStop.d.ts +1 -1
  872. package/dist/icons/components/UiDecorator.d.ts +1 -1
  873. package/dist/icons/components/UiDeploy.d.ts +1 -1
  874. package/dist/icons/components/UiDesktop.d.ts +1 -1
  875. package/dist/icons/components/UiDetach.d.ts +1 -1
  876. package/dist/icons/components/UiDiagramDiff.d.ts +1 -1
  877. package/dist/icons/components/UiDiff.d.ts +1 -1
  878. package/dist/icons/components/UiDotsVertical.d.ts +1 -1
  879. package/dist/icons/components/UiDownload.d.ts +1 -1
  880. package/dist/icons/components/UiDumpThreads.d.ts +1 -1
  881. package/dist/icons/components/UiEdit.d.ts +1 -1
  882. package/dist/icons/components/UiEditMode.d.ts +1 -1
  883. package/dist/icons/components/UiEllipsis.d.ts +1 -1
  884. package/dist/icons/components/UiEllipsisBold.d.ts +1 -1
  885. package/dist/icons/components/UiEndpoint.d.ts +1 -1
  886. package/dist/icons/components/UiEnum.d.ts +1 -1
  887. package/dist/icons/components/UiEnumMember.d.ts +1 -1
  888. package/dist/icons/components/UiEnvelope.d.ts +1 -1
  889. package/dist/icons/components/UiError.d.ts +1 -1
  890. package/dist/icons/components/UiEvaluateExpression.d.ts +1 -1
  891. package/dist/icons/components/UiEvent.d.ts +1 -1
  892. package/dist/icons/components/UiException.d.ts +1 -1
  893. package/dist/icons/components/UiExceptionAnalyzerImportant.d.ts +1 -1
  894. package/dist/icons/components/UiExcludedGenerated.d.ts +1 -1
  895. package/dist/icons/components/UiExpandAll.d.ts +1 -1
  896. package/dist/icons/components/UiExport.d.ts +1 -1
  897. package/dist/icons/components/UiExtension.d.ts +1 -1
  898. package/dist/icons/components/UiExternalLink.d.ts +1 -1
  899. package/dist/icons/components/UiEye.d.ts +1 -1
  900. package/dist/icons/components/UiEyeClosed.d.ts +1 -1
  901. package/dist/icons/components/UiFactory.d.ts +1 -1
  902. package/dist/icons/components/UiFailedInProgress.d.ts +1 -1
  903. package/dist/icons/components/UiFastForwardCircle.d.ts +1 -1
  904. package/dist/icons/components/UiField.d.ts +1 -1
  905. package/dist/icons/components/UiField1.d.ts +1 -1
  906. package/dist/icons/components/UiField2.d.ts +1 -1
  907. package/dist/icons/components/UiField3.d.ts +1 -1
  908. package/dist/icons/components/UiField4.d.ts +1 -1
  909. package/dist/icons/components/UiField5.d.ts +1 -1
  910. package/dist/icons/components/UiField6.d.ts +1 -1
  911. package/dist/icons/components/UiFieldProtected.d.ts +1 -1
  912. package/dist/icons/components/UiFieldReadAccess.d.ts +1 -1
  913. package/dist/icons/components/UiFieldType.d.ts +1 -1
  914. package/dist/icons/components/UiFieldWriteAccess.d.ts +1 -1
  915. package/dist/icons/components/UiFile.d.ts +1 -1
  916. package/dist/icons/components/UiFileCode.d.ts +1 -1
  917. package/dist/icons/components/UiFileCog.d.ts +1 -1
  918. package/dist/icons/components/UiFileFormat.d.ts +1 -1
  919. package/dist/icons/components/UiFileJson.d.ts +1 -1
  920. package/dist/icons/components/UiFilePlus.d.ts +1 -1
  921. package/dist/icons/components/UiFileSearch.d.ts +1 -1
  922. package/dist/icons/components/UiFileSpreadsheet.d.ts +1 -1
  923. package/dist/icons/components/UiFileText.d.ts +1 -1
  924. package/dist/icons/components/UiFileType.d.ts +1 -1
  925. package/dist/icons/components/UiFilter.d.ts +1 -1
  926. package/dist/icons/components/UiFingerprint.d.ts +1 -1
  927. package/dist/icons/components/UiFolder.d.ts +1 -1
  928. package/dist/icons/components/UiFolderGit.d.ts +1 -1
  929. package/dist/icons/components/UiFolderGit2.d.ts +1 -1
  930. package/dist/icons/components/UiForeignServer.d.ts +1 -1
  931. package/dist/icons/components/UiForm.d.ts +1 -1
  932. package/dist/icons/components/UiFreemarker.d.ts +1 -1
  933. package/dist/icons/components/UiFullscreen.d.ts +1 -1
  934. package/dist/icons/components/UiFunction.d.ts +1 -1
  935. package/dist/icons/components/UiFunction1.d.ts +1 -1
  936. package/dist/icons/components/UiFunction2.d.ts +1 -1
  937. package/dist/icons/components/UiFunction3.d.ts +1 -1
  938. package/dist/icons/components/UiFunction4.d.ts +1 -1
  939. package/dist/icons/components/UiFunctionSquare.d.ts +1 -1
  940. package/dist/icons/components/UiFunnelData.d.ts +1 -1
  941. package/dist/icons/components/UiGavel.d.ts +1 -1
  942. package/dist/icons/components/UiGearSix.d.ts +1 -1
  943. package/dist/icons/components/UiGitBranch.d.ts +1 -1
  944. package/dist/icons/components/UiGitCommit.d.ts +1 -1
  945. package/dist/icons/components/UiGitGraph.d.ts +1 -1
  946. package/dist/icons/components/UiGitMerge.d.ts +1 -1
  947. package/dist/icons/components/UiGitPr.d.ts +1 -1
  948. package/dist/icons/components/UiGlobe.d.ts +1 -1
  949. package/dist/icons/components/UiGraph.d.ts +1 -1
  950. package/dist/icons/components/UiGreyKey.d.ts +1 -1
  951. package/dist/icons/components/UiGrid.d.ts +1 -1
  952. package/dist/icons/components/UiGroupByModuleGroup.d.ts +1 -1
  953. package/dist/icons/components/UiGroupByPackage.d.ts +1 -1
  954. package/dist/icons/components/UiGroupByTestProduction.d.ts +1 -1
  955. package/dist/icons/components/UiHandCoins.d.ts +1 -1
  956. package/dist/icons/components/UiHandPalm.d.ts +1 -1
  957. package/dist/icons/components/UiHardDrive.d.ts +1 -1
  958. package/dist/icons/components/UiHibernate.d.ts +1 -1
  959. package/dist/icons/components/UiHibernateEvent.d.ts +1 -1
  960. package/dist/icons/components/UiHistory.d.ts +1 -1
  961. package/dist/icons/components/UiHome.d.ts +1 -1
  962. package/dist/icons/components/UiHourglass.d.ts +1 -1
  963. package/dist/icons/components/UiHubot.d.ts +1 -1
  964. package/dist/icons/components/UiId.d.ts +1 -1
  965. package/dist/icons/components/UiIdentificationCard.d.ts +1 -1
  966. package/dist/icons/components/UiImage.d.ts +1 -1
  967. package/dist/icons/components/UiImport.d.ts +1 -1
  968. package/dist/icons/components/UiInbox.d.ts +1 -1
  969. package/dist/icons/components/UiIndex.d.ts +1 -1
  970. package/dist/icons/components/UiIndex1.d.ts +1 -1
  971. package/dist/icons/components/UiIndex2.d.ts +1 -1
  972. package/dist/icons/components/UiIndex3.d.ts +1 -1
  973. package/dist/icons/components/UiIndex4.d.ts +1 -1
  974. package/dist/icons/components/UiIndex5.d.ts +1 -1
  975. package/dist/icons/components/UiIndex6.d.ts +1 -1
  976. package/dist/icons/components/UiInfo.d.ts +1 -1
  977. package/dist/icons/components/UiInsightAvailability.d.ts +1 -1
  978. package/dist/icons/components/UiInsightCompliance.d.ts +1 -1
  979. package/dist/icons/components/UiInsightCost.d.ts +1 -1
  980. package/dist/icons/components/UiInsightIntegration.d.ts +1 -1
  981. package/dist/icons/components/UiInsightPerformance.d.ts +1 -1
  982. package/dist/icons/components/UiInsightRecommendation.d.ts +1 -1
  983. package/dist/icons/components/UiInsightReliability.d.ts +1 -1
  984. package/dist/icons/components/UiInsightSecurity.d.ts +1 -1
  985. package/dist/icons/components/UiInsightTechnicalDebt.d.ts +1 -1
  986. package/dist/icons/components/UiInspectionsGrammar.d.ts +1 -1
  987. package/dist/icons/components/UiInterface.d.ts +1 -1
  988. package/dist/icons/components/UiInvoice.d.ts +1 -1
  989. package/dist/icons/components/UiJpaAttribute.d.ts +1 -1
  990. package/dist/icons/components/UiJpaId.d.ts +1 -1
  991. package/dist/icons/components/UiJpaRelationship.d.ts +1 -1
  992. package/dist/icons/components/UiJson.d.ts +1 -1
  993. package/dist/icons/components/UiKanban.d.ts +1 -1
  994. package/dist/icons/components/UiKey.d.ts +1 -1
  995. package/dist/icons/components/UiKeyboard.d.ts +1 -1
  996. package/dist/icons/components/UiKeyword.d.ts +1 -1
  997. package/dist/icons/components/UiKillDataSourceProcess.d.ts +1 -1
  998. package/dist/icons/components/UiKubeConfigMap.d.ts +1 -1
  999. package/dist/icons/components/UiKubeDeployment.d.ts +1 -1
  1000. package/dist/icons/components/UiKubeJob.d.ts +1 -1
  1001. package/dist/icons/components/UiKubeNamespace.d.ts +1 -1
  1002. package/dist/icons/components/UiKubePod.d.ts +1 -1
  1003. package/dist/icons/components/UiLambda.d.ts +1 -1
  1004. package/dist/icons/components/UiLangJava.d.ts +1 -1
  1005. package/dist/icons/components/UiLangJavascript.d.ts +1 -1
  1006. package/dist/icons/components/UiLangPython.d.ts +1 -1
  1007. package/dist/icons/components/UiLayers.d.ts +1 -1
  1008. package/dist/icons/components/UiLayoutDashboard.d.ts +1 -1
  1009. package/dist/icons/components/UiLedger.d.ts +1 -1
  1010. package/dist/icons/components/UiLightbulb.d.ts +1 -1
  1011. package/dist/icons/components/UiLink.d.ts +1 -1
  1012. package/dist/icons/components/UiLinkExternal.d.ts +1 -1
  1013. package/dist/icons/components/UiListChecks.d.ts +1 -1
  1014. package/dist/icons/components/UiListDashes.d.ts +1 -1
  1015. package/dist/icons/components/UiListFlat.d.ts +1 -1
  1016. package/dist/icons/components/UiListOrdered.d.ts +1 -1
  1017. package/dist/icons/components/UiListTree.d.ts +1 -1
  1018. package/dist/icons/components/UiLoader.d.ts +1 -1
  1019. package/dist/icons/components/UiLocation.d.ts +1 -1
  1020. package/dist/icons/components/UiLock.d.ts +1 -1
  1021. package/dist/icons/components/UiLockKey.d.ts +1 -1
  1022. package/dist/icons/components/UiLockOpen.d.ts +1 -1
  1023. package/dist/icons/components/UiLogoAnthropic.d.ts +1 -1
  1024. package/dist/icons/components/UiLogoClaude.d.ts +1 -1
  1025. package/dist/icons/components/UiLogoDeepseek.d.ts +1 -1
  1026. package/dist/icons/components/UiLogoGemini.d.ts +1 -1
  1027. package/dist/icons/components/UiLogoGoogle.d.ts +1 -1
  1028. package/dist/icons/components/UiLogoHuggingface.d.ts +1 -1
  1029. package/dist/icons/components/UiLogoMeta.d.ts +1 -1
  1030. package/dist/icons/components/UiLogoMistral.d.ts +1 -1
  1031. package/dist/icons/components/UiLogoOllama.d.ts +1 -1
  1032. package/dist/icons/components/UiLogoOpenai.d.ts +1 -1
  1033. package/dist/icons/components/UiLogoPerplexity.d.ts +1 -1
  1034. package/dist/icons/components/UiMagicWand.d.ts +1 -1
  1035. package/dist/icons/components/UiMarkdown.d.ts +1 -1
  1036. package/dist/icons/components/UiMaterializedLog.d.ts +1 -1
  1037. package/dist/icons/components/UiMemoryProfile.d.ts +1 -1
  1038. package/dist/icons/components/UiMemoryStick.d.ts +1 -1
  1039. package/dist/icons/components/UiMenu.d.ts +1 -1
  1040. package/dist/icons/components/UiMessageQueue.d.ts +1 -1
  1041. package/dist/icons/components/UiMessageQueue1.d.ts +1 -1
  1042. package/dist/icons/components/UiMethod.d.ts +1 -1
  1043. package/dist/icons/components/UiMethod1.d.ts +1 -1
  1044. package/dist/icons/components/UiMethod10.d.ts +1 -1
  1045. package/dist/icons/components/UiMethod11.d.ts +1 -1
  1046. package/dist/icons/components/UiMethod2.d.ts +1 -1
  1047. package/dist/icons/components/UiMethod3.d.ts +1 -1
  1048. package/dist/icons/components/UiMethod4.d.ts +1 -1
  1049. package/dist/icons/components/UiMethod5.d.ts +1 -1
  1050. package/dist/icons/components/UiMethod6.d.ts +1 -1
  1051. package/dist/icons/components/UiMethod7.d.ts +1 -1
  1052. package/dist/icons/components/UiMethod8.d.ts +1 -1
  1053. package/dist/icons/components/UiMethod9.d.ts +1 -1
  1054. package/dist/icons/components/UiModels.d.ts +1 -1
  1055. package/dist/icons/components/UiModule.d.ts +1 -1
  1056. package/dist/icons/components/UiModule1.d.ts +1 -1
  1057. package/dist/icons/components/UiMoon.d.ts +1 -1
  1058. package/dist/icons/components/UiName.d.ts +1 -1
  1059. package/dist/icons/components/UiNamespace.d.ts +1 -1
  1060. package/dist/icons/components/UiNetwork.d.ts +1 -1
  1061. package/dist/icons/components/UiNull.d.ts +1 -1
  1062. package/dist/icons/components/UiNumeric.d.ts +1 -1
  1063. package/dist/icons/components/UiObject.d.ts +1 -1
  1064. package/dist/icons/components/UiOpenBlock.d.ts +1 -1
  1065. package/dist/icons/components/UiOpenScad.d.ts +1 -1
  1066. package/dist/icons/components/UiOperator.d.ts +1 -1
  1067. package/dist/icons/components/UiOperator1.d.ts +1 -1
  1068. package/dist/icons/components/UiOrganization.d.ts +1 -1
  1069. package/dist/icons/components/UiPackage.d.ts +1 -1
  1070. package/dist/icons/components/UiPalette.d.ts +1 -1
  1071. package/dist/icons/components/UiParameter.d.ts +1 -1
  1072. package/dist/icons/components/UiPartition.d.ts +1 -1
  1073. package/dist/icons/components/UiPass.d.ts +1 -1
  1074. package/dist/icons/components/UiPause.d.ts +1 -1
  1075. package/dist/icons/components/UiPauseCircle.d.ts +1 -1
  1076. package/dist/icons/components/UiPencilSimpleLine.d.ts +1 -1
  1077. package/dist/icons/components/UiPending.d.ts +1 -1
  1078. package/dist/icons/components/UiPercent.d.ts +1 -1
  1079. package/dist/icons/components/UiPhone.d.ts +1 -1
  1080. package/dist/icons/components/UiPlay.d.ts +1 -1
  1081. package/dist/icons/components/UiPlayCircle.d.ts +1 -1
  1082. package/dist/icons/components/UiPlaybook.d.ts +1 -1
  1083. package/dist/icons/components/UiPlug.d.ts +1 -1
  1084. package/dist/icons/components/UiPluginModule.d.ts +1 -1
  1085. package/dist/icons/components/UiPluginV2.d.ts +1 -1
  1086. package/dist/icons/components/UiPlugsConnected.d.ts +1 -1
  1087. package/dist/icons/components/UiPointcut.d.ts +1 -1
  1088. package/dist/icons/components/UiProcedure.d.ts +1 -1
  1089. package/dist/icons/components/UiProfile.d.ts +1 -1
  1090. package/dist/icons/components/UiProfile1.d.ts +1 -1
  1091. package/dist/icons/components/UiProfile2.d.ts +1 -1
  1092. package/dist/icons/components/UiProfile3.d.ts +1 -1
  1093. package/dist/icons/components/UiProfile4.d.ts +1 -1
  1094. package/dist/icons/components/UiProfiler.d.ts +1 -1
  1095. package/dist/icons/components/UiProfilerBackTrace.d.ts +1 -1
  1096. package/dist/icons/components/UiProfilerMergeCallees.d.ts +1 -1
  1097. package/dist/icons/components/UiProhibit.d.ts +1 -1
  1098. package/dist/icons/components/UiProjectStructure.d.ts +1 -1
  1099. package/dist/icons/components/UiProjection.d.ts +1 -1
  1100. package/dist/icons/components/UiProperty.d.ts +1 -1
  1101. package/dist/icons/components/UiPulse.d.ts +1 -1
  1102. package/dist/icons/components/UiPuzzle.d.ts +1 -1
  1103. package/dist/icons/components/UiQuestion.d.ts +1 -1
  1104. package/dist/icons/components/UiQueue.d.ts +1 -1
  1105. package/dist/icons/components/UiReadAccess.d.ts +1 -1
  1106. package/dist/icons/components/UiReceipt.d.ts +1 -1
  1107. package/dist/icons/components/UiRecord.d.ts +1 -1
  1108. package/dist/icons/components/UiRecord1.d.ts +1 -1
  1109. package/dist/icons/components/UiRefresh.d.ts +1 -1
  1110. package/dist/icons/components/UiRegex.d.ts +1 -1
  1111. package/dist/icons/components/UiRelationship.d.ts +1 -1
  1112. package/dist/icons/components/UiRelay.d.ts +1 -1
  1113. package/dist/icons/components/UiRemove.d.ts +1 -1
  1114. package/dist/icons/components/UiRepeat.d.ts +1 -1
  1115. package/dist/icons/components/UiResizeVertical.d.ts +1 -1
  1116. package/dist/icons/components/UiRestart.d.ts +1 -1
  1117. package/dist/icons/components/UiRobotAi.d.ts +1 -1
  1118. package/dist/icons/components/UiRocket.d.ts +1 -1
  1119. package/dist/icons/components/UiRole.d.ts +1 -1
  1120. package/dist/icons/components/UiRollback.d.ts +1 -1
  1121. package/dist/icons/components/UiRoute.d.ts +1 -1
  1122. package/dist/icons/components/UiRoutine.d.ts +1 -1
  1123. package/dist/icons/components/UiRows.d.ts +1 -1
  1124. package/dist/icons/components/UiRun.d.ts +1 -1
  1125. package/dist/icons/components/UiRun1.d.ts +1 -1
  1126. package/dist/icons/components/UiRun10.d.ts +1 -1
  1127. package/dist/icons/components/UiRun11.d.ts +1 -1
  1128. package/dist/icons/components/UiRun12.d.ts +1 -1
  1129. package/dist/icons/components/UiRun13.d.ts +1 -1
  1130. package/dist/icons/components/UiRun14.d.ts +1 -1
  1131. package/dist/icons/components/UiRun2.d.ts +1 -1
  1132. package/dist/icons/components/UiRun3.d.ts +1 -1
  1133. package/dist/icons/components/UiRun4.d.ts +1 -1
  1134. package/dist/icons/components/UiRun5.d.ts +1 -1
  1135. package/dist/icons/components/UiRun6.d.ts +1 -1
  1136. package/dist/icons/components/UiRun7.d.ts +1 -1
  1137. package/dist/icons/components/UiRun8.d.ts +1 -1
  1138. package/dist/icons/components/UiRun9.d.ts +1 -1
  1139. package/dist/icons/components/UiSave.d.ts +1 -1
  1140. package/dist/icons/components/UiScale.d.ts +1 -1
  1141. package/dist/icons/components/UiScan.d.ts +1 -1
  1142. package/dist/icons/components/UiScroll.d.ts +1 -1
  1143. package/dist/icons/components/UiSealCheck.d.ts +1 -1
  1144. package/dist/icons/components/UiSearch.d.ts +1 -1
  1145. package/dist/icons/components/UiSecurityRole.d.ts +1 -1
  1146. package/dist/icons/components/UiSelect.d.ts +1 -1
  1147. package/dist/icons/components/UiSequence.d.ts +1 -1
  1148. package/dist/icons/components/UiSequence1.d.ts +1 -1
  1149. package/dist/icons/components/UiSequence2.d.ts +1 -1
  1150. package/dist/icons/components/UiSequence3.d.ts +1 -1
  1151. package/dist/icons/components/UiSequence4.d.ts +1 -1
  1152. package/dist/icons/components/UiServer.d.ts +1 -1
  1153. package/dist/icons/components/UiServerProcess.d.ts +1 -1
  1154. package/dist/icons/components/UiSetKey.d.ts +1 -1
  1155. package/dist/icons/components/UiSeverityBlocker.d.ts +1 -1
  1156. package/dist/icons/components/UiSeverityCritical.d.ts +1 -1
  1157. package/dist/icons/components/UiSeverityHigh.d.ts +1 -1
  1158. package/dist/icons/components/UiSeverityInfo.d.ts +1 -1
  1159. package/dist/icons/components/UiSeverityLow.d.ts +1 -1
  1160. package/dist/icons/components/UiSeverityMedium.d.ts +1 -1
  1161. package/dist/icons/components/UiSeverityWarning.d.ts +1 -1
  1162. package/dist/icons/components/UiShare.d.ts +1 -1
  1163. package/dist/icons/components/UiShield.d.ts +1 -1
  1164. package/dist/icons/components/UiShieldSlash.d.ts +1 -1
  1165. package/dist/icons/components/UiShipWheel.d.ts +1 -1
  1166. package/dist/icons/components/UiShortcutFilter.d.ts +1 -1
  1167. package/dist/icons/components/UiShowCurrentFrame.d.ts +1 -1
  1168. package/dist/icons/components/UiShowMembers.d.ts +1 -1
  1169. package/dist/icons/components/UiShowToImplement.d.ts +1 -1
  1170. package/dist/icons/components/UiSidebar.d.ts +1 -1
  1171. package/dist/icons/components/UiSigma.d.ts +1 -1
  1172. package/dist/icons/components/UiSignIn.d.ts +1 -1
  1173. package/dist/icons/components/UiSignOut.d.ts +1 -1
  1174. package/dist/icons/components/UiSiren.d.ts +1 -1
  1175. package/dist/icons/components/UiSkipForward.d.ts +1 -1
  1176. package/dist/icons/components/UiSkull.d.ts +1 -1
  1177. package/dist/icons/components/UiSliders.d.ts +1 -1
  1178. package/dist/icons/components/UiSortAlphabetically.d.ts +1 -1
  1179. package/dist/icons/components/UiSortByType.d.ts +1 -1
  1180. package/dist/icons/components/UiSortByUsage.d.ts +1 -1
  1181. package/dist/icons/components/UiSortByVisibility.d.ts +1 -1
  1182. package/dist/icons/components/UiSparkles.d.ts +1 -1
  1183. package/dist/icons/components/UiSpeaker.d.ts +1 -1
  1184. package/dist/icons/components/UiSpringBoot.d.ts +1 -1
  1185. package/dist/icons/components/UiSqlArray.d.ts +1 -1
  1186. package/dist/icons/components/UiSqlColumn.d.ts +1 -1
  1187. package/dist/icons/components/UiSqlConstraint.d.ts +1 -1
  1188. package/dist/icons/components/UiSqlDatabase.d.ts +1 -1
  1189. package/dist/icons/components/UiSqlForeignKey.d.ts +1 -1
  1190. package/dist/icons/components/UiSqlFunction.d.ts +1 -1
  1191. package/dist/icons/components/UiSqlIndex.d.ts +1 -1
  1192. package/dist/icons/components/UiSqlPrimaryKey.d.ts +1 -1
  1193. package/dist/icons/components/UiSqlQuery.d.ts +1 -1
  1194. package/dist/icons/components/UiSqlSchema.d.ts +1 -1
  1195. package/dist/icons/components/UiSqlSequence.d.ts +1 -1
  1196. package/dist/icons/components/UiSqlStoredProc.d.ts +1 -1
  1197. package/dist/icons/components/UiSqlTable.d.ts +1 -1
  1198. package/dist/icons/components/UiSqlTrigger.d.ts +1 -1
  1199. package/dist/icons/components/UiSqlView.d.ts +1 -1
  1200. package/dist/icons/components/UiSquare.d.ts +1 -1
  1201. package/dist/icons/components/UiStack.d.ts +1 -1
  1202. package/dist/icons/components/UiStackFrameDot.d.ts +1 -1
  1203. package/dist/icons/components/UiStackTrace.d.ts +1 -1
  1204. package/dist/icons/components/UiStar.d.ts +1 -1
  1205. package/dist/icons/components/UiStartTimer.d.ts +1 -1
  1206. package/dist/icons/components/UiStatic.d.ts +1 -1
  1207. package/dist/icons/components/UiStep.d.ts +1 -1
  1208. package/dist/icons/components/UiStep1.d.ts +1 -1
  1209. package/dist/icons/components/UiStep2.d.ts +1 -1
  1210. package/dist/icons/components/UiStep3.d.ts +1 -1
  1211. package/dist/icons/components/UiStep4.d.ts +1 -1
  1212. package/dist/icons/components/UiStep5.d.ts +1 -1
  1213. package/dist/icons/components/UiStep6.d.ts +1 -1
  1214. package/dist/icons/components/UiStep7.d.ts +1 -1
  1215. package/dist/icons/components/UiStep8.d.ts +1 -1
  1216. package/dist/icons/components/UiStep9.d.ts +1 -1
  1217. package/dist/icons/components/UiSteps.d.ts +1 -1
  1218. package/dist/icons/components/UiStop.d.ts +1 -1
  1219. package/dist/icons/components/UiStrategy.d.ts +1 -1
  1220. package/dist/icons/components/UiStream.d.ts +1 -1
  1221. package/dist/icons/components/UiStreamKey.d.ts +1 -1
  1222. package/dist/icons/components/UiString.d.ts +1 -1
  1223. package/dist/icons/components/UiStruct.d.ts +1 -1
  1224. package/dist/icons/components/UiSubmitDB.d.ts +1 -1
  1225. package/dist/icons/components/UiSubscription.d.ts +1 -1
  1226. package/dist/icons/components/UiSun.d.ts +1 -1
  1227. package/dist/icons/components/UiSwap.d.ts +1 -1
  1228. package/dist/icons/components/UiSymbol.d.ts +1 -1
  1229. package/dist/icons/components/UiSync.d.ts +1 -1
  1230. package/dist/icons/components/UiTable.d.ts +1 -1
  1231. package/dist/icons/components/UiTable1.d.ts +1 -1
  1232. package/dist/icons/components/UiTable10.d.ts +1 -1
  1233. package/dist/icons/components/UiTable11.d.ts +1 -1
  1234. package/dist/icons/components/UiTable12.d.ts +1 -1
  1235. package/dist/icons/components/UiTable2.d.ts +1 -1
  1236. package/dist/icons/components/UiTable3.d.ts +1 -1
  1237. package/dist/icons/components/UiTable4.d.ts +1 -1
  1238. package/dist/icons/components/UiTable5.d.ts +1 -1
  1239. package/dist/icons/components/UiTable6.d.ts +1 -1
  1240. package/dist/icons/components/UiTable7.d.ts +1 -1
  1241. package/dist/icons/components/UiTable8.d.ts +1 -1
  1242. package/dist/icons/components/UiTable9.d.ts +1 -1
  1243. package/dist/icons/components/UiTableProperties.d.ts +1 -1
  1244. package/dist/icons/components/UiTag.d.ts +1 -1
  1245. package/dist/icons/components/UiTax.d.ts +1 -1
  1246. package/dist/icons/components/UiTemplate.d.ts +1 -1
  1247. package/dist/icons/components/UiTerminal.d.ts +1 -1
  1248. package/dist/icons/components/UiTest.d.ts +1 -1
  1249. package/dist/icons/components/UiTest1.d.ts +1 -1
  1250. package/dist/icons/components/UiTest2.d.ts +1 -1
  1251. package/dist/icons/components/UiTest3.d.ts +1 -1
  1252. package/dist/icons/components/UiTest4.d.ts +1 -1
  1253. package/dist/icons/components/UiTest5.d.ts +1 -1
  1254. package/dist/icons/components/UiTest6.d.ts +1 -1
  1255. package/dist/icons/components/UiTest7.d.ts +1 -1
  1256. package/dist/icons/components/UiText.d.ts +1 -1
  1257. package/dist/icons/components/UiThermometer.d.ts +1 -1
  1258. package/dist/icons/components/UiThumbsDown.d.ts +1 -1
  1259. package/dist/icons/components/UiThumbsUp.d.ts +1 -1
  1260. package/dist/icons/components/UiTimer.d.ts +1 -1
  1261. package/dist/icons/components/UiToggleOff.d.ts +1 -1
  1262. package/dist/icons/components/UiToggleOn.d.ts +1 -1
  1263. package/dist/icons/components/UiTrait.d.ts +1 -1
  1264. package/dist/icons/components/UiTransactionStart.d.ts +1 -1
  1265. package/dist/icons/components/UiTrash.d.ts +1 -1
  1266. package/dist/icons/components/UiTrendDown.d.ts +1 -1
  1267. package/dist/icons/components/UiTrendUp.d.ts +1 -1
  1268. package/dist/icons/components/UiTypeAlias.d.ts +1 -1
  1269. package/dist/icons/components/UiTypeParameter.d.ts +1 -1
  1270. package/dist/icons/components/UiTypeScriptIndexSignature.d.ts +1 -1
  1271. package/dist/icons/components/UiUndeploy.d.ts +1 -1
  1272. package/dist/icons/components/UiUnknown.d.ts +1 -1
  1273. package/dist/icons/components/UiUpload.d.ts +1 -1
  1274. package/dist/icons/components/UiUser.d.ts +1 -1
  1275. package/dist/icons/components/UiUserCircle.d.ts +1 -1
  1276. package/dist/icons/components/UiUserCog.d.ts +1 -1
  1277. package/dist/icons/components/UiUserGear.d.ts +1 -1
  1278. package/dist/icons/components/UiUsersFour.d.ts +1 -1
  1279. package/dist/icons/components/UiUsersThree.d.ts +1 -1
  1280. package/dist/icons/components/UiVariable.d.ts +1 -1
  1281. package/dist/icons/components/UiVariable1.d.ts +1 -1
  1282. package/dist/icons/components/UiVariable2.d.ts +1 -1
  1283. package/dist/icons/components/UiVariable3.d.ts +1 -1
  1284. package/dist/icons/components/UiVariable4.d.ts +1 -1
  1285. package/dist/icons/components/UiVariable5.d.ts +1 -1
  1286. package/dist/icons/components/UiVariable6.d.ts +1 -1
  1287. package/dist/icons/components/UiVideo.d.ts +1 -1
  1288. package/dist/icons/components/UiVirtualForeignKey.d.ts +1 -1
  1289. package/dist/icons/components/UiWarningCircle.d.ts +1 -1
  1290. package/dist/icons/components/UiWarningTriangle.d.ts +1 -1
  1291. package/dist/icons/components/UiWatch.d.ts +1 -1
  1292. package/dist/icons/components/UiWebArtifact.d.ts +1 -1
  1293. package/dist/icons/components/UiWebServiceClient.d.ts +1 -1
  1294. package/dist/icons/components/UiWorkflow.d.ts +1 -1
  1295. package/dist/icons/components/UiWrench.d.ts +1 -1
  1296. package/dist/icons/components/UiWriteAccess.d.ts +1 -1
  1297. package/dist/icons/components/UiXpath.d.ts +1 -1
  1298. package/dist/icons/components/UiXpath1.d.ts +1 -1
  1299. package/dist/icons/components/UiZap.d.ts +1 -1
  1300. package/dist/icons/components/UiZoomIn.d.ts +1 -1
  1301. package/dist/icons/components/UiZoomOut.d.ts +1 -1
  1302. package/dist/icons/index.d.ts +1067 -1067
  1303. package/dist/icons/programmingCatalog.cjs +34 -34
  1304. package/dist/icons/programmingCatalog.cjs.map +1 -1
  1305. package/dist/icons/programmingCatalog.d.ts +1 -1
  1306. package/dist/icons/programmingCatalog.js +34 -34
  1307. package/dist/icons/programmingCatalog.js.map +1 -1
  1308. package/dist/icons/registry.d.ts +1 -1
  1309. package/dist/icons.d.ts +1 -1
  1310. package/dist/index.cjs +9 -2
  1311. package/dist/index.cjs.map +1 -1
  1312. package/dist/index.d.ts +7 -7
  1313. package/dist/index.js +8 -1
  1314. package/dist/index.js.map +1 -1
  1315. package/dist/jotai.d.ts +3 -3
  1316. package/dist/layout/AppShell.d.ts +4 -4
  1317. package/dist/layout/AppShell.nav.d.ts +1 -1
  1318. package/dist/layout/AppSidebar.d.ts +2 -2
  1319. package/dist/layout/Panel.d.ts +3 -3
  1320. package/dist/layout/Section.d.ts +2 -2
  1321. package/dist/layout/Tabs.d.ts +2 -2
  1322. package/dist/layout/Workspace.d.ts +2 -2
  1323. package/dist/layout/Workspace.regions.d.ts +1 -1
  1324. package/dist/lib/combobox-values.d.ts +1 -1
  1325. package/dist/lib/comment-stage.d.ts +1 -1
  1326. package/dist/lib/permission-strategies.d.ts +2 -2
  1327. package/dist/lib/runtime-profile-model.d.ts +4 -4
  1328. package/dist/lib/size.d.ts +1 -1
  1329. package/dist/mdx-editor.d.ts +4 -4
  1330. package/dist/monaco/MonacoEditor.cjs +4 -1
  1331. package/dist/monaco/MonacoEditor.cjs.map +1 -1
  1332. package/dist/monaco/MonacoEditor.d.ts +2 -2
  1333. package/dist/monaco/MonacoEditor.d.ts.map +1 -1
  1334. package/dist/monaco/MonacoEditor.js +4 -1
  1335. package/dist/monaco/MonacoEditor.js.map +1 -1
  1336. package/dist/monaco/MonacoProvider.d.ts +1 -1
  1337. package/dist/monaco/MonacoSchemaEditor.d.ts +1 -1
  1338. package/dist/monaco/schema-normalizer.d.ts +1 -1
  1339. package/dist/monaco/types.d.ts +3 -2
  1340. package/dist/monaco/types.d.ts.map +1 -1
  1341. package/dist/monaco/use-monaco-worker.d.ts +1 -1
  1342. package/dist/monaco-schema.d.ts +2 -2
  1343. package/dist/monaco.d.ts +5 -5
  1344. package/dist/overlay/CellActions.d.ts +2 -2
  1345. package/dist/overlay/CommandPalette.cjs +14 -4
  1346. package/dist/overlay/CommandPalette.cjs.map +1 -1
  1347. package/dist/overlay/CommandPalette.d.ts +7 -3
  1348. package/dist/overlay/CommandPalette.d.ts.map +1 -1
  1349. package/dist/overlay/CommandPalette.js +14 -4
  1350. package/dist/overlay/CommandPalette.js.map +1 -1
  1351. package/dist/overlay/CommandPalette.model.d.ts +1 -1
  1352. package/dist/overlay/CommandPaletteList.cjs +5 -0
  1353. package/dist/overlay/CommandPaletteList.cjs.map +1 -1
  1354. package/dist/overlay/CommandPaletteList.d.ts +5 -3
  1355. package/dist/overlay/CommandPaletteList.d.ts.map +1 -1
  1356. package/dist/overlay/CommandPaletteList.js +5 -0
  1357. package/dist/overlay/CommandPaletteList.js.map +1 -1
  1358. package/dist/overlay/ContextMenu.d.ts +1 -1
  1359. package/dist/overlay/DropdownMenu.cjs +1 -0
  1360. package/dist/overlay/DropdownMenu.cjs.map +1 -1
  1361. package/dist/overlay/DropdownMenu.d.ts +2 -2
  1362. package/dist/overlay/DropdownMenu.js +1 -0
  1363. package/dist/overlay/DropdownMenu.js.map +1 -1
  1364. package/dist/overlay/DropdownMenuSubmenu.d.ts +1 -1
  1365. package/dist/overlay/Tour.d.ts +2 -2
  1366. package/dist/overlay/TourCard.d.ts +1 -1
  1367. package/dist/overlay/TourProvider.d.ts +3 -3
  1368. package/dist/overlay/TourSpotlight.d.ts +2 -2
  1369. package/dist/overlay/toast-context.d.ts +1 -1
  1370. package/dist/overlay/tour-anchor.d.ts +1 -1
  1371. package/dist/overlay/tour-context.d.ts +2 -2
  1372. package/dist/overlay/tour-model.d.ts +1 -1
  1373. package/dist/overlay/tour-progress.d.ts +1 -1
  1374. package/dist/overlay/use-tour-anchor.d.ts +1 -1
  1375. package/dist/overlay/use-tour-rect.d.ts +1 -1
  1376. package/dist/overlay/use-tour-step.d.ts +1 -1
  1377. package/dist/overlay/useConfirm.d.ts +1 -1
  1378. package/dist/profiles/cel/celEditor.d.ts +2 -2
  1379. package/dist/profiles/cel/celEditorExtension.d.ts +1 -1
  1380. package/dist/profiles/cel/celEditorResults.d.ts +1 -1
  1381. package/dist/profiles/cel/celPath.d.ts +1 -1
  1382. package/dist/profiles/cel/index.d.ts +5 -5
  1383. package/dist/profiles/connections/catalogTree.d.ts +1 -1
  1384. package/dist/profiles/connections/connectionBrowserModel.d.ts +4 -4
  1385. package/dist/profiles/connections/connectionQueryWorkspace.d.ts +7 -7
  1386. package/dist/profiles/connections/connectionQueryWorkspaceModel.d.ts +2 -2
  1387. package/dist/profiles/connections/index.d.ts +5 -5
  1388. package/dist/profiles/connections/inspectionStatus.d.ts +1 -1
  1389. package/dist/profiles/connections/useInspection.d.ts +2 -2
  1390. package/dist/profiles/editor/index.d.ts +11 -11
  1391. package/dist/profiles/editor/profileBuilder.d.ts +1 -1
  1392. package/dist/profiles/editor/profileBuilderExtension.d.ts +1 -1
  1393. package/dist/profiles/editor/profileBuilderModel.d.ts +2 -2
  1394. package/dist/profiles/editor/profileBuilderWorkspace.d.ts +3 -3
  1395. package/dist/profiles/editor/profileEditor.d.ts +2 -2
  1396. package/dist/profiles/editor/profileEditorModel.d.ts +2 -2
  1397. package/dist/profiles/editor/profileEditorPreview.d.ts +1 -1
  1398. package/dist/profiles/editor/profileEditorRail.d.ts +1 -1
  1399. package/dist/profiles/editor/profileEditorRaw.d.ts +1 -1
  1400. package/dist/profiles/editor/profileEditorSections.d.ts +3 -3
  1401. package/dist/profiles/editor/profileParameterEditor.d.ts +1 -1
  1402. package/dist/profiles/editor/profileYaml.d.ts +1 -1
  1403. package/dist/profiles/editor/testSchema.d.ts +1 -1
  1404. package/dist/profiles/elasticsearch/esFieldValues.d.ts +2 -2
  1405. package/dist/profiles/elasticsearch/esParamMappingModel.d.ts +2 -2
  1406. package/dist/profiles/elasticsearch/esParamOperandExtension.d.ts +2 -2
  1407. package/dist/profiles/elasticsearch/esQueryBuilder.d.ts +8 -8
  1408. package/dist/profiles/elasticsearch/esQueryBuilderExtension.d.ts +1 -1
  1409. package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts +3 -3
  1410. package/dist/profiles/elasticsearch/esQueryClauseGroup.d.ts +2 -2
  1411. package/dist/profiles/elasticsearch/esQueryCompile.d.ts +1 -1
  1412. package/dist/profiles/elasticsearch/esQueryConditionRow.d.ts +5 -5
  1413. package/dist/profiles/elasticsearch/esQueryGroupModel.d.ts +1 -1
  1414. package/dist/profiles/elasticsearch/esQueryOperandEditors.d.ts +5 -5
  1415. package/dist/profiles/elasticsearch/esQueryOperandModel.d.ts +2 -2
  1416. package/dist/profiles/elasticsearch/esQueryOperators.d.ts +1 -1
  1417. package/dist/profiles/elasticsearch/esQueryOutputEditor.d.ts +2 -2
  1418. package/dist/profiles/elasticsearch/esQueryPreview.d.ts +1 -1
  1419. package/dist/profiles/elasticsearch/esQuerySortEditor.d.ts +2 -2
  1420. package/dist/profiles/elasticsearch/esQuerySortModel.d.ts +1 -1
  1421. package/dist/profiles/elasticsearch/esValueCombobox.d.ts +1 -1
  1422. package/dist/profiles/elasticsearch/index.d.ts +22 -22
  1423. package/dist/profiles/fields/index.d.ts +8 -8
  1424. package/dist/profiles/fields/profileColumnModel.d.ts +1 -1
  1425. package/dist/profiles/fields/profileColumnPicker.d.ts +1 -1
  1426. package/dist/profiles/fields/profileFieldControls.d.ts +2 -2
  1427. package/dist/profiles/fields/profileFieldEditor.d.ts +1 -1
  1428. package/dist/profiles/fields/profileFieldFilterEditor.d.ts +1 -1
  1429. package/dist/profiles/fields/profileFieldIcons.d.ts +1 -1
  1430. package/dist/profiles/fields/profileFieldList.d.ts +1 -1
  1431. package/dist/profiles/fields/profileFieldManager.d.ts +1 -1
  1432. package/dist/profiles/fields/profileFieldState.d.ts +1 -1
  1433. package/dist/profiles/fields/profileParamModel.d.ts +1 -1
  1434. package/dist/profiles/processor/index.d.ts +5 -5
  1435. package/dist/profiles/processor/processorPipeline.d.ts +2 -2
  1436. package/dist/profiles/processor/processorPipelineEditor.d.ts +2 -2
  1437. package/dist/profiles/processor/processorPipelineExtension.d.ts +1 -1
  1438. package/dist/profiles/processor/processorPreviewTable.d.ts +1 -1
  1439. package/dist/profiles/processor/processorSampleParams.d.ts +1 -1
  1440. package/dist/profiles/profileApi.d.ts +2 -2
  1441. package/dist/profiles/query/index.d.ts +8 -8
  1442. package/dist/profiles/query/jsonPathSample.d.ts +1 -1
  1443. package/dist/profiles/query/kubernetesWorkloadTargetPicker.d.ts +1 -1
  1444. package/dist/profiles/query/profileSampleFilterLookup.d.ts +3 -3
  1445. package/dist/profiles/query/profileSamplePayload.d.ts +3 -3
  1446. package/dist/profiles/query/profileSampleResult.d.ts +3 -3
  1447. package/dist/profiles/query/prometheusResults.d.ts +1 -1
  1448. package/dist/profiles/query/queryRowLimits.d.ts +1 -1
  1449. package/dist/profiles/query/queryRowLimitsModel.d.ts +1 -1
  1450. package/dist/profiles/query/queryTargetPicker.d.ts +1 -1
  1451. package/dist/profiles/wizard/index.d.ts +5 -5
  1452. package/dist/profiles/wizard/profileWizard.d.ts +2 -2
  1453. package/dist/profiles/wizard/profileWizardModel.d.ts +1 -1
  1454. package/dist/profiles/wizard/profileWizardQueryStep.d.ts +1 -1
  1455. package/dist/profiles/wizard/profileWizardSteps.d.ts +1 -1
  1456. package/dist/profiles.d.ts +9 -9
  1457. package/dist/rpc/ChatLayer.d.ts +3 -3
  1458. package/dist/rpc/CommandForm.d.ts +2 -2
  1459. package/dist/rpc/CommandOutput.d.ts +7 -7
  1460. package/dist/rpc/EndpointList.d.ts +1 -1
  1461. package/dist/rpc/EntityExplorerApp.d.ts +5 -5
  1462. package/dist/rpc/ExecutionResult.d.ts +1 -1
  1463. package/dist/rpc/FilterForm.d.ts +3 -3
  1464. package/dist/rpc/FilterFormFields.d.ts +1 -1
  1465. package/dist/rpc/OperationActionBar.d.ts +6 -6
  1466. package/dist/rpc/OperationActionDialog.d.ts +2 -2
  1467. package/dist/rpc/OperationCatalog.cjs +29 -26
  1468. package/dist/rpc/OperationCatalog.cjs.map +1 -1
  1469. package/dist/rpc/OperationCatalog.d.ts +19 -11
  1470. package/dist/rpc/OperationCatalog.d.ts.map +1 -1
  1471. package/dist/rpc/OperationCatalog.js +29 -26
  1472. package/dist/rpc/OperationCatalog.js.map +1 -1
  1473. package/dist/rpc/OperationCatalogActions.d.ts +3 -3
  1474. package/dist/rpc/OperationCatalogFollowStatus.d.ts +1 -1
  1475. package/dist/rpc/OperationCommandPage.d.ts +5 -5
  1476. package/dist/rpc/OperationEntityContextPicker.cjs +62 -256
  1477. package/dist/rpc/OperationEntityContextPicker.cjs.map +1 -1
  1478. package/dist/rpc/OperationEntityContextPicker.d.ts +4 -4
  1479. package/dist/rpc/OperationEntityContextPicker.d.ts.map +1 -1
  1480. package/dist/rpc/OperationEntityContextPicker.js +64 -258
  1481. package/dist/rpc/OperationEntityContextPicker.js.map +1 -1
  1482. package/dist/rpc/OperationEntityContextPicker.model.d.ts +3 -3
  1483. package/dist/rpc/OperationEntityPage.d.ts +6 -6
  1484. package/dist/rpc/OperationEntityPicker.cjs +185 -0
  1485. package/dist/rpc/OperationEntityPicker.cjs.map +1 -0
  1486. package/dist/rpc/OperationEntityPicker.d.ts +51 -0
  1487. package/dist/rpc/OperationEntityPicker.d.ts.map +1 -0
  1488. package/dist/rpc/OperationEntityPicker.js +185 -0
  1489. package/dist/rpc/OperationEntityPicker.js.map +1 -0
  1490. package/dist/rpc/OperationEntityPicker.model.cjs +39 -0
  1491. package/dist/rpc/OperationEntityPicker.model.cjs.map +1 -0
  1492. package/dist/rpc/OperationEntityPicker.model.d.ts +27 -0
  1493. package/dist/rpc/OperationEntityPicker.model.d.ts.map +1 -0
  1494. package/dist/rpc/OperationEntityPicker.model.js +39 -0
  1495. package/dist/rpc/OperationEntityPicker.model.js.map +1 -0
  1496. package/dist/rpc/OperationPicker.d.ts +1 -1
  1497. package/dist/rpc/OperationResultView.d.ts +7 -7
  1498. package/dist/rpc/OperationScheduleDialog.d.ts +2 -2
  1499. package/dist/rpc/OperationSchedules.d.ts +1 -1
  1500. package/dist/rpc/RouterProvider.d.ts +1 -1
  1501. package/dist/rpc/SchemaActionForm.d.ts +3 -3
  1502. package/dist/rpc/SessionHeader.d.ts +5 -5
  1503. package/dist/rpc/SessionHeaderControls.d.ts +2 -2
  1504. package/dist/rpc/SessionsCatalog.d.ts +3 -3
  1505. package/dist/rpc/actionIconMap.d.ts +1 -1
  1506. package/dist/rpc/apiClient.d.ts +3 -3
  1507. package/dist/rpc/classify.d.ts +1 -1
  1508. package/dist/rpc/clickyMetadata.d.ts +1 -1
  1509. package/dist/rpc/command-form-utils.d.ts +1 -1
  1510. package/dist/rpc/commandHref.d.ts +1 -1
  1511. package/dist/rpc/cursorStale.d.ts +2 -2
  1512. package/dist/rpc/executionPages.d.ts +2 -2
  1513. package/dist/rpc/filterShapes.d.ts +1 -1
  1514. package/dist/rpc/formMetadata.d.ts +4 -4
  1515. package/dist/rpc/operation-cli-command.d.ts +2 -2
  1516. package/dist/rpc/operation-schedule-model.d.ts +3 -3
  1517. package/dist/rpc/operation-schedule-types.d.ts +1 -1
  1518. package/dist/rpc/operationCatalogFilterState.d.ts +2 -2
  1519. package/dist/rpc/operationCatalogFollow.d.ts +2 -2
  1520. package/dist/rpc/operationCatalogRowSelection.cjs +85 -0
  1521. package/dist/rpc/operationCatalogRowSelection.cjs.map +1 -0
  1522. package/dist/rpc/operationCatalogRowSelection.d.ts +57 -0
  1523. package/dist/rpc/operationCatalogRowSelection.d.ts.map +1 -0
  1524. package/dist/rpc/operationCatalogRowSelection.js +85 -0
  1525. package/dist/rpc/operationCatalogRowSelection.js.map +1 -0
  1526. package/dist/rpc/operationEntityPicker.fixtures.d.ts +13 -0
  1527. package/dist/rpc/operationEntityPicker.fixtures.d.ts.map +1 -0
  1528. package/dist/rpc/operationErrorDiagnostics.d.ts +1 -1
  1529. package/dist/rpc/operationFilterSearch.d.ts +3 -3
  1530. package/dist/rpc/operationLookupFetcher.d.ts +2 -2
  1531. package/dist/rpc/router.d.ts +1 -1
  1532. package/dist/rpc/rowNavigation.d.ts +2 -2
  1533. package/dist/rpc/rpc-story-fixtures/orders.fixture.d.ts +1 -1
  1534. package/dist/rpc/rpc-story-fixtures/services.fixture.d.ts +1 -1
  1535. package/dist/rpc/rpc-story-fixtures/surface-fixture.d.ts +2 -2
  1536. package/dist/rpc/rpc-story-fixtures/widgets.fixture.d.ts +1 -1
  1537. package/dist/rpc/rpc-story.fixtures.d.ts +3 -3
  1538. package/dist/rpc/session-story.fixtures.d.ts +1 -1
  1539. package/dist/rpc/sessionHeaderModel.d.ts +1 -1
  1540. package/dist/rpc/surfaceIconMap.d.ts +1 -1
  1541. package/dist/rpc/surfaceNav.d.ts +2 -2
  1542. package/dist/rpc/types.d.ts +3 -3
  1543. package/dist/rpc/useOperationCatalogFollow.d.ts +2 -2
  1544. package/dist/rpc/useOperationPages.d.ts +4 -4
  1545. package/dist/rpc/useOperations.d.ts +2 -2
  1546. package/dist/rpc/useSession.d.ts +2 -2
  1547. package/dist/rpc.cjs +2 -0
  1548. package/dist/rpc.cjs.map +1 -1
  1549. package/dist/rpc.d.ts +39 -37
  1550. package/dist/rpc.d.ts.map +1 -1
  1551. package/dist/rpc.js +2 -0
  1552. package/dist/rpc.js.map +1 -1
  1553. package/dist/runtime-profile.d.ts +1 -1
  1554. package/dist/styles.css +1 -1
  1555. package/dist/utils.d.ts +13 -13
  1556. package/package.json +7 -3
  1557. package/schemas/json-schema-form.schema.json +566 -0
@@ -0,0 +1,21 @@
1
+ import { ExpressionEvaluator, FieldControl, FormLayout, JsonSchemaProperty, RenderContext } from './json-schema-form-types.js';
2
+ export type ArrayView = "grid" | "stack" | "inline";
3
+ export declare const DEFAULT_TABLE_MAX_COLUMNS = 4;
4
+ export interface TableColumnOptions {
5
+ hideReadOnlyFields: boolean;
6
+ valueCells: boolean;
7
+ rootValue?: Record<string, unknown>;
8
+ evaluate?: ExpressionEvaluator;
9
+ }
10
+ export interface TableLayout {
11
+ columns: [string, JsonSchemaProperty][];
12
+ rows: Record<string, JsonSchemaProperty>[];
13
+ }
14
+ export interface ArrayViewOptions extends TableColumnOptions {
15
+ layoutMode: FormLayout["mode"];
16
+ }
17
+ export declare function arrayViewOptions(field: FieldControl, ctx: RenderContext): ArrayViewOptions;
18
+ export declare function tableColumnOptions(field: FieldControl, ctx: RenderContext): TableColumnOptions;
19
+ export declare function tableLayout(itemSchema: JsonSchemaProperty, items: unknown[], options: TableColumnOptions): TableLayout;
20
+ export declare function defaultArrayView(field: FieldControl, options: ArrayViewOptions): ArrayView;
21
+ //# sourceMappingURL=json-schema-form-array-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema-form-array-view.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-array-view.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACZ,UAAU,EAEV,kBAAkB,EAClB,aAAa,EACd,MAAM,0BAA0B,CAAC;AAIlC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEpD,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,MAAM,WAAW,kBAAkB;IACjC,kBAAkB,EAAE,OAAO,CAAC;IAE5B,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC;AAED,MAAM,WAAW,WAAW;IAG1B,OAAO,EAAE,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAAE,CAAC;IAExC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAE1D,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;CAChC;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,gBAAgB,CAE1F;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,kBAAkB,CAO9F;AAMD,wBAAgB,WAAW,CACzB,UAAU,EAAE,kBAAkB,EAC9B,KAAK,EAAE,OAAO,EAAE,EAChB,OAAO,EAAE,kBAAkB,GAC1B,WAAW,CAkBb;AAkBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,gBAAgB,GAAG,SAAS,CAa1F"}
@@ -0,0 +1,63 @@
1
+ import { isPlainObject } from "../lib/collections.js";
2
+ import { applyListenerState } from "./json-schema-form-listeners.js";
3
+ import { resolveControl } from "./json-schema-form-resolve.js";
4
+ import { orderByXOrder, orderByClickyOrder, hasObjectItemProperties } from "./json-schema-form-utils.js";
5
+ const DEFAULT_TABLE_MAX_COLUMNS = 4;
6
+ function arrayViewOptions(field, ctx) {
7
+ return { ...tableColumnOptions(field, ctx), layoutMode: ctx.layout.mode };
8
+ }
9
+ function tableColumnOptions(field, ctx) {
10
+ return {
11
+ hideReadOnlyFields: ctx.hideReadOnlyFields,
12
+ valueCells: ctx.viewOnly || field.readOnly === true,
13
+ ...ctx.rootValue ? { rootValue: ctx.rootValue } : {},
14
+ ...ctx.expressionEvaluator ? { evaluate: ctx.expressionEvaluator } : {}
15
+ };
16
+ }
17
+ function tableLayout(itemSchema, items, options) {
18
+ const schema = itemSchema;
19
+ const states = (items.length > 0 ? items : [{}]).map((item) => {
20
+ const row = isPlainObject(item) ? item : {};
21
+ return applyListenerState(schema, row, {
22
+ root: options.rootValue ?? row,
23
+ ...options.evaluate ? { evaluate: options.evaluate } : {}
24
+ }).properties;
25
+ });
26
+ const keys = new Set(states.flatMap((state) => Object.keys(state)));
27
+ const shown = [...keys].flatMap((key) => {
28
+ const prop = states.map((state) => state[key]).find((p) => p !== void 0 && cellShows(p, options));
29
+ return prop ? [[key, prop]] : [];
30
+ });
31
+ return {
32
+ columns: orderByXOrder(orderByClickyOrder(shown), schema["x-order"]),
33
+ rows: items.length > 0 ? states : []
34
+ };
35
+ }
36
+ function cellShows(prop, options) {
37
+ return prop["x-hidden"] !== true && !(options.hideReadOnlyFields && prop.readOnly === true) && !(prop.writeOnly === true && (options.valueCells || prop.readOnly === true));
38
+ }
39
+ function defaultArrayView(field, options) {
40
+ if (field.arrayDisplay === "accordion") return options.layoutMode === "inline" ? "inline" : "stack";
41
+ if (field.layout === "table") return "grid";
42
+ const max = field.schema["x-table-max-columns"] ?? DEFAULT_TABLE_MAX_COLUMNS;
43
+ if (!Number.isInteger(max) || max < 1) {
44
+ throw new Error(`${field.key}: x-table-max-columns must be a positive integer, got ${JSON.stringify(max)}`);
45
+ }
46
+ const items = Array.isArray(field.value) ? field.value : [];
47
+ const { columns } = tableLayout(field.itemSchema ?? {}, items, options);
48
+ if (columns.some(([key, prop]) => nestsForm(key, prop))) return "inline";
49
+ return columns.length <= max ? "grid" : "inline";
50
+ }
51
+ function nestsForm(key, prop) {
52
+ const control = resolveControl({ key, prop, required: false, value: void 0, onChange: () => {
53
+ } });
54
+ return control.kind === "object" || control.kind === "string-map" || control.kind === "array" && hasObjectItemProperties(control.itemSchema);
55
+ }
56
+ export {
57
+ DEFAULT_TABLE_MAX_COLUMNS,
58
+ arrayViewOptions,
59
+ defaultArrayView,
60
+ tableColumnOptions,
61
+ tableLayout
62
+ };
63
+ //# sourceMappingURL=json-schema-form-array-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema-form-array-view.js","sources":["../../src/components/json-schema-form-array-view.ts"],"sourcesContent":["import { isPlainObject } from \"../lib/collections\";\nimport { applyListenerState } from \"./json-schema-form-listeners\";\nimport { resolveControl } from \"./json-schema-form-resolve\";\nimport { hasObjectItemProperties, orderByClickyOrder, orderByXOrder } from \"./json-schema-form-utils\";\nimport type {\n ExpressionEvaluator,\n FieldControl,\n FormLayout,\n JsonSchemaObject,\n JsonSchemaProperty,\n RenderContext,\n} from \"./json-schema-form-types\";\n\n// How an object array renders: the row grid (TableArray), or the item list\n// (AccordionArray) with each item's fields stacked or labelled inline.\nexport type ArrayView = \"grid\" | \"stack\" | \"inline\";\n\nexport const DEFAULT_TABLE_MAX_COLUMNS = 4;\n\nexport interface TableColumnOptions {\n hideReadOnlyFields: boolean;\n // The whole table is a view, so every cell renders as its value; see TableArray.\n valueCells: boolean;\n rootValue?: Record<string, unknown>;\n evaluate?: ExpressionEvaluator;\n}\n\nexport interface TableLayout {\n // Every column at least one row shows, in x-clicky-order / x-order order,\n // carrying the first showing row's property for the header.\n columns: [string, JsonSchemaProperty][];\n // Per row, that row's effective item properties under its own listener state.\n rows: Record<string, JsonSchemaProperty>[];\n}\n\nexport interface ArrayViewOptions extends TableColumnOptions {\n // The layout the array inherits, which an explicit accordion keeps.\n layoutMode: FormLayout[\"mode\"];\n}\n\nexport function arrayViewOptions(field: FieldControl, ctx: RenderContext): ArrayViewOptions {\n return { ...tableColumnOptions(field, ctx), layoutMode: ctx.layout.mode };\n}\n\nexport function tableColumnOptions(field: FieldControl, ctx: RenderContext): TableColumnOptions {\n return {\n hideReadOnlyFields: ctx.hideReadOnlyFields,\n valueCells: ctx.viewOnly || field.readOnly === true,\n ...(ctx.rootValue ? { rootValue: ctx.rootValue } : {}),\n ...(ctx.expressionEvaluator ? { evaluate: ctx.expressionEvaluator } : {}),\n };\n}\n\n// tableLayout evaluates the item schema's listeners per row, as the object\n// renderer does for each item of the list views, so a cell a row's own\n// `x-on-change` reveals gets a column. With no rows the columns come from the\n// load state of an empty item.\nexport function tableLayout(\n itemSchema: JsonSchemaProperty,\n items: unknown[],\n options: TableColumnOptions,\n): TableLayout {\n const schema = itemSchema as JsonSchemaObject;\n const states = (items.length > 0 ? items : [{}]).map((item) => {\n const row = isPlainObject(item) ? item : {};\n return applyListenerState(schema, row, {\n root: options.rootValue ?? row,\n ...(options.evaluate ? { evaluate: options.evaluate } : {}),\n }).properties;\n });\n const keys = new Set(states.flatMap((state) => Object.keys(state)));\n const shown = [...keys].flatMap((key): [string, JsonSchemaProperty][] => {\n const prop = states.map((state) => state[key]).find((p) => p !== undefined && cellShows(p, options));\n return prop ? [[key, prop]] : [];\n });\n return {\n columns: orderByXOrder(orderByClickyOrder(shown), schema[\"x-order\"]),\n rows: items.length > 0 ? states : [],\n };\n}\n\n// cellShows mirrors the renderer's drop rules for one cell: `x-hidden`, a\n// readOnly cell under hideReadOnlyFields, and a writeOnly cell in a view.\nfunction cellShows(prop: JsonSchemaProperty, options: TableColumnOptions): boolean {\n return (\n prop[\"x-hidden\"] !== true &&\n !(options.hideReadOnlyFields && prop.readOnly === true) &&\n !(prop.writeOnly === true && (options.valueCells || prop.readOnly === true))\n );\n}\n\n// defaultArrayView picks the view an object array opens in. An explicit\n// accordion names its renderer and outranks an explicit table, keeping the\n// label placement of the form around it (inline in an inline form, stacked\n// otherwise); without either hint a grid of up to `x-table-max-columns`\n// visible columns stays a grid and a wider one — or one with a nested\n// sub-form column — opens as the inline item form.\nexport function defaultArrayView(field: FieldControl, options: ArrayViewOptions): ArrayView {\n if (field.arrayDisplay === \"accordion\") return options.layoutMode === \"inline\" ? \"inline\" : \"stack\";\n if (field.layout === \"table\") return \"grid\";\n const max = field.schema[\"x-table-max-columns\"] ?? DEFAULT_TABLE_MAX_COLUMNS;\n if (!Number.isInteger(max) || max < 1) {\n throw new Error(`${field.key}: x-table-max-columns must be a positive integer, got ${JSON.stringify(max)}`);\n }\n const items = Array.isArray(field.value) ? field.value : [];\n const { columns } = tableLayout(field.itemSchema ?? { type: \"object\" }, items, options);\n // A cell holding a whole sub-form (an object, a map, a list of objects)\n // needs the item form's width, however few columns there are.\n if (columns.some(([key, prop]) => nestsForm(key, prop))) return \"inline\";\n return columns.length <= max ? \"grid\" : \"inline\";\n}\n\nfunction nestsForm(key: string, prop: JsonSchemaProperty): boolean {\n const control = resolveControl({ key, prop, required: false, value: undefined, onChange: () => {} });\n return (\n control.kind === \"object\" ||\n control.kind === \"string-map\" ||\n (control.kind === \"array\" && hasObjectItemProperties(control.itemSchema))\n );\n}\n"],"names":[],"mappings":";;;;AAiBO,MAAM,4BAA4B;AAuBlC,SAAS,iBAAiB,OAAqB,KAAsC;AAC1F,SAAO,EAAE,GAAG,mBAAmB,OAAO,GAAG,GAAG,YAAY,IAAI,OAAO,KAAA;AACrE;AAEO,SAAS,mBAAmB,OAAq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AAK,aAAa;AAE1E;AAQO,SAAS,iBAAiB,OAAqB,SAAsC;AAC1F,MAAI,MAAM,iBAAiB,oBAAoB,QAAQ,eAAe,WAAW,WAAW;AAC5F,MAAI,MAAM,WAAW,QAAS,QAAO;AACrC,QAAM,MAAM,MAAM,OAAO,qBAAqB,KAAK;AACnD,MAAI,CAAC,OAAO,UAAU,GAAG,KAAK,MAAM,GAAG;AACrC,UAAM,IAAI,MAAM,GAAG,MAAM,GAAG,yDAAyD,KAAK,UAAU,GAAG,CAAC,EAAE;AAAA,EAC5G;AACA,QAAM,QAAQ,MAAM,QAAQ,MAAM,KAAK,IAAI,MAAM,QAAQ,CAAA;AACzD,QAAM,EAAE,QAAA,IAAY,YAAY,MAAM,cAAc,CAAiB,GAAG,OAAO,OAAO;AAGtF,MAAI,QAAQ,KAAK,CAAC,CAAC,KAAK,IAAI,MAAM,UAAU,KAAK,IAAI,CAAC,EAAG,QAAO;AAChE,SAAO,QAAQ,UAAU,MAAM,SAAS;AAC1C;AAEA,SAAS,UAAU,KAAa,MAAmC;AACjE,QAAM,UAAU,eAAe,EAAE,KAAK,MAAM,UAAU,OAAO,OAAO,QAAW,UAAU,MAAM;AAAA,EAAC,GAAG;AACnG,SACE,QAAQ,SAAS,YACjB,QAAQ,SAAS,gBAChB,QAAQ,SAAS,WAAW,wBAAwB,QAAQ,UAAU;AAE3E;"}
@@ -8,12 +8,11 @@ const FilterPill = require("../data/FilterPill.cjs");
8
8
  const button = require("./button.cjs");
9
9
  const ItemActions = require("./ItemActions.cjs");
10
10
  const jsonSchemaFormSize = require("./json-schema-form-size.cjs");
11
- const jsonSchemaFormAccordionArray = require("./json-schema-form-accordion-array.cjs");
12
11
  const jsonSchemaFormCardsArray = require("./json-schema-form-cards-array.cjs");
13
12
  const jsonSchemaFormLayout = require("./json-schema-form-layout.cjs");
14
13
  const jsonSchemaFormResolve = require("./json-schema-form-resolve.cjs");
15
14
  const jsonSchemaFormErrors = require("./json-schema-form-errors.cjs");
16
- const jsonSchemaFormTableArray = require("./json-schema-form-table-array.cjs");
15
+ const jsonSchemaFormObjectArrayView = require("./json-schema-form-object-array-view.cjs");
17
16
  const jsonSchemaFormTagsCombobox = require("./json-schema-form-tags-combobox.cjs");
18
17
  const jsonSchemaFormListArray = require("./json-schema-form-list-array.cjs");
19
18
  const jsonSchemaFormUtils = require("./json-schema-form-utils.cjs");
@@ -84,11 +83,8 @@ function ArrayControl({
84
83
  if (field.arrayDisplay === "cards") {
85
84
  return /* @__PURE__ */ jsxRuntime.jsx(jsonSchemaFormCardsArray.CardsArray, { field, ctx, readOnly });
86
85
  }
87
- if (field.arrayDisplay === "accordion" || field.arrayDisplay !== "stacked" && field.layout !== "table") {
88
- return /* @__PURE__ */ jsxRuntime.jsx(jsonSchemaFormAccordionArray.AccordionArray, { field, ctx, readOnly });
89
- }
90
- if (field.layout === "table") {
91
- return /* @__PURE__ */ jsxRuntime.jsx(jsonSchemaFormTableArray.TableArray, { field, ctx, readOnly });
86
+ if (field.arrayDisplay !== "stacked") {
87
+ return /* @__PURE__ */ jsxRuntime.jsx(jsonSchemaFormObjectArrayView.ObjectArrayView, { field, ctx, readOnly });
92
88
  }
93
89
  }
94
90
  const items = Array.isArray(field.value) ? field.value : [];
@@ -1 +1 @@
1
- {"version":3,"file":"json-schema-form-array.cjs","sources":["../../src/components/json-schema-form-array.tsx"],"sourcesContent":["import { moveItem, removeIndex, setIndex } from \"../lib/collections\";\nimport { cn } from \"../lib/utils\";\nimport { Icon } from \"../data/Icon\";\nimport { FilterPill } from \"../data/FilterPill\";\nimport { UiAdd } from \"../icons\";\nimport { Button } from \"./button\";\nimport { ItemActions } from \"./ItemActions\";\nimport {\n controlMinHeightClass,\n fieldInnerGapClass,\n inputSizeClass,\n type FormSize,\n} from \"./json-schema-form-size\";\nimport { AccordionArray } from \"./json-schema-form-accordion-array\";\nimport { CardsArray } from \"./json-schema-form-cards-array\";\nimport { FieldsGrid } from \"./json-schema-form-layout\";\nimport { scalarItemsType } from \"./json-schema-form-resolve\";\nimport { appendInstancePath } from \"./json-schema-form-errors\";\nimport { TableArray } from \"./json-schema-form-table-array\";\nimport { TagsComboboxControl } from \"./json-schema-form-tags-combobox\";\nimport { CompactListArray } from \"./json-schema-form-list-array\";\nimport {\n canAddItem,\n canRemoveItem,\n hasObjectItemProperties,\n seedFromSchema,\n toStringArray,\n} from \"./json-schema-form-utils\";\nimport type {\n FieldControl,\n FieldOption,\n RenderContext,\n} from \"./json-schema-form-types\";\n\n// A comma is the second commit key in every tag list, and what a pasted list is\n// split on. Newlines split too — see splitOnComboboxSeparators.\nconst TAG_SEPARATORS = [\",\"];\n\n// ArrayControl routes an array to the control its items call for: a flat list of\n// values (choices, scalars) is ONE tag combobox; object items are summary rows,\n// cards or a table; anything else renders a control per item with add / remove /\n// reorder. Recursion goes through ctx.render so this module never imports the\n// renderer (no import cycle).\nexport function ArrayControl({\n field,\n fieldId,\n ctx,\n}: {\n field: FieldControl;\n fieldId: string;\n ctx: RenderContext;\n}) {\n // A read-only array marks its whole subtree non-editable: no add/remove/reorder\n // and item inputs disabled (a child the schema marks readOnly still renders as\n // a value span).\n const readOnly = ctx.readOnly || field.readOnly === true;\n const choices = enumItemOptions(field);\n const scalarType = scalarItemsType(field.itemSchema);\n if (field.arrayDisplay === \"list\") {\n if (scalarType !== \"string\") {\n throw new Error(\n `${field.key} uses x-array-display list without string items`,\n );\n }\n return (\n <CompactListArray\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n presentation={ctx.presentation === true}\n />\n );\n }\n if (field.arrayDisplay === \"filter-pills\" && choices.length > 0) {\n return (\n <FilterPillArray\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={ctx.size}\n />\n );\n }\n // A list of choices is ONE control, not a stack of them: the enum item schema\n // makes the whole array a multi-select whose committed values are pills, so\n // the option set is discoverable in one dropdown instead of repeated per item.\n // `x-array-display: \"stacked\"` opts back into a combobox per item.\n if (field.arrayDisplay !== \"stacked\" && choices.length > 0) {\n return (\n <TagsComboboxControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={ctx.size}\n options={choices}\n />\n );\n }\n // A flat list of scalars is the same gesture as the enum list above — type a\n // value, get a pill — so it takes the same control, with no options to pick\n // from and a comma as a second commit key. Numeric items commit numbers.\n if (field.arrayDisplay !== \"stacked\" && scalarType) {\n return (\n <TagsComboboxControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={ctx.size}\n options={[]}\n itemType={scalarType}\n separators={TAG_SEPARATORS}\n />\n );\n }\n if (hasObjectItemProperties(field.itemSchema)) {\n if (field.arrayDisplay === \"cards\") {\n return <CardsArray field={field} ctx={ctx} readOnly={readOnly} />;\n }\n // The accordion is the DEFAULT for object items: stacked in full, a\n // ten-property item costs ~700px of screen each and a list of them says\n // nothing about which item is which. `x-array-display: \"stacked\"` opts back\n // into the per-item sub-form below; `x-layout: \"table\"` into the row grid.\n // An explicit accordion outranks the table, since it names the renderer.\n if (\n field.arrayDisplay === \"accordion\" ||\n (field.arrayDisplay !== \"stacked\" && field.layout !== \"table\")\n ) {\n return <AccordionArray field={field} ctx={ctx} readOnly={readOnly} />;\n }\n // `x-layout: table` renders object-item arrays as compact rows with one\n // column per item property — denser still than the summary rows.\n if (field.layout === \"table\") {\n return <TableArray field={field} ctx={ctx} readOnly={readOnly} />;\n }\n }\n const items = Array.isArray(field.value) ? field.value : [];\n const itemSchema = field.itemSchema ?? { type: \"string\" };\n const childCtx: RenderContext = { ...ctx, readOnly, depth: ctx.depth + 1 };\n\n return (\n <div\n className={cn(\n \"flex flex-col\",\n !ctx.presentation && \"rounded-md border border-input p-2\",\n fieldInnerGapClass[ctx.size],\n )}\n >\n {items.map((item, i) => (\n <div\n key={i}\n className={cn(\n \"grid items-start gap-2\",\n readOnly ? \"grid-cols-1\" : \"grid-cols-[1fr_auto]\",\n )}\n >\n {/* The item's row is a FieldWrapper (or a full-width ObjectSection),\n both of which are grid children of a FieldsGrid — inline mode's\n `grid-cols-subgrid` resolves to `none` without one, collapsing\n every item into a stacked column while the rest of the form stays\n aligned. Fixed at one column: an item is a single row, and any\n multi-column layout belongs to the item's own object body. */}\n <FieldsGrid\n layout={ctx.layout}\n size={ctx.size}\n columns={1}\n className=\"min-w-0\"\n >\n {ctx.render.renderFieldRow(\n {\n key: `${field.key}[${i}]`,\n prop: itemSchema,\n required: false,\n value: item,\n onChange: (next) => field.onChange(setIndex(items, i, next)),\n instancePath: appendInstancePath(ctx.instancePath, i),\n },\n childCtx,\n { labelOverride: `Item ${i + 1}` },\n )}\n </FieldsGrid>\n {!readOnly && (\n <ItemActions\n label={`item ${i + 1}`}\n index={i}\n count={items.length}\n size={ctx.size}\n reveal={false}\n onMove={(to) => field.onChange(moveItem(items, i, to))}\n {...(canRemoveItem(field, items.length)\n ? { onRemove: () => field.onChange(removeIndex(items, i)) }\n : {})}\n />\n )}\n </div>\n ))}\n {!readOnly && canAddItem(field, items.length) && (\n <Button\n type=\"button\"\n variant=\"outline\"\n className={cn(\"gap-1.5\", inputSizeClass[ctx.size])}\n onClick={() => field.onChange([...items, seedFromSchema(itemSchema)])}\n >\n <Icon icon={UiAdd} className=\"text-sm\" />\n Add item\n </Button>\n )}\n </div>\n );\n}\n\n// The choices an array of enum items offers, deduped by value. Prefers the\n// resolved `options` (they carry the schema's labels, icons and tones) and falls\n// back to the raw item `enum` for a field a pre-extension built by hand.\nfunction enumItemOptions(field: FieldControl): FieldOption[] {\n const rawOptions =\n field.options ??\n (Array.isArray(field.itemSchema?.enum)\n ? field.itemSchema.enum.map((value) => ({\n value: String(value),\n label: String(value),\n }))\n : []);\n const seen = new Set<string>();\n return rawOptions.filter((option) => {\n if (seen.has(option.value)) return false;\n seen.add(option.value);\n return true;\n });\n}\n\nfunction FilterPillArray({\n field,\n fieldId,\n readOnly,\n size,\n}: {\n field: FieldControl;\n fieldId: string;\n readOnly: boolean;\n size: FormSize;\n}) {\n const options = enumItemOptions(field);\n const validValues = new Set(options.map((option) => option.value));\n const explicitValues = toStringArray(field.value).filter((value) =>\n validValues.has(value),\n );\n const implicitAll = explicitValues.length === 0;\n const selected = new Set(\n implicitAll ? options.map((option) => option.value) : explicitValues,\n );\n\n function commit(nextSelected: Set<string>) {\n const next = options\n .map((option) => option.value)\n .filter((value) => nextSelected.has(value));\n field.onChange(next.length === options.length ? [] : next);\n }\n\n function toggle(value: string) {\n if (readOnly) return;\n const next = new Set(selected);\n if (next.has(value)) {\n next.delete(value);\n } else {\n next.add(value);\n }\n commit(next);\n }\n\n return (\n <div\n id={fieldId}\n data-jsf-input\n role=\"group\"\n aria-label={field.label}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent px-2 py-1 shadow-sm\",\n controlMinHeightClass[size],\n )}\n >\n {options.map((option) => (\n <FilterPill\n key={option.value}\n label={option.label}\n mode={selected.has(option.value) ? \"active\" : \"neutral\"}\n title={\n implicitAll ? `${option.label} enabled by default` : option.label\n }\n {...(!readOnly ? { onClick: () => toggle(option.value) } : {})}\n className=\"max-w-full\"\n />\n ))}\n </div>\n );\n}\n"],"names":["scalarItemsType","jsx","CompactListArray","TagsComboboxControl","hasObjectItemProperties","CardsArray","AccordionArray","TableArray","jsxs","cn","fieldInnerGapClass","FieldsGrid","setIndex","appendInstancePath","ItemActions","moveItem","canRemoveItem","removeIndex","canAddItem","Button","inputSizeClass","seedFromSchema","Icon","UiAdd","toStringArray","controlMinHeightClass","FilterPill"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,iBAAiB,CAAC,GAAG;AAOpB,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACF,GAIG;AAID,QAAM,WAAW,IAAI,YAAY,MAAM,aAAa;AACpD,QAAM,UAAU,gBAAgB,KAAK;AACrC,QAAM,aAAaA,sBAAAA,gBAAgB,MAAM,UAAU;AACnD,MAAI,MAAM,iBAAiB,QAAQ;AACjC,QAAI,eAAe,UAAU;AAC3B,YAAM,IAAI;AAAA,QACR,GAAG,MAAM,G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A,UACd,MAAM,SAAS,IAAI,OAAO,KAAK,IAAI,WAAW;AAAA,UAC9C,OACE,cAAc,GAAG,OAAO,KAAK,wBAAwB,OAAO;AAAA,UAE7D,GAAI,CAAC,WAAW,EAAE,SAAS,MAAM,OAAO,OAAO,KAAK,EAAA,IAAM,CAAA;AAAA,UAC3D,WAAU;AAAA,QAAA;AAAA,QAPL,OAAO;AAAA,MAAA,CASf;AAAA,IAAA;AAAA,EAAA;AAGP;;"}
1
+ {"version":3,"file":"json-schema-form-array.cjs","sources":["../../src/components/json-schema-form-array.tsx"],"sourcesContent":["import { moveItem, removeIndex, setIndex } from \"../lib/collections\";\nimport { cn } from \"../lib/utils\";\nimport { Icon } from \"../data/Icon\";\nimport { FilterPill } from \"../data/FilterPill\";\nimport { UiAdd } from \"../icons\";\nimport { Button } from \"./button\";\nimport { ItemActions } from \"./ItemActions\";\nimport {\n controlMinHeightClass,\n fieldInnerGapClass,\n inputSizeClass,\n type FormSize,\n} from \"./json-schema-form-size\";\nimport { CardsArray } from \"./json-schema-form-cards-array\";\nimport { FieldsGrid } from \"./json-schema-form-layout\";\nimport { scalarItemsType } from \"./json-schema-form-resolve\";\nimport { appendInstancePath } from \"./json-schema-form-errors\";\nimport { ObjectArrayView } from \"./json-schema-form-object-array-view\";\nimport { TagsComboboxControl } from \"./json-schema-form-tags-combobox\";\nimport { CompactListArray } from \"./json-schema-form-list-array\";\nimport {\n canAddItem,\n canRemoveItem,\n hasObjectItemProperties,\n seedFromSchema,\n toStringArray,\n} from \"./json-schema-form-utils\";\nimport type {\n FieldControl,\n FieldOption,\n RenderContext,\n} from \"./json-schema-form-types\";\n\n// A comma is the second commit key in every tag list, and what a pasted list is\n// split on. Newlines split too — see splitOnComboboxSeparators.\nconst TAG_SEPARATORS = [\",\"];\n\n// ArrayControl routes an array to the control its items call for: a flat list of\n// values (choices, scalars) is ONE tag combobox; object items are cards or a\n// switchable grid / item-form view (ObjectArrayView); anything else — and the\n// `x-array-display: stacked` opt-out — renders a control per item with add / remove /\n// reorder. Recursion goes through ctx.render so this module never imports the\n// renderer (no import cycle).\nexport function ArrayControl({\n field,\n fieldId,\n ctx,\n}: {\n field: FieldControl;\n fieldId: string;\n ctx: RenderContext;\n}) {\n // A read-only array marks its whole subtree non-editable: no add/remove/reorder\n // and item inputs disabled (a child the schema marks readOnly still renders as\n // a value span). A table shows every read-only cell as a value span instead;\n // see TableArray.\n const readOnly = ctx.readOnly || field.readOnly === true;\n const choices = enumItemOptions(field);\n const scalarType = scalarItemsType(field.itemSchema);\n if (field.arrayDisplay === \"list\") {\n if (scalarType !== \"string\") {\n throw new Error(\n `${field.key} uses x-array-display list without string items`,\n );\n }\n return (\n <CompactListArray\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n presentation={ctx.presentation === true}\n />\n );\n }\n if (field.arrayDisplay === \"filter-pills\" && choices.length > 0) {\n return (\n <FilterPillArray\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={ctx.size}\n />\n );\n }\n // A list of choices is ONE control, not a stack of them: the enum item schema\n // makes the whole array a multi-select whose committed values are pills, so\n // the option set is discoverable in one dropdown instead of repeated per item.\n // `x-array-display: \"stacked\"` opts back into a combobox per item.\n if (field.arrayDisplay !== \"stacked\" && choices.length > 0) {\n return (\n <TagsComboboxControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={ctx.size}\n options={choices}\n />\n );\n }\n // A flat list of scalars is the same gesture as the enum list above — type a\n // value, get a pill — so it takes the same control, with no options to pick\n // from and a comma as a second commit key. Numeric items commit numbers.\n if (field.arrayDisplay !== \"stacked\" && scalarType) {\n return (\n <TagsComboboxControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={ctx.size}\n options={[]}\n itemType={scalarType}\n separators={TAG_SEPARATORS}\n />\n );\n }\n if (hasObjectItemProperties(field.itemSchema)) {\n if (field.arrayDisplay === \"cards\") {\n return <CardsArray field={field} ctx={ctx} readOnly={readOnly} />;\n }\n // Object items render as a switchable view: the row grid while the item's\n // visible columns fit, the item list (one summary row per item, opening\n // into its form) once they do not — stacked in full, a ten-property item\n // costs ~700px of screen each. `x-layout: \"table\"` and\n // `x-array-display: \"accordion\"` pick the view it opens in; see\n // defaultArrayView. `x-array-display: \"stacked\"` opts back into the\n // per-item sub-form below.\n if (field.arrayDisplay !== \"stacked\") {\n return <ObjectArrayView field={field} ctx={ctx} readOnly={readOnly} />;\n }\n }\n const items = Array.isArray(field.value) ? field.value : [];\n const itemSchema = field.itemSchema ?? { type: \"string\" };\n const childCtx: RenderContext = { ...ctx, readOnly, depth: ctx.depth + 1 };\n\n return (\n <div\n className={cn(\n \"flex flex-col\",\n !ctx.presentation && \"rounded-md border border-input p-2\",\n fieldInnerGapClass[ctx.size],\n )}\n >\n {items.map((item, i) => (\n <div\n key={i}\n className={cn(\n \"grid items-start gap-2\",\n readOnly ? \"grid-cols-1\" : \"grid-cols-[1fr_auto]\",\n )}\n >\n {/* The item's row is a FieldWrapper (or a full-width ObjectSection),\n both of which are grid children of a FieldsGrid — inline mode's\n `grid-cols-subgrid` resolves to `none` without one, collapsing\n every item into a stacked column while the rest of the form stays\n aligned. Fixed at one column: an item is a single row, and any\n multi-column layout belongs to the item's own object body. */}\n <FieldsGrid\n layout={ctx.layout}\n size={ctx.size}\n columns={1}\n className=\"min-w-0\"\n >\n {ctx.render.renderFieldRow(\n {\n key: `${field.key}[${i}]`,\n prop: itemSchema,\n required: false,\n value: item,\n onChange: (next) => field.onChange(setIndex(items, i, next)),\n instancePath: appendInstancePath(ctx.instancePath, i),\n },\n childCtx,\n { labelOverride: `Item ${i + 1}` },\n )}\n </FieldsGrid>\n {!readOnly && (\n <ItemActions\n label={`item ${i + 1}`}\n index={i}\n count={items.length}\n size={ctx.size}\n reveal={false}\n onMove={(to) => field.onChange(moveItem(items, i, to))}\n {...(canRemoveItem(field, items.length)\n ? { onRemove: () => field.onChange(removeIndex(items, i)) }\n : {})}\n />\n )}\n </div>\n ))}\n {!readOnly && canAddItem(field, items.length) && (\n <Button\n type=\"button\"\n variant=\"outline\"\n className={cn(\"gap-1.5\", inputSizeClass[ctx.size])}\n onClick={() => field.onChange([...items, seedFromSchema(itemSchema)])}\n >\n <Icon icon={UiAdd} className=\"text-sm\" />\n Add item\n </Button>\n )}\n </div>\n );\n}\n\n// The choices an array of enum items offers, deduped by value. Prefers the\n// resolved `options` (they carry the schema's labels, icons and tones) and falls\n// back to the raw item `enum` for a field a pre-extension built by hand.\nfunction enumItemOptions(field: FieldControl): FieldOption[] {\n const rawOptions =\n field.options ??\n (Array.isArray(field.itemSchema?.enum)\n ? field.itemSchema.enum.map((value) => ({\n value: String(value),\n label: String(value),\n }))\n : []);\n const seen = new Set<string>();\n return rawOptions.filter((option) => {\n if (seen.has(option.value)) return false;\n seen.add(option.value);\n return true;\n });\n}\n\nfunction FilterPillArray({\n field,\n fieldId,\n readOnly,\n size,\n}: {\n field: FieldControl;\n fieldId: string;\n readOnly: boolean;\n size: FormSize;\n}) {\n const options = enumItemOptions(field);\n const validValues = new Set(options.map((option) => option.value));\n const explicitValues = toStringArray(field.value).filter((value) =>\n validValues.has(value),\n );\n const implicitAll = explicitValues.length === 0;\n const selected = new Set(\n implicitAll ? options.map((option) => option.value) : explicitValues,\n );\n\n function commit(nextSelected: Set<string>) {\n const next = options\n .map((option) => option.value)\n .filter((value) => nextSelected.has(value));\n field.onChange(next.length === options.length ? [] : next);\n }\n\n function toggle(value: string) {\n if (readOnly) return;\n const next = new Set(selected);\n if (next.has(value)) {\n next.delete(value);\n } else {\n next.add(value);\n }\n commit(next);\n }\n\n return (\n <div\n id={fieldId}\n data-jsf-input\n role=\"group\"\n aria-label={field.label}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent px-2 py-1 shadow-sm\",\n controlMinHeightClass[size],\n )}\n >\n {options.map((option) => (\n <FilterPill\n key={option.value}\n label={option.label}\n mode={selected.has(option.value) ? \"active\" : \"neutral\"}\n title={\n implicitAll ? `${option.label} enabled by default` : option.label\n }\n {...(!readOnly ? { onClick: () => toggle(option.value) } : {})}\n className=\"max-w-full\"\n />\n ))}\n </div>\n );\n}\n"],"names":["scalarItemsType","jsx","CompactListArray","TagsComboboxControl","hasObjectItemProperties","CardsArray","ObjectArrayView","jsxs","cn","fieldInnerGapClass","FieldsGrid","setIndex","appendInstancePath","ItemActions","moveItem","canRemoveItem","removeIndex","canAddItem","Button","inputSizeClass","seedFromSchema","Icon","UiAdd","toStringArray","controlMinHeightClass","FilterPill"],"mappings":";;;;;;;;;;;;;;;;;;;AAmCA,MAAM,iBAAiB,CAAC,GAAG;AAQpB,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACF,GAIG;AAKD,QAAM,WAAW,IAAI,YAAY,MAAM,aAAa;AACpD,QAAM,UAAU,gBAAgB,KAAK;AACrC,QAAM,aAAaA,sBAAAA,gBAAgB,MAAM,UAAU;AACnD,MAAI,MAAM,iBAAiB,QAAQ;AACjC,QAAI,eAAe,UAAU;AAC3B,YAAM,IAAI;AAAA,QACR,GAAG,MAAM,GAAG;AAAA,MAAA;AAAA,IAEhB;AACA,WACEC,2BAAAA;AAAAA,MAACC,wBAAAA;AAAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,cAAc,IAAI,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EAGzC;AACA,MAAI,MAAM,iBAAiB,kBAAkB,QAAQ,SAAS,GAAG;AAC/D,WACED,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,MAAM,IAAI;AAAA,MAAA;AAAA,IAAA;AAAA,EAGhB;AAKA,MAAI,MAAM,iBAAiB,aAAa,QAAQ,SAAS,GAAG;AAC1D,WACEA,2BAAAA;AAAAA,MAACE,2BAAAA;AAAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,MAAM,IAAI;AAAA,QACV,SAAS;AAAA,MAAA;A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AAU;AACd,UAAM,OAAO,IAAI,IAAI,QAAQ;AAC7B,QAAI,KAAK,IAAI,KAAK,GAAG;AACnB,WAAK,OAAO,KAAK;AAAA,IACnB,OAAO;AACL,WAAK,IAAI,KAAK;AAAA,IAChB;AACA,WAAO,IAAI;AAAA,EACb;AAEA,SACEtB,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,MACJ,kBAAc;AAAA,MACd,MAAK;AAAA,MACL,cAAY,MAAM;AAAA,MAClB,WAAWO,MAAAA;AAAAA,QACT;AAAA,QACAgB,mBAAAA,sBAAsB,IAAI;AAAA,MAAA;AAAA,MAG3B,UAAA,QAAQ,IAAI,CAAC,WACZvB,2BAAAA;AAAAA,QAACwB,WAAAA;AAAAA,QAAA;AAAA,UAEC,OAAO,OAAO;AAAA,UACd,MAAM,SAAS,IAAI,OAAO,KAAK,IAAI,WAAW;AAAA,UAC9C,OACE,cAAc,GAAG,OAAO,KAAK,wBAAwB,OAAO;AAAA,UAE7D,GAAI,CAAC,WAAW,EAAE,SAAS,MAAM,OAAO,OAAO,KAAK,EAAA,IAAM,CAAA;AAAA,UAC3D,WAAU;AAAA,QAAA;AAAA,QAPL,OAAO;AAAA,MAAA,CASf;AAAA,IAAA;AAAA,EAAA;AAGP;;"}
@@ -1,4 +1,4 @@
1
- import { FieldControl, RenderContext } from './json-schema-form-types';
1
+ import { FieldControl, RenderContext } from './json-schema-form-types.js';
2
2
  export declare function ArrayControl({ field, fieldId, ctx, }: {
3
3
  field: FieldControl;
4
4
  fieldId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"json-schema-form-array.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-array.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EACV,YAAY,EAEZ,aAAa,EACd,MAAM,0BAA0B,CAAC;AAWlC,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,OAAO,EACP,GAAG,GACJ,EAAE;IACD,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,aAAa,CAAC;CACpB,+BA6JA"}
1
+ {"version":3,"file":"json-schema-form-array.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-array.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,YAAY,EAEZ,aAAa,EACd,MAAM,0BAA0B,CAAC;AAYlC,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,OAAO,EACP,GAAG,GACJ,EAAE;IACD,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,aAAa,CAAC;CACpB,+BAwJA"}
@@ -6,12 +6,11 @@ import { FilterPill } from "../data/FilterPill.js";
6
6
  import { Button } from "./button.js";
7
7
  import { ItemActions } from "./ItemActions.js";
8
8
  import { inputSizeClass, fieldInnerGapClass, controlMinHeightClass } from "./json-schema-form-size.js";
9
- import { AccordionArray } from "./json-schema-form-accordion-array.js";
10
9
  import { CardsArray } from "./json-schema-form-cards-array.js";
11
10
  import { FieldsGrid } from "./json-schema-form-layout.js";
12
11
  import { scalarItemsType } from "./json-schema-form-resolve.js";
13
12
  import { appendInstancePath } from "./json-schema-form-errors.js";
14
- import { TableArray } from "./json-schema-form-table-array.js";
13
+ import { ObjectArrayView } from "./json-schema-form-object-array-view.js";
15
14
  import { TagsComboboxControl } from "./json-schema-form-tags-combobox.js";
16
15
  import { CompactListArray } from "./json-schema-form-list-array.js";
17
16
  import { hasObjectItemProperties, canRemoveItem, canAddItem, seedFromSchema, toStringArray } from "./json-schema-form-utils.js";
@@ -82,11 +81,8 @@ function ArrayControl({
82
81
  if (field.arrayDisplay === "cards") {
83
82
  return /* @__PURE__ */ jsx(CardsArray, { field, ctx, readOnly });
84
83
  }
85
- if (field.arrayDisplay === "accordion" || field.arrayDisplay !== "stacked" && field.layout !== "table") {
86
- return /* @__PURE__ */ jsx(AccordionArray, { field, ctx, readOnly });
87
- }
88
- if (field.layout === "table") {
89
- return /* @__PURE__ */ jsx(TableArray, { field, ctx, readOnly });
84
+ if (field.arrayDisplay !== "stacked") {
85
+ return /* @__PURE__ */ jsx(ObjectArrayView, { field, ctx, readOnly });
90
86
  }
91
87
  }
92
88
  const items = Array.isArray(field.value) ? field.value : [];
@@ -1 +1 @@
1
- {"version":3,"file":"json-schema-form-array.js","sources":["../../src/components/json-schema-form-array.tsx"],"sourcesContent":["import { moveItem, removeIndex, setIndex } from \"../lib/collections\";\nimport { cn } from \"../lib/utils\";\nimport { Icon } from \"../data/Icon\";\nimport { FilterPill } from \"../data/FilterPill\";\nimport { UiAdd } from \"../icons\";\nimport { Button } from \"./button\";\nimport { ItemActions } from \"./ItemActions\";\nimport {\n controlMinHeightClass,\n fieldInnerGapClass,\n inputSizeClass,\n type FormSize,\n} from \"./json-schema-form-size\";\nimport { AccordionArray } from \"./json-schema-form-accordion-array\";\nimport { CardsArray } from \"./json-schema-form-cards-array\";\nimport { FieldsGrid } from \"./json-schema-form-layout\";\nimport { scalarItemsType } from \"./json-schema-form-resolve\";\nimport { appendInstancePath } from \"./json-schema-form-errors\";\nimport { TableArray } from \"./json-schema-form-table-array\";\nimport { TagsComboboxControl } from \"./json-schema-form-tags-combobox\";\nimport { CompactListArray } from \"./json-schema-form-list-array\";\nimport {\n canAddItem,\n canRemoveItem,\n hasObjectItemProperties,\n seedFromSchema,\n toStringArray,\n} from \"./json-schema-form-utils\";\nimport type {\n FieldControl,\n FieldOption,\n RenderContext,\n} from \"./json-schema-form-types\";\n\n// A comma is the second commit key in every tag list, and what a pasted list is\n// split on. Newlines split too — see splitOnComboboxSeparators.\nconst TAG_SEPARATORS = [\",\"];\n\n// ArrayControl routes an array to the control its items call for: a flat list of\n// values (choices, scalars) is ONE tag combobox; object items are summary rows,\n// cards or a table; anything else renders a control per item with add / remove /\n// reorder. Recursion goes through ctx.render so this module never imports the\n// renderer (no import cycle).\nexport function ArrayControl({\n field,\n fieldId,\n ctx,\n}: {\n field: FieldControl;\n fieldId: string;\n ctx: RenderContext;\n}) {\n // A read-only array marks its whole subtree non-editable: no add/remove/reorder\n // and item inputs disabled (a child the schema marks readOnly still renders as\n // a value span).\n const readOnly = ctx.readOnly || field.readOnly === true;\n const choices = enumItemOptions(field);\n const scalarType = scalarItemsType(field.itemSchema);\n if (field.arrayDisplay === \"list\") {\n if (scalarType !== \"string\") {\n throw new Error(\n `${field.key} uses x-array-display list without string items`,\n );\n }\n return (\n <CompactListArray\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n presentation={ctx.presentation === true}\n />\n );\n }\n if (field.arrayDisplay === \"filter-pills\" && choices.length > 0) {\n return (\n <FilterPillArray\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={ctx.size}\n />\n );\n }\n // A list of choices is ONE control, not a stack of them: the enum item schema\n // makes the whole array a multi-select whose committed values are pills, so\n // the option set is discoverable in one dropdown instead of repeated per item.\n // `x-array-display: \"stacked\"` opts back into a combobox per item.\n if (field.arrayDisplay !== \"stacked\" && choices.length > 0) {\n return (\n <TagsComboboxControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={ctx.size}\n options={choices}\n />\n );\n }\n // A flat list of scalars is the same gesture as the enum list above — type a\n // value, get a pill — so it takes the same control, with no options to pick\n // from and a comma as a second commit key. Numeric items commit numbers.\n if (field.arrayDisplay !== \"stacked\" && scalarType) {\n return (\n <TagsComboboxControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={ctx.size}\n options={[]}\n itemType={scalarType}\n separators={TAG_SEPARATORS}\n />\n );\n }\n if (hasObjectItemProperties(field.itemSchema)) {\n if (field.arrayDisplay === \"cards\") {\n return <CardsArray field={field} ctx={ctx} readOnly={readOnly} />;\n }\n // The accordion is the DEFAULT for object items: stacked in full, a\n // ten-property item costs ~700px of screen each and a list of them says\n // nothing about which item is which. `x-array-display: \"stacked\"` opts back\n // into the per-item sub-form below; `x-layout: \"table\"` into the row grid.\n // An explicit accordion outranks the table, since it names the renderer.\n if (\n field.arrayDisplay === \"accordion\" ||\n (field.arrayDisplay !== \"stacked\" && field.layout !== \"table\")\n ) {\n return <AccordionArray field={field} ctx={ctx} readOnly={readOnly} />;\n }\n // `x-layout: table` renders object-item arrays as compact rows with one\n // column per item property — denser still than the summary rows.\n if (field.layout === \"table\") {\n return <TableArray field={field} ctx={ctx} readOnly={readOnly} />;\n }\n }\n const items = Array.isArray(field.value) ? field.value : [];\n const itemSchema = field.itemSchema ?? { type: \"string\" };\n const childCtx: RenderContext = { ...ctx, readOnly, depth: ctx.depth + 1 };\n\n return (\n <div\n className={cn(\n \"flex flex-col\",\n !ctx.presentation && \"rounded-md border border-input p-2\",\n fieldInnerGapClass[ctx.size],\n )}\n >\n {items.map((item, i) => (\n <div\n key={i}\n className={cn(\n \"grid items-start gap-2\",\n readOnly ? \"grid-cols-1\" : \"grid-cols-[1fr_auto]\",\n )}\n >\n {/* The item's row is a FieldWrapper (or a full-width ObjectSection),\n both of which are grid children of a FieldsGrid — inline mode's\n `grid-cols-subgrid` resolves to `none` without one, collapsing\n every item into a stacked column while the rest of the form stays\n aligned. Fixed at one column: an item is a single row, and any\n multi-column layout belongs to the item's own object body. */}\n <FieldsGrid\n layout={ctx.layout}\n size={ctx.size}\n columns={1}\n className=\"min-w-0\"\n >\n {ctx.render.renderFieldRow(\n {\n key: `${field.key}[${i}]`,\n prop: itemSchema,\n required: false,\n value: item,\n onChange: (next) => field.onChange(setIndex(items, i, next)),\n instancePath: appendInstancePath(ctx.instancePath, i),\n },\n childCtx,\n { labelOverride: `Item ${i + 1}` },\n )}\n </FieldsGrid>\n {!readOnly && (\n <ItemActions\n label={`item ${i + 1}`}\n index={i}\n count={items.length}\n size={ctx.size}\n reveal={false}\n onMove={(to) => field.onChange(moveItem(items, i, to))}\n {...(canRemoveItem(field, items.length)\n ? { onRemove: () => field.onChange(removeIndex(items, i)) }\n : {})}\n />\n )}\n </div>\n ))}\n {!readOnly && canAddItem(field, items.length) && (\n <Button\n type=\"button\"\n variant=\"outline\"\n className={cn(\"gap-1.5\", inputSizeClass[ctx.size])}\n onClick={() => field.onChange([...items, seedFromSchema(itemSchema)])}\n >\n <Icon icon={UiAdd} className=\"text-sm\" />\n Add item\n </Button>\n )}\n </div>\n );\n}\n\n// The choices an array of enum items offers, deduped by value. Prefers the\n// resolved `options` (they carry the schema's labels, icons and tones) and falls\n// back to the raw item `enum` for a field a pre-extension built by hand.\nfunction enumItemOptions(field: FieldControl): FieldOption[] {\n const rawOptions =\n field.options ??\n (Array.isArray(field.itemSchema?.enum)\n ? field.itemSchema.enum.map((value) => ({\n value: String(value),\n label: String(value),\n }))\n : []);\n const seen = new Set<string>();\n return rawOptions.filter((option) => {\n if (seen.has(option.value)) return false;\n seen.add(option.value);\n return true;\n });\n}\n\nfunction FilterPillArray({\n field,\n fieldId,\n readOnly,\n size,\n}: {\n field: FieldControl;\n fieldId: string;\n readOnly: boolean;\n size: FormSize;\n}) {\n const options = enumItemOptions(field);\n const validValues = new Set(options.map((option) => option.value));\n const explicitValues = toStringArray(field.value).filter((value) =>\n validValues.has(value),\n );\n const implicitAll = explicitValues.length === 0;\n const selected = new Set(\n implicitAll ? options.map((option) => option.value) : explicitValues,\n );\n\n function commit(nextSelected: Set<string>) {\n const next = options\n .map((option) => option.value)\n .filter((value) => nextSelected.has(value));\n field.onChange(next.length === options.length ? [] : next);\n }\n\n function toggle(value: string) {\n if (readOnly) return;\n const next = new Set(selected);\n if (next.has(value)) {\n next.delete(value);\n } else {\n next.add(value);\n }\n commit(next);\n }\n\n return (\n <div\n id={fieldId}\n data-jsf-input\n role=\"group\"\n aria-label={field.label}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent px-2 py-1 shadow-sm\",\n controlMinHeightClass[size],\n )}\n >\n {options.map((option) => (\n <FilterPill\n key={option.value}\n label={option.label}\n mode={selected.has(option.value) ? \"active\" : \"neutral\"}\n title={\n implicitAll ? `${option.label} enabled by default` : option.label\n }\n {...(!readOnly ?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AAA,UACd,MAAM,SAAS,IAAI,OAAO,KAAK,IAAI,WAAW;AAAA,UAC9C,OACE,cAAc,GAAG,OAAO,KAAK,wBAAwB,OAAO;AAAA,UAE7D,GAAI,CAAC,WAAW,EAAE,SAAS,MAAM,OAAO,OAAO,KAAK,EAAA,IAAM,CAAA;AAAA,UAC3D,WAAU;AAAA,QAAA;AAAA,QAPL,OAAO;AAAA,MAAA,CASf;AAAA,IAAA;AAAA,EAAA;AAGP;"}
1
+ {"version":3,"file":"json-schema-form-array.js","sources":["../../src/components/json-schema-form-array.tsx"],"sourcesContent":["import { moveItem, removeIndex, setIndex } from \"../lib/collections\";\nimport { cn } from \"../lib/utils\";\nimport { Icon } from \"../data/Icon\";\nimport { FilterPill } from \"../data/FilterPill\";\nimport { UiAdd } from \"../icons\";\nimport { Button } from \"./button\";\nimport { ItemActions } from \"./ItemActions\";\nimport {\n controlMinHeightClass,\n fieldInnerGapClass,\n inputSizeClass,\n type FormSize,\n} from \"./json-schema-form-size\";\nimport { CardsArray } from \"./json-schema-form-cards-array\";\nimport { FieldsGrid } from \"./json-schema-form-layout\";\nimport { scalarItemsType } from \"./json-schema-form-resolve\";\nimport { appendInstancePath } from \"./json-schema-form-errors\";\nimport { ObjectArrayView } from \"./json-schema-form-object-array-view\";\nimport { TagsComboboxControl } from \"./json-schema-form-tags-combobox\";\nimport { CompactListArray } from \"./json-schema-form-list-array\";\nimport {\n canAddItem,\n canRemoveItem,\n hasObjectItemProperties,\n seedFromSchema,\n toStringArray,\n} from \"./json-schema-form-utils\";\nimport type {\n FieldControl,\n FieldOption,\n RenderContext,\n} from \"./json-schema-form-types\";\n\n// A comma is the second commit key in every tag list, and what a pasted list is\n// split on. Newlines split too — see splitOnComboboxSeparators.\nconst TAG_SEPARATORS = [\",\"];\n\n// ArrayControl routes an array to the control its items call for: a flat list of\n// values (choices, scalars) is ONE tag combobox; object items are cards or a\n// switchable grid / item-form view (ObjectArrayView); anything else — and the\n// `x-array-display: stacked` opt-out — renders a control per item with add / remove /\n// reorder. Recursion goes through ctx.render so this module never imports the\n// renderer (no import cycle).\nexport function ArrayControl({\n field,\n fieldId,\n ctx,\n}: {\n field: FieldControl;\n fieldId: string;\n ctx: RenderContext;\n}) {\n // A read-only array marks its whole subtree non-editable: no add/remove/reorder\n // and item inputs disabled (a child the schema marks readOnly still renders as\n // a value span). A table shows every read-only cell as a value span instead;\n // see TableArray.\n const readOnly = ctx.readOnly || field.readOnly === true;\n const choices = enumItemOptions(field);\n const scalarType = scalarItemsType(field.itemSchema);\n if (field.arrayDisplay === \"list\") {\n if (scalarType !== \"string\") {\n throw new Error(\n `${field.key} uses x-array-display list without string items`,\n );\n }\n return (\n <CompactListArray\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n presentation={ctx.presentation === true}\n />\n );\n }\n if (field.arrayDisplay === \"filter-pills\" && choices.length > 0) {\n return (\n <FilterPillArray\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={ctx.size}\n />\n );\n }\n // A list of choices is ONE control, not a stack of them: the enum item schema\n // makes the whole array a multi-select whose committed values are pills, so\n // the option set is discoverable in one dropdown instead of repeated per item.\n // `x-array-display: \"stacked\"` opts back into a combobox per item.\n if (field.arrayDisplay !== \"stacked\" && choices.length > 0) {\n return (\n <TagsComboboxControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={ctx.size}\n options={choices}\n />\n );\n }\n // A flat list of scalars is the same gesture as the enum list above — type a\n // value, get a pill — so it takes the same control, with no options to pick\n // from and a comma as a second commit key. Numeric items commit numbers.\n if (field.arrayDisplay !== \"stacked\" && scalarType) {\n return (\n <TagsComboboxControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={ctx.size}\n options={[]}\n itemType={scalarType}\n separators={TAG_SEPARATORS}\n />\n );\n }\n if (hasObjectItemProperties(field.itemSchema)) {\n if (field.arrayDisplay === \"cards\") {\n return <CardsArray field={field} ctx={ctx} readOnly={readOnly} />;\n }\n // Object items render as a switchable view: the row grid while the item's\n // visible columns fit, the item list (one summary row per item, opening\n // into its form) once they do not — stacked in full, a ten-property item\n // costs ~700px of screen each. `x-layout: \"table\"` and\n // `x-array-display: \"accordion\"` pick the view it opens in; see\n // defaultArrayView. `x-array-display: \"stacked\"` opts back into the\n // per-item sub-form below.\n if (field.arrayDisplay !== \"stacked\") {\n return <ObjectArrayView field={field} ctx={ctx} readOnly={readOnly} />;\n }\n }\n const items = Array.isArray(field.value) ? field.value : [];\n const itemSchema = field.itemSchema ?? { type: \"string\" };\n const childCtx: RenderContext = { ...ctx, readOnly, depth: ctx.depth + 1 };\n\n return (\n <div\n className={cn(\n \"flex flex-col\",\n !ctx.presentation && \"rounded-md border border-input p-2\",\n fieldInnerGapClass[ctx.size],\n )}\n >\n {items.map((item, i) => (\n <div\n key={i}\n className={cn(\n \"grid items-start gap-2\",\n readOnly ? \"grid-cols-1\" : \"grid-cols-[1fr_auto]\",\n )}\n >\n {/* The item's row is a FieldWrapper (or a full-width ObjectSection),\n both of which are grid children of a FieldsGrid — inline mode's\n `grid-cols-subgrid` resolves to `none` without one, collapsing\n every item into a stacked column while the rest of the form stays\n aligned. Fixed at one column: an item is a single row, and any\n multi-column layout belongs to the item's own object body. */}\n <FieldsGrid\n layout={ctx.layout}\n size={ctx.size}\n columns={1}\n className=\"min-w-0\"\n >\n {ctx.render.renderFieldRow(\n {\n key: `${field.key}[${i}]`,\n prop: itemSchema,\n required: false,\n value: item,\n onChange: (next) => field.onChange(setIndex(items, i, next)),\n instancePath: appendInstancePath(ctx.instancePath, i),\n },\n childCtx,\n { labelOverride: `Item ${i + 1}` },\n )}\n </FieldsGrid>\n {!readOnly && (\n <ItemActions\n label={`item ${i + 1}`}\n index={i}\n count={items.length}\n size={ctx.size}\n reveal={false}\n onMove={(to) => field.onChange(moveItem(items, i, to))}\n {...(canRemoveItem(field, items.length)\n ? { onRemove: () => field.onChange(removeIndex(items, i)) }\n : {})}\n />\n )}\n </div>\n ))}\n {!readOnly && canAddItem(field, items.length) && (\n <Button\n type=\"button\"\n variant=\"outline\"\n className={cn(\"gap-1.5\", inputSizeClass[ctx.size])}\n onClick={() => field.onChange([...items, seedFromSchema(itemSchema)])}\n >\n <Icon icon={UiAdd} className=\"text-sm\" />\n Add item\n </Button>\n )}\n </div>\n );\n}\n\n// The choices an array of enum items offers, deduped by value. Prefers the\n// resolved `options` (they carry the schema's labels, icons and tones) and falls\n// back to the raw item `enum` for a field a pre-extension built by hand.\nfunction enumItemOptions(field: FieldControl): FieldOption[] {\n const rawOptions =\n field.options ??\n (Array.isArray(field.itemSchema?.enum)\n ? field.itemSchema.enum.map((value) => ({\n value: String(value),\n label: String(value),\n }))\n : []);\n const seen = new Set<string>();\n return rawOptions.filter((option) => {\n if (seen.has(option.value)) return false;\n seen.add(option.value);\n return true;\n });\n}\n\nfunction FilterPillArray({\n field,\n fieldId,\n readOnly,\n size,\n}: {\n field: FieldControl;\n fieldId: string;\n readOnly: boolean;\n size: FormSize;\n}) {\n const options = enumItemOptions(field);\n const validValues = new Set(options.map((option) => option.value));\n const explicitValues = toStringArray(field.value).filter((value) =>\n validValues.has(value),\n );\n const implicitAll = explicitValues.length === 0;\n const selected = new Set(\n implicitAll ? options.map((option) => option.value) : explicitValues,\n );\n\n function commit(nextSelected: Set<string>) {\n const next = options\n .map((option) => option.value)\n .filter((value) => nextSelected.has(value));\n field.onChange(next.length === options.length ? [] : next);\n }\n\n function toggle(value: string) {\n if (readOnly) return;\n const next = new Set(selected);\n if (next.has(value)) {\n next.delete(value);\n } else {\n next.add(value);\n }\n commit(next);\n }\n\n return (\n <div\n id={fieldId}\n data-jsf-input\n role=\"group\"\n aria-label={field.label}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent px-2 py-1 shadow-sm\",\n controlMinHeightClass[size],\n )}\n >\n {options.map((option) => (\n <FilterPill\n key={option.value}\n label={option.label}\n mode={selected.has(option.value) ? \"active\" : \"neutral\"}\n title={\n implicitAll ? `${option.label} enabled by default` : option.label\n }\n {...(!readOnly ? { onClick: () => toggle(option.value) } : {})}\n className=\"max-w-full\"\n />\n ))}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAmCA,MAAM,iBAAiB,CAAC,GAAG;AAQpB,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACF,GAIG;AAKD,QAAM,WAAW,IAAI,YAAY,MAAM,aAAa;AACpD,QAAM,UAAU,gBAAgB,KAAK;AACrC,QAAM,aAAa,gBAAgB,MAAM,UAAU;AACnD,MAAI,MAAM,iBAAiB,QAAQ;AACjC,QAAI,eAAe,UAAU;AAC3B,YAAM,IAAI;AAAA,QACR,GAAG,MAAM,GAAG;AAAA,MAAA;AAAA,IAEhB;AACA,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,cAAc,IAAI,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EAGzC;AACA,MAAI,MAAM,iBAAiB,kBAAkB,QAAQ,SAAS,GAAG;AAC/D,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,MAAM,IAAI;AAAA,MAAA;AAAA,IAAA;AAAA,EAGhB;AAKA,MAAI,MAAM,iBAAiB,aAAa,QAAQ,SAAS,GAAG;AAC1D,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,MAAM,IAAI;AAAA,QACV,SAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAGf;AAIA,MAAI,MAAM,iBAAiB,aAAa,YAAY;AAClD,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,MAAM,IAAI;AAAA,QACV,SAAS,CAAA;AAAA,QACT,UAAU;AAAA,QACV,YAAY;AAAA,MAAA;AAAA,IAAA;AAAA,EAGlB;AACA,MAAI,wBAAwB,MAAM,UAAU,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A,UAE7D,GAAI,CAAC,WAAW,EAAE,SAAS,MAAM,OAAO,OAAO,KAAK,EAAA,IAAM,CAAA;AAAA,UAC3D,WAAU;AAAA,QAAA;AAAA,QAPL,OAAO;AAAA,MAAA,CASf;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -1,4 +1,4 @@
1
- import { FieldControl, RenderContext } from './json-schema-form-types';
1
+ import { FieldControl, RenderContext } from './json-schema-form-types.js';
2
2
  export declare function CardsArray({ field, ctx, readOnly, }: {
3
3
  field: FieldControl;
4
4
  ctx: RenderContext;
@@ -1,4 +1,4 @@
1
- import { JsonSchemaObject } from './json-schema-form-types';
1
+ import { JsonSchemaObject } from './json-schema-form-types.js';
2
2
  export declare const collectionLayoutsSchema: JsonSchemaObject;
3
3
  export declare const collectionLayoutsValue: {
4
4
  table: {
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const collections = require("../lib/collections.cjs");
4
+ function evaluatePredicate(sub, value) {
5
+ let decided = false;
6
+ let holds = true;
7
+ if ("const" in sub) {
8
+ decided = true;
9
+ if (value !== sub.const) holds = false;
10
+ }
11
+ if (sub.enum !== void 0) {
12
+ decided = true;
13
+ if (!sub.enum.some((option) => option === value)) holds = false;
14
+ }
15
+ if (sub.not !== void 0) {
16
+ const inner = evaluatePredicate(sub.not, value);
17
+ if (inner === void 0) return void 0;
18
+ decided = true;
19
+ if (inner) holds = false;
20
+ }
21
+ if (sub.properties !== void 0 || sub.required !== void 0) {
22
+ decided = true;
23
+ if (!collections.isPlainObject(value) || !matchesIf(sub, value)) {
24
+ holds = false;
25
+ }
26
+ }
27
+ return decided ? holds : void 0;
28
+ }
29
+ function matchesIf(ifSchema, value) {
30
+ if (!ifSchema) return false;
31
+ for (const k of ifSchema.required ?? []) {
32
+ if (!(k in value)) return false;
33
+ }
34
+ for (const [k, sub] of Object.entries(ifSchema.properties ?? {})) {
35
+ if (evaluatePredicate(sub, value[k]) !== true) return false;
36
+ }
37
+ return true;
38
+ }
39
+ function mergeBranch(branch, properties, required) {
40
+ if (!branch) return;
41
+ for (const [k, sub] of Object.entries(branch.properties ?? {})) {
42
+ properties[k] = sub;
43
+ }
44
+ for (const k of branch.required ?? []) required.add(k);
45
+ }
46
+ function effectiveProperties(schema, value) {
47
+ const properties = {
48
+ ...schema.properties
49
+ };
50
+ const required = new Set(schema.required ?? []);
51
+ for (const clause of schema.allOf ?? []) {
52
+ if (clause.if === void 0 && clause.then === void 0) {
53
+ mergeBranch(clause, properties, required);
54
+ continue;
55
+ }
56
+ mergeBranch(
57
+ matchesIf(clause.if, value) ? clause.then : clause.else,
58
+ properties,
59
+ required
60
+ );
61
+ }
62
+ return { properties, required: [...required] };
63
+ }
64
+ exports.effectiveProperties = effectiveProperties;
65
+ exports.evaluatePredicate = evaluatePredicate;
66
+ exports.matchesIf = matchesIf;
67
+ //# sourceMappingURL=json-schema-form-conditionals.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema-form-conditionals.cjs","sources":["../../src/components/json-schema-form-conditionals.ts"],"sourcesContent":["import { isPlainObject } from \"../lib/collections\";\nimport type { JsonSchemaObject, JsonSchemaProperty } from \"./json-schema-form-types\";\n\n// evaluatePredicate answers whether one `if.properties[k]` sub-schema holds for\n// the value at that key, or `undefined` when the sub-schema states nothing this\n// form knows how to check. The tri-state is what lets the caller fail closed:\n// \"cannot tell\" is never silently promoted to \"matches\".\n//\n// Recognised: `const`, `enum`, `not` (negating any of these), and a nested\n// `properties`/`required` object sub-schema, evaluated recursively against the\n// value at that key. Every recognised keyword present must hold.\n//\n// The value is read positionally — an absent key evaluates as `undefined`, so\n// `const` rejects it. State presence requirements in `if.required` rather than\n// relying on a predicate to imply them.\nexport function evaluatePredicate(\n sub: JsonSchemaProperty,\n value: unknown,\n): boolean | undefined {\n let decided = false;\n let holds = true;\n\n if (\"const\" in sub) {\n decided = true;\n if (value !== sub.const) holds = false;\n }\n if (sub.enum !== undefined) {\n decided = true;\n if (!sub.enum.some((option) => option === value)) holds = false;\n }\n if (sub.not !== undefined) {\n // A negation of something unevaluatable is itself unevaluatable.\n const inner = evaluatePredicate(sub.not, value);\n if (inner === undefined) return undefined;\n decided = true;\n if (inner) holds = false;\n }\n if (sub.properties !== undefined || sub.required !== undefined) {\n decided = true;\n if (!isPlainObject(value) || !matchesIf(sub, value as Record<string, unknown>)) {\n holds = false;\n }\n }\n\n return decided ? holds : undefined;\n}\n\n// matchesIf reports whether the `if` sub-schema holds for the current value:\n// every `if.required` key is present AND every `if.properties[k]` predicate\n// holds for `value[k]`.\n//\n// A predicate this form cannot evaluate (a bare `type`, a `pattern`, a numeric\n// bound) makes the whole `if` false, never true. Merging a `then` branch the\n// form could not verify would put fields in front of the user that the schema\n// never asked for, so an unreadable condition fails closed.\nexport function matchesIf(\n ifSchema: JsonSchemaProperty | undefined,\n value: Record<string, unknown>,\n): boolean {\n if (!ifSchema) return false;\n for (const k of ifSchema.required ?? []) {\n if (!(k in value)) return false;\n }\n for (const [k, sub] of Object.entries(ifSchema.properties ?? {})) {\n if (evaluatePredicate(sub, value[k]) !== true) return false;\n }\n return true;\n}\n\nexport interface EffectiveProperties {\n properties: Record<string, JsonSchemaProperty>;\n required: string[];\n}\n\nfunction mergeBranch(\n branch: Pick<JsonSchemaProperty, \"properties\" | \"required\"> | undefined,\n properties: Record<string, JsonSchemaProperty>,\n required: Set<string>,\n): void {\n if (!branch) return;\n for (const [k, sub] of Object.entries(branch.properties ?? {})) {\n properties[k] = sub;\n }\n for (const k of branch.required ?? []) required.add(k);\n}\n\n// effectiveProperties merges the schema's base `properties` with each `allOf`\n// member's contribution. An `if`/`then` member contributes `then.properties`\n// when its `if` matches the current value and `else.properties` when it does\n// not; an unconditional member (e.g. an inlined `$ref` composition, which\n// carries its own `properties` and no `if`) always contributes. Later members\n// win on key collision; required is the union. A branch REPLACES a property\n// wholesale rather than deep-merging it, so a branch that re-declares a field\n// also re-declares its keywords (`readOnly`, `x-hidden`, …). Pure and\n// idempotent.\nexport function effectiveProperties(\n schema: JsonSchemaObject,\n value: Record<string, unknown>,\n): EffectiveProperties {\n const properties: Record<string, JsonSchemaProperty> = {\n ...schema.properties,\n };\n const required = new Set(schema.required ?? []);\n for (const clause of schema.allOf ?? []) {\n // Unconditional composition member: merge its own properties/required.\n if (clause.if === undefined && clause.then === undefined) {\n mergeBranch(clause, properties, required);\n continue;\n }\n mergeBranch(\n matchesIf(clause.if, value) ? clause.then : clause.else,\n properties,\n required,\n );\n }\n return { properties, required: [...required] };\n}\n"],"names":["isPlainObject"],"mappings":";;;AAeO,SAAS,kBACd,KACA,OACqB;AACrB,MAAI,UAAU;AACd,MAAI,QAAQ;AAEZ,MAAI,WAAW,KAAK;AAClB,cAAU;AACV,QAAI,UAAU,IAAI,MAAO,SAAQ;AAAA,EACnC;AACA,MAAI,IAAI,SAAS,QAAW;AAC1B,cAAU;AACV,QAAI,CAAC,IAAI,KAAK,KAAK,CAAC,WAAW,WAAW,KAAK,EAAG,SAAQ;AAAA,EAC5D;AACA,MAAI,IAAI,QAAQ,QAAW;AAEzB,UAAM,QAAQ,kBAAkB,IAAI,KAAK,KAAK;AAC9C,QAAI,UAAU,OAAW,QAAO;AAChC,cAAU;AACV,QAAI,MAAO,SAAQ;AAAA,EACrB;AACA,MAAI,IAAI,eAAe,UAAa,IAAI,aAAa,QAAW;AAC9D,cAAU;AACV,QAAI,CAACA,YAAAA,cAAc,KAAK,KAAK,CAAC,UAAU,KAAK,KAAgC,GAAG;AAC9E,cAAQ;AAAA,IACV;AAAA,EACF;AAEA,SAAO,UAAU,QAAQ;AAC3B;AAUO,SAAS,UACd,UACA,OACS;AACT,MAAI,CAAC,SAAU,QAAO;AACtB,aAAW,KAAK,SAAS,YAAY,CAAA,GAAI;AACvC,QAAI,EAAE,KAAK,OAAQ,QAAO;AAAA,EAC5B;AACA,aAAW,CAAC,GAAG,GAAG,KAAK,OAAO,QAAQ,SAAS,cAAc,CAAA,CAAE,GAAG;AAChE,QAAI,kBAAkB,KAAK,MAAM,CAAC,CAAC,MAAM,KAAM,QAAO;AAAA,EACxD;AACA,SAAO;AACT;AAOA,SAAS,YACP,QACA,YACA,UACM;AACN,MAAI,CAAC,OAAQ;AACb,aAAW,CAAC,GAAG,GAAG,KAAK,OAAO,QAAQ,OAAO,cAAc,CAAA,CAAE,GAAG;AAC9D,eAAW,CAAC,IAAI;AAAA,EAClB;AACA,aAAW,KAAK,OAAO,YAAY,CAAA,EAAI,UAAS,IAAI,CAAC;AACvD;AAWO,SAAS,oBACd,QACA,OACqB;AACrB,QAAM,aAAiD;AAAA,IACrD,GAAG,OAAO;AAAA,EAAA;AAEZ,QAAM,WAAW,IAAI,IAAI,OAAO,YAAY,CAAA,CAAE;AAC9C,aAAW,UAAU,OAAO,SAAS,CAAA,GAAI;AAEvC,QAAI,OAAO,OAAO,UAAa,OAAO,SAAS,QAAW;AACxD,kBAAY,QAAQ,YAAY,QAAQ;AACxC;AAAA,IACF;AACA;AAAA,MACE,UAAU,OAAO,IAAI,KAAK,IAAI,OAAO,OAAO,OAAO;AAAA,MACnD;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AACA,SAAO,EAAE,YAAY,UAAU,CAAC,GAAG,QAAQ,EAAA;AAC7C;;;;"}
@@ -0,0 +1,9 @@
1
+ import { JsonSchemaObject, JsonSchemaProperty } from './json-schema-form-types.js';
2
+ export declare function evaluatePredicate(sub: JsonSchemaProperty, value: unknown): boolean | undefined;
3
+ export declare function matchesIf(ifSchema: JsonSchemaProperty | undefined, value: Record<string, unknown>): boolean;
4
+ export interface EffectiveProperties {
5
+ properties: Record<string, JsonSchemaProperty>;
6
+ required: string[];
7
+ }
8
+ export declare function effectiveProperties(schema: JsonSchemaObject, value: Record<string, unknown>): EffectiveProperties;
9
+ //# sourceMappingURL=json-schema-form-conditionals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema-form-conditionals.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-conditionals.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAcrF,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,kBAAkB,EACvB,KAAK,EAAE,OAAO,GACb,OAAO,GAAG,SAAS,CA2BrB;AAUD,wBAAgB,SAAS,CACvB,QAAQ,EAAE,kBAAkB,GAAG,SAAS,EACxC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAST;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC/C,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAuBD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,mBAAmB,CAkBrB"}
@@ -0,0 +1,67 @@
1
+ import { isPlainObject } from "../lib/collections.js";
2
+ function evaluatePredicate(sub, value) {
3
+ let decided = false;
4
+ let holds = true;
5
+ if ("const" in sub) {
6
+ decided = true;
7
+ if (value !== sub.const) holds = false;
8
+ }
9
+ if (sub.enum !== void 0) {
10
+ decided = true;
11
+ if (!sub.enum.some((option) => option === value)) holds = false;
12
+ }
13
+ if (sub.not !== void 0) {
14
+ const inner = evaluatePredicate(sub.not, value);
15
+ if (inner === void 0) return void 0;
16
+ decided = true;
17
+ if (inner) holds = false;
18
+ }
19
+ if (sub.properties !== void 0 || sub.required !== void 0) {
20
+ decided = true;
21
+ if (!isPlainObject(value) || !matchesIf(sub, value)) {
22
+ holds = false;
23
+ }
24
+ }
25
+ return decided ? holds : void 0;
26
+ }
27
+ function matchesIf(ifSchema, value) {
28
+ if (!ifSchema) return false;
29
+ for (const k of ifSchema.required ?? []) {
30
+ if (!(k in value)) return false;
31
+ }
32
+ for (const [k, sub] of Object.entries(ifSchema.properties ?? {})) {
33
+ if (evaluatePredicate(sub, value[k]) !== true) return false;
34
+ }
35
+ return true;
36
+ }
37
+ function mergeBranch(branch, properties, required) {
38
+ if (!branch) return;
39
+ for (const [k, sub] of Object.entries(branch.properties ?? {})) {
40
+ properties[k] = sub;
41
+ }
42
+ for (const k of branch.required ?? []) required.add(k);
43
+ }
44
+ function effectiveProperties(schema, value) {
45
+ const properties = {
46
+ ...schema.properties
47
+ };
48
+ const required = new Set(schema.required ?? []);
49
+ for (const clause of schema.allOf ?? []) {
50
+ if (clause.if === void 0 && clause.then === void 0) {
51
+ mergeBranch(clause, properties, required);
52
+ continue;
53
+ }
54
+ mergeBranch(
55
+ matchesIf(clause.if, value) ? clause.then : clause.else,
56
+ properties,
57
+ required
58
+ );
59
+ }
60
+ return { properties, required: [...required] };
61
+ }
62
+ export {
63
+ effectiveProperties,
64
+ evaluatePredicate,
65
+ matchesIf
66
+ };
67
+ //# sourceMappingURL=json-schema-form-conditionals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema-form-conditionals.js","sources":["../../src/components/json-schema-form-conditionals.ts"],"sourcesContent":["import { isPlainObject } from \"../lib/collections\";\nimport type { JsonSchemaObject, JsonSchemaProperty } from \"./json-schema-form-types\";\n\n// evaluatePredicate answers whether one `if.properties[k]` sub-schema holds for\n// the value at that key, or `undefined` when the sub-schema states nothing this\n// form knows how to check. The tri-state is what lets the caller fail closed:\n// \"cannot tell\" is never silently promoted to \"matches\".\n//\n// Recognised: `const`, `enum`, `not` (negating any of these), and a nested\n// `properties`/`required` object sub-schema, evaluated recursively against the\n// value at that key. Every recognised keyword present must hold.\n//\n// The value is read positionally — an absent key evaluates as `undefined`, so\n// `const` rejects it. State presence requirements in `if.required` rather than\n// relying on a predicate to imply them.\nexport function evaluatePredicate(\n sub: JsonSchemaProperty,\n value: unknown,\n): boolean | undefined {\n let decided = false;\n let holds = true;\n\n if (\"const\" in sub) {\n decided = true;\n if (value !== sub.const) holds = false;\n }\n if (sub.enum !== undefined) {\n decided = true;\n if (!sub.enum.some((option) => option === value)) holds = false;\n }\n if (sub.not !== undefined) {\n // A negation of something unevaluatable is itself unevaluatable.\n const inner = evaluatePredicate(sub.not, value);\n if (inner === undefined) return undefined;\n decided = true;\n if (inner) holds = false;\n }\n if (sub.properties !== undefined || sub.required !== undefined) {\n decided = true;\n if (!isPlainObject(value) || !matchesIf(sub, value as Record<string, unknown>)) {\n holds = false;\n }\n }\n\n return decided ? holds : undefined;\n}\n\n// matchesIf reports whether the `if` sub-schema holds for the current value:\n// every `if.required` key is present AND every `if.properties[k]` predicate\n// holds for `value[k]`.\n//\n// A predicate this form cannot evaluate (a bare `type`, a `pattern`, a numeric\n// bound) makes the whole `if` false, never true. Merging a `then` branch the\n// form could not verify would put fields in front of the user that the schema\n// never asked for, so an unreadable condition fails closed.\nexport function matchesIf(\n ifSchema: JsonSchemaProperty | undefined,\n value: Record<string, unknown>,\n): boolean {\n if (!ifSchema) return false;\n for (const k of ifSchema.required ?? []) {\n if (!(k in value)) return false;\n }\n for (const [k, sub] of Object.entries(ifSchema.properties ?? {})) {\n if (evaluatePredicate(sub, value[k]) !== true) return false;\n }\n return true;\n}\n\nexport interface EffectiveProperties {\n properties: Record<string, JsonSchemaProperty>;\n required: string[];\n}\n\nfunction mergeBranch(\n branch: Pick<JsonSchemaProperty, \"properties\" | \"required\"> | undefined,\n properties: Record<string, JsonSchemaProperty>,\n required: Set<string>,\n): void {\n if (!branch) return;\n for (const [k, sub] of Object.entries(branch.properties ?? {})) {\n properties[k] = sub;\n }\n for (const k of branch.required ?? []) required.add(k);\n}\n\n// effectiveProperties merges the schema's base `properties` with each `allOf`\n// member's contribution. An `if`/`then` member contributes `then.properties`\n// when its `if` matches the current value and `else.properties` when it does\n// not; an unconditional member (e.g. an inlined `$ref` composition, which\n// carries its own `properties` and no `if`) always contributes. Later members\n// win on key collision; required is the union. A branch REPLACES a property\n// wholesale rather than deep-merging it, so a branch that re-declares a field\n// also re-declares its keywords (`readOnly`, `x-hidden`, …). Pure and\n// idempotent.\nexport function effectiveProperties(\n schema: JsonSchemaObject,\n value: Record<string, unknown>,\n): EffectiveProperties {\n const properties: Record<string, JsonSchemaProperty> = {\n ...schema.properties,\n };\n const required = new Set(schema.required ?? []);\n for (const clause of schema.allOf ?? []) {\n // Unconditional composition member: merge its own properties/required.\n if (clause.if === undefined && clause.then === undefined) {\n mergeBranch(clause, properties, required);\n continue;\n }\n mergeBranch(\n matchesIf(clause.if, value) ? clause.then : clause.else,\n properties,\n required,\n );\n }\n return { properties, required: [...required] };\n}\n"],"names":[],"mappings":";AAeO,SAAS,kBACd,KACA,OACqB;AACrB,MAAI,UAAU;AACd,MAAI,QAAQ;AAEZ,MAAI,WAAW,KAAK;AAClB,cAAU;AACV,QAAI,UAAU,IAAI,MAAO,SAAQ;AAAA,EACnC;AACA,MAAI,IAAI,SAAS,QAAW;AAC1B,cAAU;AACV,QAAI,CAAC,IAAI,KAAK,KAAK,CAAC,WAAW,WAAW,KAAK,EAAG,SAAQ;AAAA,EAC5D;AACA,MAAI,IAAI,QAAQ,QAAW;AAEzB,UAAM,QAAQ,kBAAkB,IAAI,KAAK,KAAK;AAC9C,QAAI,UAAU,OAAW,QAAO;AAChC,cAAU;AACV,QAAI,MAAO,SAAQ;AAAA,EACrB;AACA,MAAI,IAAI,eAAe,UAAa,IAAI,aAAa,QAAW;AAC9D,cAAU;AACV,QAAI,CAAC,cAAc,KAAK,KAAK,CAAC,UAAU,KAAK,KAAgC,GAAG;AAC9E,cAAQ;AAAA,IACV;AAAA,EACF;AAEA,SAAO,UAAU,QAAQ;AAC3B;AAUO,SAAS,UACd,UACA,OACS;AACT,MAAI,CAAC,SAAU,QAAO;AACtB,aAAW,KAAK,SAAS,YAAY,CAAA,GAAI;AACvC,QAAI,EAAE,KAAK,OAAQ,QAAO;AAAA,EAC5B;AACA,aAAW,CAAC,GAAG,GAAG,KAAK,OAAO,QAAQ,SAAS,cAAc,CAAA,CAAE,GAAG;AAChE,QAAI,kBAAkB,KAAK,MAAM,CAAC,CAAC,MAAM,KAAM,QAAO;AAAA,EACxD;AACA,SAAO;AACT;AAOA,SAAS,YACP,QACA,YACA,UACM;AACN,MAAI,CAAC,OAAQ;AACb,aAAW,CAAC,GAAG,GAAG,KAAK,OAAO,QAAQ,OAAO,cAAc,CAAA,CAAE,GAAG;AAC9D,eAAW,CAAC,IAAI;AAAA,EAClB;AACA,aAAW,KAAK,OAAO,YAAY,CAAA,EAAI,UAAS,IAAI,CAAC;AACvD;AAWO,SAAS,oBACd,QACA,OACqB;AACrB,QAAM,aAAiD;AAAA,IACrD,GAAG,OAAO;AAAA,EAAA;AAEZ,QAAM,WAAW,IAAI,IAAI,OAAO,YAAY,CAAA,CAAE;AAC9C,aAAW,UAAU,OAAO,SAAS,CAAA,GAAI;AAEvC,QAAI,OAAO,OAAO,UAAa,OAAO,SAAS,QAAW;AACxD,kBAAY,QAAQ,YAAY,QAAQ;AACxC;AAAA,IACF;AACA;AAAA,MACE,UAAU,OAAO,IAAI,KAAK,IAAI,OAAO,OAAO,OAAO;AAAA,MACnD;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AACA,SAAO,EAAE,YAAY,UAAU,CAAC,GAAG,QAAQ,EAAA;AAC7C;"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const collections = require("../lib/collections.cjs");
4
+ const jsonSchemaFormConditionals = require("./json-schema-form-conditionals.cjs");
5
+ const jsonSchemaFormResolve = require("./json-schema-form-resolve.cjs");
6
+ function applySchemaDefaults(schema, value) {
7
+ return applyObjectDefaults(schema, value, /* @__PURE__ */ new Set());
8
+ }
9
+ function applyObjectDefaults(schema, value, ancestors) {
10
+ var _a;
11
+ if (ancestors.has(schema)) return value;
12
+ const nextAncestors = new Set(ancestors).add(schema);
13
+ let next = value;
14
+ const maxPasses = Math.min(
15
+ 100,
16
+ Object.keys(schema.properties ?? {}).length + (((_a = schema.allOf) == null ? void 0 : _a.length) ?? 0) + 2
17
+ );
18
+ for (let pass = 0; pass < maxPasses; pass += 1) {
19
+ const { properties } = jsonSchemaFormConditionals.effectiveProperties(schema, next);
20
+ let passChanged = false;
21
+ let passValue = next;
22
+ for (const [key, propertySchema] of Object.entries(properties)) {
23
+ const existing = passValue[key];
24
+ let fieldValue = existing;
25
+ let fieldChanged = false;
26
+ if (existing === void 0 && propertySchema.default !== void 0) {
27
+ fieldValue = cloneSchemaDefault(propertySchema.default);
28
+ fieldChanged = true;
29
+ }
30
+ const structuredObject = jsonSchemaFormResolve.schemaRendersAsObject(propertySchema);
31
+ if (structuredObject && !jsonSchemaFormResolve.isOpenStringMap(propertySchema)) {
32
+ const objectValue = collections.isPlainObject(fieldValue) ? fieldValue : {};
33
+ const defaultedObject = applyObjectDefaults(
34
+ propertySchema,
35
+ objectValue,
36
+ nextAncestors
37
+ );
38
+ if (defaultedObject !== objectValue) {
39
+ fieldValue = defaultedObject;
40
+ fieldChanged = true;
41
+ }
42
+ }
43
+ if (fieldChanged) {
44
+ if (!passChanged) passValue = { ...next };
45
+ passValue[key] = fieldValue;
46
+ passChanged = true;
47
+ }
48
+ }
49
+ if (!passChanged) break;
50
+ next = passValue;
51
+ }
52
+ return next;
53
+ }
54
+ function cloneSchemaDefault(value) {
55
+ if (Array.isArray(value)) return value.map(cloneSchemaDefault);
56
+ if (collections.isPlainObject(value)) {
57
+ return Object.fromEntries(
58
+ Object.entries(value).map(([key, entry]) => [
59
+ key,
60
+ cloneSchemaDefault(entry)
61
+ ])
62
+ );
63
+ }
64
+ return value;
65
+ }
66
+ exports.applySchemaDefaults = applySchemaDefaults;
67
+ exports.cloneSchemaDefault = cloneSchemaDefault;
68
+ //# sourceMappingURL=json-schema-form-defaults.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema-form-defaults.cjs","sources":["../../src/components/json-schema-form-defaults.ts"],"sourcesContent":["import { isPlainObject } from \"../lib/collections\";\nimport type { JsonSchemaObject } from \"./json-schema-form-types\";\nimport { effectiveProperties } from \"./json-schema-form-conditionals\";\nimport { isOpenStringMap, schemaRendersAsObject } from \"./json-schema-form-resolve\";\n\n// applySchemaDefaults fills missing values from JSON Schema `default` keywords.\n// It walks fixed object properties recursively and re-evaluates `if`/`then`\n// branches after each pass, so a defaulted discriminator can activate defaults\n// in its selected branch. Existing values, including null and empty strings, are\n// never replaced. The original value is returned when no defaults apply.\nexport function applySchemaDefaults(\n schema: JsonSchemaObject,\n value: Record<string, unknown>,\n): Record<string, unknown> {\n return applyObjectDefaults(schema, value, new Set());\n}\n\nfunction applyObjectDefaults(\n schema: JsonSchemaObject,\n value: Record<string, unknown>,\n ancestors: Set<JsonSchemaObject>,\n): Record<string, unknown> {\n // Recursive schemas may point back to an ancestor after refs are hydrated.\n if (ancestors.has(schema)) return value;\n const nextAncestors = new Set(ancestors).add(schema);\n let next = value;\n\n // A default can select another conditional branch, so allow enough passes for\n // a chain of discriminator defaults while keeping malformed schemas bounded.\n const maxPasses = Math.min(\n 100,\n Object.keys(schema.properties ?? {}).length +\n (schema.allOf?.length ?? 0) +\n 2,\n );\n for (let pass = 0; pass < maxPasses; pass += 1) {\n const { properties } = effectiveProperties(schema, next);\n let passChanged = false;\n let passValue = next;\n\n for (const [key, propertySchema] of Object.entries(properties)) {\n const existing = passValue[key];\n let fieldValue = existing;\n let fieldChanged = false;\n\n if (existing === undefined && propertySchema.default !== undefined) {\n fieldValue = cloneSchemaDefault(propertySchema.default);\n fieldChanged = true;\n }\n\n const structuredObject = schemaRendersAsObject(propertySchema);\n if (structuredObject && !isOpenStringMap(propertySchema)) {\n const objectValue = isPlainObject(fieldValue)\n ? (fieldValue as Record<string, unknown>)\n : {};\n const defaultedObject = applyObjectDefaults(\n propertySchema as JsonSchemaObject,\n objectValue,\n nextAncestors,\n );\n if (defaultedObject !== objectValue) {\n fieldValue = defaultedObject;\n fieldChanged = true;\n }\n }\n\n if (fieldChanged) {\n if (!passChanged) passValue = { ...next };\n passValue[key] = fieldValue;\n passChanged = true;\n }\n }\n\n if (!passChanged) break;\n next = passValue;\n }\n return next;\n}\n\nexport function cloneSchemaDefault(value: unknown): unknown {\n if (Array.isArray(value)) return value.map(cloneSchemaDefault);\n if (isPlainObject(value)) {\n return Object.fromEntries(\n Object.entries(value as Record<string, unknown>).map(([key, entry]) => [\n key,\n cloneSchemaDefault(entry),\n ]),\n );\n }\n return value;\n}\n"],"names":["effectiveProperties","schemaRendersAsObject","isOpenStringMap","isPlainObject"],"mappings":";;;;;AAUO,SAAS,oBACd,QACA,OACyB;AACzB,SAAO,oBAAoB,QAAQ,OAAO,oBAAI,KAAK;AACrD;AAEA,SAAS,oBACP,QACA,OACA,WACyB;;AAEzB,MAAI,UAAU,IAAI,MAAM,EAAG,QAAO;AAClC,QAAM,gBAAgB,IAAI,IAAI,SAAS,EAAE,IAAI,MAAM;AACnD,MAAI,OAAO;AAIX,QAAM,YAAY,KAAK;AAAA,IACrB;AAAA,IACA,OAAO,KAAK,OAAO,cAAc,CAAA,CAAE,EAAE,YAClC,YAAO,UAAP,mBAAc,WAAU,KACzB;AAAA,EAAA;AAEJ,WAAS,OAAO,GAAG,OAAO,WAAW,QAAQ,GAAG;AAC9C,UAAM,EAAE,WAAA,IAAeA,+CAAoB,QAAQ,IAAI;AACvD,QAAI,cAAc;AAClB,QAAI,YAAY;AAEhB,eAAW,CAAC,KAAK,cAAc,KAAK,OAAO,QAAQ,UAAU,GAAG;AAC9D,YAAM,WAAW,UAAU,GAAG;AAC9B,UAAI,aAAa;AACjB,UAAI,eAAe;AAEnB,UAAI,aAAa,UAAa,eAAe,YAAY,QAAW;AAClE,qBAAa,mBAAmB,eAAe,OAAO;AACtD,uBAAe;AAAA,MACjB;AAEA,YAAM,mBAAmBC,sBAAAA,sBAAsB,cAAc;AAC7D,UAAI,oBAAoB,CAACC,sCAAgB,cAAc,GAAG;AACxD,cAAM,cAAcC,YAAAA,cAAc,UAAU,IACvC,aACD,CAAA;AACJ,cAAM,kBAA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