@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,97 +0,0 @@
1
- import { j as o } from "./jsx-runtime-Sp0orL4X.js";
2
- import * as t from "react";
3
- import { c as r } from "./utils-dze1SGvB.js";
4
- import { MagnifyingGlassIcon as i } from "@radix-ui/react-icons";
5
- import { Command as d } from "cmdk";
6
- import { D as p, b as l } from "./dialog-jrw9DF1f.js";
7
- const c = t.forwardRef(({ className: e, type: a, ...s }, n) => /* @__PURE__ */ o.jsx(
8
- "input",
9
- {
10
- type: a,
11
- className: r(
12
- "flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
13
- e
14
- ),
15
- ref: n,
16
- ...s
17
- }
18
- ));
19
- c.displayName = "Input";
20
- const m = t.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o.jsx(
21
- d,
22
- {
23
- ref: s,
24
- className: r(
25
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
26
- e
27
- ),
28
- ...a
29
- }
30
- ));
31
- m.displayName = d.displayName;
32
- const j = ({ children: e, ...a }) => /* @__PURE__ */ o.jsx(p, { ...a, children: /* @__PURE__ */ o.jsx(l, { className: "overflow-hidden p-0", children: /* @__PURE__ */ o.jsx(m, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), u = t.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
33
- /* @__PURE__ */ o.jsx(i, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
34
- /* @__PURE__ */ o.jsx(
35
- d.Input,
36
- {
37
- ref: s,
38
- className: r(
39
- "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
40
- e
41
- ),
42
- ...a
43
- }
44
- )
45
- ] }));
46
- u.displayName = d.Input.displayName;
47
- const f = t.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o.jsx(
48
- d.List,
49
- {
50
- ref: s,
51
- className: r("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
52
- ...a
53
- }
54
- ));
55
- f.displayName = d.List.displayName;
56
- const x = t.forwardRef((e, a) => /* @__PURE__ */ o.jsx(d.Empty, { ref: a, className: "py-6 text-center text-sm", ...e }));
57
- x.displayName = d.Empty.displayName;
58
- const g = t.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o.jsx(
59
- d.Group,
60
- {
61
- ref: s,
62
- className: r(
63
- "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
64
- e
65
- ),
66
- ...a
67
- }
68
- ));
69
- g.displayName = d.Group.displayName;
70
- const h = t.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o.jsx(d.Separator, { ref: s, className: r("-mx-1 h-px bg-border", e), ...a }));
71
- h.displayName = d.Separator.displayName;
72
- const y = t.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o.jsx(
73
- d.Item,
74
- {
75
- ref: s,
76
- className: r(
77
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
78
- e
79
- ),
80
- ...a
81
- }
82
- ));
83
- y.displayName = d.Item.displayName;
84
- const N = ({ className: e, ...a }) => /* @__PURE__ */ o.jsx("span", { className: r("ml-auto text-xs tracking-widest text-muted-foreground", e), ...a });
85
- N.displayName = "CommandShortcut";
86
- export {
87
- m as C,
88
- c as I,
89
- j as a,
90
- u as b,
91
- f as c,
92
- x as d,
93
- g as e,
94
- y as f,
95
- N as g,
96
- h
97
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),c=require("./skeleton-JHP9zwL2.cjs"),r=require("./alert-dialog-Mv0-wAvS.cjs");require("react");require("jotai");require("lodash");require("@radix-ui/react-slot");require("class-variance-authority");require("./utils-qK_SjzzV.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-tooltip");require("@radix-ui/react-icons");require("@radix-ui/react-toast");require("@radix-ui/react-alert-dialog");const a=({open:s,onCancel:n=()=>{},onConfirm:l,title:u,description:i,disabled:t,cancelText:o="Discard",confirmText:x="Save"})=>e.jsxRuntimeExports.jsx(r.AlertDialog,{open:s,children:e.jsxRuntimeExports.jsxs(r.AlertDialogContent,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTitle,{children:u}),i&&e.jsxRuntimeExports.jsx(r.AlertDialogDescription,{children:i}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-3",children:[e.jsxRuntimeExports.jsx(r.AlertDialogCancel,{disabled:t,onClick:n,children:o}),e.jsxRuntimeExports.jsx(c.Button,{variant:"default",onClick:l,disabled:t,children:x})]})]})});exports.default=a;
@@ -1,36 +0,0 @@
1
- import { j as r } from "./jsx-runtime-Sp0orL4X.js";
2
- import { B as n } from "./skeleton-CU_FIbg3.js";
3
- import { A as p, b as c, e as x, f as j, h as d } from "./alert-dialog-GNfnpqFB.js";
4
- import "react";
5
- import "jotai";
6
- import "lodash";
7
- import "@radix-ui/react-slot";
8
- import "class-variance-authority";
9
- import "./utils-dze1SGvB.js";
10
- import "clsx";
11
- import "tailwind-merge";
12
- import "@radix-ui/react-tooltip";
13
- import "@radix-ui/react-icons";
14
- import "@radix-ui/react-toast";
15
- import "@radix-ui/react-alert-dialog";
16
- const T = ({
17
- open: o,
18
- onCancel: e = () => {
19
- },
20
- onConfirm: l,
21
- title: s,
22
- description: i,
23
- disabled: t,
24
- cancelText: a = "Discard",
25
- confirmText: m = "Save"
26
- }) => /* @__PURE__ */ r.jsx(p, { open: o, children: /* @__PURE__ */ r.jsxs(c, { children: [
27
- /* @__PURE__ */ r.jsx(x, { children: s }),
28
- i && /* @__PURE__ */ r.jsx(j, { children: i }),
29
- /* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-end gap-x-3", children: [
30
- /* @__PURE__ */ r.jsx(d, { disabled: t, onClick: e, children: a }),
31
- /* @__PURE__ */ r.jsx(n, { variant: "default", onClick: l, disabled: t, children: m })
32
- ] })
33
- ] }) });
34
- export {
35
- T as default
36
- };
@@ -1,122 +0,0 @@
1
- import { j as o } from "./jsx-runtime-Sp0orL4X.js";
2
- import * as r from "react";
3
- import * as e from "@radix-ui/react-context-menu";
4
- import { ChevronRightIcon as l, CheckIcon as c, DotFilledIcon as m } from "@radix-ui/react-icons";
5
- import { c as d } from "./utils-dze1SGvB.js";
6
- const M = e.Root, R = e.Trigger, I = e.Group, v = e.Portal, S = e.Sub, k = e.RadioGroup, u = r.forwardRef(({ className: t, inset: a, children: s, ...n }, i) => /* @__PURE__ */ o.jsxs(
7
- e.SubTrigger,
8
- {
9
- ref: i,
10
- className: d(
11
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
12
- a && "pl-8",
13
- t
14
- ),
15
- ...n,
16
- children: [
17
- s,
18
- /* @__PURE__ */ o.jsx(l, { className: "ml-auto h-4 w-4" })
19
- ]
20
- }
21
- ));
22
- u.displayName = e.SubTrigger.displayName;
23
- const p = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o.jsx(
24
- e.SubContent,
25
- {
26
- ref: s,
27
- className: d(
28
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
29
- t
30
- ),
31
- ...a
32
- }
33
- ));
34
- p.displayName = e.SubContent.displayName;
35
- const f = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o.jsx(e.Portal, { children: /* @__PURE__ */ o.jsx(
36
- e.Content,
37
- {
38
- ref: s,
39
- className: d(
40
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
41
- t
42
- ),
43
- ...a
44
- }
45
- ) }));
46
- f.displayName = e.Content.displayName;
47
- const x = r.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ o.jsx(
48
- e.Item,
49
- {
50
- ref: n,
51
- className: d(
52
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
53
- a && "pl-8",
54
- t
55
- ),
56
- ...s
57
- }
58
- ));
59
- x.displayName = e.Item.displayName;
60
- const b = r.forwardRef(({ className: t, children: a, checked: s, ...n }, i) => /* @__PURE__ */ o.jsxs(
61
- e.CheckboxItem,
62
- {
63
- ref: i,
64
- className: d(
65
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
66
- t
67
- ),
68
- checked: s,
69
- ...n,
70
- children: [
71
- /* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(e.ItemIndicator, { children: /* @__PURE__ */ o.jsx(c, { className: "h-4 w-4" }) }) }),
72
- a
73
- ]
74
- }
75
- ));
76
- b.displayName = e.CheckboxItem.displayName;
77
- const g = r.forwardRef(({ className: t, children: a, ...s }, n) => /* @__PURE__ */ o.jsxs(
78
- e.RadioItem,
79
- {
80
- ref: n,
81
- className: d(
82
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
83
- t
84
- ),
85
- ...s,
86
- children: [
87
- /* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(e.ItemIndicator, { children: /* @__PURE__ */ o.jsx(m, { className: "h-4 w-4 fill-current" }) }) }),
88
- a
89
- ]
90
- }
91
- ));
92
- g.displayName = e.RadioItem.displayName;
93
- const h = r.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ o.jsx(
94
- e.Label,
95
- {
96
- ref: n,
97
- className: d("px-2 py-1.5 text-sm font-semibold text-foreground", a && "pl-8", t),
98
- ...s
99
- }
100
- ));
101
- h.displayName = e.Label.displayName;
102
- const N = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o.jsx(e.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-border", t), ...a }));
103
- N.displayName = e.Separator.displayName;
104
- const C = ({ className: t, ...a }) => /* @__PURE__ */ o.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", t), ...a });
105
- C.displayName = "ContextMenuShortcut";
106
- export {
107
- M as C,
108
- R as a,
109
- f as b,
110
- x as c,
111
- b as d,
112
- g as e,
113
- h as f,
114
- N as g,
115
- C as h,
116
- I as i,
117
- v as j,
118
- S as k,
119
- p as l,
120
- u as m,
121
- k as n
122
- };
@@ -1 +0,0 @@
1
- "use strict";const a=require("./jsx-runtime-JYMCiFoE.cjs"),R=require("react"),M=require("@radix-ui/react-context-menu"),c=require("@radix-ui/react-icons"),r=require("./utils-qK_SjzzV.cjs");function u(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const i=u(R),e=u(M),h=e.Root,N=e.Trigger,y=e.Group,w=e.Portal,I=e.Sub,S=e.RadioGroup,l=i.forwardRef(({className:t,inset:o,children:n,...s},d)=>a.jsxRuntimeExports.jsxs(e.SubTrigger,{ref:d,className:r.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",o&&"pl-8",t),...s,children:[n,a.jsxRuntimeExports.jsx(c.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));l.displayName=e.SubTrigger.displayName;const m=i.forwardRef(({className:t,...o},n)=>a.jsxRuntimeExports.jsx(e.SubContent,{ref:n,className:r.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...o}));m.displayName=e.SubContent.displayName;const x=i.forwardRef(({className:t,...o},n)=>a.jsxRuntimeExports.jsx(e.Portal,{children:a.jsxRuntimeExports.jsx(e.Content,{ref:n,className:r.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...o})}));x.displayName=e.Content.displayName;const p=i.forwardRef(({className:t,inset:o,...n},s)=>a.jsxRuntimeExports.jsx(e.Item,{ref:s,className:r.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o&&"pl-8",t),...n}));p.displayName=e.Item.displayName;const f=i.forwardRef(({className:t,children:o,checked:n,...s},d)=>a.jsxRuntimeExports.jsxs(e.CheckboxItem,{ref:d,className:r.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...s,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(e.ItemIndicator,{children:a.jsxRuntimeExports.jsx(c.CheckIcon,{className:"h-4 w-4"})})}),o]}));f.displayName=e.CheckboxItem.displayName;const b=i.forwardRef(({className:t,children:o,...n},s)=>a.jsxRuntimeExports.jsxs(e.RadioItem,{ref:s,className:r.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(e.ItemIndicator,{children:a.jsxRuntimeExports.jsx(c.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),o]}));b.displayName=e.RadioItem.displayName;const C=i.forwardRef(({className:t,inset:o,...n},s)=>a.jsxRuntimeExports.jsx(e.Label,{ref:s,className:r.cn("px-2 py-1.5 text-sm font-semibold text-foreground",o&&"pl-8",t),...n}));C.displayName=e.Label.displayName;const g=i.forwardRef(({className:t,...o},n)=>a.jsxRuntimeExports.jsx(e.Separator,{ref:n,className:r.cn("-mx-1 my-1 h-px bg-border",t),...o}));g.displayName=e.Separator.displayName;const j=({className:t,...o})=>a.jsxRuntimeExports.jsx("span",{className:r.cn("ml-auto text-xs tracking-widest text-muted-foreground",t),...o});j.displayName="ContextMenuShortcut";exports.ContextMenu=h;exports.ContextMenuCheckboxItem=f;exports.ContextMenuContent=x;exports.ContextMenuGroup=y;exports.ContextMenuItem=p;exports.ContextMenuLabel=C;exports.ContextMenuPortal=w;exports.ContextMenuRadioGroup=S;exports.ContextMenuRadioItem=b;exports.ContextMenuSeparator=g;exports.ContextMenuShortcut=j;exports.ContextMenuSub=I;exports.ContextMenuSubContent=m;exports.ContextMenuSubTrigger=l;exports.ContextMenuTrigger=N;
@@ -1,103 +0,0 @@
1
- import { get as n, isEmpty as h, map as P, forIn as $, has as b, includes as u, set as E } from "lodash";
2
- import { g as O } from "./functions-pcUZhFJM.js";
3
- import { I as y, a as j } from "./MODIFIERS-DsEzQ3aH.js";
4
- const f = (e, t = "") => {
5
- switch (e.type) {
6
- case "singular":
7
- return e.uiSchema;
8
- case "model":
9
- const { properties: s } = e, c = {};
10
- return Object.keys(s).forEach((i) => {
11
- const r = s[i];
12
- if (u(["slot", "styles"], r.type))
13
- return;
14
- const o = n(r, "i18n", !1) ? `${i}-${t}` : i;
15
- c[o] = f(r, t);
16
- }), c;
17
- case "list":
18
- const { itemProperties: a } = e, l = {
19
- items: {}
20
- };
21
- return Object.keys(a).forEach((i) => {
22
- const r = a[i];
23
- if (u(["slot", "styles"], r.type))
24
- return;
25
- const o = n(r, "i18n", !1) ? `${i}-${t}` : i;
26
- l.items[o] = f(r, t);
27
- }), l;
28
- default:
29
- return {};
30
- }
31
- }, d = (e, t = "") => {
32
- switch (e.type) {
33
- case "singular":
34
- return e.schema;
35
- case "model":
36
- const { properties: s, title: c } = e, a = {
37
- title: c,
38
- type: "object",
39
- properties: {}
40
- };
41
- return Object.keys(s).forEach((o) => {
42
- const p = s[o];
43
- if (u(["slot", "styles"], p.type))
44
- return;
45
- const m = n(p, "i18n", !1) ? `${o}-${t}` : o;
46
- a.properties[m] = d(p, t);
47
- }), a;
48
- case "list":
49
- const { itemProperties: l, title: i } = e, r = {
50
- title: i,
51
- type: "array",
52
- items: {
53
- type: "object",
54
- properties: {}
55
- }
56
- };
57
- return Object.keys(l).forEach((o) => {
58
- const p = l[o];
59
- if (u(["slot", "styles"], p.type))
60
- return;
61
- const m = n(p, "i18n", !1) ? `${o}-${t}` : o;
62
- r.items.properties[m] = d(p, t), E(r.items, "title", n(p, "itemTitle", `${i} item`));
63
- }), r;
64
- default:
65
- return {};
66
- }
67
- }, g = (e) => {
68
- const t = {};
69
- return Object.keys(e).forEach((s) => {
70
- t[s] = S(e[s]);
71
- }), t;
72
- }, K = (e) => {
73
- if (h(e.default))
74
- return [];
75
- const { itemProperties: t } = e;
76
- return P(e.default, (s) => {
77
- const c = { ...s };
78
- return $(s, (a, l) => {
79
- b(t, l) && n(t[l], "i18n", !1) && (c[l] = y);
80
- }), c;
81
- });
82
- }, S = (e) => {
83
- switch (e.type) {
84
- case "styles":
85
- return e.default;
86
- case "slot":
87
- return `${j}${O()}`;
88
- case "singular":
89
- const { i18n: t, schema: s } = e;
90
- return t ? y : n(s, "default", "");
91
- case "model":
92
- return g(e.properties);
93
- case "list":
94
- return K(e);
95
- default:
96
- return "";
97
- }
98
- };
99
- export {
100
- f as a,
101
- g as b,
102
- d as g
103
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("lodash"),n=i=>({type:"singular",default:i.default||"",binding:e.get(i,"binding",!0),i18n:i.i18n||!1,dataType:"string",required:i.required||!1,schema:{type:"string",...e.omit(i,["i18n","required"])},uiSchema:{"ui:placeholder":i.placeholder||"Enter here"}}),r=i=>({type:"singular",default:i.default||"",binding:e.get(i,"binding",!0),dataType:"string",i18n:i.i18n||!1,required:i.required||!1,schema:{type:"string",...e.omit(i,["i18n","required","rows"])},uiSchema:{"ui:widget":"textarea","ui:placeholder":i.placeholder||"Enter here","ui:options":{rows:i.rows||4}}}),d=i=>({type:"singular",i18n:i.i18n||!1,default:i.default||!1,dataType:"boolean",binding:e.get(i,"binding",!0),schema:{type:"boolean",...e.omit(i,["i18n","required"])},uiSchema:{"ui:title":i.title||"Select Item","ui:description":""}}),a=i=>({type:"singular",default:i.default||"",binding:e.get(i,"binding",!0),dataType:"number",i18n:i.i18n||!1,required:i.required||!1,schema:{type:"number",...e.omit(i,["i18n","required"])},uiSchema:{}}),u=i=>({type:"singular",default:i.default||"",binding:e.get(i,"binding",!0),i18n:i.i18n||!1,required:i.required||!1,dataType:"string",schema:{type:"string",...e.omit(i,["i18n","required","options","binding"]),oneOf:i.options.map(t=>({const:t.value,title:t.title}))},uiSchema:{"ui:widget":"select"}}),g=i=>({type:"singular",i18n:i.i18n||!1,default:i.default||"",binding:e.get(i,"binding",!0),dataType:"string",schema:{type:"string",...e.omit(i,["i18n","required"])},uiSchema:{"ui:widget":"color"}}),l=i=>({type:"model",title:i.title,dataType:"object",default:i.default||{},binding:e.get(i,"binding",!0),properties:i.properties}),s=i=>({type:"singular",default:i.default||"",binding:e.get(i,"binding",!0),dataType:"string",i18n:i.i18n||!1,schema:{type:"string",...e.omit(i,["i18n","required"])},uiSchema:{"ui:widget":"image"}});exports.b=l;exports.c=a;exports.f=u;exports.g=r;exports.o=s;exports.r=d;exports.u=n;exports.y=g;
@@ -1,118 +0,0 @@
1
- import { get as e, omit as n } from "lodash";
2
- const d = (i) => ({
3
- type: "singular",
4
- default: i.default || "",
5
- binding: e(i, "binding", !0),
6
- i18n: i.i18n || !1,
7
- dataType: "string",
8
- required: i.required || !1,
9
- schema: {
10
- type: "string",
11
- ...n(i, ["i18n", "required"])
12
- },
13
- uiSchema: {
14
- "ui:placeholder": i.placeholder || "Enter here"
15
- }
16
- }), a = (i) => ({
17
- type: "singular",
18
- default: i.default || "",
19
- binding: e(i, "binding", !0),
20
- dataType: "string",
21
- i18n: i.i18n || !1,
22
- required: i.required || !1,
23
- schema: {
24
- type: "string",
25
- ...n(i, ["i18n", "required", "rows"])
26
- },
27
- uiSchema: {
28
- "ui:widget": "textarea",
29
- "ui:placeholder": i.placeholder || "Enter here",
30
- "ui:options": {
31
- rows: i.rows || 4
32
- }
33
- }
34
- }), u = (i) => ({
35
- type: "singular",
36
- i18n: i.i18n || !1,
37
- default: i.default || !1,
38
- dataType: "boolean",
39
- binding: e(i, "binding", !0),
40
- schema: {
41
- type: "boolean",
42
- ...n(i, ["i18n", "required"])
43
- },
44
- uiSchema: {
45
- "ui:title": i.title || "Select Item",
46
- "ui:description": ""
47
- }
48
- }), l = (i) => ({
49
- type: "singular",
50
- default: i.default || "",
51
- binding: e(i, "binding", !0),
52
- dataType: "number",
53
- i18n: i.i18n || !1,
54
- required: i.required || !1,
55
- schema: {
56
- type: "number",
57
- ...n(i, ["i18n", "required"])
58
- },
59
- uiSchema: {}
60
- }), g = (i) => ({
61
- type: "singular",
62
- default: i.default || "",
63
- binding: e(i, "binding", !0),
64
- i18n: i.i18n || !1,
65
- required: i.required || !1,
66
- dataType: "string",
67
- schema: {
68
- type: "string",
69
- ...n(i, ["i18n", "required", "options", "binding"]),
70
- oneOf: i.options.map((t) => ({ const: t.value, title: t.title }))
71
- },
72
- uiSchema: {
73
- "ui:widget": "select"
74
- }
75
- }), p = (i) => ({
76
- type: "singular",
77
- i18n: i.i18n || !1,
78
- default: i.default || "",
79
- binding: e(i, "binding", !0),
80
- dataType: "string",
81
- schema: {
82
- type: "string",
83
- ...n(i, ["i18n", "required"])
84
- },
85
- uiSchema: {
86
- "ui:widget": "color"
87
- }
88
- }), s = (i) => ({
89
- type: "model",
90
- title: i.title,
91
- dataType: "object",
92
- default: i.default || {},
93
- binding: e(i, "binding", !0),
94
- properties: i.properties
95
- }), o = (i) => ({
96
- type: "singular",
97
- default: i.default || "",
98
- binding: e(i, "binding", !0),
99
- dataType: "string",
100
- i18n: i.i18n || !1,
101
- schema: {
102
- type: "string",
103
- ...n(i, ["i18n", "required"])
104
- },
105
- uiSchema: {
106
- "ui:widget": "image"
107
- }
108
- });
109
- export {
110
- s as b,
111
- l as c,
112
- g as f,
113
- a as g,
114
- o,
115
- u as r,
116
- d as u,
117
- p as y
118
- };
@@ -1 +0,0 @@
1
- "use strict";const s=require("lodash"),y=require("./functions-uw7QP2kT.cjs"),m=require("./MODIFIERS-Fx6WAZcw.cjs"),f=(e,t="")=>{switch(e.type){case"singular":return e.uiSchema;case"model":const{properties:r}=e,u={};return Object.keys(r).forEach(i=>{const o=r[i];if(s.includes(["slot","styles"],o.type))return;const c=s.get(o,"i18n",!1)?`${i}-${t}`:i;u[c]=f(o,t)}),u;case"list":const{itemProperties:p}=e,l={items:{}};return Object.keys(p).forEach(i=>{const o=p[i];if(s.includes(["slot","styles"],o.type))return;const c=s.get(o,"i18n",!1)?`${i}-${t}`:i;l.items[c]=f(o,t)}),l;default:return{}}},d=(e,t="")=>{switch(e.type){case"singular":return e.schema;case"model":const{properties:r,title:u}=e,p={title:u,type:"object",properties:{}};return Object.keys(r).forEach(c=>{const n=r[c];if(s.includes(["slot","styles"],n.type))return;const a=s.get(n,"i18n",!1)?`${c}-${t}`:c;p.properties[a]=d(n,t)}),p;case"list":const{itemProperties:l,title:i}=e,o={title:i,type:"array",items:{type:"object",properties:{}}};return Object.keys(l).forEach(c=>{const n=l[c];if(s.includes(["slot","styles"],n.type))return;const a=s.get(n,"i18n",!1)?`${c}-${t}`:c;o.items.properties[a]=d(n,t),s.set(o.items,"title",s.get(n,"itemTitle",`${i} item`))}),o;default:return{}}},h=e=>{const t={};return Object.keys(e).forEach(r=>{t[r]=P(e[r])}),t},g=e=>{if(s.isEmpty(e.default))return[];const{itemProperties:t}=e;return s.map(e.default,r=>{const u={...r};return s.forIn(r,(p,l)=>{s.has(t,l)&&s.get(t[l],"i18n",!1)&&(u[l]=m.I18N_KEY)}),u})},P=e=>{switch(e.type){case"styles":return e.default;case"slot":return`${m.SLOT_KEY}${y.generateUUID()}`;case"singular":const{i18n:t,schema:r}=e;return t?m.I18N_KEY:s.get(r,"default","");case"model":return h(e.properties);case"list":return g(e);default:return""}};exports.getBlockDefaultProps=h;exports.getBlockJSONFromSchemas=d;exports.getBlockJSONFromUISchemas=f;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),l=require("./skeleton-JHP9zwL2.cjs"),r=require("./alert-dialog-Mv0-wAvS.cjs"),d=require("./index-X9ZgD09V.cjs"),x=require("@radix-ui/react-icons");require("react");require("jotai");require("lodash");require("@radix-ui/react-slot");require("class-variance-authority");require("./utils-qK_SjzzV.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("@radix-ui/react-alert-dialog");require("./ChaiBuilderEditor-BoE-sArB.cjs");require("./MODIFIERS-Fx6WAZcw.cjs");require("@radix-ui/react-scroll-area");require("react-dom");require("@floating-ui/react-dom");require("i18next");require("react-i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("./functions-uw7QP2kT.cjs");require("redux-undo");require("@react-hookz/web");require("./index-HAue58ea.cjs");require("sonner");require("./html-to-json-P6GpbcQX.cjs");require("himalaya");require("lucide-react");const c=({pageData:i,projectData:s})=>{const n={},t=d.useDeletePage(),u=i.uuid===s.homepage,o=()=>{t.mutate(i,{onSuccess:()=>{n({uuid:s.homepage,slug:"/home"})}})};return e.jsxRuntimeExports.jsxs(r.AlertDialog,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTrigger,{disabled:u,children:e.jsxRuntimeExports.jsx("div",{className:`flex h-full items-center justify-center rounded-md border px-2 py-2 font-medium hover:bg-red-400 hover:text-white ${u?"cursor-not-allowed border-red-200 text-red-200":"cursor-pointer border-red-400 text-red-400"}`,children:e.jsxRuntimeExports.jsx(x.TrashIcon,{})})}),e.jsxRuntimeExports.jsxs(r.AlertDialogContent,{children:[e.jsxRuntimeExports.jsxs(r.AlertDialogTitle,{children:["Are you sure you want to delete ",e.jsxRuntimeExports.jsx("i",{className:"text-red-500",children:i.name})," page?"]}),e.jsxRuntimeExports.jsx(r.AlertDialogDescription,{children:"This action cannot be undone. This will permanently delete your page."}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-3",children:[e.jsxRuntimeExports.jsx(r.AlertDialogCancel,{disabled:t.isPending,children:"Cancel"}),e.jsxRuntimeExports.jsx(l.Button,{variant:"destructive",onClick:o,disabled:t.isPending,children:"Yes, Delete"})]})]})]})};exports.default=c;
@@ -1,69 +0,0 @@
1
- import { j as e } from "./jsx-runtime-Sp0orL4X.js";
2
- import { B as l } from "./skeleton-CU_FIbg3.js";
3
- import { A as n, a as p, b as d, e as a, f as c, h as u } from "./alert-dialog-GNfnpqFB.js";
4
- import { h } from "./index-T4_wfKl5.js";
5
- import { TrashIcon as x } from "@radix-ui/react-icons";
6
- import "react";
7
- import "jotai";
8
- import "lodash";
9
- import "@radix-ui/react-slot";
10
- import "class-variance-authority";
11
- import "./utils-dze1SGvB.js";
12
- import "clsx";
13
- import "tailwind-merge";
14
- import "@radix-ui/react-tooltip";
15
- import "@radix-ui/react-toast";
16
- import "@radix-ui/react-alert-dialog";
17
- import "./ChaiBuilderEditor-hEuUONQ3.js";
18
- import "./MODIFIERS-DsEzQ3aH.js";
19
- import "@radix-ui/react-scroll-area";
20
- import "react-dom";
21
- import "@floating-ui/react-dom";
22
- import "i18next";
23
- import "react-i18next";
24
- import "flagged";
25
- import "react-dnd";
26
- import "@minoru/react-dnd-treeview";
27
- import "react-hotkeys-hook";
28
- import "flat-to-nested";
29
- import "./functions-pcUZhFJM.js";
30
- import "redux-undo";
31
- import "@react-hookz/web";
32
- import "./index-ehKdBRUK.js";
33
- import "sonner";
34
- import "./html-to-json-pdHQfRkN.js";
35
- import "himalaya";
36
- import "lucide-react";
37
- const Z = ({ pageData: r, projectData: i }) => {
38
- const s = {}, t = h(), o = r.uuid === i.homepage, m = () => {
39
- t.mutate(r, {
40
- onSuccess: () => {
41
- s({ uuid: i.homepage, slug: "/home" });
42
- }
43
- });
44
- };
45
- return /* @__PURE__ */ e.jsxs(n, { children: [
46
- /* @__PURE__ */ e.jsx(p, { disabled: o, children: /* @__PURE__ */ e.jsx(
47
- "div",
48
- {
49
- className: `flex h-full items-center justify-center rounded-md border px-2 py-2 font-medium hover:bg-red-400 hover:text-white ${o ? "cursor-not-allowed border-red-200 text-red-200" : "cursor-pointer border-red-400 text-red-400"}`,
50
- children: /* @__PURE__ */ e.jsx(x, {})
51
- }
52
- ) }),
53
- /* @__PURE__ */ e.jsxs(d, { children: [
54
- /* @__PURE__ */ e.jsxs(a, { children: [
55
- "Are you sure you want to delete ",
56
- /* @__PURE__ */ e.jsx("i", { className: "text-red-500", children: r.name }),
57
- " page?"
58
- ] }),
59
- /* @__PURE__ */ e.jsx(c, { children: "This action cannot be undone. This will permanently delete your page." }),
60
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-3", children: [
61
- /* @__PURE__ */ e.jsx(u, { disabled: t.isPending, children: "Cancel" }),
62
- /* @__PURE__ */ e.jsx(l, { variant: "destructive", onClick: m, disabled: t.isPending, children: "Yes, Delete" })
63
- ] })
64
- ] })
65
- ] });
66
- };
67
- export {
68
- Z as default
69
- };
@@ -1 +0,0 @@
1
- "use strict";const o=require("./jsx-runtime-JYMCiFoE.cjs"),f=require("react"),j=require("@radix-ui/react-dialog"),y=require("@radix-ui/react-icons"),n=require("./utils-qK_SjzzV.cjs");function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const r=l(f),a=l(j),D=a.Root,N=a.Trigger,c=({className:e,...t})=>o.jsxRuntimeExports.jsx(a.Portal,{className:n.cn(e),...t});c.displayName=a.Portal.displayName;const d=r.forwardRef(({className:e,...t},s)=>o.jsxRuntimeExports.jsx(a.Overlay,{ref:s,className:n.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));d.displayName=a.Overlay.displayName;const m=r.forwardRef(({className:e,children:t,...s},i)=>o.jsxRuntimeExports.jsxs(c,{children:[o.jsxRuntimeExports.jsx(d,{}),o.jsxRuntimeExports.jsxs(a.Content,{ref:i,className:n.cn("fixed left-[50%] top-[50%] z-[999] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...s,children:[t,o.jsxRuntimeExports.jsxs(a.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[o.jsxRuntimeExports.jsx(y.Cross2Icon,{className:"h-4 w-4"}),o.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));m.displayName=a.Content.displayName;const p=({className:e,...t})=>o.jsxRuntimeExports.jsx("div",{className:n.cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});p.displayName="DialogHeader";const u=({className:e,...t})=>o.jsxRuntimeExports.jsx("div",{className:n.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});u.displayName="DialogFooter";const x=r.forwardRef(({className:e,...t},s)=>o.jsxRuntimeExports.jsx(a.Title,{ref:s,className:n.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));x.displayName=a.Title.displayName;const g=r.forwardRef(({className:e,...t},s)=>o.jsxRuntimeExports.jsx(a.Description,{ref:s,className:n.cn("text-sm text-muted-foreground",e),...t}));g.displayName=a.Description.displayName;exports.Dialog=D;exports.DialogContent=m;exports.DialogDescription=g;exports.DialogFooter=u;exports.DialogHeader=p;exports.DialogTitle=x;exports.DialogTrigger=N;
@@ -1,65 +0,0 @@
1
- import { j as s } from "./jsx-runtime-Sp0orL4X.js";
2
- import * as l from "react";
3
- import * as t from "@radix-ui/react-dialog";
4
- import { Cross2Icon as c } from "@radix-ui/react-icons";
5
- import { c as i } from "./utils-dze1SGvB.js";
6
- const j = t.Root, D = t.Trigger, d = ({ className: a, ...e }) => /* @__PURE__ */ s.jsx(t.Portal, { className: i(a), ...e });
7
- d.displayName = t.Portal.displayName;
8
- const n = l.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ s.jsx(
9
- t.Overlay,
10
- {
11
- ref: o,
12
- className: i(
13
- "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
14
- a
15
- ),
16
- ...e
17
- }
18
- ));
19
- n.displayName = t.Overlay.displayName;
20
- const m = l.forwardRef(({ className: a, children: e, ...o }, r) => /* @__PURE__ */ s.jsxs(d, { children: [
21
- /* @__PURE__ */ s.jsx(n, {}),
22
- /* @__PURE__ */ s.jsxs(
23
- t.Content,
24
- {
25
- ref: r,
26
- className: i(
27
- "fixed left-[50%] top-[50%] z-[999] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
28
- a
29
- ),
30
- ...o,
31
- children: [
32
- e,
33
- /* @__PURE__ */ s.jsxs(t.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
34
- /* @__PURE__ */ s.jsx(c, { className: "h-4 w-4" }),
35
- /* @__PURE__ */ s.jsx("span", { className: "sr-only", children: "Close" })
36
- ] })
37
- ]
38
- }
39
- )
40
- ] }));
41
- m.displayName = t.Content.displayName;
42
- const f = ({ className: a, ...e }) => /* @__PURE__ */ s.jsx("div", { className: i("flex flex-col space-y-1.5 text-center sm:text-left", a), ...e });
43
- f.displayName = "DialogHeader";
44
- const p = ({ className: a, ...e }) => /* @__PURE__ */ s.jsx("div", { className: i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", a), ...e });
45
- p.displayName = "DialogFooter";
46
- const g = l.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ s.jsx(
47
- t.Title,
48
- {
49
- ref: o,
50
- className: i("text-lg font-semibold leading-none tracking-tight", a),
51
- ...e
52
- }
53
- ));
54
- g.displayName = t.Title.displayName;
55
- const x = l.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ s.jsx(t.Description, { ref: o, className: i("text-sm text-muted-foreground", a), ...e }));
56
- x.displayName = t.Description.displayName;
57
- export {
58
- j as D,
59
- D as a,
60
- m as b,
61
- f as c,
62
- p as d,
63
- g as e,
64
- x as f
65
- };