@chaibuilder/sdk 1.2.109 → 1.2.110

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/ui.js CHANGED
@@ -2,8 +2,8 @@ import { j as o } from "./jsx-runtime-Sp0orL4X.js";
2
2
  import * as n from "react";
3
3
  import * as m from "@radix-ui/react-toggle";
4
4
  import { cva as c } from "class-variance-authority";
5
- import { c as r } from "./context-menu-YGd09SE1.js";
6
- import { A as ye, h as Ne, f as ve, g as we, k as Se, r as Me, s as je, m as De, q as Te, o as Re, n as Ie, p as Ae, l as ke, i as Pe, B as ze, C as Ge, H as Le, G as He, E as Ve, z as Fe, F as Be, ar as Oe, as as Ee, av as qe, aw as Je, at as Ke, ax as _e, au as Qe, az as Ue, ay as We, aA as Xe, aE as Ye, aC as Ze, aJ as $e, aD as ea, aG as aa, aK as ta, aO as oa, aF as sa, aH as ra, aI as na, aL as ia, aM as da, aN as la, aB as ca, D as ma, u as pa, y as ua, w as fa, v as ga, x as xa, t as ba, a8 as ha, ac as Ca, aa as ya, ah as Na, ab as va, ae as wa, ai as Sa, am as Ma, ad as ja, af as Da, ag as Ta, aj as Ra, ak as Ia, al as Aa, a9 as ka, Z as Pa, $ as za, _ as Ga, I as La, L as Ha, W as Va, Y as Fa, X as Ba, S as Oa, J as Ea, a0 as qa, a4 as Ja, a1 as Ka, a6 as _a, a5 as Qa, a7 as Ua, a3 as Wa, a2 as Xa, b as Ya, a as Za, d as $a, K as et, O as at, M as tt, N as ot, T as st, aq as rt, P as nt, R as it, V as dt, U as lt, Q as ct, j as mt, e as pt, an as ut, ap as ft, ao as gt } from "./context-menu-YGd09SE1.js";
5
+ import { c as r } from "./context-menu-FPX89OKr.js";
6
+ import { A as ye, f as Ne, d as ve, e as we, i as Se, p as Me, q as je, k as De, o as Te, m as Re, l as Ie, n as Ae, j as ke, g as Pe, B as ze, C as Ge, F as Le, E as He, y as Ve, x as Fe, z as Be, ar as Oe, as as Ee, av as qe, aw as Je, at as Ke, ax as _e, au as Qe, az as Ue, ay as We, aA as Xe, aE as Ye, aC as Ze, aJ as $e, aD as ea, aG as aa, aK as ta, aO as oa, aF as sa, aH as ra, aI as na, aL as ia, aM as da, aN as la, aB as ca, D as ma, s as pa, w as ua, u as fa, t as ga, v as xa, r as ba, a6 as ha, aa as Ca, a8 as ya, af as Na, a9 as va, ac as wa, ag as Sa, ak as Ma, ab as ja, ad as Da, ae as Ta, ah as Ra, ai as Ia, aj as Aa, a7 as ka, X as Pa, Z as za, Y as Ga, I as La, L as Ha, U as Va, W as Fa, V as Ba, S as Oa, G as Ea, _ as qa, a2 as Ja, $ as Ka, a4 as _a, a3 as Qa, a5 as Ua, a1 as Wa, a0 as Xa, al as Ya, aq as Za, a as $a, H as et, M as at, J as tt, K as ot, T as st, ap as rt, N as nt, P as it, R as dt, Q as lt, O as ct, h as mt, b as pt, am as ut, ao as ft, an as gt } from "./context-menu-FPX89OKr.js";
7
7
  import { ChevronRightIcon as g, CheckIcon as x, DotFilledIcon as b, Cross2Icon as h } from "@radix-ui/react-icons";
8
8
  import * as s from "@radix-ui/react-menubar";
9
9
  import * as d from "@radix-ui/react-dialog";
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": "1.2.109",
8
+ "version": "1.2.110",
9
9
  "type": "module",
