@chaibuilder/sdk 1.2.65 → 1.2.67
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-TVOOPK2w.cjs +1 -0
- package/dist/AddBlocks-mbuhydG3.js +123 -0
- package/dist/CanvasArea-KJMcis97.cjs +1 -0
- package/dist/CanvasArea-kg3Rgg9t.js +136 -0
- package/dist/CodeEditor-QP6l0mv4.cjs +1 -0
- package/dist/{CodeEditor-Qff4q7sx.js → CodeEditor-q5unEaUI.js} +60 -46
- package/dist/STRINGS--j49GZJP.js +7 -0
- package/dist/STRINGS-gPz7CUOk.cjs +1 -0
- package/dist/SettingsPanel-MWeQjDWs.cjs +1 -0
- package/dist/SettingsPanel-pomLrOxB.js +81 -0
- package/dist/SidePanels-9sbERNEv.cjs +1 -0
- package/dist/{SidePanels-ijaUKSek.js → SidePanels-YpRrvfiH.js} +87 -93
- package/dist/{Topbar-vHlnfxPs.js → Topbar-kVBx7pp4.js} +56 -61
- package/dist/Topbar-veJ2_blW.cjs +1 -0
- package/dist/{UILibrariesPanel-NVUMUPUj.js → UILibrariesPanel-ES8YzN9C.js} +92 -101
- package/dist/UILibrariesPanel-H8t36R6M.cjs +1 -0
- package/dist/UnsplashImages--MXx-DYM.cjs +1 -0
- package/dist/{UnsplashImages-UkHihhA5.js → UnsplashImages-sotLcz6r.js} +72 -57
- package/dist/{UploadImages-HtuJZJlo.js → UploadImages-I0QQ6vj1.js} +57 -44
- package/dist/UploadImages-xhxeYKkl.cjs +1 -0
- package/dist/badge-7BVT3zxN.cjs +1 -0
- package/dist/badge-pJqQSA13.js +23 -0
- package/dist/context-menu-_8TFbFEJ.cjs +1 -0
- package/dist/context-menu-sks9vdzC.js +906 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +45 -20
- package/dist/core.js +85 -87
- package/dist/iconBase-vJD0OXxU.cjs +1 -0
- package/dist/iconBase-zweRWSz0.js +323 -0
- package/dist/index-5hfuDpYs.cjs +223 -0
- package/dist/index-Zu-K_BX7.js +33933 -0
- package/dist/jsx-runtime-JYMCiFoE.cjs +27 -0
- package/dist/{jsx-runtime-WbnYoNE9.js → jsx-runtime-Sp0orL4X.js} +106 -109
- package/dist/plugin-P0tpo_XZ.cjs +1 -0
- package/dist/plugin-_F-KZp1i.cjs +1 -0
- package/dist/plugin-f5uJtdXY.js +43 -0
- package/dist/plugin-sJ3Hzvpv.js +57 -0
- package/dist/render.cjs +3 -1
- package/dist/render.d.ts +19 -52
- package/dist/render.js +136 -183
- package/dist/select-JW3OMYm-.js +75 -0
- package/dist/select-fXj5tdMX.cjs +1 -0
- package/dist/separator-hT24N-xp.cjs +1 -0
- package/dist/separator-sgwOa1FE.js +18 -0
- package/dist/style.css +1 -1
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.d.ts +41 -1
- package/dist/tailwind.js +16 -8
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +0 -10
- package/dist/ui.js +345 -163
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.d.ts +1 -1
- package/dist/web-blocks.js +489 -724
- package/package.json +15 -45
- package/dist/CanvasArea-fSdH_RiN.cjs +0 -1
- package/dist/CanvasArea-ut5yknzX.js +0 -168
- package/dist/CodeEditor-ypUx3RAV.cjs +0 -1
- package/dist/CurrentPage-jHSVy3hq.js +0 -120
- package/dist/CurrentPage-p_AM4lrF.cjs +0 -1
- package/dist/Functions-7jnEwJyw.js +0 -15
- package/dist/Functions-N3yhPYKY.cjs +0 -1
- package/dist/MODIFIERS-fd5XOmum.js +0 -60
- package/dist/MODIFIERS-mVmfEGgo.cjs +0 -1
- package/dist/PagesPanel-U3InJ9Db.js +0 -78
- package/dist/PagesPanel-wqDb4D-x.cjs +0 -1
- package/dist/ProjectPanel-XODJTO4J.js +0 -99
- package/dist/ProjectPanel-fWESzHr6.cjs +0 -1
- package/dist/SidePanels-lrMQqc0h.cjs +0 -1
- package/dist/Topbar-RrCDxd0i.cjs +0 -1
- package/dist/UILibrariesPanel-7btHgBD0.cjs +0 -1
- package/dist/UnsplashImages-6UjgojvF.cjs +0 -1
- package/dist/UploadImages-3h0cRsvr.cjs +0 -1
- package/dist/_commonjsHelpers-UyOWmZb0.js +0 -8
- package/dist/_commonjsHelpers-wDK0ZLPo.cjs +0 -1
- package/dist/add-page-modal-RwIj1FxH.cjs +0 -1
- package/dist/add-page-modal-TOfMfmPA.js +0 -115
- package/dist/confirm-alert-eIp2cAkc.js +0 -60
- package/dist/confirm-alert-v1lG8ex4.cjs +0 -1
- package/dist/controls-rRZhz0vu.cjs +0 -1
- package/dist/controls-yjgoZzB6.js +0 -199
- package/dist/delete-page-modal-4bxjpVBD.js +0 -97
- package/dist/delete-page-modal-qYDZmpgT.cjs +0 -1
- package/dist/email-blocks.cjs +0 -1
- package/dist/email-blocks.d.ts +0 -3
- package/dist/email-blocks.js +0 -294
- package/dist/email.cjs +0 -1
- package/dist/email.d.ts +0 -171
- package/dist/email.js +0 -90
- package/dist/empty-slot-Lsxjts7Q.js +0 -6
- package/dist/empty-slot-Sy930lX6.cjs +0 -1
- package/dist/form-4jTocVbZ.cjs +0 -1
- package/dist/form-NAzFjGs0.js +0 -125
- package/dist/functions--tdNWQDW.js +0 -30
- package/dist/functions-EVUeSwX1.cjs +0 -1
- package/dist/html-to-json-NqRjgFqp.cjs +0 -1
- package/dist/html-to-json-l_mw5y-e.js +0 -243
- package/dist/index--k2M8kzI.cjs +0 -1
- package/dist/index--mLLy7QQ.cjs +0 -1
- package/dist/index-5XyNUAjc.cjs +0 -290
- package/dist/index-C7mB4XFm.js +0 -3141
- package/dist/index-VBXQixVm.js +0 -117
- package/dist/index-YZhtVcj_.js +0 -2201
- package/dist/index-aeDphKpP.cjs +0 -1
- package/dist/index-lFgDm1oa.js +0 -83780
- package/dist/jsx-runtime-Z_BpKhVy.cjs +0 -27
- package/dist/lib.cjs +0 -3
- package/dist/lib.d.ts +0 -80
- package/dist/lib.js +0 -1350
- package/dist/page-viewer-4wrnWnK0.js +0 -124
- package/dist/page-viewer-ra0GLx1p.cjs +0 -1
- package/dist/project-general-setting-IwZUkYF3.js +0 -90
- package/dist/project-general-setting-lFjTUhHD.cjs +0 -1
- package/dist/project-seo-setting-e1fTqVsd.js +0 -83
- package/dist/project-seo-setting-o0V9acCV.cjs +0 -1
- package/dist/server.cjs +0 -1
- package/dist/server.d.ts +0 -299
- package/dist/server.js +0 -216
- package/dist/single-page-detail-ZNWFKqLW.js +0 -229
- package/dist/single-page-detail-g55Anu7R.cjs +0 -1
- package/dist/studio.cjs +0 -1
- package/dist/studio.d.ts +0 -176
- package/dist/studio.js +0 -67
- package/dist/utils-D_vtk3zK.cjs +0 -1
- package/dist/utils-VpVqnC9m.js +0 -1075
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var _ = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function d(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
|
+
var i = {}, f = {};
|
|
6
|
+
(function(e) {
|
|
7
|
+
Object.defineProperty(e, "__esModule", {
|
|
8
|
+
value: !0
|
|
9
|
+
}), Object.defineProperty(e, "default", {
|
|
10
|
+
enumerable: !0,
|
|
11
|
+
get: function() {
|
|
12
|
+
return l;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
function u(n, t) {
|
|
16
|
+
return {
|
|
17
|
+
handler: n,
|
|
18
|
+
config: t
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
u.withOptions = function(n, t = () => ({})) {
|
|
22
|
+
const r = function(o) {
|
|
23
|
+
return {
|
|
24
|
+
__options: o,
|
|
25
|
+
handler: n(o),
|
|
26
|
+
config: t(o)
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
return r.__isOptionsFunction = !0, r.__pluginFunction = n, r.__configFunction = t, r;
|
|
30
|
+
};
|
|
31
|
+
const l = u;
|
|
32
|
+
})(f);
|
|
33
|
+
(function(e) {
|
|
34
|
+
Object.defineProperty(e, "__esModule", {
|
|
35
|
+
value: !0
|
|
36
|
+
}), Object.defineProperty(e, "default", {
|
|
37
|
+
enumerable: !0,
|
|
38
|
+
get: function() {
|
|
39
|
+
return n;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const u = /* @__PURE__ */ l(f);
|
|
43
|
+
function l(t) {
|
|
44
|
+
return t && t.__esModule ? t : {
|
|
45
|
+
default: t
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const n = u.default;
|
|
49
|
+
})(i);
|
|
50
|
+
let a = i;
|
|
51
|
+
var c = (a.__esModule ? a : { default: a }).default;
|
|
52
|
+
const s = /* @__PURE__ */ d(c);
|
|
53
|
+
export {
|
|
54
|
+
_ as c,
|
|
55
|
+
d as g,
|
|
56
|
+
s as p
|
|
57
|
+
};
|
package/dist/render.cjs
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("lodash-es"),a=require("./STRINGS-gPz7CUOk.cjs"),p=require("./jsx-runtime-JYMCiFoE.cjs"),h=require("react"),w=require("tailwind-merge"),x=require("@chaibuilder/runtime"),B=require("@mhsdesign/jit-browser-tailwindcss"),C=require("@tailwindcss/forms"),Y=require("@tailwindcss/typography"),q=require("@tailwindcss/aspect-ratio"),E=require("./plugin-P0tpo_XZ.cjs");require("tailwindcss-palette-generator");require("./plugin-_F-KZp1i.cjs");const _=(e,n="")=>{const s=e.replace(a.STYLES_KEY,"").split(",").map(i=>i.split(" ").map(l=>{if(l==="")return"";if(l.includes(":")){const o=l.split(":");return o[o.length-1]=n+r.last(o),o.join(":")}return`${n}${l}`}).join(" "));return r.flattenDeep(s).join(" ")},O=e=>{if(!e)return[];try{return JSON.parse(R(e)).filter(t=>!t._type.startsWith("@chai"))}catch{return[{_type:"Paragraph",_id:"error",content:"Invalid JSON. Please check the JSON string."}]}};function R(e){const n=/(asset:\/\/|https:\/\/asset\.localhost\/)(?:localhost\/)?[^"']+/g;return e.replace(n,t=>{const s=decodeURIComponent(t),i=s.indexOf("public");return i!==-1?s.substring(i+6):s})}const K=e=>{const n={};return Object.keys(e).forEach(t=>{r.isString(e[t])&&e[t].startsWith(a.SLOT_KEY)&&(n[t]=e[t].replace(a.SLOT_KEY,"").split(","))}),n},A=r.memoize((e,n)=>{const t=e.replace(a.STYLES_KEY,"").split(","),s=w.twMerge(t[0],t[1]);return n===""?s.replace(a.STYLES_KEY,"").trim():_(s,n).replace(a.STYLES_KEY,"").trim()});function L(e,n){const t=r.get(e,`${n}_attrs`,{});r.has(t,"data-ai-key")&&delete t["data-ai-key"];const s=r.keys(t).join(" ");return r.includes(s,"x-show")&&!r.includes(s,"x-transition")&&(t["x-transition"]=""),t}function N(e,n){const t={};return Object.keys(e).forEach(s=>{if(r.isString(e[s])&&e[s].startsWith(a.STYLES_KEY)){const i=A(e[s],n);t[s]={className:i,...L(e,s)}}}),t}function P(e,n){const t=r.get(e,"_bindings",{});return r.isEmpty(t)?{...e}:(r.each(t,(s,i)=>{r.isString(s)&&r.get(n,s,null)&&(e[i]=r.get(n,s,null))}),e)}function m({blocks:e,parent:n,classPrefix:t="",externalData:s={},blockModifierCallback:i}){const u=e,y=o=>N(o,t),l=n?r.filter(e,{_parent:n}):r.filter(e,o=>r.isEmpty(o._parent));return p.jsxRuntimeExports.jsx(p.jsxRuntimeExports.Fragment,{children:h.Children.toArray(l.map((o,j)=>{const d=K(o),g={};r.isEmpty(d)||Object.keys(d).forEach(c=>{g[c]=h.Children.toArray(d[c].map(S=>p.jsxRuntimeExports.jsx(m,{externalData:s,classPrefix:t,blocks:u,parent:S})))});const T=r.filter(u,{_parent:o._id});g.children=T.length>0?p.jsxRuntimeExports.jsx(m,{externalData:s,classPrefix:t,parent:o._id,blocks:u}):null;const f=x.getBlockComponent(o._type);if(f!==null){let c=o;const S=f.component;return c={...f.defaults,...o},i&&(c=i(c)),h.createElement(S,r.omit({blockProps:{},inBuilder:!1,...c,index:j,...P(o,s),...y(c),...g},["_parent"]))}return p.jsxRuntimeExports.jsxs("noscript",{children:[o._type," not found"]})}))})}async function $(e,n,t=[],s="",i=!1){return await B.createTailwindcss({tailwindConfig:{darkMode:"class",safelist:t,theme:E.getChaiBuilderTheme(e),plugins:[C,Y,q,E.chaiBuilderPlugin],corePlugins:{preflight:i},...s?{prefix:`${s}`}:{}}}).generateStylesFromContent(` ${i?"@tailwind base;":""}
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;`,n)}const v=(e,n)=>e.map(t=>{const s={};return Object.keys(t).forEach(i=>{r.startsWith(t[i],a.STYLES_KEY)&&(s[i]=_(t[i],n))}),s}),I=(e,n,t="",s=!1)=>$(n,[r.replace(JSON.stringify(v(e,t)),/#styles:/g,"")],[],t,s),J=async(e,n={},t="",s=!0)=>await I(e,n,t,s);exports.RenderChaiBlocks=m;exports.convertToBlocks=O;exports.getStylesForBlocks=J;
|
package/dist/render.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
2
|
-
import { default as React_2 } from 'react';
|
|
3
2
|
|
|
4
3
|
declare type ChaiBlock = {
|
|
5
4
|
_id: string;
|
|
@@ -9,45 +8,25 @@ declare type ChaiBlock = {
|
|
|
9
8
|
_bindings?: Record<string, string>;
|
|
10
9
|
} & Record<string, any>;
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
project: {
|
|
32
|
-
name?: string;
|
|
33
|
-
favicon?: string;
|
|
34
|
-
brandingOptions: Record<string, string | number>;
|
|
35
|
-
seoData?: Record<string, string>;
|
|
36
|
-
primaryLanguage?: string;
|
|
37
|
-
languages?: string[];
|
|
38
|
-
homepage?: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
declare type ChaiPageProps = {
|
|
43
|
-
before?: React_2.ReactNode;
|
|
44
|
-
after?: React_2.ReactNode;
|
|
45
|
-
pageData: ChaiPageData;
|
|
46
|
-
classPrefix?: string;
|
|
47
|
-
externalData?: Record<string, any>;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export declare const convertToBlocks: (jsonString: string) => ChaiBlock[];
|
|
11
|
+
declare type ChaiBuilderTailwindTheme<T extends Record<string, unknown> = {}> = {
|
|
12
|
+
primaryColor: string;
|
|
13
|
+
secondaryColor: string;
|
|
14
|
+
headingFont: string;
|
|
15
|
+
bodyFont: string;
|
|
16
|
+
roundedCorners: string;
|
|
17
|
+
bodyBgLightColor: string;
|
|
18
|
+
bodyBgDarkColor: string;
|
|
19
|
+
bodyTextLightColor: string;
|
|
20
|
+
bodyTextDarkColor: string;
|
|
21
|
+
} & T;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* This function converts the chai format content to chai blocks
|
|
25
|
+
* @param chaiFormatContent
|
|
26
|
+
*/
|
|
27
|
+
export declare const convertToBlocks: (chaiFormatContent: string) => ChaiBlock[];
|
|
28
|
+
|
|
29
|
+
export declare const getStylesForBlocks: (blocks: ChaiBlock[], theme?: ChaiBuilderTailwindTheme | {}, classPrefix?: string, includeBaseStyles?: boolean) => Promise<string>;
|
|
51
30
|
|
|
52
31
|
export declare function RenderChaiBlocks({ blocks, parent, classPrefix, externalData, blockModifierCallback, }: {
|
|
53
32
|
blocks: ChaiBlock[];
|
|
@@ -57,16 +36,4 @@ export declare function RenderChaiBlocks({ blocks, parent, classPrefix, external
|
|
|
57
36
|
blockModifierCallback?: (block: ChaiBlock) => ChaiBlock;
|
|
58
37
|
}): JSX_2.Element;
|
|
59
38
|
|
|
60
|
-
export declare const RenderChaiPage: ({ pageData, externalData, before, after, classPrefix, }: ChaiPageProps) => JSX_2.Element;
|
|
61
|
-
|
|
62
|
-
export declare function RenderUnregisteredComponents(props: UnregisteredCompoentProps): JSX_2.Element;
|
|
63
|
-
|
|
64
|
-
declare type UnregisteredCompoentProps = {
|
|
65
|
-
components: Record<string, React_2.ComponentType<any>>;
|
|
66
|
-
blocks: Record<string, any>[];
|
|
67
|
-
parent?: string;
|
|
68
|
-
classPrefix?: string;
|
|
69
|
-
externalData?: Record<string, any>;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
39
|
export { }
|
package/dist/render.js
CHANGED
|
@@ -1,215 +1,168 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import "
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return l(t, `${e}_attrs`, {});
|
|
22
|
-
}
|
|
23
|
-
function H(t, e) {
|
|
24
|
-
const n = {};
|
|
25
|
-
return Object.keys(t).forEach((s) => {
|
|
26
|
-
if (_(t[s]) && t[s].startsWith(d)) {
|
|
27
|
-
const r = G(t[s], e);
|
|
28
|
-
n[s] = {
|
|
29
|
-
className: r,
|
|
30
|
-
...q(t, s)
|
|
31
|
-
};
|
|
1
|
+
import { last as T, flattenDeep as A, memoize as N, filter as h, isEmpty as S, omit as P, isString as _, get as u, each as R, has as $, keys as J, includes as j, replace as W, startsWith as I } from "lodash-es";
|
|
2
|
+
import { a as c, S as C } from "./STRINGS--j49GZJP.js";
|
|
3
|
+
import { j as p } from "./jsx-runtime-Sp0orL4X.js";
|
|
4
|
+
import y from "react";
|
|
5
|
+
import { twMerge as K } from "tailwind-merge";
|
|
6
|
+
import { getBlockComponent as Y } from "@chaibuilder/runtime";
|
|
7
|
+
import { createTailwindcss as v } from "@mhsdesign/jit-browser-tailwindcss";
|
|
8
|
+
import F from "@tailwindcss/forms";
|
|
9
|
+
import L from "@tailwindcss/typography";
|
|
10
|
+
import U from "@tailwindcss/aspect-ratio";
|
|
11
|
+
import { g as z, c as M } from "./plugin-f5uJtdXY.js";
|
|
12
|
+
import "tailwindcss-palette-generator";
|
|
13
|
+
import "./plugin-sJ3Hzvpv.js";
|
|
14
|
+
const E = (s, r = "") => {
|
|
15
|
+
const e = s.replace(c, "").split(",").map((n) => n.split(" ").map((a) => {
|
|
16
|
+
if (a === "")
|
|
17
|
+
return "";
|
|
18
|
+
if (a.includes(":")) {
|
|
19
|
+
const i = a.split(":");
|
|
20
|
+
return i[i.length - 1] = r + T(i), i.join(":");
|
|
32
21
|
}
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
externalData: p,
|
|
52
|
-
classPrefix: r,
|
|
53
|
-
blocks: j,
|
|
54
|
-
parent: S,
|
|
55
|
-
components: e
|
|
56
|
-
}
|
|
57
|
-
))
|
|
58
|
-
);
|
|
59
|
-
});
|
|
60
|
-
const B = g(j, { _parent: a._id });
|
|
61
|
-
E.children = B.length > 0 ? /* @__PURE__ */ i.jsx(
|
|
62
|
-
N,
|
|
63
|
-
{
|
|
64
|
-
externalData: p,
|
|
65
|
-
classPrefix: r,
|
|
66
|
-
parent: a._id,
|
|
67
|
-
blocks: j,
|
|
68
|
-
components: e
|
|
69
|
-
}
|
|
70
|
-
) : null;
|
|
71
|
-
const c = l(e, a._type, null);
|
|
72
|
-
if (c !== null) {
|
|
73
|
-
let m = a;
|
|
74
|
-
const S = c;
|
|
75
|
-
return u.createElement(
|
|
76
|
-
S,
|
|
77
|
-
T(
|
|
78
|
-
{
|
|
79
|
-
...m,
|
|
80
|
-
index: y,
|
|
81
|
-
...J(a, p),
|
|
82
|
-
...C(m),
|
|
83
|
-
...E
|
|
84
|
-
},
|
|
85
|
-
["_parent"]
|
|
86
|
-
)
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
return /* @__PURE__ */ i.jsxs("noscript", { children: [
|
|
90
|
-
a._type,
|
|
91
|
-
" not found"
|
|
92
|
-
] });
|
|
93
|
-
})
|
|
94
|
-
) });
|
|
22
|
+
return `${r}${a}`;
|
|
23
|
+
}).join(" "));
|
|
24
|
+
return A(e).join(" ");
|
|
25
|
+
}, ft = (s) => {
|
|
26
|
+
if (!s)
|
|
27
|
+
return [];
|
|
28
|
+
try {
|
|
29
|
+
return JSON.parse(q(s)).filter((t) => !t._type.startsWith("@chai"));
|
|
30
|
+
} catch {
|
|
31
|
+
return [{ _type: "Paragraph", _id: "error", content: "Invalid JSON. Please check the JSON string." }];
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
function q(s) {
|
|
35
|
+
const r = /(asset:\/\/|https:\/\/asset\.localhost\/)(?:localhost\/)?[^"']+/g;
|
|
36
|
+
return s.replace(r, (t) => {
|
|
37
|
+
const e = decodeURIComponent(t), n = e.indexOf("public");
|
|
38
|
+
return n !== -1 ? e.substring(n + 6) : e;
|
|
39
|
+
});
|
|
95
40
|
}
|
|
96
|
-
const
|
|
97
|
-
const
|
|
98
|
-
return Object.keys(
|
|
99
|
-
_(t
|
|
100
|
-
}),
|
|
101
|
-
},
|
|
102
|
-
const
|
|
103
|
-
return
|
|
41
|
+
const G = (s) => {
|
|
42
|
+
const r = {};
|
|
43
|
+
return Object.keys(s).forEach((t) => {
|
|
44
|
+
_(s[t]) && s[t].startsWith(C) && (r[t] = s[t].replace(C, "").split(","));
|
|
45
|
+
}), r;
|
|
46
|
+
}, H = N((s, r) => {
|
|
47
|
+
const t = s.replace(c, "").split(","), e = K(t[0], t[1]);
|
|
48
|
+
return r === "" ? e.replace(c, "").trim() : E(e, r).replace(c, "").trim();
|
|
104
49
|
});
|
|
105
|
-
function Q(
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
return
|
|
50
|
+
function Q(s, r) {
|
|
51
|
+
const t = u(s, `${r}_attrs`, {});
|
|
52
|
+
$(t, "data-ai-key") && delete t["data-ai-key"];
|
|
53
|
+
const e = J(t).join(" ");
|
|
54
|
+
return j(e, "x-show") && !j(e, "x-transition") && (t["x-transition"] = ""), t;
|
|
110
55
|
}
|
|
111
|
-
function V(
|
|
112
|
-
const
|
|
113
|
-
return Object.keys(
|
|
114
|
-
if (_(
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
className:
|
|
118
|
-
...Q(
|
|
56
|
+
function V(s, r) {
|
|
57
|
+
const t = {};
|
|
58
|
+
return Object.keys(s).forEach((e) => {
|
|
59
|
+
if (_(s[e]) && s[e].startsWith(c)) {
|
|
60
|
+
const n = H(s[e], r);
|
|
61
|
+
t[e] = {
|
|
62
|
+
className: n,
|
|
63
|
+
...Q(s, e)
|
|
119
64
|
};
|
|
120
65
|
}
|
|
121
|
-
}),
|
|
66
|
+
}), t;
|
|
122
67
|
}
|
|
123
|
-
function X(
|
|
124
|
-
const
|
|
125
|
-
return
|
|
126
|
-
_(
|
|
127
|
-
}),
|
|
68
|
+
function X(s, r) {
|
|
69
|
+
const t = u(s, "_bindings", {});
|
|
70
|
+
return S(t) ? { ...s } : (R(t, (e, n) => {
|
|
71
|
+
_(e) && u(r, e, null) && (s[n] = u(r, e, null));
|
|
72
|
+
}), s);
|
|
128
73
|
}
|
|
129
|
-
function
|
|
130
|
-
blocks:
|
|
131
|
-
parent:
|
|
132
|
-
classPrefix:
|
|
133
|
-
externalData:
|
|
134
|
-
blockModifierCallback:
|
|
74
|
+
function B({
|
|
75
|
+
blocks: s,
|
|
76
|
+
parent: r,
|
|
77
|
+
classPrefix: t = "",
|
|
78
|
+
externalData: e = {},
|
|
79
|
+
blockModifierCallback: n
|
|
135
80
|
}) {
|
|
136
|
-
const
|
|
137
|
-
return /* @__PURE__ */
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
81
|
+
const l = s, w = (i) => V(i, t), a = r ? h(s, { _parent: r }) : h(s, (i) => S(i._parent));
|
|
82
|
+
return /* @__PURE__ */ p.jsx(p.Fragment, { children: y.Children.toArray(
|
|
83
|
+
a.map((i, O) => {
|
|
84
|
+
const f = G(i), m = {};
|
|
85
|
+
S(f) || Object.keys(f).forEach((o) => {
|
|
86
|
+
m[o] = y.Children.toArray(
|
|
87
|
+
f[o].map((g) => /* @__PURE__ */ p.jsx(
|
|
88
|
+
B,
|
|
144
89
|
{
|
|
145
|
-
externalData:
|
|
146
|
-
classPrefix:
|
|
147
|
-
blocks:
|
|
148
|
-
parent:
|
|
90
|
+
externalData: e,
|
|
91
|
+
classPrefix: t,
|
|
92
|
+
blocks: l,
|
|
93
|
+
parent: g
|
|
149
94
|
}
|
|
150
95
|
))
|
|
151
96
|
);
|
|
152
97
|
});
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
98
|
+
const x = h(l, { _parent: i._id });
|
|
99
|
+
m.children = x.length > 0 ? /* @__PURE__ */ p.jsx(
|
|
100
|
+
B,
|
|
156
101
|
{
|
|
157
|
-
externalData:
|
|
158
|
-
classPrefix:
|
|
159
|
-
parent:
|
|
160
|
-
blocks:
|
|
102
|
+
externalData: e,
|
|
103
|
+
classPrefix: t,
|
|
104
|
+
parent: i._id,
|
|
105
|
+
blocks: l
|
|
161
106
|
}
|
|
162
107
|
) : null;
|
|
163
|
-
const
|
|
164
|
-
if (
|
|
165
|
-
let
|
|
166
|
-
const
|
|
167
|
-
return
|
|
168
|
-
|
|
169
|
-
|
|
108
|
+
const d = Y(i._type);
|
|
109
|
+
if (d !== null) {
|
|
110
|
+
let o = i;
|
|
111
|
+
const g = d.component;
|
|
112
|
+
return o = { ...d.defaults, ...i }, n && (o = n(o)), y.createElement(
|
|
113
|
+
g,
|
|
114
|
+
P(
|
|
170
115
|
{
|
|
171
116
|
blockProps: {},
|
|
172
117
|
inBuilder: !1,
|
|
173
|
-
...
|
|
174
|
-
index:
|
|
175
|
-
...X(
|
|
176
|
-
...
|
|
177
|
-
...
|
|
118
|
+
...o,
|
|
119
|
+
index: O,
|
|
120
|
+
...X(i, e),
|
|
121
|
+
...w(o),
|
|
122
|
+
...m
|
|
178
123
|
},
|
|
179
124
|
["_parent"]
|
|
180
125
|
)
|
|
181
126
|
);
|
|
182
127
|
}
|
|
183
|
-
return /* @__PURE__ */
|
|
184
|
-
|
|
128
|
+
return /* @__PURE__ */ p.jsxs("noscript", { children: [
|
|
129
|
+
i._type,
|
|
185
130
|
" not found"
|
|
186
131
|
] });
|
|
187
132
|
})
|
|
188
133
|
) });
|
|
189
134
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
135
|
+
async function Z(s, r, t = [], e = "", n = !1) {
|
|
136
|
+
return await v({
|
|
137
|
+
tailwindConfig: {
|
|
138
|
+
darkMode: "class",
|
|
139
|
+
safelist: t,
|
|
140
|
+
theme: z(s),
|
|
141
|
+
plugins: [F, L, U, M],
|
|
142
|
+
corePlugins: { preflight: n },
|
|
143
|
+
...e ? { prefix: `${e}` } : {}
|
|
144
|
+
}
|
|
145
|
+
}).generateStylesFromContent(
|
|
146
|
+
` ${n ? "@tailwind base;" : ""}
|
|
147
|
+
@tailwind components;
|
|
148
|
+
@tailwind utilities;`,
|
|
149
|
+
r
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
const D = (s, r) => s.map((t) => {
|
|
153
|
+
const e = {};
|
|
154
|
+
return Object.keys(t).forEach((n) => {
|
|
155
|
+
I(t[n], c) && (e[n] = E(t[n], r));
|
|
156
|
+
}), e;
|
|
157
|
+
}), b = (s, r, t = "", e = !1) => Z(
|
|
158
|
+
r,
|
|
159
|
+
[W(JSON.stringify(D(s, t)), /#styles:/g, "")],
|
|
160
|
+
[],
|
|
161
|
+
t,
|
|
162
|
+
e
|
|
163
|
+
), mt = async (s, r = {}, t = "", e = !0) => await b(s, r, t, e);
|
|
210
164
|
export {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
at as convertToBlocks
|
|
165
|
+
B as RenderChaiBlocks,
|
|
166
|
+
ft as convertToBlocks,
|
|
167
|
+
mt as getStylesForBlocks
|
|
215
168
|
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { CaretSortIcon as n, CheckIcon as c } from "@radix-ui/react-icons";
|
|
4
|
+
import * as e from "@radix-ui/react-select";
|
|
5
|
+
import { ag as r } from "./context-menu-sks9vdzC.js";
|
|
6
|
+
const y = e.Root, w = e.Group, N = e.Value, m = i.forwardRef(({ className: s, children: o, ...a }, d) => /* @__PURE__ */ t.jsxs(
|
|
7
|
+
e.Trigger,
|
|
8
|
+
{
|
|
9
|
+
ref: d,
|
|
10
|
+
className: r(
|
|
11
|
+
"flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
12
|
+
s
|
|
13
|
+
),
|
|
14
|
+
...a,
|
|
15
|
+
children: [
|
|
16
|
+
o,
|
|
17
|
+
/* @__PURE__ */ t.jsx(e.Icon, { asChild: !0, children: /* @__PURE__ */ t.jsx(n, { className: "h-4 w-4 opacity-50" }) })
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
));
|
|
21
|
+
m.displayName = e.Trigger.displayName;
|
|
22
|
+
const p = i.forwardRef(({ className: s, children: o, position: a = "popper", ...d }, l) => /* @__PURE__ */ t.jsx(e.Portal, { children: /* @__PURE__ */ t.jsx(
|
|
23
|
+
e.Content,
|
|
24
|
+
{
|
|
25
|
+
ref: l,
|
|
26
|
+
className: r(
|
|
27
|
+
"relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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",
|
|
28
|
+
a === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
29
|
+
s
|
|
30
|
+
),
|
|
31
|
+
position: a,
|
|
32
|
+
...d,
|
|
33
|
+
children: /* @__PURE__ */ t.jsx(
|
|
34
|
+
e.Viewport,
|
|
35
|
+
{
|
|
36
|
+
className: r(
|
|
37
|
+
"p-1",
|
|
38
|
+
a === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
39
|
+
),
|
|
40
|
+
children: o
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
) }));
|
|
45
|
+
p.displayName = e.Content.displayName;
|
|
46
|
+
const f = i.forwardRef(({ className: s, ...o }, a) => /* @__PURE__ */ t.jsx(e.Label, { ref: a, className: r("px-2 py-1.5 text-sm font-semibold", s), ...o }));
|
|
47
|
+
f.displayName = e.Label.displayName;
|
|
48
|
+
const u = i.forwardRef(({ className: s, children: o, ...a }, d) => /* @__PURE__ */ t.jsxs(
|
|
49
|
+
e.Item,
|
|
50
|
+
{
|
|
51
|
+
ref: d,
|
|
52
|
+
className: r(
|
|
53
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
54
|
+
s
|
|
55
|
+
),
|
|
56
|
+
...a,
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ t.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ t.jsx(e.ItemIndicator, { children: /* @__PURE__ */ t.jsx(c, { className: "h-4 w-4" }) }) }),
|
|
59
|
+
/* @__PURE__ */ t.jsx(e.ItemText, { children: o })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
));
|
|
63
|
+
u.displayName = e.Item.displayName;
|
|
64
|
+
const x = i.forwardRef(({ className: s, ...o }, a) => /* @__PURE__ */ t.jsx(e.Separator, { ref: a, className: r("-mx-1 my-1 h-px bg-muted", s), ...o }));
|
|
65
|
+
x.displayName = e.Separator.displayName;
|
|
66
|
+
export {
|
|
67
|
+
y as S,
|
|
68
|
+
w as a,
|
|
69
|
+
N as b,
|
|
70
|
+
m as c,
|
|
71
|
+
p as d,
|
|
72
|
+
f as e,
|
|
73
|
+
u as f,
|
|
74
|
+
x as g
|
|
75
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("./jsx-runtime-JYMCiFoE.cjs"),g=require("react"),c=require("@radix-ui/react-icons"),j=require("@radix-ui/react-select"),n=require("./context-menu-_8TFbFEJ.cjs");function l(a){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(s,t,o.get?o:{enumerable:!0,get:()=>a[t]})}}return s.default=a,Object.freeze(s)}const i=l(g),e=l(j),b=e.Root,h=e.Group,S=e.Value,d=i.forwardRef(({className:a,children:s,...t},o)=>r.jsxRuntimeExports.jsxs(e.Trigger,{ref:o,className:n.cn("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),...t,children:[s,r.jsxRuntimeExports.jsx(e.Icon,{asChild:!0,children:r.jsxRuntimeExports.jsx(c.CaretSortIcon,{className:"h-4 w-4 opacity-50"})})]}));d.displayName=e.Trigger.displayName;const m=i.forwardRef(({className:a,children:s,position:t="popper",...o},f)=>r.jsxRuntimeExports.jsx(e.Portal,{children:r.jsxRuntimeExports.jsx(e.Content,{ref:f,className:n.cn("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:t,...o,children:r.jsxRuntimeExports.jsx(e.Viewport,{className:n.cn("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s})})}));m.displayName=e.Content.displayName;const p=i.forwardRef(({className:a,...s},t)=>r.jsxRuntimeExports.jsx(e.Label,{ref:t,className:n.cn("px-2 py-1.5 text-sm font-semibold",a),...s}));p.displayName=e.Label.displayName;const u=i.forwardRef(({className:a,children:s,...t},o)=>r.jsxRuntimeExports.jsxs(e.Item,{ref:o,className:n.cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...t,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(e.ItemIndicator,{children:r.jsxRuntimeExports.jsx(c.CheckIcon,{className:"h-4 w-4"})})}),r.jsxRuntimeExports.jsx(e.ItemText,{children:s})]}));u.displayName=e.Item.displayName;const x=i.forwardRef(({className:a,...s},t)=>r.jsxRuntimeExports.jsx(e.Separator,{ref:t,className:n.cn("-mx-1 my-1 h-px bg-muted",a),...s}));x.displayName=e.Separator.displayName;exports.Select=b;exports.SelectContent=m;exports.SelectGroup=h;exports.SelectItem=u;exports.SelectLabel=p;exports.SelectSeparator=x;exports.SelectTrigger=d;exports.SelectValue=S;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./jsx-runtime-JYMCiFoE.cjs"),u=require("react"),l=require("@radix-ui/react-separator"),p=require("./context-menu-_8TFbFEJ.cjs");function a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const f=a(u),n=a(l),c=f.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...o},s)=>i.jsxRuntimeExports.jsx(n.Root,{ref:s,decorative:r,orientation:t,className:p.cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));c.displayName=n.Root.displayName;exports.Separator=c;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { j as p } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
import * as o from "@radix-ui/react-separator";
|
|
4
|
+
import { ag as i } from "./context-menu-sks9vdzC.js";
|
|
5
|
+
const l = e.forwardRef(({ className: a, orientation: r = "horizontal", decorative: t = !0, ...s }, m) => /* @__PURE__ */ p.jsx(
|
|
6
|
+
o.Root,
|
|
7
|
+
{
|
|
8
|
+
ref: m,
|
|
9
|
+
decorative: t,
|
|
10
|
+
orientation: r,
|
|
11
|
+
className: i("shrink-0 bg-border", r === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", a),
|
|
12
|
+
...s
|
|
13
|
+
}
|
|
14
|
+
));
|
|
15
|
+
l.displayName = o.Root.displayName;
|
|
16
|
+
export {
|
|
17
|
+
l as S
|
|
18
|
+
};
|