@chaibuilder/sdk 3.0.12 → 3.0.14
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/README.md +1 -2
- package/dist/{code-editor-DFvtVxXd.cjs → code-editor-D5uDqrW1.cjs} +1 -1
- package/dist/{code-editor-GydqqBXp.js → code-editor-e5WfREx8.js} +1 -1
- package/dist/core.cjs +66 -48
- package/dist/core.js +2564 -2481
- package/dist/{css-import-modal-BvRHCuHm.js → css-import-modal-CSVrt6lz.js} +1 -1
- package/dist/{css-import-modal-DkVfKE_h.cjs → css-import-modal-Cm49bHmT.cjs} +1 -1
- package/dist/sdk.css +1 -1
- package/dist/{toggle-DrRMNSqS.js → toggle-C5YXnEL9.js} +409 -409
- package/dist/toggle-Ca6BayTf.cjs +1 -0
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +336 -305
- package/package.json +3 -2
- package/dist/toggle-BaUXILMJ.cjs +0 -1
package/README.md
CHANGED
|
@@ -6,7 +6,6 @@ It is a simple React component that renders a full-fledged visual builder into a
|
|
|
6
6
|
|
|
7
7
|
Demo: https://chaibuilder-sdk.vercel.app/
|
|
8
8
|
|
|
9
|
-
NextJS Starter: https://github.com/chaibuilder/chaibuilder-nextjs
|
|
10
9
|
|
|
11
10
|
---
|
|
12
11
|
|
|
@@ -68,7 +67,7 @@ export default () => {
|
|
|
68
67
|
## Support
|
|
69
68
|
If you like the project, you can assist us in expanding. ChaiBuilder is a collaborative endeavor crafted by developers in their free time. We value every contribution, no matter how modest, as each one represents a significant step forward in various ways, particularly in fueling our drive to enhance this tool continually.
|
|
70
69
|
|
|
71
|
-
<a href="https://www.buymeacoffee.com/chaibuilder" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height:
|
|
70
|
+
<a href="https://www.buymeacoffee.com/chaibuilder" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 25px !important;width: 117px !important;" ></a>
|
|
72
71
|
|
|
73
72
|
|
|
74
73
|
## Acknowledgments
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("./core.cjs");require("lodash-es");require("clsx");require("tailwind-merge");require("tree-model");const i=require("react");require("jotai");require("@chaibuilder/runtime");require("sonner");const k=require("react-i18next"),r=require("./toggle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("./core.cjs");require("lodash-es");require("clsx");require("tailwind-merge");require("tree-model");const i=require("react");require("jotai");require("@chaibuilder/runtime");require("sonner");const k=require("react-i18next"),r=require("./toggle-Ca6BayTf.cjs"),q=require("@react-hookz/web"),m=n=>{const s=document.createElement("div");return s.innerHTML=n,s.innerHTML};function j(){const{t:n}=k.useTranslation(),[s,h]=i.useState(!1),[a,p]=i.useState(""),[t,d]=c.useCodeEditor(),[u]=c.useSelectedBlockIds(),b=c.useUpdateBlocksProps(),f=c.useUpdateBlocksPropsRealtime(),C=q.useThrottledCallback(o=>{const l=m(o);f([t.blockId],{[t.blockProp]:l})},[],300),x=i.useCallback(()=>{if(s){const o=m(a);b([t.blockId],{[t.blockProp]:o})}},[s,a]);i.useEffect(()=>{u.includes(t==null?void 0:t.blockId)||(x(),d(null))},[u]);const g=()=>{x(),d(null)};return e.jsx(r.Dialog,{open:!0,onOpenChange:g,children:e.jsxs(r.DialogContent,{className:"flex max-h-[400px] min-h-[200px] max-w-4xl flex-col border-gray-700 text-black",children:[e.jsx(r.DialogHeader,{className:"shrink-0 border-b border-gray-700 pb-3",children:e.jsx(r.DialogTitle,{className:"flex items-center justify-between text-black",children:e.jsxs("div",{className:"space-x-3 text-sm font-semibold",children:[e.jsx("span",{children:n("HTML Code Editor |")}),e.jsx("span",{className:"text-xs text-gray-400",children:n("Scripts will be only executed in preview and live mode.")})]})})}),e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(r.Textarea,{className:"h-full w-full resize-none font-mono text-xs",value:a||t.initialCode,onChange:o=>{const l=o.target.value;h(!0),p(l),C(l)},rows:10,placeholder:"Enter your code here..."})})]})})}exports.default=j;
|
|
@@ -9,7 +9,7 @@ import "jotai";
|
|
|
9
9
|
import "@chaibuilder/runtime";
|
|
10
10
|
import "sonner";
|
|
11
11
|
import { useTranslation as w } from "react-i18next";
|
|
12
|
-
import { a1 as N, a3 as E, a6 as D, a9 as H, b1 as P } from "./toggle-
|
|
12
|
+
import { a1 as N, a3 as E, a6 as D, a9 as H, b1 as P } from "./toggle-C5YXnEL9.js";
|
|
13
13
|
import { useThrottledCallback as B } from "@react-hookz/web";
|
|
14
14
|
const p = (l) => {
|
|
15
15
|
const t = document.createElement("div");
|