@chaibuilder/sdk 1.2.65 → 1.2.67
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/dist/AddBlocks-TVOOPK2w.cjs +1 -0
- package/dist/AddBlocks-mbuhydG3.js +123 -0
- package/dist/CanvasArea-KJMcis97.cjs +1 -0
- package/dist/CanvasArea-kg3Rgg9t.js +136 -0
- package/dist/CodeEditor-QP6l0mv4.cjs +1 -0
- package/dist/{CodeEditor-Qff4q7sx.js → CodeEditor-q5unEaUI.js} +60 -46
- package/dist/STRINGS--j49GZJP.js +7 -0
- package/dist/STRINGS-gPz7CUOk.cjs +1 -0
- package/dist/SettingsPanel-MWeQjDWs.cjs +1 -0
- package/dist/SettingsPanel-pomLrOxB.js +81 -0
- package/dist/SidePanels-9sbERNEv.cjs +1 -0
- package/dist/{SidePanels-ijaUKSek.js → SidePanels-YpRrvfiH.js} +87 -93
- package/dist/{Topbar-vHlnfxPs.js → Topbar-kVBx7pp4.js} +56 -61
- package/dist/Topbar-veJ2_blW.cjs +1 -0
- package/dist/{UILibrariesPanel-NVUMUPUj.js → UILibrariesPanel-ES8YzN9C.js} +92 -101
- package/dist/UILibrariesPanel-H8t36R6M.cjs +1 -0
- package/dist/UnsplashImages--MXx-DYM.cjs +1 -0
- package/dist/{UnsplashImages-UkHihhA5.js → UnsplashImages-sotLcz6r.js} +72 -57
- package/dist/{UploadImages-HtuJZJlo.js → UploadImages-I0QQ6vj1.js} +57 -44
- package/dist/UploadImages-xhxeYKkl.cjs +1 -0
- package/dist/badge-7BVT3zxN.cjs +1 -0
- package/dist/badge-pJqQSA13.js +23 -0
- package/dist/context-menu-_8TFbFEJ.cjs +1 -0
- package/dist/context-menu-sks9vdzC.js +906 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +45 -20
- package/dist/core.js +85 -87
- package/dist/iconBase-vJD0OXxU.cjs +1 -0
- package/dist/iconBase-zweRWSz0.js +323 -0
- package/dist/index-5hfuDpYs.cjs +223 -0
- package/dist/index-Zu-K_BX7.js +33933 -0
- package/dist/jsx-runtime-JYMCiFoE.cjs +27 -0
- package/dist/{jsx-runtime-WbnYoNE9.js → jsx-runtime-Sp0orL4X.js} +106 -109
- package/dist/plugin-P0tpo_XZ.cjs +1 -0
- package/dist/plugin-_F-KZp1i.cjs +1 -0
- package/dist/plugin-f5uJtdXY.js +43 -0
- package/dist/plugin-sJ3Hzvpv.js +57 -0
- package/dist/render.cjs +3 -1
- package/dist/render.d.ts +19 -52
- package/dist/render.js +136 -183
- package/dist/select-JW3OMYm-.js +75 -0
- package/dist/select-fXj5tdMX.cjs +1 -0
- package/dist/separator-hT24N-xp.cjs +1 -0
- package/dist/separator-sgwOa1FE.js +18 -0
- package/dist/style.css +1 -1
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.d.ts +41 -1
- package/dist/tailwind.js +16 -8
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +0 -10
- package/dist/ui.js +345 -163
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.d.ts +1 -1
- package/dist/web-blocks.js +489 -724
- package/package.json +15 -45
- package/dist/CanvasArea-fSdH_RiN.cjs +0 -1
- package/dist/CanvasArea-ut5yknzX.js +0 -168
- package/dist/CodeEditor-ypUx3RAV.cjs +0 -1
- package/dist/CurrentPage-jHSVy3hq.js +0 -120
- package/dist/CurrentPage-p_AM4lrF.cjs +0 -1
- package/dist/Functions-7jnEwJyw.js +0 -15
- package/dist/Functions-N3yhPYKY.cjs +0 -1
- package/dist/MODIFIERS-fd5XOmum.js +0 -60
- package/dist/MODIFIERS-mVmfEGgo.cjs +0 -1
- package/dist/PagesPanel-U3InJ9Db.js +0 -78
- package/dist/PagesPanel-wqDb4D-x.cjs +0 -1
- package/dist/ProjectPanel-XODJTO4J.js +0 -99
- package/dist/ProjectPanel-fWESzHr6.cjs +0 -1
- package/dist/SidePanels-lrMQqc0h.cjs +0 -1
- package/dist/Topbar-RrCDxd0i.cjs +0 -1
- package/dist/UILibrariesPanel-7btHgBD0.cjs +0 -1
- package/dist/UnsplashImages-6UjgojvF.cjs +0 -1
- package/dist/UploadImages-3h0cRsvr.cjs +0 -1
- package/dist/_commonjsHelpers-UyOWmZb0.js +0 -8
- package/dist/_commonjsHelpers-wDK0ZLPo.cjs +0 -1
- package/dist/add-page-modal-RwIj1FxH.cjs +0 -1
- package/dist/add-page-modal-TOfMfmPA.js +0 -115
- package/dist/confirm-alert-eIp2cAkc.js +0 -60
- package/dist/confirm-alert-v1lG8ex4.cjs +0 -1
- package/dist/controls-rRZhz0vu.cjs +0 -1
- package/dist/controls-yjgoZzB6.js +0 -199
- package/dist/delete-page-modal-4bxjpVBD.js +0 -97
- package/dist/delete-page-modal-qYDZmpgT.cjs +0 -1
- package/dist/email-blocks.cjs +0 -1
- package/dist/email-blocks.d.ts +0 -3
- package/dist/email-blocks.js +0 -294
- package/dist/email.cjs +0 -1
- package/dist/email.d.ts +0 -171
- package/dist/email.js +0 -90
- package/dist/empty-slot-Lsxjts7Q.js +0 -6
- package/dist/empty-slot-Sy930lX6.cjs +0 -1
- package/dist/form-4jTocVbZ.cjs +0 -1
- package/dist/form-NAzFjGs0.js +0 -125
- package/dist/functions--tdNWQDW.js +0 -30
- package/dist/functions-EVUeSwX1.cjs +0 -1
- package/dist/html-to-json-NqRjgFqp.cjs +0 -1
- package/dist/html-to-json-l_mw5y-e.js +0 -243
- package/dist/index--k2M8kzI.cjs +0 -1
- package/dist/index--mLLy7QQ.cjs +0 -1
- package/dist/index-5XyNUAjc.cjs +0 -290
- package/dist/index-C7mB4XFm.js +0 -3141
- package/dist/index-VBXQixVm.js +0 -117
- package/dist/index-YZhtVcj_.js +0 -2201
- package/dist/index-aeDphKpP.cjs +0 -1
- package/dist/index-lFgDm1oa.js +0 -83780
- package/dist/jsx-runtime-Z_BpKhVy.cjs +0 -27
- package/dist/lib.cjs +0 -3
- package/dist/lib.d.ts +0 -80
- package/dist/lib.js +0 -1350
- package/dist/page-viewer-4wrnWnK0.js +0 -124
- package/dist/page-viewer-ra0GLx1p.cjs +0 -1
- package/dist/project-general-setting-IwZUkYF3.js +0 -90
- package/dist/project-general-setting-lFjTUhHD.cjs +0 -1
- package/dist/project-seo-setting-e1fTqVsd.js +0 -83
- package/dist/project-seo-setting-o0V9acCV.cjs +0 -1
- package/dist/server.cjs +0 -1
- package/dist/server.d.ts +0 -299
- package/dist/server.js +0 -216
- package/dist/single-page-detail-ZNWFKqLW.js +0 -229
- package/dist/single-page-detail-g55Anu7R.cjs +0 -1
- package/dist/studio.cjs +0 -1
- package/dist/studio.d.ts +0 -176
- package/dist/studio.js +0 -67
- package/dist/utils-D_vtk3zK.cjs +0 -1
- package/dist/utils-VpVqnC9m.js +0 -1075
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"author": "Suraj Air",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"homepage": "https://chaibuilder.com",
|
|
8
|
-
"version": "1.2.
|
|
8
|
+
"version": "1.2.67",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -16,6 +16,20 @@
|
|
|
16
16
|
],
|
|
17
17
|
"main": "dist/core.js",
|
|
18
18
|
"sideEffects": false,
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "vite",
|
|
21
|
+
"build": "tsc && vite build",
|
|
22
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
23
|
+
"preview": "vite preview",
|
|
24
|
+
"test": "jest --colors --verbose",
|
|
25
|
+
"test:watch": "jest --watch --colors",
|
|
26
|
+
"test:coverage": "jest --coverage --colors",
|
|
27
|
+
"e2e": "playwright test",
|
|
28
|
+
"e2e:report": "playwright show-report",
|
|
29
|
+
"e2e:ui": "playwright test --ui",
|
|
30
|
+
"docs": "jsdoc -c jsdoc.conf.json",
|
|
31
|
+
"prepare": "husky"
|
|
32
|
+
},
|
|
19
33
|
"exports": {
|
|
20
34
|
".": {
|
|
21
35
|
"import": "./dist/core.js",
|
|
@@ -32,21 +46,6 @@
|
|
|
32
46
|
"require": "./dist/ui.cjs",
|
|
33
47
|
"types": "./dist/ui.d.ts"
|
|
34
48
|
},
|
|
35
|
-
"./lib": {
|
|
36
|
-
"import": "./dist/lib.js",
|
|
37
|
-
"require": "./dist/lib.cjs",
|
|
38
|
-
"types": "./dist/lib.d.ts"
|
|
39
|
-
},
|
|
40
|
-
"./server": {
|
|
41
|
-
"import": "./dist/server.js",
|
|
42
|
-
"require": "./dist/server.cjs",
|
|
43
|
-
"types": "./dist/server.d.ts"
|
|
44
|
-
},
|
|
45
|
-
"./studio": {
|
|
46
|
-
"import": "./dist/studio.js",
|
|
47
|
-
"require": "./dist/studio.cjs",
|
|
48
|
-
"types": "./dist/studio.d.ts"
|
|
49
|
-
},
|
|
50
49
|
"./tailwind": {
|
|
51
50
|
"import": "./dist/tailwind.js",
|
|
52
51
|
"require": "./dist/tailwind.cjs",
|
|
@@ -60,32 +59,8 @@
|
|
|
60
59
|
"import": "./dist/web-blocks.js",
|
|
61
60
|
"require": "./dist/web-blocks.cjs",
|
|
62
61
|
"types": "./dist/web-blocks.d.ts"
|
|
63
|
-
},
|
|
64
|
-
"./email": {
|
|
65
|
-
"import": "./dist/email.js",
|
|
66
|
-
"require": "./dist/email.cjs",
|
|
67
|
-
"types": "./dist/email.d.ts"
|
|
68
|
-
},
|
|
69
|
-
"./email-blocks": {
|
|
70
|
-
"import": "./dist/email-blocks.js",
|
|
71
|
-
"require": "./dist/email-blocks.cjs",
|
|
72
|
-
"types": "./dist/email-blocks.d.ts"
|
|
73
62
|
}
|
|
74
63
|
},
|
|
75
|
-
"scripts": {
|
|
76
|
-
"dev": "vite",
|
|
77
|
-
"build": "tsc && vite build",
|
|
78
|
-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
79
|
-
"preview": "vite preview",
|
|
80
|
-
"test": "jest --colors --verbose",
|
|
81
|
-
"test:watch": "jest --watch --colors",
|
|
82
|
-
"test:coverage": "jest --coverage --colors",
|
|
83
|
-
"e2e": "playwright test",
|
|
84
|
-
"e2e:report": "playwright show-report",
|
|
85
|
-
"e2e:ui": "playwright test --ui",
|
|
86
|
-
"docs": "jsdoc -c jsdoc.conf.json",
|
|
87
|
-
"prepare": "husky"
|
|
88
|
-
},
|
|
89
64
|
"dependencies": {
|
|
90
65
|
"@chaibuilder/runtime": "0.2.8",
|
|
91
66
|
"@floating-ui/dom": "1.4.5",
|
|
@@ -122,20 +97,17 @@
|
|
|
122
97
|
"@tailwindcss/forms": "^0.5.6",
|
|
123
98
|
"@tailwindcss/line-clamp": "^0.4.4",
|
|
124
99
|
"@tailwindcss/typography": "^0.5.10",
|
|
125
|
-
"@tanstack/react-query": "^5.8.4",
|
|
126
100
|
"class-variance-authority": "0.6.1",
|
|
127
101
|
"clsx": "1.2.1",
|
|
128
102
|
"cmdk": "0.2.0",
|
|
129
103
|
"flagged": "2.0.9",
|
|
130
104
|
"fuse.js": "6.6.2",
|
|
131
105
|
"himalaya": "^1.1.0",
|
|
132
|
-
"html-formatter": "0.1.9",
|
|
133
106
|
"i18next": "^23.6.0",
|
|
134
107
|
"jotai": "2.2.2",
|
|
135
108
|
"lodash": "^4.17.21",
|
|
136
109
|
"lodash-es": "4.17.21",
|
|
137
110
|
"lucide-react": "^0.244.0",
|
|
138
|
-
"preline": "^2.3.0",
|
|
139
111
|
"re-resizable": "^6.9.17",
|
|
140
112
|
"react": "^18.2.0",
|
|
141
113
|
"react-arborist": "^3.4.0",
|
|
@@ -150,10 +122,8 @@
|
|
|
150
122
|
"react-json-view-lite": "^1.4.0",
|
|
151
123
|
"react-quill": "^2.0.0",
|
|
152
124
|
"react-wrap-balancer": "^1.1.0",
|
|
153
|
-
"sonner": "^1.2.0",
|
|
154
125
|
"tailwind-merge": "2.3.0",
|
|
155
126
|
"tailwindcss-palette-generator": "^0.6.5",
|
|
156
|
-
"tippy.js": "^6.3.7",
|
|
157
127
|
"tree-model": "^1.0.7",
|
|
158
128
|
"undo-manager": "^1.1.1",
|
|
159
129
|
"unsplash-js": "^7.0.18",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),n=require("react"),u=require("lodash-es"),a=require("@radix-ui/react-icons"),i=require("./index-5XyNUAjc.cjs"),s=require("./index-aeDphKpP.cjs"),c=require("react-i18next"),j=require("jotai"),m=require("lucide-react"),d=require("re-resizable");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("i18next");require("@react-hookz/web");require("react-arborist");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("./index--mLLy7QQ.cjs");require("react-dom");require("prop-types");require("react-quill");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./html-to-json-NqRjgFqp.cjs");require("himalaya");require("./MODIFIERS-mVmfEGgo.cjs");require("lodash");require("@chaibuilder/runtime");require("react-wrap-balancer");require("@rjsf/core");require("@rjsf/validator-ajv8");require("react-autosuggest");require("fuse.js");require("./utils-D_vtk3zK.cjs");require("./controls-rRZhz0vu.cjs");require("@radix-ui/react-scroll-area");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("tree-model");function p(){const[r,t]=s.useDarkMode();return e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(a.SunIcon,{className:"size-4 shrink-0"}),e.jsxRuntimeExports.jsx(s.Switch,{id:"dark-mode-switch",checked:r,onCheckedChange:()=>{t(!r)},className:`${r?"bg-violet-600":"bg-violet-300"} relative ml-2 inline-flex h-[20px] w-[40px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:e.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:`${r?"translate-x-5":"translate-x-0"} pointer-events-none -mt-px inline-block h-[18px] w-[20px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})}),e.jsxRuntimeExports.jsx(i.FaMoon,{className:"size-4 ml-3 shrink-0"})]})}const q=()=>{const{t:r}=c.useTranslation(),{setNewBlocks:t}=s.useBlocksStoreUndoableActions(),[,l]=s.useSelectedBlockIds(),[,o]=s.useSelectedStylingBlocks(),x=n.useCallback(()=>{t([]),l([]),o([])},[t]);return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(s.AlertDialog,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs(s.Button,{size:"sm",variant:"ghost",className:"flex items-center gap-x-1",children:[e.jsxRuntimeExports.jsx(a.EraserIcon,{})," ",r("clear")]})}),e.jsxRuntimeExports.jsxs(s.AlertDialogContent,{className:"border-border",children:[e.jsxRuntimeExports.jsxs(s.AlertDialogHeader,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogTitle,{children:r("clear_canvas_title")}),e.jsxRuntimeExports.jsx(s.AlertDialogDescription,{children:r("clear_canvas_description")})]}),e.jsxRuntimeExports.jsxs(s.AlertDialogFooter,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogCancel,{children:r("cancel")}),e.jsxRuntimeExports.jsx(s.AlertDialogAction,{onClick:x,children:r("yes")})]})]})]})})},h=()=>{const[r,t]=j.useAtom(s.aiAssistantActiveAtom);return s.useBuilderProp("askAiCallBack",null)?e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxRuntimeExports.jsxs(s.Label,{htmlFor:"ai-assistant",className:"flex items-center gap-x-1 text-sm text-yellow-600",children:[e.jsxRuntimeExports.jsx(m.SparklesIcon,{className:"w-4"}),"AI Assistant"]}),e.jsxRuntimeExports.jsx(s.Switch,{className:"scale-90",checked:r,onCheckedChange:o=>{t(o)},id:"ai-assitantt"})]}):null},E=()=>{const r=s.useBuilderProp("darkMode",!0),[t]=s.useCanvasZoom();return e.jsxRuntimeExports.jsxs("div",{className:"flex h-10 items-center justify-between border-b bg-background/70 px-2",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex h-full space-x-2",children:[e.jsxRuntimeExports.jsx(i.Breakpoints,{}),e.jsxRuntimeExports.jsx(s.Separator,{orientation:"vertical"}),r?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(p,{}),e.jsxRuntimeExports.jsx(s.Separator,{orientation:"vertical"})]}):null,e.jsxRuntimeExports.jsxs("div",{className:"flex w-12 cursor-not-allowed items-center justify-center gap-x-1 space-x-0 font-medium text-gray-400",children:[e.jsxRuntimeExports.jsx(a.ZoomInIcon,{className:"h-3.5 w-3.5 flex-shrink-0"})," ",e.jsxRuntimeExports.jsxs("div",{className:"text-xs leading-3",children:[u.round(t,0),"%"]})]}),e.jsxRuntimeExports.jsx(s.Separator,{orientation:"vertical"}),e.jsxRuntimeExports.jsx(i.UndoRedo,{})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex h-full items-center space-x-2",children:[e.jsxRuntimeExports.jsx(q,{}),e.jsxRuntimeExports.jsx(s.Separator,{orientation:"vertical"}),e.jsxRuntimeExports.jsx(h,{})]})]})},R=n.lazy(()=>Promise.resolve().then(()=>require("./CodeEditor-ypUx3RAV.cjs"))),f=()=>{const[r]=s.useCodeEditor();return e.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-full flex-col",children:[e.jsxRuntimeExports.jsx(E,{}),e.jsxRuntimeExports.jsxs("div",{className:"relative flex h-full flex-col overflow-hidden bg-gray-100/40 px-2",children:[e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-full"}),children:e.jsxRuntimeExports.jsx(i.ErrorBoundary,{children:e.jsxRuntimeExports.jsx(i.StaticCanvas,{})})}),r?e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-full"}),children:e.jsxRuntimeExports.jsx(d.Resizable,{enable:{top:!0,bottom:!1},className:"max-h-[400px] min-h-[200px]",children:e.jsxRuntimeExports.jsx(R,{})})}):null]})]})};exports.default=f;
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { j as s } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import p, { useCallback as d, Suspense as o } from "react";
|
|
3
|
-
import { round as x } from "lodash-es";
|
|
4
|
-
import { SunIcon as u, EraserIcon as h, ZoomInIcon as j } from "@radix-ui/react-icons";
|
|
5
|
-
import { b as f, B as k, U as v, E as g, S as b } from "./index-lFgDm1oa.js";
|
|
6
|
-
import { Y as A, ar as n, D as N, j as C, z as w, A as B, a as D, B as S, b as y, c as I, d as z, e as E, f as M, g as _, b8 as F, bb as R, h as c, as as T, R as U, bF as r, ak as Z, a3 as l } from "./index-C7mB4XFm.js";
|
|
7
|
-
import { useTranslation as $ } from "react-i18next";
|
|
8
|
-
import { useAtom as H } from "jotai";
|
|
9
|
-
import { SparklesIcon as L } from "lucide-react";
|
|
10
|
-
import { Resizable as P } from "re-resizable";
|
|
11
|
-
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
12
|
-
import "i18next";
|
|
13
|
-
import "@react-hookz/web";
|
|
14
|
-
import "react-arborist";
|
|
15
|
-
import "./Functions-7jnEwJyw.js";
|
|
16
|
-
import "clsx";
|
|
17
|
-
import "tailwind-merge";
|
|
18
|
-
import "./index-VBXQixVm.js";
|
|
19
|
-
import "react-dom";
|
|
20
|
-
import "prop-types";
|
|
21
|
-
import "react-quill";
|
|
22
|
-
import "react-hotkeys-hook";
|
|
23
|
-
import "@floating-ui/dom";
|
|
24
|
-
import "@floating-ui/react-dom";
|
|
25
|
-
import "flagged";
|
|
26
|
-
import "@tailwindcss/typography";
|
|
27
|
-
import "@tailwindcss/forms";
|
|
28
|
-
import "@tailwindcss/aspect-ratio";
|
|
29
|
-
import "tailwindcss-palette-generator";
|
|
30
|
-
import "./html-to-json-l_mw5y-e.js";
|
|
31
|
-
import "himalaya";
|
|
32
|
-
import "./MODIFIERS-fd5XOmum.js";
|
|
33
|
-
import "lodash";
|
|
34
|
-
import "@chaibuilder/runtime";
|
|
35
|
-
import "react-wrap-balancer";
|
|
36
|
-
import "@rjsf/core";
|
|
37
|
-
import "@rjsf/validator-ajv8";
|
|
38
|
-
import "react-autosuggest";
|
|
39
|
-
import "fuse.js";
|
|
40
|
-
import "./utils-VpVqnC9m.js";
|
|
41
|
-
import "./controls-yjgoZzB6.js";
|
|
42
|
-
import "@radix-ui/react-scroll-area";
|
|
43
|
-
import "@radix-ui/react-toggle";
|
|
44
|
-
import "class-variance-authority";
|
|
45
|
-
import "@radix-ui/react-switch";
|
|
46
|
-
import "@radix-ui/react-slot";
|
|
47
|
-
import "@radix-ui/react-accordion";
|
|
48
|
-
import "@radix-ui/react-alert-dialog";
|
|
49
|
-
import "@radix-ui/react-dialog";
|
|
50
|
-
import "@radix-ui/react-label";
|
|
51
|
-
import "@radix-ui/react-tabs";
|
|
52
|
-
import "@radix-ui/react-tooltip";
|
|
53
|
-
import "@radix-ui/react-popover";
|
|
54
|
-
import "@radix-ui/react-menubar";
|
|
55
|
-
import "@radix-ui/react-hover-card";
|
|
56
|
-
import "@radix-ui/react-select";
|
|
57
|
-
import "@radix-ui/react-dropdown-menu";
|
|
58
|
-
import "@radix-ui/react-separator";
|
|
59
|
-
import "@radix-ui/react-toast";
|
|
60
|
-
import "cmdk";
|
|
61
|
-
import "@radix-ui/react-context-menu";
|
|
62
|
-
import "react-icons-picker";
|
|
63
|
-
import "tree-model";
|
|
64
|
-
function Y() {
|
|
65
|
-
const [e, t] = A();
|
|
66
|
-
return /* @__PURE__ */ s.jsxs("div", { className: "flex items-center", children: [
|
|
67
|
-
/* @__PURE__ */ s.jsx(u, { className: "size-4 shrink-0" }),
|
|
68
|
-
/* @__PURE__ */ s.jsx(
|
|
69
|
-
n,
|
|
70
|
-
{
|
|
71
|
-
id: "dark-mode-switch",
|
|
72
|
-
checked: e,
|
|
73
|
-
onCheckedChange: () => {
|
|
74
|
-
t(!e);
|
|
75
|
-
},
|
|
76
|
-
className: `${e ? "bg-violet-600" : "bg-violet-300"} relative ml-2 inline-flex h-[20px] w-[40px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,
|
|
77
|
-
children: /* @__PURE__ */ s.jsx(
|
|
78
|
-
"span",
|
|
79
|
-
{
|
|
80
|
-
"aria-hidden": "true",
|
|
81
|
-
className: `${e ? "translate-x-5" : "translate-x-0"} pointer-events-none -mt-px inline-block h-[18px] w-[20px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
}
|
|
85
|
-
),
|
|
86
|
-
/* @__PURE__ */ s.jsx(f, { className: "size-4 ml-3 shrink-0" })
|
|
87
|
-
] });
|
|
88
|
-
}
|
|
89
|
-
const q = () => {
|
|
90
|
-
const { t: e } = $(), { setNewBlocks: t } = N(), [, a] = C(), [, i] = w(), m = d(() => {
|
|
91
|
-
t([]), a([]), i([]);
|
|
92
|
-
}, [t]);
|
|
93
|
-
return /* @__PURE__ */ s.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ s.jsxs(B, { children: [
|
|
94
|
-
/* @__PURE__ */ s.jsx(D, { asChild: !0, children: /* @__PURE__ */ s.jsxs(S, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
|
|
95
|
-
/* @__PURE__ */ s.jsx(h, {}),
|
|
96
|
-
" ",
|
|
97
|
-
e("clear")
|
|
98
|
-
] }) }),
|
|
99
|
-
/* @__PURE__ */ s.jsxs(y, { className: "border-border", children: [
|
|
100
|
-
/* @__PURE__ */ s.jsxs(I, { children: [
|
|
101
|
-
/* @__PURE__ */ s.jsx(z, { children: e("clear_canvas_title") }),
|
|
102
|
-
/* @__PURE__ */ s.jsx(E, { children: e("clear_canvas_description") })
|
|
103
|
-
] }),
|
|
104
|
-
/* @__PURE__ */ s.jsxs(M, { children: [
|
|
105
|
-
/* @__PURE__ */ s.jsx(_, { children: e("cancel") }),
|
|
106
|
-
/* @__PURE__ */ s.jsx(F, { onClick: m, children: e("yes") })
|
|
107
|
-
] })
|
|
108
|
-
] })
|
|
109
|
-
] }) });
|
|
110
|
-
}, G = () => {
|
|
111
|
-
const [e, t] = H(R);
|
|
112
|
-
return c("askAiCallBack", null) ? /* @__PURE__ */ s.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
113
|
-
/* @__PURE__ */ s.jsxs(T, { htmlFor: "ai-assistant", className: "flex items-center gap-x-1 text-sm text-yellow-600", children: [
|
|
114
|
-
/* @__PURE__ */ s.jsx(L, { className: "w-4" }),
|
|
115
|
-
"AI Assistant"
|
|
116
|
-
] }),
|
|
117
|
-
/* @__PURE__ */ s.jsx(
|
|
118
|
-
n,
|
|
119
|
-
{
|
|
120
|
-
className: "scale-90",
|
|
121
|
-
checked: e,
|
|
122
|
-
onCheckedChange: (i) => {
|
|
123
|
-
t(i);
|
|
124
|
-
},
|
|
125
|
-
id: "ai-assitantt"
|
|
126
|
-
}
|
|
127
|
-
)
|
|
128
|
-
] }) : null;
|
|
129
|
-
}, J = () => {
|
|
130
|
-
const e = c("darkMode", !0), [t] = U();
|
|
131
|
-
return /* @__PURE__ */ s.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
|
|
132
|
-
/* @__PURE__ */ s.jsxs("div", { className: "flex h-full space-x-2", children: [
|
|
133
|
-
/* @__PURE__ */ s.jsx(k, {}),
|
|
134
|
-
/* @__PURE__ */ s.jsx(r, { orientation: "vertical" }),
|
|
135
|
-
e ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
136
|
-
/* @__PURE__ */ s.jsx(Y, {}),
|
|
137
|
-
/* @__PURE__ */ s.jsx(r, { orientation: "vertical" })
|
|
138
|
-
] }) : null,
|
|
139
|
-
/* @__PURE__ */ s.jsxs("div", { className: "flex w-12 cursor-not-allowed items-center justify-center gap-x-1 space-x-0 font-medium text-gray-400", children: [
|
|
140
|
-
/* @__PURE__ */ s.jsx(j, { className: "h-3.5 w-3.5 flex-shrink-0" }),
|
|
141
|
-
" ",
|
|
142
|
-
/* @__PURE__ */ s.jsxs("div", { className: "text-xs leading-3", children: [
|
|
143
|
-
x(t, 0),
|
|
144
|
-
"%"
|
|
145
|
-
] })
|
|
146
|
-
] }),
|
|
147
|
-
/* @__PURE__ */ s.jsx(r, { orientation: "vertical" }),
|
|
148
|
-
/* @__PURE__ */ s.jsx(v, {})
|
|
149
|
-
] }),
|
|
150
|
-
/* @__PURE__ */ s.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
|
|
151
|
-
/* @__PURE__ */ s.jsx(q, {}),
|
|
152
|
-
/* @__PURE__ */ s.jsx(r, { orientation: "vertical" }),
|
|
153
|
-
/* @__PURE__ */ s.jsx(G, {})
|
|
154
|
-
] })
|
|
155
|
-
] });
|
|
156
|
-
}, K = p.lazy(() => import("./CodeEditor-Qff4q7sx.js")), ie = () => {
|
|
157
|
-
const [e] = Z();
|
|
158
|
-
return /* @__PURE__ */ s.jsxs("div", { className: "flex h-full w-full flex-col", children: [
|
|
159
|
-
/* @__PURE__ */ s.jsx(J, {}),
|
|
160
|
-
/* @__PURE__ */ s.jsxs("div", { className: "relative flex h-full flex-col overflow-hidden bg-gray-100/40 px-2", children: [
|
|
161
|
-
/* @__PURE__ */ s.jsx(o, { fallback: /* @__PURE__ */ s.jsx(l, { className: "h-full" }), children: /* @__PURE__ */ s.jsx(g, { children: /* @__PURE__ */ s.jsx(b, {}) }) }),
|
|
162
|
-
e ? /* @__PURE__ */ s.jsx(o, { fallback: /* @__PURE__ */ s.jsx(l, { className: "h-full" }), children: /* @__PURE__ */ s.jsx(P, { enable: { top: !0, bottom: !1 }, className: "max-h-[400px] min-h-[200px]", children: /* @__PURE__ */ s.jsx(K, {}) }) }) : null
|
|
163
|
-
] })
|
|
164
|
-
] });
|
|
165
|
-
};
|
|
166
|
-
export {
|
|
167
|
-
ie as default
|
|
168
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),b=require("@monaco-editor/react"),i=require("./index-aeDphKpP.cjs"),k=require("react-i18next"),n=require("react"),C=require("@radix-ui/react-icons"),E=require("@react-hookz/web");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("lodash-es");require("./MODIFIERS-mVmfEGgo.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("tree-model");const a=u=>{const s=document.createElement("div");return s.innerHTML=u,s.innerHTML};function R(){const{t:u}=k.useTranslation(),[s,d]=n.useState(!1),[l,x]=n.useState(""),[r,o]=i.useCodeEditor(),[c]=i.useSelectedBlockIds(),q=i.useUpdateBlocksProps(),m=i.useUpdateBlocksPropsRealtime(),p=E.useThrottledCallback(t=>{const h=a(t);m([r.blockId],{[r.blockProp]:h})},[],300),j=n.useCallback(()=>{if(s){const t=a(l);q([r.blockId],{[r.blockProp]:t})}},[s,l]);n.useEffect(()=>{c.includes(r==null?void 0:r.blockId)||(j(),o(null))},[c]);const f=()=>{o(null)};return e.jsxRuntimeExports.jsxs("div",{className:"h-full rounded-t-lg border-t-4 border-black bg-black text-white",children:[e.jsxRuntimeExports.jsx("button",{onClick:f,className:"fixed inset-0 z-[100000] cursor-default bg-gray-400/20"}),e.jsxRuntimeExports.jsxs("div",{className:"relative z-[100001] h-full w-full flex-col gap-y-1",children:[e.jsxRuntimeExports.jsxs("div",{className:"-mt-1 flex items-center justify-between px-2 py-2",children:[e.jsxRuntimeExports.jsxs("h3",{className:"space-x-3 text-sm font-semibold",children:[e.jsxRuntimeExports.jsx("span",{children:u("HTML Code Editor |")}),e.jsxRuntimeExports.jsx("span",{className:"text-xs text-gray-400",children:u("Scripts will be only executed in preview and live mode.")})]}),e.jsxRuntimeExports.jsx("div",{className:"flex gap-x-2",children:e.jsxRuntimeExports.jsx(i.Button,{onClick:()=>o(null),size:"sm",variant:"destructive",className:"h-6 w-fit",children:e.jsxRuntimeExports.jsx(C.Cross2Icon,{})})})]}),e.jsxRuntimeExports.jsx(b,{onMount:t=>{t.setValue(r.initialCode)},onChange:t=>{d(!0),x(t),p(t)},height:"100%",defaultLanguage:"html",theme:"vs-dark",defaultValue:"",options:{minimap:{enabled:!1}}})]})]})}exports.default=R;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { j as r } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { b9 as h, bw as f, bx as j, by as y, bz as b, bA as v } from "./index-C7mB4XFm.js";
|
|
3
|
-
import { sortBy as P, filter as w, get as C, isEmpty as s, find as n, capitalize as N, map as S } from "lodash-es";
|
|
4
|
-
import { toast as k } from "sonner";
|
|
5
|
-
import { useEffect as p } from "react";
|
|
6
|
-
import { a as B, u as E, c as T, d as z } from "./index-YZhtVcj_.js";
|
|
7
|
-
import { BriefcaseIcon as A } from "lucide-react";
|
|
8
|
-
import { useTranslation as I } from "react-i18next";
|
|
9
|
-
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
10
|
-
import "@radix-ui/react-toggle";
|
|
11
|
-
import "class-variance-authority";
|
|
12
|
-
import "./utils-VpVqnC9m.js";
|
|
13
|
-
import "./MODIFIERS-fd5XOmum.js";
|
|
14
|
-
import "clsx";
|
|
15
|
-
import "tailwind-merge";
|
|
16
|
-
import "@radix-ui/react-switch";
|
|
17
|
-
import "@radix-ui/react-slot";
|
|
18
|
-
import "@radix-ui/react-accordion";
|
|
19
|
-
import "@radix-ui/react-icons";
|
|
20
|
-
import "@radix-ui/react-alert-dialog";
|
|
21
|
-
import "@radix-ui/react-dialog";
|
|
22
|
-
import "@radix-ui/react-label";
|
|
23
|
-
import "@radix-ui/react-scroll-area";
|
|
24
|
-
import "@radix-ui/react-tabs";
|
|
25
|
-
import "@radix-ui/react-tooltip";
|
|
26
|
-
import "@radix-ui/react-popover";
|
|
27
|
-
import "@radix-ui/react-menubar";
|
|
28
|
-
import "@radix-ui/react-hover-card";
|
|
29
|
-
import "@radix-ui/react-select";
|
|
30
|
-
import "@radix-ui/react-dropdown-menu";
|
|
31
|
-
import "@radix-ui/react-separator";
|
|
32
|
-
import "@radix-ui/react-toast";
|
|
33
|
-
import "cmdk";
|
|
34
|
-
import "@radix-ui/react-context-menu";
|
|
35
|
-
import "react-icons-picker";
|
|
36
|
-
import "react-dom";
|
|
37
|
-
import "react-quill";
|
|
38
|
-
import "./Functions-7jnEwJyw.js";
|
|
39
|
-
import "@chaibuilder/runtime";
|
|
40
|
-
import "jotai";
|
|
41
|
-
import "@react-hookz/web";
|
|
42
|
-
import "tree-model";
|
|
43
|
-
import "./index-lFgDm1oa.js";
|
|
44
|
-
import "i18next";
|
|
45
|
-
import "react-arborist";
|
|
46
|
-
import "./index-VBXQixVm.js";
|
|
47
|
-
import "prop-types";
|
|
48
|
-
import "react-hotkeys-hook";
|
|
49
|
-
import "@floating-ui/dom";
|
|
50
|
-
import "@floating-ui/react-dom";
|
|
51
|
-
import "flagged";
|
|
52
|
-
import "@tailwindcss/typography";
|
|
53
|
-
import "@tailwindcss/forms";
|
|
54
|
-
import "@tailwindcss/aspect-ratio";
|
|
55
|
-
import "tailwindcss-palette-generator";
|
|
56
|
-
import "./html-to-json-l_mw5y-e.js";
|
|
57
|
-
import "himalaya";
|
|
58
|
-
import "lodash";
|
|
59
|
-
import "react-wrap-balancer";
|
|
60
|
-
import "@rjsf/core";
|
|
61
|
-
import "@rjsf/validator-ajv8";
|
|
62
|
-
import "react-autosuggest";
|
|
63
|
-
import "fuse.js";
|
|
64
|
-
import "./controls-yjgoZzB6.js";
|
|
65
|
-
const Gr = () => {
|
|
66
|
-
const { data: t } = B(), { data: i, isLoading: l } = E(), { saveState: c } = h(), d = T(), { t: u } = I(), [o, m] = z(), a = P(w(i, { type: "STATIC" }), (e) => C(e, "uuid") === (t == null ? void 0 : t.homepage) ? 0 : 1);
|
|
67
|
-
p(() => {
|
|
68
|
-
!s(i) && t.homepage && !n(i, { uuid: o }) && m(t.homepage);
|
|
69
|
-
}, [o, i, t, m]), p(() => () => m(null), [m]);
|
|
70
|
-
const g = (e) => {
|
|
71
|
-
if (c !== "SAVED")
|
|
72
|
-
k.error(u("You have unsaved changes. Please save before changing the page."));
|
|
73
|
-
else {
|
|
74
|
-
const x = n(a, { uuid: e });
|
|
75
|
-
d(x);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
return l || s(o) ? null : /* @__PURE__ */ r.jsx(
|
|
79
|
-
"nav",
|
|
80
|
-
{
|
|
81
|
-
className: "flex rounded-lg border border-gray-200 bg-gray-50 px-3 py-1 pr-0 text-gray-700 dark:border-gray-700 dark:bg-gray-800",
|
|
82
|
-
"aria-label": "Breadcrumb",
|
|
83
|
-
children: /* @__PURE__ */ r.jsxs("ol", { className: "inline-flex items-center space-x-1 md:space-x-3", children: [
|
|
84
|
-
/* @__PURE__ */ r.jsx("li", { className: "inline-flex items-center", children: /* @__PURE__ */ r.jsxs("div", { className: "inline-flex items-center text-sm font-medium text-gray-500 dark:text-gray-400", children: [
|
|
85
|
-
/* @__PURE__ */ r.jsx(A, { className: "mr-2 h-4 w-4" }),
|
|
86
|
-
N(t.name)
|
|
87
|
-
] }) }),
|
|
88
|
-
/* @__PURE__ */ r.jsx("li", { "aria-current": "page", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
|
|
89
|
-
/* @__PURE__ */ r.jsx(
|
|
90
|
-
"svg",
|
|
91
|
-
{
|
|
92
|
-
className: "mx-1 h-3 w-3 text-gray-400",
|
|
93
|
-
"aria-hidden": "true",
|
|
94
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
95
|
-
fill: "none",
|
|
96
|
-
viewBox: "0 0 6 10",
|
|
97
|
-
children: /* @__PURE__ */ r.jsx(
|
|
98
|
-
"path",
|
|
99
|
-
{
|
|
100
|
-
stroke: "currentColor",
|
|
101
|
-
strokeLinecap: "round",
|
|
102
|
-
strokeLinejoin: "round",
|
|
103
|
-
strokeWidth: "2",
|
|
104
|
-
d: "m1 9 4-4-4-4"
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
/* @__PURE__ */ r.jsxs(f, { value: o || "", onValueChange: g, children: [
|
|
110
|
-
/* @__PURE__ */ r.jsx(j, { className: "h-max border-0 py-0 text-sm font-medium text-gray-600 shadow-none outline-none ring-0 focus:ring-0 dark:text-gray-400", children: /* @__PURE__ */ r.jsx(y, { placeholder: "Page" }) }),
|
|
111
|
-
/* @__PURE__ */ r.jsx(b, { className: "z-[999]", children: S(a, (e) => /* @__PURE__ */ r.jsx(v, { value: e.uuid, children: e == null ? void 0 : e.name }, e.uuid)) })
|
|
112
|
-
] })
|
|
113
|
-
] }) })
|
|
114
|
-
] })
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
};
|
|
118
|
-
export {
|
|
119
|
-
Gr as default
|
|
120
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("./index-aeDphKpP.cjs"),i=require("lodash-es"),j=require("sonner"),l=require("react"),o=require("./index--k2M8kzI.cjs"),p=require("lucide-react"),f=require("react-i18next");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("./index-5XyNUAjc.cjs");require("i18next");require("react-arborist");require("./index--mLLy7QQ.cjs");require("prop-types");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./html-to-json-NqRjgFqp.cjs");require("himalaya");require("lodash");require("react-wrap-balancer");require("@rjsf/core");require("@rjsf/validator-ajv8");require("react-autosuggest");require("fuse.js");require("./controls-rRZhz0vu.cjs");const E=()=>{const{data:t}=o.useProject(),{data:s,isLoading:q}=o.usePages(),{saveState:x}=u.useSavePage(),d=o.useChangePage(),{t:m}=f.useTranslation(),[n,a]=o.useCurrentPage(),c=i.sortBy(i.filter(s,{type:"STATIC"}),r=>i.get(r,"uuid")===(t==null?void 0:t.homepage)?0:1);l.useEffect(()=>{!i.isEmpty(s)&&t.homepage&&!i.find(s,{uuid:n})&&a(t.homepage)},[n,s,t,a]),l.useEffect(()=>()=>a(null),[a]);const g=r=>{if(x!=="SAVED")j.toast.error(m("You have unsaved changes. Please save before changing the page."));else{const h=i.find(c,{uuid:r});d(h)}};return q||i.isEmpty(n)?null:e.jsxRuntimeExports.jsx("nav",{className:"flex rounded-lg border border-gray-200 bg-gray-50 px-3 py-1 pr-0 text-gray-700 dark:border-gray-700 dark:bg-gray-800","aria-label":"Breadcrumb",children:e.jsxRuntimeExports.jsxs("ol",{className:"inline-flex items-center space-x-1 md:space-x-3",children:[e.jsxRuntimeExports.jsx("li",{className:"inline-flex items-center",children:e.jsxRuntimeExports.jsxs("div",{className:"inline-flex items-center text-sm font-medium text-gray-500 dark:text-gray-400",children:[e.jsxRuntimeExports.jsx(p.BriefcaseIcon,{className:"mr-2 h-4 w-4"}),i.capitalize(t.name)]})}),e.jsxRuntimeExports.jsx("li",{"aria-current":"page",children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx("svg",{className:"mx-1 h-3 w-3 text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10",children:e.jsxRuntimeExports.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 9 4-4-4-4"})}),e.jsxRuntimeExports.jsxs(u.Select,{value:n||"",onValueChange:g,children:[e.jsxRuntimeExports.jsx(u.SelectTrigger,{className:"h-max border-0 py-0 text-sm font-medium text-gray-600 shadow-none outline-none ring-0 focus:ring-0 dark:text-gray-400",children:e.jsxRuntimeExports.jsx(u.SelectValue,{placeholder:"Page"})}),e.jsxRuntimeExports.jsx(u.SelectContent,{className:"z-[999]",children:i.map(c,r=>e.jsxRuntimeExports.jsx(u.SelectItem,{value:r.uuid,children:r==null?void 0:r.name},r.uuid))})]})]})})]})})};exports.default=E;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { isEmpty as s, startsWith as f } from "lodash-es";
|
|
2
|
-
import { clsx as n } from "clsx";
|
|
3
|
-
import { twMerge as a } from "tailwind-merge";
|
|
4
|
-
function c(t = 6, r = "abcdefghijklmnopqrstuvwxyzABCD") {
|
|
5
|
-
let e = "";
|
|
6
|
-
for (let o = t; o > 0; --o)
|
|
7
|
-
e += r[Math.floor(Math.random() * r.length)];
|
|
8
|
-
return e;
|
|
9
|
-
}
|
|
10
|
-
const l = (t) => t >= 1536 ? "2XL" : t >= 1280 ? "XL" : t >= 1024 ? "LG" : t >= 768 ? "MD" : t >= 640 ? "SM" : "XS", i = (...t) => a(n(t));
|
|
11
|
-
export {
|
|
12
|
-
l as a,
|
|
13
|
-
i as c,
|
|
14
|
-
c as g
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("lodash-es"),o=require("clsx"),s=require("tailwind-merge");function c(e=6,t="abcdefghijklmnopqrstuvwxyzABCD"){let r="";for(let n=e;n>0;--n)r+=t[Math.floor(Math.random()*t.length)];return r}const a=e=>e>=1536?"2XL":e>=1280?"XL":e>=1024?"LG":e>=768?"MD":e>=640?"SM":"XS",l=(...e)=>s.twMerge(o.clsx(e));exports.cn=l;exports.generateUUID=c;exports.getBreakpointValue=a;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
const o = "#styles:", e = "#slots:", t = "#i18n", r = "outline", s = [
|
|
2
|
-
"hover",
|
|
3
|
-
"focus",
|
|
4
|
-
"focus-within",
|
|
5
|
-
"focus-visible",
|
|
6
|
-
"active",
|
|
7
|
-
"visited",
|
|
8
|
-
"target",
|
|
9
|
-
"first",
|
|
10
|
-
"last",
|
|
11
|
-
"only",
|
|
12
|
-
"odd",
|
|
13
|
-
"even",
|
|
14
|
-
"first-of-type",
|
|
15
|
-
"last-of-type",
|
|
16
|
-
"only-of-type",
|
|
17
|
-
"empty",
|
|
18
|
-
"disabled",
|
|
19
|
-
"checked",
|
|
20
|
-
"indeterminate",
|
|
21
|
-
"default",
|
|
22
|
-
"required",
|
|
23
|
-
"valid",
|
|
24
|
-
"invalid",
|
|
25
|
-
"in-range",
|
|
26
|
-
"out-of-range",
|
|
27
|
-
"placeholder-shown",
|
|
28
|
-
"autofill",
|
|
29
|
-
"read-only",
|
|
30
|
-
"open",
|
|
31
|
-
"before",
|
|
32
|
-
"after",
|
|
33
|
-
"first-letter",
|
|
34
|
-
"first-line",
|
|
35
|
-
"marker",
|
|
36
|
-
"selection",
|
|
37
|
-
"file",
|
|
38
|
-
"placeholder",
|
|
39
|
-
// preline
|
|
40
|
-
"hs-collapse-open",
|
|
41
|
-
"hs-accordion-active"
|
|
42
|
-
], n = {
|
|
43
|
-
bodyFont: "Inter",
|
|
44
|
-
headingFont: "Inter",
|
|
45
|
-
roundedCorners: 5,
|
|
46
|
-
primaryColor: "#570df8",
|
|
47
|
-
secondaryColor: "#f002b8",
|
|
48
|
-
bodyBgDarkColor: "#031022",
|
|
49
|
-
bodyBgLightColor: "#fcfcfc",
|
|
50
|
-
bodyTextDarkColor: "#ffffff",
|
|
51
|
-
bodyTextLightColor: "#000000"
|
|
52
|
-
};
|
|
53
|
-
export {
|
|
54
|
-
n as B,
|
|
55
|
-
t as I,
|
|
56
|
-
s as M,
|
|
57
|
-
r as O,
|
|
58
|
-
e as S,
|
|
59
|
-
o as a
|
|
60
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const o="#styles:",e="#slots:",t="#i18n",r="outline",n=["hover","focus","focus-within","focus-visible","active","visited","target","first","last","only","odd","even","first-of-type","last-of-type","only-of-type","empty","disabled","checked","indeterminate","default","required","valid","invalid","in-range","out-of-range","placeholder-shown","autofill","read-only","open","before","after","first-letter","first-line","marker","selection","file","placeholder","hs-collapse-open","hs-accordion-active"],i={bodyFont:"Inter",headingFont:"Inter",roundedCorners:5,primaryColor:"#570df8",secondaryColor:"#f002b8",bodyBgDarkColor:"#031022",bodyBgLightColor:"#fcfcfc",bodyTextDarkColor:"#ffffff",bodyTextLightColor:"#000000"};exports.BRANDING_OPTIONS_DEFAULTS=i;exports.I18N_KEY=t;exports.MODIFIERS=n;exports.OUTLINE_KEY=r;exports.SLOT_KEY=e;exports.STYLES_KEY=o;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import i, { Suspense as s } from "react";
|
|
3
|
-
import { sortBy as a, filter as d, get as n } from "lodash-es";
|
|
4
|
-
import { u as l, a as c } from "./index-YZhtVcj_.js";
|
|
5
|
-
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
|
-
import "./index-lFgDm1oa.js";
|
|
7
|
-
import "i18next";
|
|
8
|
-
import "react-i18next";
|
|
9
|
-
import "jotai";
|
|
10
|
-
import "@react-hookz/web";
|
|
11
|
-
import "react-arborist";
|
|
12
|
-
import "./index-C7mB4XFm.js";
|
|
13
|
-
import "@radix-ui/react-toggle";
|
|
14
|
-
import "class-variance-authority";
|
|
15
|
-
import "./utils-VpVqnC9m.js";
|
|
16
|
-
import "./MODIFIERS-fd5XOmum.js";
|
|
17
|
-
import "clsx";
|
|
18
|
-
import "tailwind-merge";
|
|
19
|
-
import "@radix-ui/react-switch";
|
|
20
|
-
import "@radix-ui/react-slot";
|
|
21
|
-
import "@radix-ui/react-accordion";
|
|
22
|
-
import "@radix-ui/react-icons";
|
|
23
|
-
import "@radix-ui/react-alert-dialog";
|
|
24
|
-
import "@radix-ui/react-dialog";
|
|
25
|
-
import "@radix-ui/react-label";
|
|
26
|
-
import "@radix-ui/react-scroll-area";
|
|
27
|
-
import "@radix-ui/react-tabs";
|
|
28
|
-
import "@radix-ui/react-tooltip";
|
|
29
|
-
import "@radix-ui/react-popover";
|
|
30
|
-
import "@radix-ui/react-menubar";
|
|
31
|
-
import "@radix-ui/react-hover-card";
|
|
32
|
-
import "@radix-ui/react-select";
|
|
33
|
-
import "@radix-ui/react-dropdown-menu";
|
|
34
|
-
import "@radix-ui/react-separator";
|
|
35
|
-
import "@radix-ui/react-toast";
|
|
36
|
-
import "cmdk";
|
|
37
|
-
import "@radix-ui/react-context-menu";
|
|
38
|
-
import "react-icons-picker";
|
|
39
|
-
import "react-dom";
|
|
40
|
-
import "react-quill";
|
|
41
|
-
import "./Functions-7jnEwJyw.js";
|
|
42
|
-
import "@chaibuilder/runtime";
|
|
43
|
-
import "tree-model";
|
|
44
|
-
import "lucide-react";
|
|
45
|
-
import "./index-VBXQixVm.js";
|
|
46
|
-
import "prop-types";
|
|
47
|
-
import "react-hotkeys-hook";
|
|
48
|
-
import "@floating-ui/dom";
|
|
49
|
-
import "@floating-ui/react-dom";
|
|
50
|
-
import "flagged";
|
|
51
|
-
import "@tailwindcss/typography";
|
|
52
|
-
import "@tailwindcss/forms";
|
|
53
|
-
import "@tailwindcss/aspect-ratio";
|
|
54
|
-
import "tailwindcss-palette-generator";
|
|
55
|
-
import "./html-to-json-l_mw5y-e.js";
|
|
56
|
-
import "himalaya";
|
|
57
|
-
import "lodash";
|
|
58
|
-
import "react-wrap-balancer";
|
|
59
|
-
import "@rjsf/core";
|
|
60
|
-
import "@rjsf/validator-ajv8";
|
|
61
|
-
import "react-autosuggest";
|
|
62
|
-
import "fuse.js";
|
|
63
|
-
import "./controls-yjgoZzB6.js";
|
|
64
|
-
import "sonner";
|
|
65
|
-
const x = i.lazy(() => import("./add-page-modal-TOfMfmPA.js")), u = i.lazy(() => import("./page-viewer-4wrnWnK0.js")), _t = () => {
|
|
66
|
-
const { data: o = [], isLoading: m } = l(), { data: r } = c(), p = a(d(o, { type: "STATIC" }), (e) => n(e, "uuid") === (r == null ? void 0 : r.homepage) ? 0 : 1);
|
|
67
|
-
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
68
|
-
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: [
|
|
69
|
-
/* @__PURE__ */ t.jsx("h1", { className: "px-1 font-semibold", children: "Pages" }),
|
|
70
|
-
/* @__PURE__ */ t.jsx(s, { fallback: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-blue-500 underline", children: "+ New Page" }), children: /* @__PURE__ */ t.jsx(x, {}) })
|
|
71
|
-
] }),
|
|
72
|
-
/* @__PURE__ */ t.jsx("hr", { className: "-mx-1" }),
|
|
73
|
-
/* @__PURE__ */ t.jsx("div", { className: "-mx-1 divide-y-2", children: /* @__PURE__ */ t.jsx(u, { isLoading: m, pages: p }) })
|
|
74
|
-
] });
|
|
75
|
-
};
|
|
76
|
-
export {
|
|
77
|
-
_t as default
|
|
78
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),i=require("lodash-es"),s=require("./index--k2M8kzI.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./index-5XyNUAjc.cjs");require("i18next");require("react-i18next");require("jotai");require("@react-hookz/web");require("react-arborist");require("./index-aeDphKpP.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("tree-model");require("lucide-react");require("./index--mLLy7QQ.cjs");require("prop-types");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./html-to-json-NqRjgFqp.cjs");require("himalaya");require("lodash");require("react-wrap-balancer");require("@rjsf/core");require("@rjsf/validator-ajv8");require("react-autosuggest");require("fuse.js");require("./controls-rRZhz0vu.cjs");require("sonner");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-RwIj1FxH.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-ra0GLx1p.cjs"))),d=()=>{const{data:q=[],isLoading:t}=s.usePages(),{data:r}=s.useProject(),n=i.sortBy(i.filter(q,{type:"STATIC"}),o=>i.get(o,"uuid")===(r==null?void 0:r.homepage)?0:1);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Pages"}),e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsx("div",{className:"text-sm text-blue-500 underline",children:"+ New Page"}),children:e.jsxRuntimeExports.jsx(a,{})})]}),e.jsxRuntimeExports.jsx("hr",{className:"-mx-1"}),e.jsxRuntimeExports.jsx("div",{className:"-mx-1 divide-y-2",children:e.jsxRuntimeExports.jsx(x,{isLoading:t,pages:n})})]})};exports.default=d;
|