@chaibuilder/sdk 3.1.4 → 3.1.6
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-display-BJJV-nKI.js +64 -0
- package/dist/code-display-BcpLta9W.cjs +1 -0
- package/dist/{code-editor-DyPXY3uT.cjs → code-editor-BdEoZFSV.cjs} +1 -1
- package/dist/{code-editor-BIKk8hmw.js → code-editor-DhTHKGK0.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +29 -26
- package/dist/core.js +87 -85
- package/dist/get-chai-builder-tailwind-config-BqaIvg8p.js +74 -0
- package/dist/get-chai-builder-tailwind-config-C6MHaUM0.cjs +1 -0
- package/dist/{index-lrl587-2.js → index-CDJhqQK5.js} +1393 -1084
- package/dist/index-CooHzimL.cjs +151 -0
- package/dist/render.d.ts +2 -2
- package/dist/{rte-widget-modal-CAUSWNvB.cjs → rte-widget-modal-6RqYZqbC.cjs} +1 -1
- package/dist/{rte-widget-modal-D4K_qgBv.js → rte-widget-modal-BK6-O4Rv.js} +1 -1
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.js +6 -75
- package/dist/ui.d.ts +13 -13
- package/package.json +5 -4
- package/dist/index-H7tjcODf.cjs +0 -128
package/dist/render.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChaiFontViaUrl } from '@chaibuilder/runtime';
|
|
2
2
|
import { ChaiPageProps } from '@chaibuilder/runtime';
|
|
3
|
-
import { JSX
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
export declare const applyChaiDataBinding: (block: Record<string, string>, pageExternalData: Record<string, any>) => any;
|
|
6
6
|
|
|
@@ -76,7 +76,7 @@ declare type HexColor = string;
|
|
|
76
76
|
|
|
77
77
|
declare type HSLColor = string;
|
|
78
78
|
|
|
79
|
-
export declare function RenderChaiBlocks(props: RenderChaiBlocksProps):
|
|
79
|
+
export declare function RenderChaiBlocks(props: RenderChaiBlocksProps): JSX.Element;
|
|
80
80
|
|
|
81
81
|
declare type RenderChaiBlocksProps = {
|
|
82
82
|
blocks: ChaiBlock[];
|
|
@@ -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-CooHzimL.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-CDJhqQK5.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/tailwind.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./plugin-CSgw-f78.cjs"),e=require("./get-chai-builder-tailwind-config-C6MHaUM0.cjs"),r=require("./get-chai-builder-theme-B1tr_NJB.cjs");exports.chaiBuilderPlugin=i.chaiBuilderPlugin;exports.getChaiBuilderTailwindConfig=e.getChaiBuilderTailwindConfig;exports.getChaiBuilderTheme=r.getChaiBuilderTheme;
|
package/dist/tailwind.js
CHANGED
|
@@ -1,77 +1,8 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import o from "
|
|
3
|
-
import
|
|
4
|
-
import e from "@tailwindcss/typography";
|
|
5
|
-
import d from "tailwindcss-animate";
|
|
6
|
-
import { g as m } from "./get-chai-builder-theme-BarMkcGH.js";
|
|
7
|
-
function n() {
|
|
8
|
-
return {
|
|
9
|
-
colors: {
|
|
10
|
-
border: "hsl(var(--border))",
|
|
11
|
-
input: "hsl(var(--input))",
|
|
12
|
-
ring: "hsl(var(--ring))",
|
|
13
|
-
background: "hsl(var(--background))",
|
|
14
|
-
foreground: "hsl(var(--foreground))",
|
|
15
|
-
primary: {
|
|
16
|
-
DEFAULT: "hsl(var(--primary))",
|
|
17
|
-
foreground: "hsl(var(--primary-foreground))"
|
|
18
|
-
},
|
|
19
|
-
secondary: {
|
|
20
|
-
DEFAULT: "hsl(var(--secondary))",
|
|
21
|
-
foreground: "hsl(var(--secondary-foreground))"
|
|
22
|
-
},
|
|
23
|
-
destructive: {
|
|
24
|
-
DEFAULT: "hsl(var(--destructive))",
|
|
25
|
-
foreground: "hsl(var(--destructive-foreground))"
|
|
26
|
-
},
|
|
27
|
-
muted: {
|
|
28
|
-
DEFAULT: "hsl(var(--muted))",
|
|
29
|
-
foreground: "hsl(var(--muted-foreground))"
|
|
30
|
-
},
|
|
31
|
-
accent: {
|
|
32
|
-
DEFAULT: "hsl(var(--accent))",
|
|
33
|
-
foreground: "hsl(var(--accent-foreground))"
|
|
34
|
-
},
|
|
35
|
-
popover: {
|
|
36
|
-
DEFAULT: "hsl(var(--popover))",
|
|
37
|
-
foreground: "hsl(var(--popover-foreground))"
|
|
38
|
-
},
|
|
39
|
-
card: {
|
|
40
|
-
DEFAULT: "hsl(var(--card))",
|
|
41
|
-
foreground: "hsl(var(--card-foreground))"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
borderRadius: {
|
|
45
|
-
lg: "var(--radius)",
|
|
46
|
-
md: "calc(var(--radius) - 2px)",
|
|
47
|
-
sm: "calc(var(--radius) - 4px)"
|
|
48
|
-
},
|
|
49
|
-
keyframes: {
|
|
50
|
-
"accordion-down": {
|
|
51
|
-
from: { height: "0" },
|
|
52
|
-
to: { height: "var(--radix-accordion-content-height)" }
|
|
53
|
-
},
|
|
54
|
-
"accordion-up": {
|
|
55
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
56
|
-
to: { height: "0" }
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
animation: {
|
|
60
|
-
"accordion-down": "accordion-down 0.2s ease-out",
|
|
61
|
-
"accordion-up": "accordion-up 0.2s ease-out"
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
const u = (r) => ({
|
|
66
|
-
darkMode: "class",
|
|
67
|
-
content: [...r, "node_modules/@chaibuilder/sdk/dist/*.{js,cjs}"],
|
|
68
|
-
theme: {
|
|
69
|
-
extend: n()
|
|
70
|
-
},
|
|
71
|
-
plugins: [d, e, a, o]
|
|
72
|
-
});
|
|
1
|
+
import { c as r } from "./plugin-BOcGV_IY.js";
|
|
2
|
+
import { g as o } from "./get-chai-builder-tailwind-config-BqaIvg8p.js";
|
|
3
|
+
import { g as l } from "./get-chai-builder-theme-BarMkcGH.js";
|
|
73
4
|
export {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
5
|
+
r as chaiBuilderPlugin,
|
|
6
|
+
o as getChaiBuilderTailwindConfig,
|
|
7
|
+
l as getChaiBuilderTheme
|
|
77
8
|
};
|
package/dist/ui.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
|
7
7
|
import { DialogProps } from '@radix-ui/react-dialog';
|
|
8
8
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
9
9
|
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
10
|
-
import { JSX
|
|
10
|
+
import { JSX } from 'react/jsx-runtime';
|
|
11
11
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
12
12
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
13
13
|
import * as React_2 from 'react';
|
|
@@ -46,12 +46,12 @@ export declare const AlertDialogContent: React_2.ForwardRefExoticComponent<Omit<
|
|
|
46
46
|
export declare const AlertDialogDescription: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React_2.RefAttributes<HTMLParagraphElement>, "ref"> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
47
47
|
|
|
48
48
|
export declare const AlertDialogFooter: {
|
|
49
|
-
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>):
|
|
49
|
+
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
50
50
|
displayName: string;
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
export declare const AlertDialogHeader: {
|
|
54
|
-
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>):
|
|
54
|
+
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
55
55
|
displayName: string;
|
|
56
56
|
};
|
|
57
57
|
|
|
@@ -71,7 +71,7 @@ export declare const AvatarFallback: React_2.ForwardRefExoticComponent<Omit<Avat
|
|
|
71
71
|
|
|
72
72
|
export declare const AvatarImage: React_2.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React_2.RefAttributes<HTMLImageElement>, "ref"> & React_2.RefAttributes<HTMLImageElement>>;
|
|
73
73
|
|
|
74
|
-
export declare function Badge({ className, variant, ...props }: BadgeProps):
|
|
74
|
+
export declare function Badge({ className, variant, ...props }: BadgeProps): JSX.Element;
|
|
75
75
|
|
|
76
76
|
export declare interface BadgeProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
77
77
|
}
|
|
@@ -121,7 +121,7 @@ export declare const Command: React_2.ForwardRefExoticComponent<Omit<{
|
|
|
121
121
|
vimBindings?: boolean;
|
|
122
122
|
} & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
123
123
|
|
|
124
|
-
export declare const CommandDialog: ({ children, ...props }: DialogProps) =>
|
|
124
|
+
export declare const CommandDialog: ({ children, ...props }: DialogProps) => JSX.Element;
|
|
125
125
|
|
|
126
126
|
export declare const CommandEmpty: React_2.ForwardRefExoticComponent<Omit<{
|
|
127
127
|
children?: React_2.ReactNode;
|
|
@@ -185,7 +185,7 @@ export declare const CommandSeparator: React_2.ForwardRefExoticComponent<Omit<Pi
|
|
|
185
185
|
} & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
186
186
|
|
|
187
187
|
export declare const CommandShortcut: {
|
|
188
|
-
({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>):
|
|
188
|
+
({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX.Element;
|
|
189
189
|
displayName: string;
|
|
190
190
|
};
|
|
191
191
|
|
|
@@ -214,7 +214,7 @@ export declare const ContextMenuRadioItem: React_2.ForwardRefExoticComponent<Omi
|
|
|
214
214
|
export declare const ContextMenuSeparator: React_2.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
215
215
|
|
|
216
216
|
export declare const ContextMenuShortcut: {
|
|
217
|
-
({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>):
|
|
217
|
+
({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX.Element;
|
|
218
218
|
displayName: string;
|
|
219
219
|
};
|
|
220
220
|
|
|
@@ -237,12 +237,12 @@ export declare const DialogContent: React_2.ForwardRefExoticComponent<Omit<Dialo
|
|
|
237
237
|
export declare const DialogDescription: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React_2.RefAttributes<HTMLParagraphElement>, "ref"> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
238
238
|
|
|
239
239
|
export declare const DialogFooter: {
|
|
240
|
-
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>):
|
|
240
|
+
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
241
241
|
displayName: string;
|
|
242
242
|
};
|
|
243
243
|
|
|
244
244
|
export declare const DialogHeader: {
|
|
245
|
-
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>):
|
|
245
|
+
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
246
246
|
displayName: string;
|
|
247
247
|
};
|
|
248
248
|
|
|
@@ -279,7 +279,7 @@ export declare const DropdownMenuRadioItem: React_2.ForwardRefExoticComponent<Om
|
|
|
279
279
|
export declare const DropdownMenuSeparator: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
280
280
|
|
|
281
281
|
export declare const DropdownMenuShortcut: {
|
|
282
|
-
({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>):
|
|
282
|
+
({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX.Element;
|
|
283
283
|
displayName: string;
|
|
284
284
|
};
|
|
285
285
|
|
|
@@ -349,12 +349,12 @@ declare interface SheetContentProps extends React_2.ComponentPropsWithoutRef<typ
|
|
|
349
349
|
export declare const SheetDescription: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React_2.RefAttributes<HTMLParagraphElement>, "ref"> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
350
350
|
|
|
351
351
|
export declare const SheetFooter: {
|
|
352
|
-
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>):
|
|
352
|
+
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
353
353
|
displayName: string;
|
|
354
354
|
};
|
|
355
355
|
|
|
356
356
|
export declare const SheetHeader: {
|
|
357
|
-
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>):
|
|
357
|
+
({ className, ...props }: React_2.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
358
358
|
displayName: string;
|
|
359
359
|
};
|
|
360
360
|
|
|
@@ -370,7 +370,7 @@ declare const sheetVariants: (props?: {
|
|
|
370
370
|
side?: "left" | "right" | "bottom" | "top";
|
|
371
371
|
} & ClassProp) => string;
|
|
372
372
|
|
|
373
|
-
export declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>):
|
|
373
|
+
export declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
374
374
|
|
|
375
375
|
export declare const Slider: React_2.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React_2.RefAttributes<HTMLSpanElement>, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
376
376
|
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"author": "Suraj Air",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"homepage": "https://chaibuilder.com",
|
|
8
|
-
"version": "3.1.
|
|
8
|
+
"version": "3.1.6",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"@floating-ui/react-dom": "2.1.6",
|
|
75
75
|
"@iconify-json/lucide": "^1.2.71",
|
|
76
76
|
"@mhsdesign/jit-browser-tailwindcss": "0.4.2",
|
|
77
|
+
"@monaco-editor/react": "^4.7.0",
|
|
77
78
|
"@radix-ui/react-accordion": "^1.2.11",
|
|
78
79
|
"@radix-ui/react-alert-dialog": "^1.1.14",
|
|
79
80
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
@@ -131,6 +132,7 @@
|
|
|
131
132
|
"jotai": "2.14.0",
|
|
132
133
|
"lodash": "^4.17.21",
|
|
133
134
|
"lodash-es": "4.17.21",
|
|
135
|
+
"monaco-editor": "^0.54.0",
|
|
134
136
|
"react-arborist": "3.4.3",
|
|
135
137
|
"react-autosuggest": "10.1.0",
|
|
136
138
|
"react-colorful": "5.6.1",
|
|
@@ -154,8 +156,8 @@
|
|
|
154
156
|
"@testing-library/react": "^16.2.0",
|
|
155
157
|
"@types/lodash": "^4.17.14",
|
|
156
158
|
"@types/node": "^20.17.11",
|
|
157
|
-
"@types/react": "^
|
|
158
|
-
"@types/react-dom": "^
|
|
159
|
+
"@types/react": "^19.2.0",
|
|
160
|
+
"@types/react-dom": "^19.2.0",
|
|
159
161
|
"@typescript-eslint/eslint-plugin": "^8.21.0",
|
|
160
162
|
"@typescript-eslint/parser": "^8.21.0",
|
|
161
163
|
"@vitejs/plugin-react-swc": "^3.7.2",
|
|
@@ -170,7 +172,6 @@
|
|
|
170
172
|
"jsdoc": "^4.0.4",
|
|
171
173
|
"msw": "^2.7.0",
|
|
172
174
|
"postcss": "^8.5.1",
|
|
173
|
-
"prettier": "^3.4.2",
|
|
174
175
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
175
176
|
"prop-types": "^15.8.1",
|
|
176
177
|
"react": "19.2.0",
|