@lattice-php/lattice 0.38.0 → 0.40.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 (879) hide show
  1. package/README.md +5 -42
  2. package/dist/_virtual/_rolldown/runtime.js +27 -0
  3. package/dist/action/components/action-form.d.ts +1 -29
  4. package/dist/action/components/action-form.js +6 -257
  5. package/dist/action/components/action-form.js.map +1 -1
  6. package/dist/action/components/action-group.d.ts +1 -1
  7. package/dist/action/components/action-group.js +7 -7
  8. package/dist/action/components/action-group.js.map +1 -1
  9. package/dist/action/components/action-trigger-provider.d.ts +2 -2
  10. package/dist/action/components/action-trigger-provider.js +1 -1
  11. package/dist/action/components/action-trigger-provider.js.map +1 -1
  12. package/dist/action/components/action.d.ts +1 -1
  13. package/dist/action/components/action.js +5 -5
  14. package/dist/action/components/action.js.map +1 -1
  15. package/dist/action/hooks/use-action.d.ts +1 -1
  16. package/dist/action/hooks/use-action.js +10 -10
  17. package/dist/action/hooks/use-action.js.map +1 -1
  18. package/dist/action/index.d.ts +1 -1
  19. package/dist/action/index.js +5 -3
  20. package/dist/action/lib/action-label.d.ts +1 -1
  21. package/dist/action/lib/action-label.js +1 -1
  22. package/dist/action/lib/action-label.js.map +1 -1
  23. package/dist/action/lib/run-action.d.ts +1 -9
  24. package/dist/action/lib/run-action.js +6 -20
  25. package/dist/action/lib/run-action.js.map +1 -1
  26. package/dist/action/plugin.d.ts +2 -1
  27. package/dist/action/plugin.js +3 -3
  28. package/dist/action/plugin.js.map +1 -1
  29. package/dist/appearance/index.js +1 -1
  30. package/dist/appearance/index.js.map +1 -1
  31. package/dist/chat/components/chat-box.d.ts +1 -1
  32. package/dist/chat/components/chat-box.js +4 -4
  33. package/dist/chat/components/chat-box.js.map +1 -1
  34. package/dist/chat/components/message-list.js +1 -1
  35. package/dist/chat/components/message-list.js.map +1 -1
  36. package/dist/chat/components/message.js +3 -3
  37. package/dist/chat/components/message.js.map +1 -1
  38. package/dist/chat/components/prompt-input.js +4 -4
  39. package/dist/chat/components/prompt-input.js.map +1 -1
  40. package/dist/chat/lib/transport.d.ts +1 -1
  41. package/dist/chat/lib/transport.js +1 -1
  42. package/dist/chat/lib/transport.js.map +1 -1
  43. package/dist/chat/parts/text.d.ts +1 -1
  44. package/dist/chat/parts/text.js.map +1 -1
  45. package/dist/chat/parts/tool-call.d.ts +1 -1
  46. package/dist/chat/parts/tool-call.js +1 -1
  47. package/dist/chat/parts/tool-call.js.map +1 -1
  48. package/dist/chat/plugin.d.ts +2 -1
  49. package/dist/chat/plugin.js +3 -3
  50. package/dist/chat/plugin.js.map +1 -1
  51. package/dist/chat/types.d.ts +1 -1
  52. package/dist/create-app.d.ts +2 -2
  53. package/dist/create-app.js +12 -10
  54. package/dist/create-app.js.map +1 -1
  55. package/dist/event-bridge.js +2 -2
  56. package/dist/event-bridge.js.map +1 -1
  57. package/dist/{ui → fragments}/fragment.d.ts +1 -1
  58. package/dist/{ui → fragments}/fragment.js +6 -6
  59. package/dist/fragments/fragment.js.map +1 -0
  60. package/dist/fragments/plugin.d.ts +2 -0
  61. package/dist/fragments/plugin.js +11 -0
  62. package/dist/fragments/plugin.js.map +1 -0
  63. package/dist/index.d.ts +21 -22
  64. package/dist/index.js +14 -18
  65. package/dist/inertia.js +2 -2
  66. package/dist/inertia.js.map +1 -1
  67. package/dist/layout/components/breadcrumbs.d.ts +1 -1
  68. package/dist/layout/components/breadcrumbs.js +2 -2
  69. package/dist/layout/components/breadcrumbs.js.map +1 -1
  70. package/dist/layout/components/callouts.d.ts +1 -1
  71. package/dist/layout/components/callouts.js +5 -5
  72. package/dist/layout/components/callouts.js.map +1 -1
  73. package/dist/layout/components/dropdown.d.ts +1 -1
  74. package/dist/layout/components/dropdown.js +1 -1
  75. package/dist/layout/components/dropdown.js.map +1 -1
  76. package/dist/layout/components/menu-item.d.ts +1 -1
  77. package/dist/layout/components/menu-item.js +6 -7
  78. package/dist/layout/components/menu-item.js.map +1 -1
  79. package/dist/layout/components/menu.d.ts +1 -1
  80. package/dist/layout/components/menu.js +1 -1
  81. package/dist/layout/components/menu.js.map +1 -1
  82. package/dist/layout/components/outlet.d.ts +1 -1
  83. package/dist/layout/components/outlet.js.map +1 -1
  84. package/dist/layout/components/popover.js +3 -3
  85. package/dist/layout/components/popover.js.map +1 -1
  86. package/dist/layout/components/schema-layout.js +1 -1
  87. package/dist/layout/components/schema-layout.js.map +1 -1
  88. package/dist/layout/components/sidebar.d.ts +1 -1
  89. package/dist/layout/components/sidebar.js +7 -7
  90. package/dist/layout/components/sidebar.js.map +1 -1
  91. package/dist/layout/components/topbar.d.ts +1 -1
  92. package/dist/layout/components/topbar.js +2 -2
  93. package/dist/layout/components/topbar.js.map +1 -1
  94. package/dist/layout/hooks/context.d.ts +1 -1
  95. package/dist/layout/hooks/context.js +2 -2
  96. package/dist/layout/hooks/context.js.map +1 -1
  97. package/dist/layout/index.js +2 -3
  98. package/dist/layout/plugin.d.ts +2 -1
  99. package/dist/layout/plugin.js +3 -3
  100. package/dist/layout/plugin.js.map +1 -1
  101. package/dist/notifications/api.js +1 -1
  102. package/dist/notifications/api.js.map +1 -1
  103. package/dist/notifications/components/empty-state.js +2 -2
  104. package/dist/notifications/components/empty-state.js.map +1 -1
  105. package/dist/notifications/components/notification-item.js +5 -5
  106. package/dist/notifications/components/notification-item.js.map +1 -1
  107. package/dist/notifications/components/notification-list.js +2 -2
  108. package/dist/notifications/components/notification-list.js.map +1 -1
  109. package/dist/notifications/components/notifications.d.ts +1 -1
  110. package/dist/notifications/components/notifications.js +4 -4
  111. package/dist/notifications/components/notifications.js.map +1 -1
  112. package/dist/notifications/plugin.d.ts +2 -1
  113. package/dist/notifications/plugin.js +3 -3
  114. package/dist/notifications/plugin.js.map +1 -1
  115. package/dist/page.js +2 -2
  116. package/dist/page.js.map +1 -1
  117. package/dist/provider-base.d.ts +2 -2
  118. package/dist/provider-base.js +3 -3
  119. package/dist/provider-base.js.map +1 -1
  120. package/dist/provider.d.ts +4 -2
  121. package/dist/provider.js +3 -1
  122. package/dist/provider.js.map +1 -1
  123. package/dist/realtime/build-effects.d.ts +1 -1
  124. package/dist/realtime/build-effects.js +1 -1
  125. package/dist/realtime/build-effects.js.map +1 -1
  126. package/dist/realtime/subscriptions.js +2 -2
  127. package/dist/realtime/subscriptions.js.map +1 -1
  128. package/dist/registry.d.ts +1 -1
  129. package/dist/registry.js +6 -5
  130. package/dist/registry.js.map +1 -1
  131. package/dist/remote/components/data-list.d.ts +1 -1
  132. package/dist/remote/components/data-list.js +4 -4
  133. package/dist/remote/components/data-list.js.map +1 -1
  134. package/dist/remote/plugin.d.ts +2 -1
  135. package/dist/remote/plugin.js +3 -3
  136. package/dist/remote/plugin.js.map +1 -1
  137. package/dist/runtime.d.ts +9 -0
  138. package/dist/runtime.js +24 -0
  139. package/dist/toast/callout.js +2 -2
  140. package/dist/toast/callout.js.map +1 -1
  141. package/dist/toast/toast.js +2 -2
  142. package/dist/toast/toast.js.map +1 -1
  143. package/dist/toast/toaster.js +6 -6
  144. package/dist/toast/toaster.js.map +1 -1
  145. package/dist/toast/variant-styles.js +1 -1
  146. package/dist/toast/variant-styles.js.map +1 -1
  147. package/dist/types/core-augmentation.d.ts +4 -0
  148. package/dist/types/generated.d.ts +10 -9
  149. package/dist/types/index.d.ts +10 -2
  150. package/dist/vite.d.ts +2 -2
  151. package/dist/vite.js +14 -5
  152. package/dist/vite.js.map +1 -1
  153. package/dist-standalone/chunks/chart-view-DFSCMDuw.js +59 -0
  154. package/dist-standalone/chunks/{test-id-Dh3L6Gfh.js → clsx-CjueKrWZ.js} +1 -1
  155. package/dist-standalone/chunks/{code-block-view-fzD5e55N.js → code-block-view-CetAq3Rk.js} +2 -2
  156. package/dist-standalone/chunks/date-picker-field-D6S8aN1p.js +1 -0
  157. package/dist-standalone/chunks/debounce-CBXrtDuZ.js +1 -0
  158. package/dist-standalone/chunks/dist-D2qBbka0.js +2 -0
  159. package/dist-standalone/chunks/floating-ui.dom-CO6FyQ6K.js +1 -0
  160. package/dist-standalone/chunks/icon-button-COE_nq4v.js +41 -0
  161. package/dist-standalone/chunks/instance-D6cXaqIT.js +1 -0
  162. package/dist-standalone/chunks/jsx-runtime-NZYk81nU.js +1 -0
  163. package/dist-standalone/chunks/locale-BZOrJtMq.js +1 -0
  164. package/dist-standalone/chunks/{notifications-echo-uU87iJAV.js → notifications-echo-BLO9_g1w.js} +1 -1
  165. package/dist-standalone/chunks/number-DjNO0Pxv.js +1 -0
  166. package/dist-standalone/chunks/page-props-DZ15iP5k.js +1 -0
  167. package/dist-standalone/chunks/react-CwJFpaho.js +1 -0
  168. package/dist-standalone/chunks/react-dom-Dl-LT-t1.js +1 -0
  169. package/dist-standalone/chunks/registry-context-BdTXNnGL.js +97 -0
  170. package/dist-standalone/chunks/{rich-editor-field-BZQIPOLc.js → rich-editor-field-n-mtzlT-.js} +35 -35
  171. package/dist-standalone/chunks/rolldown-runtime-hePW80VL.js +1 -0
  172. package/dist-standalone/chunks/runtime-Bh_GyTCD.js +23 -0
  173. package/dist-standalone/chunks/subscriptions-BICQU9ps.js +1 -0
  174. package/dist-standalone/chunks/time-picker-CAwU5Rl-.js +1 -0
  175. package/dist-standalone/chunks/timezone-Ckl1gbqB.js +1 -0
  176. package/dist-standalone/chunks/translatable-YXSlt1CF.js +1 -0
  177. package/dist-standalone/chunks/with-selector-Cse0iXU1.js +1 -0
  178. package/dist-standalone/jsx-runtime.js +1 -0
  179. package/dist-standalone/lattice.css +1 -1
  180. package/dist-standalone/lattice.js +2 -23
  181. package/dist-standalone/manifest.json +1 -1
  182. package/dist-standalone/react.js +1 -0
  183. package/dist-standalone/runtime.js +1 -0
  184. package/package.json +15 -239
  185. package/LICENSE.md +0 -21
  186. package/dist/core/api.d.ts +0 -42
  187. package/dist/core/api.js +0 -165
  188. package/dist/core/api.js.map +0 -1
  189. package/dist/core/collapsed-context.d.ts +0 -2
  190. package/dist/core/collapsed-context.js +0 -10
  191. package/dist/core/collapsed-context.js.map +0 -1
  192. package/dist/core/component-ref.d.ts +0 -11
  193. package/dist/core/component-ref.js +0 -33
  194. package/dist/core/component-ref.js.map +0 -1
  195. package/dist/core/event-names.d.ts +0 -23
  196. package/dist/core/event-names.js +0 -24
  197. package/dist/core/event-names.js.map +0 -1
  198. package/dist/core/headers.d.ts +0 -1
  199. package/dist/core/headers.js +0 -14
  200. package/dist/core/headers.js.map +0 -1
  201. package/dist/core/hooks/column-sizing.d.ts +0 -17
  202. package/dist/core/hooks/column-sizing.js +0 -54
  203. package/dist/core/hooks/column-sizing.js.map +0 -1
  204. package/dist/core/hooks/use-column-resizing.d.ts +0 -28
  205. package/dist/core/hooks/use-column-resizing.js +0 -220
  206. package/dist/core/hooks/use-column-resizing.js.map +0 -1
  207. package/dist/core/hooks/use-window-event.d.ts +0 -8
  208. package/dist/core/hooks/use-window-event.js +0 -22
  209. package/dist/core/hooks/use-window-event.js.map +0 -1
  210. package/dist/core/index.d.ts +0 -17
  211. package/dist/core/index.js +0 -13
  212. package/dist/core/materialize.d.ts +0 -9
  213. package/dist/core/materialize.js +0 -39
  214. package/dist/core/materialize.js.map +0 -1
  215. package/dist/core/nodes.d.ts +0 -11
  216. package/dist/core/nodes.js +0 -20
  217. package/dist/core/nodes.js.map +0 -1
  218. package/dist/core/registry-context.d.ts +0 -21
  219. package/dist/core/registry-context.js +0 -40
  220. package/dist/core/registry-context.js.map +0 -1
  221. package/dist/core/registry.d.ts +0 -38
  222. package/dist/core/registry.js +0 -60
  223. package/dist/core/registry.js.map +0 -1
  224. package/dist/core/renderer.d.ts +0 -8
  225. package/dist/core/renderer.js +0 -76
  226. package/dist/core/renderer.js.map +0 -1
  227. package/dist/core/test-id.d.ts +0 -8
  228. package/dist/core/test-id.js +0 -21
  229. package/dist/core/test-id.js.map +0 -1
  230. package/dist/core/types.d.ts +0 -26
  231. package/dist/core/types.js +0 -0
  232. package/dist/core/upload.d.ts +0 -25
  233. package/dist/core/upload.js +0 -48
  234. package/dist/core/upload.js.map +0 -1
  235. package/dist/effects/dispatch.d.ts +0 -19
  236. package/dist/effects/dispatch.js +0 -39
  237. package/dist/effects/dispatch.js.map +0 -1
  238. package/dist/effects/registry.d.ts +0 -12
  239. package/dist/effects/registry.js +0 -43
  240. package/dist/effects/registry.js.map +0 -1
  241. package/dist/effects/use-effect-dispatcher.d.ts +0 -8
  242. package/dist/effects/use-effect-dispatcher.js +0 -20
  243. package/dist/effects/use-effect-dispatcher.js.map +0 -1
  244. package/dist/effects/use-flash-effects.d.ts +0 -5
  245. package/dist/effects/use-flash-effects.js +0 -22
  246. package/dist/effects/use-flash-effects.js.map +0 -1
  247. package/dist/form/components/base/field.d.ts +0 -21
  248. package/dist/form/components/base/field.js +0 -80
  249. package/dist/form/components/base/field.js.map +0 -1
  250. package/dist/form/components/base/submit-button.d.ts +0 -7
  251. package/dist/form/components/base/submit-button.js +0 -49
  252. package/dist/form/components/base/submit-button.js.map +0 -1
  253. package/dist/form/components/fields/add-row-menu.d.ts +0 -9
  254. package/dist/form/components/fields/add-row-menu.js +0 -27
  255. package/dist/form/components/fields/add-row-menu.js.map +0 -1
  256. package/dist/form/components/fields/builder.d.ts +0 -2
  257. package/dist/form/components/fields/builder.js +0 -132
  258. package/dist/form/components/fields/builder.js.map +0 -1
  259. package/dist/form/components/fields/checkbox.d.ts +0 -2
  260. package/dist/form/components/fields/checkbox.js +0 -52
  261. package/dist/form/components/fields/checkbox.js.map +0 -1
  262. package/dist/form/components/fields/choice.d.ts +0 -2
  263. package/dist/form/components/fields/choice.js +0 -44
  264. package/dist/form/components/fields/choice.js.map +0 -1
  265. package/dist/form/components/fields/color-picker-field.d.ts +0 -2
  266. package/dist/form/components/fields/color-picker-field.js +0 -57
  267. package/dist/form/components/fields/color-picker-field.js.map +0 -1
  268. package/dist/form/components/fields/date-input.d.ts +0 -2
  269. package/dist/form/components/fields/date-input.js +0 -31
  270. package/dist/form/components/fields/date-input.js.map +0 -1
  271. package/dist/form/components/fields/date-picker-field.d.ts +0 -20
  272. package/dist/form/components/fields/date-picker-field.js +0 -197
  273. package/dist/form/components/fields/date-picker-field.js.map +0 -1
  274. package/dist/form/components/fields/date-picker-value.d.ts +0 -10
  275. package/dist/form/components/fields/date-picker-value.js +0 -125
  276. package/dist/form/components/fields/date-picker-value.js.map +0 -1
  277. package/dist/form/components/fields/date-picker.d.ts +0 -2
  278. package/dist/form/components/fields/date-picker.js +0 -17
  279. package/dist/form/components/fields/date-picker.js.map +0 -1
  280. package/dist/form/components/fields/date-time-input.d.ts +0 -2
  281. package/dist/form/components/fields/date-time-input.js +0 -35
  282. package/dist/form/components/fields/date-time-input.js.map +0 -1
  283. package/dist/form/components/fields/file-upload.d.ts +0 -2
  284. package/dist/form/components/fields/file-upload.js +0 -264
  285. package/dist/form/components/fields/file-upload.js.map +0 -1
  286. package/dist/form/components/fields/hidden-input.d.ts +0 -2
  287. package/dist/form/components/fields/hidden-input.js +0 -17
  288. package/dist/form/components/fields/hidden-input.js.map +0 -1
  289. package/dist/form/components/fields/number-input.d.ts +0 -2
  290. package/dist/form/components/fields/number-input.js +0 -60
  291. package/dist/form/components/fields/number-input.js.map +0 -1
  292. package/dist/form/components/fields/otp-input.d.ts +0 -2
  293. package/dist/form/components/fields/otp-input.js +0 -25
  294. package/dist/form/components/fields/otp-input.js.map +0 -1
  295. package/dist/form/components/fields/password-input.d.ts +0 -2
  296. package/dist/form/components/fields/password-input.js +0 -79
  297. package/dist/form/components/fields/password-input.js.map +0 -1
  298. package/dist/form/components/fields/repeater-rows.d.ts +0 -15
  299. package/dist/form/components/fields/repeater-rows.js +0 -48
  300. package/dist/form/components/fields/repeater-rows.js.map +0 -1
  301. package/dist/form/components/fields/repeater.d.ts +0 -2
  302. package/dist/form/components/fields/repeater.js +0 -109
  303. package/dist/form/components/fields/repeater.js.map +0 -1
  304. package/dist/form/components/fields/rich-editor-field.d.ts +0 -3
  305. package/dist/form/components/fields/rich-editor-field.js +0 -104
  306. package/dist/form/components/fields/rich-editor-field.js.map +0 -1
  307. package/dist/form/components/fields/rich-editor.d.ts +0 -2
  308. package/dist/form/components/fields/rich-editor.js +0 -15
  309. package/dist/form/components/fields/rich-editor.js.map +0 -1
  310. package/dist/form/components/fields/row-action-menu.d.ts +0 -18
  311. package/dist/form/components/fields/row-action-menu.js +0 -61
  312. package/dist/form/components/fields/row-action-menu.js.map +0 -1
  313. package/dist/form/components/fields/row-actions.d.ts +0 -10
  314. package/dist/form/components/fields/row-actions.js +0 -47
  315. package/dist/form/components/fields/row-actions.js.map +0 -1
  316. package/dist/form/components/fields/row-item.d.ts +0 -28
  317. package/dist/form/components/fields/row-item.js +0 -70
  318. package/dist/form/components/fields/row-item.js.map +0 -1
  319. package/dist/form/components/fields/row-key-inputs.d.ts +0 -7
  320. package/dist/form/components/fields/row-key-inputs.js +0 -16
  321. package/dist/form/components/fields/row-key-inputs.js.map +0 -1
  322. package/dist/form/components/fields/row-templates.d.ts +0 -9
  323. package/dist/form/components/fields/row-templates.js +0 -14
  324. package/dist/form/components/fields/row-templates.js.map +0 -1
  325. package/dist/form/components/fields/select.d.ts +0 -2
  326. package/dist/form/components/fields/select.js +0 -213
  327. package/dist/form/components/fields/select.js.map +0 -1
  328. package/dist/form/components/fields/simple-field.d.ts +0 -9
  329. package/dist/form/components/fields/simple-field.js +0 -22
  330. package/dist/form/components/fields/simple-field.js.map +0 -1
  331. package/dist/form/components/fields/table-rows.d.ts +0 -33
  332. package/dist/form/components/fields/table-rows.js +0 -176
  333. package/dist/form/components/fields/table-rows.js.map +0 -1
  334. package/dist/form/components/fields/text-input.d.ts +0 -2
  335. package/dist/form/components/fields/text-input.js +0 -42
  336. package/dist/form/components/fields/text-input.js.map +0 -1
  337. package/dist/form/components/fields/textarea.d.ts +0 -2
  338. package/dist/form/components/fields/textarea.js +0 -28
  339. package/dist/form/components/fields/textarea.js.map +0 -1
  340. package/dist/form/components/fields/time-input.d.ts +0 -2
  341. package/dist/form/components/fields/time-input.js +0 -69
  342. package/dist/form/components/fields/time-input.js.map +0 -1
  343. package/dist/form/components/fields/time-picker-columns.d.ts +0 -24
  344. package/dist/form/components/fields/time-picker-columns.js +0 -76
  345. package/dist/form/components/fields/time-picker-columns.js.map +0 -1
  346. package/dist/form/components/fields/time-picker.d.ts +0 -18
  347. package/dist/form/components/fields/time-picker.js +0 -131
  348. package/dist/form/components/fields/time-picker.js.map +0 -1
  349. package/dist/form/components/fields/toggle.d.ts +0 -2
  350. package/dist/form/components/fields/toggle.js +0 -66
  351. package/dist/form/components/fields/toggle.js.map +0 -1
  352. package/dist/form/components/fields/use-flip-reorder.d.ts +0 -6
  353. package/dist/form/components/fields/use-flip-reorder.js +0 -52
  354. package/dist/form/components/fields/use-flip-reorder.js.map +0 -1
  355. package/dist/form/components/fields/use-row-collection.d.ts +0 -12
  356. package/dist/form/components/fields/use-row-collection.js +0 -45
  357. package/dist/form/components/fields/use-row-collection.js.map +0 -1
  358. package/dist/form/components/form.d.ts +0 -2
  359. package/dist/form/components/form.js +0 -182
  360. package/dist/form/components/form.js.map +0 -1
  361. package/dist/form/components/index.d.ts +0 -19
  362. package/dist/form/components/index.js +0 -20
  363. package/dist/form/components/wizard.d.ts +0 -3
  364. package/dist/form/components/wizard.js +0 -148
  365. package/dist/form/components/wizard.js.map +0 -1
  366. package/dist/form/embed.d.ts +0 -22
  367. package/dist/form/embed.js +0 -13
  368. package/dist/form/hooks/context.d.ts +0 -25
  369. package/dist/form/hooks/context.js +0 -31
  370. package/dist/form/hooks/context.js.map +0 -1
  371. package/dist/form/hooks/field-scope.d.ts +0 -22
  372. package/dist/form/hooks/field-scope.js +0 -54
  373. package/dist/form/hooks/field-scope.js.map +0 -1
  374. package/dist/form/hooks/prefill-context.d.ts +0 -5
  375. package/dist/form/hooks/prefill-context.js +0 -11
  376. package/dist/form/hooks/prefill-context.js.map +0 -1
  377. package/dist/form/hooks/resolved-nodes.d.ts +0 -6
  378. package/dist/form/hooks/resolved-nodes.js +0 -23
  379. package/dist/form/hooks/resolved-nodes.js.map +0 -1
  380. package/dist/form/hooks/row-layout-context.d.ts +0 -5
  381. package/dist/form/hooks/row-layout-context.js +0 -18
  382. package/dist/form/hooks/row-layout-context.js.map +0 -1
  383. package/dist/form/hooks/use-controlled-field.d.ts +0 -13
  384. package/dist/form/hooks/use-controlled-field.js +0 -41
  385. package/dist/form/hooks/use-controlled-field.js.map +0 -1
  386. package/dist/form/hooks/use-dependent-field.d.ts +0 -3
  387. package/dist/form/hooks/use-dependent-field.js +0 -25
  388. package/dist/form/hooks/use-dependent-field.js.map +0 -1
  389. package/dist/form/hooks/use-field-commit.d.ts +0 -24
  390. package/dist/form/hooks/use-field-commit.js +0 -51
  391. package/dist/form/hooks/use-field-commit.js.map +0 -1
  392. package/dist/form/hooks/use-form-resolver.d.ts +0 -8
  393. package/dist/form/hooks/use-form-resolver.js +0 -99
  394. package/dist/form/hooks/use-form-resolver.js.map +0 -1
  395. package/dist/form/hooks/use-seed-default.d.ts +0 -5
  396. package/dist/form/hooks/use-seed-default.js +0 -28
  397. package/dist/form/hooks/use-seed-default.js.map +0 -1
  398. package/dist/form/hooks/values.d.ts +0 -17
  399. package/dist/form/hooks/values.js +0 -154
  400. package/dist/form/hooks/values.js.map +0 -1
  401. package/dist/form/index.d.ts +0 -5
  402. package/dist/form/index.js +0 -23
  403. package/dist/form/lib/collect-fields.d.ts +0 -7
  404. package/dist/form/lib/collect-fields.js +0 -19
  405. package/dist/form/lib/collect-fields.js.map +0 -1
  406. package/dist/form/lib/conditions.d.ts +0 -17
  407. package/dist/form/lib/conditions.js +0 -80
  408. package/dist/form/lib/conditions.js.map +0 -1
  409. package/dist/form/lib/field-dom-name.d.ts +0 -1
  410. package/dist/form/lib/field-dom-name.js +0 -10
  411. package/dist/form/lib/field-dom-name.js.map +0 -1
  412. package/dist/form/lib/field-errors.d.ts +0 -5
  413. package/dist/form/lib/field-errors.js +0 -15
  414. package/dist/form/lib/field-errors.js.map +0 -1
  415. package/dist/form/lib/field-props.d.ts +0 -19
  416. package/dist/form/lib/field-props.js +0 -20
  417. package/dist/form/lib/field-props.js.map +0 -1
  418. package/dist/form/lib/form-path.d.ts +0 -4
  419. package/dist/form/lib/form-path.js +0 -40
  420. package/dist/form/lib/form-path.js.map +0 -1
  421. package/dist/form/lib/form-transport.d.ts +0 -7
  422. package/dist/form/lib/form-transport.js +0 -21
  423. package/dist/form/lib/form-transport.js.map +0 -1
  424. package/dist/form/lib/override-keys.d.ts +0 -2
  425. package/dist/form/lib/override-keys.js +0 -12
  426. package/dist/form/lib/override-keys.js.map +0 -1
  427. package/dist/form/lib/prefill-targets.d.ts +0 -16
  428. package/dist/form/lib/prefill-targets.js +0 -68
  429. package/dist/form/lib/prefill-targets.js.map +0 -1
  430. package/dist/form/lib/wizard-steps.d.ts +0 -5
  431. package/dist/form/lib/wizard-steps.js +0 -44
  432. package/dist/form/lib/wizard-steps.js.map +0 -1
  433. package/dist/form/plugin.d.ts +0 -1
  434. package/dist/form/plugin.js +0 -52
  435. package/dist/form/plugin.js.map +0 -1
  436. package/dist/form/rich-editor/builtins.d.ts +0 -6
  437. package/dist/form/rich-editor/builtins.js +0 -400
  438. package/dist/form/rich-editor/builtins.js.map +0 -1
  439. package/dist/form/rich-editor/index.d.ts +0 -7
  440. package/dist/form/rich-editor/index.js +0 -3
  441. package/dist/form/rich-editor/registry.d.ts +0 -67
  442. package/dist/form/rich-editor/registry.js +0 -79
  443. package/dist/form/rich-editor/registry.js.map +0 -1
  444. package/dist/form/rich-editor/toolbar-button.d.ts +0 -12
  445. package/dist/form/rich-editor/toolbar-button.js +0 -28
  446. package/dist/form/rich-editor/toolbar-button.js.map +0 -1
  447. package/dist/form/toolkit.d.ts +0 -17
  448. package/dist/form/toolkit.js +0 -14
  449. package/dist/form/types.d.ts +0 -4
  450. package/dist/form/types.js +0 -0
  451. package/dist/format/date-time.d.ts +0 -14
  452. package/dist/format/date-time.js +0 -34
  453. package/dist/format/date-time.js.map +0 -1
  454. package/dist/format/format-context.d.ts +0 -6
  455. package/dist/format/format-context.js +0 -17
  456. package/dist/format/format-context.js.map +0 -1
  457. package/dist/format/number.d.ts +0 -2
  458. package/dist/format/number.js +0 -23
  459. package/dist/format/number.js.map +0 -1
  460. package/dist/format/numeric.d.ts +0 -1
  461. package/dist/format/numeric.js +0 -9
  462. package/dist/format/numeric.js.map +0 -1
  463. package/dist/format/value.d.ts +0 -6
  464. package/dist/format/value.js +0 -17
  465. package/dist/format/value.js.map +0 -1
  466. package/dist/i18n/backend.d.ts +0 -26
  467. package/dist/i18n/backend.js +0 -54
  468. package/dist/i18n/backend.js.map +0 -1
  469. package/dist/i18n/config.d.ts +0 -10
  470. package/dist/i18n/config.js +0 -36
  471. package/dist/i18n/config.js.map +0 -1
  472. package/dist/i18n/date-time-formatter.d.ts +0 -13
  473. package/dist/i18n/date-time-formatter.js +0 -28
  474. package/dist/i18n/date-time-formatter.js.map +0 -1
  475. package/dist/i18n/date-time.d.ts +0 -8
  476. package/dist/i18n/date-time.js +0 -32
  477. package/dist/i18n/date-time.js.map +0 -1
  478. package/dist/i18n/index.d.ts +0 -13
  479. package/dist/i18n/index.js +0 -10
  480. package/dist/i18n/instance.d.ts +0 -36
  481. package/dist/i18n/instance.js +0 -113
  482. package/dist/i18n/instance.js.map +0 -1
  483. package/dist/i18n/locale-reload.d.ts +0 -4
  484. package/dist/i18n/locale-reload.js +0 -18
  485. package/dist/i18n/locale-reload.js.map +0 -1
  486. package/dist/i18n/locale-switcher.d.ts +0 -16
  487. package/dist/i18n/locale-switcher.js +0 -21
  488. package/dist/i18n/locale-switcher.js.map +0 -1
  489. package/dist/i18n/locale.d.ts +0 -9
  490. package/dist/i18n/locale.js +0 -85
  491. package/dist/i18n/locale.js.map +0 -1
  492. package/dist/i18n/page-props.d.ts +0 -4
  493. package/dist/i18n/page-props.js +0 -10
  494. package/dist/i18n/page-props.js.map +0 -1
  495. package/dist/i18n/shared-props.d.ts +0 -7
  496. package/dist/i18n/shared-props.js +0 -23
  497. package/dist/i18n/shared-props.js.map +0 -1
  498. package/dist/i18n/timezone.d.ts +0 -7
  499. package/dist/i18n/timezone.js +0 -45
  500. package/dist/i18n/timezone.js.map +0 -1
  501. package/dist/i18n/translatable.d.ts +0 -5
  502. package/dist/i18n/translatable.js +0 -27
  503. package/dist/i18n/translatable.js.map +0 -1
  504. package/dist/icons/icon-renderer.d.ts +0 -13
  505. package/dist/icons/icon-renderer.js +0 -56
  506. package/dist/icons/icon-renderer.js.map +0 -1
  507. package/dist/icons/index.d.ts +0 -4
  508. package/dist/icons/index.js +0 -3
  509. package/dist/icons/sprite.d.ts +0 -30
  510. package/dist/icons/sprite.js +0 -40
  511. package/dist/icons/sprite.js.map +0 -1
  512. package/dist/lib/color.d.ts +0 -9
  513. package/dist/lib/color.js +0 -48
  514. package/dist/lib/color.js.map +0 -1
  515. package/dist/lib/is-truthy.d.ts +0 -2
  516. package/dist/lib/is-truthy.js +0 -9
  517. package/dist/lib/is-truthy.js.map +0 -1
  518. package/dist/lib/listeners.d.ts +0 -5
  519. package/dist/lib/listeners.js +0 -19
  520. package/dist/lib/listeners.js.map +0 -1
  521. package/dist/lib/use-debounced-callback.d.ts +0 -10
  522. package/dist/lib/use-debounced-callback.js +0 -34
  523. package/dist/lib/use-debounced-callback.js.map +0 -1
  524. package/dist/lib/use-layout-effect.d.ts +0 -6
  525. package/dist/lib/use-layout-effect.js +0 -11
  526. package/dist/lib/use-layout-effect.js.map +0 -1
  527. package/dist/lib/use-media-query.d.ts +0 -5
  528. package/dist/lib/use-media-query.js +0 -26
  529. package/dist/lib/use-media-query.js.map +0 -1
  530. package/dist/lib/use-persistent-state.d.ts +0 -13
  531. package/dist/lib/use-persistent-state.js +0 -62
  532. package/dist/lib/use-persistent-state.js.map +0 -1
  533. package/dist/lib/utils.d.ts +0 -2
  534. package/dist/lib/utils.js +0 -20
  535. package/dist/lib/utils.js.map +0 -1
  536. package/dist/table/components/bulk-bar.d.ts +0 -11
  537. package/dist/table/components/bulk-bar.js +0 -110
  538. package/dist/table/components/bulk-bar.js.map +0 -1
  539. package/dist/table/components/cells/badge-cell.d.ts +0 -2
  540. package/dist/table/components/cells/badge-cell.js +0 -16
  541. package/dist/table/components/cells/badge-cell.js.map +0 -1
  542. package/dist/table/components/cells/boolean-cell.d.ts +0 -2
  543. package/dist/table/components/cells/boolean-cell.js +0 -22
  544. package/dist/table/components/cells/boolean-cell.js.map +0 -1
  545. package/dist/table/components/cells/copyable-cell.d.ts +0 -9
  546. package/dist/table/components/cells/copyable-cell.js +0 -17
  547. package/dist/table/components/cells/copyable-cell.js.map +0 -1
  548. package/dist/table/components/cells/icon-cell.d.ts +0 -2
  549. package/dist/table/components/cells/icon-cell.js +0 -24
  550. package/dist/table/components/cells/icon-cell.js.map +0 -1
  551. package/dist/table/components/cells/image-cell.d.ts +0 -2
  552. package/dist/table/components/cells/image-cell.js +0 -22
  553. package/dist/table/components/cells/image-cell.js.map +0 -1
  554. package/dist/table/components/cells/money-cell.d.ts +0 -2
  555. package/dist/table/components/cells/money-cell.js +0 -24
  556. package/dist/table/components/cells/money-cell.js.map +0 -1
  557. package/dist/table/components/cells/number-cell.d.ts +0 -2
  558. package/dist/table/components/cells/number-cell.js +0 -20
  559. package/dist/table/components/cells/number-cell.js.map +0 -1
  560. package/dist/table/components/cells/numeric-cell.d.ts +0 -10
  561. package/dist/table/components/cells/numeric-cell.js +0 -25
  562. package/dist/table/components/cells/numeric-cell.js.map +0 -1
  563. package/dist/table/components/cells/stack-cell.d.ts +0 -2
  564. package/dist/table/components/cells/stack-cell.js +0 -12
  565. package/dist/table/components/cells/stack-cell.js.map +0 -1
  566. package/dist/table/components/cells/text-cell.d.ts +0 -2
  567. package/dist/table/components/cells/text-cell.js +0 -67
  568. package/dist/table/components/cells/text-cell.js.map +0 -1
  569. package/dist/table/components/column-filter-control.d.ts +0 -17
  570. package/dist/table/components/column-filter-control.js +0 -286
  571. package/dist/table/components/column-filter-control.js.map +0 -1
  572. package/dist/table/components/column-header.d.ts +0 -9
  573. package/dist/table/components/column-header.js +0 -53
  574. package/dist/table/components/column-header.js.map +0 -1
  575. package/dist/table/components/column-visibility-menu.d.ts +0 -10
  576. package/dist/table/components/column-visibility-menu.js +0 -49
  577. package/dist/table/components/column-visibility-menu.js.map +0 -1
  578. package/dist/table/components/filter-bar.d.ts +0 -18
  579. package/dist/table/components/filter-bar.js +0 -106
  580. package/dist/table/components/filter-bar.js.map +0 -1
  581. package/dist/table/components/filter-controls.d.ts +0 -11
  582. package/dist/table/components/filter-controls.js +0 -131
  583. package/dist/table/components/filter-controls.js.map +0 -1
  584. package/dist/table/components/filter-value-input.d.ts +0 -13
  585. package/dist/table/components/filter-value-input.js +0 -93
  586. package/dist/table/components/filter-value-input.js.map +0 -1
  587. package/dist/table/components/pagination.d.ts +0 -18
  588. package/dist/table/components/pagination.js +0 -95
  589. package/dist/table/components/pagination.js.map +0 -1
  590. package/dist/table/components/sort-bar.d.ts +0 -7
  591. package/dist/table/components/sort-bar.js +0 -44
  592. package/dist/table/components/sort-bar.js.map +0 -1
  593. package/dist/table/components/table-cell.d.ts +0 -5
  594. package/dist/table/components/table-cell.js +0 -35
  595. package/dist/table/components/table-cell.js.map +0 -1
  596. package/dist/table/components/table-search.d.ts +0 -9
  597. package/dist/table/components/table-search.js +0 -72
  598. package/dist/table/components/table-search.js.map +0 -1
  599. package/dist/table/components/table.d.ts +0 -7
  600. package/dist/table/components/table.js +0 -333
  601. package/dist/table/components/table.js.map +0 -1
  602. package/dist/table/hooks/use-column-visibility.d.ts +0 -20
  603. package/dist/table/hooks/use-column-visibility.js +0 -54
  604. package/dist/table/hooks/use-column-visibility.js.map +0 -1
  605. package/dist/table/hooks/use-expanded-rows.d.ts +0 -8
  606. package/dist/table/hooks/use-expanded-rows.js +0 -24
  607. package/dist/table/hooks/use-expanded-rows.js.map +0 -1
  608. package/dist/table/hooks/use-table-selection.d.ts +0 -12
  609. package/dist/table/hooks/use-table-selection.js +0 -47
  610. package/dist/table/hooks/use-table-selection.js.map +0 -1
  611. package/dist/table/hooks/use-table.d.ts +0 -28
  612. package/dist/table/hooks/use-table.js +0 -220
  613. package/dist/table/hooks/use-table.js.map +0 -1
  614. package/dist/table/index.d.ts +0 -6
  615. package/dist/table/index.js +0 -5
  616. package/dist/table/lib/align.d.ts +0 -4
  617. package/dist/table/lib/align.js +0 -23
  618. package/dist/table/lib/align.js.map +0 -1
  619. package/dist/table/lib/bulk.d.ts +0 -18
  620. package/dist/table/lib/bulk.js +0 -26
  621. package/dist/table/lib/bulk.js.map +0 -1
  622. package/dist/table/lib/filter-values.d.ts +0 -25
  623. package/dist/table/lib/filter-values.js +0 -47
  624. package/dist/table/lib/filter-values.js.map +0 -1
  625. package/dist/table/lib/format.d.ts +0 -4
  626. package/dist/table/lib/format.js +0 -23
  627. package/dist/table/lib/format.js.map +0 -1
  628. package/dist/table/lib/payload.d.ts +0 -11
  629. package/dist/table/lib/payload.js +0 -91
  630. package/dist/table/lib/payload.js.map +0 -1
  631. package/dist/table/lib/query.d.ts +0 -20
  632. package/dist/table/lib/query.js +0 -140
  633. package/dist/table/lib/query.js.map +0 -1
  634. package/dist/table/plugin.d.ts +0 -1
  635. package/dist/table/plugin.js +0 -11
  636. package/dist/table/plugin.js.map +0 -1
  637. package/dist/table/registry.d.ts +0 -19
  638. package/dist/table/registry.js +0 -14
  639. package/dist/table/registry.js.map +0 -1
  640. package/dist/table/types.d.ts +0 -17
  641. package/dist/table/types.js +0 -0
  642. package/dist/ui/action-menu-context.d.ts +0 -6
  643. package/dist/ui/action-menu-context.js +0 -18
  644. package/dist/ui/action-menu-context.js.map +0 -1
  645. package/dist/ui/affix-group.d.ts +0 -18
  646. package/dist/ui/affix-group.js +0 -51
  647. package/dist/ui/affix-group.js.map +0 -1
  648. package/dist/ui/avatar.d.ts +0 -3
  649. package/dist/ui/avatar.js +0 -52
  650. package/dist/ui/avatar.js.map +0 -1
  651. package/dist/ui/badge.d.ts +0 -9
  652. package/dist/ui/badge.js +0 -25
  653. package/dist/ui/badge.js.map +0 -1
  654. package/dist/ui/button.d.ts +0 -18
  655. package/dist/ui/button.js +0 -243
  656. package/dist/ui/button.js.map +0 -1
  657. package/dist/ui/card.d.ts +0 -11
  658. package/dist/ui/card.js +0 -68
  659. package/dist/ui/card.js.map +0 -1
  660. package/dist/ui/chart-view.d.ts +0 -3
  661. package/dist/ui/chart-view.js +0 -354
  662. package/dist/ui/chart-view.js.map +0 -1
  663. package/dist/ui/chart.d.ts +0 -3
  664. package/dist/ui/chart.js +0 -15
  665. package/dist/ui/chart.js.map +0 -1
  666. package/dist/ui/checkbox.d.ts +0 -4
  667. package/dist/ui/checkbox.js +0 -25
  668. package/dist/ui/checkbox.js.map +0 -1
  669. package/dist/ui/click-behavior.d.ts +0 -40
  670. package/dist/ui/click-behavior.js +0 -46
  671. package/dist/ui/click-behavior.js.map +0 -1
  672. package/dist/ui/code-block-view.d.ts +0 -3
  673. package/dist/ui/code-block-view.js +0 -135
  674. package/dist/ui/code-block-view.js.map +0 -1
  675. package/dist/ui/code-block.d.ts +0 -25
  676. package/dist/ui/code-block.js +0 -54
  677. package/dist/ui/code-block.js.map +0 -1
  678. package/dist/ui/collapsible.d.ts +0 -3
  679. package/dist/ui/collapsible.js +0 -56
  680. package/dist/ui/collapsible.js.map +0 -1
  681. package/dist/ui/color-picker.d.ts +0 -8
  682. package/dist/ui/color-picker.js +0 -59
  683. package/dist/ui/color-picker.js.map +0 -1
  684. package/dist/ui/combobox.d.ts +0 -42
  685. package/dist/ui/combobox.js +0 -145
  686. package/dist/ui/combobox.js.map +0 -1
  687. package/dist/ui/confirm-dialog.d.ts +0 -13
  688. package/dist/ui/confirm-dialog.js +0 -48
  689. package/dist/ui/confirm-dialog.js.map +0 -1
  690. package/dist/ui/control.d.ts +0 -10
  691. package/dist/ui/control.js +0 -26
  692. package/dist/ui/control.js.map +0 -1
  693. package/dist/ui/copyable-text.d.ts +0 -19
  694. package/dist/ui/copyable-text.js +0 -60
  695. package/dist/ui/copyable-text.js.map +0 -1
  696. package/dist/ui/dialog.d.ts +0 -23
  697. package/dist/ui/dialog.js +0 -100
  698. package/dist/ui/dialog.js.map +0 -1
  699. package/dist/ui/dropdown-menu.d.ts +0 -14
  700. package/dist/ui/dropdown-menu.js +0 -42
  701. package/dist/ui/dropdown-menu.js.map +0 -1
  702. package/dist/ui/floating-panel.d.ts +0 -3
  703. package/dist/ui/floating-panel.js +0 -66
  704. package/dist/ui/floating-panel.js.map +0 -1
  705. package/dist/ui/fragment.js.map +0 -1
  706. package/dist/ui/grid.d.ts +0 -3
  707. package/dist/ui/grid.js +0 -29
  708. package/dist/ui/grid.js.map +0 -1
  709. package/dist/ui/heading.d.ts +0 -3
  710. package/dist/ui/heading.js +0 -58
  711. package/dist/ui/heading.js.map +0 -1
  712. package/dist/ui/icon-button.d.ts +0 -22
  713. package/dist/ui/icon-button.js +0 -51
  714. package/dist/ui/icon-button.js.map +0 -1
  715. package/dist/ui/icon.d.ts +0 -3
  716. package/dist/ui/icon.js +0 -33
  717. package/dist/ui/icon.js.map +0 -1
  718. package/dist/ui/image-preview.d.ts +0 -12
  719. package/dist/ui/image-preview.js +0 -65
  720. package/dist/ui/image-preview.js.map +0 -1
  721. package/dist/ui/image.d.ts +0 -3
  722. package/dist/ui/image.js +0 -21
  723. package/dist/ui/image.js.map +0 -1
  724. package/dist/ui/index.d.ts +0 -31
  725. package/dist/ui/index.js +0 -29
  726. package/dist/ui/info-tooltip.d.ts +0 -3
  727. package/dist/ui/info-tooltip.js +0 -26
  728. package/dist/ui/info-tooltip.js.map +0 -1
  729. package/dist/ui/input-error.d.ts +0 -4
  730. package/dist/ui/input-error.js +0 -14
  731. package/dist/ui/input-error.js.map +0 -1
  732. package/dist/ui/input-otp.d.ts +0 -7
  733. package/dist/ui/input-otp.js +0 -29
  734. package/dist/ui/input-otp.js.map +0 -1
  735. package/dist/ui/input.d.ts +0 -5
  736. package/dist/ui/input.js +0 -17
  737. package/dist/ui/input.js.map +0 -1
  738. package/dist/ui/label.d.ts +0 -4
  739. package/dist/ui/label.js +0 -16
  740. package/dist/ui/label.js.map +0 -1
  741. package/dist/ui/link.d.ts +0 -7
  742. package/dist/ui/link.js +0 -103
  743. package/dist/ui/link.js.map +0 -1
  744. package/dist/ui/modal.d.ts +0 -3
  745. package/dist/ui/modal.js +0 -67
  746. package/dist/ui/modal.js.map +0 -1
  747. package/dist/ui/native-select.d.ts +0 -10
  748. package/dist/ui/native-select.js +0 -23
  749. package/dist/ui/native-select.js.map +0 -1
  750. package/dist/ui/password-input.d.ts +0 -7
  751. package/dist/ui/password-input.js +0 -36
  752. package/dist/ui/password-input.js.map +0 -1
  753. package/dist/ui/pill.d.ts +0 -2
  754. package/dist/ui/pill.js +0 -10
  755. package/dist/ui/pill.js.map +0 -1
  756. package/dist/ui/plugin.d.ts +0 -1
  757. package/dist/ui/plugin.js +0 -60
  758. package/dist/ui/plugin.js.map +0 -1
  759. package/dist/ui/popover.d.ts +0 -8
  760. package/dist/ui/popover.js +0 -37
  761. package/dist/ui/popover.js.map +0 -1
  762. package/dist/ui/progress.d.ts +0 -3
  763. package/dist/ui/progress.js +0 -114
  764. package/dist/ui/progress.js.map +0 -1
  765. package/dist/ui/raw-block.d.ts +0 -3
  766. package/dist/ui/raw-block.js +0 -10
  767. package/dist/ui/raw-block.js.map +0 -1
  768. package/dist/ui/section.d.ts +0 -3
  769. package/dist/ui/section.js +0 -68
  770. package/dist/ui/section.js.map +0 -1
  771. package/dist/ui/segmented-control.d.ts +0 -3
  772. package/dist/ui/segmented-control.js +0 -27
  773. package/dist/ui/segmented-control.js.map +0 -1
  774. package/dist/ui/segmented-pills.d.ts +0 -16
  775. package/dist/ui/segmented-pills.js +0 -42
  776. package/dist/ui/segmented-pills.js.map +0 -1
  777. package/dist/ui/separator.d.ts +0 -3
  778. package/dist/ui/separator.js +0 -15
  779. package/dist/ui/separator.js.map +0 -1
  780. package/dist/ui/skeleton.d.ts +0 -3
  781. package/dist/ui/skeleton.js +0 -16
  782. package/dist/ui/skeleton.js.map +0 -1
  783. package/dist/ui/spinner.d.ts +0 -2
  784. package/dist/ui/spinner.js +0 -20
  785. package/dist/ui/spinner.js.map +0 -1
  786. package/dist/ui/stack.d.ts +0 -3
  787. package/dist/ui/stack.js +0 -66
  788. package/dist/ui/stack.js.map +0 -1
  789. package/dist/ui/tabs.d.ts +0 -4
  790. package/dist/ui/tabs.js +0 -149
  791. package/dist/ui/tabs.js.map +0 -1
  792. package/dist/ui/text.d.ts +0 -3
  793. package/dist/ui/text.js +0 -38
  794. package/dist/ui/text.js.map +0 -1
  795. package/dist/ui/textarea.d.ts +0 -3
  796. package/dist/ui/textarea.js +0 -16
  797. package/dist/ui/textarea.js.map +0 -1
  798. package/dist/ui/tooltip.d.ts +0 -3
  799. package/dist/ui/tooltip.js +0 -25
  800. package/dist/ui/tooltip.js.map +0 -1
  801. package/dist/ui/use-collapsible-state.d.ts +0 -7
  802. package/dist/ui/use-collapsible-state.js +0 -21
  803. package/dist/ui/use-collapsible-state.js.map +0 -1
  804. package/dist-standalone/chunks/chart-view-CFV7BU_D.js +0 -59
  805. package/dist-standalone/chunks/date-picker-field-DepKtR_m.js +0 -1
  806. package/dist-standalone/chunks/dist-BtOmkEqQ.js +0 -1
  807. package/dist-standalone/chunks/dist-DqlcM-vw.js +0 -2
  808. package/dist-standalone/chunks/instance-C4O1XWa6.js +0 -1
  809. package/dist-standalone/chunks/jsx-runtime-0vZSBttN.js +0 -1
  810. package/dist-standalone/chunks/locale-GyqtaX1O.js +0 -1
  811. package/dist-standalone/chunks/number-BvVKQqOG.js +0 -1
  812. package/dist-standalone/chunks/page-props-BHNNVkgJ.js +0 -1
  813. package/dist-standalone/chunks/react-SIfiwpqq.js +0 -1
  814. package/dist-standalone/chunks/react-dom-DJCfT20h.js +0 -1
  815. package/dist-standalone/chunks/shared-props-B_wT1GcG.js +0 -1
  816. package/dist-standalone/chunks/subscriptions-4IpkpPX3.js +0 -1
  817. package/dist-standalone/chunks/time-picker-DUjYyeeP.js +0 -1
  818. package/dist-standalone/chunks/timezone-CyoBch3a.js +0 -1
  819. package/dist-standalone/chunks/translatable-DLw4h3x8.js +0 -1
  820. package/dist-standalone/chunks/use-dependent-field-DvH7mUyx.js +0 -41
  821. package/dist-standalone/chunks/use-effect-dispatcher-BMWOfaFE.js +0 -97
  822. package/dist-standalone/chunks/with-selector-zFUY-tQj.js +0 -1
  823. package/resources/icons/align-center.svg +0 -17
  824. package/resources/icons/align-justify.svg +0 -17
  825. package/resources/icons/align-left.svg +0 -17
  826. package/resources/icons/align-right.svg +0 -17
  827. package/resources/icons/arrow-down.svg +0 -16
  828. package/resources/icons/arrow-up.svg +0 -16
  829. package/resources/icons/bell.svg +0 -16
  830. package/resources/icons/bold.svg +0 -15
  831. package/resources/icons/calendar.svg +0 -18
  832. package/resources/icons/check.svg +0 -15
  833. package/resources/icons/chevron-down.svg +0 -15
  834. package/resources/icons/chevron-left.svg +0 -15
  835. package/resources/icons/chevron-right.svg +0 -15
  836. package/resources/icons/chevrons-up-down.svg +0 -16
  837. package/resources/icons/circle-alert.svg +0 -17
  838. package/resources/icons/circle-check.svg +0 -16
  839. package/resources/icons/circle-help.svg +0 -17
  840. package/resources/icons/circle-x.svg +0 -17
  841. package/resources/icons/clock.svg +0 -16
  842. package/resources/icons/code-xml.svg +0 -17
  843. package/resources/icons/code.svg +0 -16
  844. package/resources/icons/columns-3.svg +0 -17
  845. package/resources/icons/copy.svg +0 -16
  846. package/resources/icons/external-link.svg +0 -17
  847. package/resources/icons/eye-off.svg +0 -18
  848. package/resources/icons/eye.svg +0 -16
  849. package/resources/icons/filter.svg +0 -15
  850. package/resources/icons/heading-1.svg +0 -18
  851. package/resources/icons/heading-2.svg +0 -18
  852. package/resources/icons/heading-3.svg +0 -19
  853. package/resources/icons/heading.svg +0 -17
  854. package/resources/icons/highlighter.svg +0 -16
  855. package/resources/icons/info.svg +0 -17
  856. package/resources/icons/italic.svg +0 -17
  857. package/resources/icons/layout-dashboard.svg +0 -18
  858. package/resources/icons/link.svg +0 -16
  859. package/resources/icons/list-ordered.svg +0 -20
  860. package/resources/icons/list.svg +0 -20
  861. package/resources/icons/loader-2.svg +0 -15
  862. package/resources/icons/minus.svg +0 -15
  863. package/resources/icons/more-horizontal.svg +0 -17
  864. package/resources/icons/panel-left.svg +0 -16
  865. package/resources/icons/pencil-line.svg +0 -17
  866. package/resources/icons/pencil.svg +0 -16
  867. package/resources/icons/plus.svg +0 -16
  868. package/resources/icons/quote.svg +0 -16
  869. package/resources/icons/rotate-ccw.svg +0 -16
  870. package/resources/icons/rows-3.svg +0 -17
  871. package/resources/icons/search.svg +0 -16
  872. package/resources/icons/send.svg +0 -16
  873. package/resources/icons/settings.svg +0 -16
  874. package/resources/icons/smile.svg +0 -18
  875. package/resources/icons/strikethrough.svg +0 -17
  876. package/resources/icons/table.svg +0 -18
  877. package/resources/icons/trash-2.svg +0 -19
  878. package/resources/icons/underline.svg +0 -16
  879. package/resources/icons/x.svg +0 -16
