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 @@
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,2 @@
1
+ import{a as z}from"./chunk-XY4UJKHE.js";import{a as C,b as Ae,c as ke,d as qe,f as le,g as Ue}from"./chunk-IUACZ3E6.js";import"./chunk-QGVCH2NI.js";import{a as Be,c as Ve}from"./chunk-5ZC65NB6.js";import{a as Je}from"./chunk-JBB5IJFA.js";import"./chunk-IAKCX2WB.js";import{b as Fe}from"./chunk-2PJZUYIZ.js";import{E as ne,a as oe}from"./chunk-LNV5MRGV.js";import{c as Me}from"./chunk-VL5WBPVV.js";import"./chunk-GJOOCKUE.js";import"./chunk-CJP3BQH2.js";import{c as Te,f as Ce}from"./chunk-PQHFT4TE.js";import{f as je}from"./chunk-YEFMD4DS.js";import"./chunk-T2YYNX6Z.js";import{e as Oe}from"./chunk-AOJE5WI3.js";import"./chunk-ONSZ462E.js";import{H as Le,xa as B}from"./chunk-2NYUIXUX.js";import"./chunk-WHPIYGCY.js";import{a as re}from"./chunk-HA7LF3RV.js";import{a as se}from"./chunk-WEVKAJMV.js";import"./chunk-55SU3QPU.js";import{a as De,c as Ee,d as Ie}from"./chunk-ZAU65LBG.js";import{a as Re,b as Pe,c as W}from"./chunk-FERH2TPR.js";import{a as ae}from"./chunk-ODSL3KXG.js";import"./chunk-TVF77C53.js";import"./chunk-777N6WHB.js";import{a as ye,f as xe,g as Se,i as be,j as Ne}from"./chunk-RBDZDQZR.js";import"./chunk-4VNLL2IA.js";import{a as A}from"./chunk-2N4IJZOR.js";import{a as I}from"./chunk-4JBHWPMO.js";import{a as _e,c as He}from"./chunk-SSENH35Y.js";import{b as T}from"./chunk-3IT7IIAV.js";import{b as ve}from"./chunk-IP4JBQOX.js";import{a as ie}from"./chunk-NSQEQYEM.js";import{a as we}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{useDebouncedCallback as bt}from"@react-hookz/web";import{get as S,isEmpty as Nt,isEqual as Ye}from"lodash-es";import{useCallback as Lt,useEffect as de,useRef as Xe,useState as H}from"react";import{useTranslation as wt}from"react-i18next";import{toast as D}from"sonner";import{find as ut}from"lodash-es";import{useMemo as pt}from"react";var Ge=()=>{let{selectedLang:s}=B(),{data:u,isFetching:o}=Te();return{data:pt(()=>ut(u,{lang:s||""})||{},[u,s]),isFetching:o}};import{useMutation as mt,useQueryClient as gt}from"@tanstack/react-query";import{Wand2Icon as ft}from"lucide-react";import{jsx as ce}from"react/jsx-runtime";var ht=()=>{var m;let u=(m=document.getElementById("canvas-iframe").contentDocument)==null?void 0:m.body.innerHTML;if(!u)return null;let g=new DOMParser().parseFromString(u,"text/html");g.querySelectorAll("style, script, link, svg, [data-block-type='PartialBlock']").forEach(a=>a.remove()),g.querySelectorAll("*").forEach(a=>{Array.from(a.attributes).forEach(v=>a.removeAttribute(v.name))});let f=g.querySelectorAll("h1, h2, h3, h4, h5, h6, p");return Array.from(f).map(a=>`<${a.tagName.toLowerCase()}>${a.innerHTML}</${a.tagName.toLowerCase()}>`).join(" ").replace(/<p>Partial block. Double click to edit.<\/p>/,"")},V=({keyword:s,onComplete:u,field:o})=>{let g=Oe(),f=Ie(),i=Ee(se.AI_GENERATE_SEO_FIELD),{selectedLang:m,fallbackLang:a}=B(),{data:v}=Fe(),k=gt(),{mutate:b,isPending:E}=mt({mutationFn:async()=>{let l=ht();return await g(f,{action:se.AI_GENERATE_SEO_FIELD,data:{context:v||{},dynamic:!1,field:o,lang:m||a,pageContent:l,keyword:s,model:i}})},onSuccess:l=>{k.invalidateQueries({queryKey:[Be]}),u({fieldValue:l.field})},onError:l=>{var p;u({fieldValue:null,error:l.message,canBuyCredits:(p=l.canBuyCredits)!=null?p:!1})}});return ce(T,{disabled:E,type:"button",variant:"ghost",size:"icon-xs",onClick:()=>b(),children:E?ce(ve,{className:"text-orange !h-3 !w-3"}):ce(ft,{className:"text-orange !h-3 !w-3"})})};import{Plus as vt,Trash2 as yt}from"lucide-react";import{useCallback as xt,useRef as St,useState as Ke}from"react";import{jsx as _,jsxs as U}from"react/jsx-runtime";var $e=s=>{try{let u=JSON.parse(s||"{}"),o=Object.entries(u).map(([g,f])=>({key:g,value:String(f)}));return o.length>0?o:[{key:"",value:""}]}catch(u){return[{key:"",value:""}]}},We=({value:s,onChange:u,disabled:o=!1})=>{let g=St(s),[f,i]=Ke(s),[m,a]=Ke(()=>$e(s));s!==f&&(i(s),a($e(s)));let v=xt(l=>{let p={};l.forEach(N=>{N.key.trim()&&(p[N.key.trim()]=N.value)});let h=JSON.stringify(p);g.current=h,u(h)},[u]),k=()=>{let l=[...m,{key:"",value:""}];a(l)},b=l=>{let p=m.filter((N,X)=>X!==l),h=p.length>0?p:[{key:"",value:""}];a(h),v(h)},E=(l,p,h)=>{let N=[...m];N[l]={...N[l],[p]:h},a(N),v(N)};return U("div",{className:"bg-surface space-y-2",children:[m.map((l,p)=>U("div",{className:"group flex items-center gap-2 transition-all duration-200",children:[U("div",{className:"grid flex-1 grid-cols-2 gap-2",children:[_(A,{placeholder:`Tag ${p+1}`,value:l.key,onChange:h=>E(p,"key",h.target.value),disabled:o}),_(A,{placeholder:`Content ${p+1}`,value:l.value,onChange:h=>E(p,"value",h.target.value),disabled:o})]}),_(T,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>b(p),disabled:o,className:"h-7 w-7 text-muted-foreground transition-colors duration-300 hover:bg-destructive/5 hover:text-destructive",children:_(yt,{className:"h-3.5 w-3.5"})})]},p)),U("div",{className:"flex items-center justify-between border-t border-border pt-1",children:[_("span",{className:"text-[9px] font-normal uppercase tracking-widest text-muted-foreground",children:"Meta Tags List"}),U(T,{type:"button",variant:"outline",size:"sm",onClick:k,disabled:o,className:"h-6 font-light",children:[_(vt,{}),"Add Meta Tag"]})]})]})};var ze=(s,u)=>{if(!s)return{success:!1,error:"Empty response from AI"};try{let o=s;if(typeof o=="string"&&(/^".*"$/.test(o)&&(o=o.replace(/^"(.*)"$/,"$1"),o=o.replace(/\\\\/g,"___DOUBLE_BACKSLASH___").replace(/\\n/g,`
2
+ `).replace(/\\"/g,'"').replace(/___DOUBLE_BACKSLASH___/g,"\\")),u==="jsonLD"||u==="metaOther")){o.includes("```")&&(o=o.replace(/^```json\s*/i,"").replace(/^```\s*/,"").replace(/\s*```$/m,"")),o=o.trim();try{JSON.parse(o)}catch(f){return{success:!1,error:"The AI response is not valid JSON. Please try again or edit manually."}}}return{success:!0,value:o}}catch(o){return{success:!1,error:o instanceof Error?o.message:"Unknown error occurred"}}};import{jsx as Q,jsxs as Y}from"react/jsx-runtime";var Qe=({isOpen:s,onClose:u,onSave:o,onDiscard:g,isSaving:f=!1,fromLanguage:i,toLanguage:m})=>{let a=re[i]||i,v=re[m]||m;return Q(ye,{open:s,onOpenChange:u,children:Y(xe,{className:"sm:max-w-[425px]",children:[Y(Se,{children:[Q(be,{children:"Unsaved SEO Changes"}),Y(Ne,{children:["You have unsaved changes in the SEO for '",a,"' version. Do you want to save these changes before switching to '",v,"' version?"]})]}),Y("div",{className:"flex justify-end gap-3 pt-4",children:[Q(T,{variant:"outline",onClick:g,disabled:f,children:"Discard Changes"}),Q(T,{loading:f,onClick:o,children:"Save & Switch"})]})]})})};import{Fragment as It,jsx as t,jsxs as n}from"react/jsx-runtime";var Dt=s=>{if(!s)return!0;try{return JSON.parse(s),!0}catch(u){return!1}},Et=(s,u)=>{let o=s.selectionStart||0,g=s.selectionEnd||0,f=s.value,i=f.substring(0,o),m=f.substring(g),a=!1,v=!1,k=a?" ":"",b=v?" ":"",E=`{{${u}}}`,l=i+(a?k:"")+E+(v?b:"")+m,p=o+(a?1:0)+E.length;return{value:l,newCursorPos:p}},Ze=()=>{let{t:s}=wt(),[,u]=Je(),{data:o}=Ce(),{data:g}=Ae(),{data:f}=ke(),{data:i,isFetching:m}=Ge(),a={...g!=null?g:{},global:f!=null?f:{}},v=i==null?void 0:i.seo,k=Xe(null),[b,E]=H("seo"),l=o==null?void 0:o.id,p=o==null?void 0:o.pageType,h=je(p),{selectedLang:N,fallbackLang:X}=B(),y=N||X,[ue,G]=H(!1),[et,pe]=H(!1),[tt,K]=H(!1),[O,$]=H(null),[r,j]=H({keyword:"",title:"",description:"",cononicalUrl:"",noIndex:!1,noFollow:"",ogTitle:"",ogDescription:"",ogImage:"",ogImageId:"",searchTitle:"",searchDescription:"",jsonLD:"{}",metaOther:"{}",...v}),M=Xe({}),{mutate:Z,isPending:me}=Me(),st=me||ue||et,{hasPermission:ot}=Le(),c=ot(we["pages:edit_seo"]),[nt]=De(),at=S(nt,"flags.resetSeoToDefault",!1),ge=!N||r.jsonLD!=="{}";de(()=>{if(!m&&v&&l){let e={keyword:"",title:"",description:"",cononicalUrl:"",noIndex:!1,noFollow:"",ogTitle:"",ogDescription:"",ogImage:"",ogImageId:"",searchTitle:"",searchDescription:"",jsonLD:"",metaOther:"",...v};j(e),M.current[y]=e}},[m,v,y,l]),de(()=>{let e=d=>{let{fromLang:x,toLang:P,switchHandler:w}=d.detail,ee=M.current[y];(ee?!Ye(ee,r):!1)?($({fromLang:x,toLang:P,switchHandler:w}),K(!0)):w()};return window.addEventListener("seo-language-switch-check",e),()=>{window.removeEventListener("seo-language-switch-check",e)}},[l,r,y]);let rt=async()=>{if(!(!h||!y))try{G(!0);let e=z(h,y),d={...r,keyword:S(e,"seo.keyword",""),title:S(e,"seo.title",""),description:S(e,"seo.description",""),cononicalUrl:S(e,"seo.canonicalUrl",""),noIndex:S(e,"seo.noIndex",!1),noFollow:S(e,"seo.noFollow",!1),ogTitle:S(e,"seo.ogTitle",""),ogDescription:S(e,"seo.ogDescription","")};j(d),D.success(s("SEO fields reset to defaults"))}catch(e){D.error(s("Failed to reset SEO fields")),console.error("Reset SEO error:",e)}finally{G(!1)}},it=async()=>{if(!(!h||!y))try{pe(!0);let e=z(h,y),d={...r,jsonLD:S(e,"seo.jsonLD","")};j(d),D.success(s("JSON-LD reset to default"))}catch(e){D.error(s("Failed to reset JSON-LD")),console.error("Reset JSON-LD error:",e)}finally{pe(!1)}},lt=async()=>{if(!(!h||!y))try{G(!0);let e=z(h,y),d={...r,ogTitle:S(e,"seo.ogTitle",""),ogDescription:S(e,"seo.ogDescription",""),ogImage:S(e,"seo.ogImage",""),ogImageId:S(e,"seo.ogImageId",""),metaOther:S(e,"seo.metaOther","{}")};j(d),D.success(s("Meta Tag fields reset to defaults"))}catch(e){D.error(s("Failed to reset Meta Tag fields")),console.error("Reset Meta Tag error:",e)}finally{G(!1)}},ct=async()=>{Z({id:i==null?void 0:i.id,seo:r,primaryPage:l},{onSuccess:()=>{console.log("SEO & JSON-LD updated successfully",r),M.current[y]=r,D.success(s("SEO & JSON-LD updated successfully"))}})},fe=Lt((e,d,x,P)=>{Ye(M.current[P],e)||Dt(e==null?void 0:e.jsonLD)&&Z({id:d,seo:e,primaryPage:x},{onSuccess:()=>{console.log("SEO & JSON-LD updated successfully",e)},onError:()=>{D.error(s("Failed to update SEO & JSON-LD"))}})},[Z,s]),he=bt(fe,[fe],1500);de(()=>{i!=null&&i.id&&l&&y&&!m&&he(r,i.id,l,y)},[r,i==null?void 0:i.id,l,y,m,he]);let R=(e,d)=>{let x=document.getElementById(d);if(x){let{value:P,newCursorPos:w}=Et(x,e);k.current={id:d,position:w},x.tagName.toLowerCase()==="input"?(x.value=P,j(J=>({...J,[x.name]:P})),x.focus(),x.setSelectionRange(w,w),[0,10,50,100,200].forEach(J=>{setTimeout(()=>{let te=document.getElementById(d);te&&(te.focus(),te.setSelectionRange(w,w))},J)})):(j(F=>({...F,[x.name]:P})),requestAnimationFrame(()=>{let F=document.getElementById(d);F&&(F.focus(),F.setSelectionRange(w,w),setTimeout(()=>{let J=document.getElementById(d);J&&(J.focus(),J.setSelectionRange(w,w))},50))}))}},L=e=>{let d={...r,[e.target.name]:e.target.name==="noIndex"||e.target.name==="noFollow"?e.target.checked:e.target.value};j(d)},q=e=>d=>{if(!Nt(d.fieldValue)){let x=ze(d.fieldValue,e);x.success?L({target:{name:e,value:x.value}}):D.error(n("div",{children:[t("h2",{children:"Failed to process AI response:"}),t("p",{children:x.error})]}))}d.error&&(d.canBuyCredits?D.error(t("div",{children:t("p",{className:"z-[999] text-xs font-normal",children:d.error})}),{action:{label:"Buy Credits",onClick:()=>u(Ve)},duration:8e3}):D.error(n("div",{children:[t("h2",{children:"Failed to generate:"}),t("p",{children:d.error})]})))},dt=()=>{let e=S(o,"seo.jsonLD","{}");if((e==null?void 0:e.trim())==="{}"){D.error(s("Default page JSON-LD is empty"));return}L({target:{name:"jsonLD",value:e}})};return n("div",{className:"relative flex h-full max-h-[500px] min-h-[500px] flex-col overflow-hidden text-foreground","data-panel-id":"seo",children:[!c&&t("div",{className:"absolute inset-0 z-10 flex items-center justify-center backdrop-blur-sm",children:t(_e,{variant:"default",className:"w-[80%] max-w-md text-xs",children:t(He,{children:s("You don't have permission to edit SEO settings. Contact your administrator for access.")})})}),t("div",{className:"flex-shrink-0 px-2 pb-4",children:n("div",{className:"flex w-full items-center justify-between rounded-md bg-muted/10 px-3 py-2 text-left text-sm",children:[n("span",{className:"inline-flex items-center gap-x-2",children:[t("div",{className:"text-sm leading-none",children:i==null?void 0:i.name}),t("span",{className:"text-xs font-light leading-none text-muted-foreground",children:i==null?void 0:i.slug})]}),t(qe,{showAdd:!1})]})}),t("div",{className:"flex-shrink-0 px-2",children:t(Re,{value:b,onValueChange:E,children:n(Pe,{className:"mb-2",children:[t(W,{value:"seo",className:"px-5",children:s("SEO")}),t(W,{value:"opengraph",className:"px-5",children:s("Meta Tags")}),t(W,{value:"jsonld",className:"px-5",children:s("JSON-LD")}),t(ne,{slotId:oe.SEO_PANEL.TRIGGER,context:{setTab:E}})]})})}),t("div",{className:"flex-1 overflow-hidden px-2 pb-2",children:n("form",{className:"h-full",children:[t("div",{className:b==="seo"?"h-full overflow-y-auto pb-4 pr-2":"sr-only",children:n("div",{className:"space-y-4",children:[n("div",{className:"space-y-0.5",children:[n("div",{className:"flex items-center justify-between",children:[t(I,{className:"text-xs",htmlFor:"keyword",children:s("Keyword")}),c&&t(C,{dataType:"value",data:a,onSelect:e=>R(e,"keyword")})]}),t(A,{type:"text",id:"keyword",name:"keyword",value:r.keyword,onChange:L,disabled:!c,placeholder:s("Enter keyword"),readOnly:!c})]}),n("div",{className:"space-y-0.5",children:[n("div",{className:"flex items-center justify-between",children:[t(I,{className:"text-xs",htmlFor:"title",children:s("SEO Title")}),n("div",{className:"flex items-center justify-end gap-1",children:[t(V,{keyword:r.keyword,onComplete:q("title"),field:"title"}),c&&t(C,{dataType:"value",data:a,onSelect:e=>R(e,"title")})]})]}),t(A,{type:"text",id:"title",name:"title",value:r.title,onChange:L,disabled:!c,placeholder:s("Enter SEO title"),readOnly:!c})]}),n("div",{className:"space-y-0.5",children:[n("div",{className:"flex items-center justify-between",children:[t(I,{className:"text-xs",htmlFor:"description",children:s("SEO Description")}),n("div",{className:"flex items-center gap-1",children:[t(V,{keyword:r.keyword,onComplete:q("description"),field:"description"}),c&&t(C,{data:a,onSelect:e=>R(e,"description")})]})]}),t(ae,{id:"description",name:"description",rows:5,value:r.description,onChange:L,disabled:!c,placeholder:s("Enter SEO description"),readOnly:!c})]}),n("div",{className:"space-y-0.5",children:[n("div",{className:"flex items-center justify-between",children:[t(I,{className:"text-xs",htmlFor:"title",children:s("Canonical URL")}),c&&t(C,{dataType:"value",data:a,onSelect:e=>R(e,"canonicalUrl")})]}),t(A,{type:"text",id:"canonicalUrl",name:"canonicalUrl",value:r.canonicalUrl,onChange:L,disabled:!c,placeholder:s("Enter Canonical URL"),readOnly:!c})]}),n("div",{className:"grid grid-cols-2 items-center justify-between",children:[n("div",{children:[n("div",{className:"flex items-center gap-x-2",children:[t(ie,{id:"noIndex",checked:r.noIndex,onCheckedChange:e=>L({target:{name:"noIndex",checked:!!e}}),disabled:!c}),t(I,{htmlFor:"noIndex",children:s("No Index")})]}),t("p",{className:"mt-1 text-[11px] font-light leading-4 text-muted-foreground/80",children:s("Check this if you don't want search engines to index this page.")})]}),n("div",{children:[n("div",{className:"flex items-center gap-x-2",children:[t(ie,{id:"noFollow",checked:r.noFollow,onCheckedChange:e=>L({target:{name:"noFollow",checked:!!e}}),disabled:!c}),t(I,{htmlFor:"noFollow",children:s("No Follow")})]}),t("p",{className:"mt-1 text-[11px] font-light text-muted-foreground/80",children:s("Check this if you don't want search engines to follow links on this page.")})]})]})]})}),t("div",{className:b==="opengraph"?"h-full overflow-y-auto pb-4 pr-2":"sr-only",children:t("div",{className:"space-y-4",children:n("div",{children:[t("p",{className:"py-3 text-xs font-light",children:s("Open Graph")}),n("div",{className:"space-y-4",children:[n("div",{className:"space-y-0.5",children:[n("div",{className:"flex items-center justify-between",children:[t(I,{className:"text-xs",htmlFor:"ogTitle",children:s("OG Title")}),n("div",{className:"flex items-center gap-1",children:[t(V,{keyword:r.keyword,onComplete:q("ogTitle"),field:"ogTitle"}),c&&t(C,{dataType:"value",data:a,onSelect:e=>R(e,"ogTitle")})]})]}),t(A,{type:"text",id:"ogTitle",name:"ogTitle",value:r.ogTitle,onChange:L,disabled:!c,placeholder:s("Enter OG title"),readOnly:!c})]}),n("div",{className:"space-y-0.5",children:[n("div",{className:"flex items-center justify-between",children:[t(I,{className:"text-xs",htmlFor:"ogDescription",children:s("OG Description")}),n("div",{className:"flex items-center gap-1",children:[t(V,{keyword:r.keyword,onComplete:q("ogDescription"),field:"ogDescription"}),c&&t(C,{dataType:"value",data:a,onSelect:e=>R(e,"ogDescription")})]})]}),t(ae,{id:"ogDescription",name:"ogDescription",rows:5,value:r.ogDescription,onChange:L,disabled:!c,placeholder:s("Enter OG description"),readOnly:!c})]}),n("div",{className:"space-y-0.5",children:[n("div",{className:"flex items-center justify-between",children:[t(I,{className:"text-xs",htmlFor:"ogImage",children:s("OG Image")}),c&&t(C,{dataType:"value",data:a,onSelect:e=>{j({...r,ogImage:`{{${e}}}`,ogImageId:""})}})]}),t(le,{assetId:r.ogImageId,assetUrl:r.ogImage,onChange:e=>{j({...r,ogImage:e.url,ogImageId:e.id})},disabled:!c,placeholder:s("Select OG image"),className:"mb-2"})]}),n("div",{className:"space-y-0.5",children:[t(I,{className:"text-xs",htmlFor:"metaOther",children:s("Meta Tags")}),t(We,{value:r.metaOther,onChange:e=>{L({target:{name:"metaOther",value:e}})},disabled:!c})]})]})]})})}),t("div",{className:b==="jsonld"?"h-full overflow-y-auto pb-4 pr-2":"sr-only",children:t("div",{className:"space-y-4",children:n("div",{className:"space-y-0.5",children:[t("div",{className:"hidden",children:JSON.stringify(a)}),t(Ue,{id:"jsonLD",value:r.jsonLD,onChange:e=>{L({target:{name:"jsonLD",value:e}})},placeholder:s("Enter JSON-LD"),disabled:!c,readOnly:!c,pageData:a,rows:20,handleFieldInsert:R,hasJsonLdForSelectedLang:ge,copyJsonLDFromDefaultPage:dt,topRightComponent:ge&&t("div",{className:"flex items-center gap-1",children:t(V,{keyword:r.keyword,onComplete:q("jsonLD"),field:"jsonLD"})})})]})})}),t(ne,{slotId:oe.SEO_PANEL.CONTENT,context:{tab:b}})]})}),c&&t(It,{children:at?t("div",{className:"fixed bottom-0 left-0 right-0 flex w-full flex-shrink-0 items-center justify-between border-t bg-surface p-4",children:t(T,{type:"button",variant:"ghost",size:"sm",onClick:()=>{b==="jsonld"?it():b==="opengraph"?lt():rt()},disabled:st||!c||!h,children:s(ue?"Resetting...":`Reset to ${b==="jsonld"?"Default JSON-LD":b==="opengraph"?"Default Open Graph":"Default SEO"}`)})}):t("div",{})}),t(Qe,{isOpen:tt,onClose:()=>{K(!1),$(null)},onSave:async()=>{O&&(await ct(),O.switchHandler(),K(!1),$(null))},onDiscard:()=>{if(O){let e=M.current[y];e&&j(e),O.switchHandler(),K(!1),$(null)}},isSaving:me,fromLanguage:(O==null?void 0:O.fromLang)||y,toLanguage:(O==null?void 0:O.toLang)||""})]})};Ze.displayName="SeoPanel";var Vs=Ze;export{Vs as default};
@@ -0,0 +1,116 @@
1
+ import { LanguageModel, ImageModel } from 'ai';
2
+ import { e as AIModel, F as ChaiDebugLevel, L as ChaiGlobalDataProvider, V as ChaiPageTypeEntry, x as ChaiCollectionEntry, l as ChaiBlockDataProvider, a6 as ChaiTrashEntry, C as ChaiAction } from './actions-DM00SIUk.cjs';
3
+ import { a as ChaiDbSetup } from './core-BNe4bA6z.cjs';
4
+
5
+ interface CreditStatus {
6
+ monthly: {
7
+ used: number;
8
+ limit: number;
9
+ remaining: number;
10
+ };
11
+ addon: {
12
+ total: number;
13
+ used: number;
14
+ remaining: number;
15
+ addons: Array<{
16
+ id: string;
17
+ remaining: number;
18
+ }>;
19
+ };
20
+ totalAvailable: number;
21
+ canBuyCredits: boolean;
22
+ billingPeriod?: {
23
+ start: Date;
24
+ end: Date;
25
+ };
26
+ }
27
+
28
+ /** Grant map used for per-user permission overrides (`appUsers.permissions`). */
29
+ type ChaiRoleGrantMap = Record<string, boolean>;
30
+ /** Shape of a single role entry resolved from the `roles` table. */
31
+ type ChaiRoleEntry = {
32
+ permissions?: string[] | null;
33
+ };
34
+ /** Role -> entry map assembled from the `roles` table for a client. */
35
+ type ChaiRolesAndPermissions = Record<string, ChaiRoleEntry | null | undefined>;
36
+ /**
37
+ * Per-user override stored in `appUsers.permissions`.
38
+ * - Map form `{ "pages:delete": false }` overlays the role grant (true grants, false revokes).
39
+ * - Array form `["pages:create"]` is treated as additive grants (legacy/simple).
40
+ */
41
+ type ChaiUserPermissionOverride = ChaiRoleGrantMap | string[] | null | undefined;
42
+
43
+ type LogAiRequestParams = {
44
+ userId: string;
45
+ startTime: number;
46
+ response: Record<string, any>;
47
+ error?: string | null;
48
+ prompt: string;
49
+ model: string;
50
+ appId: string;
51
+ creditStatus?: CreditStatus | null;
52
+ };
53
+
54
+ /** Result of `createPostgresDB`, `createLibsqlDB`, etc. — pass to `buildChaiBuilderConfig({ db })`. */
55
+ type ChaiDbConfigInput = ChaiDbSetup;
56
+ type ResolvedChaiDbConfig = ChaiDbSetup;
57
+ type ResolvedChaiAIGlobalConfig = {
58
+ models: AIModel[];
59
+ defaultModelId: string;
60
+ resolveModel: (modelKey: string, aiActionName: string) => {
61
+ model: LanguageModel | ImageModel;
62
+ providerOptions?: Record<string, unknown>;
63
+ } | undefined;
64
+ credits: {
65
+ enabled: boolean;
66
+ };
67
+ logging: {
68
+ logger: (params: LogAiRequestParams) => void | Promise<void>;
69
+ clientId: string | null;
70
+ };
71
+ };
72
+ /**
73
+ * How ChaiBuilder should resolve roles and permissions.
74
+ * - `undefined` → built-in default roles (`DEFAULT_ROLE_MAPS`), no DB hit
75
+ * - `{ source: 'custom' }` → load from the `roles` DB table, fallback to defaults
76
+ * - `ChaiRolesAndPermissions` → use the provided static map directly
77
+ */
78
+ type ChaiRolesConfig = {
79
+ source: "custom";
80
+ } | ChaiRolesAndPermissions;
81
+ type ResolvedChaiBuilderServerConfig = {
82
+ debugLevel: ChaiDebugLevel;
83
+ globalDataProvider: ChaiGlobalDataProvider;
84
+ pageTypes: ChaiPageTypeEntry[];
85
+ collections: ChaiCollectionEntry[];
86
+ blockDataProviders: Record<string, ChaiBlockDataProvider>;
87
+ trash: ChaiTrashEntry[];
88
+ actions: Record<string, ChaiAction<any, any>>;
89
+ /** @deprecated Use `actions` instead */
90
+ builderActions: Record<string, ChaiAction<any, any>>;
91
+ /** Extra permission keys beyond the built-in catalog, exposed to the frontend. */
92
+ extraPermissions: string[];
93
+ /** Role configuration. Undefined = use DEFAULT_ROLE_MAPS. */
94
+ roles: ChaiRolesConfig | undefined;
95
+ ai: ResolvedChaiAIGlobalConfig;
96
+ db: ResolvedChaiDbConfig;
97
+ };
98
+ type ChaiBuilderServerConfigInput = {
99
+ db: ChaiDbConfigInput;
100
+ globalDataProvider?: ChaiGlobalDataProvider;
101
+ pageTypes?: ChaiPageTypeEntry[];
102
+ collections?: ChaiCollectionEntry[];
103
+ blockDataProviders?: Record<string, ChaiBlockDataProvider>;
104
+ ai?: Partial<ResolvedChaiAIGlobalConfig>;
105
+ trash?: ChaiTrashEntry[];
106
+ actions?: Record<string, ChaiAction<any, any>>;
107
+ /** @deprecated Use `actions` instead */
108
+ builderActions?: Record<string, ChaiAction<any, any>>;
109
+ /** Extra app-specific permission keys beyond the built-in catalog. Exposed to the frontend. */
110
+ extraPermissions?: string[];
111
+ /** Role configuration. Omit to use DEFAULT_ROLE_MAPS. Pass `{ source: 'custom' }` to load from DB. */
112
+ roles?: ChaiRolesConfig;
113
+ debugLevel?: ChaiDebugLevel;
114
+ };
115
+
116
+ export type { ChaiBuilderServerConfigInput as C, LogAiRequestParams as L, ResolvedChaiAIGlobalConfig as R, ChaiDbConfigInput as a, ChaiRoleEntry as b, ChaiRoleGrantMap as c, ChaiRolesAndPermissions as d, ChaiRolesConfig as e, ChaiUserPermissionOverride as f, CreditStatus as g, ResolvedChaiBuilderServerConfig as h, ResolvedChaiDbConfig as i };
@@ -0,0 +1,116 @@
1
+ import { LanguageModel, ImageModel } from 'ai';
2
+ import { e as AIModel, F as ChaiDebugLevel, L as ChaiGlobalDataProvider, V as ChaiPageTypeEntry, x as ChaiCollectionEntry, l as ChaiBlockDataProvider, a6 as ChaiTrashEntry, C as ChaiAction } from './actions-DM00SIUk.js';
3
+ import { a as ChaiDbSetup } from './core-BNe4bA6z.js';
4
+
5
+ interface CreditStatus {
6
+ monthly: {
7
+ used: number;
8
+ limit: number;
9
+ remaining: number;
10
+ };
11
+ addon: {
12
+ total: number;
13
+ used: number;
14
+ remaining: number;
15
+ addons: Array<{
16
+ id: string;
17
+ remaining: number;
18
+ }>;
19
+ };
20
+ totalAvailable: number;
21
+ canBuyCredits: boolean;
22
+ billingPeriod?: {
23
+ start: Date;
24
+ end: Date;
25
+ };
26
+ }
27
+
28
+ /** Grant map used for per-user permission overrides (`appUsers.permissions`). */
29
+ type ChaiRoleGrantMap = Record<string, boolean>;
30
+ /** Shape of a single role entry resolved from the `roles` table. */
31
+ type ChaiRoleEntry = {
32
+ permissions?: string[] | null;
33
+ };
34
+ /** Role -> entry map assembled from the `roles` table for a client. */
35
+ type ChaiRolesAndPermissions = Record<string, ChaiRoleEntry | null | undefined>;
36
+ /**
37
+ * Per-user override stored in `appUsers.permissions`.
38
+ * - Map form `{ "pages:delete": false }` overlays the role grant (true grants, false revokes).
39
+ * - Array form `["pages:create"]` is treated as additive grants (legacy/simple).
40
+ */
41
+ type ChaiUserPermissionOverride = ChaiRoleGrantMap | string[] | null | undefined;
42
+
43
+ type LogAiRequestParams = {
44
+ userId: string;
45
+ startTime: number;
46
+ response: Record<string, any>;
47
+ error?: string | null;
48
+ prompt: string;
49
+ model: string;
50
+ appId: string;
51
+ creditStatus?: CreditStatus | null;
52
+ };
53
+
54
+ /** Result of `createPostgresDB`, `createLibsqlDB`, etc. — pass to `buildChaiBuilderConfig({ db })`. */
55
+ type ChaiDbConfigInput = ChaiDbSetup;
56
+ type ResolvedChaiDbConfig = ChaiDbSetup;
57
+ type ResolvedChaiAIGlobalConfig = {
58
+ models: AIModel[];
59
+ defaultModelId: string;
60
+ resolveModel: (modelKey: string, aiActionName: string) => {
61
+ model: LanguageModel | ImageModel;
62
+ providerOptions?: Record<string, unknown>;
63
+ } | undefined;
64
+ credits: {
65
+ enabled: boolean;
66
+ };
67
+ logging: {
68
+ logger: (params: LogAiRequestParams) => void | Promise<void>;
69
+ clientId: string | null;
70
+ };
71
+ };
72
+ /**
73
+ * How ChaiBuilder should resolve roles and permissions.
74
+ * - `undefined` → built-in default roles (`DEFAULT_ROLE_MAPS`), no DB hit
75
+ * - `{ source: 'custom' }` → load from the `roles` DB table, fallback to defaults
76
+ * - `ChaiRolesAndPermissions` → use the provided static map directly
77
+ */
78
+ type ChaiRolesConfig = {
79
+ source: "custom";
80
+ } | ChaiRolesAndPermissions;
81
+ type ResolvedChaiBuilderServerConfig = {
82
+ debugLevel: ChaiDebugLevel;
83
+ globalDataProvider: ChaiGlobalDataProvider;
84
+ pageTypes: ChaiPageTypeEntry[];
85
+ collections: ChaiCollectionEntry[];
86
+ blockDataProviders: Record<string, ChaiBlockDataProvider>;
87
+ trash: ChaiTrashEntry[];
88
+ actions: Record<string, ChaiAction<any, any>>;
89
+ /** @deprecated Use `actions` instead */
90
+ builderActions: Record<string, ChaiAction<any, any>>;
91
+ /** Extra permission keys beyond the built-in catalog, exposed to the frontend. */
92
+ extraPermissions: string[];
93
+ /** Role configuration. Undefined = use DEFAULT_ROLE_MAPS. */
94
+ roles: ChaiRolesConfig | undefined;
95
+ ai: ResolvedChaiAIGlobalConfig;
96
+ db: ResolvedChaiDbConfig;
97
+ };
98
+ type ChaiBuilderServerConfigInput = {
99
+ db: ChaiDbConfigInput;
100
+ globalDataProvider?: ChaiGlobalDataProvider;
101
+ pageTypes?: ChaiPageTypeEntry[];
102
+ collections?: ChaiCollectionEntry[];
103
+ blockDataProviders?: Record<string, ChaiBlockDataProvider>;
104
+ ai?: Partial<ResolvedChaiAIGlobalConfig>;
105
+ trash?: ChaiTrashEntry[];
106
+ actions?: Record<string, ChaiAction<any, any>>;
107
+ /** @deprecated Use `actions` instead */
108
+ builderActions?: Record<string, ChaiAction<any, any>>;
109
+ /** Extra app-specific permission keys beyond the built-in catalog. Exposed to the frontend. */
110
+ extraPermissions?: string[];
111
+ /** Role configuration. Omit to use DEFAULT_ROLE_MAPS. Pass `{ source: 'custom' }` to load from DB. */
112
+ roles?: ChaiRolesConfig;
113
+ debugLevel?: ChaiDebugLevel;
114
+ };
115
+
116
+ export type { ChaiBuilderServerConfigInput as C, LogAiRequestParams as L, ResolvedChaiAIGlobalConfig as R, ChaiDbConfigInput as a, ChaiRoleEntry as b, ChaiRoleGrantMap as c, ChaiRolesAndPermissions as d, ChaiRolesConfig as e, ChaiUserPermissionOverride as f, CreditStatus as g, ResolvedChaiBuilderServerConfig as h, ResolvedChaiDbConfig as i };
@@ -0,0 +1 @@
1
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i}from"./chunk-OQZ4EPOM.js";import"./chunk-WOT6VMZA.js";export{f as getInitializedState,g as getInitializedStateWithUser,b as getOptionalRequestState,a as getRequestState,c as runInContext,d as runWithOptionalRequestState,e as runWithState,h as verifyInit,i as verifyInitWithUser};
@@ -0,0 +1 @@
1
+ import{a as T,b,c as w,e as E,f as k}from"./chunk-ERCY63ZW.js";import{a as v}from"./chunk-ROQRBSK6.js";import{c as i,d as l,e as g,h as N,i as x,k as h,l as C}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{R as f}from"./chunk-2NYUIXUX.js";import"./chunk-WEVKAJMV.js";import"./chunk-ZAU65LBG.js";import{b as n}from"./chunk-3IT7IIAV.js";import{a as p}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{AlertCircle as q,Check as O,UserIcon as P,X as U}from"lucide-react";import{useState as B}from"react";import{useTranslation as D}from"react-i18next";import{jsx as t,jsxs as a}from"react/jsx-runtime";var F=()=>{let m=h(),{pageLockMeta:r}=x(),{setPageStatus:d}=N(),{savePageAsync:I}=f(),y=r==null?void 0:r.requestingUserId,{data:e,isFetching:S}=v(y||""),c=S?"Fetching user...":(e==null?void 0:e.name)||"Current editor",[u,o]=B(!1),R=C(),A=async()=>{o(!0),await I(),g.hasYieldedToTakeover=!0,await R(),m(l.CONTINUE_EDITING_IN_THIS_CLIENT,r),d(i.CHECKING),setTimeout(()=>o(!1),2e3)},_=()=>{o(!0),m(l.TAKE_OVER_REJECTED,r),d(i.EDITING),setTimeout(()=>o(!1),2e3)},{t:s}=D();return t(p,{children:a(T,{className:"mx-auto h-fit w-full max-w-md",children:[t(b,{className:"space-y-1",children:a(w,{className:"flex items-center gap-2 text-xl",children:[t(q,{className:"h-8 w-8 rounded-md bg-amber-500/20 p-1.5 text-amber-500"}),s("Take Over Requested")]})}),a(E,{className:"space-y-4",children:[a("div",{className:"relative rounded-md border border-green-500 px-2 pb-2 pt-4",children:[t("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:"Requested by"}),a("div",{className:"flex items-center space-x-4 p-1",children:[e!=null&&e.avatar?t("img",{src:e.avatar,alt:e.name,className:"h-12 w-12 flex-shrink-0 rounded-full bg-black p-0.5 text-white"}):t(P,{className:"h-12 w-12 flex-shrink-0 rounded-full bg-black p-3 text-white"}),a("div",{className:"flex-1 space-y-0",children:[t("div",{className:"truncate font-medium leading-tight text-black",children:c}),(e==null?void 0:e.email)&&t("p",{className:"truncate text-sm leading-tight text-muted-foreground",children:e.email})]})]})]}),a("p",{className:"text-sm text-muted-foreground",children:[t("span",{className:"font-medium text-gray-700",children:c})," ",s("has requested to")," ",t("span",{className:"font-medium text-gray-500",children:"take over"})," ",s("editing this page."),"."," ",s("Do you want to allow them to continue?")]})]}),a(k,{className:"flex gap-2",children:[a(n,{disabled:u,variant:"default",onClick:A,className:"flex-1 gap-2",children:[t(O,{className:"h-4 w-4"}),s("Accept")]}),a(n,{disabled:u,variant:"outline",onClick:_,className:"flex-1 gap-2",children:[t(U,{className:"h-4 w-4"}),s("Reject")]})]})]})})},M=F;export{M as default};
@@ -0,0 +1 @@
1
+ import{a as t,f as r,g as s,h as g,i as d,j as c}from"./chunk-RBDZDQZR.js";import{b as o}from"./chunk-3IT7IIAV.js";import"./chunk-IP4JBQOX.js";import"./chunk-LWYDGDPW.js";import"./chunk-WOT6VMZA.js";import{jsx as n,jsxs as a}from"react/jsx-runtime";var C=({isOpen:i,onClose:e,onContinue:D,isPending:l=!1,title:p="Translation Warning",description:u="Some blocks need translations before publishing. Do you want to continue anyway?"})=>n(t,{open:i,onOpenChange:e,children:i&&a(r,{className:"sm:max-w-[425px]",children:[a(s,{children:[n(d,{children:p}),n(c,{children:u})]}),a(g,{className:"flex gap-2",children:[n(o,{variant:"outline",onClick:()=>{e()},disabled:l,children:"Cancel"}),n(o,{loading:l,onClick:()=>{D()},children:"Continue Anyway"})]})]})}),T=C;export{T as default};
package/dist/types.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";var p=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var s=(o,r,i,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of x(r))!f.call(o,t)&&t!==i&&p(o,t,{get:()=>r[t],enumerable:!(e=m(r,t))||e.enumerable});return o};var n=o=>s(p({},"__esModule",{value:!0}),o);var d={};module.exports=n(d);
@@ -0,0 +1,38 @@
1
+ import { e as AIModel } from './actions-DM00SIUk.cjs';
2
+ export { A as AIChatOptions, b as AIContext, g as AssetsParams, C as ChaiAction, h as ChaiActionContext, i as ChaiAskAiResponse, j as ChaiBaseSlugEntry, k as ChaiBlock, l as ChaiBlockDataProvider, m as ChaiBlockPropsSchema, n as ChaiBlockRJSFSchemas, o as ChaiBlockSchema, p as ChaiBlockSchemas, q as ChaiBlockStyles, r as ChaiBlockUiSchema, s as ChaiBorderRadiusValue, t as ChaiBreakpoint, u as ChaiBuilderEditorProps, v as ChaiBuilderPagesAIInterface, w as ChaiBuilderRouteProps, a4 as ChaiBuilderThemeValues, x as ChaiCollectionEntry, y as ChaiCollectoin, z as ChaiContextResolver, B as ChaiContextResolverArgs, D as ChaiCoreBlock, E as ChaiCssVariableNameWithDefault, F as ChaiDebugLevel, G as ChaiDesignTokens, H as ChaiFont, I as ChaiFontBySrc, J as ChaiFontByUrl, K as ChaiFontSource, L as ChaiGlobalDataProvider, M as ChaiIncomingRequest, N as ChaiLibrary, O as ChaiLibraryBlock, P as ChaiLoggedInUser, R as ChaiPage, S as ChaiPageProps, T as ChaiPageType, U as ChaiPageTypeDataProvider, V as ChaiPageTypeEntry, W as ChaiRenderBlockProps, X as ChaiRequestContext, Y as ChaiRequestContextArgs, Z as ChaiRequestContextResolver, _ as ChaiRequiredPermission, $ as ChaiResolveSiteUrlContext, a0 as ChaiSavePageData, a1 as ChaiSaveWebsiteData, a2 as ChaiSiteWideUsageData, a3 as ChaiSystemFont, a4 as ChaiTheme, a5 as ChaiThemeOptions, a6 as ChaiTrashEntry, a7 as ChaiTrashableEntity, a8 as ChaiUserAccess, a9 as ChaiUserInfo, aa as ChaiWebsiteBuilderProps, ab as ChaiWebsiteSetting, ac as CollectionConfig, ad as CollectionFetchParams, ae as ImageConfig, af as RestoreConflictResolution, a0 as SavePageData, ah as TrashContext, ai as TrashRecord, aj as TrashableRecordData } from './actions-DM00SIUk.cjs';
3
+ import { LanguageModel, ImageModel } from 'ai';
4
+ import { R as ResolvedChaiAIGlobalConfig } from './server-config-b29G6_aQ.cjs';
5
+ export { C as ChaiBuilderServerConfigInput, a as ChaiDbConfigInput, b as ChaiRoleEntry, c as ChaiRoleGrantMap, d as ChaiRolesAndPermissions, e as ChaiRolesConfig, f as ChaiUserPermissionOverride, L as LogAiRequestParams, h as ResolvedChaiBuilderServerConfig, i as ResolvedChaiDbConfig } from './server-config-b29G6_aQ.cjs';
6
+ export { C as ChaiAsyncProp, a as ChaiBlockComponentProps, b as ChaiBlockConfig, c as ChaiClosestBlockProp, d as ChaiDataProviderArgs, e as ChaiServerBlockConfig, f as ChaiStyles } from './blocks-CP-Pngaz.cjs';
7
+ export { a as ChaiDbSetup, D as DbInstance } from './core-BNe4bA6z.cjs';
8
+ export { C as ChaiBuilderInstance, a as ChaiPageMetadata } from './chaibuilder-instance-DNz3Q-dY.cjs';
9
+ export { C as ChaiFullPage, a as ChaiPartialPage } from './pages-DlMX1Lj2.cjs';
10
+ import '@rjsf/utils';
11
+ import 'react';
12
+ import 'drizzle-orm/pg-core';
13
+ import 'zod';
14
+
15
+ /** Partial AI config for input; use ResolvedChaiAIGlobalConfig after buildChaiBuilderConfig. */
16
+ type ChaiAIGlobalConfig = Partial<ResolvedChaiAIGlobalConfig> & {
17
+ models?: AIModel[];
18
+ resolveModel?: (modelKey: string, aiActionName: string) => {
19
+ model: LanguageModel | ImageModel;
20
+ providerOptions?: Record<string, unknown>;
21
+ } | undefined;
22
+ };
23
+
24
+ type ChaiAsset = {
25
+ url: string;
26
+ id?: string;
27
+ thumbnailUrl?: string;
28
+ description?: Record<string, string>;
29
+ width?: number;
30
+ height?: number;
31
+ };
32
+
33
+ type ChaiRuntimeProp<T> = {
34
+ type: "runtime";
35
+ value: T;
36
+ };
37
+
38
+ export { type ChaiAIGlobalConfig, type ChaiAsset, type ChaiRuntimeProp, ResolvedChaiAIGlobalConfig };
@@ -0,0 +1,38 @@
1
+ import { e as AIModel } from './actions-DM00SIUk.js';
2
+ export { A as AIChatOptions, b as AIContext, g as AssetsParams, C as ChaiAction, h as ChaiActionContext, i as ChaiAskAiResponse, j as ChaiBaseSlugEntry, k as ChaiBlock, l as ChaiBlockDataProvider, m as ChaiBlockPropsSchema, n as ChaiBlockRJSFSchemas, o as ChaiBlockSchema, p as ChaiBlockSchemas, q as ChaiBlockStyles, r as ChaiBlockUiSchema, s as ChaiBorderRadiusValue, t as ChaiBreakpoint, u as ChaiBuilderEditorProps, v as ChaiBuilderPagesAIInterface, w as ChaiBuilderRouteProps, a4 as ChaiBuilderThemeValues, x as ChaiCollectionEntry, y as ChaiCollectoin, z as ChaiContextResolver, B as ChaiContextResolverArgs, D as ChaiCoreBlock, E as ChaiCssVariableNameWithDefault, F as ChaiDebugLevel, G as ChaiDesignTokens, H as ChaiFont, I as ChaiFontBySrc, J as ChaiFontByUrl, K as ChaiFontSource, L as ChaiGlobalDataProvider, M as ChaiIncomingRequest, N as ChaiLibrary, O as ChaiLibraryBlock, P as ChaiLoggedInUser, R as ChaiPage, S as ChaiPageProps, T as ChaiPageType, U as ChaiPageTypeDataProvider, V as ChaiPageTypeEntry, W as ChaiRenderBlockProps, X as ChaiRequestContext, Y as ChaiRequestContextArgs, Z as ChaiRequestContextResolver, _ as ChaiRequiredPermission, $ as ChaiResolveSiteUrlContext, a0 as ChaiSavePageData, a1 as ChaiSaveWebsiteData, a2 as ChaiSiteWideUsageData, a3 as ChaiSystemFont, a4 as ChaiTheme, a5 as ChaiThemeOptions, a6 as ChaiTrashEntry, a7 as ChaiTrashableEntity, a8 as ChaiUserAccess, a9 as ChaiUserInfo, aa as ChaiWebsiteBuilderProps, ab as ChaiWebsiteSetting, ac as CollectionConfig, ad as CollectionFetchParams, ae as ImageConfig, af as RestoreConflictResolution, a0 as SavePageData, ah as TrashContext, ai as TrashRecord, aj as TrashableRecordData } from './actions-DM00SIUk.js';
3
+ import { LanguageModel, ImageModel } from 'ai';
4
+ import { R as ResolvedChaiAIGlobalConfig } from './server-config-oPlt3V1X.js';
5
+ export { C as ChaiBuilderServerConfigInput, a as ChaiDbConfigInput, b as ChaiRoleEntry, c as ChaiRoleGrantMap, d as ChaiRolesAndPermissions, e as ChaiRolesConfig, f as ChaiUserPermissionOverride, L as LogAiRequestParams, h as ResolvedChaiBuilderServerConfig, i as ResolvedChaiDbConfig } from './server-config-oPlt3V1X.js';
6
+ export { C as ChaiAsyncProp, a as ChaiBlockComponentProps, b as ChaiBlockConfig, c as ChaiClosestBlockProp, d as ChaiDataProviderArgs, e as ChaiServerBlockConfig, f as ChaiStyles } from './blocks-CMvgDlxw.js';
7
+ export { a as ChaiDbSetup, D as DbInstance } from './core-BNe4bA6z.js';
8
+ export { C as ChaiBuilderInstance, a as ChaiPageMetadata } from './chaibuilder-instance-qroszVwI.js';
9
+ export { C as ChaiFullPage, a as ChaiPartialPage } from './pages-Dol4CXrN.js';
10
+ import '@rjsf/utils';
11
+ import 'react';
12
+ import 'drizzle-orm/pg-core';
13
+ import 'zod';
14
+
15
+ /** Partial AI config for input; use ResolvedChaiAIGlobalConfig after buildChaiBuilderConfig. */
16
+ type ChaiAIGlobalConfig = Partial<ResolvedChaiAIGlobalConfig> & {
17
+ models?: AIModel[];
18
+ resolveModel?: (modelKey: string, aiActionName: string) => {
19
+ model: LanguageModel | ImageModel;
20
+ providerOptions?: Record<string, unknown>;
21
+ } | undefined;
22
+ };
23
+
24
+ type ChaiAsset = {
25
+ url: string;
26
+ id?: string;
27
+ thumbnailUrl?: string;
28
+ description?: Record<string, string>;
29
+ width?: number;
30
+ height?: number;
31
+ };
32
+
33
+ type ChaiRuntimeProp<T> = {
34
+ type: "runtime";
35
+ value: T;
36
+ };
37
+
38
+ export { type ChaiAIGlobalConfig, type ChaiAsset, type ChaiRuntimeProp, ResolvedChaiAIGlobalConfig };
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ import"./chunk-EPGOG22Q.js";
@@ -0,0 +1 @@
1
+ import{h as c}from"./chunk-VL5WBPVV.js";import"./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"./chunk-WEVKAJMV.js";import"./chunk-ZAU65LBG.js";import{a as r,f as l,g as m,h as p,i as u,j as g}from"./chunk-RBDZDQZR.js";import{b as i}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{useState as T}from"react";import{useTranslation as y}from"react-i18next";import{jsx as t,jsxs as s}from"react/jsx-runtime";var A=({page:d,onClose:a})=>{let{t:e}=y(),[o,n]=T(!1),D=c(),f=()=>{n(!0),D.mutate(d,{onSuccess:()=>{n(!1),a()},onError:()=>{n(!1)}})};return t(r,{open:!0,onOpenChange:a,children:s(l,{children:[s(m,{children:[t(u,{children:e("Unmark as template")}),t(g,{className:"space-y-1 py-2 text-xs text-muted-foreground",children:e("Are you sure you want to unmark this page as a template?")})]}),s(p,{className:o?"pointer-events-none":"",children:[t(i,{variant:"outline",size:"sm",disabled:o,onClick:k=>{k.stopPropagation(),a()},children:e("Cancel")}),t(i,{variant:"default",size:"sm",disabled:o,onClick:f,children:e("Unmark as template")})]})]})})},B=A;export{B as default};
@@ -0,0 +1 @@
1
+ import{e as g}from"./chunk-VL5WBPVV.js";import"./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"./chunk-WEVKAJMV.js";import"./chunk-ZAU65LBG.js";import{a as e,f as r,g as D,h as c,i as b,j as d}from"./chunk-RBDZDQZR.js";import{b as a}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{useTranslation as p}from"react-i18next";import{jsx as n,jsxs as t}from"react/jsx-runtime";var f=({page:o,onClose:l})=>{var u;let{t:i}=p(),{mutate:m,isPending:s}=g(),h=async()=>{m(o,{onSuccess:l})};return n(e,{open:!!o,onOpenChange:l,children:t(r,{children:[t(D,{children:[n(b,{children:i("Confirm action")}),t(d,{children:[i("Are you sure you want to unpublish")," ",n("b",{children:(u=o==null?void 0:o.name)!=null?u:o==null?void 0:o.slug}),"?"]})]}),t(c,{children:[n(a,{variant:"outline",onClick:l,children:i("Cancel")}),n(a,{variant:"destructive",disabled:s,onClick:h,children:i(s?"Updating...":"Unpublish")})]})]})})},P=f;export{P as default};
@@ -0,0 +1 @@
1
+ import{a as d,f as p,g as m,h as c,i as h,j as b}from"./chunk-RBDZDQZR.js";import{b as r}from"./chunk-TEL5ACJE.js";import{b as o}from"./chunk-3IT7IIAV.js";import"./chunk-IP4JBQOX.js";import"./chunk-LWYDGDPW.js";import"./chunk-WOT6VMZA.js";import{useTranslation as D}from"react-i18next";import{Fragment as N,jsx as a,jsxs as t}from"react/jsx-runtime";var v=({isOpen:i,onClose:u,onContinue:x,onViewChanges:n,isPending:g=!1,partialBlocksInfo:l=[]})=>{let{t:s}=D();return a(d,{open:i,onOpenChange:u,children:i&&t(p,{className:"sm:max-w-[425px]",children:[t(m,{children:[a(h,{children:s("You have some unpublished changes")}),a(b,{children:s("The following partials are either unpublished or have unpublished changes.")})]}),(l==null?void 0:l.length)>0&&a("div",{className:"max-h-32 overflow-y-auto rounded-md border bg-accent p-2",children:a("ul",{className:"space-y-1 text-sm",children:l.map(e=>t("li",{className:"flex items-center justify-between text-muted-foreground",children:[t("span",{className:"flex items-center gap-2 text-foreground",children:[a("p",{className:`h-2 w-2 rounded-full ${(e==null?void 0:e.status)==="unpublished_changes"?"bg-success":"bg-muted"}`})," ",e==null?void 0:e.name]}),t("span",{className:"flex items-center gap-1",children:[(e==null?void 0:e.status)==="unpublished_changes"&&t(N,{children:[a(r,{className:"bg-success/10 text-success hover:bg-success/10 px-1.5 py-0 text-[10px]",children:s("Published")}),n&&a(o,{variant:"link",title:s("View Changes"),size:"xs",className:"text-[10px]",onClick:()=>n(e.id,e.name),children:s("View Changes")})]}),(e==null?void 0:e.status)==="unpublished"&&a(r,{className:"bg-orange/10 text-orange hover:bg-orange/10 px-1.5 py-0 text-[10px] font-light",children:s("Unpublished")})]})]},e==null?void 0:e.id))})}),t(c,{children:[a(o,{variant:"outline",size:"sm",onClick:u,disabled:g,children:s("Cancel")}),a(o,{loading:g,size:"sm",onClick:x,children:s("Publish Partials & Page")})]})]})})},B=v;export{B as default};
package/dist/utils.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";var je=Object.create;var P=Object.defineProperty;var Ve=Object.getOwnPropertyDescriptor;var Ke=Object.getOwnPropertyNames;var We=Object.getPrototypeOf,Ge=Object.prototype.hasOwnProperty;var ze=(e,t)=>{for(var o in t)P(e,o,{get:t[o],enumerable:!0})},le=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ke(t))!Ge.call(e,n)&&n!==o&&P(e,n,{get:()=>t[n],enumerable:!(r=Ve(t,n))||r.enumerable});return e};var A=(e,t,o)=>(o=e!=null?je(We(e)):{},le(t||!e||!e.__esModule?P(o,"default",{value:e,enumerable:!0}):o,e)),Je=e=>le(P({},"__esModule",{value:!0}),e);var _t={};ze(_t,{applyChaiDataBinding:()=>V,applyDesignTokens:()=>Fe,chaiBuilderPlugin:()=>pe,convertHTMLToChaiBlocks:()=>De,convertToBlocks:()=>Ie,generateUUID:()=>L,getChaiBuilderTailwindConfig:()=>Ne,getChaiBuilderTheme:()=>Me,getCleanHostname:()=>Ue});module.exports=Je(_t);var ce=A(require("tailwindcss/plugin"),1),pe=(0,ce.default)(function({addBase:e,theme:t}){e({"h1,h2,h3,h4,h5,h6":{fontFamily:t("fontFamily.heading")},body:{fontFamily:t("fontFamily.body"),color:t("colors.foreground"),backgroundColor:t("colors.background")}})});var qe=require("cnfast"),de=require("lodash-es"),ue=require("nanoid"),Ye=require("cnfast");function L(e=6){return(0,ue.nanoid)(e)}var y=require("lodash-es");var b="#styles:";var U=require("eta/core"),D=require("lodash-es"),M=/\{\{(.*?)\}\}/g,Xe=/^[\w$][\w$.]*$/,Ze=/[\[\]():?+\-*/%=&|<>!,'"\\`]/u,Qe=/[\[\]():?+*%=&|<>!,'"\\`]/u,et=new Set(["content","htmlCode","icon"]),tt=new U.Eta({tags:["{{","}}"],autoEscape:!0,autoTrim:!1,useWith:!0,parse:{interpolate:"",exec:"~",raw:"~"},functionHeader:'const safeGet = (obj, path) => { const parts = path.split("."); let val = obj; for (const p of parts) { if (val == null) return undefined; val = val[p]; } return val; };'}),rt=new U.Eta({tags:["{{","}}"],autoEscape:!1,autoTrim:!1,useWith:!0,parse:{interpolate:"",exec:"~",raw:"~"},functionHeader:'const safeGet = (obj, path) => { const parts = path.split("."); let val = obj; for (const p of parts) { if (val == null) return undefined; val = val[p]; } return val; };'});var ot=e=>e.split(".").map(t=>t.trim()).join("."),nt=(e,t)=>{let o=t.split("."),r=e;for(let n of o){if(r==null)return;r=r[n]}return r},at=e=>Xe.test(e)?!0:e.includes(".")?e.split(".").map(o=>o.trim()).every(o=>o.length>0&&!Ze.test(o)):!Qe.test(e)&&(e.startsWith("#")||e.includes("/")),st=(e,t,o)=>{let r=o.slice(2,-2).trim();return t!==-1&&(0,D.startsWith)(e,"$index.")?`${r}.${t}.${e.slice(7)}`:t!==-1&&(0,D.startsWith)(e,"$index")?`${r}.${t}`:e},lt=(e,t,o)=>{if(t===-1||!o)return e;let r=o.slice(2,-2).trim();return e.replace(/\$index\./g,`safeGet(it, "${r}.${t}").`).replace(/\$index/g,`safeGet(it, "${r}.${t}")`)},ge=(e,t,o)=>at(e)?ot(st(e,t,o)):null,ct=(e,t,o)=>e.replace(M,(r,n)=>{let s=n.trim();if(!s)return'{{""}}';let i=ge(s,t,o);return i?`{{safeGet(it, ${JSON.stringify(i)}) ?? ""}}`:`{{${lt(s,t,o)}}}`}),pt=(e,t,o,r,n)=>{try{return(n!=null&&n.renderRaw?rt:tt).renderString(ct(e,o,r),t)}catch(s){return""}},me=(e,t,o,r,n)=>{M.lastIndex=0;let s=e.match(M);if(!s)return e;let i=n==="image"||n==="mobileImage",l=n!==void 0&&et.has(n);for(let p of s){let h=p.slice(2,-2).trim(),d=ge(h,o,r);if(!d)continue;let v=nt(t,d);if((0,D.isArray)(v)||i&&v!==void 0)return v}return pt(e,t,o,r,{renderRaw:l})};var j=(e,t,{index:o,key:r},n)=>{if((0,y.isString)(e))return me(e,t,o,r,n);if((0,y.isArray)(e))return e.map(s=>j(s,t,{index:o,key:r},n));if(e&&typeof e=="object"){let s={};return(0,y.forEach)((0,y.keys)(e),i=>{!(0,y.startsWith)(i,"_")&&i!=="$repeaterItemsKey"?s[i]=j(e[i],t,{index:o,key:r},i):s[i]=e[i]}),s}return e},he=(e,t,{index:o,key:r})=>{let n=(0,y.cloneDeep)(e);if(n.repeaterItems){let s=n.repeaterItems;if(n.$repeaterItemsKey=n.repeaterItems,(0,y.startsWith)(n.repeaterItems,`{{${"#"}`)&&(n.$repeaterItemsKey=n.repeaterItems=`${n.repeaterItems.replace("}}",`/${n._id}}}`)}`),!(0,y.isEmpty)(n.repeaterItems)&&n.pagination){let i=`${s.replace("}}",`/${n._id}/totalItems}}`)}`,l=(0,y.get)(t,i.slice(2,-2));n.repeaterTotalItems=l,n.totalItems=l}}return j(n,t,{index:o,key:r})};var V=(e,t)=>he(e,t,{index:-1,key:""});var E=require("lodash-es");var x=require("lodash-es"),ve=require("cnfast");var fe=e=>{if(e=e.replace(b,""),!e)return{baseClasses:"",classes:""};let t=e.split(/,(?![^\[]*\])/);if(t.length===1)return{baseClasses:"",classes:t[0].trim()};let[o,...r]=t;return{baseClasses:o.trim(),classes:r.join(",").trim().replace(/ +(?= )/g,"")}};var ye=require("cnfast"),be=require("cnfast");function B(...e){return(0,be.twMerge)((0,ye.clsx)(e))}var xe={"dt#btn":{name:"Button",description:"Base button styles",value:B("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0","h-9 px-4 py-2")},"dt#btn-primary":{name:"Button-Primary",description:"Primary button style",value:"bg-primary text-primary-foreground shadow hover:bg-primary/90"},"dt#btn-destructive":{name:"Button-Destructive",description:"Destructive button style",value:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90"},"dt#btn-outline":{name:"Button-Outline",description:"Outline button style",value:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground"},"dt#btn-secondary":{name:"Button-Secondary",description:"Secondary button style",value:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80"},"dt#btn-ghost":{name:"Button-Ghost",description:"Ghost button style",value:"hover:bg-accent hover:text-accent-foreground"},"dt#btn-link":{name:"Button-Link",description:"Link button style",value:"text-primary underline-offset-4 hover:underline"},"dt#btn-icon":{name:"Button-Icon",description:"Icon button style",value:"h-9 w-9"},"dt#btn-sm":{name:"Button-Small",description:"Small button style",value:"h-8 rounded-md px-3 text-xs"},"dt#btn-lg":{name:"Button-Large",description:"Large button style",value:"h-10 rounded-md px-8"},"dt#input":{name:"Input",description:"Base input field style",value:"flex h-8 w-full rounded-md border border-input bg-transparent px-3 py-1 text-xs text-foreground transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground/70 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"},"dt#input-sm":{name:"Input-Small",description:"Small input field style",value:"h-7 text-xs"},"dt#input-lg":{name:"Input-Large",description:"Large input field style",value:"h-10 text-sm"},"dt#textarea":{name:"Textarea",description:"Base textarea style",value:"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-xs text-foreground shadow-sm placeholder:text-muted-foreground/70 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"},"dt#textarea-sm":{name:"Textarea-Small",description:"Small textarea style",value:"min-h-[40px] text-xs"},"dt#textarea-lg":{name:"Textarea-Large",description:"Large textarea style",value:"min-h-[80px] text-sm"},"dt#badge":{name:"Badge",description:"Base badge style",value:B("inline-flex leading-tight items-center gap-1 text-[11px] cursor-pointer rounded-md border px-2.5 py-0.5 transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80")},"dt#badge-secondary":{name:"Badge-Secondary",description:"Secondary badge style",value:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80"},"dt#badge-destructive":{name:"Badge-Destructive",description:"Destructive badge style",value:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80"},"dt#badge-outline":{name:"Badge-Outline",description:"Outline badge style",value:"text-foreground"},"dt#badge-active":{name:"Badge-Active",description:"Active badge style",value:"text-primary-foreground border-primary bg-primary px-2 py-px font-light"},"dt#badge-inactive":{name:"Badge-Inactive",description:"Inactive badge style",value:"text-foreground border-border bg-secondary hover:bg-accent px-2 py-px font-light"},"dt#alert":{name:"Alert",description:"Base alert style",value:B("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7","bg-surface text-foreground")},"dt#alert-destructive":{name:"Alert-Destructive",description:"Destructive alert style",value:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"},"dt#alert-title":{name:"Alert-Title",description:"Alert title style",value:"mb-1 font-medium leading-none tracking-tight"},"dt#alert-description":{name:"Alert-Description",description:"Alert description style",value:"text-sm [&_p]:leading-relaxed"},"dt#card":{name:"Card",description:"Base card style",value:"rounded-xl border bg-card text-card-foreground shadow"},"dt#card-header":{name:"Card-Header",description:"Card header style",value:"flex flex-col space-y-1.5 p-6"},"dt#card-title":{name:"Card-Title",description:"Card title style",value:"font-semibold leading-none tracking-tight"},"dt#card-description":{name:"Card-Description",description:"Card description style",value:"text-sm text-muted-foreground"},"dt#card-content":{name:"Card-Content",description:"Card content style",value:"p-6 pt-0"},"dt#card-footer":{name:"Card-Footer",description:"Card footer style",value:"flex items-center p-6 pt-0"},"dt#toggle":{name:"Toggle",description:"Base toggle style",value:B("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0","bg-transparent h-9 px-2 min-w-9")},"dt#toggle-outline":{name:"Toggle-Outline",description:"Outline toggle style",value:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},"dt#toggle-sm":{name:"Toggle-Small",description:"Small toggle style",value:"h-8 px-1.5 min-w-8"},"dt#toggle-lg":{name:"Toggle-Large",description:"Large toggle style",value:"h-10 px-2.5 min-w-10"},"dt#label":{name:"Label",description:"Form label style",value:"text-xs font-light leading-none text-foreground/80 dark:text-foreground/60 peer-disabled:cursor-not-allowed peer-disabled:opacity-70"},"dt#checkbox":{name:"Checkbox",description:"Checkbox style",value:"peer h-4 w-4 shrink-0 cursor-pointer rounded-sm border border-border hover:border-foreground/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground"},"dt#switch":{name:"Switch",description:"Switch toggle style",value:"peer inline-flex h-4 w-[25px] cursor-pointer items-center rounded-full bg-muted transition-colors focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-background"},"dt#switch-thumb":{name:"Switch-Thumb",description:"Switch thumb style",value:"pointer-events-none block h-3 w-3 rounded-full bg-secondary shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0.5"},"dt#skeleton":{name:"Skeleton",description:"Loading skeleton style",value:"animate-pulse rounded-md bg-primary/10"},"dt#separator":{name:"Separator",description:"Horizontal separator style",value:"shrink-0 bg-border h-[1px] w-full"},"dt#separator-vertical":{name:"Separator-Vertical",description:"Vertical separator style",value:"shrink-0 bg-border h-full w-[1px]"},"dt#progress":{name:"Progress",description:"Progress bar container style",value:"relative h-2 w-full overflow-hidden rounded-full bg-primary/20"},"dt#progress-indicator":{name:"Progress-Indicator",description:"Progress bar indicator style",value:"h-full bg-primary transition-all duration-300"}};var _=require("lodash-es");var m=require("lodash-es"),ut=require("react"),F={};var T=e=>(0,m.get)(F,e),N=e=>{let t=(0,m.memoize)(e),o=(r=>(0,m.has)(F,r)?t(r):e(r));return o.cache=t.cache,o},ke=N(e=>{var s,i;let t=(0,m.get)(F,e),o=(i=(s=t==null?void 0:t.props)==null?void 0:s.schema)!=null?i:{},r=(0,m.get)(o,"properties",{}),n={};return(0,m.each)(r,(l,p)=>{(0,m.has)(l,"block")||(0,m.set)(n,p,l.default)}),n}),Kt=N(e=>(0,m.get)(F,`${e}.i18nProps`,[])),gt=N(e=>(0,m.get)(F,`${e}.aiProps`,[])),Wt=N(e=>{var p,h,d,v;let t=T(e);if(!t)return;let o=(h=(p=t.props)==null?void 0:p.schema)!=null?h:{},r=(v=(d=t.props)==null?void 0:d.uiSchema)!=null?v:{},n=(0,m.cloneDeep)(o),s=(0,m.get)(n,"properties",{}),i=(0,m.omitBy)(s,w=>(w==null?void 0:w.styles)===!0);return(0,m.set)(n,"properties",i),{schema:n,uiSchema:r||{}}});var K=e=>e.map(t=>(0,m.has)(F,t._type)?{...ke(t._type),...t}:t);var I=require("lodash-es");var Be=(e,t,o)=>e?e.split(" ").map(r=>{var n;return r.startsWith("dt#")?o.has(r)?"":(o.add(r),Be((n=t[r])==null?void 0:n.value,t,o)):r}).filter(Boolean).join(" "):"",mt=(0,x.memoize)(e=>({...xe,...e}));var Ce=(e,t)=>{let o=mt(t),{baseClasses:r,classes:n}=fe(e),i=n.split(" ").filter(p=>p.startsWith("dt#")).map(p=>{var h;return Be((h=o[p])==null?void 0:h.value,o,new Set([p]))}),l=n.split(" ").filter(p=>!p.startsWith("dt#")).join(" ");return ve.twMerge.apply(null,[r,...i,l])};var fr=(0,x.memoize)(e=>{var n,s;let t=T(e),o=(s=(n=t==null?void 0:t.props)==null?void 0:n.schema)!=null?s:{},r=(0,x.get)(o,"properties",{});return Object.fromEntries(Object.entries(r).filter(([,i])=>(0,x.get)(i,"runtime",!1)))});var Fe=(e,t)=>e.map(o=>{let r=(0,E.keys)(o).filter(n=>(0,E.isString)(o[n])&&o[n].startsWith(b));return(0,E.each)(r,n=>{o[n]=`${b},${Ce(o[n],t)}`}),o});var C=require("himalaya"),a=require("lodash-es");var G=require("lodash-es");var Te=e=>{let t=T(e);return t?(0,G.has)(t,"canAcceptBlock"):!1};var _e=require("lodash-es"),Ee=e=>{let t=/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/,o=/(?:https?:\/\/)?(?:www\.)?(player)?.vimeo\.com/;return t.test(e)||o.test(e)},Se=e=>{if((0,_e.isEmpty)(e))return e;let t=/<video[^>]+src=['"]([^'">]+)['"]/,o=/<iframe[^>]+src=['"]([^'">]+)['"]/,r=e.match(t),n=e.match(o),s=r?r[1]:n?n[1]:null,i=/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/,l=/(?:https?:\/\/)?(?:www\.)?player.vimeo\.com/;return s&&(i.test(s)||l.test(s))?s:e};var z=["chai-name","data-chai-name"],H=null,ht=()=>(H||(H=import("@iconify-json/lucide/icons.json").then(e=>{var t,o,r;return(r=(o=(t=e.default)==null?void 0:t.icons)!=null?o:e.icons)!=null?r:{}}).catch(()=>(H=null,{}))),H),ft=async e=>{let t=e.filter(r=>r._iconName);if(t.length===0)return e;let o=await ht();for(let r of t){let n=r._iconName.trim().toLowerCase(),s=o[n];if(s!=null&&s.body){let i=s.width||24,l=s.height||24;r.icon=`<svg xmlns="http://www.w3.org/2000/svg" class="lucide lucide-${n}" width="${i}" height="${l}" viewBox="0 0 ${i} ${l}" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${s.body}</svg>`}delete r._iconName}return e},yt={partialblockid:"partialBlockId"},bt={img:{alt:"alt",width:"width",height:"height",src:"image"},video:{src:"url",autoplay:"controls.autoPlay",muted:"controls.muted",loop:"controls.loop",controls:"controls.widgets"},a:{href:"link.href",target:"link.target",type:""},input:{placeholder:"placeholder",required:"required",type:"inputType",name:"fieldName"},textarea:{placeholder:"placeholder",required:"required",type:"inputType",name:"fieldName"},select:{placeholder:"placeholder",required:"required",multiple:"multiple",name:"fieldName"},form:{action:"action"}},xt=(e,t)=>{var o;return((o=e.children)==null?void 0:o.length)===1&&(0,a.includes)(["Heading","Paragraph","Span","ListItem","Button","Label","TableCell","Link","RichText"],t._type)},J=e=>e.map(t=>t.type==="text"?(0,a.get)(t,"content",""):(0,a.isEmpty)(t.children)?"":J(t.children||[])).join(""),$=e=>e===null?"":e,Re=e=>{let t=(0,a.compact)((0,a.map)(e.split(/\s+/),a.trim)),o=(0,a.find)(t,l=>/^w-/.test(l)),r=(0,a.find)(t,l=>/^h-/.test(l));if(!r||!o)return{height:"",width:""};let n=l=>{if(!l)return;let p=l.match(/^[wh]-(?:\[(.*?)\]|(.+))$/);if(!p)return;if(p[1])return p[1];let h=p[2];return/^\d+(\.\d+)?$/.test(h)?`${Number(h)*4}px`:h==="auto"||(0,a.includes)(h,"%")?h:"16px"},s=n(o),i=n(r);return{width:(0,a.includes)(s,"px")?s:"16px",height:(0,a.includes)(i,"px")?i:"16px"}},we=e=>{if(e.tagName==="svg")return{};let t={},o=bt[e.tagName||""]||{},r=e.attributes||[];return(0,a.forEach)(r,({key:n,value:s})=>{var i;if(!(0,a.includes)(z,n))if(n==="bid"&&(t._bid=$(s)),o[n]){if(e.tagName==="img"&&n==="src"&&!s.startsWith("http")){let l=(0,a.find)(e.attributes,{key:"width"}),p=(0,a.find)(e.attributes,{key:"height"});l&&p?s=`https://picsum.photos/${l==null?void 0:l.value}x${p==null?void 0:p.value}`:s="https://picsum.photos/150x150"}else if(e.tagName==="a"){let l=(0,a.find)(e.attributes,{key:"href"});l&&typeof(l==null?void 0:l.value)=="string"&&((i=l==null?void 0:l.value)!=null&&i.startsWith("pageType:"))&&(0,a.set)(t,"link.type","pageType")}(0,a.set)(t,o[n],$(s))}else(0,a.includes)(["style","class","srcset","bid"],n)||(t.styles_attrs=t.styles_attrs||{},(0,a.startsWith)(n,"@")&&(n=n.replace("@","x-on:")),t.styles_attrs[`${n}`]=$(s))}),delete t.class,t},kt=(e,t="styles")=>{if(!e.attributes)return{[t]:`${b},`};let o=(0,a.find)(e.attributes,{key:"class"});if(o){let r=o.value;return{[t]:`${b},${r}`}}return{[t]:`${b},`}},vt=e=>{var h;let t=(0,a.get)(e,"attributes",[]),o=t.find(d=>d.key==="data-chai-richtext"||d.key==="chai-richtext"),r=t.find(d=>d.key==="data-chai-lightbox"||d.key==="chai-lightbox"),n=t.find(d=>d.key==="data-chai-dropdown"||d.key==="chai-dropdown"),s=t.find(d=>d.key==="data-chai-dropdown-button"||d.key==="chai-dropdown-button"),i=t.find(d=>d.key==="data-chai-dropdown-content"||d.key==="chai-dropdown-content"),l=t.find(d=>d.key==="class"),p=l&&l.value.split(/\s+/).includes("rte");if(n)return{_type:"Dropdown"};if(s)return{_type:"DropdownButton"};if(i)return{_type:"DropdownContent"};if(o||p)return{_type:"Paragraph"};if(r)return{_type:"LightBoxLink"};switch(e.tagName){case"img":return{_type:"Image"};case"input":return(0,a.get)((0,a.find)(e.attributes,{key:"type"}),"value","").toLowerCase()==="submit"?{_type:"FormButton"}:{_type:"Input",showLabel:!1};case"hr":return{_type:"Divider"};case"br":return{_type:"LineBreak"};case"textarea":return{_type:"TextArea",showLabel:!1};case"audio":return{_type:"Audio"};case"canvas":return{_type:"Canvas"};case"video":case"iframe":return{_type:"CustomHTML"};case"svg":return{_type:"Icon"};case"select":return{_type:"Select",options:[]};case"option":return{_type:"Option"};case"ul":case"ol":case"dl":return{_type:"List",tag:e.tagName,_listType:e.tagName==="ol"?"list-decimal":"list-none"};case"li":case"dt":return{_type:"ListItem",tag:e.tagName};case"span":case"figcaption":case"legend":return{_type:"Span",tag:e.tagName};case"strong":return{_type:"Span",tag:e.tagName,styles:"#styles:,font-bold"};case"p":return{_type:"Paragraph",content:""};case"a":return{_type:"Link"};case"form":return{_type:"Form"};case"label":return{_type:"Label"};case"button":return{_type:((h=(0,a.find)(e.attributes,{key:"type"}))==null?void 0:h.value)==="submit"?"FormButton":"Button"};case"code":return{_type:"Box",_name:"Code"};case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return{_type:"Heading",tag:e.tagName};case"table":return{_type:"Table"};case"tr":return{_type:"TableRow"};case"td":case"th":return{_type:"TableCell",tag:e.tagName};case"thead":return{_type:"TableHead"};case"tbody":return{_type:"TableBody"};case"tfoot":return{_type:"TableFooter"};default:{let d=(0,a.get)(e,"children",[]).length>0?"Box":"EmptyBox";return{_type:d,tag:e.tagName,_name:d=="EmptyBox"||e.tagName==="div"?d:(0,a.capitalize)(e.tagName)}}}},q=(e,t=null)=>(0,a.flatMapDeep)(e,o=>{var Y,X,Z,Q,ee,te,re,oe,ne,ae;if(o.type==="comment")return[];let r={_id:L()};if(t&&(r._parent=t.block._id),o.type==="text")return(0,a.isEmpty)((0,a.get)(o,"content",""))?[]:t&&xt(t.node,t.block)?((0,a.set)(t,"block.content",(0,a.get)(o,"content","")),[]):{...r,_type:"Text",content:(0,a.get)(o,"content","")};if((0,a.startsWith)(o.tagName,"chai-")){let c=o.attributes||[],u=(0,a.find)(c,{key:"chai-type"}),f=(u==null?void 0:u.value)||(0,a.startCase)((0,a.camelCase)(o.tagName||"")).replace(/ /g,"").replace(/\s+/g,"");if(r._type=f,(0,a.forEach)(c,({key:g,value:k})=>{var se;if(g==="about-this-component"||g==="chai-type"||g==="can-move"||g==="can-delete")return;if(g==="id"){r._id=k;return}if(g==="bid"){r._bid=$(k);return}if((0,a.includes)(z,g)){r._name=k;return}if(g==="icon-name"&&o.tagName==="chai-icon"){r._iconName=k;return}let O;if((0,a.startsWith)(g,"_"))O="_"+(0,a.camelCase)(g.slice(1));else{let ie=(0,a.camelCase)(g);O=(se=yt[ie])!=null?se:ie}let R=$(k);typeof R=="string"&&(0,a.startsWith)(R,"#styles:")&&(R=R.replace("#styles:","#styles:,")),r[O]=R}),Te(f)){let g=q(o.children||[],{block:r,node:o});return[r,...g]}return[r]}let n=(0,a.get)(o,"attributes",[]),s=o.tagName==="p"||n.find(c=>c.key==="data-chai-richtext"||c.key==="chai-richtext"),i=n.find(c=>c.key==="class"),l=i&&i.value.split(/\s+/).includes("rte"),p=n.find(c=>c.key==="data-chai-lightbox"||c.key==="chai-lightbox"),h=n.find(c=>c.key==="data-chai-dropdown"||c.key==="chai-dropdown"),d=n.find(c=>c.key==="data-chai-dropdown-button"||c.key==="chai-dropdown-button"),v=n.find(c=>c.key==="data-chai-dropdown-content"||c.key==="chai-dropdown-content");if(r={...r,...vt(o),...we(o),...kt(o)},o.attributes){let c=o.attributes.find(u=>(0,a.includes)(z,u.key));c&&(r._name=c.value)}if(s||l){let c=(0,C.stringify)(o.children||[]);return r.content=o.tagName==="p"?`<p>${c}</p>`:`${c}`,(0,a.has)(r,"styles_attrs.data-chai-richtext")&&delete r.styles_attrs["data-chai-richtext"],(0,a.has)(r,"styles_attrs.chai-richtext")&&delete r.styles_attrs["chai-richtext"],[r]}if(p){let c=["data-chai-lightbox","chai-lightbox","data-vbtype","data-autoplay","data-maxwidth","data-overlay","data-gall","href"];r={...r,href:((Y=n.find(u=>u.key==="href"))==null?void 0:Y.value)||"",hrefType:((X=n.find(u=>u.key==="data-vbtype"))==null?void 0:X.value)||"video",autoplay:((Z=n.find(u=>u.key==="data-autoplay"))==null?void 0:Z.value)==="true"?"true":"false",maxWidth:((ee=(Q=n.find(u=>u.key==="data-maxwidth"))==null?void 0:Q.value)==null?void 0:ee.replace("px",""))||"",backdropColor:((te=n.find(u=>u.key==="data-overlay"))==null?void 0:te.value)||"",galleryName:((re=n.find(u=>u.key==="data-gall"))==null?void 0:re.value)||""},(0,a.forEach)(c,u=>{(0,a.has)(r,`styles_attrs.${u}`)&&delete r.styles_attrs[u]})}if(h&&(delete r.styles_attrs,r.showDropdown=!1),v&&delete r.styles_attrs,d){delete r.styles_attrs;let c=(0,a.filter)(o.children||[],f=>(f==null?void 0:f.tagName)!=="span");r.content=J(c);let u=(0,a.find)(o.children||[],f=>(f==null?void 0:f.tagName)==="span"&&(0,a.some)(f.children||[],g=>(g==null?void 0:g.tagName)==="svg"));if(u){let f=(0,a.find)(u.children||[],g=>(g==null?void 0:g.tagName)==="svg");if(f){r.icon=(0,C.stringify)([f]);let{height:g,width:k}=Bt(f,"16px","16px");r.iconHeight=g,r.iconWidth=k}}return[r]}if(r._type==="Input"){let c=r.inputType||"text";c==="checkbox"?(0,a.set)(r,"_type","Checkbox"):c==="radio"&&(0,a.set)(r,"_type","Radio"),(0,a.set)(r,"label","")}else if(o.tagName==="video"||o.tagName==="iframe"){let c=(0,C.stringify)([o]);return Ee(c)&&((0,a.set)(r,"_type","Video"),(0,a.set)(r,"url",Se(c)),(0,a.set)(r,"styles",`${b},`),(0,a.set)(r,"controls",{autoPlay:!1,muted:!0,loop:!1,controls:!1})),r.content=c,[r]}else if(o.tagName==="svg"){let c=(0,a.get)((0,a.find)(o.attributes,{key:"class"}),"value",""),{height:u,width:f}=Re(c);if(u&&f)r.styles=`${b}, ${B(`w-${f} h-${u}`,c)}`.trim(),r.height=u==null?void 0:u.replace("px",""),r.width=f==null?void 0:f.replace("px","");else{let g=(oe=(0,a.find)(o.attributes,{key:"height"}))==null?void 0:oe.value,k=(ne=(0,a.find)(o.attributes,{key:"width"}))==null?void 0:ne.value;g&&k?(r.styles=`${b}, ${B(`w-[${k}px] h-[${g}px]`,c)}`.trim(),r.height=g,r.width=k):r.styles=`${b}, ${B("w-full h-full",c)}`.trim()}return o.attributes=(0,a.filter)(o.attributes,g=>!(0,a.includes)(["style","width","height","class"],g.key)),r.icon=(0,C.stringify)([o]),[r]}else{if(o.tagName=="option"&&t&&((ae=t.block)==null?void 0:ae._type)==="Select")return t.block.options.push({label:J(o.children||[]),...we(o)}),[];r._type==="Select"&&((0,a.set)(r,"inputStyles",(0,a.get)(r,"styles","")),(0,a.unset)(r,"styles"),(0,a.set)(r,"label",""))}let w=q(o.children||[],{block:r,node:o});return[r,...w]}),Bt=(e,t,o)=>{var p,h;let r=(0,a.get)(e,"attributes",[]),{height:n,width:s}=Re((0,a.get)((0,a.find)(r,{key:"class"}),"value",""));if(n&&s)return{height:`[${n}px]`,width:`[${s}px]`};let i=(p=(0,a.find)(r,{key:"height"}))==null?void 0:p.value,l=(h=(0,a.find)(r,{key:"width"}))==null?void 0:h.value;return{height:i?`[${i}px]`:o,width:l?`[${l}px]`:t}},Ct=e=>{e=e.replace(/([\w-]+)=\\?"(.*?)\\?"/g,(r,n,s)=>{let i=s.replace(/\\"/g,'"');return i=i.replace(/{([^}]+)}/g,l=>l.replace(/"/g,'\\"')),`${n}="${i.replace(/\\"/g,'"')}"`}),e=e.replace(/\\n/g,"").replace(/\\\\/g,"").replace(/\\([/<>])/g,"$1").replace(/\\./g,"").replace(/[\n\r\t\f\v]/g,""),e=e.replace(/\$name="[^"]*"/g,"");let t=e.match(/<body[^>]*>([\s\S]*?)<\/body>/);return(t?t[1]:e).replace(/\s+/g," ").replaceAll("> <","><").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").trim()};var Ae=async e=>{let t=(0,C.parse)(Ct(e));if((0,a.isEmpty)(e))return[];let o=(0,a.flatten)(q(t));return await ft(K(o))};var De=Ae;function Ft(e){let t=/(asset:\/\/|https:\/\/asset\.localhost\/)(?:localhost\/)?[^"']+/g;return e.replace(t,o=>{let r=decodeURIComponent(o),n=r.indexOf("public");return n!==-1?r.substring(n+6):r})}var Ie=e=>{if(!e)return[];try{return JSON.parse(Ft(e)).filter(o=>!o._type.startsWith("@chai"))}catch(t){return[{_type:"Paragraph",_id:"error",content:"Invalid JSON. Please check the JSON string."}]}};var $e=A(require("@tailwindcss/container-queries"),1),Pe=A(require("@tailwindcss/forms"),1),Le=A(require("@tailwindcss/typography"),1);function Tt(){return{textColor:{DEFAULT:"hsl(var(--foreground))"},colors:{border:"hsl(var(--border))",input:"hsl(var(--input))",ring:"hsl(var(--ring))",background:"hsl(var(--background))",foreground:"hsl(var(--foreground))",surface:"hsl(var(--surface))",primary:{DEFAULT:"hsl(var(--primary))",foreground:"hsl(var(--primary-foreground))"},secondary:{DEFAULT:"hsl(var(--secondary))",foreground:"hsl(var(--secondary-foreground))"},destructive:{DEFAULT:"hsl(var(--destructive))",foreground:"hsl(var(--destructive-foreground))"},muted:{DEFAULT:"hsl(var(--muted))",foreground:"hsl(var(--muted-foreground))"},accent:{DEFAULT:"hsl(var(--accent))",foreground:"hsl(var(--accent-foreground))"},popover:{DEFAULT:"hsl(var(--popover))",foreground:"hsl(var(--popover-foreground))"},card:{DEFAULT:"hsl(var(--card))",foreground:"hsl(var(--card-foreground))"},success:{DEFAULT:"hsl(var(--success))",foreground:"hsl(var(--success-foreground))"},warning:{DEFAULT:"hsl(var(--warning))",foreground:"hsl(var(--warning-foreground))"},info:{DEFAULT:"hsl(var(--info))",foreground:"hsl(var(--info-foreground))"},purple:{DEFAULT:"hsl(var(--purple))",foreground:"hsl(var(--purple-foreground))"},orange:{DEFAULT:"hsl(var(--orange))",foreground:"hsl(var(--orange-foreground))"},aqua:{DEFAULT:"hsl(var(--aqua))",foreground:"hsl(var(--aqua-foreground))"}},borderRadius:{lg:"var(--radius)",md:"calc(var(--radius) - 2px)",sm:"calc(var(--radius) - 4px)"},borderColor:{DEFAULT:"hsl(var(--border))"},keyframes:{"accordion-down":{from:{height:"0"},to:{height:"var(--radix-accordion-content-height)"}},"accordion-up":{from:{height:"var(--radix-accordion-content-height)"},to:{height:"0"}}},animation:{"accordion-down":"accordion-down 0.2s ease-out","accordion-up":"accordion-up 0.2s ease-out"}}}var Ne=({content:e,theme:t})=>({darkMode:"class",content:[...e],theme:{extend:{...Tt(),...t!=null?t:{}}},plugins:[Le.default,Pe.default,$e.default]});var S=require("lodash-es");var He=e=>({fontFamily:e.fontFamily?(0,S.keys)(e.fontFamily).reduce((o,r)=>({...o,[r.replace("font-","")]:`var(--${r})`}),{}):{},borderRadius:e.borderRadius?{lg:"var(--radius)",md:"calc(var(--radius) - 2px)",sm:"calc(var(--radius) - 4px)"}:{},colors:e.colors?(0,S.flatten)(e.colors.map(o=>Object.entries(o.items))).reduce((o,[r])=>({...o,[r]:`hsl(var(--${r}))`}),{}):{}});var Oe={fontFamily:{"font-heading":"Arial","font-body":"Arial"},borderRadius:"10px",colors:[{group:"Body",items:{background:["#FFFFFF","#121212"],foreground:["#121212","#FFFFFF"]}},{group:"Primary",items:{primary:["#2563EB","#3B82F6"],"primary-foreground":["#FFFFFF","#FFFFFF"]}},{group:"Secondary",items:{secondary:["#F3F4F6","#374151"],"secondary-foreground":["#1F2937","#F9FAFB"]}},{group:"Border, Input & Ring",items:{border:["#E5E7EB","#374151"],input:["#E5E7EB","#374151"],ring:["#2563EB","#3B82F6"]}},{group:"Card",items:{card:["#FFFFFF","#1F2937"],"card-foreground":["#121212","#FFFFFF"]}},{group:"Popover",items:{popover:["#FFFFFF","#1F2937"],"popover-foreground":["#121212","#FFFFFF"]}},{group:"Muted",items:{muted:["#F3F4F6","#374151"],"muted-foreground":["#6B7280","#9CA3AF"]}},{group:"Accent",items:{accent:["#F3F4F6","#374151"],"accent-foreground":["#1F2937","#FFFFFF"]}},{group:"Destructive",items:{destructive:["#DC2626","#EF4444"],"destructive-foreground":["#FFFFFF","#FFFFFF"]}}]};var Me=(e=Oe)=>({container:{center:!0,padding:"1rem",screens:{"2xl":"1400px"}},...He(e)});function Ue(e){return e.replace("%3A",":").replace("%2E",".").replace(/^www\./,"")}0&&(module.exports={applyChaiDataBinding,applyDesignTokens,chaiBuilderPlugin,convertHTMLToChaiBlocks,convertToBlocks,generateUUID,getChaiBuilderTailwindConfig,getChaiBuilderTheme,getCleanHostname});