@chaibuilder/sdk 3.1.19 → 3.1.20
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/{code-editor-tQ-y-Wn4.js → code-editor-BHJy4rC7.js} +1 -1
- package/dist/{code-editor-DNlfoIQD.cjs → code-editor-B_-5Et51.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +1 -0
- package/dist/core.js +1 -1
- package/dist/{index-DV1NenGF.cjs → index-ByYl6HCd.cjs} +2 -2
- package/dist/{index-BjbJYOzg.js → index-C75e470H.js} +3 -2
- package/dist/{rte-widget-modal-CF3OeMpi.cjs → rte-widget-modal-BGXbemWF.cjs} +1 -1
- package/dist/{rte-widget-modal-Ao1azHBf.js → rte-widget-modal-DQBQZ86W.js} +1 -1
- package/package.json +1 -1
|
@@ -5504,7 +5504,7 @@ const RichTextEditor = memo(
|
|
|
5504
5504
|
/* @__PURE__ */ jsx("p", { className: "font-semibold", children: o("Oops! Something went wrong.") }),
|
|
5505
5505
|
/* @__PURE__ */ jsx("p", { children: o("Please try again.") })
|
|
5506
5506
|
] }) });
|
|
5507
|
-
}, CodeEditor$1 = React__default.lazy(() => import("./code-editor-
|
|
5507
|
+
}, CodeEditor$1 = React__default.lazy(() => import("./code-editor-BHJy4rC7.js")), CanvasArea = () => {
|
|
5508
5508
|
const [o] = useCodeEditor(), n = useBuilderProp("onError", noop);
|
|
5509
5509
|
return /* @__PURE__ */ jsx("div", { className: "flex h-full max-h-full w-full flex-1 flex-col", children: /* @__PURE__ */ jsxs("div", { className: "relative flex h-full max-h-full flex-col overflow-hidden bg-gray-100/40", children: [
|
|
5510
5510
|
/* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "h-full" }), children: /* @__PURE__ */ jsx(ErrorBoundary, { fallback: /* @__PURE__ */ jsx(FallbackError, {}), onError: n, children: /* @__PURE__ */ jsx(StaticCanvas, {}) }) }),
|
|
@@ -6074,7 +6074,7 @@ const DataBindingSelector = ({
|
|
|
6074
6074
|
]
|
|
6075
6075
|
}
|
|
6076
6076
|
) });
|
|
6077
|
-
}, RTEModal = React__default.lazy(() => import("./rte-widget-modal-
|
|
6077
|
+
}, RTEModal = React__default.lazy(() => import("./rte-widget-modal-DQBQZ86W.js")), RichTextEditorFieldComp = ({ blockId: o, id: n, placeholder: r, value: a, onChange: l, onBlur: i }) => {
|
|
6078
6078
|
const c = useRef(null), [d, p] = useState(!1), u = useRTEditor({
|
|
6079
6079
|
blockId: o,
|
|
6080
6080
|
value: a,
|
|
@@ -12032,6 +12032,7 @@ ${l})
|
|
|
12032
12032
|
}, ChaiBuilderComponent = (o) => {
|
|
12033
12033
|
const n = useMemo(() => o.layout || RootLayout, [o.layout]), r = useBuilderProp("builderTheme", defaultThemeValues), a = useBuilderProp("flags.exportCode", !1);
|
|
12034
12034
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12035
|
+
o.children,
|
|
12035
12036
|
/* @__PURE__ */ jsx(CssThemeVariables, { theme: r }),
|
|
12036
12037
|
/* @__PURE__ */ jsx(n, {}),
|
|
12037
12038
|
a && /* @__PURE__ */ jsx(ExportCodeModal, {})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("./index-ByYl6HCd.cjs"),n=require("./tooltip-CzZ7Fvt7.cjs");require("clsx");require("tailwind-merge");const S=({isOpen:m,onClose:l,editor:t,rteElement:f})=>{const r=u.usePageExternalData(),j=o=>{if(!t)return;const i=`{{${o}}}`;t.commands.focus();const{from:p,to:g}=t.state.selection;if(p!==g)t.chain().deleteSelection().insertContent(i).run();else{const{state:c}=t,s=c.selection.from,x=c.doc.textBetween(Math.max(0,s-1),s),a=c.doc.textBetween(s,Math.min(s+1,c.doc.content.size));let d="";s>0&&x!==" "&&!/[.,!?;:]/.test(x)&&(d=" ");let h="";a&&a!==" "&&!/[.,!?;:]/.test(a)&&(h=" "),t.chain().insertContent(d+i+h).run()}};return e.jsx(n.Dialog,{open:m,onOpenChange:o=>!o&&l(),children:e.jsxs(n.DialogContent,{className:"max-h-[90vh] overflow-y-auto sm:max-w-[800px]",children:[e.jsx(n.DialogHeader,{children:e.jsxs(n.DialogTitle,{className:"flex items-center justify-between pr-8",children:[e.jsx("span",{children:"Rich Text Editor"}),Object.keys(r).length>0&&e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:"mr-2 text-sm text-muted-foreground",children:"Add field:"}),e.jsx("div",{className:"rte-path-selector",children:e.jsx(u.NestedPathSelector,{data:r,onSelect:j})})]})]})}),f,e.jsx("div",{className:"mt-4 flex justify-end",children:e.jsx(n.Button,{onClick:l,children:"Done"})})]})})};exports.default=S;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import { d as N, N as D } from "./index-
|
|
2
|
+
import { d as N, N as D } from "./index-C75e470H.js";
|
|
3
3
|
import { a1 as v, a3 as S, a6 as j, a9 as w, v as y } from "./tooltip-Bz2MxMHf.js";
|
|
4
4
|
import "clsx";
|
|
5
5
|
import "tailwind-merge";
|