chaipro 0.1.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 (392) hide show
  1. package/README.md +36 -0
  2. package/dist/IconPicker-I7VNLYZ4.js +5 -0
  3. package/dist/actions-DM00SIUk.d.cts +899 -0
  4. package/dist/actions-DM00SIUk.d.ts +899 -0
  5. package/dist/actions-registery-SEJTZE5Q.js +1 -0
  6. package/dist/active-in-another-tab-SONDAONP.js +1 -0
  7. package/dist/add-new-language-page-TI6DUYYX.js +1 -0
  8. package/dist/add-new-page-LBHXICXO.js +1 -0
  9. package/dist/ai-block-floating-prompt-input-ESY5GQLZ.js +1 -0
  10. package/dist/ai-panel-content-62I6FDQF.css +1 -0
  11. package/dist/ai-panel-content-UZJZ463W.js +1 -0
  12. package/dist/ai-panel-default-lang-2ZXZYQRT.js +6 -0
  13. package/dist/ai-panel-default-lang-ETFOFFEF.css +1 -0
  14. package/dist/ai-panel-for-image-LADQP6VY.js +1 -0
  15. package/dist/ai-panel-other-lang-WDLC3M2M.js +1 -0
  16. package/dist/ai-panel-page-chat-7ZISZWY4.js +4 -0
  17. package/dist/ai-panel-page-chat-N4YFJGAM.css +1 -0
  18. package/dist/ai-prompt-input-CPT5ETQ4.js +1 -0
  19. package/dist/ai-theme-generator-7PS4BX52.js +1 -0
  20. package/dist/ai-translation-prompt-3VE2ECGR.js +1 -0
  21. package/dist/blocks-CMvgDlxw.d.ts +72 -0
  22. package/dist/blocks-CP-Pngaz.d.cts +72 -0
  23. package/dist/build-config-CCERdThN.d.ts +80 -0
  24. package/dist/build-config-DrerOPd9.d.cts +80 -0
  25. package/dist/builder.cjs +243 -0
  26. package/dist/builder.css +1 -0
  27. package/dist/builder.d.cts +352 -0
  28. package/dist/builder.d.ts +352 -0
  29. package/dist/builder.js +1 -0
  30. package/dist/chaibuilder-instance-DNz3Q-dY.d.cts +579 -0
  31. package/dist/chaibuilder-instance-qroszVwI.d.ts +579 -0
  32. package/dist/change-password-modal-NJL7ZLTY.js +1 -0
  33. package/dist/chunk-2AFM6557.js +3 -0
  34. package/dist/chunk-2N4IJZOR.js +1 -0
  35. package/dist/chunk-2NYUIXUX.js +1 -0
  36. package/dist/chunk-2PJZUYIZ.js +1 -0
  37. package/dist/chunk-32HH35VD.js +1 -0
  38. package/dist/chunk-346H4FEX.js +1 -0
  39. package/dist/chunk-34HIOUTE.js +1 -0
  40. package/dist/chunk-374QEK4F.js +1 -0
  41. package/dist/chunk-3E72DJSP.js +1 -0
  42. package/dist/chunk-3IT7IIAV.js +1 -0
  43. package/dist/chunk-3UEPBBE4.js +11 -0
  44. package/dist/chunk-3XSKJBPH.js +1 -0
  45. package/dist/chunk-45ELAD2J.js +1 -0
  46. package/dist/chunk-4JBHWPMO.js +1 -0
  47. package/dist/chunk-4P25MV5E.js +1 -0
  48. package/dist/chunk-4PQNBY3V.js +1 -0
  49. package/dist/chunk-4VNLL2IA.js +1 -0
  50. package/dist/chunk-55SU3QPU.js +1 -0
  51. package/dist/chunk-5ZC65NB6.js +1 -0
  52. package/dist/chunk-6M7V7BOM.js +1 -0
  53. package/dist/chunk-6TXCHU4K.js +1 -0
  54. package/dist/chunk-777N6WHB.js +1 -0
  55. package/dist/chunk-7C4EQOAR.js +12 -0
  56. package/dist/chunk-7EXZXKW2.js +1 -0
  57. package/dist/chunk-7QWMLDCG.js +1 -0
  58. package/dist/chunk-AOJE5WI3.js +1 -0
  59. package/dist/chunk-ATLMLDBS.js +1 -0
  60. package/dist/chunk-AVGF3YLU.js +17 -0
  61. package/dist/chunk-BQSLQHLD.js +1 -0
  62. package/dist/chunk-BWORNCTE.js +1 -0
  63. package/dist/chunk-BYGD5CDT.js +1 -0
  64. package/dist/chunk-CA5PVX24.js +1 -0
  65. package/dist/chunk-CFNOB42V.js +1 -0
  66. package/dist/chunk-CJP3BQH2.js +1 -0
  67. package/dist/chunk-CRJENCPR.js +1 -0
  68. package/dist/chunk-D5SKCKSB.js +1 -0
  69. package/dist/chunk-DZ72OHTD.js +1 -0
  70. package/dist/chunk-EPGOG22Q.js +0 -0
  71. package/dist/chunk-ERCY63ZW.js +1 -0
  72. package/dist/chunk-ESCX7KEH.js +1 -0
  73. package/dist/chunk-F2V4N3LT.js +156 -0
  74. package/dist/chunk-F7YMHPEA.js +1 -0
  75. package/dist/chunk-FERH2TPR.js +1 -0
  76. package/dist/chunk-FLSV2QGU.js +1 -0
  77. package/dist/chunk-FOKGOT6B.js +1 -0
  78. package/dist/chunk-GJOOCKUE.js +1 -0
  79. package/dist/chunk-HA7LF3RV.js +1 -0
  80. package/dist/chunk-HAKJOMCL.js +1 -0
  81. package/dist/chunk-HEKCKC7N.js +1 -0
  82. package/dist/chunk-HELRVKD2.js +3 -0
  83. package/dist/chunk-I7ODKVVX.js +1 -0
  84. package/dist/chunk-IAKCX2WB.js +1 -0
  85. package/dist/chunk-IB2C3TWH.js +1 -0
  86. package/dist/chunk-IH562KSP.js +1 -0
  87. package/dist/chunk-IP4JBQOX.js +1 -0
  88. package/dist/chunk-ITX7QWN6.js +1 -0
  89. package/dist/chunk-IUACZ3E6.js +6 -0
  90. package/dist/chunk-J7Q62EP7.js +1 -0
  91. package/dist/chunk-JBB5IJFA.js +1 -0
  92. package/dist/chunk-JPJRO4NU.js +1 -0
  93. package/dist/chunk-JUIS55JT.js +1 -0
  94. package/dist/chunk-JYBTQ3YX.js +5 -0
  95. package/dist/chunk-K5YWQY4U.js +1 -0
  96. package/dist/chunk-K6RHR4HT.js +1 -0
  97. package/dist/chunk-LNV5MRGV.js +1 -0
  98. package/dist/chunk-LRJREWRD.js +1 -0
  99. package/dist/chunk-LWYDGDPW.js +1 -0
  100. package/dist/chunk-MDMGXS5B.js +1 -0
  101. package/dist/chunk-MEROMQQX.js +1 -0
  102. package/dist/chunk-N7Z4RFFI.js +1 -0
  103. package/dist/chunk-NSQEQYEM.js +1 -0
  104. package/dist/chunk-OD3K76M6.js +1 -0
  105. package/dist/chunk-ODSL3KXG.js +1 -0
  106. package/dist/chunk-OJJDRACB.js +1 -0
  107. package/dist/chunk-ONSZ462E.js +1 -0
  108. package/dist/chunk-OQZ4EPOM.js +1 -0
  109. package/dist/chunk-OR7KKUYT.js +1 -0
  110. package/dist/chunk-OSGXFZTA.js +1 -0
  111. package/dist/chunk-PM3JNOZH.js +1 -0
  112. package/dist/chunk-PQHFT4TE.js +1 -0
  113. package/dist/chunk-QGVCH2NI.js +1 -0
  114. package/dist/chunk-QIGSSVEY.js +1 -0
  115. package/dist/chunk-R5ZTCDFD.js +1 -0
  116. package/dist/chunk-RBDZDQZR.js +1 -0
  117. package/dist/chunk-ROQRBSK6.js +1 -0
  118. package/dist/chunk-SSENH35Y.js +1 -0
  119. package/dist/chunk-SYPALJAE.js +1 -0
  120. package/dist/chunk-T2YYNX6Z.js +1 -0
  121. package/dist/chunk-T32TW3XV.js +1 -0
  122. package/dist/chunk-T56KQBE2.js +1 -0
  123. package/dist/chunk-TEL5ACJE.js +1 -0
  124. package/dist/chunk-TGJQC6VC.js +1 -0
  125. package/dist/chunk-TQ34DGOT.js +1 -0
  126. package/dist/chunk-TVF77C53.js +1 -0
  127. package/dist/chunk-UIDBBTCZ.js +3 -0
  128. package/dist/chunk-VKSRWZCO.js +1 -0
  129. package/dist/chunk-VL5WBPVV.js +1 -0
  130. package/dist/chunk-VUWHFLT7.js +22 -0
  131. package/dist/chunk-WEVKAJMV.js +1 -0
  132. package/dist/chunk-WHPIYGCY.js +1 -0
  133. package/dist/chunk-WNESLH23.js +1 -0
  134. package/dist/chunk-WOT6VMZA.js +1 -0
  135. package/dist/chunk-WSQ5SQBD.js +1 -0
  136. package/dist/chunk-XY4UJKHE.js +1 -0
  137. package/dist/chunk-Y2BHO7OO.js +1 -0
  138. package/dist/chunk-YDOQEFOK.js +1 -0
  139. package/dist/chunk-YEFMD4DS.js +1 -0
  140. package/dist/chunk-YQ5QQCRD.js +1 -0
  141. package/dist/chunk-YQPOFRXU.js +1 -0
  142. package/dist/chunk-YTPQSO7V.js +801 -0
  143. package/dist/chunk-ZAU65LBG.js +1 -0
  144. package/dist/chunk-ZRFCEMYU.js +1 -0
  145. package/dist/chunk-ZU2B5YT6.js +1 -0
  146. package/dist/chunk-ZXKKBKGV.js +1 -0
  147. package/dist/code-display-7346IUCO.js +1 -0
  148. package/dist/code-editor-UBGTTX2L.js +1 -0
  149. package/dist/components/ui/accordion.cjs +1 -0
  150. package/dist/components/ui/accordion.d.cts +9 -0
  151. package/dist/components/ui/accordion.d.ts +9 -0
  152. package/dist/components/ui/accordion.js +1 -0
  153. package/dist/components/ui/alert-dialog.cjs +1 -0
  154. package/dist/components/ui/alert-dialog.d.cts +23 -0
  155. package/dist/components/ui/alert-dialog.d.ts +23 -0
  156. package/dist/components/ui/alert-dialog.js +1 -0
  157. package/dist/components/ui/alert.cjs +1 -0
  158. package/dist/components/ui/alert.d.cts +11 -0
  159. package/dist/components/ui/alert.d.ts +11 -0
  160. package/dist/components/ui/alert.js +1 -0
  161. package/dist/components/ui/avatar.cjs +1 -0
  162. package/dist/components/ui/avatar.d.cts +8 -0
  163. package/dist/components/ui/avatar.d.ts +8 -0
  164. package/dist/components/ui/avatar.js +1 -0
  165. package/dist/components/ui/badge.cjs +1 -0
  166. package/dist/components/ui/badge.d.cts +13 -0
  167. package/dist/components/ui/badge.d.ts +13 -0
  168. package/dist/components/ui/badge.js +1 -0
  169. package/dist/components/ui/button.cjs +1 -0
  170. package/dist/components/ui/button.d.cts +15 -0
  171. package/dist/components/ui/button.d.ts +15 -0
  172. package/dist/components/ui/button.js +1 -0
  173. package/dist/components/ui/card.cjs +1 -0
  174. package/dist/components/ui/card.d.cts +10 -0
  175. package/dist/components/ui/card.d.ts +10 -0
  176. package/dist/components/ui/card.js +1 -0
  177. package/dist/components/ui/checkbox.cjs +1 -0
  178. package/dist/components/ui/checkbox.d.cts +6 -0
  179. package/dist/components/ui/checkbox.d.ts +6 -0
  180. package/dist/components/ui/checkbox.js +1 -0
  181. package/dist/components/ui/command.cjs +1 -0
  182. package/dist/components/ui/command.d.cts +83 -0
  183. package/dist/components/ui/command.d.ts +83 -0
  184. package/dist/components/ui/command.js +1 -0
  185. package/dist/components/ui/context-menu.cjs +1 -0
  186. package/dist/components/ui/context-menu.d.cts +30 -0
  187. package/dist/components/ui/context-menu.d.ts +30 -0
  188. package/dist/components/ui/context-menu.js +1 -0
  189. package/dist/components/ui/dialog.cjs +1 -0
  190. package/dist/components/ui/dialog.d.cts +22 -0
  191. package/dist/components/ui/dialog.d.ts +22 -0
  192. package/dist/components/ui/dialog.js +1 -0
  193. package/dist/components/ui/dropdown-menu.cjs +1 -0
  194. package/dist/components/ui/dropdown-menu.d.cts +30 -0
  195. package/dist/components/ui/dropdown-menu.d.ts +30 -0
  196. package/dist/components/ui/dropdown-menu.js +1 -0
  197. package/dist/components/ui/hover-card.cjs +1 -0
  198. package/dist/components/ui/hover-card.d.cts +8 -0
  199. package/dist/components/ui/hover-card.d.ts +8 -0
  200. package/dist/components/ui/hover-card.js +1 -0
  201. package/dist/components/ui/input.cjs +1 -0
  202. package/dist/components/ui/input.d.cts +5 -0
  203. package/dist/components/ui/input.d.ts +5 -0
  204. package/dist/components/ui/input.js +1 -0
  205. package/dist/components/ui/label.cjs +1 -0
  206. package/dist/components/ui/label.d.cts +8 -0
  207. package/dist/components/ui/label.d.ts +8 -0
  208. package/dist/components/ui/label.js +1 -0
  209. package/dist/components/ui/loader.cjs +1 -0
  210. package/dist/components/ui/loader.d.cts +12 -0
  211. package/dist/components/ui/loader.d.ts +12 -0
  212. package/dist/components/ui/loader.js +1 -0
  213. package/dist/components/ui/navigation-menu.cjs +1 -0
  214. package/dist/components/ui/navigation-menu.d.cts +15 -0
  215. package/dist/components/ui/navigation-menu.d.ts +15 -0
  216. package/dist/components/ui/navigation-menu.js +1 -0
  217. package/dist/components/ui/popover.cjs +1 -0
  218. package/dist/components/ui/popover.d.cts +9 -0
  219. package/dist/components/ui/popover.d.ts +9 -0
  220. package/dist/components/ui/popover.js +1 -0
  221. package/dist/components/ui/progress.cjs +1 -0
  222. package/dist/components/ui/progress.d.cts +8 -0
  223. package/dist/components/ui/progress.d.ts +8 -0
  224. package/dist/components/ui/progress.js +1 -0
  225. package/dist/components/ui/scroll-area.cjs +1 -0
  226. package/dist/components/ui/scroll-area.d.cts +7 -0
  227. package/dist/components/ui/scroll-area.d.ts +7 -0
  228. package/dist/components/ui/scroll-area.js +1 -0
  229. package/dist/components/ui/select.cjs +1 -0
  230. package/dist/components/ui/select.d.cts +15 -0
  231. package/dist/components/ui/select.d.ts +15 -0
  232. package/dist/components/ui/select.js +1 -0
  233. package/dist/components/ui/separator.cjs +1 -0
  234. package/dist/components/ui/separator.d.cts +6 -0
  235. package/dist/components/ui/separator.d.ts +6 -0
  236. package/dist/components/ui/separator.js +1 -0
  237. package/dist/components/ui/sheet.cjs +1 -0
  238. package/dist/components/ui/sheet.d.cts +29 -0
  239. package/dist/components/ui/sheet.d.ts +29 -0
  240. package/dist/components/ui/sheet.js +1 -0
  241. package/dist/components/ui/skeleton.cjs +1 -0
  242. package/dist/components/ui/skeleton.d.cts +5 -0
  243. package/dist/components/ui/skeleton.d.ts +5 -0
  244. package/dist/components/ui/skeleton.js +1 -0
  245. package/dist/components/ui/slider.cjs +1 -0
  246. package/dist/components/ui/slider.d.cts +6 -0
  247. package/dist/components/ui/slider.d.ts +6 -0
  248. package/dist/components/ui/slider.js +1 -0
  249. package/dist/components/ui/switch.cjs +1 -0
  250. package/dist/components/ui/switch.d.cts +9 -0
  251. package/dist/components/ui/switch.d.ts +9 -0
  252. package/dist/components/ui/switch.js +1 -0
  253. package/dist/components/ui/tabs.cjs +1 -0
  254. package/dist/components/ui/tabs.d.cts +9 -0
  255. package/dist/components/ui/tabs.d.ts +9 -0
  256. package/dist/components/ui/tabs.js +1 -0
  257. package/dist/components/ui/textarea.cjs +1 -0
  258. package/dist/components/ui/textarea.d.cts +5 -0
  259. package/dist/components/ui/textarea.d.ts +5 -0
  260. package/dist/components/ui/textarea.js +1 -0
  261. package/dist/components/ui/toggle.cjs +1 -0
  262. package/dist/components/ui/toggle.d.cts +15 -0
  263. package/dist/components/ui/toggle.d.ts +15 -0
  264. package/dist/components/ui/toggle.js +1 -0
  265. package/dist/components/ui/tooltip.cjs +1 -0
  266. package/dist/components/ui/tooltip.d.cts +9 -0
  267. package/dist/components/ui/tooltip.d.ts +9 -0
  268. package/dist/components/ui/tooltip.js +1 -0
  269. package/dist/config-registry-RSJCAKY5.js +1 -0
  270. package/dist/continue-editing-in-this-client-QBMOFRLL.js +1 -0
  271. package/dist/core-BNe4bA6z.d.cts +5455 -0
  272. package/dist/core-BNe4bA6z.d.ts +5455 -0
  273. package/dist/css-import-modal-NMFRQGCY.js +13 -0
  274. package/dist/db/better-sqlite3.cjs +1 -0
  275. package/dist/db/better-sqlite3.d.cts +16 -0
  276. package/dist/db/better-sqlite3.d.ts +16 -0
  277. package/dist/db/better-sqlite3.js +1 -0
  278. package/dist/db/d1.cjs +1 -0
  279. package/dist/db/d1.d.cts +17 -0
  280. package/dist/db/d1.d.ts +17 -0
  281. package/dist/db/d1.js +1 -0
  282. package/dist/db/libsql.cjs +1 -0
  283. package/dist/db/libsql.d.cts +23 -0
  284. package/dist/db/libsql.d.ts +23 -0
  285. package/dist/db/libsql.js +1 -0
  286. package/dist/db/node-pg.cjs +1 -0
  287. package/dist/db/node-pg.d.cts +21 -0
  288. package/dist/db/node-pg.d.ts +21 -0
  289. package/dist/db/node-pg.js +1 -0
  290. package/dist/db/postgres.cjs +1 -0
  291. package/dist/db/postgres.d.cts +28 -0
  292. package/dist/db/postgres.d.ts +28 -0
  293. package/dist/db/postgres.js +1 -0
  294. package/dist/delete-page-CGR6VXZC.css +1 -0
  295. package/dist/delete-page-FQYTEMBN.js +1 -0
  296. package/dist/digital-asset-manager-PIZMJEMX.js +1 -0
  297. package/dist/digital-asset-manager-PSTDGMY2.css +1 -0
  298. package/dist/dispatch-action-3IV56BNY.js +1 -0
  299. package/dist/duplicate-page-HPPMQRL3.js +1 -0
  300. package/dist/dynamic-page-selector-LFHJQLYY.js +1 -0
  301. package/dist/dynamic-page-selector-SXJQAIGL.css +1 -0
  302. package/dist/edit-url-panel-Q3NJCV55.js +1 -0
  303. package/dist/get-blocks-styles-SLZ5NDUF.js +1 -0
  304. package/dist/get-page-styles-Q4FWW5LX.js +1 -0
  305. package/dist/image-editor-PLXDYVKE.css +1 -0
  306. package/dist/image-editor-RSEHWRGV.js +1 -0
  307. package/dist/json-diff-viewer-FQYK2FUX.js +8 -0
  308. package/dist/lang-panel-57UGEL6B.css +1 -0
  309. package/dist/lang-panel-HH5LEOF4.js +1 -0
  310. package/dist/license-overlay-4Q525E53.js +1 -0
  311. package/dist/log-ai-request-LHPKU2C5.js +1 -0
  312. package/dist/manage-design-tokens-264H25A2.js +1 -0
  313. package/dist/manage-design-tokens-modal-OIWIZ53K.js +1 -0
  314. package/dist/mark-as-template-7TCCEMGC.js +1 -0
  315. package/dist/nested-path-selector-content-N4XN7QUS.js +1 -0
  316. package/dist/nextjs/render-client.cjs +1 -0
  317. package/dist/nextjs/render-client.css +1 -0
  318. package/dist/nextjs/render-client.d.cts +14 -0
  319. package/dist/nextjs/render-client.d.ts +14 -0
  320. package/dist/nextjs/render-client.js +1 -0
  321. package/dist/nextjs/render.cjs +829 -0
  322. package/dist/nextjs/render.d.cts +78 -0
  323. package/dist/nextjs/render.d.ts +78 -0
  324. package/dist/nextjs/render.js +1 -0
  325. package/dist/nextjs/server.cjs +807 -0
  326. package/dist/nextjs/server.d.cts +329 -0
  327. package/dist/nextjs/server.d.ts +329 -0
  328. package/dist/nextjs/server.js +1 -0
  329. package/dist/nextjs.cjs +1 -0
  330. package/dist/nextjs.d.cts +17 -0
  331. package/dist/nextjs.d.ts +17 -0
  332. package/dist/nextjs.js +1 -0
  333. package/dist/no-language-page-content-NQIROTIL.js +1 -0
  334. package/dist/no-language-page-dialog-CWG5PI7N.js +1 -0
  335. package/dist/page-creator-2L6L6EFV.js +1 -0
  336. package/dist/page-lock-7HMG34UJ.js +1 -0
  337. package/dist/page-locked-dialog-ACMWVAZX.js +1 -0
  338. package/dist/page-manager-new-SCZFNGKO.js +1 -0
  339. package/dist/page-manager-new-VWRASZTI.css +1 -0
  340. package/dist/page-manager-search-and-filter-7CHPYAPV.js +1 -0
  341. package/dist/page-manager-sheet-KZZBKQ6M.js +1 -0
  342. package/dist/page-manager-sheet-U5YEB5CS.css +1 -0
  343. package/dist/page-revisions-content-DHPEQ4CA.js +1 -0
  344. package/dist/page-revisions-trigger-XGC4HOTL.js +1 -0
  345. package/dist/pages-DlMX1Lj2.d.cts +21 -0
  346. package/dist/pages-Dol4CXrN.d.ts +21 -0
  347. package/dist/payload/builder.cjs +243 -0
  348. package/dist/payload/builder.css +1 -0
  349. package/dist/payload/builder.d.cts +13 -0
  350. package/dist/payload/builder.d.ts +13 -0
  351. package/dist/payload/builder.js +1 -0
  352. package/dist/payload.cjs +807 -0
  353. package/dist/payload.d.cts +603 -0
  354. package/dist/payload.d.ts +603 -0
  355. package/dist/payload.js +1 -0
  356. package/dist/preview-banner-SDDZGGRW.js +1 -0
  357. package/dist/publish-pages-content-3AZ45DYH.js +1 -0
  358. package/dist/registry.cjs +11 -0
  359. package/dist/registry.d.cts +74 -0
  360. package/dist/registry.d.ts +74 -0
  361. package/dist/registry.js +1 -0
  362. package/dist/relations-DDBTFCMR.js +1 -0
  363. package/dist/revalidate-G2DEOH4Z.js +1 -0
  364. package/dist/rte-widget-modal-7RXFEYHK.js +1 -0
  365. package/dist/save-to-lib-65EGTZE5.js +1 -0
  366. package/dist/schema-IVNMPI4V.js +1 -0
  367. package/dist/schema.sqlite-CYBLikNv.d.cts +5852 -0
  368. package/dist/schema.sqlite-CYBLikNv.d.ts +5852 -0
  369. package/dist/seo-panel-WQ47FNP4.css +1 -0
  370. package/dist/seo-panel-Z6OBXHQ4.js +2 -0
  371. package/dist/server-config-b29G6_aQ.d.cts +116 -0
  372. package/dist/server-config-oPlt3V1X.d.ts +116 -0
  373. package/dist/state-RAP56WXS.js +1 -0
  374. package/dist/take-over-request-EB464ZGU.js +1 -0
  375. package/dist/translation-warning-modal-EES6I2QV.js +1 -0
  376. package/dist/types.cjs +1 -0
  377. package/dist/types.d.cts +38 -0
  378. package/dist/types.d.ts +38 -0
  379. package/dist/types.js +1 -0
  380. package/dist/unmark-as-template-6STMTBP5.js +1 -0
  381. package/dist/unpublish-page-CE3CJK5C.js +1 -0
  382. package/dist/unpublished-partials-modal-OZBWBCLN.js +1 -0
  383. package/dist/utils.cjs +1 -0
  384. package/dist/utils.d.cts +168 -0
  385. package/dist/utils.d.ts +168 -0
  386. package/dist/utils.js +1 -0
  387. package/dist/web-blocks.cjs +1 -0
  388. package/dist/web-blocks.d.cts +3 -0
  389. package/dist/web-blocks.d.ts +3 -0
  390. package/dist/web-blocks.js +1 -0
  391. package/dist/web-preview-EIWOXGPY.js +1 -0
  392. package/package.json +322 -0