@@ -1,40 +0,0 @@
1
- import { createContext, useContext } from "react";
2
- //#region resources/js/core/registry-context.tsx
3
- /**
4
- * Holds the active Registry for the current Provider subtree. Extracted into
5
- * its own module to break the circular reference between provider.tsx (which
6
- * imports the default registry instance) and use-effect-dispatcher.ts (which
7
- * imports the context selector). Neither file imports from the other; both
8
- * import from here.
9
- *
10
- * The context default is null. Selectors fall back to `_defaultRegistry`,
11
- * which provider.tsx sets at module evaluation time (after registry.ts has
12
- * finished loading). This avoids a synchronous evaluation cycle while
13
- * preserving the pre-existing behaviour that components work without a
14
- * surrounding <Provider>.
15
- */
16
- var RegistryContext = createContext(null);
17
- /**
18
- * Called by provider.tsx at module-evaluation time, after registry.ts finishes
19
- * loading. The constraint is on CALLING this setter, not on importing this
20
- * module: do not call setDefaultRegistry from any module that evaluates before
21
- * registry.ts completes. (use-effect-dispatcher.ts safely imports the selectors
22
- * below — that import is exactly why this module was extracted.)
23
- */
24
- var _defaultRegistry = null;
25
- function setDefaultRegistry(registry) {
26
- _defaultRegistry = registry;
27
- }
28
- function useComponentRegistry() {
29
- return (useContext(RegistryContext) ?? _defaultRegistry)?.components ?? {};
30
- }
31
- function useColumnRegistry() {
32
- return (useContext(RegistryContext) ?? _defaultRegistry)?.columns ?? {};
33
- }
34
- function useEffectHandlerRegistry() {
35
- return (useContext(RegistryContext) ?? _defaultRegistry)?.effects ?? {};
36
- }
37
- //#endregion
38
- export { RegistryContext, setDefaultRegistry, useColumnRegistry, useComponentRegistry, useEffectHandlerRegistry };
39
-
40
- //# sourceMappingURL=registry-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry-context.js","names":[],"sources":["../../resources/js/core/registry-context.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport type { ComponentRegistry, Registry } from \"./registry\";\nimport type { EffectHandlerRegistry } from \"@lattice-php/lattice/effects/registry\";\nimport type { ColumnRegistry } from \"@lattice-php/lattice/table/registry\";\n\n/**\n * Holds the active Registry for the current Provider subtree. Extracted into\n * its own module to break the circular reference between provider.tsx (which\n * imports the default registry instance) and use-effect-dispatcher.ts (which\n * imports the context selector). Neither file imports from the other; both\n * import from here.\n *\n * The context default is null. Selectors fall back to `_defaultRegistry`,\n * which provider.tsx sets at module evaluation time (after registry.ts has\n * finished loading). This avoids a synchronous evaluation cycle while\n * preserving the pre-existing behaviour that components work without a\n * surrounding <Provider>.\n */\nexport const RegistryContext = createContext<Registry | null>(null);\n\n/**\n * Called by provider.tsx at module-evaluation time, after registry.ts finishes\n * loading. The constraint is on CALLING this setter, not on importing this\n * module: do not call setDefaultRegistry from any module that evaluates before\n * registry.ts completes. (use-effect-dispatcher.ts safely imports the selectors\n * below — that import is exactly why this module was extracted.)\n */\nlet _defaultRegistry: Registry | null = null;\n\nexport function setDefaultRegistry(registry: Registry): void {\n _defaultRegistry = registry;\n}\n\nexport function useComponentRegistry(): ComponentRegistry {\n const registry = useContext(RegistryContext) ?? _defaultRegistry;\n return registry?.components ?? {};\n}\n\nexport function useColumnRegistry(): ColumnRegistry {\n const registry = useContext(RegistryContext) ?? _defaultRegistry;\n return registry?.columns ?? {};\n}\n\nexport function useEffectHandlerRegistry(): EffectHandlerRegistry {\n const registry = useContext(RegistryContext) ?? _defaultRegistry;\n return registry?.effects ?? {};\n}\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,IAAa,kBAAkB,cAA+B,IAAI;;;;;;;;AASlE,IAAI,mBAAoC;AAExC,SAAgB,mBAAmB,UAA0B;CAC3D,mBAAmB;AACrB;AAEA,SAAgB,uBAA0C;CAExD,QADiB,WAAW,eAAe,KAAK,iBAAA,EAC/B,cAAc,CAAC;AAClC;AAEA,SAAgB,oBAAoC;CAElD,QADiB,WAAW,eAAe,KAAK,iBAAA,EAC/B,WAAW,CAAC;AAC/B;AAEA,SAAgB,2BAAkD;CAEhE,QADiB,WAAW,eAAe,KAAK,iBAAA,EAC/B,WAAW,CAAC;AAC/B"}
@@ -1,38 +0,0 @@
1
- import { LazyExoticComponent } from 'react';
2
- import { RendererComponent, RendererComponentModule } from './types.js';
3
- import { EffectHandlerRegistry } from '../effects/registry.js';
4
- import { ColumnRegistry } from '../table/registry.js';
5
- import { ComponentPropsMap } from '../types/generated.js';
6
- export type EagerComponentRegistration = {
7
- component: RendererComponent;
8
- mode: "eager";
9
- };
10
- export type LazyComponentRegistration = {
11
- component: LazyExoticComponent<RendererComponent>;
12
- load: () => Promise<RendererComponentModule>;
13
- mode: "lazy";
14
- };
15
- export type ComponentRegistration = EagerComponentRegistration | LazyComponentRegistration;
16
- export type ComponentRegistry = Record<string, ComponentRegistration>;
17
- export type ComponentRegistryFor<TTypes extends keyof ComponentPropsMap & string> = Record<TTypes, ComponentRegistration>;
18
- export type PluginI18n = {
19
- /** i18next namespace the plugin's components translate under. */
20
- namespace: string;
21
- };
22
- export type Plugin = {
23
- name: string;
24
- components?: ComponentRegistry;
25
- columns?: ColumnRegistry;
26
- effects?: EffectHandlerRegistry;
27
- i18n?: PluginI18n;
28
- };
29
- export type Registry = {
30
- components: ComponentRegistry;
31
- columns: ColumnRegistry;
32
- effects: EffectHandlerRegistry;
33
- };
34
- export declare function eagerComponent<TType extends string>(component: RendererComponent<TType>): EagerComponentRegistration;
35
- export declare function lazyComponent<TType extends string>(load: () => Promise<RendererComponentModule<TType>>): LazyComponentRegistration;
36
- export declare function createPlugin(plugin: Plugin): Plugin;
37
- export declare function createRegistry(...plugins: Plugin[]): Registry;
38
- export declare function extendRegistry(registry: Registry, ...plugins: Plugin[]): Registry;
@@ -1,60 +0,0 @@
1
- import { lazy } from "react";
2
- //#region resources/js/core/registry.ts
3
- function eagerComponent(component) {
4
- return {
5
- component,
6
- mode: "eager"
7
- };
8
- }
9
- function lazyComponent(load) {
10
- const erasedLoader = load;
11
- return {
12
- component: lazy(erasedLoader),
13
- load: erasedLoader,
14
- mode: "lazy"
15
- };
16
- }
17
- function createPlugin(plugin) {
18
- return plugin;
19
- }
20
- function createRegistry(...plugins) {
21
- return plugins.reduce((registry, plugin) => ({
22
- components: {
23
- ...registry.components,
24
- ...plugin.components
25
- },
26
- columns: {
27
- ...registry.columns,
28
- ...plugin.columns
29
- },
30
- effects: {
31
- ...registry.effects,
32
- ...plugin.effects
33
- }
34
- }), {
35
- components: {},
36
- columns: {},
37
- effects: {}
38
- });
39
- }
40
- function extendRegistry(registry, ...plugins) {
41
- const merged = createRegistry(...plugins);
42
- return {
43
- components: {
44
- ...registry.components,
45
- ...merged.components
46
- },
47
- columns: {
48
- ...registry.columns,
49
- ...merged.columns
50
- },
51
- effects: {
52
- ...registry.effects,
53
- ...merged.effects
54
- }
55
- };
56
- }
57
- //#endregion
58
- export { createPlugin, createRegistry, eagerComponent, extendRegistry, lazyComponent };
59
-
60
- //# sourceMappingURL=registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.js","names":[],"sources":["../../resources/js/core/registry.ts"],"sourcesContent":["import { lazy } from \"react\";\nimport type { LazyExoticComponent } from \"react\";\nimport type { RendererComponent, RendererComponentModule } from \"./types\";\nimport type { EffectHandlerRegistry } from \"@lattice-php/lattice/effects/registry\";\nimport type { ColumnRegistry } from \"@lattice-php/lattice/table/registry\";\nimport type { ComponentPropsMap } from \"@lattice-php/lattice/types/generated\";\n\nexport type EagerComponentRegistration = {\n component: RendererComponent;\n mode: \"eager\";\n};\n\nexport type LazyComponentRegistration = {\n component: LazyExoticComponent<RendererComponent>;\n load: () => Promise<RendererComponentModule>;\n mode: \"lazy\";\n};\n\nexport type ComponentRegistration = EagerComponentRegistration | LazyComponentRegistration;\n\nexport type ComponentRegistry = Record<string, ComponentRegistration>;\n\nexport type ComponentRegistryFor<TTypes extends keyof ComponentPropsMap & string> = Record<\n TTypes,\n ComponentRegistration\n>;\n\nexport type PluginI18n = {\n /** i18next namespace the plugin's components translate under. */\n namespace: string;\n};\n\nexport type Plugin = {\n name: string;\n components?: ComponentRegistry;\n columns?: ColumnRegistry;\n effects?: EffectHandlerRegistry;\n i18n?: PluginI18n;\n};\n\nexport type Registry = {\n components: ComponentRegistry;\n columns: ColumnRegistry;\n effects: EffectHandlerRegistry;\n};\n\nexport function eagerComponent<TType extends string>(\n component: RendererComponent<TType>,\n): EagerComponentRegistration {\n return {\n component: component as unknown as RendererComponent,\n mode: \"eager\",\n };\n}\n\nexport function lazyComponent<TType extends string>(\n load: () => Promise<RendererComponentModule<TType>>,\n): LazyComponentRegistration {\n const erasedLoader = load as unknown as () => Promise<RendererComponentModule>;\n\n return {\n component: lazy(erasedLoader),\n load: erasedLoader,\n mode: \"lazy\",\n };\n}\n\nexport function createPlugin(plugin: Plugin): Plugin {\n return plugin;\n}\n\nexport function createRegistry(...plugins: Plugin[]): Registry {\n return plugins.reduce<Registry>(\n (registry, plugin) => ({\n components: { ...registry.components, ...plugin.components },\n columns: { ...registry.columns, ...plugin.columns },\n effects: { ...registry.effects, ...plugin.effects },\n }),\n { components: {}, columns: {}, effects: {} },\n );\n}\n\nexport function extendRegistry(registry: Registry, ...plugins: Plugin[]): Registry {\n const merged = createRegistry(...plugins);\n\n return {\n components: { ...registry.components, ...merged.components },\n columns: { ...registry.columns, ...merged.columns },\n effects: { ...registry.effects, ...merged.effects },\n };\n}\n"],"mappings":";;AA8CA,SAAgB,eACd,WAC4B;CAC5B,OAAO;EACM;EACX,MAAM;CACR;AACF;AAEA,SAAgB,cACd,MAC2B;CAC3B,MAAM,eAAe;CAErB,OAAO;EACL,WAAW,KAAK,YAAY;EAC5B,MAAM;EACN,MAAM;CACR;AACF;AAEA,SAAgB,aAAa,QAAwB;CACnD,OAAO;AACT;AAEA,SAAgB,eAAe,GAAG,SAA6B;CAC7D,OAAO,QAAQ,QACZ,UAAU,YAAY;EACrB,YAAY;GAAE,GAAG,SAAS;GAAY,GAAG,OAAO;EAAW;EAC3D,SAAS;GAAE,GAAG,SAAS;GAAS,GAAG,OAAO;EAAQ;EAClD,SAAS;GAAE,GAAG,SAAS;GAAS,GAAG,OAAO;EAAQ;CACpD,IACA;EAAE,YAAY,CAAC;EAAG,SAAS,CAAC;EAAG,SAAS,CAAC;CAAE,CAC7C;AACF;AAEA,SAAgB,eAAe,UAAoB,GAAG,SAA6B;CACjF,MAAM,SAAS,eAAe,GAAG,OAAO;CAExC,OAAO;EACL,YAAY;GAAE,GAAG,SAAS;GAAY,GAAG,OAAO;EAAW;EAC3D,SAAS;GAAE,GAAG,SAAS;GAAS,GAAG,OAAO;EAAQ;EAClD,SAAS;GAAE,GAAG,SAAS;GAAS,GAAG,OAAO;EAAQ;CACpD;AACF"}
@@ -1,8 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { Node } from './types.js';
3
- export declare function Renderer({ nodes }: {
4
- nodes: Node[];
5
- }): ReactNode;
6
- export declare function RenderNode({ node }: {
7
- node: Node;
8
- }): ReactNode;
@@ -1,76 +0,0 @@
1
- import { useComponentRegistry } from "./registry-context.js";
2
- import { nodeKey } from "./nodes.js";
3
- import { useCollapsed } from "./collapsed-context.js";
4
- import { Suspense, memo } from "react";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- //#region resources/js/core/renderer.tsx
7
- function MissingComponentIcon() {
8
- return /* @__PURE__ */ jsxs("svg", {
9
- "aria-hidden": "true",
10
- className: "size-lt-icon-md shrink-0",
11
- fill: "none",
12
- stroke: "currentColor",
13
- strokeLinecap: "round",
14
- strokeLinejoin: "round",
15
- strokeWidth: "2",
16
- viewBox: "0 0 24 24",
17
- children: [
18
- /* @__PURE__ */ jsx("rect", {
19
- height: "18",
20
- rx: "2",
21
- strokeDasharray: "4 3",
22
- width: "18",
23
- x: "3",
24
- y: "3"
25
- }),
26
- /* @__PURE__ */ jsx("path", { d: "M12 8v4" }),
27
- /* @__PURE__ */ jsx("path", { d: "M12 16h.01" })
28
- ]
29
- });
30
- }
31
- /**
32
- * Fallback for a node whose type has no registered renderer. Always renders a
33
- * visible, muted marker — icon-only survives tight spots like table cells — so
34
- * the gap is never invisible. Shows the type inline in development; keeps it
35
- * screen-reader-only (plus a hover tooltip) in production.
36
- */
37
- function MissingComponent({ node }) {
38
- node.type;
39
- const label = `Missing component: ${node.type}`;
40
- return /* @__PURE__ */ jsxs("span", {
41
- className: "inline-flex items-center gap-1.5 align-middle text-lt-muted-fg",
42
- "data-lattice-missing-component": node.type,
43
- title: label,
44
- children: [/* @__PURE__ */ jsx(MissingComponentIcon, {}), /* @__PURE__ */ jsx("span", {
45
- className: "sr-only",
46
- children: label
47
- })]
48
- });
49
- }
50
- function Renderer({ nodes }) {
51
- return nodes.map((node, index) => /* @__PURE__ */ jsx(NodeRenderer, { node }, nodeKey(node, index)));
52
- }
53
- function RenderNode({ node }) {
54
- return /* @__PURE__ */ jsx(NodeRenderer, { node });
55
- }
56
- var NodeRenderer = memo(function NodeRenderer({ node }) {
57
- const collapsed = useCollapsed();
58
- const registration = useComponentRegistry()[node.type];
59
- if (collapsed && node.props?.hideWhenCollapsed === true) return null;
60
- if (!registration) return /* @__PURE__ */ jsx(MissingComponent, { node });
61
- const Component = registration.component;
62
- const children = node.schema?.length ? /* @__PURE__ */ jsx(Renderer, { nodes: node.schema }) : null;
63
- const renderedComponent = /* @__PURE__ */ jsx(Component, {
64
- node,
65
- children
66
- });
67
- if (registration.mode === "lazy") return /* @__PURE__ */ jsx(Suspense, {
68
- fallback: null,
69
- children: renderedComponent
70
- });
71
- return renderedComponent;
72
- });
73
- //#endregion
74
- export { RenderNode, Renderer };
75
-
76
- //# sourceMappingURL=renderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderer.js","names":[],"sources":["../../resources/js/core/renderer.tsx"],"sourcesContent":["import { memo, Suspense } from \"react\";\nimport type { ReactNode } from \"react\";\nimport type { Node } from \"./types\";\nimport { nodeKey } from \"./nodes\";\nimport { useCollapsed } from \"./collapsed-context\";\nimport { useComponentRegistry } from \"./registry-context\";\n\nconst warnedMissingTypes = new Set<string>();\n\nfunction warnMissingComponent(type: string): void {\n if (!import.meta.env.DEV || warnedMissingTypes.has(type)) {\n return;\n }\n\n warnedMissingTypes.add(type);\n console.warn(\n `[lattice] No component registered for node type \"${type}\" — Lattice rendered a fallback ` +\n \"placeholder. Likely causes: your app registry was not passed to \" +\n \"createLatticeApp({ registry }), or the registry key does not match the PHP \" +\n \"#[AsComponent]/AsField type.\",\n );\n}\n\nfunction MissingComponentIcon() {\n return (\n <svg\n aria-hidden=\"true\"\n className=\"size-lt-icon-md shrink-0\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n >\n <rect height=\"18\" rx=\"2\" strokeDasharray=\"4 3\" width=\"18\" x=\"3\" y=\"3\" />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n </svg>\n );\n}\n\n/**\n * Fallback for a node whose type has no registered renderer. Always renders a\n * visible, muted marker — icon-only survives tight spots like table cells — so\n * the gap is never invisible. Shows the type inline in development; keeps it\n * screen-reader-only (plus a hover tooltip) in production.\n */\nfunction MissingComponent({ node }: { node: Node }) {\n warnMissingComponent(node.type);\n\n const label = `Missing component: ${node.type}`;\n\n return (\n <span\n className=\"inline-flex items-center gap-1.5 align-middle text-lt-muted-fg\"\n data-lattice-missing-component={node.type}\n title={label}\n >\n <MissingComponentIcon />\n <span className={import.meta.env.DEV ? \"text-sm\" : \"sr-only\"}>{label}</span>\n </span>\n );\n}\n\nexport function Renderer({ nodes }: { nodes: Node[] }): ReactNode {\n return nodes.map((node, index) => <NodeRenderer key={nodeKey(node, index)} node={node} />);\n}\n\nexport function RenderNode({ node }: { node: Node }): ReactNode {\n return <NodeRenderer node={node} />;\n}\n\nconst NodeRenderer = memo(function NodeRenderer({ node }: { node: Node }) {\n const collapsed = useCollapsed();\n const registry = useComponentRegistry();\n const registration = registry[node.type];\n\n if (collapsed && node.props?.hideWhenCollapsed === true) {\n return null;\n }\n\n if (!registration) {\n return <MissingComponent node={node} />;\n }\n\n const Component = registration.component;\n const children = node.schema?.length ? <Renderer nodes={node.schema} /> : null;\n const renderedComponent = <Component node={node}>{children}</Component>;\n\n if (registration.mode === \"lazy\") {\n return <Suspense fallback={null}>{renderedComponent}</Suspense>;\n }\n\n return renderedComponent;\n});\n"],"mappings":";;;;;;AAuBA,SAAS,uBAAuB;CAC9B,OACE,qBAAC,OAAD;EACE,eAAY;EACZ,WAAU;EACV,MAAK;EACL,QAAO;EACP,eAAc;EACd,gBAAe;EACf,aAAY;EACZ,SAAQ;EARV,UAAA;GAUE,oBAAC,QAAD;IAAM,QAAO;IAAK,IAAG;IAAI,iBAAgB;IAAM,OAAM;IAAK,GAAE;IAAI,GAAE;GAAK,CAAA;GACvE,oBAAC,QAAD,EAAM,GAAE,UAAW,CAAA;GACnB,oBAAC,QAAD,EAAM,GAAE,aAAc,CAAA;EACnB;;AAET;;;;;;;AAQA,SAAS,iBAAiB,EAAE,QAAwB;CAClD,KAA0B;CAE1B,MAAM,QAAQ,sBAAsB,KAAK;CAEzC,OACE,qBAAC,QAAD;EACE,WAAU;EACV,kCAAgC,KAAK;EACrC,OAAO;EAHT,UAAA,CAKE,oBAAC,sBAAD,CAAuB,CAAA,GACvB,oBAAC,QAAD;GAAM,WAA6C;GAAY,UAAA;EAAY,CAAA,CACvE;;AAEV;AAEA,SAAgB,SAAS,EAAE,SAAuC;CAChE,OAAO,MAAM,KAAK,MAAM,UAAU,oBAAC,cAAD,EAA+C,KAAO,GAAnC,QAAQ,MAAM,KAAK,CAAgB,CAAC;AAC3F;AAEA,SAAgB,WAAW,EAAE,QAAmC;CAC9D,OAAO,oBAAC,cAAD,EAAoB,KAAO,CAAA;AACpC;AAEA,IAAM,eAAe,KAAK,SAAS,aAAa,EAAE,QAAwB;CACxE,MAAM,YAAY,aAAa;CAE/B,MAAM,eADW,qBACI,CAAA,CAAS,KAAK;CAEnC,IAAI,aAAa,KAAK,OAAO,sBAAsB,MACjD,OAAO;CAGT,IAAI,CAAC,cACH,OAAO,oBAAC,kBAAD,EAAwB,KAAO,CAAA;CAGxC,MAAM,YAAY,aAAa;CAC/B,MAAM,WAAW,KAAK,QAAQ,SAAS,oBAAC,UAAD,EAAU,OAAO,KAAK,OAAS,CAAA,IAAI;CAC1E,MAAM,oBAAoB,oBAAC,WAAD;EAAiB;EAAO;CAAoB,CAAA;CAEtE,IAAI,aAAa,SAAS,QACxB,OAAO,oBAAC,UAAD;EAAU,UAAU;EAAO,UAAA;CAA4B,CAAA;CAGhE,OAAO;AACT,CAAC"}
@@ -1,8 +0,0 @@
1
- import { Node } from './types.js';
2
- type IdentifiedNode = Pick<Node, "id" | "key">;
3
- export declare function testIdentity(value: string | null | undefined): string | undefined;
4
- export declare function nodeIdentity(node: IdentifiedNode): string | undefined;
5
- export declare function leafTestIdentity(value: string | null | undefined): string | undefined;
6
- export declare function prefixedTestId(prefix: string, value: string | null | undefined): string | undefined;
7
- export declare function prefixedNodeTestId(prefix: string, node: IdentifiedNode): string | undefined;
8
- export {};
@@ -1,21 +0,0 @@
1
- //#region resources/js/core/test-id.ts
2
- function testIdentity(value) {
3
- return value === void 0 || value === null || value === "" ? void 0 : value;
4
- }
5
- function nodeIdentity(node) {
6
- return testIdentity(node.key) ?? testIdentity(node.id);
7
- }
8
- function leafTestIdentity(value) {
9
- return testIdentity(value)?.split(".").at(-1);
10
- }
11
- function prefixedTestId(prefix, value) {
12
- const identity = leafTestIdentity(value);
13
- return identity ? `${prefix}-${identity}` : void 0;
14
- }
15
- function prefixedNodeTestId(prefix, node) {
16
- return prefixedTestId(prefix, nodeIdentity(node));
17
- }
18
- //#endregion
19
- export { leafTestIdentity, nodeIdentity, prefixedNodeTestId, prefixedTestId, testIdentity };
20
-
21
- //# sourceMappingURL=test-id.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-id.js","names":[],"sources":["../../resources/js/core/test-id.ts"],"sourcesContent":["import type { Node } from \"./types\";\n\ntype IdentifiedNode = Pick<Node, \"id\" | \"key\">;\n\nexport function testIdentity(value: string | null | undefined): string | undefined {\n return value === undefined || value === null || value === \"\" ? undefined : value;\n}\n\nexport function nodeIdentity(node: IdentifiedNode): string | undefined {\n return testIdentity(node.key) ?? testIdentity(node.id);\n}\n\nexport function leafTestIdentity(value: string | null | undefined): string | undefined {\n return testIdentity(value)?.split(\".\").at(-1);\n}\n\nexport function prefixedTestId(\n prefix: string,\n value: string | null | undefined,\n): string | undefined {\n const identity = leafTestIdentity(value);\n\n return identity ? `${prefix}-${identity}` : undefined;\n}\n\nexport function prefixedNodeTestId(prefix: string, node: IdentifiedNode): string | undefined {\n return prefixedTestId(prefix, nodeIdentity(node));\n}\n"],"mappings":";AAIA,SAAgB,aAAa,OAAsD;CACjF,OAAO,UAAU,KAAA,KAAa,UAAU,QAAQ,UAAU,KAAK,KAAA,IAAY;AAC7E;AAEA,SAAgB,aAAa,MAA0C;CACrE,OAAO,aAAa,KAAK,GAAG,KAAK,aAAa,KAAK,EAAE;AACvD;AAEA,SAAgB,iBAAiB,OAAsD;CACrF,OAAO,aAAa,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE;AAC9C;AAEA,SAAgB,eACd,QACA,OACoB;CACpB,MAAM,WAAW,iBAAiB,KAAK;CAEvC,OAAO,WAAW,GAAG,OAAO,GAAG,aAAa,KAAA;AAC9C;AAEA,SAAgB,mBAAmB,QAAgB,MAA0C;CAC3F,OAAO,eAAe,QAAQ,aAAa,IAAI,CAAC;AAClD"}
@@ -1,26 +0,0 @@
1
- import { ComponentType as ReactComponentType, ReactNode } from 'react';
2
- import { CommonNodeProps, ComponentProps, Node, NodeProps, NodeType, NodeUnionOf, Option, PageContainer as KnownPageContainer, ComponentPropsOf, ResolveProps, Schema, Breadcrumb, PageLayoutPayload, PagePayload as GeneratedPagePayload } from '../types/generated.js';
3
- export type { CommonNodeProps, ComponentProps, KnownPageContainer, Node, NodeProps, NodeType, NodeUnionOf, Option, ComponentPropsOf, ResolveProps, Schema, };
4
- /** Its `schema` holds exactly one Outlet node. */
5
- export type LayoutPayload = PageLayoutPayload;
6
- export type PageBreadcrumb = Breadcrumb;
7
- /**
8
- * The page payload the server hydrates onto `lattice` — the generated
9
- * `PagePayload` (PHP `Http\PagePayload`), with `container` refined to the
10
- * known-container union custom containers extend.
11
- */
12
- export type PagePayload = Omit<GeneratedPagePayload, "container"> & {
13
- container: PageContainer;
14
- };
15
- export type PageContainer = KnownPageContainer | (string & {});
16
- export type RendererComponentProps<TType extends string = string> = {
17
- children: ReactNode;
18
- node: Node<TType>;
19
- };
20
- export type RendererComponent<TType extends string = string> = ReactComponentType<RendererComponentProps<TType>>;
21
- export type RendererComponentModule<TType extends string = string> = {
22
- default: RendererComponent<TType>;
23
- };
24
- export type UnknownComponent = ReactComponentType<{
25
- node: Node;
26
- }>;
File without changes
@@ -1,25 +0,0 @@
1
- export type Transfer = {
2
- url: string;
3
- method: string;
4
- body: FormData | File | Blob;
5
- headers: Record<string, unknown>;
6
- onProgress?: (percent: number) => void;
7
- };
8
- export type SignedUploadRequest = {
9
- ref: string;
10
- target: string;
11
- filename: string;
12
- contentType: string;
13
- values?: Record<string, unknown>;
14
- };
15
- /**
16
- * XHR rather than fetch because only XHR reports upload progress. A transport
17
- * failure leaves `status` at 0, which `new Response` rejects as out of range, so
18
- * it is mapped to 500 — otherwise the promise never settles and the upload hangs.
19
- */
20
- export declare function xhrTransfer({ url, method, body, headers, onProgress, }: Transfer): Promise<Response>;
21
- /**
22
- * Asks the component for a signed upload. Form fields spread their live values
23
- * in so the server-side schema walk can find the field inside repeater rows.
24
- */
25
- export declare function requestSignedUpload(endpoint: string, { ref, target, filename, contentType, values }: SignedUploadRequest): Promise<Response>;
@@ -1,48 +0,0 @@
1
- import { apiFetch } from "./api.js";
2
- //#region resources/js/core/upload.ts
3
- /**
4
- * XHR rather than fetch because only XHR reports upload progress. A transport
5
- * failure leaves `status` at 0, which `new Response` rejects as out of range, so
6
- * it is mapped to 500 — otherwise the promise never settles and the upload hangs.
7
- */
8
- function xhrTransfer({ url, method, body, headers, onProgress }) {
9
- return new Promise((resolve, reject) => {
10
- const request = new XMLHttpRequest();
11
- request.open(method, url, true);
12
- Object.entries(headers).forEach(([key, value]) => request.setRequestHeader(key, String(value)));
13
- request.upload.onprogress = (event) => {
14
- if (event.lengthComputable) onProgress?.(Math.round(event.loaded / event.total * 100));
15
- };
16
- request.onload = () => {
17
- try {
18
- resolve(new Response(request.responseText || null, { status: request.status || 500 }));
19
- } catch {
20
- reject(/* @__PURE__ */ new Error(`Upload to ${url} returned an unusable response`));
21
- }
22
- };
23
- request.onerror = () => reject(/* @__PURE__ */ new Error(`Upload to ${url} failed`));
24
- request.send(body);
25
- });
26
- }
27
- /**
28
- * Asks the component for a signed upload. Form fields spread their live values
29
- * in so the server-side schema walk can find the field inside repeater rows.
30
- */
31
- function requestSignedUpload(endpoint, { ref, target, filename, contentType, values }) {
32
- return apiFetch(endpoint, {
33
- method: "POST",
34
- ref,
35
- body: JSON.stringify({
36
- ...values,
37
- _sub: "upload",
38
- _target: target,
39
- filename,
40
- contentType
41
- }),
42
- throwOnError: false
43
- });
44
- }
45
- //#endregion
46
- export { requestSignedUpload, xhrTransfer };
47
-
48
- //# sourceMappingURL=upload.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"upload.js","names":[],"sources":["../../resources/js/core/upload.ts"],"sourcesContent":["import { apiFetch } from \"./api\";\n\nexport type Transfer = {\n url: string;\n method: string;\n body: FormData | File | Blob;\n headers: Record<string, unknown>;\n onProgress?: (percent: number) => void;\n};\n\nexport type SignedUploadRequest = {\n ref: string;\n target: string;\n filename: string;\n contentType: string;\n values?: Record<string, unknown>;\n};\n\n/**\n * XHR rather than fetch because only XHR reports upload progress. A transport\n * failure leaves `status` at 0, which `new Response` rejects as out of range, so\n * it is mapped to 500 — otherwise the promise never settles and the upload hangs.\n */\nexport function xhrTransfer({\n url,\n method,\n body,\n headers,\n onProgress,\n}: Transfer): Promise<Response> {\n return new Promise((resolve, reject) => {\n const request = new XMLHttpRequest();\n\n request.open(method, url, true);\n Object.entries(headers).forEach(([key, value]) => request.setRequestHeader(key, String(value)));\n request.upload.onprogress = (event) => {\n if (event.lengthComputable) {\n onProgress?.(Math.round((event.loaded / event.total) * 100));\n }\n };\n request.onload = () => {\n try {\n resolve(new Response(request.responseText || null, { status: request.status || 500 }));\n } catch {\n reject(new Error(`Upload to ${url} returned an unusable response`));\n }\n };\n request.onerror = () => reject(new Error(`Upload to ${url} failed`));\n request.send(body);\n });\n}\n\n/**\n * Asks the component for a signed upload. Form fields spread their live values\n * in so the server-side schema walk can find the field inside repeater rows.\n */\nexport function requestSignedUpload(\n endpoint: string,\n { ref, target, filename, contentType, values }: SignedUploadRequest,\n): Promise<Response> {\n return apiFetch(endpoint, {\n method: \"POST\",\n ref,\n body: JSON.stringify({\n ...values,\n _sub: \"upload\",\n _target: target,\n filename,\n contentType,\n }),\n throwOnError: false,\n });\n}\n"],"mappings":";;;;;;;AAuBA,SAAgB,YAAY,EAC1B,KACA,QACA,MACA,SACA,cAC8B;CAC9B,OAAO,IAAI,SAAS,SAAS,WAAW;EACtC,MAAM,UAAU,IAAI,eAAe;EAEnC,QAAQ,KAAK,QAAQ,KAAK,IAAI;EAC9B,OAAO,QAAQ,OAAO,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW,QAAQ,iBAAiB,KAAK,OAAO,KAAK,CAAC,CAAC;EAC9F,QAAQ,OAAO,cAAc,UAAU;GACrC,IAAI,MAAM,kBACR,aAAa,KAAK,MAAO,MAAM,SAAS,MAAM,QAAS,GAAG,CAAC;EAE/D;EACA,QAAQ,eAAe;GACrB,IAAI;IACF,QAAQ,IAAI,SAAS,QAAQ,gBAAgB,MAAM,EAAE,QAAQ,QAAQ,UAAU,IAAI,CAAC,CAAC;GACvF,QAAQ;IACN,uBAAO,IAAI,MAAM,aAAa,IAAI,+BAA+B,CAAC;GACpE;EACF;EACA,QAAQ,gBAAgB,uBAAO,IAAI,MAAM,aAAa,IAAI,QAAQ,CAAC;EACnE,QAAQ,KAAK,IAAI;CACnB,CAAC;AACH;;;;;AAMA,SAAgB,oBACd,UACA,EAAE,KAAK,QAAQ,UAAU,aAAa,UACnB;CACnB,OAAO,SAAS,UAAU;EACxB,QAAQ;EACR;EACA,MAAM,KAAK,UAAU;GACnB,GAAG;GACH,MAAM;GACN,SAAS;GACT;GACA;EACF,CAAC;EACD,cAAc;CAChB,CAAC;AACH"}
@@ -1,19 +0,0 @@
1
- import { ActionResult, Effect } from '../types/generated.js';
2
- import { EffectHandlerRegistry } from './registry.js';
3
- export type ActionEffect = Effect;
4
- export type ActionResponse = Partial<ActionResult>;
5
- /**
6
- * Run each effect through its handler. Handlers default to the built-ins; the
7
- * Provider passes a merged registry that also includes consumer-registered
8
- * handlers. An effect with no handler is warned about (dev) and skipped.
9
- */
10
- export declare function dispatchEffects(effects: ActionEffect[], handlers?: EffectHandlerRegistry): void;
11
- export declare function dispatchActionError(error: unknown): void;
12
- export declare function getActionEffects(effects: unknown): ActionEffect[];
13
- /**
14
- * Structural guard for an effect on the wire. Intentionally open: it accepts any
15
- * object with a string `type`, not only the built-in types, so consumer-registered
16
- * effects pass through getActionEffects() and reach their handlers. Dispatch warns
17
- * on (and skips) a type with no registered handler.
18
- */
19
- export declare function isActionEffect(effect: unknown): effect is ActionEffect;
@@ -1,39 +0,0 @@
1
- import { LATTICE_EVENT } from "../core/event-names.js";
2
- import { builtinEffectHandlers } from "./registry.js";
3
- //#region resources/js/effects/dispatch.ts
4
- /**
5
- * Run each effect through its handler. Handlers default to the built-ins; the
6
- * Provider passes a merged registry that also includes consumer-registered
7
- * handlers. An effect with no handler is warned about (dev) and skipped.
8
- */
9
- function dispatchEffects(effects, handlers = builtinEffectHandlers) {
10
- if (typeof window === "undefined") return;
11
- for (const effect of effects) {
12
- const handler = handlers[effect.type];
13
- if (handler === void 0) {
14
- console.warn(`[lattice] No handler registered for effect type "${effect.type}".`);
15
- continue;
16
- }
17
- handler(effect);
18
- }
19
- }
20
- function dispatchActionError(error) {
21
- if (typeof window === "undefined") return;
22
- window.dispatchEvent(new CustomEvent(LATTICE_EVENT.actionError, { detail: { error } }));
23
- }
24
- function getActionEffects(effects) {
25
- return Array.isArray(effects) ? effects.filter(isActionEffect) : [];
26
- }
27
- /**
28
- * Structural guard for an effect on the wire. Intentionally open: it accepts any
29
- * object with a string `type`, not only the built-in types, so consumer-registered
30
- * effects pass through getActionEffects() and reach their handlers. Dispatch warns
31
- * on (and skips) a type with no registered handler.
32
- */
33
- function isActionEffect(effect) {
34
- return typeof effect === "object" && effect !== null && "type" in effect && typeof effect.type === "string";
35
- }
36
- //#endregion
37
- export { dispatchActionError, dispatchEffects, getActionEffects, isActionEffect };
38
-
39
- //# sourceMappingURL=dispatch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dispatch.js","names":[],"sources":["../../resources/js/effects/dispatch.ts"],"sourcesContent":["import type { ActionResult, Effect } from \"@lattice-php/lattice/types/generated\";\nimport { LATTICE_EVENT } from \"@lattice-php/lattice/core/event-names\";\nimport { builtinEffectHandlers } from \"./registry\";\nimport type { EffectHandlerRegistry } from \"./registry\";\n\nexport type ActionEffect = Effect;\n\nexport type ActionResponse = Partial<ActionResult>;\n\n/**\n * Run each effect through its handler. Handlers default to the built-ins; the\n * Provider passes a merged registry that also includes consumer-registered\n * handlers. An effect with no handler is warned about (dev) and skipped.\n */\nexport function dispatchEffects(\n effects: ActionEffect[],\n handlers: EffectHandlerRegistry = builtinEffectHandlers,\n): void {\n if (typeof window === \"undefined\") {\n return;\n }\n\n for (const effect of effects) {\n const handler = handlers[effect.type];\n\n if (handler === undefined) {\n console.warn(`[lattice] No handler registered for effect type \"${effect.type}\".`);\n continue;\n }\n\n handler(effect);\n }\n}\n\nexport function dispatchActionError(error: unknown): void {\n if (typeof window === \"undefined\") {\n return;\n }\n\n window.dispatchEvent(new CustomEvent(LATTICE_EVENT.actionError, { detail: { error } }));\n}\n\nexport function getActionEffects(effects: unknown): ActionEffect[] {\n return Array.isArray(effects) ? effects.filter(isActionEffect) : [];\n}\n\n/**\n * Structural guard for an effect on the wire. Intentionally open: it accepts any\n * object with a string `type`, not only the built-in types, so consumer-registered\n * effects pass through getActionEffects() and reach their handlers. Dispatch warns\n * on (and skips) a type with no registered handler.\n */\nexport function isActionEffect(effect: unknown): effect is ActionEffect {\n return (\n typeof effect === \"object\" &&\n effect !== null &&\n \"type\" in effect &&\n typeof (effect as { type: unknown }).type === \"string\"\n );\n}\n"],"mappings":";;;;;;;;AAcA,SAAgB,gBACd,SACA,WAAkC,uBAC5B;CACN,IAAI,OAAO,WAAW,aACpB;CAGF,KAAK,MAAM,UAAU,SAAS;EAC5B,MAAM,UAAU,SAAS,OAAO;EAEhC,IAAI,YAAY,KAAA,GAAW;GACzB,QAAQ,KAAK,oDAAoD,OAAO,KAAK,GAAG;GAChF;EACF;EAEA,QAAQ,MAAM;CAChB;AACF;AAEA,SAAgB,oBAAoB,OAAsB;CACxD,IAAI,OAAO,WAAW,aACpB;CAGF,OAAO,cAAc,IAAI,YAAY,cAAc,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;AACxF;AAEA,SAAgB,iBAAiB,SAAkC;CACjE,OAAO,MAAM,QAAQ,OAAO,IAAI,QAAQ,OAAO,cAAc,IAAI,CAAC;AACpE;;;;;;;AAQA,SAAgB,eAAe,QAAyC;CACtE,OACE,OAAO,WAAW,YAClB,WAAW,QACX,UAAU,UACV,OAAQ,OAA6B,SAAS;AAElD"}
@@ -1,12 +0,0 @@
1
- import { EffectOf, EffectProps, EffectPropsMap, EffectPropsOf } from '../types/generated.js';
2
- export type { EffectOf, EffectProps, EffectPropsOf };
3
- export type EffectHandler<TType extends string = string> = (effect: EffectOf<TType>) => void;
4
- export type EffectHandlerRegistry = Record<string, EffectHandler>;
5
- export type EffectHandlerRegistryFor<TTypes extends keyof EffectPropsMap & string> = Record<TTypes, EffectHandler>;
6
- /**
7
- * Author a handler against `EffectHandler<"my.type">` for a typed payload, then
8
- * register it through this — it erases the type parameter for the loose registry.
9
- */
10
- export declare function effectHandler<TType extends string>(_type: TType, fn: EffectHandler<TType>): EffectHandler;
11
- export declare const builtinEffectHandlers: EffectHandlerRegistryFor<keyof EffectPropsMap & string>;
12
- export declare function mergeEffectHandlers(...registries: Array<EffectHandlerRegistry | undefined>): EffectHandlerRegistry;
@@ -1,43 +0,0 @@
1
- import { LATTICE_EVENT } from "../core/event-names.js";
2
- import { setLocale } from "../i18n/locale.js";
3
- import { router } from "@inertiajs/react";
4
- //#region resources/js/effects/registry.ts
5
- /**
6
- * Author a handler against `EffectHandler<"my.type">` for a typed payload, then
7
- * register it through this — it erases the type parameter for the loose registry.
8
- */
9
- function effectHandler(_type, fn) {
10
- return fn;
11
- }
12
- function triggerDownload(url) {
13
- const link = document.createElement("a");
14
- link.href = url;
15
- link.rel = "noopener";
16
- document.body.appendChild(link);
17
- link.click();
18
- link.remove();
19
- }
20
- function bridge(event) {
21
- return (effect) => window.dispatchEvent(new CustomEvent(event, { detail: effect.props }));
22
- }
23
- var builtinEffectHandlers = {
24
- "reload-page": (effect) => effect.props.full ? window.location.reload() : router.reload(),
25
- redirect: (effect) => router.visit(effect.props.url),
26
- download: (effect) => triggerDownload(effect.props.url),
27
- "locale-change": (effect) => setLocale(effect.props.locale),
28
- toast: bridge(LATTICE_EVENT.toast),
29
- callout: bridge(LATTICE_EVENT.callout),
30
- "retract-callout": bridge(LATTICE_EVENT.retractCallout),
31
- "reload-component": bridge(LATTICE_EVENT.reloadComponent),
32
- "open-modal": bridge(LATTICE_EVENT.openModal),
33
- "close-modal": bridge(LATTICE_EVENT.closeModal),
34
- "reset-form": bridge(LATTICE_EVENT.resetForm),
35
- "toggle-sidebar": bridge(LATTICE_EVENT.toggleSidebar)
36
- };
37
- function mergeEffectHandlers(...registries) {
38
- return Object.assign({}, ...registries);
39
- }
40
- //#endregion
41
- export { builtinEffectHandlers, effectHandler, mergeEffectHandlers };
42
-
43
- //# sourceMappingURL=registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.js","names":[],"sources":["../../resources/js/effects/registry.ts"],"sourcesContent":["import { router } from \"@inertiajs/react\";\nimport type {\n EffectOf,\n EffectProps,\n EffectPropsMap,\n EffectPropsOf,\n} from \"@lattice-php/lattice/types/generated\";\nimport { LATTICE_EVENT } from \"@lattice-php/lattice/core/event-names\";\nimport { setLocale } from \"@lattice-php/lattice/i18n/locale\";\n\nexport type { EffectOf, EffectProps, EffectPropsOf };\n\nexport type EffectHandler<TType extends string = string> = (effect: EffectOf<TType>) => void;\n\nexport type EffectHandlerRegistry = Record<string, EffectHandler>;\n\nexport type EffectHandlerRegistryFor<TTypes extends keyof EffectPropsMap & string> = Record<\n TTypes,\n EffectHandler\n>;\n\n/**\n * Author a handler against `EffectHandler<\"my.type\">` for a typed payload, then\n * register it through this — it erases the type parameter for the loose registry.\n */\nexport function effectHandler<TType extends string>(\n _type: TType,\n fn: EffectHandler<TType>,\n): EffectHandler {\n return fn as unknown as EffectHandler;\n}\n\nfunction triggerDownload(url: string): void {\n const link = document.createElement(\"a\");\n link.href = url;\n link.rel = \"noopener\";\n document.body.appendChild(link);\n link.click();\n link.remove();\n}\n\nfunction bridge<TType extends keyof EffectPropsMap & string>(event: string): EffectHandler<TType> {\n return (effect) => window.dispatchEvent(new CustomEvent(event, { detail: effect.props }));\n}\n\n/**\n * Imperative effects act directly; the rest bridge to the `lattice:*` DOM events\n * that toast/callout/modal/fragment/form subscribe to. The export cast erases\n * the mapped type to the loose registry shape — the same variance erasure\n * effectHandler performs.\n */\nconst typedBuiltinHandlers: { [K in keyof EffectPropsMap]: EffectHandler<K> } = {\n \"reload-page\": (effect) => (effect.props.full ? window.location.reload() : router.reload()),\n redirect: (effect) => router.visit(effect.props.url),\n download: (effect) => triggerDownload(effect.props.url),\n \"locale-change\": (effect) => setLocale(effect.props.locale),\n toast: bridge<\"toast\">(LATTICE_EVENT.toast),\n callout: bridge<\"callout\">(LATTICE_EVENT.callout),\n \"retract-callout\": bridge<\"retract-callout\">(LATTICE_EVENT.retractCallout),\n \"reload-component\": bridge<\"reload-component\">(LATTICE_EVENT.reloadComponent),\n \"open-modal\": bridge<\"open-modal\">(LATTICE_EVENT.openModal),\n \"close-modal\": bridge<\"close-modal\">(LATTICE_EVENT.closeModal),\n \"reset-form\": bridge<\"reset-form\">(LATTICE_EVENT.resetForm),\n \"toggle-sidebar\": bridge<\"toggle-sidebar\">(LATTICE_EVENT.toggleSidebar),\n};\n\nexport const builtinEffectHandlers: EffectHandlerRegistryFor<keyof EffectPropsMap & string> =\n typedBuiltinHandlers as EffectHandlerRegistryFor<keyof EffectPropsMap & string>;\n\nexport function mergeEffectHandlers(\n ...registries: Array<EffectHandlerRegistry | undefined>\n): EffectHandlerRegistry {\n return Object.assign({}, ...registries);\n}\n"],"mappings":";;;;;;;;AAyBA,SAAgB,cACd,OACA,IACe;CACf,OAAO;AACT;AAEA,SAAS,gBAAgB,KAAmB;CAC1C,MAAM,OAAO,SAAS,cAAc,GAAG;CACvC,KAAK,OAAO;CACZ,KAAK,MAAM;CACX,SAAS,KAAK,YAAY,IAAI;CAC9B,KAAK,MAAM;CACX,KAAK,OAAO;AACd;AAEA,SAAS,OAAoD,OAAqC;CAChG,QAAQ,WAAW,OAAO,cAAc,IAAI,YAAY,OAAO,EAAE,QAAQ,OAAO,MAAM,CAAC,CAAC;AAC1F;AAuBA,IAAa,wBACX;CAfA,gBAAgB,WAAY,OAAO,MAAM,OAAO,OAAO,SAAS,OAAO,IAAI,OAAO,OAAO;CACzF,WAAW,WAAW,OAAO,MAAM,OAAO,MAAM,GAAG;CACnD,WAAW,WAAW,gBAAgB,OAAO,MAAM,GAAG;CACtD,kBAAkB,WAAW,UAAU,OAAO,MAAM,MAAM;CAC1D,OAAO,OAAgB,cAAc,KAAK;CAC1C,SAAS,OAAkB,cAAc,OAAO;CAChD,mBAAmB,OAA0B,cAAc,cAAc;CACzE,oBAAoB,OAA2B,cAAc,eAAe;CAC5E,cAAc,OAAqB,cAAc,SAAS;CAC1D,eAAe,OAAsB,cAAc,UAAU;CAC7D,cAAc,OAAqB,cAAc,SAAS;CAC1D,kBAAkB,OAAyB,cAAc,aAAa;AAItE;AAEF,SAAgB,oBACd,GAAG,YACoB;CACvB,OAAO,OAAO,OAAO,CAAC,GAAG,GAAG,UAAU;AACxC"}
@@ -1,8 +0,0 @@
1
- import { ActionEffect } from './dispatch.js';
2
- /**
3
- * Returns a dispatcher bound to the built-in handlers plus any consumer handlers
4
- * in the current registry. The built-ins are merged in directly so they fire even
5
- * with no <Provider> in scope (effects are infrastructural) — this is the single
6
- * place built-ins enter dispatch.
7
- */
8
- export declare function useEffectDispatcher(): (effects: ActionEffect[]) => void;
@@ -1,20 +0,0 @@
1
- import { useEffectHandlerRegistry } from "../core/registry-context.js";
2
- import { builtinEffectHandlers, mergeEffectHandlers } from "./registry.js";
3
- import { dispatchEffects } from "./dispatch.js";
4
- import { useCallback, useMemo } from "react";
5
- //#region resources/js/effects/use-effect-dispatcher.ts
6
- /**
7
- * Returns a dispatcher bound to the built-in handlers plus any consumer handlers
8
- * in the current registry. The built-ins are merged in directly so they fire even
9
- * with no <Provider> in scope (effects are infrastructural) — this is the single
10
- * place built-ins enter dispatch.
11
- */
12
- function useEffectDispatcher() {
13
- const registered = useEffectHandlerRegistry();
14
- const handlers = useMemo(() => mergeEffectHandlers(builtinEffectHandlers, registered), [registered]);
15
- return useCallback((effects) => dispatchEffects(effects, handlers), [handlers]);
16
- }
17
- //#endregion
18
- export { useEffectDispatcher };
19
-
20
- //# sourceMappingURL=use-effect-dispatcher.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-effect-dispatcher.js","names":[],"sources":["../../resources/js/effects/use-effect-dispatcher.ts"],"sourcesContent":["import { useCallback, useMemo } from \"react\";\nimport { useEffectHandlerRegistry } from \"@lattice-php/lattice/core/registry-context\";\nimport { dispatchEffects } from \"./dispatch\";\nimport type { ActionEffect } from \"./dispatch\";\nimport { builtinEffectHandlers, mergeEffectHandlers } from \"./registry\";\n\n/**\n * Returns a dispatcher bound to the built-in handlers plus any consumer handlers\n * in the current registry. The built-ins are merged in directly so they fire even\n * with no <Provider> in scope (effects are infrastructural) — this is the single\n * place built-ins enter dispatch.\n */\nexport function useEffectDispatcher(): (effects: ActionEffect[]) => void {\n const registered = useEffectHandlerRegistry();\n\n const handlers = useMemo(\n () => mergeEffectHandlers(builtinEffectHandlers, registered),\n [registered],\n );\n\n return useCallback((effects: ActionEffect[]) => dispatchEffects(effects, handlers), [handlers]);\n}\n"],"mappings":";;;;;;;;;;;AAYA,SAAgB,sBAAyD;CACvE,MAAM,aAAa,yBAAyB;CAE5C,MAAM,WAAW,cACT,oBAAoB,uBAAuB,UAAU,GAC3D,CAAC,UAAU,CACb;CAEA,OAAO,aAAa,YAA4B,gBAAgB,SAAS,QAAQ,GAAG,CAAC,QAAQ,CAAC;AAChG"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Drains the `latticeEffects` flash bag (server `Effects::flash(...)`) on each
3
- * Inertia navigation and runs the effects through the registry dispatcher.
4
- */
5
- export declare function useFlashEffects(): void;
@@ -1,22 +0,0 @@
1
- import { getActionEffects } from "./dispatch.js";
2
- import { useEffectDispatcher } from "./use-effect-dispatcher.js";
3
- import { router } from "@inertiajs/react";
4
- import { useEffect } from "react";
5
- //#region resources/js/effects/use-flash-effects.ts
6
- /**
7
- * Drains the `latticeEffects` flash bag (server `Effects::flash(...)`) on each
8
- * Inertia navigation and runs the effects through the registry dispatcher.
9
- */
10
- function useFlashEffects() {
11
- const dispatch = useEffectDispatcher();
12
- useEffect(() => {
13
- return router.on("flash", (event) => {
14
- const effects = getActionEffects(event.detail?.flash?.latticeEffects);
15
- if (effects.length > 0) dispatch(effects);
16
- });
17
- }, [dispatch]);
18
- }
19
- //#endregion
20
- export { useFlashEffects };
21
-
22
- //# sourceMappingURL=use-flash-effects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-flash-effects.js","names":[],"sources":["../../resources/js/effects/use-flash-effects.ts"],"sourcesContent":["import { router } from \"@inertiajs/react\";\nimport { useEffect } from \"react\";\nimport { getActionEffects } from \"@lattice-php/lattice/effects/dispatch\";\nimport { useEffectDispatcher } from \"@lattice-php/lattice/effects/use-effect-dispatcher\";\n\ntype InertiaFlashEvent = CustomEvent<{\n flash?: {\n latticeEffects?: unknown;\n };\n}>;\n\n/**\n * Drains the `latticeEffects` flash bag (server `Effects::flash(...)`) on each\n * Inertia navigation and runs the effects through the registry dispatcher.\n */\nexport function useFlashEffects(): void {\n const dispatch = useEffectDispatcher();\n\n useEffect(() => {\n return router.on(\"flash\", (event) => {\n const effects = getActionEffects((event as InertiaFlashEvent).detail?.flash?.latticeEffects);\n\n if (effects.length > 0) {\n dispatch(effects);\n }\n });\n }, [dispatch]);\n}\n"],"mappings":";;;;;;;;;AAeA,SAAgB,kBAAwB;CACtC,MAAM,WAAW,oBAAoB;CAErC,gBAAgB;EACd,OAAO,OAAO,GAAG,UAAU,UAAU;GACnC,MAAM,UAAU,iBAAkB,MAA4B,QAAQ,OAAO,cAAc;GAE3F,IAAI,QAAQ,SAAS,GACnB,SAAS,OAAO;EAEpB,CAAC;CACH,GAAG,CAAC,QAAQ,CAAC;AACf"}