@flanksource/clicky-ui 0.3.34 → 0.3.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (680) hide show
  1. package/README.md +4 -0
  2. package/dist/ai.cjs +3 -0
  3. package/dist/ai.cjs.map +1 -1
  4. package/dist/ai.js +3 -0
  5. package/dist/ai.js.map +1 -1
  6. package/dist/comments/CommentCard.d.ts +1 -1
  7. package/dist/comments/CommentProvider.d.ts +1 -1
  8. package/dist/comments/CommentThread.d.ts +1 -1
  9. package/dist/comments/CommentThreadList.d.ts +1 -1
  10. package/dist/comments/MentionTextarea.d.ts +1 -1
  11. package/dist/comments/comment-context.d.ts +4 -4
  12. package/dist/comments/comment-fixtures.d.ts +1 -1
  13. package/dist/comments/comment-types.d.ts +1 -1
  14. package/dist/components/AccordionList.d.ts +1 -1
  15. package/dist/components/ComboboxControl.d.ts +1 -1
  16. package/dist/components/ComboboxMenu.d.ts +2 -2
  17. package/dist/components/ComboboxTags.cjs +41 -11
  18. package/dist/components/ComboboxTags.cjs.map +1 -1
  19. package/dist/components/ComboboxTags.d.ts +6 -0
  20. package/dist/components/ComboboxTags.d.ts.map +1 -1
  21. package/dist/components/ComboboxTags.js +41 -11
  22. package/dist/components/ComboboxTags.js.map +1 -1
  23. package/dist/components/DateField.d.ts +3 -3
  24. package/dist/components/DatePicker.d.ts +3 -3
  25. package/dist/components/DateTimePicker.d.ts +3 -3
  26. package/dist/components/ErrorWrapper.d.ts +2 -2
  27. package/dist/components/Field.d.ts +1 -1
  28. package/dist/components/FilterBar.d.ts +1 -1
  29. package/dist/components/FormLookupProvider.d.ts +1 -1
  30. package/dist/components/FormatOptionsDropdown.d.ts +1 -1
  31. package/dist/components/IconButton.d.ts +3 -3
  32. package/dist/components/InputField.d.ts +2 -2
  33. package/dist/components/ItemActions.d.ts +1 -1
  34. package/dist/components/JsonSchemaForm.cjs +17 -36
  35. package/dist/components/JsonSchemaForm.cjs.map +1 -1
  36. package/dist/components/JsonSchemaForm.d.ts +1 -1
  37. package/dist/components/JsonSchemaForm.d.ts.map +1 -1
  38. package/dist/components/JsonSchemaForm.js +17 -36
  39. package/dist/components/JsonSchemaForm.js.map +1 -1
  40. package/dist/components/ListMenu.d.ts +1 -1
  41. package/dist/components/MultiSelect.d.ts +1 -1
  42. package/dist/components/SearchInput.d.ts +1 -1
  43. package/dist/components/SegmentedControl.d.ts +1 -1
  44. package/dist/components/SplitButton.d.ts +1 -1
  45. package/dist/components/Switch.d.ts +1 -1
  46. package/dist/components/TreePickerField.cjs +11 -2
  47. package/dist/components/TreePickerField.cjs.map +1 -1
  48. package/dist/components/TreePickerField.d.ts +13 -4
  49. package/dist/components/TreePickerField.d.ts.map +1 -1
  50. package/dist/components/TreePickerField.js +11 -2
  51. package/dist/components/TreePickerField.js.map +1 -1
  52. package/dist/components/UnitStepControls.d.ts +1 -1
  53. package/dist/components/button.d.ts +3 -3
  54. package/dist/components/combobox-types.d.ts +1 -1
  55. package/dist/components/density-switcher.d.ts +1 -1
  56. package/dist/components/filter-bar-context.d.ts +1 -1
  57. package/dist/components/filter-bar-field-utils.d.ts +2 -2
  58. package/dist/components/form-lookup-context.d.ts +1 -1
  59. package/dist/components/icon-menu-picker.d.ts +1 -1
  60. package/dist/components/json-schema-form-accordion-array.cjs +44 -21
  61. package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
  62. package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
  63. package/dist/components/json-schema-form-accordion-array.js +47 -24
  64. package/dist/components/json-schema-form-accordion-array.js.map +1 -1
  65. package/dist/components/json-schema-form-array.cjs +53 -30
  66. package/dist/components/json-schema-form-array.cjs.map +1 -1
  67. package/dist/components/json-schema-form-array.d.ts.map +1 -1
  68. package/dist/components/json-schema-form-array.js +54 -31
  69. package/dist/components/json-schema-form-array.js.map +1 -1
  70. package/dist/components/json-schema-form-cards-array.cjs +32 -22
  71. package/dist/components/json-schema-form-cards-array.cjs.map +1 -1
  72. package/dist/components/json-schema-form-cards-array.d.ts.map +1 -1
  73. package/dist/components/json-schema-form-cards-array.js +33 -23
  74. package/dist/components/json-schema-form-cards-array.js.map +1 -1
  75. package/dist/components/json-schema-form-collection-layouts.fixtures.d.ts +44 -0
  76. package/dist/components/json-schema-form-collection-layouts.fixtures.d.ts.map +1 -0
  77. package/dist/components/json-schema-form-discriminator.d.ts +1 -1
  78. package/dist/components/json-schema-form-errors.cjs +5 -1
  79. package/dist/components/json-schema-form-errors.cjs.map +1 -1
  80. package/dist/components/json-schema-form-errors.d.ts +2 -1
  81. package/dist/components/json-schema-form-errors.d.ts.map +1 -1
  82. package/dist/components/json-schema-form-errors.js +6 -2
  83. package/dist/components/json-schema-form-errors.js.map +1 -1
  84. package/dist/components/json-schema-form-extensions.d.ts +1 -1
  85. package/dist/components/json-schema-form-filter-input.cjs +50 -0
  86. package/dist/components/json-schema-form-filter-input.cjs.map +1 -0
  87. package/dist/components/json-schema-form-filter-input.d.ts +5 -0
  88. package/dist/components/json-schema-form-filter-input.d.ts.map +1 -0
  89. package/dist/components/json-schema-form-filter-input.js +50 -0
  90. package/dist/components/json-schema-form-filter-input.js.map +1 -0
  91. package/dist/components/json-schema-form-filter.cjs +49 -0
  92. package/dist/components/json-schema-form-filter.cjs.map +1 -0
  93. package/dist/components/json-schema-form-filter.d.ts +8 -0
  94. package/dist/components/json-schema-form-filter.d.ts.map +1 -0
  95. package/dist/components/json-schema-form-filter.js +49 -0
  96. package/dist/components/json-schema-form-filter.js.map +1 -0
  97. package/dist/components/json-schema-form-layout.cjs +84 -17
  98. package/dist/components/json-schema-form-layout.cjs.map +1 -1
  99. package/dist/components/json-schema-form-layout.d.ts +1 -1
  100. package/dist/components/json-schema-form-layout.d.ts.map +1 -1
  101. package/dist/components/json-schema-form-layout.js +84 -17
  102. package/dist/components/json-schema-form-layout.js.map +1 -1
  103. package/dist/components/json-schema-form-list-array.cjs +16 -5
  104. package/dist/components/json-schema-form-list-array.cjs.map +1 -1
  105. package/dist/components/json-schema-form-list-array.d.ts +2 -1
  106. package/dist/components/json-schema-form-list-array.d.ts.map +1 -1
  107. package/dist/components/json-schema-form-list-array.js +16 -5
  108. package/dist/components/json-schema-form-list-array.js.map +1 -1
  109. package/dist/components/json-schema-form-object.cjs +239 -85
  110. package/dist/components/json-schema-form-object.cjs.map +1 -1
  111. package/dist/components/json-schema-form-object.d.ts +2 -2
  112. package/dist/components/json-schema-form-object.d.ts.map +1 -1
  113. package/dist/components/json-schema-form-object.js +241 -87
  114. package/dist/components/json-schema-form-object.js.map +1 -1
  115. package/dist/components/json-schema-form-preferences.cjs +1 -1
  116. package/dist/components/json-schema-form-preferences.cjs.map +1 -1
  117. package/dist/components/json-schema-form-preferences.d.ts +1 -1
  118. package/dist/components/json-schema-form-preferences.d.ts.map +1 -1
  119. package/dist/components/json-schema-form-preferences.js +1 -1
  120. package/dist/components/json-schema-form-preferences.js.map +1 -1
  121. package/dist/components/json-schema-form-properties-errors.fixtures.d.ts +14 -0
  122. package/dist/components/json-schema-form-properties-errors.fixtures.d.ts.map +1 -0
  123. package/dist/components/json-schema-form-properties-size.cjs +19 -0
  124. package/dist/components/json-schema-form-properties-size.cjs.map +1 -0
  125. package/dist/components/json-schema-form-properties-size.d.ts +4 -0
  126. package/dist/components/json-schema-form-properties-size.d.ts.map +1 -0
  127. package/dist/components/json-schema-form-properties-size.js +19 -0
  128. package/dist/components/json-schema-form-properties-size.js.map +1 -0
  129. package/dist/components/json-schema-form-properties.cjs +305 -0
  130. package/dist/components/json-schema-form-properties.cjs.map +1 -0
  131. package/dist/components/json-schema-form-properties.d.ts +20 -0
  132. package/dist/components/json-schema-form-properties.d.ts.map +1 -0
  133. package/dist/components/json-schema-form-properties.fixtures.d.ts +157 -0
  134. package/dist/components/json-schema-form-properties.fixtures.d.ts.map +1 -0
  135. package/dist/components/json-schema-form-properties.js +305 -0
  136. package/dist/components/json-schema-form-properties.js.map +1 -0
  137. package/dist/components/json-schema-form-property-actions-context.cjs +6 -0
  138. package/dist/components/json-schema-form-property-actions-context.cjs.map +1 -0
  139. package/dist/components/json-schema-form-property-actions-context.d.ts +2 -0
  140. package/dist/components/json-schema-form-property-actions-context.d.ts.map +1 -0
  141. package/dist/components/json-schema-form-property-actions-context.js +6 -0
  142. package/dist/components/json-schema-form-property-actions-context.js.map +1 -0
  143. package/dist/components/json-schema-form-property-collection.cjs +31 -0
  144. package/dist/components/json-schema-form-property-collection.cjs.map +1 -0
  145. package/dist/components/json-schema-form-property-collection.d.ts +6 -0
  146. package/dist/components/json-schema-form-property-collection.d.ts.map +1 -0
  147. package/dist/components/json-schema-form-property-collection.js +31 -0
  148. package/dist/components/json-schema-form-property-collection.js.map +1 -0
  149. package/dist/components/json-schema-form-property-draft.cjs +45 -0
  150. package/dist/components/json-schema-form-property-draft.cjs.map +1 -0
  151. package/dist/components/json-schema-form-property-draft.d.ts +8 -0
  152. package/dist/components/json-schema-form-property-draft.d.ts.map +1 -0
  153. package/dist/components/json-schema-form-property-draft.js +45 -0
  154. package/dist/components/json-schema-form-property-draft.js.map +1 -0
  155. package/dist/components/json-schema-form-property-preview.cjs +68 -0
  156. package/dist/components/json-schema-form-property-preview.cjs.map +1 -0
  157. package/dist/components/json-schema-form-property-preview.d.ts +7 -0
  158. package/dist/components/json-schema-form-property-preview.d.ts.map +1 -0
  159. package/dist/components/json-schema-form-property-preview.js +68 -0
  160. package/dist/components/json-schema-form-property-preview.js.map +1 -0
  161. package/dist/components/json-schema-form-property-selection.cjs +89 -0
  162. package/dist/components/json-schema-form-property-selection.cjs.map +1 -0
  163. package/dist/components/json-schema-form-property-selection.d.ts +6 -0
  164. package/dist/components/json-schema-form-property-selection.d.ts.map +1 -0
  165. package/dist/components/json-schema-form-property-selection.js +89 -0
  166. package/dist/components/json-schema-form-property-selection.js.map +1 -0
  167. package/dist/components/json-schema-form-render.cjs +41 -4
  168. package/dist/components/json-schema-form-render.cjs.map +1 -1
  169. package/dist/components/json-schema-form-render.d.ts +1 -1
  170. package/dist/components/json-schema-form-render.d.ts.map +1 -1
  171. package/dist/components/json-schema-form-render.js +42 -5
  172. package/dist/components/json-schema-form-render.js.map +1 -1
  173. package/dist/components/json-schema-form-resolve.cjs +2 -0
  174. package/dist/components/json-schema-form-resolve.cjs.map +1 -1
  175. package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
  176. package/dist/components/json-schema-form-resolve.js +2 -0
  177. package/dist/components/json-schema-form-resolve.js.map +1 -1
  178. package/dist/components/json-schema-form-runtime-types.d.ts +222 -0
  179. package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -0
  180. package/dist/components/json-schema-form-table-array.cjs +82 -51
  181. package/dist/components/json-schema-form-table-array.cjs.map +1 -1
  182. package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
  183. package/dist/components/json-schema-form-table-array.js +84 -53
  184. package/dist/components/json-schema-form-table-array.js.map +1 -1
  185. package/dist/components/json-schema-form-template-menu.d.ts +1 -1
  186. package/dist/components/json-schema-form-template.d.ts +1 -1
  187. package/dist/components/json-schema-form-types.d.ts +7 -179
  188. package/dist/components/json-schema-form-types.d.ts.map +1 -1
  189. package/dist/components/json-schema-form-utils.cjs +10 -9
  190. package/dist/components/json-schema-form-utils.cjs.map +1 -1
  191. package/dist/components/json-schema-form-utils.d.ts +11 -1
  192. package/dist/components/json-schema-form-utils.d.ts.map +1 -1
  193. package/dist/components/json-schema-form-utils.js +10 -9
  194. package/dist/components/json-schema-form-utils.js.map +1 -1
  195. package/dist/components/loading.d.ts +4 -4
  196. package/dist/components/mdx-editor-callout.d.ts +1 -1
  197. package/dist/components/mdx-editor-options.d.ts +1 -1
  198. package/dist/components/select.d.ts +3 -3
  199. package/dist/components/theme-switcher.d.ts +1 -1
  200. package/dist/components/use-list-menu-selection.d.ts +1 -1
  201. package/dist/components/useComboboxLayout.d.ts +1 -1
  202. package/dist/components/workload-picker-utils.d.ts +1 -1
  203. package/dist/data/Avatar.d.ts +1 -1
  204. package/dist/data/AvatarBadge.d.ts +1 -1
  205. package/dist/data/Badge.d.ts +1 -1
  206. package/dist/data/Callout.d.ts +1 -1
  207. package/dist/data/DataTable.cjs +575 -435
  208. package/dist/data/DataTable.cjs.map +1 -1
  209. package/dist/data/DataTable.d.ts +21 -13
  210. package/dist/data/DataTable.d.ts.map +1 -1
  211. package/dist/data/DataTable.grouping.d.ts +1 -1
  212. package/dist/data/DataTable.js +575 -435
  213. package/dist/data/DataTable.js.map +1 -1
  214. package/dist/data/ExecutionTree.d.ts +1 -1
  215. package/dist/data/FilterPill.d.ts +1 -1
  216. package/dist/data/FixtureEditor/RawFenceEditor.d.ts +1 -1
  217. package/dist/data/FixtureEditor/types.d.ts +1 -1
  218. package/dist/data/Gauge.d.ts +1 -1
  219. package/dist/data/GaugeHoverCard.d.ts +1 -1
  220. package/dist/data/Icon.d.ts +1 -1
  221. package/dist/data/KeyValueList.d.ts +1 -1
  222. package/dist/data/MarkdownEditor.d.ts +1 -1
  223. package/dist/data/MatrixTable.d.ts +1 -1
  224. package/dist/data/ObjectGraph.d.ts +1 -1
  225. package/dist/data/ProgressBars.d.ts +1 -1
  226. package/dist/data/Properties.cjs +86 -35
  227. package/dist/data/Properties.cjs.map +1 -1
  228. package/dist/data/Properties.d.ts +2 -2
  229. package/dist/data/Properties.d.ts.map +1 -1
  230. package/dist/data/Properties.js +87 -36
  231. package/dist/data/Properties.js.map +1 -1
  232. package/dist/data/RadialGauge.d.ts +1 -1
  233. package/dist/data/SchemaViewer.d.ts +1 -1
  234. package/dist/data/SortableHeader.d.ts +1 -1
  235. package/dist/data/StatStrip.d.ts +1 -1
  236. package/dist/data/StatusBreakdown.d.ts +1 -1
  237. package/dist/data/TabButton.d.ts +1 -1
  238. package/dist/data/TaskManager.cjs +9 -17
  239. package/dist/data/TaskManager.cjs.map +1 -1
  240. package/dist/data/TaskManager.d.ts.map +1 -1
  241. package/dist/data/TaskManager.js +9 -17
  242. package/dist/data/TaskManager.js.map +1 -1
  243. package/dist/data/TaskManagerButton.cjs +17 -34
  244. package/dist/data/TaskManagerButton.cjs.map +1 -1
  245. package/dist/data/TaskManagerButton.d.ts.map +1 -1
  246. package/dist/data/TaskManagerButton.js +18 -35
  247. package/dist/data/TaskManagerButton.js.map +1 -1
  248. package/dist/data/TaskProcessDetails.cjs +5 -26
  249. package/dist/data/TaskProcessDetails.cjs.map +1 -1
  250. package/dist/data/TaskProcessDetails.d.ts +2 -1
  251. package/dist/data/TaskProcessDetails.d.ts.map +1 -1
  252. package/dist/data/TaskProcessDetails.js +5 -26
  253. package/dist/data/TaskProcessDetails.js.map +1 -1
  254. package/dist/data/TaskProgress.cjs +24 -15
  255. package/dist/data/TaskProgress.cjs.map +1 -1
  256. package/dist/data/TaskProgress.d.ts +2 -1
  257. package/dist/data/TaskProgress.d.ts.map +1 -1
  258. package/dist/data/TaskProgress.js +24 -15
  259. package/dist/data/TaskProgress.js.map +1 -1
  260. package/dist/data/TaskResourceReadings.cjs +42 -0
  261. package/dist/data/TaskResourceReadings.cjs.map +1 -0
  262. package/dist/data/TaskResourceReadings.d.ts +6 -0
  263. package/dist/data/TaskResourceReadings.d.ts.map +1 -0
  264. package/dist/data/TaskResourceReadings.js +42 -0
  265. package/dist/data/TaskResourceReadings.js.map +1 -0
  266. package/dist/data/TaskSnapshot.cjs.map +1 -1
  267. package/dist/data/TaskSnapshot.d.ts +14 -1
  268. package/dist/data/TaskSnapshot.d.ts.map +1 -1
  269. package/dist/data/TaskSnapshot.js.map +1 -1
  270. package/dist/data/Timeline.d.ts +1 -1
  271. package/dist/data/Tree.d.ts +1 -1
  272. package/dist/data/TreeGroupHeader.d.ts +1 -1
  273. package/dist/data/TreeNode.d.ts +1 -1
  274. package/dist/data/Version.d.ts +3 -3
  275. package/dist/data/ai/ChatWindow.cjs +22 -12
  276. package/dist/data/ai/ChatWindow.cjs.map +1 -1
  277. package/dist/data/ai/ChatWindow.d.ts.map +1 -1
  278. package/dist/data/ai/ChatWindow.js +22 -12
  279. package/dist/data/ai/ChatWindow.js.map +1 -1
  280. package/dist/data/ai/ChatWindow.test-utils.d.ts +4 -2
  281. package/dist/data/ai/ChatWindow.test-utils.d.ts.map +1 -1
  282. package/dist/data/ai/ChatWindow.types.d.ts +1 -1
  283. package/dist/data/ai/ChatWindowManager.cjs +2 -0
  284. package/dist/data/ai/ChatWindowManager.cjs.map +1 -1
  285. package/dist/data/ai/ChatWindowManager.d.ts +1 -1
  286. package/dist/data/ai/ChatWindowManager.d.ts.map +1 -1
  287. package/dist/data/ai/ChatWindowManager.js +2 -0
  288. package/dist/data/ai/ChatWindowManager.js.map +1 -1
  289. package/dist/data/ai/PolicyTree.d.ts +1 -1
  290. package/dist/data/ai/PromptCatalog/PromptPageHeader.d.ts +1 -1
  291. package/dist/data/ai/PromptCatalog/types.d.ts +1 -1
  292. package/dist/data/ai/PromptRunEditor/index.cjs +4 -0
  293. package/dist/data/ai/PromptRunEditor/index.cjs.map +1 -1
  294. package/dist/data/ai/PromptRunEditor/index.d.ts +5 -2
  295. package/dist/data/ai/PromptRunEditor/index.d.ts.map +1 -1
  296. package/dist/data/ai/PromptRunEditor/index.js +4 -0
  297. package/dist/data/ai/PromptRunEditor/index.js.map +1 -1
  298. package/dist/data/ai/SessionChatComposer.d.ts +1 -1
  299. package/dist/data/ai/SessionInspector.approvals.cjs +147 -0
  300. package/dist/data/ai/SessionInspector.approvals.cjs.map +1 -0
  301. package/dist/data/ai/SessionInspector.approvals.d.ts +21 -0
  302. package/dist/data/ai/SessionInspector.approvals.d.ts.map +1 -0
  303. package/dist/data/ai/SessionInspector.approvals.js +147 -0
  304. package/dist/data/ai/SessionInspector.approvals.js.map +1 -0
  305. package/dist/data/ai/SessionInspector.cjs +21 -8
  306. package/dist/data/ai/SessionInspector.cjs.map +1 -1
  307. package/dist/data/ai/SessionInspector.d.ts +6 -2
  308. package/dist/data/ai/SessionInspector.d.ts.map +1 -1
  309. package/dist/data/ai/SessionInspector.hierarchy.d.ts +1 -1
  310. package/dist/data/ai/SessionInspector.js +21 -8
  311. package/dist/data/ai/SessionInspector.js.map +1 -1
  312. package/dist/data/ai/SessionInspector.panel-parts.cjs +47 -0
  313. package/dist/data/ai/SessionInspector.panel-parts.cjs.map +1 -0
  314. package/dist/data/ai/SessionInspector.panel-parts.d.ts +20 -0
  315. package/dist/data/ai/SessionInspector.panel-parts.d.ts.map +1 -0
  316. package/dist/data/ai/SessionInspector.panel-parts.js +47 -0
  317. package/dist/data/ai/SessionInspector.panel-parts.js.map +1 -0
  318. package/dist/data/ai/SessionInspector.panels.cjs +40 -99
  319. package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
  320. package/dist/data/ai/SessionInspector.panels.d.ts +3 -1
  321. package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
  322. package/dist/data/ai/SessionInspector.panels.js +12 -71
  323. package/dist/data/ai/SessionInspector.panels.js.map +1 -1
  324. package/dist/data/ai/SessionViewer.d.ts +1 -1
  325. package/dist/data/ai/SessionViewer.rows.d.ts +1 -1
  326. package/dist/data/ai/SessionViewer.tool-details.d.ts +1 -1
  327. package/dist/data/ai/SessionViewer.unified.d.ts +23 -0
  328. package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
  329. package/dist/data/ai/SpecRuntimeEditor/Footer.d.ts +1 -1
  330. package/dist/data/ai/SpecRuntimeEditor/Rail.d.ts +1 -1
  331. package/dist/data/ai/SpecRuntimeEditor/SectionCard.d.ts +1 -1
  332. package/dist/data/ai/SpecRuntimeEditor/VerifySection.cjs +3 -1
  333. package/dist/data/ai/SpecRuntimeEditor/VerifySection.cjs.map +1 -1
  334. package/dist/data/ai/SpecRuntimeEditor/VerifySection.d.ts +3 -1
  335. package/dist/data/ai/SpecRuntimeEditor/VerifySection.d.ts.map +1 -1
  336. package/dist/data/ai/SpecRuntimeEditor/VerifySection.js +3 -1
  337. package/dist/data/ai/SpecRuntimeEditor/VerifySection.js.map +1 -1
  338. package/dist/data/ai/SpecRuntimeEditor/fields.d.ts +1 -1
  339. package/dist/data/ai/SpecRuntimeEditor/index.cjs +3 -1
  340. package/dist/data/ai/SpecRuntimeEditor/index.cjs.map +1 -1
  341. package/dist/data/ai/SpecRuntimeEditor/index.d.ts +5 -2
  342. package/dist/data/ai/SpecRuntimeEditor/index.d.ts.map +1 -1
  343. package/dist/data/ai/SpecRuntimeEditor/index.js +3 -1
  344. package/dist/data/ai/SpecRuntimeEditor/index.js.map +1 -1
  345. package/dist/data/ai/chat-window-context.cjs +1 -0
  346. package/dist/data/ai/chat-window-context.cjs.map +1 -1
  347. package/dist/data/ai/chat-window-context.d.ts +13 -5
  348. package/dist/data/ai/chat-window-context.d.ts.map +1 -1
  349. package/dist/data/ai/chat-window-context.js +1 -0
  350. package/dist/data/ai/chat-window-context.js.map +1 -1
  351. package/dist/data/ai/index.d.ts +2 -1
  352. package/dist/data/ai/index.d.ts.map +1 -1
  353. package/dist/data/ai/use-session-scroll.d.ts +1 -1
  354. package/dist/data/cache-browser/adapter.d.ts +1 -1
  355. package/dist/data/cells/CellFilterActions.d.ts +1 -1
  356. package/dist/data/cells/EntityCell.d.ts +1 -1
  357. package/dist/data/cells/tag-utils.d.ts +1 -1
  358. package/dist/data/chat/Chat.cjs +42 -46
  359. package/dist/data/chat/Chat.cjs.map +1 -1
  360. package/dist/data/chat/Chat.d.ts +16 -5
  361. package/dist/data/chat/Chat.d.ts.map +1 -1
  362. package/dist/data/chat/Chat.js +43 -47
  363. package/dist/data/chat/Chat.js.map +1 -1
  364. package/dist/data/chat/ModelSelector.d.ts +1 -1
  365. package/dist/data/chat/PromptInput.cjs +13 -0
  366. package/dist/data/chat/PromptInput.cjs.map +1 -1
  367. package/dist/data/chat/PromptInput.d.ts +8 -2
  368. package/dist/data/chat/PromptInput.d.ts.map +1 -1
  369. package/dist/data/chat/PromptInput.js +14 -1
  370. package/dist/data/chat/PromptInput.js.map +1 -1
  371. package/dist/data/chat/tool-render/ToolArgs.d.ts +1 -1
  372. package/dist/data/chat/tool-render/ToolParams.d.ts +1 -1
  373. package/dist/data/chat/tool-render/ToolValue.d.ts +1 -1
  374. package/dist/data/chat/tool-render/adapter.d.ts +1 -1
  375. package/dist/data/chat/tool-render/context.d.ts +1 -1
  376. package/dist/data/chat/tool-render/defaults.d.ts +1 -1
  377. package/dist/data/chat/tool-render/known-tool-views.d.ts +1 -1
  378. package/dist/data/chat/tool-render/summary.d.ts +1 -1
  379. package/dist/data/chat/types.d.ts +1 -1
  380. package/dist/data/clicky-export/useClickyExport.d.ts +1 -1
  381. package/dist/data/data-table-server-filters.d.ts +1 -1
  382. package/dist/data/diagnostics/DiagnosticsDetailPanel.d.ts +1 -1
  383. package/dist/data/diagnostics/ErrorDetails.d.ts +1 -1
  384. package/dist/data/diagnostics/StackFrameRow.d.ts +1 -1
  385. package/dist/data/git/GitChangeList.d.ts +1 -1
  386. package/dist/data/icon-fallback.d.ts +1 -1
  387. package/dist/data/properties-context.cjs +6 -0
  388. package/dist/data/properties-context.cjs.map +1 -0
  389. package/dist/data/properties-context.d.ts +7 -0
  390. package/dist/data/properties-context.d.ts.map +1 -0
  391. package/dist/data/properties-context.js +6 -0
  392. package/dist/data/properties-context.js.map +1 -0
  393. package/dist/data/query-browser/QueryBrowser.types.d.ts +1 -1
  394. package/dist/data/runtime/RuntimeBar.cjs +7 -3
  395. package/dist/data/runtime/RuntimeBar.cjs.map +1 -1
  396. package/dist/data/runtime/RuntimeBar.d.ts.map +1 -1
  397. package/dist/data/runtime/RuntimeBar.js +7 -3
  398. package/dist/data/runtime/RuntimeBar.js.map +1 -1
  399. package/dist/data/task-copy.cjs +1 -1
  400. package/dist/data/task-copy.cjs.map +1 -1
  401. package/dist/data/task-copy.js +1 -1
  402. package/dist/data/task-copy.js.map +1 -1
  403. package/dist/data/task-resource-summary.cjs +30 -0
  404. package/dist/data/task-resource-summary.cjs.map +1 -0
  405. package/dist/data/task-resource-summary.d.ts +15 -0
  406. package/dist/data/task-resource-summary.d.ts.map +1 -0
  407. package/dist/data/task-resource-summary.js +30 -0
  408. package/dist/data/task-resource-summary.js.map +1 -0
  409. package/dist/data/task-status.cjs +8 -2
  410. package/dist/data/task-status.cjs.map +1 -1
  411. package/dist/data/task-status.d.ts +3 -0
  412. package/dist/data/task-status.d.ts.map +1 -1
  413. package/dist/data/task-status.js +8 -2
  414. package/dist/data/task-status.js.map +1 -1
  415. package/dist/data/task-work-progress.cjs +24 -0
  416. package/dist/data/task-work-progress.cjs.map +1 -0
  417. package/dist/data/task-work-progress.d.ts +21 -0
  418. package/dist/data/task-work-progress.d.ts.map +1 -0
  419. package/dist/data/task-work-progress.js +24 -0
  420. package/dist/data/task-work-progress.js.map +1 -0
  421. package/dist/data/test-runner/TestRunner.d.ts +1 -1
  422. package/dist/data/test-runner/adapter.d.ts +1 -1
  423. package/dist/data/test-runner/context.d.ts +1 -1
  424. package/dist/data/use-data-table-virtual.cjs +73 -0
  425. package/dist/data/use-data-table-virtual.cjs.map +1 -0
  426. package/dist/data/use-data-table-virtual.d.ts +40 -0
  427. package/dist/data/use-data-table-virtual.d.ts.map +1 -0
  428. package/dist/data/use-data-table-virtual.js +73 -0
  429. package/dist/data/use-data-table-virtual.js.map +1 -0
  430. package/dist/data/verification/VerificationResults.d.ts +1 -1
  431. package/dist/data/version-info.cjs +3 -3
  432. package/dist/data/version-info.js +3 -3
  433. package/dist/expressions/lang/attributes.cjs +56 -0
  434. package/dist/expressions/lang/attributes.cjs.map +1 -0
  435. package/dist/expressions/lang/attributes.d.ts +22 -0
  436. package/dist/expressions/lang/attributes.d.ts.map +1 -0
  437. package/dist/expressions/lang/attributes.js +56 -0
  438. package/dist/expressions/lang/attributes.js.map +1 -0
  439. package/dist/expressions/lang/completion.cjs +164 -0
  440. package/dist/expressions/lang/completion.cjs.map +1 -0
  441. package/dist/expressions/lang/completion.d.ts +29 -0
  442. package/dist/expressions/lang/completion.d.ts.map +1 -0
  443. package/dist/expressions/lang/completion.js +164 -0
  444. package/dist/expressions/lang/completion.js.map +1 -0
  445. package/dist/expressions/lang/environment.cjs +115 -0
  446. package/dist/expressions/lang/environment.cjs.map +1 -0
  447. package/dist/expressions/lang/environment.d.ts +54 -0
  448. package/dist/expressions/lang/environment.d.ts.map +1 -0
  449. package/dist/expressions/lang/environment.js +115 -0
  450. package/dist/expressions/lang/environment.js.map +1 -0
  451. package/dist/expressions/lang/generated/conformance.json.d.ts +4962 -0
  452. package/dist/expressions/lang/generated/index.cjs +18 -0
  453. package/dist/expressions/lang/generated/index.cjs.map +1 -0
  454. package/dist/expressions/lang/generated/index.d.ts +9 -0
  455. package/dist/expressions/lang/generated/index.d.ts.map +1 -0
  456. package/dist/expressions/lang/generated/index.js +18 -0
  457. package/dist/expressions/lang/generated/index.js.map +1 -0
  458. package/dist/expressions/lang/generated/languages.json.cjs +18 -0
  459. package/dist/expressions/lang/generated/languages.json.cjs.map +1 -0
  460. package/dist/expressions/lang/generated/languages.json.d.ts +2305 -0
  461. package/dist/expressions/lang/generated/languages.json.js +18 -0
  462. package/dist/expressions/lang/generated/languages.json.js.map +1 -0
  463. package/dist/expressions/lang/generated/spec.json.cjs +12 -0
  464. package/dist/expressions/lang/generated/spec.json.cjs.map +1 -0
  465. package/dist/expressions/lang/generated/spec.json.d.ts +6260 -0
  466. package/dist/expressions/lang/generated/spec.json.js +12 -0
  467. package/dist/expressions/lang/generated/spec.json.js.map +1 -0
  468. package/dist/expressions/lang/hover.cjs +106 -0
  469. package/dist/expressions/lang/hover.cjs.map +1 -0
  470. package/dist/expressions/lang/hover.d.ts +54 -0
  471. package/dist/expressions/lang/hover.d.ts.map +1 -0
  472. package/dist/expressions/lang/hover.js +106 -0
  473. package/dist/expressions/lang/hover.js.map +1 -0
  474. package/dist/expressions/lang/index.cjs +87 -0
  475. package/dist/expressions/lang/index.cjs.map +1 -0
  476. package/dist/expressions/lang/index.d.ts +65 -0
  477. package/dist/expressions/lang/index.d.ts.map +1 -0
  478. package/dist/expressions/lang/index.js +90 -0
  479. package/dist/expressions/lang/index.js.map +1 -0
  480. package/dist/expressions/lang/merge.cjs +52 -0
  481. package/dist/expressions/lang/merge.cjs.map +1 -0
  482. package/dist/expressions/lang/merge.d.ts +12 -0
  483. package/dist/expressions/lang/merge.d.ts.map +1 -0
  484. package/dist/expressions/lang/merge.js +52 -0
  485. package/dist/expressions/lang/merge.js.map +1 -0
  486. package/dist/expressions/lang/prefix.cjs +91 -0
  487. package/dist/expressions/lang/prefix.cjs.map +1 -0
  488. package/dist/expressions/lang/prefix.d.ts +36 -0
  489. package/dist/expressions/lang/prefix.d.ts.map +1 -0
  490. package/dist/expressions/lang/prefix.js +91 -0
  491. package/dist/expressions/lang/prefix.js.map +1 -0
  492. package/dist/expressions/lang/spec.d.ts +13 -0
  493. package/dist/expressions/lang/spec.d.ts.map +1 -0
  494. package/dist/expressions/lang/theme.cjs +97 -0
  495. package/dist/expressions/lang/theme.cjs.map +1 -0
  496. package/dist/expressions/lang/theme.d.ts +6 -0
  497. package/dist/expressions/lang/theme.d.ts.map +1 -0
  498. package/dist/expressions/lang/theme.js +97 -0
  499. package/dist/expressions/lang/theme.js.map +1 -0
  500. package/dist/expressions/lang/types.d.ts +81 -0
  501. package/dist/expressions/lang/types.d.ts.map +1 -0
  502. package/dist/expressions/playground/ExpressionPlayground.cjs +308 -0
  503. package/dist/expressions/playground/ExpressionPlayground.cjs.map +1 -0
  504. package/dist/expressions/playground/ExpressionPlayground.d.ts +42 -0
  505. package/dist/expressions/playground/ExpressionPlayground.d.ts.map +1 -0
  506. package/dist/expressions/playground/ExpressionPlayground.js +291 -0
  507. package/dist/expressions/playground/ExpressionPlayground.js.map +1 -0
  508. package/dist/expressions/playground/RunControls.cjs +51 -0
  509. package/dist/expressions/playground/RunControls.cjs.map +1 -0
  510. package/dist/expressions/playground/RunControls.d.ts +7 -0
  511. package/dist/expressions/playground/RunControls.d.ts.map +1 -0
  512. package/dist/expressions/playground/RunControls.js +51 -0
  513. package/dist/expressions/playground/RunControls.js.map +1 -0
  514. package/dist/expressions/playground/VerticalSplit.cjs +109 -0
  515. package/dist/expressions/playground/VerticalSplit.cjs.map +1 -0
  516. package/dist/expressions/playground/VerticalSplit.d.ts +23 -0
  517. package/dist/expressions/playground/VerticalSplit.d.ts.map +1 -0
  518. package/dist/expressions/playground/VerticalSplit.js +109 -0
  519. package/dist/expressions/playground/VerticalSplit.js.map +1 -0
  520. package/dist/expressions/playground/api.cjs +49 -0
  521. package/dist/expressions/playground/api.cjs.map +1 -0
  522. package/dist/expressions/playground/api.d.ts +53 -0
  523. package/dist/expressions/playground/api.d.ts.map +1 -0
  524. package/dist/expressions/playground/api.js +49 -0
  525. package/dist/expressions/playground/api.js.map +1 -0
  526. package/dist/expressions/playground/languages.cjs +88 -0
  527. package/dist/expressions/playground/languages.cjs.map +1 -0
  528. package/dist/expressions/playground/languages.d.ts +43 -0
  529. package/dist/expressions/playground/languages.d.ts.map +1 -0
  530. package/dist/expressions/playground/languages.js +88 -0
  531. package/dist/expressions/playground/languages.js.map +1 -0
  532. package/dist/expressions/playground/panels/GraphPanel.cjs +72 -0
  533. package/dist/expressions/playground/panels/GraphPanel.cjs.map +1 -0
  534. package/dist/expressions/playground/panels/GraphPanel.d.ts +19 -0
  535. package/dist/expressions/playground/panels/GraphPanel.d.ts.map +1 -0
  536. package/dist/expressions/playground/panels/GraphPanel.js +72 -0
  537. package/dist/expressions/playground/panels/GraphPanel.js.map +1 -0
  538. package/dist/expressions/playground/panels/ResultPanel.cjs +82 -0
  539. package/dist/expressions/playground/panels/ResultPanel.cjs.map +1 -0
  540. package/dist/expressions/playground/panels/ResultPanel.d.ts +11 -0
  541. package/dist/expressions/playground/panels/ResultPanel.d.ts.map +1 -0
  542. package/dist/expressions/playground/panels/ResultPanel.js +82 -0
  543. package/dist/expressions/playground/panels/ResultPanel.js.map +1 -0
  544. package/dist/expressions/playground/panels/SpecPanel.cjs +76 -0
  545. package/dist/expressions/playground/panels/SpecPanel.cjs.map +1 -0
  546. package/dist/expressions/playground/panels/SpecPanel.d.ts +18 -0
  547. package/dist/expressions/playground/panels/SpecPanel.d.ts.map +1 -0
  548. package/dist/expressions/playground/panels/SpecPanel.js +76 -0
  549. package/dist/expressions/playground/panels/SpecPanel.js.map +1 -0
  550. package/dist/expressions/playground/panels/TokensPanel.cjs +89 -0
  551. package/dist/expressions/playground/panels/TokensPanel.cjs.map +1 -0
  552. package/dist/expressions/playground/panels/TokensPanel.d.ts +15 -0
  553. package/dist/expressions/playground/panels/TokensPanel.d.ts.map +1 -0
  554. package/dist/expressions/playground/panels/TokensPanel.js +72 -0
  555. package/dist/expressions/playground/panels/TokensPanel.js.map +1 -0
  556. package/dist/expressions/playground/panels/graphNodes.cjs +35 -0
  557. package/dist/expressions/playground/panels/graphNodes.cjs.map +1 -0
  558. package/dist/expressions/playground/panels/graphNodes.d.ts +19 -0
  559. package/dist/expressions/playground/panels/graphNodes.d.ts.map +1 -0
  560. package/dist/expressions/playground/panels/graphNodes.js +35 -0
  561. package/dist/expressions/playground/panels/graphNodes.js.map +1 -0
  562. package/dist/expressions/playground/runAction.cjs +12 -0
  563. package/dist/expressions/playground/runAction.cjs.map +1 -0
  564. package/dist/expressions/playground/runAction.d.ts +15 -0
  565. package/dist/expressions/playground/runAction.d.ts.map +1 -0
  566. package/dist/expressions/playground/runAction.js +12 -0
  567. package/dist/expressions/playground/runAction.js.map +1 -0
  568. package/dist/expressions/playground/runShortcut.cjs +9 -0
  569. package/dist/expressions/playground/runShortcut.cjs.map +1 -0
  570. package/dist/expressions/playground/runShortcut.d.ts +2 -0
  571. package/dist/expressions/playground/runShortcut.d.ts.map +1 -0
  572. package/dist/expressions/playground/runShortcut.js +9 -0
  573. package/dist/expressions/playground/runShortcut.js.map +1 -0
  574. package/dist/expressions/playground/useEditorTheme.cjs +40 -0
  575. package/dist/expressions/playground/useEditorTheme.cjs.map +1 -0
  576. package/dist/expressions/playground/useEditorTheme.d.ts +16 -0
  577. package/dist/expressions/playground/useEditorTheme.d.ts.map +1 -0
  578. package/dist/expressions/playground/useEditorTheme.js +23 -0
  579. package/dist/expressions/playground/useEditorTheme.js.map +1 -0
  580. package/dist/expressions/playground/useEvaluator.cjs +72 -0
  581. package/dist/expressions/playground/useEvaluator.cjs.map +1 -0
  582. package/dist/expressions/playground/useEvaluator.d.ts +25 -0
  583. package/dist/expressions/playground/useEvaluator.d.ts.map +1 -0
  584. package/dist/expressions/playground/useEvaluator.js +72 -0
  585. package/dist/expressions/playground/useEvaluator.js.map +1 -0
  586. package/dist/expressions/playground/useParsedInput.cjs +22 -0
  587. package/dist/expressions/playground/useParsedInput.cjs.map +1 -0
  588. package/dist/expressions/playground/useParsedInput.d.ts +20 -0
  589. package/dist/expressions/playground/useParsedInput.d.ts.map +1 -0
  590. package/dist/expressions/playground/useParsedInput.js +22 -0
  591. package/dist/expressions/playground/useParsedInput.js.map +1 -0
  592. package/dist/expressions/playground/verticalSplitModel.cjs +11 -0
  593. package/dist/expressions/playground/verticalSplitModel.cjs.map +1 -0
  594. package/dist/expressions/playground/verticalSplitModel.d.ts +3 -0
  595. package/dist/expressions/playground/verticalSplitModel.d.ts.map +1 -0
  596. package/dist/expressions/playground/verticalSplitModel.js +11 -0
  597. package/dist/expressions/playground/verticalSplitModel.js.map +1 -0
  598. package/dist/expressions/playground.cjs +18 -0
  599. package/dist/expressions/playground.cjs.map +1 -0
  600. package/dist/expressions/playground.d.ts +18 -0
  601. package/dist/expressions/playground.d.ts.map +1 -0
  602. package/dist/expressions/playground.js +18 -0
  603. package/dist/expressions/playground.js.map +1 -0
  604. package/dist/expressions.cjs +28 -0
  605. package/dist/expressions.cjs.map +1 -0
  606. package/dist/expressions.d.ts +10 -0
  607. package/dist/expressions.d.ts.map +1 -0
  608. package/dist/expressions.js +28 -0
  609. package/dist/expressions.js.map +1 -0
  610. package/dist/hooks/density-provider.d.ts +1 -1
  611. package/dist/hooks/theme-provider.d.ts +1 -1
  612. package/dist/hooks/use-density.d.ts +1 -1
  613. package/dist/hooks/use-resource-clock.cjs +14 -0
  614. package/dist/hooks/use-resource-clock.cjs.map +1 -0
  615. package/dist/hooks/use-resource-clock.d.ts +2 -0
  616. package/dist/hooks/use-resource-clock.d.ts.map +1 -0
  617. package/dist/hooks/use-resource-clock.js +14 -0
  618. package/dist/hooks/use-resource-clock.js.map +1 -0
  619. package/dist/hooks/use-task-run.cjs +12 -3
  620. package/dist/hooks/use-task-run.cjs.map +1 -1
  621. package/dist/hooks/use-task-run.d.ts.map +1 -1
  622. package/dist/hooks/use-task-run.js +12 -3
  623. package/dist/hooks/use-task-run.js.map +1 -1
  624. package/dist/hooks/use-theme.d.ts +1 -1
  625. package/dist/icons/registry.d.ts +1 -1
  626. package/dist/icons/types.d.ts +1 -1
  627. package/dist/layout/AppShell.d.ts +1 -1
  628. package/dist/layout/AppShell.nav.drag.d.ts +1 -1
  629. package/dist/layout/AppSidebar.d.ts +1 -1
  630. package/dist/layout/Panel.d.ts +1 -1
  631. package/dist/layout/PanelFrame.d.ts +1 -1
  632. package/dist/layout/Section.d.ts +1 -1
  633. package/dist/layout/SplitPane.d.ts +1 -1
  634. package/dist/layout/Tabs.d.ts +1 -1
  635. package/dist/layout/Workspace.d.ts +1 -1
  636. package/dist/layout/Workspace.model.d.ts +1 -1
  637. package/dist/lib/combobox-values.d.ts +1 -1
  638. package/dist/monaco/MonacoEditor.cjs +3 -3
  639. package/dist/monaco/MonacoEditor.cjs.map +1 -1
  640. package/dist/monaco/MonacoEditor.js +2 -2
  641. package/dist/monaco/MonacoEditor.js.map +1 -1
  642. package/dist/monaco/types.d.ts +1 -1
  643. package/dist/monaco/use-monaco-worker.d.ts +1 -1
  644. package/dist/overlay/CellActions.d.ts +1 -1
  645. package/dist/overlay/CommandPalette.d.ts +2 -2
  646. package/dist/overlay/CommandPalette.model.d.ts +1 -1
  647. package/dist/overlay/CommandPaletteList.d.ts +1 -1
  648. package/dist/overlay/DropdownMenu.d.ts +1 -1
  649. package/dist/overlay/HoverCard.d.ts +1 -1
  650. package/dist/overlay/Modal.d.ts +2 -2
  651. package/dist/overlay/Toast.d.ts +1 -1
  652. package/dist/overlay/TourCard.d.ts +1 -1
  653. package/dist/overlay/TourProvider.d.ts +1 -1
  654. package/dist/overlay/dropdownMenuContext.d.ts +1 -1
  655. package/dist/overlay/toast-context.d.ts +2 -2
  656. package/dist/overlay/tour-context.d.ts +1 -1
  657. package/dist/overlay/tour-types.d.ts +1 -1
  658. package/dist/profiles/connections/connectionBrowserModel.d.ts +1 -1
  659. package/dist/profiles/connections/connectionQueryWorkspace.d.ts +1 -1
  660. package/dist/profiles/editor/profileBuilder.d.ts +1 -1
  661. package/dist/profiles/elasticsearch/esParamOperandExtension.d.ts +1 -1
  662. package/dist/profiles/fields/profileFieldControls.d.ts +1 -1
  663. package/dist/profiles/fields/profileFieldIcons.d.ts +1 -1
  664. package/dist/profiles/fields/profileFieldState.d.ts +1 -1
  665. package/dist/profiles/query/jsonPathSample.d.ts +1 -1
  666. package/dist/profiles/query/jsonPathSampleRow.d.ts +1 -1
  667. package/dist/profiles/query/prometheusResults.d.ts +2 -2
  668. package/dist/rpc/EndpointList.d.ts +1 -1
  669. package/dist/rpc/EntityExplorerApp.d.ts +1 -1
  670. package/dist/rpc/OperationCatalog.d.ts +1 -1
  671. package/dist/rpc/OperationEntityContextPicker.d.ts +1 -1
  672. package/dist/rpc/OperationEntityPage.d.ts +1 -1
  673. package/dist/rpc/OperationResultView.d.ts +1 -1
  674. package/dist/rpc/RouterProvider.d.ts +1 -1
  675. package/dist/rpc/SchemaActionForm.d.ts +1 -1
  676. package/dist/rpc/formMetadata.d.ts +1 -1
  677. package/dist/rpc/router.d.ts +1 -1
  678. package/dist/rpc/rpc-story.fixtures.d.ts +1 -1
  679. package/dist/styles.css +1 -1
  680. package/package.json +21 -2
