@flanksource/clicky-ui 0.3.19 → 0.3.20

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 (450) hide show
  1. package/dist/components/ErrorWrapper.cjs +1 -1
  2. package/dist/components/ErrorWrapper.cjs.map +1 -1
  3. package/dist/components/ErrorWrapper.js +1 -1
  4. package/dist/components/ErrorWrapper.js.map +1 -1
  5. package/dist/components/UnitStepControls.cjs +55 -0
  6. package/dist/components/UnitStepControls.cjs.map +1 -0
  7. package/dist/components/UnitStepControls.d.ts +10 -0
  8. package/dist/components/UnitStepControls.d.ts.map +1 -0
  9. package/dist/components/UnitStepControls.js +55 -0
  10. package/dist/components/UnitStepControls.js.map +1 -0
  11. package/dist/components/json-schema-form-accordion-array.cjs +5 -73
  12. package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
  13. package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
  14. package/dist/components/json-schema-form-accordion-array.js +3 -71
  15. package/dist/components/json-schema-form-accordion-array.js.map +1 -1
  16. package/dist/components/json-schema-form-array.cjs +6 -1
  17. package/dist/components/json-schema-form-array.cjs.map +1 -1
  18. package/dist/components/json-schema-form-array.d.ts.map +1 -1
  19. package/dist/components/json-schema-form-array.js +6 -1
  20. package/dist/components/json-schema-form-array.js.map +1 -1
  21. package/dist/components/json-schema-form-cards-array.cjs +96 -0
  22. package/dist/components/json-schema-form-cards-array.cjs.map +1 -0
  23. package/dist/components/json-schema-form-cards-array.d.ts +7 -0
  24. package/dist/components/json-schema-form-cards-array.d.ts.map +1 -0
  25. package/dist/components/json-schema-form-cards-array.js +96 -0
  26. package/dist/components/json-schema-form-cards-array.js.map +1 -0
  27. package/dist/components/json-schema-form-item-row.cjs +81 -0
  28. package/dist/components/json-schema-form-item-row.cjs.map +1 -0
  29. package/dist/components/json-schema-form-item-row.d.ts +19 -0
  30. package/dist/components/json-schema-form-item-row.d.ts.map +1 -0
  31. package/dist/components/json-schema-form-item-row.js +81 -0
  32. package/dist/components/json-schema-form-item-row.js.map +1 -0
  33. package/dist/components/json-schema-form-render.cjs +2 -2
  34. package/dist/components/json-schema-form-render.cjs.map +1 -1
  35. package/dist/components/json-schema-form-render.d.ts.map +1 -1
  36. package/dist/components/json-schema-form-render.js +2 -2
  37. package/dist/components/json-schema-form-render.js.map +1 -1
  38. package/dist/components/json-schema-form-resolve.cjs +1 -1
  39. package/dist/components/json-schema-form-resolve.cjs.map +1 -1
  40. package/dist/components/json-schema-form-resolve.js +1 -1
  41. package/dist/components/json-schema-form-resolve.js.map +1 -1
  42. package/dist/components/json-schema-form-tone.cjs +12 -0
  43. package/dist/components/json-schema-form-tone.cjs.map +1 -1
  44. package/dist/components/json-schema-form-tone.js +12 -0
  45. package/dist/components/json-schema-form-tone.js.map +1 -1
  46. package/dist/components/json-schema-form-types.d.ts +1 -1
  47. package/dist/components/json-schema-form-types.d.ts.map +1 -1
  48. package/dist/components/unit-form-extension.cjs +126 -0
  49. package/dist/components/unit-form-extension.cjs.map +1 -0
  50. package/dist/components/unit-form-extension.d.ts +8 -0
  51. package/dist/components/unit-form-extension.d.ts.map +1 -0
  52. package/dist/components/unit-form-extension.js +126 -0
  53. package/dist/components/unit-form-extension.js.map +1 -0
  54. package/dist/components.cjs +4 -0
  55. package/dist/components.cjs.map +1 -1
  56. package/dist/components.d.ts +1 -0
  57. package/dist/components.d.ts.map +1 -1
  58. package/dist/components.js +4 -0
  59. package/dist/components.js.map +1 -1
  60. package/dist/data/diagnostics/ErrorDetails.cjs +61 -8
  61. package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
  62. package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
  63. package/dist/data/diagnostics/ErrorDetails.js +61 -8
  64. package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
  65. package/dist/data/diagnostics/error-diagnostics.cjs +10 -4
  66. package/dist/data/diagnostics/error-diagnostics.cjs.map +1 -1
  67. package/dist/data/diagnostics/error-diagnostics.d.ts.map +1 -1
  68. package/dist/data/diagnostics/error-diagnostics.js +10 -4
  69. package/dist/data/diagnostics/error-diagnostics.js.map +1 -1
  70. package/dist/data/query-browser/QueryBrowser.cjs +12 -6
  71. package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
  72. package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
  73. package/dist/data/query-browser/QueryBrowser.js +12 -6
  74. package/dist/data/query-browser/QueryBrowser.js.map +1 -1
  75. package/dist/data/query-browser/QueryBrowser.types.cjs +2 -1
  76. package/dist/data/query-browser/QueryBrowser.types.cjs.map +1 -1
  77. package/dist/data/query-browser/QueryBrowser.types.d.ts +16 -14
  78. package/dist/data/query-browser/QueryBrowser.types.d.ts.map +1 -1
  79. package/dist/data/query-browser/QueryBrowser.types.js +2 -1
  80. package/dist/data/query-browser/QueryBrowser.types.js.map +1 -1
  81. package/dist/data/version-info.cjs +3 -3
  82. package/dist/data/version-info.js +3 -3
  83. package/dist/index.cjs +4 -0
  84. package/dist/index.cjs.map +1 -1
  85. package/dist/index.js +4 -0
  86. package/dist/index.js.map +1 -1
  87. package/dist/lib/string.cjs +8 -0
  88. package/dist/lib/string.cjs.map +1 -1
  89. package/dist/lib/string.d.ts +1 -0
  90. package/dist/lib/string.d.ts.map +1 -1
  91. package/dist/lib/string.js +8 -0
  92. package/dist/lib/string.js.map +1 -1
  93. package/dist/profiles/catalogTree.cjs +133 -0
  94. package/dist/profiles/catalogTree.cjs.map +1 -0
  95. package/dist/profiles/catalogTree.d.ts +11 -0
  96. package/dist/profiles/catalogTree.d.ts.map +1 -0
  97. package/dist/profiles/catalogTree.js +133 -0
  98. package/dist/profiles/catalogTree.js.map +1 -0
  99. package/dist/profiles/connectionBrowserModel.cjs +185 -0
  100. package/dist/profiles/connectionBrowserModel.cjs.map +1 -0
  101. package/dist/profiles/connectionBrowserModel.d.ts +169 -0
  102. package/dist/profiles/connectionBrowserModel.d.ts.map +1 -0
  103. package/dist/profiles/connectionBrowserModel.js +185 -0
  104. package/dist/profiles/connectionBrowserModel.js.map +1 -0
  105. package/dist/profiles/connectionQueryWorkspace.cjs +185 -0
  106. package/dist/profiles/connectionQueryWorkspace.cjs.map +1 -0
  107. package/dist/profiles/connectionQueryWorkspace.d.ts +63 -0
  108. package/dist/profiles/connectionQueryWorkspace.d.ts.map +1 -0
  109. package/dist/profiles/connectionQueryWorkspace.js +185 -0
  110. package/dist/profiles/connectionQueryWorkspace.js.map +1 -0
  111. package/dist/profiles/connectionQueryWorkspaceModel.cjs +28 -0
  112. package/dist/profiles/connectionQueryWorkspaceModel.cjs.map +1 -0
  113. package/dist/profiles/connectionQueryWorkspaceModel.d.ts +38 -0
  114. package/dist/profiles/connectionQueryWorkspaceModel.d.ts.map +1 -0
  115. package/dist/profiles/connectionQueryWorkspaceModel.js +28 -0
  116. package/dist/profiles/connectionQueryWorkspaceModel.js.map +1 -0
  117. package/dist/profiles/esFieldValues.cjs +64 -0
  118. package/dist/profiles/esFieldValues.cjs.map +1 -0
  119. package/dist/profiles/esFieldValues.d.ts +48 -0
  120. package/dist/profiles/esFieldValues.d.ts.map +1 -0
  121. package/dist/profiles/esFieldValues.js +64 -0
  122. package/dist/profiles/esFieldValues.js.map +1 -0
  123. package/dist/profiles/esParamMappingModel.cjs +301 -0
  124. package/dist/profiles/esParamMappingModel.cjs.map +1 -0
  125. package/dist/profiles/esParamMappingModel.d.ts +37 -0
  126. package/dist/profiles/esParamMappingModel.d.ts.map +1 -0
  127. package/dist/profiles/esParamMappingModel.js +301 -0
  128. package/dist/profiles/esParamMappingModel.js.map +1 -0
  129. package/dist/profiles/esParamMappingPill.cjs +24 -0
  130. package/dist/profiles/esParamMappingPill.cjs.map +1 -0
  131. package/dist/profiles/esParamMappingPill.d.ts +13 -0
  132. package/dist/profiles/esParamMappingPill.d.ts.map +1 -0
  133. package/dist/profiles/esParamMappingPill.js +24 -0
  134. package/dist/profiles/esParamMappingPill.js.map +1 -0
  135. package/dist/profiles/esParamOperandExtension.cjs +75 -0
  136. package/dist/profiles/esParamOperandExtension.cjs.map +1 -0
  137. package/dist/profiles/esParamOperandExtension.d.ts +11 -0
  138. package/dist/profiles/esParamOperandExtension.d.ts.map +1 -0
  139. package/dist/profiles/esParamOperandExtension.js +75 -0
  140. package/dist/profiles/esParamOperandExtension.js.map +1 -0
  141. package/dist/profiles/esQueryBuilder.cjs +205 -0
  142. package/dist/profiles/esQueryBuilder.cjs.map +1 -0
  143. package/dist/profiles/esQueryBuilder.d.ts +35 -0
  144. package/dist/profiles/esQueryBuilder.d.ts.map +1 -0
  145. package/dist/profiles/esQueryBuilder.js +205 -0
  146. package/dist/profiles/esQueryBuilder.js.map +1 -0
  147. package/dist/profiles/esQueryBuilderExtension.cjs +23 -0
  148. package/dist/profiles/esQueryBuilderExtension.cjs.map +1 -0
  149. package/dist/profiles/esQueryBuilderExtension.d.ts +5 -0
  150. package/dist/profiles/esQueryBuilderExtension.d.ts.map +1 -0
  151. package/dist/profiles/esQueryBuilderExtension.js +23 -0
  152. package/dist/profiles/esQueryBuilderExtension.js.map +1 -0
  153. package/dist/profiles/esQueryBuilderForm.cjs +26 -0
  154. package/dist/profiles/esQueryBuilderForm.cjs.map +1 -0
  155. package/dist/profiles/esQueryBuilderForm.d.ts +18 -0
  156. package/dist/profiles/esQueryBuilderForm.d.ts.map +1 -0
  157. package/dist/profiles/esQueryBuilderForm.js +26 -0
  158. package/dist/profiles/esQueryBuilderForm.js.map +1 -0
  159. package/dist/profiles/esQueryBuilderModel.cjs +131 -0
  160. package/dist/profiles/esQueryBuilderModel.cjs.map +1 -0
  161. package/dist/profiles/esQueryBuilderModel.d.ts +108 -0
  162. package/dist/profiles/esQueryBuilderModel.d.ts.map +1 -0
  163. package/dist/profiles/esQueryBuilderModel.js +131 -0
  164. package/dist/profiles/esQueryBuilderModel.js.map +1 -0
  165. package/dist/profiles/esQueryClauseGroup.cjs +144 -0
  166. package/dist/profiles/esQueryClauseGroup.cjs.map +1 -0
  167. package/dist/profiles/esQueryClauseGroup.d.ts +10 -0
  168. package/dist/profiles/esQueryClauseGroup.d.ts.map +1 -0
  169. package/dist/profiles/esQueryClauseGroup.js +144 -0
  170. package/dist/profiles/esQueryClauseGroup.js.map +1 -0
  171. package/dist/profiles/esQueryCompile.cjs +47 -0
  172. package/dist/profiles/esQueryCompile.cjs.map +1 -0
  173. package/dist/profiles/esQueryCompile.d.ts +39 -0
  174. package/dist/profiles/esQueryCompile.d.ts.map +1 -0
  175. package/dist/profiles/esQueryCompile.js +47 -0
  176. package/dist/profiles/esQueryCompile.js.map +1 -0
  177. package/dist/profiles/esQueryConditionRow.cjs +168 -0
  178. package/dist/profiles/esQueryConditionRow.cjs.map +1 -0
  179. package/dist/profiles/esQueryConditionRow.d.ts +37 -0
  180. package/dist/profiles/esQueryConditionRow.d.ts.map +1 -0
  181. package/dist/profiles/esQueryConditionRow.js +168 -0
  182. package/dist/profiles/esQueryConditionRow.js.map +1 -0
  183. package/dist/profiles/esQueryGroupModel.cjs +12 -0
  184. package/dist/profiles/esQueryGroupModel.cjs.map +1 -0
  185. package/dist/profiles/esQueryGroupModel.d.ts +9 -0
  186. package/dist/profiles/esQueryGroupModel.d.ts.map +1 -0
  187. package/dist/profiles/esQueryGroupModel.js +12 -0
  188. package/dist/profiles/esQueryGroupModel.js.map +1 -0
  189. package/dist/profiles/esQueryOccur.cjs +16 -0
  190. package/dist/profiles/esQueryOccur.cjs.map +1 -0
  191. package/dist/profiles/esQueryOccur.d.ts +11 -0
  192. package/dist/profiles/esQueryOccur.d.ts.map +1 -0
  193. package/dist/profiles/esQueryOccur.js +16 -0
  194. package/dist/profiles/esQueryOccur.js.map +1 -0
  195. package/dist/profiles/esQueryOperandEditors.cjs +279 -0
  196. package/dist/profiles/esQueryOperandEditors.cjs.map +1 -0
  197. package/dist/profiles/esQueryOperandEditors.d.ts +24 -0
  198. package/dist/profiles/esQueryOperandEditors.d.ts.map +1 -0
  199. package/dist/profiles/esQueryOperandEditors.js +279 -0
  200. package/dist/profiles/esQueryOperandEditors.js.map +1 -0
  201. package/dist/profiles/esQueryOperandModel.cjs +28 -0
  202. package/dist/profiles/esQueryOperandModel.cjs.map +1 -0
  203. package/dist/profiles/esQueryOperandModel.d.ts +17 -0
  204. package/dist/profiles/esQueryOperandModel.d.ts.map +1 -0
  205. package/dist/profiles/esQueryOperandModel.js +28 -0
  206. package/dist/profiles/esQueryOperandModel.js.map +1 -0
  207. package/dist/profiles/esQueryOperators.cjs +165 -0
  208. package/dist/profiles/esQueryOperators.cjs.map +1 -0
  209. package/dist/profiles/esQueryOperators.d.ts +83 -0
  210. package/dist/profiles/esQueryOperators.d.ts.map +1 -0
  211. package/dist/profiles/esQueryOperators.js +165 -0
  212. package/dist/profiles/esQueryOperators.js.map +1 -0
  213. package/dist/profiles/esQueryOutputEditor.cjs +138 -0
  214. package/dist/profiles/esQueryOutputEditor.cjs.map +1 -0
  215. package/dist/profiles/esQueryOutputEditor.d.ts +7 -0
  216. package/dist/profiles/esQueryOutputEditor.d.ts.map +1 -0
  217. package/dist/profiles/esQueryOutputEditor.js +138 -0
  218. package/dist/profiles/esQueryOutputEditor.js.map +1 -0
  219. package/dist/profiles/esQueryOutputModel.cjs +16 -0
  220. package/dist/profiles/esQueryOutputModel.cjs.map +1 -0
  221. package/dist/profiles/esQueryOutputModel.d.ts +14 -0
  222. package/dist/profiles/esQueryOutputModel.d.ts.map +1 -0
  223. package/dist/profiles/esQueryOutputModel.js +16 -0
  224. package/dist/profiles/esQueryOutputModel.js.map +1 -0
  225. package/dist/profiles/esQueryPreview.cjs +30 -0
  226. package/dist/profiles/esQueryPreview.cjs.map +1 -0
  227. package/dist/profiles/esQueryPreview.d.ts +6 -0
  228. package/dist/profiles/esQueryPreview.d.ts.map +1 -0
  229. package/dist/profiles/esQueryPreview.js +30 -0
  230. package/dist/profiles/esQueryPreview.js.map +1 -0
  231. package/dist/profiles/esQuerySortEditor.cjs +143 -0
  232. package/dist/profiles/esQuerySortEditor.cjs.map +1 -0
  233. package/dist/profiles/esQuerySortEditor.d.ts +9 -0
  234. package/dist/profiles/esQuerySortEditor.d.ts.map +1 -0
  235. package/dist/profiles/esQuerySortEditor.js +143 -0
  236. package/dist/profiles/esQuerySortEditor.js.map +1 -0
  237. package/dist/profiles/esQuerySortModel.cjs +13 -0
  238. package/dist/profiles/esQuerySortModel.cjs.map +1 -0
  239. package/dist/profiles/esQuerySortModel.d.ts +4 -0
  240. package/dist/profiles/esQuerySortModel.d.ts.map +1 -0
  241. package/dist/profiles/esQuerySortModel.js +13 -0
  242. package/dist/profiles/esQuerySortModel.js.map +1 -0
  243. package/dist/profiles/esValueCombobox.cjs +86 -0
  244. package/dist/profiles/esValueCombobox.cjs.map +1 -0
  245. package/dist/profiles/esValueCombobox.d.ts +15 -0
  246. package/dist/profiles/esValueCombobox.d.ts.map +1 -0
  247. package/dist/profiles/esValueCombobox.js +86 -0
  248. package/dist/profiles/esValueCombobox.js.map +1 -0
  249. package/dist/profiles/jsonPathSample.cjs +75 -0
  250. package/dist/profiles/jsonPathSample.cjs.map +1 -0
  251. package/dist/profiles/jsonPathSample.d.ts +27 -0
  252. package/dist/profiles/jsonPathSample.d.ts.map +1 -0
  253. package/dist/profiles/jsonPathSample.js +75 -0
  254. package/dist/profiles/jsonPathSample.js.map +1 -0
  255. package/dist/profiles/jsonPathSampleRow.cjs +14 -0
  256. package/dist/profiles/jsonPathSampleRow.cjs.map +1 -0
  257. package/dist/profiles/jsonPathSampleRow.d.ts +6 -0
  258. package/dist/profiles/jsonPathSampleRow.d.ts.map +1 -0
  259. package/dist/profiles/jsonPathSampleRow.js +14 -0
  260. package/dist/profiles/jsonPathSampleRow.js.map +1 -0
  261. package/dist/profiles/profileApi.cjs +37 -0
  262. package/dist/profiles/profileApi.cjs.map +1 -0
  263. package/dist/profiles/profileApi.d.ts +32 -0
  264. package/dist/profiles/profileApi.d.ts.map +1 -0
  265. package/dist/profiles/profileApi.js +37 -0
  266. package/dist/profiles/profileApi.js.map +1 -0
  267. package/dist/profiles/profileBuilder.cjs +65 -0
  268. package/dist/profiles/profileBuilder.cjs.map +1 -0
  269. package/dist/profiles/profileBuilder.d.ts +11 -0
  270. package/dist/profiles/profileBuilder.d.ts.map +1 -0
  271. package/dist/profiles/profileBuilder.js +65 -0
  272. package/dist/profiles/profileBuilder.js.map +1 -0
  273. package/dist/profiles/profileBuilderExtension.cjs +25 -0
  274. package/dist/profiles/profileBuilderExtension.cjs.map +1 -0
  275. package/dist/profiles/profileBuilderExtension.d.ts +5 -0
  276. package/dist/profiles/profileBuilderExtension.d.ts.map +1 -0
  277. package/dist/profiles/profileBuilderExtension.js +25 -0
  278. package/dist/profiles/profileBuilderExtension.js.map +1 -0
  279. package/dist/profiles/profileBuilderWorkspace.cjs +368 -0
  280. package/dist/profiles/profileBuilderWorkspace.cjs.map +1 -0
  281. package/dist/profiles/profileBuilderWorkspace.d.ts +21 -0
  282. package/dist/profiles/profileBuilderWorkspace.d.ts.map +1 -0
  283. package/dist/profiles/profileBuilderWorkspace.js +368 -0
  284. package/dist/profiles/profileBuilderWorkspace.js.map +1 -0
  285. package/dist/profiles/profileColumnModel.cjs +23 -0
  286. package/dist/profiles/profileColumnModel.cjs.map +1 -0
  287. package/dist/profiles/profileColumnModel.d.ts +8 -0
  288. package/dist/profiles/profileColumnModel.d.ts.map +1 -0
  289. package/dist/profiles/profileColumnModel.js +23 -0
  290. package/dist/profiles/profileColumnModel.js.map +1 -0
  291. package/dist/profiles/profileColumnPicker.cjs +68 -0
  292. package/dist/profiles/profileColumnPicker.cjs.map +1 -0
  293. package/dist/profiles/profileColumnPicker.d.ts +11 -0
  294. package/dist/profiles/profileColumnPicker.d.ts.map +1 -0
  295. package/dist/profiles/profileColumnPicker.js +68 -0
  296. package/dist/profiles/profileColumnPicker.js.map +1 -0
  297. package/dist/profiles/profileEditor.cjs +386 -0
  298. package/dist/profiles/profileEditor.cjs.map +1 -0
  299. package/dist/profiles/profileEditor.d.ts +19 -0
  300. package/dist/profiles/profileEditor.d.ts.map +1 -0
  301. package/dist/profiles/profileEditor.js +386 -0
  302. package/dist/profiles/profileEditor.js.map +1 -0
  303. package/dist/profiles/profileEditorModel.cjs +181 -0
  304. package/dist/profiles/profileEditorModel.cjs.map +1 -0
  305. package/dist/profiles/profileEditorModel.d.ts +74 -0
  306. package/dist/profiles/profileEditorModel.d.ts.map +1 -0
  307. package/dist/profiles/profileEditorModel.js +181 -0
  308. package/dist/profiles/profileEditorModel.js.map +1 -0
  309. package/dist/profiles/profileEditorPreview.cjs +38 -0
  310. package/dist/profiles/profileEditorPreview.cjs.map +1 -0
  311. package/dist/profiles/profileEditorPreview.d.ts +12 -0
  312. package/dist/profiles/profileEditorPreview.d.ts.map +1 -0
  313. package/dist/profiles/profileEditorPreview.js +38 -0
  314. package/dist/profiles/profileEditorPreview.js.map +1 -0
  315. package/dist/profiles/profileEditorRail.cjs +46 -0
  316. package/dist/profiles/profileEditorRail.cjs.map +1 -0
  317. package/dist/profiles/profileEditorRail.d.ts +8 -0
  318. package/dist/profiles/profileEditorRail.d.ts.map +1 -0
  319. package/dist/profiles/profileEditorRail.js +46 -0
  320. package/dist/profiles/profileEditorRail.js.map +1 -0
  321. package/dist/profiles/profileEditorRaw.cjs +118 -0
  322. package/dist/profiles/profileEditorRaw.cjs.map +1 -0
  323. package/dist/profiles/profileEditorRaw.d.ts +7 -0
  324. package/dist/profiles/profileEditorRaw.d.ts.map +1 -0
  325. package/dist/profiles/profileEditorRaw.js +118 -0
  326. package/dist/profiles/profileEditorRaw.js.map +1 -0
  327. package/dist/profiles/profileEditorRoutes.cjs +7 -0
  328. package/dist/profiles/profileEditorRoutes.cjs.map +1 -0
  329. package/dist/profiles/profileEditorRoutes.d.ts +2 -0
  330. package/dist/profiles/profileEditorRoutes.d.ts.map +1 -0
  331. package/dist/profiles/profileEditorRoutes.js +7 -0
  332. package/dist/profiles/profileEditorRoutes.js.map +1 -0
  333. package/dist/profiles/profileEditorSections.cjs +213 -0
  334. package/dist/profiles/profileEditorSections.cjs.map +1 -0
  335. package/dist/profiles/profileEditorSections.d.ts +23 -0
  336. package/dist/profiles/profileEditorSections.d.ts.map +1 -0
  337. package/dist/profiles/profileEditorSections.js +213 -0
  338. package/dist/profiles/profileEditorSections.js.map +1 -0
  339. package/dist/profiles/profileFieldEditor.cjs +200 -0
  340. package/dist/profiles/profileFieldEditor.cjs.map +1 -0
  341. package/dist/profiles/profileFieldEditor.d.ts +34 -0
  342. package/dist/profiles/profileFieldEditor.d.ts.map +1 -0
  343. package/dist/profiles/profileFieldEditor.js +200 -0
  344. package/dist/profiles/profileFieldEditor.js.map +1 -0
  345. package/dist/profiles/profileFieldGrid.cjs +250 -0
  346. package/dist/profiles/profileFieldGrid.cjs.map +1 -0
  347. package/dist/profiles/profileFieldGrid.d.ts +20 -0
  348. package/dist/profiles/profileFieldGrid.d.ts.map +1 -0
  349. package/dist/profiles/profileFieldGrid.js +250 -0
  350. package/dist/profiles/profileFieldGrid.js.map +1 -0
  351. package/dist/profiles/profileFieldManager.cjs +103 -0
  352. package/dist/profiles/profileFieldManager.cjs.map +1 -0
  353. package/dist/profiles/profileFieldManager.d.ts +9 -0
  354. package/dist/profiles/profileFieldManager.d.ts.map +1 -0
  355. package/dist/profiles/profileFieldManager.js +103 -0
  356. package/dist/profiles/profileFieldManager.js.map +1 -0
  357. package/dist/profiles/profileFieldState.cjs +136 -0
  358. package/dist/profiles/profileFieldState.cjs.map +1 -0
  359. package/dist/profiles/profileFieldState.d.ts +41 -0
  360. package/dist/profiles/profileFieldState.d.ts.map +1 -0
  361. package/dist/profiles/profileFieldState.js +136 -0
  362. package/dist/profiles/profileFieldState.js.map +1 -0
  363. package/dist/profiles/profileFieldTypes.cjs +17 -0
  364. package/dist/profiles/profileFieldTypes.cjs.map +1 -0
  365. package/dist/profiles/profileFieldTypes.d.ts +8 -0
  366. package/dist/profiles/profileFieldTypes.d.ts.map +1 -0
  367. package/dist/profiles/profileFieldTypes.js +17 -0
  368. package/dist/profiles/profileFieldTypes.js.map +1 -0
  369. package/dist/profiles/profileParamModel.cjs +78 -0
  370. package/dist/profiles/profileParamModel.cjs.map +1 -0
  371. package/dist/profiles/profileParamModel.d.ts +3 -0
  372. package/dist/profiles/profileParamModel.d.ts.map +1 -0
  373. package/dist/profiles/profileParamModel.js +78 -0
  374. package/dist/profiles/profileParamModel.js.map +1 -0
  375. package/dist/profiles/profileSamplePayload.cjs +15 -0
  376. package/dist/profiles/profileSamplePayload.cjs.map +1 -0
  377. package/dist/profiles/profileSamplePayload.d.ts +13 -0
  378. package/dist/profiles/profileSamplePayload.d.ts.map +1 -0
  379. package/dist/profiles/profileSamplePayload.js +15 -0
  380. package/dist/profiles/profileSamplePayload.js.map +1 -0
  381. package/dist/profiles/profileWizard.cjs +257 -0
  382. package/dist/profiles/profileWizard.cjs.map +1 -0
  383. package/dist/profiles/profileWizard.d.ts +12 -0
  384. package/dist/profiles/profileWizard.d.ts.map +1 -0
  385. package/dist/profiles/profileWizard.js +257 -0
  386. package/dist/profiles/profileWizard.js.map +1 -0
  387. package/dist/profiles/profileWizardHelp.cjs +10 -0
  388. package/dist/profiles/profileWizardHelp.cjs.map +1 -0
  389. package/dist/profiles/profileWizardHelp.d.ts +13 -0
  390. package/dist/profiles/profileWizardHelp.d.ts.map +1 -0
  391. package/dist/profiles/profileWizardHelp.js +10 -0
  392. package/dist/profiles/profileWizardHelp.js.map +1 -0
  393. package/dist/profiles/profileWizardModel.cjs +198 -0
  394. package/dist/profiles/profileWizardModel.cjs.map +1 -0
  395. package/dist/profiles/profileWizardModel.d.ts +255 -0
  396. package/dist/profiles/profileWizardModel.d.ts.map +1 -0
  397. package/dist/profiles/profileWizardModel.js +198 -0
  398. package/dist/profiles/profileWizardModel.js.map +1 -0
  399. package/dist/profiles/profileWizardQueryStep.cjs +215 -0
  400. package/dist/profiles/profileWizardQueryStep.cjs.map +1 -0
  401. package/dist/profiles/profileWizardQueryStep.d.ts +18 -0
  402. package/dist/profiles/profileWizardQueryStep.d.ts.map +1 -0
  403. package/dist/profiles/profileWizardQueryStep.js +215 -0
  404. package/dist/profiles/profileWizardQueryStep.js.map +1 -0
  405. package/dist/profiles/profileWizardSteps.cjs +214 -0
  406. package/dist/profiles/profileWizardSteps.cjs.map +1 -0
  407. package/dist/profiles/profileWizardSteps.d.ts +35 -0
  408. package/dist/profiles/profileWizardSteps.d.ts.map +1 -0
  409. package/dist/profiles/profileWizardSteps.js +214 -0
  410. package/dist/profiles/profileWizardSteps.js.map +1 -0
  411. package/dist/profiles/profileYaml.cjs +19 -0
  412. package/dist/profiles/profileYaml.cjs.map +1 -0
  413. package/dist/profiles/profileYaml.d.ts +4 -0
  414. package/dist/profiles/profileYaml.d.ts.map +1 -0
  415. package/dist/profiles/profileYaml.js +19 -0
  416. package/dist/profiles/profileYaml.js.map +1 -0
  417. package/dist/profiles/prometheusResults.cjs +60 -0
  418. package/dist/profiles/prometheusResults.cjs.map +1 -0
  419. package/dist/profiles/prometheusResults.d.ts +7 -0
  420. package/dist/profiles/prometheusResults.d.ts.map +1 -0
  421. package/dist/profiles/prometheusResults.js +60 -0
  422. package/dist/profiles/prometheusResults.js.map +1 -0
  423. package/dist/profiles/queryRowLimits.cjs +82 -0
  424. package/dist/profiles/queryRowLimits.cjs.map +1 -0
  425. package/dist/profiles/queryRowLimits.d.ts +9 -0
  426. package/dist/profiles/queryRowLimits.d.ts.map +1 -0
  427. package/dist/profiles/queryRowLimits.js +82 -0
  428. package/dist/profiles/queryRowLimits.js.map +1 -0
  429. package/dist/profiles/queryRowLimitsModel.cjs +10 -0
  430. package/dist/profiles/queryRowLimitsModel.cjs.map +1 -0
  431. package/dist/profiles/queryRowLimitsModel.d.ts +9 -0
  432. package/dist/profiles/queryRowLimitsModel.d.ts.map +1 -0
  433. package/dist/profiles/queryRowLimitsModel.js +10 -0
  434. package/dist/profiles/queryRowLimitsModel.js.map +1 -0
  435. package/dist/profiles/queryTargetPicker.cjs +42 -0
  436. package/dist/profiles/queryTargetPicker.cjs.map +1 -0
  437. package/dist/profiles/queryTargetPicker.d.ts +8 -0
  438. package/dist/profiles/queryTargetPicker.d.ts.map +1 -0
  439. package/dist/profiles/queryTargetPicker.js +42 -0
  440. package/dist/profiles/queryTargetPicker.js.map +1 -0
  441. package/dist/profiles/testSchema.d.ts +3 -0
  442. package/dist/profiles/testSchema.d.ts.map +1 -0
  443. package/dist/profiles.cjs +223 -0
  444. package/dist/profiles.cjs.map +1 -0
  445. package/dist/profiles.d.ts +68 -0
  446. package/dist/profiles.d.ts.map +1 -0
  447. package/dist/profiles.js +223 -0
  448. package/dist/profiles.js.map +1 -0
  449. package/dist/styles.css +1 -1
  450. package/package.json +6 -1
