@chaibuilder/sdk 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AddBlocks-H7BZYHUC.js → AddBlocks-eoo1CzaK.js} +114 -111
- package/dist/AddBlocks-jU0NwP_s.cjs +3 -0
- package/dist/BrandingOptions-WSCFnWAf.cjs +1 -0
- package/dist/{BrandingOptions-PAgY-kvj.js → BrandingOptions-_Og7VUHA.js} +57 -41
- package/dist/{CanvasArea-zn2ox-5h.js → CanvasArea-cky_d2Lu.js} +517 -519
- package/dist/CanvasArea-hT9uHhkz.cjs +46 -0
- package/dist/Class-RZuPYbUS.cjs +1 -0
- package/dist/{Class-l7qYbuoN.js → Class-nQk08vqd.js} +204 -124
- package/dist/{CurrentPage-6Jp4xAWK.js → CurrentPage--OlBwyNE.js} +58 -40
- package/dist/CurrentPage-x6Ez11gP.cjs +1 -0
- package/dist/Layers-gEA0qWYP.cjs +1 -0
- package/dist/{Layers-WkZ48AUm.js → Layers-uzA3QA-4.js} +158 -141
- package/dist/MarkAsGlobalBlock-lYL8cO9x.cjs +1 -0
- package/dist/MarkAsGlobalBlock-ySc-D4SB.js +84 -0
- package/dist/PagesPanel-5t0bV9T2.cjs +1 -0
- package/dist/PagesPanel-tH6c9Mnv.js +70 -0
- package/dist/ProjectPanel-NdrR6a8t.cjs +1 -0
- package/dist/ProjectPanel-Q2-15-In.js +91 -0
- package/dist/Settings-DBiwm1hY.cjs +1 -0
- package/dist/{Settings-fH8fZKpm.js → Settings-LOqpvQ_1.js} +411 -408
- package/dist/SidePanels-8JWYXGqN.cjs +1 -0
- package/dist/{SidePanels-w8ZHKJaR.js → SidePanels-F7ccs2Xf.js} +106 -88
- package/dist/{Topbar-hm1D_5sb.js → Topbar-lX9OMPwj.js} +47 -45
- package/dist/Topbar-qi5ab8rR.cjs +1 -0
- package/dist/UnsplashImages-a2r7b3kB.cjs +1 -0
- package/dist/{UnsplashImages-gPcBLjgB.js → UnsplashImages-u_QTABzi.js} +56 -44
- package/dist/{UploadImages-_ZyUU66E.js → UploadImages-gV5xDHIu.js} +55 -34
- package/dist/UploadImages-jLQgLujd.cjs +1 -0
- package/dist/add-page-modal-U5ramelz.js +110 -0
- package/dist/add-page-modal-tIt3N8jH.cjs +1 -0
- package/dist/confirm-alert-ZQ-sxX0X.js +58 -0
- package/dist/confirm-alert-z74-fGOT.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +99 -124
- package/dist/delete-page-modal-5XuSfQT0.cjs +1 -0
- package/dist/delete-page-modal-_E87bVUZ.js +89 -0
- package/dist/form-Osm1AmO5.cjs +1 -0
- package/dist/{form-dVpOAyRl.js → form-zZJyZuNH.js} +12 -12
- package/dist/index-2EHcmZqL.js +2947 -0
- package/dist/index-RVm8Txnj.js +1149 -0
- package/dist/index-_jFEo7h5.cjs +206 -0
- package/dist/index-c8zW_D2V.cjs +1 -0
- package/dist/index-cU5eyVRU.js +40872 -0
- package/dist/index-fwo4wa7u.cjs +1 -0
- package/dist/index-gmZcUXyn.js +25 -0
- package/dist/index-m2muA80V.cjs +9 -0
- package/dist/{jsx-runtime-JYMCiFoE.cjs → jsx-runtime-WKRPbKtm.cjs} +7 -7
- package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-qAwJ85SY.js} +109 -106
- package/dist/lib.cjs +2 -1
- package/dist/lib.js +1333 -71
- package/dist/page-viewer-BSc-5M4B.cjs +1 -0
- package/dist/{page-viewer-Y4YiaZ_m.js → page-viewer-nLqIs_9w.js} +62 -44
- package/dist/project-general-setting-14MA_cX5.cjs +1 -0
- package/dist/{project-general-setting-U4S_KlhU.js → project-general-setting-kXh5myAr.js} +46 -36
- package/dist/project-seo-setting-POGPEJZ8.cjs +1 -0
- package/dist/project-seo-setting-nT1qo1Bb.js +89 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +23 -19
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/dist/single-page-detail-EgQd9TSA.cjs +1 -0
- package/dist/{single-page-detail-pAxCy_Pe.js → single-page-detail-fV-A6vJR.js} +90 -80
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +45 -25
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +156 -357
- package/package.json +1 -1
- package/dist/AddBlocks-7ACJv8LW.cjs +0 -3
- package/dist/BrandingOptions-5j-XszLM.cjs +0 -1
- package/dist/CanvasArea-Dnm-yeus.cjs +0 -46
- package/dist/ChaiBuilderEditor-BoE-sArB.cjs +0 -163
- package/dist/ChaiBuilderEditor-hEuUONQ3.js +0 -27094
- package/dist/Class-_uCzl5v1.cjs +0 -1
- package/dist/CurrentPage-YMpqOqx7.cjs +0 -1
- package/dist/ImagesPanel-6us7hiLN.cjs +0 -1
- package/dist/ImagesPanel-oaHOD-Ex.js +0 -27
- package/dist/Layers-EzOZdWvd.cjs +0 -1
- package/dist/MODIFIERS-DsEzQ3aH.js +0 -73
- package/dist/MODIFIERS-Fx6WAZcw.cjs +0 -1
- package/dist/MarkAsGlobalBlock-0HubcRkY.js +0 -77
- package/dist/MarkAsGlobalBlock-HmeIyLCP.cjs +0 -1
- package/dist/PagesPanel-6JuwBLFQ.js +0 -50
- package/dist/PagesPanel-zJq8p1ja.cjs +0 -1
- package/dist/ProjectPanel-Zml2F8b9.cjs +0 -1
- package/dist/ProjectPanel-cu2QSDW9.js +0 -73
- package/dist/Settings-lc9PfnmG.cjs +0 -1
- package/dist/SidePanels-VH72zFE2.cjs +0 -1
- package/dist/Topbar-vQPo9xSY.cjs +0 -1
- package/dist/UnsplashImages-BoBBSi1a.cjs +0 -1
- package/dist/UploadImages-T6kW0s3G.cjs +0 -1
- package/dist/accordion-oPUeqPCZ.js +0 -42
- package/dist/accordion-ynvFtV_p.cjs +0 -1
- package/dist/add-page-modal--qZSwJuB.cjs +0 -1
- package/dist/add-page-modal-bj7qbZuK.js +0 -99
- package/dist/alert-dialog-GNfnpqFB.js +0 -64
- package/dist/alert-dialog-Mv0-wAvS.cjs +0 -1
- package/dist/command-ThdTuUxt.cjs +0 -1
- package/dist/command-VHca6CcN.js +0 -97
- package/dist/confirm-alert-8EHe0OOd.cjs +0 -1
- package/dist/confirm-alert-b0e_BLhF.js +0 -36
- package/dist/context-menu-8dC9uGXj.js +0 -122
- package/dist/context-menu-IgLbIuth.cjs +0 -1
- package/dist/controls-Ni5kEzLz.js +0 -103
- package/dist/controls-W97-POR_.cjs +0 -1
- package/dist/controls-enQY7NI8.js +0 -118
- package/dist/controls-xUKa23ic.cjs +0 -1
- package/dist/delete-page-modal-2LuDLEiP.cjs +0 -1
- package/dist/delete-page-modal-cnrR8tWH.js +0 -69
- package/dist/dialog-S_QbL1iq.cjs +0 -1
- package/dist/dialog-jrw9DF1f.js +0 -65
- package/dist/dropdown-menu-S03K_fNs.js +0 -164
- package/dist/dropdown-menu-sMXR59cB.cjs +0 -1
- package/dist/form-nRAvKPQj.cjs +0 -1
- package/dist/functions-nNTuSTsR.js +0 -1106
- package/dist/functions-pcUZhFJM.js +0 -12
- package/dist/functions-sCuB7nvZ.cjs +0 -2
- package/dist/functions-uw7QP2kT.cjs +0 -1
- package/dist/html-to-json-P6GpbcQX.cjs +0 -1
- package/dist/html-to-json-pdHQfRkN.js +0 -178
- package/dist/index-HAue58ea.cjs +0 -1
- package/dist/index-T4_wfKl5.js +0 -2256
- package/dist/index-X9ZgD09V.cjs +0 -1
- package/dist/index-ehKdBRUK.js +0 -18
- package/dist/label-KaP7MRrs.js +0 -10
- package/dist/label-tFm8HZdb.cjs +0 -1
- package/dist/link-6o6n2Tnd.js +0 -204
- package/dist/link-ece8dZGH.cjs +0 -1
- package/dist/page-viewer-IARz6OSp.cjs +0 -1
- package/dist/popover-a84pbVhQ.js +0 -23
- package/dist/popover-fKjgcRUx.cjs +0 -1
- package/dist/project-general-setting-eSl3t-VH.cjs +0 -1
- package/dist/project-seo-setting-Ga9v_ECU.js +0 -67
- package/dist/project-seo-setting-rankm1z3.cjs +0 -1
- package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
- package/dist/scroll-area-ewXbxc3n.js +0 -30
- package/dist/select-7bjg-rr9.cjs +0 -1
- package/dist/select-POGdEDHT.js +0 -75
- package/dist/separator-3Civ-6hb.cjs +0 -1
- package/dist/separator-SctTn0Qi.js +0 -18
- package/dist/single-page-detail-yPgnu2AI.cjs +0 -1
- package/dist/skeleton-CU_FIbg3.js +0 -239
- package/dist/skeleton-JHP9zwL2.cjs +0 -1
- package/dist/tabs-Gb9v5dVb.js +0 -46
- package/dist/tabs-iWeaaVrg.cjs +0 -1
- package/dist/textarea-1kZEh7ki.cjs +0 -1
- package/dist/textarea-b2QvVhrK.js +0 -73
- package/dist/toggle-ASJRAaGP.js +0 -30
- package/dist/toggle-ehNIPmme.cjs +0 -1
- package/dist/useAddBlock-WJc3OgG8.js +0 -86
- package/dist/useAddBlock-dCKRFPRU.cjs +0 -1
- package/dist/useAllBlocks-6hvuNuyw.cjs +0 -1
- package/dist/useAllBlocks-PQKYvs-e.js +0 -20
- package/dist/useChaiExternalData-4K9WxANa.js +0 -6
- package/dist/useChaiExternalData-DkyBJ81C.cjs +0 -1
- package/dist/useDarkMode-ZKCO_gkt.js +0 -23
- package/dist/useDarkMode-dV6FM6l-.cjs +0 -1
- package/dist/useFeatureSupport-OLwNgEZb.js +0 -16
- package/dist/useFeatureSupport-c9IgPW2t.cjs +0 -1
- package/dist/useHiddenBlocks-3MsGOJ1s.js +0 -15
- package/dist/useHiddenBlocks-oJuQDmTy.cjs +0 -1
- package/dist/useLanguage-NKKKaxVM.cjs +0 -1
- package/dist/useLanguage-gVC5rxO5.js +0 -216
- package/dist/useMarkAsGlobalBlock-X73Vny8u.js +0 -25
- package/dist/useMarkAsGlobalBlock-ebBVGHg4.cjs +0 -1
- package/dist/useUiLibraries-4hPOi8DI.js +0 -12
- package/dist/useUiLibraries-9FhQCpKo.cjs +0 -1
- package/dist/utils-dze1SGvB.js +0 -6
- package/dist/utils-qK_SjzzV.cjs +0 -1
package/dist/ui.js
CHANGED
|
@@ -1,377 +1,176 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { c as r } from "./utils-dze1SGvB.js";
|
|
9
|
-
import { A as Nt, g as St, h as wt, b as Mt, f as Tt, d as vt, c as Dt, e as jt, a as It } from "./alert-dialog-GNfnpqFB.js";
|
|
10
|
-
import { D as At, b as kt, f as Pt, d as Lt, c as Ft, e as Gt, a as Ht } from "./dialog-jrw9DF1f.js";
|
|
11
|
-
import { C as Vt, a as Bt, d as Et, e as Ot, b as qt, f as Jt, c as Kt, h as Qt, g as Ut, I as Wt } from "./command-VHca6CcN.js";
|
|
12
|
-
import { L as Yt } from "./label-KaP7MRrs.js";
|
|
13
|
-
import { S as _t, a as $t } from "./scroll-area-ewXbxc3n.js";
|
|
14
|
-
import { T as ta, c as aa, a as oa, b as sa } from "./tabs-Gb9v5dVb.js";
|
|
15
|
-
import { P as na, b as ia, a as da } from "./popover-a84pbVhQ.js";
|
|
16
|
-
import * as i from "react";
|
|
17
|
-
import { ChevronRightIcon as f, CheckIcon as g, DotFilledIcon as x, Cross2Icon as b } from "@radix-ui/react-icons";
|
|
18
|
-
import * as s from "@radix-ui/react-menubar";
|
|
19
|
-
import { S as ma, d as ca, a as pa, f as ua, e as fa, g as ga, c as xa, b as ba } from "./select-POGdEDHT.js";
|
|
20
|
-
import * as n from "@radix-ui/react-dialog";
|
|
21
|
-
import { S as Ca } from "./separator-SctTn0Qi.js";
|
|
22
|
-
import { C as Na, d as Sa, b as wa, i as Ma, c as Ta, f as va, j as Da, n as ja, e as Ia, g as Ra, h as Aa, k as ka, l as Pa, m as La, a as Fa } from "./context-menu-8dC9uGXj.js";
|
|
23
|
-
import { I as Ha, a as za, L as Va, R as Ba } from "./link-6o6n2Tnd.js";
|
|
1
|
+
import { bi as f, bl as q, bj as J, bk as K, bD as j, bI as N, D as O, at as Q, K as U, F as W, I as z, J as X, G as Y, H as Z, E as _, bE as $, bJ as aa, B as ea, bw as oa, bA as ta, bz as ra, bC as sa, bx as na, by as ia, b4 as ba, cl as pa, b7 as ua, b8 as ca, b5 as la, b9 as ma, b6 as Ca, cn as da, cm as ga, bs as Ma, co as Sa, br as Da, ct as Ta, bq as xa, cq as wa, cu as Aa, cy as Ia, cp as ha, cr as Pa, cs as Ga, cv as Fa, cw as Ha, cx as La, bt as ka, ao as va, ap as Ra, as as Ba, ba as Va, aq as Ea, ar as ya, bb as fa, aR as qa, aW as Ja, aT as Ka, cc as ja, c9 as Na, aU as Oa, cd as Qa, ch as Ua, ca as Wa, aV as za, cb as Xa, ce as Ya, cf as Za, cg as _a, aS as $a, aO as ae, aQ as ee, aP as oe, bf as te, bg as re, bm as se, aM as ne, bh as ie, bM as be, bT as pe, bP as ue, bZ as ce, bQ as le, bS as me, bN as Ce, bW as de, bU as ge, bV as Me, bR as Se, b$ as De, b_ as Te, bX as xe, bY as we, bO as Ae, b1 as Ie, b3 as he, b2 as Pe, be as Ge, bp as Fe, bL as He, au as Le, ax as ke, aF as ve, ay as Re, aG as Be, c0 as Ve, av as Ee, aw as ye, aL as fe, c1 as qe, c3 as Je, c4 as Ke, c8 as je, c6 as Ne, c5 as Oe, c7 as Qe, c2 as Ue, S as We, aN as ze, aB as Xe, aE as Ye, aC as Ze, aD as _e, bB as $e, C as ao, aJ as eo, aH as oo, aK as to, bn as ro, T as so, aI as no, bK as io, bH as bo, ci as po, ck as uo, bG as co, cj as lo } from "./index-2EHcmZqL.js";
|
|
2
|
+
import "./jsx-runtime-qAwJ85SY.js";
|
|
3
|
+
import "./Class-nQk08vqd.js";
|
|
4
|
+
import "clsx";
|
|
5
|
+
import "tailwind-merge";
|
|
6
|
+
import "lodash";
|
|
7
|
+
import "react";
|
|
24
8
|
import "@radix-ui/react-toggle";
|
|
9
|
+
import "class-variance-authority";
|
|
25
10
|
import "@radix-ui/react-switch";
|
|
26
|
-
import "@radix-ui/react-hover-card";
|
|
27
|
-
import "@radix-ui/react-dropdown-menu";
|
|
28
|
-
import "jotai";
|
|
29
|
-
import "lodash";
|
|
30
11
|
import "@radix-ui/react-slot";
|
|
31
|
-
import "@radix-ui/react-tooltip";
|
|
32
|
-
import "@radix-ui/react-toast";
|
|
33
12
|
import "@radix-ui/react-accordion";
|
|
34
|
-
import "
|
|
35
|
-
import "tailwind-merge";
|
|
13
|
+
import "@radix-ui/react-icons";
|
|
36
14
|
import "@radix-ui/react-alert-dialog";
|
|
37
|
-
import "
|
|
15
|
+
import "@radix-ui/react-dialog";
|
|
38
16
|
import "@radix-ui/react-label";
|
|
39
17
|
import "@radix-ui/react-scroll-area";
|
|
40
18
|
import "@radix-ui/react-tabs";
|
|
19
|
+
import "@radix-ui/react-tooltip";
|
|
41
20
|
import "@radix-ui/react-popover";
|
|
21
|
+
import "@radix-ui/react-menubar";
|
|
22
|
+
import "@radix-ui/react-hover-card";
|
|
42
23
|
import "@radix-ui/react-select";
|
|
24
|
+
import "@radix-ui/react-dropdown-menu";
|
|
43
25
|
import "@radix-ui/react-separator";
|
|
26
|
+
import "@radix-ui/react-toast";
|
|
27
|
+
import "cmdk";
|
|
44
28
|
import "@radix-ui/react-context-menu";
|
|
45
29
|
import "react-icons-picker";
|
|
46
30
|
import "react-dom";
|
|
47
|
-
import "./ImagesPanel-oaHOD-Ex.js";
|
|
48
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";
|
|
49
37
|
import "react-i18next";
|
|
50
|
-
const h = m(
|
|
51
|
-
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
52
|
-
{
|
|
53
|
-
variants: {
|
|
54
|
-
variant: {
|
|
55
|
-
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
56
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
57
|
-
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
58
|
-
outline: "text-foreground"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
defaultVariants: {
|
|
62
|
-
variant: "default"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
), pe = ({ className: e, variant: t, ...o }) => /* @__PURE__ */ a.jsx("div", { className: r(h({ variant: t }), e), ...o }), ue = s.Menu, fe = s.Group, ge = s.Portal, xe = s.Sub, be = s.RadioGroup, C = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
|
|
66
|
-
s.Root,
|
|
67
|
-
{
|
|
68
|
-
ref: o,
|
|
69
|
-
className: r("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", e),
|
|
70
|
-
...t
|
|
71
|
-
}
|
|
72
|
-
));
|
|
73
|
-
C.displayName = s.Root.displayName;
|
|
74
|
-
const y = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
|
|
75
|
-
s.Trigger,
|
|
76
|
-
{
|
|
77
|
-
ref: o,
|
|
78
|
-
className: r(
|
|
79
|
-
"flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
80
|
-
e
|
|
81
|
-
),
|
|
82
|
-
...t
|
|
83
|
-
}
|
|
84
|
-
));
|
|
85
|
-
y.displayName = s.Trigger.displayName;
|
|
86
|
-
const N = i.forwardRef(({ className: e, inset: t, children: o, ...d }, l) => /* @__PURE__ */ a.jsxs(
|
|
87
|
-
s.SubTrigger,
|
|
88
|
-
{
|
|
89
|
-
ref: l,
|
|
90
|
-
className: r(
|
|
91
|
-
"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",
|
|
92
|
-
t && "pl-8",
|
|
93
|
-
e
|
|
94
|
-
),
|
|
95
|
-
...d,
|
|
96
|
-
children: [
|
|
97
|
-
o,
|
|
98
|
-
/* @__PURE__ */ a.jsx(f, { className: "ml-auto h-4 w-4" })
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
));
|
|
102
|
-
N.displayName = s.SubTrigger.displayName;
|
|
103
|
-
const S = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
|
|
104
|
-
s.SubContent,
|
|
105
|
-
{
|
|
106
|
-
ref: o,
|
|
107
|
-
className: r(
|
|
108
|
-
"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",
|
|
109
|
-
e
|
|
110
|
-
),
|
|
111
|
-
...t
|
|
112
|
-
}
|
|
113
|
-
));
|
|
114
|
-
S.displayName = s.SubContent.displayName;
|
|
115
|
-
const w = i.forwardRef(({ className: e, align: t = "start", alignOffset: o = -4, sideOffset: d = 8, ...l }, u) => /* @__PURE__ */ a.jsx(s.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
116
|
-
s.Content,
|
|
117
|
-
{
|
|
118
|
-
ref: u,
|
|
119
|
-
align: t,
|
|
120
|
-
alignOffset: o,
|
|
121
|
-
sideOffset: d,
|
|
122
|
-
className: r(
|
|
123
|
-
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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",
|
|
124
|
-
e
|
|
125
|
-
),
|
|
126
|
-
...l
|
|
127
|
-
}
|
|
128
|
-
) }));
|
|
129
|
-
w.displayName = s.Content.displayName;
|
|
130
|
-
const M = i.forwardRef(({ className: e, inset: t, ...o }, d) => /* @__PURE__ */ a.jsx(
|
|
131
|
-
s.Item,
|
|
132
|
-
{
|
|
133
|
-
ref: d,
|
|
134
|
-
className: r(
|
|
135
|
-
"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",
|
|
136
|
-
t && "pl-8",
|
|
137
|
-
e
|
|
138
|
-
),
|
|
139
|
-
...o
|
|
140
|
-
}
|
|
141
|
-
));
|
|
142
|
-
M.displayName = s.Item.displayName;
|
|
143
|
-
const T = i.forwardRef(({ className: e, children: t, checked: o, ...d }, l) => /* @__PURE__ */ a.jsxs(
|
|
144
|
-
s.CheckboxItem,
|
|
145
|
-
{
|
|
146
|
-
ref: l,
|
|
147
|
-
className: r(
|
|
148
|
-
"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",
|
|
149
|
-
e
|
|
150
|
-
),
|
|
151
|
-
checked: o,
|
|
152
|
-
...d,
|
|
153
|
-
children: [
|
|
154
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(s.ItemIndicator, { children: /* @__PURE__ */ a.jsx(g, { className: "h-4 w-4" }) }) }),
|
|
155
|
-
t
|
|
156
|
-
]
|
|
157
|
-
}
|
|
158
|
-
));
|
|
159
|
-
T.displayName = s.CheckboxItem.displayName;
|
|
160
|
-
const v = i.forwardRef(({ className: e, children: t, ...o }, d) => /* @__PURE__ */ a.jsxs(
|
|
161
|
-
s.RadioItem,
|
|
162
|
-
{
|
|
163
|
-
ref: d,
|
|
164
|
-
className: r(
|
|
165
|
-
"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",
|
|
166
|
-
e
|
|
167
|
-
),
|
|
168
|
-
...o,
|
|
169
|
-
children: [
|
|
170
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(s.ItemIndicator, { children: /* @__PURE__ */ a.jsx(x, { className: "h-4 w-4 fill-current" }) }) }),
|
|
171
|
-
t
|
|
172
|
-
]
|
|
173
|
-
}
|
|
174
|
-
));
|
|
175
|
-
v.displayName = s.RadioItem.displayName;
|
|
176
|
-
const D = i.forwardRef(({ className: e, inset: t, ...o }, d) => /* @__PURE__ */ a.jsx(
|
|
177
|
-
s.Label,
|
|
178
|
-
{
|
|
179
|
-
ref: d,
|
|
180
|
-
className: r("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
|
|
181
|
-
...o
|
|
182
|
-
}
|
|
183
|
-
));
|
|
184
|
-
D.displayName = s.Label.displayName;
|
|
185
|
-
const j = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(s.Separator, { ref: o, className: r("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
186
|
-
j.displayName = s.Separator.displayName;
|
|
187
|
-
const I = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: r("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
188
|
-
I.displayname = "MenubarShortcut";
|
|
189
|
-
const he = n.Root, Ce = n.Trigger, ye = n.Close, c = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(n.Portal, { className: r(e), ...t });
|
|
190
|
-
c.displayName = n.Portal.displayName;
|
|
191
|
-
const p = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(
|
|
192
|
-
n.Overlay,
|
|
193
|
-
{
|
|
194
|
-
className: r(
|
|
195
|
-
"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",
|
|
196
|
-
e
|
|
197
|
-
),
|
|
198
|
-
...t,
|
|
199
|
-
ref: o
|
|
200
|
-
}
|
|
201
|
-
));
|
|
202
|
-
p.displayName = n.Overlay.displayName;
|
|
203
|
-
const R = m(
|
|
204
|
-
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
205
|
-
{
|
|
206
|
-
variants: {
|
|
207
|
-
side: {
|
|
208
|
-
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
209
|
-
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
210
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
211
|
-
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
defaultVariants: {
|
|
215
|
-
side: "right"
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
), A = i.forwardRef(
|
|
219
|
-
({ side: e = "right", className: t, children: o, ...d }, l) => /* @__PURE__ */ a.jsxs(c, { children: [
|
|
220
|
-
/* @__PURE__ */ a.jsx(p, {}),
|
|
221
|
-
/* @__PURE__ */ a.jsxs(n.Content, { ref: l, className: r(R({ side: e }), t), ...d, children: [
|
|
222
|
-
o,
|
|
223
|
-
/* @__PURE__ */ a.jsxs(n.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-secondary", children: [
|
|
224
|
-
/* @__PURE__ */ a.jsx(b, { className: "h-4 w-4" }),
|
|
225
|
-
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
|
|
226
|
-
] })
|
|
227
|
-
] })
|
|
228
|
-
] })
|
|
229
|
-
);
|
|
230
|
-
A.displayName = n.Content.displayName;
|
|
231
|
-
const k = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: r("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
|
|
232
|
-
k.displayName = "SheetHeader";
|
|
233
|
-
const P = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
234
|
-
P.displayName = "SheetFooter";
|
|
235
|
-
const L = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(n.Title, { ref: o, className: r("text-lg font-semibold text-foreground", e), ...t }));
|
|
236
|
-
L.displayName = n.Title.displayName;
|
|
237
|
-
const F = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a.jsx(n.Description, { ref: o, className: r("text-sm text-muted-foreground", e), ...t }));
|
|
238
|
-
F.displayName = n.Description.displayName;
|
|
239
38
|
export {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
39
|
+
f as Accordion,
|
|
40
|
+
q as AccordionContent,
|
|
41
|
+
J as AccordionItem,
|
|
42
|
+
K as AccordionTrigger,
|
|
43
|
+
j as Alert,
|
|
44
|
+
N as AlertDescription,
|
|
45
|
+
O as AlertDialog,
|
|
46
|
+
Q as AlertDialogAction,
|
|
47
|
+
U as AlertDialogCancel,
|
|
48
|
+
W as AlertDialogContent,
|
|
49
|
+
z as AlertDialogDescription,
|
|
50
|
+
X as AlertDialogFooter,
|
|
51
|
+
Y as AlertDialogHeader,
|
|
52
|
+
Z as AlertDialogTitle,
|
|
53
|
+
_ as AlertDialogTrigger,
|
|
54
|
+
$ as AlertTitle,
|
|
55
|
+
aa as Badge,
|
|
56
|
+
ea as Button,
|
|
57
|
+
oa as Card,
|
|
58
|
+
ta as CardContent,
|
|
59
|
+
ra as CardDescription,
|
|
60
|
+
sa as CardFooter,
|
|
61
|
+
na as CardHeader,
|
|
62
|
+
ia as CardTitle,
|
|
63
|
+
ba as Command,
|
|
64
|
+
pa as CommandDialog,
|
|
65
|
+
ua as CommandEmpty,
|
|
66
|
+
ca as CommandGroup,
|
|
67
|
+
la as CommandInput,
|
|
68
|
+
ma as CommandItem,
|
|
69
|
+
Ca as CommandList,
|
|
70
|
+
da as CommandSeparator,
|
|
71
|
+
ga as CommandShortcut,
|
|
72
|
+
Ma as ContextMenu,
|
|
274
73
|
Sa as ContextMenuCheckboxItem,
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
74
|
+
Da as ContextMenuContent,
|
|
75
|
+
Ta as ContextMenuGroup,
|
|
76
|
+
xa as ContextMenuItem,
|
|
77
|
+
wa as ContextMenuLabel,
|
|
78
|
+
Aa as ContextMenuPortal,
|
|
79
|
+
Ia as ContextMenuRadioGroup,
|
|
80
|
+
ha as ContextMenuRadioItem,
|
|
81
|
+
Pa as ContextMenuSeparator,
|
|
82
|
+
Ga as ContextMenuShortcut,
|
|
83
|
+
Fa as ContextMenuSub,
|
|
84
|
+
Ha as ContextMenuSubContent,
|
|
286
85
|
La as ContextMenuSubTrigger,
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
86
|
+
ka as ContextMenuTrigger,
|
|
87
|
+
va as Dialog,
|
|
88
|
+
Ra as DialogContent,
|
|
89
|
+
Ba as DialogDescription,
|
|
90
|
+
Va as DialogFooter,
|
|
91
|
+
Ea as DialogHeader,
|
|
92
|
+
ya as DialogTitle,
|
|
93
|
+
fa as DialogTrigger,
|
|
94
|
+
qa as DropdownMenu,
|
|
95
|
+
Ja as DropdownMenuCheckboxItem,
|
|
96
|
+
Ka as DropdownMenuContent,
|
|
97
|
+
ja as DropdownMenuGroup,
|
|
98
|
+
Na as DropdownMenuItem,
|
|
99
|
+
Oa as DropdownMenuLabel,
|
|
100
|
+
Qa as DropdownMenuPortal,
|
|
101
|
+
Ua as DropdownMenuRadioGroup,
|
|
102
|
+
Wa as DropdownMenuRadioItem,
|
|
103
|
+
za as DropdownMenuSeparator,
|
|
104
|
+
Xa as DropdownMenuShortcut,
|
|
105
|
+
Ya as DropdownMenuSub,
|
|
106
|
+
Za as DropdownMenuSubContent,
|
|
107
|
+
_a as DropdownMenuSubTrigger,
|
|
108
|
+
$a as DropdownMenuTrigger,
|
|
109
|
+
ae as HoverCard,
|
|
110
|
+
ee as HoverCardContent,
|
|
111
|
+
oe as HoverCardTrigger,
|
|
112
|
+
te as IconPickerField,
|
|
113
|
+
re as ImagePickerField,
|
|
114
|
+
se as Input,
|
|
115
|
+
ne as Label,
|
|
116
|
+
ie as LinkField,
|
|
117
|
+
be as Menubar,
|
|
118
|
+
pe as MenubarCheckboxItem,
|
|
119
|
+
ue as MenubarContent,
|
|
120
|
+
ce as MenubarGroup,
|
|
121
|
+
le as MenubarItem,
|
|
122
|
+
me as MenubarLabel,
|
|
123
|
+
Ce as MenubarMenu,
|
|
124
|
+
de as MenubarPortal,
|
|
125
|
+
ge as MenubarRadioGroup,
|
|
126
|
+
Me as MenubarRadioItem,
|
|
127
|
+
Se as MenubarSeparator,
|
|
128
|
+
De as MenubarShortcut,
|
|
129
|
+
Te as MenubarSub,
|
|
130
|
+
xe as MenubarSubContent,
|
|
131
|
+
we as MenubarSubTrigger,
|
|
132
|
+
Ae as MenubarTrigger,
|
|
133
|
+
Ie as Popover,
|
|
134
|
+
he as PopoverContent,
|
|
135
|
+
Pe as PopoverTrigger,
|
|
136
|
+
Ge as RTEField,
|
|
137
|
+
Fe as ScrollArea,
|
|
138
|
+
He as ScrollBar,
|
|
139
|
+
Le as Select,
|
|
140
|
+
ke as SelectContent,
|
|
141
|
+
ve as SelectGroup,
|
|
142
|
+
Re as SelectItem,
|
|
143
|
+
Be as SelectLabel,
|
|
144
|
+
Ve as SelectSeparator,
|
|
145
|
+
Ee as SelectTrigger,
|
|
146
|
+
ye as SelectValue,
|
|
147
|
+
fe as Separator,
|
|
148
|
+
qe as Sheet,
|
|
149
|
+
Je as SheetClose,
|
|
150
|
+
Ke as SheetContent,
|
|
151
|
+
je as SheetDescription,
|
|
152
|
+
Ne as SheetFooter,
|
|
153
|
+
Oe as SheetHeader,
|
|
154
|
+
Qe as SheetTitle,
|
|
155
|
+
Ue as SheetTrigger,
|
|
156
|
+
We as Skeleton,
|
|
157
|
+
ze as Switch,
|
|
158
|
+
Xe as Tabs,
|
|
159
|
+
Ye as TabsContent,
|
|
160
|
+
Ze as TabsList,
|
|
161
|
+
_e as TabsTrigger,
|
|
162
|
+
$e as Textarea,
|
|
163
|
+
ao as Toaster,
|
|
164
|
+
eo as Toggle,
|
|
165
|
+
oo as Tooltip,
|
|
166
|
+
to as TooltipContent,
|
|
167
|
+
ro as TooltipPortal,
|
|
168
|
+
so as TooltipProvider,
|
|
169
|
+
no as TooltipTrigger,
|
|
170
|
+
io as badgeVariants,
|
|
171
|
+
bo as buttonVariants,
|
|
172
|
+
po as reducer,
|
|
173
|
+
uo as toast,
|
|
174
|
+
co as toggleVariants,
|
|
175
|
+
lo as useToast
|
|
377
176
|
};
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),i=require("react"),s=require("lodash"),b=require("jotai"),w=require("./accordion-ynvFtV_p.cjs"),L=require("./scroll-area-FiHvy-TZ.cjs"),k=require("./tabs-iWeaaVrg.cjs"),y=require("./skeleton-JHP9zwL2.cjs"),v=require("react-dnd"),C=require("@radix-ui/react-icons"),d=require("./ChaiBuilderEditor-BoE-sArB.cjs"),q=require("./useAddBlock-dCKRFPRU.cjs");require("react-i18next");const A=require("./index-HAue58ea.cjs"),I=require("./useUiLibraries-9FhQCpKo.cjs"),P=require("lucide-react"),S=require("./utils-qK_SjzzV.cjs"),M=require("./useAllBlocks-6hvuNuyw.cjs"),f=require("./textarea-1kZEh7ki.cjs"),F=require("./label-tFm8HZdb.cjs"),H=require("./html-to-json-P6GpbcQX.cjs");require("@radix-ui/react-accordion");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("./MODIFIERS-Fx6WAZcw.cjs");require("clsx");require("react-dom");require("@floating-ui/react-dom");require("i18next");require("flagged");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("./controls-xUKa23ic.cjs");require("tailwind-merge");require("@radix-ui/react-label");require("himalaya");const D=({block:t})=>{const{type:r,icon:o,label:a}=t,{addCoreBlock:u,addPredefinedBlock:m}=q.useAddBlock(),[p]=d.useSelectedBlockIds(),[,x]=b.useAtom(d.activePanelAtom),[,l]=b.useAtom(d.addBlocksModalAtom),E=()=>{s.has(t,"blocks")?m(A.P(t.blocks),s.first(p)):u(t,s.first(p)),l(!1),x("layers")},[,g,j]=v.useDrag(()=>({type:"CHAI_BLOCK",item:t}));return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(v.DragPreviewImage,{connect:j,src:"https://placehold.co/100x30/000000/FFF?text="+(a||r).replace(/ /g,"+")}),e.jsxRuntimeExports.jsxs(y.Tooltip,{children:[e.jsxRuntimeExports.jsx(y.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{onClick:E,type:"button",ref:g,className:"cursor-grab space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50",children:[i.createElement(o||C.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"truncate text-xs",children:a||r})]})}),e.jsxRuntimeExports.jsx(y.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:a||r})})]})]})},O=({block:t,closePopover:r})=>{var j;const[o,a]=i.useState(!1),u=y.useBuilderProp("getExternalPredefinedBlock"),{addCoreBlock:m,addPredefinedBlock:p}=q.useAddBlock(),[x]=d.useSelectedBlockIds(),[,l,E]=v.useDrag(()=>({type:"CHAI_BLOCK",item:t}),[t]),g=i.useCallback(async R=>{if(R.stopPropagation(),s.has(t,"component")){m(t,s.first(x)),r();return}a(!0);const n=await u(t);s.isEmpty(n)||p(A.P(n),s.first(x)),r()},[t]);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(v.DragPreviewImage,{connect:E,src:"https://placehold.co/100x30/000000/FFF?text="+((j=t.name||t.label)==null?void 0:j.replace(" ","+"))}),e.jsxRuntimeExports.jsxs("div",{ref:l,onClick:o?()=>{}:g,className:"relative cursor-grab overflow-hidden rounded-md border border-transparent duration-200 hover:scale-x-105 hover:border-foreground/20 hover:shadow-2xl",children:[o&&e.jsxRuntimeExports.jsxs("div",{className:"absolute flex h-full w-full items-center justify-center bg-black bg-opacity-70",children:[e.jsxRuntimeExports.jsx(P.Loader,{className:"animate-spin",size:15,color:"white"})," ",e.jsxRuntimeExports.jsx("span",{className:"pl-2 text-sm text-white",children:"Adding..."})]}),t.preview?e.jsxRuntimeExports.jsx("img",{src:t.preview,className:"min-h-[50px] w-full rounded-md border border-gray-300",alt:t.name}):e.jsxRuntimeExports.jsx("div",{className:"flex h-20 items-center justify-center rounded-md border border-border border-gray-300 bg-gray-200",children:e.jsxRuntimeExports.jsx("p",{className:"max-w-xs text-center text-sm text-gray-700",children:t.name})})]})]})},U=()=>{const{data:t,isLoading:r}=I.useUILibraryBlocks(),o=A.C(),a=s.filter(s.values(o),{category:"custom"}),u=s.groupBy(a,"group"),m=s.groupBy(t,"group"),[p,x]=i.useState(null),l=i.useMemo(()=>s.mergeWith(u,m,(n,h)=>{if(s.isArray(n)&&s.isArray(h))return[...n,...h]}),[u,m]),[,E]=b.useAtom(d.addBlocksModalAtom),[g,j]=i.useState("Navbar"),R=s.get(l,g,[]);return e.jsxRuntimeExports.jsxs("div",{className:"relative flex h-full max-h-full overflow-hidden py-2",children:[e.jsxRuntimeExports.jsx("ul",{className:"sticky top-0 h-full w-48 space-y-1 overflow-y-auto border-r px-2",children:r?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("li",{className:"h-8 w-full animate-pulse bg-gray-200"}),e.jsxRuntimeExports.jsx("li",{className:"mt-2 h-8 w-full animate-pulse bg-gray-200"}),e.jsxRuntimeExports.jsx("li",{className:"mt-2 h-8 w-full animate-pulse bg-gray-200"}),e.jsxRuntimeExports.jsx("li",{className:"mt-2 h-8 w-full animate-pulse bg-gray-200"}),e.jsxRuntimeExports.jsx("li",{className:"mt-2 h-8 w-full animate-pulse bg-gray-200"}),e.jsxRuntimeExports.jsx("li",{className:"mt-2 h-8 w-full animate-pulse bg-gray-200"})]}):i.Children.toArray(s.map(l,(n,h)=>e.jsxRuntimeExports.jsx("li",{onMouseOut:()=>{clearTimeout(p),x(null)},onMouseEnter:()=>{const B=setTimeout(()=>{j(h)},300);x(B)},onClick:()=>j(h),className:S.cn("-mx-2 cursor-default rounded-md rounded-r-none px-2 py-1 text-sm font-medium capitalize",g===h?"bg-blue-500 text-white":" text-gray-700 hover:bg-foreground/10"),children:h})))}),e.jsxRuntimeExports.jsx("div",{className:"h-full w-full space-y-2 overflow-y-auto px-8",children:i.Children.toArray(R.map(n=>e.jsxRuntimeExports.jsx(O,{block:n,closePopover:()=>E(!1)})))})]})},z=()=>{const[t,r]=i.useState(""),{addPredefinedBlock:o}=q.useAddBlock(),[a]=d.useSelectedBlockIds(),[,u]=b.useAtom(d.addBlockOffCanvasAtom),[,m]=b.useAtom(d.activePanelAtom),[,p]=b.useAtom(d.addBlocksModalAtom),x=()=>{const l=H.getBlocksFromHTML(t);o([...l],s.first(a)||null),r(""),u(!1),m("layers"),p(!1)};return e.jsxRuntimeExports.jsxs(f.Card,{className:"border-border/0 p-0 shadow-none",children:[e.jsxRuntimeExports.jsxs(f.CardHeader,{className:"p-3",children:[e.jsxRuntimeExports.jsx(f.CardTitle,{children:"Import HTML"}),e.jsxRuntimeExports.jsx(f.CardDescription,{children:"Use HTML snippets from component libraries like Tailwind UI, Flowbite, Preline, Kitwind, Tailblocks etc. or just copy paste your own HTML code. Only Tailwind CSS markup is supported."})]}),e.jsxRuntimeExports.jsx(f.CardContent,{className:"space-y-2 px-3 py-0",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[e.jsxRuntimeExports.jsx(F.Label,{htmlFor:"current",className:"text-sm",children:"Enter HTML Code:"}),e.jsxRuntimeExports.jsx(f.Textarea,{autoFocus:!0,tabIndex:1,ref:l=>l&&l.focus(),defaultValue:t,onChange:l=>r(l.target.value),rows:12,placeholder:`<div>
|
|
2
|
-
<h1>Enter code here</h1>
|
|
3
|
-
</div>`,className:"resize-none overflow-x-auto whitespace-pre font-mono font-normal"})]})}),e.jsxRuntimeExports.jsxs(f.CardFooter,{className:"flex flex-col justify-end p-3",children:[e.jsxRuntimeExports.jsx(y.Button,{disabled:t.trim()==="",onClick:()=>x(),size:"sm",className:"w-full",children:"Import"}),e.jsxRuntimeExports.jsxs(f.Alert,{variant:"default",className:"mt-2 p-1 text-blue-400",children:[e.jsxRuntimeExports.jsx(C.ExclamationTriangleIcon,{className:"h-4 w-4"}),e.jsxRuntimeExports.jsx(f.AlertTitle,{className:"text-sm leading-4",children:"Imported html will be added to the currently selected block. If no block is selected, the html will be added to the page."})]})]})]})},G=z,N=["ListItem","TableHead","TableBody","TableRow","TableCell","Column"],_=(t,r)=>{if(!t)return!s.includes(N,r);const o=t._type;return o==="List"?r==="ListItem":o==="Table"?r==="TableHead"||r==="TableBody":o==="TableHead"||o==="TableBody"?r==="TableRow":o==="TableRow"?r==="TableCell":o==="Row"?r==="Column":!s.includes(N,r)},K=()=>{const[t,r]=i.useState("core"),[o,a]=i.useState("basic"),u=A.C(),[,m]=b.useAtom(d.showPredefinedBlockCategoryAtom),[,p]=b.useAtom(d.addBlocksModalAtom),[x]=d.useSelectedBlockIds(),l=M.useAllBlocks(),E=s.find(l,{_id:s.first(x)}),{data:g,isLoading:j}=I.useUILibraryBlocks(),R=s.groupBy(s.filter(u,c=>_(E,c.type)),"category"),n=s.uniq(s.map(R.core,"group"));i.useEffect(()=>{!s.includes(n,o)&&!s.isEmpty(n)&&!s.isEmpty(o)&&a(s.first(n))},[n,o]);const h=c=>a(T=>T===c?"":c),B=!j&&!s.isEmpty(g)||s.find(s.values(u),{category:"custom"})!==void 0;return e.jsxRuntimeExports.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[e.jsxRuntimeExports.jsxs("div",{className:"mb-2 flex justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsxs("h1",{className:"flex flex-col items-baseline px-1 text-2xl font-semibold xl:flex-row",children:["Add block",e.jsxRuntimeExports.jsx("span",{className:"p-0 text-xs font-light leading-3 opacity-80 xl:pl-1",children:t==="html"?"(Enter or paste your own HTML code)":"(Drag & drop into tree view or click to add)"})]}),e.jsxRuntimeExports.jsxs("button",{onClick:()=>p(!1),className:"flex h-max items-center gap-x-1 rounded-full border p-px text-xs text-gray-800 hover:bg-gray-100 md:p-2",children:[e.jsxRuntimeExports.jsx(C.Cross1Icon,{width:12})," Close"]})]}),e.jsxRuntimeExports.jsx(k.Tabs,{onValueChange:c=>{m(""),r(c)},value:t,className:"h-max",children:e.jsxRuntimeExports.jsxs(k.TabsList,{className:"grid w-full "+(B?"grid-cols-3":"grid-cols-2"),children:[e.jsxRuntimeExports.jsx(k.TabsTrigger,{value:"core",children:"Core"}),B?e.jsxRuntimeExports.jsx(k.TabsTrigger,{value:"ui-blocks",children:"UI Blocks"}):null,e.jsxRuntimeExports.jsx(k.TabsTrigger,{value:"html",children:"Import"})]})}),t==="core"&&e.jsxRuntimeExports.jsx(L.ScrollArea,{className:"-mx-1.5 h-full",children:e.jsxRuntimeExports.jsx(w.Accordion,{type:"single",value:o,className:"w-full px-3",children:i.Children.toArray(s.map(n,c=>s.reject(s.filter(s.values(R.core),{group:c}),{hidden:!0}).length?e.jsxRuntimeExports.jsxs(w.AccordionItem,{value:c,className:"border-border",children:[e.jsxRuntimeExports.jsx(w.AccordionTrigger,{onClick:()=>h(c),className:"py-2 capitalize",children:c}),e.jsxRuntimeExports.jsx(w.AccordionContent,{children:e.jsxRuntimeExports.jsx("div",{className:"grid grid-cols-4 gap-2",children:i.Children.toArray(s.reject(s.filter(s.values(R.core),{group:c}),{hidden:!0}).map(T=>e.jsxRuntimeExports.jsx(D,{block:T})))})})]}):null))})}),t==="ui-blocks"&&e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx(y.Skeleton,{className:"h-32 w-full"}),children:e.jsxRuntimeExports.jsx(U,{})}),t==="html"&&e.jsxRuntimeExports.jsx(G,{})]})};exports.default=K;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./jsx-runtime-JYMCiFoE.cjs"),O=require("react"),C=require("@rjsf/validator-ajv8"),B=require("@rjsf/core"),j=require("./ChaiBuilderEditor-BoE-sArB.cjs");require("react-i18next");const R=require("./skeleton-JHP9zwL2.cjs"),e=require("./controls-W97-POR_.cjs"),k=require("lodash");require("./MODIFIERS-Fx6WAZcw.cjs");require("clsx");require("@radix-ui/react-scroll-area");require("react-dom");require("@floating-ui/react-dom");require("jotai");require("i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("./utils-qK_SjzzV.cjs");require("tailwind-merge");require("react-hotkeys-hook");require("flat-to-nested");require("./functions-uw7QP2kT.cjs");require("redux-undo");require("@react-hookz/web");require("./index-HAue58ea.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-icons");require("@radix-ui/react-toast");function P(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const a in i)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(i,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:()=>i[a]})}}return t.default=i,Object.freeze(t)}const c=P(O),v=[{title:"Roboto",value:"Roboto"},{title:"Open Sans",value:"Open Sans"},{title:"Montserrat",value:"Montserrat"},{title:"Lato",value:"Lato"},{title:"Poppins",value:"Poppins"},{title:"Oswald",value:"Oswald"},{title:"Raleway",value:"Raleway"},{title:"Ubuntu",value:"Ubuntu"},{title:"Nunito",value:"Nunito"},{title:"Merriweather",value:"Merriweather"},{title:"Nunito Sans",value:"Nunito Sans"},{title:"Playfair Display",value:"Playfair Display"},{title:"Rubik",value:"Rubik"},{title:"Inter",value:"Inter"},{title:"Lora",value:"Lora"},{title:"Kanit",value:"Kanit"},{title:"Fira Sans",value:"Fira Sans"},{title:"Hind",value:"Hind"},{title:"Quicksand",value:"Quicksand"},{title:"Mulish",value:"Mulish"},{title:"Barlow",value:"Barlow"},{title:"Inconsolata",value:"Inconsolata"},{title:"Titillium Web",value:"Titillium Web"},{title:"Heebo",value:"Heebo"},{title:"IBM Plex Sans",value:"IBM Plex Sans"},{title:"DM Sans",value:"DM Sans"},{title:"Nanum Gothic",value:"Nanum Gothic"},{title:"Karla",value:"Karla"},{title:"Arimo",value:"Arimo"},{title:"Cabin",value:"Cabin"},{title:"Oxygen",value:"Oxygen"},{title:"Overpass",value:"Overpass"},{title:"Assistant",value:"Assistant"},{title:"Tajawal",value:"Tajawal"},{title:"Play",value:"Play"},{title:"Exo",value:"Exo"},{title:"Cinzel",value:"Cinzel"},{title:"Faustina",value:"Faustina"},{title:"Philosopher",value:"Philosopher"},{title:"Gelasio",value:"Gelasio"},{title:"Sofia Sans Condensed",value:"Sofia Sans Condensed"},{title:"Noto Sans Devanagari",value:"Noto Sans Devanagari"},{title:"Actor",value:"Actor"},{title:"Epilogue",value:"Epilogue"},{title:"Glegoo",value:"Glegoo"},{title:"Overlock",value:"Overlock"},{title:"Lustria",value:"Lustria"},{title:"Ovo",value:"Ovo"},{title:"Suranna",value:"Suranna"}],D=()=>{const i=R.useBuilderProp("onSaveBrandingOptions",async()=>{}),[t,a]=j.useBrandingOptions(),r=c.useRef(t);c.useEffect(()=>()=>{k.isEqual(t,r.current)||i(r.current)},[]);const p=({formData:l},u)=>{u&&(a(l),r.current=l)},{bodyFont:y,headingFont:f,primaryColor:g,bodyTextDarkColor:b,bodyTextLightColor:m,bodyBgDarkColor:h,secondaryColor:q,bodyBgLightColor:x,roundedCorners:S}=t,s={headingFont:e.f({title:"Heading font",default:f,options:v}),bodyFont:e.f({title:"Body font",default:y,options:v}),roundedCorners:e.c({title:"Rounded Corner",default:parseInt(S||5,10)}),primaryColor:e.y({title:"Primary",default:g}),secondaryColor:e.y({title:"Secondary",default:q}),bodyBgLightColor:e.y({title:"Body Background (Light)",default:x}),bodyBgDarkColor:e.y({title:"Body Background (Dark)",default:h}),bodyTextLightColor:e.y({title:"Body Text (Light)",default:b}),bodyTextDarkColor:e.y({title:"Body Text (Dark)",default:m})},n={type:"object",properties:{}},d={};return Object.keys(s).forEach(l=>{const u=s[l];return n.properties||(n.properties={}),n.properties[l]=u.schema,d[l]=u.uiSchema,!0}),o.jsxRuntimeExports.jsxs("div",{className:"flex h-full select-none flex-col",children:[o.jsxRuntimeExports.jsx("div",{className:"rounded-md bg-background/30 p-1",children:o.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Branding Options"})}),o.jsxRuntimeExports.jsx("div",{className:"-mx-2",children:o.jsxRuntimeExports.jsx(B,{idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:d,schema:n,formData:t,validator:C,onChange:p})})]})};exports.default=D;
|