@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.
Files changed (168) hide show
  1. package/dist/{AddBlocks-H7BZYHUC.js → AddBlocks-eoo1CzaK.js} +114 -111
  2. package/dist/AddBlocks-jU0NwP_s.cjs +3 -0
  3. package/dist/BrandingOptions-WSCFnWAf.cjs +1 -0
  4. package/dist/{BrandingOptions-PAgY-kvj.js → BrandingOptions-_Og7VUHA.js} +57 -41
  5. package/dist/{CanvasArea-zn2ox-5h.js → CanvasArea-cky_d2Lu.js} +517 -519
  6. package/dist/CanvasArea-hT9uHhkz.cjs +46 -0
  7. package/dist/Class-RZuPYbUS.cjs +1 -0
  8. package/dist/{Class-l7qYbuoN.js → Class-nQk08vqd.js} +204 -124
  9. package/dist/{CurrentPage-6Jp4xAWK.js → CurrentPage--OlBwyNE.js} +58 -40
  10. package/dist/CurrentPage-x6Ez11gP.cjs +1 -0
  11. package/dist/Layers-gEA0qWYP.cjs +1 -0
  12. package/dist/{Layers-WkZ48AUm.js → Layers-uzA3QA-4.js} +158 -141
  13. package/dist/MarkAsGlobalBlock-lYL8cO9x.cjs +1 -0
  14. package/dist/MarkAsGlobalBlock-ySc-D4SB.js +84 -0
  15. package/dist/PagesPanel-5t0bV9T2.cjs +1 -0
  16. package/dist/PagesPanel-tH6c9Mnv.js +70 -0
  17. package/dist/ProjectPanel-NdrR6a8t.cjs +1 -0
  18. package/dist/ProjectPanel-Q2-15-In.js +91 -0
  19. package/dist/Settings-DBiwm1hY.cjs +1 -0
  20. package/dist/{Settings-fH8fZKpm.js → Settings-LOqpvQ_1.js} +411 -408
  21. package/dist/SidePanels-8JWYXGqN.cjs +1 -0
  22. package/dist/{SidePanels-w8ZHKJaR.js → SidePanels-F7ccs2Xf.js} +106 -88
  23. package/dist/{Topbar-hm1D_5sb.js → Topbar-lX9OMPwj.js} +47 -45
  24. package/dist/Topbar-qi5ab8rR.cjs +1 -0
  25. package/dist/UnsplashImages-a2r7b3kB.cjs +1 -0
  26. package/dist/{UnsplashImages-gPcBLjgB.js → UnsplashImages-u_QTABzi.js} +56 -44
  27. package/dist/{UploadImages-_ZyUU66E.js → UploadImages-gV5xDHIu.js} +55 -34
  28. package/dist/UploadImages-jLQgLujd.cjs +1 -0
  29. package/dist/add-page-modal-U5ramelz.js +110 -0
  30. package/dist/add-page-modal-tIt3N8jH.cjs +1 -0
  31. package/dist/confirm-alert-ZQ-sxX0X.js +58 -0
  32. package/dist/confirm-alert-z74-fGOT.cjs +1 -0
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.js +99 -124
  35. package/dist/delete-page-modal-5XuSfQT0.cjs +1 -0
  36. package/dist/delete-page-modal-_E87bVUZ.js +89 -0
  37. package/dist/form-Osm1AmO5.cjs +1 -0
  38. package/dist/{form-dVpOAyRl.js → form-zZJyZuNH.js} +12 -12
  39. package/dist/index-2EHcmZqL.js +2947 -0
  40. package/dist/index-RVm8Txnj.js +1149 -0
  41. package/dist/index-_jFEo7h5.cjs +206 -0
  42. package/dist/index-c8zW_D2V.cjs +1 -0
  43. package/dist/index-cU5eyVRU.js +40872 -0
  44. package/dist/index-fwo4wa7u.cjs +1 -0
  45. package/dist/index-gmZcUXyn.js +25 -0
  46. package/dist/index-m2muA80V.cjs +9 -0
  47. package/dist/{jsx-runtime-JYMCiFoE.cjs → jsx-runtime-WKRPbKtm.cjs} +7 -7
  48. package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-qAwJ85SY.js} +109 -106
  49. package/dist/lib.cjs +2 -1
  50. package/dist/lib.js +1333 -71
  51. package/dist/page-viewer-BSc-5M4B.cjs +1 -0
  52. package/dist/{page-viewer-Y4YiaZ_m.js → page-viewer-nLqIs_9w.js} +62 -44
  53. package/dist/project-general-setting-14MA_cX5.cjs +1 -0
  54. package/dist/{project-general-setting-U4S_KlhU.js → project-general-setting-kXh5myAr.js} +46 -36
  55. package/dist/project-seo-setting-POGPEJZ8.cjs +1 -0
  56. package/dist/project-seo-setting-nT1qo1Bb.js +89 -0
  57. package/dist/render.cjs +1 -1
  58. package/dist/render.js +23 -19
  59. package/dist/server.cjs +1 -1
  60. package/dist/server.js +1 -1
  61. package/dist/single-page-detail-EgQd9TSA.cjs +1 -0
  62. package/dist/{single-page-detail-pAxCy_Pe.js → single-page-detail-fV-A6vJR.js} +90 -80
  63. package/dist/studio.cjs +1 -1
  64. package/dist/studio.js +45 -25
  65. package/dist/ui.cjs +1 -1
  66. package/dist/ui.js +156 -357
  67. package/package.json +1 -1
  68. package/dist/AddBlocks-7ACJv8LW.cjs +0 -3
  69. package/dist/BrandingOptions-5j-XszLM.cjs +0 -1
  70. package/dist/CanvasArea-Dnm-yeus.cjs +0 -46
  71. package/dist/ChaiBuilderEditor-BoE-sArB.cjs +0 -163
  72. package/dist/ChaiBuilderEditor-hEuUONQ3.js +0 -27094
  73. package/dist/Class-_uCzl5v1.cjs +0 -1
  74. package/dist/CurrentPage-YMpqOqx7.cjs +0 -1
  75. package/dist/ImagesPanel-6us7hiLN.cjs +0 -1
  76. package/dist/ImagesPanel-oaHOD-Ex.js +0 -27
  77. package/dist/Layers-EzOZdWvd.cjs +0 -1
  78. package/dist/MODIFIERS-DsEzQ3aH.js +0 -73
  79. package/dist/MODIFIERS-Fx6WAZcw.cjs +0 -1
  80. package/dist/MarkAsGlobalBlock-0HubcRkY.js +0 -77
  81. package/dist/MarkAsGlobalBlock-HmeIyLCP.cjs +0 -1
  82. package/dist/PagesPanel-6JuwBLFQ.js +0 -50
  83. package/dist/PagesPanel-zJq8p1ja.cjs +0 -1
  84. package/dist/ProjectPanel-Zml2F8b9.cjs +0 -1
  85. package/dist/ProjectPanel-cu2QSDW9.js +0 -73
  86. package/dist/Settings-lc9PfnmG.cjs +0 -1
  87. package/dist/SidePanels-VH72zFE2.cjs +0 -1
  88. package/dist/Topbar-vQPo9xSY.cjs +0 -1
  89. package/dist/UnsplashImages-BoBBSi1a.cjs +0 -1
  90. package/dist/UploadImages-T6kW0s3G.cjs +0 -1
  91. package/dist/accordion-oPUeqPCZ.js +0 -42
  92. package/dist/accordion-ynvFtV_p.cjs +0 -1
  93. package/dist/add-page-modal--qZSwJuB.cjs +0 -1
  94. package/dist/add-page-modal-bj7qbZuK.js +0 -99
  95. package/dist/alert-dialog-GNfnpqFB.js +0 -64
  96. package/dist/alert-dialog-Mv0-wAvS.cjs +0 -1
  97. package/dist/command-ThdTuUxt.cjs +0 -1
  98. package/dist/command-VHca6CcN.js +0 -97
  99. package/dist/confirm-alert-8EHe0OOd.cjs +0 -1
  100. package/dist/confirm-alert-b0e_BLhF.js +0 -36
  101. package/dist/context-menu-8dC9uGXj.js +0 -122
  102. package/dist/context-menu-IgLbIuth.cjs +0 -1
  103. package/dist/controls-Ni5kEzLz.js +0 -103
  104. package/dist/controls-W97-POR_.cjs +0 -1
  105. package/dist/controls-enQY7NI8.js +0 -118
  106. package/dist/controls-xUKa23ic.cjs +0 -1
  107. package/dist/delete-page-modal-2LuDLEiP.cjs +0 -1
  108. package/dist/delete-page-modal-cnrR8tWH.js +0 -69
  109. package/dist/dialog-S_QbL1iq.cjs +0 -1
  110. package/dist/dialog-jrw9DF1f.js +0 -65
  111. package/dist/dropdown-menu-S03K_fNs.js +0 -164
  112. package/dist/dropdown-menu-sMXR59cB.cjs +0 -1
  113. package/dist/form-nRAvKPQj.cjs +0 -1
  114. package/dist/functions-nNTuSTsR.js +0 -1106
  115. package/dist/functions-pcUZhFJM.js +0 -12
  116. package/dist/functions-sCuB7nvZ.cjs +0 -2
  117. package/dist/functions-uw7QP2kT.cjs +0 -1
  118. package/dist/html-to-json-P6GpbcQX.cjs +0 -1
  119. package/dist/html-to-json-pdHQfRkN.js +0 -178
  120. package/dist/index-HAue58ea.cjs +0 -1
  121. package/dist/index-T4_wfKl5.js +0 -2256
  122. package/dist/index-X9ZgD09V.cjs +0 -1
  123. package/dist/index-ehKdBRUK.js +0 -18
  124. package/dist/label-KaP7MRrs.js +0 -10
  125. package/dist/label-tFm8HZdb.cjs +0 -1
  126. package/dist/link-6o6n2Tnd.js +0 -204
  127. package/dist/link-ece8dZGH.cjs +0 -1
  128. package/dist/page-viewer-IARz6OSp.cjs +0 -1
  129. package/dist/popover-a84pbVhQ.js +0 -23
  130. package/dist/popover-fKjgcRUx.cjs +0 -1
  131. package/dist/project-general-setting-eSl3t-VH.cjs +0 -1
  132. package/dist/project-seo-setting-Ga9v_ECU.js +0 -67
  133. package/dist/project-seo-setting-rankm1z3.cjs +0 -1
  134. package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
  135. package/dist/scroll-area-ewXbxc3n.js +0 -30
  136. package/dist/select-7bjg-rr9.cjs +0 -1
  137. package/dist/select-POGdEDHT.js +0 -75
  138. package/dist/separator-3Civ-6hb.cjs +0 -1
  139. package/dist/separator-SctTn0Qi.js +0 -18
  140. package/dist/single-page-detail-yPgnu2AI.cjs +0 -1
  141. package/dist/skeleton-CU_FIbg3.js +0 -239
  142. package/dist/skeleton-JHP9zwL2.cjs +0 -1
  143. package/dist/tabs-Gb9v5dVb.js +0 -46
  144. package/dist/tabs-iWeaaVrg.cjs +0 -1
  145. package/dist/textarea-1kZEh7ki.cjs +0 -1
  146. package/dist/textarea-b2QvVhrK.js +0 -73
  147. package/dist/toggle-ASJRAaGP.js +0 -30
  148. package/dist/toggle-ehNIPmme.cjs +0 -1
  149. package/dist/useAddBlock-WJc3OgG8.js +0 -86
  150. package/dist/useAddBlock-dCKRFPRU.cjs +0 -1
  151. package/dist/useAllBlocks-6hvuNuyw.cjs +0 -1
  152. package/dist/useAllBlocks-PQKYvs-e.js +0 -20
  153. package/dist/useChaiExternalData-4K9WxANa.js +0 -6
  154. package/dist/useChaiExternalData-DkyBJ81C.cjs +0 -1
  155. package/dist/useDarkMode-ZKCO_gkt.js +0 -23
  156. package/dist/useDarkMode-dV6FM6l-.cjs +0 -1
  157. package/dist/useFeatureSupport-OLwNgEZb.js +0 -16
  158. package/dist/useFeatureSupport-c9IgPW2t.cjs +0 -1
  159. package/dist/useHiddenBlocks-3MsGOJ1s.js +0 -15
  160. package/dist/useHiddenBlocks-oJuQDmTy.cjs +0 -1
  161. package/dist/useLanguage-NKKKaxVM.cjs +0 -1
  162. package/dist/useLanguage-gVC5rxO5.js +0 -216
  163. package/dist/useMarkAsGlobalBlock-X73Vny8u.js +0 -25
  164. package/dist/useMarkAsGlobalBlock-ebBVGHg4.cjs +0 -1
  165. package/dist/useUiLibraries-4hPOi8DI.js +0 -12
  166. package/dist/useUiLibraries-9FhQCpKo.cjs +0 -1
  167. package/dist/utils-dze1SGvB.js +0 -6
  168. package/dist/utils-qK_SjzzV.cjs +0 -1