@@ -1,4 +1,4 @@
1
- import { ReactNode } from '../../../../node_modules/@types/react/index.d.ts';
1
+ import { ReactNode } from 'react';
2
2
  export type ExecutionNode = {
3
3
  /** Stable unique key within the tree. */
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from '../../../../node_modules/@types/react/index.d.ts';
1
+ import { ReactNode } from 'react';
2
2
  import { StaticIconComponent } from './Icon';
3
3
  export type FilterMode = "active" | "neutral" | "include" | "exclude";
4
4
  export type FilterPillProps = {
@@ -1,4 +1,4 @@
1
- import { ReactNode } from '../../../../../node_modules/@types/react/index.d.ts';
1
+ import { ReactNode } from 'react';
2
2
  export type RawFenceEditorProps = {
3
3
  info: string;
4
4
  body: string;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from '../../../../../node_modules/@types/react/index.d.ts';
1
+ import { ReactNode } from 'react';
2
2
  import { FormSize } from '../../components/json-schema-form-size';
3
3
  import { JsonSchemaObject } from '../../components/json-schema-form-types';
4
4
  import { SpecRuntimeEditorProps } from '../ai/SpecRuntimeEditor';
@@ -1,4 +1,4 @@
1
- import { ReactNode } from '../../../../node_modules/@types/react/index.d.ts';
1
+ import { ReactNode } from 'react';
2
2
  import { StaticIconComponent } from './Icon';
3
3
  export type GaugeTone = "neutral" | "success" | "warning" | "danger" | "info";
4
4
  export type GaugeVariant = "default" | "cell";
@@ -1,4 +1,4 @@
1
- import { ReactNode } from '../../../../node_modules/@types/react/index.d.ts';
1
+ import { ReactNode } from 'react';
2
2
  import { HoverCardPlacement } from '../overlay/HoverCard';
3
3
  export interface GaugeHoverRow {
4
4
  /** Row label, e.g. "Current", "Min", "Capacity". */
@@ -1,4 +1,4 @@
1
- import { ElementType, ReactElement, ReactNode } from '../../../../node_modules/@types/react/index.d.ts';
1
+ import { ElementType, ReactElement, ReactNode } from 'react';
2
2
  import { SizeToken } from '../lib/size';
3
3
  export type LabelIconSpec = string | ReactNode;
4
4
  export type IconStyle = "plain" | "badge";
@@ -1,4 +1,4 @@
1
- import { ReactNode } from '../../../../node_modules/@types/react/index.d.ts';
1
+ import { ReactNode } from 'react';
2
2
  export type KeyValueListItem = {
3
3
  key: string;
4
4
  label: ReactNode;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from '../../../../node_modules/@types/react/index.d.ts';
1
+ import { ReactNode } from 'react';
2
2
  import { ClickyProps } from './Clicky';
3
3
  import { MarkdownEditorPreviewFormat, MarkdownEditorPreviewHeaders, MarkdownEditorPreviewRequest, MarkdownEditorPreviewResult } from './MarkdownEditor.model';
4
4
  export type MarkdownEditorProps = {
@@ -1,4 +1,4 @@
1
- import { ReactNode } from '../../../../node_modules/@types/react/index.d.ts';
1
+ import { ReactNode } from 'react';
2
2
  export type MatrixTableRow = {
3
3
  key: string;
4
4
  label: ReactNode;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from '../../../../node_modules/@types/react/index.d.ts';
1
+ import { ReactNode } from 'react';
2
2
  import { DropdownMenuItem } from '../overlay/DropdownMenu';
3
3
  import { ObjectGraphNode } from './object-graph-nodes';
4
4
  export type { ObjectGraphNode };
@@ -1,4 +1,4 @@
1
- import { ReactNode } from '../../../../node_modules/@types/react/index.d.ts';
1
+ import { ReactNode } from 'react';
2
2
  import { StaticIconComponent } from './Icon';
3
3
  export type ProgressBarsVariant = "default" | "cell";
4
4
  export type ProgressBarsOrientation = "horizontal" | "vertical";
@@ -7,6 +7,7 @@ const utils = require("../lib/utils.cjs");
7
7
  const DropdownMenu = require("../overlay/DropdownMenu.cjs");
8
8
  const Icon = require("./Icon.cjs");
9
9
  const propertiesUtils = require("./properties-utils.cjs");
10
+ const propertiesContext = require("./properties-context.cjs");
10
11
  const UiRows = require("../icons/components/UiRows.cjs");
11
12
  const UiListFlat = require("../icons/components/UiListFlat.cjs");
12
13
  const UiListDashes = require("../icons/components/UiListDashes.cjs");
@@ -55,14 +56,17 @@ function Properties({
55
56
  showDensityMenu = true,
56
57
  emptyMessage = "No properties"
57
58
  }) {
59
+ const parent = react.useContext(propertiesContext.PropertiesContext);
58
60
  const [densityOverride, setDensityOverride] = react.useState();
59
61
  react.useEffect(() => setDensityOverride(readStoredDensity(keyRef)), [keyRef]);
60
62
  const visible = items.filter((item) => !item.hidden);
61
63
  if (visible.length === 0) {
62
64
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: emptyMessage });
63
65
  }
64
- const activeDensity = densityOverride ?? density;
66
+ const activeDensity = (parent == null ? void 0 : parent.density) ?? densityOverride ?? density;
65
67
  const styles = DENSITY_CLASSES[activeDensity];
68
+ const columns = (parent == null ? void 0 : parent.columns) ?? gridTemplateColumns ?? styles.gridTemplateColumns;
69
+ const depth = (parent == null ? void 0 : parent.depth) ?? 0;
66
70
  const updateDensity = (next) => {
67
71
  setDensityOverride(next);
68
72
  writeStoredDensity(keyRef, next);
@@ -71,50 +75,97 @@ function Properties({
71
75
  "dl",
72
76
  {
73
77
  className: utils.cn(
74
- "divide-y divide-border rounded-md border border-border bg-muted/20",
78
+ "grid gap-x-density-3 divide-y divide-border rounded-md border border-border bg-muted/20",
79
+ parent && "col-span-full rounded-none border-0 bg-transparent",
75
80
  className
76
81
  ),
82
+ style: { gridTemplateColumns: parent ? "subgrid" : columns },
77
83
  children: [
78
- showDensityMenu ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end px-density-2 py-density-1", children: [
84
+ showDensityMenu && !parent ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-full flex items-center justify-end px-density-2 py-density-1", children: [
79
85
  /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "sr-only", children: "Properties display options" }),
80
- /* @__PURE__ */ jsxRuntime.jsx("dd", { children: /* @__PURE__ */ jsxRuntime.jsx(PropertiesDensityMenu, { density: activeDensity, onChange: updateDensity }) })
86
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { children: /* @__PURE__ */ jsxRuntime.jsx(
87
+ PropertiesDensityMenu,
88
+ {
89
+ density: activeDensity,
90
+ onChange: updateDensity
91
+ }
92
+ ) })
81
93
  ] }) : null,
82
94
  visible.map((item) => {
83
95
  const iconName = typeof labelIcon === "function" ? labelIcon(item.key, item.value, item) : labelIcon;
84
96
  const renderedLabel = renderLabel ? renderLabel(item.key, item.value, item) : propertiesUtils.formatPropertyLabel(item.key);
85
97
  const ariaLabel = typeof renderedLabel === "string" ? renderedLabel : item.key;
86
- return /* @__PURE__ */ jsxRuntime.jsxs(
87
- "div",
88
- {
89
- className: utils.cn("grid min-w-0 gap-density-3", styles.row, rowClassName),
90
- style: { gridTemplateColumns: gridTemplateColumns ?? styles.gridTemplateColumns },
91
- children: [
92
- /* @__PURE__ */ jsxRuntime.jsxs(
93
- "dt",
94
- {
95
- "aria-label": ariaLabel,
96
- className: utils.cn("min-w-0 truncate", styles.label, labelClassName),
97
- children: [
98
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-density-1", children: [
99
- iconName ? /* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { name: iconName, className: "text-xs shrink-0" }) : null,
100
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children: renderedLabel })
101
- ] }),
102
- item.subtitle ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 text-[10px] font-normal text-muted-foreground/80", children: item.subtitle }) : null
103
- ]
104
- }
98
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
99
+ /* @__PURE__ */ jsxRuntime.jsxs(
100
+ "div",
101
+ {
102
+ className: utils.cn(
103
+ "col-span-full grid min-w-0 grid-cols-subgrid gap-density-3",
104
+ styles.row,
105
+ rowClassName
105
106
  ),
106
- /* @__PURE__ */ jsxRuntime.jsxs("dd", { className: utils.cn("min-w-0 space-y-density-1", valueClassName), children: [
107
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-start gap-density-1", children: [
108
- /* @__PURE__ */ jsxRuntime.jsx(ActionList, { actions: prefixActions, item, className: "shrink-0 pt-0.5" }),
109
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils.cn("min-w-0 max-w-full flex-1", styles.value), children: renderValue ? renderValue(item.key, item.value, item) : defaultRenderValue(item.value) }),
110
- /* @__PURE__ */ jsxRuntime.jsx(ActionList, { actions: suffixActions, item, className: "shrink-0 pt-0.5" })
111
- ] }),
112
- item.expandable && item.expanded && item.renderChildren ? item.renderChildren() : null
113
- ] })
114
- ]
115
- },
116
- item.key
117
- );
107
+ children: [
108
+ /* @__PURE__ */ jsxRuntime.jsxs(
109
+ "dt",
110
+ {
111
+ "aria-label": ariaLabel,
112
+ className: utils.cn("min-w-0 truncate", styles.label, labelClassName),
113
+ style: { paddingInlineStart: depth * 16 },
114
+ children: [
115
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-density-1", children: [
116
+ iconName ? /* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { name: iconName, className: "text-xs shrink-0" }) : null,
117
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children: renderedLabel })
118
+ ] }),
119
+ item.subtitle ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 text-[10px] font-normal text-muted-foreground/80", children: item.subtitle }) : null
120
+ ]
121
+ }
122
+ ),
123
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: utils.cn("min-w-0 space-y-density-1", valueClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-start gap-density-1", children: [
124
+ /* @__PURE__ */ jsxRuntime.jsx(
125
+ ActionList,
126
+ {
127
+ actions: prefixActions,
128
+ item,
129
+ className: "shrink-0 pt-0.5"
130
+ }
131
+ ),
132
+ /* @__PURE__ */ jsxRuntime.jsx(
133
+ "div",
134
+ {
135
+ className: utils.cn("min-w-0 max-w-full flex-1", styles.value),
136
+ children: renderValue ? renderValue(item.key, item.value, item) : defaultRenderValue(item.value)
137
+ }
138
+ ),
139
+ /* @__PURE__ */ jsxRuntime.jsx(
140
+ ActionList,
141
+ {
142
+ actions: suffixActions,
143
+ item,
144
+ className: "shrink-0 pt-0.5"
145
+ }
146
+ )
147
+ ] }) })
148
+ ]
149
+ }
150
+ ),
151
+ item.expandable && item.expanded && item.renderChildren ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-full grid grid-cols-subgrid", children: [
152
+ /* @__PURE__ */ jsxRuntime.jsxs("dt", { className: "sr-only", children: [
153
+ ariaLabel,
154
+ " properties"
155
+ ] }),
156
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "col-span-full grid min-w-0 grid-cols-subgrid", children: /* @__PURE__ */ jsxRuntime.jsx(
157
+ propertiesContext.PropertiesContext.Provider,
158
+ {
159
+ value: {
160
+ depth: depth + 1,
161
+ columns,
162
+ density: activeDensity
163
+ },
164
+ children: item.renderChildren()
165
+ }
166
+ ) })
167
+ ] }) : null
168
+ ] }, item.key);
118
169
  })