@@ -1 +1 @@
1
- {"version":3,"file":"json-schema-form-resolve.cjs","sources":["../../src/components/json-schema-form-resolve.ts"],"sourcesContent":["import { createElement, type ReactNode } from \"react\";\nimport type {\n ArrayDisplay,\n EnumDisplay,\n FieldControl,\n FieldOption,\n HelpDisplay,\n JsonSchemaObject,\n JsonSchemaProperty,\n LookupDescriptor,\n} from \"./json-schema-form-types\";\nimport { LabelIcon } from \"../data/Icon\";\nimport { resolveItemSpec } from \"./json-schema-form-item-summary\";\nimport { isFieldTone } from \"./json-schema-form-tone\";\nimport { isPlainObject } from \"./json-schema-form-utils\";\n\n// isOpenStringMap reports whether a property is an object whose entries are\n// described by a sub-schema in `additionalProperties` (a typed key/value map) or\n// by `patternProperties` (a per-key-pattern value map). Either makes it an\n// editable key/value control rather than a fixed-property sub-form.\nexport function isOpenStringMap(prop: JsonSchemaProperty): boolean {\n if (!schemaRendersAsObject(prop)) return false;\n if (\n typeof prop.additionalProperties === \"object\" &&\n prop.additionalProperties !== null\n ) {\n return true;\n }\n return (\n !!prop.patternProperties && Object.keys(prop.patternProperties).length > 0\n );\n}\n\n// patternSchemasOf compiles a schema's `patternProperties` into the ordered\n// {pattern, schema} list the string-map control matches keys against.\nfunction patternSchemasOf(\n prop: JsonSchemaProperty,\n): { pattern: string; schema: JsonSchemaProperty }[] | undefined {\n const pp = prop.patternProperties;\n if (!pp || Object.keys(pp).length === 0) return undefined;\n return Object.entries(pp).map(([pattern, schema]) => ({ pattern, schema }));\n}\n\nfunction schemaHasType(prop: JsonSchemaProperty, type: string): boolean {\n if (Array.isArray(prop.type)) return prop.type.includes(type as never);\n return prop.type === type;\n}\n\n// schemaRendersAsObject accepts schemas that omit `type` but use object-only\n// keywords, including composed schemas whose local refs were rehydrated into\n// unconditional allOf members. An explicit incompatible type always wins.\nexport function schemaRendersAsObject(prop: JsonSchemaProperty): boolean {\n if (schemaHasType(prop, \"object\")) return true;\n if (prop.type !== undefined) return false;\n if (\n prop.properties !== undefined ||\n prop.required !== undefined ||\n prop.additionalProperties !== undefined ||\n prop.patternProperties !== undefined ||\n prop.propertyNames !== undefined ||\n prop.unevaluatedProperties !== undefined\n ) {\n return true;\n }\n return (\n prop.allOf?.some(\n (clause) =>\n clause.if === undefined &&\n clause.then === undefined &&\n schemaRendersAsObject(clause as JsonSchemaProperty),\n ) ?? false\n );\n}\n\nfunction enumOptions(prop: JsonSchemaProperty): FieldOption[] {\n const labels = prop[\"x-enum-labels\"];\n const icons = prop[\"x-enum-icons\"];\n const descriptions = prop[\"x-enum-descriptions\"];\n const tones = prop[\"x-enum-tones\"];\n return (prop.enum ?? []).map((v) => {\n const value = String(v);\n const desc = labels?.[value];\n const icon = icons?.[value];\n const description = descriptions?.[value];\n const tone = tones?.[value];\n return {\n value,\n label:\n typeof desc === \"string\" && desc && desc !== value\n ? `${desc} (${value})`\n : value,\n ...(typeof icon === \"string\" && icon ? { icon } : {}),\n ...(typeof description === \"string\" && description\n ? { description }\n : {}),\n ...(isFieldTone(tone) ? { tone } : {}),\n };\n });\n}\n\n// enumDisplay resolves how an enum should render: an explicit `x-enum-display`\n// wins; otherwise an enum carrying `x-enum-icons` defaults to the icon grid.\n// Returns undefined to keep the combobox default.\nfunction enumDisplay(prop: JsonSchemaProperty): EnumDisplay | undefined {\n const d = prop[\"x-enum-display\"];\n if (d === \"combobox\" || d === \"radio\" || d === \"grid\" || d === \"segmented\")\n return d;\n const icons = prop[\"x-enum-icons\"];\n if (icons && Object.keys(icons).length > 0) return \"grid\";\n return undefined;\n}\n\nfunction arrayDisplay(prop: JsonSchemaProperty): ArrayDisplay | undefined {\n const d = prop[\"x-array-display\"];\n return d === \"filter-pills\" || d === \"accordion\" ? d : undefined;\n}\n\n// helpDisplay reads the per-field `x-help-display` override. Returns undefined\n// to defer to the form-level FormLayout.help.\nfunction helpDisplay(prop: JsonSchemaProperty): HelpDisplay | undefined {\n const d = prop[\"x-help-display\"];\n return d === \"inline\" || d === \"hover\" ? d : undefined;\n}\n\nexport function schemaHelper(prop: JsonSchemaProperty): string | undefined {\n const description =\n typeof prop.description === \"string\" ? prop.description.trim() : \"\";\n const help = prop[\"x-help\"];\n const helpBody =\n isPlainObject(help) && typeof help.body === \"string\"\n ? help.body.trim()\n : \"\";\n\n if (description && helpBody && helpBody !== description) {\n return `${description} ${helpBody}`;\n }\n return description || helpBody || undefined;\n}\n\n// adornmentNode builds a prefix/suffix node from the x-input-*[-icon] extensions:\n// a runtime icon name wins, else static text. Returns undefined when neither set.\nfunction adornmentNode(iconName: unknown, text: unknown): ReactNode {\n if (typeof iconName === \"string\" && iconName) {\n // Match the library's InputField field-icon convention (16px, muted/70) so a\n // schema-driven field lines up with a hand-built one.\n return createElement(LabelIcon, {\n icon: iconName,\n className: \"size-4 text-muted-foreground/70\",\n });\n }\n if (typeof text === \"string\" && text) {\n return createElement(\n \"span\",\n { className: \"text-sm text-muted-foreground\" },\n text,\n );\n }\n return undefined;\n}\n\n// enumBranch returns the first anyOf/oneOf member carrying a non-empty `enum`,\n// for a union of \"an enum value OR a free-form string\" (e.g. a value-or-token\n// field). It lets such a union render as a dropdown. Returns undefined when no\n// branch enumerates values.\nexport function enumBranch(\n prop: JsonSchemaProperty,\n): JsonSchemaProperty | undefined {\n for (const branch of [...(prop.anyOf ?? []), ...(prop.oneOf ?? [])]) {\n if (Array.isArray(branch.enum) && branch.enum.length > 0) return branch;\n }\n return undefined;\n}\n\n// lookupDescriptor reads the `x-clicky-lookup` extension into a LookupDescriptor,\n// returning undefined when the keyword is absent or lacks its required url/filter.\nfunction lookupDescriptor(\n prop: JsonSchemaProperty,\n): LookupDescriptor | undefined {\n const raw = prop[\"x-clicky-lookup\"];\n if (!raw || typeof raw !== \"object\") return undefined;\n const d = raw as Record<string, unknown>;\n if (typeof d.url !== \"string\" || typeof d.filter !== \"string\")\n return undefined;\n return raw as LookupDescriptor;\n}\n\nexport interface ResolveControlArgs {\n key: string;\n prop: JsonSchemaProperty;\n required: boolean;\n value: unknown;\n onChange: (next: unknown) => void;\n}\n\n// resolveControl infers a base, render-ready FieldControl from a property\n// schema. It keys off schema keywords only — never the field name: ascode/token\n// heuristics are layered on by consumer pre-extensions. The one exception is the\n// standard `format: date`/`date-time` keyword, which is a schema-declared signal\n// (not a name guess) and so drives a date control directly. First match wins.\nexport function resolveControl(args: ResolveControlArgs): FieldControl {\n const { key, prop, required, value, onChange } = args;\n const labelIcon = prop[\"x-icon\"];\n const xLayout = prop[\"x-layout\"];\n const explicitLayout =\n xLayout === \"inline\" || xLayout === \"stack\" || xLayout === \"table\"\n ? xLayout\n : undefined;\n // `x-label-position` is a friendlier alias over the same per-field layout knob:\n // \"top\" stacks the label above the value; \"left\" forces inline. `x-layout` wins.\n const labelPosition = prop[\"x-label-position\"];\n const layout =\n explicitLayout ??\n (labelPosition === \"top\"\n ? \"stack\"\n : labelPosition === \"left\"\n ? \"inline\"\n : undefined);\n const prefix = adornmentNode(\n prop[\"x-input-prefix-icon\"],\n prop[\"x-input-prefix\"],\n );\n const suffix = adornmentNode(\n prop[\"x-input-suffix-icon\"],\n prop[\"x-input-suffix\"],\n );\n const labelClassName =\n typeof prop[\"x-label-classes\"] === \"string\"\n ? prop[\"x-label-classes\"]\n : undefined;\n const inputClassName =\n typeof prop[\"x-input-classes\"] === \"string\"\n ? prop[\"x-input-classes\"]\n : undefined;\n const colSpan =\n prop[\"x-col-span\"] === \"full\"\n ? (\"full\" as const)\n : typeof prop[\"x-col-span\"] === \"number\" &&\n Number.isFinite(prop[\"x-col-span\"])\n ? prop[\"x-col-span\"]\n : undefined;\n const keyOptions = keyOptionsFor(prop);\n const helper = schemaHelper(prop);\n const helpMode = helpDisplay(prop);\n const base: FieldControl = {\n key,\n kind: \"string\",\n label: typeof prop.title === \"string\" && prop.title ? prop.title : key,\n required,\n schema: prop,\n value,\n onChange,\n ...(prop.readOnly === true ? { readOnly: true } : {}),\n ...(typeof prop.description === \"string\"\n ? { description: prop.description }\n : {}),\n ...(helper ? { helper } : {}),\n ...(helpMode ? { helpDisplay: helpMode } : {}),\n ...(labelIcon != null && labelIcon !== \"\"\n ? { labelIcon: labelIcon as FieldControl[\"labelIcon\"] }\n : {}),\n ...(layout ? { layout } : {}),\n ...(prefix ? { prefix } : {}),\n ...(suffix ? { suffix } : {}),\n ...(labelClassName ? { labelClassName } : {}),\n ...(inputClassName ? { inputClassName } : {}),\n ...(colSpan != null ? { colSpan } : {}),\n };\n\n // An `x-clicky-lookup` field is an async entity-reference picker: options load\n // lazily from another entity's list endpoint. Single-select also allows\n // free-form entry so a typed value outside the option set still commits.\n const lookup = lookupDescriptor(prop);\n if (lookup) {\n return {\n ...base,\n kind: \"lookup\",\n lookup,\n options: [],\n allowCustomValue: lookup.multi !== true,\n };\n }\n if (Array.isArray(prop.enum) && prop.enum.length > 0) {\n const display = enumDisplay(prop);\n return {\n ...base,\n kind: \"enum\",\n options: enumOptions(prop),\n ...(display ? { display } : {}),\n };\n }\n // A value-or-template union: the enum lives in an anyOf/oneOf branch alongside\n // free-form branches. Render it as a dropdown using that branch's enum; the\n // free-form branches are honoured via a consumer's allowCustomValue pre-ext.\n const branch = enumBranch(prop);\n if (branch) {\n return { ...base, kind: \"enum\", options: enumOptions(branch) };\n }\n // A schema-declared date/date-time string renders as a date control.\n if (prop.format === \"date\" || prop.format === \"date-time\") {\n return { ...base, kind: \"date\", dateFormat: prop.format };\n }\n // A long-form string declares `format: textarea` to render a multi-line box.\n if (prop.format === \"textarea\" && schemaHasType(prop, \"string\")) {\n return { ...base, kind: \"textarea\" };\n }\n // A markdown string declares `format: md` to render the MDXEditor-backed\n // editor. Plugin toggles live under `x-md-editor` so schema authors can keep\n // the format signal standard-sized and the editor behavior explicit.\n if (prop.format === \"md\" && schemaHasType(prop, \"string\")) {\n const markdownOptions = prop[\"x-md-editor\"];\n return {\n ...base,\n kind: \"markdown\",\n ...(isPlainObject(markdownOptions) ? { markdownOptions } : {}),\n };\n }\n if (schemaHasType(prop, \"boolean\")) {\n return { ...base, kind: \"boolean\" };\n }\n if (schemaHasType(prop, \"integer\") || schemaHasType(prop, \"number\")) {\n return {\n ...base,\n kind: \"number\",\n coerceNumber: true,\n // A percent number carries a static \"%\" unit shown inside the input.\n ...(prop.format === \"percent\" ? { unit: \"%\" } : {}),\n ...(typeof prop.minimum === \"number\" ? { minimum: prop.minimum } : {}),\n };\n }\n if (schemaHasType(prop, \"array\")) {\n const display = arrayDisplay(prop);\n const itemSchema = prop.items;\n return {\n ...base,\n kind: \"array\",\n ...(itemSchema ? { itemSchema } : {}),\n ...(display ? { arrayDisplay: display } : {}),\n ...(display === \"accordion\" ? { itemSpec: resolveItemSpec(prop, itemSchema) } : {}),\n // An accordion reuses the array's description as the zero-item copy in its\n // add row, so a paragraph of the same sentence directly above would be a\n // literal duplicate. The schema can still say otherwise.\n ...(display === \"accordion\" && !helpMode ? { helpDisplay: \"hover\" as const } : {}),\n ...(display && itemSchema && Array.isArray(itemSchema.enum)\n ? { options: enumOptions(itemSchema) }\n : {}),\n ...(layout ? { layout } : {}),\n };\n }\n // An open map: object whose entries are described by an additionalProperties\n // sub-schema and/or per-key patternProperties. Renders as editable key/value\n // rows (+ any known properties), with the value form resolved per key.\n if (isOpenStringMap(prop)) {\n const addl =\n typeof prop.additionalProperties === \"object\" &&\n prop.additionalProperties !== null\n ? (prop.additionalProperties as JsonSchemaProperty)\n : undefined;\n const patterns = patternSchemasOf(prop);\n // A constrained picker (propertyNames enum) or patternProperties still lets\n // the author ADD keys — the additions are limited to the allowed set, not\n // free-form — so `additionalProperties: false` doesn't disable \"Add field\"\n // in that case. It only closes a plain open map with no key constraints.\n const allowExtraKeys =\n keyOptions || patterns ? true : prop.additionalProperties !== false;\n return {\n ...base,\n kind: \"string-map\",\n ...(addl ? { valueSchema: addl } : {}),\n ...(patterns ? { valuePatternSchemas: patterns } : {}),\n ...(prop.properties ? { knownProperties: prop.properties } : {}),\n allowExtraKeys,\n ...(keyOptions ? { keyOptions } : {}),\n ...(layout ? { layout } : {}),\n };\n }\n // A structured object: fixed `properties`, not an open map. Renders as a\n // nested sub-form (labels, required, if/then) — recursed into by the renderer.\n if (schemaRendersAsObject(prop)) {\n const valueObject = isPlainObject(value) ? value : {};\n const objectFields = effectiveProperties(\n prop as JsonSchemaObject,\n valueObject,\n );\n if (Object.keys(objectFields.properties).length > 0 || prop.properties) {\n return {\n ...base,\n kind: \"object\",\n objectProperties: objectFields.properties,\n ...(objectFields.required.length > 0\n ? { objectRequired: objectFields.required }\n : {}),\n ...(layout ? { layout } : {}),\n };\n }\n }\n // A bare object with neither properties nor an additionalProperties schema:\n // treat as an open string map unless explicitly closed.\n if (schemaRendersAsObject(prop)) {\n return {\n ...base,\n kind: \"string-map\",\n allowExtraKeys: prop.additionalProperties !== false,\n ...(keyOptions ? { keyOptions } : {}),\n ...(layout ? { layout } : {}),\n };\n }\n return base;\n}\n\n// keyOptionsFor resolves the strict map-key picker options from a map schema's\n// `propertyNames.enum` (e.g. an AsCode-constrained key set). Returns undefined\n// when the keys are unconstrained, so the key stays free-text.\nfunction keyOptionsFor(prop: JsonSchemaProperty): FieldOption[] | undefined {\n const pn = prop.propertyNames as JsonSchemaProperty | undefined;\n if (!pn || !Array.isArray(pn.enum) || pn.enum.length === 0) return undefined;\n return enumOptions(pn);\n}\n\n// isScalarStringItems reports whether an array's item schema is a plain string\n// with no richer shape — the case the array control renders as compact tags.\n// Anything with an enum/const/properties/items/additionalProperties/allOf needs\n// a real per-item control instead.\nexport function isScalarStringItems(\n items: JsonSchemaProperty | undefined,\n): boolean {\n if (!items) return true; // untyped items default to string tags\n if (items.type !== undefined && !schemaHasType(items, \"string\")) return false;\n return (\n items.enum === undefined &&\n items.const === undefined &&\n items.properties === undefined &&\n items.items === undefined &&\n items.additionalProperties === undefined &&\n items.allOf === undefined\n );\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].const` equals\n// value[k].\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 (\"const\" in sub && value[k] !== sub.const) return false;\n }\n return true;\n}\n\nexport interface EffectiveProperties {\n properties: Record<string, JsonSchemaProperty>;\n required: string[];\n}\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\nfunction 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\n// effectiveProperties merges the schema's base `properties` with each `allOf`\n// member's contribution. An `if`/`then` member contributes `then.properties`\n// only when its `if` matches the current value; an unconditional member (e.g.\n// an inlined `$ref` composition, which carries its own `properties` and no\n// `if`) always contributes. Later members win on key collision; required is the\n// union. Pure and 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 for (const [k, sub] of Object.entries(clause.properties ?? {})) {\n properties[k] = sub;\n }\n for (const k of clause.required ?? []) required.add(k);\n continue;\n }\n if (!matchesIf(clause.if, value)) continue;\n const then = clause.then ?? {};\n for (const [k, sub] of Object.entries(then.properties ?? {})) {\n properties[k] = sub;\n }\n for (const k of then.required ?? []) required.add(k);\n }\n return { properties, required: [...required] };\n}\n"],"names":["isFieldTone","isPlainObject","createElement","LabelIcon","resolveItemSpec"],"mappings":";;;;;;;AAoBO,SAAS,gBAAgB,MAAmC;AACjE,MAAI,CAAC,sBAAsB,IAAI,EAAG,QAAO;AACzC,MACE,OAAO,KAAK,yBAAyB,YACrC,KAAK,yBAAyB,MAC9B;AACA,WAAO;AAAA,EACT;AACA,SACE,CAAC,CAAC,KAAK,qBAAqB,OAAO,KAAK,KAAK,iBAAiB,EAAE,SAAS;AAE7E;AAIA,SAAS,iBACP,MAC+D;AAC/D,QAAM,KAAK,KAAK;AAChB,MAAI,CAAC,MAAM,OAAO,KAAK,EAAE,EAAE,WAAW,EAAG,QAAO;AAChD,SAAO,OAAO,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC,SAAS,MAAM,OAAO,EAAE,SAAS,SAAS;AAC5E;AAEA,SAAS,cAAc,MAA0B,MAAuB;AACtE,MAAI,MAAM,QAAQ,KAAK,IAAI,EAAG,QAAO,KAAK,KAAK,SAAS,IAAa;AACrE,SAAO,KAAK,SAAS;AACvB;AAKO,SAAS,sBAAsB,MAAmC;;AACvE,MAAI,cAAc,MAAM,QAAQ,EAAG,QAAO;AAC1C,MAAI,KAAK,SAAS,OAAW,QAAO;AACpC,MACE,KAAK,eAAe,UACpB,KAAK,aAAa,UAClB,KAAK,yBAAyB,UAC9B,KAAK,sBAAsB,UAC3B,KAAK,kBAAkB,UACvB,KAAK,0BAA0B,QAC/B;AACA,WAAO;AAAA,EACT;AACA,WACE,UAAK,UAAL,mBAAY;AAAA,IACV,CAAC,WACC,OAAO,OAAO,UACd,OAAO,SAAS,UAChB,sBAAsB,MAA4B;AAAA,QACjD;AAET;AAEA,SAAS,YAAY,MAAyC;AAC5D,QAAM,SAAS,KAAK,eAAe;A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C5D,iBAAW,CAAC,IAAI;AAAA,IAClB;AACA,eAAW,KAAK,KAAK,YAAY,CAAA,EAAI,UAAS,IAAI,CAAC;AAAA,EACrD;AACA,SAAO,EAAE,YAAY,UAAU,CAAC,GAAG,QAAQ,EAAA;AAC7C;;;;;;;;;;"}
1
+ {"version":3,"file":"json-schema-form-resolve.cjs","sources":["../../src/components/json-schema-form-resolve.ts"],"sourcesContent":["import { createElement, type ReactNode } from \"react\";\nimport type {\n ArrayDisplay,\n EnumDisplay,\n FieldControl,\n FieldOption,\n HelpDisplay,\n JsonSchemaObject,\n JsonSchemaProperty,\n LookupDescriptor,\n} from \"./json-schema-form-types\";\nimport { LabelIcon } from \"../data/Icon\";\nimport { resolveItemSpec } from \"./json-schema-form-item-summary\";\nimport { isFieldTone } from \"./json-schema-form-tone\";\nimport { isPlainObject } from \"./json-schema-form-utils\";\n\n// isOpenStringMap reports whether a property is an object whose entries are\n// described by a sub-schema in `additionalProperties` (a typed key/value map) or\n// by `patternProperties` (a per-key-pattern value map). Either makes it an\n// editable key/value control rather than a fixed-property sub-form.\nexport function isOpenStringMap(prop: JsonSchemaProperty): boolean {\n if (!schemaRendersAsObject(prop)) return false;\n if (\n typeof prop.additionalProperties === \"object\" &&\n prop.additionalProperties !== null\n ) {\n return true;\n }\n return (\n !!prop.patternProperties && Object.keys(prop.patternProperties).length > 0\n );\n}\n\n// patternSchemasOf compiles a schema's `patternProperties` into the ordered\n// {pattern, schema} list the string-map control matches keys against.\nfunction patternSchemasOf(\n prop: JsonSchemaProperty,\n): { pattern: string; schema: JsonSchemaProperty }[] | undefined {\n const pp = prop.patternProperties;\n if (!pp || Object.keys(pp).length === 0) return undefined;\n return Object.entries(pp).map(([pattern, schema]) => ({ pattern, schema }));\n}\n\nfunction schemaHasType(prop: JsonSchemaProperty, type: string): boolean {\n if (Array.isArray(prop.type)) return prop.type.includes(type as never);\n return prop.type === type;\n}\n\n// schemaRendersAsObject accepts schemas that omit `type` but use object-only\n// keywords, including composed schemas whose local refs were rehydrated into\n// unconditional allOf members. An explicit incompatible type always wins.\nexport function schemaRendersAsObject(prop: JsonSchemaProperty): boolean {\n if (schemaHasType(prop, \"object\")) return true;\n if (prop.type !== undefined) return false;\n if (\n prop.properties !== undefined ||\n prop.required !== undefined ||\n prop.additionalProperties !== undefined ||\n prop.patternProperties !== undefined ||\n prop.propertyNames !== undefined ||\n prop.unevaluatedProperties !== undefined\n ) {\n return true;\n }\n return (\n prop.allOf?.some(\n (clause) =>\n clause.if === undefined &&\n clause.then === undefined &&\n schemaRendersAsObject(clause as JsonSchemaProperty),\n ) ?? false\n );\n}\n\nfunction enumOptions(prop: JsonSchemaProperty): FieldOption[] {\n const labels = prop[\"x-enum-labels\"];\n const icons = prop[\"x-enum-icons\"];\n const descriptions = prop[\"x-enum-descriptions\"];\n const tones = prop[\"x-enum-tones\"];\n return (prop.enum ?? []).map((v) => {\n const value = String(v);\n const desc = labels?.[value];\n const icon = icons?.[value];\n const description = descriptions?.[value];\n const tone = tones?.[value];\n return {\n value,\n label:\n typeof desc === \"string\" && desc && desc !== value\n ? `${desc} (${value})`\n : value,\n ...(typeof icon === \"string\" && icon ? { icon } : {}),\n ...(typeof description === \"string\" && description\n ? { description }\n : {}),\n ...(isFieldTone(tone) ? { tone } : {}),\n };\n });\n}\n\n// enumDisplay resolves how an enum should render: an explicit `x-enum-display`\n// wins; otherwise an enum carrying `x-enum-icons` defaults to the icon grid.\n// Returns undefined to keep the combobox default.\nfunction enumDisplay(prop: JsonSchemaProperty): EnumDisplay | undefined {\n const d = prop[\"x-enum-display\"];\n if (d === \"combobox\" || d === \"radio\" || d === \"grid\" || d === \"segmented\")\n return d;\n const icons = prop[\"x-enum-icons\"];\n if (icons && Object.keys(icons).length > 0) return \"grid\";\n return undefined;\n}\n\nfunction arrayDisplay(prop: JsonSchemaProperty): ArrayDisplay | undefined {\n const d = prop[\"x-array-display\"];\n return d === \"filter-pills\" || d === \"accordion\" || d === \"cards\" ? d : undefined;\n}\n\n// helpDisplay reads the per-field `x-help-display` override. Returns undefined\n// to defer to the form-level FormLayout.help.\nfunction helpDisplay(prop: JsonSchemaProperty): HelpDisplay | undefined {\n const d = prop[\"x-help-display\"];\n return d === \"inline\" || d === \"hover\" ? d : undefined;\n}\n\nexport function schemaHelper(prop: JsonSchemaProperty): string | undefined {\n const description =\n typeof prop.description === \"string\" ? prop.description.trim() : \"\";\n const help = prop[\"x-help\"];\n const helpBody =\n isPlainObject(help) && typeof help.body === \"string\"\n ? help.body.trim()\n : \"\";\n\n if (description && helpBody && helpBody !== description) {\n return `${description} ${helpBody}`;\n }\n return description || helpBody || undefined;\n}\n\n// adornmentNode builds a prefix/suffix node from the x-input-*[-icon] extensions:\n// a runtime icon name wins, else static text. Returns undefined when neither set.\nfunction adornmentNode(iconName: unknown, text: unknown): ReactNode {\n if (typeof iconName === \"string\" && iconName) {\n // Match the library's InputField field-icon convention (16px, muted/70) so a\n // schema-driven field lines up with a hand-built one.\n return createElement(LabelIcon, {\n icon: iconName,\n className: \"size-4 text-muted-foreground/70\",\n });\n }\n if (typeof text === \"string\" && text) {\n return createElement(\n \"span\",\n { className: \"text-sm text-muted-foreground\" },\n text,\n );\n }\n return undefined;\n}\n\n// enumBranch returns the first anyOf/oneOf member carrying a non-empty `enum`,\n// for a union of \"an enum value OR a free-form string\" (e.g. a value-or-token\n// field). It lets such a union render as a dropdown. Returns undefined when no\n// branch enumerates values.\nexport function enumBranch(\n prop: JsonSchemaProperty,\n): JsonSchemaProperty | undefined {\n for (const branch of [...(prop.anyOf ?? []), ...(prop.oneOf ?? [])]) {\n if (Array.isArray(branch.enum) && branch.enum.length > 0) return branch;\n }\n return undefined;\n}\n\n// lookupDescriptor reads the `x-clicky-lookup` extension into a LookupDescriptor,\n// returning undefined when the keyword is absent or lacks its required url/filter.\nfunction lookupDescriptor(\n prop: JsonSchemaProperty,\n): LookupDescriptor | undefined {\n const raw = prop[\"x-clicky-lookup\"];\n if (!raw || typeof raw !== \"object\") return undefined;\n const d = raw as Record<string, unknown>;\n if (typeof d.url !== \"string\" || typeof d.filter !== \"string\")\n return undefined;\n return raw as LookupDescriptor;\n}\n\nexport interface ResolveControlArgs {\n key: string;\n prop: JsonSchemaProperty;\n required: boolean;\n value: unknown;\n onChange: (next: unknown) => void;\n}\n\n// resolveControl infers a base, render-ready FieldControl from a property\n// schema. It keys off schema keywords only — never the field name: ascode/token\n// heuristics are layered on by consumer pre-extensions. The one exception is the\n// standard `format: date`/`date-time` keyword, which is a schema-declared signal\n// (not a name guess) and so drives a date control directly. First match wins.\nexport function resolveControl(args: ResolveControlArgs): FieldControl {\n const { key, prop, required, value, onChange } = args;\n const labelIcon = prop[\"x-icon\"];\n const xLayout = prop[\"x-layout\"];\n const explicitLayout =\n xLayout === \"inline\" || xLayout === \"stack\" || xLayout === \"table\"\n ? xLayout\n : undefined;\n // `x-label-position` is a friendlier alias over the same per-field layout knob:\n // \"top\" stacks the label above the value; \"left\" forces inline. `x-layout` wins.\n const labelPosition = prop[\"x-label-position\"];\n const layout =\n explicitLayout ??\n (labelPosition === \"top\"\n ? \"stack\"\n : labelPosition === \"left\"\n ? \"inline\"\n : undefined);\n const prefix = adornmentNode(\n prop[\"x-input-prefix-icon\"],\n prop[\"x-input-prefix\"],\n );\n const suffix = adornmentNode(\n prop[\"x-input-suffix-icon\"],\n prop[\"x-input-suffix\"],\n );\n const labelClassName =\n typeof prop[\"x-label-classes\"] === \"string\"\n ? prop[\"x-label-classes\"]\n : undefined;\n const inputClassName =\n typeof prop[\"x-input-classes\"] === \"string\"\n ? prop[\"x-input-classes\"]\n : undefined;\n const colSpan =\n prop[\"x-col-span\"] === \"full\"\n ? (\"full\" as const)\n : typeof prop[\"x-col-span\"] === \"number\" &&\n Number.isFinite(prop[\"x-col-span\"])\n ? prop[\"x-col-span\"]\n : undefined;\n const keyOptions = keyOptionsFor(prop);\n const helper = schemaHelper(prop);\n const helpMode = helpDisplay(prop);\n const base: FieldControl = {\n key,\n kind: \"string\",\n label: typeof prop.title === \"string\" && prop.title ? prop.title : key,\n required,\n schema: prop,\n value,\n onChange,\n ...(prop.readOnly === true ? { readOnly: true } : {}),\n ...(typeof prop.description === \"string\"\n ? { description: prop.description }\n : {}),\n ...(helper ? { helper } : {}),\n ...(helpMode ? { helpDisplay: helpMode } : {}),\n ...(labelIcon != null && labelIcon !== \"\"\n ? { labelIcon: labelIcon as FieldControl[\"labelIcon\"] }\n : {}),\n ...(layout ? { layout } : {}),\n ...(prefix ? { prefix } : {}),\n ...(suffix ? { suffix } : {}),\n ...(labelClassName ? { labelClassName } : {}),\n ...(inputClassName ? { inputClassName } : {}),\n ...(colSpan != null ? { colSpan } : {}),\n };\n\n // An `x-clicky-lookup` field is an async entity-reference picker: options load\n // lazily from another entity's list endpoint. Single-select also allows\n // free-form entry so a typed value outside the option set still commits.\n const lookup = lookupDescriptor(prop);\n if (lookup) {\n return {\n ...base,\n kind: \"lookup\",\n lookup,\n options: [],\n allowCustomValue: lookup.multi !== true,\n };\n }\n if (Array.isArray(prop.enum) && prop.enum.length > 0) {\n const display = enumDisplay(prop);\n return {\n ...base,\n kind: \"enum\",\n options: enumOptions(prop),\n ...(display ? { display } : {}),\n };\n }\n // A value-or-template union: the enum lives in an anyOf/oneOf branch alongside\n // free-form branches. Render it as a dropdown using that branch's enum; the\n // free-form branches are honoured via a consumer's allowCustomValue pre-ext.\n const branch = enumBranch(prop);\n if (branch) {\n return { ...base, kind: \"enum\", options: enumOptions(branch) };\n }\n // A schema-declared date/date-time string renders as a date control.\n if (prop.format === \"date\" || prop.format === \"date-time\") {\n return { ...base, kind: \"date\", dateFormat: prop.format };\n }\n // A long-form string declares `format: textarea` to render a multi-line box.\n if (prop.format === \"textarea\" && schemaHasType(prop, \"string\")) {\n return { ...base, kind: \"textarea\" };\n }\n // A markdown string declares `format: md` to render the MDXEditor-backed\n // editor. Plugin toggles live under `x-md-editor` so schema authors can keep\n // the format signal standard-sized and the editor behavior explicit.\n if (prop.format === \"md\" && schemaHasType(prop, \"string\")) {\n const markdownOptions = prop[\"x-md-editor\"];\n return {\n ...base,\n kind: \"markdown\",\n ...(isPlainObject(markdownOptions) ? { markdownOptions } : {}),\n };\n }\n if (schemaHasType(prop, \"boolean\")) {\n return { ...base, kind: \"boolean\" };\n }\n if (schemaHasType(prop, \"integer\") || schemaHasType(prop, \"number\")) {\n return {\n ...base,\n kind: \"number\",\n coerceNumber: true,\n // A percent number carries a static \"%\" unit shown inside the input.\n ...(prop.format === \"percent\" ? { unit: \"%\" } : {}),\n ...(typeof prop.minimum === \"number\" ? { minimum: prop.minimum } : {}),\n };\n }\n if (schemaHasType(prop, \"array\")) {\n const display = arrayDisplay(prop);\n const itemSchema = prop.items;\n return {\n ...base,\n kind: \"array\",\n ...(itemSchema ? { itemSchema } : {}),\n ...(display ? { arrayDisplay: display } : {}),\n ...(display === \"accordion\" ? { itemSpec: resolveItemSpec(prop, itemSchema) } : {}),\n // An accordion reuses the array's description as the zero-item copy in its\n // add row, so a paragraph of the same sentence directly above would be a\n // literal duplicate. The schema can still say otherwise.\n ...(display === \"accordion\" && !helpMode ? { helpDisplay: \"hover\" as const } : {}),\n ...(display && itemSchema && Array.isArray(itemSchema.enum)\n ? { options: enumOptions(itemSchema) }\n : {}),\n ...(layout ? { layout } : {}),\n };\n }\n // An open map: object whose entries are described by an additionalProperties\n // sub-schema and/or per-key patternProperties. Renders as editable key/value\n // rows (+ any known properties), with the value form resolved per key.\n if (isOpenStringMap(prop)) {\n const addl =\n typeof prop.additionalProperties === \"object\" &&\n prop.additionalProperties !== null\n ? (prop.additionalProperties as JsonSchemaProperty)\n : undefined;\n const patterns = patternSchemasOf(prop);\n // A constrained picker (propertyNames enum) or patternProperties still lets\n // the author ADD keys — the additions are limited to the allowed set, not\n // free-form — so `additionalProperties: false` doesn't disable \"Add field\"\n // in that case. It only closes a plain open map with no key constraints.\n const allowExtraKeys =\n keyOptions || patterns ? true : prop.additionalProperties !== false;\n return {\n ...base,\n kind: \"string-map\",\n ...(addl ? { valueSchema: addl } : {}),\n ...(patterns ? { valuePatternSchemas: patterns } : {}),\n ...(prop.properties ? { knownProperties: prop.properties } : {}),\n allowExtraKeys,\n ...(keyOptions ? { keyOptions } : {}),\n ...(layout ? { layout } : {}),\n };\n }\n // A structured object: fixed `properties`, not an open map. Renders as a\n // nested sub-form (labels, required, if/then) — recursed into by the renderer.\n if (schemaRendersAsObject(prop)) {\n const valueObject = isPlainObject(value) ? value : {};\n const objectFields = effectiveProperties(\n prop as JsonSchemaObject,\n valueObject,\n );\n if (Object.keys(objectFields.properties).length > 0 || prop.properties) {\n return {\n ...base,\n kind: \"object\",\n objectProperties: objectFields.properties,\n ...(objectFields.required.length > 0\n ? { objectRequired: objectFields.required }\n : {}),\n ...(layout ? { layout } : {}),\n };\n }\n }\n // A bare object with neither properties nor an additionalProperties schema:\n // treat as an open string map unless explicitly closed.\n if (schemaRendersAsObject(prop)) {\n return {\n ...base,\n kind: \"string-map\",\n allowExtraKeys: prop.additionalProperties !== false,\n ...(keyOptions ? { keyOptions } : {}),\n ...(layout ? { layout } : {}),\n };\n }\n return base;\n}\n\n// keyOptionsFor resolves the strict map-key picker options from a map schema's\n// `propertyNames.enum` (e.g. an AsCode-constrained key set). Returns undefined\n// when the keys are unconstrained, so the key stays free-text.\nfunction keyOptionsFor(prop: JsonSchemaProperty): FieldOption[] | undefined {\n const pn = prop.propertyNames as JsonSchemaProperty | undefined;\n if (!pn || !Array.isArray(pn.enum) || pn.enum.length === 0) return undefined;\n return enumOptions(pn);\n}\n\n// isScalarStringItems reports whether an array's item schema is a plain string\n// with no richer shape — the case the array control renders as compact tags.\n// Anything with an enum/const/properties/items/additionalProperties/allOf needs\n// a real per-item control instead.\nexport function isScalarStringItems(\n items: JsonSchemaProperty | undefined,\n): boolean {\n if (!items) return true; // untyped items default to string tags\n if (items.type !== undefined && !schemaHasType(items, \"string\")) return false;\n return (\n items.enum === undefined &&\n items.const === undefined &&\n items.properties === undefined &&\n items.items === undefined &&\n items.additionalProperties === undefined &&\n items.allOf === undefined\n );\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].const` equals\n// value[k].\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 (\"const\" in sub && value[k] !== sub.const) return false;\n }\n return true;\n}\n\nexport interface EffectiveProperties {\n properties: Record<string, JsonSchemaProperty>;\n required: string[];\n}\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\nfunction 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\n// effectiveProperties merges the schema's base `properties` with each `allOf`\n// member's contribution. An `if`/`then` member contributes `then.properties`\n// only when its `if` matches the current value; an unconditional member (e.g.\n// an inlined `$ref` composition, which carries its own `properties` and no\n// `if`) always contributes. Later members win on key collision; required is the\n// union. Pure and 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 for (const [k, sub] of Object.entries(clause.properties ?? {})) {\n properties[k] = sub;\n }\n for (const k of clause.required ?? []) required.add(k);\n continue;\n }\n if (!matchesIf(clause.if, value)) continue;\n const then = clause.then ?? {};\n for (const [k, sub] of Object.entries(then.properties ?? {})) {\n properties[k] = sub;\n }\n for (const k of then.required ?? []) required.add(k);\n }\n return { properties, required: [...required] };\n}\n"],"names":["isFieldTone","isPlainObject","createElement","LabelIcon","resolveItemSpec"],"mappings":";;;;;;;AAoBO,SAAS,gBA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ay(prop) {
60
60
  }
