@phtngyn/cms 0.2.0-beta.7 → 0.3.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 (524) hide show
  1. package/LICENSE +18 -10
  2. package/README.md +59 -401
  3. package/drizzle/20261003215543_initial/migration.sql +251 -0
  4. package/drizzle/20261003215543_initial/snapshot.json +1941 -0
  5. package/package.json +75 -71
  6. package/src/Authoring.d.ts +41 -49
  7. package/src/Authoring.js +1 -1
  8. package/src/Blocks-BrxSemnd.js +40 -0
  9. package/src/Client.d.ts +8186 -0
  10. package/src/Client.js +41 -0
  11. package/src/Collections.d.ts +142 -0
  12. package/src/Collections.js +142 -0
  13. package/src/Config-CMiwciub.js +130 -0
  14. package/src/Config.d.ts +172 -0
  15. package/src/Config.js +2 -0
  16. package/src/Configuration-Dk2k3OIc.js +73 -0
  17. package/src/DataTransfer-BmECvPHB.js +488 -0
  18. package/src/Database-DSsNCGft.d.ts +3 -0
  19. package/src/Delivery.d.ts +28 -0
  20. package/src/Delivery.js +7 -0
  21. package/src/Document-CKXMSEf1.js +293 -0
  22. package/src/Document-TgwYKJZM.d.ts +220 -0
  23. package/src/DocumentRenderer-Wz2xaNyf.js +394 -0
  24. package/src/EditorSchema-wrDv-id6.js +296 -0
  25. package/src/Fields-BegSgYhj.d.ts +166 -0
  26. package/src/Fields-ioGaMEh9.js +130 -0
  27. package/src/Forms-BuKAXQxr.d.ts +203 -0
  28. package/src/Forms.d.ts +48 -11
  29. package/src/Forms.js +342 -7
  30. package/src/I18n-Ckf9h0rC.js +154 -0
  31. package/src/I18n.d.ts +45 -2
  32. package/src/I18n.js +2 -1
  33. package/src/Image-CJWPLnhP.js +110 -0
  34. package/src/Links-CJYyy7rC.js +28 -0
  35. package/src/Links-Dx1yOni8.d.ts +28 -0
  36. package/src/Locales-Ch7a5xuA.js +67 -0
  37. package/src/Locales-jwbmJaOp.d.ts +43 -0
  38. package/src/Locales.d.ts +3 -0
  39. package/src/Locales.js +3 -0
  40. package/src/Media-BQ0uL4w7.d.ts +15 -0
  41. package/src/Media-DSyvd14o.js +87 -0
  42. package/src/Module.d.ts +2 -10
  43. package/src/Module.js +1039 -162
  44. package/src/Operations.d.ts +57 -0
  45. package/src/Operations.js +263 -0
  46. package/src/People-DvNZauWw.js +69 -0
  47. package/src/PreviewFocus-C_EelZO5.js +104 -0
  48. package/src/Query-C0kGJF5_.d.ts +261 -0
  49. package/src/RevisionPreview-IVwbJ9Wy.js +133 -0
  50. package/src/Routes-BaZvm2LE.js +126 -0
  51. package/src/Routes-DM1rRp3r.d.ts +15 -0
  52. package/src/S3MediaObjects-y-WacEi9.js +193 -0
  53. package/src/Seo-BcpqxoAs.d.ts +57 -0
  54. package/src/Seo-CjNUtUkj.js +254 -0
  55. package/src/StudioApi-CXLwwocX.js +833 -0
  56. package/src/StudioErrors-T5zLGQ1M.js +117 -0
  57. package/src/StudioErrors-kq-E44lQ.d.ts +104 -0
  58. package/src/StudioServer.d.ts +20 -0
  59. package/src/StudioServer.js +34 -0
  60. package/src/answers-DcTg0Xv2.js +41 -0
  61. package/src/cli.js +681 -187
  62. package/src/contracts-rprW3ZOB.js +130 -0
  63. package/src/forms-3xuf0Ym7.d.ts +206 -0
  64. package/src/localeConfiguration-BPbkLi7-.js +32 -0
  65. package/src/localeContext-DhF3SPvM.js +59 -0
  66. package/src/locales-6OD4XGIZ.js +12 -0
  67. package/src/nuxtDelivery-BYX_Cddb.js +466 -0
  68. package/src/plugin-DTYuDaQu.js +7171 -0
  69. package/src/previewContext-dt3ZUh-w.js +4 -0
  70. package/src/previewRegions-CXjk5cbP.js +145 -0
  71. package/src/previewSource-fb-q3ESM.js +144 -0
  72. package/src/rendering-D9LVeEKX.js +47 -0
  73. package/src/rolldown-runtime-8H4AJuhK.js +14 -0
  74. package/src/runtime/CmsImage.js +38 -0
  75. package/src/runtime/DocumentPage.vue +10 -0
  76. package/src/runtime/DocumentPageContent.js +48 -0
  77. package/src/runtime/DocumentRenderer.d.ts +129 -0
  78. package/src/runtime/DocumentRenderer.js +2 -0
  79. package/src/runtime/api.js +48 -6
  80. package/src/runtime/delivery/useCmsDocument.js +2 -0
  81. package/src/runtime/delivery/useCmsDocumentQuery.js +2 -0
  82. package/src/runtime/delivery/useCmsDocumentSeo.js +2 -114
  83. package/src/runtime/delivery/useCmsLocale.js +10 -0
  84. package/src/runtime/plugin.js +2 -40
  85. package/src/runtime/preview.css +85 -0
  86. package/src/runtime/preview.js +277 -0
  87. package/src/runtime/previewSource.js +82 -0
  88. package/src/runtime/revisionPrivacy.js +13 -0
  89. package/src/runtime/studio.js +10 -0
  90. package/src/runtime/studioIcons.js +36 -0
  91. package/src/validation-3pggwcnm.js +396 -0
  92. package/src/validation-DpUwPC8Y.js +224 -0
  93. package/studio/THIRD-PARTY-LICENSES.md +2406 -0
  94. package/studio/chunks/AccountPage-DL3DitDM.js +288 -0
  95. package/studio/chunks/AccountPage-DL3DitDM.js.br +0 -0
  96. package/studio/chunks/AccountPage-DL3DitDM.js.gz +0 -0
  97. package/studio/chunks/ActivityPage-CLqVUqTh.js +584 -0
  98. package/studio/chunks/ActivityPage-CLqVUqTh.js.br +0 -0
  99. package/studio/chunks/ActivityPage-CLqVUqTh.js.gz +0 -0
  100. package/studio/chunks/Alert-D0D24z_a.js +335 -0
  101. package/studio/chunks/Alert-D0D24z_a.js.br +0 -0
  102. package/studio/chunks/Alert-D0D24z_a.js.gz +0 -0
  103. package/studio/chunks/Badge-BBFs88TI.js +346 -0
  104. package/studio/chunks/Badge-BBFs88TI.js.br +0 -0
  105. package/studio/chunks/Badge-BBFs88TI.js.gz +0 -0
  106. package/studio/chunks/Button-BT3ztSPx.js +14319 -0
  107. package/studio/chunks/Button-BT3ztSPx.js.br +0 -0
  108. package/studio/chunks/Button-BT3ztSPx.js.gz +0 -0
  109. package/studio/chunks/Collapsible-CKnEYIlp.js +246 -0
  110. package/studio/chunks/Collapsible-CKnEYIlp.js.br +0 -0
  111. package/studio/chunks/Collapsible-CKnEYIlp.js.gz +0 -0
  112. package/studio/chunks/ContentInventory-D7nsFA6U.js +1745 -0
  113. package/studio/chunks/ContentInventory-D7nsFA6U.js.br +0 -0
  114. package/studio/chunks/ContentInventory-D7nsFA6U.js.gz +0 -0
  115. package/studio/chunks/ContentPage-DCxt6BeD.js +18 -0
  116. package/studio/chunks/ContentPage-DCxt6BeD.js.br +0 -0
  117. package/studio/chunks/ContentPage-DCxt6BeD.js.gz +0 -0
  118. package/studio/chunks/DashboardSearch-DjyMjJwF.js +2413 -0
  119. package/studio/chunks/DashboardSearch-DjyMjJwF.js.br +0 -0
  120. package/studio/chunks/DashboardSearch-DjyMjJwF.js.gz +0 -0
  121. package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js +26063 -0
  122. package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js.br +0 -0
  123. package/studio/chunks/DocumentLocaleMenu-0EkkOr6_.js.gz +0 -0
  124. package/studio/chunks/DropdownMenu-CA9fB0uZ.js +4400 -0
  125. package/studio/chunks/DropdownMenu-CA9fB0uZ.js.br +0 -0
  126. package/studio/chunks/DropdownMenu-CA9fB0uZ.js.gz +0 -0
  127. package/studio/chunks/EditorPage-D_PAYEE4.js +7799 -0
  128. package/studio/chunks/EditorPage-D_PAYEE4.js.br +0 -0
  129. package/studio/chunks/EditorPage-D_PAYEE4.js.gz +0 -0
  130. package/studio/chunks/FormField-CgM6l2Yn.js +198 -0
  131. package/studio/chunks/FormField-CgM6l2Yn.js.br +0 -0
  132. package/studio/chunks/FormField-CgM6l2Yn.js.gz +0 -0
  133. package/studio/chunks/HelpPage-C-vrFcT_.js +552 -0
  134. package/studio/chunks/HelpPage-C-vrFcT_.js.br +0 -0
  135. package/studio/chunks/HelpPage-C-vrFcT_.js.gz +0 -0
  136. package/studio/chunks/Kbd-Ot7TIhVZ.js +271 -0
  137. package/studio/chunks/Kbd-Ot7TIhVZ.js.br +0 -0
  138. package/studio/chunks/Kbd-Ot7TIhVZ.js.gz +0 -0
  139. package/studio/chunks/MediaFolderDialog-DYu-eu-q.js +101 -0
  140. package/studio/chunks/MediaFolderDialog-DYu-eu-q.js.br +0 -0
  141. package/studio/chunks/MediaFolderDialog-DYu-eu-q.js.gz +0 -0
  142. package/studio/chunks/MediaPage-D-jaWtdl.js +923 -0
  143. package/studio/chunks/MediaPage-D-jaWtdl.js.br +0 -0
  144. package/studio/chunks/MediaPage-D-jaWtdl.js.gz +0 -0
  145. package/studio/chunks/MediaPicker-BZs2wUFz.js +837 -0
  146. package/studio/chunks/MediaPicker-BZs2wUFz.js.br +0 -0
  147. package/studio/chunks/MediaPicker-BZs2wUFz.js.gz +0 -0
  148. package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js +1173 -0
  149. package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js.br +0 -0
  150. package/studio/chunks/MediaUploadPanel-C7Kyg6aR.js.gz +0 -0
  151. package/studio/chunks/Modal-D6hSvxHd.js +265 -0
  152. package/studio/chunks/Modal-D6hSvxHd.js.br +0 -0
  153. package/studio/chunks/Modal-D6hSvxHd.js.gz +0 -0
  154. package/studio/chunks/NewDocumentDialog-C8B6_r3J.js +277 -0
  155. package/studio/chunks/NewDocumentDialog-C8B6_r3J.js.br +0 -0
  156. package/studio/chunks/NewDocumentDialog-C8B6_r3J.js.gz +0 -0
  157. package/studio/chunks/Pagination-D9BSo5H2.js +573 -0
  158. package/studio/chunks/Pagination-D9BSo5H2.js.br +0 -0
  159. package/studio/chunks/Pagination-D9BSo5H2.js.gz +0 -0
  160. package/studio/chunks/PeoplePage-CWIXitBD.js +783 -0
  161. package/studio/chunks/PeoplePage-CWIXitBD.js.br +0 -0
  162. package/studio/chunks/PeoplePage-CWIXitBD.js.gz +0 -0
  163. package/studio/chunks/Popover-B63bkTMS.js +128 -0
  164. package/studio/chunks/Popover-B63bkTMS.js.br +0 -0
  165. package/studio/chunks/Popover-B63bkTMS.js.gz +0 -0
  166. package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js +255 -0
  167. package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js.br +0 -0
  168. package/studio/chunks/PublicationActionDialog-Cm_P0C3I.js.gz +0 -0
  169. package/studio/chunks/Routes-DLYHmulE.js +102 -0
  170. package/studio/chunks/Routes-DLYHmulE.js.br +0 -0
  171. package/studio/chunks/Routes-DLYHmulE.js.gz +0 -0
  172. package/studio/chunks/RovingFocusItem-QZNg-wWF.js +95 -0
  173. package/studio/chunks/RovingFocusItem-QZNg-wWF.js.br +0 -0
  174. package/studio/chunks/RovingFocusItem-QZNg-wWF.js.gz +0 -0
  175. package/studio/chunks/ScheduledPage-C0hqrkr5.js +332 -0
  176. package/studio/chunks/ScheduledPage-C0hqrkr5.js.br +0 -0
  177. package/studio/chunks/ScheduledPage-C0hqrkr5.js.gz +0 -0
  178. package/studio/chunks/Search-BEgCe9Aj.js +14646 -0
  179. package/studio/chunks/Search-BEgCe9Aj.js.br +0 -0
  180. package/studio/chunks/Search-BEgCe9Aj.js.gz +0 -0
  181. package/studio/chunks/Select-B50WZMW-.js +2145 -0
  182. package/studio/chunks/Select-B50WZMW-.js.br +0 -0
  183. package/studio/chunks/Select-B50WZMW-.js.gz +0 -0
  184. package/studio/chunks/SelectMenu-DSweWGMz.js +2109 -0
  185. package/studio/chunks/SelectMenu-DSweWGMz.js.br +0 -0
  186. package/studio/chunks/SelectMenu-DSweWGMz.js.gz +0 -0
  187. package/studio/chunks/SeoPage-CNNxGe4h.js +846 -0
  188. package/studio/chunks/SeoPage-CNNxGe4h.js.br +0 -0
  189. package/studio/chunks/SeoPage-CNNxGe4h.js.gz +0 -0
  190. package/studio/chunks/Skeleton-COz8dcrw.js +39 -0
  191. package/studio/chunks/Skeleton-COz8dcrw.js.br +2 -0
  192. package/studio/chunks/Skeleton-COz8dcrw.js.gz +0 -0
  193. package/studio/chunks/Slideover-QMMHAAys.js +289 -0
  194. package/studio/chunks/Slideover-QMMHAAys.js.br +0 -0
  195. package/studio/chunks/Slideover-QMMHAAys.js.gz +0 -0
  196. package/studio/chunks/StudioPage-ngEIDr5d.js +80 -0
  197. package/studio/chunks/StudioPage-ngEIDr5d.js.br +0 -0
  198. package/studio/chunks/StudioPage-ngEIDr5d.js.gz +0 -0
  199. package/studio/chunks/StudioPageToolbar-BwHnqyr6.js +2524 -0
  200. package/studio/chunks/StudioPageToolbar-BwHnqyr6.js.br +0 -0
  201. package/studio/chunks/StudioPageToolbar-BwHnqyr6.js.gz +0 -0
  202. package/studio/chunks/Switch-qKl1aDn7.js +484 -0
  203. package/studio/chunks/Switch-qKl1aDn7.js.br +0 -0
  204. package/studio/chunks/Switch-qKl1aDn7.js.gz +0 -0
  205. package/studio/chunks/ToolPage-DxoVAJVk.js +29 -0
  206. package/studio/chunks/ToolPage-DxoVAJVk.js.br +0 -0
  207. package/studio/chunks/ToolPage-DxoVAJVk.js.gz +0 -0
  208. package/studio/chunks/Tooltip-Bu15m_DB.js +693 -0
  209. package/studio/chunks/Tooltip-Bu15m_DB.js.br +0 -0
  210. package/studio/chunks/Tooltip-Bu15m_DB.js.gz +0 -0
  211. package/studio/chunks/TrashPage-lhqLLdoG.js +12 -0
  212. package/studio/chunks/TrashPage-lhqLLdoG.js.br +0 -0
  213. package/studio/chunks/TrashPage-lhqLLdoG.js.gz +0 -0
  214. package/studio/chunks/VersionsPage-Cqy6UAp9.js +2349 -0
  215. package/studio/chunks/VersionsPage-Cqy6UAp9.js.br +0 -0
  216. package/studio/chunks/VersionsPage-Cqy6UAp9.js.gz +0 -0
  217. package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js +113 -0
  218. package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js.br +0 -0
  219. package/studio/chunks/VisuallyHiddenInput-Cu8hQLRf.js.gz +0 -0
  220. package/studio/chunks/arrays-CUJkmV4I.js +10 -0
  221. package/studio/chunks/arrays-CUJkmV4I.js.br +0 -0
  222. package/studio/chunks/arrays-CUJkmV4I.js.gz +0 -0
  223. package/studio/chunks/base-DkTekJe8.js +213 -0
  224. package/studio/chunks/base-DkTekJe8.js.br +0 -0
  225. package/studio/chunks/base-DkTekJe8.js.gz +0 -0
  226. package/studio/chunks/content-DUGl3N4d.js +6012 -0
  227. package/studio/chunks/content-DUGl3N4d.js.br +0 -0
  228. package/studio/chunks/content-DUGl3N4d.js.gz +0 -0
  229. package/studio/chunks/destinations-DPIQVQa6.js +227 -0
  230. package/studio/chunks/destinations-DPIQVQa6.js.br +0 -0
  231. package/studio/chunks/destinations-DPIQVQa6.js.gz +0 -0
  232. package/studio/chunks/en-073cjKW4.js +152 -0
  233. package/studio/chunks/en-073cjKW4.js.br +0 -0
  234. package/studio/chunks/en-073cjKW4.js.gz +0 -0
  235. package/studio/chunks/en-Bn8mxPuf.js +134 -0
  236. package/studio/chunks/en-Bn8mxPuf.js.br +0 -0
  237. package/studio/chunks/en-Bn8mxPuf.js.gz +0 -0
  238. package/studio/chunks/en-C9OiaUDZ.js +251 -0
  239. package/studio/chunks/en-C9OiaUDZ.js.br +0 -0
  240. package/studio/chunks/en-C9OiaUDZ.js.gz +0 -0
  241. package/studio/chunks/en-CHAR6jzx.js +147 -0
  242. package/studio/chunks/en-CHAR6jzx.js.br +0 -0
  243. package/studio/chunks/en-CHAR6jzx.js.gz +0 -0
  244. package/studio/chunks/en-Cq4N1vEF.js +93 -0
  245. package/studio/chunks/en-Cq4N1vEF.js.br +2 -0
  246. package/studio/chunks/en-Cq4N1vEF.js.gz +0 -0
  247. package/studio/chunks/en-D2hRqlse.js +140 -0
  248. package/studio/chunks/en-D2hRqlse.js.br +0 -0
  249. package/studio/chunks/en-D2hRqlse.js.gz +0 -0
  250. package/studio/chunks/en-DiUC3-j6.js +144 -0
  251. package/studio/chunks/en-DiUC3-j6.js.br +0 -0
  252. package/studio/chunks/en-DiUC3-j6.js.gz +0 -0
  253. package/studio/chunks/english-Cs_Adu-u.js +8 -0
  254. package/studio/chunks/english-Cs_Adu-u.js.br +0 -0
  255. package/studio/chunks/english-Cs_Adu-u.js.gz +0 -0
  256. package/studio/chunks/esm-D6DqSiL1.js +752 -0
  257. package/studio/chunks/esm-D6DqSiL1.js.br +0 -0
  258. package/studio/chunks/esm-D6DqSiL1.js.gz +0 -0
  259. package/studio/chunks/externalRequest-CTzr2nDq.js +23 -0
  260. package/studio/chunks/externalRequest-CTzr2nDq.js.br +0 -0
  261. package/studio/chunks/externalRequest-CTzr2nDq.js.gz +0 -0
  262. package/studio/chunks/iconify-DR9ryCPv.js +1007 -0
  263. package/studio/chunks/iconify-DR9ryCPv.js.br +0 -0
  264. package/studio/chunks/iconify-DR9ryCPv.js.gz +0 -0
  265. package/studio/chunks/icons-D2MsAaXq.js +183 -0
  266. package/studio/chunks/icons-D2MsAaXq.js.br +0 -0
  267. package/studio/chunks/icons-D2MsAaXq.js.gz +0 -0
  268. package/studio/chunks/leaveGuards-D22fTGgr.js +26 -0
  269. package/studio/chunks/leaveGuards-D22fTGgr.js.br +0 -0
  270. package/studio/chunks/leaveGuards-D22fTGgr.js.gz +0 -0
  271. package/studio/chunks/lucideIcons-EyqyPBsX.js +238 -0
  272. package/studio/chunks/lucideIcons-EyqyPBsX.js.br +0 -0
  273. package/studio/chunks/lucideIcons-EyqyPBsX.js.gz +0 -0
  274. package/studio/chunks/mediaRoute--8cY8rUe.js +17 -0
  275. package/studio/chunks/mediaRoute--8cY8rUe.js.br +0 -0
  276. package/studio/chunks/mediaRoute--8cY8rUe.js.gz +0 -0
  277. package/studio/chunks/newDocumentPlanning-C26DHpvh.js +77 -0
  278. package/studio/chunks/newDocumentPlanning-C26DHpvh.js.br +0 -0
  279. package/studio/chunks/newDocumentPlanning-C26DHpvh.js.gz +0 -0
  280. package/studio/chunks/notifications-OKOLc40v.js +110 -0
  281. package/studio/chunks/notifications-OKOLc40v.js.br +0 -0
  282. package/studio/chunks/notifications-OKOLc40v.js.gz +0 -0
  283. package/studio/chunks/operations-CjNHyrEX.js +57 -0
  284. package/studio/chunks/operations-CjNHyrEX.js.br +0 -0
  285. package/studio/chunks/operations-CjNHyrEX.js.gz +0 -0
  286. package/studio/chunks/overlay-DnqFLZTc.js +1733 -0
  287. package/studio/chunks/overlay-DnqFLZTc.js.br +0 -0
  288. package/studio/chunks/overlay-DnqFLZTc.js.gz +0 -0
  289. package/studio/chunks/presentation-DF83w0hE.js +57 -0
  290. package/studio/chunks/presentation-DF83w0hE.js.br +0 -0
  291. package/studio/chunks/presentation-DF83w0hE.js.gz +0 -0
  292. package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js +4557 -0
  293. package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js.br +0 -0
  294. package/studio/chunks/runtime-core.esm-bundler-DKFA9Rep.js.gz +0 -0
  295. package/studio/chunks/searchPresentation-DFwxQkt3.js +76 -0
  296. package/studio/chunks/searchPresentation-DFwxQkt3.js.br +0 -0
  297. package/studio/chunks/searchPresentation-DFwxQkt3.js.gz +0 -0
  298. package/studio/chunks/status-DQv6ihkU.js +38 -0
  299. package/studio/chunks/status-DQv6ihkU.js.br +0 -0
  300. package/studio/chunks/status-DQv6ihkU.js.gz +0 -0
  301. package/studio/chunks/studioContext-I8HozGU1.js +4953 -0
  302. package/studio/chunks/studioContext-I8HozGU1.js.br +0 -0
  303. package/studio/chunks/studioContext-I8HozGU1.js.gz +0 -0
  304. package/studio/chunks/studioQueries-BR-9NT5F.js +73 -0
  305. package/studio/chunks/studioQueries-BR-9NT5F.js.br +0 -0
  306. package/studio/chunks/studioQueries-BR-9NT5F.js.gz +0 -0
  307. package/studio/chunks/studioSearch-ByaL-QpM.js +1095 -0
  308. package/studio/chunks/studioSearch-ByaL-QpM.js.br +0 -0
  309. package/studio/chunks/studioSearch-ByaL-QpM.js.gz +0 -0
  310. package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js +62 -0
  311. package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js.br +0 -0
  312. package/studio/chunks/useAcknowledgedDraft-0_c9sWI6.js.gz +0 -0
  313. package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js +189 -0
  314. package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js.br +0 -0
  315. package/studio/chunks/useApi-CUWMwLLw-B3Q3g2nf.js.gz +0 -0
  316. package/studio/chunks/useDocumentMessage-BAWvc38w.js +16 -0
  317. package/studio/chunks/useDocumentMessage-BAWvc38w.js.br +3 -0
  318. package/studio/chunks/useDocumentMessage-BAWvc38w.js.gz +0 -0
  319. package/studio/chunks/useFilter-DzyiTR7f.js +87 -0
  320. package/studio/chunks/useFilter-DzyiTR7f.js.br +0 -0
  321. package/studio/chunks/useFilter-DzyiTR7f.js.gz +0 -0
  322. package/studio/chunks/useFormControl-CL7sSCUo.js +8 -0
  323. package/studio/chunks/useFormControl-CL7sSCUo.js.br +0 -0
  324. package/studio/chunks/useFormControl-CL7sSCUo.js.gz +0 -0
  325. package/studio/chunks/useGraceArea-Chcy25IQ.js +154 -0
  326. package/studio/chunks/useGraceArea-Chcy25IQ.js.br +0 -0
  327. package/studio/chunks/useGraceArea-Chcy25IQ.js.gz +0 -0
  328. package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js +44 -0
  329. package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js.br +8 -0
  330. package/studio/chunks/useLeaveConfirmation-_iCSnKEp.js.gz +0 -0
  331. package/studio/chunks/useLinkCopy-CMjQteCy.js +35 -0
  332. package/studio/chunks/useLinkCopy-CMjQteCy.js.br +0 -0
  333. package/studio/chunks/useLinkCopy-CMjQteCy.js.gz +0 -0
  334. package/studio/chunks/usePointerMotion-DwRcwBNQ.js +16 -0
  335. package/studio/chunks/usePointerMotion-DwRcwBNQ.js.br +0 -0
  336. package/studio/chunks/usePointerMotion-DwRcwBNQ.js.gz +0 -0
  337. package/studio/chunks/useStudioNavigation-CLwtSYpb.js +298 -0
  338. package/studio/chunks/useStudioNavigation-CLwtSYpb.js.br +0 -0
  339. package/studio/chunks/useStudioNavigation-CLwtSYpb.js.gz +0 -0
  340. package/studio/chunks/useStudioPages-DR9qmYLg.js +79 -0
  341. package/studio/chunks/useStudioPages-DR9qmYLg.js.br +0 -0
  342. package/studio/chunks/useStudioPages-DR9qmYLg.js.gz +0 -0
  343. package/studio/chunks/utils-mdScC0v0.js +59 -0
  344. package/studio/chunks/utils-mdScC0v0.js.br +0 -0
  345. package/studio/chunks/utils-mdScC0v0.js.gz +0 -0
  346. package/studio/chunks/virtualizer-D1S0bZ4t.js +781 -0
  347. package/studio/chunks/virtualizer-D1S0bZ4t.js.br +0 -0
  348. package/studio/chunks/virtualizer-D1S0bZ4t.js.gz +0 -0
  349. package/studio/help/64f767fe29c2-save-and-publish.svg +7 -0
  350. package/studio/host.css +1 -1
  351. package/studio/host.css.br +0 -0
  352. package/studio/host.css.gz +0 -0
  353. package/studio/host.js +8757 -39178
  354. package/studio/host.js.br +0 -0
  355. package/studio/host.js.gz +0 -0
  356. package/CHANGELOG.md +0 -13
  357. package/bin/cms.mjs +0 -2
  358. package/src/ApplicationTypes.d.ts +0 -84
  359. package/src/ApplicationTypes.js +0 -1
  360. package/src/Configuration-Da5B2PVH.js +0 -1191
  361. package/src/Configuration-Da5B2PVH.js.map +0 -1
  362. package/src/Configuration.d.ts +0 -82
  363. package/src/Configuration.js +0 -8
  364. package/src/Configuration.js.map +0 -1
  365. package/src/Content.d.ts +0 -68
  366. package/src/Content.js +0 -373
  367. package/src/Content.js.map +0 -1
  368. package/src/ContentTransfer-BxwswWn3.js +0 -86
  369. package/src/ContentTransfer-BxwswWn3.js.map +0 -1
  370. package/src/ContentTransfer-Z9FHyLez.d.ts +0 -72
  371. package/src/DocumentEngine-hh_IGPXO.js +0 -978
  372. package/src/DocumentEngine-hh_IGPXO.js.map +0 -1
  373. package/src/DocumentModel.d.ts +0 -52
  374. package/src/DocumentModel.js +0 -66
  375. package/src/DocumentModel.js.map +0 -1
  376. package/src/Forms-CX-hwmJF.js +0 -391
  377. package/src/Forms-CX-hwmJF.js.map +0 -1
  378. package/src/Forms-CfNPTiCr.js +0 -110
  379. package/src/Forms-CfNPTiCr.js.map +0 -1
  380. package/src/Forms-R0HoTR-o.d.ts +0 -92
  381. package/src/Forms.js.map +0 -1
  382. package/src/HttpPaths-c9nLZ9H2.js +0 -21
  383. package/src/HttpPaths-c9nLZ9H2.js.map +0 -1
  384. package/src/I18n-zbqpWxki.d.ts +0 -29
  385. package/src/Media-j1bTritO.js +0 -112
  386. package/src/Media-j1bTritO.js.map +0 -1
  387. package/src/Module.js.map +0 -1
  388. package/src/References-CCPDAPve.js +0 -45
  389. package/src/References-CCPDAPve.js.map +0 -1
  390. package/src/S3MediaObjects-Dwhl2deX.js +0 -2742
  391. package/src/S3MediaObjects-Dwhl2deX.js.map +0 -1
  392. package/src/Seo-402YumpT.d.ts +0 -198
  393. package/src/cli/content.js +0 -101
  394. package/src/cli/content.js.map +0 -1
  395. package/src/cli.js.map +0 -1
  396. package/src/connection-BP80q4d-.js +0 -92
  397. package/src/connection-BP80q4d-.js.map +0 -1
  398. package/src/dev-lifecycle-CjDq63Ft.js +0 -535
  399. package/src/dev-lifecycle-CjDq63Ft.js.map +0 -1
  400. package/src/installation-DYNQQBD3.js +0 -9114
  401. package/src/installation-DYNQQBD3.js.map +0 -1
  402. package/src/internal/application-types.js +0 -43
  403. package/src/internal/application-types.js.map +0 -1
  404. package/src/internal/authoring-catalog.js +0 -158
  405. package/src/internal/authoring-catalog.js.map +0 -1
  406. package/src/internal/authoring-compiler.js +0 -146
  407. package/src/internal/authoring-compiler.js.map +0 -1
  408. package/src/internal/authoring-metadata.js +0 -191
  409. package/src/internal/authoring-metadata.js.map +0 -1
  410. package/src/internal/cms-config.js +0 -45
  411. package/src/internal/cms-config.js.map +0 -1
  412. package/src/internal/configuration.js +0 -228
  413. package/src/internal/configuration.js.map +0 -1
  414. package/src/internal/dev-lifecycle.js +0 -3
  415. package/src/internal/diagnostics.js +0 -47
  416. package/src/internal/diagnostics.js.map +0 -1
  417. package/src/internal/document-model.js +0 -376
  418. package/src/internal/document-model.js.map +0 -1
  419. package/src/internal/field-metadata.js +0 -7
  420. package/src/internal/field-metadata.js.map +0 -1
  421. package/src/internal/form-capabilities.js +0 -12
  422. package/src/internal/form-capabilities.js.map +0 -1
  423. package/src/internal/i18n.js +0 -73
  424. package/src/internal/i18n.js.map +0 -1
  425. package/src/internal/studio-app.js +0 -68
  426. package/src/internal/studio-app.js.map +0 -1
  427. package/src/location-CMNGO3lU.js +0 -35
  428. package/src/location-CMNGO3lU.js.map +0 -1
  429. package/src/metadata-DN9_K6Yl.js +0 -201
  430. package/src/metadata-DN9_K6Yl.js.map +0 -1
  431. package/src/models-5j67LMqW.js +0 -131
  432. package/src/models-5j67LMqW.js.map +0 -1
  433. package/src/models-VmGmG19-.js +0 -628
  434. package/src/models-VmGmG19-.js.map +0 -1
  435. package/src/runtime/api.js.map +0 -1
  436. package/src/runtime/blocks.js +0 -30
  437. package/src/runtime/blocks.js.map +0 -1
  438. package/src/runtime/collaboration.js +0 -45
  439. package/src/runtime/collaboration.js.map +0 -1
  440. package/src/runtime/delivery/DocumentField.js +0 -23
  441. package/src/runtime/delivery/DocumentField.js.map +0 -1
  442. package/src/runtime/delivery/DocumentRenderer.js +0 -61
  443. package/src/runtime/delivery/DocumentRenderer.js.map +0 -1
  444. package/src/runtime/delivery/DocumentScope.js +0 -41
  445. package/src/runtime/delivery/DocumentScope.js.map +0 -1
  446. package/src/runtime/delivery/blocks.js +0 -8
  447. package/src/runtime/delivery/blocks.js.map +0 -1
  448. package/src/runtime/delivery/context.js +0 -12
  449. package/src/runtime/delivery/context.js.map +0 -1
  450. package/src/runtime/delivery/document-page.js +0 -21
  451. package/src/runtime/delivery/document-page.js.map +0 -1
  452. package/src/runtime/delivery/document.js +0 -43
  453. package/src/runtime/delivery/document.js.map +0 -1
  454. package/src/runtime/delivery/error.js +0 -11
  455. package/src/runtime/delivery/error.js.map +0 -1
  456. package/src/runtime/delivery/plugin.js +0 -99
  457. package/src/runtime/delivery/plugin.js.map +0 -1
  458. package/src/runtime/delivery/preview.d.ts +0 -11
  459. package/src/runtime/delivery/preview.js +0 -6
  460. package/src/runtime/delivery/preview.js.map +0 -1
  461. package/src/runtime/delivery/types.d.ts +0 -2
  462. package/src/runtime/delivery/types.js +0 -1
  463. package/src/runtime/delivery/useCmsDocumentSeo.d.ts +0 -67
  464. package/src/runtime/delivery/useCmsDocumentSeo.js.map +0 -1
  465. package/src/runtime/delivery/useDocument.d.ts +0 -6
  466. package/src/runtime/delivery/useDocument.js +0 -23
  467. package/src/runtime/delivery/useDocument.js.map +0 -1
  468. package/src/runtime/delivery/useDocumentQuery.d.ts +0 -7
  469. package/src/runtime/delivery/useDocumentQuery.js +0 -29
  470. package/src/runtime/delivery/useDocumentQuery.js.map +0 -1
  471. package/src/runtime/forms/document.js +0 -38
  472. package/src/runtime/forms/document.js.map +0 -1
  473. package/src/runtime/forms/useCmsForm.js +0 -257
  474. package/src/runtime/forms/useCmsForm.js.map +0 -1
  475. package/src/runtime/i18n/translator.js +0 -51
  476. package/src/runtime/i18n/translator.js.map +0 -1
  477. package/src/runtime/i18n/useCmsI18n.d.ts +0 -13
  478. package/src/runtime/i18n/useCmsI18n.js +0 -38
  479. package/src/runtime/i18n/useCmsI18n.js.map +0 -1
  480. package/src/runtime/installation.js +0 -3
  481. package/src/runtime/plugin.js.map +0 -1
  482. package/src/runtime/preview/CmsStudioPreviewMarker.js +0 -29
  483. package/src/runtime/preview/CmsStudioPreviewMarker.js.map +0 -1
  484. package/src/runtime/preview/comark-document.js +0 -37
  485. package/src/runtime/preview/comark-document.js.map +0 -1
  486. package/src/runtime/preview/connection.js +0 -3
  487. package/src/runtime/preview/controller.js +0 -265
  488. package/src/runtime/preview/controller.js.map +0 -1
  489. package/src/runtime/preview/crypto.js +0 -16
  490. package/src/runtime/preview/crypto.js.map +0 -1
  491. package/src/runtime/preview/overlay.js +0 -122
  492. package/src/runtime/preview/overlay.js.map +0 -1
  493. package/src/runtime/preview/plugin.client.js +0 -68
  494. package/src/runtime/preview/plugin.client.js.map +0 -1
  495. package/src/runtime/preview/preview.css +0 -91
  496. package/src/runtime/preview/protocol.d.ts +0 -16
  497. package/src/runtime/preview/protocol.js +0 -23
  498. package/src/runtime/preview/protocol.js.map +0 -1
  499. package/src/runtime/preview/regions.js +0 -142
  500. package/src/runtime/preview/regions.js.map +0 -1
  501. package/src/runtime/preview/store.js +0 -4
  502. package/src/runtime/sitemap-entries.js +0 -17
  503. package/src/runtime/sitemap-entries.js.map +0 -1
  504. package/src/runtime/sitemap.js +0 -23
  505. package/src/runtime/sitemap.js.map +0 -1
  506. package/src/runtime/studio-app.js +0 -17
  507. package/src/runtime/studio-app.js.map +0 -1
  508. package/src/runtime/studio-document.js +0 -46
  509. package/src/runtime/studio-document.js.map +0 -1
  510. package/src/runtime/studio-entry.js +0 -19
  511. package/src/runtime/studio-entry.js.map +0 -1
  512. package/src/runtime/studio-navigation.js +0 -11
  513. package/src/runtime/studio-navigation.js.map +0 -1
  514. package/src/scalars-CA6kyipS.d.ts +0 -7
  515. package/src/scalars-CVZqT3L0.js +0 -22
  516. package/src/scalars-CVZqT3L0.js.map +0 -1
  517. package/src/store-X1e1o_MF.js +0 -209
  518. package/src/store-X1e1o_MF.js.map +0 -1
  519. package/src/types-DZ0IV-Ow.d.ts +0 -101
  520. package/studio/CreateDocumentDialog-BpjBYGfI.js +0 -335
  521. package/studio/SelectMenu-KiXwx4Y_.js +0 -34032
  522. package/studio/collaboration-DcK2F6v9.js +0 -4566
  523. package/studio/editor-P2rB7Csp.js +0 -30128
  524. package/studio/rolldown-runtime-Dy4uBu1J.js +0 -11