10
10
  "repository": {
11
11
  "type": "git",
@@ -1,124 +0,0 @@
1
- import { j as t } from "./jsx-runtime-Sp0orL4X.js";
2
- import m, { Suspense as p } from "react";
3
- import { B as l, a as n, b as x } from "./context-menu-YGd09SE1.js";
4
- import { e as d, F as h, d as o, f } from "./index-OhF0-tfj.js";
5
- import { useTranslation as c } from "react-i18next";
6
- import { c as u } from "./iconBase-Ief2hJUZ.js";
7
- import { EyeOpenIcon as v } from "@radix-ui/react-icons";
8
- import "@radix-ui/react-switch";
9
- import "@radix-ui/react-accordion";
10
- import "class-variance-authority";
11
- import "@radix-ui/react-alert-dialog";
12
- import "@radix-ui/react-slot";
13
- import "@radix-ui/react-label";
14
- import "@radix-ui/react-scroll-area";
15
- import "@radix-ui/react-tabs";
16
- import "@radix-ui/react-tooltip";
17
- import "@radix-ui/react-popover";
18
- import "@radix-ui/react-hover-card";
19
- import "@radix-ui/react-select";
20
- import "@radix-ui/react-dropdown-menu";
21
- import "@radix-ui/react-separator";
22
- import "@radix-ui/react-toast";
23
- import "cmdk";
24
- import "@radix-ui/react-dialog";
25
- import "@radix-ui/react-context-menu";
26
- import "clsx";
27
- import "tailwind-merge";
28
- import "lodash-es";
29
- import "jotai";
30
- import "@chaibuilder/runtime";
31
- import "./plugin-f6SDZ_Or.js";
32
- import "@react-hookz/web";
33
- import "tree-model";
34
- import "react-quill";
35
- import "./STRINGS-Xxstm-7I.js";
36
- import "flagged";
37
- import "react-hotkeys-hook";
38
- import "@floating-ui/dom";
39
- import "@floating-ui/react-dom";
40
- import "react-event-hook";
41
- import "@tailwindcss/typography";
42
- import "@tailwindcss/forms";
43
- import "@tailwindcss/aspect-ratio";
44
- import "react-wrap-balancer";
45
- import "react-dom";
46
- import "prop-types";
47
- import "react-error-boundary";
48
- import "re-resizable";
49
- import "lucide-react";
50
- import "@rjsf/validator-ajv8";
51
- import "@rjsf/core";
52
- import "./controls-lEwMTdPQ.js";
53
- import "react-arborist";
54
- import "himalaya";
55
- import "react-icons-picker";
56
- import "react-autosuggest";
57
- import "fuse.js";
58
- import "i18next";
59
- import "framer-motion";
60
- const j = () => {
61
- const { savePage: a, saveState: e } = d(), { t: s } = c(), i = /* @__PURE__ */ t.jsxs(
62
- l,
63
- {
64
- disabled: e === "SAVING",
65
- onClick: (r) => {
66
- r.preventDefault(), a();
67
- },
68
- className: u(
69
- "flex h-auto w-fit items-center gap-x-2 p-1 px-2",
70
- // UNSAVED sate
71
- "bg-gray-200 text-gray-500 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-400",
72
- {
73
- "animate-pulse bg-gray-300 text-gray-900": e === "SAVING",
74
- "bg-green-500 text-white hover:bg-green-600 hover:text-white dark:bg-green-600 dark:text-white": e === "SAVED"
75
- }
76
- ),
77
- size: "sm",
78
- variant: "outline",
79
- children: [
80
- /* @__PURE__ */ t.jsx(h, { className: "text-sm text-white" }),
81
- /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: s(e === "SAVING" ? "saving" : e === "SAVED" ? "saved" : "unsaved") })
82
- ]
83
- }
84
- );
85
- return /* @__PURE__ */ t.jsx("div", { className: "flex items-center", children: i });
86
- }, g = function() {
87
- const e = o("previewComponent"), [, s] = f(), { t: i } = c();
88
- return e ? /* @__PURE__ */ t.jsxs(
89
- l,
90
- {
91
- onClick: (r) => {
92
- r.preventDefault(), s(!0);
93
- },
94
- className: "flex h-auto w-fit items-center gap-x-2 p-1 px-2",
95
- size: "sm",
96
- variant: "outline",
97
- children: [
98
- /* @__PURE__ */ t.jsx(v, { className: "text-xs" }),
99
- /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: i("preview") })
100
- ]
101
- }
102
- ) : null;
103
- }, kt = () => {
104
- const a = o("topBarComponents.left", []), e = o("topBarComponents.center", []), s = o("topBarComponents.right", []), i = o("editable", !0);
105
- return /* @__PURE__ */ t.jsxs("div", { className: "flex h-14 items-center justify-between px-2", children: [
106
- /* @__PURE__ */ t.jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ t.jsx("div", { className: "flex items-center space-x-2 font-bold", children: m.Children.toArray(
107
- a.map((r) => /* @__PURE__ */ t.jsx(p, { fallback: /* @__PURE__ */ t.jsx(n, { className: "h-10" }), children: /* @__PURE__ */ t.jsx(r, {}) }))
108
- ) }) }),
109
- /* @__PURE__ */ t.jsx("div", { className: "flex items-center space-x-2", children: m.Children.toArray(
110
- e.map((r) => /* @__PURE__ */ t.jsx(p, { fallback: /* @__PURE__ */ t.jsx(n, { className: "h-10" }), children: /* @__PURE__ */ t.jsx(r, {}) }))
111
- ) }),
112
- /* @__PURE__ */ t.jsxs("div", { className: "flex items-center space-x-1", children: [
113
- /* @__PURE__ */ t.jsx(g, {}),
114
- /* @__PURE__ */ t.jsx(x, { orientation: "vertical" }),
115
- i ? /* @__PURE__ */ t.jsx(j, {}) : null,
116
- m.Children.toArray(
117
- s.map((r) => /* @__PURE__ */ t.jsx(p, { fallback: /* @__PURE__ */ t.jsx(n, { className: "h-10" }), children: /* @__PURE__ */ t.jsx(r, {}) }))
118
- )
119
- ] })
120
- ] });
121
- };
122
- export {
123
- kt as default
124
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),n=require("react"),u=require("./context-menu-sQn7ryJ6.cjs"),s=require("./index-0rfWW4hY.cjs"),x=require("react-i18next"),c=require("./iconBase-aZzpqff_.cjs"),l=require("@radix-ui/react-icons");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("class-variance-authority");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-dialog");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("lodash-es");require("jotai");require("@chaibuilder/runtime");require("./plugin-xOpS-UNV.cjs");require("@react-hookz/web");require("tree-model");require("react-quill");require("./STRINGS-Yl7cSWDc.cjs");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("react-event-hook");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("lucide-react");require("@rjsf/validator-ajv8");require("@rjsf/core");require("./controls-p9IwFnPx.cjs");require("react-arborist");require("himalaya");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("i18next");require("framer-motion");const p=()=>{const{savePage:a,saveState:r}=s.useSavePage(),{t:i}=x.useTranslation(),o=e.jsxRuntimeExports.jsxs(u.Button,{disabled:r==="SAVING",onClick:t=>{t.preventDefault(),a()},className:c.cn("flex h-auto w-fit items-center gap-x-2 p-1 px-2","bg-gray-200 text-gray-500 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-400",{"animate-pulse bg-gray-300 text-gray-900":r==="SAVING","bg-green-500 text-white hover:bg-green-600 hover:text-white dark:bg-green-600 dark:text-white":r==="SAVED"}),size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx(s.FaCheck,{className:"text-sm text-white"}),e.jsxRuntimeExports.jsx("span",{className:"text-sm",children:i(r==="SAVING"?"saving":r==="SAVED"?"saved":"unsaved")})]});return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:o})},m=function(){const r=s.useBuilderProp("previewComponent"),[,i]=s.usePreviewMode(),{t:o}=x.useTranslation();return r?e.jsxRuntimeExports.jsxs(u.Button,{onClick:t=>{t.preventDefault(),i(!0)},className:"flex h-auto w-fit items-center gap-x-2 p-1 px-2",size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx(l.EyeOpenIcon,{className:"text-xs"}),e.jsxRuntimeExports.jsx("span",{className:"text-sm",children:o("preview")})]}):null},q=()=>{const a=s.useBuilderProp("topBarComponents.left",[]),r=s.useBuilderProp("topBarComponents.center",[]),i=s.useBuilderProp("topBarComponents.right",[]),o=s.useBuilderProp("editable",!0);return e.jsxRuntimeExports.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2 font-bold",children:n.Children.toArray(a.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(u.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))})}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:n.Children.toArray(r.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(u.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxRuntimeExports.jsx(m,{}),e.jsxRuntimeExports.jsx(u.Separator,{orientation:"vertical"}),o?e.jsxRuntimeExports.jsx(p,{}):null,n.Children.toArray(i.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(u.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))]})]})};exports.default=q;