@chaibuilder/sdk 1.0.13 → 1.0.15
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-H7BZYHUC.js → AddBlocks-eoo1CzaK.js} +114 -111
- package/dist/AddBlocks-jU0NwP_s.cjs +3 -0
- package/dist/BrandingOptions-WSCFnWAf.cjs +1 -0
- package/dist/{BrandingOptions-PAgY-kvj.js → BrandingOptions-_Og7VUHA.js} +57 -41
- package/dist/{CanvasArea-zn2ox-5h.js → CanvasArea-cky_d2Lu.js} +517 -519
- package/dist/CanvasArea-hT9uHhkz.cjs +46 -0
- package/dist/Class-RZuPYbUS.cjs +1 -0
- package/dist/{Class-l7qYbuoN.js → Class-nQk08vqd.js} +204 -124
- package/dist/{CurrentPage-6Jp4xAWK.js → CurrentPage--OlBwyNE.js} +58 -40
- package/dist/CurrentPage-x6Ez11gP.cjs +1 -0
- package/dist/Layers-gEA0qWYP.cjs +1 -0
- package/dist/{Layers-WkZ48AUm.js → Layers-uzA3QA-4.js} +158 -141
- package/dist/MarkAsGlobalBlock-lYL8cO9x.cjs +1 -0
- package/dist/MarkAsGlobalBlock-ySc-D4SB.js +84 -0
- package/dist/PagesPanel-5t0bV9T2.cjs +1 -0
- package/dist/PagesPanel-tH6c9Mnv.js +70 -0
- package/dist/ProjectPanel-NdrR6a8t.cjs +1 -0
- package/dist/ProjectPanel-Q2-15-In.js +91 -0
- package/dist/Settings-DBiwm1hY.cjs +1 -0
- package/dist/{Settings-fH8fZKpm.js → Settings-LOqpvQ_1.js} +411 -408
- package/dist/SidePanels-8JWYXGqN.cjs +1 -0
- package/dist/{SidePanels-w8ZHKJaR.js → SidePanels-F7ccs2Xf.js} +106 -88
- package/dist/{Topbar-hm1D_5sb.js → Topbar-lX9OMPwj.js} +47 -45
- package/dist/Topbar-qi5ab8rR.cjs +1 -0
- package/dist/UnsplashImages-a2r7b3kB.cjs +1 -0
- package/dist/{UnsplashImages-gPcBLjgB.js → UnsplashImages-u_QTABzi.js} +56 -44
- package/dist/{UploadImages-_ZyUU66E.js → UploadImages-gV5xDHIu.js} +55 -34
- package/dist/UploadImages-jLQgLujd.cjs +1 -0
- package/dist/add-page-modal-U5ramelz.js +110 -0
- package/dist/add-page-modal-tIt3N8jH.cjs +1 -0
- package/dist/confirm-alert-ZQ-sxX0X.js +58 -0
- package/dist/confirm-alert-z74-fGOT.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +99 -124
- package/dist/delete-page-modal-5XuSfQT0.cjs +1 -0
- package/dist/delete-page-modal-_E87bVUZ.js +89 -0
- package/dist/form-Osm1AmO5.cjs +1 -0
- package/dist/{form-dVpOAyRl.js → form-zZJyZuNH.js} +12 -12
- package/dist/index-2EHcmZqL.js +2947 -0
- package/dist/index-RVm8Txnj.js +1149 -0
- package/dist/index-_jFEo7h5.cjs +206 -0
- package/dist/index-c8zW_D2V.cjs +1 -0
- package/dist/index-cU5eyVRU.js +40872 -0
- package/dist/index-fwo4wa7u.cjs +1 -0
- package/dist/index-gmZcUXyn.js +25 -0
- package/dist/index-m2muA80V.cjs +9 -0
- package/dist/{jsx-runtime-JYMCiFoE.cjs → jsx-runtime-WKRPbKtm.cjs} +7 -7
- package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-qAwJ85SY.js} +109 -106
- package/dist/lib.cjs +2 -1
- package/dist/lib.js +1333 -71
- package/dist/page-viewer-BSc-5M4B.cjs +1 -0
- package/dist/{page-viewer-Y4YiaZ_m.js → page-viewer-nLqIs_9w.js} +62 -44
- package/dist/project-general-setting-14MA_cX5.cjs +1 -0
- package/dist/{project-general-setting-U4S_KlhU.js → project-general-setting-kXh5myAr.js} +46 -36
- package/dist/project-seo-setting-POGPEJZ8.cjs +1 -0
- package/dist/project-seo-setting-nT1qo1Bb.js +89 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +23 -19
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/dist/single-page-detail-EgQd9TSA.cjs +1 -0
- package/dist/{single-page-detail-pAxCy_Pe.js → single-page-detail-fV-A6vJR.js} +90 -80
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +45 -25
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +156 -357
- package/package.json +1 -1
- package/dist/AddBlocks-7ACJv8LW.cjs +0 -3
- package/dist/BrandingOptions-5j-XszLM.cjs +0 -1
- package/dist/CanvasArea-Dnm-yeus.cjs +0 -46
- package/dist/ChaiBuilderEditor-BoE-sArB.cjs +0 -163
- package/dist/ChaiBuilderEditor-hEuUONQ3.js +0 -27094
- package/dist/Class-_uCzl5v1.cjs +0 -1
- package/dist/CurrentPage-YMpqOqx7.cjs +0 -1
- package/dist/ImagesPanel-6us7hiLN.cjs +0 -1
- package/dist/ImagesPanel-oaHOD-Ex.js +0 -27
- package/dist/Layers-EzOZdWvd.cjs +0 -1
- package/dist/MODIFIERS-DsEzQ3aH.js +0 -73
- package/dist/MODIFIERS-Fx6WAZcw.cjs +0 -1
- package/dist/MarkAsGlobalBlock-0HubcRkY.js +0 -77
- package/dist/MarkAsGlobalBlock-HmeIyLCP.cjs +0 -1
- package/dist/PagesPanel-6JuwBLFQ.js +0 -50
- package/dist/PagesPanel-zJq8p1ja.cjs +0 -1
- package/dist/ProjectPanel-Zml2F8b9.cjs +0 -1
- package/dist/ProjectPanel-cu2QSDW9.js +0 -73
- package/dist/Settings-lc9PfnmG.cjs +0 -1
- package/dist/SidePanels-VH72zFE2.cjs +0 -1
- package/dist/Topbar-vQPo9xSY.cjs +0 -1
- package/dist/UnsplashImages-BoBBSi1a.cjs +0 -1
- package/dist/UploadImages-T6kW0s3G.cjs +0 -1
- package/dist/accordion-oPUeqPCZ.js +0 -42
- package/dist/accordion-ynvFtV_p.cjs +0 -1
- package/dist/add-page-modal--qZSwJuB.cjs +0 -1
- package/dist/add-page-modal-bj7qbZuK.js +0 -99
- package/dist/alert-dialog-GNfnpqFB.js +0 -64
- package/dist/alert-dialog-Mv0-wAvS.cjs +0 -1
- package/dist/command-ThdTuUxt.cjs +0 -1
- package/dist/command-VHca6CcN.js +0 -97
- package/dist/confirm-alert-8EHe0OOd.cjs +0 -1
- package/dist/confirm-alert-b0e_BLhF.js +0 -36
- package/dist/context-menu-8dC9uGXj.js +0 -122
- package/dist/context-menu-IgLbIuth.cjs +0 -1
- package/dist/controls-Ni5kEzLz.js +0 -103
- package/dist/controls-W97-POR_.cjs +0 -1
- package/dist/controls-enQY7NI8.js +0 -118
- package/dist/controls-xUKa23ic.cjs +0 -1
- package/dist/delete-page-modal-2LuDLEiP.cjs +0 -1
- package/dist/delete-page-modal-cnrR8tWH.js +0 -69
- package/dist/dialog-S_QbL1iq.cjs +0 -1
- package/dist/dialog-jrw9DF1f.js +0 -65
- package/dist/dropdown-menu-S03K_fNs.js +0 -164
- package/dist/dropdown-menu-sMXR59cB.cjs +0 -1
- package/dist/form-nRAvKPQj.cjs +0 -1
- package/dist/functions-nNTuSTsR.js +0 -1106
- package/dist/functions-pcUZhFJM.js +0 -12
- package/dist/functions-sCuB7nvZ.cjs +0 -2
- package/dist/functions-uw7QP2kT.cjs +0 -1
- package/dist/html-to-json-P6GpbcQX.cjs +0 -1
- package/dist/html-to-json-pdHQfRkN.js +0 -178
- package/dist/index-HAue58ea.cjs +0 -1
- package/dist/index-T4_wfKl5.js +0 -2256
- package/dist/index-X9ZgD09V.cjs +0 -1
- package/dist/index-ehKdBRUK.js +0 -18
- package/dist/label-KaP7MRrs.js +0 -10
- package/dist/label-tFm8HZdb.cjs +0 -1
- package/dist/link-6o6n2Tnd.js +0 -204
- package/dist/link-ece8dZGH.cjs +0 -1
- package/dist/page-viewer-IARz6OSp.cjs +0 -1
- package/dist/popover-a84pbVhQ.js +0 -23
- package/dist/popover-fKjgcRUx.cjs +0 -1
- package/dist/project-general-setting-eSl3t-VH.cjs +0 -1
- package/dist/project-seo-setting-Ga9v_ECU.js +0 -67
- package/dist/project-seo-setting-rankm1z3.cjs +0 -1
- package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
- package/dist/scroll-area-ewXbxc3n.js +0 -30
- package/dist/select-7bjg-rr9.cjs +0 -1
- package/dist/select-POGdEDHT.js +0 -75
- package/dist/separator-3Civ-6hb.cjs +0 -1
- package/dist/separator-SctTn0Qi.js +0 -18
- package/dist/single-page-detail-yPgnu2AI.cjs +0 -1
- package/dist/skeleton-CU_FIbg3.js +0 -239
- package/dist/skeleton-JHP9zwL2.cjs +0 -1
- package/dist/tabs-Gb9v5dVb.js +0 -46
- package/dist/tabs-iWeaaVrg.cjs +0 -1
- package/dist/textarea-1kZEh7ki.cjs +0 -1
- package/dist/textarea-b2QvVhrK.js +0 -73
- package/dist/toggle-ASJRAaGP.js +0 -30
- package/dist/toggle-ehNIPmme.cjs +0 -1
- package/dist/useAddBlock-WJc3OgG8.js +0 -86
- package/dist/useAddBlock-dCKRFPRU.cjs +0 -1
- package/dist/useAllBlocks-6hvuNuyw.cjs +0 -1
- package/dist/useAllBlocks-PQKYvs-e.js +0 -20
- package/dist/useChaiExternalData-4K9WxANa.js +0 -6
- package/dist/useChaiExternalData-DkyBJ81C.cjs +0 -1
- package/dist/useDarkMode-ZKCO_gkt.js +0 -23
- package/dist/useDarkMode-dV6FM6l-.cjs +0 -1
- package/dist/useFeatureSupport-OLwNgEZb.js +0 -16
- package/dist/useFeatureSupport-c9IgPW2t.cjs +0 -1
- package/dist/useHiddenBlocks-3MsGOJ1s.js +0 -15
- package/dist/useHiddenBlocks-oJuQDmTy.cjs +0 -1
- package/dist/useLanguage-NKKKaxVM.cjs +0 -1
- package/dist/useLanguage-gVC5rxO5.js +0 -216
- package/dist/useMarkAsGlobalBlock-X73Vny8u.js +0 -25
- package/dist/useMarkAsGlobalBlock-ebBVGHg4.cjs +0 -1
- package/dist/useUiLibraries-4hPOi8DI.js +0 -12
- package/dist/useUiLibraries-9FhQCpKo.cjs +0 -1
- package/dist/utils-dze1SGvB.js +0 -6
- package/dist/utils-qK_SjzzV.cjs +0 -1
|
@@ -1,44 +1,61 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-qAwJ85SY.js";
|
|
2
2
|
import { nth as k, startsWith as P, has as H, map as v, isUndefined as L, find as V, isEmpty as z, includes as F } from "lodash";
|
|
3
|
-
import { BoxModelIcon as G, BoxIcon as $, DragHandleHorizontalIcon as K, ViewHorizontalIcon as q, BorderAllIcon as Q, BorderTopIcon as U, TableIcon as Y, DropdownMenuIcon as W, RadiobuttonIcon as
|
|
4
|
-
import { useDrop as
|
|
3
|
+
import { BoxModelIcon as G, BoxIcon as $, DragHandleHorizontalIcon as K, ViewHorizontalIcon as q, BorderAllIcon as Q, BorderTopIcon as U, TableIcon as Y, DropdownMenuIcon as W, RadiobuttonIcon as Z, InputIcon as J, ButtonIcon as B, CheckboxIcon as X, GroupIcon as ee, SpaceBetweenVerticallyIcon as te, ColumnsIcon as se, RowsIcon as y, TextIcon as C, SketchLogoIcon as oe, DividerHorizontalIcon as ne, CodeIcon as re, CursorTextIcon as ae, VideoIcon as ce, Link1Icon as le, HeadingIcon as ie, ImageIcon as de, TriangleRightIcon as xe, ScissorsIcon as me, ClipboardIcon as pe, TrashIcon as ue, GlobeIcon as ge, CopyIcon as je, ClipboardCopyIcon as he, DoubleArrowDownIcon as be, StackIcon as fe } from "@radix-ui/react-icons";
|
|
4
|
+
import { useDrop as Ie, useDragLayer as ke } from "react-dnd";
|
|
5
5
|
import { useDragOver as Be, Tree as ye } from "@minoru/react-dnd-treeview";
|
|
6
6
|
import { useTranslation as Ce } from "react-i18next";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { S as Ke } from "./MODIFIERS-DsEzQ3aH.js";
|
|
14
|
-
import { D as qe, b as Qe } from "./dialog-jrw9DF1f.js";
|
|
15
|
-
import { C as Ue, a as Ye, b as We, c as d } from "./context-menu-8dC9uGXj.js";
|
|
16
|
-
import { u as T } from "./skeleton-CU_FIbg3.js";
|
|
17
|
-
import { S as Je } from "./scroll-area-ewXbxc3n.js";
|
|
7
|
+
import { _ as ve, Z as we, j as g, n as Se, bq as d, k as Te, l as De, a6 as Ne, m as Me, o as Oe, i as w, br as Re, ao as Ee, ap as Ae, bs as _e, bt as Pe, O as He, ae as Le, w as Ve, aj as ze, p as Fe, aA as Ge, bp as $e, bu as Ke } from "./index-2EHcmZqL.js";
|
|
8
|
+
import { DatabaseIcon as qe } from "lucide-react";
|
|
9
|
+
import "./lib.js";
|
|
10
|
+
import { useMemo as Qe, lazy as Ue, useCallback as S, useState as Ye, Suspense as We } from "react";
|
|
11
|
+
import { a as Ze, b as T } from "./Class-nQk08vqd.js";
|
|
12
|
+
import { f as Je } from "./index-cU5eyVRU.js";
|
|
18
13
|
import { useAtom as Xe } from "jotai";
|
|
19
|
-
import
|
|
20
|
-
import "
|
|
14
|
+
import "@radix-ui/react-toggle";
|
|
15
|
+
import "class-variance-authority";
|
|
16
|
+
import "@radix-ui/react-switch";
|
|
17
|
+
import "@radix-ui/react-slot";
|
|
18
|
+
import "@radix-ui/react-accordion";
|
|
19
|
+
import "@radix-ui/react-alert-dialog";
|
|
20
|
+
import "@radix-ui/react-dialog";
|
|
21
|
+
import "@radix-ui/react-label";
|
|
21
22
|
import "@radix-ui/react-scroll-area";
|
|
23
|
+
import "@radix-ui/react-tabs";
|
|
24
|
+
import "@radix-ui/react-tooltip";
|
|
25
|
+
import "@radix-ui/react-popover";
|
|
26
|
+
import "@radix-ui/react-menubar";
|
|
27
|
+
import "@radix-ui/react-hover-card";
|
|
28
|
+
import "@radix-ui/react-select";
|
|
29
|
+
import "@radix-ui/react-dropdown-menu";
|
|
30
|
+
import "@radix-ui/react-separator";
|
|
31
|
+
import "@radix-ui/react-toast";
|
|
32
|
+
import "cmdk";
|
|
33
|
+
import "@radix-ui/react-context-menu";
|
|
34
|
+
import "react-icons-picker";
|
|
22
35
|
import "react-dom";
|
|
23
|
-
import "
|
|
24
|
-
import "i18next";
|
|
25
|
-
import "flagged";
|
|
26
|
-
import "react-hotkeys-hook";
|
|
36
|
+
import "react-quill";
|
|
27
37
|
import "flat-to-nested";
|
|
28
|
-
import "./functions-pcUZhFJM.js";
|
|
29
38
|
import "redux-undo";
|
|
39
|
+
import "./index-gmZcUXyn.js";
|
|
30
40
|
import "@react-hookz/web";
|
|
31
|
-
import "
|
|
41
|
+
import "himalaya";
|
|
42
|
+
import "@mhsdesign/jit-browser-tailwindcss";
|
|
43
|
+
import "@bobthered/tailwindcss-palette-generator";
|
|
44
|
+
import "@tailwindcss/forms";
|
|
45
|
+
import "@tailwindcss/typography";
|
|
46
|
+
import "@tailwindcss/aspect-ratio";
|
|
47
|
+
import "@tailwindcss/line-clamp";
|
|
48
|
+
import "clsx";
|
|
32
49
|
import "tailwind-merge";
|
|
33
|
-
import "
|
|
34
|
-
import "
|
|
35
|
-
import "@
|
|
36
|
-
import "
|
|
37
|
-
import "
|
|
38
|
-
import "
|
|
39
|
-
import "
|
|
40
|
-
const D = (
|
|
41
|
-
switch (
|
|
50
|
+
import "i18next";
|
|
51
|
+
import "./index-RVm8Txnj.js";
|
|
52
|
+
import "@floating-ui/react-dom";
|
|
53
|
+
import "react-textarea-autosize";
|
|
54
|
+
import "flagged";
|
|
55
|
+
import "react-hotkeys-hook";
|
|
56
|
+
import "sonner";
|
|
57
|
+
const D = (t) => {
|
|
58
|
+
switch (t.type) {
|
|
42
59
|
case "Image":
|
|
43
60
|
return /* @__PURE__ */ e.jsx(de, {});
|
|
44
61
|
case "Heading":
|
|
@@ -66,20 +83,20 @@ const D = (s) => {
|
|
|
66
83
|
case "Row":
|
|
67
84
|
return /* @__PURE__ */ e.jsx(y, {});
|
|
68
85
|
case "ListItem":
|
|
69
|
-
return /* @__PURE__ */ e.jsx(te, {});
|
|
70
|
-
case "LineBreak":
|
|
71
86
|
return /* @__PURE__ */ e.jsx(se, {});
|
|
87
|
+
case "LineBreak":
|
|
88
|
+
return /* @__PURE__ */ e.jsx(te, {});
|
|
72
89
|
case "Form":
|
|
73
90
|
return /* @__PURE__ */ e.jsx(ee, {});
|
|
74
91
|
case "Checkbox":
|
|
75
|
-
return /* @__PURE__ */ e.jsx(
|
|
92
|
+
return /* @__PURE__ */ e.jsx(X, {});
|
|
76
93
|
case "FormButton":
|
|
77
94
|
return /* @__PURE__ */ e.jsx(B, {});
|
|
78
95
|
case "Input":
|
|
79
96
|
case "TextArea":
|
|
80
|
-
return /* @__PURE__ */ e.jsx(X, {});
|
|
81
|
-
case "Radio":
|
|
82
97
|
return /* @__PURE__ */ e.jsx(J, {});
|
|
98
|
+
case "Radio":
|
|
99
|
+
return /* @__PURE__ */ e.jsx(Z, {});
|
|
83
100
|
case "Select":
|
|
84
101
|
return /* @__PURE__ */ e.jsx(W, {});
|
|
85
102
|
case "Table":
|
|
@@ -93,15 +110,15 @@ const D = (s) => {
|
|
|
93
110
|
case "TableCell":
|
|
94
111
|
return /* @__PURE__ */ e.jsx(K, {});
|
|
95
112
|
case "DataProvider":
|
|
96
|
-
return /* @__PURE__ */ e.jsx(
|
|
113
|
+
return /* @__PURE__ */ e.jsx(qe, { size: 16 });
|
|
97
114
|
case "Box":
|
|
98
115
|
return /* @__PURE__ */ e.jsx($, {});
|
|
99
116
|
default:
|
|
100
117
|
return /* @__PURE__ */ e.jsx(G, {});
|
|
101
118
|
}
|
|
102
119
|
};
|
|
103
|
-
function
|
|
104
|
-
const
|
|
120
|
+
function et(t = "") {
|
|
121
|
+
const s = {
|
|
105
122
|
xs: "390px",
|
|
106
123
|
sm: "640px",
|
|
107
124
|
md: "768px",
|
|
@@ -109,67 +126,67 @@ function es(s = "") {
|
|
|
109
126
|
xl: "1366px",
|
|
110
127
|
"2xl": "1536px"
|
|
111
128
|
};
|
|
112
|
-
if (new RegExp(/\bsr-only\b/).test(
|
|
129
|
+
if (new RegExp(/\bsr-only\b/).test(t))
|
|
113
130
|
return "Sr Only";
|
|
114
|
-
if (new RegExp(/\b(sm|md|lg|xl|2xl):hidden\b/).test(
|
|
131
|
+
if (new RegExp(/\b(sm|md|lg|xl|2xl):hidden\b/).test(t))
|
|
115
132
|
return "Visible on mobile";
|
|
116
|
-
if (
|
|
133
|
+
if (t.match(/(^| )hidden( |$)/g)) {
|
|
117
134
|
const a = new RegExp(
|
|
118
135
|
// checks if any of the display property is set for any higher media query
|
|
119
136
|
/\b(sm|md|lg|xl|2xl):(block|grid|flex|inline|inline-grid|inline-flex|inline-block)\b/
|
|
120
|
-
), c =
|
|
137
|
+
), c = t.match(a);
|
|
121
138
|
if (k(c, 1))
|
|
122
|
-
return `Visible >=${
|
|
139
|
+
return `Visible >=${s[k(c, 1)]}`;
|
|
123
140
|
}
|
|
124
141
|
return "";
|
|
125
142
|
}
|
|
126
|
-
const
|
|
127
|
-
let
|
|
128
|
-
return Object.keys(
|
|
129
|
-
P(
|
|
130
|
-
}),
|
|
131
|
-
},
|
|
132
|
-
var
|
|
133
|
-
const [,
|
|
134
|
-
i.stopPropagation(),
|
|
135
|
-
}, j = Be(a,
|
|
136
|
-
const i =
|
|
137
|
-
return
|
|
138
|
-
}, [
|
|
143
|
+
const tt = (t) => {
|
|
144
|
+
let s = "";
|
|
145
|
+
return Object.keys(t).forEach((o) => {
|
|
146
|
+
P(t[o], Ze) && (s = t[o]);
|
|
147
|
+
}), s;
|
|
148
|
+
}, st = (t) => {
|
|
149
|
+
var p;
|
|
150
|
+
const [, s] = ve(), [o] = we(), { isSelected: r } = t, { id: a, data: c } = t.node, l = t.depth * 10, x = (i) => {
|
|
151
|
+
i.stopPropagation(), t.onToggle(t.node.id);
|
|
152
|
+
}, j = Be(a, t.isOpen, t.onToggle), m = Qe(() => {
|
|
153
|
+
const i = tt(t.node.data);
|
|
154
|
+
return et(i);
|
|
155
|
+
}, [t.node.data]);
|
|
139
156
|
return (
|
|
140
157
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
141
158
|
/* @__PURE__ */ e.jsx(
|
|
142
159
|
"div",
|
|
143
160
|
{
|
|
144
|
-
onMouseEnter: () =>
|
|
145
|
-
className:
|
|
161
|
+
onMouseEnter: () => s(a),
|
|
162
|
+
className: T(
|
|
146
163
|
"group flex w-full items-center justify-between space-x-px py-px ",
|
|
147
164
|
r ? "bg-blue-500 text-white" : "hover:bg-gray-200 dark:hover:bg-gray-800"
|
|
148
165
|
),
|
|
149
166
|
onClick: (i) => {
|
|
150
|
-
i.stopPropagation(), !o.includes(a) &&
|
|
167
|
+
i.stopPropagation(), !o.includes(a) && t.onSelect(a);
|
|
151
168
|
},
|
|
152
|
-
onContextMenu: () =>
|
|
169
|
+
onContextMenu: () => t.onSelect(a),
|
|
153
170
|
style: { paddingInlineStart: l },
|
|
154
171
|
...j,
|
|
155
172
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
156
173
|
/* @__PURE__ */ e.jsx(
|
|
157
174
|
"div",
|
|
158
175
|
{
|
|
159
|
-
className: `flex h-4 w-4 rotate-0 transform cursor-pointer items-center justify-center text-xs transition-transform duration-100 ${
|
|
160
|
-
children:
|
|
176
|
+
className: `flex h-4 w-4 rotate-0 transform cursor-pointer items-center justify-center text-xs transition-transform duration-100 ${t.isOpen ? "rotate-90" : ""}`,
|
|
177
|
+
children: t.node.droppable && /* @__PURE__ */ e.jsx("button", { onClick: x, type: "button", children: /* @__PURE__ */ e.jsx(xe, {}) })
|
|
161
178
|
}
|
|
162
179
|
),
|
|
163
180
|
/* @__PURE__ */ e.jsxs("button", { type: "button", className: "flex items-center", children: [
|
|
164
181
|
/* @__PURE__ */ e.jsx("div", { className: "-mt-1 h-3 w-3", children: /* @__PURE__ */ e.jsx(D, { type: c == null ? void 0 : c._type }) }),
|
|
165
|
-
/* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: ((
|
|
166
|
-
|
|
182
|
+
/* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: ((p = t.node.data) == null ? void 0 : p._name) || t.node.text }),
|
|
183
|
+
m ? /* @__PURE__ */ e.jsxs(
|
|
167
184
|
"span",
|
|
168
185
|
{
|
|
169
186
|
className: "ml-2 flex items-center text-[10px] italic " + (r ? "text-gray-200" : "text-gray-500"),
|
|
170
187
|
children: [
|
|
171
188
|
"(",
|
|
172
|
-
|
|
189
|
+
m,
|
|
173
190
|
")"
|
|
174
191
|
]
|
|
175
192
|
}
|
|
@@ -179,136 +196,136 @@ const ss = (s) => {
|
|
|
179
196
|
}
|
|
180
197
|
)
|
|
181
198
|
);
|
|
182
|
-
},
|
|
199
|
+
}, ot = (t) => {
|
|
183
200
|
var o;
|
|
184
|
-
const { item:
|
|
201
|
+
const { item: s } = t.monitorProps;
|
|
185
202
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex w-max items-center bg-blue-200 bg-opacity-30 p-1 font-semibold text-blue-700", children: [
|
|
186
|
-
/* @__PURE__ */ e.jsx("div", { className: "", children: /* @__PURE__ */ e.jsx(D, { type: (o =
|
|
187
|
-
/* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children:
|
|
203
|
+
/* @__PURE__ */ e.jsx("div", { className: "", children: /* @__PURE__ */ e.jsx(D, { type: (o = s == null ? void 0 : s.data) == null ? void 0 : o._type }) }),
|
|
204
|
+
/* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: s.text })
|
|
188
205
|
] });
|
|
189
|
-
},
|
|
190
|
-
const
|
|
191
|
-
return /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-0 h-0.5 -translate-y-1/2 transform bg-green-500", style: { left:
|
|
192
|
-
},
|
|
193
|
-
const [
|
|
194
|
-
return /* @__PURE__ */ e.jsxs(d, { className: "flex items-center gap-x-4 text-xs", onClick: () => t
|
|
195
|
-
/* @__PURE__ */ e.jsx(
|
|
206
|
+
}, nt = (t) => {
|
|
207
|
+
const s = t.depth * 10 + 16;
|
|
208
|
+
return /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-0 h-0.5 -translate-y-1/2 transform bg-green-500", style: { left: s } });
|
|
209
|
+
}, rt = Ue(() => import("./MarkAsGlobalBlock-ySc-D4SB.js")), at = () => {
|
|
210
|
+
const [t] = g(), [, s] = Se();
|
|
211
|
+
return /* @__PURE__ */ e.jsxs(d, { className: "flex items-center gap-x-4 text-xs", onClick: () => s(t), children: [
|
|
212
|
+
/* @__PURE__ */ e.jsx(me, {}),
|
|
196
213
|
" Cut"
|
|
197
214
|
] });
|
|
198
|
-
},
|
|
199
|
-
const [
|
|
200
|
-
return /* @__PURE__ */ e.jsxs(d, { className: "flex items-center gap-x-4 text-xs", onClick: () => t
|
|
201
|
-
/* @__PURE__ */ e.jsx(
|
|
215
|
+
}, ct = () => {
|
|
216
|
+
const [t] = g(), [, s] = Te();
|
|
217
|
+
return /* @__PURE__ */ e.jsxs(d, { className: "flex items-center gap-x-4 text-xs", onClick: () => s(t), children: [
|
|
218
|
+
/* @__PURE__ */ e.jsx(pe, {}),
|
|
202
219
|
" Copy"
|
|
203
220
|
] });
|
|
204
|
-
},
|
|
205
|
-
const [
|
|
221
|
+
}, lt = () => {
|
|
222
|
+
const [t] = g(), s = De(), o = Ne();
|
|
206
223
|
return /* @__PURE__ */ e.jsxs(
|
|
207
224
|
d,
|
|
208
225
|
{
|
|
209
226
|
disabled: (o == null ? void 0 : o._type) === "Slot",
|
|
210
227
|
className: "flex items-center gap-x-4 text-xs",
|
|
211
|
-
onClick: () => t
|
|
228
|
+
onClick: () => s(t),
|
|
212
229
|
children: [
|
|
213
|
-
/* @__PURE__ */ e.jsx(
|
|
230
|
+
/* @__PURE__ */ e.jsx(ue, {}),
|
|
214
231
|
" Remove"
|
|
215
232
|
]
|
|
216
233
|
}
|
|
217
234
|
);
|
|
218
|
-
},
|
|
219
|
-
id:
|
|
220
|
-
openMarkAsGlobalModal:
|
|
235
|
+
}, it = ({
|
|
236
|
+
id: t = null,
|
|
237
|
+
openMarkAsGlobalModal: s
|
|
221
238
|
}) => {
|
|
222
|
-
const [o] = g(), r =
|
|
239
|
+
const [o] = g(), r = Me(), { pasteBlocks: a, canPaste: c } = Oe(), l = w("globalBlocksSupport", !1), x = S(() => {
|
|
223
240
|
r(o);
|
|
224
241
|
}, [o, r]);
|
|
225
|
-
return /* @__PURE__ */ e.jsxs(
|
|
226
|
-
l && /* @__PURE__ */ e.jsx(d, { className: "flex items-center gap-x-4 border-b text-xs", onClick:
|
|
227
|
-
/* @__PURE__ */ e.jsx(
|
|
242
|
+
return /* @__PURE__ */ e.jsxs(Re, { className: "text-xs", children: [
|
|
243
|
+
l && /* @__PURE__ */ e.jsx(d, { className: "flex items-center gap-x-4 border-b text-xs", onClick: s, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-4", children: [
|
|
244
|
+
/* @__PURE__ */ e.jsx(ge, {}),
|
|
228
245
|
" Mark as global"
|
|
229
246
|
] }) }),
|
|
230
247
|
/* @__PURE__ */ e.jsxs(d, { className: "flex items-center gap-x-4 text-xs", onClick: x, children: [
|
|
231
|
-
/* @__PURE__ */ e.jsx(
|
|
248
|
+
/* @__PURE__ */ e.jsx(je, {}),
|
|
232
249
|
" Duplicate"
|
|
233
250
|
] }),
|
|
234
|
-
/* @__PURE__ */ e.jsx(
|
|
235
|
-
/* @__PURE__ */ e.jsx(
|
|
251
|
+
/* @__PURE__ */ e.jsx(at, {}),
|
|
252
|
+
/* @__PURE__ */ e.jsx(ct, {}),
|
|
236
253
|
/* @__PURE__ */ e.jsxs(
|
|
237
254
|
d,
|
|
238
255
|
{
|
|
239
256
|
className: "flex items-center gap-x-4 text-xs",
|
|
240
|
-
onClick: () => a(
|
|
257
|
+
onClick: () => a(t),
|
|
241
258
|
disabled: !c,
|
|
242
259
|
children: [
|
|
243
|
-
/* @__PURE__ */ e.jsx(
|
|
260
|
+
/* @__PURE__ */ e.jsx(he, {}),
|
|
244
261
|
" Paste"
|
|
245
262
|
]
|
|
246
263
|
}
|
|
247
264
|
),
|
|
248
|
-
/* @__PURE__ */ e.jsx(
|
|
265
|
+
/* @__PURE__ */ e.jsx(lt, {})
|
|
249
266
|
] });
|
|
250
|
-
},
|
|
251
|
-
const [o, r] =
|
|
267
|
+
}, dt = ({ children: t, id: s = null }) => {
|
|
268
|
+
const [o, r] = Ye(!1);
|
|
252
269
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
253
|
-
/* @__PURE__ */ e.jsx(
|
|
254
|
-
/* @__PURE__ */ e.jsxs(
|
|
255
|
-
/* @__PURE__ */ e.jsx(
|
|
256
|
-
/* @__PURE__ */ e.jsx(
|
|
270
|
+
/* @__PURE__ */ e.jsx(Ee, { open: o, onOpenChange: r, children: o && /* @__PURE__ */ e.jsx(Ae, { children: /* @__PURE__ */ e.jsx(We, { fallback: /* @__PURE__ */ e.jsx("div", { className: "h-96 w-full animate-pulse bg-gray-200" }), children: /* @__PURE__ */ e.jsx(rt, { closeModal: () => r(!1), id: s }) }) }) }),
|
|
271
|
+
/* @__PURE__ */ e.jsxs(_e, { children: [
|
|
272
|
+
/* @__PURE__ */ e.jsx(Pe, { children: t }),
|
|
273
|
+
/* @__PURE__ */ e.jsx(it, { id: s, openMarkAsGlobalModal: () => r(!0) })
|
|
257
274
|
] })
|
|
258
275
|
] });
|
|
259
|
-
},
|
|
260
|
-
const { addCoreBlock:
|
|
276
|
+
}, xt = () => {
|
|
277
|
+
const { addCoreBlock: t } = He(), s = w("getExternalPredefinedBlock");
|
|
261
278
|
return S(
|
|
262
279
|
async (o) => {
|
|
263
280
|
const { block: r, dropTargetId: a, relativeIndex: c } = o;
|
|
264
281
|
if (H(r, "format")) {
|
|
265
|
-
const l = await
|
|
266
|
-
return
|
|
282
|
+
const l = await s(r);
|
|
283
|
+
return t({ blocks: l }, a === 0 ? null : a, c);
|
|
267
284
|
}
|
|
268
|
-
return
|
|
285
|
+
return t(r, a === 0 ? null : a, c);
|
|
269
286
|
},
|
|
270
|
-
[
|
|
287
|
+
[t]
|
|
271
288
|
);
|
|
272
289
|
};
|
|
273
|
-
function
|
|
274
|
-
return v(
|
|
275
|
-
const { data: o } =
|
|
290
|
+
function mt(t) {
|
|
291
|
+
return v(t, (s) => {
|
|
292
|
+
const { data: o } = s;
|
|
276
293
|
return {
|
|
277
294
|
...o,
|
|
278
|
-
_parent:
|
|
295
|
+
_parent: s.parent === 0 ? null : s.parent
|
|
279
296
|
};
|
|
280
297
|
});
|
|
281
298
|
}
|
|
282
|
-
const
|
|
283
|
-
const
|
|
284
|
-
const { dragSource:
|
|
285
|
-
|
|
299
|
+
const gs = () => {
|
|
300
|
+
const t = Le(), [s] = Ve(), [o, r, a] = g(), [, c] = ze(), { t: l } = Ce(), { createSnapshot: x } = Fe(), j = Je(), m = xt(), [, p] = Xe(Ge), i = async (n, u) => {
|
|
301
|
+
const { dragSource: b, destinationIndex: f, relativeIndex: I, dropTargetId: E, monitor: A } = u, _ = mt(n);
|
|
302
|
+
s(_), b ? x() : (await m({
|
|
286
303
|
block: A.getItem(),
|
|
287
304
|
dropTargetId: E,
|
|
288
|
-
destinationIndex:
|
|
289
|
-
relativeIndex:
|
|
290
|
-
}),
|
|
291
|
-
}, N = v(
|
|
305
|
+
destinationIndex: f,
|
|
306
|
+
relativeIndex: I
|
|
307
|
+
}), p(!1));
|
|
308
|
+
}, N = v(t, (n) => ({
|
|
292
309
|
id: n._id,
|
|
293
310
|
text: n._type,
|
|
294
311
|
parent: n._parent || 0,
|
|
295
|
-
droppable: !L(V(
|
|
312
|
+
droppable: !L(V(t, { _parent: n._id })),
|
|
296
313
|
data: n
|
|
297
314
|
})), M = () => {
|
|
298
315
|
r([]), c([]);
|
|
299
|
-
}, [{ isOver: h }, O] =
|
|
316
|
+
}, [{ isOver: h }, O] = Ie(() => ({
|
|
300
317
|
accept: ["CHAI_BLOCK"],
|
|
301
318
|
collect: (n) => ({
|
|
302
319
|
canDrop: n.canDrop(),
|
|
303
320
|
isOver: n.isOver()
|
|
304
321
|
}),
|
|
305
322
|
drop: (n) => {
|
|
306
|
-
(async () => (await
|
|
323
|
+
(async () => (await m({
|
|
307
324
|
block: n,
|
|
308
325
|
dropTargetId: "",
|
|
309
326
|
destinationIndex: 0,
|
|
310
327
|
relativeIndex: 0
|
|
311
|
-
}),
|
|
328
|
+
}), p(!1)))();
|
|
312
329
|
}
|
|
313
330
|
})), { isDragging: R } = ke((n) => ({
|
|
314
331
|
isDragging: n.isDragging()
|
|
@@ -317,42 +334,42 @@ const Xs = () => {
|
|
|
317
334
|
"div",
|
|
318
335
|
{
|
|
319
336
|
onClick: () => M(),
|
|
320
|
-
className:
|
|
337
|
+
className: T(
|
|
321
338
|
"-mx-1 -mt-1 flex h-full select-none flex-col space-y-1",
|
|
322
339
|
R ? "bg-green-50/80" : "bg-background"
|
|
323
340
|
),
|
|
324
|
-
children: z(
|
|
341
|
+
children: z(t) ? /* @__PURE__ */ e.jsxs(
|
|
325
342
|
"div",
|
|
326
343
|
{
|
|
327
344
|
ref: O,
|
|
328
345
|
className: `mx-1 mt-4 max-w-full h-full p-6 text-center text-sm text-gray-400 ${h ? "bg-blue-200" : ""}`,
|
|
329
346
|
children: [
|
|
330
|
-
h ? /* @__PURE__ */ e.jsx(
|
|
347
|
+
h ? /* @__PURE__ */ e.jsx(be, { className: "mx-auto h-12 w-12 animate-bounce" }) : /* @__PURE__ */ e.jsx(fe, { className: "mx-auto h-10 w-10" }),
|
|
331
348
|
/* @__PURE__ */ e.jsx("p", { className: "mt-2", children: l(h ? "drop_here_message" : "tree_view_no_blocks") })
|
|
332
349
|
]
|
|
333
350
|
}
|
|
334
|
-
) : /* @__PURE__ */ e.jsx(
|
|
351
|
+
) : /* @__PURE__ */ e.jsx($e, { id: "layers-view", className: "no-scrollbar h-full overflow-y-auto p-1", children: /* @__PURE__ */ e.jsx(
|
|
335
352
|
ye,
|
|
336
353
|
{
|
|
337
354
|
initialOpen: j,
|
|
338
355
|
extraAcceptTypes: ["CHAI_BLOCK"],
|
|
339
356
|
tree: N,
|
|
340
357
|
rootId: 0,
|
|
341
|
-
render: (n, { depth:
|
|
342
|
-
|
|
358
|
+
render: (n, { depth: u, isOpen: b, onToggle: f }) => /* @__PURE__ */ e.jsx(dt, { id: n.id, children: /* @__PURE__ */ e.jsx(
|
|
359
|
+
st,
|
|
343
360
|
{
|
|
344
|
-
onSelect: (
|
|
345
|
-
c([]), r([
|
|
361
|
+
onSelect: (I) => {
|
|
362
|
+
c([]), r([I]);
|
|
346
363
|
},
|
|
347
364
|
isSelected: F(o, n.id),
|
|
348
365
|
node: n,
|
|
349
|
-
depth:
|
|
350
|
-
isOpen:
|
|
351
|
-
onToggle:
|
|
366
|
+
depth: u,
|
|
367
|
+
isOpen: b,
|
|
368
|
+
onToggle: f,
|
|
352
369
|
toggleIds: a
|
|
353
370
|
}
|
|
354
371
|
) }),
|
|
355
|
-
dragPreviewRender: (n) => /* @__PURE__ */ e.jsx(
|
|
372
|
+
dragPreviewRender: (n) => /* @__PURE__ */ e.jsx(ot, { monitorProps: n }),
|
|
356
373
|
onDrop: i,
|
|
357
374
|
classes: {
|
|
358
375
|
root: "h-full pt-2",
|
|
@@ -362,15 +379,15 @@ const Xs = () => {
|
|
|
362
379
|
},
|
|
363
380
|
sort: !1,
|
|
364
381
|
insertDroppableFirst: !1,
|
|
365
|
-
canDrop:
|
|
382
|
+
canDrop: Ke,
|
|
366
383
|
dropTargetOffset: 2,
|
|
367
384
|
enableAnimateExpand: !0,
|
|
368
|
-
placeholderRender: (n, { depth:
|
|
385
|
+
placeholderRender: (n, { depth: u }) => /* @__PURE__ */ e.jsx(nt, { node: n, depth: u })
|
|
369
386
|
}
|
|
370
387
|
) })
|
|
371
388
|
}
|
|
372
389
|
) });
|
|
373
390
|
};
|
|
374
391
|
export {
|
|
375
|
-
|
|
392
|
+
gs as default
|
|
376
393
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WKRPbKtm.cjs"),n=require("@radix-ui/react-icons"),o=require("react"),s=require("./index-c8zW_D2V.cjs"),c=require("lodash");require("./Class-RZuPYbUS.cjs");require("clsx");require("tailwind-merge");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-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("jotai");require("flat-to-nested");require("redux-undo");require("./index-fwo4wa7u.cjs");require("@react-hookz/web");require("react-i18next");const x=({id:t=null,closeModal:i})=>{const l=s.useMarkAsGlobalBlock(),[r,a]=o.useState("");return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("h1",{className:"text-lg font-bold",children:"Mark as Global"}),e.jsxRuntimeExports.jsxs("div",{className:"py-2 text-sm",children:["Note: Global blocks are single instances. Editing global blocks will be reflected on all pages using these blocks. ",e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsxs("ul",{className:"mt-4 list-inside list-disc space-y-1",children:[e.jsxRuntimeExports.jsxs("li",{children:["Global blocks are indicated with ",e.jsxRuntimeExports.jsx(n.GlobeIcon,{className:"inline"})," icon in left sidebar"]}),e.jsxRuntimeExports.jsx("li",{children:'Global blocks are available under "Global" category'})]})]}),e.jsxRuntimeExports.jsxs("div",{className:"my-4",children:[e.jsxRuntimeExports.jsx("label",{className:"block text-sm font-medium text-gray-400",children:"Enter global block name"}),e.jsxRuntimeExports.jsx("input",{placeholder:"Eg: Header, Footer ",className:"mt-2 w-full",value:r,onChange:u=>a(u.target.value)})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-4",children:[e.jsxRuntimeExports.jsx(s.Button,{onClick:()=>{l(t,c.capitalize(r)),i()},disabled:r.length<=2,variant:"default",children:"Mark as Global"}),e.jsxRuntimeExports.jsx(s.Button,{variant:"outline",onClick:i,children:"Cancel"})]})]})};exports.default=x;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-qAwJ85SY.js";
|
|
2
|
+
import { GlobeIcon as m } from "@radix-ui/react-icons";
|
|
3
|
+
import { useState as n } from "react";
|
|
4
|
+
import { $ as p, B as o } from "./index-2EHcmZqL.js";
|
|
5
|
+
import { capitalize as c } from "lodash";
|
|
6
|
+
import "./Class-nQk08vqd.js";
|
|
7
|
+
import "clsx";
|
|
8
|
+
import "tailwind-merge";
|
|
9
|
+
import "@radix-ui/react-toggle";
|
|
10
|
+
import "class-variance-authority";
|
|
11
|
+
import "@radix-ui/react-switch";
|
|
12
|
+
import "@radix-ui/react-slot";
|
|
13
|
+
import "@radix-ui/react-accordion";
|
|
14
|
+
import "@radix-ui/react-alert-dialog";
|
|
15
|
+
import "@radix-ui/react-dialog";
|
|
16
|
+
import "@radix-ui/react-label";
|
|
17
|
+
import "@radix-ui/react-scroll-area";
|
|
18
|
+
import "@radix-ui/react-tabs";
|
|
19
|
+
import "@radix-ui/react-tooltip";
|
|
20
|
+
import "@radix-ui/react-popover";
|
|
21
|
+
import "@radix-ui/react-menubar";
|
|
22
|
+
import "@radix-ui/react-hover-card";
|
|
23
|
+
import "@radix-ui/react-select";
|
|
24
|
+
import "@radix-ui/react-dropdown-menu";
|
|
25
|
+
import "@radix-ui/react-separator";
|
|
26
|
+
import "@radix-ui/react-toast";
|
|
27
|
+
import "cmdk";
|
|
28
|
+
import "@radix-ui/react-context-menu";
|
|
29
|
+
import "react-icons-picker";
|
|
30
|
+
import "react-dom";
|
|
31
|
+
import "react-quill";
|
|
32
|
+
import "jotai";
|
|
33
|
+
import "flat-to-nested";
|
|
34
|
+
import "redux-undo";
|
|
35
|
+
import "./index-gmZcUXyn.js";
|
|
36
|
+
import "@react-hookz/web";
|
|
37
|
+
import "react-i18next";
|
|
38
|
+
const W = ({ id: e = null, closeModal: l }) => {
|
|
39
|
+
const r = p(), [i, a] = n("");
|
|
40
|
+
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
41
|
+
/* @__PURE__ */ t.jsx("h1", { className: "text-lg font-bold", children: "Mark as Global" }),
|
|
42
|
+
/* @__PURE__ */ t.jsxs("div", { className: "py-2 text-sm", children: [
|
|
43
|
+
"Note: Global blocks are single instances. Editing global blocks will be reflected on all pages using these blocks. ",
|
|
44
|
+
/* @__PURE__ */ t.jsx("br", {}),
|
|
45
|
+
/* @__PURE__ */ t.jsxs("ul", { className: "mt-4 list-inside list-disc space-y-1", children: [
|
|
46
|
+
/* @__PURE__ */ t.jsxs("li", { children: [
|
|
47
|
+
"Global blocks are indicated with ",
|
|
48
|
+
/* @__PURE__ */ t.jsx(m, { className: "inline" }),
|
|
49
|
+
" icon in left sidebar"
|
|
50
|
+
] }),
|
|
51
|
+
/* @__PURE__ */ t.jsx("li", { children: 'Global blocks are available under "Global" category' })
|
|
52
|
+
] })
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ t.jsxs("div", { className: "my-4", children: [
|
|
55
|
+
/* @__PURE__ */ t.jsx("label", { className: "block text-sm font-medium text-gray-400", children: "Enter global block name" }),
|
|
56
|
+
/* @__PURE__ */ t.jsx(
|
|
57
|
+
"input",
|
|
58
|
+
{
|
|
59
|
+
placeholder: "Eg: Header, Footer ",
|
|
60
|
+
className: "mt-2 w-full",
|
|
61
|
+
value: i,
|
|
62
|
+
onChange: (s) => a(s.target.value)
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-end gap-x-4", children: [
|
|
67
|
+
/* @__PURE__ */ t.jsx(
|
|
68
|
+
o,
|
|
69
|
+
{
|
|
70
|
+
onClick: () => {
|
|
71
|
+
r(e, c(i)), l();
|
|
72
|
+
},
|
|
73
|
+
disabled: i.length <= 2,
|
|
74
|
+
variant: "default",
|
|
75
|
+
children: "Mark as Global"
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
/* @__PURE__ */ t.jsx(o, { variant: "outline", onClick: l, children: "Cancel" })
|
|
79
|
+
] })
|
|
80
|
+
] });
|
|
81
|
+
};
|
|
82
|
+
export {
|
|
83
|
+
W as default
|
|
84
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WKRPbKtm.cjs"),u=require("react"),i=require("lodash"),s=require("./index-_jFEo7h5.cjs");require("./Class-RZuPYbUS.cjs");require("clsx");require("tailwind-merge");require("i18next");require("react-i18next");require("./index-m2muA80V.cjs");require("@radix-ui/react-icons");require("./index-fwo4wa7u.cjs");require("./lib.cjs");require("himalaya");require("@mhsdesign/jit-browser-tailwindcss");require("@bobthered/tailwindcss-palette-generator");require("@tailwindcss/forms");require("@tailwindcss/typography");require("@tailwindcss/aspect-ratio");require("@tailwindcss/line-clamp");require("./index-c8zW_D2V.cjs");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-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("jotai");require("flat-to-nested");require("redux-undo");require("@react-hookz/web");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("lucide-react");const a=u.lazy(()=>Promise.resolve().then(()=>require("./add-page-modal-tIt3N8jH.cjs"))),x=u.lazy(()=>Promise.resolve().then(()=>require("./page-viewer-BSc-5M4B.cjs"))),d=()=>{const{data:t=[],isLoading:q}=s.usePages(),{data:r}=s.useProject(),n=i.sortBy(i.filter(t,{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:q,pages:n})})]})};exports.default=d;
|