@gravity-ui/dynamic-forms 5.19.0 → 5.19.1

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 (368) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/lib/core/components/Form/Controller/Controller.d.ts +11 -0
  3. package/build/cjs/lib/core/components/Form/Controller/index.d.ts +1 -0
  4. package/build/cjs/lib/core/components/Form/Controller/types.d.ts +98 -0
  5. package/build/cjs/lib/core/components/Form/Controller/utils.d.ts +27 -0
  6. package/build/cjs/lib/core/components/Form/DynamicField.d.ts +19 -0
  7. package/build/cjs/lib/core/components/Form/constants.d.ts +4 -0
  8. package/build/cjs/lib/core/components/Form/hooks/index.d.ts +17 -0
  9. package/build/cjs/lib/core/components/Form/hooks/useControllerMirror.d.ts +2 -0
  10. package/build/cjs/lib/core/components/Form/hooks/useCreateContext.d.ts +3 -0
  11. package/build/cjs/lib/core/components/Form/hooks/useCreateSearchContext.d.ts +3 -0
  12. package/build/cjs/lib/core/components/Form/hooks/useDynamicFieldMirror.d.ts +2 -0
  13. package/build/cjs/lib/core/components/Form/hooks/useDynamicFormsCtx.d.ts +1 -0
  14. package/build/cjs/lib/core/components/Form/hooks/useFormShared.d.ts +4 -0
  15. package/build/cjs/lib/core/components/Form/hooks/useFormSharedStore.d.ts +4 -0
  16. package/build/cjs/lib/core/components/Form/hooks/useGenerateRandomValue.d.ts +1 -0
  17. package/build/cjs/lib/core/components/Form/hooks/useIntegrationFF.d.ts +10 -0
  18. package/build/cjs/lib/core/components/Form/hooks/useMonaco.d.ts +1 -0
  19. package/build/cjs/lib/core/components/Form/hooks/useMutateDFState.d.ts +1 -0
  20. package/build/cjs/lib/core/components/Form/hooks/useMutators.d.ts +5 -0
  21. package/build/cjs/lib/core/components/Form/hooks/useSearch/index.d.ts +1 -0
  22. package/build/cjs/lib/core/components/Form/hooks/useSearch/useSearch.d.ts +4 -0
  23. package/build/cjs/lib/core/components/Form/hooks/useSearchContext.d.ts +1 -0
  24. package/build/cjs/lib/core/components/Form/hooks/useSearchStore.d.ts +6 -0
  25. package/build/cjs/lib/core/components/Form/hooks/useStore.d.ts +10 -0
  26. package/build/cjs/lib/core/components/Form/hooks/useStoreValue.d.ts +1 -0
  27. package/build/cjs/lib/core/components/Form/index.d.ts +6 -0
  28. package/build/cjs/lib/core/components/Form/types/array.d.ts +14 -0
  29. package/build/cjs/lib/core/components/Form/types/boolean.d.ts +14 -0
  30. package/build/cjs/lib/core/components/Form/types/config.d.ts +14 -0
  31. package/build/cjs/lib/core/components/Form/types/context.d.ts +23 -0
  32. package/build/cjs/lib/core/components/Form/types/field.d.ts +33 -0
  33. package/build/cjs/lib/core/components/Form/types/index.d.ts +16 -0
  34. package/build/cjs/lib/core/components/Form/types/input.d.ts +23 -0
  35. package/build/cjs/lib/core/components/Form/types/layout.d.ts +9 -0
  36. package/build/cjs/lib/core/components/Form/types/mirror.d.ts +15 -0
  37. package/build/cjs/lib/core/components/Form/types/mutators.d.ts +29 -0
  38. package/build/cjs/lib/core/components/Form/types/number.d.ts +14 -0
  39. package/build/cjs/lib/core/components/Form/types/object.d.ts +14 -0
  40. package/build/cjs/lib/core/components/Form/types/search.d.ts +8 -0
  41. package/build/cjs/lib/core/components/Form/types/store.d.ts +7 -0
  42. package/build/cjs/lib/core/components/Form/types/string.d.ts +14 -0
  43. package/build/cjs/lib/core/components/Form/types/validators.d.ts +8 -0
  44. package/build/cjs/lib/core/components/Form/types/value.d.ts +8 -0
  45. package/build/cjs/lib/core/components/Form/utils/common.d.ts +6 -0
  46. package/build/cjs/lib/core/components/Form/utils/index.d.ts +2 -0
  47. package/build/cjs/lib/core/components/Form/utils/search.d.ts +3 -0
  48. package/build/cjs/lib/core/components/View/DynamicView.d.ts +17 -0
  49. package/build/cjs/lib/core/components/View/ViewController.d.ts +7 -0
  50. package/build/cjs/lib/core/components/View/helpers.d.ts +1 -0
  51. package/build/cjs/lib/core/components/View/hooks/index.d.ts +7 -0
  52. package/build/cjs/lib/core/components/View/hooks/useComponents.d.ts +6 -0
  53. package/build/cjs/lib/core/components/View/hooks/useCreateContext.d.ts +3 -0
  54. package/build/cjs/lib/core/components/View/hooks/useDynamicFormsCtx.d.ts +1 -0
  55. package/build/cjs/lib/core/components/View/hooks/useMonaco.d.ts +1 -0
  56. package/build/cjs/lib/core/components/View/hooks/useRender.d.ts +15 -0
  57. package/build/cjs/lib/core/components/View/hooks/useViewShared.d.ts +4 -0
  58. package/build/cjs/lib/core/components/View/hooks/useViewSharedStore.d.ts +4 -0
  59. package/build/cjs/lib/core/components/View/index.d.ts +5 -0
  60. package/build/cjs/lib/core/components/View/types/array.d.ts +13 -0
  61. package/build/cjs/lib/core/components/View/types/boolean.d.ts +13 -0
  62. package/build/cjs/lib/core/components/View/types/config.d.ts +13 -0
  63. package/build/cjs/lib/core/components/View/types/context.d.ts +18 -0
  64. package/build/cjs/lib/core/components/View/types/index.d.ts +9 -0
  65. package/build/cjs/lib/core/components/View/types/layout.d.ts +8 -0
  66. package/build/cjs/lib/core/components/View/types/number.d.ts +13 -0
  67. package/build/cjs/lib/core/components/View/types/object.d.ts +13 -0
  68. package/build/cjs/lib/core/components/View/types/string.d.ts +13 -0
  69. package/build/cjs/lib/core/components/View/types/views.d.ts +23 -0
  70. package/build/cjs/lib/core/components/index.d.ts +2 -0
  71. package/build/cjs/lib/core/constants.d.ts +8 -0
  72. package/build/cjs/lib/core/helpers.d.ts +7 -0
  73. package/build/cjs/lib/core/index.d.ts +4 -0
  74. package/build/cjs/lib/core/types/index.d.ts +2 -0
  75. package/build/cjs/lib/core/types/specs.d.ts +194 -0
  76. package/build/cjs/lib/core/types/value.d.ts +5 -0
  77. package/build/cjs/lib/index.d.ts +2 -0
  78. package/build/cjs/lib/kit/components/AccordeonCard/AccordeonCard.d.ts +16 -0
  79. package/build/cjs/lib/kit/components/AccordeonCard/index.d.ts +1 -0
  80. package/build/cjs/lib/kit/components/Card/Card.d.ts +14 -0
  81. package/build/cjs/lib/kit/components/Card/index.d.ts +1 -0
  82. package/build/cjs/lib/kit/components/CopyButton/CopyButton.d.ts +11 -0
  83. package/build/cjs/lib/kit/components/CopyButton/index.d.ts +1 -0
  84. package/build/cjs/lib/kit/components/ErrorWrapper/ErrorWrapper.d.ts +10 -0
  85. package/build/cjs/lib/kit/components/ErrorWrapper/index.d.ts +1 -0
  86. package/build/cjs/lib/kit/components/GenerateRandomValueButton/GenerateRandomValueButton.d.ts +8 -0
  87. package/build/cjs/lib/kit/components/GenerateRandomValueButton/index.d.ts +1 -0
  88. package/build/cjs/lib/kit/components/GroupIndent/GroupIndent.d.ts +5 -0
  89. package/build/cjs/lib/kit/components/GroupIndent/index.d.ts +1 -0
  90. package/build/cjs/lib/kit/components/HTMLContent/HTMLContent.d.ts +6 -0
  91. package/build/cjs/lib/kit/components/HTMLContent/index.d.ts +1 -0
  92. package/build/cjs/lib/kit/components/Inputs/ArrayBase/ArrayBase.d.ts +2 -0
  93. package/build/cjs/lib/kit/components/Inputs/ArrayBase/index.d.ts +1 -0
  94. package/build/cjs/lib/kit/components/Inputs/CardOneOf/CardOneOf.d.ts +2 -0
  95. package/build/cjs/lib/kit/components/Inputs/CardOneOf/index.d.ts +1 -0
  96. package/build/cjs/lib/kit/components/Inputs/Checkbox/Checkbox.d.ts +5 -0
  97. package/build/cjs/lib/kit/components/Inputs/Checkbox/index.d.ts +1 -0
  98. package/build/cjs/lib/kit/components/Inputs/CheckboxGroup/CheckboxGroup.d.ts +5 -0
  99. package/build/cjs/lib/kit/components/Inputs/CheckboxGroup/index.d.ts +1 -0
  100. package/build/cjs/lib/kit/components/Inputs/ColorPicker/ColorPicker.d.ts +21 -0
  101. package/build/cjs/lib/kit/components/Inputs/ColorPicker/index.d.ts +1 -0
  102. package/build/cjs/lib/kit/components/Inputs/DateInput/DateInput.d.ts +8 -0
  103. package/build/cjs/lib/kit/components/Inputs/DateInput/index.d.ts +1 -0
  104. package/build/cjs/lib/kit/components/Inputs/FileInput/FileInput.d.ts +3 -0
  105. package/build/cjs/lib/kit/components/Inputs/FileInput/index.d.ts +1 -0
  106. package/build/cjs/lib/kit/components/Inputs/FileInput/utils.d.ts +2 -0
  107. package/build/cjs/lib/kit/components/Inputs/MonacoInput/MonacoHeader.d.ts +11 -0
  108. package/build/cjs/lib/kit/components/Inputs/MonacoInput/MonacoInputBase.d.ts +9 -0
  109. package/build/cjs/lib/kit/components/Inputs/MonacoInput/MonacoInputDialog.d.ts +20 -0
  110. package/build/cjs/lib/kit/components/Inputs/MonacoInput/index.d.ts +1 -0
  111. package/build/cjs/lib/kit/components/Inputs/MonacoInput/useMonacoOptions.d.ts +2 -0
  112. package/build/cjs/lib/kit/components/Inputs/MultiOneOf/MultiOneOf.d.ts +7 -0
  113. package/build/cjs/lib/kit/components/Inputs/MultiOneOf/index.d.ts +1 -0
  114. package/build/cjs/lib/kit/components/Inputs/MultiSelect/MultiSelect.d.ts +6 -0
  115. package/build/cjs/lib/kit/components/Inputs/MultiSelect/index.d.ts +1 -0
  116. package/build/cjs/lib/kit/components/Inputs/Number/Number.d.ts +6 -0
  117. package/build/cjs/lib/kit/components/Inputs/Number/index.d.ts +1 -0
  118. package/build/cjs/lib/kit/components/Inputs/NumberWithScale/NumberWithScale.d.ts +3 -0
  119. package/build/cjs/lib/kit/components/Inputs/NumberWithScale/index.d.ts +1 -0
  120. package/build/cjs/lib/kit/components/Inputs/NumberWithScale/useInitial.d.ts +5 -0
  121. package/build/cjs/lib/kit/components/Inputs/ObjectBase/ObjectBase.d.ts +7 -0
  122. package/build/cjs/lib/kit/components/Inputs/ObjectBase/index.d.ts +1 -0
  123. package/build/cjs/lib/kit/components/Inputs/ObjectValueInput/ObjectValueInput.d.ts +2 -0
  124. package/build/cjs/lib/kit/components/Inputs/ObjectValueInput/index.d.ts +1 -0
  125. package/build/cjs/lib/kit/components/Inputs/OneOf/OneOf.d.ts +7 -0
  126. package/build/cjs/lib/kit/components/Inputs/OneOf/index.d.ts +1 -0
  127. package/build/cjs/lib/kit/components/Inputs/RadioGroup/RadioGroup.d.ts +6 -0
  128. package/build/cjs/lib/kit/components/Inputs/RadioGroup/index.d.ts +1 -0
  129. package/build/cjs/lib/kit/components/Inputs/RangeInputPicker/RangeInputPicker.d.ts +4 -0
  130. package/build/cjs/lib/kit/components/Inputs/RangeInputPicker/RangeInputPickerNumber.d.ts +4 -0
  131. package/build/cjs/lib/kit/components/Inputs/RangeInputPicker/index.d.ts +3 -0
  132. package/build/cjs/lib/kit/components/Inputs/RangeInputPicker/types.d.ts +15 -0
  133. package/build/cjs/lib/kit/components/Inputs/Secret/Secret.d.ts +2 -0
  134. package/build/cjs/lib/kit/components/Inputs/Secret/index.d.ts +1 -0
  135. package/build/cjs/lib/kit/components/Inputs/Select/Select.d.ts +6 -0
  136. package/build/cjs/lib/kit/components/Inputs/Select/index.d.ts +1 -0
  137. package/build/cjs/lib/kit/components/Inputs/Switch/Switch.d.ts +2 -0
  138. package/build/cjs/lib/kit/components/Inputs/Switch/index.d.ts +1 -0
  139. package/build/cjs/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.d.ts +2 -0
  140. package/build/cjs/lib/kit/components/Inputs/TableArrayInput/index.d.ts +1 -0
  141. package/build/cjs/lib/kit/components/Inputs/Text/Text.d.ts +6 -0
  142. package/build/cjs/lib/kit/components/Inputs/Text/index.d.ts +1 -0
  143. package/build/cjs/lib/kit/components/Inputs/TextArea/TextArea.d.ts +5 -0
  144. package/build/cjs/lib/kit/components/Inputs/TextArea/index.d.ts +1 -0
  145. package/build/cjs/lib/kit/components/Inputs/TextContent/TextContent.d.ts +12 -0
  146. package/build/cjs/lib/kit/components/Inputs/TextContent/index.d.ts +1 -0
  147. package/build/cjs/lib/kit/components/Inputs/TextContent/utils.d.ts +4 -0
  148. package/build/cjs/lib/kit/components/Inputs/TextLink/TextLink.d.ts +2 -0
  149. package/build/cjs/lib/kit/components/Inputs/TextLink/index.d.ts +1 -0
  150. package/build/cjs/lib/kit/components/Inputs/TimeRangeSelector/TimeRangeSelector.d.ts +2 -0
  151. package/build/cjs/lib/kit/components/Inputs/TimeRangeSelector/components/TimeRangeSelect/TimeRangeSelect.d.ts +13 -0
  152. package/build/cjs/lib/kit/components/Inputs/TimeRangeSelector/components/TimeRangeSelect/index.d.ts +1 -0
  153. package/build/cjs/lib/kit/components/Inputs/TimeRangeSelector/components/index.d.ts +1 -0
  154. package/build/cjs/lib/kit/components/Inputs/TimeRangeSelector/index.d.ts +1 -0
  155. package/build/cjs/lib/kit/components/Inputs/TimeRangeSelector/utils.d.ts +16 -0
  156. package/build/cjs/lib/kit/components/Inputs/index.d.ts +26 -0
  157. package/build/cjs/lib/kit/components/Layouts/Accordeon/Accordeon.d.ts +8 -0
  158. package/build/cjs/lib/kit/components/Layouts/Accordeon/index.d.ts +1 -0
  159. package/build/cjs/lib/kit/components/Layouts/AccordeonCard/AccordeonCardForm.d.ts +3 -0
  160. package/build/cjs/lib/kit/components/Layouts/AccordeonCard/index.d.ts +1 -0
  161. package/build/cjs/lib/kit/components/Layouts/CardAccordeon.d.ts +3 -0
  162. package/build/cjs/lib/kit/components/Layouts/CardSection.d.ts +3 -0
  163. package/build/cjs/lib/kit/components/Layouts/Column/Column.d.ts +3 -0
  164. package/build/cjs/lib/kit/components/Layouts/Column/index.d.ts +1 -0
  165. package/build/cjs/lib/kit/components/Layouts/Row/Row.d.ts +4 -0
  166. package/build/cjs/lib/kit/components/Layouts/Row/index.d.ts +1 -0
  167. package/build/cjs/lib/kit/components/Layouts/Section/Section.d.ts +15 -0
  168. package/build/cjs/lib/kit/components/Layouts/Section/index.d.ts +1 -0
  169. package/build/cjs/lib/kit/components/Layouts/TableCell/TableCell.d.ts +3 -0
  170. package/build/cjs/lib/kit/components/Layouts/TableCell/index.d.ts +1 -0
  171. package/build/cjs/lib/kit/components/Layouts/Transparent/Transparent.d.ts +3 -0
  172. package/build/cjs/lib/kit/components/Layouts/Transparent/index.d.ts +1 -0
  173. package/build/cjs/lib/kit/components/Layouts/index.d.ts +9 -0
  174. package/build/cjs/lib/kit/components/LazyLoader/LazyLoader.d.ts +6 -0
  175. package/build/cjs/lib/kit/components/LazyLoader/index.d.ts +1 -0
  176. package/build/cjs/lib/kit/components/LongValue/LongValue.d.ts +7 -0
  177. package/build/cjs/lib/kit/components/LongValue/index.d.ts +1 -0
  178. package/build/cjs/lib/kit/components/RemoveButton/RemoveButton.d.ts +7 -0
  179. package/build/cjs/lib/kit/components/RemoveButton/index.d.ts +1 -0
  180. package/build/cjs/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.d.ts +44 -0
  181. package/build/cjs/lib/kit/components/SimpleVerticalAccordeon/index.d.ts +1 -0
  182. package/build/cjs/lib/kit/components/TogglerCard/TogglerCard.d.ts +11 -0
  183. package/build/cjs/lib/kit/components/TogglerCard/index.d.ts +1 -0
  184. package/build/cjs/lib/kit/components/ViewLayouts/ViewAccordeon/ViewAccordeon.d.ts +8 -0
  185. package/build/cjs/lib/kit/components/ViewLayouts/ViewAccordeon/index.d.ts +1 -0
  186. package/build/cjs/lib/kit/components/ViewLayouts/ViewAccordeonCard/ViewAccordeonCard.d.ts +3 -0
  187. package/build/cjs/lib/kit/components/ViewLayouts/ViewAccordeonCard/index.d.ts +1 -0
  188. package/build/cjs/lib/kit/components/ViewLayouts/ViewCardAccordeon.d.ts +3 -0
  189. package/build/cjs/lib/kit/components/ViewLayouts/ViewCardSection.d.ts +3 -0
  190. package/build/cjs/lib/kit/components/ViewLayouts/ViewColumn/ViewColumn.d.ts +3 -0
  191. package/build/cjs/lib/kit/components/ViewLayouts/ViewColumn/index.d.ts +1 -0
  192. package/build/cjs/lib/kit/components/ViewLayouts/ViewRow/ViewRow.d.ts +3 -0
  193. package/build/cjs/lib/kit/components/ViewLayouts/ViewRow/index.d.ts +1 -0
  194. package/build/cjs/lib/kit/components/ViewLayouts/ViewSection/ViewSection.d.ts +6 -0
  195. package/build/cjs/lib/kit/components/ViewLayouts/ViewSection/index.d.ts +1 -0
  196. package/build/cjs/lib/kit/components/ViewLayouts/ViewTableCell/ViewTableCell.d.ts +3 -0
  197. package/build/cjs/lib/kit/components/ViewLayouts/ViewTableCell/index.d.ts +1 -0
  198. package/build/cjs/lib/kit/components/ViewLayouts/ViewTransparent/ViewTransparent.d.ts +3 -0
  199. package/build/cjs/lib/kit/components/ViewLayouts/ViewTransparent/index.d.ts +1 -0
  200. package/build/cjs/lib/kit/components/ViewLayouts/index.d.ts +9 -0
  201. package/build/cjs/lib/kit/components/Views/ArrayBaseView/ArrayBaseView.d.ts +2 -0
  202. package/build/cjs/lib/kit/components/Views/ArrayBaseView/index.d.ts +1 -0
  203. package/build/cjs/lib/kit/components/Views/BaseView/BaseView.d.ts +3 -0
  204. package/build/cjs/lib/kit/components/Views/BaseView/index.d.ts +1 -0
  205. package/build/cjs/lib/kit/components/Views/CardOneOfView.d.ts +2 -0
  206. package/build/cjs/lib/kit/components/Views/CheckboxGroupView/CheckboxGroupView.d.ts +2 -0
  207. package/build/cjs/lib/kit/components/Views/CheckboxGroupView/index.d.ts +1 -0
  208. package/build/cjs/lib/kit/components/Views/ColorPickerView/ColorPickerView.d.ts +2 -0
  209. package/build/cjs/lib/kit/components/Views/ColorPickerView/index.d.ts +1 -0
  210. package/build/cjs/lib/kit/components/Views/DateView/DateView.d.ts +3 -0
  211. package/build/cjs/lib/kit/components/Views/DateView/index.d.ts +1 -0
  212. package/build/cjs/lib/kit/components/Views/FileInputView/FileInputView.d.ts +3 -0
  213. package/build/cjs/lib/kit/components/Views/FileInputView/index.d.ts +1 -0
  214. package/build/cjs/lib/kit/components/Views/MonacoInputView/MonacoBaseView.d.ts +3 -0
  215. package/build/cjs/lib/kit/components/Views/MonacoInputView/MonacoViewDialog.d.ts +15 -0
  216. package/build/cjs/lib/kit/components/Views/MonacoInputView/index.d.ts +1 -0
  217. package/build/cjs/lib/kit/components/Views/MultiOneOfView/MultiOneOfView.d.ts +7 -0
  218. package/build/cjs/lib/kit/components/Views/MultiOneOfView/index.d.ts +1 -0
  219. package/build/cjs/lib/kit/components/Views/MultiSelectView/MultiSelectView.d.ts +2 -0
  220. package/build/cjs/lib/kit/components/Views/MultiSelectView/index.d.ts +1 -0
  221. package/build/cjs/lib/kit/components/Views/NumberWithScaleView/NumberWithScaleView.d.ts +3 -0
  222. package/build/cjs/lib/kit/components/Views/NumberWithScaleView/index.d.ts +1 -0
  223. package/build/cjs/lib/kit/components/Views/ObjectBaseView/ObjectBaseView.d.ts +7 -0
  224. package/build/cjs/lib/kit/components/Views/ObjectBaseView/index.d.ts +1 -0
  225. package/build/cjs/lib/kit/components/Views/ObjectValueInputView/ObjectValueInputView.d.ts +2 -0
  226. package/build/cjs/lib/kit/components/Views/ObjectValueInputView/index.d.ts +1 -0
  227. package/build/cjs/lib/kit/components/Views/OneOfView/OneOfView.d.ts +7 -0
  228. package/build/cjs/lib/kit/components/Views/OneOfView/index.d.ts +1 -0
  229. package/build/cjs/lib/kit/components/Views/RangeInputPickerView/RangeInputPickerNumberView.d.ts +2 -0
  230. package/build/cjs/lib/kit/components/Views/RangeInputPickerView/RangeInputPickerView.d.ts +2 -0
  231. package/build/cjs/lib/kit/components/Views/RangeInputPickerView/index.d.ts +2 -0
  232. package/build/cjs/lib/kit/components/Views/TableArrayView/TableArrayView.d.ts +2 -0
  233. package/build/cjs/lib/kit/components/Views/TableArrayView/index.d.ts +1 -0
  234. package/build/cjs/lib/kit/components/Views/TextAreaView/TextAreaView.d.ts +2 -0
  235. package/build/cjs/lib/kit/components/Views/TextAreaView/index.d.ts +1 -0
  236. package/build/cjs/lib/kit/components/Views/TextContentView.d.ts +2 -0
  237. package/build/cjs/lib/kit/components/Views/TextLinkView/TextLinkView.d.ts +2 -0
  238. package/build/cjs/lib/kit/components/Views/TextLinkView/index.d.ts +1 -0
  239. package/build/cjs/lib/kit/components/Views/TimeRangeSelectorView/TimeRangeSelectorView.d.ts +2 -0
  240. package/build/cjs/lib/kit/components/Views/TimeRangeSelectorView/index.d.ts +1 -0
  241. package/build/cjs/lib/kit/components/Views/index.d.ts +20 -0
  242. package/build/cjs/lib/kit/components/index.d.ts +14 -0
  243. package/build/cjs/lib/kit/constants/common.d.ts +13 -0
  244. package/build/cjs/lib/kit/constants/config.d.ts +3 -0
  245. package/build/cjs/lib/kit/constants/index.d.ts +2 -0
  246. package/build/cjs/lib/kit/hooks/index.d.ts +2 -0
  247. package/build/cjs/lib/kit/hooks/useErrorChecker.d.ts +8 -0
  248. package/build/cjs/lib/kit/hooks/useOneOf/index.d.ts +1 -0
  249. package/build/cjs/lib/kit/hooks/useOneOf/useOneOf.d.ts +12 -0
  250. package/build/cjs/lib/kit/i18n/configure.d.ts +12 -0
  251. package/build/cjs/lib/kit/i18n/index.d.ts +2 -0
  252. package/build/cjs/lib/kit/index.d.ts +6 -0
  253. package/build/cjs/lib/kit/utils/bigIntMath.d.ts +2 -0
  254. package/build/cjs/lib/kit/utils/cn.d.ts +2 -0
  255. package/build/cjs/lib/kit/utils/common.d.ts +6 -0
  256. package/build/cjs/lib/kit/utils/index.d.ts +5 -0
  257. package/build/cjs/lib/kit/utils/objectInline.d.ts +4 -0
  258. package/build/cjs/lib/kit/utils/objectKeys.d.ts +4 -0
  259. package/build/cjs/lib/kit/validators/helpers.d.ts +7 -0
  260. package/build/cjs/lib/kit/validators/index.d.ts +2 -0
  261. package/build/cjs/lib/kit/validators/messages.d.ts +2 -0
  262. package/build/cjs/lib/kit/validators/types.d.ts +20 -0
  263. package/build/cjs/lib/kit/validators/validators.d.ts +42 -0
  264. package/build/cjs/lib/unstable/core/Entity/Entity.d.ts +10 -0
  265. package/build/cjs/lib/unstable/core/Entity/index.d.ts +2 -0
  266. package/build/cjs/lib/unstable/core/Entity/types.d.ts +27 -0
  267. package/build/cjs/lib/unstable/core/Entity/utils.d.ts +3 -0
  268. package/build/cjs/lib/unstable/core/SchemaRenderer/SchemaRenderer.d.ts +5 -0
  269. package/build/cjs/lib/unstable/core/SchemaRenderer/index.d.ts +1 -0
  270. package/build/cjs/lib/unstable/core/constants.d.ts +22 -0
  271. package/build/cjs/lib/unstable/core/index.d.ts +5 -0
  272. package/build/cjs/lib/unstable/core/types/components.d.ts +29 -0
  273. package/build/cjs/lib/unstable/core/types/config.d.ts +36 -0
  274. package/build/cjs/lib/unstable/core/types/helpers.d.ts +18 -0
  275. package/build/cjs/lib/unstable/core/types/index.d.ts +5 -0
  276. package/build/cjs/lib/unstable/core/types/schema.d.ts +1186 -0
  277. package/build/cjs/lib/unstable/core/types/validation.d.ts +39 -0
  278. package/build/cjs/lib/unstable/core/types/values.d.ts +4 -0
  279. package/build/cjs/lib/unstable/core/useSchemaRenderer/constants.d.ts +1 -0
  280. package/build/cjs/lib/unstable/core/useSchemaRenderer/hooks/index.d.ts +2 -0
  281. package/build/cjs/lib/unstable/core/useSchemaRenderer/hooks/useEntitiesState.d.ts +7 -0
  282. package/build/cjs/lib/unstable/core/useSchemaRenderer/hooks/useSchemaRendererMutators.d.ts +10 -0
  283. package/build/cjs/lib/unstable/core/useSchemaRenderer/index.d.ts +3 -0
  284. package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/async-validation/async-validation.d.ts +3 -0
  285. package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/async-validation/index.d.ts +2 -0
  286. package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/async-validation/types.d.ts +34 -0
  287. package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/external-errors/external-errors.d.ts +3 -0
  288. package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/external-errors/index.d.ts +2 -0
  289. package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/external-errors/types.d.ts +25 -0
  290. package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/index.d.ts +13 -0
  291. package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/schema-mutators/index.d.ts +2 -0
  292. package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/schema-mutators/schema-mutators.d.ts +3 -0
  293. package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/schema-mutators/types.d.ts +26 -0
  294. package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/trigger-fields/index.d.ts +2 -0
  295. package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/trigger-fields/trigger-fields.d.ts +2 -0
  296. package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/trigger-fields/types.d.ts +6 -0
  297. package/build/cjs/lib/unstable/core/useSchemaRenderer/types.d.ts +22 -0
  298. package/build/cjs/lib/unstable/core/useSchemaRenderer/useSchemaRenderer.d.ts +37 -0
  299. package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/common.d.ts +1 -0
  300. package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/get-ajv-validate.d.ts +11 -0
  301. package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/get-validate.d.ts +14 -0
  302. package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/index.d.ts +2 -0
  303. package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/process-ajv-error.d.ts +10 -0
  304. package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/process-ajv-validate-errors.d.ts +20 -0
  305. package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/process-entity-parameters-error.d.ts +15 -0
  306. package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/process-errors-state.d.ts +12 -0
  307. package/build/cjs/lib/unstable/core/utils/common.d.ts +49 -0
  308. package/build/cjs/lib/unstable/core/utils/index.d.ts +1 -0
  309. package/build/cjs/lib/unstable/kit/Accordeon.d.ts +3 -0
  310. package/build/cjs/lib/unstable/kit/Any.d.ts +2 -0
  311. package/build/cjs/lib/unstable/kit/ArrayBase.d.ts +2 -0
  312. package/build/cjs/lib/unstable/kit/MultiSelect.d.ts +6 -0
  313. package/build/cjs/lib/unstable/kit/ObjectBase.d.ts +7 -0
  314. package/build/cjs/lib/unstable/kit/Row.d.ts +10 -0
  315. package/build/cjs/lib/unstable/kit/Text.d.ts +6 -0
  316. package/build/cjs/lib/unstable/kit/components/ArrayRemoveButton/ArrayRemoveButton.d.ts +5 -0
  317. package/build/cjs/lib/unstable/kit/components/ArrayRemoveButton/index.d.ts +1 -0
  318. package/build/cjs/lib/unstable/kit/components/ControlError/ControlError.d.ts +8 -0
  319. package/build/cjs/lib/unstable/kit/components/ControlError/index.d.ts +1 -0
  320. package/build/cjs/lib/unstable/kit/components/HTMLContent/HTMLContent.d.ts +6 -0
  321. package/build/cjs/lib/unstable/kit/components/HTMLContent/index.d.ts +1 -0
  322. package/build/cjs/lib/unstable/kit/components/index.d.ts +3 -0
  323. package/build/cjs/lib/unstable/kit/config.d.ts +95 -0
  324. package/build/cjs/lib/unstable/kit/constants/config.d.ts +112 -0
  325. package/build/cjs/lib/unstable/kit/constants/index.d.ts +1 -0
  326. package/build/cjs/lib/unstable/kit/controls/ArrayBase/ArrayBase.d.ts +8 -0
  327. package/build/cjs/lib/unstable/kit/controls/ArrayBase/index.d.ts +1 -0
  328. package/build/cjs/lib/unstable/kit/controls/Checkbox/Checkbox.d.ts +6 -0
  329. package/build/cjs/lib/unstable/kit/controls/Checkbox/index.d.ts +1 -0
  330. package/build/cjs/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.d.ts +9 -0
  331. package/build/cjs/lib/unstable/kit/controls/CheckboxGroup/index.d.ts +1 -0
  332. package/build/cjs/lib/unstable/kit/controls/ColorPicker/ColorPicker.d.ts +6 -0
  333. package/build/cjs/lib/unstable/kit/controls/ColorPicker/index.d.ts +1 -0
  334. package/build/cjs/lib/unstable/kit/controls/DateInput/DateInput.d.ts +8 -0
  335. package/build/cjs/lib/unstable/kit/controls/DateInput/index.d.ts +1 -0
  336. package/build/cjs/lib/unstable/kit/controls/MultiSelect/MultiSelect.d.ts +8 -0
  337. package/build/cjs/lib/unstable/kit/controls/MultiSelect/index.d.ts +1 -0
  338. package/build/cjs/lib/unstable/kit/controls/NumberBase/Number.d.ts +6 -0
  339. package/build/cjs/lib/unstable/kit/controls/NumberBase/index.d.ts +1 -0
  340. package/build/cjs/lib/unstable/kit/controls/ObjectBase/ObjectBase.d.ts +8 -0
  341. package/build/cjs/lib/unstable/kit/controls/ObjectBase/index.d.ts +1 -0
  342. package/build/cjs/lib/unstable/kit/controls/Password/Password.d.ts +6 -0
  343. package/build/cjs/lib/unstable/kit/controls/Password/index.d.ts +1 -0
  344. package/build/cjs/lib/unstable/kit/controls/RadioGroup/RadioGroup.d.ts +8 -0
  345. package/build/cjs/lib/unstable/kit/controls/RadioGroup/index.d.ts +1 -0
  346. package/build/cjs/lib/unstable/kit/controls/RangeSlider/RangeSlider.d.ts +7 -0
  347. package/build/cjs/lib/unstable/kit/controls/RangeSlider/index.d.ts +1 -0
  348. package/build/cjs/lib/unstable/kit/controls/Select/Select.d.ts +9 -0
  349. package/build/cjs/lib/unstable/kit/controls/Select/index.d.ts +1 -0
  350. package/build/cjs/lib/unstable/kit/controls/Slider/Slider.d.ts +6 -0
  351. package/build/cjs/lib/unstable/kit/controls/Slider/index.d.ts +1 -0
  352. package/build/cjs/lib/unstable/kit/controls/StringBase/StringBase.d.ts +6 -0
  353. package/build/cjs/lib/unstable/kit/controls/StringBase/index.d.ts +1 -0
  354. package/build/cjs/lib/unstable/kit/controls/Switch/Switch.d.ts +6 -0
  355. package/build/cjs/lib/unstable/kit/controls/Switch/index.d.ts +1 -0
  356. package/build/cjs/lib/unstable/kit/controls/TextArea/TextArea.d.ts +6 -0
  357. package/build/cjs/lib/unstable/kit/controls/TextArea/index.d.ts +1 -0
  358. package/build/cjs/lib/unstable/kit/controls/index.d.ts +16 -0
  359. package/build/cjs/lib/unstable/kit/utils/cn.d.ts +1 -0
  360. package/build/cjs/lib/unstable/kit/utils/common.d.ts +7 -0
  361. package/build/cjs/lib/unstable/kit/utils/index.d.ts +2 -0
  362. package/build/cjs/lib/unstable/kit/wrappers/Row/Row.d.ts +6 -0
  363. package/build/cjs/lib/unstable/kit/wrappers/Row/index.d.ts +1 -0
  364. package/build/cjs/lib/unstable/kit/wrappers/Transparent/Transparent.d.ts +3 -0
  365. package/build/cjs/lib/unstable/kit/wrappers/Transparent/index.d.ts +1 -0
  366. package/build/cjs/lib/unstable/kit/wrappers/index.d.ts +2 -0
  367. package/build/cjs/unstable.d.ts +4 -0
  368. package/package.json +1 -1