@@ -1,44 +1,61 @@
1
- import { j as e } from "./jsx-runtime-Sp0orL4X.js";
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 J, InputIcon as X, ButtonIcon as B, CheckboxIcon as Z, GroupIcon as ee, SpaceBetweenVerticallyIcon as se, ColumnsIcon as te, 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, GlobeIcon as ue, CopyIcon as me, ClipboardCopyIcon as pe, ScissorsIcon as ge, ClipboardIcon as je, TrashIcon as he, DoubleArrowDownIcon as fe, StackIcon as Ie } from "@radix-ui/react-icons";
4
- import { useDrop as be, useDragLayer as ke } from "react-dnd";
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 { g as ve, l as g, e as we, h as Se, d as Te, b as De, k as Ne, m as Me, s as Oe, q as Re, a as Ee, N as Ae, x as _e } from "./ChaiBuilderEditor-hEuUONQ3.js";
8
- import { u as Pe, b as He } from "./useAllBlocks-PQKYvs-e.js";
9
- import { DatabaseIcon as Le } from "lucide-react";
10
- import { c as w } from "./utils-dze1SGvB.js";
11
- import { u as Ve } from "./useHiddenBlocks-3MsGOJ1s.js";
12
- import { useMemo as ze, lazy as Fe, useState as Ge, Suspense as $e, useCallback as S } from "react";
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 { u as Ze } from "./useAddBlock-WJc3OgG8.js";
20
- import "clsx";
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 "@floating-ui/react-dom";
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 "./index-ehKdBRUK.js";
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 "@radix-ui/react-dialog";
34
- import "@radix-ui/react-context-menu";
35
- import "@radix-ui/react-slot";
36
- import "class-variance-authority";
37
- import "@radix-ui/react-tooltip";
38
- import "@radix-ui/react-toast";
39
- import "./controls-Ni5kEzLz.js";
40
- const D = (s) => {
41
- switch (s.type) {
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(Z, {});
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(Le, { size: 16 });
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 es(s = "") {
104
- const t = {
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(s))
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(s))
131
+ if (new RegExp(/\b(sm|md|lg|xl|2xl):hidden\b/).test(t))
115
132
  return "Visible on mobile";
116
- if (s.match(/(^| )hidden( |$)/g)) {
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 = s.match(a);
137
+ ), c = t.match(a);
121
138
  if (k(c, 1))
122
- return `Visible >=${t[k(c, 1)]}`;
139
+ return `Visible >=${s[k(c, 1)]}`;
123
140
  }
124
141
  return "";
125
142
  }