119
170
  ]
120
171
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Properties.cjs","sources":["../../src/data/Properties.tsx"],"sourcesContent":["import { useEffect, useState, type ReactNode } from \"react\";\nimport { IconButton } from \"../components/IconButton\";\nimport {\n UiCheck,\n UiDotsVertical,\n UiListDashes,\n UiListFlat,\n UiRows,\n} from \"../icons\";\nimport { cn } from \"../lib/utils\";\nimport { DropdownMenu } from \"../overlay/DropdownMenu\";\nimport { Icon, type StaticIconComponent } from \"./Icon\";\nimport { formatPropertyLabel } from \"./properties-utils\";\n\nexport type PropertiesAction<V = unknown> = {\n /** Stable action id. */\n id: string;\n /** Iconify name or imported icon component. */\n icon: string | StaticIconComponent;\n /** Accessible label and tooltip for this row action. */\n label: (key: string, value: V, item: PropertiesItem<V>) => string;\n /** Return false to hide the action for a specific row. */\n visible?: (key: string, value: V, item: PropertiesItem<V>) => boolean;\n /** Return true to disable the action for a specific row. */\n disabled?: (key: string, value: V, item: PropertiesItem<V>) => boolean;\n /** Called when the row action is clicked. */\n onClick: (key: string, value: V, item: PropertiesItem<V>) => void;\n};\n\nexport type PropertiesItem<V = unknown> = {\n /** Stable property key. Also used as the default label. */\n key: string;\n /** Property value passed to renderers and actions. */\n value: V;\n /** Secondary text shown below the label. */\n subtitle?: ReactNode;\n /** Hide this row without removing it from the item array. */\n hidden?: boolean;\n /** Enables an expandable child area below the row value. */\n expandable?: boolean;\n /** Controlled expanded state. */\n expanded?: boolean;\n /** Called when an expandable row is toggled. */\n onToggle?: (next: boolean) => void;\n /** Child content rendered when the row is expanded. */\n renderChildren?: () => ReactNode;\n};\n\nexport type PropertiesDensity = \"comfortable\" | \"compact\" | \"spacious\";\n\nexport type PropertiesProps<V = unknown> = {\n /** Property rows to render. Hidden items are filtered out. */\n items: PropertiesItem<V>[];\n /** Custom label renderer. */\n renderLabel?: (key: string, value: V, item: PropertiesItem<V>) => ReactNode;\n /** Custom value renderer. */\n renderValue?: (key: string, value: V, item: PropertiesItem<V>) => ReactNode;\n /** Static icon name or function that returns an icon name per row. */\n labelIcon?: string | ((key: string, value: V, item: PropertiesItem<V>) => string | undefined);\n /** Actions rendered before the value. */\n prefixActions?: PropertiesAction<V>[];\n /** Actions rendered after the value. */\n suffixActions?: PropertiesAction<V>[];\n /** Classes applied to the list root. */\n className?: string;\n /** Classes applied to each row. */\n rowClassName?: string;\n /** CSS grid columns applied to each row. Defaults to the selected density preset. */\n gridTemplateColumns?: string;\n /** Classes applied to each label cell. */\n labelClassName?: string;\n /** Classes applied to each value cell. */\n valueClassName?: string;\n /** Row density preset. */\n density?: PropertiesDensity;\n /** Stable reference used to persist this instance's density preference. */\n keyRef?: string;\n /** Show the display-options menu. */\n showDensityMenu?: boolean;\n /** Empty-state content when no rows are visible. */\n emptyMessage?: ReactNode;\n};\n\nconst PROPERTIES_DENSITY_STORAGE_PREFIX = \"clicky-ui-properties\";\n\nconst PROPERTIES_DENSITY_OPTIONS: Array<{\n value: PropertiesDensity;\n label: string;\n icon: StaticIconComponent;\n}> = [\n { value: \"compact\", label: \"Compact\", icon: UiRows },\n { value: \"comfortable\", label: \"Comfortable\", icon: UiListFlat },\n { value: \"spacious\", label: \"Spacious\", icon: UiListDashes },\n];\n\nconst DENSITY_CLASSES: Record<\n PropertiesDensity,\n { row: string; label: string; value: string; gridTemplateColumns: string }\n> = {\n spacious: {\n row: \"px-density-4 py-density-3\",\n label: \"text-sm font-medium text-muted-foreground\",\n value: \"text-base text-foreground\",\n gridTemplateColumns: \"minmax(12rem, 20rem) minmax(0, 1fr)\",\n },\n comfortable: {\n row: \"px-density-3 py-density-2\",\n label: \"text-xs font-medium text-muted-foreground\",\n value: \"text-sm text-foreground\",\n gridTemplateColumns: \"minmax(7rem, 12rem) minmax(0, 1fr)\",\n },\n compact: {\n row: \"px-density-2 py-density-1.5\",\n label: \"font-mono text-[11px] text-muted-foreground\",\n value: \"text-xs text-foreground\",\n gridTemplateColumns: \"minmax(8rem, 14rem) minmax(0, 1fr)\",\n },\n};\n\nexport function Properties<V = unknown>({\n items,\n renderLabel,\n renderValue,\n labelIcon,\n prefixActions,\n suffixActions,\n className,\n rowClassName,\n gridTemplateColumns,\n labelClassName,\n valueClassName,\n density = \"comfortable\",\n keyRef,\n showDensityMenu = true,\n emptyMessage = \"No properties\",\n}: PropertiesProps<V>) {\n const [densityOverride, setDensityOverride] = useState<PropertiesDensity>();\n useEffect(() => setDensityOverride(readStoredDensity(keyRef)), [keyRef]);\n\n const visible = items.filter((item) => !item.hidden);\n\n if (visible.length === 0) {\n return <div className=\"text-sm text-muted-foreground\">{emptyMessage}</div>;\n }\n\n const activeDensity = densityOverride ?? density;\n const styles = DENSITY_CLASSES[activeDensity];\n\n const updateDensity = (next: PropertiesDensity) => {\n setDensityOverride(next);\n writeStoredDensity(keyRef, next);\n };\n\n return (\n <dl\n className={cn(\n \"divide-y divide-border rounded-md border border-border bg-muted/20\",\n className,\n )}\n >\n {showDensityMenu ? (\n <div className=\"flex items-center justify-end px-density-2 py-density-1\">\n <dt className=\"sr-only\">Properties display options</dt>\n <dd>\n <PropertiesDensityMenu density={activeDensity} onChange={updateDensity} />\n </dd>\n </div>\n ) : null}\n {visible.map((item) => {\n const iconName =\n typeof labelIcon === \"function\" ? labelIcon(item.key, item.value, item) : labelIcon;\n const renderedLabel = renderLabel\n ? renderLabel(item.key, item.value, item)\n : formatPropertyLabel(item.key);\n const ariaLabel = typeof renderedLabel === \"string\" ? renderedLabel : item.key;\n\n return (\n <div\n key={item.key}\n className={cn(\"grid min-w-0 gap-density-3\", styles.row, rowClassName)}\n style={{ gridTemplateColumns: gridTemplateColumns ?? styles.gridTemplateColumns }}\n >\n <dt\n aria-label={ariaLabel}\n className={cn(\"min-w-0 truncate\", styles.label, labelClassName)}\n >\n <div className=\"flex min-w-0 items-center gap-density-1\">\n {iconName ? <Icon name={iconName} className=\"text-xs shrink-0\" /> : null}\n <span className=\"min-w-0 truncate\">{renderedLabel}</span>\n </div>\n {item.subtitle ? (\n <div className=\"mt-0.5 text-[10px] font-normal text-muted-foreground/80\">\n {item.subtitle}\n </div>\n ) : null}\n </dt>\n <dd className={cn(\"min-w-0 space-y-density-1\", valueClassName)}>\n <div className=\"flex min-w-0 items-start gap-density-1\">\n <ActionList actions={prefixActions} item={item} className=\"shrink-0 pt-0.5\" />\n <div className={cn(\"min-w-0 max-w-full flex-1\", styles.value)}>\n {renderValue\n ? renderValue(item.key, item.value, item)\n : defaultRenderValue(item.value)}\n </div>\n <ActionList actions={suffixActions} item={item} className=\"shrink-0 pt-0.5\" />\n </div>\n {item.expandable && item.expanded && item.renderChildren\n ? item.renderChildren()\n : null}\n </dd>\n </div>\n );\n })}\n </dl>\n );\n}\n\nfunction PropertiesDensityMenu({\n density,\n onChange,\n}: {\n density: PropertiesDensity;\n onChange: (density: PropertiesDensity) => void;\n}) {\n return (\n <DropdownMenu\n align=\"right\"\n menuLabel=\"Properties options\"\n trigger={\n <IconButton\n icon={UiDotsVertical}\n label=\"Properties options\"\n className=\"h-6 w-6\"\n />\n }\n >\n {(closeMenu) => (\n <div className=\"min-w-44 py-1 text-popover-foreground\">\n <div className=\"px-2 py-1 text-xs font-medium text-muted-foreground\">\n Density\n </div>\n {PROPERTIES_DENSITY_OPTIONS.map((option) => {\n const active = density === option.value;\n return (\n <button\n key={option.value}\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n className={densityMenuItemClassName(active)}\n onClick={() => {\n onChange(option.value);\n closeMenu();\n }}\n >\n <Icon\n icon={option.icon}\n className=\"text-sm text-muted-foreground\"\n />\n <span className=\"min-w-0 flex-1 truncate\">{option.label}</span>\n {active ? (\n <Icon icon={UiCheck} className=\"text-sm text-foreground\" />\n ) : (\n <span className=\"inline-block h-4 w-4\" aria-hidden />\n )}\n </button>\n );\n })}\n </div>\n )}\n </DropdownMenu>\n );\n}\n\nfunction densityMenuItemClassName(active: boolean): string {\n return cn(\n \"flex w-full items-center gap-2 px-2 py-1.5 text-left text-sm\",\n \"hover:bg-accent focus:bg-accent focus:outline-none\",\n active && \"bg-accent/60\",\n );\n}\n\nfunction readStoredDensity(\n keyRef: string | undefined,\n): PropertiesDensity | undefined {\n const storageKey = propertiesDensityStorageKey(keyRef);\n if (!storageKey || typeof window === \"undefined\") return undefined;\n\n try {\n const value = window.localStorage.getItem(storageKey);\n return isPropertiesDensity(value) ? value : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction writeStoredDensity(\n keyRef: string | undefined,\n density: PropertiesDensity,\n): void {\n const storageKey = propertiesDensityStorageKey(keyRef);\n if (!storageKey || typeof window === \"undefined\") return;\n\n try {\n window.localStorage.setItem(storageKey, density);\n } catch {\n // Display preferences are best-effort when browser storage is unavailable.\n }\n}\n\nfunction propertiesDensityStorageKey(\n keyRef: string | undefined,\n): string | undefined {\n const normalized = keyRef?.trim();\n return normalized\n ? `${PROPERTIES_DENSITY_STORAGE_PREFIX}:${normalized}:density`\n : undefined;\n}\n\nfunction isPropertiesDensity(value: unknown): value is PropertiesDensity {\n return value === \"compact\" || value === \"comfortable\" || value === \"spacious\";\n}\n\nfunction ActionList<V>({\n actions,\n item,\n className,\n}: {\n actions: PropertiesAction<V>[] | undefined;\n item: PropertiesItem<V>;\n className?: string;\n}) {\n if (!actions || actions.length === 0) return null;\n const rendered = actions.filter(\n (action) => !action.visible || action.visible(item.key, item.value, item),\n );\n if (rendered.length === 0) return null;\n return (\n <span className={cn(\"inline-flex items-center\", className)}>\n {rendered.map((action) => (\n <PropertiesActionButton key={action.id} action={action} item={item} />\n ))}\n </span>\n );\n}\n\nfunction PropertiesActionButton<V>({\n action,\n item,\n}: {\n action: PropertiesAction<V>;\n item: PropertiesItem<V>;\n}) {\n const label = action.label(item.key, item.value, item);\n const disabled = action.disabled?.(item.key, item.value, item) ?? false;\n return (\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n disabled={disabled}\n className={cn(\n \"inline-flex h-5 w-5 items-center justify-center rounded text-muted-foreground\",\n \"hover:bg-accent hover:text-foreground\",\n \"disabled:opacity-35 disabled:hover:bg-transparent disabled:hover:text-muted-foreground\",\n )}\n onClick={(event) => {\n event.stopPropagation();\n action.onClick(item.key, item.value, item);\n }}\n >\n <Icon\n {...(typeof action.icon === \"string\" ? { name: action.icon } : { icon: action.icon })}\n className=\"text-xs\"\n />\n </button>\n );\n}\n\nfunction defaultRenderValue(value: unknown): ReactNode {\n if (value === null || value === undefined) {\n return <span className=\"font-mono italic text-muted-foreground\">null</span>;\n }\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\" || typeof value === \"boolean\") {\n return <span className=\"font-mono\">{String(value)}</span>;\n }\n try {\n return (\n <pre className=\"max-h-48 overflow-auto whitespace-pre-wrap break-words font-mono text-[11px] leading-relaxed\">\n {JSON.stringify(value, null, 2)}\n </pre>\n );\n } catch {\n return String(value);\n }\n}\n"],"names":["UiRows","UiListFlat","UiListDashes","useState","useEffect","jsx","jsxs","cn","formatPropertyLabel","Icon","DropdownMenu","IconButton","UiDotsVertical","UiCheck"],"mappings":";;;;;;;;;;;;;;AAmFA,MAAM,oCAAoC;AAE1C,MAAM,6BAID;AAAA,EACH,EAAE,OAAO,WAAW,OAAO,WAAW,MAAMA,OAAAA,OAAA;AAAA,EAC5C,EAAE,OAAO,eAAe,OAAO,eAAe,MAAMC,WAAAA,WAAA;AAAA,EACpD,EAAE,OAAO,YAAY,OAAO,YAAY,MAAMC,aAAAA,aAAA;AAChD;AAEA,MA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,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW;AAC3D,0CAAQ,QAAA,EAAK,WAAU,aAAa,UAAA,OAAO,KAAK,GAAE;AAAA,EACpD;AACA,MAAI;AACF,WACEA,+BAAC,SAAI,WAAU,gGACZ,eAAK,UAAU,OAAO,MAAM,CAAC,EAAA,CAChC;AAAA,EAEJ,QAAQ;AACN,WAAO,OAAO,KAAK;AAAA,EACrB;AACF;;"}
1
+ {"version":3,"file":"Properties.cjs","sources":["../../src/data/Properties.tsx"],"sourcesContent":["import {\n Fragment,\n useContext,\n useEffect,\n useState,\n type ReactNode,\n} from \"react\";\nimport { IconButton } from \"../components/IconButton\";\nimport {\n UiCheck,\n UiDotsVertical,\n UiListDashes,\n UiListFlat,\n UiRows,\n} from \"../icons\";\nimport { cn } from \"../lib/utils\";\nimport { DropdownMenu } from \"../overlay/DropdownMenu\";\nimport { Icon, type StaticIconComponent } from \"./Icon\";\nimport { formatPropertyLabel } from \"./properties-utils\";\nimport { PropertiesContext } from \"./properties-context\";\n\nexport type PropertiesAction<V = unknown> = {\n /** Stable action id. */\n id: string;\n /** Iconify name or imported icon component. */\n icon: string | StaticIconComponent;\n /** Accessible label and tooltip for this row action. */\n label: (key: string, value: V, item: PropertiesItem<V>) => string;\n /** Return false to hide the action for a specific row. */\n visible?: (key: string, value: V, item: PropertiesItem<V>) => boolean;\n /** Return true to disable the action for a specific row. */\n disabled?: (key: string, value: V, item: PropertiesItem<V>) => boolean;\n /** Called when the row action is clicked. */\n onClick: (key: string, value: V, item: PropertiesItem<V>) => void;\n};\n\nexport type PropertiesItem<V = unknown> = {\n /** Stable property key. Also used as the default label. */\n key: string;\n /** Property value passed to renderers and actions. */\n value: V;\n /** Secondary text shown below the label. */\n subtitle?: ReactNode;\n /** Hide this row without removing it from the item array. */\n hidden?: boolean;\n /** Enables a child area spanning both columns, with nested labels indented. */\n expandable?: boolean;\n /** Controlled expanded state. */\n expanded?: boolean;\n /** Called when an expandable row is toggled. */\n onToggle?: (next: boolean) => void;\n /** Child content rendered when the row is expanded. */\n renderChildren?: () => ReactNode;\n};\n\nexport type PropertiesDensity = \"comfortable\" | \"compact\" | \"spacious\";\n\nexport type PropertiesProps<V = unknown> = {\n /** Property rows to render. Hidden items are filtered out. */\n items: PropertiesItem<V>[];\n /** Custom label renderer. */\n renderLabel?: (key: string, value: V, item: PropertiesItem<V>) => ReactNode;\n /** Custom value renderer. */\n renderValue?: (key: string, value: V, item: PropertiesItem<V>) => ReactNode;\n /** Static icon name or function that returns an icon name per row. */\n labelIcon?:\n | string\n | ((key: string, value: V, item: PropertiesItem<V>) => string | undefined);\n /** Actions rendered before the value. */\n prefixActions?: PropertiesAction<V>[];\n /** Actions rendered after the value. */\n suffixActions?: PropertiesAction<V>[];\n /** Classes applied to the list root. */\n className?: string;\n /** Classes applied to each row. */\n rowClassName?: string;\n /** CSS grid columns applied to each row. Defaults to the selected density preset. */\n gridTemplateColumns?: string;\n /** Classes applied to each label cell. */\n labelClassName?: string;\n /** Classes applied to each value cell. */\n valueClassName?: string;\n /** Row density preset. */\n density?: PropertiesDensity;\n /** Stable reference used to persist this instance's density preference. */\n keyRef?: string;\n /** Show the display-options menu. */\n showDensityMenu?: boolean;\n /** Empty-state content when no rows are visible. */\n emptyMessage?: ReactNode;\n};\n\nconst PROPERTIES_DENSITY_STORAGE_PREFIX = \"clicky-ui-properties\";\n\nconst PROPERTIES_DENSITY_OPTIONS: Array<{\n value: PropertiesDensity;\n label: string;\n icon: StaticIconComponent;\n}> = [\n { value: \"compact\", label: \"Compact\", icon: UiRows },\n { value: \"comfortable\", label: \"Comfortable\", icon: UiListFlat },\n { value: \"spacious\", label: \"Spacious\", icon: UiListDashes },\n];\n\nconst DENSITY_CLASSES: Record<\n PropertiesDensity,\n { row: string; label: string; value: string; gridTemplateColumns: string }\n> = {\n spacious: {\n row: \"px-density-4 py-density-3\",\n label: \"text-sm font-medium text-muted-foreground\",\n value: \"text-base text-foreground\",\n gridTemplateColumns: \"minmax(12rem, 20rem) minmax(0, 1fr)\",\n },\n comfortable: {\n row: \"px-density-3 py-density-2\",\n label: \"text-xs font-medium text-muted-foreground\",\n value: \"text-sm text-foreground\",\n gridTemplateColumns: \"minmax(7rem, 12rem) minmax(0, 1fr)\",\n },\n compact: {\n row: \"px-density-2 py-density-1.5\",\n label: \"font-mono text-[11px] text-muted-foreground\",\n value: \"text-xs text-foreground\",\n gridTemplateColumns: \"minmax(8rem, 14rem) minmax(0, 1fr)\",\n },\n};\n\nexport function Properties<V = unknown>({\n items,\n renderLabel,\n renderValue,\n labelIcon,\n prefixActions,\n suffixActions,\n className,\n rowClassName,\n gridTemplateColumns,\n labelClassName,\n valueClassName,\n density = \"comfortable\",\n keyRef,\n showDensityMenu = true,\n emptyMessage = \"No properties\",\n}: PropertiesProps<V>) {\n const parent = useContext(PropertiesContext);\n const [densityOverride, setDensityOverride] = useState<PropertiesDensity>();\n useEffect(() => setDensityOverride(readStoredDensity(keyRef)), [keyRef]);\n\n const visible = items.filter((item) => !item.hidden);\n\n if (visible.length === 0) {\n return <div className=\"text-sm text-muted-foreground\">{emptyMessage}</div>;\n }\n\n const activeDensity = parent?.density ?? densityOverride ?? density;\n const styles = DENSITY_CLASSES[activeDensity];\n const columns =\n parent?.columns ?? gridTemplateColumns ?? styles.gridTemplateColumns;\n const depth = parent?.depth ?? 0;\n\n const updateDensity = (next: PropertiesDensity) => {\n setDensityOverride(next);\n writeStoredDensity(keyRef, next);\n };\n\n return (\n <dl\n className={cn(\n \"grid gap-x-density-3 divide-y divide-border rounded-md border border-border bg-muted/20\",\n parent && \"col-span-full rounded-none border-0 bg-transparent\",\n className,\n )}\n style={{ gridTemplateColumns: parent ? \"subgrid\" : columns }}\n >\n {showDensityMenu && !parent ? (\n <div className=\"col-span-full flex items-center justify-end px-density-2 py-density-1\">\n <dt className=\"sr-only\">Properties display options</dt>\n <dd>\n <PropertiesDensityMenu\n density={activeDensity}\n onChange={updateDensity}\n />\n </dd>\n </div>\n ) : null}\n {visible.map((item) => {\n const iconName =\n typeof labelIcon === \"function\"\n ? labelIcon(item.key, item.value, item)\n : labelIcon;\n const renderedLabel = renderLabel\n ? renderLabel(item.key, item.value, item)\n : formatPropertyLabel(item.key);\n const ariaLabel =\n typeof renderedLabel === \"string\" ? renderedLabel : item.key;\n\n return (\n <Fragment key={item.key}>\n <div\n className={cn(\n \"col-span-full grid min-w-0 grid-cols-subgrid gap-density-3\",\n styles.row,\n rowClassName,\n )}\n >\n <dt\n aria-label={ariaLabel}\n className={cn(\"min-w-0 truncate\", styles.label, labelClassName)}\n style={{ paddingInlineStart: depth * 16 }}\n >\n <div className=\"flex min-w-0 items-center gap-density-1\">\n {iconName ? (\n <Icon name={iconName} className=\"text-xs shrink-0\" />\n ) : null}\n <span className=\"min-w-0 truncate\">{renderedLabel}</span>\n </div>\n {item.subtitle ? (\n <div className=\"mt-0.5 text-[10px] font-normal text-muted-foreground/80\">\n {item.subtitle}\n </div>\n ) : null}\n </dt>\n <dd className={cn(\"min-w-0 space-y-density-1\", valueClassName)}>\n <div className=\"flex min-w-0 items-start gap-density-1\">\n <ActionList\n actions={prefixActions}\n item={item}\n className=\"shrink-0 pt-0.5\"\n />\n <div\n className={cn(\"min-w-0 max-w-full flex-1\", styles.value)}\n >\n {renderValue\n ? renderValue(item.key, item.value, item)\n : defaultRenderValue(item.value)}\n </div>\n <ActionList\n actions={suffixActions}\n item={item}\n className=\"shrink-0 pt-0.5\"\n />\n </div>\n </dd>\n </div>\n {item.expandable && item.expanded && item.renderChildren ? (\n <div className=\"col-span-full grid grid-cols-subgrid\">\n <dt className=\"sr-only\">{ariaLabel} properties</dt>\n <dd className=\"col-span-full grid min-w-0 grid-cols-subgrid\">\n <PropertiesContext.Provider\n value={{\n depth: depth + 1,\n columns,\n density: activeDensity,\n }}\n >\n {item.renderChildren()}\n </PropertiesContext.Provider>\n </dd>\n </div>\n ) : null}\n </Fragment>\n );\n })}\n </dl>\n );\n}\n\nfunction PropertiesDensityMenu({\n density,\n onChange,\n}: {\n density: PropertiesDensity;\n onChange: (density: PropertiesDensity) => void;\n}) {\n return (\n <DropdownMenu\n align=\"right\"\n menuLabel=\"Properties options\"\n trigger={\n <IconButton\n icon={UiDotsVertical}\n label=\"Properties options\"\n className=\"h-6 w-6\"\n />\n }\n >\n {(closeMenu) => (\n <div className=\"min-w-44 py-1 text-popover-foreground\">\n <div className=\"px-2 py-1 text-xs font-medium text-muted-foreground\">\n Density\n </div>\n {PROPERTIES_DENSITY_OPTIONS.map((option) => {\n const active = density === option.value;\n return (\n <button\n key={option.value}\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n className={densityMenuItemClassName(active)}\n onClick={() => {\n onChange(option.value);\n closeMenu();\n }}\n >\n <Icon\n icon={option.icon}\n className=\"text-sm text-muted-foreground\"\n />\n <span className=\"min-w-0 flex-1 truncate\">{option.label}</span>\n {active ? (\n <Icon icon={UiCheck} className=\"text-sm text-foreground\" />\n ) : (\n <span className=\"inline-block h-4 w-4\" aria-hidden />\n )}\n </button>\n );\n })}\n </div>\n )}\n </DropdownMenu>\n );\n}\n\nfunction densityMenuItemClassName(active: boolean): string {\n return cn(\n \"flex w-full items-center gap-2 px-2 py-1.5 text-left text-sm\",\n \"hover:bg-accent focus:bg-accent focus:outline-none\",\n active && \"bg-accent/60\",\n );\n}\n\nfunction readStoredDensity(\n keyRef: string | undefined,\n): PropertiesDensity | undefined {\n const storageKey = propertiesDensityStorageKey(keyRef);\n if (!storageKey || typeof window === \"undefined\") return undefined;\n\n try {\n const value = window.localStorage.getItem(storageKey);\n return isPropertiesDensity(value) ? value : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction writeStoredDensity(\n keyRef: string | undefined,\n density: PropertiesDensity,\n): void {\n const storageKey = propertiesDensityStorageKey(keyRef);\n if (!storageKey || typeof window === \"undefined\") return;\n\n try {\n window.localStorage.setItem(storageKey, density);\n } catch {\n // Display preferences are best-effort when browser storage is unavailable.\n }\n}\n\nfunction propertiesDensityStorageKey(\n keyRef: string | undefined,\n): string | undefined {\n const normalized = keyRef?.trim();\n return normalized\n ? `${PROPERTIES_DENSITY_STORAGE_PREFIX}:${normalized}:density`\n : undefined;\n}\n\nfunction isPropertiesDensity(value: unknown): value is PropertiesDensity {\n return value === \"compact\" || value === \"comfortable\" || value === \"spacious\";\n}\n\nfunction ActionList<V>({\n actions,\n item,\n className,\n}: {\n actions: PropertiesAction<V>[] | undefined;\n item: PropertiesItem<V>;\n className?: string;\n}) {\n if (!actions || actions.length === 0) return null;\n const rendered = actions.filter(\n (action) => !action.visible || action.visible(item.key, item.value, item),\n );\n if (rendered.length === 0) return null;\n return (\n <span className={cn(\"inline-flex items-center\", className)}>\n {rendered.map((action) => (\n <PropertiesActionButton key={action.id} action={action} item={item} />\n ))}\n </span>\n );\n}\n\nfunction PropertiesActionButton<V>({\n action,\n item,\n}: {\n action: PropertiesAction<V>;\n item: PropertiesItem<V>;\n}) {\n const label = action.label(item.key, item.value, item);\n const disabled = action.disabled?.(item.key, item.value, item) ?? false;\n return (\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n disabled={disabled}\n className={cn(\n \"inline-flex h-5 w-5 items-center justify-center rounded text-muted-foreground\",\n \"hover:bg-accent hover:text-foreground\",\n \"disabled:opacity-35 disabled:hover:bg-transparent disabled:hover:text-muted-foreground\",\n )}\n onClick={(event) => {\n event.stopPropagation();\n action.onClick(item.key, item.value, item);\n }}\n >\n <Icon\n {...(typeof action.icon === \"string\"\n ? { name: action.icon }\n : { icon: action.icon })}\n className=\"text-xs\"\n />\n </button>\n );\n}\n\nfunction defaultRenderValue(value: unknown): ReactNode {\n if (value === null || value === undefined) {\n return <span className=\"font-mono italic text-muted-foreground\">null</span>;\n }\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\" || typeof value === \"boolean\") {\n return <span className=\"font-mono\">{String(value)}</span>;\n }\n try {\n return (\n <pre className=\"max-h-48 overflow-auto whitespace-pre-wrap break-words font-mono text-[11px] leading-relaxed\">\n {JSON.stringify(value, null, 2)}\n </pre>\n );\n } catch {\n return String(value);\n }\n}\n"],"names":["UiRows","UiListFlat","UiListDashes","useContext","PropertiesContext","useState","useEffect","jsx","jsxs","cn","formatPropertyLabel","Fragment","Icon","DropdownMenu","IconButton","UiDotsVertical","UiCheck"],"mappings":";;;;;;;;;;;;;;;AA4FA,MAAM,oCAAoC;AAE1C,MAAM,6BAID;AAAA,EACH,EAAE,OAAO,WAAW,OAAO,WAAW,MAAMA,OAAAA,OAAA;AAAA,EAC5C,EAAE,OAAO,eAAe,OAAO,eAAe,MAAMC,WAAAA,WAAA;AAAA,EACpD,EAAE,OAAO,YAAY,OAAO,YAAY,MAAMC,aAAAA,aAAA;AAChD;AAEA,MAAM,kBAGF;AAAA,EACF,UAAU;AAAA,IACR,KAAK;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,IACP,qBAAqB;AAAA,EAAA;AAAA,EAEvB,aAAa;AAAA,IACX,KAAK;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,IACP,qBAAqB;AAAA,EAAA;AAAA,EAEvB,SAAS;AAAA,IACP,KAAK;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,IACP,qBAAqB;AAAA,EAAA;AAEzB;AAEO,SAAS,WAAwB;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,kBAAkB;AAAA,EAClB,eAAe;AACjB,GAAuB;AACrB,QAAM,SAASC,MAAAA,WAAWC,mCAAiB;AAC3C,QAAM,CAAC,iBAAiB,kBAAkB,IAAIC,eAAA;AAC9CC,QAAAA,UAAU,MAAM,mBAAmB,kBAAkB,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;AAEvE,QAAM,UAAU,MAAM,OAAO,CAAC,SAAS,CA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,EAAA;AAGN;AAEA,SAAS,mBAAmB,OAA2B;AACrD,MAAI,UAAU,QAAQ,UAAU,QAAW;AACzC,WAAOL,2BAAAA,IAAC,QAAA,EAAK,WAAU,0CAAyC,UAAA,QAAI;AAAA,EACtE;AACA,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW;AAC3D,0CAAQ,QAAA,EAAK,WAAU,aAAa,UAAA,OAAO,KAAK,GAAE;AAAA,EACpD;AACA,MAAI;AACF,WACEA,+BAAC,SAAI,WAAU,gGACZ,eAAK,UAAU,OAAO,MAAM,CAAC,EAAA,CAChC;AAAA,EAEJ,QAAQ;AACN,WAAO,OAAO,KAAK;AAAA,EACrB;AACF;;"}
@@ -1,4 +1,4 @@
1
- import { ReactNode } from '../../../../node_modules/@types/react/index.d.ts';
1
+ import { ReactNode } from 'react';
2
2
  import { StaticIconComponent } from './Icon';
