@chaibuilder/pages 0.8.3 → 0.8.4

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.
@@ -5786,7 +5786,7 @@ const Hd = () => {
5786
5786
  /* @__PURE__ */ s("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
5787
5787
  ] });
5788
5788
  }, Qd = () => {
5789
- const [e, t] = E(!1), { isLocked: n } = Ht(), { savePage: a, saveState: r } = is();
5789
+ const [e, t] = E(!1), { isLocked: n } = Ht(), { savePageAsync: a, saveState: r } = is();
5790
5790
  ce(() => {
5791
5791
  const h = (m) => {
5792
5792
  r === "UNSAVED" && (m.preventDefault(), m.returnValue = !1);
@@ -5796,7 +5796,7 @@ const Hd = () => {
5796
5796
  };
5797
5797
  }, [r]);
5798
5798
  const i = re(async () => {
5799
- t(!0), await a(!1);
5799
+ t(!0), await a();
5800
5800
  }, [a]);
5801
5801
  ce(() => {
5802
5802
  r === "SAVED" && t(!1);
@@ -6065,10 +6065,16 @@ const Zd = ({
6065
6065
  l && /* @__PURE__ */ s(Ha, { page: l, onClose: () => o(null) }),
6066
6066
  d && /* @__PURE__ */ s(ja, { page: d, onClose: () => u(null) })
6067
6067
  ] }) : null;
6068
- }, su = ({ hasDynamicPage: e, className: t = "" }) => /* @__PURE__ */ s("div", { className: `z-[9999] fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-[50px] bg-black/30 backdrop-blur-sm ${t}`, children: /* @__PURE__ */ c("div", { className: "bg-white rounded-md p-4 shadow-xl min-w-[300px] max-w-[400px] flex flex-col items-center justify-center", children: [
6069
- /* @__PURE__ */ s("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
6070
- /* @__PURE__ */ s("p", { className: "pt-4 text-center text-sm text-gray-600", children: e ? "Please select a page from the list in the top header. This will enable you to edit the page." : "Please add a new page" })
6071
- ] }) }), au = () => {
6068
+ }, su = ({ hasDynamicPage: e, className: t = "" }) => /* @__PURE__ */ s(
6069
+ "div",
6070
+ {
6071
+ className: `fixed bottom-0 left-0 right-0 top-[50px] z-[20] z-[9999] flex w-screen items-center justify-center bg-black/10 backdrop-blur ${t}`,
6072
+ children: /* @__PURE__ */ c("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-md bg-white p-4 shadow-xl", children: [
6073
+ /* @__PURE__ */ s("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
6074
+ /* @__PURE__ */ s("p", { className: "pt-4 text-center text-sm text-gray-600", children: e ? "Please select a page from the list in the top header. This will enable you to edit the page." : "Please add a new page" })
6075
+ ] })
6076
+ }
6077
+ ), au = () => {
6072
6078
  const { data: e } = Kt(), t = Ua(), { data: n, isFetching: a } = je(), r = F(n, "dynamic", !1), i = dt("dynamic-page-selector"), { dynamicPage: l, allLangPages: o } = Ei(), d = o.length > 0, u = e == null ? void 0 : e.slug, h = !u, m = Ai(), y = (h ? `Partial: ${e == null ? void 0 : e.name} ` : `${u}${t}`).replace(window.location.host, "");
6073
6079
  return /* @__PURE__ */ c("div", { className: "relative z-10 flex items-center gap-x-1", children: [
6074
6080
  /* @__PURE__ */ s(
@@ -9558,7 +9564,7 @@ var wf = (e, t = !1) => {
9558
9564
  const t = il(() => {
9559
9565
  const n = this, [a] = ae(this, tn), [r] = ae(this, nn), [i] = ae(this, sn), [l] = ae(this, an), [o] = ae(this, Zt);
9560
9566
  let d;
9561
- return ae(this, rn) ? d = ae(this, rn) : (d = al(() => import("./HO4MOOFI-PUZ3L2IU.js")), we(this, rn, d)), Al(ae(this, Zn), ae(this, en)), nl(d, sl({
9567
+ return ae(this, rn) ? d = ae(this, rn) : (d = al(() => import("./HO4MOOFI-DApCTK_I.js")), we(this, rn, d)), Al(ae(this, Zn), ae(this, en)), nl(d, sl({
9562
9568
  get queryFlavor() {
9563
9569
  return ae(n, Jn);
9564
9570
  },
@@ -9652,7 +9658,7 @@ var wf = (e, t = !1) => {
9652
9658
  const t = il(() => {
9653
9659
  const n = this, [a] = ae(this, cn), [r] = ae(this, dn), [i] = ae(this, un), [l] = ae(this, hn), [o] = ae(this, ln), [d] = ae(this, mn);
9654
9660
  let u;
9655
- return ae(this, fn) ? u = ae(this, fn) : (u = al(() => import("./HUY7CZI3-DGl-zPKZ.js")), we(this, fn, u)), Al(ae(this, as), ae(this, on)), nl(u, sl({
9661
+ return ae(this, fn) ? u = ae(this, fn) : (u = al(() => import("./HUY7CZI3-BKCmx7E-.js")), we(this, fn, u)), Al(ae(this, as), ae(this, on)), nl(u, sl({
9656
9662
  get queryFlavor() {
9657
9663
  return ae(n, ns);
9658
9664
  },
@@ -9769,7 +9775,7 @@ var dm = process.env.NODE_ENV !== "development" ? function() {
9769
9775
  return null;
9770
9776
  } : om;
9771
9777
  process.env.NODE_ENV;
9772
- const Tl = () => /* @__PURE__ */ s("div", { className: "absolute inset-0 z-50 flex items-center justify-center w-screen h-screen bg-white/40", children: /* @__PURE__ */ s("div", { className: "flex items-center justify-center bg-white rounded-full size-10", children: /* @__PURE__ */ s(Ga, { className: "size-5 animate-spin" }) }) }), um = () => {
9778
+ const Tl = () => /* @__PURE__ */ s("div", { className: "absolute inset-0 z-50 flex h-screen w-screen items-center justify-center bg-white/20", children: /* @__PURE__ */ s("div", { className: "flex size-10 items-center justify-center rounded-full bg-white", children: /* @__PURE__ */ s(Ga, { className: "size-5 animate-spin" }) }) }), um = () => {
9773
9779
  Qt("dynamic-page-selector", {
9774
9780
  description: "Dynamic page selector"
9775
9781
  }), Qt("realtime-page-lock", {
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-CxHkmA-b.cjs"),t=require("@chaibuilder/sdk");exports.ChaiBuilderPagesRealtime=e.ChaiBuilderPagesRealtime;exports.ChaiJsonInput=e.SmartJsonInput;exports.ImagePicker=e.ImagePicker;exports.LanguageSwitcher=e.LanguageSwitcher;exports.NestedPathSelector=e.NestedPathSelector;exports.PermissionChecker=e.PermissionChecker;exports.default=e.ChaiBuilderPages;exports.registerChaiLoginComponent=e.registerLoginComponent;exports.registerChaiSiteSetting=e.registerChaiSiteSetting;exports.useActivePage=e.useActivePage;exports.useBuilderPageData=e.useBuilderPageData;exports.useChaiAuth=e.useChaiAuth;exports.useChaiCurrentPage=e.useCurrentPage;exports.useChaiFetch=e.useChaiFetch;exports.useChaiUserInfo=e.useChaiUserInfo;exports.useFallbackLang=e.useFallbackLang;exports.useFetch=e.useFetch;exports.useGotoPage=e.useGotoPage;exports.useLanguagePages=e.useLanguagePages;exports.usePageTypes=e.usePageTypes;exports.useUpdateActivePageMetadata=e.useUpdateActivePageMetadata;exports.useUserPermissions=e.useUserRoleAndPermissions;exports.useWebsitePages=e.useWebsitePages;exports.useWebsiteSetting=e.useWebsiteSetting;Object.keys(t).forEach(a=>{a!=="default"&&!Object.prototype.hasOwnProperty.call(exports,a)&&Object.defineProperty(exports,a,{enumerable:!0,get:()=>t[a]})});
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-CoSDO0MU.cjs"),t=require("@chaibuilder/sdk");exports.ChaiBuilderPagesRealtime=e.ChaiBuilderPagesRealtime;exports.ChaiJsonInput=e.SmartJsonInput;exports.ImagePicker=e.ImagePicker;exports.LanguageSwitcher=e.LanguageSwitcher;exports.NestedPathSelector=e.NestedPathSelector;exports.PermissionChecker=e.PermissionChecker;exports.default=e.ChaiBuilderPages;exports.registerChaiLoginComponent=e.registerLoginComponent;exports.registerChaiSiteSetting=e.registerChaiSiteSetting;exports.useActivePage=e.useActivePage;exports.useBuilderPageData=e.useBuilderPageData;exports.useChaiAuth=e.useChaiAuth;exports.useChaiCurrentPage=e.useCurrentPage;exports.useChaiFetch=e.useChaiFetch;exports.useChaiUserInfo=e.useChaiUserInfo;exports.useFallbackLang=e.useFallbackLang;exports.useFetch=e.useFetch;exports.useGotoPage=e.useGotoPage;exports.useLanguagePages=e.useLanguagePages;exports.usePageTypes=e.usePageTypes;exports.useUpdateActivePageMetadata=e.useUpdateActivePageMetadata;exports.useUserPermissions=e.useUserRoleAndPermissions;exports.useWebsitePages=e.useWebsitePages;exports.useWebsiteSetting=e.useWebsiteSetting;Object.keys(t).forEach(a=>{a!=="default"&&!Object.prototype.hasOwnProperty.call(exports,a)&&Object.defineProperty(exports,a,{enumerable:!0,get:()=>t[a]})});
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ai as s, a6 as t, a5 as i, a4 as u, X as g, a3 as r, W as h, a7 as n, a8 as o, Y as P, Z as C, ad as c, a9 as d, af as l, ah as m, _ as p, ag as f, a0 as S, aa as b, a1 as L, a2 as k, ae as A, ab as F, ac as I } from "./index-BUcSebI8.js";
1
+ import { ai as s, a6 as t, a5 as i, a4 as u, X as g, a3 as r, W as h, a7 as n, a8 as o, Y as P, Z as C, ad as c, a9 as d, af as l, ah as m, _ as p, ag as f, a0 as S, aa as b, a1 as L, a2 as k, ae as A, ab as F, ac as I } from "./index-XCmQ-5KX.js";
2
2
  export * from "@chaibuilder/sdk";
3
3
  export {
4
4
  s as ChaiBuilderPagesRealtime,
package/dist/utils.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@chaibuilder/sdk/tailwind");Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});
@@ -0,0 +1,4 @@
1
+
2
+ export * from "@chaibuilder/sdk/tailwind";
3
+
4
+ export { }
package/dist/utils.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@chaibuilder/sdk/tailwind";
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Suraj Air",
4
4
  "license": "Private",
5
5
  "homepage": "https://chaibuilder.com",
6
- "version": "0.8.3",
6
+ "version": "0.8.4",
7
7
  "type": "module",
8
8
  "files": [
9
9
  "dist"
@@ -16,6 +16,16 @@
16
16
  "import": "./dist/index.js",
17
17
  "require": "./dist/index.cjs"
18
18
  },
19
+ "./blocks": {
20
+ "types": "./dist/blocks.d.ts",
21
+ "import": "./dist/blocks.js",
22
+ "require": "./dist/blocks.cjs"
23
+ },
24
+ "./utils": {
25
+ "types": "./dist/utils.d.ts",
26
+ "import": "./dist/utils.js",
27
+ "require": "./dist/utils.cjs"
28
+ },
19
29
  "./server": {
20
30
  "types": "./dist/server.d.ts",
21
31
  "import": "./dist/server.js",
@@ -55,7 +65,7 @@
55
65
  },
56
66
  "peerDependencies": {
57
67
  "@chaibuilder/runtime": "2.2.0",
58
- "@chaibuilder/sdk": "2.3.6",
68
+ "@chaibuilder/sdk": "2.3.7",
59
69
  "@types/react": "*",
60
70
  "@types/react-dom": "*",
61
71
  "react": "^18.0 || ^19.0 || ^19.1",
@@ -71,7 +81,7 @@
71
81
  },
72
82
  "dependencies": {
73
83
  "@chaibuilder/runtime": "2.2.0",
74
- "@chaibuilder/sdk": "2.3.6",
84
+ "@chaibuilder/sdk": "2.3.7",
75
85
  "@mhsdesign/jit-browser-tailwindcss": "^0.4.2",
76
86
  "@tailwindcss/aspect-ratio": "^0.4.2",
77
87
  "@tailwindcss/forms": "^0.5.10",