@chaibuilder/sdk 3.1.0 → 3.1.1
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-BF_Dj7wT.cjs → code-editor-C62A8Uxk.cjs} +1 -1
- package/dist/{code-editor-DHjchara.js → code-editor-CZim1lTD.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/{index-0I-fi22L.js → index-DyIelfZ9.js} +428 -384
- package/dist/index-_9FkXyrh.cjs +128 -0
- package/dist/{rte-widget-modal-BZJ8UA08.cjs → rte-widget-modal-Bx0TSa19.cjs} +1 -1
- package/dist/{rte-widget-modal-DxyV3u6C.js → rte-widget-modal-CecJhRtn.js} +1 -1
- package/dist/ui.d.ts +1 -1
- package/package.json +1 -1
- package/dist/index-kJFsIwFo.cjs +0 -128
|
@@ -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-_9FkXyrh.cjs"),n=require("./tooltip-C2BCZ8Al.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-DyIelfZ9.js";
|
|
3
3
|
import { a1 as v, a3 as S, a6 as j, a9 as w, v as y } from "./tooltip-4-b9QGDK.js";
|
|
4
4
|
import "clsx";
|
|
5
5
|
import "tailwind-merge";
|
package/dist/ui.d.ts
CHANGED
|
@@ -367,7 +367,7 @@ export declare const SheetTitle: React_2.ForwardRefExoticComponent<Omit<DialogPr
|
|
|
367
367
|
export declare const SheetTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
368
368
|
|
|
369
369
|
declare const sheetVariants: (props?: {
|
|
370
|
-
side?: "
|
|
370
|
+
side?: "left" | "right" | "bottom" | "top";
|
|
371
371
|
} & ClassProp) => string;
|
|
372
372
|
|
|
373
373
|
export declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): JSX_2.Element;
|