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.
- package/README.md +36 -0
- package/dist/IconPicker-I7VNLYZ4.js +5 -0
- package/dist/actions-DM00SIUk.d.cts +899 -0
- package/dist/actions-DM00SIUk.d.ts +899 -0
- package/dist/actions-registery-SEJTZE5Q.js +1 -0
- package/dist/active-in-another-tab-SONDAONP.js +1 -0
- package/dist/add-new-language-page-TI6DUYYX.js +1 -0
- package/dist/add-new-page-LBHXICXO.js +1 -0
- package/dist/ai-block-floating-prompt-input-ESY5GQLZ.js +1 -0
- package/dist/ai-panel-content-62I6FDQF.css +1 -0
- package/dist/ai-panel-content-UZJZ463W.js +1 -0
- package/dist/ai-panel-default-lang-2ZXZYQRT.js +6 -0
- package/dist/ai-panel-default-lang-ETFOFFEF.css +1 -0
- package/dist/ai-panel-for-image-LADQP6VY.js +1 -0
- package/dist/ai-panel-other-lang-WDLC3M2M.js +1 -0
- package/dist/ai-panel-page-chat-7ZISZWY4.js +4 -0
- package/dist/ai-panel-page-chat-N4YFJGAM.css +1 -0
- package/dist/ai-prompt-input-CPT5ETQ4.js +1 -0
- package/dist/ai-theme-generator-7PS4BX52.js +1 -0
- package/dist/ai-translation-prompt-3VE2ECGR.js +1 -0
- package/dist/blocks-CMvgDlxw.d.ts +72 -0
- package/dist/blocks-CP-Pngaz.d.cts +72 -0
- package/dist/build-config-CCERdThN.d.ts +80 -0
- package/dist/build-config-DrerOPd9.d.cts +80 -0
- package/dist/builder.cjs +243 -0
- package/dist/builder.css +1 -0
- package/dist/builder.d.cts +352 -0
- package/dist/builder.d.ts +352 -0
- package/dist/builder.js +1 -0
- package/dist/chaibuilder-instance-DNz3Q-dY.d.cts +579 -0
- package/dist/chaibuilder-instance-qroszVwI.d.ts +579 -0
- package/dist/change-password-modal-NJL7ZLTY.js +1 -0
- package/dist/chunk-2AFM6557.js +3 -0
- package/dist/chunk-2N4IJZOR.js +1 -0
- package/dist/chunk-2NYUIXUX.js +1 -0
- package/dist/chunk-2PJZUYIZ.js +1 -0
- package/dist/chunk-32HH35VD.js +1 -0
- package/dist/chunk-346H4FEX.js +1 -0
- package/dist/chunk-34HIOUTE.js +1 -0
- package/dist/chunk-374QEK4F.js +1 -0
- package/dist/chunk-3E72DJSP.js +1 -0
- package/dist/chunk-3IT7IIAV.js +1 -0
- package/dist/chunk-3UEPBBE4.js +11 -0
- package/dist/chunk-3XSKJBPH.js +1 -0
- package/dist/chunk-45ELAD2J.js +1 -0
- package/dist/chunk-4JBHWPMO.js +1 -0
- package/dist/chunk-4P25MV5E.js +1 -0
- package/dist/chunk-4PQNBY3V.js +1 -0
- package/dist/chunk-4VNLL2IA.js +1 -0
- package/dist/chunk-55SU3QPU.js +1 -0
- package/dist/chunk-5ZC65NB6.js +1 -0
- package/dist/chunk-6M7V7BOM.js +1 -0
- package/dist/chunk-6TXCHU4K.js +1 -0
- package/dist/chunk-777N6WHB.js +1 -0
- package/dist/chunk-7C4EQOAR.js +12 -0
- package/dist/chunk-7EXZXKW2.js +1 -0
- package/dist/chunk-7QWMLDCG.js +1 -0
- package/dist/chunk-AOJE5WI3.js +1 -0
- package/dist/chunk-ATLMLDBS.js +1 -0
- package/dist/chunk-AVGF3YLU.js +17 -0
- package/dist/chunk-BQSLQHLD.js +1 -0
- package/dist/chunk-BWORNCTE.js +1 -0
- package/dist/chunk-BYGD5CDT.js +1 -0
- package/dist/chunk-CA5PVX24.js +1 -0
- package/dist/chunk-CFNOB42V.js +1 -0
- package/dist/chunk-CJP3BQH2.js +1 -0
- package/dist/chunk-CRJENCPR.js +1 -0
- package/dist/chunk-D5SKCKSB.js +1 -0
- package/dist/chunk-DZ72OHTD.js +1 -0
- package/dist/chunk-EPGOG22Q.js +0 -0
- package/dist/chunk-ERCY63ZW.js +1 -0
- package/dist/chunk-ESCX7KEH.js +1 -0
- package/dist/chunk-F2V4N3LT.js +156 -0
- package/dist/chunk-F7YMHPEA.js +1 -0
- package/dist/chunk-FERH2TPR.js +1 -0
- package/dist/chunk-FLSV2QGU.js +1 -0
- package/dist/chunk-FOKGOT6B.js +1 -0
- package/dist/chunk-GJOOCKUE.js +1 -0
- package/dist/chunk-HA7LF3RV.js +1 -0
- package/dist/chunk-HAKJOMCL.js +1 -0
- package/dist/chunk-HEKCKC7N.js +1 -0
- package/dist/chunk-HELRVKD2.js +3 -0
- package/dist/chunk-I7ODKVVX.js +1 -0
- package/dist/chunk-IAKCX2WB.js +1 -0
- package/dist/chunk-IB2C3TWH.js +1 -0
- package/dist/chunk-IH562KSP.js +1 -0
- package/dist/chunk-IP4JBQOX.js +1 -0
- package/dist/chunk-ITX7QWN6.js +1 -0
- package/dist/chunk-IUACZ3E6.js +6 -0
- package/dist/chunk-J7Q62EP7.js +1 -0
- package/dist/chunk-JBB5IJFA.js +1 -0
- package/dist/chunk-JPJRO4NU.js +1 -0
- package/dist/chunk-JUIS55JT.js +1 -0
- package/dist/chunk-JYBTQ3YX.js +5 -0
- package/dist/chunk-K5YWQY4U.js +1 -0
- package/dist/chunk-K6RHR4HT.js +1 -0
- package/dist/chunk-LNV5MRGV.js +1 -0
- package/dist/chunk-LRJREWRD.js +1 -0
- package/dist/chunk-LWYDGDPW.js +1 -0
- package/dist/chunk-MDMGXS5B.js +1 -0
- package/dist/chunk-MEROMQQX.js +1 -0
- package/dist/chunk-N7Z4RFFI.js +1 -0
- package/dist/chunk-NSQEQYEM.js +1 -0
- package/dist/chunk-OD3K76M6.js +1 -0
- package/dist/chunk-ODSL3KXG.js +1 -0
- package/dist/chunk-OJJDRACB.js +1 -0
- package/dist/chunk-ONSZ462E.js +1 -0
- package/dist/chunk-OQZ4EPOM.js +1 -0
- package/dist/chunk-OR7KKUYT.js +1 -0
- package/dist/chunk-OSGXFZTA.js +1 -0
- package/dist/chunk-PM3JNOZH.js +1 -0
- package/dist/chunk-PQHFT4TE.js +1 -0
- package/dist/chunk-QGVCH2NI.js +1 -0
- package/dist/chunk-QIGSSVEY.js +1 -0
- package/dist/chunk-R5ZTCDFD.js +1 -0
- package/dist/chunk-RBDZDQZR.js +1 -0
- package/dist/chunk-ROQRBSK6.js +1 -0
- package/dist/chunk-SSENH35Y.js +1 -0
- package/dist/chunk-SYPALJAE.js +1 -0
- package/dist/chunk-T2YYNX6Z.js +1 -0
- package/dist/chunk-T32TW3XV.js +1 -0
- package/dist/chunk-T56KQBE2.js +1 -0
- package/dist/chunk-TEL5ACJE.js +1 -0
- package/dist/chunk-TGJQC6VC.js +1 -0
- package/dist/chunk-TQ34DGOT.js +1 -0
- package/dist/chunk-TVF77C53.js +1 -0
- package/dist/chunk-UIDBBTCZ.js +3 -0
- package/dist/chunk-VKSRWZCO.js +1 -0
- package/dist/chunk-VL5WBPVV.js +1 -0
- package/dist/chunk-VUWHFLT7.js +22 -0
- package/dist/chunk-WEVKAJMV.js +1 -0
- package/dist/chunk-WHPIYGCY.js +1 -0
- package/dist/chunk-WNESLH23.js +1 -0
- package/dist/chunk-WOT6VMZA.js +1 -0
- package/dist/chunk-WSQ5SQBD.js +1 -0
- package/dist/chunk-XY4UJKHE.js +1 -0
- package/dist/chunk-Y2BHO7OO.js +1 -0
- package/dist/chunk-YDOQEFOK.js +1 -0
- package/dist/chunk-YEFMD4DS.js +1 -0
- package/dist/chunk-YQ5QQCRD.js +1 -0
- package/dist/chunk-YQPOFRXU.js +1 -0
- package/dist/chunk-YTPQSO7V.js +801 -0
- package/dist/chunk-ZAU65LBG.js +1 -0
- package/dist/chunk-ZRFCEMYU.js +1 -0
- package/dist/chunk-ZU2B5YT6.js +1 -0
- package/dist/chunk-ZXKKBKGV.js +1 -0
- package/dist/code-display-7346IUCO.js +1 -0
- package/dist/code-editor-UBGTTX2L.js +1 -0
- package/dist/components/ui/accordion.cjs +1 -0
- package/dist/components/ui/accordion.d.cts +9 -0
- package/dist/components/ui/accordion.d.ts +9 -0
- package/dist/components/ui/accordion.js +1 -0
- package/dist/components/ui/alert-dialog.cjs +1 -0
- package/dist/components/ui/alert-dialog.d.cts +23 -0
- package/dist/components/ui/alert-dialog.d.ts +23 -0
- package/dist/components/ui/alert-dialog.js +1 -0
- package/dist/components/ui/alert.cjs +1 -0
- package/dist/components/ui/alert.d.cts +11 -0
- package/dist/components/ui/alert.d.ts +11 -0
- package/dist/components/ui/alert.js +1 -0
- package/dist/components/ui/avatar.cjs +1 -0
- package/dist/components/ui/avatar.d.cts +8 -0
- package/dist/components/ui/avatar.d.ts +8 -0
- package/dist/components/ui/avatar.js +1 -0
- package/dist/components/ui/badge.cjs +1 -0
- package/dist/components/ui/badge.d.cts +13 -0
- package/dist/components/ui/badge.d.ts +13 -0
- package/dist/components/ui/badge.js +1 -0
- package/dist/components/ui/button.cjs +1 -0
- package/dist/components/ui/button.d.cts +15 -0
- package/dist/components/ui/button.d.ts +15 -0
- package/dist/components/ui/button.js +1 -0
- package/dist/components/ui/card.cjs +1 -0
- package/dist/components/ui/card.d.cts +10 -0
- package/dist/components/ui/card.d.ts +10 -0
- package/dist/components/ui/card.js +1 -0
- package/dist/components/ui/checkbox.cjs +1 -0
- package/dist/components/ui/checkbox.d.cts +6 -0
- package/dist/components/ui/checkbox.d.ts +6 -0
- package/dist/components/ui/checkbox.js +1 -0
- package/dist/components/ui/command.cjs +1 -0
- package/dist/components/ui/command.d.cts +83 -0
- package/dist/components/ui/command.d.ts +83 -0
- package/dist/components/ui/command.js +1 -0
- package/dist/components/ui/context-menu.cjs +1 -0
- package/dist/components/ui/context-menu.d.cts +30 -0
- package/dist/components/ui/context-menu.d.ts +30 -0
- package/dist/components/ui/context-menu.js +1 -0
- package/dist/components/ui/dialog.cjs +1 -0
- package/dist/components/ui/dialog.d.cts +22 -0
- package/dist/components/ui/dialog.d.ts +22 -0
- package/dist/components/ui/dialog.js +1 -0
- package/dist/components/ui/dropdown-menu.cjs +1 -0
- package/dist/components/ui/dropdown-menu.d.cts +30 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.js +1 -0
- package/dist/components/ui/hover-card.cjs +1 -0
- package/dist/components/ui/hover-card.d.cts +8 -0
- package/dist/components/ui/hover-card.d.ts +8 -0
- package/dist/components/ui/hover-card.js +1 -0
- package/dist/components/ui/input.cjs +1 -0
- package/dist/components/ui/input.d.cts +5 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +1 -0
- package/dist/components/ui/label.cjs +1 -0
- package/dist/components/ui/label.d.cts +8 -0
- package/dist/components/ui/label.d.ts +8 -0
- package/dist/components/ui/label.js +1 -0
- package/dist/components/ui/loader.cjs +1 -0
- package/dist/components/ui/loader.d.cts +12 -0
- package/dist/components/ui/loader.d.ts +12 -0
- package/dist/components/ui/loader.js +1 -0
- package/dist/components/ui/navigation-menu.cjs +1 -0
- package/dist/components/ui/navigation-menu.d.cts +15 -0
- package/dist/components/ui/navigation-menu.d.ts +15 -0
- package/dist/components/ui/navigation-menu.js +1 -0
- package/dist/components/ui/popover.cjs +1 -0
- package/dist/components/ui/popover.d.cts +9 -0
- package/dist/components/ui/popover.d.ts +9 -0
- package/dist/components/ui/popover.js +1 -0
- package/dist/components/ui/progress.cjs +1 -0
- package/dist/components/ui/progress.d.cts +8 -0
- package/dist/components/ui/progress.d.ts +8 -0
- package/dist/components/ui/progress.js +1 -0
- package/dist/components/ui/scroll-area.cjs +1 -0
- package/dist/components/ui/scroll-area.d.cts +7 -0
- package/dist/components/ui/scroll-area.d.ts +7 -0
- package/dist/components/ui/scroll-area.js +1 -0
- package/dist/components/ui/select.cjs +1 -0
- package/dist/components/ui/select.d.cts +15 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/select.js +1 -0
- package/dist/components/ui/separator.cjs +1 -0
- package/dist/components/ui/separator.d.cts +6 -0
- package/dist/components/ui/separator.d.ts +6 -0
- package/dist/components/ui/separator.js +1 -0
- package/dist/components/ui/sheet.cjs +1 -0
- package/dist/components/ui/sheet.d.cts +29 -0
- package/dist/components/ui/sheet.d.ts +29 -0
- package/dist/components/ui/sheet.js +1 -0
- package/dist/components/ui/skeleton.cjs +1 -0
- package/dist/components/ui/skeleton.d.cts +5 -0
- package/dist/components/ui/skeleton.d.ts +5 -0
- package/dist/components/ui/skeleton.js +1 -0
- package/dist/components/ui/slider.cjs +1 -0
- package/dist/components/ui/slider.d.cts +6 -0
- package/dist/components/ui/slider.d.ts +6 -0
- package/dist/components/ui/slider.js +1 -0
- package/dist/components/ui/switch.cjs +1 -0
- package/dist/components/ui/switch.d.cts +9 -0
- package/dist/components/ui/switch.d.ts +9 -0
- package/dist/components/ui/switch.js +1 -0
- package/dist/components/ui/tabs.cjs +1 -0
- package/dist/components/ui/tabs.d.cts +9 -0
- package/dist/components/ui/tabs.d.ts +9 -0
- package/dist/components/ui/tabs.js +1 -0
- package/dist/components/ui/textarea.cjs +1 -0
- package/dist/components/ui/textarea.d.cts +5 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/textarea.js +1 -0
- package/dist/components/ui/toggle.cjs +1 -0
- package/dist/components/ui/toggle.d.cts +15 -0
- package/dist/components/ui/toggle.d.ts +15 -0
- package/dist/components/ui/toggle.js +1 -0
- package/dist/components/ui/tooltip.cjs +1 -0
- package/dist/components/ui/tooltip.d.cts +9 -0
- package/dist/components/ui/tooltip.d.ts +9 -0
- package/dist/components/ui/tooltip.js +1 -0
- package/dist/config-registry-RSJCAKY5.js +1 -0
- package/dist/continue-editing-in-this-client-QBMOFRLL.js +1 -0
- package/dist/core-BNe4bA6z.d.cts +5455 -0
- package/dist/core-BNe4bA6z.d.ts +5455 -0
- package/dist/css-import-modal-NMFRQGCY.js +13 -0
- package/dist/db/better-sqlite3.cjs +1 -0
- package/dist/db/better-sqlite3.d.cts +16 -0
- package/dist/db/better-sqlite3.d.ts +16 -0
- package/dist/db/better-sqlite3.js +1 -0
- package/dist/db/d1.cjs +1 -0
- package/dist/db/d1.d.cts +17 -0
- package/dist/db/d1.d.ts +17 -0
- package/dist/db/d1.js +1 -0
- package/dist/db/libsql.cjs +1 -0
- package/dist/db/libsql.d.cts +23 -0
- package/dist/db/libsql.d.ts +23 -0
- package/dist/db/libsql.js +1 -0
- package/dist/db/node-pg.cjs +1 -0
- package/dist/db/node-pg.d.cts +21 -0
- package/dist/db/node-pg.d.ts +21 -0
- package/dist/db/node-pg.js +1 -0
- package/dist/db/postgres.cjs +1 -0
- package/dist/db/postgres.d.cts +28 -0
- package/dist/db/postgres.d.ts +28 -0
- package/dist/db/postgres.js +1 -0
- package/dist/delete-page-CGR6VXZC.css +1 -0
- package/dist/delete-page-FQYTEMBN.js +1 -0
- package/dist/digital-asset-manager-PIZMJEMX.js +1 -0
- package/dist/digital-asset-manager-PSTDGMY2.css +1 -0
- package/dist/dispatch-action-3IV56BNY.js +1 -0
- package/dist/duplicate-page-HPPMQRL3.js +1 -0
- package/dist/dynamic-page-selector-LFHJQLYY.js +1 -0
- package/dist/dynamic-page-selector-SXJQAIGL.css +1 -0
- package/dist/edit-url-panel-Q3NJCV55.js +1 -0
- package/dist/get-blocks-styles-SLZ5NDUF.js +1 -0
- package/dist/get-page-styles-Q4FWW5LX.js +1 -0
- package/dist/image-editor-PLXDYVKE.css +1 -0
- package/dist/image-editor-RSEHWRGV.js +1 -0
- package/dist/json-diff-viewer-FQYK2FUX.js +8 -0
- package/dist/lang-panel-57UGEL6B.css +1 -0
- package/dist/lang-panel-HH5LEOF4.js +1 -0
- package/dist/license-overlay-4Q525E53.js +1 -0
- package/dist/log-ai-request-LHPKU2C5.js +1 -0
- package/dist/manage-design-tokens-264H25A2.js +1 -0
- package/dist/manage-design-tokens-modal-OIWIZ53K.js +1 -0
- package/dist/mark-as-template-7TCCEMGC.js +1 -0
- package/dist/nested-path-selector-content-N4XN7QUS.js +1 -0
- package/dist/nextjs/render-client.cjs +1 -0
- package/dist/nextjs/render-client.css +1 -0
- package/dist/nextjs/render-client.d.cts +14 -0
- package/dist/nextjs/render-client.d.ts +14 -0
- package/dist/nextjs/render-client.js +1 -0
- package/dist/nextjs/render.cjs +829 -0
- package/dist/nextjs/render.d.cts +78 -0
- package/dist/nextjs/render.d.ts +78 -0
- package/dist/nextjs/render.js +1 -0
- package/dist/nextjs/server.cjs +807 -0
- package/dist/nextjs/server.d.cts +329 -0
- package/dist/nextjs/server.d.ts +329 -0
- package/dist/nextjs/server.js +1 -0
- package/dist/nextjs.cjs +1 -0
- package/dist/nextjs.d.cts +17 -0
- package/dist/nextjs.d.ts +17 -0
- package/dist/nextjs.js +1 -0
- package/dist/no-language-page-content-NQIROTIL.js +1 -0
- package/dist/no-language-page-dialog-CWG5PI7N.js +1 -0
- package/dist/page-creator-2L6L6EFV.js +1 -0
- package/dist/page-lock-7HMG34UJ.js +1 -0
- package/dist/page-locked-dialog-ACMWVAZX.js +1 -0
- package/dist/page-manager-new-SCZFNGKO.js +1 -0
- package/dist/page-manager-new-VWRASZTI.css +1 -0
- package/dist/page-manager-search-and-filter-7CHPYAPV.js +1 -0
- package/dist/page-manager-sheet-KZZBKQ6M.js +1 -0
- package/dist/page-manager-sheet-U5YEB5CS.css +1 -0
- package/dist/page-revisions-content-DHPEQ4CA.js +1 -0
- package/dist/page-revisions-trigger-XGC4HOTL.js +1 -0
- package/dist/pages-DlMX1Lj2.d.cts +21 -0
- package/dist/pages-Dol4CXrN.d.ts +21 -0
- package/dist/payload/builder.cjs +243 -0
- package/dist/payload/builder.css +1 -0
- package/dist/payload/builder.d.cts +13 -0
- package/dist/payload/builder.d.ts +13 -0
- package/dist/payload/builder.js +1 -0
- package/dist/payload.cjs +807 -0
- package/dist/payload.d.cts +603 -0
- package/dist/payload.d.ts +603 -0
- package/dist/payload.js +1 -0
- package/dist/preview-banner-SDDZGGRW.js +1 -0
- package/dist/publish-pages-content-3AZ45DYH.js +1 -0
- package/dist/registry.cjs +11 -0
- package/dist/registry.d.cts +74 -0
- package/dist/registry.d.ts +74 -0
- package/dist/registry.js +1 -0
- package/dist/relations-DDBTFCMR.js +1 -0
- package/dist/revalidate-G2DEOH4Z.js +1 -0
- package/dist/rte-widget-modal-7RXFEYHK.js +1 -0
- package/dist/save-to-lib-65EGTZE5.js +1 -0
- package/dist/schema-IVNMPI4V.js +1 -0
- package/dist/schema.sqlite-CYBLikNv.d.cts +5852 -0
- package/dist/schema.sqlite-CYBLikNv.d.ts +5852 -0
- package/dist/seo-panel-WQ47FNP4.css +1 -0
- package/dist/seo-panel-Z6OBXHQ4.js +2 -0
- package/dist/server-config-b29G6_aQ.d.cts +116 -0
- package/dist/server-config-oPlt3V1X.d.ts +116 -0
- package/dist/state-RAP56WXS.js +1 -0
- package/dist/take-over-request-EB464ZGU.js +1 -0
- package/dist/translation-warning-modal-EES6I2QV.js +1 -0
- package/dist/types.cjs +1 -0
- package/dist/types.d.cts +38 -0
- package/dist/types.d.ts +38 -0
- package/dist/types.js +1 -0
- package/dist/unmark-as-template-6STMTBP5.js +1 -0
- package/dist/unpublish-page-CE3CJK5C.js +1 -0
- package/dist/unpublished-partials-modal-OZBWBCLN.js +1 -0
- package/dist/utils.cjs +1 -0
- package/dist/utils.d.cts +168 -0
- package/dist/utils.d.ts +168 -0
- package/dist/utils.js +1 -0
- package/dist/web-blocks.cjs +1 -0
- package/dist/web-blocks.d.cts +3 -0
- package/dist/web-blocks.d.ts +3 -0
- package/dist/web-blocks.js +1 -0
- package/dist/web-preview-EIWOXGPY.js +1 -0
- package/package.json +322 -0
package/dist/utils.d.cts
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import * as tailwindcss_types_config from 'tailwindcss/types/config';
|
|
2
|
+
import { k as ChaiBlock, G as ChaiDesignTokens, a5 as ChaiThemeOptions } from './actions-DM00SIUk.cjs';
|
|
3
|
+
import tailwindForms from '@tailwindcss/forms';
|
|
4
|
+
import tailwindTypography from '@tailwindcss/typography';
|
|
5
|
+
import 'ai';
|
|
6
|
+
import '@rjsf/utils';
|
|
7
|
+
import 'react';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Get the unique uuid
|
|
11
|
+
*/
|
|
12
|
+
declare function generateUUID(length?: number): string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* This is the tailwind plugin for chai builder
|
|
16
|
+
* @param {*} theme
|
|
17
|
+
* @returns typeof plugin
|
|
18
|
+
*/
|
|
19
|
+
declare const _default: {
|
|
20
|
+
handler: tailwindcss_types_config.PluginCreator;
|
|
21
|
+
config?: Partial<tailwindcss_types_config.Config>;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
declare const applyChaiDataBinding: (block: Record<string, any>, pageExternalData: Record<string, any>) => any;
|
|
25
|
+
|
|
26
|
+
declare const applyDesignTokens: (blocks: ChaiBlock[], designTokens: ChaiDesignTokens) => ChaiBlock[];
|
|
27
|
+
|
|
28
|
+
declare const convertHTMLToChaiBlocks: (html: string) => Promise<ChaiBlock[]>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* This function converts the chai format content to chai blocks
|
|
32
|
+
* @param chaiFormatContent
|
|
33
|
+
*/
|
|
34
|
+
declare const convertToBlocks: (chaiFormatContent: string) => ChaiBlock[];
|
|
35
|
+
|
|
36
|
+
declare const getChaiBuilderTailwindConfig: ({ content, theme }: {
|
|
37
|
+
content: string[];
|
|
38
|
+
theme?: Record<string, unknown>;
|
|
39
|
+
}) => {
|
|
40
|
+
darkMode: string;
|
|
41
|
+
content: string[];
|
|
42
|
+
theme: {
|
|
43
|
+
extend: {
|
|
44
|
+
textColor: {
|
|
45
|
+
DEFAULT: string;
|
|
46
|
+
};
|
|
47
|
+
colors: {
|
|
48
|
+
border: string;
|
|
49
|
+
input: string;
|
|
50
|
+
ring: string;
|
|
51
|
+
background: string;
|
|
52
|
+
foreground: string;
|
|
53
|
+
surface: string;
|
|
54
|
+
primary: {
|
|
55
|
+
DEFAULT: string;
|
|
56
|
+
foreground: string;
|
|
57
|
+
};
|
|
58
|
+
secondary: {
|
|
59
|
+
DEFAULT: string;
|
|
60
|
+
foreground: string;
|
|
61
|
+
};
|
|
62
|
+
destructive: {
|
|
63
|
+
DEFAULT: string;
|
|
64
|
+
foreground: string;
|
|
65
|
+
};
|
|
66
|
+
muted: {
|
|
67
|
+
DEFAULT: string;
|
|
68
|
+
foreground: string;
|
|
69
|
+
};
|
|
70
|
+
accent: {
|
|
71
|
+
DEFAULT: string;
|
|
72
|
+
foreground: string;
|
|
73
|
+
};
|
|
74
|
+
popover: {
|
|
75
|
+
DEFAULT: string;
|
|
76
|
+
foreground: string;
|
|
77
|
+
};
|
|
78
|
+
card: {
|
|
79
|
+
DEFAULT: string;
|
|
80
|
+
foreground: string;
|
|
81
|
+
};
|
|
82
|
+
success: {
|
|
83
|
+
DEFAULT: string;
|
|
84
|
+
foreground: string;
|
|
85
|
+
};
|
|
86
|
+
warning: {
|
|
87
|
+
DEFAULT: string;
|
|
88
|
+
foreground: string;
|
|
89
|
+
};
|
|
90
|
+
info: {
|
|
91
|
+
DEFAULT: string;
|
|
92
|
+
foreground: string;
|
|
93
|
+
};
|
|
94
|
+
purple: {
|
|
95
|
+
DEFAULT: string;
|
|
96
|
+
foreground: string;
|
|
97
|
+
};
|
|
98
|
+
orange: {
|
|
99
|
+
DEFAULT: string;
|
|
100
|
+
foreground: string;
|
|
101
|
+
};
|
|
102
|
+
aqua: {
|
|
103
|
+
DEFAULT: string;
|
|
104
|
+
foreground: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
borderRadius: {
|
|
108
|
+
lg: string;
|
|
109
|
+
md: string;
|
|
110
|
+
sm: string;
|
|
111
|
+
};
|
|
112
|
+
borderColor: {
|
|
113
|
+
DEFAULT: string;
|
|
114
|
+
};
|
|
115
|
+
keyframes: {
|
|
116
|
+
"accordion-down": {
|
|
117
|
+
from: {
|
|
118
|
+
height: string;
|
|
119
|
+
};
|
|
120
|
+
to: {
|
|
121
|
+
height: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
"accordion-up": {
|
|
125
|
+
from: {
|
|
126
|
+
height: string;
|
|
127
|
+
};
|
|
128
|
+
to: {
|
|
129
|
+
height: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
animation: {
|
|
134
|
+
"accordion-down": string;
|
|
135
|
+
"accordion-up": string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
plugins: ({
|
|
140
|
+
handler: tailwindcss_types_config.PluginCreator;
|
|
141
|
+
config?: Partial<tailwindcss_types_config.Config> | undefined;
|
|
142
|
+
} | typeof tailwindForms | typeof tailwindTypography)[];
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
declare const getChaiBuilderTheme: (themeOptions?: ChaiThemeOptions) => {
|
|
146
|
+
fontFamily: {};
|
|
147
|
+
borderRadius: {
|
|
148
|
+
lg: string;
|
|
149
|
+
md: string;
|
|
150
|
+
sm: string;
|
|
151
|
+
} | {
|
|
152
|
+
lg?: undefined;
|
|
153
|
+
md?: undefined;
|
|
154
|
+
sm?: undefined;
|
|
155
|
+
};
|
|
156
|
+
colors: {};
|
|
157
|
+
container: {
|
|
158
|
+
center: boolean;
|
|
159
|
+
padding: string;
|
|
160
|
+
screens: {
|
|
161
|
+
"2xl": string;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
declare function getCleanHostname(hostname: string): string;
|
|
167
|
+
|
|
168
|
+
export { applyChaiDataBinding, applyDesignTokens, _default as chaiBuilderPlugin, convertHTMLToChaiBlocks, convertToBlocks, generateUUID, getChaiBuilderTailwindConfig, getChaiBuilderTheme, getCleanHostname };
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import * as tailwindcss_types_config from 'tailwindcss/types/config';
|
|
2
|
+
import { k as ChaiBlock, G as ChaiDesignTokens, a5 as ChaiThemeOptions } from './actions-DM00SIUk.js';
|
|
3
|
+
import tailwindForms from '@tailwindcss/forms';
|
|
4
|
+
import tailwindTypography from '@tailwindcss/typography';
|
|
5
|
+
import 'ai';
|
|
6
|
+
import '@rjsf/utils';
|
|
7
|
+
import 'react';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Get the unique uuid
|
|
11
|
+
*/
|
|
12
|
+
declare function generateUUID(length?: number): string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* This is the tailwind plugin for chai builder
|
|
16
|
+
* @param {*} theme
|
|
17
|
+
* @returns typeof plugin
|
|
18
|
+
*/
|
|
19
|
+
declare const _default: {
|
|
20
|
+
handler: tailwindcss_types_config.PluginCreator;
|
|
21
|
+
config?: Partial<tailwindcss_types_config.Config>;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
declare const applyChaiDataBinding: (block: Record<string, any>, pageExternalData: Record<string, any>) => any;
|
|
25
|
+
|
|
26
|
+
declare const applyDesignTokens: (blocks: ChaiBlock[], designTokens: ChaiDesignTokens) => ChaiBlock[];
|
|
27
|
+
|
|
28
|
+
declare const convertHTMLToChaiBlocks: (html: string) => Promise<ChaiBlock[]>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* This function converts the chai format content to chai blocks
|
|
32
|
+
* @param chaiFormatContent
|
|
33
|
+
*/
|
|
34
|
+
declare const convertToBlocks: (chaiFormatContent: string) => ChaiBlock[];
|
|
35
|
+
|
|
36
|
+
declare const getChaiBuilderTailwindConfig: ({ content, theme }: {
|
|
37
|
+
content: string[];
|
|
38
|
+
theme?: Record<string, unknown>;
|
|
39
|
+
}) => {
|
|
40
|
+
darkMode: string;
|
|
41
|
+
content: string[];
|
|
42
|
+
theme: {
|
|
43
|
+
extend: {
|
|
44
|
+
textColor: {
|
|
45
|
+
DEFAULT: string;
|
|
46
|
+
};
|
|
47
|
+
colors: {
|
|
48
|
+
border: string;
|
|
49
|
+
input: string;
|
|
50
|
+
ring: string;
|
|
51
|
+
background: string;
|
|
52
|
+
foreground: string;
|
|
53
|
+
surface: string;
|
|
54
|
+
primary: {
|
|
55
|
+
DEFAULT: string;
|
|
56
|
+
foreground: string;
|
|
57
|
+
};
|
|
58
|
+
secondary: {
|
|
59
|
+
DEFAULT: string;
|
|
60
|
+
foreground: string;
|
|
61
|
+
};
|
|
62
|
+
destructive: {
|
|
63
|
+
DEFAULT: string;
|
|
64
|
+
foreground: string;
|
|
65
|
+
};
|
|
66
|
+
muted: {
|
|
67
|
+
DEFAULT: string;
|
|
68
|
+
foreground: string;
|
|
69
|
+
};
|
|
70
|
+
accent: {
|
|
71
|
+
DEFAULT: string;
|
|
72
|
+
foreground: string;
|
|
73
|
+
};
|
|
74
|
+
popover: {
|
|
75
|
+
DEFAULT: string;
|
|
76
|
+
foreground: string;
|
|
77
|
+
};
|
|
78
|
+
card: {
|
|
79
|
+
DEFAULT: string;
|
|
80
|
+
foreground: string;
|
|
81
|
+
};
|
|
82
|
+
success: {
|
|
83
|
+
DEFAULT: string;
|
|
84
|
+
foreground: string;
|
|
85
|
+
};
|
|
86
|
+
warning: {
|
|
87
|
+
DEFAULT: string;
|
|
88
|
+
foreground: string;
|
|
89
|
+
};
|
|
90
|
+
info: {
|
|
91
|
+
DEFAULT: string;
|
|
92
|
+
foreground: string;
|
|
93
|
+
};
|
|
94
|
+
purple: {
|
|
95
|
+
DEFAULT: string;
|
|
96
|
+
foreground: string;
|
|
97
|
+
};
|
|
98
|
+
orange: {
|
|
99
|
+
DEFAULT: string;
|
|
100
|
+
foreground: string;
|
|
101
|
+
};
|
|
102
|
+
aqua: {
|
|
103
|
+
DEFAULT: string;
|
|
104
|
+
foreground: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
borderRadius: {
|
|
108
|
+
lg: string;
|
|
109
|
+
md: string;
|
|
110
|
+
sm: string;
|
|
111
|
+
};
|
|
112
|
+
borderColor: {
|
|
113
|
+
DEFAULT: string;
|
|
114
|
+
};
|
|
115
|
+
keyframes: {
|
|
116
|
+
"accordion-down": {
|
|
117
|
+
from: {
|
|
118
|
+
height: string;
|
|
119
|
+
};
|
|
120
|
+
to: {
|
|
121
|
+
height: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
"accordion-up": {
|
|
125
|
+
from: {
|
|
126
|
+
height: string;
|
|
127
|
+
};
|
|
128
|
+
to: {
|
|
129
|
+
height: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
animation: {
|
|
134
|
+
"accordion-down": string;
|
|
135
|
+
"accordion-up": string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
plugins: ({
|
|
140
|
+
handler: tailwindcss_types_config.PluginCreator;
|
|
141
|
+
config?: Partial<tailwindcss_types_config.Config> | undefined;
|
|
142
|
+
} | typeof tailwindForms | typeof tailwindTypography)[];
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
declare const getChaiBuilderTheme: (themeOptions?: ChaiThemeOptions) => {
|
|
146
|
+
fontFamily: {};
|
|
147
|
+
borderRadius: {
|
|
148
|
+
lg: string;
|
|
149
|
+
md: string;
|
|
150
|
+
sm: string;
|
|
151
|
+
} | {
|
|
152
|
+
lg?: undefined;
|
|
153
|
+
md?: undefined;
|
|
154
|
+
sm?: undefined;
|
|
155
|
+
};
|
|
156
|
+
colors: {};
|
|
157
|
+
container: {
|
|
158
|
+
center: boolean;
|
|
159
|
+
padding: string;
|
|
160
|
+
screens: {
|
|
161
|
+
"2xl": string;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
declare function getCleanHostname(hostname: string): string;
|
|
167
|
+
|
|
168
|
+
export { applyChaiDataBinding, applyDesignTokens, _default as chaiBuilderPlugin, convertHTMLToChaiBlocks, convertToBlocks, generateUUID, getChaiBuilderTailwindConfig, getChaiBuilderTheme, getCleanHostname };
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as d,b as e,c as f,d as g,e as h,f as i}from"./chunk-K6RHR4HT.js";import{b,m as c}from"./chunk-VUWHFLT7.js";import"./chunk-OR7KKUYT.js";import"./chunk-T56KQBE2.js";import"./chunk-YDOQEFOK.js";import"./chunk-ITX7QWN6.js";import"./chunk-LWYDGDPW.js";import{a}from"./chunk-VKSRWZCO.js";import"./chunk-3UEPBBE4.js";import"./chunk-WOT6VMZA.js";export{c as applyChaiDataBinding,e as applyDesignTokens,d as chaiBuilderPlugin,f as convertHTMLToChaiBlocks,g as convertToBlocks,a as generateUUID,b as getChaiBuilderTailwindConfig,h as getChaiBuilderTheme,i as getCleanHostname};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Ao=Object.create;var Y=Object.defineProperty;var Mo=Object.getOwnPropertyDescriptor;var Ho=Object.getOwnPropertyNames;var Do=Object.getPrototypeOf,Fo=Object.prototype.hasOwnProperty;var Oo=(e,t)=>{for(var o in t)Y(e,o,{get:t[o],enumerable:!0})},Ce=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ho(t))!Fo.call(e,i)&&i!==o&&Y(e,i,{get:()=>t[i],enumerable:!(r=Mo(t,i))||r.enumerable});return e};var P=(e,t,o)=>(o=e!=null?Ao(Do(e)):{},Ce(t||!e||!e.__esModule?Y(o,"default",{value:e,enumerable:!0}):o,e)),Vo=e=>Ce(Y({},"__esModule",{value:!0}),e);var sr={};Oo(sr,{loadWebBlocks:()=>lr});module.exports=Vo(sr);var h=require("lodash-es");var he="#styles:";var f=require("lodash-es"),zo=require("react"),v={};var Z=e=>(0,f.get)(v,e),j=e=>{let t=(0,f.memoize)(e),o=(r=>(0,f.has)(v,r)?t(r):e(r));return o.cache=t.cache,o},be=j(e=>{var l,s;let t=(0,f.get)(v,e),o=(s=(l=t==null?void 0:t.props)==null?void 0:l.schema)!=null?s:{},r=(0,f.get)(o,"properties",{}),i={};return(0,f.each)(r,(p,c)=>{(0,f.has)(p,"block")||(0,f.set)(i,c,p.default)}),i}),Go=j(e=>(0,f.get)(v,`${e}.i18nProps`,[])),ke=j(e=>(0,f.get)(v,`${e}.aiProps`,[])),$o=j(e=>{var c,u,d,k;let t=Z(e);if(!t)return;let o=(u=(c=t.props)==null?void 0:c.schema)!=null?u:{},r=(k=(d=t.props)==null?void 0:d.uiSchema)!=null?k:{},i=(0,f.cloneDeep)(o),l=(0,f.get)(i,"properties",{}),s=(0,f.omitBy)(l,y=>(y==null?void 0:y.styles)===!0);return(0,f.set)(i,"properties",s),{schema:i,uiSchema:r||{}}});var qo=[be,Go,ke,$o],Uo=e=>{for(let t of qo)t.cache.delete(e)};var Wo=(e,t)=>{let o=(0,f.get)(v,t.type);o?(0,f.set)(v,t.type,{...o,component:e,...t}):(0,f.set)(v,t.type,{component:e,...t}),Uo(t.type)},m=(e,t)=>{Wo(e,{...t,category:t.category||"core"})};var le=(e,t)=>({type:"null",block:e,prop:t,default:null,runtime:!0,ui:{"ui:widget":"hidden"}});var G=require("lodash-es");var n=e=>{let t=["_type","_id","_parent","_bindings","_name"],o=["$loading","blockProps","inBuilder","lang","draft","pageProps","pageData","children"],r=(0,h.keys)(e.properties);if((0,h.intersection)(r,t).length>0)throw new Error(`Reserved props are not allowed: ${(0,h.intersection)(r,t).join(", ")}`);if((0,h.intersection)(r,o).length>0)throw new Error(`Runtime props are not allowed in schema: ${(0,h.intersection)(r,o).join(", ")}`);let i=(0,h.get)(e,"properties",{}),l={};return(0,h.each)(i,(s,p)=>{(0,h.isEmpty)(s.ui)||(l[p]={...s.ui},delete i[p].ui)}),{schema:(0,h.isEmpty)(i)?{}:{...(0,h.omit)(e,["ui"])},uiSchema:{...(0,h.get)(e,"ui",{}),...l}}};var a=(e="")=>({type:"string",styles:!0,default:`${he},${e}`,ui:{"ui:widget":"hidden"}});var Re=P(require("react"),1);var Be=require("cnfast"),Pe=require("lodash-es"),xe=require("nanoid"),Se=require("cnfast");function L(e=6){return(0,xe.nanoid)(e)}var _=(...e)=>(0,Se.twMerge)((0,Be.clsx)(e));var X=require("react/jsx-runtime"),Ko=({className:e="",inBuilder:t})=>t?(0,X.jsx)("div",{className:_("pointer-events-none flex h-20 flex-col items-center justify-center p-2",e),children:(0,X.jsx)("div",{className:"h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800",children:(0,X.jsx)("div",{className:"flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700"})})}):null,b=Ko;var ve=require("react/jsx-runtime"),Ie=e=>{let{blockProps:t,inBuilder:o,backgroundImage:r,children:i,tag:l="div",styles:s}=e,p=i;i||(p=(0,ve.jsx)(b,{inBuilder:o}));let c={};return r&&(c={backgroundImage:`url(${r})`}),Re.createElement(l,{...t,...s,style:c},p)},we={type:"Box",description:"Similar to a div or section elements in HTML",label:"Box",category:"core",group:"basic",props:n({properties:{styles:a(""),tag:{type:"string",default:"div",title:"Tag",oneOf:[{const:"div",title:"div"},{const:"header",title:"header"},{const:"footer",title:"footer"},{const:"section",title:"section"},{const:"article",title:"article"},{const:"aside",title:"aside"},{const:"main",title:"main"},{const:"nav",title:"nav"},{const:"figure",title:"figure"},{const:"details",title:"details"},{const:"summary",title:"summary"},{const:"dialog",title:"dialog"},{const:"strike",title:"strike"},{const:"caption",title:"caption"},{const:"legend",title:"legend"},{const:"figcaption",title:"figcaption"},{const:"mark",title:"mark"}]},backgroundImage:{type:"string",default:"",title:"Background Image",ui:{"ui:widget":"image","ui:allowEmpty":!0}}}}),canAcceptBlock:()=>!0};var Te=require("@radix-ui/react-icons"),E=require("lodash-es"),Le=require("react");var w=require("react/jsx-runtime"),_e=e=>{let{blockProps:t,iconSize:o,icon:r,content:i,styles:l,children:s,iconPos:p,link:c,inBuilder:u}=e,d=r,k=s||(0,w.jsxs)(w.Fragment,{children:[i&&(0,w.jsx)("span",{children:i}),d&&(0,w.jsx)("div",{style:{width:o+"px"},className:p+" "+(i?p==="order-first"?"mr-2":"ml-2":"")||"",dangerouslySetInnerHTML:{__html:d}})]}),y=(0,Le.createElement)("button",{...t,...l,type:"button","aria-label":i},k);return(0,E.isEmpty)((0,E.get)(c,"href"))?y:u?(0,w.jsx)("span",{children:y}):(0,w.jsx)("a",{"aria-label":i,href:(0,E.get)(c,"href")||"/",target:(0,E.get)(c,"target","_self"),children:y})},Ee={type:"Button",description:"similar to a button element in HTML",label:"Button",category:"core",icon:Te.ButtonIcon,group:"basic",props:n({properties:{styles:a("dt#btn dt#btn-primary"),content:{type:"string",title:"Button label",default:"Button"},icon:{type:"string",title:"Icon",default:"",ui:{"ui:widget":"icon"}},iconSize:{type:"number",title:"Icon size",default:16},iconPos:{type:"string",title:"Icon position",default:"order-last",enum:["order-first","order-last"],enumNames:["Left","Right"]},link:{type:"object",properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}},default:{type:"url",href:"",target:"_self"},ui:{"ui:field":"link"}},prefetchLink:{type:"boolean",default:!0,title:"Prefetch Link"}}}),i18nProps:["content","link"],aiProps:["content"]};var Ne=require("@radix-ui/react-icons"),se=P(require("react"),1);var J=require("react/jsx-runtime"),Yo=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Ae=e=>{let{blockProps:t,styles:o,htmlCode:r,inBuilder:i}=e;return i?(0,J.jsxs)("div",{className:"relative",...t,children:[i?(0,J.jsx)("div",{...o,className:"absolute z-20 h-full w-full"}):null,se.createElement("div",{...o,dangerouslySetInnerHTML:{__html:r.replace(Yo,"")}})]}):se.createElement("div",{...t,...o,dangerouslySetInnerHTML:{__html:r}})},Me={type:"CustomHTML",description:"similar to a div or section elements in HTML",label:"Custom HTML",category:"core",icon:Ne.CodeIcon,group:"advanced",props:n({properties:{styles:a(""),htmlCode:{type:"string",default:"<div><p>Enter your HTML code here...</p></div>",ui:{"ui:widget":"code"}}}}),i18nProps:["htmlCode"]};var He=require("@radix-ui/react-icons"),N=require("react/jsx-runtime"),De=e=>{let{scripts:t,inBuilder:o,blockProps:r}=e;return o?(0,N.jsx)("div",{...r,children:(0,N.jsx)("div",{className:_("pointer-events-none flex flex-col items-center justify-center p-2",""),children:(0,N.jsx)("div",{className:"h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800",children:(0,N.jsx)("p",{className:"text-left text-xs text-gray-400",children:"Scripts will be only executed in preview and live mode. Place your script at the bottom of the"})})})}):(0,N.jsx)("div",{dangerouslySetInnerHTML:{__html:t}})},Fe={type:"CustomScript",description:"similar to a script element in HTML",label:"Custom Script",category:"core",icon:He.CodeIcon,hidden:!0,group:"advanced",props:n({properties:{scripts:{type:"string",title:"Script",default:"",format:"code",placeholder:"<script>console.log('Hello, world!');</script>"}}})};var Oe=require("@radix-ui/react-icons"),Ve=P(require("react"),1);var $=require("react/jsx-runtime"),ze=e=>{let{blockProps:t,inBuilder:o,children:r,globalBlock:i}=e;return o&&!i?(0,$.jsxs)("div",{className:"flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",...t,children:[(0,$.jsxs)("h1",{children:["Global Block - ",i]}),(0,$.jsx)("p",{children:"Choose a block from the sidebar to add it to this page."})]}):Ve.createElement("span",{...t},r)},Ge={type:"GlobalBlock",description:"A global block component",label:"Global Block",icon:Oe.FrameIcon,category:"core",group:"basic",hidden:!0,props:n({properties:{globalBlock:{type:"string",title:"Global Block",default:"",ui:{"ui:widget":"hidden"}}}})};var $e=require("@radix-ui/react-icons"),qe=require("lodash-es"),Ue=P(require("react"),1);var A=(e,...t)=>({...e,className:_(e.className,...t)});var Ye=require("react/jsx-runtime"),We=e=>{let{blockProps:t,icon:o,styles:r,width:i,inBuilder:l,height:s}=e,p=A(r,"");if((0,qe.isEmpty)(o))return(0,Ye.jsx)(b,{inBuilder:l,className:"h-8 w-14"});let c=o.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return Ue.createElement("span",{...t,...p,style:{width:i?`${i}px`:"auto",height:s?`${s}px`:"auto"},dangerouslySetInnerHTML:{__html:c}})},Ke={type:"Icon",label:"web_blocks.icon",category:"core",description:"Icon block is used to display an icon/svg.",icon:$e.SketchLogoIcon,group:"media",props:n({properties:{styles:a(""),icon:{type:"string",title:"Icon",default:'<svg xmlns="http://www.w3.org/2000/svg" class="chai-default-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-diamond-icon lucide-diamond"><path d="M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z"/></svg>',ui:{"ui:widget":"icon"}},width:{type:"number",default:16,title:"Width"},height:{type:"number",default:16,title:"Height"}}})};var Ze=require("@radix-ui/react-icons"),je=P(require("react"),1);var q=require("react/jsx-runtime"),Xe=e=>{let{blockProps:t,inBuilder:o,children:r,partialBlockId:i}=e;return o&&!i?(0,q.jsxs)("div",{className:"flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",...t,children:[(0,q.jsxs)("h1",{children:["Partial Block - ",i]}),(0,q.jsx)("p",{children:"Choose a block from the sidebar to add it to this page."})]}):je.createElement("span",{...t},r)},Je={type:"PartialBlock",description:"A partial block component. Partial blocks are global blocks that can be used in multiple pages.",label:"Partial Block",icon:Ze.FrameIcon,category:"core",group:"basic",hidden:!0,props:n({properties:{partialBlockId:{type:"string",title:"Partial Block",default:"",ui:{"ui:widget":"hidden"}}}})};var te=require("@radix-ui/react-icons"),M=require("lodash-es");var Q={SMALL:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},MEDIUM:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},LARGE:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}};var ee=require("react/jsx-runtime"),Qe=e=>{let{blockProps:t,children:o,styles:r,colSpan:i,tabletColSpan:l,desktopColSpan:s}=e,c={className:[(0,M.get)(r,"className",""),(0,M.get)(Q,["SMALL",isNaN(i)||!i?6:i],""),l?(0,M.get)(Q,["MEDIUM",l||i],""):"",s?(0,M.get)(Q,["LARGE",l||i],""):""].join(" ")};return(0,ee.jsx)("div",{...t,...r,...c,children:o||(0,ee.jsx)("div",{className:"h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900"})})},et={type:"Column",description:"A column component",label:"Column",group:"basic",category:"core",icon:te.LayoutIcon,wrapper:!0,hidden:!0,canDelete:()=>!0,canAcceptBlock:()=>!0,canBeNested:e=>e==="Row",props:n({properties:{styles:a(""),colSpan:{type:"number",title:"Column Span",default:6,enum:[1,2,3,4,5,6,7,8,9,10,11,12]},tabletColSpan:{type:"number",title:"Column Span (Tablet)",default:null,enumNames:["Default",1,2,3,4,5,6,7,8,9,10,11,12],enum:[null,1,2,3,4,5,6,7,8,9,10,11,12]},desktopColSpan:{type:"number",title:"Column Span (Desktop)",default:null,enumNames:["Default",1,2,3,4,5,6,7,8,9,10,11,12],enum:[null,1,2,3,4,5,6,7,8,9,10,11,12]}}})},tt=e=>{let{blockProps:t,children:o,styles:r,gutter:i}=e,s={className:[(0,M.get)(r,"className","")," grid grid-cols-12"].join()};return typeof(r==null?void 0:r.style)=="object"&&r.style!==null?s.style={...r.style,gap:`${i}px`}:s.style={gap:`${i}px`},(0,ee.jsx)("div",{...t,...r,...s,children:o})},ot={type:"Row",description:"A row component",label:"Row",group:"basic",icon:te.RowsIcon,hidden:!0,blocks:()=>[{_type:"Row",_id:"row",styles:"#styles:,p-1"},{_type:"Column",id:"column",_parent:"row",styles:"#styles:,"},{_type:"Column",id:"column",_parent:"row",styles:"#styles:,"}],category:"core",wrapper:!0,canAcceptBlock:e=>e==="Column",props:n({properties:{styles:a(""),colCount:{type:"number",default:2,minimum:0,ui:{"ui:widget":"colCount"}},gutter:{type:"number",title:"Gutter (in px)",default:16,minimum:0}}})};var rt=require("@radix-ui/react-icons"),it=require("react");var lt=e=>{let{blockProps:t,styles:o}=e;return(0,it.createElement)("hr",{...o,...t})},st={type:"Divider",description:"A horizontal line component",label:"Divider",category:"core",icon:rt.DividerHorizontalIcon,group:"basic",props:n({properties:{styles:a("dt#separator")}})};var nt=P(require("react"),1);var at=e=>{let{blockProps:t,styles:o,backgroundImage:r}=e,i={};return r&&(i={backgroundImage:`url(${r})`}),nt.createElement("div",{...t,...o,style:i})},pt={type:"EmptyBox",description:"A box component with no children",label:"Empty Box",category:"core",group:"basic",props:n({properties:{styles:a(""),backgroundImage:{type:"string",title:"Background Image",default:"",ui:{"ui:widget":"image","ui:allowEmpty":!0}}}})};var ct=require("@radix-ui/react-icons");var H=require("react/jsx-runtime"),mt=e=>{let{blockProps:t,fieldName:o,label:r,styles:i,inputStyles:l,required:s,checked:p,showLabel:c=!0}=e;return c?(0,H.jsxs)("div",{...i,...t,children:[(0,H.jsx)("input",{...l,id:o,name:o,type:"checkbox",required:s,defaultChecked:p}),r&&(0,H.jsx)("label",{htmlFor:o,children:r})]}):(0,H.jsx)("input",{name:o,...t,...l,...i,type:"checkbox",required:s,defaultChecked:p})},dt={type:"Checkbox",label:"web_blocks.checkbox",category:"core",icon:ct.CheckboxIcon,group:"form",props:n({properties:{styles:a("flex items-center gap-x-2"),inputStyles:a("dt#checkbox"),fieldName:{type:"string",title:"Field Name",default:"fieldName"},label:{type:"string",title:"Label",default:"Label"},checked:{type:"boolean",title:"Checked",default:!1},required:{type:"boolean",title:"Required",default:!1},showLabel:{type:"boolean",title:"Show Label",default:!0}}}),aiProps:["label"],i18nProps:["label"]};var ut=require("@radix-ui/react-icons");var U=require("react/jsx-runtime"),yt=e=>{let{children:t,blockProps:o,errorMessage:r,successMessage:i,action:l,styles:s,inBuilder:p}=e,c=t;return t||(c=(0,U.jsx)(b,{inBuilder:p})),(0,U.jsxs)("form",{...{"x-data":"{}","x-on:submit.prevent":"post"},"data-error":r,"data-success":i,method:"post",action:l,...o,...s,children:[(0,U.jsx)("div",{...{"x-html":"",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"}}),c]})},gt={type:"Form",label:"Form",category:"core",icon:ut.FileTextIcon,group:"form",blocks:()=>[{_type:"Form",_id:"form",styles:"#styles:p-1 space-y-2,"},{_type:"Input",_id:"form_input",_parent:"form",styles:"#styles:,"},{_type:"FormButton",_id:"form_submit_btn",_parent:"form",styles:"#styles:bg-black text-white rounded px-3 py-1,"}],props:n({properties:{styles:a(""),action:{type:"string",title:"Submit URL",default:"/api/form"},errorMessage:{type:"string",title:"Error Message",default:"Something went wrong. Please try again",ui:{"ui:widget":"richtext"}},successMessage:{type:"string",title:"Success Message",default:"Thank you for your submission.",ui:{"ui:widget":"richtext"}}}}),i18nProps:["errorMessage","successMessage"],aiProps:["errorMessage","successMessage"],canAcceptBlock:()=>!0};var ft=require("@radix-ui/react-icons");var oe=require("react/jsx-runtime"),Ct=e=>{let{blockProps:t,inBuilder:o,label:r,styles:i,icon:l,iconSize:s,iconPos:p}=e;return(0,oe.jsxs)("button",{...i,...t||{},type:o?"button":"submit","aria-label":r,children:[r,l&&(0,oe.jsx)("div",{style:{width:s+"px"},className:p+" "+(p==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:l}})]})},ht={type:"FormButton",label:"Submit Button",category:"core",icon:ft.ButtonIcon,group:"form",props:n({properties:{styles:a("dt#btn dt#btn-primary"),label:{type:"string",title:"Label",default:"Submit",ai:!0,i18n:!0},icon:{type:"string",title:"Icon",default:"",ui:{"ui:widget":"icon"}},iconSize:{type:"number",title:"Icon size",default:24},iconPos:{type:"string",title:"Icon Position",default:"order-last",enum:["order-first","order-last"]}}}),i18nProps:["label"],aiProps:["label"]};var bt=require("@radix-ui/react-icons");var D=require("react/jsx-runtime"),Zo=e=>{let t={type:"text",autoComplete:"on"};return e?["text","password","number","hidden","range","color","date","time"].includes(e)?{type:e,autoComplete:"on"}:e==="email"?{type:"email",autoComplete:"email"}:e==="tel"?{type:"tel",autoComplete:"tel"}:e==="url"?{type:"url",autoComplete:"url"}:{off:{type:"text",autoComplete:"off"},on:{type:"text",autoComplete:"on"},name:{type:"text",autoComplete:"name"},"honorific-prefix":{type:"text",autoComplete:"honorific-prefix"},"given-name":{type:"text",autoComplete:"given-name"},"additional-name":{type:"text",autoComplete:"additional-name"},"family-name":{type:"text",autoComplete:"family-name"},"honorific-suffix":{type:"text",autoComplete:"honorific-suffix"},nickname:{type:"text",autoComplete:"nickname"},firstName:{type:"text",autoComplete:"given-name"},lastName:{type:"text",autoComplete:"family-name"},email:{type:"email",autoComplete:"email"},tel:{type:"tel",autoComplete:"tel"},"tel-country-code":{type:"tel",autoComplete:"tel-country-code"},"tel-national":{type:"tel",autoComplete:"tel-national"},"tel-area-code":{type:"tel",autoComplete:"tel-area-code"},"tel-local":{type:"tel",autoComplete:"tel-local"},"tel-extension":{type:"tel",autoComplete:"tel-extension"},"street-address":{type:"text",autoComplete:"street-address"},"address-line1":{type:"text",autoComplete:"address-line1"},"address-line2":{type:"text",autoComplete:"address-line2"},"address-line3":{type:"text",autoComplete:"address-line3"},"address-level1":{type:"text",autoComplete:"address-level1"},"address-level2":{type:"text",autoComplete:"address-level2"},"address-level3":{type:"text",autoComplete:"address-level3"},"address-level4":{type:"text",autoComplete:"address-level4"},country:{type:"text",autoComplete:"country"},"country-name":{type:"text",autoComplete:"country-name"},"postal-code":{type:"text",autoComplete:"postal-code"},"cc-name":{type:"text",autoComplete:"cc-name"},"cc-given-name":{type:"text",autoComplete:"cc-given-name"},"cc-additional-name":{type:"text",autoComplete:"cc-additional-name"},"cc-family-name":{type:"text",autoComplete:"cc-family-name"},"cc-number":{type:"text",autoComplete:"cc-number"},"cc-exp":{type:"text",autoComplete:"cc-exp"},"cc-exp-month":{type:"number",autoComplete:"cc-exp-month"},"cc-exp-year":{type:"number",autoComplete:"cc-exp-year"},"cc-csc":{type:"text",autoComplete:"cc-csc"},"cc-type":{type:"text",autoComplete:"cc-type"},bday:{type:"date",autoComplete:"bday"},"bday-day":{type:"number",autoComplete:"bday-day"},"bday-month":{type:"number",autoComplete:"bday-month"},"bday-year":{type:"number",autoComplete:"bday-year"},username:{type:"text",autoComplete:"username"},"new-password":{type:"password",autoComplete:"new-password"},"current-password":{type:"password",autoComplete:"current-password"},"one-time-code":{type:"text",autoComplete:"one-time-code"},"transaction-currency":{type:"text",autoComplete:"transaction-currency"},"transaction-amount":{type:"number",autoComplete:"transaction-amount"},url:{type:"url",autoComplete:"url"},photo:{type:"url",autoComplete:"photo"},sex:{type:"text",autoComplete:"sex"},"organization-title":{type:"text",autoComplete:"organization-title"},organization:{type:"text",autoComplete:"organization"},language:{type:"text",autoComplete:"language"}}[e]||t:t},kt=e=>{let{blockProps:t,fieldName:o,label:r,placeholder:i,styles:l,inputStyles:s,showLabel:p,required:c,inputType:u,defaultValue:d}=e,{type:k,autoComplete:y}=Zo(u);return p?(0,D.jsxs)("div",{...l,...t,children:[p&&(0,D.jsx)("label",{htmlFor:o,children:r}),(0,D.jsx)("input",{id:o,name:o,...s,type:k,placeholder:i,required:c,autoComplete:y,...k==="hidden"?{value:d,readOnly:!0}:{defaultValue:d}})]}):(0,D.jsx)("input",{name:o,...t,...s,...l,type:k,placeholder:i,required:c,autoComplete:y,...k==="hidden"?{value:d,readOnly:!0}:{defaultValue:d}})},Bt={type:"Input",label:"web_blocks.input",category:"core",icon:bt.InputIcon,group:"form",props:n({properties:{styles:a(""),inputStyles:a("dt#input"),fieldName:{type:"string",title:"Field Name",default:"fieldName"},inputType:{type:"string",title:"Type",default:"email",oneOf:[{const:"text",title:"Text"},{const:"email",title:"Email"},{const:"password",title:"Password"},{const:"number",title:"Number"},{const:"tel",title:"Telephone"},{const:"hidden",title:"Hidden"},{const:"range",title:"Range"},{const:"color",title:"Color"},{const:"date",title:"Date"},{const:"time",title:"Time"},{const:"url",title:"URL"},{const:"name",title:"Name"},{const:"firstName",title:"First Name"},{const:"lastName",title:"Last Name"},{const:"tel-country-code",title:"Telephone Country Code"},{const:"tel-national",title:"Telephone National"},{const:"tel-area-code",title:"Telephone Area Code"},{const:"tel-local",title:"Telephone Local"},{const:"tel-extension",title:"Telephone Extension"},{const:"street-address",title:"Street Address"},{const:"address-line1",title:"Address Line 1"},{const:"address-line2",title:"Address Line 2"},{const:"address-line3",title:"Address Line 3"},{const:"address-level1",title:"Address Level 1"},{const:"address-level2",title:"Address Level 2"},{const:"address-level3",title:"Address Level 3"},{const:"address-level4",title:"Address Level 4"},{const:"country",title:"Country"},{const:"country-name",title:"Country Name"},{const:"postal-code",title:"Postal Code"},{const:"cc-name",title:"Credit Card Name"},{const:"cc-number",title:"Credit Card Number"},{const:"cc-exp",title:"Credit Card Expiry"},{const:"cc-exp-month",title:"Credit Card Expiry Month"},{const:"cc-exp-year",title:"Credit Card Expiry Year"},{const:"cc-csc",title:"Credit Card CSC"},{const:"cc-type",title:"Credit Card Type"},{const:"bday",title:"Birthday"},{const:"bday-day",title:"Birthday Day"},{const:"bday-month",title:"Birthday Month"},{const:"bday-year",title:"Birthday Year"},{const:"username",title:"Username"},{const:"new-password",title:"New Password"},{const:"current-password",title:"Current Password"},{const:"one-time-code",title:"One Time Code"},{const:"transaction-currency",title:"Transaction Currency"},{const:"transaction-amount",title:"Transaction Amount"},{const:"url",title:"URL"},{const:"photo",title:"Photo"},{const:"sex",title:"Sex"},{const:"organization-title",title:"Organization Title"},{const:"organization",title:"Organization"},{const:"language",title:"Language"}]},showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label",ai:!0,i18n:!0},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},required:{type:"boolean",title:"Required",default:!1},defaultValue:{type:"string",title:"Default Value",default:""}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]};var Pt=require("@radix-ui/react-icons"),ne=P(require("react"),1);var xt=e=>{let{blockProps:t,content:o,styles:r,children:i}=e,l={...r,...t};return i?ne.createElement("label",l,i):ne.createElement("label",{...l,dangerouslySetInnerHTML:{__html:o}})},St={type:"Label",label:"Label",category:"core",icon:Pt.LetterCaseToggleIcon,group:"form",props:n({properties:{styles:a("dt#label"),content:{type:"string",title:"Content",default:""}}}),aiProps:["content"],i18nProps:["content"]};var Rt=require("@radix-ui/react-icons");var F=require("react/jsx-runtime"),It=e=>{let{blockProps:t,fieldName:o,label:r,styles:i,inputStyles:l,required:s,checked:p,showLabel:c=!0}=e;return c?(0,F.jsxs)("div",{...i,...t,children:[(0,F.jsx)("input",{...l,name:o,type:"radio",required:s,defaultChecked:p}),r&&(0,F.jsx)("label",{htmlFor:o,children:r})]}):(0,F.jsx)("input",{name:o,...t,...l,...i,type:"radio",required:s,checked:p})},wt={type:"Radio",label:"web_blocks.radio",category:"core",icon:Rt.RadiobuttonIcon,group:"form",props:n({properties:{styles:a("flex items-center gap-x-2"),inputStyles:a(""),fieldName:{type:"string",title:"Field Name",default:"fieldName"},label:{type:"string",title:"Label",default:"Label"},checked:{type:"boolean",title:"Checked",default:!1},required:{type:"boolean",title:"Required",default:!1},showLabel:{type:"boolean",title:"Show Label",default:!0}}}),aiProps:["label"],i18nProps:["label"]};var vt=require("@radix-ui/react-icons"),ae=require("lodash-es");var R=require("react/jsx-runtime"),Tt=e=>{let{blockProps:t,fieldName:o,label:r,placeholder:i,styles:l,inputStyles:s,required:p,showLabel:c,_multiple:u,options:d,defaultValue:k}=e,y=u&&k?k.split(",").map(g=>g.trim()):k||"";return c?(0,R.jsxs)("div",{...l,...t,children:[c&&(0,R.jsx)("label",{htmlFor:o,children:r}),(0,R.jsxs)("select",{...s,required:p,multiple:u,name:o,defaultValue:y,children:[(0,R.jsx)("option",{value:"",disabled:!0,hidden:!0,children:i}),(0,ae.map)(d,g=>(0,R.jsx)("option",{value:g==null?void 0:g.value,children:g==null?void 0:g.label},g==null?void 0:g.value))]})]}):(0,R.jsxs)("select",{...l,...t,required:p,multiple:u,name:o,defaultValue:y,children:[(0,R.jsx)("option",{value:"",disabled:!0,hidden:!0,children:i}),(0,ae.map)(d,g=>(0,R.jsx)("option",{value:g==null?void 0:g.value,children:g==null?void 0:g.label},g==null?void 0:g.value))]})},Lt={type:"Select",label:"web_blocks.select",category:"core",icon:vt.DropdownMenuIcon,group:"form",props:n({properties:{styles:a(""),inputStyles:a("w-full p-1"),fieldName:{type:"string",title:"Field Name",default:"fieldName"},showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label"},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},required:{type:"boolean",title:"Required",default:!1},defaultValue:{type:"string",title:"Default Value",default:""},_multiple:{type:"boolean",title:"Multiple",default:!1},options:{title:"Options",type:"array",default:[],items:{type:"object",properties:{label:{type:"string",title:"Label",default:""},value:{type:"string",title:"Value",default:""}}}}}}),i18nProps:["label","placeholder","options"]};var _t=require("@radix-ui/react-icons");var O=require("react/jsx-runtime"),Et=e=>{let{blockProps:t,fieldName:o,label:r,placeholder:i,styles:l,inputStyles:s,rows:p,showLabel:c,required:u,defaultValue:d}=e;return c?(0,O.jsxs)("div",{...l,...t,children:[c&&(0,O.jsx)("label",{htmlFor:o,children:r}),(0,O.jsx)("textarea",{name:o,...s,placeholder:i,rows:p,required:u,defaultValue:d})]}):(0,O.jsx)("textarea",{name:o,...t,...s,...l,placeholder:i,rows:p,required:u,defaultValue:d})},Nt={type:"TextArea",label:"web_blocks.textarea",category:"core",icon:_t.InputIcon,group:"form",props:n({properties:{fieldName:{type:"string",title:"Field Name",default:"fieldName"},styles:a(""),inputStyles:a("dt#textarea"),showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},rows:{type:"number",title:"Rows",default:3},required:{type:"boolean",title:"Required",default:!1},defaultValue:{type:"string",title:"Default Value",default:"",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]};var At=require("@radix-ui/react-icons"),pe=P(require("react"),1);var Mt=e=>{let{blockProps:t,styles:o,content:r,tag:i="h1",children:l=null}=e;return l?pe.createElement(i,{...o,...t},l):pe.createElement(i,{...o,...t,dangerouslySetInnerHTML:{__html:r}})},Ht={type:"Heading",description:"A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",label:"Heading",category:"core",icon:At.HeadingIcon,group:"typography",props:n({properties:{tag:{type:"string",default:"h2",title:"Level",enum:["h1","h2","h3","h4","h5","h6"]},styles:a("text-3xl"),content:{type:"string",default:"Heading goes here",title:"Content",ui:{"ui:widget":"textarea","ui:rows":3}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:()=>!0};var Dt=require("react");var Ft=e=>{let{blockProps:t,styles:o}=e;return(0,Dt.createElement)("br",{...t,...o})},Ot={type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,props:n({properties:{styles:a("")}})};var I=require("@radix-ui/react-icons"),Vt=require("lodash-es"),T=require("react");var V=require("react/jsx-runtime"),jo=e=>{let{blockProps:t,children:o,styles:r}=e;return o?(0,T.createElement)("table",{...t,...r},o):(0,V.jsx)(b,{})},Xo=e=>{let{blockProps:t,children:o,styles:r}=e;return o?(0,T.createElement)("thead",{...t,...r},o):(0,V.jsx)(b,{})},Jo=e=>{let{blockProps:t,children:o,styles:r}=e;return o?(0,T.createElement)("tbody",{...t,...r},o):(0,V.jsx)(b,{})},Qo=e=>{let{blockProps:t,children:o,styles:r}=e;return o?(0,T.createElement)("tr",{...t,...r},o):(0,V.jsx)(b,{})},er=e=>{let{blockProps:t,children:o,content:r,styles:i}=e;return!o&&(0,Vt.isEmpty)(r)?(0,V.jsx)(b,{}):o?(0,T.createElement)("td",{...t,...i},o):(0,T.createElement)("td",{...t,...i,dangerouslySetInnerHTML:{__html:r}})};m(jo,{type:"Table",label:"Table",category:"core",group:"table",hidden:!0,icon:I.TableIcon,props:n({properties:{styles:a("")}}),blocks:W("Table")});m(Xo,{type:"TableHead",label:"Table Head",category:"core",group:"table",hidden:!0,icon:I.BorderTopIcon,props:n({properties:{styles:a("")}}),blocks:W("TableHead")});m(Jo,{type:"TableBody",label:"Table Body",category:"core",group:"table",hidden:!0,icon:I.BorderAllIcon,props:n({properties:{styles:a("")}}),blocks:W("TableBody")});m(Qo,{type:"TableRow",label:"Table Row",category:"core",group:"table",hidden:!0,icon:I.ViewHorizontalIcon,props:n({properties:{styles:a("")}}),blocks:W("TableRow")});m(er,{type:"TableCell",label:"Table Cell",category:"core",group:"table",hidden:!0,icon:I.DragHandleHorizontalIcon,props:n({properties:{styles:a(""),content:{type:"string",default:"Heading goes here",title:"Content",ui:{"ui:widget":"textarea"}}}}),blocks:W("TableCell"),i18nProps:["content"],aiProps:["content"]});function W(e){let t=(l,s)=>({_id:L(),_parent:l,_type:"TableCell",styles:"#styles:,",content:`${e==="TableHead"?"Table Head":"Table Cell "+s}`}),o=l=>{let s=L(),p={_type:"TableRow",_id:s,styles:"#styles:,border-b"};return l&&(p._parent=l),[p,t(s,"1"),t(s,"2"),t(s,"3")]},r=l=>{let s=L(),p={_id:s,_type:"TableHead",styles:"#styles:,font-medium"};return l&&(p._parent=l),[p,...o(s)]},i=l=>{let s=L(),p={_id:s,_type:"TableBody",styles:"#styles:,"};return l&&(p._parent=l),[p,...o(s),...o(s)]};if(e==="Table"){let l=L();return[{_id:l,_type:"Table",styles:"#styles:,w-full text-left text-gray-500 dark:text-gray-400"},...r(l),...i(l)]}return e==="TableRow"?o():e==="TableHead"?r():e==="TableBody"?i():[]}var zt=require("@radix-ui/react-icons"),Gt=require("lodash-es");var z=require("react/jsx-runtime"),tr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==",$t=e=>{let{blockProps:t,image:o,mobileImage:r,styles:i,alt:l,height:s,width:p,lazyLoading:c,mobileWidth:u,mobileHeight:d}=e;return(0,Gt.isEmpty)(o)?(0,z.jsx)(b,{className:"h-36"}):(0,z.jsxs)("picture",{children:[r&&(0,z.jsx)("source",{srcSet:r,media:"(max-width: 480px)",width:u,height:d}),(0,z.jsx)("img",{...t,...i,src:o,alt:l,loading:c?"lazy":"eager",width:p,height:s})]})},qt={type:"Image",description:"A image component",label:"Image",category:"core",icon:zt.ImageIcon,group:"media",props:n({properties:{styles:a("w-full h-full object-cover"),image:{type:"string",title:"Image",default:tr,ui:{"ui:widget":"image"}},width:{type:"string",title:"Width",default:"",ui:{"ui:placeholder":"Enter width"}},height:{type:"string",title:"Height",default:"",ui:{"ui:placeholder":"Enter height"}},mobileImage:{type:"string",title:"Mobile Image",default:"",ui:{"ui:widget":"image"}},mobileWidth:{type:"string",title:"Mobile Width",default:"",ui:{"ui:placeholder":"Enter width"}},mobileHeight:{type:"string",title:"Mobile Height",default:"",ui:{"ui:placeholder":"Enter height"}},alt:{type:"string",title:"Alt text",default:"",ui:{"ui:placeholder":"Enter alt text"}},lazyLoading:{type:"boolean",title:"Lazy Load",default:!0}}}),aiProps:["alt"],i18nProps:["alt","image","_imageId","mobileImage","_mobileImageId"]};var Ut=require("@radix-ui/react-icons"),Wt=require("lodash-es"),ce=require("react");var me=require("react/jsx-runtime"),Kt=e=>{let{blockProps:t,link:o,children:r,styles:i,inBuilder:l,content:s}=e,p={};return!r&&(0,Wt.isEmpty)(s)&&(p={minHeight:"50px",display:"flex",alignItems:"center",justifyContent:"center"}),l?r?(0,me.jsx)("span",{role:"link",...t,style:p,...i,children:r}):(0,ce.createElement)("span",{...t,...i,style:p,role:"link"},s):r?(0,me.jsx)("a",{"aria-label":s,href:(o==null?void 0:o.href)||"#/",target:o==null?void 0:o.target,...t,...i,children:r}):(0,ce.createElement)("a",{...t,...i,href:(o==null?void 0:o.href)||"#",target:(o==null?void 0:o.target)||"_self","aria-label":s},s)},Yt={type:"Link",description:"A link component",label:"Link",category:"core",icon:Ut.Link1Icon,group:"basic",props:n({properties:{styles:a("block"),content:{type:"string",default:"Link text goes here",title:"Content"},link:{type:"object",properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}},default:{type:"url",href:"",target:"_self"},ui:{"ui:field":"link"}},prefetchLink:{type:"boolean",default:!1,title:"Prefetch Link"}}}),aiProps:["content"],i18nProps:["content","link"],canAcceptBlock:e=>e!=="Link"};var Zt=require("@radix-ui/react-icons"),jt=require("lodash-es"),Xt=P(require("react"),1);var eo=require("react/jsx-runtime"),Jt=e=>{let{blockProps:t,children:o,styles:r,tag:i,inBuilder:l}=e;return!o&&(0,jt.isEmpty)(r==null?void 0:r.className)?(0,eo.jsx)(b,{inBuilder:l}):Xt.createElement(i||"ul",{...t,...r},o)},Qt={type:"List",description:"A list component",label:"List",icon:Zt.RowsIcon,category:"core",group:"basic",props:n({properties:{styles:a("")}}),canAcceptBlock:e=>e==="ListItem",blocks:[{_type:"List",_id:"a",styles:"#styles:,"},{_type:"ListItem",_id:"b",_parent:"a",styles:"#styles:,",content:"Item 1"},{_type:"ListItem",_id:"c",_parent:"a",styles:"#styles:,",content:"Item 2"},{_type:"ListItem",_id:"d",_parent:"a",styles:"#styles:,",content:"Item 3"}]};var to=require("@radix-ui/react-icons"),de=P(require("react"),1);var oo=e=>{let{blockProps:t,content:o,styles:r,children:i,tag:l}=e;return i?de.createElement(l||"li",{...r,...t},i):de.createElement(l||"li",{...r,...t,dangerouslySetInnerHTML:{__html:o}})},ro={type:"ListItem",description:"A list item component",label:"List Item",icon:to.ColumnsIcon,category:"core",group:"basic",props:n({properties:{styles:a(""),content:{type:"string",default:"List item",title:"Content",ui:{"ui:widget":"textarea"}}}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e!=="ListItem",canBeNested:e=>e==="List"||e==="Repeater"};var io=require("@radix-ui/react-icons"),lo=require("lodash-es"),ue=P(require("react"),1);var so=e=>{let{blockProps:t,styles:o,content:r}=e;if(!(0,lo.isNull)(e.children))return ue.createElement("p",{...o,...t},e.children);let i=A(o,"rte");return ue.createElement("div",{...i,...t,dangerouslySetInnerHTML:{__html:r}})},no={type:"Paragraph",description:"A paragraph component",label:"Paragraph",category:"core",icon:io.TextIcon,group:"typography",props:n({properties:{styles:a(""),content:{type:"string",title:"Content",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.",ui:{"ui:widget":"richtext","ui:autosize":!0,"ui:rows":5}}}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e==="Span"||e==="Link"||e==="Text"};var ao=require("@radix-ui/react-icons");var mo=require("react/jsx-runtime"),po=e=>{let{blockProps:t,content:o,styles:r}=e,i=A(r,"rte");return(0,mo.jsx)("div",{...t,...i,dangerouslySetInnerHTML:{__html:o}})},co={type:"RichText",description:"A rich text block",label:"Rich Text",hidden:!0,category:"core",icon:ao.CursorTextIcon,group:"typography",props:n({properties:{styles:a(""),content:{type:"string",title:"Content",default:"<p>This is a rich text block. You can add text, and other content here.</p>",ui:{"ui:widget":"richtext"}}}}),aiProps:["content"],i18nProps:["content"]};var ye=P(require("react"),1);var uo=e=>{let{blockProps:t,styles:o,content:r,children:i=null,tag:l}=e;return i?ye.createElement("span",{...o,...t},i):ye.createElement(l||"span",{...o,...t,dangerouslySetInnerHTML:{__html:r||""}})},yo={type:"Span",description:"A span component",label:"Span",category:"core",group:"basic",props:n({properties:{styles:a(""),content:{type:"string",title:"Content",default:"",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:()=>!0};var go=require("@radix-ui/react-icons");var ho=require("react/jsx-runtime"),fo=e=>e.inBuilder||e.forceWrapper?(0,ho.jsx)("span",{...e.blockProps,children:e.content}):`${e.content}`,Co={type:"Text",description:"A text component with no styling",label:"Text",category:"core",group:"typography",blocks:()=>[{_id:"a",_type:"Text",_name:"Text",content:""}],icon:go.SpaceBetweenVerticallyIcon,props:n({properties:{styles:a("text-black"),content:{title:"Content",type:"string",default:""}}}),aiProps:["content"],i18nProps:["content"]};var Bo=require("@radix-ui/react-icons"),C=require("lodash-es");var S=require("react/jsx-runtime"),So=require("react"),ge={type:"object",title:"Controls",default:{autoplay:!0,controls:!1,loop:!0,muted:!0},properties:{autoplay:{type:"boolean",title:"Autoplay",default:!1},controls:{type:"boolean",title:"Show Controls",default:!0},loop:{type:"boolean",title:"Loop Video",default:!1},muted:{type:"boolean",title:"Muted",default:!1}}},bo=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,ko=/(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/,or=(e,t)=>{let o=(0,C.get)(t,"autoplay",!1),r=(0,C.get)(t,"controls",!1),i=(0,C.get)(t,"loop",!1),l=o||(0,C.get)(t,"muted",!0);if(bo.test(e)){let s=e.match(bo);if(s){let p=s[4],c=`https://www.youtube.com/embed/${p}`,u=[];return o&&u.push("autoplay=1"),i&&u.push("loop=1",`playlist=${p}`),l&&u.push("mute=1","muted=1"),u.push(r?"controls=1":"controls=0"),`${c}?${u.join("&")}`}}if(ko.test(e)){let s=e.match(ko);if(s){let p=s[1],c=[];return o&&c.push("autoplay=1"),c.push(r?"controls=1":"controls=0"),l&&c.push("muted=1"),i&&c.push("loop=1"),`https://player.vimeo.com/video/${p}?${c.join("&")}`}}return null},rr=e=>{let{url:t,blockProps:o,styles:r,controls:i,videoSource:l,inBuilder:s,title:p}=e,c=or(t,i);return(0,S.jsxs)("div",{...(0,C.omit)(r,"className"),className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[!c&&s?(0,S.jsx)("div",{className:"absolute flex h-full w-full items-center justify-center bg-gray-300 text-center",children:(0,C.isEmpty)(t)?`Provided ${l} video link in settings Video URL.`:`Provided ${l} video link is invalid.`}):(0,S.jsx)("iframe",{className:`absolute left-0 top-0 h-full w-full ${(0,C.pick)(r,"className").className||""}`,src:c!=null?c:"",title:p||"Video player",loading:"lazy",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),s&&(0,S.jsx)("div",{...o,className:"absolute top-0 h-full w-full"})]})},ir=e=>{let{url:t,styles:o,controls:r,sources:i,poster:l,blockProps:s,title:p}=e,c=l,u=[...(0,C.get)(i,"srcsets",[])||[]];t&&typeof t=="string"&&u.push({url:t,width:9999});let d=u.sort((y,g)=>y.width-g.width).filter(y=>!(0,C.isEmpty)(y.url)&&!(0,C.isEmpty)(y.width));d.length===0&&!c&&(c="https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");let k=(0,C.get)(r,"autoplay",!1)||(0,C.get)(r,"muted",!0);return(c||!(0,C.isEmpty)(d))&&(0,S.jsx)("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:(0,So.createElement)("video",{...o,...s,title:p||"Video player",key:JSON.stringify(d),controls:(0,C.get)(r,"controls",!1),autoPlay:(0,C.get)(r,"autoplay",!1),loop:(0,C.get)(r,"loop",!1),poster:c,...k?{muted:!0}:{}},d.map(y=>{if(!y.url||y.url.length<4||isNaN(y.width))return null;let g=`(max-width: ${y.width}px)`;return(0,S.jsx)("source",{src:y.url,media:g,type:y.type},y.url)}),"Your browser does not support the video tag.")})},Po=e=>{let{videoSource:t}=e;return t==="Custom"?(0,S.jsx)(ir,{...e}):t==="Youtube"||t==="Vimeo"?(0,S.jsx)(rr,{...e}):(0,S.jsxs)("div",{children:["Invalid video source : ",t]})},xo={type:"Video",label:"Video",category:"core",icon:Bo.VideoIcon,group:"media",props:n({properties:{styles:a("absolute h-full w-full object-cover"),videoSource:{type:"string",default:"Custom",enum:["Custom","Youtube","Vimeo"],title:"Video source"},title:{type:"string",title:"Video Title",default:"Video player"}},allOf:[{if:{properties:{videoSource:{const:"Custom"}}},then:{properties:{url:{type:"string",title:"Video URL",default:""},poster:{type:"string",title:"Poster URL",default:""},sources:{type:"object",default:{srcsets:[]}},controls:{...ge}}}},{if:{properties:{videoSource:{const:"Youtube"}}},then:{properties:{url:{type:"string",title:"Youtube Video URL",default:""},controls:{...ge}}}},{if:{properties:{videoSource:{const:"Vimeo"}}},then:{properties:{url:{type:"string",title:"Vimeo Video URL",default:""},controls:{...ge}}}}],ui:{url:{"ui:placeholder":"Enter Video URL"},sources:{"ui:field":"sources"},poster:{"ui:placeholder":"Enter poster URL"}}}),i18nProps:["url","title"]};var fe=require("@radix-ui/react-icons"),ie=require("lodash-es"),K=P(require("react"),1);var re=require("@radix-ui/react-icons"),Ro=require("lodash-es"),Io=P(require("react"),1);var B=require("react/jsx-runtime"),wo=e=>{let{paginationStyles:t}=e,o=Z("Pagination");return(0,B.jsx)("div",{...t,children:o?Io.createElement(o.component,{...(0,Ro.omit)(e,["paginationStyles"]),blockProps:{}}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",disabled:!0,children:(0,B.jsx)(re.ChevronLeftIcon,{className:"h-4 w-4"})}),(0,B.jsx)("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-blue-500 bg-blue-500 font-medium text-white",children:"1"}),(0,B.jsx)("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50",children:"2"}),(0,B.jsx)("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50",children:"3"}),(0,B.jsx)("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50",children:"4"}),(0,B.jsx)("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50",children:"5"}),(0,B.jsx)("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white hover:bg-gray-50",children:(0,B.jsx)(re.ChevronRightIcon,{className:"h-4 w-4"})})]})})};var x=require("react/jsx-runtime"),vo=e=>{let{children:t,tag:o,styles:r,blockProps:i,$loading:l}=e,{pagination:s,inBuilder:p}=e,c=t;return(0,ie.isEmpty)(c)&&p&&(c=(0,x.jsx)("div",{className:"col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground",children:"Choose a collection to display items"})),o==="none"?l&&p?Array.from({length:2}).map((u,d)=>(0,x.jsxs)("div",{className:"animate-pulse rounded-md bg-primary/10 p-5",children:[(0,x.jsx)("div",{className:"h-6 w-1/2 rounded-md bg-primary/10"}),(0,x.jsx)("div",{className:"mt-2 h-4 w-1/2 rounded-md bg-primary/10"})]},d)):c:(0,x.jsxs)(x.Fragment,{children:[K.createElement(o,{...i,...r},l&&p?Array.from({length:2}).map((u,d)=>(0,x.jsxs)("div",{className:"animate-pulse rounded-md bg-primary/10 p-5",children:[(0,x.jsx)("div",{className:"h-6 w-1/2 rounded-md bg-primary/10"}),(0,x.jsx)("div",{className:"mt-2 h-4 w-1/2 rounded-md bg-primary/10"})]},d)):c),s&&(0,x.jsx)(wo,{...(0,ie.pick)(e,["limit","totalItems","paginationStrategy","inBuilder","draft","lang","paginationStyles"])})]})},To={type:"Repeater",label:"Repeater",icon:fe.LoopIcon,group:"basic",description:"Repeater block is used to display a list of items based on data binding in repeaterItems",dataProviderMode:"live",dataProviderDependencies:["filter","sort","limit","repeaterItems"],blocks:()=>[{_id:"A",_type:"Repeater",tag:"ul"},{_id:"B",_name:"Repeater Item",_type:"RepeaterItem",parentTag:"ul",_parent:"A"}],props:n({properties:{styles:a("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),paginationStyles:a("flex items-center justify-center gap-2 p-4"),repeaterItems:{title:"Collection",type:"string",binding:"array",default:"",ui:{"ui:widget":"repeaterBinding","ui:readonly":!0}},tag:{title:"Tag",type:"string",default:"ul",enum:["none","div","ul","ol"]},filter:{title:"Filter by",type:"string",default:"",ui:{"ui:widget":"collectionSelect"}},sort:{title:"Sort by",type:"string",default:"",ui:{"ui:widget":"collectionSelect"}},pagination:{title:"Pagination",type:"boolean",default:!1}},allOf:[{if:{properties:{pagination:{const:!0}}},then:{properties:{paginationStrategy:{type:"string",title:"Pagination Strategy",default:"segment",enum:["query","segment"]},limit:{type:"number",title:"Items Per Page",default:10,minimum:1}}}},{if:{properties:{pagination:{const:!1}}},then:{properties:{limit:{type:"number",title:"Max items",default:10,minimum:1}}}}]}),canAcceptBlock:e=>e==="Pagination"},Lo=({children:e,blockProps:t,styles:o,parentTag:r,inBuilder:i})=>{let l="li";switch(r){case"ul":l="li";break;case"ol":l="li";break;default:l="div"}return!e&&i?K.createElement(l,{...t,...o},(0,x.jsx)("div",{className:"col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground",children:"Add children to repeater item"})):K.createElement(l,{...t,...o},e)},_o={type:"RepeaterItem",label:"Repeater Item",icon:fe.LoopIcon,hidden:!0,group:"basic",props:n({properties:{styles:a(""),parentTag:le("Repeater","tag")}}),canAcceptBlock:e=>e!=="RepeaterItem",canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},Eo=({children:e,blockProps:t,styles:o})=>K.createElement("div",{...t,...o},e),No={type:"RepeaterEmptyState",label:"Empty State",hidden:!0,group:"basic",props:n({properties:{styles:a("p-5 flex items-center justify-center")}}),canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1};var lr=()=>{m(Ie,we),m(at,pt),m(_e,Ee),m(Mt,Ht),m(so,no),m(uo,yo),m(po,co),m(Kt,Yt),m(Jt,Qt),m(oo,ro),m(We,Ke),m($t,qt),m(Po,xo),m(Ae,Me),m(De,Fe),m(fo,Co),m(yt,gt),m(Ct,ht),m(kt,Bt),m(mt,dt),m(It,wt),m(Tt,Lt),m(Et,Nt),m(xt,St),m(Ft,Ot),m(lt,st),m(ze,Ge),m(Xe,Je),m(tt,ot),m(Qe,et),m(vo,To),m(Lo,_o),m(Eo,No)};0&&(module.exports={loadWebBlocks});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-BYGD5CDT.js";import"./chunk-VKSRWZCO.js";import"./chunk-3UEPBBE4.js";import"./chunk-WOT6VMZA.js";export{a as loadWebBlocks};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-MEROMQQX.js";import{a as s}from"./chunk-WHPIYGCY.js";import"./chunk-TVF77C53.js";import{b as l}from"./chunk-3IT7IIAV.js";import"./chunk-IP4JBQOX.js";import"./chunk-LWYDGDPW.js";import"./chunk-WOT6VMZA.js";import{useAtom as p}from"jotai";import{map as h}from"lodash-es";import{Laptop as u,LaptopMinimal as w,Smartphone as f,Tablet as v}from"lucide-react";import{useState as b}from"react";import{jsx as t,jsxs as d}from"react/jsx-runtime";import{createElement as k}from"react";var x=[{title:"mobile_xs_title",content:"mobile_xs_content",icon:t(f,{className:"h-4 w-4"}),width:400},{title:"tablet_md_title",content:"tablet_md_content",icon:t(v,{className:"h-4 w-4"}),width:800},{title:"desktop_xl_title",content:"desktop_xl_content",icon:t(u,{className:"h-4 w-4"}),width:1200},{title:"large_desktop_2xl_title",content:"large_desktop_2xl_content",icon:t(w,{className:"h-4 w-4"}),width:1600}],_=({currentWidth:e,width:o,icon:n,setIframeWidth:r})=>t(l,{className:"px-3 py-3",onClick:()=>r(o),variant:o===e?"default":"ghost",children:n}),g=()=>{let[e,o]=b(1200),n=i=>o(i),[r,m]=p(a);if(!r)return null;let c=()=>{m("")};return d("div",{className:"absolute inset-0 z-[999999] flex h-screen w-screen flex-col overflow-hidden bg-gray-100",children:[d("div",{className:"flex h-[50px] items-center justify-center border-b border-gray-200 px-4 shadow-sm",children:[t("div",{className:"flex items-center justify-center rounded-md border border-gray-300",children:h(x,i=>k(_,{...i,setIframeWidth:n,key:i.title,currentWidth:e}))}),"\xA0",t(s,{content:"Exit Preview",delayDuration:0,children:t(l,{variant:"destructive",size:"sm",onClick:c,children:t("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t("path",{d:"M2 3C2 2.44772 2.44772 2 3 2H12C12.5523 2 13 2.44772 13 3V12C13 12.5523 12.5523 13 12 13H3C2.44772 13 2 12.5523 2 12V3ZM12 3H3V12H12V3Z",fill:"currentColor",fillRule:"evenodd","clip-rule":"evenodd"})})})})]}),t("iframe",{style:{width:`${e}px`,transition:"width 0.3s ease-in-out"},className:"no-scrollbar mx-auto h-full overflow-y-auto border bg-white",src:r})]})},P=g;export{P as default};
|