@bettercms-ai/kit 0.1.1 → 2.0.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 (1100) hide show
  1. package/README.md +22 -16
  2. package/dist/_virtual/_rolldown/runtime.js +13 -0
  3. package/dist/adapters/dock-values.d.ts +28 -0
  4. package/dist/adapters/dock-values.js +41 -0
  5. package/dist/adapters/dock-values.js.map +1 -0
  6. package/dist/adapters/icons.d.ts +15 -0
  7. package/dist/adapters/icons.js +27 -0
  8. package/dist/adapters/icons.js.map +1 -0
  9. package/dist/adapters/lossy.d.ts +326 -0
  10. package/dist/adapters/lossy.js +414 -0
  11. package/dist/adapters/lossy.js.map +1 -0
  12. package/dist/adapters/prod-types.d.ts +546 -0
  13. package/dist/adapters/prod-types.js +714 -0
  14. package/dist/adapters/prod-types.js.map +1 -0
  15. package/dist/adapters/schema.d.ts +154 -0
  16. package/dist/adapters/schema.js +3020 -0
  17. package/dist/adapters/schema.js.map +1 -0
  18. package/dist/adapters/values.d.ts +221 -0
  19. package/dist/adapters/values.js +623 -0
  20. package/dist/adapters/values.js.map +1 -0
  21. package/dist/brand/logo.d.ts +17 -0
  22. package/dist/brand/logo.js +96 -0
  23. package/dist/brand/logo.js.map +1 -0
  24. package/dist/context.d.ts +359 -0
  25. package/dist/context.js +217 -0
  26. package/dist/context.js.map +1 -0
  27. package/dist/controls/button.d.ts +72 -0
  28. package/dist/controls/button.js +578 -0
  29. package/dist/controls/button.js.map +1 -0
  30. package/dist/controls/c1.d.ts +11 -0
  31. package/dist/controls/c1.js +24 -0
  32. package/dist/controls/c1.js.map +1 -0
  33. package/dist/controls/c2.d.ts +10 -0
  34. package/dist/controls/c2.js +19 -0
  35. package/dist/controls/c2.js.map +1 -0
  36. package/dist/controls/choice.d.ts +44 -0
  37. package/dist/controls/choice.js +463 -0
  38. package/dist/controls/choice.js.map +1 -0
  39. package/dist/controls/code-register.d.ts +1 -0
  40. package/dist/controls/code-register.js +8 -0
  41. package/dist/controls/code-register.js.map +1 -0
  42. package/dist/controls/code.d.ts +42 -0
  43. package/dist/controls/code.js +397 -0
  44. package/dist/controls/code.js.map +1 -0
  45. package/dist/controls/color.d.ts +5 -0
  46. package/dist/controls/color.js +130 -0
  47. package/dist/controls/color.js.map +1 -0
  48. package/dist/controls/component-services.d.ts +156 -0
  49. package/dist/controls/component-services.js +7 -0
  50. package/dist/controls/component-services.js.map +1 -0
  51. package/dist/controls/date-register.d.ts +1 -0
  52. package/dist/controls/date-register.js +9 -0
  53. package/dist/controls/date-register.js.map +1 -0
  54. package/dist/controls/date-zone.d.ts +104 -0
  55. package/dist/controls/date-zone.js +278 -0
  56. package/dist/controls/date-zone.js.map +1 -0
  57. package/dist/controls/date.d.ts +7 -0
  58. package/dist/controls/date.js +466 -0
  59. package/dist/controls/date.js.map +1 -0
  60. package/dist/controls/form-picker-register.d.ts +1 -0
  61. package/dist/controls/form-picker-register.js +19 -0
  62. package/dist/controls/form-picker-register.js.map +1 -0
  63. package/dist/controls/form-picker.d.ts +43 -0
  64. package/dist/controls/form-picker.js +85 -0
  65. package/dist/controls/form-picker.js.map +1 -0
  66. package/dist/controls/icon-register.d.ts +1 -0
  67. package/dist/controls/icon-register.js +8 -0
  68. package/dist/controls/icon-register.js.map +1 -0
  69. package/dist/controls/icon.d.ts +40 -0
  70. package/dist/controls/icon.js +360 -0
  71. package/dist/controls/icon.js.map +1 -0
  72. package/dist/controls/index.d.ts +5 -0
  73. package/dist/controls/index.js +38 -0
  74. package/dist/controls/index.js.map +1 -0
  75. package/dist/controls/json-register.d.ts +1 -0
  76. package/dist/controls/json-register.js +8 -0
  77. package/dist/controls/json-register.js.map +1 -0
  78. package/dist/controls/json.d.ts +2 -0
  79. package/dist/controls/json.js +82 -0
  80. package/dist/controls/json.js.map +1 -0
  81. package/dist/controls/link.d.ts +260 -0
  82. package/dist/controls/link.js +1186 -0
  83. package/dist/controls/link.js.map +1 -0
  84. package/dist/controls/location-register.d.ts +1 -0
  85. package/dist/controls/location-register.js +8 -0
  86. package/dist/controls/location-register.js.map +1 -0
  87. package/dist/controls/location.d.ts +16 -0
  88. package/dist/controls/location.js +221 -0
  89. package/dist/controls/location.js.map +1 -0
  90. package/dist/controls/media-register.d.ts +1 -0
  91. package/dist/controls/media-register.js +12 -0
  92. package/dist/controls/media-register.js.map +1 -0
  93. package/dist/controls/media-services.d.ts +46 -0
  94. package/dist/controls/media-services.js +0 -0
  95. package/dist/controls/media.d.ts +104 -0
  96. package/dist/controls/media.js +1396 -0
  97. package/dist/controls/media.js.map +1 -0
  98. package/dist/controls/number.d.ts +22 -0
  99. package/dist/controls/number.js +196 -0
  100. package/dist/controls/number.js.map +1 -0
  101. package/dist/controls/reference-register.d.ts +1 -0
  102. package/dist/controls/reference-register.js +10 -0
  103. package/dist/controls/reference-register.js.map +1 -0
  104. package/dist/controls/reference-services.d.ts +58 -0
  105. package/dist/controls/reference-services.js +0 -0
  106. package/dist/controls/reference.d.ts +23 -0
  107. package/dist/controls/reference.js +777 -0
  108. package/dist/controls/reference.js.map +1 -0
  109. package/dist/controls/rich-text/blocks.d.ts +49 -0
  110. package/dist/controls/rich-text/blocks.js +1859 -0
  111. package/dist/controls/rich-text/blocks.js.map +1 -0
  112. package/dist/controls/rich-text/catalog.d.ts +101 -0
  113. package/dist/controls/rich-text/catalog.js +623 -0
  114. package/dist/controls/rich-text/catalog.js.map +1 -0
  115. package/dist/controls/rich-text/codec.d.ts +64 -0
  116. package/dist/controls/rich-text/codec.js +34 -0
  117. package/dist/controls/rich-text/codec.js.map +1 -0
  118. package/dist/controls/rich-text/component-card.d.ts +14 -0
  119. package/dist/controls/rich-text/component-card.js +1024 -0
  120. package/dist/controls/rich-text/component-card.js.map +1 -0
  121. package/dist/controls/rich-text/component-panel.d.ts +47 -0
  122. package/dist/controls/rich-text/component-panel.js +141 -0
  123. package/dist/controls/rich-text/component-panel.js.map +1 -0
  124. package/dist/controls/rich-text/control.d.ts +20 -0
  125. package/dist/controls/rich-text/control.js +296 -0
  126. package/dist/controls/rich-text/control.js.map +1 -0
  127. package/dist/controls/rich-text/dom.d.ts +233 -0
  128. package/dist/controls/rich-text/dom.js +1019 -0
  129. package/dist/controls/rich-text/dom.js.map +1 -0
  130. package/dist/controls/rich-text/editor.d.ts +57 -0
  131. package/dist/controls/rich-text/editor.js +1630 -0
  132. package/dist/controls/rich-text/editor.js.map +1 -0
  133. package/dist/controls/rich-text/floating.d.ts +28 -0
  134. package/dist/controls/rich-text/floating.js +154 -0
  135. package/dist/controls/rich-text/floating.js.map +1 -0
  136. package/dist/controls/rich-text/index.d.ts +1 -0
  137. package/dist/controls/rich-text/index.js +12 -0
  138. package/dist/controls/rich-text/index.js.map +1 -0
  139. package/dist/controls/rich-text/link-form.d.ts +13 -0
  140. package/dist/controls/rich-text/link-form.js +147 -0
  141. package/dist/controls/rich-text/link-form.js.map +1 -0
  142. package/dist/controls/rich-text/markdown.d.ts +6 -0
  143. package/dist/controls/rich-text/markdown.js +181 -0
  144. package/dist/controls/rich-text/markdown.js.map +1 -0
  145. package/dist/controls/rich-text/ops.d.ts +35 -0
  146. package/dist/controls/rich-text/ops.js +316 -0
  147. package/dist/controls/rich-text/ops.js.map +1 -0
  148. package/dist/controls/rich-text/plain.d.ts +17 -0
  149. package/dist/controls/rich-text/plain.js +44 -0
  150. package/dist/controls/rich-text/plain.js.map +1 -0
  151. package/dist/controls/rich-text/toolbar.d.ts +89 -0
  152. package/dist/controls/rich-text/toolbar.js +343 -0
  153. package/dist/controls/rich-text/toolbar.js.map +1 -0
  154. package/dist/controls/scale.d.ts +56 -0
  155. package/dist/controls/scale.js +563 -0
  156. package/dist/controls/scale.js.map +1 -0
  157. package/dist/controls/slot-register.d.ts +1 -0
  158. package/dist/controls/slot-register.js +16 -0
  159. package/dist/controls/slot-register.js.map +1 -0
  160. package/dist/controls/slot-services.d.ts +122 -0
  161. package/dist/controls/slot-services.js +155 -0
  162. package/dist/controls/slot-services.js.map +1 -0
  163. package/dist/controls/slot.d.ts +33 -0
  164. package/dist/controls/slot.js +366 -0
  165. package/dist/controls/slot.js.map +1 -0
  166. package/dist/controls/table/index.d.ts +1 -0
  167. package/dist/controls/table/index.js +12 -0
  168. package/dist/controls/table/index.js.map +1 -0
  169. package/dist/controls/table/prod.d.ts +21 -0
  170. package/dist/controls/table/prod.js +79 -0
  171. package/dist/controls/table/prod.js.map +1 -0
  172. package/dist/controls/table/refs.d.ts +50 -0
  173. package/dist/controls/table/refs.js +79 -0
  174. package/dist/controls/table/refs.js.map +1 -0
  175. package/dist/controls/table/stored.d.ts +15 -0
  176. package/dist/controls/table/stored.js +44 -0
  177. package/dist/controls/table/stored.js.map +1 -0
  178. package/dist/controls/table/table-editor.d.ts +103 -0
  179. package/dist/controls/table/table-editor.js +2725 -0
  180. package/dist/controls/table/table-editor.js.map +1 -0
  181. package/dist/controls/table/table-link.d.ts +24 -0
  182. package/dist/controls/table/table-link.js +180 -0
  183. package/dist/controls/table/table-link.js.map +1 -0
  184. package/dist/controls/table/table.d.ts +9 -0
  185. package/dist/controls/table/table.js +103 -0
  186. package/dist/controls/table/table.js.map +1 -0
  187. package/dist/controls/text.d.ts +17 -0
  188. package/dist/controls/text.js +322 -0
  189. package/dist/controls/text.js.map +1 -0
  190. package/dist/controls/unknown-value.d.ts +17 -0
  191. package/dist/controls/unknown-value.js +66 -0
  192. package/dist/controls/unknown-value.js.map +1 -0
  193. package/dist/core/core.d.ts +63 -0
  194. package/dist/core/core.js +171 -0
  195. package/dist/core/core.js.map +1 -0
  196. package/dist/core/facets.d.ts +347 -0
  197. package/dist/core/facets.js +334 -0
  198. package/dist/core/facets.js.map +1 -0
  199. package/dist/core/index.d.ts +3 -0
  200. package/dist/core/index.js +3 -0
  201. package/dist/engine/array.d.ts +101 -0
  202. package/dist/engine/array.js +906 -0
  203. package/dist/engine/array.js.map +1 -0
  204. package/dist/engine/bits.d.ts +24 -0
  205. package/dist/engine/bits.js +60 -0
  206. package/dist/engine/bits.js.map +1 -0
  207. package/dist/engine/breadcrumb.d.ts +45 -0
  208. package/dist/engine/breadcrumb.js +63 -0
  209. package/dist/engine/breadcrumb.js.map +1 -0
  210. package/dist/engine/expand.d.ts +66 -0
  211. package/dist/engine/expand.js +153 -0
  212. package/dist/engine/expand.js.map +1 -0
  213. package/dist/engine/field-list.d.ts +20 -0
  214. package/dist/engine/field-list.js +19 -0
  215. package/dist/engine/field-list.js.map +1 -0
  216. package/dist/engine/field-shell.d.ts +49 -0
  217. package/dist/engine/field-shell.js +988 -0
  218. package/dist/engine/field-shell.js.map +1 -0
  219. package/dist/engine/frame.d.ts +122 -0
  220. package/dist/engine/frame.js +601 -0
  221. package/dist/engine/frame.js.map +1 -0
  222. package/dist/engine/group-summary.d.ts +5 -0
  223. package/dist/engine/group-summary.js +70 -0
  224. package/dist/engine/group-summary.js.map +1 -0
  225. package/dist/engine/grouping.d.ts +238 -0
  226. package/dist/engine/grouping.js +996 -0
  227. package/dist/engine/grouping.js.map +1 -0
  228. package/dist/engine/item-list.d.ts +99 -0
  229. package/dist/engine/item-list.js +725 -0
  230. package/dist/engine/item-list.js.map +1 -0
  231. package/dist/engine/kit-field.d.ts +72 -0
  232. package/dist/engine/kit-field.js +558 -0
  233. package/dist/engine/kit-field.js.map +1 -0
  234. package/dist/engine/schema-form.d.ts +116 -0
  235. package/dist/engine/schema-form.js +462 -0
  236. package/dist/engine/schema-form.js.map +1 -0
  237. package/dist/engine/slot.d.ts +13 -0
  238. package/dist/engine/slot.js +216 -0
  239. package/dist/engine/slot.js.map +1 -0
  240. package/dist/index.d.ts +45 -3139
  241. package/dist/index.js +47 -2036
  242. package/dist/index.js.map +1 -0
  243. package/dist/kit.css +75 -0
  244. package/dist/lib/cn.d.ts +4 -0
  245. package/dist/lib/cn.js +56 -0
  246. package/dist/lib/cn.js.map +1 -0
  247. package/dist/lib/columns.d.ts +14 -0
  248. package/dist/lib/columns.js +30 -0
  249. package/dist/lib/columns.js.map +1 -0
  250. package/dist/lib/frames.d.ts +36 -0
  251. package/dist/lib/frames.js +214 -0
  252. package/dist/lib/frames.js.map +1 -0
  253. package/dist/lib/icon-image.d.ts +10 -0
  254. package/dist/lib/icon-image.js +8 -0
  255. package/dist/lib/icon-image.js.map +1 -0
  256. package/dist/lib/icons.d.ts +16 -0
  257. package/dist/lib/icons.js +173 -0
  258. package/dist/lib/icons.js.map +1 -0
  259. package/dist/lib/input-modality.d.ts +11 -0
  260. package/dist/lib/input-modality.js +47 -0
  261. package/dist/lib/input-modality.js.map +1 -0
  262. package/dist/lib/key-event.d.ts +11 -0
  263. package/dist/lib/key-event.js +16 -0
  264. package/dist/lib/key-event.js.map +1 -0
  265. package/dist/lib/path.d.ts +29 -0
  266. package/dist/lib/path.js +66 -0
  267. package/dist/lib/path.js.map +1 -0
  268. package/dist/lib/schema.d.ts +80 -0
  269. package/dist/lib/schema.js +384 -0
  270. package/dist/lib/schema.js.map +1 -0
  271. package/dist/lib/utils.d.ts +7 -0
  272. package/dist/lib/utils.js +37 -0
  273. package/dist/lib/utils.js.map +1 -0
  274. package/dist/lib/validate.d.ts +30 -0
  275. package/dist/lib/validate.js +224 -0
  276. package/dist/lib/validate.js.map +1 -0
  277. package/dist/library/analysis.d.ts +23 -0
  278. package/dist/library/analysis.js +160 -0
  279. package/dist/library/analysis.js.map +1 -0
  280. package/dist/library/catalog.d.ts +57 -0
  281. package/dist/library/catalog.js +307 -0
  282. package/dist/library/catalog.js.map +1 -0
  283. package/dist/library/coreNotes.d.ts +8 -0
  284. package/dist/library/coreNotes.js +111 -0
  285. package/dist/library/coreNotes.js.map +1 -0
  286. package/dist/library/coverage.d.ts +40 -0
  287. package/dist/library/coverage.js +59 -0
  288. package/dist/library/coverage.js.map +1 -0
  289. package/dist/library/entries/advanced.entries.d.ts +2 -0
  290. package/dist/library/entries/advanced.entries.js +6579 -0
  291. package/dist/library/entries/advanced.entries.js.map +1 -0
  292. package/dist/library/entries/commerce.entries.d.ts +2 -0
  293. package/dist/library/entries/commerce.entries.js +4140 -0
  294. package/dist/library/entries/commerce.entries.js.map +1 -0
  295. package/dist/library/entries/company.entries.d.ts +2 -0
  296. package/dist/library/entries/company.entries.js +2731 -0
  297. package/dist/library/entries/company.entries.js.map +1 -0
  298. package/dist/library/entries/conversion.entries.d.ts +2 -0
  299. package/dist/library/entries/conversion.entries.js +3707 -0
  300. package/dist/library/entries/conversion.entries.js.map +1 -0
  301. package/dist/library/entries/data.entries.d.ts +7 -0
  302. package/dist/library/entries/data.entries.js +4613 -0
  303. package/dist/library/entries/data.entries.js.map +1 -0
  304. package/dist/library/entries/events.entries.d.ts +2 -0
  305. package/dist/library/entries/events.entries.js +3428 -0
  306. package/dist/library/entries/events.entries.js.map +1 -0
  307. package/dist/library/entries/features.entries.d.ts +2 -0
  308. package/dist/library/entries/features.entries.js +3157 -0
  309. package/dist/library/entries/features.entries.js.map +1 -0
  310. package/dist/library/entries/heroes.entries.d.ts +2 -0
  311. package/dist/library/entries/heroes.entries.js +3401 -0
  312. package/dist/library/entries/heroes.entries.js.map +1 -0
  313. package/dist/library/entries/index.d.ts +3 -0
  314. package/dist/library/entries/index.js +35 -0
  315. package/dist/library/entries/index.js.map +1 -0
  316. package/dist/library/entries/listings.entries.d.ts +2 -0
  317. package/dist/library/entries/listings.entries.js +2976 -0
  318. package/dist/library/entries/listings.entries.js.map +1 -0
  319. package/dist/library/entries/longform.entries.d.ts +2 -0
  320. package/dist/library/entries/longform.entries.js +4227 -0
  321. package/dist/library/entries/longform.entries.js.map +1 -0
  322. package/dist/library/entries/media.entries.d.ts +2 -0
  323. package/dist/library/entries/media.entries.js +2781 -0
  324. package/dist/library/entries/media.entries.js.map +1 -0
  325. package/dist/library/entries/navigation.entries.d.ts +2 -0
  326. package/dist/library/entries/navigation.entries.js +4011 -0
  327. package/dist/library/entries/navigation.entries.js.map +1 -0
  328. package/dist/library/entries/pricing.entries.d.ts +2 -0
  329. package/dist/library/entries/pricing.entries.js +2383 -0
  330. package/dist/library/entries/pricing.entries.js.map +1 -0
  331. package/dist/library/entries/social-proof.entries.d.ts +2 -0
  332. package/dist/library/entries/social-proof.entries.js +2297 -0
  333. package/dist/library/entries/social-proof.entries.js.map +1 -0
  334. package/dist/library/examples/bento.d.ts +92 -0
  335. package/dist/library/examples/bento.js +201 -0
  336. package/dist/library/examples/bento.js.map +1 -0
  337. package/dist/library/examples/blocks.d.ts +14 -0
  338. package/dist/library/examples/blocks.js +313 -0
  339. package/dist/library/examples/blocks.js.map +1 -0
  340. package/dist/library/examples/faq.d.ts +28 -0
  341. package/dist/library/examples/faq.js +230 -0
  342. package/dist/library/examples/faq.js.map +1 -0
  343. package/dist/library/examples/hero.d.ts +43 -0
  344. package/dist/library/examples/hero.js +222 -0
  345. package/dist/library/examples/hero.js.map +1 -0
  346. package/dist/library/examples/index.d.ts +36 -0
  347. package/dist/library/examples/index.js +109 -0
  348. package/dist/library/examples/index.js.map +1 -0
  349. package/dist/library/examples/journalStory.d.ts +93 -0
  350. package/dist/library/examples/journalStory.js +338 -0
  351. package/dist/library/examples/journalStory.js.map +1 -0
  352. package/dist/library/examples/megaMenu.d.ts +134 -0
  353. package/dist/library/examples/megaMenu.js +442 -0
  354. package/dist/library/examples/megaMenu.js.map +1 -0
  355. package/dist/library/examples/pricing.d.ts +103 -0
  356. package/dist/library/examples/pricing.js +479 -0
  357. package/dist/library/examples/pricing.js.map +1 -0
  358. package/dist/library/examples/tabs.d.ts +87 -0
  359. package/dist/library/examples/tabs.js +180 -0
  360. package/dist/library/examples/tabs.js.map +1 -0
  361. package/dist/library/export.d.ts +42 -0
  362. package/dist/library/export.js +80 -0
  363. package/dist/library/export.js.map +1 -0
  364. package/dist/library/index.d.ts +13 -0
  365. package/dist/library/index.js +6 -0
  366. package/dist/library/kit-catalog.json +1510 -0
  367. package/dist/library/types.d.ts +42 -0
  368. package/dist/library/types.js +0 -0
  369. package/dist/schema/adapters.d.ts +28 -0
  370. package/dist/schema/adapters.js +492 -0
  371. package/dist/schema/adapters.js.map +1 -0
  372. package/dist/schema/help.d.ts +27 -0
  373. package/dist/schema/help.js +56 -0
  374. package/dist/schema/help.js.map +1 -0
  375. package/dist/schema/scale.d.ts +69 -0
  376. package/dist/schema/scale.js +250 -0
  377. package/dist/schema/scale.js.map +1 -0
  378. package/dist/schema/sources.d.ts +103 -0
  379. package/dist/schema/sources.js +65 -0
  380. package/dist/schema/sources.js.map +1 -0
  381. package/dist/schema/table.d.ts +319 -0
  382. package/dist/schema/table.js +1199 -0
  383. package/dist/schema/table.js.map +1 -0
  384. package/dist/schema/types.d.ts +297 -0
  385. package/dist/schema/types.js +14 -0
  386. package/dist/schema/types.js.map +1 -0
  387. package/dist/styles.css +2 -0
  388. package/dist/table/table-view.d.ts +14 -0
  389. package/dist/table/table-view.js +140 -0
  390. package/dist/table/table-view.js.map +1 -0
  391. package/dist/table/table.css +73 -0
  392. package/dist/testing/corpus.d.ts +63 -0
  393. package/dist/testing/corpus.js +129 -0
  394. package/dist/testing/corpus.js.map +1 -0
  395. package/dist/testing/test-form.d.ts +11 -0
  396. package/dist/testing/test-form.js +38 -0
  397. package/dist/testing/test-form.js.map +1 -0
  398. package/dist/theme.css +345 -0
  399. package/dist/theme.d.ts +20 -1504
  400. package/dist/theme.js +43 -4126
  401. package/dist/theme.js.map +1 -0
  402. package/dist/tokens.css +542 -0
  403. package/dist/types.d.ts +17 -0
  404. package/dist/types.js +0 -0
  405. package/dist/ui/action-tray.d.ts +54 -0
  406. package/dist/ui/action-tray.js +154 -0
  407. package/dist/ui/action-tray.js.map +1 -0
  408. package/dist/ui/autocomplete.d.ts +30 -0
  409. package/dist/ui/autocomplete.js +139 -0
  410. package/dist/ui/autocomplete.js.map +1 -0
  411. package/dist/ui/button.d.ts +57 -0
  412. package/dist/ui/button.js +201 -0
  413. package/dist/ui/button.js.map +1 -0
  414. package/dist/ui/choice-switch.d.ts +36 -0
  415. package/dist/ui/choice-switch.js +57 -0
  416. package/dist/ui/choice-switch.js.map +1 -0
  417. package/dist/ui/controls.d.ts +83 -0
  418. package/dist/ui/controls.js +331 -0
  419. package/dist/ui/controls.js.map +1 -0
  420. package/dist/ui/display.d.ts +163 -0
  421. package/dist/ui/display.js +455 -0
  422. package/dist/ui/display.js.map +1 -0
  423. package/dist/ui/expanded-editor-modal.d.ts +26 -0
  424. package/dist/ui/expanded-editor-modal.js +140 -0
  425. package/dist/ui/expanded-editor-modal.js.map +1 -0
  426. package/dist/ui/field-context.d.ts +12 -0
  427. package/dist/ui/field-context.js +23 -0
  428. package/dist/ui/field-context.js.map +1 -0
  429. package/dist/ui/floating-panel.d.ts +152 -0
  430. package/dist/ui/floating-panel.js +928 -0
  431. package/dist/ui/floating-panel.js.map +1 -0
  432. package/dist/ui/index.d.ts +16 -0
  433. package/dist/ui/index.js +18 -0
  434. package/dist/ui/input.d.ts +78 -0
  435. package/dist/ui/input.js +250 -0
  436. package/dist/ui/input.js.map +1 -0
  437. package/dist/ui/mode-bar.d.ts +31 -0
  438. package/dist/ui/mode-bar.js +65 -0
  439. package/dist/ui/mode-bar.js.map +1 -0
  440. package/dist/ui/overlay.d.ts +195 -0
  441. package/dist/ui/overlay.js +697 -0
  442. package/dist/ui/overlay.js.map +1 -0
  443. package/dist/ui/path-crumbs.d.ts +90 -0
  444. package/dist/ui/path-crumbs.js +566 -0
  445. package/dist/ui/path-crumbs.js.map +1 -0
  446. package/dist/ui/presence.d.ts +16 -0
  447. package/dist/ui/presence.js +65 -0
  448. package/dist/ui/presence.js.map +1 -0
  449. package/dist/ui/select.d.ts +66 -0
  450. package/dist/ui/select.js +407 -0
  451. package/dist/ui/select.js.map +1 -0
  452. package/dist/ui/shortcut-hint.d.ts +14 -0
  453. package/dist/ui/shortcut-hint.js +35 -0
  454. package/dist/ui/shortcut-hint.js.map +1 -0
  455. package/dist/ui/spinner.d.ts +24 -0
  456. package/dist/ui/spinner.js +42 -0
  457. package/dist/ui/spinner.js.map +1 -0
  458. package/dist/ui/split-button.d.ts +32 -0
  459. package/dist/ui/split-button.js +60 -0
  460. package/dist/ui/split-button.js.map +1 -0
  461. package/dist/ui/surfaces.d.ts +23 -0
  462. package/dist/ui/surfaces.js +26 -0
  463. package/dist/ui/surfaces.js.map +1 -0
  464. package/dist/ui/tab.d.ts +38 -0
  465. package/dist/ui/tab.js +87 -0
  466. package/dist/ui/tab.js.map +1 -0
  467. package/dist/ui/toast.d.ts +20 -0
  468. package/dist/ui/toast.js +115 -0
  469. package/dist/ui/toast.js.map +1 -0
  470. package/dist/ui/tooltip-root.d.ts +13 -0
  471. package/dist/ui/tooltip-root.js +77 -0
  472. package/dist/ui/tooltip-root.js.map +1 -0
  473. package/dist/ui/variants.d.ts +15 -0
  474. package/dist/ui/variants.js +14 -0
  475. package/dist/ui/variants.js.map +1 -0
  476. package/package.json +76 -50
  477. package/LICENSE +0 -21
  478. package/dist/_chunks-cjs/_visual-editing.js +0 -5898
  479. package/dist/_chunks-cjs/refractor.js +0 -22
  480. package/dist/_chunks-es/_visual-editing.mjs +0 -5904
  481. package/dist/_chunks-es/refractor.mjs +0 -25
  482. package/dist/_color.d.mts +0 -119
  483. package/dist/_color.d.ts +0 -119
  484. package/dist/_color.js +0 -1412
  485. package/dist/_color.mjs +0 -1411
  486. package/dist/_visual-editing.d.mts +0 -1126
  487. package/dist/_visual-editing.d.ts +0 -1126
  488. package/dist/_visual-editing.js +0 -30
  489. package/dist/_visual-editing.mjs +0 -30
  490. package/dist/index.d.mts +0 -3140
  491. package/dist/index.mjs +0 -2044
  492. package/dist/theme.d.mts +0 -1506
  493. package/dist/theme.mjs +0 -4126
  494. package/exports/_visual-editing.ts +0 -31
  495. package/exports/index.ts +0 -1
  496. package/exports/theme.ts +0 -1
  497. package/src/color/index.d.mts +0 -119
  498. package/src/color/index.mjs +0 -1411
  499. package/src/core/__workshop__/constants.ts +0 -293
  500. package/src/core/_compat.ts +0 -264
  501. package/src/core/components/autocomplete/__mocks__/apiStore.ts +0 -49
  502. package/src/core/components/autocomplete/__mocks__/countries.ts +0 -245
  503. package/src/core/components/autocomplete/__workshop__/async.tsx +0 -156
  504. package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -137
  505. package/src/core/components/autocomplete/__workshop__/custom.tsx +0 -89
  506. package/src/core/components/autocomplete/__workshop__/example.tsx +0 -79
  507. package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -36
  508. package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +0 -294
  509. package/src/core/components/autocomplete/__workshop__/index.ts +0 -39
  510. package/src/core/components/autocomplete/__workshop__/types.ts +0 -4
  511. package/src/core/components/autocomplete/autocomplete.styles.tsx +0 -39
  512. package/src/core/components/autocomplete/autocomplete.tsx +0 -767
  513. package/src/core/components/autocomplete/autocompleteOption.tsx +0 -45
  514. package/src/core/components/autocomplete/autocompleteReducer.ts +0 -47
  515. package/src/core/components/autocomplete/constants.ts +0 -28
  516. package/src/core/components/autocomplete/index.ts +0 -2
  517. package/src/core/components/autocomplete/types.ts +0 -108
  518. package/src/core/components/breadcrumbs/__workshop__/example.tsx +0 -62
  519. package/src/core/components/breadcrumbs/__workshop__/index.ts +0 -14
  520. package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +0 -18
  521. package/src/core/components/breadcrumbs/breadcrumbs.test.tsx +0 -51
  522. package/src/core/components/breadcrumbs/breadcrumbs.tsx +0 -133
  523. package/src/core/components/breadcrumbs/index.ts +0 -1
  524. package/src/core/components/dialog/__workshop__/activate.tsx +0 -134
  525. package/src/core/components/dialog/__workshop__/autoFocus.tsx +0 -29
  526. package/src/core/components/dialog/__workshop__/index.ts +0 -19
  527. package/src/core/components/dialog/__workshop__/layering.tsx +0 -41
  528. package/src/core/components/dialog/__workshop__/nested.tsx +0 -72
  529. package/src/core/components/dialog/__workshop__/onScroll.tsx +0 -39
  530. package/src/core/components/dialog/__workshop__/panes.tsx +0 -82
  531. package/src/core/components/dialog/__workshop__/position.tsx +0 -30
  532. package/src/core/components/dialog/__workshop__/props.tsx +0 -75
  533. package/src/core/components/dialog/__workshop__/provider.tsx +0 -11
  534. package/src/core/components/dialog/__workshop__/wrapped.tsx +0 -76
  535. package/src/core/components/dialog/dialog.tsx +0 -430
  536. package/src/core/components/dialog/dialogContext.ts +0 -20
  537. package/src/core/components/dialog/dialogProvider.tsx +0 -35
  538. package/src/core/components/dialog/index.ts +0 -4
  539. package/src/core/components/dialog/styles.ts +0 -77
  540. package/src/core/components/dialog/useDialog.ts +0 -11
  541. package/src/core/components/hotkeys/__workshop__/index.ts +0 -14
  542. package/src/core/components/hotkeys/__workshop__/plain.tsx +0 -9
  543. package/src/core/components/hotkeys/hotkeys.test.tsx +0 -42
  544. package/src/core/components/hotkeys/hotkeys.tsx +0 -66
  545. package/src/core/components/hotkeys/index.ts +0 -1
  546. package/src/core/components/index.ts +0 -9
  547. package/src/core/components/menu/__workshop__/asComponent.tsx +0 -45
  548. package/src/core/components/menu/__workshop__/avatarMenu.tsx +0 -51
  549. package/src/core/components/menu/__workshop__/closableMenuButton.tsx +0 -46
  550. package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +0 -134
  551. package/src/core/components/menu/__workshop__/customMenuItem.tsx +0 -45
  552. package/src/core/components/menu/__workshop__/customSelectedState.tsx +0 -39
  553. package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +0 -40
  554. package/src/core/components/menu/__workshop__/groups.tsx +0 -156
  555. package/src/core/components/menu/__workshop__/index.ts +0 -89
  556. package/src/core/components/menu/__workshop__/menuButton.tsx +0 -80
  557. package/src/core/components/menu/__workshop__/menuGroupRight.tsx +0 -58
  558. package/src/core/components/menu/__workshop__/nestedMenu.tsx +0 -22
  559. package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +0 -41
  560. package/src/core/components/menu/__workshop__/selectedItem.tsx +0 -69
  561. package/src/core/components/menu/__workshop__/shouldFocus.tsx +0 -47
  562. package/src/core/components/menu/__workshop__/tones.tsx +0 -25
  563. package/src/core/components/menu/__workshop__/withoutArrow.tsx +0 -32
  564. package/src/core/components/menu/helpers.ts +0 -82
  565. package/src/core/components/menu/index.ts +0 -5
  566. package/src/core/components/menu/menu.spacing.test.tsx +0 -63
  567. package/src/core/components/menu/menu.test.tsx +0 -125
  568. package/src/core/components/menu/menu.tsx +0 -178
  569. package/src/core/components/menu/menuButton.tsx +0 -268
  570. package/src/core/components/menu/menuContext.ts +0 -18
  571. package/src/core/components/menu/menuDivider.ts +0 -23
  572. package/src/core/components/menu/menuGroup.spacing.test.tsx +0 -63
  573. package/src/core/components/menu/menuGroup.tsx +0 -233
  574. package/src/core/components/menu/menuItem.spacing.test.tsx +0 -59
  575. package/src/core/components/menu/menuItem.tsx +0 -197
  576. package/src/core/components/menu/useMenu.ts +0 -21
  577. package/src/core/components/menu/useMenuController.ts +0 -231
  578. package/src/core/components/skeleton/__workshop__/delay.tsx +0 -70
  579. package/src/core/components/skeleton/__workshop__/index.ts +0 -11
  580. package/src/core/components/skeleton/__workshop__/skeleton.tsx +0 -64
  581. package/src/core/components/skeleton/index.ts +0 -2
  582. package/src/core/components/skeleton/skeleton.tsx +0 -57
  583. package/src/core/components/skeleton/styles.ts +0 -50
  584. package/src/core/components/skeleton/textSkeleton.tsx +0 -122
  585. package/src/core/components/tab/__workshop__/example.tsx +0 -79
  586. package/src/core/components/tab/__workshop__/index.ts +0 -14
  587. package/src/core/components/tab/index.ts +0 -3
  588. package/src/core/components/tab/tab.tsx +0 -101
  589. package/src/core/components/tab/tabList.test.tsx +0 -48
  590. package/src/core/components/tab/tabList.tsx +0 -70
  591. package/src/core/components/tab/tabPanel.tsx +0 -39
  592. package/src/core/components/toast/__workshop__/hook.tsx +0 -71
  593. package/src/core/components/toast/__workshop__/index.ts +0 -19
  594. package/src/core/components/toast/__workshop__/toast.tsx +0 -26
  595. package/src/core/components/toast/index.ts +0 -4
  596. package/src/core/components/toast/styles.ts +0 -77
  597. package/src/core/components/toast/toast.test.tsx +0 -101
  598. package/src/core/components/toast/toast.tsx +0 -198
  599. package/src/core/components/toast/toastContext.ts +0 -7
  600. package/src/core/components/toast/toastLayer.tsx +0 -51
  601. package/src/core/components/toast/toastProvider.tsx +0 -113
  602. package/src/core/components/toast/toastState.ts +0 -6
  603. package/src/core/components/toast/types.ts +0 -26
  604. package/src/core/components/toast/useToast.ts +0 -25
  605. package/src/core/components/tree/__workshop__/basic.perf.ts +0 -19
  606. package/src/core/components/tree/__workshop__/basic.tsx +0 -105
  607. package/src/core/components/tree/__workshop__/index.ts +0 -21
  608. package/src/core/components/tree/__workshop__/tabFromElement.tsx +0 -84
  609. package/src/core/components/tree/helpers.ts +0 -105
  610. package/src/core/components/tree/index.ts +0 -4
  611. package/src/core/components/tree/style.ts +0 -105
  612. package/src/core/components/tree/tree.test.tsx +0 -55
  613. package/src/core/components/tree/tree.tsx +0 -240
  614. package/src/core/components/tree/treeContext.ts +0 -10
  615. package/src/core/components/tree/treeGroup.tsx +0 -28
  616. package/src/core/components/tree/treeItem.test.tsx +0 -65
  617. package/src/core/components/tree/treeItem.tsx +0 -224
  618. package/src/core/components/tree/types.ts +0 -25
  619. package/src/core/components/tree/useTree.ts +0 -17
  620. package/src/core/constants.ts +0 -79
  621. package/src/core/helpers/animation.ts +0 -27
  622. package/src/core/helpers/element.ts +0 -55
  623. package/src/core/helpers/focus.ts +0 -100
  624. package/src/core/helpers/index.ts +0 -4
  625. package/src/core/helpers/scroll.ts +0 -15
  626. package/src/core/hooks/index.ts +0 -12
  627. package/src/core/hooks/useArrayProp.ts +0 -17
  628. package/src/core/hooks/useClickOutside.test.tsx +0 -482
  629. package/src/core/hooks/useClickOutside.ts +0 -118
  630. package/src/core/hooks/useClickOutsideEvent.test.tsx +0 -115
  631. package/src/core/hooks/useClickOutsideEvent.ts +0 -73
  632. package/src/core/hooks/useCustomValidity.ts +0 -13
  633. package/src/core/hooks/useDelayed.test.ts +0 -88
  634. package/src/core/hooks/useDelayedState.ts +0 -36
  635. package/src/core/hooks/useElementRect/__workshop__/example.tsx +0 -32
  636. package/src/core/hooks/useElementRect/__workshop__/index.ts +0 -14
  637. package/src/core/hooks/useElementRect/index.ts +0 -1
  638. package/src/core/hooks/useElementRect/useElementRect.ts +0 -13
  639. package/src/core/hooks/useElementSize.ts +0 -19
  640. package/src/core/hooks/useForwardedRef.ts +0 -19
  641. package/src/core/hooks/useGlobalKeyDown.ts +0 -24
  642. package/src/core/hooks/useIsomorphicEffect.ts +0 -7
  643. package/src/core/hooks/useMatchMedia.ts +0 -28
  644. package/src/core/hooks/useMediaIndex/__workshop__/index.ts +0 -14
  645. package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +0 -14
  646. package/src/core/hooks/useMediaIndex/index.ts +0 -1
  647. package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -36
  648. package/src/core/hooks/useMediaIndex/useMediaIndex.ts +0 -102
  649. package/src/core/hooks/useMounted.ts +0 -15
  650. package/src/core/hooks/usePrefersDark.hydration.test.tsx +0 -56
  651. package/src/core/hooks/usePrefersDark.test.tsx +0 -19
  652. package/src/core/hooks/usePrefersDark.ts +0 -16
  653. package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -56
  654. package/src/core/hooks/usePrefersReducedMotion.test.tsx +0 -19
  655. package/src/core/hooks/usePrefersReducedMotion.ts +0 -16
  656. package/src/core/index.ts +0 -10
  657. package/src/core/lib/createGlobalScopedContext.ts +0 -36
  658. package/src/core/lib/globalScope.ts +0 -19
  659. package/src/core/lib/isRecord.ts +0 -3
  660. package/src/core/middleware/origin.ts +0 -47
  661. package/src/core/observers/elementSizeObserver.ts +0 -116
  662. package/src/core/observers/index.ts +0 -2
  663. package/src/core/observers/resizeObserver.ts +0 -9
  664. package/src/core/primitives/_selectable/index.ts +0 -1
  665. package/src/core/primitives/_selectable/selectable.tsx +0 -15
  666. package/src/core/primitives/_selectable/style.ts +0 -115
  667. package/src/core/primitives/avatar/__workshop__/asButton.tsx +0 -14
  668. package/src/core/primitives/avatar/__workshop__/index.ts +0 -29
  669. package/src/core/primitives/avatar/__workshop__/stack.tsx +0 -25
  670. package/src/core/primitives/avatar/__workshop__/withinButton.tsx +0 -63
  671. package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -70
  672. package/src/core/primitives/avatar/avatar.tsx +0 -200
  673. package/src/core/primitives/avatar/avatarCounter.tsx +0 -91
  674. package/src/core/primitives/avatar/avatarStack.tsx +0 -100
  675. package/src/core/primitives/avatar/index.ts +0 -4
  676. package/src/core/primitives/avatar/styles.ts +0 -167
  677. package/src/core/primitives/avatar/types.ts +0 -17
  678. package/src/core/primitives/badge/__workshop__/index.ts +0 -19
  679. package/src/core/primitives/badge/__workshop__/props.tsx +0 -30
  680. package/src/core/primitives/badge/__workshop__/tones.tsx +0 -21
  681. package/src/core/primitives/badge/badge.test.tsx +0 -16
  682. package/src/core/primitives/badge/badge.tsx +0 -70
  683. package/src/core/primitives/badge/index.ts +0 -1
  684. package/src/core/primitives/badge/styles.ts +0 -20
  685. package/src/core/primitives/badge/types.ts +0 -8
  686. package/src/core/primitives/box/__workshop__/asComponent.tsx +0 -31
  687. package/src/core/primitives/box/__workshop__/index.ts +0 -24
  688. package/src/core/primitives/box/__workshop__/props.tsx +0 -20
  689. package/src/core/primitives/box/__workshop__/responsive.tsx +0 -20
  690. package/src/core/primitives/box/box.test.tsx +0 -142
  691. package/src/core/primitives/box/box.tsx +0 -154
  692. package/src/core/primitives/box/index.ts +0 -1
  693. package/src/core/primitives/button/__workshop__/custom.tsx +0 -51
  694. package/src/core/primitives/button/__workshop__/customIcons.tsx +0 -30
  695. package/src/core/primitives/button/__workshop__/disabled.tsx +0 -74
  696. package/src/core/primitives/button/__workshop__/index.ts +0 -59
  697. package/src/core/primitives/button/__workshop__/labelUploadButton.tsx +0 -36
  698. package/src/core/primitives/button/__workshop__/mixedChildren.tsx +0 -12
  699. package/src/core/primitives/button/__workshop__/props.tsx +0 -55
  700. package/src/core/primitives/button/__workshop__/stacked.tsx +0 -58
  701. package/src/core/primitives/button/__workshop__/styled1.tsx +0 -17
  702. package/src/core/primitives/button/__workshop__/styled2.tsx +0 -19
  703. package/src/core/primitives/button/__workshop__/uploadButton.tsx +0 -28
  704. package/src/core/primitives/button/button.test.tsx +0 -82
  705. package/src/core/primitives/button/button.tsx +0 -210
  706. package/src/core/primitives/button/index.ts +0 -1
  707. package/src/core/primitives/button/styles.ts +0 -117
  708. package/src/core/primitives/card/__workshop__/allTones.tsx +0 -25
  709. package/src/core/primitives/card/__workshop__/asButton.tsx +0 -107
  710. package/src/core/primitives/card/__workshop__/asComponent.tsx +0 -27
  711. package/src/core/primitives/card/__workshop__/checkered.tsx +0 -26
  712. package/src/core/primitives/card/__workshop__/index.ts +0 -18
  713. package/src/core/primitives/card/__workshop__/interactive.tsx +0 -30
  714. package/src/core/primitives/card/__workshop__/listNavigation.tsx +0 -80
  715. package/src/core/primitives/card/__workshop__/props.tsx +0 -53
  716. package/src/core/primitives/card/__workshop__/selected.tsx +0 -94
  717. package/src/core/primitives/card/__workshop__/styled.tsx +0 -14
  718. package/src/core/primitives/card/card.tsx +0 -128
  719. package/src/core/primitives/card/index.ts +0 -2
  720. package/src/core/primitives/card/styles.ts +0 -147
  721. package/src/core/primitives/card/types.ts +0 -11
  722. package/src/core/primitives/checkbox/__workshop__/example.tsx +0 -25
  723. package/src/core/primitives/checkbox/__workshop__/index.ts +0 -13
  724. package/src/core/primitives/checkbox/__workshop__/props.tsx +0 -33
  725. package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +0 -16
  726. package/src/core/primitives/checkbox/__workshop__/tones.tsx +0 -28
  727. package/src/core/primitives/checkbox/checkbox.tsx +0 -73
  728. package/src/core/primitives/checkbox/index.ts +0 -1
  729. package/src/core/primitives/checkbox/styles.ts +0 -128
  730. package/src/core/primitives/code/__workshop__/index.ts +0 -19
  731. package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +0 -48
  732. package/src/core/primitives/code/__workshop__/props.tsx +0 -21
  733. package/src/core/primitives/code/code.tsx +0 -55
  734. package/src/core/primitives/code/index.ts +0 -1
  735. package/src/core/primitives/code/refractor.tsx +0 -20
  736. package/src/core/primitives/code/styles.ts +0 -77
  737. package/src/core/primitives/container/__workshop__/example.tsx +0 -20
  738. package/src/core/primitives/container/__workshop__/index.ts +0 -8
  739. package/src/core/primitives/container/container.tsx +0 -54
  740. package/src/core/primitives/container/index.ts +0 -2
  741. package/src/core/primitives/container/styles.ts +0 -23
  742. package/src/core/primitives/container/types.ts +0 -6
  743. package/src/core/primitives/flex/__workshop__/example.tsx +0 -34
  744. package/src/core/primitives/flex/__workshop__/gap.tsx +0 -25
  745. package/src/core/primitives/flex/__workshop__/index.ts +0 -11
  746. package/src/core/primitives/flex/flex.tsx +0 -64
  747. package/src/core/primitives/flex/index.ts +0 -1
  748. package/src/core/primitives/grid/__workshop__/index.ts +0 -10
  749. package/src/core/primitives/grid/__workshop__/responsive.tsx +0 -54
  750. package/src/core/primitives/grid/grid.test.tsx +0 -80
  751. package/src/core/primitives/grid/grid.tsx +0 -74
  752. package/src/core/primitives/grid/index.ts +0 -1
  753. package/src/core/primitives/heading/__workshop__/index.ts +0 -19
  754. package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +0 -54
  755. package/src/core/primitives/heading/__workshop__/plain.tsx +0 -32
  756. package/src/core/primitives/heading/heading.tsx +0 -88
  757. package/src/core/primitives/heading/index.ts +0 -1
  758. package/src/core/primitives/heading/styles.ts +0 -64
  759. package/src/core/primitives/heading/types.ts +0 -7
  760. package/src/core/primitives/index.ts +0 -27
  761. package/src/core/primitives/inline/__workshop__/index.ts +0 -8
  762. package/src/core/primitives/inline/__workshop__/plain.tsx +0 -27
  763. package/src/core/primitives/inline/index.ts +0 -1
  764. package/src/core/primitives/inline/inline.test.tsx +0 -51
  765. package/src/core/primitives/inline/inline.tsx +0 -63
  766. package/src/core/primitives/inline/styles.ts +0 -32
  767. package/src/core/primitives/inline/types.ts +0 -6
  768. package/src/core/primitives/kbd/__workshop__/index.ts +0 -8
  769. package/src/core/primitives/kbd/__workshop__/plain.tsx +0 -9
  770. package/src/core/primitives/kbd/index.ts +0 -1
  771. package/src/core/primitives/kbd/kbd.tsx +0 -69
  772. package/src/core/primitives/label/__workshop__/index.ts +0 -19
  773. package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +0 -48
  774. package/src/core/primitives/label/__workshop__/plain.tsx +0 -24
  775. package/src/core/primitives/label/index.ts +0 -1
  776. package/src/core/primitives/label/label.tsx +0 -87
  777. package/src/core/primitives/label/styles.ts +0 -45
  778. package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +0 -77
  779. package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +0 -31
  780. package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
  781. package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -11
  782. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +0 -71
  783. package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +0 -71
  784. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +0 -89
  785. package/src/core/primitives/popover/__workshop__/TestStory.tsx +0 -97
  786. package/src/core/primitives/popover/__workshop__/index.ts +0 -49
  787. package/src/core/primitives/popover/constants.ts +0 -22
  788. package/src/core/primitives/popover/floating-ui/size.ts +0 -99
  789. package/src/core/primitives/popover/helpers.ts +0 -31
  790. package/src/core/primitives/popover/index.ts +0 -2
  791. package/src/core/primitives/popover/popover.tsx +0 -511
  792. package/src/core/primitives/popover/popoverCard.tsx +0 -166
  793. package/src/core/primitives/popover/types.ts +0 -7
  794. package/src/core/primitives/radio/__workshop__/example.tsx +0 -63
  795. package/src/core/primitives/radio/__workshop__/index.ts +0 -11
  796. package/src/core/primitives/radio/__workshop__/plain.tsx +0 -28
  797. package/src/core/primitives/radio/index.ts +0 -1
  798. package/src/core/primitives/radio/radio.tsx +0 -51
  799. package/src/core/primitives/radio/styles.ts +0 -117
  800. package/src/core/primitives/select/__workshop__/index.ts +0 -11
  801. package/src/core/primitives/select/__workshop__/plain.tsx +0 -27
  802. package/src/core/primitives/select/__workshop__/readOnly.tsx +0 -23
  803. package/src/core/primitives/select/index.ts +0 -1
  804. package/src/core/primitives/select/select.test.tsx +0 -52
  805. package/src/core/primitives/select/select.tsx +0 -94
  806. package/src/core/primitives/select/styles.ts +0 -166
  807. package/src/core/primitives/spinner/__workshop__/Props.tsx +0 -15
  808. package/src/core/primitives/spinner/__workshop__/index.ts +0 -14
  809. package/src/core/primitives/spinner/index.ts +0 -1
  810. package/src/core/primitives/spinner/spinner.tsx +0 -46
  811. package/src/core/primitives/stack/__workshop__/index.ts +0 -14
  812. package/src/core/primitives/stack/__workshop__/plain.tsx +0 -32
  813. package/src/core/primitives/stack/index.ts +0 -1
  814. package/src/core/primitives/stack/stack.test.tsx +0 -57
  815. package/src/core/primitives/stack/stack.tsx +0 -57
  816. package/src/core/primitives/stack/styles.ts +0 -32
  817. package/src/core/primitives/switch/__workshop__/example.tsx +0 -23
  818. package/src/core/primitives/switch/__workshop__/index.ts +0 -11
  819. package/src/core/primitives/switch/__workshop__/props.tsx +0 -21
  820. package/src/core/primitives/switch/index.ts +0 -1
  821. package/src/core/primitives/switch/styles.ts +0 -173
  822. package/src/core/primitives/switch/switch.tsx +0 -68
  823. package/src/core/primitives/text/__workshop__/colored.tsx +0 -30
  824. package/src/core/primitives/text/__workshop__/example.tsx +0 -39
  825. package/src/core/primitives/text/__workshop__/index.ts +0 -24
  826. package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +0 -48
  827. package/src/core/primitives/text/index.ts +0 -1
  828. package/src/core/primitives/text/styles.ts +0 -74
  829. package/src/core/primitives/text/text.tsx +0 -89
  830. package/src/core/primitives/textArea/__workshop__/index.ts +0 -14
  831. package/src/core/primitives/textArea/__workshop__/plain.tsx +0 -50
  832. package/src/core/primitives/textArea/index.ts +0 -1
  833. package/src/core/primitives/textArea/textArea.tsx +0 -120
  834. package/src/core/primitives/textInput/__workshop__/clearButton.tsx +0 -30
  835. package/src/core/primitives/textInput/__workshop__/customValidity.tsx +0 -17
  836. package/src/core/primitives/textInput/__workshop__/index.ts +0 -44
  837. package/src/core/primitives/textInput/__workshop__/plain.tsx +0 -98
  838. package/src/core/primitives/textInput/__workshop__/readOnly.tsx +0 -9
  839. package/src/core/primitives/textInput/__workshop__/states.tsx +0 -53
  840. package/src/core/primitives/textInput/__workshop__/tones.tsx +0 -277
  841. package/src/core/primitives/textInput/__workshop__/typed.tsx +0 -23
  842. package/src/core/primitives/textInput/index.ts +0 -1
  843. package/src/core/primitives/textInput/textInput.test.tsx +0 -48
  844. package/src/core/primitives/textInput/textInput.tsx +0 -395
  845. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
  846. package/src/core/primitives/tooltip/__workshop__/index.ts +0 -29
  847. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
  848. package/src/core/primitives/tooltip/__workshop__/props.tsx +0 -107
  849. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
  850. package/src/core/primitives/tooltip/constants.ts +0 -23
  851. package/src/core/primitives/tooltip/index.ts +0 -2
  852. package/src/core/primitives/tooltip/tooltip.test.tsx +0 -452
  853. package/src/core/primitives/tooltip/tooltip.tsx +0 -495
  854. package/src/core/primitives/tooltip/tooltipCard.tsx +0 -109
  855. package/src/core/primitives/tooltip/tooltipDelayGroup/index.ts +0 -4
  856. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -11
  857. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -57
  858. package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +0 -10
  859. package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -13
  860. package/src/core/primitives/types.ts +0 -179
  861. package/src/core/styles/border/borderStyle.ts +0 -56
  862. package/src/core/styles/border/index.ts +0 -2
  863. package/src/core/styles/border/types.ts +0 -10
  864. package/src/core/styles/box/boxStyle.ts +0 -69
  865. package/src/core/styles/box/index.ts +0 -2
  866. package/src/core/styles/box/types.ts +0 -11
  867. package/src/core/styles/card/_cardColorStyle.ts +0 -108
  868. package/src/core/styles/card/index.ts +0 -1
  869. package/src/core/styles/flex/flexItemStyle.ts +0 -27
  870. package/src/core/styles/flex/flexStyle.ts +0 -70
  871. package/src/core/styles/flex/index.ts +0 -3
  872. package/src/core/styles/flex/types.ts +0 -25
  873. package/src/core/styles/focusRing/index.ts +0 -25
  874. package/src/core/styles/font/codeFontStyle.ts +0 -13
  875. package/src/core/styles/font/headingFontStyle.ts +0 -13
  876. package/src/core/styles/font/index.ts +0 -6
  877. package/src/core/styles/font/labelFontStyle.ts +0 -13
  878. package/src/core/styles/font/responsiveFont.ts +0 -103
  879. package/src/core/styles/font/textAlignStyle.ts +0 -19
  880. package/src/core/styles/font/textFontStyle.ts +0 -13
  881. package/src/core/styles/font/types.ts +0 -35
  882. package/src/core/styles/grid/gridItemStyle.ts +0 -82
  883. package/src/core/styles/grid/gridStyle.ts +0 -108
  884. package/src/core/styles/grid/index.ts +0 -3
  885. package/src/core/styles/grid/types.ts +0 -37
  886. package/src/core/styles/helpers.ts +0 -72
  887. package/src/core/styles/index.ts +0 -5
  888. package/src/core/styles/input/index.ts +0 -2
  889. package/src/core/styles/input/responsiveInputPaddingStyle.ts +0 -78
  890. package/src/core/styles/input/textInputStyle.ts +0 -263
  891. package/src/core/styles/internal.ts +0 -12
  892. package/src/core/styles/margin/index.ts +0 -2
  893. package/src/core/styles/margin/marginStyle.ts +0 -21
  894. package/src/core/styles/margin/marginsStyle.test.ts +0 -33
  895. package/src/core/styles/margin/types.ts +0 -9
  896. package/src/core/styles/padding/index.ts +0 -2
  897. package/src/core/styles/padding/paddingStyle.test.ts +0 -33
  898. package/src/core/styles/padding/paddingStyle.ts +0 -21
  899. package/src/core/styles/padding/types.ts +0 -12
  900. package/src/core/styles/radius/index.ts +0 -2
  901. package/src/core/styles/radius/radiusStyle.ts +0 -23
  902. package/src/core/styles/radius/types.ts +0 -8
  903. package/src/core/styles/shadow/index.ts +0 -2
  904. package/src/core/styles/shadow/shadowStyle.ts +0 -29
  905. package/src/core/styles/shadow/types.ts +0 -6
  906. package/src/core/styles/types.ts +0 -8
  907. package/src/core/theme/__workshop__/build/Root.tsx +0 -367
  908. package/src/core/theme/__workshop__/build/helpers.ts +0 -46
  909. package/src/core/theme/__workshop__/build/story.tsx +0 -465
  910. package/src/core/theme/__workshop__/canvas.tsx +0 -352
  911. package/src/core/theme/__workshop__/color.tsx +0 -62
  912. package/src/core/theme/__workshop__/debug/story.tsx +0 -408
  913. package/src/core/theme/__workshop__/index.ts +0 -39
  914. package/src/core/theme/__workshop__/layer.tsx +0 -78
  915. package/src/core/theme/__workshop__/nestedProvider.tsx +0 -15
  916. package/src/core/theme/index.ts +0 -5
  917. package/src/core/theme/theme.test.tsx +0 -73
  918. package/src/core/theme/themeColorProvider.tsx +0 -29
  919. package/src/core/theme/themeContext.ts +0 -10
  920. package/src/core/theme/themeProvider.tsx +0 -62
  921. package/src/core/theme/types.ts +0 -12
  922. package/src/core/theme/useRootTheme.ts +0 -17
  923. package/src/core/theme/useTheme.ts +0 -16
  924. package/src/core/types/avatar.ts +0 -14
  925. package/src/core/types/badge.ts +0 -12
  926. package/src/core/types/box.ts +0 -19
  927. package/src/core/types/button.ts +0 -21
  928. package/src/core/types/card.ts +0 -6
  929. package/src/core/types/component.ts +0 -32
  930. package/src/core/types/dialog.ts +0 -4
  931. package/src/core/types/flex.ts +0 -30
  932. package/src/core/types/grid.ts +0 -14
  933. package/src/core/types/gridItem.ts +0 -29
  934. package/src/core/types/index.ts +0 -15
  935. package/src/core/types/placement.ts +0 -18
  936. package/src/core/types/popover.ts +0 -4
  937. package/src/core/types/radius.ts +0 -4
  938. package/src/core/types/selectable.ts +0 -6
  939. package/src/core/types/text.ts +0 -4
  940. package/src/core/utils/arrow/arrow.tsx +0 -123
  941. package/src/core/utils/arrow/cmds.ts +0 -91
  942. package/src/core/utils/arrow/index.ts +0 -1
  943. package/src/core/utils/boundaryElement/__workshop__/index.ts +0 -14
  944. package/src/core/utils/boundaryElement/__workshop__/plain.tsx +0 -19
  945. package/src/core/utils/boundaryElement/boundaryElement.test.tsx +0 -100
  946. package/src/core/utils/boundaryElement/boundaryElementContext.ts +0 -7
  947. package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +0 -24
  948. package/src/core/utils/boundaryElement/index.ts +0 -3
  949. package/src/core/utils/boundaryElement/types.ts +0 -7
  950. package/src/core/utils/boundaryElement/useBoundaryElement.ts +0 -26
  951. package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +0 -21
  952. package/src/core/utils/conditionalWrapper/index.ts +0 -1
  953. package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +0 -30
  954. package/src/core/utils/elementQuery/__workshop__/index.ts +0 -14
  955. package/src/core/utils/elementQuery/elementQuery.tsx +0 -53
  956. package/src/core/utils/elementQuery/helpers.ts +0 -27
  957. package/src/core/utils/elementQuery/index.ts +0 -1
  958. package/src/core/utils/errorBoundary.tsx +0 -48
  959. package/src/core/utils/getElementRef.ts +0 -26
  960. package/src/core/utils/index.ts +0 -9
  961. package/src/core/utils/layer/__workshop__/_debug.tsx +0 -17
  962. package/src/core/utils/layer/__workshop__/index.ts +0 -24
  963. package/src/core/utils/layer/__workshop__/multipleRoots.tsx +0 -49
  964. package/src/core/utils/layer/__workshop__/nested.tsx +0 -98
  965. package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +0 -13
  966. package/src/core/utils/layer/getLayerContext.test.ts +0 -30
  967. package/src/core/utils/layer/getLayerContext.ts +0 -21
  968. package/src/core/utils/layer/index.ts +0 -4
  969. package/src/core/utils/layer/layer.test.tsx +0 -108
  970. package/src/core/utils/layer/layer.tsx +0 -98
  971. package/src/core/utils/layer/layerContext.ts +0 -7
  972. package/src/core/utils/layer/layerProvider.tsx +0 -111
  973. package/src/core/utils/layer/types.ts +0 -9
  974. package/src/core/utils/layer/useLayer.ts +0 -26
  975. package/src/core/utils/portal/__workshop__/index.ts +0 -14
  976. package/src/core/utils/portal/__workshop__/named.tsx +0 -63
  977. package/src/core/utils/portal/index.ts +0 -4
  978. package/src/core/utils/portal/portal.test.tsx +0 -103
  979. package/src/core/utils/portal/portal.ts +0 -32
  980. package/src/core/utils/portal/portalContext.ts +0 -31
  981. package/src/core/utils/portal/portalProvider.tsx +0 -47
  982. package/src/core/utils/portal/types.ts +0 -9
  983. package/src/core/utils/portal/usePortal.ts +0 -25
  984. package/src/core/utils/spanWithTextOverflow.tsx +0 -10
  985. package/src/core/utils/srOnly/index.ts +0 -1
  986. package/src/core/utils/srOnly/srOnly.tsx +0 -36
  987. package/src/core/utils/virtualList/__workshop__/changingProps.tsx +0 -36
  988. package/src/core/utils/virtualList/__workshop__/elementScroll.tsx +0 -24
  989. package/src/core/utils/virtualList/__workshop__/index.ts +0 -29
  990. package/src/core/utils/virtualList/__workshop__/infiniteList.tsx +0 -48
  991. package/src/core/utils/virtualList/__workshop__/windowScrolll.tsx +0 -22
  992. package/src/core/utils/virtualList/index.ts +0 -1
  993. package/src/core/utils/virtualList/virtualList.tsx +0 -200
  994. package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +0 -76
  995. package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +0 -54
  996. package/src/theme/build/_deprecated/color/button/createButtonModes.ts +0 -22
  997. package/src/theme/build/_deprecated/color/button/createButtonTones.ts +0 -55
  998. package/src/theme/build/_deprecated/color/card/createCardStates.ts +0 -60
  999. package/src/theme/build/_deprecated/color/color.test.ts +0 -63
  1000. package/src/theme/build/_deprecated/color/defaults.ts +0 -390
  1001. package/src/theme/build/_deprecated/color/factory.ts +0 -142
  1002. package/src/theme/build/_deprecated/color/index.ts +0 -1
  1003. package/src/theme/build/_deprecated/color/input/createInputModes.ts +0 -81
  1004. package/src/theme/build/_deprecated/color/muted/createMuted.ts +0 -54
  1005. package/src/theme/build/_deprecated/color/spot/createSpot.ts +0 -20
  1006. package/src/theme/build/buildColorTheme.test.ts +0 -183
  1007. package/src/theme/build/buildColorTheme.ts +0 -499
  1008. package/src/theme/build/buildTheme.test.ts +0 -87
  1009. package/src/theme/build/buildTheme.ts +0 -36
  1010. package/src/theme/build/colorToken/colorToken.ts +0 -19
  1011. package/src/theme/build/colorToken/compileColorToken.ts +0 -21
  1012. package/src/theme/build/colorToken/index.ts +0 -2
  1013. package/src/theme/build/colorToken/types.ts +0 -6
  1014. package/src/theme/build/index.ts +0 -3
  1015. package/src/theme/build/lib/color-fns/blend/index.ts +0 -3
  1016. package/src/theme/build/lib/color-fns/blend/mix.ts +0 -21
  1017. package/src/theme/build/lib/color-fns/blend/multiply.ts +0 -18
  1018. package/src/theme/build/lib/color-fns/blend/screen.ts +0 -18
  1019. package/src/theme/build/lib/color-fns/color-fns.test.ts +0 -68
  1020. package/src/theme/build/lib/color-fns/contrastRatio.ts +0 -31
  1021. package/src/theme/build/lib/color-fns/convert.ts +0 -150
  1022. package/src/theme/build/lib/color-fns/index.ts +0 -6
  1023. package/src/theme/build/lib/color-fns/parse.ts +0 -60
  1024. package/src/theme/build/lib/color-fns/rgba.ts +0 -10
  1025. package/src/theme/build/lib/color-fns/types.ts +0 -28
  1026. package/src/theme/build/lib/isRecord.ts +0 -3
  1027. package/src/theme/build/lib/lazy.ts +0 -30
  1028. package/src/theme/build/lib/utils.ts +0 -19
  1029. package/src/theme/build/merge.ts +0 -26
  1030. package/src/theme/build/mixThemeColor.test.ts +0 -21
  1031. package/src/theme/build/mixThemeColor.ts +0 -53
  1032. package/src/theme/build/renderColorTheme.ts +0 -532
  1033. package/src/theme/build/renderColorValue.ts +0 -85
  1034. package/src/theme/build/resolveColorTokens.ts +0 -268
  1035. package/src/theme/build/theme.test.ts +0 -27
  1036. package/src/theme/config/helpers.ts +0 -55
  1037. package/src/theme/config/index.ts +0 -4
  1038. package/src/theme/config/system.ts +0 -115
  1039. package/src/theme/config/tokens/color/index.ts +0 -1
  1040. package/src/theme/config/tokens/color/types.ts +0 -133
  1041. package/src/theme/config/tokens/index.ts +0 -4
  1042. package/src/theme/config/tokens/parseTokenKey.test.ts +0 -64
  1043. package/src/theme/config/tokens/parseTokenKey.ts +0 -67
  1044. package/src/theme/config/tokens/parseTokenValue.test.ts +0 -42
  1045. package/src/theme/config/tokens/parseTokenValue.ts +0 -133
  1046. package/src/theme/config/tokens/types.ts +0 -53
  1047. package/src/theme/config/types.ts +0 -46
  1048. package/src/theme/defaults/colorPalette.ts +0 -5
  1049. package/src/theme/defaults/colorTokens.ts +0 -648
  1050. package/src/theme/defaults/config.ts +0 -84
  1051. package/src/theme/defaults/fonts.ts +0 -227
  1052. package/src/theme/getScopedTheme.ts +0 -98
  1053. package/src/theme/index.ts +0 -5
  1054. package/src/theme/system/avatar.ts +0 -14
  1055. package/src/theme/system/color/_constants.ts +0 -45
  1056. package/src/theme/system/color/_helpers.ts +0 -24
  1057. package/src/theme/system/color/_system.ts +0 -40
  1058. package/src/theme/system/color/avatar.ts +0 -15
  1059. package/src/theme/system/color/badge.ts +0 -16
  1060. package/src/theme/system/color/button.ts +0 -17
  1061. package/src/theme/system/color/color.ts +0 -34
  1062. package/src/theme/system/color/index.ts +0 -13
  1063. package/src/theme/system/color/input.ts +0 -25
  1064. package/src/theme/system/color/kbd.ts +0 -8
  1065. package/src/theme/system/color/selectable.ts +0 -12
  1066. package/src/theme/system/color/shadow.ts +0 -7
  1067. package/src/theme/system/color/state.ts +0 -43
  1068. package/src/theme/system/color/syntax.ts +0 -41
  1069. package/src/theme/system/css.ts +0 -14
  1070. package/src/theme/system/focusRing.ts +0 -7
  1071. package/src/theme/system/font.ts +0 -52
  1072. package/src/theme/system/index.ts +0 -11
  1073. package/src/theme/system/input.ts +0 -33
  1074. package/src/theme/system/layer.ts +0 -8
  1075. package/src/theme/system/shadow.ts +0 -19
  1076. package/src/theme/system/styles.ts +0 -13
  1077. package/src/theme/system/theme.ts +0 -138
  1078. package/src/theme/system/v0/avatar.ts +0 -10
  1079. package/src/theme/system/v0/color/_generic.ts +0 -35
  1080. package/src/theme/system/v0/color/_system.ts +0 -17
  1081. package/src/theme/system/v0/color/base.ts +0 -21
  1082. package/src/theme/system/v0/color/button.ts +0 -42
  1083. package/src/theme/system/v0/color/card.ts +0 -19
  1084. package/src/theme/system/v0/color/color.ts +0 -40
  1085. package/src/theme/system/v0/color/index.ts +0 -11
  1086. package/src/theme/system/v0/color/input.ts +0 -34
  1087. package/src/theme/system/v0/color/muted.ts +0 -26
  1088. package/src/theme/system/v0/color/selectable.ts +0 -31
  1089. package/src/theme/system/v0/color/solid.ts +0 -26
  1090. package/src/theme/system/v0/color/spot.ts +0 -13
  1091. package/src/theme/system/v0/index.ts +0 -3
  1092. package/src/theme/system/v0/input.ts +0 -23
  1093. package/src/theme/versioning/getTheme_v2.ts +0 -57
  1094. package/src/theme/versioning/index.ts +0 -5
  1095. package/src/theme/versioning/is_v0.ts +0 -6
  1096. package/src/theme/versioning/is_v2.ts +0 -6
  1097. package/src/theme/versioning/themeColor_v0_v2.ts +0 -243
  1098. package/src/theme/versioning/themeColor_v2_v2_9.ts +0 -49
  1099. package/src/theme/versioning/v0_v2.ts +0 -94
  1100. package/src/theme/versioning/v2_v0.ts +0 -135