3
3
  export type PropertiesAction<V = unknown> = {
4
4
  /** Stable action id. */
@@ -23,7 +23,7 @@ export type PropertiesItem<V = unknown> = {
23
23
  subtitle?: ReactNode;
24
24
  /** Hide this row without removing it from the item array. */
25
25
  hidden?: boolean;
26
- /** Enables an expandable child area below the row value. */
26
+ /** Enables a child area spanning both columns, with nested labels indented. */
27
27
  expandable?: boolean;
28
28
  /** Controlled expanded state. */
29
29
  expanded?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Properties.d.ts","sourceRoot":"","sources":["../../src/data/Properties.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAW5D,OAAO,EAAQ,KAAK,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAGxD,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,OAAO,IAAI;IAC1C,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,+CAA+C;IAC/C,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAAC;IACnC,wDAA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C,EAAE,CAAC;IACtC,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,0CAA0C;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0BAA0B;IAC1B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oDAAoD;IACpD,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B,CAAC;AAsCF,wBAAgB,UAAU,CAAC,CAAC,GAAG,OAAO,EAAE,EACtC,KAAK,EACL,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,aAAa,EACb,SAAS,EACT,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,OAAuB,EACvB,MAAM,EACN,eAAsB,EACtB,YAA8B,GAC/B,EAAE,eAAe,CAAC,CAAC,CAAC,+BA0HpB"}
@@ -1,10 +1,11 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useState, useEffect } from "react";
2
+ import { useContext, useState, useEffect, Fragment } from "react";
3
3
  import { IconButton } from "../components/IconButton.js";
4
4
  import { cn } from "../lib/utils.js";
5
5
  import { DropdownMenu } from "../overlay/DropdownMenu.js";
6
6
  import { Icon } from "./Icon.js";
7
7
  import { formatPropertyLabel } from "./properties-utils.js";
8
+ import { PropertiesContext } from "./properties-context.js";
8
9
  import { UiRows } from "../icons/components/UiRows.js";
9
10
  import { UiListFlat } from "../icons/components/UiListFlat.js";
10
11
  import { UiListDashes } from "../icons/components/UiListDashes.js";
@@ -53,14 +54,17 @@ function Properties({
53
54
  showDensityMenu = true,
54
55
  emptyMessage = "No properties"
55
56
  }) {
57
+ const parent = useContext(PropertiesContext);
56
58
  const [densityOverride, setDensityOverride] = useState();
57
59
  useEffect(() => setDensityOverride(readStoredDensity(keyRef)), [keyRef]);
58
60
  const visible = items.filter((item) => !item.hidden);
59
61
  if (visible.length === 0) {
60
62
  return /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: emptyMessage });
61
63
  }
