@chaibuilder/sdk 2.0.0-beta.2 → 2.0.0-beta.21
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/ChaiThemeFn--DgGggh_.js +190 -0
- package/dist/ChaiThemeFn-bugxb1Cl.cjs +13 -0
- package/dist/{CodeEditor-xhb27i29.js → CodeEditor-7Cs6j_Wn.js} +14 -14
- package/dist/CodeEditor-Ifwz-vPV.cjs +1 -0
- package/dist/STRINGS-26RPxXyi.cjs +1 -0
- package/dist/STRINGS-BnWT5XcX.js +5 -0
- package/dist/Topbar-J_gRMjOQ.js +73 -0
- package/dist/Topbar-tTu3ihcy.cjs +1 -0
- package/dist/context-menu-4nQs6OxC.cjs +1 -0
- package/dist/{context-menu-I8woggB3.js → context-menu-oLipAPzI.js} +237 -254
- package/dist/core.cjs +61 -1
- package/dist/core.d.ts +56 -34
- package/dist/core.js +8598 -107
- package/dist/plugin-4xaTkTNB.cjs +1 -0
- package/dist/plugin-GuIj4Ul0.js +24 -0
- package/dist/render.cjs +2 -2
- package/dist/render.d.ts +34 -16
- package/dist/render.js +119 -121
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.d.ts +0 -1
- package/dist/runtime.js +0 -20
- package/dist/style.css +1 -1
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.d.ts +26 -25
- package/dist/tailwind.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +238 -223
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +1079 -703
- package/package.json +6 -9
- package/dist/CodeEditor-e9zXhHFt.cjs +0 -1
- package/dist/STRINGS-Xxstm-7I.js +0 -7
- package/dist/STRINGS-Yl7cSWDc.cjs +0 -1
- package/dist/Topbar-CofpLWzO.cjs +0 -1
- package/dist/Topbar-xrdjosmc.js +0 -160
- package/dist/context-menu-0lRey9QY.cjs +0 -1
- package/dist/controls-lEwMTdPQ.js +0 -234
- package/dist/controls-p9IwFnPx.cjs +0 -1
- package/dist/index-CHYv1sC2.cjs +0 -63
- package/dist/index-s4RPN00p.js +0 -8540
- package/dist/plugin-UiUFs2fK.js +0 -44
- package/dist/plugin-f6SDZ_Or.js +0 -108
- package/dist/plugin-jum1MjXp.cjs +0 -1
- package/dist/plugin-xOpS-UNV.cjs +0 -1
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { isEmpty as f, uniq as p, keys as y, flatten as b } from "lodash-es";
|
|
2
|
+
function _(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
|
+
const j = {
|
|
6
|
+
fontFamily: {
|
|
7
|
+
"font-heading": "Inter",
|
|
8
|
+
"font-body": "Inter"
|
|
9
|
+
},
|
|
10
|
+
borderRadius: "10px",
|
|
11
|
+
colors: [
|
|
12
|
+
{
|
|
13
|
+
group: "Body",
|
|
14
|
+
items: {
|
|
15
|
+
background: ["#FFFFFF", "#121212"],
|
|
16
|
+
foreground: ["#121212", "#FFFFFF"]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
group: "Primary",
|
|
21
|
+
items: {
|
|
22
|
+
primary: ["#2563EB", "#3B82F6"],
|
|
23
|
+
"primary-foreground": ["#FFFFFF", "#FFFFFF"]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
group: "Secondary",
|
|
28
|
+
items: {
|
|
29
|
+
secondary: ["#F3F4F6", "#374151"],
|
|
30
|
+
"secondary-foreground": ["#1F2937", "#F9FAFB"]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
group: "Border, Input & Ring",
|
|
35
|
+
items: {
|
|
36
|
+
border: ["#E5E7EB", "#374151"],
|
|
37
|
+
input: ["#E5E7EB", "#374151"],
|
|
38
|
+
ring: ["#2563EB", "#3B82F6"]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
group: "Card",
|
|
43
|
+
items: {
|
|
44
|
+
card: ["#FFFFFF", "#1F2937"],
|
|
45
|
+
"card-foreground": ["#121212", "#FFFFFF"]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
group: "Popover",
|
|
50
|
+
items: {
|
|
51
|
+
popover: ["#FFFFFF", "#1F2937"],
|
|
52
|
+
"popover-foreground": ["#121212", "#FFFFFF"]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
group: "Muted",
|
|
57
|
+
items: {
|
|
58
|
+
muted: ["#F3F4F6", "#374151"],
|
|
59
|
+
"muted-foreground": ["#6B7280", "#9CA3AF"]
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
group: "Accent",
|
|
64
|
+
items: {
|
|
65
|
+
accent: ["#F3F4F6", "#374151"],
|
|
66
|
+
"accent-foreground": ["#1F2937", "#FFFFFF"]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
group: "Destructive",
|
|
71
|
+
items: {
|
|
72
|
+
destructive: ["#DC2626", "#EF4444"],
|
|
73
|
+
"destructive-foreground": ["#FFFFFF", "#FFFFFF"]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
};
|
|
78
|
+
var g = {}, m = {};
|
|
79
|
+
(function(e) {
|
|
80
|
+
Object.defineProperty(e, "__esModule", {
|
|
81
|
+
value: !0
|
|
82
|
+
}), Object.defineProperty(e, "default", {
|
|
83
|
+
enumerable: !0,
|
|
84
|
+
get: function() {
|
|
85
|
+
return t;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
function o(r, n) {
|
|
89
|
+
return {
|
|
90
|
+
handler: r,
|
|
91
|
+
config: n
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
o.withOptions = function(r, n = () => ({})) {
|
|
95
|
+
const s = function(a) {
|
|
96
|
+
return {
|
|
97
|
+
__options: a,
|
|
98
|
+
handler: r(a),
|
|
99
|
+
config: n(a)
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
return s.__isOptionsFunction = !0, s.__pluginFunction = r, s.__configFunction = n, s;
|
|
103
|
+
};
|
|
104
|
+
const t = o;
|
|
105
|
+
})(m);
|
|
106
|
+
(function(e) {
|
|
107
|
+
Object.defineProperty(e, "__esModule", {
|
|
108
|
+
value: !0
|
|
109
|
+
}), Object.defineProperty(e, "default", {
|
|
110
|
+
enumerable: !0,
|
|
111
|
+
get: function() {
|
|
112
|
+
return r;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
const o = /* @__PURE__ */ t(m);
|
|
116
|
+
function t(n) {
|
|
117
|
+
return n && n.__esModule ? n : {
|
|
118
|
+
default: n
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
const r = o.default;
|
|
122
|
+
})(g);
|
|
123
|
+
let l = g;
|
|
124
|
+
var $ = (l.__esModule ? l : { default: l }).default;
|
|
125
|
+
const M = /* @__PURE__ */ _($), O = (e) => ({
|
|
126
|
+
fontFamily: e.fontFamily ? y(e.fontFamily).reduce(
|
|
127
|
+
(t, r) => ({
|
|
128
|
+
...t,
|
|
129
|
+
[r.replace("font-", "")]: `var(--${r})`
|
|
130
|
+
}),
|
|
131
|
+
{}
|
|
132
|
+
) : {},
|
|
133
|
+
borderRadius: e.borderRadius ? {
|
|
134
|
+
lg: "var(--radius)",
|
|
135
|
+
md: "calc(var(--radius) - 2px)",
|
|
136
|
+
sm: "calc(var(--radius) - 4px)"
|
|
137
|
+
} : {},
|
|
138
|
+
colors: e.colors ? b(e.colors.map((t) => Object.entries(t.items))).reduce(
|
|
139
|
+
(t, [r]) => ({ ...t, [r]: `hsl(var(--${r}))` }),
|
|
140
|
+
{}
|
|
141
|
+
) : {}
|
|
142
|
+
});
|
|
143
|
+
function d(e) {
|
|
144
|
+
const o = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
145
|
+
let t = parseInt(o[1], 16), r = parseInt(o[2], 16), n = parseInt(o[3], 16);
|
|
146
|
+
t /= 255, r /= 255, n /= 255;
|
|
147
|
+
const s = Math.max(t, r, n), a = Math.min(t, r, n);
|
|
148
|
+
let u, i;
|
|
149
|
+
const c = (s + a) / 2;
|
|
150
|
+
if (s == a)
|
|
151
|
+
u = i = 0;
|
|
152
|
+
else {
|
|
153
|
+
const F = s - a;
|
|
154
|
+
switch (i = c > 0.5 ? F / (2 - s - a) : F / (s + a), s) {
|
|
155
|
+
case t:
|
|
156
|
+
u = (r - n) / F + (r < n ? 6 : 0);
|
|
157
|
+
break;
|
|
158
|
+
case r:
|
|
159
|
+
u = (n - t) / F + 2;
|
|
160
|
+
break;
|
|
161
|
+
case n:
|
|
162
|
+
u = (t - r) / F + 4;
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
u /= 6;
|
|
166
|
+
}
|
|
167
|
+
return `${Math.round(u * 360)} ${Math.round(i * 100)}% ${Math.round(c * 100)}%`;
|
|
168
|
+
}
|
|
169
|
+
const P = (e) => `:root {
|
|
170
|
+
${e.fontFamily && Object.entries(e.fontFamily).map(([o, t]) => `--font-${o}: "${t}";`).join(`
|
|
171
|
+
`)}
|
|
172
|
+
${e.borderRadius && `--radius: ${e.borderRadius};`}
|
|
173
|
+
${e.colors && Object.entries(e.colors).map(([o, t]) => `--${o}: ${d(t[0])};`).join(`
|
|
174
|
+
`)}
|
|
175
|
+
}
|
|
176
|
+
.dark {
|
|
177
|
+
${e.colors && Object.entries(e.colors).map(([o, t]) => `--${o}: ${d(t[1])};`).join(`
|
|
178
|
+
`)}
|
|
179
|
+
}`, k = (e) => f(e.fontFamily) ? "" : p(Object.entries(e.fontFamily).map(([, t]) => t)).map((t) => `<link rel="stylesheet" href="${`https://fonts.googleapis.com/css2?family=${t.replace(/\s+/g, "+")}&display=swap`}">`).join(`
|
|
180
|
+
`), E = (e) => f(e.fontFamily) ? "" : p(Object.entries(e.fontFamily).map(([, t]) => t)).map((t) => `@import url("${`https://fonts.googleapis.com/css2?family=${t.replace(/\s+/g, "+")}&display=swap`}");`).join(`
|
|
181
|
+
`);
|
|
182
|
+
export {
|
|
183
|
+
k as a,
|
|
184
|
+
P as b,
|
|
185
|
+
E as c,
|
|
186
|
+
j as d,
|
|
187
|
+
_ as e,
|
|
188
|
+
O as g,
|
|
189
|
+
M as p
|
|
190
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";const F=require("lodash-es");function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const y={fontFamily:{"font-heading":"Inter","font-body":"Inter"},borderRadius:"10px",colors:[{group:"Body",items:{background:["#FFFFFF","#121212"],foreground:["#121212","#FFFFFF"]}},{group:"Primary",items:{primary:["#2563EB","#3B82F6"],"primary-foreground":["#FFFFFF","#FFFFFF"]}},{group:"Secondary",items:{secondary:["#F3F4F6","#374151"],"secondary-foreground":["#1F2937","#F9FAFB"]}},{group:"Border, Input & Ring",items:{border:["#E5E7EB","#374151"],input:["#E5E7EB","#374151"],ring:["#2563EB","#3B82F6"]}},{group:"Card",items:{card:["#FFFFFF","#1F2937"],"card-foreground":["#121212","#FFFFFF"]}},{group:"Popover",items:{popover:["#FFFFFF","#1F2937"],"popover-foreground":["#121212","#FFFFFF"]}},{group:"Muted",items:{muted:["#F3F4F6","#374151"],"muted-foreground":["#6B7280","#9CA3AF"]}},{group:"Accent",items:{accent:["#F3F4F6","#374151"],"accent-foreground":["#1F2937","#FFFFFF"]}},{group:"Destructive",items:{destructive:["#DC2626","#EF4444"],"destructive-foreground":["#FFFFFF","#FFFFFF"]}}]};var g={},m={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});function n(r,o){return{handler:r,config:o}}n.withOptions=function(r,o=()=>({})){const s=function(u){return{__options:u,handler:r(u),config:o(u)}};return s.__isOptionsFunction=!0,s.__pluginFunction=r,s.__configFunction=o,s};const t=n})(m);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});const n=t(m);function t(o){return o&&o.__esModule?o:{default:o}}const r=n.default})(g);let c=g;var b=(c.__esModule?c:{default:c}).default;const _=p(b),$=e=>({fontFamily:e.fontFamily?F.keys(e.fontFamily).reduce((t,r)=>({...t,[r.replace("font-","")]:`var(--${r})`}),{}):{},borderRadius:e.borderRadius?{lg:"var(--radius)",md:"calc(var(--radius) - 2px)",sm:"calc(var(--radius) - 4px)"}:{},colors:e.colors?F.flatten(e.colors.map(t=>Object.entries(t.items))).reduce((t,[r])=>({...t,[r]:`hsl(var(--${r}))`}),{}):{}});function f(e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);let t=parseInt(n[1],16),r=parseInt(n[2],16),o=parseInt(n[3],16);t/=255,r/=255,o/=255;const s=Math.max(t,r,o),u=Math.min(t,r,o);let a,l;const d=(s+u)/2;if(s==u)a=l=0;else{const i=s-u;switch(l=d>.5?i/(2-s-u):i/(s+u),s){case t:a=(r-o)/i+(r<o?6:0);break;case r:a=(o-t)/i+2;break;case o:a=(t-r)/i+4;break}a/=6}return`${Math.round(a*360)} ${Math.round(l*100)}% ${Math.round(d*100)}%`}const v=e=>`:root {
|
|
2
|
+
${e.fontFamily&&Object.entries(e.fontFamily).map(([n,t])=>`--font-${n}: "${t}";`).join(`
|
|
3
|
+
`)}
|
|
4
|
+
${e.borderRadius&&`--radius: ${e.borderRadius};`}
|
|
5
|
+
${e.colors&&Object.entries(e.colors).map(([n,t])=>`--${n}: ${f(t[0])};`).join(`
|
|
6
|
+
`)}
|
|
7
|
+
}
|
|
8
|
+
.dark {
|
|
9
|
+
${e.colors&&Object.entries(e.colors).map(([n,t])=>`--${n}: ${f(t[1])};`).join(`
|
|
10
|
+
`)}
|
|
11
|
+
}`,j=e=>F.isEmpty(e.fontFamily)?"":F.uniq(Object.entries(e.fontFamily).map(([,t])=>t)).map(t=>`<link rel="stylesheet" href="${`https://fonts.googleapis.com/css2?family=${t.replace(/\s+/g,"+")}&display=swap`}">`).join(`
|
|
12
|
+
`),E=e=>F.isEmpty(e.fontFamily)?"":F.uniq(Object.entries(e.fontFamily).map(([,t])=>t)).map(t=>`@import url("${`https://fonts.googleapis.com/css2?family=${t.replace(/\s+/g,"+")}&display=swap`}");`).join(`
|
|
13
|
+
`);exports.defaultThemeOptions=y;exports.getChaiThemeCssVariables=v;exports.getChaiThemeOptions=$;exports.getDefaultExportFromCjs=p;exports.getThemeFontsCSSImport=E;exports.getThemeFontsLinkMarkup=j;exports.plugin=_;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
2
|
import k from "@monaco-editor/react";
|
|
3
|
-
import { B as C } from "./context-menu-
|
|
3
|
+
import { B as C } from "./context-menu-oLipAPzI.js";
|
|
4
4
|
import { useTranslation as j } from "react-i18next";
|
|
5
5
|
import { useState as l, useCallback as v, useEffect as g } from "react";
|
|
6
|
-
import {
|
|
6
|
+
import { useCodeEditor as y, useSelectedBlockIds as N, useUpdateBlocksProps as T, useUpdateBlocksPropsRealtime as E } from "./core.js";
|
|
7
7
|
import { Cross2Icon as w } from "@radix-ui/react-icons";
|
|
8
8
|
import { useThrottledCallback as B } from "@react-hookz/web";
|
|
9
9
|
import "@radix-ui/react-switch";
|
|
10
10
|
import "@radix-ui/react-accordion";
|
|
11
|
-
import "class-variance-authority";
|
|
12
11
|
import "@radix-ui/react-alert-dialog";
|
|
13
12
|
import "@radix-ui/react-slot";
|
|
13
|
+
import "class-variance-authority";
|
|
14
14
|
import "@radix-ui/react-dialog";
|
|
15
15
|
import "@radix-ui/react-label";
|
|
16
16
|
import "@radix-ui/react-scroll-area";
|
|
@@ -27,11 +27,11 @@ import "tailwind-merge";
|
|
|
27
27
|
import "lodash-es";
|
|
28
28
|
import "jotai";
|
|
29
29
|
import "./iconBase-Ief2hJUZ.js";
|
|
30
|
-
import "
|
|
31
|
-
import "
|
|
30
|
+
import "./ChaiThemeFn--DgGggh_.js";
|
|
31
|
+
import "lodash";
|
|
32
32
|
import "tree-model";
|
|
33
|
+
import "@chaibuilder/runtime";
|
|
33
34
|
import "react-quill";
|
|
34
|
-
import "./STRINGS-Xxstm-7I.js";
|
|
35
35
|
import "flagged";
|
|
36
36
|
import "react-hotkeys-hook";
|
|
37
37
|
import "@floating-ui/dom";
|
|
@@ -39,37 +39,37 @@ import "@floating-ui/react-dom";
|
|
|
39
39
|
import "@tailwindcss/typography";
|
|
40
40
|
import "@tailwindcss/forms";
|
|
41
41
|
import "@tailwindcss/aspect-ratio";
|
|
42
|
+
import "./STRINGS-BnWT5XcX.js";
|
|
42
43
|
import "react-wrap-balancer";
|
|
43
44
|
import "react-dom";
|
|
44
45
|
import "prop-types";
|
|
45
46
|
import "react-error-boundary";
|
|
46
47
|
import "re-resizable";
|
|
47
48
|
import "lucide-react";
|
|
48
|
-
import "@rjsf/validator-ajv8";
|
|
49
|
-
import "@rjsf/core";
|
|
50
|
-
import "./controls-lEwMTdPQ.js";
|
|
51
49
|
import "react-arborist";
|
|
52
50
|
import "himalaya";
|
|
51
|
+
import "@rjsf/core";
|
|
52
|
+
import "@rjsf/validator-ajv8";
|
|
53
53
|
import "react-icons-picker";
|
|
54
54
|
import "react-autosuggest";
|
|
55
55
|
import "fuse.js";
|
|
56
56
|
import "i18next";
|
|
57
57
|
import "framer-motion";
|
|
58
|
-
const
|
|
58
|
+
const n = (r) => {
|
|
59
59
|
const i = document.createElement("div");
|
|
60
60
|
return i.innerHTML = r, i.innerHTML;
|
|
61
61
|
};
|
|
62
62
|
function Pt() {
|
|
63
|
-
const { t: r } = j(), [i,
|
|
63
|
+
const { t: r } = j(), [i, a] = l(!1), [m, c] = l(""), [o, s] = y(), [p] = N(), d = T(), u = E(), f = B(
|
|
64
64
|
(e) => {
|
|
65
|
-
const b =
|
|
65
|
+
const b = n(e);
|
|
66
66
|
u([o.blockId], { [o.blockProp]: b });
|
|
67
67
|
},
|
|
68
68
|
[],
|
|
69
69
|
300
|
|
70
70
|
), x = v(() => {
|
|
71
71
|
if (i) {
|
|
72
|
-
const e =
|
|
72
|
+
const e = n(m);
|
|
73
73
|
d([o.blockId], { [o.blockProp]: e });
|
|
74
74
|
}
|
|
75
75
|
}, [i, m]);
|
|
@@ -105,7 +105,7 @@ function Pt() {
|
|
|
105
105
|
e.setValue(o.initialCode);
|
|
106
106
|
},
|
|
107
107
|
onChange: (e) => {
|
|
108
|
-
|
|
108
|
+
a(!0), c(e), f(e);
|
|
109
109
|
},
|
|
110
110
|
height: "100%",
|
|
111
111
|
defaultLanguage: "html",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),b=require("@monaco-editor/react"),k=require("./context-menu-4nQs6OxC.cjs"),C=require("react-i18next"),u=require("react"),n=require("./core.cjs"),E=require("@radix-ui/react-icons"),R=require("@react-hookz/web");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("lodash-es");require("jotai");require("./iconBase-aZzpqff_.cjs");require("./ChaiThemeFn-bugxb1Cl.cjs");require("lodash");require("tree-model");require("@chaibuilder/runtime");require("react-quill");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("./STRINGS-26RPxXyi.cjs");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("lucide-react");require("react-arborist");require("himalaya");require("@rjsf/core");require("@rjsf/validator-ajv8");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("i18next");require("framer-motion");const a=s=>{const i=document.createElement("div");return i.innerHTML=s,i.innerHTML};function g(){const{t:s}=C.useTranslation(),[i,d]=u.useState(!1),[l,q]=u.useState(""),[r,o]=n.useCodeEditor(),[c]=n.useSelectedBlockIds(),x=n.useUpdateBlocksProps(),m=n.useUpdateBlocksPropsRealtime(),p=R.useThrottledCallback(t=>{const h=a(t);m([r.blockId],{[r.blockProp]:h})},[],300),j=u.useCallback(()=>{if(i){const t=a(l);x([r.blockId],{[r.blockProp]:t})}},[i,l]);u.useEffect(()=>{c.includes(r==null?void 0:r.blockId)||(j(),o(null))},[c]);const f=()=>{o(null)};return e.jsxRuntimeExports.jsxs("div",{className:"h-full rounded-t-lg border-t-4 border-black bg-black text-white",children:[e.jsxRuntimeExports.jsx("button",{onClick:f,className:"fixed inset-0 z-[100000] cursor-default bg-gray-400/20"}),e.jsxRuntimeExports.jsxs("div",{className:"relative z-[100001] h-full w-full flex-col gap-y-1",children:[e.jsxRuntimeExports.jsxs("div",{className:"-mt-1 flex items-center justify-between px-2 py-2",children:[e.jsxRuntimeExports.jsxs("h3",{className:"space-x-3 text-sm font-semibold",children:[e.jsxRuntimeExports.jsx("span",{children:s("HTML Code Editor |")}),e.jsxRuntimeExports.jsx("span",{className:"text-xs text-gray-400",children:s("Scripts will be only executed in preview and live mode.")})]}),e.jsxRuntimeExports.jsx("div",{className:"flex gap-x-2",children:e.jsxRuntimeExports.jsx(k.Button,{onClick:()=>o(null),size:"sm",variant:"destructive",className:"h-6 w-fit",children:e.jsxRuntimeExports.jsx(E.Cross2Icon,{})})})]}),e.jsxRuntimeExports.jsx(b,{onMount:t=>{t.setValue(r.initialCode)},onChange:t=>{d(!0),q(t),p(t)},height:"100%",defaultLanguage:"html",theme:"vs-dark",defaultValue:"",options:{minimap:{enabled:!1}}})]})]})}exports.default=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const _="#styles:",E="__ADD_BLOCK_INTERNAL_ROOT";exports.ROOT_TEMP_KEY=E;exports.STYLES_KEY=_;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
|
+
import o, { Suspense as m } from "react";
|
|
3
|
+
import { S as i } from "./context-menu-oLipAPzI.js";
|
|
4
|
+
import "react-i18next";
|
|
5
|
+
import { useBuilderProp as p } from "./core.js";
|
|
6
|
+
import "@radix-ui/react-switch";
|
|
7
|
+
import "@radix-ui/react-accordion";
|
|
8
|
+
import "@radix-ui/react-icons";
|
|
9
|
+
import "@radix-ui/react-alert-dialog";
|
|
10
|
+
import "@radix-ui/react-slot";
|
|
11
|
+
import "class-variance-authority";
|
|
12
|
+
import "@radix-ui/react-dialog";
|
|
13
|
+
import "@radix-ui/react-label";
|
|
14
|
+
import "@radix-ui/react-scroll-area";
|
|
15
|
+
import "@radix-ui/react-tabs";
|
|
16
|
+
import "@radix-ui/react-tooltip";
|
|
17
|
+
import "@radix-ui/react-popover";
|
|
18
|
+
import "@radix-ui/react-hover-card";
|
|
19
|
+
import "@radix-ui/react-dropdown-menu";
|
|
20
|
+
import "@radix-ui/react-separator";
|
|
21
|
+
import "@radix-ui/react-toast";
|
|
22
|
+
import "@radix-ui/react-context-menu";
|
|
23
|
+
import "clsx";
|
|
24
|
+
import "tailwind-merge";
|
|
25
|
+
import "lodash-es";
|
|
26
|
+
import "jotai";
|
|
27
|
+
import "./iconBase-Ief2hJUZ.js";
|
|
28
|
+
import "./ChaiThemeFn--DgGggh_.js";
|
|
29
|
+
import "@react-hookz/web";
|
|
30
|
+
import "lodash";
|
|
31
|
+
import "tree-model";
|
|
32
|
+
import "@chaibuilder/runtime";
|
|
33
|
+
import "react-quill";
|
|
34
|
+
import "flagged";
|
|
35
|
+
import "react-hotkeys-hook";
|
|
36
|
+
import "@floating-ui/dom";
|
|
37
|
+
import "@floating-ui/react-dom";
|
|
38
|
+
import "@tailwindcss/typography";
|
|
39
|
+
import "@tailwindcss/forms";
|
|
40
|
+
import "@tailwindcss/aspect-ratio";
|
|
41
|
+
import "./STRINGS-BnWT5XcX.js";
|
|
42
|
+
import "react-wrap-balancer";
|
|
43
|
+
import "react-dom";
|
|
44
|
+
import "prop-types";
|
|
45
|
+
import "react-error-boundary";
|
|
46
|
+
import "re-resizable";
|
|
47
|
+
import "lucide-react";
|
|
48
|
+
import "react-arborist";
|
|
49
|
+
import "himalaya";
|
|
50
|
+
import "@rjsf/core";
|
|
51
|
+
import "@rjsf/validator-ajv8";
|
|
52
|
+
import "react-icons-picker";
|
|
53
|
+
import "react-autosuggest";
|
|
54
|
+
import "fuse.js";
|
|
55
|
+
import "i18next";
|
|
56
|
+
import "framer-motion";
|
|
57
|
+
const ct = () => {
|
|
58
|
+
const e = p("topBarComponents.left", []), s = p("topBarComponents.center", []), a = p("topBarComponents.right", []);
|
|
59
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "flex h-14 items-center justify-between px-2", children: [
|
|
60
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ t.jsx("div", { className: "flex items-center space-x-2 font-bold", children: o.Children.toArray(
|
|
61
|
+
e.map((r) => /* @__PURE__ */ t.jsx(m, { fallback: /* @__PURE__ */ t.jsx(i, { className: "h-10" }), children: /* @__PURE__ */ t.jsx(r, {}) }))
|
|
62
|
+
) }) }),
|
|
63
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex items-center space-x-2", children: o.Children.toArray(
|
|
64
|
+
s.map((r) => /* @__PURE__ */ t.jsx(m, { fallback: /* @__PURE__ */ t.jsx(i, { className: "h-10" }), children: /* @__PURE__ */ t.jsx(r, {}) }))
|
|
65
|
+
) }),
|
|
66
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex items-center space-x-1", children: o.Children.toArray(
|
|
67
|
+
a.map((r) => /* @__PURE__ */ t.jsx(m, { fallback: /* @__PURE__ */ t.jsx(i, { className: "h-10" }), children: /* @__PURE__ */ t.jsx(r, {}) }))
|
|
68
|
+
) })
|
|
69
|
+
] });
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
ct as default
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),r=require("react"),s=require("./context-menu-4nQs6OxC.cjs");require("react-i18next");const u=require("./core.cjs");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("lodash-es");require("jotai");require("./iconBase-aZzpqff_.cjs");require("./ChaiThemeFn-bugxb1Cl.cjs");require("@react-hookz/web");require("lodash");require("tree-model");require("@chaibuilder/runtime");require("react-quill");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("./STRINGS-26RPxXyi.cjs");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("lucide-react");require("react-arborist");require("himalaya");require("@rjsf/core");require("@rjsf/validator-ajv8");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("i18next");require("framer-motion");const o=()=>{const t=u.useBuilderProp("topBarComponents.left",[]),n=u.useBuilderProp("topBarComponents.center",[]),q=u.useBuilderProp("topBarComponents.right",[]);return e.jsxRuntimeExports.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2 font-bold",children:r.Children.toArray(t.map(i=>e.jsxRuntimeExports.jsx(r.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(i,{})})))})}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:r.Children.toArray(n.map(i=>e.jsxRuntimeExports.jsx(r.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(i,{})})))}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-1",children:r.Children.toArray(q.map(i=>e.jsxRuntimeExports.jsx(r.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(i,{})})))})]})};exports.default=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./jsx-runtime-JYMCiFoE.cjs"),Ue=require("@radix-ui/react-switch"),Qe=require("react"),Xe=require("@radix-ui/react-accordion"),x=require("@radix-ui/react-icons"),Ye=require("@radix-ui/react-alert-dialog"),Je=require("@radix-ui/react-slot"),S=require("class-variance-authority"),Ke=require("@radix-ui/react-dialog"),We=require("@radix-ui/react-label"),Ze=require("@radix-ui/react-scroll-area"),$e=require("@radix-ui/react-tabs"),et=require("@radix-ui/react-tooltip"),tt=require("@radix-ui/react-popover"),ot=require("@radix-ui/react-hover-card"),st=require("@radix-ui/react-dropdown-menu"),at=require("@radix-ui/react-separator"),rt=require("@radix-ui/react-toast"),nt=require("@radix-ui/react-context-menu"),it=require("clsx"),dt=require("tailwind-merge");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const D=m(Ue),n=m(Qe),g=m(Xe),c=m(Ye),u=m(Ke),P=m(We),f=m(Ze),b=m($e),j=m(et),R=m(tt),h=m(ot),i=m(st),I=m(at),p=m(rt),d=m(nt),a=(...e)=>dt.twMerge(it.clsx(e)),k=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(D.Root,{className:a("peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-800 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",e),...t,ref:o,children:s.jsxRuntimeExports.jsx(D.Thumb,{className:a("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950")})}));k.displayName=D.Root.displayName;const w=S.cva("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),_=n.forwardRef(({className:e,variant:t,size:o,asChild:r=!1,...l},C)=>{const Be=r?Je.Slot:"button";return s.jsxRuntimeExports.jsx(Be,{className:a(w({variant:t,size:o,className:e})),ref:C,...l})});_.displayName="Button";const lt=g.Root,z=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(g.Item,{ref:o,className:a("border-b",e),...t}));z.displayName="AccordionItem";const O=n.forwardRef(({className:e,children:t,...o},r)=>s.jsxRuntimeExports.jsx(g.Header,{className:"flex",children:s.jsxRuntimeExports.jsxs(g.Trigger,{ref:r,className:a("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o,children:[t,o.hideArrow?null:s.jsxRuntimeExports.jsx(x.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));O.displayName=g.Trigger.displayName;const q=n.forwardRef(({className:e,children:t,...o},r)=>s.jsxRuntimeExports.jsx(g.Content,{ref:r,className:a("text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...o,children:s.jsxRuntimeExports.jsx("div",{className:"pb-4 pt-0",children:t})}));q.displayName=g.Content.displayName;const ct=c.Root,mt=c.Trigger,L=({className:e,...t})=>s.jsxRuntimeExports.jsx(c.Portal,{className:a(e),...t});L.displayName=c.Portal.displayName;const H=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(c.Overlay,{className:a("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,ref:o}));H.displayName=c.Overlay.displayName;const V=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsxs(L,{children:[s.jsxRuntimeExports.jsx(H,{}),s.jsxRuntimeExports.jsx(c.Content,{ref:o,className:a("fixed left-[50%] top-[50%] z-50 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),...t})]}));V.displayName=c.Content.displayName;const G=({className:e,...t})=>s.jsxRuntimeExports.jsx("div",{className:a("flex flex-col space-y-2 text-center sm:text-left",e),...t});G.displayName="AlertDialogHeader";const F=({className:e,...t})=>s.jsxRuntimeExports.jsx("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});F.displayName="AlertDialogFooter";const B=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(c.Title,{ref:o,className:a("text-lg font-semibold",e),...t}));B.displayName=c.Title.displayName;const U=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(c.Description,{ref:o,className:a("text-sm text-muted-foreground",e),...t}));U.displayName=c.Description.displayName;const Q=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(c.Action,{ref:o,className:a(w(),e),...t}));Q.displayName=c.Action.displayName;const X=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(c.Cancel,{ref:o,className:a(w({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));X.displayName=c.Cancel.displayName;const ut=u.Root,pt=u.Trigger,Y=({className:e,...t})=>s.jsxRuntimeExports.jsx(u.Portal,{className:a(e),...t});Y.displayName=u.Portal.displayName;const J=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(u.Overlay,{ref:o,className:a("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}));J.displayName=u.Overlay.displayName;const K=n.forwardRef(({className:e,children:t,...o},r)=>s.jsxRuntimeExports.jsxs(Y,{children:[s.jsxRuntimeExports.jsx(J,{}),s.jsxRuntimeExports.jsxs(u.Content,{ref:r,className:a("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),...o,children:[t,s.jsxRuntimeExports.jsxs(u.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:[s.jsxRuntimeExports.jsx(x.Cross2Icon,{className:"h-4 w-4"}),s.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));K.displayName=u.Content.displayName;const W=({className:e,...t})=>s.jsxRuntimeExports.jsx("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});W.displayName="DialogHeader";const Z=({className:e,...t})=>s.jsxRuntimeExports.jsx("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Z.displayName="DialogFooter";const $=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(u.Title,{ref:o,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));$.displayName=u.Title.displayName;const ee=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(u.Description,{ref:o,className:a("text-sm text-muted-foreground",e),...t}));ee.displayName=u.Description.displayName;const te=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx("div",{ref:o,className:a("rounded-xl border bg-card text-card-foreground shadow",e),...t}));te.displayName="Card";const oe=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx("div",{ref:o,className:a("flex flex-col space-y-1.5 p-6",e),...t}));oe.displayName="CardHeader";const se=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx("h3",{ref:o,className:a("font-semibold leading-none tracking-tight",e),...t}));se.displayName="CardTitle";const ae=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx("p",{ref:o,className:a("text-sm text-muted-foreground",e),...t}));ae.displayName="CardDescription";const re=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx("div",{ref:o,className:a("p-6 pt-0",e),...t}));re.displayName="CardContent";const ne=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx("div",{ref:o,className:a(" flex items-center p-6 pt-0",e),...t}));ne.displayName="CardFooter";const ie=n.forwardRef(({className:e,type:t,...o},r)=>s.jsxRuntimeExports.jsx("input",{type:t,className:a("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",e),ref:r,...o,autoCapitalize:"off",autoCorrect:"off",spellCheck:"false"}));ie.displayName="Input";const xt=S.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),de=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(P.Root,{ref:o,className:a(xt(),e),...t}));de.displayName=P.Root.displayName;const le=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx("textarea",{className:a("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t,autoCapitalize:"off",autoCorrect:"off",spellCheck:"false"}));le.displayName="Textarea";const ce=n.forwardRef(({className:e,children:t,...o},r)=>s.jsxRuntimeExports.jsxs(f.Root,{ref:r,className:a("relative overflow-hidden",e),...o,children:[s.jsxRuntimeExports.jsx(f.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),s.jsxRuntimeExports.jsx(M,{}),s.jsxRuntimeExports.jsx(f.Corner,{})]}));ce.displayName=f.Root.displayName;const M=n.forwardRef(({className:e,orientation:t="vertical",...o},r)=>s.jsxRuntimeExports.jsx(f.ScrollAreaScrollbar,{ref:r,orientation:t,className:a("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 border-t border-t-transparent p-[1px]",e),...o,children:s.jsxRuntimeExports.jsx(f.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));M.displayName=f.ScrollAreaScrollbar.displayName;const ft=b.Root,me=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(b.List,{ref:o,className:a("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));me.displayName=b.List.displayName;const ue=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(b.Trigger,{ref:o,className:a("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));ue.displayName=b.Trigger.displayName;const pe=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(b.Content,{ref:o,className:a("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));pe.displayName=b.Content.displayName;const gt=j.Portal,bt=j.Provider,jt=j.Root,vt=j.Trigger,xe=n.forwardRef(({className:e,sideOffset:t=4,...o},r)=>s.jsxRuntimeExports.jsx(j.Content,{ref:r,sideOffset:t,className:a("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",e),...o}));xe.displayName=j.Content.displayName;const Rt=R.Root,yt=R.Trigger,fe=n.forwardRef(({className:e,align:t="center",sideOffset:o=4,...r},l)=>s.jsxRuntimeExports.jsx(R.Portal,{children:s.jsxRuntimeExports.jsx(R.Content,{ref:l,align:t,sideOffset:o,className:a("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",e),...r})}));fe.displayName=R.Content.displayName;const Nt=h.Root,ht=h.Trigger,ge=n.forwardRef(({className:e,align:t="center",sideOffset:o=4,...r},l)=>s.jsxRuntimeExports.jsx(h.Content,{ref:l,align:t,sideOffset:o,className:a("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",e),...r}));ge.displayName=h.Content.displayName;const wt=i.Root,Ct=i.Trigger,Tt=i.Group,Et=i.Portal,Dt=i.Sub,St=i.RadioGroup,be=n.forwardRef(({className:e,inset:t,children:o,...r},l)=>s.jsxRuntimeExports.jsxs(i.SubTrigger,{ref:l,className:a("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[o,s.jsxRuntimeExports.jsx(x.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));be.displayName=i.SubTrigger.displayName;const je=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(i.SubContent,{ref:o,className:a("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",e),...t}));je.displayName=i.SubContent.displayName;const ve=n.forwardRef(({className:e,sideOffset:t=4,...o},r)=>s.jsxRuntimeExports.jsx(i.Portal,{children:s.jsxRuntimeExports.jsx(i.Content,{ref:r,sideOffset:t,className:a("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",e),...o})}));ve.displayName=i.Content.displayName;const Re=n.forwardRef(({className:e,inset:t,...o},r)=>s.jsxRuntimeExports.jsx(i.Item,{ref:r,className:a("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));Re.displayName=i.Item.displayName;const ye=n.forwardRef(({className:e,children:t,checked:o,...r},l)=>s.jsxRuntimeExports.jsxs(i.CheckboxItem,{ref:l,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r,children:[s.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsxRuntimeExports.jsx(i.ItemIndicator,{children:s.jsxRuntimeExports.jsx(x.CheckIcon,{className:"h-4 w-4"})})}),t]}));ye.displayName=i.CheckboxItem.displayName;const Ne=n.forwardRef(({className:e,children:t,...o},r)=>s.jsxRuntimeExports.jsxs(i.RadioItem,{ref:r,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[s.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsxRuntimeExports.jsx(i.ItemIndicator,{children:s.jsxRuntimeExports.jsx(x.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Ne.displayName=i.RadioItem.displayName;const he=n.forwardRef(({className:e,inset:t,...o},r)=>s.jsxRuntimeExports.jsx(i.Label,{ref:r,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));he.displayName=i.Label.displayName;const we=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(i.Separator,{ref:o,className:a("-mx-1 my-1 h-px bg-muted",e),...t}));we.displayName=i.Separator.displayName;const Ce=({className:e,...t})=>s.jsxRuntimeExports.jsx("span",{className:a("ml-auto text-xs tracking-widest opacity-60",e),...t});Ce.displayName="DropdownMenuShortcut";const Te=n.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...r},l)=>s.jsxRuntimeExports.jsx(I.Root,{ref:l,decorative:o,orientation:t,className:a("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Te.displayName=I.Root.displayName;const Mt=1,At=1e6;let T=0;function Pt(){return T=(T+1)%Number.MAX_VALUE,T.toString()}const E=new Map,A=e=>{if(E.has(e))return;const t=setTimeout(()=>{E.delete(e),v({type:"REMOVE_TOAST",toastId:e})},At);E.set(e,t)},Ee=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Mt)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=t;return o?A(o):e.toasts.forEach(r=>{A(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===o||o===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)}}},y=[];let N={toasts:[]};function v(e){N=Ee(N,e),y.forEach(t=>{t(N)})}function De({...e}){const t=Pt(),o=l=>v({type:"UPDATE_TOAST",toast:{...l,id:t}}),r=()=>v({type:"DISMISS_TOAST",toastId:t});return v({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:l=>{l||r()}}}),{id:t,dismiss:r,update:o}}function Se(){const[e,t]=n.useState(N);return n.useEffect(()=>(y.push(t),()=>{const o=y.indexOf(t);o>-1&&y.splice(o,1)}),[e]),{...e,toast:De,dismiss:o=>v({type:"DISMISS_TOAST",toastId:o})}}const It=p.Provider,Me=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(p.Viewport,{ref:o,className:a("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Me.displayName=p.Viewport.displayName;const kt=S.cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Ae=n.forwardRef(({className:e,variant:t,...o},r)=>s.jsxRuntimeExports.jsx(p.Root,{ref:r,className:a(kt({variant:t}),e),...o}));Ae.displayName=p.Root.displayName;const _t=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(p.Action,{ref:o,className:a("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));_t.displayName=p.Action.displayName;const Pe=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(p.Close,{ref:o,className:a("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsxRuntimeExports.jsx(x.Cross2Icon,{className:"h-4 w-4"})}));Pe.displayName=p.Close.displayName;const Ie=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(p.Title,{ref:o,className:a("text-sm font-semibold [&+div]:text-xs",e),...t}));Ie.displayName=p.Title.displayName;const ke=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(p.Description,{ref:o,className:a("text-sm opacity-90",e),...t}));ke.displayName=p.Description.displayName;function zt(){const{toasts:e}=Se();return s.jsxRuntimeExports.jsxs(It,{children:[e.map(({id:t,title:o,description:r,action:l,...C})=>s.jsxRuntimeExports.jsxs(Ae,{...C,children:[s.jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[o&&s.jsxRuntimeExports.jsx(Ie,{children:o}),r&&s.jsxRuntimeExports.jsx(ke,{children:r})]}),l,s.jsxRuntimeExports.jsx(Pe,{})]},t)),s.jsxRuntimeExports.jsx(Me,{})]})}const Ot=({className:e,...t})=>s.jsxRuntimeExports.jsx("div",{className:a("animate-pulse rounded-md bg-primary/10",e),...t}),qt=d.Root,Lt=d.Trigger,Ht=d.Group,Vt=d.Portal,Gt=d.Sub,Ft=d.RadioGroup,_e=n.forwardRef(({className:e,inset:t,children:o,...r},l)=>s.jsxRuntimeExports.jsxs(d.SubTrigger,{ref:l,className:a("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",t&&"pl-8",e),...r,children:[o,s.jsxRuntimeExports.jsx(x.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));_e.displayName=d.SubTrigger.displayName;const ze=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(d.SubContent,{ref:o,className:a("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",e),...t}));ze.displayName=d.SubContent.displayName;const Oe=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(d.Portal,{children:s.jsxRuntimeExports.jsx(d.Content,{ref:o,className:a("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",e),...t})}));Oe.displayName=d.Content.displayName;const qe=n.forwardRef(({className:e,inset:t,...o},r)=>s.jsxRuntimeExports.jsx(d.Item,{ref:r,className:a("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",t&&"pl-8",e),...o}));qe.displayName=d.Item.displayName;const Le=n.forwardRef(({className:e,children:t,checked:o,...r},l)=>s.jsxRuntimeExports.jsxs(d.CheckboxItem,{ref:l,className:a("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",e),checked:o,...r,children:[s.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsxRuntimeExports.jsx(d.ItemIndicator,{children:s.jsxRuntimeExports.jsx(x.CheckIcon,{className:"h-4 w-4"})})}),t]}));Le.displayName=d.CheckboxItem.displayName;const He=n.forwardRef(({className:e,children:t,...o},r)=>s.jsxRuntimeExports.jsxs(d.RadioItem,{ref:r,className:a("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",e),...o,children:[s.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsxRuntimeExports.jsx(d.ItemIndicator,{children:s.jsxRuntimeExports.jsx(x.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));He.displayName=d.RadioItem.displayName;const Ve=n.forwardRef(({className:e,inset:t,...o},r)=>s.jsxRuntimeExports.jsx(d.Label,{ref:r,className:a("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...o}));Ve.displayName=d.Label.displayName;const Ge=n.forwardRef(({className:e,...t},o)=>s.jsxRuntimeExports.jsx(d.Separator,{ref:o,className:a("-mx-1 my-1 h-px bg-border",e),...t}));Ge.displayName=d.Separator.displayName;const Fe=({className:e,...t})=>s.jsxRuntimeExports.jsx("span",{className:a("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Fe.displayName="ContextMenuShortcut";exports.Accordion=lt;exports.AccordionContent=q;exports.AccordionItem=z;exports.AccordionTrigger=O;exports.AlertDialog=ct;exports.AlertDialogAction=Q;exports.AlertDialogCancel=X;exports.AlertDialogContent=V;exports.AlertDialogDescription=U;exports.AlertDialogFooter=F;exports.AlertDialogHeader=G;exports.AlertDialogTitle=B;exports.AlertDialogTrigger=mt;exports.Button=_;exports.Card=te;exports.CardContent=re;exports.CardDescription=ae;exports.CardFooter=ne;exports.CardHeader=oe;exports.CardTitle=se;exports.ContextMenu=qt;exports.ContextMenuCheckboxItem=Le;exports.ContextMenuContent=Oe;exports.ContextMenuGroup=Ht;exports.ContextMenuItem=qe;exports.ContextMenuLabel=Ve;exports.ContextMenuPortal=Vt;exports.ContextMenuRadioGroup=Ft;exports.ContextMenuRadioItem=He;exports.ContextMenuSeparator=Ge;exports.ContextMenuShortcut=Fe;exports.ContextMenuSub=Gt;exports.ContextMenuSubContent=ze;exports.ContextMenuSubTrigger=_e;exports.ContextMenuTrigger=Lt;exports.Dialog=ut;exports.DialogContent=K;exports.DialogDescription=ee;exports.DialogFooter=Z;exports.DialogHeader=W;exports.DialogTitle=$;exports.DialogTrigger=pt;exports.DropdownMenu=wt;exports.DropdownMenuCheckboxItem=ye;exports.DropdownMenuContent=ve;exports.DropdownMenuGroup=Tt;exports.DropdownMenuItem=Re;exports.DropdownMenuLabel=he;exports.DropdownMenuPortal=Et;exports.DropdownMenuRadioGroup=St;exports.DropdownMenuRadioItem=Ne;exports.DropdownMenuSeparator=we;exports.DropdownMenuShortcut=Ce;exports.DropdownMenuSub=Dt;exports.DropdownMenuSubContent=je;exports.DropdownMenuSubTrigger=be;exports.DropdownMenuTrigger=Ct;exports.HoverCard=Nt;exports.HoverCardContent=ge;exports.HoverCardTrigger=ht;exports.Input=ie;exports.Label=de;exports.Popover=Rt;exports.PopoverContent=fe;exports.PopoverTrigger=yt;exports.ScrollArea=ce;exports.ScrollBar=M;exports.Separator=Te;exports.Skeleton=Ot;exports.Switch=k;exports.Tabs=ft;exports.TabsContent=pe;exports.TabsList=me;exports.TabsTrigger=ue;exports.Textarea=le;exports.Toaster=zt;exports.Tooltip=jt;exports.TooltipContent=xe;exports.TooltipPortal=gt;exports.TooltipProvider=bt;exports.TooltipTrigger=vt;exports.buttonVariants=w;exports.cn=a;exports.reducer=Ee;exports.toast=De;exports.useToast=Se;
|