@chaibuilder/sdk 1.2.43 → 1.2.44

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 (81) hide show
  1. package/dist/AddBlocks-Bb-K6Y0Z.cjs +1 -0
  2. package/dist/{AddBlocks-9UM7zj57.js → AddBlocks-QCb-vIta.js} +47 -46
  3. package/dist/CanvasArea-Hqy_21xf.js +1215 -0
  4. package/dist/CanvasArea-xvT325mp.cjs +57 -0
  5. package/dist/{ChaiBuilderEditor--NV-B5az.cjs → ChaiBuilderEditor-AIXWnz29.cjs} +44 -44
  6. package/dist/{ChaiBuilderEditor-yf2LRjL1.js → ChaiBuilderEditor-NnMEdW3k.js} +6627 -6635
  7. package/dist/{CurrentPage-rgu6shCq.cjs → CurrentPage-n_oOiHx5.cjs} +1 -1
  8. package/dist/{CurrentPage-hKtVFDxU.js → CurrentPage-rkdt2mNr.js} +3 -3
  9. package/dist/{ListTree-ulr_sjdn.js → ListTree-PuZP9LQu.js} +3 -3
  10. package/dist/{ListTree-fwN6Y_EA.cjs → ListTree-z0FeSAsc.cjs} +1 -1
  11. package/dist/{PagesPanel-v6Nl5KWy.cjs → PagesPanel-4ftrFiS0.cjs} +1 -1
  12. package/dist/{PagesPanel-EHLY-cfj.js → PagesPanel-TYArrNU6.js} +4 -4
  13. package/dist/{ProjectPanel-ck-mOBEg.cjs → ProjectPanel-2scMInUn.cjs} +1 -1
  14. package/dist/{ProjectPanel-qiqyRbwH.js → ProjectPanel-qY_Bnqjm.js} +4 -4
  15. package/dist/{Settings-a7j3ihRx.js → Settings-k9Ll55Wc.js} +965 -892
  16. package/dist/Settings-kbUR5-xt.cjs +1 -0
  17. package/dist/{SidePanels-biCoYtzR.cjs → SidePanels-ZHxoiJ7y.cjs} +1 -1
  18. package/dist/{SidePanels-9XdRZ7rz.js → SidePanels-eOnxPSSw.js} +4 -4
  19. package/dist/{ThemeConfiguration-MaGPPza1.js → ThemeConfiguration-TINcg8VX.js} +5 -5
  20. package/dist/{ThemeConfiguration-f6AxqpmO.cjs → ThemeConfiguration-fRsktVs4.cjs} +1 -1
  21. package/dist/{Topbar-OpgHjdWn.js → Topbar--KrJ6nJg.js} +2 -2
  22. package/dist/{Topbar-cDxKWgN6.cjs → Topbar-tgFkKz7R.cjs} +1 -1
  23. package/dist/{UILibrariesPanel-d08F5Ri0.cjs → UILibrariesPanel-2HyAEVLE.cjs} +1 -1
  24. package/dist/{UILibrariesPanel-HVpapacm.js → UILibrariesPanel-sleogb55.js} +3 -3
  25. package/dist/{UnsplashImages-Gx7dy6mp.js → UnsplashImages-P7_2yEo-.js} +9 -9
  26. package/dist/{UnsplashImages-uyokFuF-.cjs → UnsplashImages-azP_HIqG.cjs} +1 -1
  27. package/dist/{UploadImages-kLPXfW7W.cjs → UploadImages-nnszHoZa.cjs} +1 -1
  28. package/dist/{UploadImages-aClrfKqQ.js → UploadImages-ovzzQW6b.js} +7 -7
  29. package/dist/{add-page-modal-kP7x8GYO.js → add-page-modal-SmBfx0LH.js} +4 -4
  30. package/dist/{add-page-modal-H5MTzKBT.cjs → add-page-modal-nDBqhemF.cjs} +1 -1
  31. package/dist/atoms-ZOWyNoiC.js +6 -0
  32. package/dist/atoms-a0H_593V.cjs +1 -0
  33. package/dist/{confirm-alert-zZAmXzx0.cjs → confirm-alert-75rfTsgE.cjs} +1 -1
  34. package/dist/{confirm-alert-gemzBTIt.js → confirm-alert-yipdBkkj.js} +2 -2
  35. package/dist/core.cjs +1 -1
  36. package/dist/core.d.ts +1 -1
  37. package/dist/core.js +2 -2
  38. package/dist/{delete-page-modal-ER-TAzRL.js → delete-page-modal-HIul7JBc.js} +3 -3
  39. package/dist/{delete-page-modal-E8MFNVWF.cjs → delete-page-modal-lO-dULGW.cjs} +1 -1
  40. package/dist/email-blocks.cjs +1 -1
  41. package/dist/email-blocks.js +30 -30
  42. package/dist/email.cjs +1 -1
  43. package/dist/email.d.ts +1 -1
  44. package/dist/email.js +2 -2
  45. package/dist/empty-slot-Lsxjts7Q.js +6 -0
  46. package/dist/empty-slot-Sy930lX6.cjs +1 -0
  47. package/dist/{form-UruaB3s_.js → form-cZPoXqTP.js} +5 -5
  48. package/dist/{form-l4PB76nt.cjs → form-yq_mbR58.cjs} +1 -1
  49. package/dist/{index-rKrjj7Vz.js → index-Vu40oRWp.js} +2 -2
  50. package/dist/{index-PXyps6Qc.cjs → index-q_bEEzdK.cjs} +1 -1
  51. package/dist/lib.cjs +1 -1
  52. package/dist/lib.js +3 -3
  53. package/dist/{page-viewer-wQq2qD96.cjs → page-viewer-3ZqrDjrz.cjs} +1 -1
  54. package/dist/{page-viewer-bCH5PPSH.js → page-viewer-ZOVAaE9q.js} +4 -4
  55. package/dist/{project-general-setting-rdCQBkQZ.js → project-general-setting-2iNlm_kN.js} +8 -8
  56. package/dist/{project-general-setting-A5OelyCo.cjs → project-general-setting-IIxWGrU2.cjs} +1 -1
  57. package/dist/{project-seo-setting-Y_q0WJSy.cjs → project-seo-setting-46PdN9FR.cjs} +1 -1
  58. package/dist/{project-seo-setting-_SGBKl0c.js → project-seo-setting-FX0cbkrO.js} +3 -3
  59. package/dist/{single-page-detail-H3Rb5gkJ.js → single-page-detail-4v8ojQss.js} +5 -5
  60. package/dist/{single-page-detail-xAO7x8a1.cjs → single-page-detail-MsBTVx9h.cjs} +1 -1
  61. package/dist/studio.cjs +1 -1
  62. package/dist/studio.d.ts +1 -1
  63. package/dist/studio.js +3 -3
  64. package/dist/style.css +1 -1
  65. package/dist/ui.cjs +1 -1
  66. package/dist/ui.d.ts +3 -3
  67. package/dist/ui.js +50 -50
  68. package/dist/{useCanvasSettings-IalZcnSd.cjs → useCanvasSettings-A7Qj0z4L.cjs} +1 -1
  69. package/dist/{useCanvasSettings-tkzd9Qrw.js → useCanvasSettings-QH5zCmxD.js} +1 -1
  70. package/dist/utils-K3Zk762G.cjs +1 -0
  71. package/dist/{Class-6Hz2KzYb.js → utils-iMv3T4WT.js} +16 -15
  72. package/dist/web-blocks.cjs +4 -4
  73. package/dist/web-blocks.js +237 -238
  74. package/package.json +2 -2
  75. package/dist/AddBlocks-_6X3bnJZ.cjs +0 -1
  76. package/dist/CanvasArea-HmbcRpgP.cjs +0 -55
  77. package/dist/CanvasArea-a3WMBMi3.js +0 -1199
  78. package/dist/Class-Zc8hpE7f.cjs +0 -1
  79. package/dist/Settings-Rtk4HDKy.cjs +0 -1
  80. package/dist/empty-slot-ZBlsQi6m.js +0 -15
  81. package/dist/empty-slot-nzYOgZuS.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),t=require("lodash-es"),h=require("jotai"),E=require("react-i18next"),s=require("./ChaiBuilderEditor-AIXWnz29.cjs"),b=require("@radix-ui/react-icons"),R=require("@chaibuilder/runtime"),T=require("flagged"),q=require("./STRINGS-gPz7CUOk.cjs"),N=require("./atoms-a0H_593V.cjs"),k=require("./html-to-json-VPWiWWGH.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("i18next");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("./utils-K3Zk762G.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-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-quill");require("react-hotkeys-hook");require("lucide-react");require("himalaya");const y=({block:r})=>{const[,i]=h.useAtom(N.draggedBlockAtom),{type:l,icon:c,label:d}=r,{addCoreBlock:p,addPredefinedBlock:j}=s.useAddBlock(),[o,g]=s.useSelectedBlockIds(),[,f]=s.useHighlightBlockId(),[,x]=h.useAtom(s.activePanelAtom),a=()=>{if(t.has(r,"blocks")){const m=t.isFunction(r.blocks)?r.blocks():r.blocks;j(R.syncBlocksWithDefaults(m),t.first(o))}else p(r,t.first(o));x(q.OUTLINE_KEY)},n=T.useFeature("dnd");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs(s.Tooltip,{children:[e.jsxRuntimeExports.jsx(s.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{onClick:a,type:"button",onDragStart:m=>{m.dataTransfer.setData("text/plain",JSON.stringify(t.omit(r,["component","icon"]))),m.dataTransfer.setDragImage(new Image,0,0),i(t.omit(r,["component","icon"])),setTimeout(()=>{g([]),f(null),x(q.OUTLINE_KEY)},200)},draggable:"true",className:"space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 "+(n?"cursor-grab":"cursor-pointer"),children:[u.createElement(c||b.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:d||l})]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:d||l})})]})})},B=()=>{const{t:r}=E.useTranslation(),[i,l]=u.useState(""),{addPredefinedBlock:c}=s.useAddBlock(),[d]=s.useSelectedBlockIds(),[,p]=h.useAtom(s.activePanelAtom),j=()=>{const o=k.getBlocksFromHTML(i);c([...o],t.first(d)||null),l(""),p(q.OUTLINE_KEY)};return e.jsxRuntimeExports.jsxs(s.Card,{className:"border-border/0 p-0 shadow-none",children:[e.jsxRuntimeExports.jsx(s.CardHeader,{className:"p-3",children:e.jsxRuntimeExports.jsx(s.CardDescription,{children:r("html_snippet_description")})}),e.jsxRuntimeExports.jsx(s.CardContent,{className:"space-y-2 px-3 py-0",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[e.jsxRuntimeExports.jsx(s.Label,{htmlFor:"current",className:"text-sm",children:r("tailwind_html_snippet")}),e.jsxRuntimeExports.jsx(s.Textarea,{autoFocus:!0,tabIndex:1,ref:o=>o&&o.focus(),onChange:o=>l(o.target.value),rows:12,value:i,placeholder:r("enter_code_snippet"),className:"resize-none overflow-x-auto whitespace-pre bg-gray-100 font-mono text-xs font-normal"})]})}),e.jsxRuntimeExports.jsxs(s.CardFooter,{className:"flex flex-col justify-end p-3",children:[e.jsxRuntimeExports.jsx(s.Button,{disabled:i.trim()==="",onClick:()=>j(),size:"sm",className:"w-full",children:r("import_html")}),e.jsxRuntimeExports.jsx(s.Alert,{variant:"default",className:"mt-2 border-none p-1 text-gray-400",children:e.jsxRuntimeExports.jsx(s.AlertTitle,{className:"text-xs font-normal leading-4",children:r("note_imported_html")})})]})]})},v=()=>{const{t:r}=E.useTranslation(),[i,l]=u.useState("core"),[c,d]=u.useState("basic"),p=R.useChaiBlocks(),[,j]=h.useAtom(s.showPredefinedBlockCategoryAtom),o=s.useBuilderProp("importHTMLSupport",!0),g=s.useBuilderProp("filterChaiBlock",()=>!0),f=t.filter(p,g),x=t.groupBy(f,"category"),a=t.uniq(t.map(x.core,"group"));return u.useEffect(()=>{!t.includes(a,c)&&!t.isEmpty(a)&&!t.isEmpty(c)&&d(t.first(a))},[a,c]),e.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-72 flex-col overflow-hidden",children:[e.jsxRuntimeExports.jsxs("div",{className:"mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col",children:r("add_block")}),e.jsxRuntimeExports.jsx("span",{className:"p-0 text-xs font-light leading-3 opacity-80 xl:pl-1",children:r(i==="html"?"enter_paste_tailwind_html":"click_to_add_block")})]}),e.jsxRuntimeExports.jsx(s.Tabs,{onValueChange:n=>{j(""),l(n)},value:i,className:"h-max",children:e.jsxRuntimeExports.jsxs(s.TabsList,{className:"grid w-full "+(o?"grid-cols-2":"grid-cols-1"),children:[e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"core",children:r("Blocks")}),o?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"html",children:r("import")}):null]})}),i==="core"&&e.jsxRuntimeExports.jsx(s.ScrollArea,{className:"-mx-1.5 h-[calc(100vh-156px)] overflow-y-auto",children:e.jsxRuntimeExports.jsx("div",{className:"mt-2 w-full",children:u.Children.toArray(t.map(a,n=>t.reject(t.filter(t.values(x.core),{group:n}),{hidden:!0}).length?e.jsxRuntimeExports.jsx(s.Accordion,{type:"single",value:n,collapsible:!0,className:"w-full",children:e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:n,children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"rounded-md bg-gray-100 px-4 py-2 capitalize",children:n}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"p-3",children:e.jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-2",children:u.Children.toArray(t.reject(t.filter(t.values(x.core),{group:n}),{hidden:!0}).map(m=>e.jsxRuntimeExports.jsx(y,{block:m})))})})]})}):null))})}),i==="html"&&o?e.jsxRuntimeExports.jsx(B,{}):null]})};exports.default=v;
@@ -1,14 +1,15 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
- import j, { createElement as L, useState as f, useEffect as S } from "react";
3
- import { has as E, isFunction as F, first as h, omit as H, filter as u, groupBy as I, uniq as z, map as k, includes as D, isEmpty as N, reject as y, values as C } from "lodash-es";
4
- import { useAtom as g } from "jotai";
5
- import { useTranslation as T } from "react-i18next";
6
- import { m as _, L as A, z as M, ag as w, ac as q, ad as O, ae as R, bh as G, bi as J, bj as K, bk as U, aq as V, bl as W, bm as Y, B as Q, bn as X, bo as Z, bp as $, h as v, ai as ee, aj as te, ak as B, bb as se, b4 as oe, b5 as re, b6 as ae, b7 as le } from "./ChaiBuilderEditor-yf2LRjL1.js";
2
+ import k, { createElement as L, useState as b, useEffect as S } from "react";
3
+ import { has as E, isFunction as F, first as h, omit as N, filter as g, groupBy as H, uniq as D, map as B, includes as q, isEmpty as y, reject as C, values as v } from "lodash-es";
4
+ import { useAtom as x } from "jotai";
5
+ import { useTranslation as A } from "react-i18next";
6
+ import { m as w, L as I, z, ag as P, ac as M, ad as O, ae as R, bk as G, bl as J, bm as K, bn as U, aq as V, ba as W, bo as Y, B as Q, bp as X, bq as Z, br as $, h as T, ai as ee, aj as te, ak as _, bf as se, b5 as oe, b6 as re, b7 as ae, b8 as le } from "./ChaiBuilderEditor-NnMEdW3k.js";
7
7
  import { BoxIcon as ie } from "@radix-ui/react-icons";
8
8
  import { syncBlocksWithDefaults as ce, useChaiBlocks as ne } from "@chaibuilder/runtime";
9
9
  import { useFeature as de } from "flagged";
10
- import { O as b } from "./STRINGS--j49GZJP.js";
11
- import { g as me } from "./html-to-json-Z6R2o_fA.js";
10
+ import { O as j } from "./STRINGS--j49GZJP.js";
11
+ import { d as me } from "./atoms-ZOWyNoiC.js";
12
+ import { g as pe } from "./html-to-json-Z6R2o_fA.js";
12
13
  import "./_commonjsHelpers-UyOWmZb0.js";
13
14
  import "clsx";
14
15
  import "react-dom";
@@ -19,9 +20,9 @@ import "./Functions-7jnEwJyw.js";
19
20
  import "tailwind-merge";
20
21
  import "@react-hookz/web";
21
22
  import "./MODIFIERS-cBT31iqE.js";
23
+ import "./utils-iMv3T4WT.js";
22
24
  import "@radix-ui/react-toggle";
23
25
  import "class-variance-authority";
24
- import "./Class-6Hz2KzYb.js";
25
26
  import "@radix-ui/react-switch";
26
27
  import "@radix-ui/react-slot";
27
28
  import "@radix-ui/react-accordion";
@@ -44,40 +45,40 @@ import "react-quill";
44
45
  import "react-hotkeys-hook";
45
46
  import "lucide-react";
46
47
  import "himalaya";
47
- const pe = ({ block: t }) => {
48
- const { type: o, icon: i, label: a } = t, { addCoreBlock: n, addPredefinedBlock: d } = _(), [c, s] = A(), [, x] = M(), [, p] = g(w), m = () => {
48
+ const he = ({ block: t }) => {
49
+ const [, o] = x(me), { type: a, icon: l, label: c } = t, { addCoreBlock: m, addPredefinedBlock: p } = w(), [s, u] = I(), [, f] = z(), [, n] = x(P), i = () => {
49
50
  if (E(t, "blocks")) {
50
- const r = F(t.blocks) ? t.blocks() : t.blocks;
51
- d(ce(r), h(c));
51
+ const d = F(t.blocks) ? t.blocks() : t.blocks;
52
+ p(ce(d), h(s));
52
53
  } else
53
- n(t, h(c));
54
- p(b);
55
- }, l = de("dnd");
56
- return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(q, { children: [
54
+ m(t, h(s));
55
+ n(j);
56
+ }, r = de("dnd");
57
+ return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(M, { children: [
57
58
  /* @__PURE__ */ e.jsx(O, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
58
59
  "button",
59
60
  {
60
- onClick: m,
61
+ onClick: i,
61
62
  type: "button",
62
- onDragStart: (r) => {
63
- r.dataTransfer.setData("text/plain", JSON.stringify(H(t, ["component", "icon"]))), setTimeout(() => {
64
- s([]), x(null), p(b);
63
+ onDragStart: (d) => {
64
+ d.dataTransfer.setData("text/plain", JSON.stringify(N(t, ["component", "icon"]))), d.dataTransfer.setDragImage(new Image(), 0, 0), o(N(t, ["component", "icon"])), setTimeout(() => {
65
+ u([]), f(null), n(j);
65
66
  }, 200);
66
67
  },
67
- draggable: l ? "true" : "false",
68
- className: "space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 " + (l ? "cursor-grab" : "cursor-pointer"),
68
+ draggable: "true",
69
+ className: "space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 " + (r ? "cursor-grab" : "cursor-pointer"),
69
70
  children: [
70
- L(i || ie, { className: "w-4 h-4 mx-auto" }),
71
- /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: a || o })
71
+ L(l || ie, { className: "w-4 h-4 mx-auto" }),
72
+ /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: c || a })
72
73
  ]
73
74
  }
74
75
  ) }),
75
- /* @__PURE__ */ e.jsx(R, { children: /* @__PURE__ */ e.jsx("p", { children: a || o }) })
76
+ /* @__PURE__ */ e.jsx(R, { children: /* @__PURE__ */ e.jsx("p", { children: c || a }) })
76
77
  ] }) });
77
- }, he = () => {
78
- const { t } = T(), [o, i] = f(""), { addPredefinedBlock: a } = _(), [n] = A(), [, d] = g(w), c = () => {
79
- const s = me(o);
80
- a([...s], h(n) || null), i(""), d(b);
78
+ }, xe = () => {
79
+ const { t } = A(), [o, a] = b(""), { addPredefinedBlock: l } = w(), [c] = I(), [, m] = x(P), p = () => {
80
+ const s = pe(o);
81
+ l([...s], h(c) || null), a(""), m(j);
81
82
  };
82
83
  return /* @__PURE__ */ e.jsxs(G, { className: "border-border/0 p-0 shadow-none", children: [
83
84
  /* @__PURE__ */ e.jsx(J, { className: "p-3", children: /* @__PURE__ */ e.jsx(K, { children: t("html_snippet_description") }) }),
@@ -89,7 +90,7 @@ const pe = ({ block: t }) => {
89
90
  autoFocus: !0,
90
91
  tabIndex: 1,
91
92
  ref: (s) => s && s.focus(),
92
- onChange: (s) => i(s.target.value),
93
+ onChange: (s) => a(s.target.value),
93
94
  rows: 12,
94
95
  value: o,
95
96
  placeholder: t("enter_code_snippet"),
@@ -98,15 +99,15 @@ const pe = ({ block: t }) => {
98
99
  )
99
100
  ] }) }),
100
101
  /* @__PURE__ */ e.jsxs(Y, { className: "flex flex-col justify-end p-3", children: [
101
- /* @__PURE__ */ e.jsx(Q, { disabled: o.trim() === "", onClick: () => c(), size: "sm", className: "w-full", children: t("import_html") }),
102
+ /* @__PURE__ */ e.jsx(Q, { disabled: o.trim() === "", onClick: () => p(), size: "sm", className: "w-full", children: t("import_html") }),
102
103
  /* @__PURE__ */ e.jsx(X, { variant: "default", className: "mt-2 border-none p-1 text-gray-400", children: /* @__PURE__ */ e.jsx(Z, { className: "text-xs font-normal leading-4", children: t("note_imported_html") }) })
103
104
  ] })
104
105
  ] });
105
- }, lt = () => {
106
- const { t } = T(), [o, i] = f("core"), [a, n] = f("basic"), d = ne(), [, c] = g($), s = v("importHTMLSupport", !0), x = v("filterChaiBlock", () => !0), p = u(d, x), m = I(p, "category"), l = z(k(m.core, "group"));
106
+ }, ct = () => {
107
+ const { t } = A(), [o, a] = b("core"), [l, c] = b("basic"), m = ne(), [, p] = x($), s = T("importHTMLSupport", !0), u = T("filterChaiBlock", () => !0), f = g(m, u), n = H(f, "category"), i = D(B(n.core, "group"));
107
108
  return S(() => {
108
- !D(l, a) && !N(l) && !N(a) && n(h(l));
109
- }, [l, a]), /* @__PURE__ */ e.jsxs("div", { className: "flex h-full w-72 flex-col overflow-hidden", children: [
109
+ !q(i, l) && !y(i) && !y(l) && c(h(i));
110
+ }, [i, l]), /* @__PURE__ */ e.jsxs("div", { className: "flex h-full w-72 flex-col overflow-hidden", children: [
110
111
  /* @__PURE__ */ e.jsxs("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: [
111
112
  /* @__PURE__ */ e.jsx("h1", { className: "flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col", children: t("add_block") }),
112
113
  /* @__PURE__ */ e.jsx("span", { className: "p-0 text-xs font-light leading-3 opacity-80 xl:pl-1", children: t(o === "html" ? "enter_paste_tailwind_html" : "click_to_add_block") })
@@ -115,30 +116,30 @@ const pe = ({ block: t }) => {
115
116
  ee,
116
117
  {
117
118
  onValueChange: (r) => {
118
- c(""), i(r);
119
+ p(""), a(r);
119
120
  },
120
121
  value: o,
121
122
  className: "h-max",
122
123
  children: /* @__PURE__ */ e.jsxs(te, { className: "grid w-full " + (s ? "grid-cols-2" : "grid-cols-1"), children: [
123
- /* @__PURE__ */ e.jsx(B, { value: "core", children: t("Blocks") }),
124
- s ? /* @__PURE__ */ e.jsx(B, { value: "html", children: t("import") }) : null
124
+ /* @__PURE__ */ e.jsx(_, { value: "core", children: t("Blocks") }),
125
+ s ? /* @__PURE__ */ e.jsx(_, { value: "html", children: t("import") }) : null
125
126
  ] })
126
127
  }
127
128
  ),
128
- o === "core" && /* @__PURE__ */ e.jsx(se, { className: "-mx-1.5 h-[calc(100vh-156px)] overflow-y-auto", children: /* @__PURE__ */ e.jsx("div", { className: "mt-2 w-full", children: j.Children.toArray(
129
- k(
130
- l,
131
- (r) => y(u(C(m.core), { group: r }), { hidden: !0 }).length ? /* @__PURE__ */ e.jsx(oe, { type: "single", value: r, collapsible: !0, className: "w-full", children: /* @__PURE__ */ e.jsxs(re, { value: r, children: [
129
+ o === "core" && /* @__PURE__ */ e.jsx(se, { className: "-mx-1.5 h-[calc(100vh-156px)] overflow-y-auto", children: /* @__PURE__ */ e.jsx("div", { className: "mt-2 w-full", children: k.Children.toArray(
130
+ B(
131
+ i,
132
+ (r) => C(g(v(n.core), { group: r }), { hidden: !0 }).length ? /* @__PURE__ */ e.jsx(oe, { type: "single", value: r, collapsible: !0, className: "w-full", children: /* @__PURE__ */ e.jsxs(re, { value: r, children: [
132
133
  /* @__PURE__ */ e.jsx(ae, { className: "rounded-md bg-gray-100 px-4 py-2 capitalize", children: r }),
133
- /* @__PURE__ */ e.jsx(le, { className: "p-3", children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3 gap-2", children: j.Children.toArray(
134
- y(u(C(m.core), { group: r }), { hidden: !0 }).map((P) => /* @__PURE__ */ e.jsx(pe, { block: P }))
134
+ /* @__PURE__ */ e.jsx(le, { className: "p-3", children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3 gap-2", children: k.Children.toArray(
135
+ C(g(v(n.core), { group: r }), { hidden: !0 }).map((d) => /* @__PURE__ */ e.jsx(he, { block: d }))
135
136
  ) }) })
136
137
  ] }) }) : null
137
138
  )
138
139
  ) }) }),
139
- o === "html" && s ? /* @__PURE__ */ e.jsx(he, {}) : null
140
+ o === "html" && s ? /* @__PURE__ */ e.jsx(xe, {}) : null
140
141
  ] });
141
142
  };
142
143
  export {
143
- lt as default
144
+ ct as default
144
145
  };