@chaibuilder/sdk 4.0.0-beta.1 → 4.0.0-beta.3
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 +27 -20
- package/dist/2SSKDMRQ-BnsZi3K3.cjs +1 -0
- package/dist/2SSKDMRQ-CnSDkQcy.js +42 -0
- package/dist/AP7HFJJL-B31839PG.cjs +1228 -0
- package/dist/AP7HFJJL-CymCmW14.js +9214 -0
- package/dist/IconPicker-B1rWC-Ex.js +59 -0
- package/dist/IconPicker-DREyo007.cjs +1 -0
- package/dist/WDYDFRGG-BUVnbAci.js +33 -0
- package/dist/WDYDFRGG-BxhOCHc3.cjs +1 -0
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/_commonjsHelpers-DwGv2jUC.cjs +1 -0
- package/dist/actions-registery-CZ1w0NKa.js +15545 -0
- package/dist/actions-registery-YnFmU21O.cjs +418 -0
- package/dist/actions.cjs +1 -0
- package/dist/actions.d.ts +3202 -0
- package/dist/actions.js +216 -0
- package/dist/active-in-another-tab-B47YjQGN.cjs +1 -0
- package/dist/active-in-another-tab-CyjngVA6.js +34 -0
- package/dist/add-new-language-page-88xzrUy8.cjs +1 -0
- package/dist/add-new-language-page-WmlCnytQ.js +401 -0
- package/dist/add-new-page-VW2wAYZp.js +31 -0
- package/dist/add-new-page-soZ8GAkN.cjs +1 -0
- package/dist/ai-panel-content-7zCil042.cjs +1 -0
- package/dist/ai-panel-content-D_o7Q_A-.js +61 -0
- package/dist/ai-panel-default-lang-COYaxNwn.cjs +3 -0
- package/dist/ai-panel-default-lang-DnElspF0.js +341 -0
- package/dist/ai-panel-other-lang-CkynNlAU.cjs +1 -0
- package/dist/ai-panel-other-lang-Dp0E9_Hx.js +162 -0
- package/dist/ai-prompt-input-Bhc0ds7X.js +655 -0
- package/dist/ai-prompt-input-CThbVp0_.cjs +1 -0
- package/dist/ai-translation-prompt-C2kJQFDX.cjs +1 -0
- package/dist/ai-translation-prompt-CZ55HQmo.js +28 -0
- package/dist/apply-binding-6iwlED02.js +833 -0
- package/dist/apply-binding-KKp5PnpZ.cjs +1 -0
- package/dist/code-display-BnqzqzoP.cjs +1 -0
- package/dist/{code-display-337R7Dev.js → code-display-DhD_RBcg.js} +1 -1
- package/dist/code-editor-DRIAnNbb.js +50 -0
- package/dist/code-editor-o3___nu2.cjs +1 -0
- package/dist/common-functions-B3a4xKt_.cjs +1 -0
- package/dist/common-functions-D2lMFR6K.js +13 -0
- package/dist/continue-editing-in-this-client-CS2aQ7yY.js +24 -0
- package/dist/continue-editing-in-this-client-CtMYsk-A.cjs +1 -0
- package/dist/core-BoRDjj4h.cjs +1 -0
- package/dist/core-yvI6kCyw.js +56 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +51 -383
- package/dist/core.js +39 -106
- package/dist/{css-import-modal-DA2L6kwP.js → css-import-modal-Byg6wV0O.js} +36 -36
- package/dist/css-import-modal-CyqkXWCO.cjs +13 -0
- package/dist/delete-design-token-BRZZiWtQ.js +40 -0
- package/dist/delete-design-token-DkVs1oBf.cjs +1 -0
- package/dist/delete-page-BzyX9TN-.js +70 -0
- package/dist/delete-page-DxX7PFIE.cjs +1 -0
- package/dist/design-token-usage-CAHzEGgJ.cjs +1 -0
- package/dist/design-token-usage-xQs6SlaJ.js +113 -0
- package/dist/digital-asset-manager--uO8Agia.cjs +1 -0
- package/dist/digital-asset-manager-DbtwzxRz.js +876 -0
- package/dist/duplicate-page-BR7Dlo9d.js +133 -0
- package/dist/duplicate-page-CaNAbXwV.cjs +1 -0
- package/dist/dynamic-page-selector-Cb5r_W8s.js +85 -0
- package/dist/dynamic-page-selector-Cxk_gjni.cjs +1 -0
- package/dist/fonts-B-Xt29pe.cjs +1 -0
- package/dist/fonts-DRly3Wzd.js +78 -0
- package/dist/{get-chai-builder-tailwind-config-C6MHaUM0.cjs → get-chai-builder-tailwind-config-B9rCyiQo.cjs} +1 -1
- package/dist/{get-chai-builder-tailwind-config-BqaIvg8p.js → get-chai-builder-tailwind-config-DjoVOuAf.js} +13 -10
- package/dist/{get-chai-builder-theme-D0IsUvK4.js → get-chai-builder-theme-BYtp20KD.js} +4 -4
- package/dist/get-chai-builder-theme-Dl72X7cz.cjs +1 -0
- package/dist/get-seo-defaults-9zHebckY.js +65 -0
- package/dist/get-seo-defaults-Cw7vFt-B.cjs +1 -0
- package/dist/image-compression-DZ9WMmyn.cjs +1 -0
- package/dist/image-compression-DsZ1oqpb.js +37 -0
- package/dist/image-editor-DV8kUKhl.js +108 -0
- package/dist/image-editor-G-K28aTS.cjs +1 -0
- package/dist/index-B-rSiAp_.cjs +1 -0
- package/dist/index-Ct7ElCGK.js +19069 -0
- package/dist/index-DF5DEvqb.cjs +160 -0
- package/dist/index-Dxfyt4d4.js +39 -0
- package/dist/index-WQwzsC7A.cjs +5 -0
- package/dist/index-ZuacEL1j.js +4732 -0
- package/dist/json-diff-viewer-D7z4zNvv.cjs +8 -0
- package/dist/json-diff-viewer-krslPepD.js +258 -0
- package/dist/lang-panel-BwIewMyw.js +215 -0
- package/dist/lang-panel-DT96k1xg.cjs +1 -0
- package/dist/manage-design-tokens-Caz_20VK.js +240 -0
- package/dist/manage-design-tokens-CrmLe7UT.cjs +1 -0
- package/dist/mark-as-template-D295ZQtU.js +156 -0
- package/dist/mark-as-template-W3LmpiqN.cjs +1 -0
- package/dist/models-5gOsRC56.cjs +1 -0
- package/dist/models-D95ZYr_x.js +70 -0
- package/dist/nested-path-selector-content-CKYYK-C5.js +87 -0
- package/dist/nested-path-selector-content-CoS_d3dc.cjs +1 -0
- package/dist/no-language-page-content-BvqRBP6y.js +42 -0
- package/dist/no-language-page-content-DkfeMl90.cjs +1 -0
- package/dist/no-language-page-dialog-BcEoqyQB.cjs +1 -0
- package/dist/no-language-page-dialog-PjNqTUpl.js +10 -0
- package/dist/page-creator-C4gc5NSC.cjs +1 -0
- package/dist/page-creator-DiOITEMw.js +795 -0
- package/dist/page-lock-BdYmCks0.cjs +1 -0
- package/dist/page-lock-Bfbs6RgL.js +30 -0
- package/dist/page-locked-dialog-B1FAtK92.cjs +1 -0
- package/dist/page-locked-dialog-B6MKTRfY.js +133 -0
- package/dist/page-manager-new-CHDueBDk.cjs +1 -0
- package/dist/page-manager-new-CzX22g2n.js +394 -0
- package/dist/page-manager-search-and-filter-CM0UMb6U.js +201 -0
- package/dist/page-manager-search-and-filter-DkkRIH86.cjs +1 -0
- package/dist/page-revisions-content-ChY-4f2V.cjs +1 -0
- package/dist/page-revisions-content-NH9JK4Ey.js +445 -0
- package/dist/pages.cjs +1 -0
- package/dist/pages.d.ts +491 -0
- package/dist/pages.js +27 -0
- package/dist/plugin-3ZKK6RXm.js +245 -0
- package/dist/plugin-C6rgJDNQ.cjs +22 -0
- package/dist/publish-pages-content-D9aixMN5.js +178 -0
- package/dist/publish-pages-content-x-JuSFJ9.cjs +1 -0
- package/dist/register-partial-type-BjtdfKHE.js +36 -0
- package/dist/register-partial-type-ig9fUWIJ.cjs +1 -0
- package/dist/render.cjs +2 -2
- package/dist/render.d.ts +26 -13
- package/dist/render.js +130 -124
- package/dist/rte-widget-modal-BaHIuEjF.cjs +1 -0
- package/dist/rte-widget-modal-DOJEXLIf.js +38 -0
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.d.ts +306 -7
- package/dist/runtime.js +44 -1
- package/dist/save-to-lib-Cgpxw8-g.cjs +1 -0
- package/dist/save-to-lib-eiOc_SSN.js +422 -0
- package/dist/sdk.css +1 -1
- package/dist/selected-block-display-BgRY82CT.cjs +16 -0
- package/dist/selected-block-display-CBFePS19.js +319 -0
- package/dist/seo-panel-C1-iMOR1.js +798 -0
- package/dist/seo-panel-DfAb8U7W.cjs +2 -0
- package/dist/shared-json-ld-B4PxAM_0.js +565 -0
- package/dist/shared-json-ld-DzG398hr.cjs +1 -0
- package/dist/slug-input-AwNJs9im.js +86 -0
- package/dist/slug-input-C_ijLQ_X.cjs +1 -0
- package/dist/supabase-actions.cjs +1 -0
- package/dist/supabase-actions.d.ts +284 -0
- package/dist/supabase-actions.js +524 -0
- package/dist/take-over-request-BNxcjY2j.cjs +1 -0
- package/dist/take-over-request-C4FeDtN_.js +63 -0
- package/dist/theme-panel-footer-Cq9pljro.cjs +1 -0
- package/dist/theme-panel-footer-uBQqSJXm.js +25 -0
- package/dist/translation-warning-modal-B64YqlbI.js +26 -0
- package/dist/translation-warning-modal-BZAcwM2_.cjs +1 -0
- package/dist/unmark-as-template-CZ9sQp_P.js +39 -0
- package/dist/unmark-as-template-EVvk0vmp.cjs +1 -0
- package/dist/unpublish-page-D4VwOlxc.js +27 -0
- package/dist/unpublish-page-bdSmwAVQ.cjs +1 -0
- package/dist/use-page-expand-manager-B6XTvk0E.cjs +1 -0
- package/dist/use-page-expand-manager-Cf4MUEJw.js +85 -0
- package/dist/{tailwind.cjs → utils.cjs} +1 -1
- package/dist/{tailwind.d.ts → utils.d.ts} +12 -11
- package/dist/utils.js +7 -0
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.d.ts +0 -6
- package/dist/web-blocks.js +248 -241
- package/dist/web-preview-Cio70gk5.cjs +1 -0
- package/dist/web-preview-Djy6WIyj.js +73 -0
- package/package.json +175 -105
- package/dist/IconPicker-CGWn9C4u.cjs +0 -1
- package/dist/IconPicker-QvxJ-4Ez.js +0 -64
- package/dist/apply-binding-DCno1xQL.js +0 -711
- package/dist/apply-binding-DvHNFLQD.cjs +0 -1
- package/dist/code-display-BZ1x7SqI.cjs +0 -1
- package/dist/code-editor-B28LoECM.cjs +0 -1
- package/dist/code-editor-CfG2FhJ-.js +0 -58
- package/dist/common-functions-BGzDsf1z.js +0 -14
- package/dist/common-functions-BZmyleS1.cjs +0 -1
- package/dist/css-import-modal-CENUYvcl.cjs +0 -13
- package/dist/get-chai-builder-theme-Ck_Z4Q-M.cjs +0 -1
- package/dist/index-CaGNHF7f.js +0 -12209
- package/dist/index-Gn6pJt2v.cjs +0 -166
- package/dist/mockServiceWorker.js +0 -307
- package/dist/plugin-B5627hMN.js +0 -195
- package/dist/plugin-UxTRfDum.cjs +0 -22
- package/dist/rte-widget-modal-DL739qeQ.cjs +0 -1
- package/dist/rte-widget-modal-Dte0od04.js +0 -41
- package/dist/tailwind.js +0 -7
- package/dist/tooltip-A4qGk781.cjs +0 -1
- package/dist/tooltip-tLiIOgjq.js +0 -1067
- package/dist/ui.cjs +0 -1
- package/dist/ui.d.ts +0 -415
- package/dist/ui.js +0 -129
- package/dist/vite.svg +0 -1
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Chai Builder - Open Source Tailwind Builder
|
|
2
2
|
|
|
3
|
-
Chai Builder is an Open Source Low Code React + Tailwind CSS Visual Builder.
|
|
4
|
-
It allows you to create web pages visually by dragging and dropping elements onto the canvas.
|
|
5
|
-
It is a simple React component that renders a full-fledged visual builder into any React application.
|
|
3
|
+
Chai Builder is an Open Source Low Code React + Tailwind CSS Visual Builder.
|
|
4
|
+
It allows you to create web pages visually by dragging and dropping elements onto the canvas.
|
|
5
|
+
It is a simple React component that renders a full-fledged visual builder into any React application.
|
|
6
|
+
|
|
7
|
+
Docs: https://docs.chaibuilder.com/
|
|
6
8
|
|
|
7
9
|
Demo: https://chaibuilder-sdk.vercel.app/
|
|
8
10
|
|
|
@@ -13,19 +15,21 @@ Demo: https://chaibuilder-sdk.vercel.app/
|
|
|
13
15
|
### Manual installation:
|
|
14
16
|
|
|
15
17
|
Step 1: Install the packages
|
|
18
|
+
|
|
16
19
|
```bash
|
|
17
20
|
npm install @chaibuilder/sdk
|
|
18
21
|
```
|
|
19
22
|
|
|
20
23
|
Step 2: Add a custom tailwind config.
|
|
21
|
-
Create a new file: `tailwind.chaibuilder.config.ts`.
|
|
24
|
+
Create a new file: `tailwind.chaibuilder.config.ts`. <br /> Pass the path to your source files.
|
|
25
|
+
|
|
22
26
|
```tsx
|
|
23
27
|
import { getChaiBuilderTailwindConfig } from "@chaibuilder/sdk/tailwind";
|
|
24
28
|
export default getChaiBuilderTailwindConfig(["./src/**/*.{js,ts,jsx,tsx}"]);
|
|
25
|
-
|
|
26
29
|
```
|
|
27
30
|
|
|
28
31
|
Step 3: Create a new `chaibuilder.tailwind.css`
|
|
32
|
+
|
|
29
33
|
```css
|
|
30
34
|
@config "./tailwind.chaibuilder.config.ts";
|
|
31
35
|
|
|
@@ -35,41 +39,44 @@ Step 3: Create a new `chaibuilder.tailwind.css`
|
|
|
35
39
|
```
|
|
36
40
|
|
|
37
41
|
Step 4: Add the builder to your page.
|
|
42
|
+
|
|
38
43
|
```tsx
|
|
39
44
|
import "./chaibuilder.tailwind.css";
|
|
40
45
|
import "@chaibuilder/sdk/styles";
|
|
41
|
-
import {loadWebBlocks} from "@chaibuilder/sdk/web-blocks";
|
|
42
|
-
import { ChaiBuilderEditor } from "
|
|
46
|
+
import { loadWebBlocks } from "@chaibuilder/sdk/web-blocks";
|
|
47
|
+
import { ChaiBuilderEditor } from "@/core/main";
|
|
43
48
|
|
|
44
49
|
loadWebBlocks();
|
|
45
50
|
|
|
46
51
|
const BuilderFullPage = () => {
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
return (
|
|
53
|
+
<ChaiBuilderEditor
|
|
54
|
+
blocks={[{ _type: "Heading", _id: "a", content: "This is a heading", styles: "#styles:,text-3xl font-bold" }]}
|
|
55
|
+
onSave={async ({ blocks, providers, brandingOptions }) => {
|
|
56
|
+
console.log(blocks, providers, brandingOptions);
|
|
57
|
+
return true;
|
|
58
|
+
}}
|
|
59
|
+
/>
|
|
55
60
|
);
|
|
56
|
-
}
|
|
61
|
+
};
|
|
57
62
|
```
|
|
58
|
-
|
|
63
|
+
|
|
59
64
|
### Render the blocks on your page.
|
|
60
65
|
|
|
61
66
|
```tsx
|
|
62
67
|
export default () => {
|
|
63
|
-
|
|
64
|
-
}
|
|
68
|
+
return <RenderChaiBlocks blocks={blocks} />;
|
|
69
|
+
};
|
|
65
70
|
```
|
|
66
71
|
|
|
67
72
|
---
|
|
73
|
+
|
|
68
74
|
## Support
|
|
75
|
+
|
|
69
76
|
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
77
|
|
|
71
78
|
<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
79
|
|
|
73
|
-
|
|
74
80
|
## Acknowledgments
|
|
81
|
+
|
|
75
82
|
Chai Builder stands on the shoulders of many open-source libraries and tools. We extend our gratitude to the developers and maintainers of these projects for their contributions.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./AP7HFJJL-B31839PG.cjs"),t=require("./index-WQwzsC7A.cjs");var u=r=>{const[o,n]=e.createLocalStorage({prefix:"TanstackQueryDevtools"}),a=t.getPreferredColorScheme(),c=t.createMemo(()=>{const l=r.theme||o.theme_preference||e.THEME_PREFERENCE;return l!=="system"?l:a()});return t.createComponent(e.QueryDevtoolsContext.Provider,{value:r,get children(){return t.createComponent(e.PiPProvider,{disabled:!0,localStore:o,setLocalStore:n,get children(){return t.createComponent(e.ThemeContext.Provider,{value:c,get children(){return t.createComponent(e.ParentPanel,{get children(){return t.createComponent(e.ContentView,{localStore:o,setLocalStore:n,get onClose(){return r.onClose},showPanelViewOnly:!0})}})}})}})}})},s=u;exports.default=s;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./AP7HFJJL-CymCmW14.js";
|
|
2
|
+
import { w as h, x as v, y as e } from "./index-ZuacEL1j.js";
|
|
3
|
+
var C = (r) => {
|
|
4
|
+
const [t, o] = s({
|
|
5
|
+
prefix: "TanstackQueryDevtools"
|
|
6
|
+
}), a = h(), l = v(() => {
|
|
7
|
+
const n = r.theme || t.theme_preference || c;
|
|
8
|
+
return n !== "system" ? n : a();
|
|
9
|
+
});
|
|
10
|
+
return e(d.Provider, {
|
|
11
|
+
value: r,
|
|
12
|
+
get children() {
|
|
13
|
+
return e(u, {
|
|
14
|
+
disabled: !0,
|
|
15
|
+
localStore: t,
|
|
16
|
+
setLocalStore: o,
|
|
17
|
+
get children() {
|
|
18
|
+
return e(i.Provider, {
|
|
19
|
+
value: l,
|
|
20
|
+
get children() {
|
|
21
|
+
return e(m, {
|
|
22
|
+
get children() {
|
|
23
|
+
return e(P, {
|
|
24
|
+
localStore: t,
|
|
25
|
+
setLocalStore: o,
|
|
26
|
+
get onClose() {
|
|
27
|
+
return r.onClose;
|
|
28
|
+
},
|
|
29
|
+
showPanelViewOnly: !0
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}, E = C;
|
|
40
|
+
export {
|
|
41
|
+
E as default
|
|
42
|
+
};
|