@chobantonov/jsonforms-react-renderer-common 0.0.0-stage → 0.1.0

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 (624) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +79 -2
  3. package/lib/cells/CellSummary.cjs.js +2 -0
  4. package/lib/cells/CellSummary.cjs.js.map +1 -0
  5. package/lib/cells/CellSummary.d.ts +14 -0
  6. package/lib/cells/CellSummary.esm.js +29 -0
  7. package/lib/cells/CellSummary.esm.js.map +1 -0
  8. package/lib/cells/cellMode.cjs.js +2 -0
  9. package/lib/cells/cellMode.cjs.js.map +1 -0
  10. package/lib/cells/cellMode.d.ts +14 -0
  11. package/lib/cells/cellMode.esm.js +6 -0
  12. package/lib/cells/cellMode.esm.js.map +1 -0
  13. package/lib/cells/compositeActions.cjs.js +2 -0
  14. package/lib/cells/compositeActions.cjs.js.map +1 -0
  15. package/lib/cells/compositeActions.d.ts +7 -0
  16. package/lib/cells/compositeActions.esm.js +14 -0
  17. package/lib/cells/compositeActions.esm.js.map +1 -0
  18. package/lib/cells/compositeCellTester.cjs.js +2 -0
  19. package/lib/cells/compositeCellTester.cjs.js.map +1 -0
  20. package/lib/cells/compositeCellTester.d.ts +2 -0
  21. package/lib/cells/compositeCellTester.esm.js +12 -0
  22. package/lib/cells/compositeCellTester.esm.js.map +1 -0
  23. package/lib/cells/compositeSummary.cjs.js +2 -0
  24. package/lib/cells/compositeSummary.cjs.js.map +1 -0
  25. package/lib/cells/compositeSummary.d.ts +10 -0
  26. package/lib/cells/compositeSummary.esm.js +44 -0
  27. package/lib/cells/compositeSummary.esm.js.map +1 -0
  28. package/lib/cells/useCompositeCellPresentation.cjs.js +2 -0
  29. package/lib/cells/useCompositeCellPresentation.cjs.js.map +1 -0
  30. package/lib/cells/useCompositeCellPresentation.d.ts +7 -0
  31. package/lib/cells/useCompositeCellPresentation.esm.js +18 -0
  32. package/lib/cells/useCompositeCellPresentation.esm.js.map +1 -0
  33. package/lib/cells/useCompositeDraft.cjs.js +2 -0
  34. package/lib/cells/useCompositeDraft.cjs.js.map +1 -0
  35. package/lib/cells/useCompositeDraft.d.ts +52 -0
  36. package/lib/cells/useCompositeDraft.esm.js +95 -0
  37. package/lib/cells/useCompositeDraft.esm.js.map +1 -0
  38. package/lib/collections/CollectionErrorNavigation.cjs.js +2 -0
  39. package/lib/collections/CollectionErrorNavigation.cjs.js.map +1 -0
  40. package/lib/collections/CollectionErrorNavigation.d.ts +12 -0
  41. package/lib/collections/CollectionErrorNavigation.esm.js +68 -0
  42. package/lib/collections/CollectionErrorNavigation.esm.js.map +1 -0
  43. package/lib/collections/arrayChoices.cjs.js +2 -0
  44. package/lib/collections/arrayChoices.cjs.js.map +1 -0
  45. package/lib/collections/arrayChoices.d.ts +85 -0
  46. package/lib/collections/arrayChoices.esm.js +54 -0
  47. package/lib/collections/arrayChoices.esm.js.map +1 -0
  48. package/lib/collections/collectionPagination.cjs.js +2 -0
  49. package/lib/collections/collectionPagination.cjs.js.map +1 -0
  50. package/lib/collections/collectionPagination.d.ts +22 -0
  51. package/lib/collections/collectionPagination.esm.js +51 -0
  52. package/lib/collections/collectionPagination.esm.js.map +1 -0
  53. package/lib/collections/columnResize.cjs.js +2 -0
  54. package/lib/collections/columnResize.cjs.js.map +1 -0
  55. package/lib/collections/columnResize.d.ts +16 -0
  56. package/lib/collections/columnResize.esm.js +85 -0
  57. package/lib/collections/columnResize.esm.js.map +1 -0
  58. package/lib/collections/rowDetail.cjs.js +2 -0
  59. package/lib/collections/rowDetail.cjs.js.map +1 -0
  60. package/lib/collections/rowDetail.d.ts +34 -0
  61. package/lib/collections/rowDetail.esm.js +106 -0
  62. package/lib/collections/rowDetail.esm.js.map +1 -0
  63. package/lib/collections/tableColumns.cjs.js +2 -0
  64. package/lib/collections/tableColumns.cjs.js.map +1 -0
  65. package/lib/collections/tableColumns.d.ts +13 -0
  66. package/lib/collections/tableColumns.esm.js +16 -0
  67. package/lib/collections/tableColumns.esm.js.map +1 -0
  68. package/lib/collections/useArrayPanelState.cjs.js +2 -0
  69. package/lib/collections/useArrayPanelState.cjs.js.map +1 -0
  70. package/lib/collections/useArrayPanelState.d.ts +7 -0
  71. package/lib/collections/useArrayPanelState.esm.js +18 -0
  72. package/lib/collections/useArrayPanelState.esm.js.map +1 -0
  73. package/lib/collections/useCollectionDelete.cjs.js +2 -0
  74. package/lib/collections/useCollectionDelete.cjs.js.map +1 -0
  75. package/lib/collections/useCollectionDelete.d.ts +17 -0
  76. package/lib/collections/useCollectionDelete.esm.js +38 -0
  77. package/lib/collections/useCollectionDelete.esm.js.map +1 -0
  78. package/lib/collections/useTableSelection.cjs.js +2 -0
  79. package/lib/collections/useTableSelection.cjs.js.map +1 -0
  80. package/lib/collections/useTableSelection.d.ts +11 -0
  81. package/lib/collections/useTableSelection.esm.js +41 -0
  82. package/lib/collections/useTableSelection.esm.js.map +1 -0
  83. package/lib/composition/AllOfRenderer.cjs.js +2 -0
  84. package/lib/composition/AllOfRenderer.cjs.js.map +1 -0
  85. package/lib/composition/AllOfRenderer.d.ts +5 -0
  86. package/lib/composition/AllOfRenderer.esm.js +33 -0
  87. package/lib/composition/AllOfRenderer.esm.js.map +1 -0
  88. package/lib/composition/CombinatorBranch.cjs.js +2 -0
  89. package/lib/composition/CombinatorBranch.cjs.js.map +1 -0
  90. package/lib/composition/CombinatorBranch.d.ts +17 -0
  91. package/lib/composition/CombinatorBranch.esm.js +54 -0
  92. package/lib/composition/CombinatorBranch.esm.js.map +1 -0
  93. package/lib/composition/CombinatorProperties.cjs.js +2 -0
  94. package/lib/composition/CombinatorProperties.cjs.js.map +1 -0
  95. package/lib/composition/CombinatorProperties.d.ts +12 -0
  96. package/lib/composition/CombinatorProperties.esm.js +20 -0
  97. package/lib/composition/CombinatorProperties.esm.js.map +1 -0
  98. package/lib/composition/ScalarCompositionControl.cjs.js +2 -0
  99. package/lib/composition/ScalarCompositionControl.cjs.js.map +1 -0
  100. package/lib/composition/ScalarCompositionControl.d.ts +6 -0
  101. package/lib/composition/ScalarCompositionControl.esm.js +22 -0
  102. package/lib/composition/ScalarCompositionControl.esm.js.map +1 -0
  103. package/lib/composition/choiceCards.cjs.js +2 -0
  104. package/lib/composition/choiceCards.cjs.js.map +1 -0
  105. package/lib/composition/choiceCards.d.ts +36 -0
  106. package/lib/composition/choiceCards.esm.js +162 -0
  107. package/lib/composition/choiceCards.esm.js.map +1 -0
  108. package/lib/composition/combinators.cjs.js +2 -0
  109. package/lib/composition/combinators.cjs.js.map +1 -0
  110. package/lib/composition/combinators.d.ts +40 -0
  111. package/lib/composition/combinators.esm.js +26 -0
  112. package/lib/composition/combinators.esm.js.map +1 -0
  113. package/lib/composition/discriminatorBranch.cjs.js +2 -0
  114. package/lib/composition/discriminatorBranch.cjs.js.map +1 -0
  115. package/lib/composition/discriminatorBranch.d.ts +6 -0
  116. package/lib/composition/discriminatorBranch.esm.js +41 -0
  117. package/lib/composition/discriminatorBranch.esm.js.map +1 -0
  118. package/lib/composition/scalarComposition.cjs.js +2 -0
  119. package/lib/composition/scalarComposition.cjs.js.map +1 -0
  120. package/lib/composition/scalarComposition.d.ts +27 -0
  121. package/lib/composition/scalarComposition.esm.js +76 -0
  122. package/lib/composition/scalarComposition.esm.js.map +1 -0
  123. package/lib/composition/useCombinatorSelection.cjs.js +2 -0
  124. package/lib/composition/useCombinatorSelection.cjs.js.map +1 -0
  125. package/lib/composition/useCombinatorSelection.d.ts +6 -0
  126. package/lib/composition/useCombinatorSelection.esm.js +22 -0
  127. package/lib/composition/useCombinatorSelection.esm.js.map +1 -0
  128. package/lib/composition/useScalarComposition.cjs.js +2 -0
  129. package/lib/composition/useScalarComposition.cjs.js.map +1 -0
  130. package/lib/composition/useScalarComposition.d.ts +18 -0
  131. package/lib/composition/useScalarComposition.esm.js +24 -0
  132. package/lib/composition/useScalarComposition.esm.js.map +1 -0
  133. package/lib/controls/FileArrayInput.cjs.js +2 -0
  134. package/lib/controls/FileArrayInput.cjs.js.map +1 -0
  135. package/lib/controls/FileArrayInput.d.ts +19 -0
  136. package/lib/controls/FileArrayInput.esm.js +232 -0
  137. package/lib/controls/FileArrayInput.esm.js.map +1 -0
  138. package/lib/controls/controlHelp.cjs.js +2 -0
  139. package/lib/controls/controlHelp.cjs.js.map +1 -0
  140. package/lib/controls/controlHelp.d.ts +15 -0
  141. package/lib/controls/controlHelp.esm.js +9 -0
  142. package/lib/controls/controlHelp.esm.js.map +1 -0
  143. package/lib/controls/inputAdornments.cjs.js +2 -0
  144. package/lib/controls/inputAdornments.cjs.js.map +1 -0
  145. package/lib/controls/inputAdornments.d.ts +32 -0
  146. package/lib/controls/inputAdornments.esm.js +192 -0
  147. package/lib/controls/inputAdornments.esm.js.map +1 -0
  148. package/lib/controls/numeric.cjs.js +2 -0
  149. package/lib/controls/numeric.cjs.js.map +1 -0
  150. package/lib/controls/numeric.d.ts +36 -0
  151. package/lib/controls/numeric.esm.js +9 -0
  152. package/lib/controls/numeric.esm.js.map +1 -0
  153. package/lib/controls/useClearAffordance.cjs.js +2 -0
  154. package/lib/controls/useClearAffordance.cjs.js.map +1 -0
  155. package/lib/controls/useClearAffordance.d.ts +15 -0
  156. package/lib/controls/useClearAffordance.esm.js +17 -0
  157. package/lib/controls/useClearAffordance.esm.js.map +1 -0
  158. package/lib/controls/useDebouncedChange.cjs.js +2 -0
  159. package/lib/controls/useDebouncedChange.cjs.js.map +1 -0
  160. package/lib/controls/useDebouncedChange.d.ts +37 -0
  161. package/lib/controls/useDebouncedChange.esm.js +40 -0
  162. package/lib/controls/useDebouncedChange.esm.js.map +1 -0
  163. package/lib/controls/useFocus.cjs.js +2 -0
  164. package/lib/controls/useFocus.cjs.js.map +1 -0
  165. package/lib/controls/useFocus.d.ts +1 -0
  166. package/lib/controls/useFocus.esm.js +13 -0
  167. package/lib/controls/useFocus.esm.js.map +1 -0
  168. package/lib/core/configNamespaces.cjs.js +2 -0
  169. package/lib/core/configNamespaces.cjs.js.map +1 -0
  170. package/lib/core/configNamespaces.d.ts +32 -0
  171. package/lib/core/configNamespaces.esm.js +15 -0
  172. package/lib/core/configNamespaces.esm.js.map +1 -0
  173. package/lib/core/dataPointer.cjs.js +2 -0
  174. package/lib/core/dataPointer.cjs.js.map +1 -0
  175. package/lib/core/dataPointer.d.ts +1 -0
  176. package/lib/core/dataPointer.esm.js +5 -0
  177. package/lib/core/dataPointer.esm.js.map +1 -0
  178. package/lib/core/detailUiSchema.cjs.js +2 -0
  179. package/lib/core/detailUiSchema.cjs.js.map +1 -0
  180. package/lib/core/detailUiSchema.d.ts +7 -0
  181. package/lib/core/detailUiSchema.esm.js +23 -0
  182. package/lib/core/detailUiSchema.esm.js.map +1 -0
  183. package/lib/core/plainRecord.cjs.js +2 -0
  184. package/lib/core/plainRecord.cjs.js.map +1 -0
  185. package/lib/core/plainRecord.d.ts +1 -0
  186. package/lib/core/plainRecord.esm.js +5 -0
  187. package/lib/core/plainRecord.esm.js.map +1 -0
  188. package/lib/core/uiSchemaCycle.cjs.js +2 -0
  189. package/lib/core/uiSchemaCycle.cjs.js.map +1 -0
  190. package/lib/core/uiSchemaCycle.d.ts +18 -0
  191. package/lib/core/uiSchemaCycle.esm.js +27 -0
  192. package/lib/core/uiSchemaCycle.esm.js.map +1 -0
  193. package/lib/dynamic/DynamicUiProvider.cjs.js +4 -0
  194. package/lib/dynamic/DynamicUiProvider.cjs.js.map +1 -0
  195. package/lib/dynamic/DynamicUiProvider.d.ts +35 -0
  196. package/lib/dynamic/DynamicUiProvider.esm.js +182 -0
  197. package/lib/dynamic/DynamicUiProvider.esm.js.map +1 -0
  198. package/lib/dynamic/dynamicCel.cjs.js +2 -0
  199. package/lib/dynamic/dynamicCel.cjs.js.map +1 -0
  200. package/lib/dynamic/dynamicCel.d.ts +1 -0
  201. package/lib/dynamic/dynamicCel.esm.js +43 -0
  202. package/lib/dynamic/dynamicCel.esm.js.map +1 -0
  203. package/lib/dynamic/dynamicConfig.cjs.js +2 -0
  204. package/lib/dynamic/dynamicConfig.cjs.js.map +1 -0
  205. package/lib/dynamic/dynamicConfig.d.ts +7 -0
  206. package/lib/dynamic/dynamicConfig.esm.js +13 -0
  207. package/lib/dynamic/dynamicConfig.esm.js.map +1 -0
  208. package/lib/dynamic/dynamicRuntime.cjs.js +2 -0
  209. package/lib/dynamic/dynamicRuntime.cjs.js.map +1 -0
  210. package/lib/dynamic/dynamicRuntime.d.ts +4 -0
  211. package/lib/dynamic/dynamicRuntime.esm.js +16 -0
  212. package/lib/dynamic/dynamicRuntime.esm.js.map +1 -0
  213. package/lib/dynamic/dynamicScope.cjs.js +2 -0
  214. package/lib/dynamic/dynamicScope.cjs.js.map +1 -0
  215. package/lib/dynamic/dynamicScope.d.ts +2 -0
  216. package/lib/dynamic/dynamicScope.esm.js +17 -0
  217. package/lib/dynamic/dynamicScope.esm.js.map +1 -0
  218. package/lib/dynamic/dynamicTree.cjs.js +2 -0
  219. package/lib/dynamic/dynamicTree.cjs.js.map +1 -0
  220. package/lib/dynamic/dynamicTree.d.ts +12 -0
  221. package/lib/dynamic/dynamicTree.esm.js +57 -0
  222. package/lib/dynamic/dynamicTree.esm.js.map +1 -0
  223. package/lib/dynamic/dynamicUi.cjs.js +2 -0
  224. package/lib/dynamic/dynamicUi.cjs.js.map +1 -0
  225. package/lib/dynamic/dynamicUi.d.ts +39 -0
  226. package/lib/dynamic/dynamicUi.esm.js +397 -0
  227. package/lib/dynamic/dynamicUi.esm.js.map +1 -0
  228. package/lib/formats/colorFormat.cjs.js +2 -0
  229. package/lib/formats/colorFormat.cjs.js.map +1 -0
  230. package/lib/formats/colorFormat.d.ts +127 -0
  231. package/lib/formats/colorFormat.esm.js +139 -0
  232. package/lib/formats/colorFormat.esm.js.map +1 -0
  233. package/lib/formats/dateValues.cjs.js +2 -0
  234. package/lib/formats/dateValues.cjs.js.map +1 -0
  235. package/lib/formats/dateValues.d.ts +3 -0
  236. package/lib/formats/dateValues.esm.js +21 -0
  237. package/lib/formats/dateValues.esm.js.map +1 -0
  238. package/lib/formats/duration.cjs.js +2 -0
  239. package/lib/formats/duration.cjs.js.map +1 -0
  240. package/lib/formats/duration.d.ts +13 -0
  241. package/lib/formats/duration.esm.js +28 -0
  242. package/lib/formats/duration.esm.js.map +1 -0
  243. package/lib/formats/maskControls.cjs.js +2 -0
  244. package/lib/formats/maskControls.cjs.js.map +1 -0
  245. package/lib/formats/maskControls.d.ts +32 -0
  246. package/lib/formats/maskControls.esm.js +16 -0
  247. package/lib/formats/maskControls.esm.js.map +1 -0
  248. package/lib/formats/maskFormat.cjs.js +2 -0
  249. package/lib/formats/maskFormat.cjs.js.map +1 -0
  250. package/lib/formats/maskFormat.d.ts +198 -0
  251. package/lib/formats/maskFormat.esm.js +79 -0
  252. package/lib/formats/maskFormat.esm.js.map +1 -0
  253. package/lib/formats/temporalBounds.cjs.js +2 -0
  254. package/lib/formats/temporalBounds.cjs.js.map +1 -0
  255. package/lib/formats/temporalBounds.d.ts +82 -0
  256. package/lib/formats/temporalBounds.esm.js +76 -0
  257. package/lib/formats/temporalBounds.esm.js.map +1 -0
  258. package/lib/formats/temporalFormats.cjs.js +2 -0
  259. package/lib/formats/temporalFormats.cjs.js.map +1 -0
  260. package/lib/formats/temporalFormats.d.ts +62 -0
  261. package/lib/formats/temporalFormats.esm.js +18 -0
  262. package/lib/formats/temporalFormats.esm.js.map +1 -0
  263. package/lib/formats/useMaskedInput.cjs.js +2 -0
  264. package/lib/formats/useMaskedInput.cjs.js.map +1 -0
  265. package/lib/formats/useMaskedInput.d.ts +11 -0
  266. package/lib/formats/useMaskedInput.esm.js +80 -0
  267. package/lib/formats/useMaskedInput.esm.js.map +1 -0
  268. package/lib/index.cjs.js +1 -0
  269. package/lib/index.d.ts +42 -0
  270. package/lib/index.esm.js +44 -0
  271. package/lib/interaction/confirmation.cjs.js +2 -0
  272. package/lib/interaction/confirmation.cjs.js.map +1 -0
  273. package/lib/interaction/confirmation.d.ts +112 -0
  274. package/lib/interaction/confirmation.esm.js +18 -0
  275. package/lib/interaction/confirmation.esm.js.map +1 -0
  276. package/lib/interaction/createDeleteConfirmation.cjs.js +2 -0
  277. package/lib/interaction/createDeleteConfirmation.cjs.js.map +1 -0
  278. package/lib/interaction/createDeleteConfirmation.d.ts +10 -0
  279. package/lib/interaction/createDeleteConfirmation.esm.js +17 -0
  280. package/lib/interaction/createDeleteConfirmation.esm.js.map +1 -0
  281. package/lib/interaction/detailDialog.cjs.js +2 -0
  282. package/lib/interaction/detailDialog.cjs.js.map +1 -0
  283. package/lib/interaction/detailDialog.d.ts +30 -0
  284. package/lib/interaction/detailDialog.esm.js +89 -0
  285. package/lib/interaction/detailDialog.esm.js.map +1 -0
  286. package/lib/interaction/pendingChanges.cjs.js +2 -0
  287. package/lib/interaction/pendingChanges.cjs.js.map +1 -0
  288. package/lib/interaction/pendingChanges.d.ts +19 -0
  289. package/lib/interaction/pendingChanges.esm.js +17 -0
  290. package/lib/interaction/pendingChanges.esm.js.map +1 -0
  291. package/lib/interaction/useConfirmationState.cjs.js +2 -0
  292. package/lib/interaction/useConfirmationState.cjs.js.map +1 -0
  293. package/lib/interaction/useConfirmationState.d.ts +11 -0
  294. package/lib/interaction/useConfirmationState.esm.js +39 -0
  295. package/lib/interaction/useConfirmationState.esm.js.map +1 -0
  296. package/lib/interaction/visuallyHidden.cjs.js +2 -0
  297. package/lib/interaction/visuallyHidden.cjs.js.map +1 -0
  298. package/lib/interaction/visuallyHidden.d.ts +9 -0
  299. package/lib/interaction/visuallyHidden.esm.js +14 -0
  300. package/lib/interaction/visuallyHidden.esm.js.map +1 -0
  301. package/lib/layout/categoryState.cjs.js +2 -0
  302. package/lib/layout/categoryState.cjs.js.map +1 -0
  303. package/lib/layout/categoryState.d.ts +66 -0
  304. package/lib/layout/categoryState.esm.js +42 -0
  305. package/lib/layout/categoryState.esm.js.map +1 -0
  306. package/lib/layout/groupState.cjs.js +2 -0
  307. package/lib/layout/groupState.cjs.js.map +1 -0
  308. package/lib/layout/groupState.d.ts +34 -0
  309. package/lib/layout/groupState.esm.js +63 -0
  310. package/lib/layout/groupState.esm.js.map +1 -0
  311. package/lib/layout/layoutContext.cjs.js +2 -0
  312. package/lib/layout/layoutContext.cjs.js.map +1 -0
  313. package/lib/layout/layoutContext.d.ts +16 -0
  314. package/lib/layout/layoutContext.esm.js +26 -0
  315. package/lib/layout/layoutContext.esm.js.map +1 -0
  316. package/lib/layout/layoutSizing.cjs.js +2 -0
  317. package/lib/layout/layoutSizing.cjs.js.map +1 -0
  318. package/lib/layout/layoutSizing.d.ts +104 -0
  319. package/lib/layout/layoutSizing.esm.js +69 -0
  320. package/lib/layout/layoutSizing.esm.js.map +1 -0
  321. package/lib/locale/bg.cjs.js +2 -0
  322. package/lib/locale/bg.cjs.js.map +1 -0
  323. package/lib/locale/bg.d.ts +279 -0
  324. package/lib/locale/bg.esm.js +271 -0
  325. package/lib/locale/bg.esm.js.map +1 -0
  326. package/lib/locale/calendar.cjs.js +2 -0
  327. package/lib/locale/calendar.cjs.js.map +1 -0
  328. package/lib/locale/calendar.d.ts +23 -0
  329. package/lib/locale/calendar.esm.js +57 -0
  330. package/lib/locale/calendar.esm.js.map +1 -0
  331. package/lib/locale/en.cjs.js +2 -0
  332. package/lib/locale/en.cjs.js.map +1 -0
  333. package/lib/locale/en.d.ts +275 -0
  334. package/lib/locale/en.esm.js +271 -0
  335. package/lib/locale/en.esm.js.map +1 -0
  336. package/lib/locale/index.cjs.js +1 -0
  337. package/lib/locale/index.d.ts +3 -0
  338. package/lib/locale/index.esm.js +3 -0
  339. package/lib/locale/intl.cjs.js +2 -0
  340. package/lib/locale/intl.cjs.js.map +1 -0
  341. package/lib/locale/intl.d.ts +2 -0
  342. package/lib/locale/intl.esm.js +11 -0
  343. package/lib/locale/intl.esm.js.map +1 -0
  344. package/lib/locale/rendererLocale.cjs.js +2 -0
  345. package/lib/locale/rendererLocale.cjs.js.map +1 -0
  346. package/lib/locale/rendererLocale.d.ts +40 -0
  347. package/lib/locale/rendererLocale.esm.js +24 -0
  348. package/lib/locale/rendererLocale.esm.js.map +1 -0
  349. package/lib/locale/translate.cjs.js +2 -0
  350. package/lib/locale/translate.cjs.js.map +1 -0
  351. package/lib/locale/translate.d.ts +43 -0
  352. package/lib/locale/translate.esm.js +25 -0
  353. package/lib/locale/translate.esm.js.map +1 -0
  354. package/lib/mixed/MixedDetailControl.cjs.js +2 -0
  355. package/lib/mixed/MixedDetailControl.cjs.js.map +1 -0
  356. package/lib/mixed/MixedDetailControl.d.ts +20 -0
  357. package/lib/mixed/MixedDetailControl.esm.js +73 -0
  358. package/lib/mixed/MixedDetailControl.esm.js.map +1 -0
  359. package/lib/mixed/RecursiveTreeRenderer.cjs.js +2 -0
  360. package/lib/mixed/RecursiveTreeRenderer.cjs.js.map +1 -0
  361. package/lib/mixed/RecursiveTreeRenderer.d.ts +35 -0
  362. package/lib/mixed/RecursiveTreeRenderer.esm.js +206 -0
  363. package/lib/mixed/RecursiveTreeRenderer.esm.js.map +1 -0
  364. package/lib/mixed/createMixedTypeChangeHandler.cjs.js +2 -0
  365. package/lib/mixed/createMixedTypeChangeHandler.cjs.js.map +1 -0
  366. package/lib/mixed/createMixedTypeChangeHandler.d.ts +16 -0
  367. package/lib/mixed/createMixedTypeChangeHandler.esm.js +34 -0
  368. package/lib/mixed/createMixedTypeChangeHandler.esm.js.map +1 -0
  369. package/lib/mixed/mixedComposition.cjs.js +2 -0
  370. package/lib/mixed/mixedComposition.cjs.js.map +1 -0
  371. package/lib/mixed/mixedComposition.d.ts +7 -0
  372. package/lib/mixed/mixedComposition.esm.js +37 -0
  373. package/lib/mixed/mixedComposition.esm.js.map +1 -0
  374. package/lib/mixed/mixedNodeEditor.cjs.js +2 -0
  375. package/lib/mixed/mixedNodeEditor.cjs.js.map +1 -0
  376. package/lib/mixed/mixedNodeEditor.d.ts +12 -0
  377. package/lib/mixed/mixedNodeEditor.esm.js +20 -0
  378. package/lib/mixed/mixedNodeEditor.esm.js.map +1 -0
  379. package/lib/mixed/mixedScalar.cjs.js +2 -0
  380. package/lib/mixed/mixedScalar.cjs.js.map +1 -0
  381. package/lib/mixed/mixedScalar.d.ts +4 -0
  382. package/lib/mixed/mixedScalar.esm.js +6 -0
  383. package/lib/mixed/mixedScalar.esm.js.map +1 -0
  384. package/lib/mixed/mixedSchema.cjs.js +2 -0
  385. package/lib/mixed/mixedSchema.cjs.js.map +1 -0
  386. package/lib/mixed/mixedSchema.d.ts +22 -0
  387. package/lib/mixed/mixedSchema.esm.js +88 -0
  388. package/lib/mixed/mixedSchema.esm.js.map +1 -0
  389. package/lib/mixed/mixedTree.cjs.js +2 -0
  390. package/lib/mixed/mixedTree.cjs.js.map +1 -0
  391. package/lib/mixed/mixedTree.d.ts +19 -0
  392. package/lib/mixed/mixedTree.esm.js +78 -0
  393. package/lib/mixed/mixedTree.esm.js.map +1 -0
  394. package/lib/mixed/mixedTreeActions.cjs.js +2 -0
  395. package/lib/mixed/mixedTreeActions.cjs.js.map +1 -0
  396. package/lib/mixed/mixedTreeActions.d.ts +6 -0
  397. package/lib/mixed/mixedTreeActions.esm.js +17 -0
  398. package/lib/mixed/mixedTreeActions.esm.js.map +1 -0
  399. package/lib/mixed/recursiveTree.cjs.js +2 -0
  400. package/lib/mixed/recursiveTree.cjs.js.map +1 -0
  401. package/lib/mixed/recursiveTree.d.ts +9 -0
  402. package/lib/mixed/recursiveTree.esm.js +49 -0
  403. package/lib/mixed/recursiveTree.esm.js.map +1 -0
  404. package/lib/mixed/useMixedNavigation.cjs.js +2 -0
  405. package/lib/mixed/useMixedNavigation.cjs.js.map +1 -0
  406. package/lib/mixed/useMixedNavigation.d.ts +6 -0
  407. package/lib/mixed/useMixedNavigation.esm.js +21 -0
  408. package/lib/mixed/useMixedNavigation.esm.js.map +1 -0
  409. package/lib/mixed/useMixedRenderer.cjs.js +2 -0
  410. package/lib/mixed/useMixedRenderer.cjs.js.map +1 -0
  411. package/lib/mixed/useMixedRenderer.d.ts +61 -0
  412. package/lib/mixed/useMixedRenderer.esm.js +185 -0
  413. package/lib/mixed/useMixedRenderer.esm.js.map +1 -0
  414. package/lib/mixed/useMixedType.cjs.js +2 -0
  415. package/lib/mixed/useMixedType.cjs.js.map +1 -0
  416. package/lib/mixed/useMixedType.d.ts +6 -0
  417. package/lib/mixed/useMixedType.esm.js +23 -0
  418. package/lib/mixed/useMixedType.esm.js.map +1 -0
  419. package/lib/objects/IsolatedPropertyEditor.cjs.js +2 -0
  420. package/lib/objects/IsolatedPropertyEditor.cjs.js.map +1 -0
  421. package/lib/objects/IsolatedPropertyEditor.d.ts +35 -0
  422. package/lib/objects/IsolatedPropertyEditor.esm.js +27 -0
  423. package/lib/objects/IsolatedPropertyEditor.esm.js.map +1 -0
  424. package/lib/objects/ObjectDetail.cjs.js +2 -0
  425. package/lib/objects/ObjectDetail.cjs.js.map +1 -0
  426. package/lib/objects/ObjectDetail.d.ts +42 -0
  427. package/lib/objects/ObjectDetail.esm.js +103 -0
  428. package/lib/objects/ObjectDetail.esm.js.map +1 -0
  429. package/lib/objects/additionalProperties.cjs.js +2 -0
  430. package/lib/objects/additionalProperties.cjs.js.map +1 -0
  431. package/lib/objects/additionalProperties.d.ts +14 -0
  432. package/lib/objects/additionalProperties.esm.js +41 -0
  433. package/lib/objects/additionalProperties.esm.js.map +1 -0
  434. package/lib/objects/additionalPropertyName.cjs.js +2 -0
  435. package/lib/objects/additionalPropertyName.cjs.js.map +1 -0
  436. package/lib/objects/additionalPropertyName.d.ts +63 -0
  437. package/lib/objects/additionalPropertyName.esm.js +46 -0
  438. package/lib/objects/additionalPropertyName.esm.js.map +1 -0
  439. package/lib/objects/conditionalFields.cjs.js +2 -0
  440. package/lib/objects/conditionalFields.cjs.js.map +1 -0
  441. package/lib/objects/conditionalFields.d.ts +18 -0
  442. package/lib/objects/conditionalFields.esm.js +105 -0
  443. package/lib/objects/conditionalFields.esm.js.map +1 -0
  444. package/lib/objects/dynamicProperties.cjs.js +2 -0
  445. package/lib/objects/dynamicProperties.cjs.js.map +1 -0
  446. package/lib/objects/dynamicProperties.d.ts +10 -0
  447. package/lib/objects/dynamicProperties.esm.js +33 -0
  448. package/lib/objects/dynamicProperties.esm.js.map +1 -0
  449. package/lib/objects/literalPropertySchema.cjs.js +2 -0
  450. package/lib/objects/literalPropertySchema.cjs.js.map +1 -0
  451. package/lib/objects/literalPropertySchema.d.ts +2 -0
  452. package/lib/objects/literalPropertySchema.esm.js +38 -0
  453. package/lib/objects/literalPropertySchema.esm.js.map +1 -0
  454. package/lib/objects/useAdditionalPropertyEntries.cjs.js +2 -0
  455. package/lib/objects/useAdditionalPropertyEntries.cjs.js.map +1 -0
  456. package/lib/objects/useAdditionalPropertyEntries.d.ts +72 -0
  457. package/lib/objects/useAdditionalPropertyEntries.esm.js +71 -0
  458. package/lib/objects/useAdditionalPropertyEntries.esm.js.map +1 -0
  459. package/lib/rolldown-runtime-BocRIvOZ.js +1 -0
  460. package/lib/tuple/TupleControlContent.cjs.js +2 -0
  461. package/lib/tuple/TupleControlContent.cjs.js.map +1 -0
  462. package/lib/tuple/TupleControlContent.d.ts +17 -0
  463. package/lib/tuple/TupleControlContent.esm.js +74 -0
  464. package/lib/tuple/TupleControlContent.esm.js.map +1 -0
  465. package/lib/tuple/TupleField.cjs.js +2 -0
  466. package/lib/tuple/TupleField.cjs.js.map +1 -0
  467. package/lib/tuple/TupleField.d.ts +15 -0
  468. package/lib/tuple/TupleField.esm.js +72 -0
  469. package/lib/tuple/TupleField.esm.js.map +1 -0
  470. package/lib/tuple/tupleSchema.cjs.js +2 -0
  471. package/lib/tuple/tupleSchema.cjs.js.map +1 -0
  472. package/lib/tuple/tupleSchema.d.ts +93 -0
  473. package/lib/tuple/tupleSchema.esm.js +63 -0
  474. package/lib/tuple/tupleSchema.esm.js.map +1 -0
  475. package/lib/tuple/useTupleAdditionalItems.cjs.js +2 -0
  476. package/lib/tuple/useTupleAdditionalItems.cjs.js.map +1 -0
  477. package/lib/tuple/useTupleAdditionalItems.d.ts +45 -0
  478. package/lib/tuple/useTupleAdditionalItems.esm.js +47 -0
  479. package/lib/tuple/useTupleAdditionalItems.esm.js.map +1 -0
  480. package/lib/tuple/useTupleControl.cjs.js +3 -0
  481. package/lib/tuple/useTupleControl.cjs.js.map +1 -0
  482. package/lib/tuple/useTupleControl.d.ts +26 -0
  483. package/lib/tuple/useTupleControl.esm.js +84 -0
  484. package/lib/tuple/useTupleControl.esm.js.map +1 -0
  485. package/lib/tuple/useTupleField.cjs.js +2 -0
  486. package/lib/tuple/useTupleField.cjs.js.map +1 -0
  487. package/lib/tuple/useTupleField.d.ts +38 -0
  488. package/lib/tuple/useTupleField.esm.js +80 -0
  489. package/lib/tuple/useTupleField.esm.js.map +1 -0
  490. package/lib/validation/ItemValidationIndicator.cjs.js +2 -0
  491. package/lib/validation/ItemValidationIndicator.cjs.js.map +1 -0
  492. package/lib/validation/ItemValidationIndicator.d.ts +9 -0
  493. package/lib/validation/ItemValidationIndicator.esm.js +14 -0
  494. package/lib/validation/ItemValidationIndicator.esm.js.map +1 -0
  495. package/lib/validation/errorSummary.cjs.js +9 -0
  496. package/lib/validation/errorSummary.cjs.js.map +1 -0
  497. package/lib/validation/errorSummary.d.ts +44 -0
  498. package/lib/validation/errorSummary.esm.js +194 -0
  499. package/lib/validation/errorSummary.esm.js.map +1 -0
  500. package/lib/validation/preTouchErrors.cjs.js +2 -0
  501. package/lib/validation/preTouchErrors.cjs.js.map +1 -0
  502. package/lib/validation/preTouchErrors.d.ts +77 -0
  503. package/lib/validation/preTouchErrors.esm.js +42 -0
  504. package/lib/validation/preTouchErrors.esm.js.map +1 -0
  505. package/lib/validation/validationIndicator.cjs.js +2 -0
  506. package/lib/validation/validationIndicator.cjs.js.map +1 -0
  507. package/lib/validation/validationIndicator.d.ts +72 -0
  508. package/lib/validation/validationIndicator.esm.js +66 -0
  509. package/lib/validation/validationIndicator.esm.js.map +1 -0
  510. package/lib/webcomponent/element.cjs.js +2 -0
  511. package/lib/webcomponent/element.cjs.js.map +1 -0
  512. package/lib/webcomponent/element.d.ts +48 -0
  513. package/lib/webcomponent/element.esm.js +85 -0
  514. package/lib/webcomponent/element.esm.js.map +1 -0
  515. package/lib/webcomponent/input.cjs.js +2 -0
  516. package/lib/webcomponent/input.cjs.js.map +1 -0
  517. package/lib/webcomponent/input.d.ts +6 -0
  518. package/lib/webcomponent/input.esm.js +25 -0
  519. package/lib/webcomponent/input.esm.js.map +1 -0
  520. package/package.json +86 -3
  521. package/src/cells/CellSummary.tsx +59 -0
  522. package/src/cells/cellMode.tsx +21 -0
  523. package/src/cells/compositeActions.ts +21 -0
  524. package/src/cells/compositeCellTester.ts +15 -0
  525. package/src/cells/compositeSummary.ts +149 -0
  526. package/src/cells/useCompositeCellPresentation.ts +37 -0
  527. package/src/cells/useCompositeDraft.ts +199 -0
  528. package/src/collections/CollectionErrorNavigation.tsx +123 -0
  529. package/src/collections/arrayChoices.ts +235 -0
  530. package/src/collections/collectionPagination.ts +95 -0
  531. package/src/collections/columnResize.tsx +151 -0
  532. package/src/collections/rowDetail.tsx +208 -0
  533. package/src/collections/tableColumns.ts +39 -0
  534. package/src/collections/useArrayPanelState.ts +25 -0
  535. package/src/collections/useCollectionDelete.ts +62 -0
  536. package/src/collections/useTableSelection.ts +77 -0
  537. package/src/composition/AllOfRenderer.tsx +79 -0
  538. package/src/composition/CombinatorBranch.tsx +93 -0
  539. package/src/composition/CombinatorProperties.tsx +56 -0
  540. package/src/composition/ScalarCompositionControl.tsx +34 -0
  541. package/src/composition/choiceCards.tsx +389 -0
  542. package/src/composition/combinators.ts +131 -0
  543. package/src/composition/discriminatorBranch.ts +82 -0
  544. package/src/composition/scalarComposition.ts +193 -0
  545. package/src/composition/useCombinatorSelection.ts +53 -0
  546. package/src/composition/useScalarComposition.ts +67 -0
  547. package/src/controls/FileArrayInput.tsx +407 -0
  548. package/src/controls/controlHelp.ts +28 -0
  549. package/src/controls/inputAdornments.tsx +337 -0
  550. package/src/controls/numeric.ts +43 -0
  551. package/src/controls/useClearAffordance.ts +22 -0
  552. package/src/controls/useDebouncedChange.ts +138 -0
  553. package/src/controls/useFocus.ts +32 -0
  554. package/src/core/configNamespaces.ts +67 -0
  555. package/src/core/dataPointer.ts +8 -0
  556. package/src/core/detailUiSchema.ts +88 -0
  557. package/src/core/plainRecord.ts +8 -0
  558. package/src/core/uiSchemaCycle.tsx +122 -0
  559. package/src/dynamic/DynamicUiProvider.tsx +414 -0
  560. package/src/dynamic/dynamicCel.ts +68 -0
  561. package/src/dynamic/dynamicConfig.ts +26 -0
  562. package/src/dynamic/dynamicRuntime.ts +25 -0
  563. package/src/dynamic/dynamicScope.ts +22 -0
  564. package/src/dynamic/dynamicTree.ts +128 -0
  565. package/src/dynamic/dynamicUi.ts +711 -0
  566. package/src/formats/colorFormat.ts +390 -0
  567. package/src/formats/dateValues.ts +45 -0
  568. package/src/formats/duration.ts +60 -0
  569. package/src/formats/maskControls.ts +88 -0
  570. package/src/formats/maskFormat.ts +375 -0
  571. package/src/formats/temporalBounds.ts +219 -0
  572. package/src/formats/temporalFormats.ts +128 -0
  573. package/src/formats/useMaskedInput.ts +194 -0
  574. package/src/index.ts +42 -0
  575. package/src/interaction/confirmation.ts +211 -0
  576. package/src/interaction/createDeleteConfirmation.ts +23 -0
  577. package/src/interaction/detailDialog.ts +138 -0
  578. package/src/interaction/pendingChanges.tsx +55 -0
  579. package/src/interaction/useConfirmationState.ts +55 -0
  580. package/src/interaction/visuallyHidden.ts +19 -0
  581. package/src/layout/categoryState.ts +189 -0
  582. package/src/layout/groupState.ts +201 -0
  583. package/src/layout/layoutContext.tsx +49 -0
  584. package/src/layout/layoutSizing.ts +369 -0
  585. package/src/locale/bg.ts +309 -0
  586. package/src/locale/calendar.ts +57 -0
  587. package/src/locale/en.ts +375 -0
  588. package/src/locale/index.ts +5 -0
  589. package/src/locale/intl.ts +10 -0
  590. package/src/locale/rendererLocale.ts +74 -0
  591. package/src/locale/translate.ts +98 -0
  592. package/src/mixed/MixedDetailControl.tsx +182 -0
  593. package/src/mixed/RecursiveTreeRenderer.tsx +388 -0
  594. package/src/mixed/createMixedTypeChangeHandler.ts +77 -0
  595. package/src/mixed/mixedComposition.ts +76 -0
  596. package/src/mixed/mixedNodeEditor.ts +47 -0
  597. package/src/mixed/mixedScalar.ts +7 -0
  598. package/src/mixed/mixedSchema.ts +283 -0
  599. package/src/mixed/mixedTree.ts +199 -0
  600. package/src/mixed/mixedTreeActions.ts +60 -0
  601. package/src/mixed/recursiveTree.ts +105 -0
  602. package/src/mixed/useMixedNavigation.ts +36 -0
  603. package/src/mixed/useMixedRenderer.ts +300 -0
  604. package/src/mixed/useMixedType.ts +45 -0
  605. package/src/objects/IsolatedPropertyEditor.tsx +86 -0
  606. package/src/objects/ObjectDetail.tsx +232 -0
  607. package/src/objects/additionalProperties.ts +151 -0
  608. package/src/objects/additionalPropertyName.ts +185 -0
  609. package/src/objects/conditionalFields.ts +173 -0
  610. package/src/objects/dynamicProperties.tsx +68 -0
  611. package/src/objects/literalPropertySchema.ts +100 -0
  612. package/src/objects/useAdditionalPropertyEntries.ts +204 -0
  613. package/src/tuple/TupleControlContent.tsx +152 -0
  614. package/src/tuple/TupleField.tsx +150 -0
  615. package/src/tuple/tupleSchema.ts +245 -0
  616. package/src/tuple/useTupleAdditionalItems.ts +131 -0
  617. package/src/tuple/useTupleControl.tsx +173 -0
  618. package/src/tuple/useTupleField.ts +164 -0
  619. package/src/validation/ItemValidationIndicator.tsx +21 -0
  620. package/src/validation/errorSummary.tsx +489 -0
  621. package/src/validation/preTouchErrors.ts +185 -0
  622. package/src/validation/validationIndicator.ts +202 -0
  623. package/src/webcomponent/element.ts +107 -0
  624. package/src/webcomponent/input.ts +56 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputAdornments.esm.js","names":["React","normalizeInputAdornments","value","item","entry","supportsInputAdornments","type","schema","options","icons","itemStyle","tooltipStyle","AdornmentItem","useJsonForms","tooltipId","useId","open","setOpen","useState","translate","_i18n$translate","i18n","role","fallback","label","tooltip","content","side","fieldSelectors","findField","selector","field","root","InputAdornments","applied","eligible","start","end","hasAdornments","controlRef","useRef","startRef","endRef","useLayoutEffect","control","originalStart","originalEnd","originalTransition","computed","baseStart","baseEnd","shifted","element","transitionFrame","apply","_startRef$current","_endRef$current","startSpace","endSpace","space","property","base","observer","original","index","children"],"sources":["../../src/controls/inputAdornments.tsx"],"sourcesContent":["import React, { useId, useLayoutEffect, useRef, useState } from 'react';\nimport { useJsonForms } from '@jsonforms/react';\n\nexport type InputAdornment =\n | { kind: 'text'; text: string; i18n?: string; tooltip?: string }\n | {\n kind: 'icon';\n icon: string;\n label: string;\n i18n?: string;\n tooltip?: string;\n decorative?: false;\n }\n | { kind: 'icon'; icon: string; decorative: true };\n\nexport function normalizeInputAdornments(value: unknown): InputAdornment[] {\n const values = Array.isArray(value) ? value : [value];\n return values.flatMap((item) => {\n if (typeof item === 'string')\n return item && !Array.isArray(value)\n ? [{ kind: 'text' as const, text: item }]\n : [];\n if (!item || typeof item !== 'object') return [];\n const entry = item as Record<string, unknown>;\n if (entry.kind === 'text' && typeof entry.text === 'string' && entry.text)\n return [entry as InputAdornment];\n if (\n entry.kind === 'icon' &&\n typeof entry.icon === 'string' &&\n entry.icon &&\n (entry.decorative === true ||\n (typeof entry.label === 'string' && entry.label))\n )\n return [entry as InputAdornment];\n return [];\n });\n}\n\nexport function supportsInputAdornments(\n schema:\n | { type?: unknown; format?: unknown; contentEncoding?: unknown }\n | undefined,\n options: Record<string, unknown>,\n): boolean {\n const type = schema?.type;\n if (type !== 'string' && type !== 'number' && type !== 'integer')\n return false;\n if (\n schema?.format === 'binary' ||\n schema?.format === 'byte' ||\n schema?.contentEncoding === 'base64'\n )\n return false;\n if (\n options.slider === true ||\n options.variant === 'otp' ||\n options.format === 'code' ||\n options.format === 'radio' ||\n options.showRadio === true\n )\n return false;\n return true;\n}\n\nconst icons: Record<string, string> = {\n information: 'ⓘ',\n account: '◉',\n schedule: '◷',\n lock: '🔒',\n};\nconst itemStyle: React.CSSProperties = {\n position: 'relative',\n flex: 'none',\n whiteSpace: 'nowrap',\n color: 'inherit',\n};\nconst tooltipStyle: React.CSSProperties = {\n position: 'absolute',\n zIndex: 100,\n insetBlockStart: '100%',\n insetInlineStart: 0,\n width: 'max-content',\n maxWidth: 'min(20rem, 80vw)',\n whiteSpace: 'normal',\n padding: '.35rem .5rem',\n borderRadius: '.25rem',\n color: 'white',\n background: '#222',\n};\n\nfunction AdornmentItem({\n item,\n side,\n}: {\n item: InputAdornment;\n side: 'start' | 'end';\n}) {\n const { i18n } = useJsonForms();\n const tooltipId = useId();\n const [open, setOpen] = useState(false);\n const translate = (role: string, fallback: string) =>\n 'i18n' in item && item.i18n\n ? (i18n?.translate?.(`${item.i18n}.${role}`, fallback) ?? fallback)\n : fallback;\n const label =\n item.kind === 'text'\n ? translate('text', item.text)\n : item.decorative\n ? ''\n : translate('label', (item as { label?: string }).label ?? '');\n const tooltip =\n 'tooltip' in item && item.tooltip ? translate('tooltip', item.tooltip) : '';\n const content =\n item.kind === 'text'\n ? label\n : icons[item.icon] || (item.decorative ? '' : label);\n if (tooltip)\n return (\n <button\n type='button'\n data-adornment={side}\n data-kind={item.kind}\n aria-label={item.kind === 'icon' ? label : undefined}\n aria-describedby={tooltipId}\n onFocus={() => setOpen(true)}\n onBlur={() => setOpen(false)}\n onMouseEnter={() => setOpen(true)}\n onMouseLeave={() => setOpen(false)}\n style={{\n ...itemStyle,\n border: 0,\n background: 'transparent',\n padding: 0,\n font: 'inherit',\n }}\n >\n <span aria-hidden={item.kind === 'icon' || undefined}>{content}</span>\n <span\n id={tooltipId}\n role='tooltip'\n style={{\n ...tooltipStyle,\n ...(side === 'end'\n ? { insetInlineStart: 'auto', insetInlineEnd: 0 }\n : {}),\n display: open ? 'block' : 'none',\n }}\n >\n {tooltip}\n </span>\n </button>\n );\n return (\n <span\n data-adornment={side}\n data-kind={item.kind}\n role={item.kind === 'icon' && !item.decorative ? 'img' : undefined}\n aria-label={item.kind === 'icon' && !item.decorative ? label : undefined}\n aria-hidden={item.kind === 'icon' && item.decorative ? true : undefined}\n style={itemStyle}\n >\n {content}\n </span>\n );\n}\n\nconst fieldSelectors = [\n 'button[data-slot=\"select-trigger\"]',\n '.ant-input-affix-wrapper',\n '.ant-picker',\n '.ant-input-number',\n '.ant-select',\n '.ant-select-selector',\n '.ant-input',\n 'input',\n 'textarea',\n 'select',\n 'button[aria-haspopup]',\n 'button[id]',\n];\n\nfunction findField(root: HTMLElement): HTMLElement | null {\n for (const selector of fieldSelectors) {\n const field = root.querySelector<HTMLElement>(selector);\n if (field) return field;\n }\n return null;\n}\n\nexport function InputAdornments({\n schema,\n options,\n children,\n}: React.PropsWithChildren<{\n schema?: { type?: unknown; format?: unknown; contentEncoding?: unknown };\n options?: Record<string, unknown>;\n}>) {\n const applied = options ?? {};\n const eligible = supportsInputAdornments(schema, applied);\n const start = eligible\n ? normalizeInputAdornments(applied.startAdornment)\n : [];\n const end = eligible ? normalizeInputAdornments(applied.endAdornment) : [];\n const hasAdornments = start.length > 0 || end.length > 0;\n const controlRef = useRef<HTMLDivElement>(null);\n const startRef = useRef<HTMLDivElement>(null);\n const endRef = useRef<HTMLDivElement>(null);\n\n useLayoutEffect(() => {\n const control = controlRef.current;\n if (!control || !hasAdornments) return;\n const root = control.parentElement;\n const field = findField(control);\n if (!field) return;\n const originalStart = field.style.paddingInlineStart;\n const originalEnd = field.style.paddingInlineEnd;\n const originalTransition = field.style.transition;\n const computed = getComputedStyle(field);\n const baseStart = Number.parseFloat(computed.paddingInlineStart) || 0;\n const baseEnd = Number.parseFloat(computed.paddingInlineEnd) || 0;\n const shifted: Array<{\n element: HTMLElement;\n property: 'insetInlineStart' | 'insetInlineEnd';\n original: string;\n base: number;\n }> = [];\n for (const element of Array.from(\n control.querySelectorAll<HTMLElement>('button, div'),\n )) {\n if (\n element === field ||\n getComputedStyle(element).position !== 'absolute'\n )\n continue;\n const side = element.className.includes('start-')\n ? 'insetInlineStart'\n : element.className.includes('end-')\n ? 'insetInlineEnd'\n : undefined;\n if (!side) continue;\n shifted.push({\n element,\n property: side,\n original: element.style[side],\n base: Number.parseFloat(getComputedStyle(element)[side]) || 0,\n });\n }\n let transitionFrame = 0;\n const apply = () => {\n cancelAnimationFrame(transitionFrame);\n const startSpace = startRef.current?.offsetWidth ?? 0;\n const endSpace = endRef.current?.offsetWidth ?? 0;\n root?.style.setProperty(\n '--jf-end-adornment-space',\n endSpace ? `${endSpace + 8}px` : '0px',\n );\n field.style.transition = 'none';\n field.style.paddingInlineStart = `${baseStart + (startSpace ? startSpace + 8 : 0)}px`;\n field.style.paddingInlineEnd = `${baseEnd + (endSpace ? endSpace + 8 : 0)}px`;\n for (const { element, property, base } of shifted) {\n const space = property === 'insetInlineStart' ? startSpace : endSpace;\n if (space) element.style[property] = `${base + space + 8}px`;\n }\n transitionFrame = requestAnimationFrame(() => {\n field.style.transition = originalTransition;\n });\n };\n apply();\n const observer = new ResizeObserver(apply);\n if (startRef.current) observer.observe(startRef.current);\n if (endRef.current) observer.observe(endRef.current);\n return () => {\n observer.disconnect();\n cancelAnimationFrame(transitionFrame);\n field.style.transition = originalTransition;\n root?.style.removeProperty('--jf-end-adornment-space');\n field.style.paddingInlineStart = originalStart;\n field.style.paddingInlineEnd = originalEnd;\n for (const { element, property, original } of shifted)\n element.style[property] = original;\n };\n }, [hasAdornments]);\n\n if (!hasAdornments) return <>{children}</>;\n return (\n <div\n data-input-adornments\n style={{ position: 'relative', width: '100%', minWidth: 0 }}\n >\n {start.length > 0 && (\n <div\n ref={startRef}\n data-adornment-group='start'\n style={{\n position: 'absolute',\n zIndex: 3,\n insetInlineStart: 8,\n insetBlockStart: '50%',\n transform: 'translateY(-50%)',\n display: 'flex',\n alignItems: 'center',\n gap: 4,\n whiteSpace: 'nowrap',\n }}\n >\n {start.map((item, index) => (\n <AdornmentItem key={`start-${index}`} item={item} side='start' />\n ))}\n </div>\n )}\n <div ref={controlRef} style={{ minWidth: 0 }}>\n {children}\n </div>\n {end.length > 0 && (\n <div\n ref={endRef}\n data-adornment-group='end'\n style={{\n position: 'absolute',\n zIndex: 3,\n insetInlineEnd: 8,\n insetBlockStart: '50%',\n transform: 'translateY(-50%)',\n display: 'flex',\n alignItems: 'center',\n gap: 4,\n whiteSpace: 'nowrap',\n }}\n >\n {end.map((item, index) => (\n <AdornmentItem key={`end-${index}`} item={item} side='end' />\n ))}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=e=>{if(e===``||e==null)return;let t=typeof e==`number`?e:Number(String(e).trim());return Number.isFinite(t)?t:void 0};exports.toCommittableNumber=e;
2
+ //# sourceMappingURL=numeric.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numeric.cjs.js","names":["toCommittableNumber","value","parsed"],"sources":["../../src/controls/numeric.ts"],"sourcesContent":["/**\n * Converts what a numeric input reports into a value safe to commit.\n *\n * The specification is explicit that a numeric editor must \"parse the complete\n * input before committing a number\" and must not \"accept a numeric prefix\n * while silently discarding the rest of the user's entry\":\n *\n * - `parseInt('1.9')` is `1`. Typing a fractional value into an integer field\n * silently committed a different number than the one on screen. The spec\n * names this case: \"1.9 must not become integer 1 through truncation.\"\n * - `parseInt('1e3')` is `1`, not `1000` - the spec names this one too. An\n * integer editor may refuse exponent syntax, \"but it must not interpret 1e3\n * as 1\".\n * - `parseFloat('12abc')` is `12`, discarding the rest.\n *\n * `Number` parses the whole string or fails, so it does none of these.\n *\n * **Integer fields commit the fractional value rather than rounding it.**\n * Rounding would be the same silent substitution in a different disguise;\n * committing 1.9 lets schema validation report \"must be integer\" against what\n * the user actually typed, which they can then correct. This follows section\n * 19: the UI represents actual form data and does not invent nearby valid data\n * to make the widget look valid.\n *\n * Returns `undefined` for an empty or unparseable entry, so nothing is\n * committed rather than `NaN` or `±Infinity`, which the spec forbids as form\n * values. `Number('')` is `0`, so the empty case is tested first - otherwise\n * clearing a field would commit a zero.\n *\n * **Not covered: precision loss.** `Number('9007199254740993')` is\n * `9007199254740992`. antd's `InputNumber` has already converted the text to a\n * JavaScript number before this is called, so the original digits are gone and\n * the change cannot be detected here. Doing so needs antd's `stringMode`; see\n * section 4.3 of the implementation-gaps document.\n */\nexport const toCommittableNumber = (value: unknown): number | undefined => {\n if (value === '' || value === null || value === undefined) {\n return undefined;\n }\n const parsed =\n typeof value === 'number' ? value : Number(String(value).trim());\n return Number.isFinite(parsed) ? parsed : undefined;\n};\n"],"mappings":"A,mEAmCA,IAAaA,EAAuB,GAAuC,CACzE,GAAIC,IAAU,IAAMA,GAAU,KAC5B,OAEF,IAAMC,EACJ,OAAOD,GAAU,SAAWA,EAAQ,OAAO,OAAOA,CAAK,CAAC,CAAC,KAAK,CAAC,EACjE,OAAO,OAAO,SAASC,CAAM,EAAIA,EAAS,IAAA,EAC5C,E"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Converts what a numeric input reports into a value safe to commit.
3
+ *
4
+ * The specification is explicit that a numeric editor must "parse the complete
5
+ * input before committing a number" and must not "accept a numeric prefix
6
+ * while silently discarding the rest of the user's entry":
7
+ *
8
+ * - `parseInt('1.9')` is `1`. Typing a fractional value into an integer field
9
+ * silently committed a different number than the one on screen. The spec
10
+ * names this case: "1.9 must not become integer 1 through truncation."
11
+ * - `parseInt('1e3')` is `1`, not `1000` - the spec names this one too. An
12
+ * integer editor may refuse exponent syntax, "but it must not interpret 1e3
13
+ * as 1".
14
+ * - `parseFloat('12abc')` is `12`, discarding the rest.
15
+ *
16
+ * `Number` parses the whole string or fails, so it does none of these.
17
+ *
18
+ * **Integer fields commit the fractional value rather than rounding it.**
19
+ * Rounding would be the same silent substitution in a different disguise;
20
+ * committing 1.9 lets schema validation report "must be integer" against what
21
+ * the user actually typed, which they can then correct. This follows section
22
+ * 19: the UI represents actual form data and does not invent nearby valid data
23
+ * to make the widget look valid.
24
+ *
25
+ * Returns `undefined` for an empty or unparseable entry, so nothing is
26
+ * committed rather than `NaN` or `±Infinity`, which the spec forbids as form
27
+ * values. `Number('')` is `0`, so the empty case is tested first - otherwise
28
+ * clearing a field would commit a zero.
29
+ *
30
+ * **Not covered: precision loss.** `Number('9007199254740993')` is
31
+ * `9007199254740992`. antd's `InputNumber` has already converted the text to a
32
+ * JavaScript number before this is called, so the original digits are gone and
33
+ * the change cannot be detected here. Doing so needs antd's `stringMode`; see
34
+ * section 4.3 of the implementation-gaps document.
35
+ */
36
+ export declare const toCommittableNumber: (value: unknown) => number | undefined;
@@ -0,0 +1,9 @@
1
+ // src/controls/numeric.ts
2
+ var e = (e) => {
3
+ if (e === "" || e == null) return;
4
+ let t = typeof e == "number" ? e : Number(String(e).trim());
5
+ return Number.isFinite(t) ? t : void 0;
6
+ };
7
+ export { e as toCommittableNumber };
8
+
9
+ //# sourceMappingURL=numeric.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numeric.esm.js","names":["toCommittableNumber","value","parsed"],"sources":["../../src/controls/numeric.ts"],"sourcesContent":["/**\n * Converts what a numeric input reports into a value safe to commit.\n *\n * The specification is explicit that a numeric editor must \"parse the complete\n * input before committing a number\" and must not \"accept a numeric prefix\n * while silently discarding the rest of the user's entry\":\n *\n * - `parseInt('1.9')` is `1`. Typing a fractional value into an integer field\n * silently committed a different number than the one on screen. The spec\n * names this case: \"1.9 must not become integer 1 through truncation.\"\n * - `parseInt('1e3')` is `1`, not `1000` - the spec names this one too. An\n * integer editor may refuse exponent syntax, \"but it must not interpret 1e3\n * as 1\".\n * - `parseFloat('12abc')` is `12`, discarding the rest.\n *\n * `Number` parses the whole string or fails, so it does none of these.\n *\n * **Integer fields commit the fractional value rather than rounding it.**\n * Rounding would be the same silent substitution in a different disguise;\n * committing 1.9 lets schema validation report \"must be integer\" against what\n * the user actually typed, which they can then correct. This follows section\n * 19: the UI represents actual form data and does not invent nearby valid data\n * to make the widget look valid.\n *\n * Returns `undefined` for an empty or unparseable entry, so nothing is\n * committed rather than `NaN` or `±Infinity`, which the spec forbids as form\n * values. `Number('')` is `0`, so the empty case is tested first - otherwise\n * clearing a field would commit a zero.\n *\n * **Not covered: precision loss.** `Number('9007199254740993')` is\n * `9007199254740992`. antd's `InputNumber` has already converted the text to a\n * JavaScript number before this is called, so the original digits are gone and\n * the change cannot be detected here. Doing so needs antd's `stringMode`; see\n * section 4.3 of the implementation-gaps document.\n */\nexport const toCommittableNumber = (value: unknown): number | undefined => {\n if (value === '' || value === null || value === undefined) {\n return undefined;\n }\n const parsed =\n typeof value === 'number' ? value : Number(String(value).trim());\n return Number.isFinite(parsed) ? parsed : undefined;\n};\n"],"mappings":";AAmCA,IAAaA,KAAuB,MAAuC;CACzE,IAAIC,MAAU,MAAMA,KAAU,MAC5B;CAEF,IAAMC,IACJ,OAAOD,KAAU,WAAWA,IAAQ,OAAO,OAAOA,CAAK,CAAC,CAAC,KAAK,CAAC;CACjE,OAAO,OAAO,SAASC,CAAM,IAAIA,IAAS,KAAA;AAC5C"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react");var t=t=>{let[n,r]=(0,e.useState)(!1),[i,a]=(0,e.useState)(!1);return{allowClear:t&&(n||i),affordanceProps:{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onFocus:()=>a(!0),onBlur:()=>a(!1)}}};exports.useClearAffordance=t;
2
+ //# sourceMappingURL=useClearAffordance.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClearAffordance.cjs.js","names":["useState","react","useClearAffordance","hovered","setHovered","focused","setFocused","hasValue"],"sources":["../../src/controls/useClearAffordance.ts"],"sourcesContent":["import { useState } from 'react';\n\n/**\n * Gates an input's clear button so it only appears when there is something to\n * clear *and* the control is hovered or focused. antd's own `allowClear` shows\n * the icon whenever a value is present, which leaves a permanent × on every\n * populated field - noisy in a form and worse in a dense table row.\n */\nexport const useClearAffordance = (hasValue: boolean) => {\n const [hovered, setHovered] = useState(false);\n const [focused, setFocused] = useState(false);\n return {\n allowClear: hasValue && (hovered || focused),\n affordanceProps: {\n onMouseEnter: () => setHovered(true),\n onMouseLeave: () => setHovered(false),\n // hovering away while focused must not hide it, hence two flags\n onFocus: () => setFocused(true),\n onBlur: () => setFocused(false),\n },\n };\n};\n"],"mappings":"A,0FAQA,IAAaE,EAAsB,GAAsB,CACvD,GAAM,CAACC,EAASC,IAAA,EAAcJ,EAAAA,SAAAA,CAAS,EAAK,EACtC,CAACK,EAASC,IAAA,EAAcN,EAAAA,SAAAA,CAAS,EAAK,EAC5C,MAAO,CACL,WAAYO,IAAaJ,GAAWE,GACpC,gBAAiB,CACf,iBAAoBD,EAAW,EAAI,EACnC,iBAAoBA,EAAW,EAAK,EAEpC,YAAeE,EAAW,EAAI,EAC9B,WAAcA,EAAW,EAAK,CAChC,CACF,CACF,E"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Gates an input's clear button so it only appears when there is something to
3
+ * clear *and* the control is hovered or focused. antd's own `allowClear` shows
4
+ * the icon whenever a value is present, which leaves a permanent × on every
5
+ * populated field - noisy in a form and worse in a dense table row.
6
+ */
7
+ export declare const useClearAffordance: (hasValue: boolean) => {
8
+ allowClear: boolean;
9
+ affordanceProps: {
10
+ onMouseEnter: () => void;
11
+ onMouseLeave: () => void;
12
+ onFocus: () => void;
13
+ onBlur: () => void;
14
+ };
15
+ };
@@ -0,0 +1,17 @@
1
+ import { useState as e } from "react";
2
+ // src/controls/useClearAffordance.ts
3
+ var t = (t) => {
4
+ let [n, r] = e(!1), [i, a] = e(!1);
5
+ return {
6
+ allowClear: t && (n || i),
7
+ affordanceProps: {
8
+ onMouseEnter: () => r(!0),
9
+ onMouseLeave: () => r(!1),
10
+ onFocus: () => a(!0),
11
+ onBlur: () => a(!1)
12
+ }
13
+ };
14
+ };
15
+ export { t as useClearAffordance };
16
+
17
+ //# sourceMappingURL=useClearAffordance.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClearAffordance.esm.js","names":["useClearAffordance","hovered","setHovered","useState","focused","setFocused","hasValue"],"sources":["../../src/controls/useClearAffordance.ts"],"sourcesContent":["import { useState } from 'react';\n\n/**\n * Gates an input's clear button so it only appears when there is something to\n * clear *and* the control is hovered or focused. antd's own `allowClear` shows\n * the icon whenever a value is present, which leaves a permanent × on every\n * populated field - noisy in a form and worse in a dense table row.\n */\nexport const useClearAffordance = (hasValue: boolean) => {\n const [hovered, setHovered] = useState(false);\n const [focused, setFocused] = useState(false);\n return {\n allowClear: hasValue && (hovered || focused),\n affordanceProps: {\n onMouseEnter: () => setHovered(true),\n onMouseLeave: () => setHovered(false),\n // hovering away while focused must not hide it, hence two flags\n onFocus: () => setFocused(true),\n onBlur: () => setFocused(false),\n },\n };\n};\n"],"mappings":";;AAQA,IAAaA,KAAsB,MAAsB;CACvD,IAAM,CAACC,GAASC,KAAcC,EAAS,EAAK,GACtC,CAACC,GAASC,KAAcF,EAAS,EAAK;CAC5C,OAAO;EACL,YAAYG,MAAaL,KAAWG;EACpC,iBAAiB;GACf,oBAAoBF,EAAW,EAAI;GACnC,oBAAoBA,EAAW,EAAK;GAEpC,eAAeG,EAAW,EAAI;GAC9B,cAAcA,EAAW,EAAK;EAChC;CACF;AACF"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../rolldown-runtime-BocRIvOZ.js"),t=require("../interaction/pendingChanges.cjs.js");let n=require("react"),r=require("lodash/debounce");r=e.t(r);var i=e=>e.target.value,a=(e,a,o,s,c=i,l=300)=>{let[u,d]=(0,n.useState)(o??a),f=(0,n.useRef)(o),p=(0,n.useCallback)(t=>{f.current=t,e(s,t)},[e,s]),m=(0,n.useMemo)(()=>(0,r.default)(p,l),[p,l]);return(0,n.useEffect)(()=>{o!==f.current&&(m.cancel(),f.current=o,d(o??a))},[o,m,a]),(0,n.useEffect)(()=>()=>m.cancel(),[m]),t.useRegisterPendingChange({flush:()=>m.flush(),cancel:()=>m.cancel()}),[u,(0,n.useCallback)(e=>{let t=c(e);d(t??a),m(t)},[m,c,a]),(0,n.useCallback)(()=>{m.cancel(),f.current=void 0,d(a),e(s,void 0)},[m,a,e,s])]};exports.useDebouncedChange=a;
2
+ //# sourceMappingURL=useDebouncedChange.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDebouncedChange.cjs.js","names":["useState","useRef","useCallback","useMemo","debounce","require_rolldown_runtime","require_interaction_pendingChanges","react","lodash_debounce","eventToValue","ev","useDebouncedChange","input","setInput","data","defaultValue","lastWritten","commit","newValue","handleChange","path","debouncedUpdate","timeout","eventToValueFunction"],"sources":["../../src/controls/useDebouncedChange.ts"],"sourcesContent":["/*\n The MIT License\n \n Copyright (c) 2021 EclipseSource Munich\n https://github.com/eclipsesource/jsonforms\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n*/\nimport debounce from 'lodash/debounce';\nimport { useState, useCallback, useEffect, useMemo, useRef } from 'react';\nimport { useRegisterPendingChange } from '../interaction/pendingChanges';\n\nconst eventToValue = (ev: any) => ev.target.value;\n\n/**\n * An ordinary edit, committed after the user stops typing.\n *\n * ## Disposal\n *\n * §18 requires that \"disposal must leave no stale write callback active\", and\n * that queued work whose target \"was removed, rebound, or superseded\" is\n * cancelled — explicitly **not** flushed, because \"flushing on unmount can\n * recreate deleted data or write into a different item\".\n *\n * There are three ways a queued write can outlive its target, and only one of\n * them is an unmount:\n *\n * 1. **The control goes away.** A rule hides it, a tab closes, the form\n * unmounts. The cleanup below cancels.\n * 2. **The control is rebound to another path.** The debounced function is\n * keyed on `path`, so a rebind produces a new one and the cleanup cancels\n * the old — which still holds the old path in its closure.\n * 3. **The path stays, and the thing it points at changes.** This is the\n * specification's own worked example: type into item 0, delete item 0, and\n * the former item 1 moves into its place. `ArrayLayout` keys rows by path,\n * so the control at `items.0` is **not** unmounted and is not rebound — it\n * re-renders with a different item's data. Neither of the first two cases\n * fires. As the spec puts it, \"the path alone is insufficient evidence\n * that the original target still exists\".\n *\n * The evidence for (3) is the value arriving from outside. The spec asks for\n * external replacement to be distinguished from \"normal host feedback of the\n * just-committed data\", which is what `lastWritten` is for: data equal to what\n * this control last wrote is its own commit coming back, and anything else is\n * a replacement that supersedes whatever is still queued.\n *\n * Without that distinction the guard eats ordinary typing. A commit lands\n * mid-word, its value returns as a prop, and the keystrokes queued in the\n * meantime would be cancelled along with it.\n */\nexport const useDebouncedChange = (\n handleChange: (path: string, value: any) => void,\n defaultValue: any,\n data: any,\n path: string,\n eventToValueFunction: (ev: any) => any = eventToValue,\n timeout = 300,\n): [any, (event: any) => void, () => void] => {\n const [input, setInput] = useState(data ?? defaultValue);\n /** What this control last wrote, so its own echo is not read as a change. */\n const lastWritten = useRef<any>(data);\n /*\n `useMemo`, not `useCallback`: the argument to `useCallback` is evaluated on\n every render, so a fresh debounced function was constructed and discarded\n each time. Only the identity mattered before; now the cleanup below hangs\n off it, so it should be created exactly once per (handleChange, path).\n */\n const commit = useCallback(\n (newValue: any) => {\n lastWritten.current = newValue;\n handleChange(path, newValue);\n },\n [handleChange, path],\n );\n const debouncedUpdate = useMemo(\n () =>\n // eslint-disable-next-line react/refs -- lodash only schedules commit; constructing a debouncer does not execute the ref-backed callback.\n debounce(commit, timeout),\n [commit, timeout],\n );\n useEffect(() => {\n if (data === lastWritten.current) {\n // Our own commit coming back. Nothing was replaced.\n return;\n }\n // Replaced from outside: the draft was for a value that is no longer here.\n debouncedUpdate.cancel();\n lastWritten.current = data;\n setInput(data ?? defaultValue);\n }, [data, debouncedUpdate, defaultValue]);\n /*\n Disposal, and rebinding. The returned cleanup runs both when this control\n unmounts and when `debouncedUpdate` is replaced, so the instance that is\n going away is the one cancelled — never the new one.\n */\n useEffect(() => () => debouncedUpdate.cancel(), [debouncedUpdate]);\n // A detail dialog applies on demand, so it has to be able to flush or drop\n // whatever this control has not written yet.\n useRegisterPendingChange({\n flush: () => debouncedUpdate.flush(),\n cancel: () => debouncedUpdate.cancel(),\n });\n const onChange = useCallback(\n (ev: any) => {\n const newValue = eventToValueFunction(ev);\n setInput(newValue ?? defaultValue);\n debouncedUpdate(newValue);\n },\n [debouncedUpdate, eventToValueFunction, defaultValue],\n );\n const onClear = useCallback(() => {\n // Clearing supersedes whatever is still queued. Without this, a keystroke\n // made inside the debounce window fires after the clear and writes the old\n // text straight back - the value reappears on its own a fraction of a\n // second later.\n debouncedUpdate.cancel();\n lastWritten.current = undefined;\n setInput(defaultValue);\n handleChange(path, undefined);\n }, [debouncedUpdate, defaultValue, handleChange, path]);\n return [input, onChange, onClear];\n};\n"],"mappings":"A,qOA4BA,IAAMS,EAAgB,GAAYC,EAAG,OAAO,MAsC/BC,GACX,EACA,EACA,EACA,EACA,EAAyCF,EACzC,EAAU,MACkC,CAC5C,GAAM,CAACG,EAAOC,IAAA,EAAYb,EAAAA,SAAAA,CAASc,GAAQC,CAAY,EAEjDC,GAAA,EAAcf,EAAAA,OAAAA,CAAYa,CAAI,EAO9BG,GAAA,EAASf,EAAAA,YAAAA,CACZ,GAAkB,CACjB,EAAY,QAAUgB,EACtBC,EAAaC,EAAMF,CAAQ,CAC7B,EACA,CAACC,EAAcC,CAAI,CACrB,EACMC,GAAA,EAAkBlB,EAAAA,QAAAA,MAAAA,EAGpBC,EAAAA,QAAAA,CAASa,EAAQK,CAAO,EAC1B,CAACL,EAAQK,CAAO,CAClB,EAyCA,OAxCA,EAAAf,EAAA,UAAA,KAAgB,CACVO,IAASE,EAAY,UAKzBK,EAAgB,OAAO,EACvB,EAAY,QAAUP,EACtBD,EAASC,GAAQC,CAAY,EAC/B,EAAG,CAACD,EAAMO,EAAiBN,CAAY,CAAC,GAMxC,EAAAR,EAAA,UAAA,SAAsBc,EAAgB,OAAO,EAAG,CAACA,CAAe,CAAC,EAGjEf,EAAA,yBAAyB,CACvB,UAAae,EAAgB,MAAM,EACnC,WAAcA,EAAgB,OAAO,CACvC,CAAC,EAmBM,CAACT,GAlBSV,EAAAA,EAAAA,YAAAA,CACd,GAAY,CACX,IAAMgB,EAAWK,EAAqBb,CAAE,EACxCG,EAASK,GAAYH,CAAY,EACjCM,EAAgBH,CAAQ,CAC1B,EACA,CAACG,EAAiBE,EAAsBR,CAAY,CAYvC,GAVCb,EAAAA,EAAAA,YAAAA,KAAkB,CAKhCmB,EAAgB,OAAO,EACvB,EAAY,QAAU,IAAA,GACtBR,EAASE,CAAY,EACrBI,EAAaC,EAAM,IAAA,EAAS,CAC9B,EAAG,CAACC,EAAiBN,EAAcI,EAAcC,CAAI,CAC5B,CAAO,CAClC,E"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * An ordinary edit, committed after the user stops typing.
3
+ *
4
+ * ## Disposal
5
+ *
6
+ * §18 requires that "disposal must leave no stale write callback active", and
7
+ * that queued work whose target "was removed, rebound, or superseded" is
8
+ * cancelled — explicitly **not** flushed, because "flushing on unmount can
9
+ * recreate deleted data or write into a different item".
10
+ *
11
+ * There are three ways a queued write can outlive its target, and only one of
12
+ * them is an unmount:
13
+ *
14
+ * 1. **The control goes away.** A rule hides it, a tab closes, the form
15
+ * unmounts. The cleanup below cancels.
16
+ * 2. **The control is rebound to another path.** The debounced function is
17
+ * keyed on `path`, so a rebind produces a new one and the cleanup cancels
18
+ * the old — which still holds the old path in its closure.
19
+ * 3. **The path stays, and the thing it points at changes.** This is the
20
+ * specification's own worked example: type into item 0, delete item 0, and
21
+ * the former item 1 moves into its place. `ArrayLayout` keys rows by path,
22
+ * so the control at `items.0` is **not** unmounted and is not rebound — it
23
+ * re-renders with a different item's data. Neither of the first two cases
24
+ * fires. As the spec puts it, "the path alone is insufficient evidence
25
+ * that the original target still exists".
26
+ *
27
+ * The evidence for (3) is the value arriving from outside. The spec asks for
28
+ * external replacement to be distinguished from "normal host feedback of the
29
+ * just-committed data", which is what `lastWritten` is for: data equal to what
30
+ * this control last wrote is its own commit coming back, and anything else is
31
+ * a replacement that supersedes whatever is still queued.
32
+ *
33
+ * Without that distinction the guard eats ordinary typing. A commit lands
34
+ * mid-word, its value returns as a prop, and the keystrokes queued in the
35
+ * meantime would be cancelled along with it.
36
+ */
37
+ export declare const useDebouncedChange: (handleChange: (path: string, value: any) => void, defaultValue: any, data: any, path: string, eventToValueFunction?: (ev: any) => any, timeout?: number) => [any, (event: any) => void, () => void];
@@ -0,0 +1,40 @@
1
+ import { useRegisterPendingChange as e } from "../interaction/pendingChanges.esm.js";
2
+ import { useCallback as t, useEffect as n, useMemo as r, useRef as i, useState as a } from "react";
3
+ import o from "lodash/debounce";
4
+ // src/controls/useDebouncedChange.ts
5
+ var s = (e) => e.target.value, c = (c, l, u, d, f = s, p = 300) => {
6
+ let [m, h] = a(u ?? l), g = i(u), _ = t((e) => {
7
+ g.current = e, c(d, e);
8
+ }, [c, d]), v = r(() => o(_, p), [_, p]);
9
+ return n(() => {
10
+ u !== g.current && (v.cancel(), g.current = u, h(u ?? l));
11
+ }, [
12
+ u,
13
+ v,
14
+ l
15
+ ]), n(() => () => v.cancel(), [v]), e({
16
+ flush: () => v.flush(),
17
+ cancel: () => v.cancel()
18
+ }), [
19
+ m,
20
+ t((e) => {
21
+ let t = f(e);
22
+ h(t ?? l), v(t);
23
+ }, [
24
+ v,
25
+ f,
26
+ l
27
+ ]),
28
+ t(() => {
29
+ v.cancel(), g.current = void 0, h(l), c(d, void 0);
30
+ }, [
31
+ v,
32
+ l,
33
+ c,
34
+ d
35
+ ])
36
+ ];
37
+ };
38
+ export { c as useDebouncedChange };
39
+
40
+ //# sourceMappingURL=useDebouncedChange.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDebouncedChange.esm.js","names":["debounce","eventToValue","ev","useDebouncedChange","input","setInput","useState","data","defaultValue","lastWritten","useRef","commit","useCallback","newValue","handleChange","path","debouncedUpdate","useMemo","timeout","useEffect","useRegisterPendingChange","eventToValueFunction"],"sources":["../../src/controls/useDebouncedChange.ts"],"sourcesContent":["/*\n The MIT License\n \n Copyright (c) 2021 EclipseSource Munich\n https://github.com/eclipsesource/jsonforms\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n*/\nimport debounce from 'lodash/debounce';\nimport { useState, useCallback, useEffect, useMemo, useRef } from 'react';\nimport { useRegisterPendingChange } from '../interaction/pendingChanges';\n\nconst eventToValue = (ev: any) => ev.target.value;\n\n/**\n * An ordinary edit, committed after the user stops typing.\n *\n * ## Disposal\n *\n * §18 requires that \"disposal must leave no stale write callback active\", and\n * that queued work whose target \"was removed, rebound, or superseded\" is\n * cancelled — explicitly **not** flushed, because \"flushing on unmount can\n * recreate deleted data or write into a different item\".\n *\n * There are three ways a queued write can outlive its target, and only one of\n * them is an unmount:\n *\n * 1. **The control goes away.** A rule hides it, a tab closes, the form\n * unmounts. The cleanup below cancels.\n * 2. **The control is rebound to another path.** The debounced function is\n * keyed on `path`, so a rebind produces a new one and the cleanup cancels\n * the old — which still holds the old path in its closure.\n * 3. **The path stays, and the thing it points at changes.** This is the\n * specification's own worked example: type into item 0, delete item 0, and\n * the former item 1 moves into its place. `ArrayLayout` keys rows by path,\n * so the control at `items.0` is **not** unmounted and is not rebound — it\n * re-renders with a different item's data. Neither of the first two cases\n * fires. As the spec puts it, \"the path alone is insufficient evidence\n * that the original target still exists\".\n *\n * The evidence for (3) is the value arriving from outside. The spec asks for\n * external replacement to be distinguished from \"normal host feedback of the\n * just-committed data\", which is what `lastWritten` is for: data equal to what\n * this control last wrote is its own commit coming back, and anything else is\n * a replacement that supersedes whatever is still queued.\n *\n * Without that distinction the guard eats ordinary typing. A commit lands\n * mid-word, its value returns as a prop, and the keystrokes queued in the\n * meantime would be cancelled along with it.\n */\nexport const useDebouncedChange = (\n handleChange: (path: string, value: any) => void,\n defaultValue: any,\n data: any,\n path: string,\n eventToValueFunction: (ev: any) => any = eventToValue,\n timeout = 300,\n): [any, (event: any) => void, () => void] => {\n const [input, setInput] = useState(data ?? defaultValue);\n /** What this control last wrote, so its own echo is not read as a change. */\n const lastWritten = useRef<any>(data);\n /*\n `useMemo`, not `useCallback`: the argument to `useCallback` is evaluated on\n every render, so a fresh debounced function was constructed and discarded\n each time. Only the identity mattered before; now the cleanup below hangs\n off it, so it should be created exactly once per (handleChange, path).\n */\n const commit = useCallback(\n (newValue: any) => {\n lastWritten.current = newValue;\n handleChange(path, newValue);\n },\n [handleChange, path],\n );\n const debouncedUpdate = useMemo(\n () =>\n // eslint-disable-next-line react/refs -- lodash only schedules commit; constructing a debouncer does not execute the ref-backed callback.\n debounce(commit, timeout),\n [commit, timeout],\n );\n useEffect(() => {\n if (data === lastWritten.current) {\n // Our own commit coming back. Nothing was replaced.\n return;\n }\n // Replaced from outside: the draft was for a value that is no longer here.\n debouncedUpdate.cancel();\n lastWritten.current = data;\n setInput(data ?? defaultValue);\n }, [data, debouncedUpdate, defaultValue]);\n /*\n Disposal, and rebinding. The returned cleanup runs both when this control\n unmounts and when `debouncedUpdate` is replaced, so the instance that is\n going away is the one cancelled — never the new one.\n */\n useEffect(() => () => debouncedUpdate.cancel(), [debouncedUpdate]);\n // A detail dialog applies on demand, so it has to be able to flush or drop\n // whatever this control has not written yet.\n useRegisterPendingChange({\n flush: () => debouncedUpdate.flush(),\n cancel: () => debouncedUpdate.cancel(),\n });\n const onChange = useCallback(\n (ev: any) => {\n const newValue = eventToValueFunction(ev);\n setInput(newValue ?? defaultValue);\n debouncedUpdate(newValue);\n },\n [debouncedUpdate, eventToValueFunction, defaultValue],\n );\n const onClear = useCallback(() => {\n // Clearing supersedes whatever is still queued. Without this, a keystroke\n // made inside the debounce window fires after the clear and writes the old\n // text straight back - the value reappears on its own a fraction of a\n // second later.\n debouncedUpdate.cancel();\n lastWritten.current = undefined;\n setInput(defaultValue);\n handleChange(path, undefined);\n }, [debouncedUpdate, defaultValue, handleChange, path]);\n return [input, onChange, onClear];\n};\n"],"mappings":";;;;AA4BA,IAAMC,KAAgB,MAAYC,EAAG,OAAO,OAsC/BC,KACX,GACA,GACA,GACA,GACA,IAAyCF,GACzC,IAAU,QACkC;CAC5C,IAAM,CAACG,GAAOC,KAAYC,EAASC,KAAQC,CAAY,GAEjDC,IAAcC,EAAYH,CAAI,GAO9BI,IAASC,GACZ,MAAkB;EAEjB,AADA,EAAY,UAAUC,GACtBC,EAAaC,GAAMF,CAAQ;CAC7B,GACA,CAACC,GAAcC,CAAI,CACrB,GACMC,IAAkBC,QAGpBjB,EAASW,GAAQO,CAAO,GAC1B,CAACP,GAAQO,CAAO,CAClB;CAyCA,OAxCAC,QAAgB;EACd,AAAIZ,MAASE,EAAY,YAKzBO,EAAgB,OAAO,GACvB,EAAY,UAAUT,GACtBF,EAASE,KAAQC,CAAY;CAC/B,GAAG;EAACD;EAAMS;EAAiBR;CAAY,CAAC,GAMxCW,cAAsBH,EAAgB,OAAO,GAAG,CAACA,CAAe,CAAC,GAGjEI,EAAyB;EACvB,aAAaJ,EAAgB,MAAM;EACnC,cAAcA,EAAgB,OAAO;CACvC,CAAC,GAmBM;EAACZ;EAlBSQ,GACd,MAAY;GACX,IAAMC,IAAWQ,EAAqBnB,CAAE;GAExC,AADAG,EAASQ,KAAYL,CAAY,GACjCQ,EAAgBH,CAAQ;EAC1B,GACA;GAACG;GAAiBK;GAAsBb;EAAY,CAYvC;EAVCI,QAAkB;GAQhC,AAHAI,EAAgB,OAAO,GACvB,EAAY,UAAU,KAAA,GACtBX,EAASG,CAAY,GACrBM,EAAaC,GAAM,KAAA,CAAS;EAC9B,GAAG;GAACC;GAAiBR;GAAcM;GAAcC;EAAI,CAC5B;CAAO;AAClC"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react");var t=()=>{let[t,n]=(0,e.useState)(!1);return[t,(0,e.useCallback)(()=>n(!0),[]),(0,e.useCallback)(()=>n(!1),[])]};exports.useFocus=t;
2
+ //# sourceMappingURL=useFocus.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFocus.cjs.js","names":["useState","useCallback","react","useFocus","focused","setFocused"],"sources":["../../src/controls/useFocus.ts"],"sourcesContent":["/*\n The MIT License\n \n Copyright (c) 2021 EclipseSource Munich\n https://github.com/eclipsesource/jsonforms\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n*/\nimport { useState, useCallback } from 'react';\n\nexport const useFocus = (): [boolean, () => void, () => void] => {\n const [focused, setFocused] = useState(false);\n const onFocus = useCallback(() => setFocused(true), []);\n const onBlur = useCallback(() => setFocused(false), []);\n return [focused, onFocus, onBlur];\n};\n"],"mappings":"A,0FA0BA,IAAaG,MAAoD,CAC/D,GAAM,CAACC,EAASC,IAAA,EAAcL,EAAAA,SAAAA,CAAS,EAAK,EAG5C,MAAO,CAACI,GAFQH,EAAAA,EAAAA,YAAAA,KAAkBI,EAAW,EAAI,EAAG,CAAC,CAEpC,GADFJ,EAAAA,EAAAA,YAAAA,KAAkBI,EAAW,EAAK,EAAG,CAAC,CAC3B,CAAM,CAClC,E"}
@@ -0,0 +1 @@
1
+ export declare const useFocus: () => [boolean, () => void, () => void];
@@ -0,0 +1,13 @@
1
+ import { useCallback as e, useState as t } from "react";
2
+ // src/controls/useFocus.ts
3
+ var n = () => {
4
+ let [n, r] = t(!1);
5
+ return [
6
+ n,
7
+ e(() => r(!0), []),
8
+ e(() => r(!1), [])
9
+ ];
10
+ };
11
+ export { n as useFocus };
12
+
13
+ //# sourceMappingURL=useFocus.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFocus.esm.js","names":["useFocus","focused","setFocused","useState","useCallback"],"sources":["../../src/controls/useFocus.ts"],"sourcesContent":["/*\n The MIT License\n \n Copyright (c) 2021 EclipseSource Munich\n https://github.com/eclipsesource/jsonforms\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n*/\nimport { useState, useCallback } from 'react';\n\nexport const useFocus = (): [boolean, () => void, () => void] => {\n const [focused, setFocused] = useState(false);\n const onFocus = useCallback(() => setFocused(true), []);\n const onBlur = useCallback(() => setFocused(false), []);\n return [focused, onFocus, onBlur];\n};\n"],"mappings":";;AA0BA,IAAaA,UAAoD;CAC/D,IAAM,CAACC,GAASC,KAAcC,EAAS,EAAK;CAG5C,OAAO;EAACF;EAFQG,QAAkBF,EAAW,EAAI,GAAG,CAAC,CAEpC;EADFE,QAAkBF,EAAW,EAAK,GAAG,CAAC,CAC3B;CAAM;AAClC"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`jsonformsExtended`,t=`jsonforms-react-renderers`,n=(e,t)=>{if(!e||typeof e!=`object`)return;let n=e[t];return n&&typeof n==`object`?n:void 0},r=t=>n(t,e),i=(t,r,i,a,o=e)=>{var s;let c=t&&typeof t==`object`?t[i]:void 0;if(c!==void 0)return c;let l=(s=n(r,o))==null?void 0:s[i];return l===void 0?a:l};exports.JSONFORMS_CONFIG_KEY=t,exports.JSONFORMS_EXTENDED_CONFIG_KEY=e,exports.extendedConfig=r,exports.resolveExtendedOption=i;
2
+ //# sourceMappingURL=configNamespaces.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configNamespaces.cjs.js","names":["JSONFORMS_EXTENDED_CONFIG_KEY","JSONFORMS_CONFIG_KEY","namespace","config","value","key","extendedConfig","resolveExtendedOption","_namespace","local","options","name","global","configKey","fallback"],"sources":["../../src/core/configNamespaces.ts"],"sourcesContent":["/**\n * Where a JSON Forms `config` key belongs, by origin. See Adjustment 1 in\n * `client/docs/jsonforms-extended-ui-model-adjustments.md`.\n *\n * - Core, Material or Vuetify convention -> top-level config key.\n * - Portable project extension -> under {@link JSONFORMS_EXTENDED_CONFIG_KEY}.\n * - JSON Forms React Renderers-only, outside the portable model -> under {@link JSONFORMS_CONFIG_KEY}.\n *\n * Per-element `uischema.options` stay flat in every case: `variant` is a\n * reserved dispatch input, core's `optionIs` tester reads a flat option, and\n * the specification's `confirmation` example resolves element options over a\n * namespaced config default.\n *\n * Read these namespaces through the constants rather than writing the string,\n * so a rename is one edit here. JSON cannot reference a constant, so authored\n * schemas, config documents and fixtures spell the key literally - which makes\n * a rename a breaking change to those documents, not just a constant edit.\n */\nexport const JSONFORMS_EXTENDED_CONFIG_KEY = 'jsonformsExtended';\n\n/** Namespace for settings that exist only because of JSON Forms React Renderers's product. */\nexport const JSONFORMS_CONFIG_KEY = 'jsonforms-react-renderers';\n\nconst namespace = (\n config: unknown,\n key: string,\n): Record<string, unknown> | undefined => {\n if (!config || typeof config !== 'object') {\n return undefined;\n }\n const value = (config as Record<string, unknown>)[key];\n return value && typeof value === 'object'\n ? (value as Record<string, unknown>)\n : undefined;\n};\n\n/** The `jsonformsExtended` block of a config object, if it has one. */\nexport const extendedConfig = (\n config: unknown,\n): Record<string, unknown> | undefined =>\n namespace(config, JSONFORMS_EXTENDED_CONFIG_KEY);\n\n/**\n * Resolves a project-extension option: the element's flat `options.<name>`,\n * then `config.<namespace>.<name>`, then the caller's default.\n *\n * Only `undefined` falls through. An explicit `false`, `0` or `''` at a more\n * specific level is a real override, as section 5 of the specification\n * requires - truthiness-based fallback would silently discard it.\n */\nexport const resolveExtendedOption = <T>(\n options: unknown,\n config: unknown,\n name: string,\n fallback: T,\n configKey: string = JSONFORMS_EXTENDED_CONFIG_KEY,\n): T => {\n const local =\n options && typeof options === 'object'\n ? (options as Record<string, unknown>)[name]\n : undefined;\n if (local !== undefined) {\n return local as T;\n }\n const global = namespace(config, configKey)?.[name];\n return global !== undefined ? (global as T) : fallback;\n};\n"],"mappings":"A,mEAkBA,IAAaA,EAAgC,oBAGhCC,EAAuB,4BAE9BC,GACJ,EACA,IACwC,CACxC,GAAI,CAACC,GAAU,OAAOA,GAAW,SAC/B,OAEF,IAAMC,EAASD,EAAmCE,GAClD,OAAOD,GAAS,OAAOA,GAAU,SAC5BA,EACD,IAAA,EACN,EAGaE,EACX,GAEAJ,EAAUC,EAAQH,CAA6B,EAUpCO,GACX,EACA,EACA,EACA,EACA,EAAoBP,IACd,C,MACN,IAAMS,EACJC,GAAW,OAAOA,GAAY,SACzBA,EAAoCC,GACrC,IAAA,GACN,GAAIF,IAAU,IAAA,GACZ,OAAOA,EAET,IAAMG,GAAA,EAASV,EAAUC,EAAQU,CAAS,IAAA,KAAA,IAAA,GAAAL,EAAIG,GAC9C,OAAOC,IAAW,IAAA,GAA4BE,EAAfF,CACjC,E"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Where a JSON Forms `config` key belongs, by origin. See Adjustment 1 in
3
+ * `client/docs/jsonforms-extended-ui-model-adjustments.md`.
4
+ *
5
+ * - Core, Material or Vuetify convention -> top-level config key.
6
+ * - Portable project extension -> under {@link JSONFORMS_EXTENDED_CONFIG_KEY}.
7
+ * - JSON Forms React Renderers-only, outside the portable model -> under {@link JSONFORMS_CONFIG_KEY}.
8
+ *
9
+ * Per-element `uischema.options` stay flat in every case: `variant` is a
10
+ * reserved dispatch input, core's `optionIs` tester reads a flat option, and
11
+ * the specification's `confirmation` example resolves element options over a
12
+ * namespaced config default.
13
+ *
14
+ * Read these namespaces through the constants rather than writing the string,
15
+ * so a rename is one edit here. JSON cannot reference a constant, so authored
16
+ * schemas, config documents and fixtures spell the key literally - which makes
17
+ * a rename a breaking change to those documents, not just a constant edit.
18
+ */
19
+ export declare const JSONFORMS_EXTENDED_CONFIG_KEY = "jsonformsExtended";
20
+ /** Namespace for settings that exist only because of JSON Forms React Renderers's product. */
21
+ export declare const JSONFORMS_CONFIG_KEY = "jsonforms-react-renderers";
22
+ /** The `jsonformsExtended` block of a config object, if it has one. */
23
+ export declare const extendedConfig: (config: unknown) => Record<string, unknown> | undefined;
24
+ /**
25
+ * Resolves a project-extension option: the element's flat `options.<name>`,
26
+ * then `config.<namespace>.<name>`, then the caller's default.
27
+ *
28
+ * Only `undefined` falls through. An explicit `false`, `0` or `''` at a more
29
+ * specific level is a real override, as section 5 of the specification
30
+ * requires - truthiness-based fallback would silently discard it.
31
+ */
32
+ export declare const resolveExtendedOption: <T>(options: unknown, config: unknown, name: string, fallback: T, configKey?: string) => T;
@@ -0,0 +1,15 @@
1
+ // src/core/configNamespaces.ts
2
+ var e = "jsonformsExtended", t = "jsonforms-react-renderers", n = (e, t) => {
3
+ if (!e || typeof e != "object") return;
4
+ let n = e[t];
5
+ return n && typeof n == "object" ? n : void 0;
6
+ }, r = (t) => n(t, e), i = (t, r, i, a, o = e) => {
7
+ var s;
8
+ let c = t && typeof t == "object" ? t[i] : void 0;
9
+ if (c !== void 0) return c;
10
+ let l = (s = n(r, o)) == null ? void 0 : s[i];
11
+ return l === void 0 ? a : l;
12
+ };
13
+ export { t as JSONFORMS_CONFIG_KEY, e as JSONFORMS_EXTENDED_CONFIG_KEY, r as extendedConfig, i as resolveExtendedOption };
14
+
15
+ //# sourceMappingURL=configNamespaces.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configNamespaces.esm.js","names":["JSONFORMS_EXTENDED_CONFIG_KEY","JSONFORMS_CONFIG_KEY","namespace","config","value","key","extendedConfig","resolveExtendedOption","_namespace","local","options","name","global","configKey","fallback"],"sources":["../../src/core/configNamespaces.ts"],"sourcesContent":["/**\n * Where a JSON Forms `config` key belongs, by origin. See Adjustment 1 in\n * `client/docs/jsonforms-extended-ui-model-adjustments.md`.\n *\n * - Core, Material or Vuetify convention -> top-level config key.\n * - Portable project extension -> under {@link JSONFORMS_EXTENDED_CONFIG_KEY}.\n * - JSON Forms React Renderers-only, outside the portable model -> under {@link JSONFORMS_CONFIG_KEY}.\n *\n * Per-element `uischema.options` stay flat in every case: `variant` is a\n * reserved dispatch input, core's `optionIs` tester reads a flat option, and\n * the specification's `confirmation` example resolves element options over a\n * namespaced config default.\n *\n * Read these namespaces through the constants rather than writing the string,\n * so a rename is one edit here. JSON cannot reference a constant, so authored\n * schemas, config documents and fixtures spell the key literally - which makes\n * a rename a breaking change to those documents, not just a constant edit.\n */\nexport const JSONFORMS_EXTENDED_CONFIG_KEY = 'jsonformsExtended';\n\n/** Namespace for settings that exist only because of JSON Forms React Renderers's product. */\nexport const JSONFORMS_CONFIG_KEY = 'jsonforms-react-renderers';\n\nconst namespace = (\n config: unknown,\n key: string,\n): Record<string, unknown> | undefined => {\n if (!config || typeof config !== 'object') {\n return undefined;\n }\n const value = (config as Record<string, unknown>)[key];\n return value && typeof value === 'object'\n ? (value as Record<string, unknown>)\n : undefined;\n};\n\n/** The `jsonformsExtended` block of a config object, if it has one. */\nexport const extendedConfig = (\n config: unknown,\n): Record<string, unknown> | undefined =>\n namespace(config, JSONFORMS_EXTENDED_CONFIG_KEY);\n\n/**\n * Resolves a project-extension option: the element's flat `options.<name>`,\n * then `config.<namespace>.<name>`, then the caller's default.\n *\n * Only `undefined` falls through. An explicit `false`, `0` or `''` at a more\n * specific level is a real override, as section 5 of the specification\n * requires - truthiness-based fallback would silently discard it.\n */\nexport const resolveExtendedOption = <T>(\n options: unknown,\n config: unknown,\n name: string,\n fallback: T,\n configKey: string = JSONFORMS_EXTENDED_CONFIG_KEY,\n): T => {\n const local =\n options && typeof options === 'object'\n ? (options as Record<string, unknown>)[name]\n : undefined;\n if (local !== undefined) {\n return local as T;\n }\n const global = namespace(config, configKey)?.[name];\n return global !== undefined ? (global as T) : fallback;\n};\n"],"mappings":";AAkBA,IAAaA,IAAgC,qBAGhCC,IAAuB,6BAE9BC,KACJ,GACA,MACwC;CACxC,IAAI,CAACC,KAAU,OAAOA,KAAW,UAC/B;CAEF,IAAMC,IAASD,EAAmCE;CAClD,OAAOD,KAAS,OAAOA,KAAU,WAC5BA,IACD,KAAA;AACN,GAGaE,KACX,MAEAJ,EAAUC,GAAQH,CAA6B,GAUpCO,KACX,GACA,GACA,GACA,GACA,IAAoBP,MACd;;CACN,IAAMS,IACJC,KAAW,OAAOA,KAAY,WACzBA,EAAoCC,KACrC,KAAA;CACN,IAAIF,MAAU,KAAA,GACZ,OAAOA;CAET,IAAMG,KAAA,IAASV,EAAUC,GAAQU,CAAS,MAAA,OAAA,KAAA,IAAAL,EAAIG;CAC9C,OAAOC,MAAW,KAAA,IAA4BE,IAAfF;AACjC"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=e=>e?`/`+e.split(`.`).map(e=>e.replace(/~/g,`~0`).replace(/\//g,`~1`)).join(`/`):``;exports.dataPathToPointer=e;
2
+ //# sourceMappingURL=dataPointer.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPointer.cjs.js","names":["dataPathToPointer","path","part"],"sources":["../../src/core/dataPointer.ts"],"sourcesContent":["export const dataPathToPointer = (path: string) =>\n path\n ? '/' +\n path\n .split('.')\n .map((part) => part.replace(/~/g, '~0').replace(/\\//g, '~1'))\n .join('/')\n : '';\n"],"mappings":"A,mEAAA,IAAaA,EAAqB,GAChCC,EACI,IACAA,EACG,MAAM,GAAG,CAAC,CACV,IAAK,GAASC,EAAK,QAAQ,KAAM,IAAI,CAAC,CAAC,QAAQ,MAAO,IAAI,CAAC,CAAC,CAC5D,KAAK,GAAG,EACX,G"}
@@ -0,0 +1 @@
1
+ export declare const dataPathToPointer: (path: string) => string;
@@ -0,0 +1,5 @@
1
+ // src/core/dataPointer.ts
2
+ var e = (e) => e ? "/" + e.split(".").map((e) => e.replace(/~/g, "~0").replace(/\//g, "~1")).join("/") : "";
3
+ export { e as dataPathToPointer };
4
+
5
+ //# sourceMappingURL=dataPointer.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPointer.esm.js","names":["dataPathToPointer","path","part"],"sources":["../../src/core/dataPointer.ts"],"sourcesContent":["export const dataPathToPointer = (path: string) =>\n path\n ? '/' +\n path\n .split('.')\n .map((part) => part.replace(/~/g, '~0').replace(/\\//g, '~1'))\n .join('/')\n : '';\n"],"mappings":";AAAA,IAAaA,KAAqB,MAChCC,IACI,MACAA,EACG,MAAM,GAAG,CAAC,CACV,KAAK,MAASC,EAAK,QAAQ,MAAM,IAAI,CAAC,CAAC,QAAQ,OAAO,IAAI,CAAC,CAAC,CAC5D,KAAK,GAAG,IACX"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@jsonforms/core");var t=(t,n,r,i,a=`VerticalLayout`,o,s)=>{var c;let l=o==null||(c=o.options)==null?void 0:c.detail,u=typeof l==`string`&&l.toUpperCase()===`GENERATE`;return(0,e.findUISchema)(t,n,r,i,typeof a==`function`?()=>{let e=a();return u&&e.type===`Control`?{...e,options:{...e.options,detail:`GENERATE`}}:e}:a,o,s)},n=(e,n,r,i,a,o,s)=>e===void 0?s:t(n,r,i,a,()=>s,{type:`Control`,scope:i,options:{detail:e}},o),r=(n,r,i,a,o,s=t)=>s(o,n,r.scope,i,()=>(0,e.createControlElement)(`#`),r,a);exports.findDetailUISchema=t,exports.findMixedDetailUiSchema=r,exports.resolveEditorDetail=n;
2
+ //# sourceMappingURL=detailUiSchema.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detailUiSchema.cjs.js","names":["findUISchema","createControlElement","_jsonforms_core","findDetailUISchema","_control$options","detail","control","generate","registry","schema","schemaPath","path","fallback","result","rootSchema","resolveEditorDetail","findMixedDetailUiSchema","resolve","uischemas","uischema"],"sources":["../../src/core/detailUiSchema.ts"],"sourcesContent":["import {\n ControlElement,\n UISchemaElement,\n findUISchema,\n createControlElement,\n type JsonSchema,\n type JsonFormsUISchemaRegistryEntry,\n} from '@jsonforms/core';\n\n/** Editor details use upstream mode semantics and retain their caller's scope and fallback. */\nexport const findDetailUISchema: typeof findUISchema = (\n registry,\n schema,\n schemaPath,\n path,\n fallback = 'VerticalLayout',\n control,\n rootSchema,\n) => {\n const detail = control?.options?.detail;\n const generate =\n typeof detail === 'string' && detail.toUpperCase() === 'GENERATE';\n const guardedFallback =\n typeof fallback === 'function'\n ? () => {\n const result = fallback();\n // A fallback Control delegates again. Carry generation intent through that\n // dispatch so its object/array editor cannot pick the registry back up.\n return generate && result.type === 'Control'\n ? { ...result, options: { ...result.options, detail: 'GENERATE' } }\n : result;\n }\n : fallback;\n return findUISchema(\n registry,\n schema,\n schemaPath,\n path,\n guardedFallback,\n control,\n rootSchema,\n );\n};\n\n/** Explicit editor option; absence preserves the host's existing fallback.\n * Tuple-field layouts and recursive-node defaults may already come from a registry. */\nexport const resolveEditorDetail = (\n detail: unknown,\n registry: Parameters<typeof findUISchema>[0],\n schema: Parameters<typeof findUISchema>[1],\n schemaPath: string,\n path: string,\n rootSchema: Parameters<typeof findUISchema>[6],\n fallback: UISchemaElement,\n): UISchemaElement =>\n detail === undefined\n ? fallback\n : findDetailUISchema(\n registry,\n schema,\n schemaPath,\n path,\n () => fallback,\n {\n type: 'Control',\n scope: schemaPath,\n options: { detail },\n } as ControlElement,\n rootSchema,\n );\n\nexport const findMixedDetailUiSchema = (\n schema: JsonSchema,\n uischema: ControlElement,\n path: string,\n rootSchema: JsonSchema,\n uischemas: JsonFormsUISchemaRegistryEntry[],\n resolve: typeof findUISchema = findDetailUISchema,\n) =>\n resolve(\n uischemas,\n schema,\n uischema.scope,\n path,\n () => createControlElement('#'),\n uischema,\n rootSchema,\n );\n"],"mappings":"A,oGAUA,IAAaG,GACX,EACA,EACA,EACA,EACA,EAAW,iBACX,EACA,IACG,C,MACH,IAAME,EAAAC,GAAA,OAAA,EAASA,EAAS,UAAA,KAAA,IAAA,GAAAF,EAAS,OAC3BG,EACJ,OAAOF,GAAW,UAAYA,EAAO,YAAY,IAAM,WAYzD,OAAA,EAAOL,EAAAA,aAAAA,CACLQ,EACAC,EACAC,EACAC,EAdA,OAAOC,GAAa,eACV,CACJ,IAAMC,EAASD,EAAS,EAGxB,OAAOL,GAAYM,EAAO,OAAS,UAC/B,CAAE,GAAGA,EAAQ,QAAS,CAAE,GAAGA,EAAO,QAAS,OAAQ,UAAW,CAAE,EAChEA,CACN,EACAD,EAOJN,EACAQ,CACF,CACF,EAIaC,GACX,EACA,EACA,EACA,EACA,EACA,EACA,IAEAV,IAAW,IAAA,GACPO,EACAT,EACEK,EACAC,EACAC,EACAC,MACMC,EACN,CACE,KAAM,UACN,MAAOF,EACP,QAAS,CAAE,QAAO,CACpB,EACAI,CACF,EAEOE,GACX,EACA,EACA,EACA,EACA,EACA,EAA+Bb,IAE/Bc,EACEC,EACAT,EACAU,EAAS,MACTR,OAAA,EACMV,EAAAA,qBAAAA,CAAqB,GAAG,EAC9BkB,EACAL,CACF,E"}
@@ -0,0 +1,7 @@
1
+ import { ControlElement, UISchemaElement, findUISchema, type JsonSchema, type JsonFormsUISchemaRegistryEntry } from '@jsonforms/core';
2
+ /** Editor details use upstream mode semantics and retain their caller's scope and fallback. */
3
+ export declare const findDetailUISchema: typeof findUISchema;
4
+ /** Explicit editor option; absence preserves the host's existing fallback.
5
+ * Tuple-field layouts and recursive-node defaults may already come from a registry. */
6
+ export declare const resolveEditorDetail: (detail: unknown, registry: Parameters<typeof findUISchema>[0], schema: Parameters<typeof findUISchema>[1], schemaPath: string, path: string, rootSchema: Parameters<typeof findUISchema>[6], fallback: UISchemaElement) => UISchemaElement;
7
+ export declare const findMixedDetailUiSchema: (schema: JsonSchema, uischema: ControlElement, path: string, rootSchema: JsonSchema, uischemas: JsonFormsUISchemaRegistryEntry[], resolve?: typeof findUISchema) => UISchemaElement;
@@ -0,0 +1,23 @@
1
+ import { createControlElement as e, findUISchema as t } from "@jsonforms/core";
2
+ // src/core/detailUiSchema.ts
3
+ var n = (e, n, r, i, a = "VerticalLayout", o, s) => {
4
+ var c;
5
+ let l = o == null || (c = o.options) == null ? void 0 : c.detail, u = typeof l == "string" && l.toUpperCase() === "GENERATE";
6
+ return t(e, n, r, i, typeof a == "function" ? () => {
7
+ let e = a();
8
+ return u && e.type === "Control" ? {
9
+ ...e,
10
+ options: {
11
+ ...e.options,
12
+ detail: "GENERATE"
13
+ }
14
+ } : e;
15
+ } : a, o, s);
16
+ }, r = (e, t, r, i, a, o, s) => e === void 0 ? s : n(t, r, i, a, () => s, {
17
+ type: "Control",
18
+ scope: i,
19
+ options: { detail: e }
20
+ }, o), i = (t, r, i, a, o, s = n) => s(o, t, r.scope, i, () => e("#"), r, a);
21
+ export { n as findDetailUISchema, i as findMixedDetailUiSchema, r as resolveEditorDetail };
22
+
23
+ //# sourceMappingURL=detailUiSchema.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detailUiSchema.esm.js","names":["findDetailUISchema","_control$options","detail","control","generate","findUISchema","registry","schema","schemaPath","path","fallback","result","rootSchema","resolveEditorDetail","findMixedDetailUiSchema","resolve","uischemas","uischema","createControlElement"],"sources":["../../src/core/detailUiSchema.ts"],"sourcesContent":["import {\n ControlElement,\n UISchemaElement,\n findUISchema,\n createControlElement,\n type JsonSchema,\n type JsonFormsUISchemaRegistryEntry,\n} from '@jsonforms/core';\n\n/** Editor details use upstream mode semantics and retain their caller's scope and fallback. */\nexport const findDetailUISchema: typeof findUISchema = (\n registry,\n schema,\n schemaPath,\n path,\n fallback = 'VerticalLayout',\n control,\n rootSchema,\n) => {\n const detail = control?.options?.detail;\n const generate =\n typeof detail === 'string' && detail.toUpperCase() === 'GENERATE';\n const guardedFallback =\n typeof fallback === 'function'\n ? () => {\n const result = fallback();\n // A fallback Control delegates again. Carry generation intent through that\n // dispatch so its object/array editor cannot pick the registry back up.\n return generate && result.type === 'Control'\n ? { ...result, options: { ...result.options, detail: 'GENERATE' } }\n : result;\n }\n : fallback;\n return findUISchema(\n registry,\n schema,\n schemaPath,\n path,\n guardedFallback,\n control,\n rootSchema,\n );\n};\n\n/** Explicit editor option; absence preserves the host's existing fallback.\n * Tuple-field layouts and recursive-node defaults may already come from a registry. */\nexport const resolveEditorDetail = (\n detail: unknown,\n registry: Parameters<typeof findUISchema>[0],\n schema: Parameters<typeof findUISchema>[1],\n schemaPath: string,\n path: string,\n rootSchema: Parameters<typeof findUISchema>[6],\n fallback: UISchemaElement,\n): UISchemaElement =>\n detail === undefined\n ? fallback\n : findDetailUISchema(\n registry,\n schema,\n schemaPath,\n path,\n () => fallback,\n {\n type: 'Control',\n scope: schemaPath,\n options: { detail },\n } as ControlElement,\n rootSchema,\n );\n\nexport const findMixedDetailUiSchema = (\n schema: JsonSchema,\n uischema: ControlElement,\n path: string,\n rootSchema: JsonSchema,\n uischemas: JsonFormsUISchemaRegistryEntry[],\n resolve: typeof findUISchema = findDetailUISchema,\n) =>\n resolve(\n uischemas,\n schema,\n uischema.scope,\n path,\n () => createControlElement('#'),\n uischema,\n rootSchema,\n );\n"],"mappings":";;AAUA,IAAaA,KACX,GACA,GACA,GACA,GACA,IAAW,kBACX,GACA,MACG;;CACH,IAAME,IAAAC,KAAA,SAAA,IAASA,EAAS,YAAA,OAAA,KAAA,IAAAF,EAAS,QAC3BG,IACJ,OAAOF,KAAW,YAAYA,EAAO,YAAY,MAAM;CAYzD,OAAOG,EACLC,GACAC,GACAC,GACAC,GAdA,OAAOC,KAAa,mBACV;EACJ,IAAMC,IAASD,EAAS;EAGxB,OAAON,KAAYO,EAAO,SAAS,YAC/B;GAAE,GAAGA;GAAQ,SAAS;IAAE,GAAGA,EAAO;IAAS,QAAQ;GAAW;EAAE,IAChEA;CACN,IACAD,GAOJP,GACAS,CACF;AACF,GAIaC,KACX,GACA,GACA,GACA,GACA,GACA,GACA,MAEAX,MAAW,KAAA,IACPQ,IACAV,EACEM,GACAC,GACAC,GACAC,SACMC,GACN;CACE,MAAM;CACN,OAAOF;CACP,SAAS,EAAE,UAAO;AACpB,GACAI,CACF,GAEOE,KACX,GACA,GACA,GACA,GACA,GACA,IAA+Bd,MAE/Be,EACEC,GACAT,GACAU,EAAS,OACTR,SACMS,EAAqB,GAAG,GAC9BD,GACAL,CACF"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null);exports.isPlainRecord=e;
2
+ //# sourceMappingURL=plainRecord.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plainRecord.cjs.js","names":["isPlainRecord","value"],"sources":["../../src/core/plainRecord.ts"],"sourcesContent":["export const isPlainRecord = (\n value: unknown,\n): value is Record<string, unknown> =>\n value !== null &&\n typeof value === 'object' &&\n !Array.isArray(value) &&\n (Object.getPrototypeOf(value) === Object.prototype ||\n Object.getPrototypeOf(value) === null);\n"],"mappings":"A,mEAAA,IAAaA,EACX,GAGA,OAAOC,GAAU,YADjBA,GAEA,CAAC,MAAM,QAAQA,CAAK,IACnB,OAAO,eAAeA,CAAK,IAAM,OAAO,WACvC,OAAO,eAAeA,CAAK,IAAM,M"}
@@ -0,0 +1 @@
1
+ export declare const isPlainRecord: (value: unknown) => value is Record<string, unknown>;
@@ -0,0 +1,5 @@
1
+ // src/core/plainRecord.ts
2
+ var e = (e) => typeof e == "object" && !!e && !Array.isArray(e) && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null);
3
+ export { e as isPlainRecord };
4
+
5
+ //# sourceMappingURL=plainRecord.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plainRecord.esm.js","names":["isPlainRecord","value"],"sources":["../../src/core/plainRecord.ts"],"sourcesContent":["export const isPlainRecord = (\n value: unknown,\n): value is Record<string, unknown> =>\n value !== null &&\n typeof value === 'object' &&\n !Array.isArray(value) &&\n (Object.getPrototypeOf(value) === Object.prototype ||\n Object.getPrototypeOf(value) === null);\n"],"mappings":";AAAA,IAAaA,KACX,MAGA,OAAOC,KAAU,cADjBA,KAEA,CAAC,MAAM,QAAQA,CAAK,MACnB,OAAO,eAAeA,CAAK,MAAM,OAAO,aACvC,OAAO,eAAeA,CAAK,MAAM"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../rolldown-runtime-BocRIvOZ.js");let t=require("react");t=e.t(t);var n=new Set,r=t.default.createContext(n),i=`uischema.registryCycle`,a=(e,t)=>`${t}::${(e==null?void 0:e.type)??``}::${(e==null?void 0:e.scope)??``}`,o=(e,n,o)=>{let s=(0,t.useContext)(r),c=e?a(e,n):void 0,l=c!==void 0&&s.has(c),u=(0,t.useMemo)(()=>{if(c===void 0||l)return s;let e=new Set(s);return e.add(c),e},[s,c,l]);return(0,t.useEffect)(()=>{l&&console.warn(`${i}: the UI schema registry returned an element that ${o} would dispatch back to itself at ${JSON.stringify(n||`<root>`)} (${c}). The generated UI schema was used instead. A registry entry for an object schema should be a layout, or a Control carrying options.detail.`)},[l,o,n,c]),{cycle:l,stack:u}},s=({stack:e,children:n})=>t.default.createElement(r.Provider,{value:e},n);exports.UI_SCHEMA_CYCLE_DIAGNOSTIC=i,exports.UiSchemaCycleProvider=s,exports.useUiSchemaCycleGuard=o;
2
+ //# sourceMappingURL=uiSchemaCycle.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uiSchemaCycle.cjs.js","names":["React","useContext","useMemo","require_rolldown_runtime","react","emptyStack","UiSchemaCycleContext","UI_SCHEMA_CYCLE_DIAGNOSTIC","signatureOf","path","uischema","useUiSchemaCycleGuard","seen","signature","cycle","stack","next","renderer","UiSchemaCycleProvider","children"],"sources":["../../src/core/uiSchemaCycle.tsx"],"sourcesContent":["import { UISchemaElement } from '@jsonforms/core';\nimport React, { useContext, useEffect, useMemo } from 'react';\n\n/**\n * Breaks a UI-schema registry entry that resolves to itself.\n *\n * `findUISchema` consults the registry with a schema and a path. A renderer\n * that then **dispatches the result at the same path** can be handed straight\n * back to itself: the entry matches the schema, the dispatch selects the same\n * renderer, the renderer asks the registry the same question, and the tree\n * grows until the heap runs out. Nothing throws - React is happy to build an\n * infinitely deep tree - so the symptom is a frozen tab and an out-of-memory\n * abort with no stack pointing anywhere useful.\n *\n * The shape that does it is ordinary and looks correct:\n *\n * ```ts\n * uischemas = [{\n * tester: (schema) => (schema.title === 'Address' ? 10 : -1),\n * uischema: { type: 'Control', scope: '#' },\n * }]\n * ```\n *\n * A **layout** entry is fine, because dispatching a layout does not come back\n * to a control renderer. A Control entry carrying `options.detail` is fine\n * too, because core's `findUISchema` returns that detail before it consults\n * the registry - which is why the combination that hangs is the one an author\n * reaches for first, and the one with the most configuration works.\n *\n * ## How the guard works\n *\n * Each renderer announces, through context, the element it is **about to\n * dispatch at which path**. If a descendant is about to dispatch the same\n * element at the same path, that is the fixed point, and it falls back to the\n * generated UI schema instead - the same thing it would have used had the\n * registry matched nothing.\n *\n * Context rather than a module-level set, because the answer depends on where\n * in the tree the renderer sits: the same element at the same path is only a\n * cycle when it is already an *ancestor*, not when two sibling forms happen\n * to render it.\n */\n\nconst emptyStack: ReadonlySet<string> = new Set();\n\nconst UiSchemaCycleContext =\n React.createContext<ReadonlySet<string>>(emptyStack);\n\n/** Stable code, so a host can grep for it. */\nexport const UI_SCHEMA_CYCLE_DIAGNOSTIC = 'uischema.registryCycle';\n\n/**\n * What identifies \"the same dispatch\".\n *\n * The path and the element's own identity as an author wrote it - its type and\n * scope. Object identity is not usable: a caller may spread the entry to add a\n * label, so the descendant sees a copy of what the ancestor dispatched.\n */\nconst signatureOf = (uischema: UISchemaElement, path: string) =>\n `${path}::${uischema?.type ?? ''}::${\n (uischema as { scope?: string })?.scope ?? ''\n }`;\n\nexport interface UiSchemaCycleGuard {\n /** True when dispatching this element here would re-enter the same renderer. */\n cycle: boolean;\n /** The stack to publish to descendants. */\n stack: ReadonlySet<string>;\n}\n\nexport const useUiSchemaCycleGuard = (\n uischema: UISchemaElement | undefined,\n path: string,\n /** Named in the diagnostic, so the message says which renderer noticed. */\n renderer: string,\n): UiSchemaCycleGuard => {\n const seen = useContext(UiSchemaCycleContext);\n const signature = uischema ? signatureOf(uischema, path) : undefined;\n const cycle = signature !== undefined && seen.has(signature);\n\n const stack = useMemo(() => {\n if (signature === undefined || cycle) {\n return seen;\n }\n const next = new Set(seen);\n next.add(signature);\n return next;\n }, [seen, signature, cycle]);\n\n /*\n In an effect, not during render: React may render a component more than\n once for one commit, and a warning printed during render would repeat.\n */\n useEffect(() => {\n if (!cycle) {\n return;\n }\n // oxlint-disable-next-line no-console\n console.warn(\n `${UI_SCHEMA_CYCLE_DIAGNOSTIC}: the UI schema registry returned an ` +\n `element that ${renderer} would dispatch back to itself at ` +\n `${JSON.stringify(path || '<root>')} (${signature}). The generated ` +\n `UI schema was used instead. A registry entry for an object schema ` +\n `should be a layout, or a Control carrying options.detail.`,\n );\n }, [cycle, renderer, path, signature]);\n\n return { cycle, stack };\n};\n\n/** Publishes the stack to everything rendered inside. */\nexport const UiSchemaCycleProvider = ({\n stack,\n children,\n}: {\n stack: ReadonlySet<string>;\n children: React.ReactNode;\n}) => (\n <UiSchemaCycleContext.Provider value={stack}>\n {children}\n </UiSchemaCycleContext.Provider>\n);\n"],"mappings":"A,sJA2CA,IAAMK,EAAkC,IAAI,IAEtCC,EACJN,EAAAA,QAAM,cAAmCK,CAAU,EAGxCE,EAA6B,yBASpCC,GAAe,EAA2B,IAC9C,GAAGC,EAAK,KAAAC,GAAA,KAAA,IAAA,GAAIA,EAAU,OAAQ,GAAG,KAAAA,GAAA,KAAA,IAAA,GAC9BA,EAAiC,QAAS,KAUlCC,GACX,EACA,EAEA,IACuB,CACvB,IAAMC,GAAA,EAAOX,EAAAA,WAAAA,CAAWK,CAAoB,EACtCO,EAAYH,EAAWF,EAAYE,EAAUD,CAAI,EAAI,IAAA,GACrDK,EAAQD,IAAc,IAAA,IAAaD,EAAK,IAAIC,CAAS,EAErDE,GAAA,EAAQb,EAAAA,QAAAA,KAAc,CAC1B,GAAIW,IAAc,IAAA,IAAaC,EAC7B,OAAOF,EAET,IAAMI,EAAO,IAAI,IAAIJ,CAAI,EAEzB,OADAI,EAAK,IAAIH,CAAS,EACXG,CACT,EAAG,CAACJ,EAAMC,EAAWC,CAAK,CAAC,EAoB3B,OAdA,EAAAV,EAAA,UAAA,KAAgB,CACTU,GAIL,QAAQ,KACN,GAAGP,EAA2B,oDACZU,EAAS,oCACtB,KAAK,UAAUR,GAAQ,QAAQ,EAAE,IAAII,EAAU,6IAGtD,CACF,EAAG,CAACC,EAAOG,EAAUR,EAAMI,CAAS,CAAC,EAE9B,CAAE,QAAO,OAAM,CACxB,EAGaK,GAAyB,CACpC,QACA,cAKAd,EAAA,QAAA,cAACE,EAAqB,SAAtB,CAA+B,MAAOS,CAEP,EAD5BI,CAC4B,E"}
@@ -0,0 +1,18 @@
1
+ import { UISchemaElement } from '@jsonforms/core';
2
+ import React from 'react';
3
+ /** Stable code, so a host can grep for it. */
4
+ export declare const UI_SCHEMA_CYCLE_DIAGNOSTIC = "uischema.registryCycle";
5
+ export interface UiSchemaCycleGuard {
6
+ /** True when dispatching this element here would re-enter the same renderer. */
7
+ cycle: boolean;
8
+ /** The stack to publish to descendants. */
9
+ stack: ReadonlySet<string>;
10
+ }
11
+ export declare const useUiSchemaCycleGuard: (uischema: UISchemaElement | undefined, path: string,
12
+ /** Named in the diagnostic, so the message says which renderer noticed. */
13
+ renderer: string) => UiSchemaCycleGuard;
14
+ /** Publishes the stack to everything rendered inside. */
15
+ export declare const UiSchemaCycleProvider: ({ stack, children, }: {
16
+ stack: ReadonlySet<string>;
17
+ children: React.ReactNode;
18
+ }) => React.JSX.Element;
@@ -0,0 +1,27 @@
1
+ import e, { useContext as t, useEffect as n, useMemo as r } from "react";
2
+ // src/core/uiSchemaCycle.tsx
3
+ var i = /* @__PURE__ */ new Set(), a = e.createContext(i), o = "uischema.registryCycle", s = (e, t) => `${t}::${(e == null ? void 0 : e.type) ?? ""}::${(e == null ? void 0 : e.scope) ?? ""}`, c = (e, i, c) => {
4
+ let l = t(a), u = e ? s(e, i) : void 0, d = u !== void 0 && l.has(u), f = r(() => {
5
+ if (u === void 0 || d) return l;
6
+ let e = new Set(l);
7
+ return e.add(u), e;
8
+ }, [
9
+ l,
10
+ u,
11
+ d
12
+ ]);
13
+ return n(() => {
14
+ d && console.warn(`${o}: the UI schema registry returned an element that ${c} would dispatch back to itself at ${JSON.stringify(i || "<root>")} (${u}). The generated UI schema was used instead. A registry entry for an object schema should be a layout, or a Control carrying options.detail.`);
15
+ }, [
16
+ d,
17
+ c,
18
+ i,
19
+ u
20
+ ]), {
21
+ cycle: d,
22
+ stack: f
23
+ };
24
+ }, l = ({ stack: t, children: n }) => /* @__PURE__ */ e.createElement(a.Provider, { value: t }, n);
25
+ export { o as UI_SCHEMA_CYCLE_DIAGNOSTIC, l as UiSchemaCycleProvider, c as useUiSchemaCycleGuard };
26
+
27
+ //# sourceMappingURL=uiSchemaCycle.esm.js.map