@@ -0,0 +1 @@
1
+ {"version":3,"file":"values.js","names":[],"sources":["../../src/adapters/values.ts"],"sourcesContent":["/**\n * VALUE ADAPTERS — a V2 stored value ↔ the value production stores for the same field (Lane C map,\n * docs/design-system/v2-map/C-controls.md §2, updated for F1). Storage stays prod's: `*ToProd` returns what the\n * backend accepts, `*FromProd` the V2 shape the kit controls edit.\n *\n * Every `*ToProd` returns `{ value, lost }`. `lost` names the V2 keys prod cannot keep (relative to the value), so\n * `*FromProd(*ToProd(v).value)` equals `v` minus exactly those keys. Nothing is dropped without being named.\n */\nimport type { ScaleSchema, ScaleValue } from \"../schema/types\";\nimport type { TableValue } from \"../schema/table\";\nimport {\n BUTTON_SIZES,\n BUTTON_VARIANTS,\n CODE_MAX_LENGTH,\n DOCK_ICON_NAME_SET,\n LINK_RELS,\n LINK_VALUE_TYPES,\n RATING_DEFAULT_MAX,\n TAG_VALUE_MAX_LENGTH,\n VIDEO_TRANSCRIPT_MAX,\n VIDEO_VALUE_KEYS,\n type DockIconName,\n type ProdButtonValue,\n type ProdFormRef,\n type ProdImageCrop,\n type ProdImageValue,\n type ProdLinkValue,\n type ProdPolymorphicRef,\n type ProdTargetRef,\n type ProdVideoValue,\n type ScaleUnit,\n} from \"./prod-types\";\n\nexport interface ValueResult<T> {\n value: T;\n /** V2 keys (dotted, relative to the value) production cannot keep. */\n lost: string[];\n}\n\ntype Obj = Record<string, unknown>;\nconst isObj = (v: unknown): v is Obj => !!v && typeof v === \"object\" && !Array.isArray(v);\n\n/* ── V2 value shapes (DESIGN §6.7, §6.9; V2 HEAD controls/link.tsx, controls/media.tsx) ── */\nexport type V2LinkType = \"page\" | \"entry\" | \"url\" | \"section\" | \"email\" | \"phone\" | \"file\";\nexport type V2ButtonStyle = \"primary\" | \"secondary\" | \"outline\" | \"link\";\nexport interface V2LinkValue {\n type?: V2LinkType;\n href: string;\n label?: string;\n title?: string;\n pageId?: string;\n entryId?: string;\n anchor?: string;\n assetId?: string;\n email?: string;\n subject?: string;\n phone?: string;\n target?: \"_self\" | \"_blank\";\n newTab?: boolean;\n rel?: \"follow\" | \"nofollow\" | \"ugc\" | \"sponsored\";\n}\nexport interface V2ButtonValue extends V2LinkValue {\n style?: V2ButtonStyle;\n variant?: V2ButtonStyle;\n size?: \"sm\" | \"md\" | \"lg\";\n arrow?: boolean;\n icon?: string;\n fullWidth?: boolean;\n}\nexport type V2ImageCrop = \"original\" | \"16:9\" | \"4:3\" | \"1:1\" | \"4:5\";\nexport interface V2ImageValue {\n url: string;\n alt?: string;\n /** percent */\n focal?: { x: number; y: number };\n /** A preset to cut (written as its rect, so it needs the size), or the stored rect itself, carried as it was read. */\n crop?: V2ImageCrop | ProdImageCrop;\n caption?: string;\n name?: string;\n width?: number;\n height?: number;\n size?: number;\n id?: string;\n}\n\n/** The keys only a button carries; a link field never stores them. */\nconst BUTTON_ONLY = [\"style\", \"variant\", \"size\", \"arrow\", \"icon\", \"fullWidth\"] as const;\nconst isScriptHref = (href: string) => /^(javascript|data|vbscript):/i.test(href.replace(/[\\u0000- \\u007F]/g, \"\"));\n\n/* ── link ─────────────────────────────────────────────────────────────── */\n/**\n * F1 stores the V2 link object as sent (link-value.ts: the kit's pageId, entryId, anchor, email, phone, label… are\n * kept), plus `ref` for a page / entry link so delivery resolves it. A bare href string stays a string.\n */\nexport function linkToProd(v: V2LinkValue | string | null | undefined): ValueResult<ProdLinkValue | string | null> {\n if (v == null) return { value: null, lost: [] };\n if (typeof v === \"string\") return isScriptHref(v) ? { value: null, lost: [\"\"] } : { value: v, lost: [] };\n if (isScriptHref(v.href)) return { value: null, lost: [\"\"] };\n const lost: string[] = [];\n const out: Obj = {};\n for (const [k, x] of Object.entries(v)) {\n if ((BUTTON_ONLY as readonly string[]).includes(k)) lost.push(k);\n else out[k] = x;\n }\n if (v.type !== undefined && !(LINK_VALUE_TYPES as readonly string[]).includes(v.type)) {\n lost.push(\"type\");\n delete out.type;\n }\n // The backend refuses a target that disagrees with newTab; newTab is the one the kit reads.\n if (typeof v.newTab === \"boolean\" && v.target !== undefined && v.newTab !== (v.target === \"_blank\")) {\n lost.push(\"target\");\n delete out.target;\n }\n const ref = v.type === \"page\" ? v.pageId : v.type === \"entry\" ? v.entryId : undefined;\n if (ref) out.ref = ref;\n return { value: out as unknown as ProdLinkValue, lost };\n}\n\nexport function linkFromProd(v: unknown): V2LinkValue | string | null {\n if (typeof v === \"string\") return v;\n if (!isObj(v) || typeof v.href !== \"string\") return null;\n const { ref, ...rest } = v;\n const out = rest as unknown as V2LinkValue;\n // `ref` mirrors the kit's own id key; a ref with no twin (written by another client) becomes that key.\n if (typeof ref === \"string\") {\n if (out.type === \"page\" && out.pageId === undefined) out.pageId = ref;\n if (out.type === \"entry\" && out.entryId === undefined) out.entryId = ref;\n }\n return out;\n}\n\n/* ── button ───────────────────────────────────────────────────────────── */\n/**\n * A V2 button is a link with a label and a look, flattened. Prod's ButtonValue reads `label`, `href` (string or link\n * object), `variant`, `size`, `arrow`, `icon` (a dock icon name), `newTab`, `rel`; other keys are kept and ignored,\n * so the link half (type, pageId, anchor…) rides along as sent. The look is written as `variant` (what renderers read).\n */\nexport function buttonToProd(v: V2ButtonValue | null | undefined): ValueResult<ProdButtonValue | null> {\n if (v == null) return { value: null, lost: [] };\n if (typeof v.href === \"string\" && isScriptHref(v.href)) return { value: null, lost: [\"\"] };\n const lost: string[] = [];\n const out: Obj = { ...v };\n const valid = (x: unknown) => typeof x === \"string\" && (BUTTON_VARIANTS as readonly string[]).includes(x);\n // the first valid of variant, style is the look prod renders; an invalid variant never shadows a valid style\n const look = [v.variant, v.style].find(valid);\n if (look !== undefined) out.variant = look;\n else delete out.variant;\n if (v.variant !== undefined && !valid(v.variant)) lost.push(\"variant\");\n // Both set: the kit writes them in sync, prod keeps one look.\n if (v.style !== undefined && v.variant !== undefined && v.style === v.variant) lost.push(\"variant\");\n if (v.size !== undefined && !(BUTTON_SIZES as readonly string[]).includes(v.size)) {\n lost.push(\"size\");\n delete out.size;\n }\n if (v.icon !== undefined && !DOCK_ICON_NAME_SET.has(v.icon)) {\n lost.push(\"icon\");\n delete out.icon;\n }\n // A button's rel is one of nofollow / sponsored / ugc; \"follow\" is no rel at all.\n if (v.rel !== undefined && !(LINK_RELS as readonly string[]).includes(v.rel)) {\n lost.push(\"rel\");\n delete out.rel;\n }\n if (typeof v.newTab === \"boolean\" && v.target !== undefined && v.newTab !== (v.target === \"_blank\")) {\n lost.push(\"target\");\n delete out.target;\n }\n // fullWidth is true or false (the backend refuses anything else a write brings: button_full_width_invalid)\n if (v.fullWidth !== undefined && typeof v.fullWidth !== \"boolean\") {\n lost.push(\"fullWidth\");\n delete out.fullWidth;\n }\n // prod's ButtonValue requires both; a filled-in \"\" reads back where the kit had nothing, so it is named\n if (typeof out.label !== \"string\") {\n out.label = \"\";\n lost.push(\"label\");\n }\n if (typeof out.href !== \"string\") {\n out.href = \"\";\n lost.push(\"href\");\n }\n return { value: out as unknown as ProdButtonValue, lost: [...new Set(lost)] };\n}\n\nexport function buttonFromProd(v: unknown): V2ButtonValue | null {\n if (!isObj(v)) return null;\n const out: Obj = { ...v };\n if (isObj(v.href)) {\n // A link object in `href` (written by another client): flatten it the way the kit stores a button.\n const link = linkFromProd(v.href);\n if (isObj(link)) Object.assign(out, link);\n }\n if (out.style !== undefined && out.variant === out.style) delete out.variant;\n if (out.icon === null) delete out.icon;\n // An unfilled button: no label, and the bare \"#\" a new button block starts with (blockDefs button) or the classic\n // editor carries. It links nowhere, so it reads as V2's empty button (\"Add link\", a Page link), never as a link to a\n // section of this page. The \"\" it reads as is what an untouched form compares against, so opening it writes nothing.\n if ((out.label === undefined || out.label === \"\") && out.href === \"#\") out.href = \"\";\n return out as unknown as V2ButtonValue;\n}\n\n/* ── date / datetime ──────────────────────────────────────────────────── */\nconst ZONED = /^(.*)\\[([^\\]]+)\\]$/;\nconst NO_SECONDS = /^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2})(Z|[+-]\\d{2}:?\\d{2})?$/;\nconst OFFSET = /(?:Z|[+-]\\d{2}:?\\d{2})$/;\n\n/** A date is the same \"YYYY-MM-DD\" string on both sides. */\nexport const dateToProd = (v: string | null | undefined): ValueResult<string | null> => ({ value: v ?? null, lost: [] });\nexport const dateFromProd = (v: unknown): string | null => (typeof v === \"string\" ? v : null);\n\n/**\n * V2 stores RFC 9557 (`2026-10-14T09:00:00+05:30[Asia/Kolkata]`). Prod keeps the ISO instant with seconds and its\n * offset; a `[Zone]` suffix is checked and dropped on write. So the zone survives only as the field's own\n * `config.timezone` when that names it (pass it as `zone`); otherwise it is lost.\n */\nexport function datetimeToProd(v: string | null | undefined, opts: { zone?: string } = {}): ValueResult<string | null> {\n if (v == null || v === \"\") return { value: v ?? null, lost: [] };\n const lost: string[] = [];\n const m = ZONED.exec(v);\n let bare = m ? m[1] : v;\n // the zone reads back only from config.timezone, and only onto a value with an offset\n if (m && (m[2] !== opts.zone || !OFFSET.test(bare))) lost.push(\"zone\");\n const short = NO_SECONDS.exec(bare);\n if (short) {\n bare = `${short[1]}:00${short[2] ?? \"\"}`;\n lost.push(\"format\");\n }\n return { value: bare, lost };\n}\n\nexport function datetimeFromProd(v: unknown, opts: { zone?: string } = {}): string | null {\n if (typeof v !== \"string\") return null;\n const zone = opts.zone && opts.zone !== \"site\" ? opts.zone : undefined;\n return zone && OFFSET.test(v) && !ZONED.test(v) ? `${v}[${zone}]` : v;\n}\n\n/* ── image ────────────────────────────────────────────────────────────── */\nconst CROPS: Record<Exclude<V2ImageCrop, \"original\">, number> = { \"16:9\": 16 / 9, \"4:3\": 4 / 3, \"1:1\": 1, \"4:5\": 4 / 5 };\nconst round = (n: number) => Math.round(n * 1e6) / 1e6;\nconst clamp01 = (n: number) => Math.min(1, Math.max(0, n));\n\n/** A crop preset → the centred-on-focal rect prod stores. Needs the image's pixel size. */\nexport function cropRect(crop: V2ImageCrop, width: number, height: number, focal = { x: 50, y: 50 }): ProdImageCrop | undefined {\n if (crop === \"original\" || !(width > 0 && height > 0)) return undefined;\n const want = CROPS[crop];\n const have = width / height;\n const w = want < have ? want / have : 1;\n const h = want < have ? 1 : have / want;\n const left = clamp01(Math.min(1 - w, Math.max(0, focal.x / 100 - w / 2)));\n const top = clamp01(Math.min(1 - h, Math.max(0, focal.y / 100 - h / 2)));\n return { top: round(top), right: round(1 - left - w), bottom: round(1 - top - h), left: round(left) };\n}\n\n/** A stored rect → the preset whose aspect it cuts (within 1%), when the image's pixel size is known. */\nexport function cropPreset(rect: ProdImageCrop, width: number, height: number): V2ImageCrop | undefined {\n const w = (1 - rect.left - rect.right) * width;\n const h = (1 - rect.top - rect.bottom) * height;\n if (!(w > 0 && h > 0)) return undefined;\n const ratio = w / h;\n const hit = (Object.entries(CROPS) as [V2ImageCrop, number][]).find(([, r]) => Math.abs(ratio - r) / r < 0.01);\n return hit?.[0];\n}\n\n/** The asset facts an image value refers to but prod does not store in the value (width, height, size). */\nexport interface ImageAsset {\n width?: number;\n height?: number;\n size?: number;\n}\n\n/**\n * The contract holds against `imageFromProd(value)` with no asset (how stored defaults are read): a crop rect needs the\n * image's pixel size to read back as its preset, and width / height / size live on the asset, so all four are named in\n * `lost`. Passing the asset to imageFromProd restores them.\n */\nexport function imageToProd(v: V2ImageValue | string | null | undefined): ValueResult<ProdImageValue | string | null> {\n if (v == null) return { value: null, lost: [] };\n if (typeof v === \"string\") return { value: v, lost: [] };\n const lost: string[] = [];\n const out: ProdImageValue = { url: v.url };\n if (v.id !== undefined) out.id = v.id;\n if (v.name !== undefined) out.name = v.name;\n if (v.alt !== undefined) out.altText = v.alt;\n if (v.focal) out.focal = { x: round(v.focal.x / 100), y: round(v.focal.y / 100) };\n // A stored rect is carried as it was read (it reads back the same), a preset is cut against the picture's size, and\n // \"original\" is no crop at all. Only a preset with no size to cut against has nowhere to go.\n if (isCropRect(v.crop)) out.crop = { top: v.crop.top, right: v.crop.right, bottom: v.crop.bottom, left: v.crop.left };\n else if (typeof v.crop === \"string\" && v.crop !== \"original\") {\n const rect = v.width && v.height ? cropRect(v.crop, v.width, v.height, v.focal) : undefined;\n if (rect) out.crop = rect;\n else lost.push(\"crop\");\n }\n // The normaliser rebuilds the value from these keys; the rest is the asset's (width, height, size) or has no home.\n for (const k of [\"caption\", \"width\", \"height\", \"size\"] as const) if (v[k] !== undefined) lost.push(k);\n for (const k of Object.keys(v)) if (![\"url\", \"id\", \"name\", \"alt\", \"focal\", \"crop\", \"caption\", \"width\", \"height\", \"size\"].includes(k)) lost.push(k);\n return { value: out, lost };\n}\n\n/** A crop window as prod stores it: four 0–1 edges that leave something on both axes. */\nexport function isCropRect(v: unknown): v is ProdImageCrop {\n if (!isObj(v)) return false;\n const { top, right, bottom, left } = v as Record<string, unknown>;\n const num = (n: unknown): n is number => typeof n === \"number\" && Number.isFinite(n) && n >= 0 && n <= 1;\n return num(top) && num(right) && num(bottom) && num(left) && top + bottom < 1 && left + right < 1;\n}\n\n/**\n * Pass the asset's pixel size to read a stored crop rect back as its preset and to restore width / height / size.\n * An older value written as `{ src, alt }` (the block's own image props) reads as the same picture and alt text.\n */\nexport function imageFromProd(v: unknown, asset: ImageAsset = {}): V2ImageValue | string | null {\n if (typeof v === \"string\") return v;\n if (!isObj(v)) return null;\n const url = typeof v.url === \"string\" ? v.url : typeof v.src === \"string\" ? v.src : null;\n if (url === null) return null;\n const p = v as unknown as ProdImageValue & { alt?: unknown };\n const out: V2ImageValue = { url };\n if (p.id !== undefined) out.id = p.id;\n if (p.name !== undefined) out.name = p.name;\n if (p.altText !== undefined) out.alt = p.altText;\n else if (typeof p.alt === \"string\") out.alt = p.alt;\n if (p.focal) out.focal = { x: round(p.focal.x * 100), y: round(p.focal.y * 100) };\n if (isCropRect(p.crop)) {\n const preset = asset.width && asset.height ? cropPreset(p.crop, asset.width, asset.height) : undefined;\n out.crop = preset ?? { ...p.crop };\n }\n if (asset.width !== undefined) out.width = asset.width;\n if (asset.height !== undefined) out.height = asset.height;\n if (asset.size !== undefined) out.size = asset.size;\n return out;\n}\n\n/* ── reference ────────────────────────────────────────────────────────── */\n/**\n * A V2 reference value is the target's id. Prod reads a bare id as an ENTRY on a prop reference that takes entries\n * (backend acceptsEntries), so a page, form or collection picked there travels in the kit as `\"<kind>:<id>\"` (the\n * dock's reference services hand such picks back tagged) and is stored as `{ kind, id }` (targetRefOf). A stored\n * `{ kind, id }` reads back tagged, whatever the field takes, so a save writes the same target back.\n */\nconst TARGET_TAG = /^(page|form|collection):(.+)$/;\nexport const targetTag = (kind: ProdTargetRef[\"kind\"], id: string): string => `${kind}:${id}`;\nexport function parseTargetTag(v: string): ProdTargetRef | null {\n const m = TARGET_TAG.exec(v);\n return m ? { kind: m[1] as ProdTargetRef[\"kind\"], id: m[2] } : null;\n}\nconst isTargetRef = (v: unknown): v is ProdTargetRef =>\n isObj(v) && typeof v.kind === \"string\" && TARGET_TAG.test(`${v.kind}:x`) && typeof v.id === \"string\" && v.id !== \"\";\n\n/**\n * V2 stores the target id (`\"en_12\"`; a list for many). Prod stores the same id, or `{ entryId, modelSlug }` on a\n * polymorphic field (pass `modelSlug`), or `{ formId }` on a component `form` prop (`to: \"form\"`), or `{ kind, id }` for\n * a tagged page / form / collection pick (`\"page:pg_1\"`).\n */\nexport function referenceToProd(\n v: string | string[] | null | undefined,\n opts: { to?: \"form\"; modelSlug?: string } = {},\n): ValueResult<string | (string | ProdTargetRef)[] | ProdPolymorphicRef | ProdFormRef | ProdTargetRef | null> {\n if (v == null || v === \"\") return { value: null, lost: [] };\n if (Array.isArray(v)) return { value: v.map((x) => parseTargetTag(x) ?? x), lost: [] };\n if (opts.to === \"form\") return { value: { formId: v }, lost: [] };\n const target = parseTargetTag(v);\n if (target) return { value: target, lost: [] };\n if (opts.modelSlug) return { value: { entryId: v, modelSlug: opts.modelSlug }, lost: [] };\n return { value: v, lost: [] };\n}\n\nconst refId = (v: unknown): string | null =>\n typeof v === \"string\"\n ? v || null\n : isTargetRef(v)\n ? targetTag(v.kind, v.id)\n : isObj(v)\n ? ((typeof v.entryId === \"string\" && v.entryId) || (typeof v.formId === \"string\" && v.formId) || null)\n : null;\n\nexport function referenceFromProd(v: unknown): string | string[] | null {\n if (Array.isArray(v)) return v.map(refId).filter((x): x is string => !!x);\n return refId(v);\n}\n\n/* ── table ────────────────────────────────────────────────────────────── */\n/**\n * Prod has no table type: the schema adapter stores a V2 table as a `json` field (named in the lossy ledger), and\n * `json` keeps any JSON value, so the TableValue itself is stored verbatim (typed columns, groups, footer,\n * footnotes, caption, design, jsonLd).\n */\nexport function tableToProd(v: TableValue | null | undefined): ValueResult<TableValue | null> {\n return { value: v == null ? null : (JSON.parse(JSON.stringify(v)) as TableValue), lost: [] };\n}\nexport const tableFromProd = (v: unknown): TableValue | null => (isObj(v) ? (v as unknown as TableValue) : null);\n\n/* ── scale ────────────────────────────────────────────────────────────── */\nconst SCALE_UNITS: readonly ScaleUnit[] = [\"px\", \"%\", \"rem\", \"em\", \"vw\", \"vh\"];\n/**\n * Prod stores the three V2 scale shapes as they are (CPO D41, reference-validation.ts scaleValueProblem): a bare number,\n * a token step's string, a custom `{ value, unit }`. Pass the field's scale: a token it does not list, or a custom value\n * it does not allow (allowCustom off, a unit outside its units, past its bounds), is refused by the backend, so it is\n * not written (`lost: [\"\"]`). With no scale only a number is known to fit.\n */\nexport function scaleToProd(v: ScaleValue | null | undefined, scale?: ScaleSchema): ValueResult<ScaleValue | null> {\n if (v == null) return { value: null, lost: [] };\n if (typeof v === \"number\") return Number.isFinite(v) ? { value: v, lost: [] } : { value: null, lost: [\"\"] };\n const refused = { value: null, lost: [\"\"] };\n if (!scale) return refused;\n if (typeof v === \"string\") return Array.isArray(scale.steps) && scale.steps.some((x) => x.value === v) ? { value: v, lost: [] } : refused;\n if (!isObj(v) || !scale.allowCustom || typeof v.value !== \"number\" || !Number.isFinite(v.value) || Object.keys(v).some((k) => k !== \"value\" && k !== \"unit\")) return refused;\n const custom = typeof scale.allowCustom === \"object\" ? scale.allowCustom : {};\n const units = custom.units ?? scale.units ?? SCALE_UNITS;\n if (!units.includes(v.unit)) return refused;\n const bound = (b: number | Partial<Record<ScaleUnit, number>> | undefined) => (typeof b === \"number\" ? b : b?.[v.unit]);\n const min = bound(custom.min);\n const max = bound(custom.max);\n if ((min !== undefined && v.value < min) || (max !== undefined && v.value > max)) return refused;\n return { value: { value: v.value, unit: v.unit }, lost: [] };\n}\nexport function scaleFromProd(v: unknown): ScaleValue | null {\n if (typeof v === \"number\") return Number.isFinite(v) ? v : null;\n if (typeof v === \"string\") return v;\n if (isObj(v) && typeof v.value === \"number\" && typeof v.unit === \"string\" && (SCALE_UNITS as readonly string[]).includes(v.unit)) return { value: v.value, unit: v.unit as ScaleUnit };\n return null;\n}\n\n/* ── video ────────────────────────────────────────────────────────────── */\nexport type V2VideoValue = string | { url: string; poster?: string; autoplay?: boolean; loop?: boolean; transcript?: string };\n/** An http(s) URL or a site path; \"\" is an unset one (video-value.ts isVideoUrl). */\nconst isVideoUrl = (s: string) => s === \"\" || /^https?:\\/\\/[^\\s]+$/i.test(s.trim()) || /^\\/(?!\\/)\\S*$/.test(s.trim());\n/**\n * The V2 video value and prod's are the same shape: a URL string, or `{ url, poster?, autoplay?, loop?, transcript? }`\n * (the video block's props). The backend refuses any other key, and a url or poster that is not an http(s) URL or a\n * site path (video_value_invalid): another key is left out and named, a bad url refuses the value whole.\n */\nexport function videoToProd(v: V2VideoValue | null | undefined): ValueResult<ProdVideoValue | string | null> {\n if (v == null) return { value: null, lost: [] };\n if (typeof v === \"string\") return isVideoUrl(v) ? { value: v, lost: [] } : { value: null, lost: [\"\"] };\n if (!isObj(v) || typeof v.url !== \"string\" || !isVideoUrl(v.url)) return { value: null, lost: [\"\"] };\n const lost: string[] = [];\n const out: Obj = {};\n for (const [k, x] of Object.entries(v)) {\n const ok =\n !(VIDEO_VALUE_KEYS as readonly string[]).includes(k) ? false\n : k === \"url\" ? true\n : k === \"poster\" ? typeof x === \"string\" && isVideoUrl(x)\n : k === \"transcript\" ? typeof x === \"string\" && x.length <= VIDEO_TRANSCRIPT_MAX\n : typeof x === \"boolean\";\n if (ok) out[k] = x;\n else if (x !== undefined) lost.push(k);\n }\n return { value: out as unknown as ProdVideoValue, lost };\n}\nexport function videoFromProd(v: unknown): V2VideoValue | null {\n if (typeof v === \"string\") return v;\n if (!isObj(v) || typeof v.url !== \"string\") return null;\n return { ...v } as V2VideoValue;\n}\n\n/* ── primitive lists ──────────────────────────────────────────────────── */\nexport type ListItemType = \"text\" | \"number\" | \"date\" | \"image\" | \"link\" | \"richtext\";\n/**\n * A V2 list of one primitive (`of: [{ type }]`) is a prod `array` with `config.itemType`, each item judged and normalized\n * as a field of its type: an image item stores prod's image keys (altText, 0–1 focal), a link item its stored link. Scalar\n * and rich text items pass as they are. `lost` names `<index>/<key>` (or `<index>` for a whole item) per item.\n */\nexport function listToProd(v: unknown, itemType: ListItemType): ValueResult<unknown[] | null> {\n if (v == null) return { value: null, lost: [] };\n if (!Array.isArray(v)) return { value: null, lost: [\"\"] };\n const lost: string[] = [];\n const out: unknown[] = [];\n v.forEach((x, i) => {\n const r = itemType === \"image\" ? imageToProd(x as V2ImageValue) : itemType === \"link\" ? linkToProd(x as V2LinkValue) : { value: x, lost: [] };\n for (const l of r.lost) lost.push(l ? `${i}/${l}` : String(i));\n out.push(r.value);\n });\n return { value: out, lost };\n}\nexport function listFromProd(v: unknown, itemType: ListItemType): unknown[] {\n if (!Array.isArray(v)) return [];\n return itemType === \"image\" ? v.map((x) => imageFromProd(x)) : itemType === \"link\" ? v.map((x) => linkFromProd(x)) : [...v];\n}\n\n/* ── tags ─────────────────────────────────────────────────────────────── */\n/**\n * The backend judges tags trimmed and case-insensitively (reference-validation.ts tagsValueProblem): a field write\n * trims and de-dupes, a prop value is refused (tags_value_invalid). So the value is written clean for both: trimmed,\n * first spelling of a case-repeat kept, and an empty, over-long, off-list (`allowCustom: false`) or over-`max` tag left\n * out. `lost` names each changed or dropped tag by its index in `v`.\n */\nexport function tagsToProd(\n v: string[] | null | undefined,\n opts: { max?: number; allowCustom?: boolean; options?: (string | { value: string })[] } = {},\n): ValueResult<string[] | null> {\n if (v == null) return { value: null, lost: [] };\n const allowed = opts.allowCustom === false ? new Set((opts.options ?? []).map((o) => (typeof o === \"string\" ? o : o.value).trim().toLowerCase())) : undefined;\n const out: string[] = [];\n const seen = new Set<string>();\n const lost: string[] = [];\n v.forEach((x, i) => {\n const t = typeof x === \"string\" ? x.trim() : \"\";\n const folded = t.toLowerCase();\n const keep =\n t !== \"\" && Array.from(t).length <= TAG_VALUE_MAX_LENGTH && !seen.has(folded) && (!allowed || allowed.has(folded)) && (opts.max === undefined || out.length < opts.max);\n if (keep) {\n seen.add(folded);\n out.push(t);\n }\n if (!keep || t !== x) lost.push(String(i));\n });\n return { value: out, lost };\n}\nexport const tagsFromProd = (v: unknown): string[] => (Array.isArray(v) ? v.filter((x): x is string => typeof x === \"string\") : []);\n\n/* ── rating ───────────────────────────────────────────────────────────── */\nexport interface RatingScale {\n min?: number;\n max?: number;\n step?: number;\n}\n/**\n * A prod rating runs from config.min (0 unset) to config.max (5 unset) in steps of config.step (1 unset), and 0 is \"not\n * rated\" on every scale (validation-parity.ts ratingScale / onRatingScale). V2's empty rating is null: it is written as\n * null, and any other number off the scale is refused by the backend (rating_value_invalid), so it is not written either.\n */\nexport function ratingToProd(v: number | null | undefined, opts: RatingScale = {}): ValueResult<number | null> {\n if (v == null) return { value: null, lost: [] };\n const min = opts.min ?? 0;\n const max = opts.max ?? RATING_DEFAULT_MAX;\n const step = opts.step ?? 1;\n const steps = (v - min) / step;\n const ok = Number.isFinite(v) && v >= min && v <= max && Math.abs(steps - Math.round(steps)) < 1e-9;\n return ok ? { value: v, lost: [] } : { value: null, lost: [\"\"] };\n}\n/** A stored number back; 0 on a scale that starts above it is prod's \"not rated\", which V2 holds as null. */\nexport function ratingFromProd(v: unknown, opts: RatingScale = {}): number | null {\n if (typeof v !== \"number\" || !Number.isFinite(v)) return null;\n return v === 0 && (opts.min ?? 0) > 0 ? null : v;\n}\n\n/* ── code ─────────────────────────────────────────────────────────────── */\nexport type V2CodeValue = string | { language?: string; code: string };\n/**\n * Prod stores a code value as a string, or `{ language?, code }` (no other key). A language outside the field's\n * `config.languages` is refused by the backend (code_value_invalid), so it is left out and named; a value over\n * CODE_MAX_LENGTH characters is refused whole.\n */\nexport function codeToProd(v: V2CodeValue | null | undefined, opts: { languages?: string[] } = {}): ValueResult<V2CodeValue | null> {\n if (v == null) return { value: null, lost: [] };\n const code = typeof v === \"string\" ? v : v.code;\n if (typeof code !== \"string\" || code.length > CODE_MAX_LENGTH) return { value: null, lost: [\"\"] };\n if (typeof v === \"string\") return { value: v, lost: [] };\n const lost = Object.keys(v).filter((k) => k !== \"code\" && k !== \"language\");\n const out: { language?: string; code: string } = { code };\n if (v.language !== undefined) {\n if (typeof v.language === \"string\" && (!opts.languages || opts.languages.includes(v.language))) out.language = v.language;\n else lost.push(\"language\");\n }\n return { value: out, lost };\n}\nexport function codeFromProd(v: unknown): V2CodeValue | null {\n if (typeof v === \"string\") return v;\n if (!isObj(v) || typeof v.code !== \"string\") return null;\n return typeof v.language === \"string\" ? { language: v.language, code: v.code } : { code: v.code };\n}\n\n/* ── zoned arrays ─────────────────────────────────────────────────────── */\n/** A V2 list of object items is stored by prod as the repeatable zone of its array: `{ repeatable: [...] }`. */\nexport const zoneListToProd = (v: unknown[] | null | undefined): { repeatable: unknown[] } => ({ repeatable: v ? [...v] : [] });\nexport const zoneListFromProd = (v: unknown): unknown[] => (isObj(v) && Array.isArray(v.repeatable) ? [...v.repeatable] : Array.isArray(v) ? [...v] : []);\n\n/* ── polymorphic list (prop table, config.mode \"types\") ─────────────── */\n/** A row of a polymorphic list: V2's and prod's shape alike, `{ _key?, _type, ...fields }` (BE prop-fields typedRowIssues). */\nexport type TypedRow = Record<string, unknown> & { _type: string; _key?: string };\nconst isTypedRow = (v: unknown): v is TypedRow => isObj(v) && typeof v._type === \"string\" && v._type !== \"\";\n\n/**\n * V2 rows → the stored rows. Prod keeps V2's own row shape, so a row passes as it is after `mapRow` (its fields through\n * their plans); a row with no `_type` has no item type to be judged by (item_type_required) and is named, by index.\n */\nexport function typedRowsToProd(v: unknown, mapRow: (row: TypedRow, i: number) => Record<string, unknown> = (r) => ({ ...r })): ValueResult<unknown> {\n if (v == null) return { value: v ?? null, lost: [] };\n if (!Array.isArray(v)) return { value: v, lost: [\"(value)\"] };\n const lost: string[] = [];\n const value = v.map((row, i) => {\n if (isTypedRow(row)) return mapRow(row, i);\n lost.push(String(i));\n return row;\n });\n return { value, lost };\n}\n\n/** Stored rows → V2 rows: the same shape, each row through `mapRow`; a row that is not typed passes as stored. */\nexport function typedRowsFromProd(v: unknown, mapRow: (row: TypedRow, i: number) => Record<string, unknown> = (r) => ({ ...r })): unknown {\n if (!Array.isArray(v)) return v;\n return v.map((row, i) => (isTypedRow(row) ? mapRow(row, i) : row));\n}\n\n/** A dock icon name passes through; anything else is not a prod icon. */\nexport const isDockIcon = (v: unknown): v is DockIconName => typeof v === \"string\" && DOCK_ICON_NAME_SET.has(v);\n"],"mappings":";;AAwCA,IAAM,SAAS,MAAyB,CAAC,CAAC,KAAK,OAAO,MAAM,YAAY,CAAC,MAAM,QAAQ,CAAC;;AA8CxF,IAAM,cAAc;CAAC;CAAS;CAAW;CAAQ;CAAS;CAAQ;AAAW;AAC7E,IAAM,gBAAgB,SAAiB,gCAAgC,KAAK,KAAK,QAAQ,qBAAqB,EAAE,CAAC;;;;;AAOjH,SAAgB,WAAW,GAAwF;CACjH,IAAI,KAAK,MAAM,OAAO;EAAE,OAAO;EAAM,MAAM,CAAC;CAAE;CAC9C,IAAI,OAAO,MAAM,UAAU,OAAO,aAAa,CAAC,IAAI;EAAE,OAAO;EAAM,MAAM,CAAC,EAAE;CAAE,IAAI;EAAE,OAAO;EAAG,MAAM,CAAC;CAAE;CACvG,IAAI,aAAa,EAAE,IAAI,GAAG,OAAO;EAAE,OAAO;EAAM,MAAM,CAAC,EAAE;CAAE;CAC3D,MAAM,OAAiB,CAAC;CACxB,MAAM,MAAW,CAAC;CAClB,KAAK,MAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,CAAC,GACnC,IAAK,YAAkC,SAAS,CAAC,GAAG,KAAK,KAAK,CAAC;MAC1D,IAAI,KAAK;CAEhB,IAAI,EAAE,SAAS,KAAA,KAAa,CAAE,iBAAuC,SAAS,EAAE,IAAI,GAAG;EACrF,KAAK,KAAK,MAAM;EAChB,OAAO,IAAI;CACb;CAEA,IAAI,OAAO,EAAE,WAAW,aAAa,EAAE,WAAW,KAAA,KAAa,EAAE,YAAY,EAAE,WAAW,WAAW;EACnG,KAAK,KAAK,QAAQ;EAClB,OAAO,IAAI;CACb;CACA,MAAM,MAAM,EAAE,SAAS,SAAS,EAAE,SAAS,EAAE,SAAS,UAAU,EAAE,UAAU,KAAA;CAC5E,IAAI,KAAK,IAAI,MAAM;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AAM,cAAc,MAA8B,MAAM,CAAC,KAAK,OAAO,EAAE,UAAU,YAAY,EAAE,UAAU;;;;;AAMzG,SAAgB,gBAAgB,GAAY,UAAiE,OAAO,EAAE,GAAG,EAAE,IAA0B;CACnJ,IAAI,KAAK,MAAM,OAAO;EAAE,OAAO,KAAK;EAAM,MAAM,CAAC;CAAE;CACnD,IAAI,CAAC,MAAM,QAAQ,CAAC,GAAG,OAAO;EAAE,OAAO;EAAG,MAAM,CAAC,SAAS;CAAE;CAC5D,MAAM,OAAiB,CAAC;CAMxB,OAAO;EAAE,OALK,EAAE,KAAK,KAAK,MAAM;GAC9B,IAAI,WAAW,GAAG,GAAG,OAAO,OAAO,KAAK,CAAC;GACzC,KAAK,KAAK,OAAO,CAAC,CAAC;GACnB,OAAO;EACT,CACS;EAAO;CAAK;AACvB;;AAGA,SAAgB,kBAAkB,GAAY,UAAiE,OAAO,EAAE,GAAG,EAAE,IAAa;CACxI,IAAI,CAAC,MAAM,QAAQ,CAAC,GAAG,OAAO;CAC9B,OAAO,EAAE,KAAK,KAAK,MAAO,WAAW,GAAG,IAAI,OAAO,KAAK,CAAC,IAAI,GAAI;AACnE;;AAGA,IAAa,cAAc,MAAkC,OAAO,MAAM,YAAY,mBAAmB,IAAI,CAAC"}
@@ -0,0 +1,17 @@
1
+ /** boxicons:sparkle-circle-filled — path from public/brand/ai-sparkle-glyph.svg (viewBox 2 2 16 16). */
2
+ export declare const SPARKLE_PATH = "M9.4668 2.37243C9.64848 1.87586 10.351 1.87586 10.5326 2.37243L11.0754 3.85459C11.501 5.01732 12.1751 6.07325 13.0506 6.94879C13.9262 7.82432 14.9821 8.4984 16.1448 8.92405L17.627 9.4668C18.1243 9.64848 18.1243 10.351 17.627 10.5326L16.1448 11.0754C14.9821 11.501 13.9262 12.1751 13.0506 13.0506C12.1751 13.9262 11.501 14.9821 11.0754 16.1448L10.5326 17.627C10.351 18.1243 9.64848 18.1243 9.4668 17.627L8.92405 16.1448C8.4984 14.9821 7.82432 13.9262 6.94879 13.0506C6.07325 12.1751 5.01732 11.501 3.85459 11.0754L2.37243 10.5326C1.87586 10.351 1.87586 9.64848 2.37243 9.4668L3.85459 8.92405C5.01732 8.4984 6.07325 7.82432 6.94879 6.94879C7.82432 6.07325 8.4984 5.01732 8.92405 3.85459L9.4668 2.37243Z";
3
+ export declare const BRAND_STOPS: {
4
+ offset: number;
5
+ color: string;
6
+ }[];
7
+ /** The mark alone (square). */
8
+ export declare function LogoMark({ size, className }: {
9
+ size?: number;
10
+ className?: string;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ /** Full lockup: mark + "BetterCMS" wordmark. Height-driven (default 24px → 106px wide). */
13
+ export declare function Logo({ className, compact, height }: {
14
+ className?: string;
15
+ compact?: boolean;
16
+ height?: number;
17
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,96 @@
1
+ import { cn } from "../lib/cn.js";
2
+ import * as React from "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ //#region src/brand/logo.tsx
5
+ var ICON = [
6
+ "M12.7575 27.0001L1.51134 20.0938C0.572213 19.5171 0.000244141 18.4961 0.000244141 17.3965V8.59934C0.000244141 7.45142 0.623145 6.3933 1.62844 5.83354L9.5867 1.4023C10.4896 0.899541 11.5815 0.866267 12.5135 1.3131L23.8336 6.74014L14.354 12.1618C13.3665 12.7265 12.7575 13.7747 12.7575 14.9096V27.0001Z",
7
+ "M14.3398 16.0219V18.8735L22.2169 13.8627C23.1316 13.2808 23.6853 12.2739 23.6853 11.1921V8.29945L15.7983 13.3576C14.8893 13.9406 14.3398 14.9443 14.3398 16.0219Z",
8
+ "M14.3398 22.2591V25.1107L22.2169 20.0999C23.1316 19.518 23.6853 18.5111 23.6853 17.4293V14.5367L15.7983 19.5948C14.8893 20.1779 14.3398 21.1815 14.3398 22.2591Z"
9
+ ];
10
+ var WORD = [
11
+ "M70.5658 20.3613V10.9967H72.1245V12.1933C72.8865 11.2048 73.8044 10.8407 75.2418 10.9274V12.7136C73.2675 12.6095 72.1245 13.598 72.1245 15.4362V20.3613H70.5658Z",
12
+ "M65.4408 20.5694C62.8083 20.5694 61.1977 18.4537 61.1977 15.679C61.1977 12.8696 62.8603 10.8406 65.3888 10.8406C67.8134 10.8406 69.4067 12.7309 69.4067 15.4015V16.0779H62.8083C62.9123 17.76 63.8994 19.0433 65.4408 19.0433C66.5319 19.0433 67.4497 18.4363 67.9866 17.2744L69.2682 17.9161C68.4889 19.7023 67.138 20.5694 65.4408 20.5694ZM62.8776 14.6212H67.7615C67.5883 13.2858 66.705 12.3494 65.3888 12.3494C64.0207 12.3494 63.1028 13.3379 62.8776 14.6212Z",
13
+ "M59.2561 20.5693C57.5935 20.5693 56.918 19.9276 56.918 18.2975V12.5053H55.394V10.9966H56.918V8.37799H58.4767V10.9966H60.3298V12.5053H58.4767V18.072C58.4767 18.8524 58.8231 19.0085 59.3253 19.0085H60.4164V20.4999C60.07 20.5346 59.6371 20.5693 59.2561 20.5693Z",
14
+ "M53.3658 20.5693C51.7033 20.5693 51.0278 19.9276 51.0278 18.2975V12.5053H49.5038V10.9966H51.0278V8.37799H52.5865V10.9966H54.4396V12.5053H52.5865V18.072C52.5865 18.8524 52.9329 19.0085 53.4351 19.0085H54.5262V20.4999C54.1798 20.5346 53.7469 20.5693 53.3658 20.5693Z",
15
+ "M44.9815 20.5695C42.3491 20.5695 40.7384 18.4538 40.7384 15.6791C40.7384 12.8697 42.401 10.8408 44.9296 10.8408C47.3542 10.8408 48.9475 12.731 48.9475 15.4016V16.078H42.3491C42.453 17.7601 43.4402 19.0434 44.9815 19.0434C46.0726 19.0434 46.9905 18.4365 47.5274 17.2746L48.8089 17.9162C48.0296 19.7024 46.6787 20.5695 44.9815 20.5695ZM42.4184 14.6213H47.3022C47.129 13.286 46.2458 12.3495 44.9296 12.3495C43.5614 12.3495 42.6435 13.338 42.4184 14.6213Z",
16
+ "M29.834 20.3613V7.32031H35.1162C37.6447 7.32031 39.0995 8.5169 39.0995 10.5806C39.0995 11.8639 38.5279 12.8697 37.4542 13.4593C38.8743 13.9449 39.6537 15.0894 39.6537 16.5808C39.6537 18.8353 37.8352 20.3613 35.1854 20.3613H29.834ZM31.3927 12.7483H34.6486C36.4151 12.7483 37.5581 11.9506 37.5581 10.6673C37.5581 9.52272 36.6229 8.86373 35.0469 8.86373H31.3927V12.7483ZM31.3927 18.8006H35.0642C36.9346 18.8006 38.0603 17.9682 38.043 16.5808C38.0603 15.1415 36.848 14.257 34.891 14.257H31.3927V18.8006Z",
17
+ "M107.608 20.6788C104.835 20.6788 103.115 19.3074 102.697 16.7653L104.2 16.4643C104.501 18.2538 105.637 19.1736 107.524 19.1736C109.345 19.1736 110.614 18.3039 110.614 17.0663C110.614 15.9793 109.629 15.2267 107.224 14.5242C104.301 13.688 103.048 12.4504 103.048 10.7111C103.048 8.72086 104.685 7.48326 107.307 7.48326C109.862 7.48326 111.399 8.65396 111.917 10.895L110.364 11.2295C110.03 9.72433 109.027 8.97173 107.274 8.97173C105.637 8.97173 104.618 9.60726 104.618 10.6943C104.618 11.6978 105.47 12.3835 107.858 13.1194C110.998 14.0727 112.167 15.3103 112.167 17.0663C112.167 19.2572 110.38 20.6788 107.608 20.6788Z",
18
+ "M89.8249 20.3612V7.78442H91.7289L95.871 18.2204L99.9463 7.78442H101.85V20.3612H100.347V10.6945L96.5725 20.3612H95.1695L91.328 10.6945V20.3612H89.8249Z",
19
+ "M83.2802 20.6788C79.6558 20.6788 77.0837 18.0364 77.0837 14.24C77.0837 10.3766 79.8061 7.4833 83.4639 7.4833C85.9692 7.4833 87.9902 8.82125 88.9756 11.079L87.3889 11.4303C86.6206 9.90833 85.2009 9.02194 83.4305 9.02194C80.6579 9.02194 78.7038 11.1961 78.7038 14.1731C78.7038 17.0998 80.5911 19.1569 83.2635 19.1569C85.2343 19.1569 86.8043 18.0364 87.5392 16.1967L89.0424 16.5312C88.0737 19.1569 86.036 20.6788 83.2802 20.6788Z"
20
+ ];
21
+ /** boxicons:sparkle-circle-filled — path from public/brand/ai-sparkle-glyph.svg (viewBox 2 2 16 16). */
22
+ var SPARKLE_PATH = "M9.4668 2.37243C9.64848 1.87586 10.351 1.87586 10.5326 2.37243L11.0754 3.85459C11.501 5.01732 12.1751 6.07325 13.0506 6.94879C13.9262 7.82432 14.9821 8.4984 16.1448 8.92405L17.627 9.4668C18.1243 9.64848 18.1243 10.351 17.627 10.5326L16.1448 11.0754C14.9821 11.501 13.9262 12.1751 13.0506 13.0506C12.1751 13.9262 11.501 14.9821 11.0754 16.1448L10.5326 17.627C10.351 18.1243 9.64848 18.1243 9.4668 17.627L8.92405 16.1448C8.4984 14.9821 7.82432 13.9262 6.94879 13.0506C6.07325 12.1751 5.01732 11.501 3.85459 11.0754L2.37243 10.5326C1.87586 10.351 1.87586 9.64848 2.37243 9.4668L3.85459 8.92405C5.01732 8.4984 6.07325 7.82432 6.94879 6.94879C7.82432 6.07325 8.4984 5.01732 8.92405 3.85459L9.4668 2.37243Z";
23
+ var BRAND_STOPS = [
24
+ {
25
+ offset: .0817,
26
+ color: "#A878D2"
27
+ },
28
+ {
29
+ offset: .4808,
30
+ color: "#ED6262"
31
+ },
32
+ {
33
+ offset: .9231,
34
+ color: "#D13A3A"
35
+ }
36
+ ];
37
+ function MarkGradient({ id }) {
38
+ return /* @__PURE__ */ jsx("linearGradient", {
39
+ id,
40
+ x1: "8.81595",
41
+ y1: "-2.84571",
42
+ x2: "18.8801",
43
+ y2: "29.1204",
44
+ gradientUnits: "userSpaceOnUse",
45
+ children: BRAND_STOPS.map((s) => /* @__PURE__ */ jsx("stop", {
46
+ offset: s.offset,
47
+ stopColor: s.color
48
+ }, s.offset))
49
+ });
50
+ }
51
+ /** The mark alone (square). */
52
+ function LogoMark({ size = 24, className }) {
53
+ const id = React.useId().replace(/:/g, "");
54
+ return /* @__PURE__ */ jsxs("svg", {
55
+ width: size,
56
+ height: size,
57
+ viewBox: "-1 0 26 28",
58
+ className: cn("shrink-0", className),
59
+ "aria-hidden": true,
60
+ children: [/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(MarkGradient, { id: `bm${id}` }) }), ICON.map((d) => /* @__PURE__ */ jsx("path", {
61
+ d,
62
+ fill: `url(#bm${id})`
63
+ }, d.slice(0, 12)))]
64
+ });
65
+ }
66
+ /** Full lockup: mark + "BetterCMS" wordmark. Height-driven (default 24px → 106px wide). */
67
+ function Logo({ className, compact, height = 24 }) {
68
+ const id = React.useId().replace(/:/g, "");
69
+ if (compact) return /* @__PURE__ */ jsx(LogoMark, {
70
+ size: height,
71
+ className
72
+ });
73
+ return /* @__PURE__ */ jsxs("svg", {
74
+ height,
75
+ width: height * 113 / 28,
76
+ viewBox: "0 0 113 28",
77
+ className: cn("shrink-0 text-[var(--kit-wordmark,#291018)] [.dark_&]:text-[var(--kit-fg,#e1e1e4)]", className),
78
+ role: "img",
79
+ "aria-label": "BetterCMS",
80
+ children: [
81
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(MarkGradient, { id: `bl${id}` }) }),
82
+ ICON.map((d) => /* @__PURE__ */ jsx("path", {
83
+ d,
84
+ fill: `url(#bl${id})`
85
+ }, d.slice(0, 12))),
86
+ WORD.map((d) => /* @__PURE__ */ jsx("path", {
87
+ d,
88
+ fill: "currentColor"
89
+ }, d.slice(0, 12)))
90
+ ]
91
+ });
92
+ }
93
+ //#endregion
94
+ export { BRAND_STOPS, Logo, LogoMark, SPARKLE_PATH };
95
+
96
+ //# sourceMappingURL=logo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logo.js","names":[],"sources":["../../src/brand/logo.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../lib/cn\";\n\n/* OFFICIAL BetterCMS logo — exported from the V2 Figma (node 60995:8678 \"Link - BetterCMS home\").\n Mark: three facets with the brand gradient (#A878D2 → #ED6262 → #D13A3A).\n Wordmark: --wordmark (#291018 on light, = --fg on dark; kit.css has no wordmark token yet, so the V2 values are the fallbacks). Never redraw or recolor the mark. */\n\nconst ICON = [\"M12.7575 27.0001L1.51134 20.0938C0.572213 19.5171 0.000244141 18.4961 0.000244141 17.3965V8.59934C0.000244141 7.45142 0.623145 6.3933 1.62844 5.83354L9.5867 1.4023C10.4896 0.899541 11.5815 0.866267 12.5135 1.3131L23.8336 6.74014L14.354 12.1618C13.3665 12.7265 12.7575 13.7747 12.7575 14.9096V27.0001Z\", \"M14.3398 16.0219V18.8735L22.2169 13.8627C23.1316 13.2808 23.6853 12.2739 23.6853 11.1921V8.29945L15.7983 13.3576C14.8893 13.9406 14.3398 14.9443 14.3398 16.0219Z\", \"M14.3398 22.2591V25.1107L22.2169 20.0999C23.1316 19.518 23.6853 18.5111 23.6853 17.4293V14.5367L15.7983 19.5948C14.8893 20.1779 14.3398 21.1815 14.3398 22.2591Z\"];\nconst WORD = [\"M70.5658 20.3613V10.9967H72.1245V12.1933C72.8865 11.2048 73.8044 10.8407 75.2418 10.9274V12.7136C73.2675 12.6095 72.1245 13.598 72.1245 15.4362V20.3613H70.5658Z\", \"M65.4408 20.5694C62.8083 20.5694 61.1977 18.4537 61.1977 15.679C61.1977 12.8696 62.8603 10.8406 65.3888 10.8406C67.8134 10.8406 69.4067 12.7309 69.4067 15.4015V16.0779H62.8083C62.9123 17.76 63.8994 19.0433 65.4408 19.0433C66.5319 19.0433 67.4497 18.4363 67.9866 17.2744L69.2682 17.9161C68.4889 19.7023 67.138 20.5694 65.4408 20.5694ZM62.8776 14.6212H67.7615C67.5883 13.2858 66.705 12.3494 65.3888 12.3494C64.0207 12.3494 63.1028 13.3379 62.8776 14.6212Z\", \"M59.2561 20.5693C57.5935 20.5693 56.918 19.9276 56.918 18.2975V12.5053H55.394V10.9966H56.918V8.37799H58.4767V10.9966H60.3298V12.5053H58.4767V18.072C58.4767 18.8524 58.8231 19.0085 59.3253 19.0085H60.4164V20.4999C60.07 20.5346 59.6371 20.5693 59.2561 20.5693Z\", \"M53.3658 20.5693C51.7033 20.5693 51.0278 19.9276 51.0278 18.2975V12.5053H49.5038V10.9966H51.0278V8.37799H52.5865V10.9966H54.4396V12.5053H52.5865V18.072C52.5865 18.8524 52.9329 19.0085 53.4351 19.0085H54.5262V20.4999C54.1798 20.5346 53.7469 20.5693 53.3658 20.5693Z\", \"M44.9815 20.5695C42.3491 20.5695 40.7384 18.4538 40.7384 15.6791C40.7384 12.8697 42.401 10.8408 44.9296 10.8408C47.3542 10.8408 48.9475 12.731 48.9475 15.4016V16.078H42.3491C42.453 17.7601 43.4402 19.0434 44.9815 19.0434C46.0726 19.0434 46.9905 18.4365 47.5274 17.2746L48.8089 17.9162C48.0296 19.7024 46.6787 20.5695 44.9815 20.5695ZM42.4184 14.6213H47.3022C47.129 13.286 46.2458 12.3495 44.9296 12.3495C43.5614 12.3495 42.6435 13.338 42.4184 14.6213Z\", \"M29.834 20.3613V7.32031H35.1162C37.6447 7.32031 39.0995 8.5169 39.0995 10.5806C39.0995 11.8639 38.5279 12.8697 37.4542 13.4593C38.8743 13.9449 39.6537 15.0894 39.6537 16.5808C39.6537 18.8353 37.8352 20.3613 35.1854 20.3613H29.834ZM31.3927 12.7483H34.6486C36.4151 12.7483 37.5581 11.9506 37.5581 10.6673C37.5581 9.52272 36.6229 8.86373 35.0469 8.86373H31.3927V12.7483ZM31.3927 18.8006H35.0642C36.9346 18.8006 38.0603 17.9682 38.043 16.5808C38.0603 15.1415 36.848 14.257 34.891 14.257H31.3927V18.8006Z\", \"M107.608 20.6788C104.835 20.6788 103.115 19.3074 102.697 16.7653L104.2 16.4643C104.501 18.2538 105.637 19.1736 107.524 19.1736C109.345 19.1736 110.614 18.3039 110.614 17.0663C110.614 15.9793 109.629 15.2267 107.224 14.5242C104.301 13.688 103.048 12.4504 103.048 10.7111C103.048 8.72086 104.685 7.48326 107.307 7.48326C109.862 7.48326 111.399 8.65396 111.917 10.895L110.364 11.2295C110.03 9.72433 109.027 8.97173 107.274 8.97173C105.637 8.97173 104.618 9.60726 104.618 10.6943C104.618 11.6978 105.47 12.3835 107.858 13.1194C110.998 14.0727 112.167 15.3103 112.167 17.0663C112.167 19.2572 110.38 20.6788 107.608 20.6788Z\", \"M89.8249 20.3612V7.78442H91.7289L95.871 18.2204L99.9463 7.78442H101.85V20.3612H100.347V10.6945L96.5725 20.3612H95.1695L91.328 10.6945V20.3612H89.8249Z\", \"M83.2802 20.6788C79.6558 20.6788 77.0837 18.0364 77.0837 14.24C77.0837 10.3766 79.8061 7.4833 83.4639 7.4833C85.9692 7.4833 87.9902 8.82125 88.9756 11.079L87.3889 11.4303C86.6206 9.90833 85.2009 9.02194 83.4305 9.02194C80.6579 9.02194 78.7038 11.1961 78.7038 14.1731C78.7038 17.0998 80.5911 19.1569 83.2635 19.1569C85.2343 19.1569 86.8043 18.0364 87.5392 16.1967L89.0424 16.5312C88.0737 19.1569 86.036 20.6788 83.2802 20.6788Z\"];\n/** boxicons:sparkle-circle-filled — path from public/brand/ai-sparkle-glyph.svg (viewBox 2 2 16 16). */\nexport const SPARKLE_PATH = \"M9.4668 2.37243C9.64848 1.87586 10.351 1.87586 10.5326 2.37243L11.0754 3.85459C11.501 5.01732 12.1751 6.07325 13.0506 6.94879C13.9262 7.82432 14.9821 8.4984 16.1448 8.92405L17.627 9.4668C18.1243 9.64848 18.1243 10.351 17.627 10.5326L16.1448 11.0754C14.9821 11.501 13.9262 12.1751 13.0506 13.0506C12.1751 13.9262 11.501 14.9821 11.0754 16.1448L10.5326 17.627C10.351 18.1243 9.64848 18.1243 9.4668 17.627L8.92405 16.1448C8.4984 14.9821 7.82432 13.9262 6.94879 13.0506C6.07325 12.1751 5.01732 11.501 3.85459 11.0754L2.37243 10.5326C1.87586 10.351 1.87586 9.64848 2.37243 9.4668L3.85459 8.92405C5.01732 8.4984 6.07325 7.82432 6.94879 6.94879C7.82432 6.07325 8.4984 5.01732 8.92405 3.85459L9.4668 2.37243Z\";\nexport const BRAND_STOPS = [\n { offset: 0.0817, color: \"#A878D2\" },\n { offset: 0.4808, color: \"#ED6262\" },\n { offset: 0.9231, color: \"#D13A3A\" },\n];\n\nfunction MarkGradient({ id }: { id: string }) {\n return (\n <linearGradient id={id} x1=\"8.81595\" y1=\"-2.84571\" x2=\"18.8801\" y2=\"29.1204\" gradientUnits=\"userSpaceOnUse\">\n {BRAND_STOPS.map((s) => <stop key={s.offset} offset={s.offset} stopColor={s.color} />)}\n </linearGradient>\n );\n}\n\n/** The mark alone (square). */\nexport function LogoMark({ size = 24, className }: { size?: number; className?: string }) {\n const id = React.useId().replace(/:/g, \"\");\n return (\n <svg width={size} height={size} viewBox=\"-1 0 26 28\" className={cn(\"shrink-0\", className)} aria-hidden>\n <defs><MarkGradient id={`bm${id}`} /></defs>\n {ICON.map((d) => <path key={d.slice(0, 12)} d={d} fill={`url(#bm${id})`} />)}\n </svg>\n );\n}\n\n/** Full lockup: mark + \"BetterCMS\" wordmark. Height-driven (default 24px → 106px wide). */\nexport function Logo({ className, compact, height = 24 }: { className?: string; compact?: boolean; height?: number }) {\n const id = React.useId().replace(/:/g, \"\");\n if (compact) return <LogoMark size={height} className={className} />;\n return (\n <svg height={height} width={(height * 113) / 28} viewBox=\"0 0 113 28\" className={cn(\"shrink-0 text-[var(--kit-wordmark,#291018)] [.dark_&]:text-[var(--kit-fg,#e1e1e4)]\", className)} role=\"img\" aria-label=\"BetterCMS\">\n <defs><MarkGradient id={`bl${id}`} /></defs>\n {ICON.map((d) => <path key={d.slice(0, 12)} d={d} fill={`url(#bl${id})`} />)}\n {WORD.map((d) => <path key={d.slice(0, 12)} d={d} fill=\"currentColor\" />)}\n </svg>\n );\n}\n"],"mappings":";;;;AAOA,IAAM,OAAO;CAAC;CAAgT;CAAqK;AAAkK;AACroB,IAAM,OAAO;CAAC;CAAoK;CAAyc;CAAsQ;CAA4Q;CAAuc;CAAuf;CAA8mB;CAA0J;AAA4a;;AAE/vG,IAAa,eAAe;AAC5B,IAAa,cAAc;CACzB;EAAE,QAAQ;EAAQ,OAAO;CAAU;CACnC;EAAE,QAAQ;EAAQ,OAAO;CAAU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GAA9C,EAAE,MAAM,GAAG,EAAE,CAAiC,CAAC;GAC1E,KAAK,KAAK,MAAM,oBAAC,QAAD;IAA8B;IAAG,MAAK;GAAgB,GAA3C,EAAE,MAAM,GAAG,EAAE,CAA8B,CAAC;EACrE;;AAET"}
@@ -0,0 +1,359 @@
1
+ /**
2
+ * Kit runtime contexts (V2 HEAD 9829bf1 kit/context.tsx).
3
+ *
4
+ * - KitServices — pluggable app services (media library picker, upload sink, toast, AI rewrite, comment threads).
5
+ * Hosts register theirs once (`registerKitServices`) or provide them (`KitServicesProvider`); the kit
6
+ * never imports a feature. A service that is absent hides the surface that needs it.
7
+ * - KitEnv — the editing environment a control renders in: variant (panel | document), doc identity, site
8
+ * palette, permissions, presence, comments. Has safe defaults so a control can render alone.
9
+ * - FormApi — present only inside <SchemaForm>: value, writes, navigation, issues, baselines, history.
10
+ */
11
+ import * as React from "react";
12
+ import type { Cap } from "./schema/sources";
13
+ import type { FieldAccess, FieldPath, FieldSchema, Fieldset, TypeSchema } from "./schema/types";
14
+ import type { KitIssue } from "./lib/validate";
15
+ import type { ControlProps } from "./types";
16
+ import type { LinkTarget } from "./controls/link";
17
+ /** The media asset a picker hands back (the host's media library row, narrowed to what the kit reads). */
18
+ export interface KitMediaAsset {
19
+ id: string;
20
+ url: string;
21
+ name?: string;
22
+ alt?: string;
23
+ kind?: "image" | "video" | "file" | "svg";
24
+ width?: number;
25
+ height?: number;
26
+ size?: number;
27
+ }
28
+ export interface KitMediaPickerProps {
29
+ open: boolean;
30
+ onOpenChange: (v: boolean) => void;
31
+ onPick: (assets: KitMediaAsset[]) => void;
32
+ multiple?: boolean;
33
+ accept?: ("image" | "video" | "file" | "svg")[];
34
+ /** What the dialog is for, in the author's words ("Replace icon"). Absent: the host's own title. */
35
+ title?: string;
36
+ /** An icon's Remove, in the dialog's footer (its row has no room for one). Absent: no Remove. */
37
+ onRemove?: () => void;
38
+ /**
39
+ * An icon's first tab: the icons already on this site, each with the value it is stored as. The field's own icon
40
+ * leads, marked `current`: picking it closes the dialog with no write. Absent: no such tab.
41
+ */
42
+ icons?: KitSiteIcon[];
43
+ onPickIcon?: (value: unknown) => void;
44
+ }
45
+ /** One icon already on the site (KitServices.useSiteIcons), as the picker's first tab draws it. */
46
+ export interface KitSiteIcon {
47
+ url: string;
48
+ value: unknown;
49
+ assetId?: string;
50
+ current?: boolean;
51
+ }
52
+ export interface KitToastOptions {
53
+ /** the second line under the message (V2 sonner `description`) */
54
+ description?: string;
55
+ action?: {
56
+ label: string;
57
+ onClick: () => void;
58
+ };
59
+ duration?: number;
60
+ icon?: React.ReactNode;
61
+ }
62
+ /** The host's toaster. The kit has no toast dependency (V2 re-exported sonner's). */
63
+ export interface KitToast {
64
+ (message: string, opts?: KitToastOptions): void;
65
+ success: (message: string, opts?: KitToastOptions) => void;
66
+ }
67
+ /** Rewrite with AI presets (V2 lib/ai.ts). The host's `aiRewrite` service produces the text. */
68
+ export type AiPreset = "improve" | "shorter" | "longer" | "simplify" | "grammar" | "translate";
69
+ export declare const AI_PRESETS: {
70
+ id: AiPreset;
71
+ label: string;
72
+ }[];
73
+ /** The in-place field comments popover (V2 FieldThreads over the comments store), drawn by the host. */
74
+ export interface KitFieldCommentsProps {
75
+ docId: string;
76
+ /** pathKey of the field ("items.1.answer") */
77
+ fieldKey: string;
78
+ label: string;
79
+ /** the field's text, first 80 characters */
80
+ quote?: string;
81
+ onClose: () => void;
82
+ /** "Open in panel": set when the host has a comments panel (`env.onComment`) */
83
+ onOpenPanel?: () => void;
84
+ }
85
+ /** One field's ⋯ menu, as the host's extra items see it (KitServices.FieldMenuExtras). */
86
+ export interface KitFieldMenuExtrasProps {
87
+ field: FieldSchema;
88
+ path: FieldPath;
89
+ /** the field is read-only for the lens: a host offers nothing that edits */
90
+ readOnly: boolean;
91
+ }
92
+ export interface KitServices {
93
+ /** The media library picker. */
94
+ MediaPicker?: React.ComponentType<KitMediaPickerProps>;
95
+ /** Called after an upload so the host can file the assets into its media library. */
96
+ onUploaded?: (assets: KitMediaAsset[]) => void;
97
+ /**
98
+ * Image placements keep their edits BESIDE the url (`${name}Alt` · `${name}Focal` · `${name}Crop` ·
99
+ * `${name}Decorative`) instead of turning the value into an object — the Visuals block model.
100
+ */
101
+ imageSiblings?: boolean;
102
+ /** Real metadata for an image url (the host's media library), so captions never show placeholders. */
103
+ resolveImage?: (url: string) => {
104
+ name?: string;
105
+ width?: number;
106
+ height?: number;
107
+ size?: number;
108
+ } | undefined;
109
+ /** The host's full image editor (crop, rotate, focal, alt…), opened in place. */
110
+ editImage?: (req: {
111
+ docId: string;
112
+ path: FieldPath;
113
+ title: string;
114
+ }) => void;
115
+ /** The project's forms for `reference: { to: ["form"] }` (the host's Forms store). */
116
+ forms?: () => {
117
+ id: string;
118
+ title: string;
119
+ subtitle: string;
120
+ }[];
121
+ /** Toasts for Copy / Paste / Reset / AI (each with Undo). Absent → the action still runs, silently. */
122
+ toast?: KitToast;
123
+ /**
124
+ * A slug's "Save new address" with "Redirect it to the new address" ticked (V2 SlugControl): the host files the
125
+ * redirect from the old slug to the new one. Absent → no checkbox is offered, and the toast says the old address
126
+ * will return "Not found", which is what happens. A rejection is named in a toast (the new slug is already saved).
127
+ */
128
+ redirectSlug?: (from: string, to: string) => void | Promise<void>;
129
+ /**
130
+ * A slug's "Save new address": the host writes the new address before any redirect is filed. Absent → the form's
131
+ * value is the save (V2). A rejection is named in a toast and the old-address box stays for another try.
132
+ */
133
+ saveSlug?: (to: string) => Promise<void>;
134
+ /** Rewrite with AI. Absent → the ⋯ menu offers no rewrite. `attempt` counts "Try again" presses. */
135
+ aiRewrite?: (text: string, preset: AiPreset, attempt: number) => string | Promise<string>;
136
+ /** In-place field comments. Absent and no `env.onComment` → the field shows no add-comment control. */
137
+ FieldComments?: React.ComponentType<KitFieldCommentsProps>;
138
+ /**
139
+ * A React hook: open (unresolved) threads on one field, read from the same store FieldComments draws (V2 counted
140
+ * `useBlockThreads(docId, key)`). Used while the host has no `env.onComment`; absent → SchemaForm `comments` counts.
141
+ */
142
+ useFieldCommentCount?: (docId: string, fieldKey: string) => number;
143
+ /**
144
+ * The host's own control for a type (a FieldRenderer arm in the dashboard), drawn for a stored value a kit control
145
+ * hands off because it cannot carry it unchanged (rich text, LegacyFallback). Bare inside the kit FieldShell, which
146
+ * owns the label row and the help; the box is tagged `data-kit-legacy`. Absent → the field says why in words.
147
+ */
148
+ LegacyControl?: React.ComponentType<ControlProps>;
149
+ /**
150
+ * The host's own items for a field's ⋯ menu (the entry editor's Move up · Move down · Move to panel), drawn after
151
+ * History and before Rewrite with AI. It renders kit `MenuItem`s, with its own leading `MenuSeparator`, or null.
152
+ * Absent → the menu is exactly V2's.
153
+ */
154
+ FieldMenuExtras?: React.ComponentType<KitFieldMenuExtrasProps>;
155
+ /**
156
+ * A React HOOK: the project's pages and CMS items a link can point at (controls/link.tsx). The host passes the same
157
+ * function for the life of the form (it is called on every render of a link control). Absent → the link picker says
158
+ * page search isn't available and takes a typed path. `error` is a whole sentence naming what failed ("Pages couldn't
159
+ * be loaded: …", "Items from Blog couldn't be loaded: …"); the picker shows it under whatever did load.
160
+ */
161
+ useLinkTargets?: () => {
162
+ targets: LinkTarget[];
163
+ loading?: boolean;
164
+ error?: string;
165
+ };
166
+ /**
167
+ * A React HOOK: every SVG the site already uses (its pages, header and footer, the library's SVGs), for an icon's
168
+ * picker. The host passes the same function for the life of the form. Absent → the picker has no site tab.
169
+ */
170
+ useSiteIcons?: () => KitSiteIcon[];
171
+ }
172
+ /** Register app services once at module load (e.g. the Content feature registers its media library). */
173
+ export declare function registerKitServices(s: KitServices): void;
174
+ export declare function KitServicesProvider({ value, children }: {
175
+ value: KitServices;
176
+ children: React.ReactNode;
177
+ }): import("react/jsx-runtime").JSX.Element;
178
+ export declare function useKitServices(): KitServices;
179
+ /** A host header element a top-level field (by path key) renders its actions into, instead of a label row. */
180
+ export declare const FieldHeaderSlot: React.Context<{
181
+ key: string;
182
+ el: HTMLElement;
183
+ } | null>;
184
+ export type KitVariant = "panel" | "document";
185
+ export interface KitPeer {
186
+ id?: string;
187
+ name: string;
188
+ avatar?: string;
189
+ /** presence colour (avatar ring, field border, caret flag) */
190
+ color?: string;
191
+ /** "editing" (soft lock + border) or "viewing" */
192
+ status?: "editing" | "viewing";
193
+ }
194
+ export interface Swatch {
195
+ name: string;
196
+ value: string;
197
+ token?: string;
198
+ }
199
+ /** V2's demo site palette (Caldera). Hosts pass the project's brand palette through `env.palette`. */
200
+ export declare const SITE_PALETTE: Swatch[];
201
+ export interface KitEnv {
202
+ variant: KitVariant;
203
+ /** Identity of the document/block being edited (rich-text sync, comments, history). */
204
+ docId: string;
205
+ /** The document's title — slug generation. */
206
+ docTitle?: string;
207
+ /** Public URL prefix for slug previews, e.g. "caldera.bettercms.site/journal/". */
208
+ urlPrefix?: string;
209
+ /** The document has been published (slug changes warn about the old address). */
210
+ isPublished?: boolean;
211
+ /**
212
+ * The form's slug is the document's ADDRESS (a page's or an entry's URL). Only then does a changed slug on a published
213
+ * document say the old address will stop working and offer the redirect. A slug prop or a key is not an address, so
214
+ * it gets no such box (V2 draws it on document hosts only: its component-prop forms pass no published state).
215
+ */
216
+ slugIsAddress?: boolean;
217
+ palette: Swatch[];
218
+ /** The whole form is read-only for the lens (the host's content.edit rule, a generated twin…). */
219
+ readOnly: boolean;
220
+ /**
221
+ * D58: the host's access check for the lens (`useCan` at the host). The kit never imports the store; it asks this for
222
+ * field-level `access` and for developer surfaces (field keys, IDs, API names: `schema.view` or `api.view`).
223
+ * Hosts that omit it (staff tools, demos) get allow-all.
224
+ */
225
+ can: (cap: Cap) => boolean;
226
+ /** pathKey → teammates in that field */
227
+ presence: Record<string, KitPeer[]>;
228
+ /** pathKey → open comment threads */
229
+ comments: Record<string, number>;
230
+ /** Host comment panel. When absent, field comments live in the in-place popover only. */
231
+ /** `quote`: the words selected in a rich text field when the comment came from its toolbar */
232
+ onComment?: (path: FieldPath, field: FieldSchema, quote?: string) => void;
233
+ /** The whole form is a global block ("Navigation") — every field is synced. */
234
+ syncedFrom?: string;
235
+ /** "Open {title}" on a reference card: the host edits the referenced entry in place (stacked panel). */
236
+ onOpenReference?: (ref: {
237
+ collectionId: string;
238
+ entryId: string;
239
+ title: string;
240
+ }) => void;
241
+ /** CPO D39: "inline" (default) shows help under the label; "tooltip" moves it behind the ⓘ — for dense hosts (grid cells, popovers). */
242
+ helpDisplay?: "inline" | "tooltip";
243
+ /** D61 Review changes: the host's change markers, present only while its History panel is open. */
244
+ review?: KitReview;
245
+ /**
246
+ * "quiet": a meta-form, like the schema editor's field settings (founder call, 2026-10-05). No comment, ⋯ or per-field
247
+ * undo on the fields, and an on/off field is a label-left row with its switch on the right (the inspector's PRow), not a
248
+ * switch card. "preview": the same chrome-free fields, controls exactly as editors see them (a schema preview, where a
249
+ * comment would land on a sample, never a real document). Default "full".
250
+ */
251
+ fieldChrome?: "full" | "preview" | "quiet";
252
+ /**
253
+ * A host's own control for one field, by its path key ("type", "options"), drawn inside the usual shell. The schema
254
+ * editor's field settings plug their Type, Options, Key and Show this field controls in here. Absent = kit controls only.
255
+ */
256
+ controls?: Record<string, React.ComponentType<ControlProps>>;
257
+ /**
258
+ * A collapsed fieldset's summary as chips, from the host (the schema editor's field settings: "Required", "3 options").
259
+ * `undefined` falls back to the kit's own one-line summary. Keep it stable (a new function re-renders the form).
260
+ */
261
+ sectionSummary?: (set: Fieldset, value: Record<string, unknown>) => string[] | undefined;
262
+ }
263
+ /**
264
+ * D61 Review changes, as the kit sees it. The host owns the history model; the kit only asks, per field path, whether
265
+ * it changed in the range, and renders the host's marker (a 2px bar in the author's colour at the field's left edge,
266
+ * with its hover card) where the at-rest "changed" dot would be.
267
+ */
268
+ export interface KitReview {
269
+ /** changes at or inside this field in the range (0 = unchanged) */
270
+ count: (path: FieldPath) => number;
271
+ /** the presence colour of whoever changed it last (list rows draw their own bar) */
272
+ color: (path: FieldPath) => string | undefined;
273
+ /** the host's change bar and hover card for a changed field (null when unchanged) */
274
+ bar: (path: FieldPath, field: FieldSchema) => React.ReactNode;
275
+ /** Show only changes: unchanged fields fold into one quiet line each run */
276
+ onlyChanges: boolean;
277
+ }
278
+ /** The title of the fieldset a field sits in (null outside one). A quiet meta-form drops a field label that only repeats
279
+ * its section's title ("Options" › "Options"): the section heading names it. */
280
+ export declare const KitSectionTitle: React.Context<string | null>;
281
+ export declare const DEFAULT_ENV: KitEnv;
282
+ /** D58 field access: fields in the `seo` group default to `{ edit: "seo.edit" }`. */
283
+ export declare const fieldAccessOf: (field: FieldSchema) => FieldAccess | undefined;
284
+ /**
285
+ * One field for the lens: hidden (no `view`), read-only (plain text: no `edit`, the field is `readOnly`, or the whole form
286
+ * is read-only and the field has no edit cap of its own), or editable. An explicit `edit` cap wins over the form's
287
+ * read-only rule, so an SEO specialist edits SEO fields inside a form they can't otherwise change.
288
+ */
289
+ export declare function resolveFieldAccess(field: FieldSchema, env: Pick<KitEnv, "can" | "readOnly">): {
290
+ hidden: boolean;
291
+ readOnly: boolean;
292
+ };
293
+ /** Drop the fields the lens can't `view` (recursively), so they are neither rendered nor validated. Same object back when
294
+ * nothing is hidden. Values of dropped fields stay in the document untouched. */
295
+ export declare function visibleFields(fields: FieldSchema[], can: KitEnv["can"]): FieldSchema[];
296
+ export declare function visibleSchema(schema: TypeSchema, can: KitEnv["can"]): TypeSchema;
297
+ /** Developer surfaces (field keys, API names, IDs): `schema.view` or `api.view`. */
298
+ export declare const seesDevSurfaces: (env: Pick<KitEnv, "can">) => boolean;
299
+ export declare const KitEnvProvider: React.Provider<KitEnv>;
300
+ export declare const useKitEnv: () => KitEnv;
301
+ export interface HistoryEntry {
302
+ value: unknown;
303
+ at: number;
304
+ by: string;
305
+ label?: string;
306
+ }
307
+ export interface FormApi {
308
+ schema: TypeSchema;
309
+ value: Record<string, unknown>;
310
+ /** write a value; `record: false` skips the field undo/history stack (e.g. programmatic sync) */
311
+ setAt: (path: FieldPath, v: unknown, opts?: {
312
+ record?: boolean;
313
+ label?: string;
314
+ }) => void;
315
+ getAt: (path: FieldPath) => unknown;
316
+ /** value when the form mounted (field undo baseline) */
317
+ baselineAt: (path: FieldPath) => unknown;
318
+ /** published value (changed dot, Reset to published); undefined when never published */
319
+ publishedAt: (path: FieldPath) => unknown;
320
+ hasPublished: boolean;
321
+ /** component instances (CPO D28): top-level fields inherit from a component unless overridden */
322
+ inherited?: {
323
+ from: string;
324
+ isOverridden: (key: string) => boolean;
325
+ reset: (key: string) => void;
326
+ };
327
+ /** the current navigation path (drill-in stack) */
328
+ path: FieldPath;
329
+ navigate: (path: FieldPath) => void;
330
+ /** the form draws frames for a non-root path. False while SchemaForm renders only the root frame: History and
331
+ * drill-in rows hide or go inert instead of navigating to a path nothing shows (no silent no-op). */
332
+ canNavigate: boolean;
333
+ resolveSchema?: (blockType: string) => TypeSchema | undefined;
334
+ /** blocks offered by "+ Add block" in slots (filtered by each slot's allow list) */
335
+ blockLibrary?: TypeSchema[];
336
+ /** all issues by pathKey */
337
+ issues: Map<string, KitIssue>;
338
+ /** the issue shown for a key (rules on blur, required after blur or a publish attempt) */
339
+ visibleIssue: (key: string) => KitIssue | undefined;
340
+ /** visible issues under a path prefix (rollup dots on rows, crumbs and tabs) */
341
+ rollup: (prefix: FieldPath) => {
342
+ errors: number;
343
+ warnings: number;
344
+ };
345
+ touch: (key: string) => void;
346
+ showAllErrors: boolean;
347
+ /** per-field undo (Undo last change to {label}) */
348
+ canUndo: (key: string) => boolean;
349
+ undo: (key: string) => void;
350
+ /** versions of a field this session (newest first) */
351
+ history: (key: string) => HistoryEntry[];
352
+ /** the last change to this field came from AI (⋯ shows "Undo AI change") */
353
+ aiKeys: Set<string>;
354
+ markAi: (key: string, on: boolean) => void;
355
+ /** remembered UI state per frame (selected group tab, open fieldsets) */
356
+ memory: Map<string, unknown>;
357
+ }
358
+ export declare const FormProvider: React.Provider<FormApi | null>;
359
+ export declare const useForm: () => FormApi | null;