126
- const ss = (s) => {
127
- let t = "";
128
- return Object.keys(s).forEach((o) => {
129
- P(s[o], Ke) && (t = s[o]);
130
- }), t;
131
- }, ts = (s) => {
132
- var m;
133
- const [, t] = ve(), [o] = Ve(), { isSelected: r } = s, { id: a, data: c } = s.node, l = s.depth * 10, x = (i) => {
134
- i.stopPropagation(), s.onToggle(s.node.id);
135
- }, j = Be(a, s.isOpen, s.onToggle), u = ze(() => {
136
- const i = ss(s.node.data);
137
- return es(i);
138
- }, [s.node.data]);
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: () => t(a),
145
- className: w(
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) && s.onSelect(a);
167
+ i.stopPropagation(), !o.includes(a) && t.onSelect(a);
151
168
  },
152
- onContextMenu: () => s.onSelect(a),
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 ${s.isOpen ? "rotate-90" : ""}`,
160
- children: s.node.droppable && /* @__PURE__ */ e.jsx("button", { onClick: x, type: "button", children: /* @__PURE__ */ e.jsx(xe, {}) })
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: ((m = s.node.data) == null ? void 0 : m._name) || s.node.text }),
166
- u ? /* @__PURE__ */ e.jsxs(
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
- u,
189
+ m,
173
190
  ")"
174
191
  ]
175
192
  }
@@ -179,136 +196,136 @@ const ss = (s) => {
179
196
  }
180
197
  )
181
198
  );
182
- }, os = (s) => {
199
+ }, ot = (t) => {
183
200
  var o;
184
- const { item: t } = s.monitorProps;
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 = t == null ? void 0 : t.data) == null ? void 0 : o._type }) }),
187
- /* @__PURE__ */ e.jsx("div", { className: "ml-2 truncate text-[11px]", children: t.text })
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
- }, ns = (s) => {
190
- const t = s.depth * 10 + 16;
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: t } });
192
- }, rs = Fe(() => import("./MarkAsGlobalBlock-0HubcRkY.js")), as = () => {
193
- const [s] = g(), [, t] = Te();
194
- return /* @__PURE__ */ e.jsxs(d, { className: "flex items-center gap-x-4 text-xs", onClick: () => t(s), children: [
195
- /* @__PURE__ */ e.jsx(ge, {}),
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
- }, cs = () => {
199
- const [s] = g(), [, t] = De();
200
- return /* @__PURE__ */ e.jsxs(d, { className: "flex items-center gap-x-4 text-xs", onClick: () => t(s), children: [
201
- /* @__PURE__ */ e.jsx(je, {}),
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
- }, ls = () => {
205
- const [s] = g(), t = Ne(), o = Me();
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(s),
228
+ onClick: () => s(t),
212
229
  children: [
213
- /* @__PURE__ */ e.jsx(he, {}),
230
+ /* @__PURE__ */ e.jsx(ue, {}),
214
231
  " Remove"
215
232
  ]
216
233
  }
217
234
  );
218
- }, is = ({
219
- id: s = null,
220
- openMarkAsGlobalModal: t
235
+ }, it = ({
236
+ id: t = null,
237
+ openMarkAsGlobalModal: s
221
238
  }) => {
222
- const [o] = g(), r = we(), { pasteBlocks: a, canPaste: c } = Se(), l = T("globalBlocksSupport", !1), x = S(() => {
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(We, { className: "text-xs", children: [
226
- l && /* @__PURE__ */ e.jsx(d, { className: "flex items-center gap-x-4 border-b text-xs", onClick: t, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-4", children: [
227
- /* @__PURE__ */ e.jsx(ue, {}),
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(me, {}),
248
+ /* @__PURE__ */ e.jsx(je, {}),
232
249
  " Duplicate"
233
250
  ] }),
234
- /* @__PURE__ */ e.jsx(as, {}),
235
- /* @__PURE__ */ e.jsx(cs, {}),
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(s),
257
+ onClick: () => a(t),
241
258
  disabled: !c,
242
259
  children: [
243
- /* @__PURE__ */ e.jsx(pe, {}),
260
+ /* @__PURE__ */ e.jsx(he, {}),
244
261
  " Paste"
245
262
  ]
246
263
  }
247
264
  ),
248
- /* @__PURE__ */ e.jsx(ls, {})
265
+ /* @__PURE__ */ e.jsx(lt, {})
249
266
  ] });
250
- }, ds = ({ children: s, id: t = null }) => {
251
- const [o, r] = Ge(!1);
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(qe, { open: o, onOpenChange: r, children: o && /* @__PURE__ */ e.jsx(Qe, { children: /* @__PURE__ */ e.jsx($e, { fallback: /* @__PURE__ */ e.jsx("div", { className: "h-96 w-full animate-pulse bg-gray-200" }), children: /* @__PURE__ */ e.jsx(rs, { closeModal: () => r(!1), id: t }) }) }) }),
254
- /* @__PURE__ */ e.jsxs(Ue, { children: [
255
- /* @__PURE__ */ e.jsx(Ye, { children: s }),
256
- /* @__PURE__ */ e.jsx(is, { id: t, openMarkAsGlobalModal: () => r(!0) })
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
- }, xs = () => {
260
- const { addCoreBlock: s } = Ze(), t = T("getExternalPredefinedBlock");
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 t(r);
266
- return s({ blocks: l }, a === 0 ? null : a, c);
282
+ const l = await s(r);
283
+ return t({ blocks: l }, a === 0 ? null : a, c);
267
284
  }
268
- return s(r, a === 0 ? null : a, c);
285
+ return t(r, a === 0 ? null : a, c);
269
286
  },
270
- [s]
287
+ [t]
271
288
  );
272
289
  };
273
- function us(s) {
274
- return v(s, (t) => {
275
- const { data: o } = t;
290
+ function mt(t) {
291
+ return v(t, (s) => {
292
+ const { data: o } = s;
276
293
  return {
277
294
  ...o,
278
- _parent: t.parent === 0 ? null : t.parent
295
+ _parent: s.parent === 0 ? null : s.parent
279
296
  };
280
297
  });
281
298
  }
282
- const Xs = () => {
283
- const s = Pe(), [t] = Oe(), [o, r, a] = g(), [, c] = Re(), { t: l } = Ce(), { createSnapshot: x } = Ee(), j = Ae(), u = xs(), [, m] = Xe(_e), i = async (n, p) => {
284
- const { dragSource: f, destinationIndex: I, relativeIndex: b, dropTargetId: E, monitor: A } = p, _ = us(n);
285
- t(_), f ? x() : (await u({
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: I,
289
- relativeIndex: b
290
- }), m(!1));
291
- }, N = v(s, (n) => ({
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(s, { _parent: n._id })),
312
+ droppable: !L(V(t, { _parent: n._id })),
296
313
  data: n
297
314
  })), M = () => {
298
315
  r([]), c([]);
299
- }, [{ isOver: h }, O] = be(() => ({
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 u({
323
+ (async () => (await m({
307
324
  block: n,
308
325
  dropTargetId: "",
309
326
  destinationIndex: 0,
310
327
  relativeIndex: 0
311
- }), m(!1)))();
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: w(
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(s) ? /* @__PURE__ */ e.jsxs(
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(fe, { className: "mx-auto h-12 w-12 animate-bounce" }) : /* @__PURE__ */ e.jsx(Ie, { className: "mx-auto h-10 w-10" }),
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(Je, { id: "layers-view", className: "no-scrollbar h-full overflow-y-auto p-1", children: /* @__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: p, isOpen: f, onToggle: I }) => /* @__PURE__ */ e.jsx(ds, { id: n.id, children: /* @__PURE__ */ e.jsx(
342
- ts,
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: (b) => {
345
- c([]), r([b]);
361
+ onSelect: (I) => {
362
+ c([]), r([I]);
346
363
  },
347
364
  isSelected: F(o, n.id),
348
365
  node: n,
349
- depth: p,
350
- isOpen: f,
351
- onToggle: I,
366
+ depth: u,
367
+ isOpen: b,
368
+ onToggle: f,
352
369
  toggleIds: a
353
370
  }
354
371
  ) }),
355
- dragPreviewRender: (n) => /* @__PURE__ */ e.jsx(os, { monitorProps: n }),
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: He,
382
+ canDrop: Ke,
366
383
  dropTargetOffset: 2,
367
384
  enableAnimateExpand: !0,
368
- placeholderRender: (n, { depth: p }) => /* @__PURE__ */ e.jsx(ns, { node: n, depth: p })
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
- Xs as default
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;