@@ -0,0 +1,17 @@
1
+ import { NextConfig } from 'next';
2
+
3
+ /**
4
+ * Next.js config wrapper for ChaiBuilder.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * import { withChaiBuilder } from "~/nextjs";
9
+ *
10
+ * const nextConfig = { ... };
11
+ *
12
+ * export default withChaiBuilder(nextConfig);
13
+ * ```
14
+ */
15
+ declare function withChaiBuilder(nextConfig?: NextConfig): NextConfig;
16
+
17
+ export { withChaiBuilder };
@@ -0,0 +1,17 @@
1
+ import { NextConfig } from 'next';
2
+
3
+ /**
4
+ * Next.js config wrapper for ChaiBuilder.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * import { withChaiBuilder } from "~/nextjs";
9
+ *
10
+ * const nextConfig = { ... };
11
+ *
12
+ * export default withChaiBuilder(nextConfig);
13
+ * ```
14
+ */
15
+ declare function withChaiBuilder(nextConfig?: NextConfig): NextConfig;
16
+
17
+ export { withChaiBuilder };
package/dist/nextjs.js ADDED
@@ -0,0 +1 @@
1
+ import"./chunk-WOT6VMZA.js";function i(t={}){return t}export{i as withChaiBuilder};
@@ -0,0 +1 @@
1
+ import{a as u,b as p,c as h,e as w,f}from"./chunk-ERCY63ZW.js";import{a as d}from"./chunk-CA5PVX24.js";import"./chunk-PQHFT4TE.js";import"./chunk-YEFMD4DS.js";import{a as l}from"./chunk-T2YYNX6Z.js";import"./chunk-AOJE5WI3.js";import"./chunk-ONSZ462E.js";import{xa as g}from"./chunk-2NYUIXUX.js";import{a as m}from"./chunk-HA7LF3RV.js";import"./chunk-WEVKAJMV.js";import"./chunk-ZAU65LBG.js";import{b as i}from"./chunk-3IT7IIAV.js";import{a as c}from"./chunk-IP4JBQOX.js";import"./chunk-CRJENCPR.js";import"./chunk-ITX7QWN6.js";import"./chunk-LWYDGDPW.js";import"./chunk-VKSRWZCO.js";import"./chunk-3UEPBBE4.js";import"./chunk-WOT6VMZA.js";import{get as v}from"lodash-es";import{LockIcon as x}from"lucide-react";import{useTranslation as y}from"react-i18next";import{jsx as a,jsxs as n}from"react/jsx-runtime";var B=()=>{let{t:e}=y(),[C,P]=l(),r=C.get("lang"),S=d(r),{setSelectedLang:L}=g(),N=()=>{let o=new URLSearchParams(window.location.search);o.delete("lang");let s=o.toString(),b=`${window.location.pathname}${s?`?${s}`:""}`;window.history.pushState({},"",b),P(o),L(""),window.dispatchEvent(new PopStateEvent("popstate"))};if(S)return null;let t=v(m,r);return a(c,{children:n(u,{className:"mx-auto w-full max-w-md",children:[a(p,{className:"space-y-1",children:n(h,{className:"flex items-center gap-2 text-2xl",children:[a(x,{className:"h-6 w-6 text-yellow-500"}),e("Page missing for")," \xA0",a("code",{children:t}),"\xA0",e("language"),"."]})}),a(w,{className:"grid gap-4",children:n("div",{children:[e("Page is not available in the")," \xA0",a("code",{children:t}),"\xA0",e("language. Either create the page in the")," \xA0",a("code",{children:t}),"\xA0",e("language or switch to the base language.")]})}),a(f,{children:a(i,{onClick:N,className:"w-full",variant:"destructive",children:e("Switch to default language")})})]})})},R=B;export{R as default};
@@ -0,0 +1 @@
1
+ import{a as e}from"./chunk-CA5PVX24.js";import"./chunk-PQHFT4TE.js";import"./chunk-YEFMD4DS.js";import{a}from"./chunk-T2YYNX6Z.js";import"./chunk-AOJE5WI3.js";import"./chunk-ONSZ462E.js";import"./chunk-2NYUIXUX.js";import"./chunk-WEVKAJMV.js";import"./chunk-ZAU65LBG.js";import"./chunk-CRJENCPR.js";import"./chunk-ITX7QWN6.js";import"./chunk-VKSRWZCO.js";import"./chunk-3UEPBBE4.js";import"./chunk-WOT6VMZA.js";import{Suspense as s,lazy as t}from"react";import{jsx as g}from"react/jsx-runtime";var o=t(()=>import("./no-language-page-content-NQIROTIL.js")),u=()=>{let[n]=a(),r=n.get("lang");return e(r)?null:g(s,{children:g(o,{})})},P=u;export{P as default};
@@ -0,0 +1 @@
1
+ "use client";import{a as ue}from"./chunk-XY4UJKHE.js";import{a as Q,c as me,d as Pe}from"./chunk-HEKCKC7N.js";import{m as Qe}from"./chunk-LNV5MRGV.js";import{a as _e}from"./chunk-7EXZXKW2.js";import{b as Ee,c as et}from"./chunk-VL5WBPVV.js";import"./chunk-GJOOCKUE.js";import{a as Ke}from"./chunk-FOKGOT6B.js";import"./chunk-CJP3BQH2.js";import"./chunk-PQHFT4TE.js";import{c as Ge,e as Oe}from"./chunk-YEFMD4DS.js";import"./chunk-T2YYNX6Z.js";import"./chunk-AOJE5WI3.js";import"./chunk-ONSZ462E.js";import{H as Ue,xa as He}from"./chunk-2NYUIXUX.js";import{a as Ze}from"./chunk-WHPIYGCY.js";import{a as Je}from"./chunk-HA7LF3RV.js";import"./chunk-WEVKAJMV.js";import"./chunk-ZAU65LBG.js";import{a as Ye}from"./chunk-ODSL3KXG.js";import"./chunk-TVF77C53.js";import{a as le,b as G,c as ae,d as ie,g as ce,h as O,i as _}from"./chunk-WSQ5SQBD.js";import{a as Me,d as je,e as Ae,h as re}from"./chunk-YQ5QQCRD.js";import{a as Fe,b as We,f as Be,g as $e,i as ze}from"./chunk-RBDZDQZR.js";import{a as H}from"./chunk-2N4IJZOR.js";import{a as V}from"./chunk-4JBHWPMO.js";import{b as T}from"./chunk-3IT7IIAV.js";import"./chunk-IP4JBQOX.js";import{a as Xe}from"./chunk-NSQEQYEM.js";import"./chunk-T32TW3XV.js";import{a as qe}from"./chunk-CRJENCPR.js";import"./chunk-ITX7QWN6.js";import"./chunk-LWYDGDPW.js";import"./chunk-VKSRWZCO.js";import"./chunk-3UEPBBE4.js";import"./chunk-WOT6VMZA.js";import{find as ct,isEmpty as $t,pick as zt,set as P}from"lodash-es";import{startTransition as Mt,useEffect as jt,useMemo as Y,useState as y}from"react";import{toast as E}from"sonner";import{useEffect as Rt,useRef as It,useState as tt}from"react";import{jsx as pe,jsxs as nt}from"react/jsx-runtime";function st({value:t,onChange:c,placeholder:D="Enter custom slug part",dynamicPattern:m,onValidationChange:p}){let[g,u]=tt(null),l=It(null),[S,I]=tt(m+t);Rt(()=>{I(m+t)},[t,m]);let z=b=>{let h=b.target.value;if(!h.startsWith(m)){let A=h.replace(m,""),R=m+A;I(R),c(A);return}let s=h.substring(m.length).replace(/\//g,"").replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-_.]/g,"-").replace(/-+/g,"-").replace(/^-+/,"").toLowerCase(),a=(s.match(/\./g)||[]).length,W=a<=1;a>1?u("Invalid slug. Only one dot (.) is allowed in the slug"):u(null),p&&p(W);let j=m+s;I(j),c(s)},F=()=>{if(l.current){let b=l.current;setTimeout(()=>{let h=m.length;b.setSelectionRange(h,h)},0)}},M=b=>{let h=b.currentTarget;(h.selectionStart||0)<=m.length&&setTimeout(()=>{let s=m.length;h.setSelectionRange(s,s)},0)};return pe("div",{children:nt("div",{className:"relative",children:[nt("p",{className:"mb-2 text-xs text-gray-500",children:[`${m}`," is a dynamic segment of slug"]}),pe(H,{ref:l,value:S,onChange:z,onFocus:F,onClick:M,placeholder:D,className:g?"border-red-500":""}),g&&pe("div",{className:"mt-1 text-xs text-red-500",children:g})]})})}import{isEmpty as Ft}from"lodash-es";import{Check as rt}from"lucide-react";import{useMemo as lt,useState as at}from"react";import{jsx as Vt}from"react/jsx-runtime";var Tt=({children:t,onWheel:c,...D})=>Vt(je,{...D,onWheel:p=>{try{p.preventDefault();let g=p.currentTarget;g.scrollTop+=p.deltaY}catch(g){p.preventDefault()}c&&c(p)},children:t}),ot=Tt;import{useTranslation as Wt}from"react-i18next";import{ChevronDownIcon as Bt}from"@radix-ui/react-icons";import{jsx as f,jsxs as v}from"react/jsx-runtime";var X=(...t)=>t.filter(Boolean).join(" ");function it({pages:t,selectedParentId:c,onChange:D,className:m,id:p="parentPage"}){let{t:g}=Wt(),[u,l]=at(!1),[S,I]=at("");Qe("enable-add-page-dropdown")||(m="flex h-8 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-xs text-foreground shadow-sm ring-offset-surface focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground [&>span]:line-clamp-1");let F=lt(()=>!t||t.length===0?[]:t.filter(a=>!Ft(a.slug)).filter(a=>a.slug!=="/").sort((a,W)=>a.slug.localeCompare(W.slug)),[t]),M=lt(()=>{if(!S.trim())return F;let s=S.toLowerCase();return F.filter(a=>a.name.toLowerCase().includes(s)||a.slug.toLowerCase().includes(s))},[F,S]),b=s=>Math.max(0,(s.match(/\//g)||[]).length-1),h=s=>{if(s==="/")return"/";let a=s.split("/").filter(Boolean);return a.length===0?"":Q(a[a.length-1])},U=()=>{if(!c||c==="none")return g("None");let s=F.find(a=>a.id===c);return s?`${s.name} (${h(s.slug)})`:g("None")};return v("div",{className:"space-y-0.5",children:[f(V,{htmlFor:p,children:"Parent"}),v(Fe,{open:u,onOpenChange:l,children:[f(We,{asChild:!0,children:v(T,{id:p,variant:"outline",role:"combobox",className:X("w-full justify-between !bg-transparent font-normal hover:bg-transparent",m),"data-testid":"parent-page-selector",children:[U(),f(Bt,{className:"h-4 w-4 opacity-50"})]})}),v(Be,{className:"flex max-h-[70vh] min-h-[500px] flex-col gap-0 overflow-hidden border p-0 sm:max-w-[425px]",children:[f($e,{className:"border-b border-border px-2 py-3.5",children:f(ze,{className:"flex items-center gap-2 text-sm font-normal",children:g("Select parent page")})}),v(Me,{shouldFilter:!1,className:"flex max-h-full w-full flex-1 flex-col",children:[f("div",{className:"border-b p-2",children:f(Ke,{value:S,setValue:I,placeholder:g("Search page..."),autoFocus:!0})}),v(ot,{className:"h-full flex-1 overflow-y-auto p-1",children:[f(Ae,{className:"flex min-h-[300px] items-center justify-center py-6 text-center text-xs text-muted-foreground",children:"No pages found."}),v("div",{className:"flex flex-col",children:[c&&c!=="none"&&(!S||"none".includes(S.toLowerCase()))&&v(re,{value:"none",onSelect:()=>{D("none"),l(!1),I("")},style:{paddingLeft:"12px"},className:"relative flex min-h-[28px] cursor-pointer items-center justify-start overflow-hidden whitespace-nowrap rounded py-0 pr-2 border-b border-border/40 bg-muted/10 text-muted-foreground",children:[f("div",{className:"relative z-10 mr-2 flex flex-1 items-center overflow-hidden text-[10px] font-medium",children:g("Select none")}),f(rt,{className:X("ml-auto h-4 w-4 shrink-0",!c||c==="none"?"opacity-100":"opacity-0")})]}),M.map(s=>{let a=b(s.slug),W=h(s.slug),j=a*14+12;return v(re,{value:s.id,onSelect:()=>{D(s.id),l(!1),I("")},style:{paddingLeft:`${j}px`},className:"relative flex min-h-[28px] cursor-pointer items-center justify-start overflow-hidden whitespace-nowrap rounded py-0 pr-2",children:[!S&&f("div",{className:"pointer-events-none absolute inset-0",children:Array.from({length:a}).map((A,R)=>{let Z=R===a-1,J=R*14+14;return v("div",{children:[f("div",{className:X("absolute border-l border-border/50",Z?"top-0 h-1/2":"top-0 h-full"),style:{left:`${J}px`}}),Z&&f("div",{className:"absolute top-1/2 border-t border-border/50",style:{left:`${J}px`,width:"10px"}})]},R)})}),f(Ze,{content:v("span",{children:[s.name," ",v("i",{className:"text-gray-500",children:["(",s.slug,")"]})]}),side:"right",delayDuration:400,className:"max-w-[300px] break-words text-xs",children:v("div",{className:"relative z-10 mr-2 flex flex-1 items-center overflow-hidden text-[10px]",children:[f("span",{className:"truncate",children:s.name}),v("span",{className:"ml-1 shrink-0 truncate font-extralight text-muted-foreground",children:["(",W,")"]})]})}),f(rt,{className:X("ml-auto h-4 w-4 shrink-0",c===s.id?"opacity-100":"opacity-0")})]},s.id)})]})]})]})]})]})]})}import{jsx as n,jsxs as i}from"react/jsx-runtime";function At({addEditPage:t,close:c,closePanel:D}){var Ne,we,Le,ke,De,Re,Ie,Te,Ve;let{data:m}=Oe(),p=Y(()=>m!=null?m:[],[m]),g=_e(),u=!!(t!=null&&t.id),{data:l}=Ge(),{mutate:S,isPending:I}=Ee(),{mutate:z,isPending:F}=et(),[M,b]=y(null),[h,U]=y(!0),[s,a]=y((Ne=t==null?void 0:t.pageType)!=null?Ne:"page"),{hasPermission:W}=Ue(),j=W(qe["pages:change_type"]),[A,R]=y(!1),[Z,J]=y(""),{selectedLang:mt,fallbackLang:ut}=He(),ge=mt||ut,[C,pt]=y((we=t==null?void 0:t.parent)!=null?we:""),[B,fe]=y((Le=t==null?void 0:t.name)!=null?Le:""),[ee,gt]=y(typeof((ke=t==null?void 0:t.metadata)==null?void 0:ke.description)=="string"?(De=t==null?void 0:t.metadata)==null?void 0:De.description:""),[N,he]=y((Re=t==null?void 0:t.dynamic)!=null?Re:!1),[w,q]=y(N?"":((Ie=t==null?void 0:t.slug)!=null?Ie:"").split("/").pop()||""),[de,ve]=y((Te=t==null?void 0:t.dynamicSlugCustom)!=null?Te:""),[ye,ft]=y(!0),[ht,te]=y(!1),[Se,Ut]=y(""),ne=I||F,se=Y(()=>!u||!(t!=null&&t.id)||!l?null:l.find(e=>e.id===t.id),[u,t,l]),dt=(se==null?void 0:se.online)||!1,vt=Y(()=>!u||!(t!=null&&t.id)||!l?!1:l.some(e=>e.parent===t.id),[u,t,l]),o=p.find(e=>e.key===s),be=e=>{if(u&&s!==e){J(e),R(!0);return}a(e)},Ce=()=>{a(Z),R(!1),he(!1)},yt=e=>{he(e),e?q(""):ve("")},St=e=>{if(pt(e),e&&e!=="none"){let r=l==null?void 0:l.find(d=>d.id===e),L=(r==null?void 0:r.slug)||"";if(w.startsWith(L)){let d=w.slice(L.length).replace(/^\/+/,"");q(d)}else q(w.replace(/^\/+/,""))}else q(w?`${w}`:"")},bt=()=>B.trim()?N&&!$t(w)?(b("Slug must be empty when using dynamic slug"),!1):N&&!ye?(b("Dynamic slug is invalid"),!1):!0:(E.error("Name is required"),!1),Ct=()=>{let e={pageType:o==null?void 0:o.key,name:B,slug:"",hasSlug:!1,description:ee};u?z({id:t==null?void 0:t.id,name:B,description:ee},{onSuccess:()=>{E.success((o==null?void 0:o.name)+" updated successfully"),c()}}):S(e,{onSuccess:r=>{c(),g(r.page.id,D)}})},xt=(e,r)=>{if(!e.trim()&&!N)return b("Child page slug is required"),!1;let L=Q(r),d=me(L,e);return Object.keys(Je).some(K=>d===`/${K}`||(d==null?void 0:d.startsWith(`/${K}/`)))?(b("Slugs cannot start with a language code for primary page"),!1):!0},Nt=(e,r)=>{let L=Q(r),d=me(L,e),x={pageType:s,name:B,slug:d.replace(/\/$/,""),parent:C,dynamic:N,hasSlug:!0,template:Se||void 0,tracking:{},seo:{},jsonLD:{}};if(N&&(x.dynamicSlugCustom=de),u){let k=zt(x,["pageType","parent","name","slug","dynamic","dynamicSlugCustom"]);z({id:t==null?void 0:t.id,...k},{onSuccess:()=>{E.success("Page updated successfully"),c()}})}else{let k=ct(p,{key:s});k!=null&&k.trackingDefault&&(x.tracking=k.trackingDefault);let{seo:K,jsonLD:kt}=ue(k,ge);P(x,"seo",K),P(x,"jsonLD",kt),S(x,{onSuccess:Dt=>{c(),g(Dt.page.id,D)}})}},wt=()=>{let e={pageType:s,name:B,slug:w===""?"/":`/${w.replace(/\/$/,"")}`,template:Se||void 0,parent:null,tracking:{}};if(u)z({id:t==null?void 0:t.id,...e},{onSuccess:()=>{E.success("Page updated successfully"),c()}});else{let r=ct(p,{key:s});r!=null&&r.trackingDefault&&(e.tracking=r.trackingDefault);let{seo:L,jsonLD:d}=ue(r,ge);P(e,"seo",L),P(e,"jsonLD",d),S(e,{onSuccess:x=>{var k;(k=x==null?void 0:x.page)!=null&&k.id&&g(x.page.id,D),c()}})}},xe=e=>{if(e.preventDefault(),b(null),!!bt()){if(!(o!=null&&o.hasSlug)){Ct();return}if(C&&C!=="none"){let r=l==null?void 0:l.find(d=>d.id===C),L=(r==null?void 0:r.slug)||"";if(!xt(w,L))return;Nt(w,L)}else wt()}},oe=Y(()=>p.filter(e=>e.hasSlug===!1),[p]),$=Y(()=>p.filter(e=>e.hasSlug!==!1),[p]);jt(()=>{!u&&$.length===1&&s!==$[0].key&&Mt(()=>a($[0].key))},[u,$,s]);let Lt=$.length>1;if(!(o!=null&&o.hasSlug)){let e=oe.length>1;return i("form",{onSubmit:xe,className:"mx-auto w-full max-w-md space-y-4",children:[e&&i("div",{className:"space-y-0.5",children:[n(V,{htmlFor:"pageType",children:"Type"}),i(le,{value:s,disabled:u&&!j,onValueChange:be,children:[n(ie,{className:"w-full",children:n(ae,{placeholder:"Select partial type"})}),n(ce,{children:i(G,{children:[n(O,{children:"Partials"}),oe.map(r=>n(_,{value:r.key,children:r.name},r.key))]})})]}),A&&i("div",{className:"mt-2 rounded-md border border-foreground/10 bg-surface p-3",children:[n("p",{className:"text-sm text-orange",children:"Changing the type may impact the data. Are you sure you want to proceed?"}),i("div",{className:"mt-2 flex gap-2",children:[n(T,{variant:"outline",size:"sm",onClick:()=>R(!1),children:"Cancel"}),n(T,{variant:"default",size:"sm",onClick:Ce,children:"Confirm"})]})]}),n("p",{className:"text-xs font-extralight italic text-muted-foreground",children:o==null?void 0:o.helpText})]}),i("div",{className:"space-y-0.5",children:[n(V,{htmlFor:"name",children:"Name"}),n(H,{id:"name",value:B,onChange:r=>fe(r.target.value),required:!0,"aria-required":"true"})]}),i("div",{className:"space-y-0.5",children:[n(V,{htmlFor:"description",children:"Description"}),n(Ye,{id:"description",value:ee,onChange:r=>gt(r.target.value),rows:3,placeholder:"Describe what this partial is for. Used by AI to understand when to use it."})]}),n(T,{loading:ne,type:"submit",className:"w-full",children:u?"Update "+(o==null?void 0:o.name):"Create "+(o==null?void 0:o.name)})]})}return i("form",{onSubmit:xe,className:"mx-auto w-full max-w-md space-y-4",children:[Lt&&i("div",{className:"space-y-0.5",children:[i(le,{value:s,disabled:u&&!j,onValueChange:be,children:[n(ie,{className:"w-full",children:n(ae,{placeholder:"Select page type"})}),n(ce,{children:u?o!=null&&o.hasSlug?i(G,{children:[n(O,{children:"Pages"}),$.map(e=>n(_,{value:e.key,children:e.name},e.key))]}):i(G,{children:[n(O,{children:"Partials"}),oe.map(e=>n(_,{value:e.key,children:e.name},e.key))]}):i(G,{children:[n(O,{children:"Pages"}),$.map(e=>n(_,{value:e.key,children:e.name},e.key))]})})]}),A&&i("div",{className:"mt-2 rounded-md border border-foreground/10 bg-surface p-3",children:[n("p",{className:"text-sm text-foreground",children:"Changing the page type may impact the page data. Are you sure you want to proceed?"}),i("div",{className:"mt-2 flex gap-2",children:[n(T,{variant:"outline",size:"sm",onClick:()=>R(!1),children:"Cancel"}),n(T,{variant:"default",size:"sm",onClick:Ce,children:"Confirm"})]})]})]}),i("div",{className:"space-y-0.5",children:[n(V,{htmlFor:"name",children:"Name"}),n(H,{id:"name",value:B,onChange:e=>fe(e.target.value),required:!0,"aria-required":"true",placeholder:"Enter page name"})]}),n(it,{pages:l==null?void 0:l.map(e=>{var r;return{id:e.id,name:e.name,slug:e.slug,parent:(r=e.parent)!=null?r:void 0}}),selectedParentId:C,onChange:St,currentPage:t}),(o==null?void 0:o.dynamicSegments)&&C&&C!=="none"&&i("div",{className:"space-y-2",children:[i("div",{className:"flex items-center space-x-2",children:[n(Xe,{id:"useDynamicSlug",checked:N,onCheckedChange:e=>yt(e)}),n(V,{htmlFor:"useDynamicSlug",children:"Use Dynamic Slug"})]}),N&&n("div",{className:"space-y-2",children:n("div",{className:"space-y-0.5",children:n(st,{value:de,onChange:ve,dynamicPattern:(o==null?void 0:o.dynamicSlug)||"{{id}}",placeholder:"Enter custom slug part (optional)",onValidationChange:ft})})})]}),(!(o!=null&&o.dynamicSegments)||!N)&&i("div",{className:"space-y-0.5",children:[n(V,{htmlFor:"slug",children:"Slug"}),n(Pe,{value:w,onChange:e=>{var r;q(e),u&&e!==(((r=t==null?void 0:t.slug)==null?void 0:r.split("/").pop())||"")?te(!!(dt||vt)):te(!1)},placeholder:C&&C!=="none"?"Enter page slug":s==="page"?"Leave empty for home page":"Required - e.g. your-slug",parentSlug:C&&C!=="none"?(Ve=l==null?void 0:l.find(e=>e.id===C))==null?void 0:Ve.slug:void 0,onValidationChange:U}),M&&n("p",{className:"text-xs text-red-500",children:M}),ht&&n("div",{className:"mt-4 rounded-md border border-amber-200 bg-amber-50 p-3",children:i("div",{className:"flex items-start space-x-2",children:[n("div",{className:"flex-shrink-0",children:n("svg",{className:"h-5 w-5 text-amber-400",viewBox:"0 0 20 20",fill:"currentColor",children:n("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})})}),i("div",{className:"flex-1",children:[n("h3",{className:"text-sm font-medium text-amber-800",children:"Slug Change Warning"}),n("div",{className:"mt-1 text-sm text-amber-700",children:n("p",{children:"The previous URL and any child pages will become inaccessible. You may want to set up a redirect to avoid broken links."})})]})]})})]}),n(T,{loading:ne,disabled:ne||!h&&(!(o!=null&&o.dynamicSegments)||!N)||N&&!ye,type:"submit",className:"w-full",children:u?"Update page":"Create Page"})]})}export{At as default};
@@ -0,0 +1 @@
1
+ import{c as e,d as c,h as T,i as l,n as p}from"./chunk-GJOOCKUE.js";import"./chunk-CJP3BQH2.js";import"./chunk-PQHFT4TE.js";import"./chunk-YEFMD4DS.js";import"./chunk-T2YYNX6Z.js";import"./chunk-AOJE5WI3.js";import"./chunk-ONSZ462E.js";import"./chunk-2NYUIXUX.js";import{a as E}from"./chunk-WEVKAJMV.js";import"./chunk-ZAU65LBG.js";import{a as i}from"./chunk-IP4JBQOX.js";import"./chunk-CRJENCPR.js";import"./chunk-ITX7QWN6.js";import"./chunk-LWYDGDPW.js";import"./chunk-VKSRWZCO.js";import"./chunk-3UEPBBE4.js";import"./chunk-WOT6VMZA.js";import{useQueryClient as C}from"@tanstack/react-query";import{lazy as n,Suspense as I,useEffect as _,useRef as N}from"react";import{jsx as a}from"react/jsx-runtime";var f=n(()=>import("./take-over-request-EB464ZGU.js")),A=n(()=>import("./page-locked-dialog-ACMWVAZX.js")),S=n(()=>import("./active-in-another-tab-SONDAONP.js")),g=n(()=>import("./continue-editing-in-this-client-QBMOFRLL.js")),r=o=>a(I,{children:a(o,{})}),O=({isFetchingPageData:o})=>{p();let{pageStatus:t}=T(),{pageLockMeta:m}=l(),s=C(),u=N(t);if(_(()=>{t===e.EDITING&&u.current!==e.TAKE_OVER_REQUESTED&&s.invalidateQueries({queryKey:[E.GET_DRAFT_PAGE]}),u.current=t},[t,s]),o)return null;switch(t){case e.EDITING:case e.CHECKING:case e.FORCE_TAKE_OVER:return m.type===c.CONTINUE_EDITING_IN_THIS_CLIENT?r(g):null;case e.LOCKED:return r(A);case e.TAKE_OVER_REQUESTED:return r(f);case e.ACTIVE_IN_ANOTHER_TAB:return r(S);case e.CONNECTION_LOST:return a(i,{children:null});default:return null}},h=O;export{h as default};
@@ -0,0 +1 @@
1
+ import{a as F,b as K,c as P,e as U,f as V}from"./chunk-ERCY63ZW.js";import{a as I}from"./chunk-ROQRBSK6.js";import{c as C,d as s,h as b,i as R,j as y,k as O}from"./chunk-GJOOCKUE.js";import"./chunk-CJP3BQH2.js";import"./chunk-PQHFT4TE.js";import"./chunk-YEFMD4DS.js";import"./chunk-T2YYNX6Z.js";import"./chunk-AOJE5WI3.js";import"./chunk-ONSZ462E.js";import{H as T}from"./chunk-2NYUIXUX.js";import"./chunk-WEVKAJMV.js";import"./chunk-ZAU65LBG.js";import{a as _,b as A,c as w,d as S}from"./chunk-3E72DJSP.js";import{b as m}from"./chunk-3IT7IIAV.js";import{a as N}from"./chunk-IP4JBQOX.js";import{a as k}from"./chunk-CRJENCPR.js";import"./chunk-ITX7QWN6.js";import"./chunk-LWYDGDPW.js";import"./chunk-VKSRWZCO.js";import"./chunk-3UEPBBE4.js";import"./chunk-WOT6VMZA.js";import{AlertCircleIcon as z,Edit as X,LockKeyhole as W,ShieldAlert as q,UserIcon as Y,X as Z}from"lucide-react";import{startTransition as $,useEffect as ee,useRef as te,useState as g}from"react";import{useTranslation as re}from"react-i18next";import{jsx as e,jsxs as t}from"react/jsx-runtime";var se=()=>{let l=y(),v=O(),{setPageStatus:Q}=b(),{data:r,isFetching:L}=I((l==null?void 0:l.userId)||""),{pageLockMeta:c,setPageLockMeta:E}=R(),{t:a}=re(),{hasPermission:B}=T(),H=B(k["pages:force_takeover"]),[d,i]=g(""),[o,x]=g({}),[h,D]=g(!1),n=te(null);ee(()=>{c!=null&&c.type&&(n.current&&clearTimeout(n.current),$(()=>{x(c),E({}),i("")}))},[c,E]);let G=()=>{d!==s.TAKE_OVER_REQUEST&&(i(s.TAKE_OVER_REQUEST),v(s.TAKE_OVER_REQUEST),n.current=setTimeout(()=>i(""),2e4))},J=()=>{d!==s.FORCE_TAKE_OVER_REQUEST&&(i(s.FORCE_TAKE_OVER_REQUEST),v(s.FORCE_TAKE_OVER_REQUEST),Q(C.CHECKING),n.current=setTimeout(()=>i(""),2e4))},M=()=>{x({}),n.current&&clearTimeout(n.current),i("")},u=L?"Loading...":(r==null?void 0:r.name)||"Current editor",p=d===s.TAKE_OVER_REQUEST,f=d===s.FORCE_TAKE_OVER_REQUEST;return e(N,{children:t(F,{className:"mx-auto h-fit w-full max-w-md",children:[e(K,{className:"space-y-1 border-b pb-3",children:t(P,{className:"flex items-center gap-2 text-xl",children:[e(W,{className:"h-8 w-8 rounded-md bg-sky-500/20 p-1.5 text-sky-500"}),e("span",{children:a("Page Locked for Editing")})]})}),t(U,{className:"space-y-4 p-4",children:[t("div",{className:"relative rounded-md border border-green-500 px-2 pb-2 pt-4",children:[e("div",{className:"absolute -top-2.5 left-3 w-max rounded-full bg-green-500 px-3 py-1 text-xs font-medium leading-3 text-white",children:"Current Editor"}),t("div",{className:"flex items-center space-x-4 p-1",children:[r!=null&&r.avatar?e("img",{src:r.avatar,alt:r.name,className:"h-12 w-12 flex-shrink-0 rounded-full bg-black p-0.5 text-white"}):e(Y,{className:"h-12 w-12 flex-shrink-0 rounded-full bg-black p-3 text-white"}),t("div",{className:"flex-1 space-y-0",children:[e("div",{className:"truncate font-medium leading-tight text-black",children:u}),(r==null?void 0:r.email)&&e("p",{className:"truncate text-sm leading-tight text-muted-foreground",children:r.email})]})]})]}),((o==null?void 0:o.type)===s.TAKE_OVER_REJECTED||(o==null?void 0:o.type)===s.FORCE_TAKE_OVER_REQUEST)&&e("section",{className:"space-y-2",children:t("div",{className:"flex items-center justify-between gap-x-2 rounded border border-red-500 bg-red-500/10 py-2 pl-3 pr-2 text-sm font-medium text-red-500",children:[t("div",{className:"flex items-start gap-x-2",children:[e(z,{className:"mt-px flex h-4 w-4 shrink-0"}),t("div",{className:"font-light leading-tight",children:[e("span",{className:"font-medium",children:(r==null?void 0:r.name)||"The current editor"}),(o==null?void 0:o.type)===s.TAKE_OVER_REJECTED?" rejected your take over request.":" forcefully took over this page."]})]}),e(m,{size:"icon",variant:"ghost",onClick:M,className:"flex-shrink-0",children:e(Z,{className:"h-4 w-4"})})]})})]}),e(V,{className:"flex flex-col gap-3 border-t pt-3",children:t("section",{className:"space-y-2",children:[e("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:a("Take Over Options")}),t("div",{className:"rounded-md border bg-muted/40 p-3",children:[t("div",{className:"mb-2",children:[e("p",{className:"text-sm font-medium",children:a("Take Over Request:")}),e("p",{className:"mt-1 text-xs text-muted-foreground",children:a("Send a request to {{currentEditorName}} asking them to release the page. They can accept or decline your request.",{currentEditorName:u})})]}),t(m,{disabled:p,variant:"default",onClick:G,className:"mt-3 w-full gap-2",children:[e(X,{className:"h-4 w-4"}),p?"Take over request sent":"Send Take Over Request"]}),p&&e("p",{className:"mt-2 text-xs text-muted-foreground",children:a("Request sent. If no response, try again or use force take over.")})]}),H&&e(_,{type:"single",collapsible:!0,className:"w-full",children:t(A,{value:"force-takeover",className:"rounded-md border border-destructive/40 bg-destructive/5",children:[e(w,{className:"px-3 py-2 hover:no-underline",children:e("div",{className:"flex items-center gap-2 text-left",children:t("div",{children:[t("p",{className:"flex items-center gap-x-2 text-sm font-medium text-destructive",children:[e(q,{className:"h-4 w-4 text-destructive"}),a("Force Take Over")]}),e("p",{className:"pl-6 text-xs font-normal leading-tight text-muted-foreground",children:a("Immediately take control (use with caution)")})]})})}),e(S,{className:"px-3 pb-3",children:t("div",{className:"space-y-3",children:[t("div",{className:"flex items-start gap-2 rounded-md border border-destructive/40 bg-background p-2",children:[e("input",{type:"checkbox",id:"force-takeover",checked:h,onChange:j=>D(j.target.checked),className:"mt-0.5 h-4 w-4 rounded border-gray-300"}),e("label",{htmlFor:"force-takeover",className:"flex-1 text-xs text-muted-foreground",children:a("I understand this will immediately close the editor for {{currentEditorName}}. I am using this option with caution.",{currentEditorName:u})})]}),t(m,{disabled:!h||f,variant:"destructive",onClick:J,className:"w-full gap-2",children:[e(q,{className:"h-4 w-4"}),a(f?"Take over page...":"Force Take Over")]}),f&&e("p",{className:"text-xs text-muted-foreground",children:a("Attempting to forcefully take over this page. Please wait while we update the editing session.")})]})})]})})]})})]})})},ve=se;export{ve as default};
@@ -0,0 +1 @@
1
+ import{a as E}from"./chunk-OD3K76M6.js";import{a as Ne}from"./chunk-SYPALJAE.js";import"./chunk-ZU2B5YT6.js";import{a as Ee}from"./chunk-QGVCH2NI.js";import{a as ve}from"./chunk-IAKCX2WB.js";import{a as Le}from"./chunk-ROQRBSK6.js";import"./chunk-LNV5MRGV.js";import{f as we,g as Se}from"./chunk-GJOOCKUE.js";import"./chunk-CJP3BQH2.js";import"./chunk-PQHFT4TE.js";import{b as Q,c as xe,d as be,e as ke}from"./chunk-YEFMD4DS.js";import{a as Te}from"./chunk-T2YYNX6Z.js";import"./chunk-AOJE5WI3.js";import"./chunk-ONSZ462E.js";import{xa as re}from"./chunk-2NYUIXUX.js";import{a as I}from"./chunk-WHPIYGCY.js";import{a as Ce}from"./chunk-HA7LF3RV.js";import"./chunk-WEVKAJMV.js";import"./chunk-ZAU65LBG.js";import"./chunk-TVF77C53.js";import"./chunk-4VNLL2IA.js";import{b as V}from"./chunk-3IT7IIAV.js";import"./chunk-IP4JBQOX.js";import"./chunk-CRJENCPR.js";import"./chunk-ITX7QWN6.js";import"./chunk-LWYDGDPW.js";import"./chunk-VKSRWZCO.js";import"./chunk-3UEPBBE4.js";import"./chunk-WOT6VMZA.js";import{useSetAtom as wt}from"jotai";import{filter as pe,find as ge,isEmpty as H,map as St}from"lodash-es";import{File as Ct}from"lucide-react";import{Suspense as A,lazy as M,startTransition as vt,useCallback as ee,useEffect as $,useMemo as Oe,useState as T}from"react";import{useTranslation as Nt}from"react-i18next";import{compact as Ae,filter as X,includes as Y,isEmpty as le,keyBy as Me,mapValues as Xe,startCase as Ye,toLower as L,uniqBy as Je}from"lodash-es";var Be=(e,a)=>!e||!Array.isArray(e)?[]:le(a)?e:Ae(X(e,n=>{let t=L(a);return Y(L((n==null?void 0:n.name)||""),t)||Y(L((n==null?void 0:n.slug)||""),t)})),Ke=(e,a)=>{let n=new Set,t=Me(e,"id");return a.forEach(l=>{let o=l;for(;o.parent&&t[o.parent];)n.add(o.parent),o=t[o.parent]}),Array.from(n).map(l=>t[l])},oe=(e,a,n)=>le(a)?e:e.map(t=>{if(!n(t.pageType))return{...t,shouldExpandOnSearch:!0,children:t.children?oe(t.children,a,n):[]};let l=t.children&&t.children.some(o=>Y(L(o.name||""),L(a))||Y(L(o.slug||""),L(a)));return{...t,shouldExpandOnSearch:l,children:t.children?oe(t.children,a,n):[]}}),et=e=>{if(!e||!e.length)return[];let a={};e.forEach(t=>{a[t.id]={...t,children:[]}});let n=[];return Object.values(a).forEach(t=>{t.parent&&a[t.parent]?a[t.parent].children.push(t):n.push(t)}),n},Ge=e=>!e||!e.length?[]:[...e].sort((n,t)=>(n.name||"").localeCompare(t.name||"")).map(n=>({...n,children:n.children?Ge(n.children):[]})),ze=(e,a,n,t)=>{if(!e||!e.length)return[];let l=e;if(n!=="all"&&(l=Ae(X(e,{pageType:n}))),le(a))l=Be(l,a);else{let m=Be(l,a),r=Ke(e,m);l=Je([...m,...r],"id")}let o=Ge(et(l)),y=oe(o,a,t),k=X(y,m=>t(m.pageType)).sort((m,r)=>(m.name||"").localeCompare(r.name||"")),p=X(y,m=>!t(m.pageType)),h=[];if(n==="all"){let m=Me(p,"pageType");Object.keys(m).length>1?h=Object.values(Xe(m,(r,P)=>({...r,id:P,name:Ye(P),isPartialGroup:!0,children:y.filter(w=>w.pageType===P)}))).sort((r,P)=>(r.name||"").localeCompare(P.name||"")):h=p.sort((r,P)=>(r.name||"").localeCompare(P.name||""))}else h=p.sort((m,r)=>(m.name||"").localeCompare(r.name||""));return[...k,...h]};import{Fragment as kt}from"react/jsx-runtime";import{find as lt,get as K,isEmpty as He}from"lodash-es";import{ChevronRight as it,File as ct,Hash as pt,Lock as gt,MoreHorizontal as ut,Pencil as dt,Plus as mt,StarsIcon as ht}from"lucide-react";import{useMemo as ie}from"react";import{useAtom as at}from"jotai";import{ExternalLink as nt}from"lucide-react";import{useEffect as st,useRef as rt}from"react";import{atom as tt}from"jotai";var Ue=tt({pageId:null,position:{x:0,y:0}});import{Fragment as ot,jsx as J,jsxs as Fe}from"react/jsx-runtime";var Ie=({pageId:e,children:a})=>{let[n,t]=at(Ue),l=rt(null),o=n.pageId===e;st(()=>{let p=()=>t({pageId:null,position:{x:0,y:0}});if(o)return document.addEventListener("click",p),()=>document.removeEventListener("click",p)},[o,t]);let y=p=>{p.preventDefault(),p.stopPropagation(),t({pageId:e,position:{x:p.clientX,y:p.clientY}})},k=()=>{let p=`${window.location.pathname}?page=${e}`;window.open(p,"_blank"),t({pageId:null,position:{x:0,y:0}})};return Fe(ot,{children:[J("span",{onContextMenu:y,children:a}),o&&J("div",{ref:l,className:"fixed z-[9999] max-w-[160px] rounded-md border border-gray-200 bg-white",style:{top:n.position.y,left:n.position.x},children:J("div",{className:"",children:Fe(V,{variant:"ghost",onClick:k,className:"w-full px-2.5 py-1 text-start text-sm text-gray-700 hover:bg-gray-100",children:[J(nt,{className:"h-4 w-4"}),"Open in new tab"]})})})]})};import{Fragment as bt,jsx as i,jsxs as B}from"react/jsx-runtime";var Pt=({page:e})=>{var t;let{isExpanded:a,toggleExpanded:n}=E(e==null?void 0:e.id);return i(V,{size:"icon-sm",variant:"ghost",className:`h-6 w-6 hover:bg-secondary ${(t=e==null?void 0:e.children)!=null&&t.length?"":"opacity-0"}`,onClick:l=>{l.stopPropagation(),n()},children:i(it,{className:`duration-200 ${a?"rotate-90":""}`})})},yt=({page:e,pageType:a})=>i("div",{className:"flex h-full items-center justify-center gap-x-1",children:e.dynamic?i(ht,{size:12,className:"text-yellow-400"}):a!=null&&a.icon?i("div",{className:"flex h-4 max-h-4 w-4 max-w-4 items-center justify-center stroke-[1] text-muted-foreground",dangerouslySetInnerHTML:{__html:a.icon}}):a!=null&&a.hasSlug?i(ct,{size:12,className:"stroke-[1] text-muted-foreground"}):i(pt,{size:12,className:"stroke-[1] text-muted-foreground"})}),ft=({isOnline:e})=>i("div",{className:`h-2 w-2 rounded-full ${e?"bg-green-500":"bg-muted-foreground/30"}`}),xt=({page:e,pageTypes:a,currentPage:n,onClickAction:t,languagePages:l,selectedLanguage:o,showUntranslatedPages:y})=>{let k=we(),{pageToUser:p}=Se(),h=K(p,[e==null?void 0:e.id,"userId"]),{data:m}=Le(h),r=m&&k!==h?m==null?void 0:m.name:null,{toggleExpanded:P}=E(e==null?void 0:e.id),w=Q(),R=n===e.id,f=ie(()=>lt(a,{key:e.pageType}),[a,e.pageType]),u=K(l,e==null?void 0:e.id);u=K(u,"lang")===o?u:null;let v=o===w||!!u,N=(u==null?void 0:u.name)||(e==null?void 0:e.name)||"No name",S=(u==null?void 0:u.slug)||(e==null?void 0:e.slug)||"",q=S+(e!=null&&e.dynamic?`/${f==null?void 0:f.dynamicSlug}`:"")+(e!=null&&e.dynamicSlugCustom?`${e.dynamicSlugCustom}`:"");if(S.startsWith("/")&&!y){let d=S.split("/").pop();S=S.endsWith(d)&&e.dynamic?"":`/${d}`}let O=ie(()=>{let d="flex h-7 min-w-0 flex-1 cursor-pointer select-none items-center gap-x-1.5 rounded px-px text-xs duration-300 border-[1px]",D=`${R?"border-primary/30 bg-primary/5":"border-transparent hover:border-border hover:bg-accent"}`;return v?`${d} ${D} ${r?"opacity-60":""}`:`${d} bg-muted/30 opacity-50 group-hover:border-border border-transparent group-hover:bg-accent`},[v,R,r]),W=ie(()=>{if(e.isPartialGroup)return!1;if(u){if(!u.online||He(u.changes))return!1}else if(e&&(!e.online||He(e.changes)))return!1;return!0},[u,e]);return B("div",{className:"group relative",children:[i(Ie,{pageId:e.id,children:B("div",{onClick:()=>e.isPartialGroup?P():v&&t("select",e==null?void 0:e.id),className:O,children:[((f==null?void 0:f.hasSlug)!==!1||e.isPartialGroup)&&i(Pt,{page:e}),!e.isPartialGroup&&i(ft,{isOnline:u?u.online:e.online}),!e.isPartialGroup&&i(yt,{page:e,pageType:f}),i(I,{content:N,side:"top",showTooltip:N.length>35,children:i("span",{className:"max-w-[40%] truncate font-medium text-foreground",children:N})}),(S||e.dynamic)&&i(I,{content:q,side:"top",showTooltip:!0,children:B("span",{className:"max-w-[40%] truncate font-mono text-xs text-muted-foreground",children:[S,e.dynamic&&(f==null?void 0:f.dynamicSlug)&&B("span",{className:"text-xs text-muted-foreground",children:["/",f==null?void 0:f.dynamicSlug,e.dynamicSlugCustom]})]})}),W&&i(I,{content:"Has unpublished changes",side:"top",children:i("span",{className:"text-warning",children:i(dt,{size:12,className:"stroke-[2]"})})}),!e.isPartialGroup&&v&&!r?i("div",{className:"duration absolute right-0.5 top-[3px]",children:i(Ne,{isLanguagePage:!!u,page:u||e,setDuplicatePage:d=>t("duplicate",d),setAddEditPage:d=>t("edit",u||d),setUnpublishPage:d=>t("unpublish",d),setDeletePage:d=>t("delete",u||d),children:i("div",{className:"hover:bg-surface m-0 cursor-pointer rounded border border-transparent p-0.5 duration-100 hover:border-border",children:i(ut,{className:"h-4 w-4 text-muted-foreground",onClick:d=>d.stopPropagation()})})})}):r?B("span",{className:"duration absolute right-1.5 top-1/2 flex -translate-y-1/2 items-center gap-x-1 text-xs text-destructive",children:[i(gt,{className:"h-3 w-3 fill-destructive/20 text-destructive"}),i(I,{content:`${r} is editing this page`,children:i("span",{className:"font-bold",children:r})})]}):null]})}),i(bt,{children:!v&&!e.isPartialGroup&&!r&&B("button",{onClick:d=>{d.stopPropagation(),t("addLanguagePage",{language:o,page:e})},className:"absolute right-0 top-1 flex -translate-x-1/2 items-center gap-x-1 rounded bg-primary px-2 py-0.5 text-xs text-primary-foreground opacity-0 duration-200 hover:bg-primary/90 group-hover:opacity-100",children:[i(mt,{size:12,className:"stroke-[3]"})," ",B("span",{className:"text-[10px]",children:["Add ",K(Ce,o)," Page"]})]})})]})},$e=xt;import{jsx as ce,jsxs as Tt}from"react/jsx-runtime";var Re=({pages:e,tier:a,pageTypes:n,currentPage:t,onClickAction:l,languagePages:o,selectedLanguage:y,showUntranslatedPages:k})=>{let{expandedPages:p}=E();return ce("div",{className:"space-y-px",style:{paddingLeft:`${a*10}px`},children:e.map(h=>Tt(kt,{children:[ce($e,{page:h,pageTypes:n,currentPage:t,onClickAction:l,languagePages:o,selectedLanguage:y,showUntranslatedPages:k}),h.children&&h.children.length>0&&(p==null?void 0:p.includes(h.id))&&ce(Re,{pages:h.children,tier:a+1,pageTypes:n,currentPage:t,onClickAction:l,languagePages:o,selectedLanguage:y,showUntranslatedPages:k})]},h.id))})},qe=Re;import{Fragment as te,jsx as g,jsxs as ae}from"react/jsx-runtime";var Et=M(()=>import("./page-manager-search-and-filter-7CHPYAPV.js")),Lt=M(()=>import("./add-new-page-LBHXICXO.js")),Bt=M(()=>import("./delete-page-FQYTEMBN.js")),At=M(()=>import("./duplicate-page-HPPMQRL3.js")),Mt=M(()=>import("./mark-as-template-7TCCEMGC.js")),Gt=M(()=>import("./unmark-as-template-6STMTBP5.js")),zt=M(()=>import("./unpublish-page-CE3CJK5C.js")),Ut=({close:e})=>{let{t:a}=Nt(),{languages:n,setSelectedLang:t}=re(),{data:l}=ke(),{data:o,isFetching:y}=xe(),[k,p]=Te(),{updateForSelectedPage:h,expandPagesOnSearch:m}=E(null),r=Q(),P=k.get("page"),[w,R]=T(""),[f,u]=T(null),[v,N]=T(null),[S,q]=T(null),[O,W]=T(null),[d,D]=T(()=>sessionStorage.getItem("pageTypeFilter")||"all"),[_,We]=T(()=>sessionStorage.getItem("pageCategoryFilter")||"pages"),[ue,de]=T(null),[me,he]=T(null),[x,j]=T(r),[De,_e]=T(!1),Pe=wt(ve),Z=De&&x!==r,{data:G,isFetching:je}=be(x),Ze=ee(c=>{We(c),sessionStorage.setItem("pageCategoryFilter",c),D("all"),c==="partials"&&j(r)},[r]),ne=Oe(()=>!H(l)&&d&&d!=="all"&&!ge(l,{key:d})?"all":d,[l,d]),Ve=ee(c=>{D(c)},[]),z=ee(c=>{var s;return((s=ge(l,{key:c}))==null?void 0:s.hasSlug)!==!1},[l]),C=Oe(()=>{if(!o)return[];let c=o;if(x!==r&&(c=pe(o,b=>z(b.pageType)!==!1)),Z)return pe(c,b=>!(G!=null&&G[b.id]));let s=ze(c,w,ne,z);return pe(s,b=>_==="pages"?z(b.pageType):!z(b.pageType))},[o,z,w,ne,G,Z,x,r,_]);$(()=>{t(r)},[r,t]),$(()=>{var s;let c=k.get("lang");if(c){let b=n,U=(s=n[0])!=null?s:r,F=b.includes(c);vt(()=>{F&&x!==c?j(c):!F&&x!==U&&j(U)})}},[]),$(()=>{if(P&&!y&&!ge(o,{id:P})){let s=new URLSearchParams(k.toString());if(s.delete("page"),[...s.keys()].length>0){if(typeof window!="undefined"&&window.history&&window.location){let b=s.toString(),U=window.location.hash||"",F=window.location.pathname,Qe=b?`${F}?${b}${U}`:`${F}${U}`;window.history.replaceState(window.history.state,"",Qe)}p(s)}else typeof window!="undefined"&&window.history&&window.location&&(window.history.replaceState(window.history.state,"",window.location.pathname+window.location.hash),window.dispatchEvent(new PopStateEvent("popstate",{state:window.history.state}))),p(s)}},[o,P,y,p,k]),$(()=>{P&&!y&&!H(C)&&h(C,P)},[P,y,C,h]),$(()=>{!H(w)&&!H(C)&&m(C)},[w,C,m]);let{setSelectedLang:se}=re(),ye=ee(c=>{let s=new URLSearchParams({page:c});x!==r?(s.set("lang",x),se(x)):se(""),Ee(s,p),e()},[e,p,se,x,r]),fe=(c,s)=>{var b;if(s)switch(c){case"add":N(s);break;case"select":ye(s);break;case"edit":x!==r?Pe({edit:!0,id:s==null?void 0:s.id,primaryPage:s==null?void 0:s.primaryPage}):N(s);break;case"delete":u(s);break;case"unpublish":q(s);break;case"markAsTemplate":W(s);break;case"unmarkAsTemplate":he(s);break;case"duplicate":de(s);break;case"addLanguagePage":Pe({edit:!1,primaryPage:((b=s==null?void 0:s.page)==null?void 0:b.id)||"",preselectedLang:(s==null?void 0:s.language)||x});break}};return ae(te,{children:[ae("div",{className:"flex h-full flex-col justify-between",children:[g(A,{children:g(Et,{pages:C,search:w,setSearch:R,languages:[r,...n],selectedLanguage:x,setSelectedLanguage:j,selectedPageType:ne,setSelectedPageType:Ve,onAddPage:c=>fe("add",c),showUntranslatedPages:Z,setShowUntranslatedPages:_e,category:_,setCategory:Ze})}),g("div",{className:"flex-1 overflow-y-auto px-4 pb-6 pt-2",children:y||je?g("div",{className:"space-y-2",children:St([...Array(15).keys()],c=>g("div",{className:"h-7 w-full animate-pulse rounded border border-border bg-accent"},c))}):H(C)?ae("div",{className:"flex h-[70vh] flex-col items-center justify-center gap-y-1 text-center text-sm font-medium text-muted-foreground",children:[g(Ct,{className:"h-6 w-6 stroke-[1]"}),w?ae(te,{children:[a("No results found"),g("span",{className:"font-light",children:a("Try adjusting your search to find what you're looking for.")})]}):_==="partials"?g(te,{children:g("span",{className:"max-w-[300px] font-light",children:a("Create reusable blocks to maintain consistency and design faster.")})}):g(te,{children:g("span",{className:"font-light",children:a("Add new page to start")})})]}):g(qe,{tier:0,pages:C,pageTypes:l,currentPage:P||"",onClickAction:fe,languagePages:G,selectedLanguage:x,showUntranslatedPages:Z})})]}),v&&g(A,{children:g(Lt,{closePanel:e,editPage:ye,addEditPage:v,setAddEditPage:N})}),f&&g(A,{children:g(Bt,{page:f,onClose:()=>u(null)})}),S&&g(A,{children:g(zt,{page:S,onClose:()=>q(null)})}),O&&g(A,{children:g(Mt,{page:O,onClose:()=>W(null)})}),me&&g(A,{children:g(Gt,{page:me,onClose:()=>he(null)})}),ue&&g(A,{children:g(At,{page:ue,onClose:()=>de(null),closePanel:e})})]})},Ea=Ut;export{Ea as default};
@@ -0,0 +1 @@
1
+ .FIE_topbar-save-menu{display:flex;flex-direction:column;gap:0;border-width:1px;padding-top:.5rem;padding-bottom:.5rem;font-size:.75rem;line-height:1rem;box-shadow:0 25px 50px -12px #00000040}.FIE_topbar-save-menu-item{font-size:.75rem;line-height:1rem}.FIE_topbar-save-menu-item:hover{background-color:#e5e7eb}.FIE_topbar-save-menu-item>span:first-child{height:1rem;width:1rem}#chai-image-editor-container>button{opacity:0}body{pointer-events:auto!important}
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-374QEK4F.js";import"./chunk-OD3K76M6.js";import"./chunk-K5YWQY4U.js";import"./chunk-FOKGOT6B.js";import"./chunk-YEFMD4DS.js";import"./chunk-AOJE5WI3.js";import"./chunk-ONSZ462E.js";import"./chunk-HA7LF3RV.js";import"./chunk-WEVKAJMV.js";import"./chunk-ZAU65LBG.js";import"./chunk-FERH2TPR.js";import"./chunk-TVF77C53.js";import"./chunk-WSQ5SQBD.js";import"./chunk-2N4IJZOR.js";import"./chunk-3IT7IIAV.js";import"./chunk-IP4JBQOX.js";import"./chunk-ITX7QWN6.js";import"./chunk-LWYDGDPW.js";import"./chunk-WOT6VMZA.js";export{a as LanguageSelector,b as default};
@@ -0,0 +1 @@
1
+ import{a as u}from"./chunk-34HIOUTE.js";import{f as c}from"./chunk-PQHFT4TE.js";import{c as p}from"./chunk-YEFMD4DS.js";import{a as m}from"./chunk-T2YYNX6Z.js";import"./chunk-AOJE5WI3.js";import"./chunk-ONSZ462E.js";import"./chunk-2NYUIXUX.js";import"./chunk-WEVKAJMV.js";import"./chunk-ZAU65LBG.js";import{a as g,f as l,g as h,i as d,j as P}from"./chunk-6TXCHU4K.js";import"./chunk-CRJENCPR.js";import"./chunk-ITX7QWN6.js";import"./chunk-LWYDGDPW.js";import"./chunk-VKSRWZCO.js";import"./chunk-3UEPBBE4.js";import"./chunk-WOT6VMZA.js";import{isEmpty as S}from"lodash-es";import{lazy as C,Suspense as F}from"react";import{useTranslation as T}from"react-i18next";import{jsx as e,jsxs as f}from"react/jsx-runtime";var z=C(()=>import("./page-manager-new-SCZFNGKO.js")),D=()=>{let{t:a}=T(),[y]=m(),s=y.get("page"),{data:t,isFetching:M}=c(),{data:b,isFetching:x}=p(),[N,o]=u(),r=!!s&&!S(t),n=x||!b,O=!n&&!s,v=!n&&!M&&S(t),i=N||O||v;return e(g,{open:i,onOpenChange:w=>!w&&r&&o(!1),children:f(l,{side:"left","aria-describedby":"pages-manager-description",className:`z-50 !min-w-[600px] !max-w-[600px] border-border p-0 ${r?"":"sheet-hide-close-btn"}`,children:[f(h,{className:"p-3 px-4",children:[e(d,{children:a("Pages Manager")}),e(P,{className:"sr-only",children:a("Manage your site structure")})]}),e("div",{className:"h-[calc(100vh-80px)] overflow-y-auto",children:i&&e(F,{children:e(z,{close:()=>o(!1)})})})]})})},q=D;export{q as default};
@@ -0,0 +1 @@
1
+ .FIE_topbar-save-menu{display:flex;flex-direction:column;gap:0;border-width:1px;padding-top:.5rem;padding-bottom:.5rem;font-size:.75rem;line-height:1rem;box-shadow:0 25px 50px -12px #00000040}.FIE_topbar-save-menu-item{font-size:.75rem;line-height:1rem}.FIE_topbar-save-menu-item:hover{background-color:#e5e7eb}.FIE_topbar-save-menu-item>span:first-child{height:1rem;width:1rem}#chai-image-editor-container>button{opacity:0}body{pointer-events:auto!important}
@@ -0,0 +1 @@
1
+ "use client";import{b as y}from"./chunk-ATLMLDBS.js";import{a as C}from"./chunk-ROQRBSK6.js";import{f as G}from"./chunk-PQHFT4TE.js";import"./chunk-YEFMD4DS.js";import"./chunk-T2YYNX6Z.js";import{e as R}from"./chunk-AOJE5WI3.js";import"./chunk-ONSZ462E.js";import{xa as _}from"./chunk-2NYUIXUX.js";import{a as p}from"./chunk-WEVKAJMV.js";import{d as b}from"./chunk-ZAU65LBG.js";import{a as L}from"./chunk-N7Z4RFFI.js";import{g as $,i as Q}from"./chunk-6TXCHU4K.js";import{a as A,f as k,g as E,h as M,i as P,j as I}from"./chunk-RBDZDQZR.js";import{a as z,b as F,i as q,j as T,n as B}from"./chunk-4VNLL2IA.js";import{a as H}from"./chunk-4JBHWPMO.js";import{b as g}from"./chunk-3IT7IIAV.js";import"./chunk-IP4JBQOX.js";import{a as U}from"./chunk-NSQEQYEM.js";import{a as x}from"./chunk-CRJENCPR.js";import"./chunk-ITX7QWN6.js";import{a as O}from"./chunk-LWYDGDPW.js";import"./chunk-VKSRWZCO.js";import"./chunk-3UEPBBE4.js";import"./chunk-WOT6VMZA.js";import{useQueryClient as pe}from"@tanstack/react-query";import{format as N}from"date-fns";import{MoreHorizontal as fe,RotateCcw as ge,Trash as ve,X as he}from"lucide-react";import*as D from"react";import{lazy as xe,startTransition as De,Suspense as be,useEffect as W,useState as Re}from"react";import{useMutation as V,useQuery as ue,useQueryClient as j}from"@tanstack/react-query";function K(t){let n=b(),o=R();return ue({queryKey:[p.GET_PAGE_REVISIONS,t],queryFn:async()=>await o(n,{action:p.GET_PAGE_REVISIONS,data:{pageId:t}}),enabled:!!t,refetchOnMount:!0})}var J=()=>{let t=b(),n=R(),o=j();return V({mutationFn:async i=>await n(t,{action:p.DELETE_PAGE_REVISION,data:{revisionId:i}}),onSuccess:()=>{o.invalidateQueries({queryKey:[p.GET_PAGE_REVISIONS]})}})},Y=()=>{let t=b(),n=R(),o=j();return V({mutationFn:async({revisionId:i,discardCurrent:a,pageId:l})=>await n(t,{action:p.RESTORE_PAGE_REVISION,data:{revisionId:i,discardCurrent:a,...l&&{pageId:l}}}),onSuccess:()=>{o.invalidateQueries({queryKey:[p.GET_PAGE_ALL_DATA]}),o.invalidateQueries({queryKey:[p.GET_PAGE_REVISIONS]})}})};import{Fragment as Ie,jsx as e,jsxs as s}from"react/jsx-runtime";var ye=xe(()=>import("./json-diff-viewer-FQYK2FUX.js")),Ce=t=>{let n=new Date(t),o=n.getTime();if(Number.isNaN(o))return"Unknown date";let i=Math.max(0,Math.floor((Date.now()-o)/1e3));if(i<60)return`${i} second${i===1?"":"s"} ago`;let a=Math.floor(i/60);return a<60?`${a} minute${a===1?"":"s"} ago`:N(n,"MMM d, yyyy, h:mm a")},Z=({tag:t,className:n=""})=>e("span",{className:O("flex items-center justify-center rounded-sm bg-muted/10 px-1.5 py-0.5 text-center font-sans text-xs capitalize text-foreground",n),children:t});function Ne(){return e("div",{className:"mt-2 space-y-2",children:Array.from({length:5}).map((t,n)=>s("div",{className:"flex items-start gap-3 rounded-md border p-2",children:[s("div",{className:"flex-1 space-y-1",children:[e("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted/30"}),e("div",{className:"h-3 w-1/2 animate-pulse rounded bg-muted/30"}),e("div",{className:"mt-1 h-5 w-20 animate-pulse rounded bg-muted/30"})]}),e("div",{className:"h-8 w-8 animate-pulse rounded-full bg-muted/30"})]},n))})}function we({revision:t,isLatest:n,onRestore:o,onDelete:i,revisionNumber:a,compare:l,setCompare:d,pageId:u}){let{data:f}=C(t.currentEditor),r=(f==null?void 0:f.name)||"Unknown",v=!!l.find(c=>{var h;return n?(h=c==null?void 0:c.uid)==null?void 0:h.startsWith("live"):(c==null?void 0:c.uid)===t.uid}),w=l.length>=2&&!v;return s("div",{className:"relative flex items-start gap-3 rounded-md border p-2 text-foreground",children:[s("div",{className:"flex-1 space-y-2",children:[e("div",{className:"flex items-center justify-between",children:s("p",{className:"flex items-center gap-1 text-[11px] font-light leading-none",children:[e(Z,{tag:n?"live":`#${a}`}),t.type==="published"?"Published":"Draft","\xA0by ",e("span",{className:"font-normal",children:r})]})}),s("div",{className:"flex items-center gap-x-2",children:[e("div",{className:"flex items-center gap-1 font-medium opacity-80",children:t.type==="published"?e("span",{className:"text-[11px] leading-tight text-success",children:"Published"}):e("span",{className:"text-[11px] leading-tight text-warning",children:"Draft"})}),e("div",{className:"flex items-center text-[10px] text-muted-foreground",children:e("span",{className:"font-light leading-tight",children:Ce(t.createdAt)})})]})]}),e("div",{className:"flex items-center gap-2",children:e(y,{permissions:[x["revisions:restore"],x["revisions:delete"]],children:e(ke,{revision:t,onRestore:o,onDelete:i})})}),e(Ae,{checked:v,disabled:w,onChange:()=>{d(v?l.filter(c=>n?c.uid!==`live:${u}`:c.uid!==t.uid):[...l,{uid:n?`live:${u}`:t.uid,label:n?"live":`#${a}`,item:t}].sort((c,h)=>new Date(c.item.createdAt).getTime()-new Date(h.item.createdAt).getTime()))}})]})}function X({tab:t,onRemove:n}){return s("span",{className:"flex items-center justify-between gap-x-px rounded border bg-secondary p-0 pl-[2px] font-medium",children:[e(Z,{tag:t.label,className:"rounded-sm"}),e(g,{variant:"link",size:"icon-xs",onClick:()=>n(t.uid),"aria-label":"Remove selection",className:"text-foreground/50 hover:text-foreground",children:e(he,{className:"h-2.5 w-2.5"})})]})}function Se({compare:t,setCompare:n,pageId:o}){let[i,a]=Re(!1),[l,d]=t;if(t.length===0)return null;let u=f=>n(t.filter(r=>r.uid!==f));return s("div",{className:"flex w-full max-w-md flex-col gap-2 rounded border bg-accent/60 px-2 pb-2 pt-1 shadow-sm",children:[s("div",{className:"flex items-center gap-x-2 text-xs",children:[e("span",{className:"font-medium leading-tight text-muted-foreground",children:"Compare"}),l&&e(X,{tab:l,onRemove:u}),e("span",{className:"font-medium leading-tight text-muted-foreground",children:"with"}),d?e(X,{tab:d,onRemove:u}):e("span",{className:"rounded border px-2 py-1 text-xs italic text-muted-foreground",children:"Choose another"})]}),s("div",{className:"flex items-center justify-end gap-2",children:[e(g,{size:"xs",variant:"ghost",className:"px-3 py-1",onClick:()=>n([]),children:"Clear"}),e(g,{size:"xs",variant:"default",className:"px-3 py-1",onClick:()=>a(!0),disabled:t.length<2,children:"Show Diff (JSON)"})]}),i&&(t==null?void 0:t.length)>1&&o&&e(be,{fallback:null,children:e(ye,{open:i,onOpenChange:a,compare:t})})]})}function Ae({checked:t,disabled:n,onChange:o,label:i="Compare"}){return e("div",{className:"absolute bottom-2 right-2",children:s(H,{className:"flex items-center gap-x-1",children:[e(U,{checked:t,disabled:n,onCheckedChange:o}),i]})})}function ke({revision:t,onRestore:n,onDelete:o}){return s(z,{children:[e(F,{asChild:!0,children:s(g,{variant:"ghost",size:"icon-xs",className:"-mr-1 -mt-0.5",children:[e(fe,{}),e("span",{className:"sr-only",children:"More options"})]})}),s(q,{align:"end",className:"text-xs",children:[e(y,{permission:x["revisions:restore"],children:s(T,{onClick:n,children:[e(ge,{className:"h-4 w-4"}),"Restore this version"]})}),t.uid!=="current"&&e(B,{}),t.uid!=="current"&&e(y,{permission:x["revisions:delete"],children:s(T,{onClick:o,className:"text-destructive",children:[e(ve,{className:"h-3.5 w-3.5"}),"Delete this version"]})})]})]})}function Ee({open:t,onOpenChange:n,revision:o,onRestore:i,isRestoring:a}){let{data:l}=C((o==null?void 0:o.currentEditor)||""),d=(l==null?void 0:l.name)||"Unknown";return o?e(A,{open:t,onOpenChange:u=>{a||n(u)},children:s(k,{className:"sm:max-w-md",children:[s(E,{children:[e(P,{children:"Restore Revision"}),s(I,{children:["You are about to restore to revision ",o.uid.substring(0,8)," from"," ",N(o.createdAt,"MMM d, yyyy 'at' h:mm a")," by ",d]})]}),e("div",{className:"py-2",children:e("p",{className:"text-sm text-muted-foreground",children:"How would you like to handle your current edits?"})}),s(M,{className:"flex items-center justify-end gap-x-1",children:[e(g,{variant:"outline",size:"sm",loading:a,onClick:()=>i(!1),children:"Save as draft"}),e(g,{variant:"default",size:"sm",loading:a,onClick:()=>i(!0),children:"Discard current"})]})]})}):null}function Me({open:t,onOpenChange:n,revision:o,onDelete:i,isDeleting:a}){let{data:l}=C((o==null?void 0:o.currentEditor)||""),d=(l==null?void 0:l.name)||"Unknown";return o?e(A,{open:t,onOpenChange:u=>{a||n(u)},children:s(k,{className:"sm:max-w-md",children:[s(E,{children:[e(P,{children:"Delete Revision"}),s(I,{children:["You are about to delete revision ",o.uid.substring(0,8)," from"," ",N(o.createdAt,"MMM d, yyyy 'at' h:mm a")," by ",d]})]}),e("div",{className:"py-2",children:e("p",{className:"text-sm text-muted-foreground",children:"This action cannot be undone. Are you sure you want to proceed?"})}),s(M,{className:"flex items-center justify-end gap-x-1",children:[e(g,{variant:"outline",size:"sm",onClick:()=>n(!1),disabled:a,children:"Cancel"}),e(g,{variant:"destructive",size:"sm",loading:a,onClick:i,children:"Delete"})]})]})}):null}function Pe({isOpen:t}){let[n,o]=D.useState([]),[i,a]=D.useState(null),[l,d]=D.useState(!1),[u,f]=D.useState(!1),{data:r}=G(),{data:v,isFetching:w,error:c,refetch:h}=K(r==null?void 0:r.id),{mutate:ee,isPending:te}=J(),{mutate:ne,isPending:oe}=Y(),ie=pe(),{selectedLang:se,fallbackLang:ae}=_(),re=se||ae;W(()=>{De(()=>o([]))},[r==null?void 0:r.id]);let le=m=>{i&&ne({revisionId:i.uid,discardCurrent:m,...i.uid==="current"&&(r==null?void 0:r.id)&&{pageId:r.id}},{onSuccess:()=>{d(!1),a(null),ie.invalidateQueries({queryKey:[p.GET_PAGE_ALL_DATA]})}})},de=m=>{a(m),d(!0)},ce=m=>{a(m),f(!0)},me=()=>{i&&ee(i.uid,{onSuccess:()=>{f(!1),a(null)}})};return W(()=>{t&&h()},[t,h]),s(Ie,{children:[s($,{children:[e(Q,{children:"Revision History"}),(r==null?void 0:r.createdAt)&&s("p",{className:"text-xs font-light leading-none text-muted",children:["Page created on ",N(new Date(r.createdAt),"MMM d, yyyy 'at' h:mm a")]})]}),w?e(Ne,{}):c?e("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"Failed to load revisions. Please try again."}):s("div",{className:"mt-2 flex h-full min-h-0 flex-1 flex-col space-y-2",children:[e(Se,{lang:re,compare:n,setCompare:o,pageId:r==null?void 0:r.id}),e(L,{className:"min-h-0 flex-1",children:e("div",{className:"space-y-2",children:[...v!=null?v:[]].sort((m,S)=>new Date(S.createdAt).getTime()-new Date(m.createdAt).getTime()).map((m,S)=>e(we,{pageId:r==null?void 0:r.id,revision:m,isLatest:m.uid==="current",onRestore:()=>de(m),onDelete:()=>ce(m),revisionNumber:S+1,compare:n,setCompare:o},m.uid))})})]}),e(Ee,{open:l,onOpenChange:d,revision:i,onRestore:le,isRestoring:oe}),e(Me,{open:u,onOpenChange:f,revision:i,onDelete:me,isDeleting:te})]})}export{Pe as default};
@@ -0,0 +1 @@
1
+ import{a as n,f as t}from"./chunk-6TXCHU4K.js";import{a}from"./chunk-J7Q62EP7.js";import"./chunk-LWYDGDPW.js";import"./chunk-WOT6VMZA.js";import*as i from"react";import{Suspense as m}from"react";import{jsx as e,jsxs as l}from"react/jsx-runtime";function r(){return e("div",{className:"mt-2 space-y-2",children:Array.from({length:5}).map((o,s)=>l("div",{className:"flex items-start gap-3 rounded-md border p-2",children:[l("div",{className:"flex-1 space-y-1",children:[e(a,{className:"h-4 w-3/4"}),e(a,{className:"h-3 w-1/2"}),e(a,{className:"mt-1 h-5 w-20"})]}),e(a,{className:"h-8 w-8 rounded-full"})]},s))})}var p=i.lazy(()=>import("./page-revisions-content-DHPEQ4CA.js"));function c({isOpen:o,setIsOpen:s}){return e(n,{open:o,onOpenChange:s,children:e(t,{className:"flex h-[100vh] w-96 flex-col",children:o&&e(m,{fallback:e(r,{}),children:e(p,{isOpen:o})})})})}export{c as default};
@@ -0,0 +1,21 @@
1
+ import { R as ChaiPage } from './actions-DM00SIUk.cjs';
2
+
3
+ type ChaiPartialPage = {
4
+ id: string;
5
+ languagePageId: string;
6
+ lang: string;
7
+ pageType: string;
8
+ slug: string;
9
+ fallbackLang: string;
10
+ };
11
+ type ChaiFullPage = {
12
+ fallbackLang: string;
13
+ breadcrumb: Array<Pick<ChaiPage, "id" | "name" | "slug" | "lang">>;
14
+ alternatePages: Array<Pick<ChaiPage, "id" | "name" | "slug" | "lang"> & {
15
+ primaryLang: boolean;
16
+ }>;
17
+ globalJsonLdsData?: any[];
18
+ tracking?: unknown;
19
+ } & Pick<ChaiPage, "id" | "name" | "slug" | "lang" | "primaryPage" | "seo" | "currentEditor" | "pageType" | "lastSaved" | "dynamic" | "dynamicSlugCustom" | "parent" | "blocks" | "metadata">;
20
+
21
+ export type { ChaiFullPage as C, ChaiPartialPage as a };
@@ -0,0 +1,21 @@
1
+ import { R as ChaiPage } from './actions-DM00SIUk.js';
2
+
3
+ type ChaiPartialPage = {
4
+ id: string;
5
+ languagePageId: string;
6
+ lang: string;
7
+ pageType: string;
8
+ slug: string;
9
+ fallbackLang: string;
10
+ };
11
+ type ChaiFullPage = {
12
+ fallbackLang: string;
13
+ breadcrumb: Array<Pick<ChaiPage, "id" | "name" | "slug" | "lang">>;
14
+ alternatePages: Array<Pick<ChaiPage, "id" | "name" | "slug" | "lang"> & {
15
+ primaryLang: boolean;
16
+ }>;
17
+ globalJsonLdsData?: any[];
18
+ tracking?: unknown;
19
+ } & Pick<ChaiPage, "id" | "name" | "slug" | "lang" | "primaryPage" | "seo" | "currentEditor" | "pageType" | "lastSaved" | "dynamic" | "dynamicSlugCustom" | "parent" | "blocks" | "metadata">;
20
+
21
+ export type { ChaiFullPage as C, ChaiPartialPage as a };