@questpie/admin 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (965) hide show
  1. package/README.md +245 -474
  2. package/dist/_virtual/rolldown_runtime.mjs +18 -0
  3. package/dist/augmentation.d.mts +315 -0
  4. package/dist/augmentation.d.mts.map +1 -0
  5. package/dist/client/blocks/block-registry.d.mts +199 -0
  6. package/dist/client/blocks/block-registry.d.mts.map +1 -0
  7. package/dist/client/blocks/block-registry.mjs +88 -0
  8. package/dist/client/blocks/block-registry.mjs.map +1 -0
  9. package/dist/client/blocks/block-renderer.d.mts +52 -0
  10. package/dist/client/blocks/block-renderer.d.mts.map +1 -0
  11. package/dist/client/blocks/block-renderer.mjs +71 -0
  12. package/dist/client/blocks/block-renderer.mjs.map +1 -0
  13. package/dist/client/blocks/index.d.mts +4 -0
  14. package/dist/client/blocks/prefetch.d.mts +45 -0
  15. package/dist/client/blocks/prefetch.d.mts.map +1 -0
  16. package/dist/client/blocks/prefetch.mjs +26 -0
  17. package/dist/client/blocks/prefetch.mjs.map +1 -0
  18. package/dist/client/blocks/types.d.mts +69 -0
  19. package/dist/client/blocks/types.d.mts.map +1 -0
  20. package/dist/client/blocks/types.mjs +20 -0
  21. package/dist/client/blocks/types.mjs.map +1 -0
  22. package/dist/client/builder/admin-builder.d.mts +112 -0
  23. package/dist/client/builder/admin-builder.d.mts.map +1 -0
  24. package/dist/client/builder/admin-builder.mjs +185 -0
  25. package/dist/client/builder/admin-builder.mjs.map +1 -0
  26. package/dist/client/builder/admin-types.d.mts +73 -0
  27. package/dist/client/builder/admin-types.d.mts.map +1 -0
  28. package/dist/client/builder/admin.d.mts +121 -0
  29. package/dist/client/builder/admin.d.mts.map +1 -0
  30. package/dist/client/builder/admin.mjs +160 -0
  31. package/dist/client/builder/admin.mjs.map +1 -0
  32. package/dist/client/builder/defaults/components.mjs +20 -0
  33. package/dist/client/builder/defaults/components.mjs.map +1 -0
  34. package/dist/client/builder/defaults/core.d.mts +354 -0
  35. package/dist/client/builder/defaults/core.d.mts.map +1 -0
  36. package/dist/client/builder/defaults/core.mjs +49 -0
  37. package/dist/client/builder/defaults/core.mjs.map +1 -0
  38. package/dist/client/builder/defaults/fields.mjs +328 -0
  39. package/dist/client/builder/defaults/fields.mjs.map +1 -0
  40. package/dist/client/builder/defaults/pages.mjs +58 -0
  41. package/dist/client/builder/defaults/pages.mjs.map +1 -0
  42. package/dist/client/builder/defaults/starter.d.mts +351 -0
  43. package/dist/client/builder/defaults/starter.d.mts.map +1 -0
  44. package/dist/client/builder/defaults/starter.mjs +28 -0
  45. package/dist/client/builder/defaults/starter.mjs.map +1 -0
  46. package/dist/client/builder/defaults/views.mjs +27 -0
  47. package/dist/client/builder/defaults/views.mjs.map +1 -0
  48. package/dist/client/builder/defaults/widgets.mjs +31 -0
  49. package/dist/client/builder/defaults/widgets.mjs.map +1 -0
  50. package/dist/client/builder/field/field.d.mts +229 -0
  51. package/dist/client/builder/field/field.d.mts.map +1 -0
  52. package/dist/client/builder/field/field.mjs +83 -0
  53. package/dist/client/builder/field/field.mjs.map +1 -0
  54. package/dist/client/builder/index.d.mts +36 -0
  55. package/dist/client/builder/index.d.mts.map +1 -0
  56. package/dist/client/builder/page/page.d.mts +36 -0
  57. package/dist/client/builder/page/page.d.mts.map +1 -0
  58. package/dist/client/builder/page/page.mjs +27 -0
  59. package/dist/client/builder/page/page.mjs.map +1 -0
  60. package/dist/client/builder/proxies.d.mts +2 -0
  61. package/dist/client/builder/proxies.mjs +24 -0
  62. package/dist/client/builder/proxies.mjs.map +1 -0
  63. package/dist/client/builder/qa.d.mts +50 -0
  64. package/dist/client/builder/qa.d.mts.map +1 -0
  65. package/dist/client/builder/qa.mjs +42 -0
  66. package/dist/client/builder/qa.mjs.map +1 -0
  67. package/dist/client/builder/registry.d.mts +70 -0
  68. package/dist/client/builder/registry.d.mts.map +1 -0
  69. package/dist/client/builder/types/action-registry.d.mts +2 -0
  70. package/dist/client/builder/types/action-registry.mjs +142 -0
  71. package/dist/client/builder/types/action-registry.mjs.map +1 -0
  72. package/dist/client/builder/types/action-types.d.mts +253 -0
  73. package/dist/client/builder/types/action-types.d.mts.map +1 -0
  74. package/dist/client/builder/types/collection-types.d.mts +199 -0
  75. package/dist/client/builder/types/collection-types.d.mts.map +1 -0
  76. package/dist/client/builder/types/collection-types.mjs +11 -0
  77. package/dist/client/builder/types/collection-types.mjs.map +1 -0
  78. package/dist/client/builder/types/common.d.mts +60 -0
  79. package/dist/client/builder/types/common.d.mts.map +1 -0
  80. package/dist/client/builder/types/field-types.d.mts +593 -0
  81. package/dist/client/builder/types/field-types.d.mts.map +1 -0
  82. package/dist/client/builder/types/field-types.mjs +19 -0
  83. package/dist/client/builder/types/field-types.mjs.map +1 -0
  84. package/dist/client/builder/types/global-types.d.mts +22 -0
  85. package/dist/client/builder/types/global-types.d.mts.map +1 -0
  86. package/dist/client/builder/types/ui-config.d.mts +160 -0
  87. package/dist/client/builder/types/ui-config.d.mts.map +1 -0
  88. package/dist/client/builder/types/views.d.mts +89 -0
  89. package/dist/client/builder/types/views.d.mts.map +1 -0
  90. package/dist/client/builder/types/widget-types.d.mts +563 -0
  91. package/dist/client/builder/types/widget-types.d.mts.map +1 -0
  92. package/dist/client/builder/validation.d.mts +3 -0
  93. package/dist/client/builder/validation.mjs +208 -0
  94. package/dist/client/builder/validation.mjs.map +1 -0
  95. package/dist/client/builder/view/view.d.mts +129 -0
  96. package/dist/client/builder/view/view.d.mts.map +1 -0
  97. package/dist/client/builder/view/view.mjs +109 -0
  98. package/dist/client/builder/view/view.mjs.map +1 -0
  99. package/dist/client/builder/widget/widget.d.mts +33 -0
  100. package/dist/client/builder/widget/widget.d.mts.map +1 -0
  101. package/dist/client/builder/widget/widget.mjs +26 -0
  102. package/dist/client/builder/widget/widget.mjs.map +1 -0
  103. package/dist/client/components/actions/action-button.d.mts +2 -0
  104. package/dist/client/components/actions/action-button.mjs +135 -0
  105. package/dist/client/components/actions/action-button.mjs.map +1 -0
  106. package/dist/client/components/actions/action-dialog.d.mts +2 -0
  107. package/dist/client/components/actions/action-dialog.mjs +264 -0
  108. package/dist/client/components/actions/action-dialog.mjs.map +1 -0
  109. package/dist/client/components/actions/confirmation-dialog.d.mts +2 -0
  110. package/dist/client/components/actions/confirmation-dialog.mjs +82 -0
  111. package/dist/client/components/actions/confirmation-dialog.mjs.map +1 -0
  112. package/dist/client/components/actions/header-actions.d.mts +2 -0
  113. package/dist/client/components/actions/header-actions.mjs +117 -0
  114. package/dist/client/components/actions/header-actions.mjs.map +1 -0
  115. package/dist/client/components/actions/index.d.mts +4 -0
  116. package/dist/client/components/admin-link.d.mts +67 -0
  117. package/dist/client/components/admin-link.d.mts.map +1 -0
  118. package/dist/client/components/admin-link.mjs +92 -0
  119. package/dist/client/components/admin-link.mjs.map +1 -0
  120. package/dist/client/components/auth/auth-guard.d.mts +51 -0
  121. package/dist/client/components/auth/auth-guard.d.mts.map +1 -0
  122. package/dist/client/components/auth/auth-guard.mjs +60 -0
  123. package/dist/client/components/auth/auth-guard.mjs.map +1 -0
  124. package/dist/client/components/auth/auth-loading.d.mts +36 -0
  125. package/dist/client/components/auth/auth-loading.d.mts.map +1 -0
  126. package/dist/client/components/auth/auth-loading.mjs +27 -0
  127. package/dist/client/components/auth/auth-loading.mjs.map +1 -0
  128. package/dist/client/components/auth/index.d.mts +2 -0
  129. package/dist/client/components/blocks/block-canvas.mjs +90 -0
  130. package/dist/client/components/blocks/block-canvas.mjs.map +1 -0
  131. package/dist/client/components/blocks/block-editor-context.mjs +58 -0
  132. package/dist/client/components/blocks/block-editor-context.mjs.map +1 -0
  133. package/dist/client/components/blocks/block-editor-layout.mjs +82 -0
  134. package/dist/client/components/blocks/block-editor-layout.mjs.map +1 -0
  135. package/dist/client/components/blocks/block-editor-provider.mjs +155 -0
  136. package/dist/client/components/blocks/block-editor-provider.mjs.map +1 -0
  137. package/dist/client/components/blocks/block-fields-renderer.mjs +70 -0
  138. package/dist/client/components/blocks/block-fields-renderer.mjs.map +1 -0
  139. package/dist/client/components/blocks/block-insert-button.mjs +72 -0
  140. package/dist/client/components/blocks/block-insert-button.mjs.map +1 -0
  141. package/dist/client/components/blocks/block-item-menu.mjs +161 -0
  142. package/dist/client/components/blocks/block-item-menu.mjs.map +1 -0
  143. package/dist/client/components/blocks/block-item.mjs +187 -0
  144. package/dist/client/components/blocks/block-item.mjs.map +1 -0
  145. package/dist/client/components/blocks/block-library-sidebar.mjs +190 -0
  146. package/dist/client/components/blocks/block-library-sidebar.mjs.map +1 -0
  147. package/dist/client/components/blocks/block-tree.mjs +45 -0
  148. package/dist/client/components/blocks/block-tree.mjs.map +1 -0
  149. package/dist/client/components/blocks/block-type-icon.mjs +50 -0
  150. package/dist/client/components/blocks/block-type-icon.mjs.map +1 -0
  151. package/dist/client/components/blocks/utils/tree-utils.mjs +186 -0
  152. package/dist/client/components/blocks/utils/tree-utils.mjs.map +1 -0
  153. package/dist/client/components/component-renderer.d.mts +125 -0
  154. package/dist/client/components/component-renderer.d.mts.map +1 -0
  155. package/dist/client/components/component-renderer.mjs +145 -0
  156. package/dist/client/components/component-renderer.mjs.map +1 -0
  157. package/dist/client/components/error-boundary.mjs +92 -0
  158. package/dist/client/components/error-boundary.mjs.map +1 -0
  159. package/dist/client/components/fields/array-field.d.mts +44 -0
  160. package/dist/client/components/fields/array-field.d.mts.map +1 -0
  161. package/dist/client/components/fields/array-field.mjs +231 -0
  162. package/dist/client/components/fields/array-field.mjs.map +1 -0
  163. package/dist/client/components/fields/asset-preview-field.d.mts +52 -0
  164. package/dist/client/components/fields/asset-preview-field.d.mts.map +1 -0
  165. package/dist/client/components/fields/asset-preview-field.mjs +60 -0
  166. package/dist/client/components/fields/asset-preview-field.mjs.map +1 -0
  167. package/dist/client/components/fields/blocks-field/blocks-field.d.mts +41 -0
  168. package/dist/client/components/fields/blocks-field/blocks-field.d.mts.map +1 -0
  169. package/dist/client/components/fields/blocks-field/blocks-field.mjs +101 -0
  170. package/dist/client/components/fields/blocks-field/blocks-field.mjs.map +1 -0
  171. package/dist/client/components/fields/blocks-field/index.d.mts +1 -0
  172. package/dist/client/components/fields/boolean-field.d.mts +30 -0
  173. package/dist/client/components/fields/boolean-field.d.mts.map +1 -0
  174. package/dist/client/components/fields/boolean-field.mjs +47 -0
  175. package/dist/client/components/fields/boolean-field.mjs.map +1 -0
  176. package/dist/client/components/fields/custom-field.d.mts +3 -0
  177. package/dist/client/components/fields/date-field.d.mts +22 -0
  178. package/dist/client/components/fields/date-field.d.mts.map +1 -0
  179. package/dist/client/components/fields/date-field.mjs +42 -0
  180. package/dist/client/components/fields/date-field.mjs.map +1 -0
  181. package/dist/client/components/fields/datetime-field.d.mts +23 -0
  182. package/dist/client/components/fields/datetime-field.d.mts.map +1 -0
  183. package/dist/client/components/fields/datetime-field.mjs +43 -0
  184. package/dist/client/components/fields/datetime-field.mjs.map +1 -0
  185. package/dist/client/components/fields/email-field.d.mts +19 -0
  186. package/dist/client/components/fields/email-field.d.mts.map +1 -0
  187. package/dist/client/components/fields/email-field.mjs +38 -0
  188. package/dist/client/components/fields/email-field.mjs.map +1 -0
  189. package/dist/client/components/fields/embedded-collection.d.mts +3 -0
  190. package/dist/client/components/fields/field-types.d.mts +571 -0
  191. package/dist/client/components/fields/field-types.d.mts.map +1 -0
  192. package/dist/client/components/fields/field-utils.d.mts +1 -0
  193. package/dist/client/components/fields/field-utils.mjs +65 -0
  194. package/dist/client/components/fields/field-utils.mjs.map +1 -0
  195. package/dist/client/components/fields/field-wrapper.d.mts +3 -0
  196. package/dist/client/components/fields/field-wrapper.mjs +49 -0
  197. package/dist/client/components/fields/field-wrapper.mjs.map +1 -0
  198. package/dist/client/components/fields/index.d.mts +33 -0
  199. package/dist/client/components/fields/json-field.d.mts +84 -0
  200. package/dist/client/components/fields/json-field.d.mts.map +1 -0
  201. package/dist/client/components/fields/json-field.mjs +248 -0
  202. package/dist/client/components/fields/json-field.mjs.map +1 -0
  203. package/dist/client/components/fields/locale-badge.d.mts +1 -0
  204. package/dist/client/components/fields/locale-badge.mjs +17 -0
  205. package/dist/client/components/fields/locale-badge.mjs.map +1 -0
  206. package/dist/client/components/fields/number-field.d.mts +23 -0
  207. package/dist/client/components/fields/number-field.d.mts.map +1 -0
  208. package/dist/client/components/fields/number-field.mjs +40 -0
  209. package/dist/client/components/fields/number-field.mjs.map +1 -0
  210. package/dist/client/components/fields/object-array-field.d.mts +2 -0
  211. package/dist/client/components/fields/object-array-field.mjs +313 -0
  212. package/dist/client/components/fields/object-array-field.mjs.map +1 -0
  213. package/dist/client/components/fields/object-field.d.mts +32 -0
  214. package/dist/client/components/fields/object-field.d.mts.map +1 -0
  215. package/dist/client/components/fields/object-field.mjs +128 -0
  216. package/dist/client/components/fields/object-field.mjs.map +1 -0
  217. package/dist/client/components/fields/relation/displays/cards-display.d.mts +2 -0
  218. package/dist/client/components/fields/relation/displays/cards-display.mjs +140 -0
  219. package/dist/client/components/fields/relation/displays/cards-display.mjs.map +1 -0
  220. package/dist/client/components/fields/relation/displays/chips-display.d.mts +2 -0
  221. package/dist/client/components/fields/relation/displays/chips-display.mjs +100 -0
  222. package/dist/client/components/fields/relation/displays/chips-display.mjs.map +1 -0
  223. package/dist/client/components/fields/relation/displays/grid-display.d.mts +2 -0
  224. package/dist/client/components/fields/relation/displays/grid-display.mjs +114 -0
  225. package/dist/client/components/fields/relation/displays/grid-display.mjs.map +1 -0
  226. package/dist/client/components/fields/relation/displays/index.d.mts +6 -0
  227. package/dist/client/components/fields/relation/displays/list-display.d.mts +2 -0
  228. package/dist/client/components/fields/relation/displays/list-display.mjs +128 -0
  229. package/dist/client/components/fields/relation/displays/list-display.mjs.map +1 -0
  230. package/dist/client/components/fields/relation/displays/table-display.d.mts +2 -0
  231. package/dist/client/components/fields/relation/displays/table-display.mjs +134 -0
  232. package/dist/client/components/fields/relation/displays/table-display.mjs.map +1 -0
  233. package/dist/client/components/fields/relation/displays/types.d.mts +22 -0
  234. package/dist/client/components/fields/relation/displays/types.d.mts.map +1 -0
  235. package/dist/client/components/fields/relation/displays/types.mjs +73 -0
  236. package/dist/client/components/fields/relation/displays/types.mjs.map +1 -0
  237. package/dist/client/components/fields/relation/index.d.mts +3 -0
  238. package/dist/client/components/fields/relation/relation-items-display.d.mts +5 -0
  239. package/dist/client/components/fields/relation/relation-items-display.mjs +47 -0
  240. package/dist/client/components/fields/relation/relation-items-display.mjs.map +1 -0
  241. package/dist/client/components/fields/relation-field.d.mts +134 -0
  242. package/dist/client/components/fields/relation-field.d.mts.map +1 -0
  243. package/dist/client/components/fields/relation-field.mjs +106 -0
  244. package/dist/client/components/fields/relation-field.mjs.map +1 -0
  245. package/dist/client/components/fields/relation-picker.d.mts +4 -0
  246. package/dist/client/components/fields/relation-picker.mjs +301 -0
  247. package/dist/client/components/fields/relation-picker.mjs.map +1 -0
  248. package/dist/client/components/fields/relation-select.d.mts +3 -0
  249. package/dist/client/components/fields/relation-select.mjs +219 -0
  250. package/dist/client/components/fields/relation-select.mjs.map +1 -0
  251. package/dist/client/components/fields/reverse-relation-field.d.mts +2 -0
  252. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +56 -0
  253. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs.map +1 -0
  254. package/dist/client/components/fields/rich-text-editor/extensions.mjs +118 -0
  255. package/dist/client/components/fields/rich-text-editor/extensions.mjs.map +1 -0
  256. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +196 -0
  257. package/dist/client/components/fields/rich-text-editor/image-popover.mjs.map +1 -0
  258. package/dist/client/components/fields/rich-text-editor/index.d.mts +4 -0
  259. package/dist/client/components/fields/rich-text-editor/index.mjs +187 -0
  260. package/dist/client/components/fields/rich-text-editor/index.mjs.map +1 -0
  261. package/dist/client/components/fields/rich-text-editor/link-popover.mjs +86 -0
  262. package/dist/client/components/fields/rich-text-editor/link-popover.mjs.map +1 -0
  263. package/dist/client/components/fields/rich-text-editor/presets.d.mts +11 -0
  264. package/dist/client/components/fields/rich-text-editor/presets.d.mts.map +1 -0
  265. package/dist/client/components/fields/rich-text-editor/presets.mjs +124 -0
  266. package/dist/client/components/fields/rich-text-editor/presets.mjs.map +1 -0
  267. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +145 -0
  268. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs.map +1 -0
  269. package/dist/client/components/fields/rich-text-editor/table-controls.mjs +124 -0
  270. package/dist/client/components/fields/rich-text-editor/table-controls.mjs.map +1 -0
  271. package/dist/client/components/fields/rich-text-editor/toolbar.mjs +280 -0
  272. package/dist/client/components/fields/rich-text-editor/toolbar.mjs.map +1 -0
  273. package/dist/client/components/fields/rich-text-editor/types.d.mts +78 -0
  274. package/dist/client/components/fields/rich-text-editor/types.d.mts.map +1 -0
  275. package/dist/client/components/fields/rich-text-editor/types.mjs +31 -0
  276. package/dist/client/components/fields/rich-text-editor/types.mjs.map +1 -0
  277. package/dist/client/components/fields/rich-text-editor/utils.mjs +51 -0
  278. package/dist/client/components/fields/rich-text-editor/utils.mjs.map +1 -0
  279. package/dist/client/components/fields/rich-text-editor/variants.d.mts +2 -0
  280. package/dist/client/components/fields/rich-text-field.d.mts +14 -0
  281. package/dist/client/components/fields/rich-text-field.d.mts.map +1 -0
  282. package/dist/client/components/fields/rich-text-field.mjs +26 -0
  283. package/dist/client/components/fields/rich-text-field.mjs.map +1 -0
  284. package/dist/client/components/fields/select-field.d.mts +25 -0
  285. package/dist/client/components/fields/select-field.d.mts.map +1 -0
  286. package/dist/client/components/fields/select-field.mjs +53 -0
  287. package/dist/client/components/fields/select-field.mjs.map +1 -0
  288. package/dist/client/components/fields/status-field.d.mts +2 -0
  289. package/dist/client/components/fields/text-field.d.mts +22 -0
  290. package/dist/client/components/fields/text-field.d.mts.map +1 -0
  291. package/dist/client/components/fields/text-field.mjs +39 -0
  292. package/dist/client/components/fields/text-field.mjs.map +1 -0
  293. package/dist/client/components/fields/textarea-field.d.mts +22 -0
  294. package/dist/client/components/fields/textarea-field.d.mts.map +1 -0
  295. package/dist/client/components/fields/textarea-field.mjs +39 -0
  296. package/dist/client/components/fields/textarea-field.mjs.map +1 -0
  297. package/dist/client/components/fields/time-field.d.mts +20 -0
  298. package/dist/client/components/fields/time-field.d.mts.map +1 -0
  299. package/dist/client/components/fields/time-field.mjs +39 -0
  300. package/dist/client/components/fields/time-field.mjs.map +1 -0
  301. package/dist/client/components/fields/upload-field.d.mts +97 -0
  302. package/dist/client/components/fields/upload-field.d.mts.map +1 -0
  303. package/dist/client/components/fields/upload-field.mjs +497 -0
  304. package/dist/client/components/fields/upload-field.mjs.map +1 -0
  305. package/dist/client/components/filter-builder/columns-tab.d.mts +1 -0
  306. package/dist/client/components/filter-builder/columns-tab.mjs +131 -0
  307. package/dist/client/components/filter-builder/columns-tab.mjs.map +1 -0
  308. package/dist/client/components/filter-builder/filter-builder-sheet.d.mts +1 -0
  309. package/dist/client/components/filter-builder/filter-builder-sheet.mjs +157 -0
  310. package/dist/client/components/filter-builder/filter-builder-sheet.mjs.map +1 -0
  311. package/dist/client/components/filter-builder/filters-tab.d.mts +1 -0
  312. package/dist/client/components/filter-builder/filters-tab.mjs +380 -0
  313. package/dist/client/components/filter-builder/filters-tab.mjs.map +1 -0
  314. package/dist/client/components/filter-builder/index.d.mts +5 -0
  315. package/dist/client/components/filter-builder/saved-views-tab.d.mts +1 -0
  316. package/dist/client/components/filter-builder/saved-views-tab.mjs +125 -0
  317. package/dist/client/components/filter-builder/saved-views-tab.mjs.map +1 -0
  318. package/dist/client/components/index.d.mts +80 -0
  319. package/dist/client/components/locale-switcher.d.mts +2 -0
  320. package/dist/client/components/locale-switcher.mjs +128 -0
  321. package/dist/client/components/locale-switcher.mjs.map +1 -0
  322. package/dist/client/components/media/media-grid.mjs +139 -0
  323. package/dist/client/components/media/media-grid.mjs.map +1 -0
  324. package/dist/client/components/media/media-picker-dialog.mjs +255 -0
  325. package/dist/client/components/media/media-picker-dialog.mjs.map +1 -0
  326. package/dist/client/components/preview/live-preview-mode.mjs +211 -0
  327. package/dist/client/components/preview/live-preview-mode.mjs.map +1 -0
  328. package/dist/client/components/preview/preview-pane.mjs +179 -0
  329. package/dist/client/components/preview/preview-pane.mjs.map +1 -0
  330. package/dist/client/components/primitives/asset-preview.mjs +363 -0
  331. package/dist/client/components/primitives/asset-preview.mjs.map +1 -0
  332. package/dist/client/components/primitives/checkbox-input.mjs +33 -0
  333. package/dist/client/components/primitives/checkbox-input.mjs.map +1 -0
  334. package/dist/client/components/primitives/date-input.mjs +218 -0
  335. package/dist/client/components/primitives/date-input.mjs.map +1 -0
  336. package/dist/client/components/primitives/dropzone.mjs +239 -0
  337. package/dist/client/components/primitives/dropzone.mjs.map +1 -0
  338. package/dist/client/components/primitives/number-input.mjs +113 -0
  339. package/dist/client/components/primitives/number-input.mjs.map +1 -0
  340. package/dist/client/components/primitives/select-multi.mjs +256 -0
  341. package/dist/client/components/primitives/select-multi.mjs.map +1 -0
  342. package/dist/client/components/primitives/select-single.mjs +183 -0
  343. package/dist/client/components/primitives/select-single.mjs.map +1 -0
  344. package/dist/client/components/primitives/text-input.mjs +40 -0
  345. package/dist/client/components/primitives/text-input.mjs.map +1 -0
  346. package/dist/client/components/primitives/textarea-input.mjs +38 -0
  347. package/dist/client/components/primitives/textarea-input.mjs.map +1 -0
  348. package/dist/client/components/primitives/time-input.mjs +72 -0
  349. package/dist/client/components/primitives/time-input.mjs.map +1 -0
  350. package/dist/client/components/primitives/toggle-input.mjs +31 -0
  351. package/dist/client/components/primitives/toggle-input.mjs.map +1 -0
  352. package/dist/client/components/primitives/types.d.mts +14 -0
  353. package/dist/client/components/primitives/types.d.mts.map +1 -0
  354. package/dist/client/components/primitives/types.mjs +13 -0
  355. package/dist/client/components/primitives/types.mjs.map +1 -0
  356. package/dist/client/components/sheets/index.d.mts +1 -0
  357. package/dist/client/components/sheets/resource-sheet.d.mts +1 -0
  358. package/dist/client/components/sheets/resource-sheet.mjs +78 -0
  359. package/dist/client/components/sheets/resource-sheet.mjs.map +1 -0
  360. package/dist/client/components/ui/accordion.d.mts +2 -0
  361. package/dist/client/components/ui/accordion.mjs +50 -0
  362. package/dist/client/components/ui/accordion.mjs.map +1 -0
  363. package/dist/client/components/ui/alert.mjs +32 -0
  364. package/dist/client/components/ui/alert.mjs.map +1 -0
  365. package/dist/client/components/ui/avatar.d.mts +3 -0
  366. package/dist/client/components/ui/badge.d.mts +3 -0
  367. package/dist/client/components/ui/badge.mjs +35 -0
  368. package/dist/client/components/ui/badge.mjs.map +1 -0
  369. package/dist/client/components/ui/button.d.mts +3 -0
  370. package/dist/client/components/ui/button.mjs +49 -0
  371. package/dist/client/components/ui/button.mjs.map +1 -0
  372. package/dist/client/components/ui/card.d.mts +2 -0
  373. package/dist/{card-BKHjBQfw.mjs → client/components/ui/card.mjs} +3 -10
  374. package/dist/{card-BKHjBQfw.mjs.map → client/components/ui/card.mjs.map} +1 -1
  375. package/dist/client/components/ui/checkbox.d.mts +2 -0
  376. package/dist/client/components/ui/checkbox.mjs +27 -0
  377. package/dist/client/components/ui/checkbox.mjs.map +1 -0
  378. package/dist/client/components/ui/combobox.d.mts +3 -0
  379. package/dist/client/components/ui/command.mjs +69 -0
  380. package/dist/client/components/ui/command.mjs.map +1 -0
  381. package/dist/client/components/ui/dialog.d.mts +3 -0
  382. package/dist/client/components/ui/dialog.mjs +83 -0
  383. package/dist/client/components/ui/dialog.mjs.map +1 -0
  384. package/dist/client/components/ui/drawer.mjs +75 -0
  385. package/dist/client/components/ui/drawer.mjs.map +1 -0
  386. package/dist/client/components/ui/dropdown-menu.d.mts +3 -0
  387. package/dist/client/components/ui/dropdown-menu.mjs +89 -0
  388. package/dist/client/components/ui/dropdown-menu.mjs.map +1 -0
  389. package/dist/client/components/ui/empty-state.mjs +53 -0
  390. package/dist/client/components/ui/empty-state.mjs.map +1 -0
  391. package/dist/client/components/ui/field.d.mts +3 -0
  392. package/dist/client/components/ui/field.mjs +78 -0
  393. package/dist/client/components/ui/field.mjs.map +1 -0
  394. package/dist/client/components/ui/input-group.d.mts +4 -0
  395. package/dist/client/components/ui/input-group.mjs +68 -0
  396. package/dist/client/components/ui/input-group.mjs.map +1 -0
  397. package/dist/client/components/ui/input.d.mts +2 -0
  398. package/dist/client/components/ui/input.mjs +17 -0
  399. package/dist/client/components/ui/input.mjs.map +1 -0
  400. package/dist/client/components/ui/kbd.mjs +24 -0
  401. package/dist/client/components/ui/kbd.mjs.map +1 -0
  402. package/dist/client/components/ui/label.d.mts +2 -0
  403. package/dist/client/components/ui/label.mjs +15 -0
  404. package/dist/client/components/ui/label.mjs.map +1 -0
  405. package/dist/client/components/ui/popover.d.mts +3 -0
  406. package/dist/client/components/ui/popover.mjs +49 -0
  407. package/dist/client/components/ui/popover.mjs.map +1 -0
  408. package/dist/client/components/ui/responsive-dialog.mjs +102 -0
  409. package/dist/client/components/ui/responsive-dialog.mjs.map +1 -0
  410. package/dist/client/components/ui/scroll-area.d.mts +2 -0
  411. package/dist/client/components/ui/search-input.mjs +74 -0
  412. package/dist/client/components/ui/search-input.mjs.map +1 -0
  413. package/dist/client/components/ui/select.d.mts +3 -0
  414. package/dist/client/components/ui/select.mjs +85 -0
  415. package/dist/client/components/ui/select.mjs.map +1 -0
  416. package/dist/client/components/ui/separator.d.mts +2 -0
  417. package/dist/client/components/ui/separator.mjs +17 -0
  418. package/dist/client/components/ui/separator.mjs.map +1 -0
  419. package/dist/client/components/ui/sheet.d.mts +3 -0
  420. package/dist/client/components/ui/sheet.mjs +78 -0
  421. package/dist/client/components/ui/sheet.mjs.map +1 -0
  422. package/dist/client/components/ui/sidebar.d.mts +8 -0
  423. package/dist/client/components/ui/sidebar.mjs +256 -0
  424. package/dist/client/components/ui/sidebar.mjs.map +1 -0
  425. package/dist/client/components/ui/skeleton.d.mts +1 -0
  426. package/dist/client/components/ui/skeleton.mjs +15 -0
  427. package/dist/client/components/ui/skeleton.mjs.map +1 -0
  428. package/dist/client/components/ui/sonner.d.mts +14 -0
  429. package/dist/client/components/ui/sonner.d.mts.map +1 -0
  430. package/dist/client/components/ui/sonner.mjs +55 -0
  431. package/dist/client/components/ui/sonner.mjs.map +1 -0
  432. package/dist/client/components/ui/spinner.d.mts +1 -0
  433. package/dist/client/components/ui/spinner.mjs +18 -0
  434. package/dist/client/components/ui/spinner.mjs.map +1 -0
  435. package/dist/client/components/ui/switch.d.mts +2 -0
  436. package/dist/client/components/ui/switch.mjs +23 -0
  437. package/dist/client/components/ui/switch.mjs.map +1 -0
  438. package/dist/client/components/ui/table.d.mts +2 -0
  439. package/dist/client/components/ui/table.mjs +66 -0
  440. package/dist/client/components/ui/table.mjs.map +1 -0
  441. package/dist/client/components/ui/tabs.d.mts +3 -0
  442. package/dist/client/components/ui/tabs.mjs +49 -0
  443. package/dist/client/components/ui/tabs.mjs.map +1 -0
  444. package/dist/client/components/ui/textarea.d.mts +2 -0
  445. package/dist/client/components/ui/textarea.mjs +15 -0
  446. package/dist/client/components/ui/textarea.mjs.map +1 -0
  447. package/dist/client/components/ui/toolbar.mjs +54 -0
  448. package/dist/client/components/ui/toolbar.mjs.map +1 -0
  449. package/dist/client/components/ui/tooltip.d.mts +2 -0
  450. package/dist/client/components/ui/tooltip.mjs +45 -0
  451. package/dist/client/components/ui/tooltip.mjs.map +1 -0
  452. package/dist/client/components/widgets/chart-widget.d.mts +57 -0
  453. package/dist/client/components/widgets/chart-widget.d.mts.map +1 -0
  454. package/dist/client/components/widgets/chart-widget.mjs +282 -0
  455. package/dist/client/components/widgets/chart-widget.mjs.map +1 -0
  456. package/dist/client/components/widgets/progress-widget.d.mts +41 -0
  457. package/dist/client/components/widgets/progress-widget.d.mts.map +1 -0
  458. package/dist/client/components/widgets/progress-widget.mjs +110 -0
  459. package/dist/client/components/widgets/progress-widget.mjs.map +1 -0
  460. package/dist/client/components/widgets/quick-actions-widget.d.mts +29 -0
  461. package/dist/client/components/widgets/quick-actions-widget.d.mts.map +1 -0
  462. package/dist/client/components/widgets/quick-actions-widget.mjs +121 -0
  463. package/dist/client/components/widgets/quick-actions-widget.mjs.map +1 -0
  464. package/dist/client/components/widgets/recent-items-widget.d.mts +51 -0
  465. package/dist/client/components/widgets/recent-items-widget.d.mts.map +1 -0
  466. package/dist/client/components/widgets/recent-items-widget.mjs +101 -0
  467. package/dist/client/components/widgets/recent-items-widget.mjs.map +1 -0
  468. package/dist/client/components/widgets/stats-widget.d.mts +55 -0
  469. package/dist/client/components/widgets/stats-widget.d.mts.map +1 -0
  470. package/dist/client/components/widgets/stats-widget.mjs +150 -0
  471. package/dist/client/components/widgets/stats-widget.mjs.map +1 -0
  472. package/dist/client/components/widgets/table-widget.d.mts +31 -0
  473. package/dist/client/components/widgets/table-widget.d.mts.map +1 -0
  474. package/dist/client/components/widgets/table-widget.mjs +139 -0
  475. package/dist/client/components/widgets/table-widget.mjs.map +1 -0
  476. package/dist/client/components/widgets/timeline-widget.d.mts +51 -0
  477. package/dist/client/components/widgets/timeline-widget.d.mts.map +1 -0
  478. package/dist/client/components/widgets/timeline-widget.mjs +168 -0
  479. package/dist/client/components/widgets/timeline-widget.mjs.map +1 -0
  480. package/dist/client/components/widgets/value-widget.d.mts +39 -0
  481. package/dist/client/components/widgets/value-widget.d.mts.map +1 -0
  482. package/dist/client/components/widgets/value-widget.mjs +111 -0
  483. package/dist/client/components/widgets/value-widget.mjs.map +1 -0
  484. package/dist/client/components/widgets/widget-skeletons.mjs +145 -0
  485. package/dist/client/components/widgets/widget-skeletons.mjs.map +1 -0
  486. package/dist/client/context/focus-context.d.mts +88 -0
  487. package/dist/client/context/focus-context.d.mts.map +1 -0
  488. package/dist/client/context/focus-context.mjs +178 -0
  489. package/dist/client/context/focus-context.mjs.map +1 -0
  490. package/dist/client/contexts/breadcrumb-context.mjs +32 -0
  491. package/dist/client/contexts/breadcrumb-context.mjs.map +1 -0
  492. package/dist/client/hooks/typed-hooks.d.mts +84 -0
  493. package/dist/client/hooks/typed-hooks.d.mts.map +1 -0
  494. package/dist/client/hooks/typed-hooks.mjs +272 -0
  495. package/dist/client/hooks/typed-hooks.mjs.map +1 -0
  496. package/dist/client/hooks/use-action.mjs +201 -0
  497. package/dist/client/hooks/use-action.mjs.map +1 -0
  498. package/dist/client/hooks/use-admin-config.mjs +40 -0
  499. package/dist/client/hooks/use-admin-config.mjs.map +1 -0
  500. package/dist/client/hooks/use-admin-preferences.mjs +68 -0
  501. package/dist/client/hooks/use-admin-preferences.mjs.map +1 -0
  502. package/dist/client/hooks/use-admin-routes.mjs +97 -0
  503. package/dist/client/hooks/use-admin-routes.mjs.map +1 -0
  504. package/dist/client/hooks/use-auth.d.mts +98 -0
  505. package/dist/client/hooks/use-auth.d.mts.map +1 -0
  506. package/dist/{use-auth-BoLmWtmU.mjs → client/hooks/use-auth.mjs} +3 -3
  507. package/dist/client/hooks/use-auth.mjs.map +1 -0
  508. package/dist/client/hooks/use-collection-fields.mjs +32 -0
  509. package/dist/client/hooks/use-collection-fields.mjs.map +1 -0
  510. package/dist/client/hooks/use-collection-meta.mjs +121 -0
  511. package/dist/client/hooks/use-collection-meta.mjs.map +1 -0
  512. package/dist/client/hooks/use-collection-schema.mjs +67 -0
  513. package/dist/client/hooks/use-collection-schema.mjs.map +1 -0
  514. package/dist/client/hooks/use-collection-validation.mjs +74 -0
  515. package/dist/client/hooks/use-collection-validation.mjs.map +1 -0
  516. package/dist/client/hooks/use-collection.d.mts +86 -0
  517. package/dist/client/hooks/use-collection.d.mts.map +1 -0
  518. package/dist/client/hooks/use-collection.mjs +214 -0
  519. package/dist/client/hooks/use-collection.mjs.map +1 -0
  520. package/dist/client/hooks/use-current-user.d.mts +57 -0
  521. package/dist/client/hooks/use-current-user.d.mts.map +1 -0
  522. package/dist/client/hooks/use-current-user.mjs +79 -0
  523. package/dist/client/hooks/use-current-user.mjs.map +1 -0
  524. package/dist/client/hooks/use-field-hooks.mjs +191 -0
  525. package/dist/client/hooks/use-field-hooks.mjs.map +1 -0
  526. package/dist/client/hooks/use-field-options.d.mts +90 -0
  527. package/dist/client/hooks/use-field-options.d.mts.map +1 -0
  528. package/dist/client/hooks/use-field-options.mjs +184 -0
  529. package/dist/client/hooks/use-field-options.mjs.map +1 -0
  530. package/dist/client/hooks/use-global-fields.mjs +27 -0
  531. package/dist/client/hooks/use-global-fields.mjs.map +1 -0
  532. package/dist/client/hooks/use-global-meta.mjs +59 -0
  533. package/dist/client/hooks/use-global-meta.mjs.map +1 -0
  534. package/dist/client/hooks/use-global-schema.mjs +33 -0
  535. package/dist/client/hooks/use-global-schema.mjs.map +1 -0
  536. package/dist/client/hooks/use-global.d.mts +40 -0
  537. package/dist/client/hooks/use-global.d.mts.map +1 -0
  538. package/dist/client/hooks/use-global.mjs +74 -0
  539. package/dist/client/hooks/use-global.mjs.map +1 -0
  540. package/dist/client/hooks/use-locks.mjs +245 -0
  541. package/dist/client/hooks/use-locks.mjs.map +1 -0
  542. package/dist/client/hooks/use-media-query.d.mts +23 -0
  543. package/dist/client/hooks/use-media-query.d.mts.map +1 -0
  544. package/dist/client/hooks/use-media-query.mjs +62 -0
  545. package/dist/client/hooks/use-media-query.mjs.map +1 -0
  546. package/dist/client/hooks/use-prefill-params.mjs +47 -0
  547. package/dist/client/hooks/use-prefill-params.mjs.map +1 -0
  548. package/dist/client/hooks/use-questpie-query-options.mjs +28 -0
  549. package/dist/client/hooks/use-questpie-query-options.mjs.map +1 -0
  550. package/dist/client/hooks/use-reactive-fields.d.mts +75 -0
  551. package/dist/client/hooks/use-reactive-fields.d.mts.map +1 -0
  552. package/dist/client/hooks/use-reactive-fields.mjs +164 -0
  553. package/dist/client/hooks/use-reactive-fields.mjs.map +1 -0
  554. package/dist/client/hooks/use-realtime-highlight.mjs +96 -0
  555. package/dist/client/hooks/use-realtime-highlight.mjs.map +1 -0
  556. package/dist/client/hooks/use-saved-views.mjs +65 -0
  557. package/dist/client/hooks/use-saved-views.mjs.map +1 -0
  558. package/dist/client/hooks/use-search.mjs +147 -0
  559. package/dist/client/hooks/use-search.mjs.map +1 -0
  560. package/dist/client/hooks/use-server-validation.mjs +199 -0
  561. package/dist/client/hooks/use-server-validation.mjs.map +1 -0
  562. package/dist/client/hooks/use-server-widget-data.d.mts +26 -0
  563. package/dist/client/hooks/use-server-widget-data.d.mts.map +1 -0
  564. package/dist/client/hooks/use-server-widget-data.mjs +40 -0
  565. package/dist/client/hooks/use-server-widget-data.mjs.map +1 -0
  566. package/dist/client/hooks/use-setup-status.d.mts +39 -0
  567. package/dist/client/hooks/use-setup-status.d.mts.map +1 -0
  568. package/dist/client/hooks/use-setup-status.mjs +50 -0
  569. package/dist/client/hooks/use-setup-status.mjs.map +1 -0
  570. package/dist/client/hooks/use-upload-collection.mjs +32 -0
  571. package/dist/client/hooks/use-upload-collection.mjs.map +1 -0
  572. package/dist/client/hooks/use-upload.d.mts +23 -0
  573. package/dist/client/hooks/use-upload.d.mts.map +1 -0
  574. package/dist/client/hooks/use-upload.mjs +145 -0
  575. package/dist/client/hooks/use-upload.mjs.map +1 -0
  576. package/dist/client/hooks/use-validation-error-map.mjs +53 -0
  577. package/dist/client/hooks/use-validation-error-map.mjs.map +1 -0
  578. package/dist/client/hooks/use-view-state.mjs +261 -0
  579. package/dist/client/hooks/use-view-state.mjs.map +1 -0
  580. package/dist/client/i18n/hooks.mjs +160 -0
  581. package/dist/client/i18n/hooks.mjs.map +1 -0
  582. package/dist/client/i18n/intl-cache.mjs +65 -0
  583. package/dist/client/i18n/intl-cache.mjs.map +1 -0
  584. package/dist/client/i18n/messages.mjs +7 -0
  585. package/dist/client/i18n/messages.mjs.map +1 -0
  586. package/dist/client/i18n/simple.d.mts +22 -0
  587. package/dist/client/i18n/simple.d.mts.map +1 -0
  588. package/dist/client/i18n/simple.mjs +157 -0
  589. package/dist/client/i18n/simple.mjs.map +1 -0
  590. package/dist/client/i18n/types.d.mts +110 -0
  591. package/dist/client/i18n/types.d.mts.map +1 -0
  592. package/dist/client/lib/utils.d.mts +1 -0
  593. package/dist/client/lib/utils.mjs +28 -0
  594. package/dist/client/lib/utils.mjs.map +1 -0
  595. package/dist/client/preview/block-scope-context.d.mts +74 -0
  596. package/dist/client/preview/block-scope-context.d.mts.map +1 -0
  597. package/dist/client/preview/block-scope-context.mjs +93 -0
  598. package/dist/client/preview/block-scope-context.mjs.map +1 -0
  599. package/dist/client/preview/index.d.mts +5 -0
  600. package/dist/client/preview/preview-banner.d.mts +46 -0
  601. package/dist/client/preview/preview-banner.d.mts.map +1 -0
  602. package/dist/client/preview/preview-banner.mjs +95 -0
  603. package/dist/client/preview/preview-banner.mjs.map +1 -0
  604. package/dist/client/preview/preview-field.d.mts +108 -0
  605. package/dist/client/preview/preview-field.d.mts.map +1 -0
  606. package/dist/client/preview/preview-field.mjs +125 -0
  607. package/dist/client/preview/preview-field.mjs.map +1 -0
  608. package/dist/client/preview/types.d.mts +115 -0
  609. package/dist/client/preview/types.d.mts.map +1 -0
  610. package/dist/client/preview/types.mjs +21 -0
  611. package/dist/client/preview/types.mjs.map +1 -0
  612. package/dist/client/preview/use-collection-preview.d.mts +71 -0
  613. package/dist/client/preview/use-collection-preview.d.mts.map +1 -0
  614. package/dist/client/preview/use-collection-preview.mjs +114 -0
  615. package/dist/client/preview/use-collection-preview.mjs.map +1 -0
  616. package/dist/client/runtime/content-locales-provider.d.mts +1 -0
  617. package/dist/client/runtime/content-locales-provider.mjs +85 -0
  618. package/dist/client/runtime/content-locales-provider.mjs.map +1 -0
  619. package/dist/client/runtime/index.d.mts +7 -0
  620. package/dist/client/runtime/index.mjs +8 -0
  621. package/dist/client/runtime/locale-scope.d.mts +2 -0
  622. package/dist/{runtime-6VZM878K.mjs → client/runtime/locale-scope.mjs} +3 -4
  623. package/dist/client/runtime/locale-scope.mjs.map +1 -0
  624. package/dist/client/runtime/provider.d.mts +10107 -0
  625. package/dist/client/runtime/provider.d.mts.map +1 -0
  626. package/dist/client/runtime/provider.mjs +229 -0
  627. package/dist/client/runtime/provider.mjs.map +1 -0
  628. package/dist/client/runtime/routes.d.mts +49 -0
  629. package/dist/client/runtime/routes.d.mts.map +1 -0
  630. package/dist/client/runtime/routes.mjs +107 -0
  631. package/dist/client/runtime/routes.mjs.map +1 -0
  632. package/dist/client/runtime/translations-provider.d.mts +2 -0
  633. package/dist/client/runtime/translations-provider.mjs +181 -0
  634. package/dist/client/runtime/translations-provider.mjs.map +1 -0
  635. package/dist/client/scope/index.d.mts +3 -0
  636. package/dist/client/scope/picker.d.mts +54 -0
  637. package/dist/client/scope/picker.d.mts.map +1 -0
  638. package/dist/client/scope/picker.mjs +161 -0
  639. package/dist/client/scope/picker.mjs.map +1 -0
  640. package/dist/client/scope/provider.d.mts +104 -0
  641. package/dist/client/scope/provider.d.mts.map +1 -0
  642. package/dist/client/scope/provider.mjs +159 -0
  643. package/dist/client/scope/provider.mjs.map +1 -0
  644. package/dist/client/scope/types.d.mts +112 -0
  645. package/dist/client/scope/types.d.mts.map +1 -0
  646. package/dist/client/styles/index.css +80 -0
  647. package/dist/client/utils/auto-expand-fields.mjs +65 -0
  648. package/dist/client/utils/auto-expand-fields.mjs.map +1 -0
  649. package/dist/client/utils/build-field-definitions-from-schema.mjs +256 -0
  650. package/dist/client/utils/build-field-definitions-from-schema.mjs.map +1 -0
  651. package/dist/client/utils/detect-relations.mjs +46 -0
  652. package/dist/client/utils/detect-relations.mjs.map +1 -0
  653. package/dist/client/utils/locale-to-flag.d.mts +118 -0
  654. package/dist/client/utils/locale-to-flag.d.mts.map +1 -0
  655. package/dist/client/utils/locale-to-flag.mjs +130 -0
  656. package/dist/client/utils/locale-to-flag.mjs.map +1 -0
  657. package/dist/client/utils/routes.mjs +196 -0
  658. package/dist/client/utils/routes.mjs.map +1 -0
  659. package/dist/client/views/auth/accept-invite-form.d.mts +73 -0
  660. package/dist/client/views/auth/accept-invite-form.d.mts.map +1 -0
  661. package/dist/client/views/auth/accept-invite-form.mjs +180 -0
  662. package/dist/client/views/auth/accept-invite-form.mjs.map +1 -0
  663. package/dist/client/views/auth/auth-layout.d.mts +44 -0
  664. package/dist/client/views/auth/auth-layout.d.mts.map +1 -0
  665. package/dist/client/views/auth/auth-layout.mjs +53 -0
  666. package/dist/client/views/auth/auth-layout.mjs.map +1 -0
  667. package/dist/client/views/auth/forgot-password-form.d.mts +59 -0
  668. package/dist/client/views/auth/forgot-password-form.d.mts.map +1 -0
  669. package/dist/{forgot-password-page-Bcp-An4Y.mjs → client/views/auth/forgot-password-form.mjs} +22 -89
  670. package/dist/client/views/auth/forgot-password-form.mjs.map +1 -0
  671. package/dist/client/views/auth/index.d.mts +7 -0
  672. package/dist/client/views/auth/invite-form.d.mts +1 -0
  673. package/dist/client/views/auth/invite-form.mjs +155 -0
  674. package/dist/client/views/auth/invite-form.mjs.map +1 -0
  675. package/dist/client/views/auth/login-form.d.mts +76 -0
  676. package/dist/client/views/auth/login-form.d.mts.map +1 -0
  677. package/dist/client/views/auth/login-form.mjs +167 -0
  678. package/dist/client/views/auth/login-form.mjs.map +1 -0
  679. package/dist/client/views/auth/reset-password-form.d.mts +66 -0
  680. package/dist/client/views/auth/reset-password-form.d.mts.map +1 -0
  681. package/dist/client/views/auth/reset-password-form.mjs +188 -0
  682. package/dist/client/views/auth/reset-password-form.mjs.map +1 -0
  683. package/dist/client/views/auth/setup-form.d.mts +61 -0
  684. package/dist/client/views/auth/setup-form.d.mts.map +1 -0
  685. package/dist/{setup-page-YAP_fzqh.mjs → client/views/auth/setup-form.mjs} +46 -124
  686. package/dist/client/views/auth/setup-form.mjs.map +1 -0
  687. package/dist/client/views/collection/auto-form-fields.d.mts +4 -0
  688. package/dist/client/views/collection/auto-form-fields.mjs +453 -0
  689. package/dist/client/views/collection/auto-form-fields.mjs.map +1 -0
  690. package/dist/client/views/collection/bulk-action-toolbar.mjs +291 -0
  691. package/dist/client/views/collection/bulk-action-toolbar.mjs.map +1 -0
  692. package/dist/client/views/collection/cells/complex-cells.d.mts +46 -0
  693. package/dist/client/views/collection/cells/complex-cells.d.mts.map +1 -0
  694. package/dist/client/views/collection/cells/complex-cells.mjs +327 -0
  695. package/dist/client/views/collection/cells/complex-cells.mjs.map +1 -0
  696. package/dist/client/views/collection/cells/index.d.mts +7 -0
  697. package/dist/client/views/collection/cells/primitive-cells.d.mts +76 -0
  698. package/dist/client/views/collection/cells/primitive-cells.d.mts.map +1 -0
  699. package/dist/client/views/collection/cells/primitive-cells.mjs +165 -0
  700. package/dist/client/views/collection/cells/primitive-cells.mjs.map +1 -0
  701. package/dist/client/views/collection/cells/relation-cells.d.mts +21 -0
  702. package/dist/client/views/collection/cells/relation-cells.d.mts.map +1 -0
  703. package/dist/client/views/collection/cells/relation-cells.mjs +105 -0
  704. package/dist/client/views/collection/cells/relation-cells.mjs.map +1 -0
  705. package/dist/client/views/collection/cells/shared/asset-thumbnail.d.mts +1 -0
  706. package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +189 -0
  707. package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs.map +1 -0
  708. package/dist/client/views/collection/cells/shared/cell-helpers.d.mts +2 -0
  709. package/dist/client/views/collection/cells/shared/cell-helpers.mjs +78 -0
  710. package/dist/client/views/collection/cells/shared/cell-helpers.mjs.map +1 -0
  711. package/dist/client/views/collection/cells/shared/relation-chip.d.mts +1 -0
  712. package/dist/client/views/collection/cells/shared/relation-chip.mjs +37 -0
  713. package/dist/client/views/collection/cells/shared/relation-chip.mjs.map +1 -0
  714. package/dist/client/views/collection/cells/upload-cells.d.mts +25 -0
  715. package/dist/client/views/collection/cells/upload-cells.d.mts.map +1 -0
  716. package/dist/client/views/collection/cells/upload-cells.mjs +20 -0
  717. package/dist/client/views/collection/cells/upload-cells.mjs.map +1 -0
  718. package/dist/client/views/collection/columns/build-columns.d.mts +2 -0
  719. package/dist/client/views/collection/columns/build-columns.mjs +156 -0
  720. package/dist/client/views/collection/columns/build-columns.mjs.map +1 -0
  721. package/dist/client/views/collection/columns/column-defaults.d.mts +2 -0
  722. package/dist/client/views/collection/columns/column-defaults.mjs +108 -0
  723. package/dist/client/views/collection/columns/column-defaults.mjs.map +1 -0
  724. package/dist/client/views/collection/columns/index.d.mts +3 -0
  725. package/dist/client/views/collection/columns/types.d.mts +2 -0
  726. package/dist/client/views/collection/field-context.mjs +127 -0
  727. package/dist/client/views/collection/field-context.mjs.map +1 -0
  728. package/dist/client/views/collection/field-renderer.mjs +171 -0
  729. package/dist/client/views/collection/field-renderer.mjs.map +1 -0
  730. package/dist/client/views/collection/form-view.d.mts +112 -0
  731. package/dist/client/views/collection/form-view.d.mts.map +1 -0
  732. package/dist/client/views/collection/form-view.mjs +903 -0
  733. package/dist/client/views/collection/form-view.mjs.map +1 -0
  734. package/dist/client/views/collection/index.d.mts +9 -0
  735. package/dist/client/views/collection/table-view.d.mts +102 -0
  736. package/dist/client/views/collection/table-view.d.mts.map +1 -0
  737. package/dist/client/views/collection/table-view.mjs +695 -0
  738. package/dist/client/views/collection/table-view.mjs.map +1 -0
  739. package/dist/client/views/collection/view-skeletons.mjs +121 -0
  740. package/dist/client/views/collection/view-skeletons.mjs.map +1 -0
  741. package/dist/client/views/common/global-search.d.mts +1 -0
  742. package/dist/client/views/common/global-search.mjs +376 -0
  743. package/dist/client/views/common/global-search.mjs.map +1 -0
  744. package/dist/client/views/common/index.d.mts +1 -0
  745. package/dist/client/views/dashboard/dashboard-grid.mjs +385 -0
  746. package/dist/client/views/dashboard/dashboard-grid.mjs.map +1 -0
  747. package/dist/client/views/dashboard/dashboard-widget.mjs +178 -0
  748. package/dist/client/views/dashboard/dashboard-widget.mjs.map +1 -0
  749. package/dist/client/views/dashboard/widget-card.mjs +159 -0
  750. package/dist/client/views/dashboard/widget-card.mjs.map +1 -0
  751. package/dist/client/views/globals/global-form-view.d.mts +74 -0
  752. package/dist/client/views/globals/global-form-view.d.mts.map +1 -0
  753. package/dist/client/views/globals/global-form-view.mjs +181 -0
  754. package/dist/client/views/globals/global-form-view.mjs.map +1 -0
  755. package/dist/client/views/index.d.mts +28 -0
  756. package/dist/client/views/layout/admin-layout-provider.d.mts +140 -0
  757. package/dist/client/views/layout/admin-layout-provider.d.mts.map +1 -0
  758. package/dist/client/views/layout/admin-layout-provider.mjs +90 -0
  759. package/dist/client/views/layout/admin-layout-provider.mjs.map +1 -0
  760. package/dist/client/views/layout/admin-layout.d.mts +151 -0
  761. package/dist/client/views/layout/admin-layout.d.mts.map +1 -0
  762. package/dist/client/views/layout/admin-layout.mjs +144 -0
  763. package/dist/client/views/layout/admin-layout.mjs.map +1 -0
  764. package/dist/client/views/layout/admin-root.d.mts +7 -0
  765. package/dist/client/views/layout/admin-router.d.mts +125 -0
  766. package/dist/client/views/layout/admin-router.d.mts.map +1 -0
  767. package/dist/client/views/layout/admin-router.mjs +594 -0
  768. package/dist/client/views/layout/admin-router.mjs.map +1 -0
  769. package/dist/client/views/layout/admin-sidebar.d.mts +105 -0
  770. package/dist/client/views/layout/admin-sidebar.d.mts.map +1 -0
  771. package/dist/client/views/layout/admin-sidebar.mjs +550 -0
  772. package/dist/client/views/layout/admin-sidebar.mjs.map +1 -0
  773. package/dist/client/views/layout/admin-topbar.mjs +128 -0
  774. package/dist/client/views/layout/admin-topbar.mjs.map +1 -0
  775. package/dist/client/views/layout/index.d.mts +5 -0
  776. package/dist/client/views/pages/accept-invite-page.d.mts +67 -0
  777. package/dist/client/views/pages/accept-invite-page.d.mts.map +1 -0
  778. package/dist/client/views/pages/accept-invite-page.mjs +143 -0
  779. package/dist/client/views/pages/accept-invite-page.mjs.map +1 -0
  780. package/dist/client/views/pages/dashboard-page.d.mts +52 -0
  781. package/dist/client/views/pages/dashboard-page.d.mts.map +1 -0
  782. package/dist/client/views/pages/dashboard-page.mjs +45 -0
  783. package/dist/client/views/pages/dashboard-page.mjs.map +1 -0
  784. package/dist/client/views/pages/forgot-password-page.d.mts +59 -0
  785. package/dist/client/views/pages/forgot-password-page.d.mts.map +1 -0
  786. package/dist/client/views/pages/forgot-password-page.mjs +80 -0
  787. package/dist/client/views/pages/forgot-password-page.mjs.map +1 -0
  788. package/dist/client/views/pages/index.d.mts +7 -0
  789. package/dist/client/views/pages/invite-page.d.mts +71 -0
  790. package/dist/client/views/pages/invite-page.d.mts.map +1 -0
  791. package/dist/client/views/pages/invite-page.mjs +86 -0
  792. package/dist/client/views/pages/invite-page.mjs.map +1 -0
  793. package/dist/client/views/pages/login-page.d.mts +76 -0
  794. package/dist/client/views/pages/login-page.d.mts.map +1 -0
  795. package/dist/client/views/pages/login-page.mjs +98 -0
  796. package/dist/client/views/pages/login-page.mjs.map +1 -0
  797. package/dist/client/views/pages/reset-password-page.d.mts +66 -0
  798. package/dist/client/views/pages/reset-password-page.d.mts.map +1 -0
  799. package/dist/client/views/pages/reset-password-page.mjs +105 -0
  800. package/dist/client/views/pages/reset-password-page.mjs.map +1 -0
  801. package/dist/client/views/pages/setup-page.d.mts +64 -0
  802. package/dist/client/views/pages/setup-page.d.mts.map +1 -0
  803. package/dist/client/views/pages/setup-page.mjs +91 -0
  804. package/dist/client/views/pages/setup-page.mjs.map +1 -0
  805. package/dist/client.d.mts +92 -3
  806. package/dist/client.d.mts.map +1 -0
  807. package/dist/client.mjs +54 -12
  808. package/dist/components/rich-text/index.d.mts +1 -0
  809. package/dist/components/rich-text/rich-text-renderer.d.mts +104 -0
  810. package/dist/components/rich-text/rich-text-renderer.d.mts.map +1 -0
  811. package/dist/components/rich-text/rich-text-renderer.mjs +210 -0
  812. package/dist/components/rich-text/rich-text-renderer.mjs.map +1 -0
  813. package/dist/index.d.mts +62 -3
  814. package/dist/index.mjs +54 -12
  815. package/dist/server/adapters/nextjs.d.mts +121 -0
  816. package/dist/server/adapters/nextjs.d.mts.map +1 -0
  817. package/dist/server/adapters/nextjs.mjs +111 -0
  818. package/dist/server/adapters/nextjs.mjs.map +1 -0
  819. package/dist/server/adapters/tanstack.d.mts +133 -0
  820. package/dist/server/adapters/tanstack.d.mts.map +1 -0
  821. package/dist/server/adapters/tanstack.mjs +90 -0
  822. package/dist/server/adapters/tanstack.mjs.map +1 -0
  823. package/dist/server/augmentation.d.mts +1523 -0
  824. package/dist/server/augmentation.d.mts.map +1 -0
  825. package/dist/server/auth-helpers.d.mts +143 -0
  826. package/dist/server/auth-helpers.d.mts.map +1 -0
  827. package/dist/server/auth-helpers.mjs +108 -0
  828. package/dist/server/auth-helpers.mjs.map +1 -0
  829. package/dist/server/block/block-builder.d.mts +319 -0
  830. package/dist/server/block/block-builder.d.mts.map +1 -0
  831. package/dist/server/block/block-builder.mjs +217 -0
  832. package/dist/server/block/block-builder.mjs.map +1 -0
  833. package/dist/server/block/index.d.mts +3 -0
  834. package/dist/server/block/introspection.d.mts +84 -0
  835. package/dist/server/block/introspection.d.mts.map +1 -0
  836. package/dist/server/block/introspection.mjs +89 -0
  837. package/dist/server/block/introspection.mjs.map +1 -0
  838. package/dist/server/block/prefetch.d.mts +78 -0
  839. package/dist/server/block/prefetch.d.mts.map +1 -0
  840. package/dist/server/block/prefetch.mjs +240 -0
  841. package/dist/server/block/prefetch.mjs.map +1 -0
  842. package/dist/server/fields/blocks.d.mts +139 -0
  843. package/dist/server/fields/blocks.d.mts.map +1 -0
  844. package/dist/server/fields/blocks.mjs +192 -0
  845. package/dist/server/fields/blocks.mjs.map +1 -0
  846. package/dist/server/fields/index.d.mts +48 -0
  847. package/dist/server/fields/index.d.mts.map +1 -0
  848. package/dist/server/fields/index.mjs +16 -0
  849. package/dist/server/fields/index.mjs.map +1 -0
  850. package/dist/server/fields/rich-text.d.mts +135 -0
  851. package/dist/server/fields/rich-text.d.mts.map +1 -0
  852. package/dist/server/fields/rich-text.mjs +188 -0
  853. package/dist/server/fields/rich-text.mjs.map +1 -0
  854. package/dist/server/i18n/index.d.mts +16 -0
  855. package/dist/server/i18n/index.d.mts.map +1 -0
  856. package/dist/server/i18n/index.mjs +44 -0
  857. package/dist/server/i18n/index.mjs.map +1 -0
  858. package/dist/server/i18n/messages/cs.mjs +461 -0
  859. package/dist/server/i18n/messages/cs.mjs.map +1 -0
  860. package/dist/server/i18n/messages/de.mjs +461 -0
  861. package/dist/server/i18n/messages/de.mjs.map +1 -0
  862. package/dist/server/i18n/messages/en.mjs +493 -0
  863. package/dist/server/i18n/messages/en.mjs.map +1 -0
  864. package/dist/server/i18n/messages/es.mjs +461 -0
  865. package/dist/server/i18n/messages/es.mjs.map +1 -0
  866. package/dist/server/i18n/messages/fr.mjs +461 -0
  867. package/dist/server/i18n/messages/fr.mjs.map +1 -0
  868. package/dist/server/i18n/messages/index.mjs +24 -0
  869. package/dist/server/i18n/messages/index.mjs.map +1 -0
  870. package/dist/server/i18n/messages/pl.mjs +461 -0
  871. package/dist/server/i18n/messages/pl.mjs.map +1 -0
  872. package/dist/server/i18n/messages/pt.mjs +464 -0
  873. package/dist/server/i18n/messages/pt.mjs.map +1 -0
  874. package/dist/server/i18n/messages/sk.mjs +490 -0
  875. package/dist/server/i18n/messages/sk.mjs.map +1 -0
  876. package/dist/server/index.d.mts +20 -0
  877. package/dist/server/modules/admin/functions/admin-config.mjs +348 -0
  878. package/dist/server/modules/admin/functions/admin-config.mjs.map +1 -0
  879. package/dist/server/modules/admin/functions/execute-action.d.mts +107 -0
  880. package/dist/server/modules/admin/functions/execute-action.d.mts.map +1 -0
  881. package/dist/server/modules/admin/functions/execute-action.mjs +331 -0
  882. package/dist/server/modules/admin/functions/execute-action.mjs.map +1 -0
  883. package/dist/server/modules/admin/functions/locales.mjs +80 -0
  884. package/dist/server/modules/admin/functions/locales.mjs.map +1 -0
  885. package/dist/server/modules/admin/functions/preview.d.mts +70 -0
  886. package/dist/server/modules/admin/functions/preview.d.mts.map +1 -0
  887. package/dist/server/modules/admin/functions/preview.mjs +243 -0
  888. package/dist/server/modules/admin/functions/preview.mjs.map +1 -0
  889. package/dist/server/modules/admin/functions/reactive.d.mts +99 -0
  890. package/dist/server/modules/admin/functions/reactive.d.mts.map +1 -0
  891. package/dist/server/modules/admin/functions/reactive.mjs +378 -0
  892. package/dist/server/modules/admin/functions/reactive.mjs.map +1 -0
  893. package/dist/server/modules/admin/functions/setup.d.mts +84 -0
  894. package/dist/server/modules/admin/functions/setup.d.mts.map +1 -0
  895. package/dist/server/modules/admin/functions/setup.mjs +131 -0
  896. package/dist/server/modules/admin/functions/setup.mjs.map +1 -0
  897. package/dist/server/modules/admin/functions/translations.mjs +125 -0
  898. package/dist/server/modules/admin/functions/translations.mjs.map +1 -0
  899. package/dist/server/modules/admin/functions/widget-data.d.mts +33 -0
  900. package/dist/server/modules/admin/functions/widget-data.d.mts.map +1 -0
  901. package/dist/server/modules/admin/functions/widget-data.mjs +70 -0
  902. package/dist/server/modules/admin/functions/widget-data.mjs.map +1 -0
  903. package/dist/server/modules/admin/index.d.mts +16879 -0
  904. package/dist/server/modules/admin/index.d.mts.map +1 -0
  905. package/dist/server/modules/admin/index.mjs +249 -0
  906. package/dist/server/modules/admin/index.mjs.map +1 -0
  907. package/dist/server/modules/admin-preferences/collections/admin-preferences.collection.d.mts +3 -0
  908. package/dist/server/modules/admin-preferences/collections/admin-preferences.collection.mjs +48 -0
  909. package/dist/server/modules/admin-preferences/collections/admin-preferences.collection.mjs.map +1 -0
  910. package/dist/server/modules/admin-preferences/collections/locks.collection.d.mts +3 -0
  911. package/dist/server/modules/admin-preferences/collections/locks.collection.mjs +79 -0
  912. package/dist/server/modules/admin-preferences/collections/locks.collection.mjs.map +1 -0
  913. package/dist/server/modules/admin-preferences/collections/saved-views.collection.d.mts +1490 -0
  914. package/dist/server/modules/admin-preferences/collections/saved-views.collection.d.mts.map +1 -0
  915. package/dist/server/modules/admin-preferences/collections/saved-views.collection.mjs +57 -0
  916. package/dist/server/modules/admin-preferences/collections/saved-views.collection.mjs.map +1 -0
  917. package/dist/server/patch.d.mts +100 -0
  918. package/dist/server/patch.d.mts.map +1 -0
  919. package/dist/server/patch.mjs +1062 -0
  920. package/dist/server/patch.mjs.map +1 -0
  921. package/dist/server.d.mts +21 -250
  922. package/dist/server.mjs +19 -832
  923. package/dist/shared/preview-utils.d.mts +54 -0
  924. package/dist/shared/preview-utils.d.mts.map +1 -0
  925. package/dist/{preview-utils-BKQ9-TMa.mjs → shared/preview-utils.mjs} +2 -2
  926. package/dist/shared/preview-utils.mjs.map +1 -0
  927. package/dist/{saved-views.types-BMsz5mCy.d.mts → shared/types/saved-views.types.d.mts} +7 -2
  928. package/dist/shared/types/saved-views.types.d.mts.map +1 -0
  929. package/dist/shared.d.mts +3 -57
  930. package/dist/shared.mjs +1 -1
  931. package/package.json +12 -17
  932. package/dist/auth-layout-M8K8_q5R.mjs +0 -181
  933. package/dist/auth-layout-M8K8_q5R.mjs.map +0 -1
  934. package/dist/bulk-upload-dialog-D7w7W1Hl.mjs +0 -273
  935. package/dist/bulk-upload-dialog-D7w7W1Hl.mjs.map +0 -1
  936. package/dist/client-B7r47hEd.d.mts +0 -13403
  937. package/dist/client-B7r47hEd.d.mts.map +0 -1
  938. package/dist/client-njX1rZmi.mjs +0 -22612
  939. package/dist/client-njX1rZmi.mjs.map +0 -1
  940. package/dist/content-locales-provider-BXvuIgfg.mjs +0 -1650
  941. package/dist/content-locales-provider-BXvuIgfg.mjs.map +0 -1
  942. package/dist/dashboard-page-B4PGEdc2.mjs +0 -2500
  943. package/dist/dashboard-page-B4PGEdc2.mjs.map +0 -1
  944. package/dist/dashboard-page-mCY0pgZv.mjs +0 -3
  945. package/dist/dropzone-Do3awXKd.mjs +0 -634
  946. package/dist/dropzone-Do3awXKd.mjs.map +0 -1
  947. package/dist/forgot-password-page-Bcp-An4Y.mjs.map +0 -1
  948. package/dist/forgot-password-page-CEwsdLwn.mjs +0 -3
  949. package/dist/index-BYyqkWtn.d.mts +0 -2753
  950. package/dist/index-BYyqkWtn.d.mts.map +0 -1
  951. package/dist/login-page-BUnpCbCa.mjs +0 -3
  952. package/dist/login-page-CP4gA-dl.mjs +0 -298
  953. package/dist/login-page-CP4gA-dl.mjs.map +0 -1
  954. package/dist/preview-utils-BKQ9-TMa.mjs.map +0 -1
  955. package/dist/reset-password-page-BqfDmLxA.mjs +0 -281
  956. package/dist/reset-password-page-BqfDmLxA.mjs.map +0 -1
  957. package/dist/reset-password-page-CufHz3h3.mjs +0 -3
  958. package/dist/runtime-6VZM878K.mjs.map +0 -1
  959. package/dist/saved-views.types-BMsz5mCy.d.mts.map +0 -1
  960. package/dist/server.d.mts.map +0 -1
  961. package/dist/server.mjs.map +0 -1
  962. package/dist/setup-page-BNNzt_Z6.mjs +0 -3
  963. package/dist/setup-page-YAP_fzqh.mjs.map +0 -1
  964. package/dist/shared.d.mts.map +0 -1
  965. package/dist/use-auth-BoLmWtmU.mjs.map +0 -1