62
- const activeDensity = densityOverride ?? density;
64
+ const activeDensity = (parent == null ? void 0 : parent.density) ?? densityOverride ?? density;
63
65
  const styles = DENSITY_CLASSES[activeDensity];
66
+ const columns = (parent == null ? void 0 : parent.columns) ?? gridTemplateColumns ?? styles.gridTemplateColumns;
67
+ const depth = (parent == null ? void 0 : parent.depth) ?? 0;
64
68
  const updateDensity = (next) => {
65
69
  setDensityOverride(next);
66
70
  writeStoredDensity(keyRef, next);
@@ -69,50 +73,97 @@ function Properties({
69
73
  "dl",
70
74
  {
71
75
  className: cn(
72
- "divide-y divide-border rounded-md border border-border bg-muted/20",
76
+ "grid gap-x-density-3 divide-y divide-border rounded-md border border-border bg-muted/20",
77
+ parent && "col-span-full rounded-none border-0 bg-transparent",
73
78
  className
74
79
  ),
80
+ style: { gridTemplateColumns: parent ? "subgrid" : columns },
75
81
  children: [
76
- showDensityMenu ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end px-density-2 py-density-1", children: [
82
+ showDensityMenu && !parent ? /* @__PURE__ */ jsxs("div", { className: "col-span-full flex items-center justify-end px-density-2 py-density-1", children: [
77
83
  /* @__PURE__ */ jsx("dt", { className: "sr-only", children: "Properties display options" }),
78
- /* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx(PropertiesDensityMenu, { density: activeDensity, onChange: updateDensity }) })
84
+ /* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx(
85
+ PropertiesDensityMenu,
86
+ {
87
+ density: activeDensity,
88
+ onChange: updateDensity
89
+ }
90
+ ) })
79
91
  ] }) : null,
80
92
  visible.map((item) => {
81
93
  const iconName = typeof labelIcon === "function" ? labelIcon(item.key, item.value, item) : labelIcon;
82
94
  const renderedLabel = renderLabel ? renderLabel(item.key, item.value, item) : formatPropertyLabel(item.key);
83
95
  const ariaLabel = typeof renderedLabel === "string" ? renderedLabel : item.key;
84
- return /* @__PURE__ */ jsxs(
85
- "div",
86
- {
87
- className: cn("grid min-w-0 gap-density-3", styles.row, rowClassName),
88
- style: { gridTemplateColumns: gridTemplateColumns ?? styles.gridTemplateColumns },
89
- children: [
90
- /* @__PURE__ */ jsxs(
91
- "dt",
92
- {
93
- "aria-label": ariaLabel,
94
- className: cn("min-w-0 truncate", styles.label, labelClassName),
95
- children: [
96
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-density-1", children: [
97
- iconName ? /* @__PURE__ */ jsx(Icon, { name: iconName, className: "text-xs shrink-0" }) : null,
98
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: renderedLabel })
99
- ] }),
100
- item.subtitle ? /* @__PURE__ */ jsx("div", { className: "mt-0.5 text-[10px] font-normal text-muted-foreground/80", children: item.subtitle }) : null
101
- ]
102
- }
96
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
97
+ /* @__PURE__ */ jsxs(
98
+ "div",
99
+ {
100
+ className: cn(
101
+ "col-span-full grid min-w-0 grid-cols-subgrid gap-density-3",
102
+ styles.row,
103
+ rowClassName
103
104
  ),
104
- /* @__PURE__ */ jsxs("dd", { className: cn("min-w-0 space-y-density-1", valueClassName), children: [
105
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-start gap-density-1", children: [
106
- /* @__PURE__ */ jsx(ActionList, { actions: prefixActions, item, className: "shrink-0 pt-0.5" }),
107
- /* @__PURE__ */ jsx("div", { className: cn("min-w-0 max-w-full flex-1", styles.value), children: renderValue ? renderValue(item.key, item.value, item) : defaultRenderValue(item.value) }),
108
- /* @__PURE__ */ jsx(ActionList, { actions: suffixActions, item, className: "shrink-0 pt-0.5" })
109
- ] }),
110
- item.expandable && item.expanded && item.renderChildren ? item.renderChildren() : null
111
- ] })
112
- ]
113
- },
114
- item.key
115
- );
105
+ children: [
106
+ /* @__PURE__ */ jsxs(
107
+ "dt",
108
+ {
109
+ "aria-label": ariaLabel,
110
+ className: cn("min-w-0 truncate", styles.label, labelClassName),
111
+ style: { paddingInlineStart: depth * 16 },
112
+ children: [
113
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-density-1", children: [
114
+ iconName ? /* @__PURE__ */ jsx(Icon, { name: iconName, className: "text-xs shrink-0" }) : null,
115
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: renderedLabel })
116
+ ] }),
117
+ item.subtitle ? /* @__PURE__ */ jsx("div", { className: "mt-0.5 text-[10px] font-normal text-muted-foreground/80", children: item.subtitle }) : null
118
+ ]
119
+ }
120
+ ),
121
+ /* @__PURE__ */ jsx("dd", { className: cn("min-w-0 space-y-density-1", valueClassName), children: /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-start gap-density-1", children: [
122
+ /* @__PURE__ */ jsx(
123
+ ActionList,
124
+ {
125
+ actions: prefixActions,
126
+ item,
127
+ className: "shrink-0 pt-0.5"
128
+ }
129
+ ),
130
+ /* @__PURE__ */ jsx(
131
+ "div",
132
+ {
133
+ className: cn("min-w-0 max-w-full flex-1", styles.value),
134
+ children: renderValue ? renderValue(item.key, item.value, item) : defaultRenderValue(item.value)
135
+ }
136
+ ),
137
+ /* @__PURE__ */ jsx(
138
+ ActionList,
139
+ {
140
+ actions: suffixActions,
141
+ item,
142
+ className: "shrink-0 pt-0.5"
143
+ }
144
+ )
145
+ ] }) })
146
+ ]
147
+ }
148
+ ),
149
+ item.expandable && item.expanded && item.renderChildren ? /* @__PURE__ */ jsxs("div", { className: "col-span-full grid grid-cols-subgrid", children: [
150
+ /* @__PURE__ */ jsxs("dt", { className: "sr-only", children: [
151
+ ariaLabel,
152
+ " properties"
153
+ ] }),
154
+ /* @__PURE__ */ jsx("dd", { className: "col-span-full grid min-w-0 grid-cols-subgrid", children: /* @__PURE__ */ jsx(
155
+ PropertiesContext.Provider,
156
+ {
157
+ value: {
158
+ depth: depth + 1,
159
+ columns,
160
+ density: activeDensity
161
+ },
162
+ children: item.renderChildren()
163
+ }
164
+ ) })
165
+ ] }) : null
166
+ ] }, item.key);
116
167
  })
117
168
  ]
118
169
  }