61
61
  function arrayDisplay(prop) {
62
62
  const d = prop["x-array-display"];
63
- return d === "filter-pills" || d === "accordion" ? d : void 0;
63
+ return d === "filter-pills" || d === "accordion" || d === "cards" ? d : void 0;
64
64
  }
65
65
  function helpDisplay(prop) {
66
66
  const d = prop["x-help-display"];
@@ -1 +1 @@
1
- {"version":3,"file":"json-schema-form-resolve.js","sources":["../../src/components/json-schema-form-resolve.ts"],"sourcesContent":["import { createElement, type ReactNode } from \"react\";\nimport type {\n ArrayDisplay,\n EnumDisplay,\n FieldControl,\n FieldOption,\n HelpDisplay,\n JsonSchemaObject,\n JsonSchemaProperty,\n LookupDescriptor,\n} from \"./json-schema-form-types\";\nimport { LabelIcon } from \"../data/Icon\";\nimport { resolveItemSpec } from \"./json-schema-form-item-summary\";\nimport { isFieldTone } from \"./json-schema-form-tone\";\nimport { isPlainObject } from \"./json-schema-form-utils\";\n\n// isOpenStringMap reports whether a property is an object whose entries are\n// described by a sub-schema in `additionalProperties` (a typed key/value map) or\n// by `patternProperties` (a per-key-pattern value map). Either makes it an\n// editable key/value control rather than a fixed-property sub-form.\nexport function isOpenStringMap(prop: JsonSchemaProperty): boolean {\n if (!schemaRendersAsObject(prop)) return false;\n if (\n typeof prop.additionalProperties === \"object\" &&\n prop.additionalProperties !== null\n ) {\n return true;\n }\n return (\n !!prop.patternProperties && Object.keys(prop.patternProperties).length > 0\n );\n}\n\n// patternSchemasOf compiles a schema's `patternProperties` into the ordered\n// {pattern, schema} list the string-map control matches keys against.\nfunction patternSchemasOf(\n prop: JsonSchemaProperty,\n): { pattern: string; schema: JsonSchemaProperty }[] | undefined {\n const pp = prop.patternProperties;\n if (!pp || Object.keys(pp).length === 0) return undefined;\n return Object.entries(pp).map(([pattern, schema]) => ({ pattern, schema }));\n}\n\nfunction schemaHasType(prop: JsonSchemaProperty, type: string): boolean {\n if (Array.isArray(prop.type)) return prop.type.includes(type as never);\n return prop.type === type;\n}\n\n// schemaRendersAsObject accepts schemas that omit `type` but use object-only\n// keywords, including composed schemas whose local refs were rehydrated into\n// unconditional allOf members. An explicit incompatible type always wins.\nexport function schemaRendersAsObject(prop: JsonSchemaProperty): boolean {\n if (schemaHasType(prop, \"object\")) return true;\n if (prop.type !== undefined) return false;\n if (\n prop.properties !== undefined ||\n prop.required !== undefined ||\n prop.additionalProperties !== undefined ||\n prop.patternProperties !== undefined ||\n prop.propertyNames !== undefined ||\n prop.unevaluatedProperties !== undefined\n ) {\n return true;\n }\n return (\n prop.allOf?.some(\n (clause) =>\n clause.if === undefined &&\n clause.then === undefined &&\n schemaRendersAsObject(clause as JsonSchemaProperty),\n ) ?? false\n );\n}\n\nfunction enumOptions(prop: JsonSchemaProperty): FieldOption[] {\n const labels = prop[\"x-enum-labels\"];\n const icons = prop[\"x-enum-icons\"];\n const descriptions = prop[\"x-enum-descriptions\"];\n const tones = prop[\"x-enum-tones\"];\n return (prop.enum ?? []).map((v) => {\n const value = String(v);\n const desc = labels?.[value];\n const icon = icons?.[value];\n const description = descriptions?.[value];\n const tone = tones?.[value];\n return {\n value,\n label:\n typeof desc === \"string\" && desc && desc !== value\n ? `${desc} (${value})`\n : value,\n ...(typeof icon === \"string\" && icon ? { icon } : {}),\n ...(typeof description === \"string\" && description\n ? { description }\n : {}),\n ...(isFieldTone(tone) ? { tone } : {}),\n };\n });\n}\n\n// enumDisplay resolves how an enum should render: an explicit `x-enum-display`\n// wins; otherwise an enum carrying `x-enum-icons` defaults to the icon grid.\n// Returns undefined to keep the combobox default.\nfunction enumDisplay(prop: JsonSchemaProperty): EnumDisplay | undefined {\n const d = prop[\"x-enum-display\"];\n if (d === \"combobox\" || d === \"radio\" || d === \"grid\" || d === \"segmented\")\n return d;\n const icons = prop[\"x-enum-icons\"];\n if (icons && Object.keys(icons).length > 0) return \"grid\";\n return undefined;\n}\n\nfunction arrayDisplay(prop: JsonSchemaProperty): ArrayDisplay | undefined {\n const d = prop[\"x-array-display\"];\n return d === \"filter-pills\" || d === \"accordion\" ? d : undefined;\n}\n\n// helpDisplay reads the per-field `x-help-display` override. Returns undefined\n// to defer to the form-level FormLayout.help.\nfunction helpDisplay(prop: JsonSchemaProperty): HelpDisplay | undefined {\n const d = prop[\"x-help-display\"];\n return d === \"inline\" || d === \"hover\" ? d : undefined;\n}\n\nexport function schemaHelper(prop: JsonSchemaProperty): string | undefined {\n const description =\n typeof prop.description === \"string\" ? prop.description.trim() : \"\";\n const help = prop[\"x-help\"];\n const helpBody =\n isPlainObject(help) && typeof help.body === \"string\"\n ? help.body.trim()\n : \"\";\n\n if (description && helpBody && helpBody !== description) {\n return `${description} ${helpBody}`;\n }\n return description || helpBody || undefined;\n}\n\n// adornmentNode builds a prefix/suffix node from the x-input-*[-icon] extensions:\n// a runtime icon name wins, else static text. Returns undefined when neither set.\nfunction adornmentNode(iconName: unknown, text: unknown): ReactNode {\n if (typeof iconName === \"string\" && iconName) {\n // Match the library's InputField field-icon convention (16px, muted/70) so a\n // schema-driven field lines up with a hand-built one.\n return createElement(LabelIcon, {\n icon: iconName,\n className: \"size-4 text-muted-foreground/70\",\n });\n }\n if (typeof text === \"string\" && text) {\n return createElement(\n \"span\",\n { className: \"text-sm text-muted-foreground\" },\n text,\n );\n }\n return undefined;\n}\n\n// enumBranch returns the first anyOf/oneOf member carrying a non-empty `enum`,\n// for a union of \"an enum value OR a free-form string\" (e.g. a value-or-token\n// field). It lets such a union render as a dropdown. Returns undefined when no\n// branch enumerates values.\nexport function enumBranch(\n prop: JsonSchemaProperty,\n): JsonSchemaProperty | undefined {\n for (const branch of [...(prop.anyOf ?? []), ...(prop.oneOf ?? [])]) {\n if (Array.isArray(branch.enum) && branch.enum.length > 0) return branch;\n }\n return undefined;\n}\n\n// lookupDescriptor reads the `x-clicky-lookup` extension into a LookupDescriptor,\n// returning undefined when the keyword is absent or lacks its required url/filter.\nfunction lookupDescriptor(\n prop: JsonSchemaProperty,\n): LookupDescriptor | undefined {\n const raw = prop[\"x-clicky-lookup\"];\n if (!raw || typeof raw !== \"object\") return undefined;\n const d = raw as Record<string, unknown>;\n if (typeof d.url !== \"string\" || typeof d.filter !== \"string\")\n return undefined;\n return raw as LookupDescriptor;\n}\n\nexport interface ResolveControlArgs {\n key: string;\n prop: JsonSchemaProperty;\n required: boolean;\n value: unknown;\n onChange: (next: unknown) => void;\n}\n\n// resolveControl infers a base, render-ready FieldControl from a property\n// schema. It keys off schema keywords only — never the field name: ascode/token\n// heuristics are layered on by consumer pre-extensions. The one exception is the\n// standard `format: date`/`date-time` keyword, which is a schema-declared signal\n// (not a name guess) and so drives a date control directly. First match wins.\nexport function resolveControl(args: ResolveControlArgs): FieldControl {\n const { key, prop, required, value, onChange } = args;\n const labelIcon = prop[\"x-icon\"];\n const xLayout = prop[\"x-layout\"];\n const explicitLayout =\n xLayout === \"inline\" || xLayout === \"stack\" || xLayout === \"table\"\n ? xLayout\n : undefined;\n // `x-label-position` is a friendlier alias over the same per-field layout knob:\n // \"top\" stacks the label above the value; \"left\" forces inline. `x-layout` wins.\n const labelPosition = prop[\"x-label-position\"];\n const layout =\n explicitLayout ??\n (labelPosition === \"top\"\n ? \"stack\"\n : labelPosition === \"left\"\n ? \"inline\"\n : undefined);\n const prefix = adornmentNode(\n prop[\"x-input-prefix-icon\"],\n prop[\"x-input-prefix\"],\n );\n const suffix = adornmentNode(\n prop[\"x-input-suffix-icon\"],\n prop[\"x-input-suffix\"],\n );\n const labelClassName =\n typeof prop[\"x-label-classes\"] === \"string\"\n ? prop[\"x-label-classes\"]\n : undefined;\n const inputClassName =\n typeof prop[\"x-input-classes\"] === \"string\"\n ? prop[\"x-input-classes\"]\n : undefined;\n const colSpan =\n prop[\"x-col-span\"] === \"full\"\n ? (\"full\" as const)\n : typeof prop[\"x-col-span\"] === \"number\" &&\n Number.isFinite(prop[\"x-col-span\"])\n ? prop[\"x-col-span\"]\n : undefined;\n const keyOptions = keyOptionsFor(prop);\n const helper = schemaHelper(prop);\n const helpMode = helpDisplay(prop);\n const base: FieldControl = {\n key,\n kind: \"string\",\n label: typeof prop.title === \"string\" && prop.title ? prop.title : key,\n required,\n schema: prop,\n value,\n onChange,\n ...(prop.readOnly === true ? { readOnly: true } : {}),\n ...(typeof prop.description === \"string\"\n ? { description: prop.description }\n : {}),\n ...(helper ? { helper } : {}),\n ...(helpMode ? { helpDisplay: helpMode } : {}),\n ...(labelIcon != null && labelIcon !== \"\"\n ? { labelIcon: labelIcon as FieldControl[\"labelIcon\"] }\n : {}),\n ...(layout ? { layout } : {}),\n ...(prefix ? { prefix } : {}),\n ...(suffix ? { suffix } : {}),\n ...(labelClassName ? { labelClassName } : {}),\n ...(inputClassName ? { inputClassName } : {}),\n ...(colSpan != null ? { colSpan } : {}),\n };\n\n // An `x-clicky-lookup` field is an async entity-reference picker: options load\n // lazily from another entity's list endpoint. Single-select also allows\n // free-form entry so a typed value outside the option set still commits.\n const lookup = lookupDescriptor(prop);\n if (lookup) {\n return {\n ...base,\n kind: \"lookup\",\n lookup,\n options: [],\n allowCustomValue: lookup.multi !== true,\n };\n }\n if (Array.isArray(prop.enum) && prop.enum.length > 0) {\n const display = enumDisplay(prop);\n return {\n ...base,\n kind: \"enum\",\n options: enumOptions(prop),\n ...(display ? { display } : {}),\n };\n }\n // A value-or-template union: the enum lives in an anyOf/oneOf branch alongside\n // free-form branches. Render it as a dropdown using that branch's enum; the\n // free-form branches are honoured via a consumer's allowCustomValue pre-ext.\n const branch = enumBranch(prop);\n if (branch) {\n return { ...base, kind: \"enum\", options: enumOptions(branch) };\n }\n // A schema-declared date/date-time string renders as a date control.\n if (prop.format === \"date\" || prop.format === \"date-time\") {\n return { ...base, kind: \"date\", dateFormat: prop.format };\n }\n // A long-form string declares `format: textarea` to render a multi-line box.\n if (prop.format === \"textarea\" && schemaHasType(prop, \"string\")) {\n return { ...base, kind: \"textarea\" };\n }\n // A markdown string declares `format: md` to render the MDXEditor-backed\n // editor. Plugin toggles live under `x-md-editor` so schema authors can keep\n // the format signal standard-sized and the editor behavior explicit.\n if (prop.format === \"md\" && schemaHasType(prop, \"string\")) {\n const markdownOptions = prop[\"x-md-editor\"];\n return {\n ...base,\n kind: \"markdown\",\n ...(isPlainObject(markdownOptions) ? { markdownOptions } : {}),\n };\n }\n if (schemaHasType(prop, \"boolean\")) {\n return { ...base, kind: \"boolean\" };\n }\n if (schemaHasType(prop, \"integer\") || schemaHasType(prop, \"number\")) {\n return {\n ...base,\n kind: \"number\",\n coerceNumber: true,\n // A percent number carries a static \"%\" unit shown inside the input.\n ...(prop.format === \"percent\" ? { unit: \"%\" } : {}),\n ...(typeof prop.minimum === \"number\" ? { minimum: prop.minimum } : {}),\n };\n }\n if (schemaHasType(prop, \"array\")) {\n const display = arrayDisplay(prop);\n const itemSchema = prop.items;\n return {\n ...base,\n kind: \"array\",\n ...(itemSchema ? { itemSchema } : {}),\n ...(display ? { arrayDisplay: display } : {}),\n ...(display === \"accordion\" ? { itemSpec: resolveItemSpec(prop, itemSchema) } : {}),\n // An accordion reuses the array's description as the zero-item copy in its\n // add row, so a paragraph of the same sentence directly above would be a\n // literal duplicate. The schema can still say otherwise.\n ...(display === \"accordion\" && !helpMode ? { helpDisplay: \"hover\" as const } : {}),\n ...(display && itemSchema && Array.isArray(itemSchema.enum)\n ? { options: enumOptions(itemSchema) }\n : {}),\n ...(layout ? { layout } : {}),\n };\n }\n // An open map: object whose entries are described by an additionalProperties\n // sub-schema and/or per-key patternProperties. Renders as editable key/value\n // rows (+ any known properties), with the value form resolved per key.\n if (isOpenStringMap(prop)) {\n const addl =\n typeof prop.additionalProperties === \"object\" &&\n prop.additionalProperties !== null\n ? (prop.additionalProperties as JsonSchemaProperty)\n : undefined;\n const patterns = patternSchemasOf(prop);\n // A constrained picker (propertyNames enum) or patternProperties still lets\n // the author ADD keys — the additions are limited to the allowed set, not\n // free-form — so `additionalProperties: false` doesn't disable \"Add field\"\n // in that case. It only closes a plain open map with no key constraints.\n const allowExtraKeys =\n keyOptions || patterns ? true : prop.additionalProperties !== false;\n return {\n ...base,\n kind: \"string-map\",\n ...(addl ? { valueSchema: addl } : {}),\n ...(patterns ? { valuePatternSchemas: patterns } : {}),\n ...(prop.properties ? { knownProperties: prop.properties } : {}),\n allowExtraKeys,\n ...(keyOptions ? { keyOptions } : {}),\n ...(layout ? { layout } : {}),\n };\n }\n // A structured object: fixed `properties`, not an open map. Renders as a\n // nested sub-form (labels, required, if/then) — recursed into by the renderer.\n if (schemaRendersAsObject(prop)) {\n const valueObject = isPlainObject(value) ? value : {};\n const objectFields = effectiveProperties(\n prop as JsonSchemaObject,\n valueObject,\n );\n if (Object.keys(objectFields.properties).length > 0 || prop.properties) {\n return {\n ...base,\n kind: \"object\",\n objectProperties: objectFields.properties,\n ...(objectFields.required.length > 0\n ? { objectRequired: objectFields.required }\n : {}),\n ...(layout ? { layout } : {}),\n };\n }\n }\n // A bare object with neither properties nor an additionalProperties schema:\n // treat as an open string map unless explicitly closed.\n if (schemaRendersAsObject(prop)) {\n return {\n ...base,\n kind: \"string-map\",\n allowExtraKeys: prop.additionalProperties !== false,\n ...(keyOptions ? { keyOptions } : {}),\n ...(layout ? { layout } : {}),\n };\n }\n return base;\n}\n\n// keyOptionsFor resolves the strict map-key picker options from a map schema's\n// `propertyNames.enum` (e.g. an AsCode-constrained key set). Returns undefined\n// when the keys are unconstrained, so the key stays free-text.\nfunction keyOptionsFor(prop: JsonSchemaProperty): FieldOption[] | undefined {\n const pn = prop.propertyNames as JsonSchemaProperty | undefined;\n if (!pn || !Array.isArray(pn.enum) || pn.enum.length === 0) return undefined;\n return enumOptions(pn);\n}\n\n// isScalarStringItems reports whether an array's item schema is a plain string\n// with no richer shape — the case the array control renders as compact tags.\n// Anything with an enum/const/properties/items/additionalProperties/allOf needs\n// a real per-item control instead.\nexport function isScalarStringItems(\n items: JsonSchemaProperty | undefined,\n): boolean {\n if (!items) return true; // untyped items default to string tags\n if (items.type !== undefined && !schemaHasType(items, \"string\")) return false;\n return (\n items.enum === undefined &&\n items.const === undefined &&\n items.properties === undefined &&\n items.items === undefined &&\n items.additionalProperties === undefined &&\n items.allOf === undefined\n );\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].const` equals\n// value[k].\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 (\"const\" in sub && value[k] !== sub.const) return false;\n }\n return true;\n}\n\nexport interface EffectiveProperties {\n properties: Record<string, JsonSchemaProperty>;\n required: string[];\n}\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\nfunction 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\n// effectiveProperties merges the schema's base `properties` with each `allOf`\n// member's contribution. An `if`/`then` member contributes `then.properties`\n// only when its `if` matches the current value; an unconditional member (e.g.\n// an inlined `$ref` composition, which carries its own `properties` and no\n// `if`) always contributes. Later members win on key collision; required is the\n// union. Pure and 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 for (const [k, sub] of Object.entries(clause.properties ?? {})) {\n properties[k] = sub;\n }\n for (const k of clause.required ?? []) required.add(k);\n continue;\n }\n if (!matchesIf(clause.if, value)) continue;\n const then = clause.then ?? {};\n for (const [k, sub] of Object.entries(then.properties ?? {})) {\n properties[k] = sub;\n }\n for (const k of then.required ?? []) required.add(k);\n }\n return { properties, required: [...required] };\n}\n"],"names":[],"mappings":";;;;;AAoBO,SAAS,gBAAgB,MAAmC;AACjE,MAAI,CAAC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EA,SAAS,mBAAmB,OAAyB;AACnD,MAAI,MAAM,QAAQ,KAAK,EAAG,QAAO,MAAM,IAAI,kBAAkB;AAC7D,MAAI,cAAc,KAAK,GAAG;AACxB,WAAO,OAAO;AAAA,MACZ,OAAO,QAAQ,KAAgC,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM;AAAA,QACrE;AAAA,QACA,mBAAmB,KAAK;AAAA,MAAA,CACzB;AAAA,IAAA;AAAA,EAEL;AACA,SAAO;AACT;AAQO,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,iBAAW,CAAC,GAAG,GAAG,KAAK,OAAO,QAAQ,OAAO,cAAc,CAAA,CAAE,GAAG;AAC9D,mBAAW,CAAC,IAAI;AAAA,MAClB;AACA,iBAAW,KAAK,OAAO,YAAY,CAAA,EAAI,UAAS,IAAI,CAAC;AACrD;AAAA,IACF;AACA,QAAI,CAAC,UAAU,OAAO,IAAI,KAAK,EAAG;AAClC,UAAM,OAAO,OAAO,QAAQ,CAAA;AAC5B,eAAW,CAAC,GAAG,GAAG,KAAK,OAAO,QAAQ,KAAK,cAAc,CAAA,CAAE,GAAG;AAC5D,iBAAW,CAAC,IAAI;AAAA,IAClB;AACA,eAAW,KAAK,KAAK,YAAY,CAAA,EAAI,UAAS,IAAI,CAAC;AAAA,EACrD;AACA,SAAO,EAAE,YAAY,UAAU,CAAC,GAAG,QAAQ,EAAA;AAC7C;"}
1
+ {"version":3,"file":"json-schema-form-resolve.js","sources":["../../src/components/json-schema-form-resolve.ts"],"sourcesContent":["import { createElement, type ReactNode } from \"react\";\nimport type {\n ArrayDisplay,\n EnumDisplay,\n FieldControl,\n FieldOption,\n HelpDisplay,\n JsonSchemaObject,\n JsonSchemaProperty,\n LookupDescriptor,\n} from \"./json-schema-form-types\";\nimport { LabelIcon } from \"../data/Icon\";\nimport { resolveItemSpec } from \"./json-schema-form-item-summary\";\nimport { isFieldTone } from \"./json-schema-form-tone\";\nimport { isPlainObject } from \"./json-schema-form-utils\";\n\n// isOpenStringMap reports whether a property is an object whose entries are\n// described by a sub-schema in `additionalProperties` (a typed key/value map) or\n// by `patternProperties` (a per-key-pattern value map). Either makes it an\n// editable key/value control rather than a fixed-property sub-form.\nexport function isOpenStringMap(prop: JsonSchemaProperty): boolean {\n if (!schemaRendersAsObject(prop)) return false;\n if (\n typeof prop.additionalProperties === \"object\" &&\n prop.additionalProperties !== null\n ) {\n return true;\n }\n return (\n !!prop.patternProperties && Object.keys(prop.patternProperties).length > 0\n );\n}\n\n// patternSchemasOf compiles a schema's `patternProperties` into the ordered\n// {pattern, schema} list the string-map control matches keys against.\nfunction patternSchemasOf(\n prop: JsonSchemaProperty,\n): { pattern: string; schema: JsonSchemaProperty }[] | undefined {\n const pp = prop.patternProperties;\n if (!pp || Object.keys(pp).length === 0) return undefined;\n return Object.entries(pp).map(([pattern, schema]) => ({ pattern, schema }));\n}\n\nfunction schemaHasType(prop: JsonSchemaProperty, type: string): boolean {\n if (Array.isArray(prop.type)) return prop.type.includes(type as never);\n return prop.type === type;\n}\n\n// schemaRendersAsObject accepts schemas that omit `type` but use object-only\n// keywords, including composed schemas whose local refs were rehydrated into\n// unconditional allOf members. An explicit incompatible type always wins.\nexport function schemaRendersAsObject(prop: JsonSchemaProperty): boolean {\n if (schemaHasType(prop, \"object\")) return true;\n if (prop.type !== undefined) return false;\n if (\n prop.properties !== undefined ||\n prop.required !== undefined ||\n prop.additionalProperties !== undefined ||\n prop.patternProperties !== undefined ||\n prop.propertyNames !== undefined ||\n prop.unevaluatedProperties !== undefined\n ) {\n return true;\n }\n return (\n prop.allOf?.some(\n (clause) =>\n clause.if === undefined &&\n clause.then === undefined &&\n schemaRendersAsObject(clause as JsonSchemaProperty),\n ) ?? false\n );\n}\n\nfunction enumOptions(prop: JsonSchemaProperty): FieldOption[] {\n const labels = prop[\"x-enum-labels\"];\n const icons = prop[\"x-enum-icons\"];\n const descriptions = prop[\"x-enum-descriptions\"];\n const tones = prop[\"x-enum-tones\"];\n return (prop.enum ?? []).map((v) => {\n const value = String(v);\n const desc = labels?.[value];\n const icon = icons?.[value];\n const description = descriptions?.[value];\n const tone = tones?.[value];\n return {\n value,\n label:\n typeof desc === \"string\" && desc && desc !== value\n ? `${desc} (${value})`\n : value,\n ...(typeof icon === \"string\" && icon ? { icon } : {}),\n ...(typeof description === \"string\" && description\n ? { description }\n : {}),\n ...(isFieldTone(tone) ? { tone } : {}),\n };\n });\n}\n\n// enumDisplay resolves how an enum should render: an explicit `x-enum-display`\n// wins; otherwise an enum carrying `x-enum-icons` defaults to the icon grid.\n// Returns undefined to keep the combobox default.\nfunction enumDisplay(prop: JsonSchemaProperty): EnumDisplay | undefined {\n const d = prop[\"x-enum-display\"];\n if (d === \"combobox\" || d === \"radio\" || d === \"grid\" || d === \"segmented\")\n return d;\n const icons = prop[\"x-enum-icons\"];\n if (icons && Object.keys(icons).length > 0) return \"grid\";\n return undefined;\n}\n\nfunction arrayDisplay(prop: JsonSchemaProperty): ArrayDisplay | undefined {\n const d = prop[\"x-array-display\"];\n return d === \"filter-pills\" || d === \"accordion\" || d === \"cards\" ? d : undefined;\n}\n\n// helpDisplay reads the per-field `x-help-display` override. Returns undefined\n// to defer to the form-level FormLayout.help.\nfunction helpDisplay(prop: JsonSchemaProperty): HelpDisplay | undefined {\n const d = prop[\"x-help-display\"];\n return d === \"inline\" || d === \"hover\" ? d : undefined;\n}\n\nexport function schemaHelper(prop: JsonSchemaProperty): string | undefined {\n const description =\n typeof prop.description === \"string\" ? prop.description.trim() : \"\";\n const help = prop[\"x-help\"];\n const helpBody =\n isPlainObject(help) && typeof help.body === \"string\"\n ? help.body.trim()\n : \"\";\n\n if (description && helpBody && helpBody !== description) {\n return `${description} ${helpBody}`;\n }\n return description || helpBody || undefined;\n}\n\n// adornmentNode builds a prefix/suffix node from the x-input-*[-icon] extensions:\n// a runtime icon name wins, else static text. Returns undefined when neither set.\nfunction adornmentNode(iconName: unknown, text: unknown): ReactNode {\n if (typeof iconName === \"string\" && iconName) {\n // Match the library's InputField field-icon convention (16px, muted/70) so a\n // schema-driven field lines up with a hand-built one.\n return createElement(LabelIcon, {\n icon: iconName,\n className: \"size-4 text-muted-foreground/70\",\n });\n }\n if (typeof text === \"string\" && text) {\n return createElement(\n \"span\",\n { className: \"text-sm text-muted-foreground\" },\n text,\n );\n }\n return undefined;\n}\n\n// enumBranch returns the first anyOf/oneOf member carrying a non-empty `enum`,\n// for a union of \"an enum value OR a free-form string\" (e.g. a value-or-token\n// field). It lets such a union render as a dropdown. Returns undefined when no\n// branch enumerates values.\nexport function enumBranch(\n prop: JsonSchemaProperty,\n): JsonSchemaProperty | undefined {\n for (const branch of [...(prop.anyOf ?? []), ...(prop.oneOf ?? [])]) {\n if (Array.isArray(branch.enum) && branch.enum.length > 0) return branch;\n }\n return undefined;\n}\n\n// lookupDescriptor reads the `x-clicky-lookup` extension into a LookupDescriptor,\n// returning undefined when the keyword is absent or lacks its required url/filter.\nfunction lookupDescriptor(\n prop: JsonSchemaProperty,\n): LookupDescriptor | undefined {\n const raw = prop[\"x-clicky-lookup\"];\n if (!raw || typeof raw !== \"object\") return undefined;\n const d = raw as Record<string, unknown>;\n if (typeof d.url !== \"string\" || typeof d.filter !== \"string\")\n return undefined;\n return raw as LookupDescriptor;\n}\n\nexport interface ResolveControlArgs {\n key: string;\n prop: JsonSchemaProperty;\n required: boolean;\n value: unknown;\n onChange: (next: unknown) => void;\n}\n\n// resolveControl infers a base, render-ready FieldControl from a property\n// schema. It keys off schema keywords only — never the field name: ascode/token\n// heuristics are layered on by consumer pre-extensions. The one exception is the\n// standard `format: date`/`date-time` keyword, which is a schema-declared signal\n// (not a name guess) and so drives a date control directly. First match wins.\nexport function resolveControl(args: ResolveControlArgs): FieldControl {\n const { key, prop, required, value, onChange } = args;\n const labelIcon = prop[\"x-icon\"];\n const xLayout = prop[\"x-layout\"];\n const explicitLayout =\n xLayout === \"inline\" || xLayout === \"stack\" || xLayout === \"table\"\n ? xLayout\n : undefined;\n // `x-label-position` is a friendlier alias over the same per-field layout knob:\n // \"top\" stacks the label above the value; \"left\" forces inline. `x-layout` wins.\n const labelPosition = prop[\"x-label-position\"];\n const layout =\n explicitLayout ??\n (labelPosition === \"top\"\n ? \"stack\"\n : labelPosition === \"left\"\n ? \"inline\"\n : undefined);\n const prefix = adornmentNode(\n prop[\"x-input-prefix-icon\"],\n prop[\"x-input-prefix\"],\n );\n const suffix = adornmentNode(\n prop[\"x-input-suffix-icon\"],\n prop[\"x-input-suffix\"],\n );\n const labelClassName =\n typeof prop[\"x-label-classes\"] === \"string\"\n ? prop[\"x-label-classes\"]\n : undefined;\n const inputClassName =\n typeof prop[\"x-input-classes\"] === \"string\"\n ? prop[\"x-input-classes\"]\n : undefined;\n const colSpan =\n prop[\"x-col-span\"] === \"full\"\n ? (\"full\" as const)\n : typeof prop[\"x-col-span\"] === \"number\" &&\n Number.isFinite(prop[\"x-col-span\"])\n ? prop[\"x-col-span\"]\n : undefined;\n const keyOptions = keyOptionsFor(prop);\n const helper = schemaHelper(prop);\n const helpMode = helpDisplay(prop);\n const base: FieldControl = {\n key,\n kind: \"string\",\n label: typeof prop.title === \"string\" && prop.title ? prop.title : key,\n required,\n schema: prop,\n value,\n onChange,\n ...(prop.readOnly === true ? { readOnly: true } : {}),\n ...(typeof prop.description === \"string\"\n ? { description: prop.description }\n : {}),\n ...(helper ? { helper } : {}),\n ...(helpMode ? { helpDisplay: helpMode } : {}),\n ...(labelIcon != null && labelIcon !== \"\"\n ? { labelIcon: labelIcon as FieldControl[\"labelIcon\"] }\n : {}),\n ...(layout ? { layout } : {}),\n ...(prefix ? { prefix } : {}),\n ...(suffix ? { suffix } : {}),\n ...(labelClassName ? { labelClassName } : {}),\n ...(inputClassName ? { inputClassName } : {}),\n ...(colSpan != null ? { colSpan } : {}),\n };\n\n // An `x-clicky-lookup` field is an async entity-reference picker: options load\n // lazily from another entity's list endpoint. Single-select also allows\n // free-form entry so a typed value outside the option set still commits.\n const lookup = lookupDescriptor(prop);\n if (lookup) {\n return {\n ...base,\n kind: \"lookup\",\n lookup,\n options: [],\n allowCustomValue: lookup.multi !== true,\n };\n }\n if (Array.isArray(prop.enum) && prop.enum.length > 0) {\n const display = enumDisplay(prop);\n return {\n ...base,\n kind: \"enum\",\n options: enumOptions(prop),\n ...(display ? { display } : {}),\n };\n }\n // A value-or-template union: the enum lives in an anyOf/oneOf branch alongside\n // free-form branches. Render it as a dropdown using that branch's enum; the\n // free-form branches are honoured via a consumer's allowCustomValue pre-ext.\n const branch = enumBranch(prop);\n if (branch) {\n return { ...base, kind: \"enum\", options: enumOptions(branch) };\n }\n // A schema-declared date/date-time string renders as a date control.\n if (prop.format === \"date\" || prop.format === \"date-time\") {\n return { ...base, kind: \"date\", dateFormat: prop.format };\n }\n // A long-form string declares `format: textarea` to render a multi-line box.\n if (prop.format === \"textarea\" && schemaHasType(prop, \"string\")) {\n return { ...base, kind: \"textarea\" };\n }\n // A markdown string declares `format: md` to render the MDXEditor-backed\n // editor. Plugin toggles live under `x-md-editor` so schema authors can keep\n // the format signal standard-sized and the editor behavior explicit.\n if (prop.format === \"md\" && schemaHasType(prop, \"string\")) {\n const markdownOptions = prop[\"x-md-editor\"];\n return {\n ...base,\n kind: \"markdown\",\n ...(isPlainObject(markdownOptions) ? { markdownOptions } : {}),\n };\n }\n if (schemaHasType(prop, \"boolean\")) {\n return { ...base, kind: \"boolean\" };\n }\n if (schemaHasType(prop, \"integer\") || schemaHasType(prop, \"number\")) {\n return {\n ...base,\n kind: \"number\",\n coerceNumber: true,\n // A percent number carries a static \"%\" unit shown inside the input.\n ...(prop.format === \"percent\" ? { unit: \"%\" } : {}),\n ...(typeof prop.minimum === \"number\" ? { minimum: prop.minimum } : {}),\n };\n }\n if (schemaHasType(prop, \"array\")) {\n const display = arrayDisplay(prop);\n const itemSchema = prop.items;\n return {\n ...base,\n kind: \"array\",\n ...(itemSchema ? { itemSchema } : {}),\n ...(display ? { arrayDisplay: display } : {}),\n ...(display === \"accordion\" ? { itemSpec: resolveItemSpec(prop, itemSchema) } : {}),\n // An accordion reuses the array's description as the zero-item copy in its\n // add row, so a paragraph of the same sentence directly above would be a\n // literal duplicate. The schema can still say otherwise.\n ...(display === \"accordion\" && !helpMode ? { helpDisplay: \"hover\" as const } : {}),\n ...(display && itemSchema && Array.isArray(itemSchema.enum)\n ? { options: enumOptions(itemSchema) }\n : {}),\n ...(layout ? { layout } : {}),\n };\n }\n // An open map: object whose entries are described by an additionalProperties\n // sub-schema and/or per-key patternProperties. Renders as editable key/value\n // rows (+ any known properties), with the value form resolved per key.\n if (isOpenStringMap(prop)) {\n const addl =\n typeof prop.additionalProperties === \"object\" &&\n prop.additionalProperties !== null\n ? (prop.additionalProperties as JsonSchemaProperty)\n : undefined;\n const patterns = patternSchemasOf(prop);\n // A constrained picker (propertyNames enum) or patternProperties still lets\n // the author ADD keys — the additions are limited to the allowed set, not\n // free-form — so `additionalProperties: false` doesn't disable \"Add field\"\n // in that case. It only closes a plain open map with no key constraints.\n const allowExtraKeys =\n keyOptions || patterns ? true : prop.additionalProperties !== false;\n return {\n ...base,\n kind: \"string-map\",\n ...(addl ? { valueSchema: addl } : {}),\n ...(patterns ? { valuePatternSchemas: patterns } : {}),\n ...(prop.properties ? { knownProperties: prop.properties } : {}),\n allowExtraKeys,\n ...(keyOptions ? { keyOptions } : {}),\n ...(layout ? { layout } : {}),\n };\n }\n // A structured object: fixed `properties`, not an open map. Renders as a\n // nested sub-form (labels, required, if/then) — recursed into by the renderer.\n if (schemaRendersAsObject(prop)) {\n const valueObject = isPlainObject(value) ? value : {};\n const objectFields = effectiveProperties(\n prop as JsonSchemaObject,\n valueObject,\n );\n if (Object.keys(objectFields.properties).length > 0 || prop.properties) {\n return {\n ...base,\n kind: \"object\",\n objectProperties: objectFields.properties,\n ...(objectFields.required.length > 0\n ? { objectRequired: objectFields.required }\n : {}),\n ...(layout ? { layout } : {}),\n };\n }\n }\n // A bare object with neither properties nor an additionalProperties schema:\n // treat as an open string map unless explicitly closed.\n if (schemaRendersAsObject(prop)) {\n return {\n ...base,\n kind: \"string-map\",\n allowExtraKeys: prop.additionalProperties !== false,\n ...(keyOptions ? { keyOptions } : {}),\n ...(layout ? { layout } : {}),\n };\n }\n return base;\n}\n\n// keyOptionsFor resolves the strict map-key picker options from a map schema's\n// `propertyNames.enum` (e.g. an AsCode-constrained key set). Returns undefined\n// when the keys are unconstrained, so the key stays free-text.\nfunction keyOptionsFor(prop: JsonSchemaProperty): FieldOption[] | undefined {\n const pn = prop.propertyNames as JsonSchemaProperty | undefined;\n if (!pn || !Array.isArray(pn.enum) || pn.enum.length === 0) return undefined;\n return enumOptions(pn);\n}\n\n// isScalarStringItems reports whether an array's item schema is a plain string\n// with no richer shape — the case the array control renders as compact tags.\n// Anything with an enum/const/properties/items/additionalProperties/allOf needs\n// a real per-item control instead.\nexport function isScalarStringItems(\n items: JsonSchemaProperty | undefined,\n): boolean {\n if (!items) return true; // untyped items default to string tags\n if (items.type !== undefined && !schemaHasType(items, \"string\")) return false;\n return (\n items.enum === undefined &&\n items.const === undefined &&\n items.properties === undefined &&\n items.items === undefined &&\n items.additionalProperties === undefined &&\n items.allOf === undefined\n );\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].const` equals\n// value[k].\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 (\"const\" in sub && value[k] !== sub.const) return false;\n }\n return true;\n}\n\nexport interface EffectiveProperties {\n properties: Record<string, JsonSchemaProperty>;\n required: string[];\n}\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\nfunction 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\n// effectiveProperties merges the schema's base `properties` with each `allOf`\n// member's contribution. An `if`/`then` member contributes `then.properties`\n// only when its `if` matches the current value; an unconditional member (e.g.\n// an inlined `$ref` composition, which carries its own `properties` and no\n// `if`) always contributes. Later members win on key collision; required is the\n// union. Pure and 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 for (const [k, sub] of Object.entries(clause.properties ?? {})) {\n properties[k] = sub;\n }\n for (const k of clause.required ?? []) required.add(k);\n continue;\n }\n if (!matchesIf(clause.if, value)) continue;\n const then = clause.then ?? {};\n for (const [k, sub] of Object.entries(then.properties ?? {})) {\n properties[k] = sub;\n }\n for (const k of then.required ?? []) required.add(k);\n }\n return { properties, required: [...required] };\n}\n"],"names":[],"mappings":";;;;;AAoBO,SAAS,gBAAgB,MAAmC;AACjE,MAAI,CAAC,sBAAsB,IAAI,EAAG,QAAO;AACzC,MACE,OAAO,KAAK,yBAAyB,YACrC,KAAK,yBAAyB,MAC9B;AACA,WAAO;AAAA,EACT;AACA,SACE,CAAC,CAAC,KAAK,qBAAqB,OAAO,KAAK,KAAK,iBAAiB,EAAE,SAAS;AAE7E;AAIA,SAAS,iBACP,MAC+D;AAC/D,QAAM,KAAK,KAAK;AAChB,MAAI,CAAC,MAAM,OAAO,KAAK,EAAE,EAAE,WAAW,EAAG,QAAO;AAChD,SAAO,OAAO,QAAQ,EAAE,EAAE,IAAI,CAAC,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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,iBAAW,CAAC,GAAG,GAAG,KAAK,OAAO,QAAQ,OAAO,cAAc,CAAA,CAAE,GAAG;AAC9D,mBAAW,CAAC,IAAI;AAAA,MAClB;AACA,iBAAW,KAAK,OAAO,YAAY,CAAA,EAAI,UAAS,IAAI,CAAC;AACrD;AAAA,IACF;AACA,QAAI,CAAC,UAAU,OAAO,IAAI,KAAK,EAAG;AAClC,UAAM,OAAO,OAAO,QAAQ,CAAA;AAC5B,eAAW,CAAC,GAAG,GAAG,KAAK,OAAO,QAAQ,KAAK,cAAc,CAAA,CAAE,GAAG;AAC5D,iBAAW,CAAC,IAAI;AAAA,IAClB;AACA,eAAW,KAAK,KAAK,YAAY,CAAA,EAAI,UAAS,IAAI,CAAC;AAAA,EACrD;AACA,SAAO,EAAE,YAAY,UAAU,CAAC,GAAG,QAAQ,EAAA;AAC7C;"}
@@ -22,12 +22,24 @@ const TONE_GLYPH_CLASS = {
22
22
  emerald: "bg-emerald-100 text-emerald-700 ring-emerald-300/60 dark:bg-emerald-400/10 dark:text-emerald-300 dark:ring-emerald-400/25",
23
23
  rose: "bg-rose-100 text-rose-700 ring-rose-300/60 dark:bg-rose-400/10 dark:text-rose-300 dark:ring-rose-400/25"
24
24
  };
25
+ const TONE_EDGE_CLASS = {
26
+ neutral: "border-l-border dark:border-l-border",
27
+ slate: "border-l-slate-400 dark:border-l-slate-500",
28
+ violet: "border-l-violet-400 dark:border-l-violet-500",
29
+ amber: "border-l-amber-400 dark:border-l-amber-500",
30
+ sky: "border-l-sky-400 dark:border-l-sky-500",
31
+ teal: "border-l-teal-400 dark:border-l-teal-500",
32
+ indigo: "border-l-indigo-400 dark:border-l-indigo-500",
33
+ emerald: "border-l-emerald-400 dark:border-l-emerald-500",
34
+ rose: "border-l-rose-400 dark:border-l-rose-500"
35
+ };
25
36
  function isFieldTone(value) {
26
37
  return typeof value === "string" && TONES.includes(value);
27
38
  }
28
39
  function normalizeTone(value) {
29
40
  return isFieldTone(value) ? value : "neutral";
30
41
  }
42
+ exports.TONE_EDGE_CLASS = TONE_EDGE_CLASS;
31
43
  exports.TONE_GLYPH_CLASS = TONE_GLYPH_CLASS;
32
44
  exports.isFieldTone = isFieldTone;
33
45
  exports.normalizeTone = normalizeTone;
@@ -1 +1 @@
1
- {"version":3,"file":"json-schema-form-tone.cjs","sources":["../../src/components/json-schema-form-tone.ts"],"sourcesContent":["// FieldTone is the closed colour vocabulary a schema may name via `x-enum-tones`\n// to give an enum value its own hue (e.g. a parameter's type). It extends the\n// `IconTone` union in ../data/Icon with the two extra hues a six-value enum needs,\n// so the two vocabularies read as one system.\n//\n// The class strings below are written out IN FULL and never composed. Tailwind\n// scans source text, so `bg-${tone}-100` would emit nothing — and a tone name\n// arriving from a consumer's JSON schema is data the scanner never sees at all.\n// Every entry carries a `dark:` variant; the clicky-ui preset binds `dark:` to\n// [data-theme=\"dark\"], so tones track the theme switcher rather than the OS.\nexport type FieldTone =\n | \"neutral\"\n | \"slate\"\n | \"violet\"\n | \"amber\"\n | \"sky\"\n | \"teal\"\n | \"indigo\"\n | \"emerald\"\n | \"rose\";\n\nconst TONES: readonly FieldTone[] = [\n \"neutral\",\n \"slate\",\n \"violet\",\n \"amber\",\n \"sky\",\n \"teal\",\n \"indigo\",\n \"emerald\",\n \"rose\",\n];\n\n// Soft filled tile + inset ring — the accordion's leading glyph and enum chip.\nexport const TONE_GLYPH_CLASS: Record<FieldTone, string> = {\n neutral: \"bg-muted text-muted-foreground ring-border\",\n slate:\n \"bg-slate-100 text-slate-700 ring-slate-300/60 dark:bg-slate-400/10 dark:text-slate-300 dark:ring-slate-400/25\",\n violet:\n \"bg-violet-100 text-violet-700 ring-violet-300/60 dark:bg-violet-400/10 dark:text-violet-300 dark:ring-violet-400/25\",\n amber:\n \"bg-amber-100 text-amber-800 ring-amber-300/60 dark:bg-amber-400/10 dark:text-amber-300 dark:ring-amber-400/25\",\n sky: \"bg-sky-100 text-sky-700 ring-sky-300/60 dark:bg-sky-400/10 dark:text-sky-300 dark:ring-sky-400/25\",\n teal: \"bg-teal-100 text-teal-700 ring-teal-300/60 dark:bg-teal-400/10 dark:text-teal-300 dark:ring-teal-400/25\",\n indigo:\n \"bg-indigo-100 text-indigo-700 ring-indigo-300/60 dark:bg-indigo-400/10 dark:text-indigo-300 dark:ring-indigo-400/25\",\n emerald:\n \"bg-emerald-100 text-emerald-700 ring-emerald-300/60 dark:bg-emerald-400/10 dark:text-emerald-300 dark:ring-emerald-400/25\",\n rose: \"bg-rose-100 text-rose-700 ring-rose-300/60 dark:bg-rose-400/10 dark:text-rose-300 dark:ring-rose-400/25\",\n};\n\n// Left border accent — a stack of items is scannable by hue before you read it.\nexport const TONE_EDGE_CLASS: Record<FieldTone, string> = {\n neutral: \"border-l-border dark:border-l-border\",\n slate: \"border-l-slate-400 dark:border-l-slate-500\",\n violet: \"border-l-violet-400 dark:border-l-violet-500\",\n amber: \"border-l-amber-400 dark:border-l-amber-500\",\n sky: \"border-l-sky-400 dark:border-l-sky-500\",\n teal: \"border-l-teal-400 dark:border-l-teal-500\",\n indigo: \"border-l-indigo-400 dark:border-l-indigo-500\",\n emerald: \"border-l-emerald-400 dark:border-l-emerald-500\",\n rose: \"border-l-rose-400 dark:border-l-rose-500\",\n};\n\n// Solid dot — the compact legend/rail marker.\nexport const TONE_DOT_CLASS: Record<FieldTone, string> = {\n neutral: \"bg-muted-foreground dark:bg-muted-foreground\",\n slate: \"bg-slate-400 dark:bg-slate-500\",\n violet: \"bg-violet-400 dark:bg-violet-500\",\n amber: \"bg-amber-400 dark:bg-amber-500\",\n sky: \"bg-sky-400 dark:bg-sky-500\",\n teal: \"bg-teal-400 dark:bg-teal-500\",\n indigo: \"bg-indigo-400 dark:bg-indigo-500\",\n emerald: \"bg-emerald-400 dark:bg-emerald-500\",\n rose: \"bg-rose-400 dark:bg-rose-500\",\n};\n\nexport function isFieldTone(value: unknown): value is FieldTone {\n return typeof value === \"string\" && (TONES as readonly string[]).includes(value);\n}\n\n// normalizeTone coerces an unvalidated schema value to a known tone. A tone is\n// pure decoration, so an unrecognised one falls back to neutral rather than\n// failing the render.\nexport function normalizeTone(value: unknown): FieldTone {\n return isFieldTone(value) ? value : \"neutral\";\n}\n\nexport function fieldToneNames(): readonly FieldTone[] {\n return TONES;\n}\n"],"names":[],"mappings":";;AAqBA,MAAM,QAA8B;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,MAAM,mBAA8C;AAAA,EACzD,SAAS;AAAA,EACT,OACE;AAAA,EACF,QACE;AAAA,EACF,OACE;AAAA,EACF,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QACE;AAAA,EACF,SACE;AAAA,EACF,MAAM;AACR;AA4BO,SAAS,YAAY,OAAoC;AAC9D,SAAO,OAAO,UAAU,YAAa,MAA4B,SAAS,KAAK;AACjF;AAKO,SAAS,cAAc,OAA2B;AACvD,SAAO,YAAY,KAAK,IAAI,QAAQ;AACtC;;;;"}
1
+ {"version":3,"file":"json-schema-form-tone.cjs","sources":["../../src/components/json-schema-form-tone.ts"],"sourcesContent":["// FieldTone is the closed colour vocabulary a schema may name via `x-enum-tones`\n// to give an enum value its own hue (e.g. a parameter's type). It extends the\n// `IconTone` union in ../data/Icon with the two extra hues a six-value enum needs,\n// so the two vocabularies read as one system.\n//\n// The class strings below are written out IN FULL and never composed. Tailwind\n// scans source text, so `bg-${tone}-100` would emit nothing — and a tone name\n// arriving from a consumer's JSON schema is data the scanner never sees at all.\n// Every entry carries a `dark:` variant; the clicky-ui preset binds `dark:` to\n// [data-theme=\"dark\"], so tones track the theme switcher rather than the OS.\nexport type FieldTone =\n | \"neutral\"\n | \"slate\"\n | \"violet\"\n | \"amber\"\n | \"sky\"\n | \"teal\"\n | \"indigo\"\n | \"emerald\"\n | \"rose\";\n\nconst TONES: readonly FieldTone[] = [\n \"neutral\",\n \"slate\",\n \"violet\",\n \"amber\",\n \"sky\",\n \"teal\",\n \"indigo\",\n \"emerald\",\n \"rose\",\n];\n\n// Soft filled tile + inset ring — the accordion's leading glyph and enum chip.\nexport const TONE_GLYPH_CLASS: Record<FieldTone, string> = {\n neutral: \"bg-muted text-muted-foreground ring-border\",\n slate:\n \"bg-slate-100 text-slate-700 ring-slate-300/60 dark:bg-slate-400/10 dark:text-slate-300 dark:ring-slate-400/25\",\n violet:\n \"bg-violet-100 text-violet-700 ring-violet-300/60 dark:bg-violet-400/10 dark:text-violet-300 dark:ring-violet-400/25\",\n amber:\n \"bg-amber-100 text-amber-800 ring-amber-300/60 dark:bg-amber-400/10 dark:text-amber-300 dark:ring-amber-400/25\",\n sky: \"bg-sky-100 text-sky-700 ring-sky-300/60 dark:bg-sky-400/10 dark:text-sky-300 dark:ring-sky-400/25\",\n teal: \"bg-teal-100 text-teal-700 ring-teal-300/60 dark:bg-teal-400/10 dark:text-teal-300 dark:ring-teal-400/25\",\n indigo:\n \"bg-indigo-100 text-indigo-700 ring-indigo-300/60 dark:bg-indigo-400/10 dark:text-indigo-300 dark:ring-indigo-400/25\",\n emerald:\n \"bg-emerald-100 text-emerald-700 ring-emerald-300/60 dark:bg-emerald-400/10 dark:text-emerald-300 dark:ring-emerald-400/25\",\n rose: \"bg-rose-100 text-rose-700 ring-rose-300/60 dark:bg-rose-400/10 dark:text-rose-300 dark:ring-rose-400/25\",\n};\n\n// Left border accent — a stack of items is scannable by hue before you read it.\nexport const TONE_EDGE_CLASS: Record<FieldTone, string> = {\n neutral: \"border-l-border dark:border-l-border\",\n slate: \"border-l-slate-400 dark:border-l-slate-500\",\n violet: \"border-l-violet-400 dark:border-l-violet-500\",\n amber: \"border-l-amber-400 dark:border-l-amber-500\",\n sky: \"border-l-sky-400 dark:border-l-sky-500\",\n teal: \"border-l-teal-400 dark:border-l-teal-500\",\n indigo: \"border-l-indigo-400 dark:border-l-indigo-500\",\n emerald: \"border-l-emerald-400 dark:border-l-emerald-500\",\n rose: \"border-l-rose-400 dark:border-l-rose-500\",\n};\n\n// Solid dot — the compact legend/rail marker.\nexport const TONE_DOT_CLASS: Record<FieldTone, string> = {\n neutral: \"bg-muted-foreground dark:bg-muted-foreground\",\n slate: \"bg-slate-400 dark:bg-slate-500\",\n violet: \"bg-violet-400 dark:bg-violet-500\",\n amber: \"bg-amber-400 dark:bg-amber-500\",\n sky: \"bg-sky-400 dark:bg-sky-500\",\n teal: \"bg-teal-400 dark:bg-teal-500\",\n indigo: \"bg-indigo-400 dark:bg-indigo-500\",\n emerald: \"bg-emerald-400 dark:bg-emerald-500\",\n rose: \"bg-rose-400 dark:bg-rose-500\",\n};\n\nexport function isFieldTone(value: unknown): value is FieldTone {\n return typeof value === \"string\" && (TONES as readonly string[]).includes(value);\n}\n\n// normalizeTone coerces an unvalidated schema value to a known tone. A tone is\n// pure decoration, so an unrecognised one falls back to neutral rather than\n// failing the render.\nexport function normalizeTone(value: unknown): FieldTone {\n return isFieldTone(value) ? value : \"neutral\";\n}\n\nexport function fieldToneNames(): readonly FieldTone[] {\n return TONES;\n}\n"],"names":[],"mappings":";;AAqBA,MAAM,QAA8B;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,MAAM,mBAA8C;AAAA,EACzD,SAAS;AAAA,EACT,OACE;AAAA,EACF,QACE;AAAA,EACF,OACE;AAAA,EACF,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QACE;AAAA,EACF,SACE;AAAA,EACF,MAAM;AACR;AAGO,MAAM,kBAA6C;AAAA,EACxD,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AACR;AAeO,SAAS,YAAY,OAAoC;AAC9D,SAAO,OAAO,UAAU,YAAa,MAA4B,SAAS,KAAK;AACjF;AAKO,SAAS,cAAc,OAA2B;AACvD,SAAO,YAAY,KAAK,IAAI,QAAQ;AACtC;;;;;"}
@@ -20,6 +20,17 @@ const TONE_GLYPH_CLASS = {
20
20
  emerald: "bg-emerald-100 text-emerald-700 ring-emerald-300/60 dark:bg-emerald-400/10 dark:text-emerald-300 dark:ring-emerald-400/25",
21
21
  rose: "bg-rose-100 text-rose-700 ring-rose-300/60 dark:bg-rose-400/10 dark:text-rose-300 dark:ring-rose-400/25"
22
22
  };
23
+ const TONE_EDGE_CLASS = {
24
+ neutral: "border-l-border dark:border-l-border",
25
+ slate: "border-l-slate-400 dark:border-l-slate-500",
26
+ violet: "border-l-violet-400 dark:border-l-violet-500",
27
+ amber: "border-l-amber-400 dark:border-l-amber-500",
28
+ sky: "border-l-sky-400 dark:border-l-sky-500",
29
+ teal: "border-l-teal-400 dark:border-l-teal-500",
30
+ indigo: "border-l-indigo-400 dark:border-l-indigo-500",
31
+ emerald: "border-l-emerald-400 dark:border-l-emerald-500",
32
+ rose: "border-l-rose-400 dark:border-l-rose-500"
33
+ };
23
34
  function isFieldTone(value) {
24
35
  return typeof value === "string" && TONES.includes(value);
25
36
  }
@@ -27,6 +38,7 @@ function normalizeTone(value) {
27
38
  return isFieldTone(value) ? value : "neutral";
28
39
  }
29
40
  export {
41
+ TONE_EDGE_CLASS,
30
42
  TONE_GLYPH_CLASS,
31
43
  isFieldTone,
32
44
  normalizeTone
@@ -1 +1 @@
1
- {"version":3,"file":"json-schema-form-tone.js","sources":["../../src/components/json-schema-form-tone.ts"],"sourcesContent":["// FieldTone is the closed colour vocabulary a schema may name via `x-enum-tones`\n// to give an enum value its own hue (e.g. a parameter's type). It extends the\n// `IconTone` union in ../data/Icon with the two extra hues a six-value enum needs,\n// so the two vocabularies read as one system.\n//\n// The class strings below are written out IN FULL and never composed. Tailwind\n// scans source text, so `bg-${tone}-100` would emit nothing — and a tone name\n// arriving from a consumer's JSON schema is data the scanner never sees at all.\n// Every entry carries a `dark:` variant; the clicky-ui preset binds `dark:` to\n// [data-theme=\"dark\"], so tones track the theme switcher rather than the OS.\nexport type FieldTone =\n | \"neutral\"\n | \"slate\"\n | \"violet\"\n | \"amber\"\n | \"sky\"\n | \"teal\"\n | \"indigo\"\n | \"emerald\"\n | \"rose\";\n\nconst TONES: readonly FieldTone[] = [\n \"neutral\",\n \"slate\",\n \"violet\",\n \"amber\",\n \"sky\",\n \"teal\",\n \"indigo\",\n \"emerald\",\n \"rose\",\n];\n\n// Soft filled tile + inset ring — the accordion's leading glyph and enum chip.\nexport const TONE_GLYPH_CLASS: Record<FieldTone, string> = {\n neutral: \"bg-muted text-muted-foreground ring-border\",\n slate:\n \"bg-slate-100 text-slate-700 ring-slate-300/60 dark:bg-slate-400/10 dark:text-slate-300 dark:ring-slate-400/25\",\n violet:\n \"bg-violet-100 text-violet-700 ring-violet-300/60 dark:bg-violet-400/10 dark:text-violet-300 dark:ring-violet-400/25\",\n amber:\n \"bg-amber-100 text-amber-800 ring-amber-300/60 dark:bg-amber-400/10 dark:text-amber-300 dark:ring-amber-400/25\",\n sky: \"bg-sky-100 text-sky-700 ring-sky-300/60 dark:bg-sky-400/10 dark:text-sky-300 dark:ring-sky-400/25\",\n teal: \"bg-teal-100 text-teal-700 ring-teal-300/60 dark:bg-teal-400/10 dark:text-teal-300 dark:ring-teal-400/25\",\n indigo:\n \"bg-indigo-100 text-indigo-700 ring-indigo-300/60 dark:bg-indigo-400/10 dark:text-indigo-300 dark:ring-indigo-400/25\",\n emerald:\n \"bg-emerald-100 text-emerald-700 ring-emerald-300/60 dark:bg-emerald-400/10 dark:text-emerald-300 dark:ring-emerald-400/25\",\n rose: \"bg-rose-100 text-rose-700 ring-rose-300/60 dark:bg-rose-400/10 dark:text-rose-300 dark:ring-rose-400/25\",\n};\n\n// Left border accent — a stack of items is scannable by hue before you read it.\nexport const TONE_EDGE_CLASS: Record<FieldTone, string> = {\n neutral: \"border-l-border dark:border-l-border\",\n slate: \"border-l-slate-400 dark:border-l-slate-500\",\n violet: \"border-l-violet-400 dark:border-l-violet-500\",\n amber: \"border-l-amber-400 dark:border-l-amber-500\",\n sky: \"border-l-sky-400 dark:border-l-sky-500\",\n teal: \"border-l-teal-400 dark:border-l-teal-500\",\n indigo: \"border-l-indigo-400 dark:border-l-indigo-500\",\n emerald: \"border-l-emerald-400 dark:border-l-emerald-500\",\n rose: \"border-l-rose-400 dark:border-l-rose-500\",\n};\n\n// Solid dot — the compact legend/rail marker.\nexport const TONE_DOT_CLASS: Record<FieldTone, string> = {\n neutral: \"bg-muted-foreground dark:bg-muted-foreground\",\n slate: \"bg-slate-400 dark:bg-slate-500\",\n violet: \"bg-violet-400 dark:bg-violet-500\",\n amber: \"bg-amber-400 dark:bg-amber-500\",\n sky: \"bg-sky-400 dark:bg-sky-500\",\n teal: \"bg-teal-400 dark:bg-teal-500\",\n indigo: \"bg-indigo-400 dark:bg-indigo-500\",\n emerald: \"bg-emerald-400 dark:bg-emerald-500\",\n rose: \"bg-rose-400 dark:bg-rose-500\",\n};\n\nexport function isFieldTone(value: unknown): value is FieldTone {\n return typeof value === \"string\" && (TONES as readonly string[]).includes(value);\n}\n\n// normalizeTone coerces an unvalidated schema value to a known tone. A tone is\n// pure decoration, so an unrecognised one falls back to neutral rather than\n// failing the render.\nexport function normalizeTone(value: unknown): FieldTone {\n return isFieldTone(value) ? value : \"neutral\";\n}\n\nexport function fieldToneNames(): readonly FieldTone[] {\n return TONES;\n}\n"],"names":[],"mappings":"AAqBA,MAAM,QAA8B;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,MAAM,mBAA8C;AAAA,EACzD,SAAS;AAAA,EACT,OACE;AAAA,EACF,QACE;AAAA,EACF,OACE;AAAA,EACF,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QACE;AAAA,EACF,SACE;AAAA,EACF,MAAM;AACR;AA4BO,SAAS,YAAY,OAAoC;AAC9D,SAAO,OAAO,UAAU,YAAa,MAA4B,SAAS,KAAK;AACjF;AAKO,SAAS,cAAc,OAA2B;AACvD,SAAO,YAAY,KAAK,IAAI,QAAQ;AACtC;"}
1
+ {"version":3,"file":"json-schema-form-tone.js","sources":["../../src/components/json-schema-form-tone.ts"],"sourcesContent":["// FieldTone is the closed colour vocabulary a schema may name via `x-enum-tones`\n// to give an enum value its own hue (e.g. a parameter's type). It extends the\n// `IconTone` union in ../data/Icon with the two extra hues a six-value enum needs,\n// so the two vocabularies read as one system.\n//\n// The class strings below are written out IN FULL and never composed. Tailwind\n// scans source text, so `bg-${tone}-100` would emit nothing — and a tone name\n// arriving from a consumer's JSON schema is data the scanner never sees at all.\n// Every entry carries a `dark:` variant; the clicky-ui preset binds `dark:` to\n// [data-theme=\"dark\"], so tones track the theme switcher rather than the OS.\nexport type FieldTone =\n | \"neutral\"\n | \"slate\"\n | \"violet\"\n | \"amber\"\n | \"sky\"\n | \"teal\"\n | \"indigo\"\n | \"emerald\"\n | \"rose\";\n\nconst TONES: readonly FieldTone[] = [\n \"neutral\",\n \"slate\",\n \"violet\",\n \"amber\",\n \"sky\",\n \"teal\",\n \"indigo\",\n \"emerald\",\n \"rose\",\n];\n\n// Soft filled tile + inset ring — the accordion's leading glyph and enum chip.\nexport const TONE_GLYPH_CLASS: Record<FieldTone, string> = {\n neutral: \"bg-muted text-muted-foreground ring-border\",\n slate:\n \"bg-slate-100 text-slate-700 ring-slate-300/60 dark:bg-slate-400/10 dark:text-slate-300 dark:ring-slate-400/25\",\n violet:\n \"bg-violet-100 text-violet-700 ring-violet-300/60 dark:bg-violet-400/10 dark:text-violet-300 dark:ring-violet-400/25\",\n amber:\n \"bg-amber-100 text-amber-800 ring-amber-300/60 dark:bg-amber-400/10 dark:text-amber-300 dark:ring-amber-400/25\",\n sky: \"bg-sky-100 text-sky-700 ring-sky-300/60 dark:bg-sky-400/10 dark:text-sky-300 dark:ring-sky-400/25\",\n teal: \"bg-teal-100 text-teal-700 ring-teal-300/60 dark:bg-teal-400/10 dark:text-teal-300 dark:ring-teal-400/25\",\n indigo:\n \"bg-indigo-100 text-indigo-700 ring-indigo-300/60 dark:bg-indigo-400/10 dark:text-indigo-300 dark:ring-indigo-400/25\",\n emerald:\n \"bg-emerald-100 text-emerald-700 ring-emerald-300/60 dark:bg-emerald-400/10 dark:text-emerald-300 dark:ring-emerald-400/25\",\n rose: \"bg-rose-100 text-rose-700 ring-rose-300/60 dark:bg-rose-400/10 dark:text-rose-300 dark:ring-rose-400/25\",\n};\n\n// Left border accent — a stack of items is scannable by hue before you read it.\nexport const TONE_EDGE_CLASS: Record<FieldTone, string> = {\n neutral: \"border-l-border dark:border-l-border\",\n slate: \"border-l-slate-400 dark:border-l-slate-500\",\n violet: \"border-l-violet-400 dark:border-l-violet-500\",\n amber: \"border-l-amber-400 dark:border-l-amber-500\",\n sky: \"border-l-sky-400 dark:border-l-sky-500\",\n teal: \"border-l-teal-400 dark:border-l-teal-500\",\n indigo: \"border-l-indigo-400 dark:border-l-indigo-500\",\n emerald: \"border-l-emerald-400 dark:border-l-emerald-500\",\n rose: \"border-l-rose-400 dark:border-l-rose-500\",\n};\n\n// Solid dot — the compact legend/rail marker.\nexport const TONE_DOT_CLASS: Record<FieldTone, string> = {\n neutral: \"bg-muted-foreground dark:bg-muted-foreground\",\n slate: \"bg-slate-400 dark:bg-slate-500\",\n violet: \"bg-violet-400 dark:bg-violet-500\",\n amber: \"bg-amber-400 dark:bg-amber-500\",\n sky: \"bg-sky-400 dark:bg-sky-500\",\n teal: \"bg-teal-400 dark:bg-teal-500\",\n indigo: \"bg-indigo-400 dark:bg-indigo-500\",\n emerald: \"bg-emerald-400 dark:bg-emerald-500\",\n rose: \"bg-rose-400 dark:bg-rose-500\",\n};\n\nexport function isFieldTone(value: unknown): value is FieldTone {\n return typeof value === \"string\" && (TONES as readonly string[]).includes(value);\n}\n\n// normalizeTone coerces an unvalidated schema value to a known tone. A tone is\n// pure decoration, so an unrecognised one falls back to neutral rather than\n// failing the render.\nexport function normalizeTone(value: unknown): FieldTone {\n return isFieldTone(value) ? value : \"neutral\";\n}\n\nexport function fieldToneNames(): readonly FieldTone[] {\n return TONES;\n}\n"],"names":[],"mappings":"AAqBA,MAAM,QAA8B;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,MAAM,mBAA8C;AAAA,EACzD,SAAS;AAAA,EACT,OACE;AAAA,EACF,QACE;AAAA,EACF,OACE;AAAA,EACF,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QACE;AAAA,EACF,SACE;AAAA,EACF,MAAM;AACR;AAGO,MAAM,kBAA6C;AAAA,EACxD,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AACR;AAeO,SAAS,YAAY,OAAoC;AAC9D,SAAO,OAAO,UAAU,YAAa,MAA4B,SAAS,KAAK;AACjF;AAKO,SAAS,cAAc,OAA2B;AACvD,SAAO,YAAY,KAAK,IAAI,QAAQ;AACtC;"}
@@ -78,7 +78,7 @@ export type DisplayVariant = "heading" | "text" | "divider" | "spacer";
78
78
  export type EnumDisplay = "combobox" | "radio" | "grid" | "segmented";
79
79
  export type GridColumns = number | "auto";
80
80
  export type HelpDisplay = "inline" | "hover";
81
- export type ArrayDisplay = "filter-pills" | "accordion";
81
+ export type ArrayDisplay = "filter-pills" | "accordion" | "cards";
82
82
  export interface ArrayItemSpec {
83
83
  /** Property keys tried in order; the first with a non-empty value is the row title. */
84
84
  title?: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"json-schema-form-types.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAC1G,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,YAAY,EAAE,SAAS,EAAE,CAAC;AAK1B,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,cAAc,GAAG,cAAc,EAAE,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAIjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB,oBAAoB,CAAC,EAAE,OAAO,G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