@@ -0,0 +1,45 @@
1
+ "use client";
2
+
3
+ import { cn } from "../../lib/utils.mjs";
4
+ import { BlockInsertButton } from "./block-insert-button.mjs";
5
+ import { BlockItem } from "./block-item.mjs";
6
+ import * as React$1 from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { SortableContext, verticalListSortingStrategy } from "@dnd-kit/sortable";
9
+
10
+ //#region src/client/components/blocks/block-tree.tsx
11
+ /**
12
+ * Block Tree
13
+ *
14
+ * Renders a list of blocks with drag-and-drop support and rail visual for hierarchy.
15
+ */
16
+ function BlockTree({ blocks, level, parentId, className }) {
17
+ const blockIds = React$1.useMemo(() => blocks.map((b) => b.id), [blocks]);
18
+ const isRoot = level === 0;
19
+ return /* @__PURE__ */ jsxs("div", {
20
+ className: cn("space-y-2", className),
21
+ children: [/* @__PURE__ */ jsx(SortableContext, {
22
+ items: blockIds,
23
+ strategy: verticalListSortingStrategy,
24
+ children: blocks.map((block, index) => /* @__PURE__ */ jsx(BlockItem, {
25
+ block,
26
+ level,
27
+ index,
28
+ parentId
29
+ }, block.id))
30
+ }), isRoot && /* @__PURE__ */ jsx("div", {
31
+ className: "mt-4",
32
+ children: /* @__PURE__ */ jsx(BlockInsertButton, {
33
+ position: {
34
+ parentId,
35
+ index: blocks.length
36
+ },
37
+ variant: "default"
38
+ })
39
+ })]
40
+ });
41
+ }
42
+
43
+ //#endregion
44
+ export { BlockTree };
45
+ //# sourceMappingURL=block-tree.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-tree.mjs","names":["React"],"sources":["../../../../src/client/components/blocks/block-tree.tsx"],"sourcesContent":["/**\n * Block Tree\n *\n * Renders a list of blocks with drag-and-drop support and rail visual for hierarchy.\n */\n\n\"use client\";\n\nimport {\n\tSortableContext,\n\tverticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport * as React from \"react\";\nimport type { BlockNode } from \"../../blocks/types.js\";\nimport { cn } from \"../../lib/utils.js\";\nimport { BlockInsertButton } from \"./block-insert-button.js\";\nimport { BlockItem } from \"./block-item.js\";\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport type BlockTreeProps = {\n\t/** Block nodes to render */\n\tblocks: BlockNode[];\n\t/** Nesting level (0 = root) */\n\tlevel: number;\n\t/** Parent block ID (null = root) */\n\tparentId: string | null;\n\t/** Custom class name */\n\tclassName?: string;\n};\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport function BlockTree({\n\tblocks,\n\tlevel,\n\tparentId,\n\tclassName,\n}: BlockTreeProps) {\n\t// Get block IDs for sortable context\n\tconst blockIds = React.useMemo(() => blocks.map((b) => b.id), [blocks]);\n\n\tconst isRoot = level === 0;\n\n\treturn (\n\t\t<div className={cn(\"space-y-2\", className)}>\n\t\t\t<SortableContext items={blockIds} strategy={verticalListSortingStrategy}>\n\t\t\t\t{blocks.map((block, index) => (\n\t\t\t\t\t<BlockItem\n\t\t\t\t\t\tkey={block.id}\n\t\t\t\t\t\tblock={block}\n\t\t\t\t\t\tlevel={level}\n\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\tparentId={parentId}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</SortableContext>\n\n\t\t\t{/* Add block at end - only for root level */}\n\t\t\t{isRoot && (\n\t\t\t\t<div className=\"mt-4\">\n\t\t\t\t\t<BlockInsertButton\n\t\t\t\t\t\tposition={{ parentId, index: blocks.length }}\n\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqCA,SAAgB,UAAU,EACzB,QACA,OACA,UACA,aACkB;CAElB,MAAM,WAAWA,QAAM,cAAc,OAAO,KAAK,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC;CAEvE,MAAM,SAAS,UAAU;AAEzB,QACC,qBAAC;EAAI,WAAW,GAAG,aAAa,UAAU;aACzC,oBAAC;GAAgB,OAAO;GAAU,UAAU;aAC1C,OAAO,KAAK,OAAO,UACnB,oBAAC;IAEO;IACA;IACA;IACG;MAJL,MAAM,GAKV,CACD;IACe,EAGjB,UACA,oBAAC;GAAI,WAAU;aACd,oBAAC;IACA,UAAU;KAAE;KAAU,OAAO,OAAO;KAAQ;IAC5C,SAAQ;KACP;IACG;GAEF"}
@@ -0,0 +1,50 @@
1
+ "use client";
2
+
3
+ import { cn } from "../../lib/utils.mjs";
4
+ import { ComponentRenderer } from "../component-renderer.mjs";
5
+ import { useBlockDefinition } from "./block-editor-context.mjs";
6
+ import { jsx } from "react/jsx-runtime";
7
+
8
+ //#region src/client/components/blocks/block-type-icon.tsx
9
+ /**
10
+ * Block Type Icon
11
+ *
12
+ * Displays the icon for a block type using component references.
13
+ */
14
+ function BlockTypeIcon({ type, className, size = 16 }) {
15
+ const iconRef = useBlockDefinition(type)?.admin?.icon;
16
+ return /* @__PURE__ */ jsx(BlockIcon, {
17
+ icon: iconRef,
18
+ className,
19
+ size
20
+ });
21
+ }
22
+ /**
23
+ * Standalone icon component that doesn't require context.
24
+ * Useful for rendering icons outside the editor.
25
+ * Shows a default cube icon if no icon is provided.
26
+ */
27
+ function BlockIcon({ icon, className, size = 16 }) {
28
+ return /* @__PURE__ */ jsx(ComponentRenderer, {
29
+ reference: normalizeIconReference(icon) ?? {
30
+ type: "icon",
31
+ props: { name: "ph:cube" }
32
+ },
33
+ additionalProps: {
34
+ className: cn("shrink-0", className),
35
+ size
36
+ }
37
+ });
38
+ }
39
+ function normalizeIconReference(icon) {
40
+ if (!icon) return void 0;
41
+ if (typeof icon === "string") return {
42
+ type: "icon",
43
+ props: { name: icon }
44
+ };
45
+ return icon;
46
+ }
47
+
48
+ //#endregion
49
+ export { BlockIcon, BlockTypeIcon };
50
+ //# sourceMappingURL=block-type-icon.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-type-icon.mjs","names":[],"sources":["../../../../src/client/components/blocks/block-type-icon.tsx"],"sourcesContent":["/**\n * Block Type Icon\n *\n * Displays the icon for a block type using component references.\n */\n\n\"use client\";\n\nimport type { ComponentReference } from \"#questpie/admin/server\";\nimport { ComponentRenderer } from \"../../components/component-renderer\";\nimport { cn } from \"../../lib/utils.js\";\nimport { useBlockDefinition } from \"./block-editor-context.js\";\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport type BlockTypeIconProps = {\n\t/** Block type name */\n\ttype: string;\n\t/** Custom class name */\n\tclassName?: string;\n\t/** Icon size */\n\tsize?: number;\n};\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport function BlockTypeIcon({\n\ttype,\n\tclassName,\n\tsize = 16,\n}: BlockTypeIconProps) {\n\tconst blockDef = useBlockDefinition(type);\n\tconst iconRef = blockDef?.admin?.icon;\n\n\t// Use BlockIcon which provides default cube icon\n\treturn <BlockIcon icon={iconRef} className={className} size={size} />;\n}\n\n/**\n * Standalone icon component that doesn't require context.\n * Useful for rendering icons outside the editor.\n * Shows a default cube icon if no icon is provided.\n */\nexport function BlockIcon({\n\ticon,\n\tclassName,\n\tsize = 16,\n}: {\n\ticon?: ComponentReference | string;\n\tclassName?: string;\n\tsize?: number;\n}) {\n\tconst reference = normalizeIconReference(icon);\n\n\t// Use default cube icon if no icon provided\n\tconst finalReference = reference ?? {\n\t\ttype: \"icon\",\n\t\tprops: { name: \"ph:cube\" },\n\t};\n\n\treturn (\n\t\t<ComponentRenderer\n\t\t\treference={finalReference}\n\t\t\tadditionalProps={{ className: cn(\"shrink-0\", className), size }}\n\t\t/>\n\t);\n}\n\n// ============================================================================\n// Helpers\n// ============================================================================\n\nfunction normalizeIconReference(\n\ticon?: ComponentReference | string,\n): ComponentReference | undefined {\n\tif (!icon) return undefined;\n\tif (typeof icon === \"string\") {\n\t\treturn { type: \"icon\", props: { name: icon } };\n\t}\n\treturn icon;\n}\n"],"mappings":";;;;;;;;;;;;;AA8BA,SAAgB,cAAc,EAC7B,MACA,WACA,OAAO,MACe;CAEtB,MAAM,UADW,mBAAmB,KAAK,EACf,OAAO;AAGjC,QAAO,oBAAC;EAAU,MAAM;EAAoB;EAAiB;GAAQ;;;;;;;AAQtE,SAAgB,UAAU,EACzB,MACA,WACA,OAAO,MAKL;AASF,QACC,oBAAC;EACA,WAVgB,uBAAuB,KAAK,IAGV;GACnC,MAAM;GACN,OAAO,EAAE,MAAM,WAAW;GAC1B;EAKC,iBAAiB;GAAE,WAAW,GAAG,YAAY,UAAU;GAAE;GAAM;GAC9D;;AAQJ,SAAS,uBACR,MACiC;AACjC,KAAI,CAAC,KAAM,QAAO;AAClB,KAAI,OAAO,SAAS,SACnB,QAAO;EAAE,MAAM;EAAQ,OAAO,EAAE,MAAM,MAAM;EAAE;AAE/C,QAAO"}
@@ -0,0 +1,186 @@
1
+ import { arrayMove } from "@dnd-kit/sortable";
2
+
3
+ //#region src/client/components/blocks/utils/tree-utils.ts
4
+ /**
5
+ * Block Tree Utilities
6
+ *
7
+ * Functions for manipulating the block tree structure.
8
+ * All functions are pure and return new objects.
9
+ */
10
+ /**
11
+ * Find a block by ID in the tree.
12
+ */
13
+ function findBlockById(tree, id) {
14
+ for (const node of tree) {
15
+ if (node.id === id) return node;
16
+ const found = findBlockById(node.children, id);
17
+ if (found) return found;
18
+ }
19
+ return null;
20
+ }
21
+ /**
22
+ * Find a block's position (parent and index) in the tree.
23
+ */
24
+ function findBlockPosition(tree, id, parentId = null) {
25
+ for (let i = 0; i < tree.length; i++) {
26
+ const node = tree[i];
27
+ if (node.id === id) return {
28
+ parentId,
29
+ index: i
30
+ };
31
+ const found = findBlockPosition(node.children, id, node.id);
32
+ if (found) return found;
33
+ }
34
+ return null;
35
+ }
36
+ /**
37
+ * Insert a block at the specified position.
38
+ */
39
+ function insertBlockInTree(tree, block, position) {
40
+ if (position.parentId === null) {
41
+ const newTree = [...tree];
42
+ newTree.splice(position.index, 0, block);
43
+ return newTree;
44
+ }
45
+ return tree.map((node) => {
46
+ if (node.id === position.parentId) {
47
+ const newChildren = [...node.children];
48
+ newChildren.splice(position.index, 0, block);
49
+ return {
50
+ ...node,
51
+ children: newChildren
52
+ };
53
+ }
54
+ return {
55
+ ...node,
56
+ children: insertBlockInTree(node.children, block, position)
57
+ };
58
+ });
59
+ }
60
+ /**
61
+ * Remove a block and all its children from the tree.
62
+ * Returns the new tree and list of removed block IDs.
63
+ */
64
+ function removeBlockFromTree(tree, id) {
65
+ const removedIds = [];
66
+ function collectIds(node) {
67
+ removedIds.push(node.id);
68
+ node.children.forEach(collectIds);
69
+ }
70
+ function remove(nodes) {
71
+ return nodes.filter((node) => {
72
+ if (node.id === id) {
73
+ collectIds(node);
74
+ return false;
75
+ }
76
+ return true;
77
+ }).map((node) => ({
78
+ ...node,
79
+ children: remove(node.children)
80
+ }));
81
+ }
82
+ return {
83
+ newTree: remove(tree),
84
+ removedIds
85
+ };
86
+ }
87
+ /**
88
+ * Reorder a block within the same parent using arrayMove.
89
+ * Used for DnD reordering — avoids remove+insert index shifting issues.
90
+ */
91
+ function reorderBlockInTree(tree, parentId, fromIndex, toIndex) {
92
+ if (parentId === null) return arrayMove(tree, fromIndex, toIndex);
93
+ return tree.map((node) => {
94
+ if (node.id === parentId) return {
95
+ ...node,
96
+ children: arrayMove(node.children, fromIndex, toIndex)
97
+ };
98
+ return {
99
+ ...node,
100
+ children: reorderBlockInTree(node.children, parentId, fromIndex, toIndex)
101
+ };
102
+ });
103
+ }
104
+ /**
105
+ * Duplicate a block and all its children.
106
+ * Returns the new tree, list of new IDs, and new values.
107
+ */
108
+ function duplicateBlockInTree(tree, values, blockId) {
109
+ const block = findBlockById(tree, blockId);
110
+ if (!block) return {
111
+ newTree: tree,
112
+ newIds: [],
113
+ newValues: {}
114
+ };
115
+ const newIds = [];
116
+ const newValues = {};
117
+ function cloneNode(node) {
118
+ const newId = crypto.randomUUID();
119
+ newIds.push(newId);
120
+ newValues[newId] = { ...values[node.id] };
121
+ return {
122
+ id: newId,
123
+ type: node.type,
124
+ children: node.children.map(cloneNode)
125
+ };
126
+ }
127
+ const clonedBlock = cloneNode(block);
128
+ const position = findBlockPosition(tree, blockId);
129
+ if (!position) return {
130
+ newTree: tree,
131
+ newIds: [],
132
+ newValues: {}
133
+ };
134
+ return {
135
+ newTree: insertBlockInTree(tree, clonedBlock, {
136
+ parentId: position.parentId,
137
+ index: position.index + 1
138
+ }),
139
+ newIds,
140
+ newValues
141
+ };
142
+ }
143
+ /**
144
+ * Get all block IDs in the tree (flattened).
145
+ */
146
+ function getAllBlockIds(tree) {
147
+ const ids = [];
148
+ function collect(nodes) {
149
+ for (const node of nodes) {
150
+ ids.push(node.id);
151
+ collect(node.children);
152
+ }
153
+ }
154
+ collect(tree);
155
+ return ids;
156
+ }
157
+ /**
158
+ * Count total blocks in the tree.
159
+ */
160
+ function countBlocks(tree) {
161
+ let count = 0;
162
+ function traverse(nodes) {
163
+ for (const node of nodes) {
164
+ count++;
165
+ traverse(node.children);
166
+ }
167
+ }
168
+ traverse(tree);
169
+ return count;
170
+ }
171
+ /**
172
+ * Get default values for block fields.
173
+ */
174
+ function getDefaultValues(fields) {
175
+ if (!fields) return {};
176
+ const values = {};
177
+ for (const [key, field] of Object.entries(fields)) {
178
+ const defaultValue = field["~options"]?.defaultValue;
179
+ if (defaultValue !== void 0) values[key] = defaultValue;
180
+ }
181
+ return values;
182
+ }
183
+
184
+ //#endregion
185
+ export { countBlocks, duplicateBlockInTree, findBlockById, findBlockPosition, getAllBlockIds, getDefaultValues, insertBlockInTree, removeBlockFromTree, reorderBlockInTree };
186
+ //# sourceMappingURL=tree-utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-utils.mjs","names":["removedIds: string[]","newIds: string[]","newValues: Record<string, Record<string, unknown>>","ids: string[]","values: Record<string, unknown>"],"sources":["../../../../../src/client/components/blocks/utils/tree-utils.ts"],"sourcesContent":["/**\n * Block Tree Utilities\n *\n * Functions for manipulating the block tree structure.\n * All functions are pure and return new objects.\n */\n\nimport { arrayMove } from \"@dnd-kit/sortable\";\nimport type { BlockNode } from \"../../../blocks/types.js\";\n\n/**\n * Position where a block should be inserted.\n */\nexport type InsertPosition = {\n /** Parent block ID (null = root level) */\n parentId: string | null;\n /** Index within parent's children or root */\n index: number;\n};\n\n/**\n * Find a block by ID in the tree.\n */\nexport function findBlockById(tree: BlockNode[], id: string): BlockNode | null {\n for (const node of tree) {\n if (node.id === id) return node;\n const found = findBlockById(node.children, id);\n if (found) return found;\n }\n return null;\n}\n\n/**\n * Find a block's position (parent and index) in the tree.\n */\nexport function findBlockPosition(\n tree: BlockNode[],\n id: string,\n parentId: string | null = null,\n): InsertPosition | null {\n for (let i = 0; i < tree.length; i++) {\n const node = tree[i];\n if (node.id === id) {\n return { parentId, index: i };\n }\n const found = findBlockPosition(node.children, id, node.id);\n if (found) return found;\n }\n return null;\n}\n\n/**\n * Insert a block at the specified position.\n */\nexport function insertBlockInTree(\n tree: BlockNode[],\n block: BlockNode,\n position: InsertPosition,\n): BlockNode[] {\n if (position.parentId === null) {\n // Insert at root level\n const newTree = [...tree];\n newTree.splice(position.index, 0, block);\n return newTree;\n }\n\n // Insert as child of parent\n return tree.map((node) => {\n if (node.id === position.parentId) {\n const newChildren = [...node.children];\n newChildren.splice(position.index, 0, block);\n return { ...node, children: newChildren };\n }\n return {\n ...node,\n children: insertBlockInTree(node.children, block, position),\n };\n });\n}\n\n/**\n * Remove a block and all its children from the tree.\n * Returns the new tree and list of removed block IDs.\n */\nexport function removeBlockFromTree(\n tree: BlockNode[],\n id: string,\n): { newTree: BlockNode[]; removedIds: string[] } {\n const removedIds: string[] = [];\n\n function collectIds(node: BlockNode) {\n removedIds.push(node.id);\n node.children.forEach(collectIds);\n }\n\n function remove(nodes: BlockNode[]): BlockNode[] {\n return nodes\n .filter((node) => {\n if (node.id === id) {\n collectIds(node);\n return false;\n }\n return true;\n })\n .map((node) => ({\n ...node,\n children: remove(node.children),\n }));\n }\n\n return { newTree: remove(tree), removedIds };\n}\n\n/**\n * Move a block to a new position in the tree (remove + insert).\n * Used for cross-parent moves (e.g., from context menu).\n */\nexport function moveBlockInTree(\n tree: BlockNode[],\n blockId: string,\n toPosition: InsertPosition,\n): BlockNode[] {\n // Find and remove block\n const block = findBlockById(tree, blockId);\n if (!block) return tree;\n\n const { newTree } = removeBlockFromTree(tree, blockId);\n\n // Insert at new position\n return insertBlockInTree(newTree, block, toPosition);\n}\n\n/**\n * Reorder a block within the same parent using arrayMove.\n * Used for DnD reordering — avoids remove+insert index shifting issues.\n */\nexport function reorderBlockInTree(\n tree: BlockNode[],\n parentId: string | null,\n fromIndex: number,\n toIndex: number,\n): BlockNode[] {\n if (parentId === null) {\n return arrayMove(tree, fromIndex, toIndex);\n }\n\n return tree.map((node) => {\n if (node.id === parentId) {\n return {\n ...node,\n children: arrayMove(node.children, fromIndex, toIndex),\n };\n }\n return {\n ...node,\n children: reorderBlockInTree(node.children, parentId, fromIndex, toIndex),\n };\n });\n}\n\n/**\n * Duplicate a block and all its children.\n * Returns the new tree, list of new IDs, and new values.\n */\nexport function duplicateBlockInTree(\n tree: BlockNode[],\n values: Record<string, Record<string, unknown>>,\n blockId: string,\n): {\n newTree: BlockNode[];\n newIds: string[];\n newValues: Record<string, Record<string, unknown>>;\n} {\n const block = findBlockById(tree, blockId);\n if (!block) {\n return { newTree: tree, newIds: [], newValues: {} };\n }\n\n const newIds: string[] = [];\n const newValues: Record<string, Record<string, unknown>> = {};\n\n function cloneNode(node: BlockNode): BlockNode {\n const newId = crypto.randomUUID();\n newIds.push(newId);\n newValues[newId] = { ...values[node.id] };\n\n return {\n id: newId,\n type: node.type,\n children: node.children.map(cloneNode),\n };\n }\n\n const clonedBlock = cloneNode(block);\n\n // Find parent and index\n const position = findBlockPosition(tree, blockId);\n if (!position) {\n return { newTree: tree, newIds: [], newValues: {} };\n }\n\n // Insert after original\n const newTree = insertBlockInTree(tree, clonedBlock, {\n parentId: position.parentId,\n index: position.index + 1,\n });\n\n return { newTree, newIds, newValues };\n}\n\n/**\n * Get all block IDs in the tree (flattened).\n */\nexport function getAllBlockIds(tree: BlockNode[]): string[] {\n const ids: string[] = [];\n\n function collect(nodes: BlockNode[]) {\n for (const node of nodes) {\n ids.push(node.id);\n collect(node.children);\n }\n }\n\n collect(tree);\n return ids;\n}\n\n/**\n * Count total blocks in the tree.\n */\nexport function countBlocks(tree: BlockNode[]): number {\n let count = 0;\n\n function traverse(nodes: BlockNode[]) {\n for (const node of nodes) {\n count++;\n traverse(node.children);\n }\n }\n\n traverse(tree);\n return count;\n}\n\n/**\n * Get default values for block fields.\n */\nexport function getDefaultValues(\n fields:\n | Record<string, { \"~options\"?: { defaultValue?: unknown } }>\n | undefined,\n): Record<string, unknown> {\n if (!fields) return {};\n\n const values: Record<string, unknown> = {};\n\n for (const [key, field] of Object.entries(fields)) {\n const defaultValue = field[\"~options\"]?.defaultValue;\n if (defaultValue !== undefined) {\n values[key] = defaultValue;\n }\n }\n\n return values;\n}\n"],"mappings":";;;;;;;;;;;;AAuBA,SAAgB,cAAc,MAAmB,IAA8B;AAC7E,MAAK,MAAM,QAAQ,MAAM;AACvB,MAAI,KAAK,OAAO,GAAI,QAAO;EAC3B,MAAM,QAAQ,cAAc,KAAK,UAAU,GAAG;AAC9C,MAAI,MAAO,QAAO;;AAEpB,QAAO;;;;;AAMT,SAAgB,kBACd,MACA,IACA,WAA0B,MACH;AACvB,MAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EACpC,MAAM,OAAO,KAAK;AAClB,MAAI,KAAK,OAAO,GACd,QAAO;GAAE;GAAU,OAAO;GAAG;EAE/B,MAAM,QAAQ,kBAAkB,KAAK,UAAU,IAAI,KAAK,GAAG;AAC3D,MAAI,MAAO,QAAO;;AAEpB,QAAO;;;;;AAMT,SAAgB,kBACd,MACA,OACA,UACa;AACb,KAAI,SAAS,aAAa,MAAM;EAE9B,MAAM,UAAU,CAAC,GAAG,KAAK;AACzB,UAAQ,OAAO,SAAS,OAAO,GAAG,MAAM;AACxC,SAAO;;AAIT,QAAO,KAAK,KAAK,SAAS;AACxB,MAAI,KAAK,OAAO,SAAS,UAAU;GACjC,MAAM,cAAc,CAAC,GAAG,KAAK,SAAS;AACtC,eAAY,OAAO,SAAS,OAAO,GAAG,MAAM;AAC5C,UAAO;IAAE,GAAG;IAAM,UAAU;IAAa;;AAE3C,SAAO;GACL,GAAG;GACH,UAAU,kBAAkB,KAAK,UAAU,OAAO,SAAS;GAC5D;GACD;;;;;;AAOJ,SAAgB,oBACd,MACA,IACgD;CAChD,MAAMA,aAAuB,EAAE;CAE/B,SAAS,WAAW,MAAiB;AACnC,aAAW,KAAK,KAAK,GAAG;AACxB,OAAK,SAAS,QAAQ,WAAW;;CAGnC,SAAS,OAAO,OAAiC;AAC/C,SAAO,MACJ,QAAQ,SAAS;AAChB,OAAI,KAAK,OAAO,IAAI;AAClB,eAAW,KAAK;AAChB,WAAO;;AAET,UAAO;IACP,CACD,KAAK,UAAU;GACd,GAAG;GACH,UAAU,OAAO,KAAK,SAAS;GAChC,EAAE;;AAGP,QAAO;EAAE,SAAS,OAAO,KAAK;EAAE;EAAY;;;;;;AA0B9C,SAAgB,mBACd,MACA,UACA,WACA,SACa;AACb,KAAI,aAAa,KACf,QAAO,UAAU,MAAM,WAAW,QAAQ;AAG5C,QAAO,KAAK,KAAK,SAAS;AACxB,MAAI,KAAK,OAAO,SACd,QAAO;GACL,GAAG;GACH,UAAU,UAAU,KAAK,UAAU,WAAW,QAAQ;GACvD;AAEH,SAAO;GACL,GAAG;GACH,UAAU,mBAAmB,KAAK,UAAU,UAAU,WAAW,QAAQ;GAC1E;GACD;;;;;;AAOJ,SAAgB,qBACd,MACA,QACA,SAKA;CACA,MAAM,QAAQ,cAAc,MAAM,QAAQ;AAC1C,KAAI,CAAC,MACH,QAAO;EAAE,SAAS;EAAM,QAAQ,EAAE;EAAE,WAAW,EAAE;EAAE;CAGrD,MAAMC,SAAmB,EAAE;CAC3B,MAAMC,YAAqD,EAAE;CAE7D,SAAS,UAAU,MAA4B;EAC7C,MAAM,QAAQ,OAAO,YAAY;AACjC,SAAO,KAAK,MAAM;AAClB,YAAU,SAAS,EAAE,GAAG,OAAO,KAAK,KAAK;AAEzC,SAAO;GACL,IAAI;GACJ,MAAM,KAAK;GACX,UAAU,KAAK,SAAS,IAAI,UAAU;GACvC;;CAGH,MAAM,cAAc,UAAU,MAAM;CAGpC,MAAM,WAAW,kBAAkB,MAAM,QAAQ;AACjD,KAAI,CAAC,SACH,QAAO;EAAE,SAAS;EAAM,QAAQ,EAAE;EAAE,WAAW,EAAE;EAAE;AASrD,QAAO;EAAE,SALO,kBAAkB,MAAM,aAAa;GACnD,UAAU,SAAS;GACnB,OAAO,SAAS,QAAQ;GACzB,CAAC;EAEgB;EAAQ;EAAW;;;;;AAMvC,SAAgB,eAAe,MAA6B;CAC1D,MAAMC,MAAgB,EAAE;CAExB,SAAS,QAAQ,OAAoB;AACnC,OAAK,MAAM,QAAQ,OAAO;AACxB,OAAI,KAAK,KAAK,GAAG;AACjB,WAAQ,KAAK,SAAS;;;AAI1B,SAAQ,KAAK;AACb,QAAO;;;;;AAMT,SAAgB,YAAY,MAA2B;CACrD,IAAI,QAAQ;CAEZ,SAAS,SAAS,OAAoB;AACpC,OAAK,MAAM,QAAQ,OAAO;AACxB;AACA,YAAS,KAAK,SAAS;;;AAI3B,UAAS,KAAK;AACd,QAAO;;;;;AAMT,SAAgB,iBACd,QAGyB;AACzB,KAAI,CAAC,OAAQ,QAAO,EAAE;CAEtB,MAAMC,SAAkC,EAAE;AAE1C,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,OAAO,EAAE;EACjD,MAAM,eAAe,MAAM,aAAa;AACxC,MAAI,iBAAiB,OACnB,QAAO,OAAO;;AAIlB,QAAO"}
@@ -0,0 +1,125 @@
1
+ import { ComponentReference } from "../../server/augmentation.mjs";
2
+ import "../../server/index.mjs";
3
+ import * as React$1 from "react";
4
+
5
+ //#region src/client/components/component-renderer.d.ts
6
+
7
+ /**
8
+ * Props for IconifyIcon component
9
+ */
10
+ interface IconifyIconProps {
11
+ /** Iconify icon name (e.g., "ph:users", "mdi:home") */
12
+ name: string;
13
+ /** Icon size */
14
+ size?: number | string;
15
+ /** Additional class name */
16
+ className?: string;
17
+ /** Icon color */
18
+ color?: string;
19
+ }
20
+ /**
21
+ * Iconify-based icon component.
22
+ * Renders icons from any Iconify icon set (Phosphor, Material Design, etc.)
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * <IconifyIcon name="ph:users" size={24} />
27
+ * <IconifyIcon name="mdi:home" className="text-blue-500" />
28
+ * ```
29
+ */
30
+ declare function IconifyIcon({
31
+ name,
32
+ size,
33
+ className,
34
+ color
35
+ }: IconifyIconProps): React$1.ReactElement;
36
+ /**
37
+ * Props for Badge component
38
+ */
39
+ interface BadgeProps {
40
+ /** Badge text */
41
+ text: string;
42
+ /** Badge color variant */
43
+ color?: "default" | "primary" | "secondary" | "destructive" | "success" | "warning";
44
+ /** Additional class name */
45
+ className?: string;
46
+ }
47
+ /**
48
+ * Badge component for status indicators
49
+ */
50
+ declare function Badge({
51
+ text,
52
+ color,
53
+ className
54
+ }: BadgeProps): React$1.ReactElement;
55
+ /**
56
+ * Component renderer registry type
57
+ */
58
+ type ComponentRendererRegistry = Record<string, React$1.ComponentType<any>>;
59
+ /**
60
+ * Props for ComponentRenderer
61
+ */
62
+ interface ComponentRendererProps {
63
+ /** Server-defined component reference */
64
+ reference: ComponentReference | null | undefined;
65
+ /** Component registry override (defaults to admin context registry) */
66
+ registry?: ComponentRendererRegistry;
67
+ /** Fallback to render if component type not found */
68
+ fallback?: React$1.ReactNode;
69
+ /** Additional props to pass to the component */
70
+ additionalProps?: Record<string, unknown>;
71
+ }
72
+ /**
73
+ * Renders a server-defined component reference.
74
+ *
75
+ * Looks up the component type in the registry and renders it with the provided props.
76
+ * Falls back gracefully if the component type is not found.
77
+ *
78
+ * @example
79
+ * ```tsx
80
+ * // Basic usage
81
+ * <ComponentRenderer reference={{ type: "icon", props: { name: "ph:users" } }} />
82
+ *
83
+ * // With custom registry
84
+ * <ComponentRenderer
85
+ * reference={{ type: "custom", props: { value: 42 } }}
86
+ * registry={{ custom: MyCustomComponent }}
87
+ * />
88
+ *
89
+ * // With fallback
90
+ * <ComponentRenderer
91
+ * reference={{ type: "unknown", props: {} }}
92
+ * fallback={<span>?</span>}
93
+ * />
94
+ * ```
95
+ */
96
+ declare function ComponentRenderer({
97
+ reference,
98
+ registry,
99
+ fallback,
100
+ additionalProps
101
+ }: ComponentRendererProps): React$1.ReactNode;
102
+ /**
103
+ * Check if a value is a component reference
104
+ */
105
+ declare function isComponentReference(value: unknown): value is ComponentReference;
106
+ /**
107
+ * Resolve an icon to a React element.
108
+ * Handles both ComponentReference objects and direct React components.
109
+ *
110
+ * @param icon - Icon to resolve (ComponentReference, React component, or undefined)
111
+ * @param props - Additional props to pass to the icon
112
+ * @returns React element or null
113
+ */
114
+ declare function resolveIconElement(icon: ComponentReference | React$1.ComponentType<any> | string | undefined | null, props?: Record<string, unknown>, registry?: ComponentRendererRegistry): React$1.ReactNode;
115
+ /**
116
+ * Create a render function for icons.
117
+ * Useful for rendering icons in table cells or list items.
118
+ *
119
+ * @param registry - Custom component registry
120
+ * @returns Function that renders an icon from a ComponentReference
121
+ */
122
+ declare function createIconRenderer(registry?: ComponentRendererRegistry): (icon: ComponentReference | React$1.ComponentType<any> | string | undefined | null, props?: Record<string, unknown>) => React$1.ReactNode;
123
+ //#endregion
124
+ export { Badge, BadgeProps, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, IconifyIcon, IconifyIconProps, createIconRenderer, isComponentReference, resolveIconElement };
125
+ //# sourceMappingURL=component-renderer.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-renderer.d.mts","names":[],"sources":["../../../src/client/components/component-renderer.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AA+FgB,UAnEC,gBAAA,CAmEK;EAAY;EA0BtB,IAAA,EAAA,MAAA;EAYK;EAEL,IAAA,CAAA,EAAA,MAAA,GAAA,MAAA;EAEA;EAEA,SAAM,CAAA,EAAA,MAAA;EAEC;EAAM,KAAA,CAAA,EAAA,MAAA;AA2BzB;;;;;;;;AAoCA;AAqBA;;AAGI,iBAnLY,WAAA,CAmLN;EAAA,IAAA;EAAA,IAAA;EAAA,SAAA;EAAA;AAAA,CAAA,EA9KP,gBA8KO,CAAA,EA9KY,OAAA,CAAM,YA8KlB;;;;AAMQ,UAjKD,UAAA,CAiKC;EAgDF;EAA8B,IAAA,EAAA,MAAA;EAGzC;EACA,KAAM,CAAA,EAAA,SAAA,GAAA,SAAA,GAAA,WAAA,GAAA,aAAA,GAAA,SAAA,GAAA,SAAA;EAID;EACN,SAAM,CAAA,EAAA,MAAA;;;;;iBAxMM,KAAA;;;;GAIb,aAAa,OAAA,CAAM;;;;KA0BV,yBAAA,GAA4B,eAEvC,OAAA,CAAM;;;;UAUU,sBAAA;;aAEL;;aAEA;;aAEA,OAAA,CAAM;;oBAEC;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BH,iBAAA;;;;;GAKb,yBAAyB,OAAA,CAAM;;;;iBA+BlB,oBAAA,2BAEJ;;;;;;;;;iBAmBI,kBAAA,OAEZ,qBACA,OAAA,CAAM,wDAID,oCACG,4BACT,OAAA,CAAM;;;;;;;;iBAgDO,kBAAA,YAA8B,mCAGzC,qBACA,OAAA,CAAM,wDAID,4BACN,OAAA,CAAM"}
@@ -0,0 +1,145 @@
1
+ import { selectAdmin, useAdminStore } from "../runtime/provider.mjs";
2
+ import { Icon } from "@iconify/react";
3
+ import * as React$1 from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+
6
+ //#region src/client/components/component-renderer.tsx
7
+ /**
8
+ * Component Renderer
9
+ *
10
+ * Resolves server-defined component references to React components.
11
+ * This is the bridge between server config (serializable references)
12
+ * and client rendering (React components).
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * // Server sends: { type: "icon", props: { name: "ph:users" } }
17
+ * // Client renders: <IconifyIcon name="ph:users" />
18
+ *
19
+ * <ComponentRenderer reference={{ type: "icon", props: { name: "ph:users" } }} />
20
+ * ```
21
+ */
22
+ /**
23
+ * Iconify-based icon component.
24
+ * Renders icons from any Iconify icon set (Phosphor, Material Design, etc.)
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <IconifyIcon name="ph:users" size={24} />
29
+ * <IconifyIcon name="mdi:home" className="text-blue-500" />
30
+ * ```
31
+ */
32
+ function IconifyIcon({ name, size, className, color }) {
33
+ return /* @__PURE__ */ jsx(Icon, {
34
+ icon: name,
35
+ width: size,
36
+ height: size,
37
+ className,
38
+ color
39
+ });
40
+ }
41
+ /**
42
+ * Badge component for status indicators
43
+ */
44
+ function Badge({ text, color = "default", className }) {
45
+ const colorClasses = {
46
+ default: "bg-muted text-muted-foreground",
47
+ primary: "bg-primary/10 text-primary",
48
+ secondary: "bg-secondary text-secondary-foreground",
49
+ destructive: "bg-destructive/10 text-destructive",
50
+ success: "bg-success/10 text-success",
51
+ warning: "bg-warning/10 text-warning"
52
+ };
53
+ return /* @__PURE__ */ jsx("span", {
54
+ className: `inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${colorClasses[color] ?? colorClasses.default} ${className ?? ""}`,
55
+ children: text
56
+ });
57
+ }
58
+ /**
59
+ * Renders a server-defined component reference.
60
+ *
61
+ * Looks up the component type in the registry and renders it with the provided props.
62
+ * Falls back gracefully if the component type is not found.
63
+ *
64
+ * @example
65
+ * ```tsx
66
+ * // Basic usage
67
+ * <ComponentRenderer reference={{ type: "icon", props: { name: "ph:users" } }} />
68
+ *
69
+ * // With custom registry
70
+ * <ComponentRenderer
71
+ * reference={{ type: "custom", props: { value: 42 } }}
72
+ * registry={{ custom: MyCustomComponent }}
73
+ * />
74
+ *
75
+ * // With fallback
76
+ * <ComponentRenderer
77
+ * reference={{ type: "unknown", props: {} }}
78
+ * fallback={<span>?</span>}
79
+ * />
80
+ * ```
81
+ */
82
+ function ComponentRenderer({ reference, registry, fallback = null, additionalProps }) {
83
+ if (!reference) return fallback;
84
+ const contextRegistry = useAdminStore(selectAdmin)?.getComponents?.() ?? {};
85
+ const mergedRegistry = registry ?? contextRegistry;
86
+ const Component = mergedRegistry[reference.type];
87
+ if (!Component) {
88
+ if (process.env.NODE_ENV === "development") console.warn(`[ComponentRenderer] Unknown component type: "${reference.type}". Available types: ${Object.keys(mergedRegistry).join(", ")}`);
89
+ return fallback;
90
+ }
91
+ return /* @__PURE__ */ jsx(Component, {
92
+ ...reference.props,
93
+ ...additionalProps
94
+ });
95
+ }
96
+ /**
97
+ * Check if a value is a component reference
98
+ */
99
+ function isComponentReference(value) {
100
+ return typeof value === "object" && value !== null && "type" in value && "props" in value && typeof value.type === "string" && typeof value.props === "object";
101
+ }
102
+ /**
103
+ * Resolve an icon to a React element.
104
+ * Handles both ComponentReference objects and direct React components.
105
+ *
106
+ * @param icon - Icon to resolve (ComponentReference, React component, or undefined)
107
+ * @param props - Additional props to pass to the icon
108
+ * @returns React element or null
109
+ */
110
+ function resolveIconElement(icon, props, registry) {
111
+ if (!icon) return null;
112
+ if (isComponentReference(icon)) return /* @__PURE__ */ jsx(ComponentRenderer, {
113
+ reference: icon,
114
+ additionalProps: props,
115
+ registry
116
+ });
117
+ if (typeof icon === "string") return /* @__PURE__ */ jsx(ComponentRenderer, {
118
+ reference: {
119
+ type: "icon",
120
+ props: { name: icon }
121
+ },
122
+ additionalProps: props,
123
+ registry
124
+ });
125
+ if (typeof icon === "function") return /* @__PURE__ */ jsx(icon, { ...props });
126
+ if (typeof icon === "object" && React$1.isValidElement(icon)) return icon;
127
+ return null;
128
+ }
129
+ /**
130
+ * Create a render function for icons.
131
+ * Useful for rendering icons in table cells or list items.
132
+ *
133
+ * @param registry - Custom component registry
134
+ * @returns Function that renders an icon from a ComponentReference
135
+ */
136
+ function createIconRenderer(registry) {
137
+ return (icon, props) => {
138
+ if (!icon) return null;
139
+ return resolveIconElement(icon, props, registry);
140
+ };
141
+ }
142
+
143
+ //#endregion
144
+ export { Badge, ComponentRenderer, IconifyIcon, createIconRenderer, isComponentReference, resolveIconElement };
145
+ //# sourceMappingURL=component-renderer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-renderer.mjs","names":["colorClasses: Record<string, string>","React"],"sources":["../../../src/client/components/component-renderer.tsx"],"sourcesContent":["/**\n * Component Renderer\n *\n * Resolves server-defined component references to React components.\n * This is the bridge between server config (serializable references)\n * and client rendering (React components).\n *\n * @example\n * ```tsx\n * // Server sends: { type: \"icon\", props: { name: \"ph:users\" } }\n * // Client renders: <IconifyIcon name=\"ph:users\" />\n *\n * <ComponentRenderer reference={{ type: \"icon\", props: { name: \"ph:users\" } }} />\n * ```\n */\n\nimport { Icon } from \"@iconify/react\";\nimport * as React from \"react\";\nimport type { ComponentReference } from \"#questpie/admin/server\";\nimport { selectAdmin, useAdminStore } from \"../runtime\";\n\n// ============================================================================\n// Icon Component\n// ============================================================================\n\n/**\n * Props for IconifyIcon component\n */\nexport interface IconifyIconProps {\n\t/** Iconify icon name (e.g., \"ph:users\", \"mdi:home\") */\n\tname: string;\n\t/** Icon size */\n\tsize?: number | string;\n\t/** Additional class name */\n\tclassName?: string;\n\t/** Icon color */\n\tcolor?: string;\n}\n\n/**\n * Iconify-based icon component.\n * Renders icons from any Iconify icon set (Phosphor, Material Design, etc.)\n *\n * @example\n * ```tsx\n * <IconifyIcon name=\"ph:users\" size={24} />\n * <IconifyIcon name=\"mdi:home\" className=\"text-blue-500\" />\n * ```\n */\nexport function IconifyIcon({\n\tname,\n\tsize,\n\tclassName,\n\tcolor,\n}: IconifyIconProps): React.ReactElement {\n\treturn (\n\t\t<Icon\n\t\t\ticon={name}\n\t\t\twidth={size}\n\t\t\theight={size}\n\t\t\tclassName={className}\n\t\t\tcolor={color}\n\t\t/>\n\t);\n}\n\n// ============================================================================\n// Badge Component\n// ============================================================================\n\n/**\n * Props for Badge component\n */\nexport interface BadgeProps {\n\t/** Badge text */\n\ttext: string;\n\t/** Badge color variant */\n\tcolor?:\n\t\t| \"default\"\n\t\t| \"primary\"\n\t\t| \"secondary\"\n\t\t| \"destructive\"\n\t\t| \"success\"\n\t\t| \"warning\";\n\t/** Additional class name */\n\tclassName?: string;\n}\n\n/**\n * Badge component for status indicators\n */\nexport function Badge({\n\ttext,\n\tcolor = \"default\",\n\tclassName,\n}: BadgeProps): React.ReactElement {\n\tconst colorClasses: Record<string, string> = {\n\t\tdefault: \"bg-muted text-muted-foreground\",\n\t\tprimary: \"bg-primary/10 text-primary\",\n\t\tsecondary: \"bg-secondary text-secondary-foreground\",\n\t\tdestructive: \"bg-destructive/10 text-destructive\",\n\t\tsuccess: \"bg-success/10 text-success\",\n\t\twarning: \"bg-warning/10 text-warning\",\n\t};\n\n\treturn (\n\t\t<span\n\t\t\tclassName={`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${colorClasses[color] ?? colorClasses.default} ${className ?? \"\"}`}\n\t\t>\n\t\t\t{text}\n\t\t</span>\n\t);\n}\n\n// ============================================================================\n// Component Registry\n// ============================================================================\n\n/**\n * Component renderer registry type\n */\nexport type ComponentRendererRegistry = Record<\n\tstring,\n\tReact.ComponentType<any>\n>;\n\n// ============================================================================\n// Component Renderer\n// ============================================================================\n\n/**\n * Props for ComponentRenderer\n */\nexport interface ComponentRendererProps {\n\t/** Server-defined component reference */\n\treference: ComponentReference | null | undefined;\n\t/** Component registry override (defaults to admin context registry) */\n\tregistry?: ComponentRendererRegistry;\n\t/** Fallback to render if component type not found */\n\tfallback?: React.ReactNode;\n\t/** Additional props to pass to the component */\n\tadditionalProps?: Record<string, unknown>;\n}\n\n/**\n * Renders a server-defined component reference.\n *\n * Looks up the component type in the registry and renders it with the provided props.\n * Falls back gracefully if the component type is not found.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <ComponentRenderer reference={{ type: \"icon\", props: { name: \"ph:users\" } }} />\n *\n * // With custom registry\n * <ComponentRenderer\n * reference={{ type: \"custom\", props: { value: 42 } }}\n * registry={{ custom: MyCustomComponent }}\n * />\n *\n * // With fallback\n * <ComponentRenderer\n * reference={{ type: \"unknown\", props: {} }}\n * fallback={<span>?</span>}\n * />\n * ```\n */\nexport function ComponentRenderer({\n\treference,\n\tregistry,\n\tfallback = null,\n\tadditionalProps,\n}: ComponentRendererProps): React.ReactNode {\n\tif (!reference) {\n\t\treturn fallback;\n\t}\n\n\tconst admin = useAdminStore(selectAdmin);\n\tconst contextRegistry =\n\t\t(admin?.getComponents?.() as ComponentRendererRegistry | undefined) ?? {};\n\tconst mergedRegistry = registry ?? contextRegistry;\n\tconst Component = mergedRegistry[reference.type];\n\n\tif (!Component) {\n\t\tif (process.env.NODE_ENV === \"development\") {\n\t\t\tconsole.warn(\n\t\t\t\t`[ComponentRenderer] Unknown component type: \"${reference.type}\". ` +\n\t\t\t\t\t`Available types: ${Object.keys(mergedRegistry).join(\", \")}`,\n\t\t\t);\n\t\t}\n\t\treturn fallback;\n\t}\n\n\treturn <Component {...reference.props} {...additionalProps} />;\n}\n\n// ============================================================================\n// Utility Functions\n// ============================================================================\n\n/**\n * Check if a value is a component reference\n */\nexport function isComponentReference(\n\tvalue: unknown,\n): value is ComponentReference {\n\treturn (\n\t\ttypeof value === \"object\" &&\n\t\tvalue !== null &&\n\t\t\"type\" in value &&\n\t\t\"props\" in value &&\n\t\ttypeof (value as any).type === \"string\" &&\n\t\ttypeof (value as any).props === \"object\"\n\t);\n}\n\n/**\n * Resolve an icon to a React element.\n * Handles both ComponentReference objects and direct React components.\n *\n * @param icon - Icon to resolve (ComponentReference, React component, or undefined)\n * @param props - Additional props to pass to the icon\n * @returns React element or null\n */\nexport function resolveIconElement(\n\ticon:\n\t\t| ComponentReference\n\t\t| React.ComponentType<any>\n\t\t| string\n\t\t| undefined\n\t\t| null,\n\tprops?: Record<string, unknown>,\n\tregistry?: ComponentRendererRegistry,\n): React.ReactNode {\n\tif (!icon) {\n\t\treturn null;\n\t}\n\n\t// Handle ComponentReference\n\tif (isComponentReference(icon)) {\n\t\treturn (\n\t\t\t<ComponentRenderer\n\t\t\t\treference={icon}\n\t\t\t\tadditionalProps={props}\n\t\t\t\tregistry={registry}\n\t\t\t/>\n\t\t);\n\t}\n\n\t// Handle legacy string icon names by treating them as icon component references\n\tif (typeof icon === \"string\") {\n\t\treturn (\n\t\t\t<ComponentRenderer\n\t\t\t\treference={{ type: \"icon\", props: { name: icon } }}\n\t\t\t\tadditionalProps={props}\n\t\t\t\tregistry={registry}\n\t\t\t/>\n\t\t);\n\t}\n\n\t// Handle React component\n\tif (typeof icon === \"function\") {\n\t\tconst IconComponent = icon;\n\t\treturn <IconComponent {...props} />;\n\t}\n\n\t// Handle object that might be a React element\n\tif (typeof icon === \"object\" && React.isValidElement(icon)) {\n\t\treturn icon;\n\t}\n\n\treturn null;\n}\n\n/**\n * Create a render function for icons.\n * Useful for rendering icons in table cells or list items.\n *\n * @param registry - Custom component registry\n * @returns Function that renders an icon from a ComponentReference\n */\nexport function createIconRenderer(registry?: ComponentRendererRegistry) {\n\treturn (\n\t\ticon:\n\t\t\t| ComponentReference\n\t\t\t| React.ComponentType<any>\n\t\t\t| string\n\t\t\t| undefined\n\t\t\t| null,\n\t\tprops?: Record<string, unknown>,\n\t): React.ReactNode => {\n\t\tif (!icon) return null;\n\n\t\treturn resolveIconElement(icon, props, registry);\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,SAAgB,YAAY,EAC3B,MACA,MACA,WACA,SACwC;AACxC,QACC,oBAAC;EACA,MAAM;EACN,OAAO;EACP,QAAQ;EACG;EACJ;GACN;;;;;AA6BJ,SAAgB,MAAM,EACrB,MACA,QAAQ,WACR,aACkC;CAClC,MAAMA,eAAuC;EAC5C,SAAS;EACT,SAAS;EACT,WAAW;EACX,aAAa;EACb,SAAS;EACT,SAAS;EACT;AAED,QACC,oBAAC;EACA,WAAW,yEAAyE,aAAa,UAAU,aAAa,QAAQ,GAAG,aAAa;YAE/I;GACK;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DT,SAAgB,kBAAkB,EACjC,WACA,UACA,WAAW,MACX,mBAC2C;AAC3C,KAAI,CAAC,UACJ,QAAO;CAIR,MAAM,kBADQ,cAAc,YAAY,EAE/B,iBAAiB,IAA8C,EAAE;CAC1E,MAAM,iBAAiB,YAAY;CACnC,MAAM,YAAY,eAAe,UAAU;AAE3C,KAAI,CAAC,WAAW;AACf,MAAI,QAAQ,IAAI,aAAa,cAC5B,SAAQ,KACP,gDAAgD,UAAU,KAAK,sBAC1C,OAAO,KAAK,eAAe,CAAC,KAAK,KAAK,GAC3D;AAEF,SAAO;;AAGR,QAAO,oBAAC;EAAU,GAAI,UAAU;EAAO,GAAI;GAAmB;;;;;AAU/D,SAAgB,qBACf,OAC8B;AAC9B,QACC,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,WAAW,SACX,OAAQ,MAAc,SAAS,YAC/B,OAAQ,MAAc,UAAU;;;;;;;;;;AAYlC,SAAgB,mBACf,MAMA,OACA,UACkB;AAClB,KAAI,CAAC,KACJ,QAAO;AAIR,KAAI,qBAAqB,KAAK,CAC7B,QACC,oBAAC;EACA,WAAW;EACX,iBAAiB;EACP;GACT;AAKJ,KAAI,OAAO,SAAS,SACnB,QACC,oBAAC;EACA,WAAW;GAAE,MAAM;GAAQ,OAAO,EAAE,MAAM,MAAM;GAAE;EAClD,iBAAiB;EACP;GACT;AAKJ,KAAI,OAAO,SAAS,WAEnB,QAAO,oBADe,QACA,GAAI,QAAS;AAIpC,KAAI,OAAO,SAAS,YAAYC,QAAM,eAAe,KAAK,CACzD,QAAO;AAGR,QAAO;;;;;;;;;AAUR,SAAgB,mBAAmB,UAAsC;AACxE,SACC,MAMA,UACqB;AACrB,MAAI,CAAC,KAAM,QAAO;AAElB,SAAO,mBAAmB,MAAM,OAAO,SAAS"}