@@ -0,0 +1,923 @@
1
+ import { bt as e, dt as t, ft as n, gt as r, m as i, pt as a, t as o } from "./Button-BT3ztSPx.js";
2
+ import { st as s } from "./Search-BEgCe9Aj.js";
3
+ import { a as c, d as l, k as u, n as d, r as f } from "./studioContext-I8HozGU1.js";
4
+ import { _ as p, g as ee } from "./useApi-CUWMwLLw-B3Q3g2nf.js";
5
+ import { $r as te, A as m, B as ne, Ci as h, Cr as g, E as _, K as v, M as y, N as b, Nn as re, Or as x, Pn as ie, R as ae, V as S, Yr as oe, fa as C, gn as w, hr as se, k as T, o as E, ra as D, ui as O, vi as k } from "./runtime-core.esm-bundler-DKFA9Rep.js";
6
+ import { t as ce } from "./Select-B50WZMW-.js";
7
+ import { n as le } from "./overlay-DnqFLZTc.js";
8
+ import { t as ue } from "./DropdownMenu-CA9fB0uZ.js";
9
+ import { t as de } from "./Pagination-D9BSo5H2.js";
10
+ import { t as fe } from "./notifications-OKOLc40v.js";
11
+ import { n as pe, t as me } from "./MediaUploadPanel-C7Kyg6aR.js";
12
+ import { t as he } from "./Alert-D0D24z_a.js";
13
+ import { n as ge, t as _e } from "./mediaRoute--8cY8rUe.js";
14
+ import { c as ve, i as ye, n as be, o as xe, r as Se, s as Ce } from "./presentation-DF83w0hE.js";
15
+ import { t as we } from "./Modal-D6hSvxHd.js";
16
+ import { t as Te } from "./usePointerMotion-DwRcwBNQ.js";
17
+ import { t as Ee } from "./MediaFolderDialog-DYu-eu-q.js";
18
+ import { t as De } from "./Slideover-QMMHAAys.js";
19
+ import { t as Oe } from "./StudioPage-ngEIDr5d.js";
20
+ import { n as ke, r as Ae, t as je } from "./StudioPageToolbar-BwHnqyr6.js";
21
+ import { t as Me } from "./Skeleton-COz8dcrw.js";
22
+ //#region src/media/videoThumbnail.ts
23
+ var A = "cms-video-thumbnails-v1", Ne = 96, j = 524288, M = Promise.resolve();
24
+ async function Pe(e, t) {
25
+ let n = new URL(`/_cms/video-thumbnail/${e.id}`, location.origin);
26
+ n.searchParams.set("source", e.sha256);
27
+ let r = await globalThis.caches?.open(A).catch(() => void 0), i = await N(r, n.href);
28
+ if (t.throwIfAborted(), i) return i;
29
+ let a = M.then(async () => {
30
+ t.throwIfAborted();
31
+ let i = await N(r, n.href);
32
+ if (t.throwIfAborted(), i) return i;
33
+ let a = await F(e.url, t);
34
+ return t.throwIfAborted(), await P(r, n.href, a), a;
35
+ });
36
+ return M = a.then(() => void 0).catch(() => void 0), a;
37
+ }
38
+ async function N(e, t) {
39
+ try {
40
+ let n = await (await e?.match(t))?.blob();
41
+ return n?.type === "image/jpeg" && n.size > 0 && n.size <= j ? n : void 0;
42
+ } catch {
43
+ return;
44
+ }
45
+ }
46
+ async function P(e, t, n) {
47
+ if (e) try {
48
+ await e.put(t, new Response(n));
49
+ let r = await e.keys(), i = r.slice(0, Math.max(0, r.length - Ne));
50
+ for (let t of i) await e.delete(t);
51
+ } catch {}
52
+ }
53
+ function F(e, t) {
54
+ return new Promise((n, r) => {
55
+ let i = document.createElement("video");
56
+ i.preload = "auto", i.muted = !0, i.playsInline = !0, i.crossOrigin = "anonymous";
57
+ let a = 0, o = !1, s = !1, c = !1, l = (e) => {
58
+ c || (c = !0, clearTimeout(d), t.removeEventListener("abort", u), i.removeEventListener("loadedmetadata", f), i.removeEventListener("loadeddata", p), i.removeEventListener("seeked", p), i.removeEventListener("error", u), i.removeAttribute("src"), i.load(), e && e.size > 0 && e.size <= j ? n(e) : r(/* @__PURE__ */ Error("Video preview unavailable.")));
59
+ }, u = () => l(), d = setTimeout(u, 1e4);
60
+ function f() {
61
+ o = !0, a = +(i.duration > 1), i.currentTime = a, p();
62
+ }
63
+ function p() {
64
+ if (!o || s || i.seeking || i.readyState < 2 || i.currentTime !== a) return;
65
+ if (!i.videoWidth || !i.videoHeight) return l();
66
+ s = !0;
67
+ let e = document.createElement("canvas"), t = Math.min(1, 480 / Math.max(i.videoWidth, i.videoHeight));
68
+ e.width = Math.max(1, Math.round(i.videoWidth * t)), e.height = Math.max(1, Math.round(i.videoHeight * t));
69
+ try {
70
+ let t = e.getContext("2d");
71
+ if (!t) return l();
72
+ t.drawImage(i, 0, 0, e.width, e.height), e.toBlob((e) => l(e ?? void 0), "image/jpeg", .75);
73
+ } catch {
74
+ l();
75
+ }
76
+ }
77
+ if (t.addEventListener("abort", u, { once: !0 }), i.addEventListener("loadedmetadata", f), i.addEventListener("loadeddata", p), i.addEventListener("seeked", p), i.addEventListener("error", u), t.aborted) return l();
78
+ i.src = e, i.load();
79
+ });
80
+ }
81
+ //#endregion
82
+ //#region src/media/useVideoThumbnail.ts
83
+ function Fe(t, n) {
84
+ let r = O(), i = O(!1), a = e(r);
85
+ return g([
86
+ () => k(t).id,
87
+ () => k(t).sha256,
88
+ () => k(t).url,
89
+ () => k(n)
90
+ ], async (e, a, o) => {
91
+ if (r.value = void 0, i.value = !1, !k(n)) return;
92
+ let s = new AbortController();
93
+ o(() => s.abort());
94
+ try {
95
+ let e = await Pe(k(t), s.signal);
96
+ s.signal.aborted || (r.value = e);
97
+ } catch {
98
+ s.signal.aborted || (i.value = !0);
99
+ }
100
+ }, { immediate: !0 }), {
101
+ url: a,
102
+ failed: i
103
+ };
104
+ }
105
+ //#endregion
106
+ //#region src/media/MediaVideoThumbnail.vue?vue&type=script&setup=true&lang.ts
107
+ var I = ["src", "alt"], L = {
108
+ key: 1,
109
+ class: "flex flex-col items-center justify-center gap-2 text-center"
110
+ }, R = {
111
+ key: 0,
112
+ class: "block text-sm"
113
+ }, Ie = /* @__PURE__ */ v({
114
+ __name: "MediaVideoThumbnail",
115
+ props: {
116
+ asset: {},
117
+ contain: {
118
+ type: Boolean,
119
+ default: !1
120
+ },
121
+ small: {
122
+ type: Boolean,
123
+ default: !1
124
+ }
125
+ },
126
+ setup(e) {
127
+ let { t } = s(), n = e, a = O(), o = O(!1);
128
+ r(a, ([e]) => {
129
+ e?.isIntersecting && (o.value = !0);
130
+ });
131
+ let { url: c, failed: l } = Fe(() => n.asset, o);
132
+ return (n, r) => {
133
+ let o = i;
134
+ return w(), b("span", {
135
+ ref_key: "element",
136
+ ref: a,
137
+ class: "grid size-full place-items-center text-muted"
138
+ }, [h(c) && !h(l) ? (w(), b("img", {
139
+ key: 0,
140
+ src: h(c),
141
+ alt: e.contain ? e.asset.name : "",
142
+ class: D(["size-full", e.contain ? "object-contain" : "object-cover"]),
143
+ onError: r[0] ||= (e) => l.value = !0
144
+ }, null, 42, I)) : (w(), b("span", L, [S(o, {
145
+ name: "i-lucide-video",
146
+ class: D(e.small ? "size-5" : "size-8")
147
+ }, null, 8, ["class"]), e.contain && h(l) ? (w(), b("span", R, C(h(t)("media-asset-details.preview-unavailable")), 1)) : y("", !0)]))], 512);
148
+ };
149
+ }
150
+ }), z = ["src", "alt"], Le = ["aria-label"], Re = ["src", "title"], B = {
151
+ key: 3,
152
+ class: "flex flex-col items-center justify-center gap-2 px-5 text-center text-sm text-muted"
153
+ }, ze = { class: "mt-5 wrap-anywhere text-base font-semibold text-highlighted" }, Be = { class: "mt-1 text-xs text-muted" }, Ve = { class: "mt-6 grid grid-cols-2 gap-y-3 text-sm" }, V = { class: "text-muted" }, H = { class: "wrap-anywhere" }, He = { class: "text-muted" }, U = { class: "text-muted" }, Ue = /* @__PURE__ */ v({
154
+ __name: "MediaAssetDetails",
155
+ props: { asset: {} },
156
+ setup(e) {
157
+ let { t, date: n, number: r, locale: a } = s(), o = e, c = O(""), l = O(!1), u = navigator.pdfViewerEnabled !== !1, d = _(() => `${o.asset.url}?v=${encodeURIComponent(o.asset.updatedAt)}`);
158
+ g([() => o.asset.id, () => o.asset.updatedAt], () => {
159
+ c.value = "", l.value = !1;
160
+ });
161
+ function f(e) {
162
+ let t = e.target;
163
+ t instanceof HTMLImageElement && (c.value = `${r(t.naturalWidth, { useGrouping: !1 })} × ${r(t.naturalHeight, { useGrouping: !1 })}`);
164
+ }
165
+ return (r, o) => {
166
+ let s = i;
167
+ return w(), b("div", null, [
168
+ T("div", { class: D(["flex aspect-4/3 items-center justify-center overflow-hidden rounded-lg border border-default", e.asset.mimeType.startsWith("image/") && !l.value ? "bg-white" : "bg-muted/30"]) }, [e.asset.mimeType.startsWith("image/") && !l.value ? (w(), b("img", {
169
+ key: d.value,
170
+ src: d.value,
171
+ alt: e.asset.name,
172
+ class: "max-h-full max-w-full object-contain",
173
+ onLoad: f,
174
+ onError: o[0] ||= (e) => l.value = !0
175
+ }, null, 40, z)) : e.asset.mimeType.startsWith("video/") && !l.value ? (w(), m(Ie, {
176
+ key: 1,
177
+ asset: e.asset,
178
+ contain: ""
179
+ }, null, 8, ["asset"])) : e.asset.mimeType === "application/pdf" && u && !l.value ? (w(), b("div", {
180
+ key: 2,
181
+ class: "size-full bg-white",
182
+ role: "img",
183
+ "aria-label": h(t)("media.pdf-preview", { name: e.asset.name })
184
+ }, [(w(), b("iframe", {
185
+ key: d.value,
186
+ src: `${d.value}#page=1&view=Fit&toolbar=0&navpanes=0`,
187
+ title: h(t)("media.pdf-preview", { name: e.asset.name }),
188
+ class: "pointer-events-none size-full border-0",
189
+ tabindex: "-1",
190
+ "aria-hidden": "true",
191
+ inert: "",
192
+ onError: o[1] ||= (e) => l.value = !0
193
+ }, null, 40, Re))], 8, Le)) : (w(), b("div", B, [S(s, {
194
+ name: l.value ? "i-lucide-image-off" : "i-lucide-file-text",
195
+ class: "size-8 shrink-0"
196
+ }, null, 8, ["name"]), T("p", null, C(l.value ? h(t)("media-asset-details.preview-unavailable") : h(t)("media-asset-details.pdf-document")), 1)]))], 2),
197
+ T("h2", ze, C(e.asset.name), 1),
198
+ T("p", Be, C(e.asset.mimeType.startsWith("video/") ? h(t)("media-asset-details.video") : e.asset.mimeType === "application/pdf" ? h(t)("media-asset-details.pdf-document") : c.value || h(t)("media-asset-details.image")) + " · " + C(h(Se)(e.asset.byteSize, h(a), h(t))), 1),
199
+ ie(r.$slots, "default"),
200
+ T("dl", Ve, [
201
+ T("dt", V, C(h(t)("media-asset-details.folder")), 1),
202
+ T("dd", H, C(e.asset.folder || h(t)("media-asset-details.no-folder")), 1),
203
+ T("dt", He, C(h(t)("media-asset-details.format")), 1),
204
+ T("dd", null, C(e.asset.mimeType.split("/")[1]?.toUpperCase()), 1),
205
+ T("dt", U, C(h(t)("media-asset-details.uploaded")), 1),
206
+ T("dd", null, C(h(n)(e.asset.createdAt)), 1)
207
+ ])
208
+ ]);
209
+ };
210
+ }
211
+ }), We = { class: "mt-5 flex flex-wrap gap-2" }, Ge = /* @__PURE__ */ v({
212
+ __name: "MediaAssetActions",
213
+ props: {
214
+ asset: {},
215
+ readonly: { type: Boolean }
216
+ },
217
+ emits: ["copy", "remove"],
218
+ setup(e, { emit: t }) {
219
+ let { t: n } = s(), r = t;
220
+ return (t, i) => {
221
+ let a = o, s = ue;
222
+ return w(), b("div", We, [
223
+ S(a, {
224
+ color: "neutral",
225
+ size: "sm",
226
+ label: h(n)("media-asset-actions.copy-link"),
227
+ onClick: i[0] ||= (e) => r("copy")
228
+ }, null, 8, ["label"]),
229
+ S(a, {
230
+ color: "neutral",
231
+ size: "sm",
232
+ variant: "outline",
233
+ label: h(n)("media-asset-actions.open"),
234
+ "trailing-icon": "i-lucide-arrow-up-right",
235
+ to: e.asset.url,
236
+ target: "_blank"
237
+ }, null, 8, ["label", "to"]),
238
+ e.readonly ? y("", !0) : (w(), m(s, {
239
+ key: 0,
240
+ items: [{
241
+ label: h(n)("media-asset-actions.delete-file"),
242
+ icon: "i-lucide-trash-2",
243
+ color: "error",
244
+ onSelect: () => r("remove")
245
+ }]
246
+ }, {
247
+ default: x(() => [S(a, {
248
+ color: "neutral",
249
+ size: "sm",
250
+ variant: "ghost",
251
+ icon: "i-lucide-ellipsis",
252
+ "aria-label": h(n)("media-asset-actions.more-media-actions")
253
+ }, null, 8, ["aria-label"])]),
254
+ _: 1
255
+ }, 8, ["items"]))
256
+ ]);
257
+ };
258
+ }
259
+ });
260
+ //#endregion
261
+ //#region src/media/useMediaDropZone.ts
262
+ function Ke(e, n) {
263
+ a(e, [
264
+ "dragenter",
265
+ "dragover",
266
+ "dragleave",
267
+ "drop"
268
+ ], (e) => {
269
+ Array.from(e.dataTransfer?.types ?? []).includes("Files") || e.stopImmediatePropagation();
270
+ });
271
+ let { isOverDropZone: r } = t(e, { onDrop(e) {
272
+ !k(n.disabled) && e?.length && n.onDrop(e);
273
+ } });
274
+ return a(e, [
275
+ "dragenter",
276
+ "dragover",
277
+ "dragleave",
278
+ "drop"
279
+ ], (e) => {
280
+ k(n.disabled) && e.dataTransfer && (e.dataTransfer.dropEffect = "none");
281
+ }), _(() => !k(n.disabled) && r.value);
282
+ }
283
+ //#endregion
284
+ //#region src/media/MediaView.vue?vue&type=script&setup=true&lang.ts
285
+ var qe = ["aria-hidden"], Je = { class: "text-center" }, Ye = { class: "mt-3 font-medium" }, Xe = { class: "mt-2 text-sm text-muted" }, Ze = ["aria-label"], Qe = ["aria-label"], $e = ["aria-busy"], et = { class: "min-w-0 truncate text-sm text-muted" }, tt = { class: "ml-auto flex flex-wrap items-center gap-1" }, nt = ["aria-label"], rt = [
286
+ "aria-label",
287
+ "aria-pressed",
288
+ "onClick"
289
+ ], it = { class: "flex size-12 shrink-0 items-center justify-center overflow-hidden rounded bg-muted/50" }, at = ["src", "onError"], ot = { class: "min-w-0 space-y-1" }, st = { class: "block line-clamp-2 [overflow-wrap:anywhere] font-medium text-highlighted" }, ct = { class: "block text-xs text-muted" }, lt = { class: "text-sm text-muted [overflow-wrap:anywhere]" }, ut = { class: "text-sm whitespace-nowrap tabular-nums text-muted" }, dt = { class: "grid grid-cols-[repeat(auto-fill,minmax(min(100%,10rem),1fr))] gap-x-4 gap-y-6" }, ft = [
290
+ "aria-label",
291
+ "aria-pressed",
292
+ "onClick"
293
+ ], pt = ["src", "onError"], mt = {
294
+ key: 2,
295
+ class: "grid size-full place-items-center text-muted"
296
+ }, ht = {
297
+ key: 3,
298
+ class: "absolute right-2 top-2 grid size-6 place-items-center rounded-full bg-inverted text-inverted"
299
+ }, gt = {
300
+ key: 4,
301
+ class: "absolute bottom-2 left-2 rounded bg-default/90 px-2 py-1 text-xs text-highlighted"
302
+ }, _t = { class: "mt-3 block min-w-0" }, vt = ["title"], yt = { class: "mt-1 block truncate text-xs text-muted" }, bt = {
303
+ key: 2,
304
+ class: "mt-6 flex flex-wrap items-center justify-between gap-3"
305
+ }, xt = { class: "text-xs tabular-nums text-muted" }, St = ["aria-label"], Ct = { class: "sticky top-5" }, wt = {
306
+ key: 1,
307
+ class: "grid min-h-64 place-items-center text-center text-sm text-muted"
308
+ }, Tt = { class: "space-y-4" }, Et = {
309
+ key: 1,
310
+ class: "flex min-w-0 items-center gap-3 rounded-md border border-default p-3"
311
+ }, Dt = ["src"], Ot = {
312
+ key: 1,
313
+ class: "grid size-12 shrink-0 place-items-center rounded bg-muted"
314
+ }, kt = { class: "truncate text-sm font-medium" }, At = { class: "text-sm text-muted" }, jt = { class: "flex w-full justify-end gap-2" }, W = 48, Mt = /* @__PURE__ */ v({
315
+ __name: "MediaView",
316
+ setup(e) {
317
+ let { t, locale: r } = s(), a = c(), v = f(), ie = l(), k = d(), { pointer: A } = Te(), Ne = _(() => k.user.role === "viewer"), j = O(1), { assets: M, folders: Pe, selected: N, search: P, folder: F, kind: Fe, total: I, sort: L, loading: R, error: z, load: Le, settled: Re, selectAsset: B } = pe({
318
+ selectFirst: !1,
319
+ limit: W,
320
+ page: j
321
+ }), ze = ee(), Be = p(), Ve = O(!1), V = fe(), H = O(/* @__PURE__ */ new Set());
322
+ function He(e) {
323
+ H.value = /* @__PURE__ */ new Set([...H.value, e]);
324
+ }
325
+ let U = _(() => ge(ze.query)), We = _(() => U.value.folder === void 0 ? ye(t).find((e) => e.value === U.value.kind)?.label ?? v.navigation.media : U.value.folder || t("media-asset-details.no-folder"));
326
+ function Mt() {
327
+ F.value = U.value.folder, Fe.value = U.value.kind ?? "", P.value = U.value.search, B(null);
328
+ }
329
+ g(() => ze.fullPath, Mt, { immediate: !0 }), g([
330
+ I,
331
+ R,
332
+ z
333
+ ], ([e, t, n]) => {
334
+ !t && !n && (j.value = Math.min(j.value, Math.max(1, Math.ceil(e / W))));
335
+ });
336
+ let Nt = !0;
337
+ te(() => {
338
+ Nt = !1;
339
+ }), g([
340
+ P,
341
+ F,
342
+ Fe,
343
+ L
344
+ ], () => {
345
+ j.value = 1, Z.value = !1;
346
+ }, { flush: "sync" }), g(j, () => {
347
+ B(null), Z.value = !1;
348
+ });
349
+ function Pt(e) {
350
+ j.value = Math.max(1, Math.min(e, Math.ceil(I.value / W)));
351
+ }
352
+ function Ft(e) {
353
+ Be.push(_e(e));
354
+ }
355
+ function It() {
356
+ P.value = "", F.value = U.value.folder;
357
+ }
358
+ let G = _(() => !!P.value || F.value !== U.value.folder), Lt = _({
359
+ get: () => F.value === void 0 ? be : F.value || "/__unfiled__",
360
+ set: (e) => {
361
+ F.value = e === "/__all__" ? void 0 : e === "/__unfiled__" ? "" : e;
362
+ }
363
+ }), Rt = se("searchField");
364
+ function zt() {
365
+ P.value = "", Rt.value?.inputRef?.focus();
366
+ }
367
+ let Bt = se("assetInventory"), { width: Vt } = n(Bt), Ht = _(() => [
368
+ {
369
+ accessorKey: "name",
370
+ header: t("media.file")
371
+ },
372
+ {
373
+ accessorKey: "folder",
374
+ header: t("media-asset-details.folder")
375
+ },
376
+ {
377
+ accessorKey: "byteSize",
378
+ header: t("media-view.size")
379
+ }
380
+ ]), Ut = _(() => N.value ? { [N.value.id]: !0 } : {}), K = O(!1), q = O(!1), J = O(""), Y = O("grid"), Wt = O(), { width: Gt } = n(Wt), X = _(() => Gt.value >= 960), Z = O(!1), Kt = null, qt = O(null), Jt = O(null), Q = _(() => !Ne.value), Yt = Ke(Jt, {
381
+ disabled: () => !Q.value,
382
+ onDrop: (e) => $(e)
383
+ }), Xt = _(() => [
384
+ {
385
+ label: t("media-view.all-media"),
386
+ value: be
387
+ },
388
+ {
389
+ label: t("media-asset-details.no-folder"),
390
+ value: ve
391
+ },
392
+ ...Pe.value.map((e) => ({
393
+ label: e,
394
+ value: e
395
+ }))
396
+ ]), Zt = _(() => [
397
+ {
398
+ label: t("media-view.newest"),
399
+ value: "newest"
400
+ },
401
+ {
402
+ label: t("media-view.name"),
403
+ value: "name"
404
+ },
405
+ {
406
+ label: t("media-view.file-size"),
407
+ value: "size"
408
+ }
409
+ ]), Qt = _(() => [...M.value]), $t = _(() => !!P.value || F.value !== void 0 || !!Fe.value || R.value || M.value.length > 0);
410
+ async function en() {
411
+ j.value = 1;
412
+ try {
413
+ await Le();
414
+ } catch {}
415
+ }
416
+ g(N, () => {
417
+ N.value || (Z.value = !1);
418
+ });
419
+ function $(e) {
420
+ Q.value && qt.value?.open({
421
+ files: e,
422
+ folder: F.value
423
+ });
424
+ }
425
+ async function tn(e) {
426
+ P.value = "", L.value = "newest", j.value = 1;
427
+ let n = e.at(-1);
428
+ await Be.push({
429
+ name: "media",
430
+ query: n ? { folder: n.folder } : {}
431
+ }), Mt(), await Re();
432
+ let r = M.value.find((e) => e.id === n?.id) ?? n;
433
+ r && B(r), V.add({ title: t("media.uploaded", { count: e.length }) });
434
+ }
435
+ g(X, () => {
436
+ Z.value = !1;
437
+ });
438
+ function nn(e, t) {
439
+ Kt = t?.currentTarget instanceof HTMLElement ? t.currentTarget : null, B(e), X.value || (Z.value = !0);
440
+ }
441
+ function rn(e) {
442
+ Kt?.isConnected && (e.preventDefault(), Kt.focus());
443
+ }
444
+ async function an() {
445
+ if (!N.value) return;
446
+ let e = N.value;
447
+ try {
448
+ if (await navigator.clipboard.writeText(new URL(e.url, location.origin).href), !Nt || N.value?.id !== e.id) return;
449
+ V.add({ title: t("media-view.link-copied") });
450
+ } catch {
451
+ if (!Nt || N.value?.id !== e.id) return;
452
+ V.add({
453
+ title: t("media-view.could-not-copy-the-link"),
454
+ status: "error",
455
+ description: t("media-view.open-the-original-file-to-copy-its")
456
+ });
457
+ }
458
+ }
459
+ function on() {
460
+ J.value = "", q.value = !0;
461
+ }
462
+ async function sn() {
463
+ if (N.value && !K.value) {
464
+ K.value = !0, J.value = "";
465
+ try {
466
+ await ie.requests.media.remove({ params: { id: N.value.id } }), B(null), await Re(), q.value = !1, V.add({ title: t("media-view.file-deleted") });
467
+ } catch (e) {
468
+ J.value = a(e, t("media-view.could-not-delete-the-file"));
469
+ } finally {
470
+ K.value = !1;
471
+ }
472
+ }
473
+ }
474
+ return (e, n) => {
475
+ let a = i, s = o, c = he, l = le, d = ce, f = Me, p = ue, ee = Ae, te = de, g = De, _ = we;
476
+ return w(), b("div", {
477
+ ref_key: "dropZone",
478
+ ref: Jt,
479
+ class: "relative flex min-h-0 min-w-0 flex-1"
480
+ }, [
481
+ T("div", {
482
+ "aria-hidden": !h(Yt),
483
+ class: D(["pointer-events-none absolute inset-3 z-30 grid place-items-center rounded-xl border-2 border-dashed border-default bg-default/95 transition-opacity duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:duration-100", h(Yt) ? "opacity-100" : "opacity-0"])
484
+ }, [T("div", Je, [
485
+ S(a, {
486
+ name: "i-lucide-upload",
487
+ class: "size-10 text-muted"
488
+ }),
489
+ T("p", Ye, C(h(t)("media-view.drop-files-to-add-them")), 1),
490
+ T("p", Xe, C(h(t)("media-view.review-your-media-before-uploading")), 1)
491
+ ])], 10, qe),
492
+ S(Oe, {
493
+ title: We.value,
494
+ summary: h(R) ? h(t)("media-view.loading-media") : h(t)("media.count", { count: h(I) })
495
+ }, ae({
496
+ default: x(() => [h(z) ? (w(), m(c, {
497
+ key: 0,
498
+ role: "alert",
499
+ title: h(t)("media-picker.media-could-not-be-loaded"),
500
+ description: h(z),
501
+ color: "error",
502
+ variant: "subtle",
503
+ actions: [{
504
+ label: h(v).actions.retry,
505
+ color: "error",
506
+ variant: "soft",
507
+ onClick: en
508
+ }]
509
+ }, null, 8, [
510
+ "title",
511
+ "description",
512
+ "actions"
513
+ ])) : $t.value ? (w(), b(E, { key: 1 }, [S(je, null, {
514
+ default: x(() => [
515
+ S(l, {
516
+ ref_key: "searchField",
517
+ ref: Rt,
518
+ modelValue: h(P),
519
+ "onUpdate:modelValue": n[2] ||= (e) => oe(P) ? P.value = e : null,
520
+ icon: "i-lucide-search",
521
+ placeholder: h(t)("media-view.search-media"),
522
+ "aria-label": h(t)("media-view.search-media-and-folders"),
523
+ class: "w-full @min-[40rem]:w-80",
524
+ ui: { trailing: "pe-1" }
525
+ }, ae({ _: 2 }, [h(P) ? {
526
+ name: "trailing",
527
+ fn: x(() => [S(s, {
528
+ color: "neutral",
529
+ variant: "ghost",
530
+ size: "xs",
531
+ icon: "i-lucide-x",
532
+ "aria-label": h(t)("media-view.clear-search"),
533
+ onClick: zt
534
+ }, null, 8, ["aria-label"])]),
535
+ key: "0"
536
+ } : void 0]), 1032, [
537
+ "modelValue",
538
+ "placeholder",
539
+ "aria-label"
540
+ ]),
541
+ U.value.folder === void 0 ? (w(), m(d, {
542
+ key: 0,
543
+ modelValue: Lt.value,
544
+ "onUpdate:modelValue": n[3] ||= (e) => Lt.value = e,
545
+ items: Xt.value,
546
+ icon: "i-lucide-folder",
547
+ "aria-label": h(t)("media-picker.filter-by-folder"),
548
+ class: "min-w-0 flex-1 @min-[40rem]:flex-none @min-[40rem]:w-44"
549
+ }, null, 8, [
550
+ "modelValue",
551
+ "items",
552
+ "aria-label"
553
+ ])) : y("", !0),
554
+ G.value ? (w(), m(s, {
555
+ key: 1,
556
+ color: "neutral",
557
+ variant: "link",
558
+ size: "sm",
559
+ label: h(t)("media-view.clear-filters"),
560
+ onClick: It
561
+ }, null, 8, ["label"])) : y("", !0)
562
+ ]),
563
+ _: 1
564
+ }), T("div", {
565
+ ref_key: "libraryElement",
566
+ ref: Wt,
567
+ class: D(["grid min-w-0 gap-6", X.value ? "grid-cols-[minmax(0,1fr)_16.5rem]" : "grid-cols-1"])
568
+ }, [T("section", {
569
+ ref_key: "assetInventory",
570
+ ref: Bt,
571
+ class: "min-w-0",
572
+ "aria-label": h(v).navigation.media
573
+ }, [h(R) && !h(M).length ? (w(), b("div", {
574
+ key: 0,
575
+ class: "grid grid-cols-[repeat(auto-fill,minmax(min(100%,10rem),1fr))] gap-4",
576
+ "aria-label": h(t)("media-view.loading-media-2")
577
+ }, [(w(), b(E, null, re(6, (e) => T("div", { key: e }, [S(f, { class: "aspect-4/3 rounded-lg" }), S(f, { class: "mt-3 h-4 w-3/4" })])), 64))], 8, Qe)) : (w(), b("div", {
578
+ key: 1,
579
+ "aria-busy": h(R),
580
+ class: D(Y.value === "list" ? "overflow-hidden rounded-lg border border-default" : "")
581
+ }, [T("div", { class: D(["flex min-h-14 flex-wrap items-center gap-x-3 gap-y-2 border-default px-5 py-2.5", Y.value === "list" ? "border-b" : "mb-4"]) }, [T("span", et, C(h(N) ? h(N).name : h(t)("media-view.select-media-to-see-details")), 1), T("div", tt, [S(p, { items: Zt.value.map((e) => ({
582
+ label: e.label,
583
+ icon: h(L) === e.value ? "i-lucide-check" : void 0,
584
+ onSelect: () => L.value = e.value
585
+ })) }, {
586
+ default: x(() => [S(s, {
587
+ color: "neutral",
588
+ variant: "ghost",
589
+ size: "sm",
590
+ icon: "i-lucide-arrow-down-wide-narrow",
591
+ label: Zt.value.find((e) => e.value === h(L))?.label,
592
+ "trailing-icon": "i-lucide-chevron-down",
593
+ "aria-label": h(t)("media-view.sort-media")
594
+ }, null, 8, ["label", "aria-label"])]),
595
+ _: 1
596
+ }, 8, ["items"]), T("div", {
597
+ class: "flex gap-1",
598
+ role: "group",
599
+ "aria-label": h(t)("media-view.library-view")
600
+ }, [(w(), b(E, null, re(["grid", "list"], (e) => S(s, {
601
+ key: e,
602
+ color: "neutral",
603
+ variant: Y.value === e ? "soft" : "ghost",
604
+ icon: e === "grid" ? "i-lucide-layout-grid" : "i-lucide-list",
605
+ "aria-label": h(t)(e === "grid" ? "media.grid-view" : "media.list-view"),
606
+ "aria-pressed": Y.value === e,
607
+ size: "sm",
608
+ onClick: (t) => Y.value = e
609
+ }, null, 8, [
610
+ "variant",
611
+ "icon",
612
+ "aria-label",
613
+ "aria-pressed",
614
+ "onClick"
615
+ ])), 64))], 8, nt)])], 2), Y.value === "list" ? (w(), m(ke, {
616
+ key: 0,
617
+ data: Qt.value,
618
+ columns: Ht.value,
619
+ "get-row-id": (e) => e.id,
620
+ "row-selection": Ut.value,
621
+ ui: {
622
+ thead: h(Vt) < 720 ? "hidden" : "block",
623
+ tr: h(Vt) < 720 ? "grid grid-cols-1 data-[selected=true]:bg-muted/50" : "grid grid-cols-[minmax(0,3fr)_minmax(0,2fr)_7rem] data-[selected=true]:bg-muted/50",
624
+ td: "min-w-0 whitespace-normal align-top px-5 py-3"
625
+ }
626
+ }, {
627
+ "name-cell": x(({ row: e }) => [T("button", {
628
+ type: "button",
629
+ "aria-label": h(t)("media.file-name", {
630
+ name: e.original.name,
631
+ folder: e.original.folder || h(t)("media-asset-details.no-folder")
632
+ }),
633
+ "aria-pressed": h(N)?.id === e.original.id,
634
+ class: "flex w-full min-w-0 cursor-pointer items-center gap-3 text-left rounded focus-visible:outline-2 focus-visible:outline-highlighted",
635
+ onClick: (t) => nn(e.original, t)
636
+ }, [T("span", it, [e.original.mimeType.startsWith("image/") && !H.value.has(e.original.id) ? (w(), b("img", {
637
+ key: 0,
638
+ src: h(u)(e.original.id, {
639
+ width: 96,
640
+ height: 96,
641
+ fit: "cover",
642
+ format: "webp",
643
+ quality: 75
644
+ }),
645
+ alt: "",
646
+ loading: "lazy",
647
+ class: "size-full object-cover",
648
+ onError: (t) => He(e.original.id)
649
+ }, null, 40, at)) : (w(), m(a, {
650
+ key: 1,
651
+ name: e.original.mimeType.startsWith("video/") ? "i-lucide-video" : e.original.mimeType.startsWith("image/") ? "i-lucide-image-off" : "i-lucide-file-text",
652
+ class: "size-5 text-muted"
653
+ }, null, 8, ["name"]))]), T("span", ot, [T("span", st, C(e.original.name), 1), T("span", ct, C(e.original.mimeType.split("/")[1]?.toUpperCase()), 1)])], 8, rt)]),
654
+ "folder-cell": x(({ row: e }) => [T("p", lt, C(e.original.folder || h(t)("media-asset-details.no-folder")), 1)]),
655
+ "byteSize-cell": x(({ row: e }) => [T("p", ut, C(h(Se)(e.original.byteSize, h(r), h(t))), 1)]),
656
+ empty: x(() => [S(ee, {
657
+ title: G.value ? h(t)("media-view.no-matching-media") : h(t)("media-view.this-view-is-empty"),
658
+ description: G.value ? h(t)("media-view.try-another-search-or-clear-your-filters") : h(t)("media-view.upload-media-to-get-started"),
659
+ icon: "i-lucide-search",
660
+ variant: "naked",
661
+ class: "py-14",
662
+ actions: G.value ? [{
663
+ label: h(t)("media-view.clear-filters"),
664
+ color: "neutral",
665
+ variant: "outline",
666
+ onClick: It
667
+ }] : Q.value ? [{
668
+ label: h(t)("media-upload-panel.upload-media"),
669
+ color: "neutral",
670
+ onClick: () => $()
671
+ }] : []
672
+ }, null, 8, [
673
+ "title",
674
+ "description",
675
+ "actions"
676
+ ])]),
677
+ _: 1
678
+ }, 8, [
679
+ "data",
680
+ "columns",
681
+ "get-row-id",
682
+ "row-selection",
683
+ "ui"
684
+ ])) : (w(), b(E, { key: 1 }, [T("div", dt, [(w(!0), b(E, null, re(Qt.value, (e) => (w(), b("button", {
685
+ key: e.id,
686
+ type: "button",
687
+ class: "group min-w-0 cursor-pointer rounded-lg text-left focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-highlighted",
688
+ "aria-label": h(xe)(e),
689
+ "aria-pressed": h(N)?.id === e.id,
690
+ onClick: (t) => nn(e, t)
691
+ }, [T("span", { class: D(["relative block aspect-4/3 overflow-hidden rounded-lg ring-1 ring-inset", [
692
+ h(A) ? "transition-transform duration-100 ease-[cubic-bezier(0.23,1,0.32,1)] motion-safe:pointer-fine:group-active:scale-[0.98]" : "",
693
+ e.mimeType.startsWith("image/") && !H.value.has(e.id) ? "bg-white" : "bg-muted/30",
694
+ h(N)?.id === e.id ? "ring-2 ring-highlighted" : "ring-default group-hover:ring-accented"
695
+ ]]) }, [
696
+ e.mimeType.startsWith("image/") && !H.value.has(e.id) ? (w(), b("img", {
697
+ key: 0,
698
+ src: h(u)(e.id, {
699
+ width: 480,
700
+ height: 360,
701
+ fit: "cover",
702
+ format: "webp",
703
+ quality: 75
704
+ }),
705
+ alt: "",
706
+ loading: "lazy",
707
+ onError: (t) => He(e.id),
708
+ class: "size-full object-cover"
709
+ }, null, 40, pt)) : e.mimeType.startsWith("video/") ? (w(), m(Ie, {
710
+ key: 1,
711
+ asset: e
712
+ }, null, 8, ["asset"])) : (w(), b("span", mt, [S(a, {
713
+ name: e.mimeType.startsWith("image/") ? "i-lucide-image-off" : h(Ce)(e.mimeType),
714
+ class: "size-8"
715
+ }, null, 8, ["name"])])),
716
+ h(N)?.id === e.id ? (w(), b("span", ht, [S(a, {
717
+ name: "i-lucide-check",
718
+ class: "size-4"
719
+ })])) : y("", !0),
720
+ e.mimeType.startsWith("video/") ? (w(), b("span", gt, C(h(t)("media-asset-details.video")), 1)) : y("", !0)
721
+ ], 2), T("span", _t, [T("span", {
722
+ title: e.name,
723
+ class: "block truncate text-sm font-medium text-highlighted"
724
+ }, C(e.name), 9, vt), T("span", yt, C(e.folder || h(t)("media-asset-details.no-folder")), 1)])], 8, ft))), 128))]), Qt.value.length ? y("", !0) : (w(), m(ee, {
725
+ key: 0,
726
+ icon: "i-lucide-images",
727
+ title: G.value ? h(t)("media-view.no-matching-media") : h(t)("media-view.this-view-is-empty"),
728
+ description: G.value ? h(t)("media-view.try-another-search-or-clear-your-filters") : h(t)("media-view.upload-media-to-get-started"),
729
+ actions: G.value ? [{
730
+ label: h(t)("media-view.clear-filters"),
731
+ color: "neutral",
732
+ variant: "outline",
733
+ onClick: It
734
+ }] : Q.value ? [{
735
+ label: h(t)("media-upload-panel.upload-media"),
736
+ color: "neutral",
737
+ onClick: () => $()
738
+ }] : []
739
+ }, null, 8, [
740
+ "title",
741
+ "description",
742
+ "actions"
743
+ ]))], 64))], 10, $e)), h(I) > W ? (w(), b("div", bt, [T("p", xt, C(h(t)("media.range", {
744
+ start: (j.value - 1) * W + 1,
745
+ end: Math.min(j.value * W, h(I)),
746
+ count: h(I)
747
+ })), 1), S(te, {
748
+ page: j.value,
749
+ total: h(I),
750
+ "items-per-page": W,
751
+ "sibling-count": 0,
752
+ "show-edges": !1,
753
+ disabled: h(R),
754
+ size: "sm",
755
+ "onUpdate:page": Pt
756
+ }, null, 8, [
757
+ "page",
758
+ "total",
759
+ "disabled"
760
+ ])])) : y("", !0)], 8, Ze), X.value ? (w(), b("aside", {
761
+ key: 0,
762
+ class: "min-w-0 border-l border-default pl-6",
763
+ "aria-label": h(t)("media-view.media-details")
764
+ }, [T("div", Ct, [h(N) ? (w(), m(Ue, {
765
+ key: 0,
766
+ asset: h(N)
767
+ }, {
768
+ default: x(() => [S(Ge, {
769
+ asset: h(N),
770
+ readonly: Ne.value,
771
+ onCopy: an,
772
+ onRemove: on
773
+ }, null, 8, ["asset", "readonly"])]),
774
+ _: 1
775
+ }, 8, ["asset"])) : (w(), b("div", wt, C(h(t)("media-view.select-media-to-see-its-details")), 1))])], 8, St)) : y("", !0)], 2)], 64)) : (w(), m(ee, {
776
+ key: 2,
777
+ icon: "i-lucide-images",
778
+ title: h(t)("media-view.a-home-for-your-media"),
779
+ description: Q.value ? h(t)("media-view.add-images-videos-and-pdfs-here-then") : h(t)("media-view.media-uploaded-by-your-team-will-appear")
780
+ }, ae({ _: 2 }, [Q.value ? {
781
+ name: "actions",
782
+ fn: x(() => [S(s, {
783
+ color: "neutral",
784
+ label: h(t)("media-view.add-your-first-files"),
785
+ icon: "i-lucide-plus",
786
+ onClick: n[4] ||= (e) => $()
787
+ }, null, 8, ["label"])]),
788
+ key: "0"
789
+ } : void 0, Q.value ? {
790
+ name: "footer",
791
+ fn: x(() => [ne(C(h(t)("media-view.or-drop-files-anywhere-on-this-page")), 1)]),
792
+ key: "1"
793
+ } : void 0]), 1032, ["title", "description"]))]),
794
+ _: 2
795
+ }, [Q.value ? {
796
+ name: "actions",
797
+ fn: x(() => [S(s, {
798
+ color: "neutral",
799
+ variant: "outline",
800
+ icon: "i-lucide-folder-plus",
801
+ label: h(t)("media-folder-dialog.new-folder"),
802
+ onClick: n[0] ||= (e) => Ve.value = !0
803
+ }, null, 8, ["label"]), S(s, {
804
+ color: "neutral",
805
+ icon: "i-lucide-upload",
806
+ label: h(t)("media-upload-panel.upload-media"),
807
+ onClick: n[1] ||= (e) => $()
808
+ }, null, 8, ["label"])]),
809
+ key: "0"
810
+ } : void 0]), 1032, ["title", "summary"]),
811
+ X.value ? y("", !0) : (w(), m(g, {
812
+ key: 0,
813
+ open: Z.value,
814
+ "onUpdate:open": n[5] ||= (e) => Z.value = e,
815
+ transition: h(A),
816
+ title: h(t)("media-view.media-details"),
817
+ content: { onCloseAutoFocus: rn },
818
+ description: h(t)("media-view.preview-and-manage-this-media-asset"),
819
+ ui: { content: "max-w-sm" }
820
+ }, {
821
+ body: x(() => [h(z) ? (w(), m(c, {
822
+ key: 0,
823
+ role: "alert",
824
+ class: "mb-5",
825
+ description: h(z),
826
+ color: "error",
827
+ variant: "subtle"
828
+ }, null, 8, ["description"])) : y("", !0), h(N) ? (w(), m(Ue, {
829
+ key: 1,
830
+ asset: h(N)
831
+ }, {
832
+ default: x(() => [S(Ge, {
833
+ asset: h(N),
834
+ readonly: Ne.value,
835
+ onCopy: an,
836
+ onRemove: on
837
+ }, null, 8, ["asset", "readonly"])]),
838
+ _: 1
839
+ }, 8, ["asset"])) : y("", !0)]),
840
+ _: 1
841
+ }, 8, [
842
+ "open",
843
+ "transition",
844
+ "title",
845
+ "content",
846
+ "description"
847
+ ])),
848
+ S(Ee, {
849
+ open: Ve.value,
850
+ "onUpdate:open": n[6] ||= (e) => Ve.value = e,
851
+ onCreated: Ft
852
+ }, null, 8, ["open"]),
853
+ S(me, {
854
+ ref_key: "uploadPanel",
855
+ ref: qt,
856
+ onUploaded: tn
857
+ }, null, 512),
858
+ S(_, {
859
+ open: q.value,
860
+ "onUpdate:open": n[8] ||= (e) => q.value = e,
861
+ transition: h(A),
862
+ title: h(t)("media-view.delete-file"),
863
+ description: h(t)("media-view.this-permanently-deletes-the-file-from-your"),
864
+ dismissible: !K.value,
865
+ close: !K.value,
866
+ ui: { content: "max-w-md" }
867
+ }, {
868
+ body: x(() => [T("div", Tt, [
869
+ J.value ? (w(), m(c, {
870
+ key: 0,
871
+ role: "alert",
872
+ description: J.value,
873
+ color: "error",
874
+ variant: "subtle"
875
+ }, null, 8, ["description"])) : y("", !0),
876
+ h(N) ? (w(), b("div", Et, [h(N).mimeType.startsWith("image/") ? (w(), b("img", {
877
+ key: 0,
878
+ src: h(u)(h(N).id, {
879
+ width: 96,
880
+ height: 96,
881
+ format: "webp",
882
+ quality: 75
883
+ }),
884
+ alt: "",
885
+ class: "size-12 shrink-0 rounded object-contain"
886
+ }, null, 8, Dt)) : (w(), b("span", Ot, [S(a, {
887
+ name: h(Ce)(h(N).mimeType),
888
+ class: "size-5 text-muted"
889
+ }, null, 8, ["name"])])), T("p", kt, C(h(xe)(h(N))), 1)])) : y("", !0),
890
+ T("p", At, C(h(t)("media-view.files-used-on-a-page-cant-be")), 1)
891
+ ])]),
892
+ footer: x(() => [T("div", jt, [S(s, {
893
+ color: "neutral",
894
+ variant: "ghost",
895
+ label: h(v).actions.cancel,
896
+ disabled: K.value,
897
+ onClick: n[7] ||= (e) => q.value = !1
898
+ }, null, 8, ["label", "disabled"]), S(s, {
899
+ color: "error",
900
+ label: h(t)("media-asset-actions.delete-file"),
901
+ loading: K.value,
902
+ onClick: sn
903
+ }, null, 8, ["label", "loading"])])]),
904
+ _: 1
905
+ }, 8, [
906
+ "open",
907
+ "transition",
908
+ "title",
909
+ "description",
910
+ "dismissible",
911
+ "close"
912
+ ])
913
+ ], 512);
914
+ };
915
+ }
916
+ }), Nt = /* @__PURE__ */ v({
917
+ __name: "MediaPage",
918
+ setup(e) {
919
+ return (e, t) => (w(), m(Mt));
920
+ }
921
+ });
922
+ //#endregion
923
+ export { Nt as default };