@chaibuilder/sdk 1.2.65 → 1.2.67

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.
Files changed (125) hide show
  1. package/dist/AddBlocks-TVOOPK2w.cjs +1 -0
  2. package/dist/AddBlocks-mbuhydG3.js +123 -0
  3. package/dist/CanvasArea-KJMcis97.cjs +1 -0
  4. package/dist/CanvasArea-kg3Rgg9t.js +136 -0
  5. package/dist/CodeEditor-QP6l0mv4.cjs +1 -0
  6. package/dist/{CodeEditor-Qff4q7sx.js → CodeEditor-q5unEaUI.js} +60 -46
  7. package/dist/STRINGS--j49GZJP.js +7 -0
  8. package/dist/STRINGS-gPz7CUOk.cjs +1 -0
  9. package/dist/SettingsPanel-MWeQjDWs.cjs +1 -0
  10. package/dist/SettingsPanel-pomLrOxB.js +81 -0
  11. package/dist/SidePanels-9sbERNEv.cjs +1 -0
  12. package/dist/{SidePanels-ijaUKSek.js → SidePanels-YpRrvfiH.js} +87 -93
  13. package/dist/{Topbar-vHlnfxPs.js → Topbar-kVBx7pp4.js} +56 -61
  14. package/dist/Topbar-veJ2_blW.cjs +1 -0
  15. package/dist/{UILibrariesPanel-NVUMUPUj.js → UILibrariesPanel-ES8YzN9C.js} +92 -101
  16. package/dist/UILibrariesPanel-H8t36R6M.cjs +1 -0
  17. package/dist/UnsplashImages--MXx-DYM.cjs +1 -0
  18. package/dist/{UnsplashImages-UkHihhA5.js → UnsplashImages-sotLcz6r.js} +72 -57
  19. package/dist/{UploadImages-HtuJZJlo.js → UploadImages-I0QQ6vj1.js} +57 -44
  20. package/dist/UploadImages-xhxeYKkl.cjs +1 -0
  21. package/dist/badge-7BVT3zxN.cjs +1 -0
  22. package/dist/badge-pJqQSA13.js +23 -0
  23. package/dist/context-menu-_8TFbFEJ.cjs +1 -0
  24. package/dist/context-menu-sks9vdzC.js +906 -0
  25. package/dist/core.cjs +1 -1
  26. package/dist/core.d.ts +45 -20
  27. package/dist/core.js +85 -87
  28. package/dist/iconBase-vJD0OXxU.cjs +1 -0
  29. package/dist/iconBase-zweRWSz0.js +323 -0
  30. package/dist/index-5hfuDpYs.cjs +223 -0
  31. package/dist/index-Zu-K_BX7.js +33933 -0
  32. package/dist/jsx-runtime-JYMCiFoE.cjs +27 -0
  33. package/dist/{jsx-runtime-WbnYoNE9.js → jsx-runtime-Sp0orL4X.js} +106 -109
  34. package/dist/plugin-P0tpo_XZ.cjs +1 -0
  35. package/dist/plugin-_F-KZp1i.cjs +1 -0
  36. package/dist/plugin-f5uJtdXY.js +43 -0
  37. package/dist/plugin-sJ3Hzvpv.js +57 -0
  38. package/dist/render.cjs +3 -1
  39. package/dist/render.d.ts +19 -52
  40. package/dist/render.js +136 -183
  41. package/dist/select-JW3OMYm-.js +75 -0
  42. package/dist/select-fXj5tdMX.cjs +1 -0
  43. package/dist/separator-hT24N-xp.cjs +1 -0
  44. package/dist/separator-sgwOa1FE.js +18 -0
  45. package/dist/style.css +1 -1
  46. package/dist/tailwind.cjs +1 -1
  47. package/dist/tailwind.d.ts +41 -1
  48. package/dist/tailwind.js +16 -8
  49. package/dist/ui.cjs +1 -1
  50. package/dist/ui.d.ts +0 -10
  51. package/dist/ui.js +345 -163
  52. package/dist/web-blocks.cjs +1 -1
  53. package/dist/web-blocks.d.ts +1 -1
  54. package/dist/web-blocks.js +489 -724
  55. package/package.json +15 -45
  56. package/dist/CanvasArea-fSdH_RiN.cjs +0 -1
  57. package/dist/CanvasArea-ut5yknzX.js +0 -168
  58. package/dist/CodeEditor-ypUx3RAV.cjs +0 -1
  59. package/dist/CurrentPage-jHSVy3hq.js +0 -120
  60. package/dist/CurrentPage-p_AM4lrF.cjs +0 -1
  61. package/dist/Functions-7jnEwJyw.js +0 -15
  62. package/dist/Functions-N3yhPYKY.cjs +0 -1
  63. package/dist/MODIFIERS-fd5XOmum.js +0 -60
  64. package/dist/MODIFIERS-mVmfEGgo.cjs +0 -1
  65. package/dist/PagesPanel-U3InJ9Db.js +0 -78
  66. package/dist/PagesPanel-wqDb4D-x.cjs +0 -1
  67. package/dist/ProjectPanel-XODJTO4J.js +0 -99
  68. package/dist/ProjectPanel-fWESzHr6.cjs +0 -1
  69. package/dist/SidePanels-lrMQqc0h.cjs +0 -1
  70. package/dist/Topbar-RrCDxd0i.cjs +0 -1
  71. package/dist/UILibrariesPanel-7btHgBD0.cjs +0 -1
  72. package/dist/UnsplashImages-6UjgojvF.cjs +0 -1
  73. package/dist/UploadImages-3h0cRsvr.cjs +0 -1
  74. package/dist/_commonjsHelpers-UyOWmZb0.js +0 -8
  75. package/dist/_commonjsHelpers-wDK0ZLPo.cjs +0 -1
  76. package/dist/add-page-modal-RwIj1FxH.cjs +0 -1
  77. package/dist/add-page-modal-TOfMfmPA.js +0 -115
  78. package/dist/confirm-alert-eIp2cAkc.js +0 -60
  79. package/dist/confirm-alert-v1lG8ex4.cjs +0 -1
  80. package/dist/controls-rRZhz0vu.cjs +0 -1
  81. package/dist/controls-yjgoZzB6.js +0 -199
  82. package/dist/delete-page-modal-4bxjpVBD.js +0 -97
  83. package/dist/delete-page-modal-qYDZmpgT.cjs +0 -1
  84. package/dist/email-blocks.cjs +0 -1
  85. package/dist/email-blocks.d.ts +0 -3
  86. package/dist/email-blocks.js +0 -294
  87. package/dist/email.cjs +0 -1
  88. package/dist/email.d.ts +0 -171
  89. package/dist/email.js +0 -90
  90. package/dist/empty-slot-Lsxjts7Q.js +0 -6
  91. package/dist/empty-slot-Sy930lX6.cjs +0 -1
  92. package/dist/form-4jTocVbZ.cjs +0 -1
  93. package/dist/form-NAzFjGs0.js +0 -125
  94. package/dist/functions--tdNWQDW.js +0 -30
  95. package/dist/functions-EVUeSwX1.cjs +0 -1
  96. package/dist/html-to-json-NqRjgFqp.cjs +0 -1
  97. package/dist/html-to-json-l_mw5y-e.js +0 -243
  98. package/dist/index--k2M8kzI.cjs +0 -1
  99. package/dist/index--mLLy7QQ.cjs +0 -1
  100. package/dist/index-5XyNUAjc.cjs +0 -290
  101. package/dist/index-C7mB4XFm.js +0 -3141
  102. package/dist/index-VBXQixVm.js +0 -117
  103. package/dist/index-YZhtVcj_.js +0 -2201
  104. package/dist/index-aeDphKpP.cjs +0 -1
  105. package/dist/index-lFgDm1oa.js +0 -83780
  106. package/dist/jsx-runtime-Z_BpKhVy.cjs +0 -27
  107. package/dist/lib.cjs +0 -3
  108. package/dist/lib.d.ts +0 -80
  109. package/dist/lib.js +0 -1350
  110. package/dist/page-viewer-4wrnWnK0.js +0 -124
  111. package/dist/page-viewer-ra0GLx1p.cjs +0 -1
  112. package/dist/project-general-setting-IwZUkYF3.js +0 -90
  113. package/dist/project-general-setting-lFjTUhHD.cjs +0 -1
  114. package/dist/project-seo-setting-e1fTqVsd.js +0 -83
  115. package/dist/project-seo-setting-o0V9acCV.cjs +0 -1
  116. package/dist/server.cjs +0 -1
  117. package/dist/server.d.ts +0 -299
  118. package/dist/server.js +0 -216
  119. package/dist/single-page-detail-ZNWFKqLW.js +0 -229
  120. package/dist/single-page-detail-g55Anu7R.cjs +0 -1
  121. package/dist/studio.cjs +0 -1
  122. package/dist/studio.d.ts +0 -176
  123. package/dist/studio.js +0 -67
  124. package/dist/utils-D_vtk3zK.cjs +0 -1
  125. package/dist/utils-VpVqnC9m.js +0 -1075
