@questpie/admin 1.1.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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-D1DqawtP.d.mts +0 -13403
  937. package/dist/client-D1DqawtP.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-B4H3amCD.d.mts +0 -2753
  950. package/dist/index-B4H3amCD.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,497 @@
1
+ import { useResolveText, useTranslation } from "../../i18n/hooks.mjs";
2
+ import { selectClient, useAdminStore } from "../../runtime/provider.mjs";
3
+ import { Button } from "../ui/button.mjs";
4
+ import { sanitizeFilename, useResolvedControl } from "./field-utils.mjs";
5
+ import { useCollectionItem } from "../../hooks/use-collection.mjs";
6
+ import { useUploadCollection } from "../../hooks/use-upload-collection.mjs";
7
+ import { useUpload } from "../../hooks/use-upload.mjs";
8
+ import { ResourceSheet } from "../sheets/resource-sheet.mjs";
9
+ import { FieldWrapper } from "./field-wrapper.mjs";
10
+ import { AssetPreview } from "../primitives/asset-preview.mjs";
11
+ import { MediaPickerDialog } from "../media/media-picker-dialog.mjs";
12
+ import { Dropzone } from "../primitives/dropzone.mjs";
13
+ import { Icon } from "@iconify/react";
14
+ import * as React$1 from "react";
15
+ import { Controller } from "react-hook-form";
16
+ import { toast } from "sonner";
17
+ import { jsx, jsxs } from "react/jsx-runtime";
18
+ import { DndContext, KeyboardSensor, PointerSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
19
+ import { SortableContext, arrayMove, rectSortingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
20
+ import { CSS } from "@dnd-kit/utilities";
21
+
22
+ //#region src/client/components/fields/upload-field.tsx
23
+ /**
24
+ * UploadField Component
25
+ *
26
+ * Unified file upload field supporting both single and multiple uploads.
27
+ * - Single mode (default): Value is asset ID (string | null)
28
+ * - Multiple mode: Value is array of asset IDs (string[])
29
+ *
30
+ * @example Single upload
31
+ * ```tsx
32
+ * <UploadField
33
+ * name="featuredImage"
34
+ * label="Featured Image"
35
+ * accept={["image/*"]}
36
+ * maxSize={5_000_000}
37
+ * />
38
+ * ```
39
+ *
40
+ * @example Multiple uploads
41
+ * ```tsx
42
+ * <UploadField
43
+ * name="gallery"
44
+ * label="Gallery"
45
+ * multiple
46
+ * accept={["image/*"]}
47
+ * maxItems={10}
48
+ * orderable
49
+ * />
50
+ * ```
51
+ */
52
+ /**
53
+ * Normalize accept to always be an array.
54
+ * Supports both string and array formats from field configs.
55
+ */
56
+ function normalizeAccept(accept) {
57
+ if (!accept) return void 0;
58
+ if (Array.isArray(accept)) return accept;
59
+ return [accept];
60
+ }
61
+ function SortableAssetItem({ id, asset, loading, progress, disabled, variant, orderable, editable, href, onRemove, onEdit }) {
62
+ const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id });
63
+ return /* @__PURE__ */ jsx("div", {
64
+ ref: setNodeRef,
65
+ style: {
66
+ transform: CSS.Transform.toString(transform),
67
+ transition
68
+ },
69
+ className: isDragging ? "opacity-50" : "",
70
+ children: /* @__PURE__ */ jsx(AssetPreview, {
71
+ asset: asset || { id },
72
+ loading,
73
+ progress,
74
+ disabled,
75
+ variant,
76
+ showDragHandle: orderable && !disabled,
77
+ dragHandleProps: orderable ? {
78
+ ...attributes,
79
+ ...listeners
80
+ } : void 0,
81
+ href,
82
+ onRemove: disabled ? void 0 : onRemove,
83
+ onEdit: editable && !disabled ? onEdit : void 0
84
+ })
85
+ });
86
+ }
87
+ function SingleUploadInner({ field, error, collection, unresolvedCollectionMessage, accept, maxSize, showPreview, editable, previewVariant, disabled, placeholder, onUploadStart, onUploadComplete, onUploadError, className }) {
88
+ const normalizedAccept = normalizeAccept(accept);
89
+ const { t } = useTranslation();
90
+ const resolveText = useResolveText();
91
+ const resolvedPlaceholder = placeholder ? resolveText(placeholder) : void 0;
92
+ const { upload, isUploading, progress, error: uploadError } = useUpload();
93
+ const [isPickerOpen, setIsPickerOpen] = React$1.useState(false);
94
+ const [isEditSheetOpen, setIsEditSheetOpen] = React$1.useState(false);
95
+ const assetId = field.value;
96
+ const { data: asset, isLoading: isLoadingAsset } = useCollectionItem(collection, assetId || "", void 0, { enabled: !!collection && !!assetId && showPreview });
97
+ const handleDrop = async (files) => {
98
+ if (files.length === 0 || disabled) return;
99
+ if (!collection) {
100
+ toast.error(unresolvedCollectionMessage || "No upload collection is configured.");
101
+ return;
102
+ }
103
+ const originalFile = files[0];
104
+ const sanitizedName = sanitizeFilename(originalFile.name);
105
+ const file = new File([originalFile], sanitizedName, { type: originalFile.type });
106
+ try {
107
+ onUploadStart?.();
108
+ const uploadedAsset = await upload(file, { to: collection });
109
+ field.onChange(uploadedAsset.id);
110
+ onUploadComplete?.(uploadedAsset);
111
+ } catch (err) {
112
+ const uploadErr = err instanceof Error ? err : new Error(t("upload.error"));
113
+ onUploadError?.(uploadErr);
114
+ toast.error(uploadErr.message);
115
+ }
116
+ };
117
+ const handleRemove = () => {
118
+ field.onChange(null);
119
+ };
120
+ const handleEdit = () => {
121
+ if (assetId) setIsEditSheetOpen(true);
122
+ };
123
+ const handleValidationError = (errors) => {
124
+ for (const validationError of errors) toast.error(validationError.message);
125
+ };
126
+ const hintText = React$1.useMemo(() => {
127
+ const parts = [];
128
+ if (normalizedAccept?.length) {
129
+ const types = normalizedAccept.map((t$1) => {
130
+ if (t$1.startsWith("image/")) return "Images";
131
+ if (t$1.startsWith("video/")) return "Videos";
132
+ if (t$1.startsWith("audio/")) return "Audio";
133
+ if (t$1 === "application/pdf") return "PDF";
134
+ return t$1;
135
+ }).filter((v, i, a) => a.indexOf(v) === i);
136
+ parts.push(types.join(", "));
137
+ }
138
+ if (maxSize) {
139
+ const mb = (maxSize / (1024 * 1024)).toFixed(0);
140
+ parts.push(`Max ${mb}MB`);
141
+ }
142
+ return parts.join(" • ") || void 0;
143
+ }, [normalizedAccept, maxSize]);
144
+ const hasValue = !!assetId;
145
+ const isLoading = isUploading || hasValue && isLoadingAsset;
146
+ const handlePickerSelect = (id) => {
147
+ if (typeof id === "string") field.onChange(id);
148
+ };
149
+ return /* @__PURE__ */ jsxs("div", {
150
+ className,
151
+ children: [
152
+ unresolvedCollectionMessage && /* @__PURE__ */ jsx("p", {
153
+ className: "mb-2 rounded-md border border-warning/40 bg-warning/5 px-3 py-2 text-xs text-warning",
154
+ children: unresolvedCollectionMessage
155
+ }),
156
+ hasValue && showPreview && asset ? /* @__PURE__ */ jsx(AssetPreview, {
157
+ asset,
158
+ loading: isLoading,
159
+ progress: isUploading ? progress : void 0,
160
+ disabled,
161
+ variant: previewVariant,
162
+ onRemove: disabled ? void 0 : handleRemove,
163
+ onEdit: editable && !disabled ? handleEdit : void 0
164
+ }) : hasValue && showPreview && isLoadingAsset ? /* @__PURE__ */ jsx(AssetPreview, {
165
+ asset: { id: assetId },
166
+ loading: true,
167
+ disabled,
168
+ variant: previewVariant
169
+ }) : /* @__PURE__ */ jsx(Dropzone, {
170
+ onDrop: handleDrop,
171
+ accept: normalizedAccept,
172
+ maxSize,
173
+ multiple: false,
174
+ disabled,
175
+ loading: isUploading,
176
+ progress: isUploading ? progress : void 0,
177
+ label: resolvedPlaceholder || "Drop file here or click to browse",
178
+ hint: hintText,
179
+ onValidationError: handleValidationError
180
+ }),
181
+ !hasValue && !isUploading && !disabled && !!collection && /* @__PURE__ */ jsxs(Button, {
182
+ type: "button",
183
+ variant: "outline",
184
+ size: "sm",
185
+ onClick: () => setIsPickerOpen(true),
186
+ className: "mt-2 w-full",
187
+ children: [/* @__PURE__ */ jsx(Icon, {
188
+ icon: "ph:folder-open-bold",
189
+ className: "mr-2 size-4"
190
+ }), "Browse Library"]
191
+ }),
192
+ /* @__PURE__ */ jsx(MediaPickerDialog, {
193
+ open: isPickerOpen,
194
+ onOpenChange: setIsPickerOpen,
195
+ mode: "single",
196
+ accept: normalizedAccept,
197
+ onSelect: handlePickerSelect,
198
+ collection: collection || void 0
199
+ }),
200
+ assetId && !!collection && /* @__PURE__ */ jsx(ResourceSheet, {
201
+ type: "collection",
202
+ collection,
203
+ itemId: assetId,
204
+ open: isEditSheetOpen,
205
+ onOpenChange: setIsEditSheetOpen
206
+ }),
207
+ error && /* @__PURE__ */ jsx("p", {
208
+ className: "text-destructive mt-1 text-xs",
209
+ children: error
210
+ })
211
+ ]
212
+ });
213
+ }
214
+ function MultipleUploadInner({ field, collection, unresolvedCollectionMessage, accept, maxSize, maxItems, orderable, layout, editable, disabled, placeholder, onUploadStart, onUploadComplete, onUploadError, className }) {
215
+ const normalizedAccept = normalizeAccept(accept);
216
+ const { t } = useTranslation();
217
+ const resolveText = useResolveText();
218
+ const resolvedPlaceholder = placeholder ? resolveText(placeholder) : void 0;
219
+ const { uploadMany, isUploading, progress } = useUpload();
220
+ const client = useAdminStore(selectClient);
221
+ const [isPickerOpen, setIsPickerOpen] = React$1.useState(false);
222
+ const [editAssetId, setEditAssetId] = React$1.useState(null);
223
+ const [pendingUploads, setPendingUploads] = React$1.useState([]);
224
+ const [fetchedAssets, setFetchedAssets] = React$1.useState(() => /* @__PURE__ */ new Map());
225
+ const sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }));
226
+ const assetIds = field.value || [];
227
+ React$1.useEffect(() => {
228
+ if (!client || !collection || assetIds.length === 0) return;
229
+ const missingIds = assetIds.filter((id) => !fetchedAssets.has(id));
230
+ if (missingIds.length === 0) return;
231
+ let cancelled = false;
232
+ (async () => {
233
+ for (const id of missingIds) {
234
+ if (cancelled) return;
235
+ try {
236
+ const response = await client.collections[collection].findOne({ where: { id } });
237
+ if (!cancelled && response) setFetchedAssets((prev) => new Map(prev).set(id, response));
238
+ } catch (fetchError) {
239
+ if (!cancelled) {
240
+ console.error("Failed to fetch asset:", fetchError);
241
+ toast.error("Failed to load asset");
242
+ }
243
+ }
244
+ }
245
+ })();
246
+ return () => {
247
+ cancelled = true;
248
+ };
249
+ }, [
250
+ assetIds,
251
+ collection,
252
+ fetchedAssets,
253
+ client
254
+ ]);
255
+ const handleDrop = async (files) => {
256
+ if (files.length === 0 || disabled) return;
257
+ if (!collection) {
258
+ toast.error(unresolvedCollectionMessage || "No upload collection is configured.");
259
+ return;
260
+ }
261
+ const remainingSlots = maxItems ? maxItems - assetIds.length : files.length;
262
+ const filesToUpload = files.slice(0, remainingSlots);
263
+ if (filesToUpload.length < files.length) toast.warning(t("toast.maxFilesWarning", {
264
+ remaining: remainingSlots,
265
+ max: maxItems
266
+ }));
267
+ if (filesToUpload.length === 0) return;
268
+ const sanitizedFiles = filesToUpload.map((file) => {
269
+ const sanitizedName = sanitizeFilename(file.name);
270
+ return new File([file], sanitizedName, { type: file.type });
271
+ });
272
+ setPendingUploads(sanitizedFiles.map((file, index) => ({
273
+ id: `pending-${Date.now()}-${index}`,
274
+ file
275
+ })));
276
+ try {
277
+ onUploadStart?.();
278
+ const uploadedAssets = await uploadMany(sanitizedFiles, { to: collection });
279
+ const newIds = uploadedAssets.map((a) => a.id);
280
+ field.onChange([...assetIds, ...newIds]);
281
+ for (const asset of uploadedAssets) setFetchedAssets((prev) => new Map(prev).set(asset.id, asset));
282
+ onUploadComplete?.(uploadedAssets);
283
+ } catch (err) {
284
+ const uploadError = err instanceof Error ? err : new Error(t("upload.error"));
285
+ onUploadError?.(uploadError);
286
+ toast.error(uploadError.message);
287
+ } finally {
288
+ setPendingUploads([]);
289
+ }
290
+ };
291
+ const handleRemove = (idToRemove) => {
292
+ field.onChange(assetIds.filter((id) => id !== idToRemove));
293
+ };
294
+ const handleEdit = (id) => {
295
+ setEditAssetId(id);
296
+ };
297
+ const handleDragEnd = (event) => {
298
+ const { active, over } = event;
299
+ if (over && active.id !== over.id) {
300
+ const oldIndex = assetIds.indexOf(active.id);
301
+ const newIndex = assetIds.indexOf(over.id);
302
+ if (oldIndex !== -1 && newIndex !== -1) {
303
+ const reordered = arrayMove(assetIds, oldIndex, newIndex);
304
+ field.onChange(reordered);
305
+ }
306
+ }
307
+ };
308
+ const handleValidationError = (errors) => {
309
+ for (const validationError of errors) toast.error(validationError.message);
310
+ };
311
+ const handlePickerSelect = (ids) => {
312
+ if (!collection) {
313
+ toast.error(unresolvedCollectionMessage || "No upload collection is configured.");
314
+ return;
315
+ }
316
+ const newIds = Array.isArray(ids) ? ids : [ids];
317
+ const totalAfterAdd = assetIds.length + newIds.length;
318
+ if (maxItems && totalAfterAdd > maxItems) {
319
+ toast.warning(`Maximum ${maxItems} items allowed`);
320
+ const remainingSlots = maxItems - assetIds.length;
321
+ const idsToAdd = newIds.slice(0, remainingSlots);
322
+ field.onChange([...assetIds, ...idsToAdd]);
323
+ } else field.onChange([...assetIds, ...newIds]);
324
+ };
325
+ const hintText = React$1.useMemo(() => {
326
+ const parts = [];
327
+ if (normalizedAccept?.length) {
328
+ const types = normalizedAccept.map((t$1) => {
329
+ if (t$1.startsWith("image/")) return "Images";
330
+ if (t$1.startsWith("video/")) return "Videos";
331
+ if (t$1.startsWith("audio/")) return "Audio";
332
+ if (t$1 === "application/pdf") return "PDF";
333
+ return t$1;
334
+ }).filter((v, i, a) => a.indexOf(v) === i);
335
+ parts.push(types.join(", "));
336
+ }
337
+ if (maxSize) {
338
+ const mb = (maxSize / (1024 * 1024)).toFixed(0);
339
+ parts.push(`Max ${mb}MB`);
340
+ }
341
+ return parts.join(" • ") || void 0;
342
+ }, [normalizedAccept, maxSize]);
343
+ const hasItems = assetIds.length > 0 || pendingUploads.length > 0;
344
+ const canAddMore = !maxItems || assetIds.length < maxItems;
345
+ const previewVariant = layout === "grid" ? "thumbnail" : "compact";
346
+ return /* @__PURE__ */ jsxs("div", {
347
+ className,
348
+ children: [
349
+ unresolvedCollectionMessage && /* @__PURE__ */ jsx("p", {
350
+ className: "mb-2 rounded-md border border-warning/40 bg-warning/5 px-3 py-2 text-xs text-warning",
351
+ children: unresolvedCollectionMessage
352
+ }),
353
+ hasItems && /* @__PURE__ */ jsx(DndContext, {
354
+ sensors,
355
+ collisionDetection: closestCenter,
356
+ onDragEnd: handleDragEnd,
357
+ children: /* @__PURE__ */ jsx(SortableContext, {
358
+ items: assetIds,
359
+ strategy: layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy,
360
+ disabled: !orderable,
361
+ children: /* @__PURE__ */ jsxs("div", {
362
+ className: layout === "grid" ? "mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 md:grid-cols-4" : "mb-3 space-y-2",
363
+ children: [assetIds.map((id) => /* @__PURE__ */ jsx(SortableAssetItem, {
364
+ id,
365
+ asset: fetchedAssets.get(id) || null,
366
+ disabled,
367
+ variant: previewVariant,
368
+ orderable,
369
+ editable,
370
+ onRemove: () => handleRemove(id),
371
+ onEdit: () => handleEdit(id)
372
+ }, id)), pendingUploads.map((pending, index) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AssetPreview, {
373
+ asset: { filename: pending.file.name },
374
+ pendingFile: pending.file,
375
+ loading: true,
376
+ progress: Math.min(100, Math.max(0, progress - index / pendingUploads.length * 100) * (pendingUploads.length / (pendingUploads.length - index))),
377
+ disabled: true,
378
+ variant: previewVariant
379
+ }) }, pending.id))]
380
+ })
381
+ })
382
+ }),
383
+ canAddMore && !isUploading && !!collection && /* @__PURE__ */ jsx(Dropzone, {
384
+ onDrop: handleDrop,
385
+ accept: normalizedAccept,
386
+ maxSize,
387
+ multiple: true,
388
+ disabled,
389
+ loading: isUploading,
390
+ progress: isUploading ? progress : void 0,
391
+ label: hasItems ? "Drop more files or click to add" : resolvedPlaceholder || "Drop files here or click to browse",
392
+ hint: hintText,
393
+ onValidationError: handleValidationError,
394
+ className: hasItems ? "min-h-[80px]" : void 0
395
+ }),
396
+ canAddMore && !isUploading && !disabled && !!collection && /* @__PURE__ */ jsxs(Button, {
397
+ type: "button",
398
+ variant: "outline",
399
+ size: "sm",
400
+ onClick: () => setIsPickerOpen(true),
401
+ className: "mt-2 w-full",
402
+ children: [/* @__PURE__ */ jsx(Icon, {
403
+ icon: "ph:folder-open-bold",
404
+ className: "mr-2 size-4"
405
+ }), "Browse Library"]
406
+ }),
407
+ /* @__PURE__ */ jsx(MediaPickerDialog, {
408
+ open: isPickerOpen,
409
+ onOpenChange: setIsPickerOpen,
410
+ mode: "multiple",
411
+ accept: normalizedAccept,
412
+ onSelect: handlePickerSelect,
413
+ maxItems: maxItems ? maxItems - assetIds.length : void 0,
414
+ collection: collection || void 0
415
+ }),
416
+ editAssetId && !!collection && /* @__PURE__ */ jsx(ResourceSheet, {
417
+ type: "collection",
418
+ collection,
419
+ itemId: editAssetId,
420
+ open: !!editAssetId,
421
+ onOpenChange: (open) => !open && setEditAssetId(null)
422
+ }),
423
+ isUploading && !canAddMore && /* @__PURE__ */ jsxs("div", {
424
+ className: "text-muted-foreground flex items-center justify-center gap-2 rounded-lg border border-dashed p-4 text-sm",
425
+ children: [
426
+ "Uploading... ",
427
+ progress,
428
+ "%"
429
+ ]
430
+ })
431
+ ]
432
+ });
433
+ }
434
+ function UploadField({ name, label, description, placeholder, required, disabled, localized, locale, control, className, to, accept, maxSize, showPreview = true, editable = true, previewVariant, onUploadStart, onUploadComplete, onUploadError, multiple = false, maxItems, orderable = false, layout = "grid" }) {
435
+ const resolveText = useResolveText();
436
+ const resolvedControl = useResolvedControl(control);
437
+ const { collection: resolvedUploadCollection, collections: availableUploadCollections } = useUploadCollection(to);
438
+ const collection = resolvedUploadCollection || "";
439
+ const unresolvedCollectionMessage = !resolvedUploadCollection ? availableUploadCollections.length > 1 ? `Multiple upload collections are available (${availableUploadCollections.join(", ")}). Configure the field with \`to\` to choose one.` : "No upload collection is configured for this field." : void 0;
440
+ const fieldDisabled = disabled || !!unresolvedCollectionMessage;
441
+ const effectivePreviewVariant = previewVariant ?? (multiple ? layout === "grid" ? "thumbnail" : "compact" : "card");
442
+ return /* @__PURE__ */ jsx(Controller, {
443
+ name,
444
+ control: resolvedControl,
445
+ render: ({ field, fieldState }) => {
446
+ const assetIds = multiple ? field.value || [] : [];
447
+ return /* @__PURE__ */ jsx(FieldWrapper, {
448
+ name,
449
+ label: multiple && label && maxItems ? `${resolveText(label)} (${assetIds.length}/${maxItems})` : label ? resolveText(label) : void 0,
450
+ description,
451
+ required,
452
+ disabled: fieldDisabled,
453
+ localized,
454
+ locale,
455
+ error: fieldState.error?.message,
456
+ children: multiple ? /* @__PURE__ */ jsx(MultipleUploadInner, {
457
+ field,
458
+ error: fieldState.error?.message,
459
+ collection,
460
+ unresolvedCollectionMessage,
461
+ accept,
462
+ maxSize,
463
+ maxItems,
464
+ orderable,
465
+ layout,
466
+ editable,
467
+ disabled: fieldDisabled,
468
+ placeholder,
469
+ onUploadStart,
470
+ onUploadComplete,
471
+ onUploadError,
472
+ className
473
+ }) : /* @__PURE__ */ jsx(SingleUploadInner, {
474
+ field,
475
+ error: fieldState.error?.message,
476
+ collection,
477
+ unresolvedCollectionMessage,
478
+ accept,
479
+ maxSize,
480
+ showPreview,
481
+ editable,
482
+ previewVariant: effectivePreviewVariant,
483
+ disabled: fieldDisabled,
484
+ placeholder,
485
+ onUploadStart,
486
+ onUploadComplete,
487
+ onUploadError,
488
+ className
489
+ })
490
+ });
491
+ }
492
+ });
493
+ }
494
+
495
+ //#endregion
496
+ export { UploadField };
497
+ //# sourceMappingURL=upload-field.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload-field.mjs","names":["React","parts: string[]","t"],"sources":["../../../../src/client/components/fields/upload-field.tsx"],"sourcesContent":["/**\n * UploadField Component\n *\n * Unified file upload field supporting both single and multiple uploads.\n * - Single mode (default): Value is asset ID (string | null)\n * - Multiple mode: Value is array of asset IDs (string[])\n *\n * @example Single upload\n * ```tsx\n * <UploadField\n * name=\"featuredImage\"\n * label=\"Featured Image\"\n * accept={[\"image/*\"]}\n * maxSize={5_000_000}\n * />\n * ```\n *\n * @example Multiple uploads\n * ```tsx\n * <UploadField\n * name=\"gallery\"\n * label=\"Gallery\"\n * multiple\n * accept={[\"image/*\"]}\n * maxItems={10}\n * orderable\n * />\n * ```\n */\n\nimport {\n\tclosestCenter,\n\tDndContext,\n\ttype DragEndEvent,\n\tKeyboardSensor,\n\tPointerSensor,\n\tuseSensor,\n\tuseSensors,\n} from \"@dnd-kit/core\";\nimport {\n\tarrayMove,\n\trectSortingStrategy,\n\tSortableContext,\n\tsortableKeyboardCoordinates,\n\tuseSortable,\n\tverticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { Icon } from \"@iconify/react\";\nimport * as React from \"react\";\nimport {\n\tController,\n\ttype ControllerRenderProps,\n\ttype FieldValues,\n} from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { useCollectionItem } from \"../../hooks/use-collection\";\nimport { type Asset, useUpload } from \"../../hooks/use-upload\";\nimport { useUploadCollection } from \"../../hooks/use-upload-collection\";\nimport { useResolveText, useTranslation } from \"../../i18n/hooks\";\nimport { selectClient, useAdminStore } from \"../../runtime\";\nimport { MediaPickerDialog } from \"../media/media-picker-dialog\";\nimport { AssetPreview } from \"../primitives/asset-preview\";\nimport { Dropzone } from \"../primitives/dropzone\";\nimport { ResourceSheet } from \"../sheets\";\nimport { Button } from \"../ui/button\";\nimport type { BaseFieldProps } from \"./field-types\";\nimport { sanitizeFilename, useResolvedControl } from \"./field-utils\";\nimport { FieldWrapper } from \"./field-wrapper\";\n\n// ============================================================================\n// Helpers\n// ============================================================================\n\n/**\n * Normalize accept to always be an array.\n * Supports both string and array formats from field configs.\n */\nfunction normalizeAccept(\n\taccept: string | string[] | undefined,\n): string[] | undefined {\n\tif (!accept) return undefined;\n\tif (Array.isArray(accept)) return accept;\n\treturn [accept];\n}\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport interface UploadFieldProps extends BaseFieldProps {\n\t/**\n\t * Target collection for uploads\n\t */\n\tto?: string;\n\n\t/**\n\t * Accepted file types (MIME types or extensions)\n\t * @example [\"image/*\", \"application/pdf\"]\n\t * @example \"image/*\"\n\t */\n\taccept?: string | string[];\n\n\t/**\n\t * Maximum file size in bytes\n\t */\n\tmaxSize?: number;\n\n\t/**\n\t * Show image preview for uploaded files\n\t * @default true\n\t */\n\tshowPreview?: boolean;\n\n\t/**\n\t * Allow editing alt/caption (opens edit dialog)\n\t * @default true\n\t */\n\teditable?: boolean;\n\n\t/**\n\t * Preview variant\n\t * @default \"card\" for single, \"thumbnail\" for multiple grid\n\t */\n\tpreviewVariant?: \"card\" | \"compact\" | \"thumbnail\";\n\n\t/**\n\t * Callback when upload starts\n\t */\n\tonUploadStart?: () => void;\n\n\t/**\n\t * Callback when upload completes\n\t */\n\tonUploadComplete?: (asset: Asset | Asset[]) => void;\n\n\t/**\n\t * Callback when upload fails\n\t */\n\tonUploadError?: (error: Error) => void;\n\n\t// ── Multiple upload options ──────────────────────────────────────────────\n\n\t/**\n\t * Enable multiple file uploads.\n\t * When true, field value is an array of asset IDs.\n\t * @default false\n\t */\n\tmultiple?: boolean;\n\n\t/**\n\t * Maximum number of files (only when multiple: true)\n\t */\n\tmaxItems?: number;\n\n\t/**\n\t * Enable drag-and-drop reordering (only when multiple: true)\n\t * @default false\n\t */\n\torderable?: boolean;\n\n\t/**\n\t * Layout for previews (only when multiple: true)\n\t * @default \"grid\"\n\t */\n\tlayout?: \"grid\" | \"list\";\n}\n\n// ============================================================================\n// Sortable Item Component (for multiple mode)\n// ============================================================================\n\ninterface SortableAssetItemProps {\n\tid: string;\n\tasset: Asset | null;\n\tloading?: boolean;\n\tprogress?: number;\n\tdisabled?: boolean;\n\tvariant: \"compact\" | \"thumbnail\";\n\torderable?: boolean;\n\teditable?: boolean;\n\thref?: string;\n\tonRemove?: () => void;\n\tonEdit?: () => void;\n}\n\nfunction SortableAssetItem({\n\tid,\n\tasset,\n\tloading,\n\tprogress,\n\tdisabled,\n\tvariant,\n\torderable,\n\teditable,\n\thref,\n\tonRemove,\n\tonEdit,\n}: SortableAssetItemProps) {\n\tconst {\n\t\tattributes,\n\t\tlisteners,\n\t\tsetNodeRef,\n\t\ttransform,\n\t\ttransition,\n\t\tisDragging,\n\t} = useSortable({ id });\n\n\tconst style = {\n\t\ttransform: CSS.Transform.toString(transform),\n\t\ttransition,\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tref={setNodeRef}\n\t\t\tstyle={style}\n\t\t\tclassName={isDragging ? \"opacity-50\" : \"\"}\n\t\t>\n\t\t\t<AssetPreview\n\t\t\t\tasset={asset || { id }}\n\t\t\t\tloading={loading}\n\t\t\t\tprogress={progress}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tvariant={variant}\n\t\t\t\tshowDragHandle={orderable && !disabled}\n\t\t\t\tdragHandleProps={\n\t\t\t\t\torderable ? { ...attributes, ...listeners } : undefined\n\t\t\t\t}\n\t\t\t\thref={href}\n\t\t\t\tonRemove={disabled ? undefined : onRemove}\n\t\t\t\tonEdit={editable && !disabled ? onEdit : undefined}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\n// ============================================================================\n// Single Upload Inner Component\n// ============================================================================\n\ninterface SingleUploadInnerProps {\n\tfield: ControllerRenderProps<FieldValues, string>;\n\terror?: string;\n\tcollection: string;\n\tunresolvedCollectionMessage?: string;\n\taccept?: string | string[];\n\tmaxSize?: number;\n\tshowPreview: boolean;\n\teditable: boolean;\n\tpreviewVariant: \"card\" | \"compact\" | \"thumbnail\";\n\tdisabled?: boolean;\n\tplaceholder?: string;\n\tonUploadStart?: () => void;\n\tonUploadComplete?: (asset: Asset) => void;\n\tonUploadError?: (error: Error) => void;\n\tclassName?: string;\n}\n\nfunction SingleUploadInner({\n\tfield,\n\terror,\n\tcollection,\n\tunresolvedCollectionMessage,\n\taccept,\n\tmaxSize,\n\tshowPreview,\n\teditable,\n\tpreviewVariant,\n\tdisabled,\n\tplaceholder,\n\tonUploadStart,\n\tonUploadComplete,\n\tonUploadError,\n\tclassName,\n}: SingleUploadInnerProps) {\n\t// Normalize accept to always be an array (supports both string and array from field config)\n\tconst normalizedAccept = normalizeAccept(accept);\n\n\tconst { t } = useTranslation();\n\tconst resolveText = useResolveText();\n\tconst resolvedPlaceholder = placeholder\n\t\t? resolveText(placeholder)\n\t\t: undefined;\n\tconst { upload, isUploading, progress, error: uploadError } = useUpload();\n\tconst [isPickerOpen, setIsPickerOpen] = React.useState(false);\n\tconst [isEditSheetOpen, setIsEditSheetOpen] = React.useState(false);\n\n\tconst assetId = field.value as string | null | undefined;\n\n\tconst { data: asset, isLoading: isLoadingAsset } = useCollectionItem(\n\t\tcollection,\n\t\tassetId || \"\",\n\t\tundefined,\n\t\t{ enabled: !!collection && !!assetId && showPreview },\n\t);\n\n\tconst handleDrop = async (files: File[]) => {\n\t\tif (files.length === 0 || disabled) return;\n\t\tif (!collection) {\n\t\t\ttoast.error(\n\t\t\t\tunresolvedCollectionMessage || \"No upload collection is configured.\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst originalFile = files[0];\n\t\tconst sanitizedName = sanitizeFilename(originalFile.name);\n\t\tconst file = new File([originalFile], sanitizedName, {\n\t\t\ttype: originalFile.type,\n\t\t});\n\n\t\ttry {\n\t\t\tonUploadStart?.();\n\t\t\tconst uploadedAsset = await upload(file, { to: collection });\n\t\t\tfield.onChange(uploadedAsset.id);\n\t\t\tonUploadComplete?.(uploadedAsset);\n\t\t} catch (err) {\n\t\t\tconst uploadErr =\n\t\t\t\terr instanceof Error ? err : new Error(t(\"upload.error\"));\n\t\t\tonUploadError?.(uploadErr);\n\t\t\ttoast.error(uploadErr.message);\n\t\t}\n\t};\n\n\tconst handleRemove = () => {\n\t\tfield.onChange(null);\n\t};\n\n\tconst handleEdit = () => {\n\t\tif (assetId) {\n\t\t\tsetIsEditSheetOpen(true);\n\t\t}\n\t};\n\n\tconst handleValidationError = (errors: { message: string }[]) => {\n\t\tfor (const validationError of errors) {\n\t\t\ttoast.error(validationError.message);\n\t\t}\n\t};\n\n\tconst hintText = React.useMemo(() => {\n\t\tconst parts: string[] = [];\n\t\tif (normalizedAccept?.length) {\n\t\t\tconst types = normalizedAccept\n\t\t\t\t.map((t: string) => {\n\t\t\t\t\tif (t.startsWith(\"image/\")) return \"Images\";\n\t\t\t\t\tif (t.startsWith(\"video/\")) return \"Videos\";\n\t\t\t\t\tif (t.startsWith(\"audio/\")) return \"Audio\";\n\t\t\t\t\tif (t === \"application/pdf\") return \"PDF\";\n\t\t\t\t\treturn t;\n\t\t\t\t})\n\t\t\t\t.filter((v: string, i: number, a: string[]) => a.indexOf(v) === i);\n\t\t\tparts.push(types.join(\", \"));\n\t\t}\n\t\tif (maxSize) {\n\t\t\tconst mb = (maxSize / (1024 * 1024)).toFixed(0);\n\t\t\tparts.push(`Max ${mb}MB`);\n\t\t}\n\t\treturn parts.join(\" • \") || undefined;\n\t}, [normalizedAccept, maxSize]);\n\n\tconst hasValue = !!assetId;\n\tconst isLoading = isUploading || (hasValue && isLoadingAsset);\n\n\tconst handlePickerSelect = (id: string | string[]) => {\n\t\tif (typeof id === \"string\") {\n\t\t\tfield.onChange(id);\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className={className}>\n\t\t\t{unresolvedCollectionMessage && (\n\t\t\t\t<p className=\"mb-2 rounded-md border border-warning/40 bg-warning/5 px-3 py-2 text-xs text-warning\">\n\t\t\t\t\t{unresolvedCollectionMessage}\n\t\t\t\t</p>\n\t\t\t)}\n\n\t\t\t{hasValue && showPreview && asset ? (\n\t\t\t\t<AssetPreview\n\t\t\t\t\tasset={asset as Asset}\n\t\t\t\t\tloading={isLoading}\n\t\t\t\t\tprogress={isUploading ? progress : undefined}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tvariant={previewVariant}\n\t\t\t\t\tonRemove={disabled ? undefined : handleRemove}\n\t\t\t\t\tonEdit={editable && !disabled ? handleEdit : undefined}\n\t\t\t\t/>\n\t\t\t) : hasValue && showPreview && isLoadingAsset ? (\n\t\t\t\t<AssetPreview\n\t\t\t\t\tasset={{ id: assetId }}\n\t\t\t\t\tloading={true}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tvariant={previewVariant}\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<Dropzone\n\t\t\t\t\tonDrop={handleDrop}\n\t\t\t\t\taccept={normalizedAccept}\n\t\t\t\t\tmaxSize={maxSize}\n\t\t\t\t\tmultiple={false}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tloading={isUploading}\n\t\t\t\t\tprogress={isUploading ? progress : undefined}\n\t\t\t\t\tlabel={resolvedPlaceholder || \"Drop file here or click to browse\"}\n\t\t\t\t\thint={hintText}\n\t\t\t\t\tonValidationError={handleValidationError}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{!hasValue && !isUploading && !disabled && !!collection && (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tonClick={() => setIsPickerOpen(true)}\n\t\t\t\t\tclassName=\"mt-2 w-full\"\n\t\t\t\t>\n\t\t\t\t\t<Icon icon=\"ph:folder-open-bold\" className=\"mr-2 size-4\" />\n\t\t\t\t\tBrowse Library\n\t\t\t\t</Button>\n\t\t\t)}\n\n\t\t\t<MediaPickerDialog\n\t\t\t\topen={isPickerOpen}\n\t\t\t\tonOpenChange={setIsPickerOpen}\n\t\t\t\tmode=\"single\"\n\t\t\t\taccept={normalizedAccept}\n\t\t\t\tonSelect={handlePickerSelect}\n\t\t\t\tcollection={collection || undefined}\n\t\t\t/>\n\n\t\t\t{assetId && !!collection && (\n\t\t\t\t<ResourceSheet\n\t\t\t\t\ttype=\"collection\"\n\t\t\t\t\tcollection={collection}\n\t\t\t\t\titemId={assetId}\n\t\t\t\t\topen={isEditSheetOpen}\n\t\t\t\t\tonOpenChange={setIsEditSheetOpen}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{error && <p className=\"text-destructive mt-1 text-xs\">{error}</p>}\n\t\t</div>\n\t);\n}\n\n// ============================================================================\n// Multiple Upload Inner Component\n// ============================================================================\n\ninterface MultipleUploadInnerProps {\n\tfield: ControllerRenderProps<FieldValues, string>;\n\terror?: string;\n\tcollection: string;\n\tunresolvedCollectionMessage?: string;\n\taccept?: string | string[];\n\tmaxSize?: number;\n\tmaxItems?: number;\n\torderable: boolean;\n\tlayout: \"grid\" | \"list\";\n\teditable: boolean;\n\tdisabled?: boolean;\n\tplaceholder?: string;\n\tonUploadStart?: () => void;\n\tonUploadComplete?: (assets: Asset[]) => void;\n\tonUploadError?: (error: Error) => void;\n\tclassName?: string;\n}\n\nfunction MultipleUploadInner({\n\tfield,\n\tcollection,\n\tunresolvedCollectionMessage,\n\taccept,\n\tmaxSize,\n\tmaxItems,\n\torderable,\n\tlayout,\n\teditable,\n\tdisabled,\n\tplaceholder,\n\tonUploadStart,\n\tonUploadComplete,\n\tonUploadError,\n\tclassName,\n}: MultipleUploadInnerProps) {\n\t// Normalize accept to always be an array (supports both string and array from field config)\n\tconst normalizedAccept = normalizeAccept(accept);\n\n\tconst { t } = useTranslation();\n\tconst resolveText = useResolveText();\n\tconst resolvedPlaceholder = placeholder\n\t\t? resolveText(placeholder)\n\t\t: undefined;\n\tconst { uploadMany, isUploading, progress } = useUpload();\n\tconst client = useAdminStore(selectClient);\n\tconst [isPickerOpen, setIsPickerOpen] = React.useState(false);\n\tconst [editAssetId, setEditAssetId] = React.useState<string | null>(null);\n\tconst [pendingUploads, setPendingUploads] = React.useState<\n\t\t{ id: string; file: File }[]\n\t>([]);\n\tconst [fetchedAssets, setFetchedAssets] = React.useState<Map<string, Asset>>(\n\t\t() => new Map(),\n\t);\n\n\tconst sensors = useSensors(\n\t\tuseSensor(PointerSensor),\n\t\tuseSensor(KeyboardSensor, {\n\t\t\tcoordinateGetter: sortableKeyboardCoordinates,\n\t\t}),\n\t);\n\n\tconst assetIds = (field.value as string[] | null | undefined) || [];\n\n\t// Fetch assets that we don't have yet\n\tReact.useEffect(() => {\n\t\tif (!client || !collection || assetIds.length === 0) return;\n\n\t\tconst missingIds = assetIds.filter((id) => !fetchedAssets.has(id));\n\t\tif (missingIds.length === 0) return;\n\n\t\tlet cancelled = false;\n\n\t\t(async () => {\n\t\t\tfor (const id of missingIds) {\n\t\t\t\tif (cancelled) return;\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await (client as any).collections[\n\t\t\t\t\t\tcollection\n\t\t\t\t\t].findOne({ where: { id } });\n\t\t\t\t\tif (!cancelled && response) {\n\t\t\t\t\t\tsetFetchedAssets((prev) =>\n\t\t\t\t\t\t\tnew Map(prev).set(id, response as Asset),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} catch (fetchError) {\n\t\t\t\t\tif (!cancelled) {\n\t\t\t\t\t\tconsole.error(\"Failed to fetch asset:\", fetchError);\n\t\t\t\t\t\ttoast.error(\"Failed to load asset\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})();\n\n\t\treturn () => {\n\t\t\tcancelled = true;\n\t\t};\n\t}, [assetIds, collection, fetchedAssets, client]);\n\n\tconst handleDrop = async (files: File[]) => {\n\t\tif (files.length === 0 || disabled) return;\n\t\tif (!collection) {\n\t\t\ttoast.error(\n\t\t\t\tunresolvedCollectionMessage || \"No upload collection is configured.\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst remainingSlots = maxItems ? maxItems - assetIds.length : files.length;\n\t\tconst filesToUpload = files.slice(0, remainingSlots);\n\n\t\tif (filesToUpload.length < files.length) {\n\t\t\ttoast.warning(\n\t\t\t\tt(\"toast.maxFilesWarning\", {\n\t\t\t\t\tremaining: remainingSlots,\n\t\t\t\t\tmax: maxItems,\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\n\t\tif (filesToUpload.length === 0) return;\n\n\t\tconst sanitizedFiles = filesToUpload.map((file) => {\n\t\t\tconst sanitizedName = sanitizeFilename(file.name);\n\t\t\treturn new File([file], sanitizedName, { type: file.type });\n\t\t});\n\n\t\tconst pending = sanitizedFiles.map((file, index) => ({\n\t\t\tid: `pending-${Date.now()}-${index}`,\n\t\t\tfile,\n\t\t}));\n\t\tsetPendingUploads(pending);\n\n\t\ttry {\n\t\t\tonUploadStart?.();\n\t\t\tconst uploadedAssets = await uploadMany(sanitizedFiles, {\n\t\t\t\tto: collection,\n\t\t\t});\n\t\t\tconst newIds = uploadedAssets.map((a) => a.id);\n\t\t\tfield.onChange([...assetIds, ...newIds]);\n\n\t\t\tfor (const asset of uploadedAssets) {\n\t\t\t\tsetFetchedAssets((prev) => new Map(prev).set(asset.id, asset));\n\t\t\t}\n\n\t\t\tonUploadComplete?.(uploadedAssets);\n\t\t} catch (err) {\n\t\t\tconst uploadError =\n\t\t\t\terr instanceof Error ? err : new Error(t(\"upload.error\"));\n\t\t\tonUploadError?.(uploadError);\n\t\t\ttoast.error(uploadError.message);\n\t\t} finally {\n\t\t\tsetPendingUploads([]);\n\t\t}\n\t};\n\n\tconst handleRemove = (idToRemove: string) => {\n\t\tfield.onChange(assetIds.filter((id) => id !== idToRemove));\n\t};\n\n\tconst handleEdit = (id: string) => {\n\t\tsetEditAssetId(id);\n\t};\n\n\tconst handleDragEnd = (event: DragEndEvent) => {\n\t\tconst { active, over } = event;\n\n\t\tif (over && active.id !== over.id) {\n\t\t\tconst oldIndex = assetIds.indexOf(active.id as string);\n\t\t\tconst newIndex = assetIds.indexOf(over.id as string);\n\n\t\t\tif (oldIndex !== -1 && newIndex !== -1) {\n\t\t\t\tconst reordered = arrayMove(assetIds, oldIndex, newIndex);\n\t\t\t\tfield.onChange(reordered);\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleValidationError = (errors: { message: string }[]) => {\n\t\tfor (const validationError of errors) {\n\t\t\ttoast.error(validationError.message);\n\t\t}\n\t};\n\n\tconst handlePickerSelect = (ids: string | string[]) => {\n\t\tif (!collection) {\n\t\t\ttoast.error(\n\t\t\t\tunresolvedCollectionMessage || \"No upload collection is configured.\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst newIds = Array.isArray(ids) ? ids : [ids];\n\n\t\tconst totalAfterAdd = assetIds.length + newIds.length;\n\t\tif (maxItems && totalAfterAdd > maxItems) {\n\t\t\ttoast.warning(`Maximum ${maxItems} items allowed`);\n\t\t\tconst remainingSlots = maxItems - assetIds.length;\n\t\t\tconst idsToAdd = newIds.slice(0, remainingSlots);\n\t\t\tfield.onChange([...assetIds, ...idsToAdd]);\n\t\t} else {\n\t\t\tfield.onChange([...assetIds, ...newIds]);\n\t\t}\n\t};\n\n\tconst hintText = React.useMemo(() => {\n\t\tconst parts: string[] = [];\n\t\tif (normalizedAccept?.length) {\n\t\t\tconst types = normalizedAccept\n\t\t\t\t.map((t: string) => {\n\t\t\t\t\tif (t.startsWith(\"image/\")) return \"Images\";\n\t\t\t\t\tif (t.startsWith(\"video/\")) return \"Videos\";\n\t\t\t\t\tif (t.startsWith(\"audio/\")) return \"Audio\";\n\t\t\t\t\tif (t === \"application/pdf\") return \"PDF\";\n\t\t\t\t\treturn t;\n\t\t\t\t})\n\t\t\t\t.filter((v: string, i: number, a: string[]) => a.indexOf(v) === i);\n\t\t\tparts.push(types.join(\", \"));\n\t\t}\n\t\tif (maxSize) {\n\t\t\tconst mb = (maxSize / (1024 * 1024)).toFixed(0);\n\t\t\tparts.push(`Max ${mb}MB`);\n\t\t}\n\t\treturn parts.join(\" • \") || undefined;\n\t}, [normalizedAccept, maxSize]);\n\n\tconst hasItems = assetIds.length > 0 || pendingUploads.length > 0;\n\tconst canAddMore = !maxItems || assetIds.length < maxItems;\n\tconst previewVariant = layout === \"grid\" ? \"thumbnail\" : \"compact\";\n\tconst sortingStrategy =\n\t\tlayout === \"grid\" ? rectSortingStrategy : verticalListSortingStrategy;\n\n\treturn (\n\t\t<div className={className}>\n\t\t\t{unresolvedCollectionMessage && (\n\t\t\t\t<p className=\"mb-2 rounded-md border border-warning/40 bg-warning/5 px-3 py-2 text-xs text-warning\">\n\t\t\t\t\t{unresolvedCollectionMessage}\n\t\t\t\t</p>\n\t\t\t)}\n\n\t\t\t{hasItems && (\n\t\t\t\t<DndContext\n\t\t\t\t\tsensors={sensors}\n\t\t\t\t\tcollisionDetection={closestCenter}\n\t\t\t\t\tonDragEnd={handleDragEnd}\n\t\t\t\t>\n\t\t\t\t\t<SortableContext\n\t\t\t\t\t\titems={assetIds}\n\t\t\t\t\t\tstrategy={sortingStrategy}\n\t\t\t\t\t\tdisabled={!orderable}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\tlayout === \"grid\"\n\t\t\t\t\t\t\t\t\t? \"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 md:grid-cols-4\"\n\t\t\t\t\t\t\t\t\t: \"mb-3 space-y-2\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{assetIds.map((id) => (\n\t\t\t\t\t\t\t\t<SortableAssetItem\n\t\t\t\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\t\t\t\tid={id}\n\t\t\t\t\t\t\t\t\tasset={fetchedAssets.get(id) || null}\n\t\t\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\t\t\tvariant={previewVariant}\n\t\t\t\t\t\t\t\t\torderable={orderable}\n\t\t\t\t\t\t\t\t\teditable={editable}\n\t\t\t\t\t\t\t\t\tonRemove={() => handleRemove(id)}\n\t\t\t\t\t\t\t\t\tonEdit={() => handleEdit(id)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t\t{pendingUploads.map((pending, index) => (\n\t\t\t\t\t\t\t\t<div key={pending.id}>\n\t\t\t\t\t\t\t\t\t<AssetPreview\n\t\t\t\t\t\t\t\t\t\tasset={{ filename: pending.file.name }}\n\t\t\t\t\t\t\t\t\t\tpendingFile={pending.file}\n\t\t\t\t\t\t\t\t\t\tloading={true}\n\t\t\t\t\t\t\t\t\t\tprogress={Math.min(\n\t\t\t\t\t\t\t\t\t\t\t100,\n\t\t\t\t\t\t\t\t\t\t\tMath.max(\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\tprogress - (index / pendingUploads.length) * 100,\n\t\t\t\t\t\t\t\t\t\t\t) *\n\t\t\t\t\t\t\t\t\t\t\t\t(pendingUploads.length /\n\t\t\t\t\t\t\t\t\t\t\t\t\t(pendingUploads.length - index)),\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\tdisabled={true}\n\t\t\t\t\t\t\t\t\t\tvariant={previewVariant}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</SortableContext>\n\t\t\t\t</DndContext>\n\t\t\t)}\n\n\t\t\t{canAddMore && !isUploading && !!collection && (\n\t\t\t\t<Dropzone\n\t\t\t\t\tonDrop={handleDrop}\n\t\t\t\t\taccept={normalizedAccept}\n\t\t\t\t\tmaxSize={maxSize}\n\t\t\t\t\tmultiple={true}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tloading={isUploading}\n\t\t\t\t\tprogress={isUploading ? progress : undefined}\n\t\t\t\t\tlabel={\n\t\t\t\t\t\thasItems\n\t\t\t\t\t\t\t? \"Drop more files or click to add\"\n\t\t\t\t\t\t\t: resolvedPlaceholder || \"Drop files here or click to browse\"\n\t\t\t\t\t}\n\t\t\t\t\thint={hintText}\n\t\t\t\t\tonValidationError={handleValidationError}\n\t\t\t\t\tclassName={hasItems ? \"min-h-[80px]\" : undefined}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{canAddMore && !isUploading && !disabled && !!collection && (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tonClick={() => setIsPickerOpen(true)}\n\t\t\t\t\tclassName=\"mt-2 w-full\"\n\t\t\t\t>\n\t\t\t\t\t<Icon icon=\"ph:folder-open-bold\" className=\"mr-2 size-4\" />\n\t\t\t\t\tBrowse Library\n\t\t\t\t</Button>\n\t\t\t)}\n\n\t\t\t<MediaPickerDialog\n\t\t\t\topen={isPickerOpen}\n\t\t\t\tonOpenChange={setIsPickerOpen}\n\t\t\t\tmode=\"multiple\"\n\t\t\t\taccept={normalizedAccept}\n\t\t\t\tonSelect={handlePickerSelect}\n\t\t\t\tmaxItems={maxItems ? maxItems - assetIds.length : undefined}\n\t\t\t\tcollection={collection || undefined}\n\t\t\t/>\n\n\t\t\t{editAssetId && !!collection && (\n\t\t\t\t<ResourceSheet\n\t\t\t\t\ttype=\"collection\"\n\t\t\t\t\tcollection={collection}\n\t\t\t\t\titemId={editAssetId}\n\t\t\t\t\topen={!!editAssetId}\n\t\t\t\t\tonOpenChange={(open: boolean) => !open && setEditAssetId(null)}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{isUploading && !canAddMore && (\n\t\t\t\t<div className=\"text-muted-foreground flex items-center justify-center gap-2 rounded-lg border border-dashed p-4 text-sm\">\n\t\t\t\t\tUploading... {progress}%\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\n// ============================================================================\n// Main Component\n// ============================================================================\n\nexport function UploadField({\n\tname,\n\tlabel,\n\tdescription,\n\tplaceholder,\n\trequired,\n\tdisabled,\n\tlocalized,\n\tlocale,\n\tcontrol,\n\tclassName,\n\tto,\n\taccept,\n\tmaxSize,\n\tshowPreview = true,\n\teditable = true,\n\tpreviewVariant,\n\tonUploadStart,\n\tonUploadComplete,\n\tonUploadError,\n\t// Multiple mode options\n\tmultiple = false,\n\tmaxItems,\n\torderable = false,\n\tlayout = \"grid\",\n}: UploadFieldProps) {\n\tconst resolveText = useResolveText();\n\tconst resolvedControl = useResolvedControl(control);\n\tconst {\n\t\tcollection: resolvedUploadCollection,\n\t\tcollections: availableUploadCollections,\n\t} = useUploadCollection(to);\n\tconst collection = resolvedUploadCollection || \"\";\n\tconst unresolvedCollectionMessage = !resolvedUploadCollection\n\t\t? availableUploadCollections.length > 1\n\t\t\t? `Multiple upload collections are available (${availableUploadCollections.join(\", \")}). Configure the field with \\`to\\` to choose one.`\n\t\t\t: \"No upload collection is configured for this field.\"\n\t\t: undefined;\n\tconst fieldDisabled = disabled || !!unresolvedCollectionMessage;\n\n\t// Determine preview variant based on mode if not specified\n\tconst effectivePreviewVariant =\n\t\tpreviewVariant ??\n\t\t(multiple ? (layout === \"grid\" ? \"thumbnail\" : \"compact\") : \"card\");\n\n\treturn (\n\t\t<Controller\n\t\t\tname={name}\n\t\t\tcontrol={resolvedControl}\n\t\t\trender={({ field, fieldState }) => {\n\t\t\t\t// For multiple mode, show count in label\n\t\t\t\tconst assetIds = multiple\n\t\t\t\t\t? (field.value as string[] | null | undefined) || []\n\t\t\t\t\t: [];\n\t\t\t\tconst labelWithCount =\n\t\t\t\t\tmultiple && label && maxItems\n\t\t\t\t\t\t? `${resolveText(label)} (${assetIds.length}/${maxItems})`\n\t\t\t\t\t\t: label\n\t\t\t\t\t\t\t? resolveText(label)\n\t\t\t\t\t\t\t: undefined;\n\n\t\t\t\treturn (\n\t\t\t\t\t<FieldWrapper\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tlabel={labelWithCount}\n\t\t\t\t\t\tdescription={description}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tdisabled={fieldDisabled}\n\t\t\t\t\t\tlocalized={localized}\n\t\t\t\t\t\tlocale={locale}\n\t\t\t\t\t\terror={fieldState.error?.message}\n\t\t\t\t\t>\n\t\t\t\t\t\t{multiple ? (\n\t\t\t\t\t\t\t<MultipleUploadInner\n\t\t\t\t\t\t\t\tfield={field}\n\t\t\t\t\t\t\t\terror={fieldState.error?.message}\n\t\t\t\t\t\t\t\tcollection={collection}\n\t\t\t\t\t\t\t\tunresolvedCollectionMessage={unresolvedCollectionMessage}\n\t\t\t\t\t\t\t\taccept={accept}\n\t\t\t\t\t\t\t\tmaxSize={maxSize}\n\t\t\t\t\t\t\t\tmaxItems={maxItems}\n\t\t\t\t\t\t\t\torderable={orderable}\n\t\t\t\t\t\t\t\tlayout={layout}\n\t\t\t\t\t\t\t\teditable={editable}\n\t\t\t\t\t\t\t\tdisabled={fieldDisabled}\n\t\t\t\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\t\t\t\tonUploadStart={onUploadStart}\n\t\t\t\t\t\t\t\tonUploadComplete={onUploadComplete as (assets: Asset[]) => void}\n\t\t\t\t\t\t\t\tonUploadError={onUploadError}\n\t\t\t\t\t\t\t\tclassName={className}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<SingleUploadInner\n\t\t\t\t\t\t\t\tfield={field}\n\t\t\t\t\t\t\t\terror={fieldState.error?.message}\n\t\t\t\t\t\t\t\tcollection={collection}\n\t\t\t\t\t\t\t\tunresolvedCollectionMessage={unresolvedCollectionMessage}\n\t\t\t\t\t\t\t\taccept={accept}\n\t\t\t\t\t\t\t\tmaxSize={maxSize}\n\t\t\t\t\t\t\t\tshowPreview={showPreview}\n\t\t\t\t\t\t\t\teditable={editable}\n\t\t\t\t\t\t\t\tpreviewVariant={effectivePreviewVariant}\n\t\t\t\t\t\t\t\tdisabled={fieldDisabled}\n\t\t\t\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\t\t\t\tonUploadStart={onUploadStart}\n\t\t\t\t\t\t\t\tonUploadComplete={onUploadComplete as (asset: Asset) => void}\n\t\t\t\t\t\t\t\tonUploadError={onUploadError}\n\t\t\t\t\t\t\t\tclassName={className}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</FieldWrapper>\n\t\t\t\t);\n\t\t\t}}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,SAAS,gBACR,QACuB;AACvB,KAAI,CAAC,OAAQ,QAAO;AACpB,KAAI,MAAM,QAAQ,OAAO,CAAE,QAAO;AAClC,QAAO,CAAC,OAAO;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