@@ -0,0 +1,1186 @@
1
+ import type { EntityType, JsonSchemaType } from '../constants';
2
+ import type { SchemaRendererConfig } from './config';
3
+ import type { ExtractControlProps, ExtractViewProps, ExtractWrapperProps, ObjectKeys } from './helpers';
4
+ import type { ErrorMessages } from './validation';
5
+ import type { ArrayValue, FieldValue, ObjectValue } from './values';
6
+ type ControlEntityParameters<TypeConfig extends SchemaRendererConfig[EntityType], Control extends ObjectKeys<TypeConfig['controls']> = ObjectKeys<TypeConfig['controls']>> = [Control] extends [never] ? {} : {
7
+ [C in Control]: {
8
+ /**
9
+ * Identifier of a control registered in `config[entityType].controls`. Selects
10
+ * which React component renders the field in form mode. When omitted, the
11
+ * renderer falls back to the default control for this entity type.
12
+ */
13
+ controlType?: C;
14
+ /**
15
+ * Extra props forwarded to the selected control. Typed to the `controlProps`
16
+ * shape declared by the chosen control component.
17
+ */
18
+ controlProps?: ExtractControlProps<TypeConfig['controls'][C]>;
19
+ };
20
+ }[Control];
21
+ type ControlWrapperEntityParameters<TypeConfig extends SchemaRendererConfig[EntityType], Wrapper extends ObjectKeys<TypeConfig['wrappers']> = ObjectKeys<TypeConfig['wrappers']>> = [Wrapper] extends [never] ? {} : {
22
+ [W in Wrapper]: {
23
+ /**
24
+ * Identifier of a wrapper registered in `config[entityType].wrappers`. The
25
+ * wrapper component is rendered around the control in form mode (e.g. to add
26
+ * a label, layout, or visibility logic).
27
+ */
28
+ controlWrapperType?: W;
29
+ /**
30
+ * Extra props forwarded to the selected control wrapper. Typed to the
31
+ * `wrapperProps` shape declared by the chosen wrapper component.
32
+ */
33
+ controlWrapperProps?: ExtractWrapperProps<TypeConfig['wrappers'][W]>;
34
+ };
35
+ }[Wrapper];
36
+ type ViewEntityParameters<TypeConfig extends SchemaRendererConfig[EntityType], View extends ObjectKeys<TypeConfig['views']> = ObjectKeys<TypeConfig['views']>> = [View] extends [never] ? {} : {
37
+ [V in View]: {
38
+ /**
39
+ * Identifier of a view registered in `config[entityType].views`. Selects which
40
+ * React component renders the field in overview (read-only) mode. When omitted,
41
+ * the renderer falls back to the default view for this entity type.
42
+ */
43
+ viewType?: V;
44
+ /**
45
+ * Extra props forwarded to the selected view. Typed to the `viewProps` shape
46
+ * declared by the chosen view component.
47
+ */
48
+ viewProps?: ExtractViewProps<TypeConfig['views'][V]>;
49
+ };
50
+ }[View];
51
+ type ViewWrapperEntityParameters<TypeConfig extends SchemaRendererConfig[EntityType], Wrapper extends ObjectKeys<TypeConfig['wrappers']> = ObjectKeys<TypeConfig['wrappers']>> = [Wrapper] extends [never] ? {} : {
52
+ [W in Wrapper]: {
53
+ /**
54
+ * Identifier of a wrapper registered in `config[entityType].wrappers`. The
55
+ * wrapper component is rendered around the view in overview mode.
56
+ */
57
+ viewWrapperType?: W;
58
+ /**
59
+ * Extra props forwarded to the selected view wrapper. Typed to the
60
+ * `wrapperProps` shape declared by the chosen wrapper component.
61
+ */
62
+ viewWrapperProps?: ExtractWrapperProps<TypeConfig['wrappers'][W]>;
63
+ };
64
+ }[Wrapper];
65
+ type ValidatorEntityParameters<Validator extends string> = [Validator] extends [never] ? {} : {
66
+ [V in Validator]: {
67
+ /**
68
+ * Identifier of a custom validator registered in `config[entityType].validators`.
69
+ * Runs in addition to (or instead of, depending on the renderer policy) the
70
+ * JSON Schema validation derived from the schema keywords.
71
+ *
72
+ * TODO(verify): confirm whether the custom validator replaces or complements
73
+ * JSON Schema validation and adjust this comment.
74
+ */
75
+ validatorType?: V;
76
+ };
77
+ }[Validator];
78
+ /**
79
+ * Renderer-specific configuration carried on each schema node. Not part of the
80
+ * JSON Schema specification — these keywords are ignored by JSON Schema
81
+ * validators and consumed only by SchemaRenderer to choose controls, views,
82
+ * wrappers, validators, and custom error messages for the field.
83
+ *
84
+ * Generic parameters bind the available `controlType` / `viewType` /
85
+ * `wrapperType` / `validatorType` values to those registered in the
86
+ * `SchemaRendererConfig` for this entity type — making invalid identifiers a
87
+ * TypeScript error at the schema declaration site.
88
+ */
89
+ interface EntityParameters<Type extends EntityType, TypeConfig extends SchemaRendererConfig[Type], Control extends ObjectKeys<TypeConfig['controls']> = ObjectKeys<TypeConfig['controls']>, View extends ObjectKeys<TypeConfig['views']> = ObjectKeys<TypeConfig['views']>, Wrapper extends ObjectKeys<TypeConfig['wrappers']> = ObjectKeys<TypeConfig['wrappers']>, Validator extends ObjectKeys<TypeConfig['validators']> = ObjectKeys<TypeConfig['validators']>> {
90
+ /**
91
+ * Optional bag of renderer-specific configuration for this schema node.
92
+ * Ignored by JSON Schema validators.
93
+ */
94
+ entityParameters?: {
95
+ /**
96
+ * Forces the renderer to treat this node as a specific `EntityType`, overriding
97
+ * the inference based on the JSON Schema `type` keyword. Useful when a single
98
+ * JSON type should be rendered as multiple kinds of UI (e.g. `String` rendered
99
+ * via different `EntityType` registrations).
100
+ */
101
+ type?: Type;
102
+ /**
103
+ * Custom error messages shown by the renderer when validation fails. Keys
104
+ * correspond to JSON Schema validation keywords (`minLength`, `pattern`, `enum`,
105
+ * etc.).
106
+ *
107
+ * `dependencies` and `required` accept either a single string (used for any
108
+ * failure of that keyword) or a `Record<string, string>` mapping the dependent /
109
+ * required property name to its own message.
110
+ *
111
+ * Not part of the JSON Schema specification — purely a UI override for this
112
+ * renderer.
113
+ *
114
+ * @example
115
+ * {
116
+ * type: JsonSchemaType.String,
117
+ * minLength: 5,
118
+ * entityParameters: {
119
+ * errorMessages: {minLength: 'Must be at least 5 characters'},
120
+ * },
121
+ * }
122
+ *
123
+ * @example
124
+ * // Per-property message for required.
125
+ * {
126
+ * type: JsonSchemaType.Object,
127
+ * required: ['name', 'email'],
128
+ * entityParameters: {
129
+ * errorMessages: {
130
+ * required: {name: 'Name is required', email: 'Email is required'},
131
+ * },
132
+ * },
133
+ * }
134
+ */
135
+ errorMessages?: Omit<ErrorMessages, 'dependencies' | 'required'> & {
136
+ dependencies?: string | Record<string, string>;
137
+ required?: string | Record<string, string>;
138
+ };
139
+ } & ControlEntityParameters<TypeConfig, Control> & ControlWrapperEntityParameters<TypeConfig, Wrapper> & ViewEntityParameters<TypeConfig, View> & ViewWrapperEntityParameters<TypeConfig, Wrapper> & ValidatorEntityParameters<Validator>;
140
+ }
141
+ /**
142
+ * Common JSON Schema keywords inherited by every concrete schema variant.
143
+ */
144
+ interface JsonSchemaBase<Config extends SchemaRendererConfig, Schema extends JsonSchema<Config>, Value extends FieldValue> {
145
+ /**
146
+ * Unique URI identifier for the schema; establishes the base URI used to resolve
147
+ * relative `$ref`s in all nested sub-schemas.
148
+ *
149
+ * May be an absolute URI, a relative URI (resolved against the parent `$id`), or
150
+ * a fragment-only anchor (e.g. `#address`) — the anchor form lets `$ref: '#address'`
151
+ * point at this schema from anywhere in the document.
152
+ *
153
+ * @example
154
+ * { $id: 'https://example.com/schemas/person' }
155
+ *
156
+ * @example
157
+ * // Anchor form: nested schemas can reference it via `{ $ref: '#address' }`.
158
+ * { $id: '#address', type: JsonSchemaType.Object }
159
+ *
160
+ * @see https://json-schema.org/draft-07/json-schema-core.html#rfc.section.8.2
161
+ */
162
+ $id?: string;
163
+ /**
164
+ * URI reference to another schema. Resolved against the nearest enclosing `$id`
165
+ * (or the document URI). Targets may be in `definitions`, but also any nested
166
+ * sub-schema reachable by JSON Pointer.
167
+ *
168
+ * Draft-07 behaviour: when `$ref` is present, all sibling keywords in the same
169
+ * object (including `title`, `description`, and validation keywords) are
170
+ * **ignored** by the validator. This changed in Draft-2019-09, but the project
171
+ * targets Draft-07 — combining `$ref` with siblings will silently lose them.
172
+ *
173
+ * @example
174
+ * // JSON Pointer into definitions.
175
+ * { $ref: '#/definitions/positiveInt' }
176
+ *
177
+ * @example
178
+ * // JSON Pointer into the middle of the schema tree.
179
+ * { $ref: '#/properties/user/properties/address' }
180
+ *
181
+ * @example
182
+ * // External document.
183
+ * { $ref: 'https://example.com/schemas/address.json' }
184
+ *
185
+ * @see https://json-schema.org/draft-07/json-schema-core.html#rfc.section.8.3
186
+ */
187
+ $ref?: string;
188
+ /**
189
+ * Logical AND: the value must validate against every sub-schema in the list.
190
+ *
191
+ * Useful for composing reusable constraints (typically declared in `definitions`)
192
+ * onto a base schema. In typed variants (e.g. `JsonSchemaString`), the entries
193
+ * are narrowed to the same variant by design — heterogeneous composition is not
194
+ * representable.
195
+ *
196
+ * @example
197
+ * {
198
+ * type: JsonSchemaType.String,
199
+ * allOf: [{minLength: 3}, {pattern: '^[a-z]+$'}],
200
+ * }
201
+ *
202
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.7.1
203
+ */
204
+ allOf?: Schema[];
205
+ /**
206
+ * Logical OR: the value must validate against at least one sub-schema in the list.
207
+ *
208
+ * Unlike `oneOf`, no uniqueness check — the first match is enough. Prefer `anyOf`
209
+ * when overlap between branches is acceptable; prefer `oneOf` when branches are
210
+ * disjoint and you want a "discriminated union" semantics.
211
+ *
212
+ * @example
213
+ * { anyOf: [{type: JsonSchemaType.String}, {type: JsonSchemaType.Number}] }
214
+ *
215
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.7.2
216
+ */
217
+ anyOf?: Schema[];
218
+ /**
219
+ * Restricts the value to exactly this constant. Equivalent to `enum: [const]`.
220
+ *
221
+ * Comparison is deep structural equality — works for primitives, arrays, objects,
222
+ * and `null`. Two different object instances with the same shape both match.
223
+ *
224
+ * @example
225
+ * { type: JsonSchemaType.String, const: 'v1' }
226
+ *
227
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.3
228
+ */
229
+ const?: Value;
230
+ /**
231
+ * Default value associated with the schema.
232
+ *
233
+ * In the JSON Schema specification this is an **annotation**, not a validation
234
+ * keyword — validators do not modify values by themselves. The SchemaRenderer
235
+ * uses it to seed the initial form value when none is supplied.
236
+ *
237
+ * Note: `default: null` is a present default of `null`, not "no default".
238
+ *
239
+ * TODO(verify): confirm exact application point in `useSchemaRenderer` and
240
+ * adjust this comment if the runtime treats `default` differently.
241
+ *
242
+ * @example
243
+ * { type: JsonSchemaType.String, default: 'guest' }
244
+ *
245
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.10.2
246
+ */
247
+ default?: Value;
248
+ /**
249
+ * Map of reusable named sub-schemas. Each entry is referenced via
250
+ * `$ref: '#/definitions/<key>'` from anywhere in the document.
251
+ *
252
+ * Renamed to `$defs` starting in Draft-2019-09; the project targets Draft-07,
253
+ * so `definitions` is the canonical form.
254
+ *
255
+ * @example
256
+ * {
257
+ * definitions: {
258
+ * positiveInt: {type: JsonSchemaType.Number, minimum: 1},
259
+ * },
260
+ * properties: {
261
+ * age: {$ref: '#/definitions/positiveInt'},
262
+ * },
263
+ * }
264
+ *
265
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.9
266
+ */
267
+ definitions?: {
268
+ [key: string]: JsonSchema<Config>;
269
+ };
270
+ /**
271
+ * Longer human-readable explanation of the schema. The SchemaRenderer renders it
272
+ * as helper/hint text near the control.
273
+ *
274
+ * Annotation only — not used for validation.
275
+ *
276
+ * @example
277
+ * { type: JsonSchemaType.String, description: 'As shown on your government-issued ID' }
278
+ *
279
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.10.1
280
+ */
281
+ description?: string;
282
+ /**
283
+ * Sub-schema applied when the value does **not** satisfy the `if` schema.
284
+ *
285
+ * Has no effect unless paired with `if`. If both `then` and `else` are omitted,
286
+ * `if` is a no-op for validation.
287
+ *
288
+ * @example
289
+ * {
290
+ * if: {properties: {locale: {const: 'ja'}}},
291
+ * then: {required: ['kanjiName']},
292
+ * else: {required: ['latinName']},
293
+ * }
294
+ *
295
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.6.3
296
+ */
297
+ else?: Schema;
298
+ /**
299
+ * Restricts the value to exactly one of the listed entries.
300
+ *
301
+ * Comparison is deep structural equality — entries may be primitives, arrays,
302
+ * objects, or `null`. In typed variants the entries are narrowed to the variant's
303
+ * value type (e.g. `string[]` for `JsonSchemaString`); for nullable fields,
304
+ * include `null` explicitly when needed.
305
+ *
306
+ * @example
307
+ * { type: JsonSchemaType.String, enum: ['draft', 'published', 'archived'] }
308
+ *
309
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.2
310
+ */
311
+ enum?: Value[];
312
+ /**
313
+ * Sample values illustrating typical inputs. Annotation only — not used for
314
+ * validation.
315
+ *
316
+ * TODO(verify): document whether and where the SchemaRenderer surfaces examples
317
+ * in the UI; adjust the comment to match.
318
+ *
319
+ * @example
320
+ * { type: JsonSchemaType.String, examples: ['alice@example.com', 'bob@example.com'] }
321
+ *
322
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.10.4
323
+ */
324
+ examples?: Value[];
325
+ /**
326
+ * Conditional sub-schema used together with `then` / `else`. Switches which
327
+ * branch is applied, but is **not** itself a validation constraint — if the
328
+ * value fails `if`, validation does not fail; it only routes to `else`.
329
+ *
330
+ * Without `then` or `else`, `if` is a no-op.
331
+ *
332
+ * @example
333
+ * {
334
+ * if: {properties: {locale: {const: 'ja'}}},
335
+ * then: {required: ['kanjiName']},
336
+ * }
337
+ *
338
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.6.1
339
+ */
340
+ if?: Schema;
341
+ /**
342
+ * Logical NOT: the value must **not** validate against this sub-schema.
343
+ *
344
+ * Common pitfall: `not: {}` disallows every value (the empty schema accepts
345
+ * everything, so its negation accepts nothing).
346
+ *
347
+ * @example
348
+ * { type: JsonSchemaType.String, not: {const: 'forbidden'} }
349
+ *
350
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.7.4
351
+ */
352
+ not?: Schema;
353
+ /**
354
+ * Logical XOR: the value must validate against **exactly one** sub-schema —
355
+ * matching zero or two-or-more fails.
356
+ *
357
+ * Use for discriminated-union semantics where branches are disjoint. If
358
+ * branches overlap, prefer `anyOf` — `oneOf` will reject values that match
359
+ * more than one branch.
360
+ *
361
+ * @example
362
+ * {
363
+ * oneOf: [
364
+ * {type: JsonSchemaType.String, maxLength: 5},
365
+ * {type: JsonSchemaType.String, minLength: 10},
366
+ * ],
367
+ * }
368
+ *
369
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.7.3
370
+ */
371
+ oneOf?: Schema[];
372
+ /**
373
+ * Marks the value as read-only. Per the JSON Schema spec this is an annotation;
374
+ * the SchemaRenderer disables the control for editing but keeps the existing
375
+ * value in the form payload.
376
+ *
377
+ * @example
378
+ * { type: JsonSchemaType.String, readOnly: true }
379
+ *
380
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.10.3
381
+ */
382
+ readOnly?: boolean;
383
+ /**
384
+ * Sub-schema applied when the value satisfies the `if` schema. Has no effect
385
+ * unless paired with `if`.
386
+ *
387
+ * @example
388
+ * {
389
+ * if: {properties: {locale: {const: 'ja'}}},
390
+ * then: {required: ['kanjiName']},
391
+ * }
392
+ *
393
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.6.2
394
+ */
395
+ then?: Schema;
396
+ /**
397
+ * Short human-readable label for the schema. The SchemaRenderer renders it as
398
+ * the control's label; when omitted, the property name is typically used as a
399
+ * fallback.
400
+ *
401
+ * Annotation only — not used for validation.
402
+ *
403
+ * @example
404
+ * { type: JsonSchemaType.String, title: 'First name' }
405
+ *
406
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.10.1
407
+ */
408
+ title?: string;
409
+ /**
410
+ * Marks the value as write-only — meant to be submitted but not echoed back
411
+ * (e.g. passwords). The SchemaRenderer typically hides the value in overview /
412
+ * read mode while still accepting input in form mode.
413
+ *
414
+ * @example
415
+ * { type: JsonSchemaType.String, writeOnly: true }
416
+ *
417
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.10.3
418
+ */
419
+ writeOnly?: boolean;
420
+ }
421
+ /**
422
+ * Schema variant without an explicit `type` keyword. Matches values of any JSON type and accepts every keyword from the typed variants.
423
+ */
424
+ export interface JsonSchemaAny<Config extends SchemaRendererConfig = any> extends JsonSchemaBase<Config, JsonSchema<Config>, FieldValue>, EntityParameters<EntityType.Any, Config[EntityType.Any]> {
425
+ /**
426
+ * Optional declared JSON type(s). When omitted, the schema matches any JSON type
427
+ * and every keyword from the typed variants is accepted (each behaving according
428
+ * to the actual runtime type — see "ignored for non-X values" below).
429
+ *
430
+ * A string array narrows to a union of allowed types. Include `JsonSchemaType.Null`
431
+ * to allow `null` values.
432
+ *
433
+ * @example
434
+ * // Matches any value, but constrains it to one of a few specific values.
435
+ * { enum: ['yes', 1, true] }
436
+ *
437
+ * @example
438
+ * // Union — string or null.
439
+ * { type: [JsonSchemaType.String, JsonSchemaType.Null] }
440
+ *
441
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.1
442
+ */
443
+ type?: JsonSchemaType | JsonSchemaType[];
444
+ /**
445
+ * Schema applied to array items beyond the positional tuple defined by `items`;
446
+ * ignored for non-array values, and ignored entirely when `items` is a single
447
+ * schema (only meaningful when `items` is an array — tuple validation).
448
+ *
449
+ * - `true` (default if omitted): any additional items are allowed.
450
+ * - `false`: array length must not exceed the tuple defined by `items`.
451
+ * - schema: every additional item must validate against it.
452
+ *
453
+ * @example
454
+ * // Tuple of one string; no further items allowed.
455
+ * { items: [{type: JsonSchemaType.String}], additionalItems: false }
456
+ *
457
+ * @example
458
+ * // Tuple of one string; further items must be numbers.
459
+ * { items: [{type: JsonSchemaType.String}], additionalItems: {type: JsonSchemaType.Number} }
460
+ *
461
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.2
462
+ */
463
+ additionalItems?: JsonSchema<Config> | boolean;
464
+ /**
465
+ * Schema applied to object properties not listed in `properties` and not matched
466
+ * by any `patternProperties` key; ignored for non-object values.
467
+ *
468
+ * - `true` (default if omitted): any extra properties are allowed.
469
+ * - `false`: extra properties cause validation to fail.
470
+ * - schema: every extra property's value must validate against it.
471
+ *
472
+ * Interacts with `properties` and `patternProperties` — a property is "additional"
473
+ * only if it matches **neither** set.
474
+ *
475
+ * @example
476
+ * { properties: {name: {type: JsonSchemaType.String}}, additionalProperties: false }
477
+ *
478
+ * @example
479
+ * { properties: {name: {type: JsonSchemaType.String}}, additionalProperties: {type: JsonSchemaType.Number} }
480
+ *
481
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.6
482
+ */
483
+ additionalProperties?: JsonSchema<Config> | boolean;
484
+ /**
485
+ * Sub-schema that **at least one** array item must satisfy; ignored for non-array
486
+ * values. An empty array always fails `contains`.
487
+ *
488
+ * Draft-07 note: per the spec the value must be a schema; the `boolean` form is
489
+ * a Draft-2019-09 addition (`true` accepts any non-empty array, `false` always
490
+ * fails). The current `boolean` typing here is more permissive than Draft-07.
491
+ *
492
+ * @example
493
+ * { contains: {type: JsonSchemaType.Number, minimum: 5} }
494
+ *
495
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.6
496
+ */
497
+ contains?: JsonSchema<Config> | boolean;
498
+ /**
499
+ * Property dependencies on an object value; ignored for non-object values.
500
+ * Each key triggers a constraint only when that property is present in the value.
501
+ *
502
+ * Two forms per entry:
503
+ * - `string[]` — the listed property names must also be present.
504
+ * - schema — the whole object must additionally validate against the given schema.
505
+ *
506
+ * Split into `dependentRequired` and `dependentSchemas` in Draft-2019-09 — the
507
+ * project targets Draft-07, so the combined form is used here.
508
+ *
509
+ * @example
510
+ * // Required-name form.
511
+ * { dependencies: {credit_card: ['billing_address']} }
512
+ *
513
+ * @example
514
+ * // Schema form.
515
+ * { dependencies: {credit_card: {required: ['billing_address']}} }
516
+ *
517
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.7
518
+ */
519
+ dependencies?: {
520
+ [key: string]: string[] | JsonSchema<Config>;
521
+ };
522
+ /**
523
+ * Strict upper bound for numeric values (value must be strictly less than this);
524
+ * ignored for non-numeric values.
525
+ *
526
+ * Draft-07 typing — a `number`. (In Draft-04 this keyword was a `boolean` modifier
527
+ * for `maximum`; that form is not supported here.)
528
+ *
529
+ * @example
530
+ * { exclusiveMaximum: 100 }
531
+ *
532
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.3
533
+ */
534
+ exclusiveMaximum?: number;
535
+ /**
536
+ * Strict lower bound for numeric values (value must be strictly greater than
537
+ * this); ignored for non-numeric values.
538
+ *
539
+ * Draft-07 typing — a `number`. (In Draft-04 this keyword was a `boolean` modifier
540
+ * for `minimum`; that form is not supported here.)
541
+ *
542
+ * @example
543
+ * { exclusiveMinimum: 0 }
544
+ *
545
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.5
546
+ */
547
+ exclusiveMinimum?: number;
548
+ /**
549
+ * Constrains array items; ignored for non-array values. Two forms:
550
+ *
551
+ * - **Single schema** — every array item must validate against it. `additionalItems`
552
+ * is ignored in this form.
553
+ * - **Tuple (array of schemas)** — positional validation: item at index `i` must
554
+ * validate against `items[i]`. Items beyond the tuple are governed by
555
+ * `additionalItems` (default: any are allowed).
556
+ *
557
+ * @example
558
+ * // Single schema — homogeneous array.
559
+ * { items: {type: JsonSchemaType.String} }
560
+ *
561
+ * @example
562
+ * // Tuple — first item string, second item number.
563
+ * { items: [{type: JsonSchemaType.String}, {type: JsonSchemaType.Number}] }
564
+ *
565
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.1
566
+ */
567
+ items?: JsonSchema<Config> | JsonSchema<Config>[];
568
+ /**
569
+ * Inclusive upper bound for numeric values; ignored for non-numeric values.
570
+ *
571
+ * @example
572
+ * { maximum: 100 }
573
+ *
574
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.2
575
+ */
576
+ maximum?: number;
577
+ /**
578
+ * Maximum number of items the array may contain; ignored for non-array values.
579
+ *
580
+ * @example
581
+ * { maxItems: 10 }
582
+ *
583
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.3
584
+ */
585
+ maxItems?: number;
586
+ /**
587
+ * Longest allowed string length; ignored for non-string values.
588
+ *
589
+ * Length is counted in **UTF-16 code units** (matching `String.prototype.length`
590
+ * in JS), not user-perceived characters. Characters outside the BMP — including
591
+ * many emoji — count as 2.
592
+ *
593
+ * @example
594
+ * { maxLength: 100 }
595
+ *
596
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.3.1
597
+ */
598
+ maxLength?: number;
599
+ /**
600
+ * Maximum number of own properties the object may declare; ignored for non-object
601
+ * values.
602
+ *
603
+ * @example
604
+ * { maxProperties: 5 }
605
+ *
606
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.1
607
+ */
608
+ maxProperties?: number;
609
+ /**
610
+ * Inclusive lower bound for numeric values; ignored for non-numeric values.
611
+ *
612
+ * @example
613
+ * { minimum: 0 }
614
+ *
615
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.4
616
+ */
617
+ minimum?: number;
618
+ /**
619
+ * Minimum number of items the array must contain; ignored for non-array values.
620
+ *
621
+ * @example
622
+ * { minItems: 1 }
623
+ *
624
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.4
625
+ */
626
+ minItems?: number;
627
+ /**
628
+ * Shortest allowed string length; ignored for non-string values.
629
+ *
630
+ * Length is counted in **UTF-16 code units** (matching `String.prototype.length`
631
+ * in JS), not user-perceived characters. Characters outside the BMP — including
632
+ * many emoji — count as 2.
633
+ *
634
+ * @example
635
+ * { minLength: 5 }
636
+ *
637
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.3.2
638
+ */
639
+ minLength?: number;
640
+ /**
641
+ * Minimum number of own properties the object must declare; ignored for non-object
642
+ * values.
643
+ *
644
+ * @example
645
+ * { minProperties: 1 }
646
+ *
647
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.2
648
+ */
649
+ minProperties?: number;
650
+ /**
651
+ * Numeric value must be an exact multiple of this number; ignored for non-numeric
652
+ * values. The divisor must be strictly greater than 0.
653
+ *
654
+ * Supports fractional steppers (e.g. `0.25`). Watch for IEEE-754 representation:
655
+ * `0.1 + 0.2 !== 0.3`. AJV uses an epsilon-tolerant comparison, but constructing
656
+ * the value via repeated addition in JS may still produce an unexpected mismatch.
657
+ *
658
+ * @example
659
+ * { multipleOf: 0.25 }
660
+ *
661
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.1
662
+ */
663
+ multipleOf?: number;
664
+ /**
665
+ * ECMA-262 regular expression the string value must match; ignored for non-string
666
+ * values.
667
+ *
668
+ * **No implicit anchors** — the pattern matches if it can be found anywhere in
669
+ * the string. To require a full match, anchor explicitly with `^` and `$`.
670
+ * Common pitfall: `'[0-9]'` means "contains a digit", not "consists of digits".
671
+ *
672
+ * @example
673
+ * // Matches any string that contains at least one digit.
674
+ * { pattern: '[0-9]' }
675
+ *
676
+ * @example
677
+ * // Matches a capitalised word from start to end.
678
+ * { pattern: '^[A-Z][a-z]+$' }
679
+ *
680
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.3.3
681
+ */
682
+ pattern?: string;
683
+ /**
684
+ * Map of regular-expression keys to schemas; ignored for non-object values.
685
+ * Each property whose name matches a key must validate against the corresponding
686
+ * schema.
687
+ *
688
+ * A property name may match **several** patterns at once — in that case it must
689
+ * validate against **all** matching schemas (allOf-like semantics).
690
+ *
691
+ * Interacts with `properties` (an explicit match wins for that name) and
692
+ * `additionalProperties` (a property is "additional" only if it matches no
693
+ * `properties` key **and** no `patternProperties` key).
694
+ *
695
+ * @example
696
+ * { patternProperties: {'^x-': {type: JsonSchemaType.String}} }
697
+ *
698
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.5
699
+ */
700
+ patternProperties?: {
701
+ [key: string]: JsonSchema<Config>;
702
+ };
703
+ /**
704
+ * Map of property name to schema. Each listed property's value must validate
705
+ * against the corresponding schema; ignored for non-object values.
706
+ *
707
+ * Declaring a property here does **not** make it required — pair with `required`.
708
+ * Properties not listed here are governed by `patternProperties` /
709
+ * `additionalProperties`.
710
+ *
711
+ * @example
712
+ * { properties: {name: {type: JsonSchemaType.String}} }
713
+ *
714
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.4
715
+ */
716
+ properties?: {
717
+ [key: string]: JsonSchema<Config>;
718
+ };
719
+ /**
720
+ * Schema each property **name** must satisfy; ignored for non-object values.
721
+ * Object keys are always strings, so this is typed as `JsonSchemaString`.
722
+ *
723
+ * Validates names only — property values are unaffected.
724
+ *
725
+ * @example
726
+ * { propertyNames: {pattern: '^[a-z][a-zA-Z0-9]*$'} }
727
+ *
728
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.8
729
+ */
730
+ propertyNames?: JsonSchemaString<Config>;
731
+ /**
732
+ * Names of properties that must be present on the object value; ignored for
733
+ * non-object values.
734
+ *
735
+ * A name may appear in `required` even if it is not declared in `properties` —
736
+ * then the property must be present but has no schema applied.
737
+ *
738
+ * @example
739
+ * {
740
+ * properties: {name: {type: JsonSchemaType.String}},
741
+ * required: ['name'],
742
+ * }
743
+ *
744
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.3
745
+ */
746
+ required?: string[];
747
+ /**
748
+ * When `true`, every array item must be unique; ignored for non-array values.
749
+ *
750
+ * Uniqueness is by deep structural equality (so `{a: 1}` and `{a: 1}` are equal).
751
+ * On large arrays this is O(n²) — be mindful when constraining big lists.
752
+ *
753
+ * @example
754
+ * { uniqueItems: true }
755
+ *
756
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.5
757
+ */
758
+ uniqueItems?: boolean;
759
+ }
760
+ /**
761
+ * Schema for array values (`type: JsonSchemaType.Array`).
762
+ */
763
+ export interface JsonSchemaArray<Config extends SchemaRendererConfig = any> extends JsonSchemaBase<Config, JsonSchemaArray<Config>, ArrayValue>, EntityParameters<EntityType.Array, Config[EntityType.Array]> {
764
+ /**
765
+ * Declares this schema as describing an array value (or `null`, or a union of
766
+ * the two for nullable arrays).
767
+ *
768
+ * @example
769
+ * { type: JsonSchemaType.Array, items: {type: JsonSchemaType.String} }
770
+ *
771
+ * @example
772
+ * // Nullable array.
773
+ * { type: [JsonSchemaType.Array, JsonSchemaType.Null] }
774
+ *
775
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.1
776
+ */
777
+ type?: JsonSchemaType.Array | JsonSchemaType.Null | (JsonSchemaType.Array | JsonSchemaType.Null)[];
778
+ /**
779
+ * Schema applied to array items beyond the positional tuple defined by `items`.
780
+ * Only meaningful when `items` is an array (tuple); ignored when `items` is a
781
+ * single schema.
782
+ *
783
+ * - `true` (default if omitted): any additional items are allowed.
784
+ * - `false`: array length must not exceed the tuple defined by `items`.
785
+ * - schema: every additional item must validate against it.
786
+ *
787
+ * @example
788
+ * { items: [{type: JsonSchemaType.String}], additionalItems: false }
789
+ *
790
+ * @example
791
+ * { items: [{type: JsonSchemaType.String}], additionalItems: {type: JsonSchemaType.Number} }
792
+ *
793
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.2
794
+ */
795
+ additionalItems?: JsonSchema<Config> | boolean;
796
+ /**
797
+ * Sub-schema that **at least one** array item must satisfy. An empty array
798
+ * always fails `contains`.
799
+ *
800
+ * Draft-07 note: per the spec the value must be a schema; the `boolean` form is
801
+ * a Draft-2019-09 addition. The current `boolean` typing here is more permissive
802
+ * than Draft-07.
803
+ *
804
+ * @example
805
+ * { contains: {type: JsonSchemaType.Number, minimum: 5} }
806
+ *
807
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.6
808
+ */
809
+ contains?: JsonSchema<Config> | boolean;
810
+ /**
811
+ * Constrains array items. Two forms:
812
+ *
813
+ * - **Single schema** — every array item must validate against it. `additionalItems`
814
+ * is ignored in this form.
815
+ * - **Tuple (array of schemas)** — positional validation: item at index `i` must
816
+ * validate against `items[i]`. Items beyond the tuple are governed by
817
+ * `additionalItems`.
818
+ *
819
+ * @example
820
+ * { items: {type: JsonSchemaType.String} }
821
+ *
822
+ * @example
823
+ * { items: [{type: JsonSchemaType.String}, {type: JsonSchemaType.Number}] }
824
+ *
825
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.1
826
+ */
827
+ items?: JsonSchema<Config> | JsonSchema<Config>[];
828
+ /**
829
+ * Maximum number of items the array may contain.
830
+ *
831
+ * @example
832
+ * { maxItems: 10 }
833
+ *
834
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.3
835
+ */
836
+ maxItems?: number;
837
+ /**
838
+ * Minimum number of items the array must contain.
839
+ *
840
+ * @example
841
+ * { minItems: 1 }
842
+ *
843
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.4
844
+ */
845
+ minItems?: number;
846
+ /**
847
+ * When `true`, every array item must be unique.
848
+ *
849
+ * Uniqueness is by deep structural equality. On large arrays this is O(n²) —
850
+ * be mindful when constraining big lists.
851
+ *
852
+ * @example
853
+ * { uniqueItems: true }
854
+ *
855
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.5
856
+ */
857
+ uniqueItems?: boolean;
858
+ }
859
+ /**
860
+ * Schema for boolean values (`type: JsonSchemaType.Boolean`).
861
+ */
862
+ export interface JsonSchemaBoolean<Config extends SchemaRendererConfig = any> extends JsonSchemaBase<Config, JsonSchemaBoolean<Config>, boolean>, EntityParameters<EntityType.Boolean, Config[EntityType.Boolean]> {
863
+ /**
864
+ * Declares this schema as describing a boolean value (or `null`, or a union of
865
+ * the two for nullable booleans).
866
+ *
867
+ * @example
868
+ * { type: JsonSchemaType.Boolean, default: false }
869
+ *
870
+ * @example
871
+ * // Nullable boolean.
872
+ * { type: [JsonSchemaType.Boolean, JsonSchemaType.Null] }
873
+ *
874
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.1
875
+ */
876
+ type?: JsonSchemaType.Boolean | JsonSchemaType.Null | (JsonSchemaType.Boolean | JsonSchemaType.Null)[];
877
+ }
878
+ /**
879
+ * Schema for numeric values (`type: JsonSchemaType.Number`).
880
+ */
881
+ export interface JsonSchemaNumber<Config extends SchemaRendererConfig = any> extends JsonSchemaBase<Config, JsonSchemaNumber<Config>, number>, EntityParameters<EntityType.Number, Config[EntityType.Number]> {
882
+ /**
883
+ * Declares this schema as describing a numeric value.
884
+ *
885
+ * - `Number` — any JSON number (integer or decimal).
886
+ * - `Integer` — numbers with no fractional part (equivalent to combining `Number`
887
+ * with `multipleOf: 1`).
888
+ * - `Null` — allows `null`; combine in an array for nullable numbers.
889
+ *
890
+ * @example
891
+ * { type: JsonSchemaType.Number, minimum: 0, maximum: 100 }
892
+ *
893
+ * @example
894
+ * // Integer-only, nullable.
895
+ * { type: [JsonSchemaType.Integer, JsonSchemaType.Null] }
896
+ *
897
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.1
898
+ */
899
+ type?: JsonSchemaType.Number | JsonSchemaType.Integer | JsonSchemaType.Null | (JsonSchemaType.Number | JsonSchemaType.Integer | JsonSchemaType.Null)[];
900
+ /**
901
+ * Strict upper bound (value must be strictly less than this).
902
+ *
903
+ * Draft-07 typing — a `number`. (In Draft-04 this keyword was a `boolean` modifier
904
+ * for `maximum`; that form is not supported here.)
905
+ *
906
+ * @example
907
+ * { type: JsonSchemaType.Number, exclusiveMaximum: 100 }
908
+ *
909
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.3
910
+ */
911
+ exclusiveMaximum?: number;
912
+ /**
913
+ * Strict lower bound (value must be strictly greater than this).
914
+ *
915
+ * Draft-07 typing — a `number`. (In Draft-04 this keyword was a `boolean` modifier
916
+ * for `minimum`; that form is not supported here.)
917
+ *
918
+ * @example
919
+ * { type: JsonSchemaType.Number, exclusiveMinimum: 0 }
920
+ *
921
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.5
922
+ */
923
+ exclusiveMinimum?: number;
924
+ /**
925
+ * Inclusive upper bound.
926
+ *
927
+ * @example
928
+ * { type: JsonSchemaType.Number, maximum: 100 }
929
+ *
930
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.2
931
+ */
932
+ maximum?: number;
933
+ /**
934
+ * Inclusive lower bound.
935
+ *
936
+ * @example
937
+ * { type: JsonSchemaType.Number, minimum: 0 }
938
+ *
939
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.4
940
+ */
941
+ minimum?: number;
942
+ /**
943
+ * Value must be an exact multiple of this number. The divisor must be strictly
944
+ * greater than 0.
945
+ *
946
+ * Supports fractional steppers (e.g. `0.25`). Watch for IEEE-754 representation:
947
+ * `0.1 + 0.2 !== 0.3`. AJV uses an epsilon-tolerant comparison, but constructing
948
+ * the value via repeated addition in JS may still produce an unexpected mismatch.
949
+ *
950
+ * @example
951
+ * { type: JsonSchemaType.Number, multipleOf: 0.5 }
952
+ *
953
+ * @example
954
+ * { type: JsonSchemaType.Number, multipleOf: 10 }
955
+ *
956
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.1
957
+ */
958
+ multipleOf?: number;
959
+ }
960
+ /**
961
+ * Schema for object values (`type: JsonSchemaType.Object`).
962
+ */
963
+ export interface JsonSchemaObject<Config extends SchemaRendererConfig = any> extends JsonSchemaBase<Config, JsonSchemaObject<Config>, ObjectValue>, EntityParameters<EntityType.Object, Config[EntityType.Object]> {
964
+ /**
965
+ * Declares this schema as describing an object value (or `null`, or a union of
966
+ * the two for nullable objects).
967
+ *
968
+ * @example
969
+ * { type: JsonSchemaType.Object, properties: {name: {type: JsonSchemaType.String}} }
970
+ *
971
+ * @example
972
+ * // Nullable object.
973
+ * { type: [JsonSchemaType.Object, JsonSchemaType.Null] }
974
+ *
975
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.1
976
+ */
977
+ type?: JsonSchemaType.Object | JsonSchemaType.Null | (JsonSchemaType.Object | JsonSchemaType.Null)[];
978
+ /**
979
+ * Schema applied to properties not listed in `properties` and not matched by any
980
+ * `patternProperties` key.
981
+ *
982
+ * - `true` (default if omitted): any extra properties are allowed.
983
+ * - `false`: extra properties cause validation to fail.
984
+ * - schema: every extra property's value must validate against it.
985
+ *
986
+ * A property is "additional" only if it matches **neither** `properties` nor
987
+ * `patternProperties`.
988
+ *
989
+ * @example
990
+ * {
991
+ * properties: {name: {type: JsonSchemaType.String}},
992
+ * additionalProperties: false,
993
+ * }
994
+ *
995
+ * @example
996
+ * {
997
+ * properties: {name: {type: JsonSchemaType.String}},
998
+ * additionalProperties: {type: JsonSchemaType.Number},
999
+ * }
1000
+ *
1001
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.6
1002
+ */
1003
+ additionalProperties?: JsonSchema<Config> | boolean;
1004
+ /**
1005
+ * Property dependencies. Each key triggers a constraint only when that property
1006
+ * is present in the value.
1007
+ *
1008
+ * Two forms per entry:
1009
+ * - `string[]` — the listed property names must also be present.
1010
+ * - schema (an object schema) — the whole object must additionally validate
1011
+ * against the given schema.
1012
+ *
1013
+ * Split into `dependentRequired` and `dependentSchemas` in Draft-2019-09 — the
1014
+ * project targets Draft-07, so the combined form is used here.
1015
+ *
1016
+ * @example
1017
+ * { dependencies: {credit_card: ['billing_address']} }
1018
+ *
1019
+ * @example
1020
+ * { dependencies: {credit_card: {required: ['billing_address']}} }
1021
+ *
1022
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.7
1023
+ */
1024
+ dependencies?: {
1025
+ [key: string]: string[] | JsonSchemaObject<Config>;
1026
+ };
1027
+ /**
1028
+ * Maximum number of own properties the object may declare.
1029
+ *
1030
+ * @example
1031
+ * { type: JsonSchemaType.Object, maxProperties: 5 }
1032
+ *
1033
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.1
1034
+ */
1035
+ maxProperties?: number;
1036
+ /**
1037
+ * Minimum number of own properties the object must declare.
1038
+ *
1039
+ * @example
1040
+ * { type: JsonSchemaType.Object, minProperties: 1 }
1041
+ *
1042
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.2
1043
+ */
1044
+ minProperties?: number;
1045
+ /**
1046
+ * Map of regular-expression keys to schemas. Each property whose name matches a
1047
+ * key must validate against the corresponding schema.
1048
+ *
1049
+ * A property name may match several patterns at once — in that case it must
1050
+ * validate against **all** matching schemas (allOf-like semantics).
1051
+ *
1052
+ * Interacts with `properties` (an explicit match wins for that name) and
1053
+ * `additionalProperties` (a property is "additional" only if it matches no
1054
+ * `properties` key **and** no `patternProperties` key).
1055
+ *
1056
+ * @example
1057
+ * { patternProperties: {'^x-': {type: JsonSchemaType.String}} }
1058
+ *
1059
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.5
1060
+ */
1061
+ patternProperties?: {
1062
+ [key: string]: JsonSchema<Config>;
1063
+ };
1064
+ /**
1065
+ * Map of property name to schema. Each listed property's value must validate
1066
+ * against the corresponding schema.
1067
+ *
1068
+ * Declaring a property here does **not** make it required — pair with `required`.
1069
+ * Properties not listed here are governed by `patternProperties` /
1070
+ * `additionalProperties`.
1071
+ *
1072
+ * @example
1073
+ * {
1074
+ * properties: {
1075
+ * name: {type: JsonSchemaType.String},
1076
+ * age: {type: JsonSchemaType.Number},
1077
+ * },
1078
+ * }
1079
+ *
1080
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.4
1081
+ */
1082
+ properties?: {
1083
+ [key: string]: JsonSchema<Config>;
1084
+ };
1085
+ /**
1086
+ * Schema each property **name** must satisfy. Object keys are always strings, so
1087
+ * in practice this should be a string schema constraining length or pattern.
1088
+ *
1089
+ * Validates names only — property values are unaffected.
1090
+ *
1091
+ * @example
1092
+ * { propertyNames: {type: JsonSchemaType.String, pattern: '^[a-z][a-zA-Z0-9]*$'} }
1093
+ *
1094
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.8
1095
+ */
1096
+ propertyNames?: JsonSchema<Config>;
1097
+ /**
1098
+ * Names of properties that must be present on the object value.
1099
+ *
1100
+ * A name may appear in `required` even if it is not declared in `properties` —
1101
+ * then the property must be present but has no schema applied.
1102
+ *
1103
+ * @example
1104
+ * {
1105
+ * properties: {name: {type: JsonSchemaType.String}},
1106
+ * required: ['name'],
1107
+ * }
1108
+ *
1109
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.5.3
1110
+ */
1111
+ required?: string[];
1112
+ }
1113
+ /**
1114
+ * Schema for string values (`type: JsonSchemaType.String`).
1115
+ */
1116
+ export interface JsonSchemaString<Config extends SchemaRendererConfig = any> extends JsonSchemaBase<Config, JsonSchemaString<Config>, string>, EntityParameters<EntityType.String, Config[EntityType.String]> {
1117
+ /**
1118
+ * Declares this schema as describing a string value (or `null`, or a union of
1119
+ * the two for nullable strings).
1120
+ *
1121
+ * @example
1122
+ * { type: JsonSchemaType.String, minLength: 1 }
1123
+ *
1124
+ * @example
1125
+ * // Nullable string.
1126
+ * { type: [JsonSchemaType.String, JsonSchemaType.Null] }
1127
+ *
1128
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.1
1129
+ */
1130
+ type?: JsonSchemaType.String | JsonSchemaType.Null | (JsonSchemaType.String | JsonSchemaType.Null)[];
1131
+ /**
1132
+ * Longest allowed string length.
1133
+ *
1134
+ * Length is counted in **UTF-16 code units** (matching `String.prototype.length`
1135
+ * in JS), not user-perceived characters. Characters outside the BMP — including
1136
+ * many emoji — count as 2.
1137
+ *
1138
+ * @example
1139
+ * { type: JsonSchemaType.String, maxLength: 100 }
1140
+ *
1141
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.3.1
1142
+ */
1143
+ maxLength?: number;
1144
+ /**
1145
+ * Shortest allowed string length.
1146
+ *
1147
+ * Length is counted in **UTF-16 code units** (matching `String.prototype.length`
1148
+ * in JS), not user-perceived characters. Characters outside the BMP — including
1149
+ * many emoji — count as 2.
1150
+ *
1151
+ * @example
1152
+ * { type: JsonSchemaType.String, minLength: 5 }
1153
+ *
1154
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.3.2
1155
+ */
1156
+ minLength?: number;
1157
+ /**
1158
+ * ECMA-262 regular expression the string value must match.
1159
+ *
1160
+ * **No implicit anchors** — the pattern matches if it can be found anywhere in
1161
+ * the string. To require a full match, anchor explicitly with `^` and `$`.
1162
+ * Common pitfall: `'[0-9]'` means "contains a digit", not "consists of digits".
1163
+ *
1164
+ * @example
1165
+ * // Contains at least one digit.
1166
+ * { type: JsonSchemaType.String, pattern: '[0-9]' }
1167
+ *
1168
+ * @example
1169
+ * // Capitalised word from start to end.
1170
+ * { type: JsonSchemaType.String, pattern: '^[A-Z][a-z]+$' }
1171
+ *
1172
+ * @see https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.3.3
1173
+ */
1174
+ pattern?: string;
1175
+ }
1176
+ /**
1177
+ * Discriminated union of every supported JSON Schema variant. Narrow with the `type` keyword to access type-specific fields.
1178
+ *
1179
+ * @example
1180
+ * const schema: JsonSchema = { type: JsonSchemaType.String, minLength: 1 };
1181
+ *
1182
+ * @example
1183
+ * const schema: JsonSchema = { type: JsonSchemaType.Object, properties: { id: { type: JsonSchemaType.Number } } };
1184
+ */
1185
+ export type JsonSchema<Config extends SchemaRendererConfig = any> = JsonSchemaAny<Config> | JsonSchemaArray<Config> | JsonSchemaBoolean<Config> | JsonSchemaNumber<Config> | JsonSchemaObject<Config> | JsonSchemaString<Config>;
1186
+ export {};