@@ -0,0 +1,57 @@
1
+ var _ = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
+ function d(e) {
3
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
+ }
5
+ var i = {}, f = {};
6
+ (function(e) {
7
+ Object.defineProperty(e, "__esModule", {
8
+ value: !0
9
+ }), Object.defineProperty(e, "default", {
10
+ enumerable: !0,
11
+ get: function() {
12
+ return l;
13
+ }
14
+ });
15
+ function u(n, t) {
16
+ return {
17
+ handler: n,
18
+ config: t
19
+ };
20
+ }
21
+ u.withOptions = function(n, t = () => ({})) {
22
+ const r = function(o) {
23
+ return {
24
+ __options: o,
25
+ handler: n(o),
26
+ config: t(o)
27
+ };
28
+ };
29
+ return r.__isOptionsFunction = !0, r.__pluginFunction = n, r.__configFunction = t, r;
30
+ };
31
+ const l = u;
32
+ })(f);
33
+ (function(e) {
34
+ Object.defineProperty(e, "__esModule", {
35
+ value: !0
36
+ }), Object.defineProperty(e, "default", {
37
+ enumerable: !0,
38
+ get: function() {
39
+ return n;
40
+ }
41
+ });
42
+ const u = /* @__PURE__ */ l(f);
43
+ function l(t) {
44
+ return t && t.__esModule ? t : {
45
+ default: t
46
+ };
47
+ }
48
+ const n = u.default;
49
+ })(i);
50
+ let a = i;
51
+ var c = (a.__esModule ? a : { default: a }).default;
52
+ const s = /* @__PURE__ */ d(c);
53
+ export {
54
+ _ as c,
55
+ d as g,
56
+ s as p
57
+ };
package/dist/render.cjs CHANGED
@@ -1 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./jsx-runtime-Z_BpKhVy.cjs"),E=require("react"),n=require("lodash-es"),Y=require("tailwind-merge"),l=require("./MODIFIERS-mVmfEGgo.cjs"),_=require("./functions-EVUeSwX1.cjs"),T=require("@chaibuilder/runtime"),C=require("react-wrap-balancer");require("./_commonjsHelpers-wDK0ZLPo.cjs");const B=t=>{const r={};return Object.keys(t).forEach(e=>{n.isString(t[e])&&t[e].startsWith(l.SLOT_KEY)&&(r[e]=t[e].replace(l.SLOT_KEY,"").split(","))}),r},O=n.memoize((t,r)=>{const e=t.replace(l.STYLES_KEY,"").split(","),s=Y.twMerge(e[0],e[1]);return r?_.addPrefixToClasses(s,r).replace(l.STYLES_KEY,"").trim():s.replace(l.STYLES_KEY,"").trim()});function K(t,r){return n.get(t,`${r}_attrs`,{})}function L(t,r){const e={};return Object.keys(t).forEach(s=>{if(n.isString(t[s])&&t[s].startsWith(l.STYLES_KEY)){const i=O(t[s],r);e[s]={className:i,...K(t,s)}}}),e}function A(t,r){const e=n.get(t,"_bindings",{});return n.isEmpty(e)?{...t}:(n.each(e,(s,i)=>{n.isString(s)&&n.get(r,s,null)&&(t[i]=n.get(r,s,null))}),t)}function y(t){const{components:r,blocks:e,parent:s,classPrefix:i="",externalData:u={}}=t,g=e,h=a=>L(a,i),c=s?n.filter(e,{_parent:s}):n.filter(e,a=>n.isEmpty(a._parent));return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:E.Children.toArray(c.map((a,f)=>{const d=B(a),x={};n.isEmpty(d)||Object.keys(d).forEach(m=>{x[m]=E.Children.toArray(d[m].map(R=>o.jsxRuntimeExports.jsx(y,{externalData:u,classPrefix:i,blocks:g,parent:R,components:r})))});const j=n.filter(g,{_parent:a._id});x.children=j.length>0?o.jsxRuntimeExports.jsx(y,{externalData:u,classPrefix:i,parent:a._id,blocks:g,components:r}):null;const p=n.get(r,a._type,null);if(p!==null){let m=a;const R=p;return E.createElement(R,n.omit({...m,index:f,...A(a,u),...h(m),...x},["_parent"]))}return o.jsxRuntimeExports.jsxs("noscript",{children:[a._type," not found"]})}))})}const q=t=>{const r={};return Object.keys(t).forEach(e=>{n.isString(t[e])&&t[e].startsWith(l.SLOT_KEY)&&(r[e]=t[e].replace(l.SLOT_KEY,"").split(","))}),r},N=n.memoize((t,r)=>{const e=t.replace(l.STYLES_KEY,"").split(","),s=Y.twMerge(e[0],e[1]);return r===""?s.replace(l.STYLES_KEY,"").trim():_.addPrefixToClasses(s,r).replace(l.STYLES_KEY,"").trim()});function $(t,r){const e=n.get(t,`${r}_attrs`,{});n.has(e,"data-ai-key")&&delete e["data-ai-key"];const s=n.keys(e).join(" ");return n.includes(s,"x-show")&&!n.includes(s,"x-transition")&&(e["x-transition"]=""),e}function F(t,r){const e={};return Object.keys(t).forEach(s=>{if(n.isString(t[s])&&t[s].startsWith(l.STYLES_KEY)){const i=N(t[s],r);e[s]={className:i,...$(t,s)}}}),e}function W(t,r){const e=n.get(t,"_bindings",{});return n.isEmpty(e)?{...t}:(n.each(e,(s,i)=>{n.isString(s)&&n.get(r,s,null)&&(t[i]=n.get(r,s,null))}),t)}function S({blocks:t,parent:r,classPrefix:e="",externalData:s={},blockModifierCallback:i}){const u=t,g=c=>F(c,e),h=r?n.filter(t,{_parent:r}):n.filter(t,c=>n.isEmpty(c._parent));return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:E.Children.toArray(h.map((c,a)=>{const f=q(c),d={};n.isEmpty(f)||Object.keys(f).forEach(p=>{d[p]=E.Children.toArray(f[p].map(m=>o.jsxRuntimeExports.jsx(S,{externalData:s,classPrefix:e,blocks:u,parent:m})))});const x=n.filter(u,{_parent:c._id});d.children=x.length>0?o.jsxRuntimeExports.jsx(S,{externalData:s,classPrefix:e,parent:c._id,blocks:u}):null;const j=T.getBlockComponent(c._type);if(j!==null){let p=c;const m=j.component;return p={...j.defaults,...c},i&&(p=i(p)),E.createElement(m,n.omit({blockProps:{},inBuilder:!1,...p,index:a,...W(c,s),...g(p),...d},["_parent"]))}return o.jsxRuntimeExports.jsxs("noscript",{children:[c._type," not found"]})}))})}const w=({pageData:t,externalData:r={},before:e=null,after:s=null,classPrefix:i="c-"})=>{const u=n.get(t.project,"brandingOptions",l.BRANDING_OPTIONS_DEFAULTS);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[e,o.jsxRuntimeExports.jsx("div",{className:i.replace("-","")+" "+_.getBrandingClasses(u,i)+" min-h-screen",children:o.jsxRuntimeExports.jsx(C.Provider,{children:o.jsxRuntimeExports.jsx(S,{externalData:r,blocks:t.page.blocks||[],classPrefix:i})})}),s]})};exports.convertToBlocks=_.convertToBlocks;exports.RenderChaiBlocks=S;exports.RenderChaiPage=w;exports.RenderUnregisteredComponents=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("lodash-es"),a=require("./STRINGS-gPz7CUOk.cjs"),p=require("./jsx-runtime-JYMCiFoE.cjs"),h=require("react"),w=require("tailwind-merge"),x=require("@chaibuilder/runtime"),B=require("@mhsdesign/jit-browser-tailwindcss"),C=require("@tailwindcss/forms"),Y=require("@tailwindcss/typography"),q=require("@tailwindcss/aspect-ratio"),E=require("./plugin-P0tpo_XZ.cjs");require("tailwindcss-palette-generator");require("./plugin-_F-KZp1i.cjs");const _=(e,n="")=>{const s=e.replace(a.STYLES_KEY,"").split(",").map(i=>i.split(" ").map(l=>{if(l==="")return"";if(l.includes(":")){const o=l.split(":");return o[o.length-1]=n+r.last(o),o.join(":")}return`${n}${l}`}).join(" "));return r.flattenDeep(s).join(" ")},O=e=>{if(!e)return[];try{return JSON.parse(R(e)).filter(t=>!t._type.startsWith("@chai"))}catch{return[{_type:"Paragraph",_id:"error",content:"Invalid JSON. Please check the JSON string."}]}};function R(e){const n=/(asset:\/\/|https:\/\/asset\.localhost\/)(?:localhost\/)?[^"']+/g;return e.replace(n,t=>{const s=decodeURIComponent(t),i=s.indexOf("public");return i!==-1?s.substring(i+6):s})}const K=e=>{const n={};return Object.keys(e).forEach(t=>{r.isString(e[t])&&e[t].startsWith(a.SLOT_KEY)&&(n[t]=e[t].replace(a.SLOT_KEY,"").split(","))}),n},A=r.memoize((e,n)=>{const t=e.replace(a.STYLES_KEY,"").split(","),s=w.twMerge(t[0],t[1]);return n===""?s.replace(a.STYLES_KEY,"").trim():_(s,n).replace(a.STYLES_KEY,"").trim()});function L(e,n){const t=r.get(e,`${n}_attrs`,{});r.has(t,"data-ai-key")&&delete t["data-ai-key"];const s=r.keys(t).join(" ");return r.includes(s,"x-show")&&!r.includes(s,"x-transition")&&(t["x-transition"]=""),t}function N(e,n){const t={};return Object.keys(e).forEach(s=>{if(r.isString(e[s])&&e[s].startsWith(a.STYLES_KEY)){const i=A(e[s],n);t[s]={className:i,...L(e,s)}}}),t}function P(e,n){const t=r.get(e,"_bindings",{});return r.isEmpty(t)?{...e}:(r.each(t,(s,i)=>{r.isString(s)&&r.get(n,s,null)&&(e[i]=r.get(n,s,null))}),e)}function m({blocks:e,parent:n,classPrefix:t="",externalData:s={},blockModifierCallback:i}){const u=e,y=o=>N(o,t),l=n?r.filter(e,{_parent:n}):r.filter(e,o=>r.isEmpty(o._parent));return p.jsxRuntimeExports.jsx(p.jsxRuntimeExports.Fragment,{children:h.Children.toArray(l.map((o,j)=>{const d=K(o),g={};r.isEmpty(d)||Object.keys(d).forEach(c=>{g[c]=h.Children.toArray(d[c].map(S=>p.jsxRuntimeExports.jsx(m,{externalData:s,classPrefix:t,blocks:u,parent:S})))});const T=r.filter(u,{_parent:o._id});g.children=T.length>0?p.jsxRuntimeExports.jsx(m,{externalData:s,classPrefix:t,parent:o._id,blocks:u}):null;const f=x.getBlockComponent(o._type);if(f!==null){let c=o;const S=f.component;return c={...f.defaults,...o},i&&(c=i(c)),h.createElement(S,r.omit({blockProps:{},inBuilder:!1,...c,index:j,...P(o,s),...y(c),...g},["_parent"]))}return p.jsxRuntimeExports.jsxs("noscript",{children:[o._type," not found"]})}))})}async function $(e,n,t=[],s="",i=!1){return await B.createTailwindcss({tailwindConfig:{darkMode:"class",safelist:t,theme:E.getChaiBuilderTheme(e),plugins:[C,Y,q,E.chaiBuilderPlugin],corePlugins:{preflight:i},...s?{prefix:`${s}`}:{}}}).generateStylesFromContent(` ${i?"@tailwind base;":""}
2
+ @tailwind components;
3
+ @tailwind utilities;`,n)}const v=(e,n)=>e.map(t=>{const s={};return Object.keys(t).forEach(i=>{r.startsWith(t[i],a.STYLES_KEY)&&(s[i]=_(t[i],n))}),s}),I=(e,n,t="",s=!1)=>$(n,[r.replace(JSON.stringify(v(e,t)),/#styles:/g,"")],[],t,s),J=async(e,n={},t="",s=!0)=>await I(e,n,t,s);exports.RenderChaiBlocks=m;exports.convertToBlocks=O;exports.getStylesForBlocks=J;
package/dist/render.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX as JSX_2 } from 'react/jsx-runtime';
2
- import { default as React_2 } from 'react';
3
2
 
4
3
  declare type ChaiBlock = {
5
4
  _id: string;
@@ -9,45 +8,25 @@ declare type ChaiBlock = {
9
8
  _bindings?: Record<string, string>;
10
9
  } & Record<string, any>;
11
10
 
12
- export declare type ChaiPageData = {
13
- page: {
14
- blocks: ChaiBlock[];
15
- seoData?: Record<string, string>;
16
- slug?: string;
17
- name?: string;
18
- providers?: {
19
- providerKey: string;
20
- args: Record<string, any>;
21
- }[];
22
- };
23
- subPages?: {
24
- uuid: string;
25
- blocks: ChaiBlock[];
26
- providers: {
27
- providerKey: string;
28
- args: Record<string, any>;
29
- }[];
30
- }[];
31
- project: {
32
- name?: string;
33
- favicon?: string;
34
- brandingOptions: Record<string, string | number>;
35
- seoData?: Record<string, string>;
36
- primaryLanguage?: string;
37
- languages?: string[];
38
- homepage?: string;
39
- };
40
- };
41
-
42
- declare type ChaiPageProps = {
43
- before?: React_2.ReactNode;
44
- after?: React_2.ReactNode;
45
- pageData: ChaiPageData;
46
- classPrefix?: string;
47
- externalData?: Record<string, any>;
48
- };
49
-
50
- export declare const convertToBlocks: (jsonString: string) => ChaiBlock[];
11
+ declare type ChaiBuilderTailwindTheme<T extends Record<string, unknown> = {}> = {
12
+ primaryColor: string;
13
+ secondaryColor: string;
14
+ headingFont: string;
15
+ bodyFont: string;
16
+ roundedCorners: string;
17
+ bodyBgLightColor: string;
18
+ bodyBgDarkColor: string;
19
+ bodyTextLightColor: string;
20
+ bodyTextDarkColor: string;
21
+ } & T;
22
+
23
+ /**
24
+ * This function converts the chai format content to chai blocks
25
+ * @param chaiFormatContent
26
+ */
27
+ export declare const convertToBlocks: (chaiFormatContent: string) => ChaiBlock[];
28
+
29
+ export declare const getStylesForBlocks: (blocks: ChaiBlock[], theme?: ChaiBuilderTailwindTheme | {}, classPrefix?: string, includeBaseStyles?: boolean) => Promise<string>;
51
30
 
52
31
  export declare function RenderChaiBlocks({ blocks, parent, classPrefix, externalData, blockModifierCallback, }: {
53
32
  blocks: ChaiBlock[];
@@ -57,16 +36,4 @@ export declare function RenderChaiBlocks({ blocks, parent, classPrefix, external
57
36
  blockModifierCallback?: (block: ChaiBlock) => ChaiBlock;
58
37
  }): JSX_2.Element;
59
38
 
60
- export declare const RenderChaiPage: ({ pageData, externalData, before, after, classPrefix, }: ChaiPageProps) => JSX_2.Element;
61
-
62
- export declare function RenderUnregisteredComponents(props: UnregisteredCompoentProps): JSX_2.Element;
63
-
64
- declare type UnregisteredCompoentProps = {
65
- components: Record<string, React_2.ComponentType<any>>;
66
- blocks: Record<string, any>[];
67
- parent?: string;
68
- classPrefix?: string;
69
- externalData?: Record<string, any>;
70
- };
71
-
72
39
  export { }
package/dist/render.js CHANGED
@@ -1,215 +1,168 @@
1
- import { j as i } from "./jsx-runtime-WbnYoNE9.js";
2
- import u from "react";
3
- import { isString as _, memoize as $, get as l, isEmpty as h, each as R, filter as g, omit as T, has as K, keys as L, includes as O } from "lodash-es";
4
- import { twMerge as F } from "tailwind-merge";
5
- import { S as x, a as d, B as Y } from "./MODIFIERS-fd5XOmum.js";
6
- import { a as W, g as w } from "./functions--tdNWQDW.js";
7
- import { c as at } from "./functions--tdNWQDW.js";
8
- import { getBlockComponent as I } from "@chaibuilder/runtime";
9
- import { Provider as U } from "react-wrap-balancer";
10
- import "./_commonjsHelpers-UyOWmZb0.js";
11
- const z = (t) => {
12
- const e = {};
13
- return Object.keys(t).forEach((n) => {
14
- _(t[n]) && t[n].startsWith(x) && (e[n] = t[n].replace(x, "").split(","));
15
- }), e;
16
- }, G = $((t, e) => {
17
- const n = t.replace(d, "").split(","), s = F(n[0], n[1]);
18
- return e ? W(s, e).replace(d, "").trim() : s.replace(d, "").trim();
19
- });
20
- function q(t, e) {
21
- return l(t, `${e}_attrs`, {});
22
- }
23
- function H(t, e) {
24
- const n = {};
25
- return Object.keys(t).forEach((s) => {
26
- if (_(t[s]) && t[s].startsWith(d)) {
27
- const r = G(t[s], e);
28
- n[s] = {
29
- className: r,
30
- ...q(t, s)
31
- };
1
+ import { last as T, flattenDeep as A, memoize as N, filter as h, isEmpty as S, omit as P, isString as _, get as u, each as R, has as $, keys as J, includes as j, replace as W, startsWith as I } from "lodash-es";
2
+ import { a as c, S as C } from "./STRINGS--j49GZJP.js";
3
+ import { j as p } from "./jsx-runtime-Sp0orL4X.js";
4
+ import y from "react";
5
+ import { twMerge as K } from "tailwind-merge";
6
+ import { getBlockComponent as Y } from "@chaibuilder/runtime";
7
+ import { createTailwindcss as v } from "@mhsdesign/jit-browser-tailwindcss";
8
+ import F from "@tailwindcss/forms";
9
+ import L from "@tailwindcss/typography";
10
+ import U from "@tailwindcss/aspect-ratio";
11
+ import { g as z, c as M } from "./plugin-f5uJtdXY.js";
12
+ import "tailwindcss-palette-generator";
13
+ import "./plugin-sJ3Hzvpv.js";
14
+ const E = (s, r = "") => {
15
+ const e = s.replace(c, "").split(",").map((n) => n.split(" ").map((a) => {
16
+ if (a === "")
17
+ return "";
18
+ if (a.includes(":")) {
19
+ const i = a.split(":");
20
+ return i[i.length - 1] = r + T(i), i.join(":");
32
21
  }
33
- }), n;
34
- }
35
- function J(t, e) {
36
- const n = l(t, "_bindings", {});
37
- return h(n) ? { ...t } : (R(n, (s, r) => {
38
- _(s) && l(e, s, null) && (t[r] = l(e, s, null));
39
- }), t);
40
- }
41
- function N(t) {
42
- const { components: e, blocks: n, parent: s, classPrefix: r = "", externalData: p = {} } = t, j = n, C = (a) => H(a, r), o = s ? g(n, { _parent: s }) : g(n, (a) => h(a._parent));
43
- return /* @__PURE__ */ i.jsx(i.Fragment, { children: u.Children.toArray(
44
- o.map((a, y) => {
45
- const f = z(a), E = {};
46
- h(f) || Object.keys(f).forEach((m) => {
47
- E[m] = u.Children.toArray(
48
- f[m].map((S) => /* @__PURE__ */ i.jsx(
49
- N,
50
- {
51
- externalData: p,
52
- classPrefix: r,
53
- blocks: j,
54
- parent: S,
55
- components: e
56
- }
57
- ))
58
- );
59
- });
60
- const B = g(j, { _parent: a._id });
61
- E.children = B.length > 0 ? /* @__PURE__ */ i.jsx(
62
- N,
63
- {
64
- externalData: p,
65
- classPrefix: r,
66
- parent: a._id,
67
- blocks: j,
68
- components: e
69
- }
70
- ) : null;
71
- const c = l(e, a._type, null);
72
- if (c !== null) {
73
- let m = a;
74
- const S = c;
75
- return u.createElement(
76
- S,
77
- T(
78
- {
79
- ...m,
80
- index: y,
81
- ...J(a, p),
82
- ...C(m),
83
- ...E
84
- },
85
- ["_parent"]
86
- )
87
- );
88
- }
89
- return /* @__PURE__ */ i.jsxs("noscript", { children: [
90
- a._type,
91
- " not found"
92
- ] });
93
- })
94
- ) });
22
+ return `${r}${a}`;
23
+ }).join(" "));
24
+ return A(e).join(" ");
25
+ }, ft = (s) => {
26
+ if (!s)
27
+ return [];
28
+ try {
29
+ return JSON.parse(q(s)).filter((t) => !t._type.startsWith("@chai"));
30
+ } catch {
31
+ return [{ _type: "Paragraph", _id: "error", content: "Invalid JSON. Please check the JSON string." }];
32
+ }
33
+ };
34
+ function q(s) {
35
+ const r = /(asset:\/\/|https:\/\/asset\.localhost\/)(?:localhost\/)?[^"']+/g;
36
+ return s.replace(r, (t) => {
37
+ const e = decodeURIComponent(t), n = e.indexOf("public");
38
+ return n !== -1 ? e.substring(n + 6) : e;
39
+ });
95
40
  }
96
- const M = (t) => {
97
- const e = {};
98
- return Object.keys(t).forEach((n) => {
99
- _(t[n]) && t[n].startsWith(x) && (e[n] = t[n].replace(x, "").split(","));
100
- }), e;
101
- }, P = $((t, e) => {
102
- const n = t.replace(d, "").split(","), s = F(n[0], n[1]);
103
- return e === "" ? s.replace(d, "").trim() : W(s, e).replace(d, "").trim();
41
+ const G = (s) => {
42
+ const r = {};
43
+ return Object.keys(s).forEach((t) => {
44
+ _(s[t]) && s[t].startsWith(C) && (r[t] = s[t].replace(C, "").split(","));
45
+ }), r;
46
+ }, H = N((s, r) => {
47
+ const t = s.replace(c, "").split(","), e = K(t[0], t[1]);
48
+ return r === "" ? e.replace(c, "").trim() : E(e, r).replace(c, "").trim();
104
49
  });
105
- function Q(t, e) {
106
- const n = l(t, `${e}_attrs`, {});
107
- K(n, "data-ai-key") && delete n["data-ai-key"];
108
- const s = L(n).join(" ");
109
- return O(s, "x-show") && !O(s, "x-transition") && (n["x-transition"] = ""), n;
50
+ function Q(s, r) {
51
+ const t = u(s, `${r}_attrs`, {});
52
+ $(t, "data-ai-key") && delete t["data-ai-key"];
53
+ const e = J(t).join(" ");
54
+ return j(e, "x-show") && !j(e, "x-transition") && (t["x-transition"] = ""), t;
110
55
  }
111
- function V(t, e) {
112
- const n = {};
113
- return Object.keys(t).forEach((s) => {
114
- if (_(t[s]) && t[s].startsWith(d)) {
115
- const r = P(t[s], e);
116
- n[s] = {
117
- className: r,
118
- ...Q(t, s)
56
+ function V(s, r) {
57
+ const t = {};
58
+ return Object.keys(s).forEach((e) => {
59
+ if (_(s[e]) && s[e].startsWith(c)) {
60
+ const n = H(s[e], r);
61
+ t[e] = {
62
+ className: n,
63
+ ...Q(s, e)
119
64
  };
120
65
  }
121
- }), n;
66
+ }), t;
122
67
  }
123
- function X(t, e) {
124
- const n = l(t, "_bindings", {});
125
- return h(n) ? { ...t } : (R(n, (s, r) => {
126
- _(s) && l(e, s, null) && (t[r] = l(e, s, null));
127
- }), t);
68
+ function X(s, r) {
69
+ const t = u(s, "_bindings", {});
70
+ return S(t) ? { ...s } : (R(t, (e, n) => {
71
+ _(e) && u(r, e, null) && (s[n] = u(r, e, null));
72
+ }), s);
128
73
  }
129
- function A({
130
- blocks: t,
131
- parent: e,
132
- classPrefix: n = "",
133
- externalData: s = {},
134
- blockModifierCallback: r
74
+ function B({
75
+ blocks: s,
76
+ parent: r,
77
+ classPrefix: t = "",
78
+ externalData: e = {},
79
+ blockModifierCallback: n
135
80
  }) {
136
- const p = t, j = (o) => V(o, n), C = e ? g(t, { _parent: e }) : g(t, (o) => h(o._parent));
137
- return /* @__PURE__ */ i.jsx(i.Fragment, { children: u.Children.toArray(
138
- C.map((o, a) => {
139
- const y = M(o), f = {};
140
- h(y) || Object.keys(y).forEach((c) => {
141
- f[c] = u.Children.toArray(
142
- y[c].map((m) => /* @__PURE__ */ i.jsx(
143
- A,
81
+ const l = s, w = (i) => V(i, t), a = r ? h(s, { _parent: r }) : h(s, (i) => S(i._parent));
82
+ return /* @__PURE__ */ p.jsx(p.Fragment, { children: y.Children.toArray(
83
+ a.map((i, O) => {
84
+ const f = G(i), m = {};
85
+ S(f) || Object.keys(f).forEach((o) => {
86
+ m[o] = y.Children.toArray(
87
+ f[o].map((g) => /* @__PURE__ */ p.jsx(
88
+ B,
144
89
  {
145
- externalData: s,
146
- classPrefix: n,
147
- blocks: p,
148
- parent: m
90
+ externalData: e,
91
+ classPrefix: t,
92
+ blocks: l,
93
+ parent: g
149
94
  }
150
95
  ))
151
96
  );
152
97
  });
153
- const E = g(p, { _parent: o._id });
154
- f.children = E.length > 0 ? /* @__PURE__ */ i.jsx(
155
- A,
98
+ const x = h(l, { _parent: i._id });
99
+ m.children = x.length > 0 ? /* @__PURE__ */ p.jsx(
100
+ B,
156
101
  {
157
- externalData: s,
158
- classPrefix: n,
159
- parent: o._id,
160
- blocks: p
102
+ externalData: e,
103
+ classPrefix: t,
104
+ parent: i._id,
105
+ blocks: l
161
106
  }
162
107
  ) : null;
163
- const B = I(o._type);
164
- if (B !== null) {
165
- let c = o;
166
- const m = B.component;
167
- return c = { ...B.defaults, ...o }, r && (c = r(c)), u.createElement(
168
- m,
169
- T(
108
+ const d = Y(i._type);
109
+ if (d !== null) {
110
+ let o = i;
111
+ const g = d.component;
112
+ return o = { ...d.defaults, ...i }, n && (o = n(o)), y.createElement(
113
+ g,
114
+ P(
170
115
  {
171
116
  blockProps: {},
172
117
  inBuilder: !1,
173
- ...c,
174
- index: a,
175
- ...X(o, s),
176
- ...j(c),
177
- ...f
118
+ ...o,
119
+ index: O,
120
+ ...X(i, e),
121
+ ...w(o),
122
+ ...m
178
123
  },
179
124
  ["_parent"]
180
125
  )
181
126
  );
182
127
  }
183
- return /* @__PURE__ */ i.jsxs("noscript", { children: [
184
- o._type,
128
+ return /* @__PURE__ */ p.jsxs("noscript", { children: [
129
+ i._type,
185
130
  " not found"
186
131
  ] });
187
132
  })
188
133
  ) });
189
134
  }
190
- const rt = ({
191
- pageData: t,
192
- externalData: e = {},
193
- before: n = null,
194
- after: s = null,
195
- classPrefix: r = "c-"
196
- }) => {
197
- const p = l(t.project, "brandingOptions", Y);
198
- return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
199
- n,
200
- /* @__PURE__ */ i.jsx(
201
- "div",
202
- {
203
- className: r.replace("-", "") + " " + w(p, r) + " min-h-screen",
204
- children: /* @__PURE__ */ i.jsx(U, { children: /* @__PURE__ */ i.jsx(A, { externalData: e, blocks: t.page.blocks || [], classPrefix: r }) })
205
- }
206
- ),
207
- s
208
- ] });
209
- };
135
+ async function Z(s, r, t = [], e = "", n = !1) {
136
+ return await v({
137
+ tailwindConfig: {
138
+ darkMode: "class",
139
+ safelist: t,
140
+ theme: z(s),
141
+ plugins: [F, L, U, M],
142
+ corePlugins: { preflight: n },
143
+ ...e ? { prefix: `${e}` } : {}
144
+ }
145
+ }).generateStylesFromContent(
146
+ ` ${n ? "@tailwind base;" : ""}
147
+ @tailwind components;
148
+ @tailwind utilities;`,
149
+ r
150
+ );
151
+ }
152
+ const D = (s, r) => s.map((t) => {
153
+ const e = {};
154
+ return Object.keys(t).forEach((n) => {
155
+ I(t[n], c) && (e[n] = E(t[n], r));
156
+ }), e;
157
+ }), b = (s, r, t = "", e = !1) => Z(
158
+ r,
159
+ [W(JSON.stringify(D(s, t)), /#styles:/g, "")],
160
+ [],
161
+ t,
162
+ e
163
+ ), mt = async (s, r = {}, t = "", e = !0) => await b(s, r, t, e);
210
164
  export {
211
- A as RenderChaiBlocks,
212
- rt as RenderChaiPage,
213
- N as RenderUnregisteredComponents,
214
- at as convertToBlocks
165
+ B as RenderChaiBlocks,
166
+ ft as convertToBlocks,
167
+ mt as getStylesForBlocks
215
168
  };
@@ -0,0 +1,75 @@
1
+ import { j as t } from "./jsx-runtime-Sp0orL4X.js";
2
+ import * as i from "react";
3
+ import { CaretSortIcon as n, CheckIcon as c } from "@radix-ui/react-icons";
4
+ import * as e from "@radix-ui/react-select";
5
+ import { ag as r } from "./context-menu-sks9vdzC.js";
6
+ const y = e.Root, w = e.Group, N = e.Value, m = i.forwardRef(({ className: s, children: o, ...a }, d) => /* @__PURE__ */ t.jsxs(
7
+ e.Trigger,
8
+ {
9
+ ref: d,
10
+ className: r(
11
+ "flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
12
+ s
13
+ ),
14
+ ...a,
15
+ children: [
16
+ o,
17
+ /* @__PURE__ */ t.jsx(e.Icon, { asChild: !0, children: /* @__PURE__ */ t.jsx(n, { className: "h-4 w-4 opacity-50" }) })
18
+ ]
19
+ }
20
+ ));
21
+ m.displayName = e.Trigger.displayName;
22
+ const p = i.forwardRef(({ className: s, children: o, position: a = "popper", ...d }, l) => /* @__PURE__ */ t.jsx(e.Portal, { children: /* @__PURE__ */ t.jsx(
23
+ e.Content,
24
+ {
25
+ ref: l,
26
+ className: r(
27
+ "relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
28
+ a === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
29
+ s
30
+ ),
31
+ position: a,
32
+ ...d,
33
+ children: /* @__PURE__ */ t.jsx(
34
+ e.Viewport,
35
+ {
36
+ className: r(
37
+ "p-1",
38
+ a === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
39
+ ),
40
+ children: o
41
+ }
42
+ )
43
+ }
44
+ ) }));
45
+ p.displayName = e.Content.displayName;
46
+ const f = i.forwardRef(({ className: s, ...o }, a) => /* @__PURE__ */ t.jsx(e.Label, { ref: a, className: r("px-2 py-1.5 text-sm font-semibold", s), ...o }));
47
+ f.displayName = e.Label.displayName;
48
+ const u = i.forwardRef(({ className: s, children: o, ...a }, d) => /* @__PURE__ */ t.jsxs(
49
+ e.Item,
50
+ {
51
+ ref: d,
52
+ className: r(
53
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
54
+ s
55
+ ),
56
+ ...a,
57
+ children: [
58
+ /* @__PURE__ */ t.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ t.jsx(e.ItemIndicator, { children: /* @__PURE__ */ t.jsx(c, { className: "h-4 w-4" }) }) }),
59
+ /* @__PURE__ */ t.jsx(e.ItemText, { children: o })
60
+ ]
61
+ }
62
+ ));
63
+ u.displayName = e.Item.displayName;
64
+ const x = i.forwardRef(({ className: s, ...o }, a) => /* @__PURE__ */ t.jsx(e.Separator, { ref: a, className: r("-mx-1 my-1 h-px bg-muted", s), ...o }));
65
+ x.displayName = e.Separator.displayName;
66
+ export {
67
+ y as S,
68
+ w as a,
69
+ N as b,
70
+ m as c,
71
+ p as d,
72
+ f as e,
73
+ u as f,
74
+ x as g
75
+ };
@@ -0,0 +1 @@
1
+ "use strict";const r=require("./jsx-runtime-JYMCiFoE.cjs"),g=require("react"),c=require("@radix-ui/react-icons"),j=require("@radix-ui/react-select"),n=require("./context-menu-_8TFbFEJ.cjs");function l(a){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(s,t,o.get?o:{enumerable:!0,get:()=>a[t]})}}return s.default=a,Object.freeze(s)}const i=l(g),e=l(j),b=e.Root,h=e.Group,S=e.Value,d=i.forwardRef(({className:a,children:s,...t},o)=>r.jsxRuntimeExports.jsxs(e.Trigger,{ref:o,className:n.cn("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),...t,children:[s,r.jsxRuntimeExports.jsx(e.Icon,{asChild:!0,children:r.jsxRuntimeExports.jsx(c.CaretSortIcon,{className:"h-4 w-4 opacity-50"})})]}));d.displayName=e.Trigger.displayName;const m=i.forwardRef(({className:a,children:s,position:t="popper",...o},f)=>r.jsxRuntimeExports.jsx(e.Portal,{children:r.jsxRuntimeExports.jsx(e.Content,{ref:f,className:n.cn("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:t,...o,children:r.jsxRuntimeExports.jsx(e.Viewport,{className:n.cn("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s})})}));m.displayName=e.Content.displayName;const p=i.forwardRef(({className:a,...s},t)=>r.jsxRuntimeExports.jsx(e.Label,{ref:t,className:n.cn("px-2 py-1.5 text-sm font-semibold",a),...s}));p.displayName=e.Label.displayName;const u=i.forwardRef(({className:a,children:s,...t},o)=>r.jsxRuntimeExports.jsxs(e.Item,{ref:o,className:n.cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...t,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(e.ItemIndicator,{children:r.jsxRuntimeExports.jsx(c.CheckIcon,{className:"h-4 w-4"})})}),r.jsxRuntimeExports.jsx(e.ItemText,{children:s})]}));u.displayName=e.Item.displayName;const x=i.forwardRef(({className:a,...s},t)=>r.jsxRuntimeExports.jsx(e.Separator,{ref:t,className:n.cn("-mx-1 my-1 h-px bg-muted",a),...s}));x.displayName=e.Separator.displayName;exports.Select=b;exports.SelectContent=m;exports.SelectGroup=h;exports.SelectItem=u;exports.SelectLabel=p;exports.SelectSeparator=x;exports.SelectTrigger=d;exports.SelectValue=S;
@@ -0,0 +1 @@
1
+ "use strict";const i=require("./jsx-runtime-JYMCiFoE.cjs"),u=require("react"),l=require("@radix-ui/react-separator"),p=require("./context-menu-_8TFbFEJ.cjs");function a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const f=a(u),n=a(l),c=f.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...o},s)=>i.jsxRuntimeExports.jsx(n.Root,{ref:s,decorative:r,orientation:t,className:p.cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));c.displayName=n.Root.displayName;exports.Separator=c;
@@ -0,0 +1,18 @@
1
+ import { j as p } from "./jsx-runtime-Sp0orL4X.js";
2
+ import * as e from "react";
3
+ import * as o from "@radix-ui/react-separator";
4
+ import { ag as i } from "./context-menu-sks9vdzC.js";
5
+ const l = e.forwardRef(({ className: a, orientation: r = "horizontal", decorative: t = !0, ...s }, m) => /* @__PURE__ */ p.jsx(
6
+ o.Root,
7
+ {
8
+ ref: m,
9
+ decorative: t,
10
+ orientation: r,
11
+ className: i("shrink-0 bg-border", r === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", a),
12
+ ...s
13
+ }
14
+ ));
15
+ l.displayName = o.Root.displayName;
16
+ export {
17
+ l as S
18
+ };