@chaibuilder/sdk 1.0.9 → 1.0.11
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/LICENSE +28 -0
- package/README.md +123 -21
- package/dist/AddBlocks-7ACJv8LW.cjs +3 -0
- package/dist/{AddBlocks-d10b7b87.js → AddBlocks-H7BZYHUC.js} +43 -40
- package/dist/BrandingOptions-5j-XszLM.cjs +1 -0
- package/dist/{BrandingOptions-f4ab5d9f.js → BrandingOptions-PAgY-kvj.js} +19 -22
- package/dist/CanvasArea-Dnm-yeus.cjs +46 -0
- package/dist/{CanvasArea-10356200.js → CanvasArea-zn2ox-5h.js} +492 -503
- package/dist/ChaiBuilderEditor-BoE-sArB.cjs +163 -0
- package/dist/{index-aa42febc.js → ChaiBuilderEditor-hEuUONQ3.js} +11215 -15404
- package/dist/Class-_uCzl5v1.cjs +1 -0
- package/dist/{html-to-json-45e0e3b5.js → Class-l7qYbuoN.js} +185 -366
- package/dist/{CurrentPage-35e14043.js → CurrentPage-6Jp4xAWK.js} +27 -24
- package/dist/CurrentPage-YMpqOqx7.cjs +1 -0
- package/dist/{ImagesPanel-8b7a989d.cjs → ImagesPanel-6us7hiLN.cjs} +1 -1
- package/dist/{ImagesPanel-47ac13c3.js → ImagesPanel-oaHOD-Ex.js} +4 -4
- package/dist/Layers-EzOZdWvd.cjs +1 -0
- package/dist/{Layers-c3dd4fc8.js → Layers-WkZ48AUm.js} +43 -42
- package/dist/{MarkAsGlobalBlock-505ae793.js → MarkAsGlobalBlock-0HubcRkY.js} +18 -21
- package/dist/MarkAsGlobalBlock-HmeIyLCP.cjs +1 -0
- package/dist/{PagesPanel-bafc506f.js → PagesPanel-6JuwBLFQ.js} +17 -14
- package/dist/PagesPanel-zJq8p1ja.cjs +1 -0
- package/dist/ProjectPanel-Zml2F8b9.cjs +1 -0
- package/dist/{ProjectPanel-6113f394.js → ProjectPanel-cu2QSDW9.js} +23 -20
- package/dist/{Settings-1c41c514.js → Settings-fH8fZKpm.js} +266 -264
- package/dist/Settings-lc9PfnmG.cjs +1 -0
- package/dist/SidePanels-VH72zFE2.cjs +1 -0
- package/dist/{SidePanels-c13f87dc.js → SidePanels-w8ZHKJaR.js} +34 -42
- package/dist/{Topbar-b38d5d50.js → Topbar-hm1D_5sb.js} +34 -36
- package/dist/Topbar-vQPo9xSY.cjs +1 -0
- package/dist/UnsplashImages-BoBBSi1a.cjs +1 -0
- package/dist/{UnsplashImages-4edb97e7.js → UnsplashImages-gPcBLjgB.js} +13 -14
- package/dist/UploadImages-T6kW0s3G.cjs +1 -0
- package/dist/{UploadImages-52181c3e.js → UploadImages-_ZyUU66E.js} +11 -12
- package/dist/{accordion-c0176dc5.js → accordion-oPUeqPCZ.js} +2 -2
- package/dist/{accordion-0afd8143.cjs → accordion-ynvFtV_p.cjs} +1 -1
- package/dist/add-page-modal--qZSwJuB.cjs +1 -0
- package/dist/{add-page-modal-08a19915.js → add-page-modal-bj7qbZuK.js} +27 -23
- package/dist/alert-dialog-GNfnpqFB.js +64 -0
- package/dist/alert-dialog-Mv0-wAvS.cjs +1 -0
- package/dist/{command-b1103666.cjs → command-ThdTuUxt.cjs} +1 -1
- package/dist/{command-6f260f61.js → command-VHca6CcN.js} +3 -3
- package/dist/confirm-alert-8EHe0OOd.cjs +1 -0
- package/dist/confirm-alert-b0e_BLhF.js +36 -0
- package/dist/{context-menu-e1c240ce.js → context-menu-8dC9uGXj.js} +2 -2
- package/dist/{context-menu-fec580f2.cjs → context-menu-IgLbIuth.cjs} +1 -1
- package/dist/controls-Ni5kEzLz.js +103 -0
- package/dist/controls-W97-POR_.cjs +1 -0
- package/dist/controls-enQY7NI8.js +118 -0
- package/dist/controls-xUKa23ic.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +1 -10
- package/dist/core.js +117 -70
- package/dist/delete-page-modal-2LuDLEiP.cjs +1 -0
- package/dist/{delete-page-modal-9b37665b.js → delete-page-modal-cnrR8tWH.js} +26 -23
- package/dist/{dialog-170eaad9.cjs → dialog-S_QbL1iq.cjs} +1 -1
- package/dist/{dialog-18207bef.js → dialog-jrw9DF1f.js} +2 -2
- package/dist/{dropdown-menu-ae3ed09b.js → dropdown-menu-S03K_fNs.js} +2 -2
- package/dist/{dropdown-menu-84b2439e.cjs → dropdown-menu-sMXR59cB.cjs} +1 -1
- package/dist/{form-25e1af37.js → form-dVpOAyRl.js} +2 -2
- package/dist/{form-ea21db6c.cjs → form-nRAvKPQj.cjs} +1 -1
- package/dist/{functions-83b1de8d.js → functions-nNTuSTsR.js} +1 -1
- package/dist/functions-pcUZhFJM.js +12 -0
- package/dist/{functions-f84d5e2a.cjs → functions-sCuB7nvZ.cjs} +1 -1
- package/dist/functions-uw7QP2kT.cjs +1 -0
- package/dist/html-to-json-P6GpbcQX.cjs +1 -0
- package/dist/html-to-json-pdHQfRkN.js +178 -0
- package/dist/index-HAue58ea.cjs +1 -0
- package/dist/index-T4_wfKl5.js +2256 -0
- package/dist/index-X9ZgD09V.cjs +1 -0
- package/dist/index-ehKdBRUK.js +18 -0
- package/dist/{label-e770a087.js → label-KaP7MRrs.js} +2 -2
- package/dist/{label-167415e5.cjs → label-tFm8HZdb.cjs} +1 -1
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.ts +20 -13
- package/dist/lib.js +24 -23
- package/dist/{link-57de608a.js → link-6o6n2Tnd.js} +4 -4
- package/dist/link-ece8dZGH.cjs +1 -0
- package/dist/page-viewer-IARz6OSp.cjs +1 -0
- package/dist/{page-viewer-5c733179.js → page-viewer-Y4YiaZ_m.js} +30 -27
- package/dist/{popover-f7addcf4.js → popover-a84pbVhQ.js} +2 -2
- package/dist/{popover-7cb9079b.cjs → popover-fKjgcRUx.cjs} +1 -1
- package/dist/{project-general-setting-d9736056.js → project-general-setting-U4S_KlhU.js} +29 -25
- package/dist/project-general-setting-eSl3t-VH.cjs +1 -0
- package/dist/{project-seo-setting-d81fc1e3.js → project-seo-setting-Ga9v_ECU.js} +18 -19
- package/dist/project-seo-setting-rankm1z3.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +7 -7
- package/dist/render.js +36 -36
- package/dist/{scroll-area-bb343b86.cjs → scroll-area-FiHvy-TZ.cjs} +1 -1
- package/dist/{scroll-area-83bd9e8f.js → scroll-area-ewXbxc3n.js} +2 -2
- package/dist/{select-0e32300c.cjs → select-7bjg-rr9.cjs} +1 -1
- package/dist/{select-7fddd7c3.js → select-POGdEDHT.js} +2 -2
- package/dist/{separator-a597dba7.cjs → separator-3Civ-6hb.cjs} +1 -1
- package/dist/{separator-a80d065b.js → separator-SctTn0Qi.js} +2 -2
- package/dist/server.cjs +1 -1
- package/dist/server.d.ts +7 -10
- package/dist/server.js +1 -4
- package/dist/{single-page-detail-04410e64.js → single-page-detail-pAxCy_Pe.js} +69 -65
- package/dist/single-page-detail-yPgnu2AI.cjs +1 -0
- package/dist/skeleton-CU_FIbg3.js +239 -0
- package/dist/skeleton-JHP9zwL2.cjs +1 -0
- package/dist/studio.cjs +1 -0
- package/dist/studio.d.ts +13 -0
- package/dist/studio.js +39 -0
- package/dist/{tabs-85caa1e8.js → tabs-Gb9v5dVb.js} +2 -2
- package/dist/{tabs-860e37aa.cjs → tabs-iWeaaVrg.cjs} +1 -1
- package/dist/{textarea-a338ede6.cjs → textarea-1kZEh7ki.cjs} +1 -1
- package/dist/{textarea-0750bcd2.js → textarea-b2QvVhrK.js} +2 -2
- package/dist/{toggle-00c9d11e.js → toggle-ASJRAaGP.js} +2 -2
- package/dist/{toggle-b90fed97.cjs → toggle-ehNIPmme.cjs} +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +72 -7
- package/dist/ui.js +272 -212
- package/dist/useAddBlock-WJc3OgG8.js +86 -0
- package/dist/useAddBlock-dCKRFPRU.cjs +1 -0
- package/dist/useAllBlocks-6hvuNuyw.cjs +1 -0
- package/dist/useAllBlocks-PQKYvs-e.js +20 -0
- package/dist/useChaiExternalData-4K9WxANa.js +6 -0
- package/dist/useChaiExternalData-DkyBJ81C.cjs +1 -0
- package/dist/useDarkMode-ZKCO_gkt.js +23 -0
- package/dist/useDarkMode-dV6FM6l-.cjs +1 -0
- package/dist/useFeatureSupport-OLwNgEZb.js +16 -0
- package/dist/useFeatureSupport-c9IgPW2t.cjs +1 -0
- package/dist/useHiddenBlocks-3MsGOJ1s.js +15 -0
- package/dist/useHiddenBlocks-oJuQDmTy.cjs +1 -0
- package/dist/useLanguage-NKKKaxVM.cjs +1 -0
- package/dist/useLanguage-gVC5rxO5.js +216 -0
- package/dist/useMarkAsGlobalBlock-X73Vny8u.js +25 -0
- package/dist/useMarkAsGlobalBlock-ebBVGHg4.cjs +1 -0
- package/dist/useUiLibraries-4hPOi8DI.js +12 -0
- package/dist/useUiLibraries-9FhQCpKo.cjs +1 -0
- package/package.json +20 -6
- package/dist/AddBlocks-76275943.cjs +0 -3
- package/dist/BrandingOptions-d3b3309a.cjs +0 -1
- package/dist/CanvasArea-9f94cd28.cjs +0 -46
- package/dist/CurrentPage-edb509db.cjs +0 -1
- package/dist/Layers-ecba52c1.cjs +0 -1
- package/dist/MarkAsGlobalBlock-3a06a159.cjs +0 -1
- package/dist/PagesPanel-f4329082.cjs +0 -1
- package/dist/ProjectPanel-ce3116d3.cjs +0 -1
- package/dist/Settings-b6a2bef6.cjs +0 -1
- package/dist/SidePanels-2cc72c0b.cjs +0 -1
- package/dist/Topbar-3b9db9f3.cjs +0 -1
- package/dist/UnsplashImages-98c085c2.cjs +0 -1
- package/dist/UploadImages-61ef83ad.cjs +0 -1
- package/dist/add-page-modal-7f9ff733.cjs +0 -1
- package/dist/confirm-alert-c1fdf1e4.js +0 -35
- package/dist/confirm-alert-e1ea5110.cjs +0 -1
- package/dist/delete-page-modal-7066b01f.cjs +0 -1
- package/dist/html-to-json-aadcbf66.cjs +0 -1
- package/dist/index-c535cc95.cjs +0 -164
- package/dist/link-24679521.cjs +0 -1
- package/dist/page-viewer-da99c71e.cjs +0 -1
- package/dist/project-general-setting-90f8416d.cjs +0 -1
- package/dist/project-seo-setting-6eef8387.cjs +0 -1
- package/dist/single-page-detail-90f49d7a.cjs +0 -1
- package/dist/useBuilderProp-21feb2da.js +0 -296
- package/dist/useBuilderProp-adacf42f.cjs +0 -1
- package/dist/useChaiExternalData-192c7896.js +0 -5
- package/dist/useChaiExternalData-a90e8aac.cjs +0 -1
- /package/dist/{MODIFIERS-2f19c314.js → MODIFIERS-DsEzQ3aH.js} +0 -0
- /package/dist/{MODIFIERS-4716c669.cjs → MODIFIERS-Fx6WAZcw.cjs} +0 -0
- /package/dist/{jsx-runtime-5c3ac4f7.cjs → jsx-runtime-JYMCiFoE.cjs} +0 -0
- /package/dist/{jsx-runtime-944c88e2.js → jsx-runtime-Sp0orL4X.js} +0 -0
- /package/dist/{utils-ac68b2c8.js → utils-dze1SGvB.js} +0 -0
- /package/dist/{utils-3c452dd0.cjs → utils-qK_SjzzV.cjs} +0 -0
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
2
|
import { useState as d, useEffect as D } from "react";
|
|
3
3
|
import { isEmpty as p, startCase as E } from "lodash";
|
|
4
4
|
import { MixerHorizontalIcon as L } from "@radix-ui/react-icons";
|
|
5
5
|
import { createApi as B } from "unsplash-js";
|
|
6
|
-
import { u as F, B as K } from "./
|
|
7
|
-
import { I as U } from "./command-
|
|
8
|
-
import { S as V } from "./scroll-area-
|
|
9
|
-
import { P as O, a as Q, b as H } from "./popover-
|
|
10
|
-
import { S as P, c as S, b as C, d as I, f as h } from "./select-
|
|
6
|
+
import { u as F, B as K } from "./skeleton-CU_FIbg3.js";
|
|
7
|
+
import { I as U } from "./command-VHca6CcN.js";
|
|
8
|
+
import { S as V } from "./scroll-area-ewXbxc3n.js";
|
|
9
|
+
import { P as O, a as Q, b as H } from "./popover-a84pbVhQ.js";
|
|
10
|
+
import { S as P, c as S, b as C, d as I, f as h } from "./select-POGdEDHT.js";
|
|
11
11
|
import "react-i18next";
|
|
12
12
|
import { useDebouncedState as R } from "@react-hookz/web";
|
|
13
13
|
import { Loader as $ } from "lucide-react";
|
|
14
|
-
import "
|
|
15
|
-
import "./utils-ac68b2c8.js";
|
|
16
|
-
import "clsx";
|
|
17
|
-
import "tailwind-merge";
|
|
14
|
+
import "jotai";
|
|
18
15
|
import "@radix-ui/react-slot";
|
|
19
16
|
import "class-variance-authority";
|
|
17
|
+
import "./utils-dze1SGvB.js";
|
|
18
|
+
import "clsx";
|
|
19
|
+
import "tailwind-merge";
|
|
20
20
|
import "@radix-ui/react-tooltip";
|
|
21
21
|
import "@radix-ui/react-toast";
|
|
22
|
-
import "jotai";
|
|
23
22
|
import "cmdk";
|
|
24
|
-
import "./dialog-
|
|
23
|
+
import "./dialog-jrw9DF1f.js";
|
|
25
24
|
import "@radix-ui/react-dialog";
|
|
26
25
|
import "@radix-ui/react-scroll-area";
|
|
27
26
|
import "@radix-ui/react-popover";
|
|
@@ -30,7 +29,7 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
30
29
|
B({ accessKey: g }).search.getPhotos(x).then((l) => {
|
|
31
30
|
o(l);
|
|
32
31
|
}).catch((l) => r(l));
|
|
33
|
-
}),
|
|
32
|
+
}), ye = ({ isModalView: x, onSelect: g }) => {
|
|
34
33
|
const o = F("unsplashAccessKey"), [r, j] = d([]), [l, v] = d(0), [n, A] = d(), [i, q] = d(), [z, y] = d(0), [u, T] = R("", 1e3), [f, c] = d(!1), _ = async (s) => {
|
|
35
34
|
if (p(u))
|
|
36
35
|
return;
|
|
@@ -180,6 +179,6 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
180
179
|
] });
|
|
181
180
|
};
|
|
182
181
|
export {
|
|
183
|
-
|
|
182
|
+
ye as default,
|
|
184
183
|
k as fetchImage
|
|
185
184
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),t=require("react"),a=require("lodash"),m=require("@radix-ui/react-icons"),E=require("jotai"),q=require("./scroll-area-FiHvy-TZ.cjs");require("react-i18next");const b=require("./skeleton-JHP9zwL2.cjs");require("@radix-ui/react-scroll-area");require("./utils-qK_SjzzV.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");const I=E.atom([]),w=({isModalView:r,onSelect:u})=>{const R=b.useBuilderProp("uploadMediaCallback",()=>""),c=b.useBuilderProp("fetchMediaCallback",()=>[]),[n,o]=E.useAtom(I),[l,p]=t.useState(!1),[j,h]=t.useState(!1),[x,d]=t.useState(),[f,v]=t.useState("");t.useEffect(()=>{(async()=>{h(!0);const s=await c();o(s||[]),h(!1)})()},[c,o]);const y=s=>{var i,g;s&&((g=(i=s==null?void 0:s.target)==null?void 0:i.files)==null?void 0:g.length)>0&&d(s.target.files[0])},N=async()=>{p(!0);try{const{url:s}=await R(x);u(s),d(void 0);const i=await c();o(i)}catch(s){o([]),v((s==null?void 0:s.message)||"Something went wrong.")}p(!1)};return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[x?e.jsxRuntimeExports.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center rounded-md border bg-slate-50 p-2 px-1",children:[e.jsxRuntimeExports.jsx("img",{src:URL.createObjectURL(x),alt:"",className:"h-auto w-full max-w-sm rounded-md max-h-96 object-contain"}),f&&e.jsxRuntimeExports.jsx("div",{className:"w-full pt-2 text-center text-sm text-red-500",children:f}),e.jsxRuntimeExports.jsxs("div",{className:"flex w-full items-center justify-center gap-2 pt-2",children:[e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:N,disabled:l,className:"flex items-center rounded-full bg-blue-500 px-3 py-1 text-sm text-white hover:bg-blue-600 hover:text-white",children:[l?e.jsxRuntimeExports.jsx(m.GearIcon,{className:"animate-spin"}):e.jsxRuntimeExports.jsx(m.UploadIcon,{className:"animate-bounce"})," ",l?"Uploading...":"Upload"]}),!l&&e.jsxRuntimeExports.jsxs("button",{type:"button",className:"flex items-center rounded-full border border-gray-300 px-3 py-1 text-sm hover:bg-gray-200",onClick:()=>d(void 0),children:[e.jsxRuntimeExports.jsx(m.Cross1Icon,{})," Cancel"]})]})]}):e.jsxRuntimeExports.jsxs("label",{htmlFor:r?"upload-in-modal":"upload-in-panel",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex w-full cursor-pointer flex-col items-center justify-center rounded-md border border-dashed border-blue-900 bg-gray-200 py-8 hover:bg-blue-50",children:[e.jsxRuntimeExports.jsx("div",{className:"text-3xl",children:"+"}),e.jsxRuntimeExports.jsx("div",{children:"Click to choose file"})]}),e.jsxRuntimeExports.jsx("input",{type:"file",id:r?"upload-in-modal":"upload-in-panel",hidden:!0,onChange:y})]}),e.jsxRuntimeExports.jsxs(q.ScrollArea,{className:`-mx-2 flex h-full flex-col pb-8 pt-2 ${r?"px-2":""} pt-2`,children:[a.isEmpty(n)&&j&&e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:e.jsxRuntimeExports.jsx("div",{className:"animate-pulse font-medium",children:"Fetching..."})}),a.isEmpty(n)&&!j&&e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:e.jsxRuntimeExports.jsx("div",{className:"font-medium",children:"No Images"})}),r?e.jsxRuntimeExports.jsx("div",{className:"h-full columns-5 py-2",children:a.map(n,s=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>u(s.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:s.name,src:s.thumbUrl})})},s.id))}):a.map(n,s=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"px-2 py-1",onClick:()=>u(s.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto w-full cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:s.name,src:s.url})})},s.id))]})]})};exports.default=w;
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
2
|
import { useState as i, useEffect as w } from "react";
|
|
3
3
|
import { isEmpty as g, map as b } from "lodash";
|
|
4
4
|
import { GearIcon as C, UploadIcon as U, Cross1Icon as k } from "@radix-ui/react-icons";
|
|
5
5
|
import { atom as F, useAtom as E } from "jotai";
|
|
6
|
-
import { S as A } from "./scroll-area-
|
|
6
|
+
import { S as A } from "./scroll-area-ewXbxc3n.js";
|
|
7
7
|
import "react-i18next";
|
|
8
|
-
import { u as j } from "./
|
|
8
|
+
import { u as j } from "./skeleton-CU_FIbg3.js";
|
|
9
9
|
import "@radix-ui/react-scroll-area";
|
|
10
|
-
import "./utils-
|
|
10
|
+
import "./utils-dze1SGvB.js";
|
|
11
11
|
import "clsx";
|
|
12
12
|
import "tailwind-merge";
|
|
13
|
-
import "@radix-ui/react-alert-dialog";
|
|
14
13
|
import "@radix-ui/react-slot";
|
|
15
14
|
import "class-variance-authority";
|
|
16
15
|
import "@radix-ui/react-tooltip";
|
|
17
16
|
import "@radix-ui/react-toast";
|
|
18
|
-
const R = F([]),
|
|
19
|
-
const v = j("uploadMediaCallback", () => ""), d = j("fetchMediaCallback", () => []), [l, a] = E(R), [r, u] = i(!1), [
|
|
17
|
+
const R = F([]), W = ({ isModalView: s, onSelect: n }) => {
|
|
18
|
+
const v = j("uploadMediaCallback", () => ""), d = j("fetchMediaCallback", () => []), [l, a] = E(R), [r, u] = i(!1), [x, p] = i(!1), [c, m] = i(), [f, y] = i("");
|
|
20
19
|
w(() => {
|
|
21
20
|
(async () => {
|
|
22
|
-
|
|
21
|
+
p(!0);
|
|
23
22
|
const t = await d();
|
|
24
|
-
a(t || []),
|
|
23
|
+
a(t || []), p(!1);
|
|
25
24
|
})();
|
|
26
25
|
}, [d, a]);
|
|
27
26
|
const N = (t) => {
|
|
@@ -86,8 +85,8 @@ const R = F([]), X = ({ isModalView: s, onSelect: n }) => {
|
|
|
86
85
|
/* @__PURE__ */ e.jsx("input", { type: "file", id: s ? "upload-in-modal" : "upload-in-panel", hidden: !0, onChange: N })
|
|
87
86
|
] }),
|
|
88
87
|
/* @__PURE__ */ e.jsxs(A, { className: `-mx-2 flex h-full flex-col pb-8 pt-2 ${s ? "px-2" : ""} pt-2`, children: [
|
|
89
|
-
g(l) &&
|
|
90
|
-
g(l) && !
|
|
88
|
+
g(l) && x && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e.jsx("div", { className: "animate-pulse font-medium", children: "Fetching..." }) }),
|
|
89
|
+
g(l) && !x && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e.jsx("div", { className: "font-medium", children: "No Images" }) }),
|
|
91
90
|
s ? /* @__PURE__ */ e.jsx("div", { className: "h-full columns-5 py-2", children: b(l, (t) => /* @__PURE__ */ e.jsx("div", { role: "button", tabIndex: 0, className: "my-1 flex", onClick: () => n(t.url), children: /* @__PURE__ */ e.jsx("div", { className: "relative overflow-hidden rounded-md bg-cover bg-no-repeat", children: /* @__PURE__ */ e.jsx(
|
|
92
91
|
"img",
|
|
93
92
|
{
|
|
@@ -110,5 +109,5 @@ const R = F([]), X = ({ isModalView: s, onSelect: n }) => {
|
|
|
110
109
|
] });
|
|
111
110
|
};
|
|
112
111
|
export {
|
|
113
|
-
|
|
112
|
+
W as default
|
|
114
113
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as a } from "./jsx-runtime-
|
|
1
|
+
import { j as a } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
2
|
import * as n from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-accordion";
|
|
4
4
|
import { ChevronDownIcon as c } from "@radix-ui/react-icons";
|
|
5
|
-
import { c as i } from "./utils-
|
|
5
|
+
import { c as i } from "./utils-dze1SGvB.js";
|
|
6
6
|
const N = e.Root, m = n.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ a.jsx(e.Item, { ref: r, className: i("border-b", o), ...t }));
|
|
7
7
|
m.displayName = "AccordionItem";
|
|
8
8
|
const d = n.forwardRef(({ className: o, children: t, ...r }, s) => /* @__PURE__ */ a.jsx(e.Header, { className: "flex", children: /* @__PURE__ */ a.jsxs(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./jsx-runtime-
|
|
1
|
+
"use strict";const s=require("./jsx-runtime-JYMCiFoE.cjs"),u=require("react"),x=require("@radix-ui/react-accordion"),p=require("@radix-ui/react-icons"),c=require("./utils-qK_SjzzV.cjs");function a(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const i=a(u),o=a(x),f=o.Root,d=i.forwardRef(({className:e,...n},t)=>s.jsxRuntimeExports.jsx(o.Item,{ref:t,className:c.cn("border-b",e),...n}));d.displayName="AccordionItem";const m=i.forwardRef(({className:e,children:n,...t},r)=>s.jsxRuntimeExports.jsx(o.Header,{className:"flex",children:s.jsxRuntimeExports.jsxs(o.Trigger,{ref:r,className:c.cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...t,children:[n,s.jsxRuntimeExports.jsx(p.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));m.displayName=o.Trigger.displayName;const l=i.forwardRef(({className:e,children:n,...t},r)=>s.jsxRuntimeExports.jsx(o.Content,{ref:r,className:c.cn("text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...t,children:s.jsxRuntimeExports.jsx("div",{className:"pb-4 pt-0",children:n})}));l.displayName=o.Content.displayName;exports.Accordion=f;exports.AccordionContent=l;exports.AccordionItem=d;exports.AccordionTrigger=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),g=require("react"),R=require("lodash"),x=require("./skeleton-JHP9zwL2.cjs"),a=require("./dialog-S_QbL1iq.cjs"),c=require("./controls-W97-POR_.cjs"),b=require("./form-nRAvKPQj.cjs"),f=require("./index-X9ZgD09V.cjs");require("jotai");require("@radix-ui/react-slot");require("class-variance-authority");require("./utils-qK_SjzzV.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-tooltip");require("@radix-ui/react-icons");require("@radix-ui/react-toast");require("@radix-ui/react-dialog");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./link-ece8dZGH.cjs");require("react-icons-picker");require("react-dom");require("./ImagesPanel-6us7hiLN.cjs");require("./tabs-iWeaaVrg.cjs");require("@radix-ui/react-tabs");require("react-quill");require("react-i18next");require("./ChaiBuilderEditor-BoE-sArB.cjs");require("./MODIFIERS-Fx6WAZcw.cjs");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("./functions-uw7QP2kT.cjs");require("redux-undo");require("@react-hookz/web");require("./index-HAue58ea.cjs");require("sonner");require("./html-to-json-P6GpbcQX.cjs");require("himalaya");require("lucide-react");require("./alert-dialog-Mv0-wAvS.cjs");require("@radix-ui/react-alert-dialog");const E=({closeModal:i})=>{var o,l;const s=f.useAddPage(),[r,m]=g.useState({name:"",slug:"",blocks:[],type:"STATIC",seoData:{}}),p=()=>{s.mutate(r,{onSuccess:()=>i()})},j=({formData:u},t)=>{m(h=>{var q,d;const n={[t]:u[t]};return t==="name"?n.slug=R.kebabCase((q=u[t])==null?void 0:q.replace(/\d/g,"")):t==="slug"&&(n.slug=(d=u[t])==null?void 0:d.replace(/\d/g,"").replace(/\s+/g,"").replace("--","-").replace("__","_")),{...h,...n}})},P={name:c.u({title:"Page Name",default:r.name}),slug:c.u({title:"Page Slug",default:r.slug})};return e.jsxRuntimeExports.jsxs(a.DialogContent,{children:[e.jsxRuntimeExports.jsx("div",{className:"px-1 font-bold",children:"Add Page"}),e.jsxRuntimeExports.jsx(b.Form,{formData:r,properties:P,onChange:j,disabled:s.isPending}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-end",children:e.jsxRuntimeExports.jsx(x.Button,{type:"submit",disabled:!r.name||!r.slug||((o=r.name)==null?void 0:o.length)<2||((l=r.slug)==null?void 0:l.length)<2||s.isPending,onClick:p,children:"Add Page"})})]})},C=()=>{const[i,s]=g.useState(!1);return e.jsxRuntimeExports.jsxs(a.Dialog,{open:i,onOpenChange:()=>s(!i),children:[e.jsxRuntimeExports.jsx(a.DialogTrigger,{children:e.jsxRuntimeExports.jsx(x.Button,{size:"sm",variant:"link",className:"text-blue-500",onClick:()=>s(!i),children:"+ New Page"})}),i&&e.jsxRuntimeExports.jsx(E,{closeModal:()=>s(!i)})]})};exports.default=C;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-
|
|
1
|
+
import { j as t } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
2
|
import { useState as g } from "react";
|
|
3
3
|
import { kebabCase as j } from "lodash";
|
|
4
|
-
import { B as c } from "./
|
|
5
|
-
import { D as b, a as C, b as A } from "./dialog-
|
|
6
|
-
import {
|
|
7
|
-
import { F as D } from "./form-
|
|
8
|
-
import {
|
|
9
|
-
import "
|
|
10
|
-
import "./utils-ac68b2c8.js";
|
|
11
|
-
import "clsx";
|
|
12
|
-
import "tailwind-merge";
|
|
4
|
+
import { B as c } from "./skeleton-CU_FIbg3.js";
|
|
5
|
+
import { D as b, a as C, b as A } from "./dialog-jrw9DF1f.js";
|
|
6
|
+
import { u as d } from "./controls-enQY7NI8.js";
|
|
7
|
+
import { F as D } from "./form-dVpOAyRl.js";
|
|
8
|
+
import { e as N } from "./index-T4_wfKl5.js";
|
|
9
|
+
import "jotai";
|
|
13
10
|
import "@radix-ui/react-slot";
|
|
14
11
|
import "class-variance-authority";
|
|
12
|
+
import "./utils-dze1SGvB.js";
|
|
13
|
+
import "clsx";
|
|
14
|
+
import "tailwind-merge";
|
|
15
15
|
import "@radix-ui/react-tooltip";
|
|
16
16
|
import "@radix-ui/react-icons";
|
|
17
17
|
import "@radix-ui/react-toast";
|
|
18
|
-
import "jotai";
|
|
19
18
|
import "@radix-ui/react-dialog";
|
|
20
19
|
import "@rjsf/core";
|
|
21
20
|
import "@rjsf/validator-ajv8";
|
|
22
|
-
import "./link-
|
|
21
|
+
import "./link-6o6n2Tnd.js";
|
|
23
22
|
import "react-icons-picker";
|
|
24
23
|
import "react-dom";
|
|
25
|
-
import "./ImagesPanel-
|
|
26
|
-
import "./tabs-
|
|
24
|
+
import "./ImagesPanel-oaHOD-Ex.js";
|
|
25
|
+
import "./tabs-Gb9v5dVb.js";
|
|
27
26
|
import "@radix-ui/react-tabs";
|
|
28
27
|
import "react-quill";
|
|
29
28
|
import "react-i18next";
|
|
30
|
-
import "./
|
|
29
|
+
import "./ChaiBuilderEditor-hEuUONQ3.js";
|
|
30
|
+
import "./MODIFIERS-DsEzQ3aH.js";
|
|
31
31
|
import "@radix-ui/react-scroll-area";
|
|
32
32
|
import "@floating-ui/react-dom";
|
|
33
33
|
import "i18next";
|
|
@@ -36,12 +36,16 @@ import "react-dnd";
|
|
|
36
36
|
import "@minoru/react-dnd-treeview";
|
|
37
37
|
import "react-hotkeys-hook";
|
|
38
38
|
import "flat-to-nested";
|
|
39
|
-
import "./
|
|
40
|
-
import "himalaya";
|
|
39
|
+
import "./functions-pcUZhFJM.js";
|
|
41
40
|
import "redux-undo";
|
|
42
41
|
import "@react-hookz/web";
|
|
42
|
+
import "./index-ehKdBRUK.js";
|
|
43
43
|
import "sonner";
|
|
44
|
+
import "./html-to-json-pdHQfRkN.js";
|
|
45
|
+
import "himalaya";
|
|
44
46
|
import "lucide-react";
|
|
47
|
+
import "./alert-dialog-GNfnpqFB.js";
|
|
48
|
+
import "@radix-ui/react-alert-dialog";
|
|
45
49
|
const S = ({ closeModal: o }) => {
|
|
46
50
|
var s, p;
|
|
47
51
|
const i = N(), [e, u] = g({
|
|
@@ -54,13 +58,13 @@ const S = ({ closeModal: o }) => {
|
|
|
54
58
|
i.mutate(e, {
|
|
55
59
|
onSuccess: () => o()
|
|
56
60
|
});
|
|
57
|
-
}, x = ({ formData:
|
|
61
|
+
}, x = ({ formData: m }, r) => {
|
|
58
62
|
u((h) => {
|
|
59
63
|
var n, l;
|
|
60
|
-
const
|
|
61
|
-
return r === "name" ?
|
|
64
|
+
const a = { [r]: m[r] };
|
|
65
|
+
return r === "name" ? a.slug = j((n = m[r]) == null ? void 0 : n.replace(/\d/g, "")) : r === "slug" && (a.slug = (l = m[r]) == null ? void 0 : l.replace(/\d/g, "").replace(/\s+/g, "").replace("--", "-").replace("__", "_")), {
|
|
62
66
|
...h,
|
|
63
|
-
...
|
|
67
|
+
...a
|
|
64
68
|
};
|
|
65
69
|
});
|
|
66
70
|
}, P = {
|
|
@@ -83,7 +87,7 @@ const S = ({ closeModal: o }) => {
|
|
|
83
87
|
}
|
|
84
88
|
) })
|
|
85
89
|
] });
|
|
86
|
-
},
|
|
90
|
+
}, bt = () => {
|
|
87
91
|
const [o, i] = g(!1);
|
|
88
92
|
return /* @__PURE__ */ t.jsxs(b, { open: o, onOpenChange: () => i(!o), children: [
|
|
89
93
|
/* @__PURE__ */ t.jsx(C, { children: /* @__PURE__ */ t.jsx(c, { size: "sm", variant: "link", className: "text-blue-500", onClick: () => i(!o), children: "+ New Page" }) }),
|
|
@@ -91,5 +95,5 @@ const S = ({ closeModal: o }) => {
|
|
|
91
95
|
] });
|
|
92
96
|
};
|
|
93
97
|
export {
|
|
94
|
-
|
|
98
|
+
bt as default
|
|
95
99
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { j as o } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import * as t from "@radix-ui/react-alert-dialog";
|
|
4
|
+
import { c as l } from "./utils-dze1SGvB.js";
|
|
5
|
+
import { b as r } from "./skeleton-CU_FIbg3.js";
|
|
6
|
+
const D = t.Root, j = t.Trigger, d = ({ className: a, ...e }) => /* @__PURE__ */ o.jsx(t.Portal, { className: l(a), ...e });
|
|
7
|
+
d.displayName = t.Portal.displayName;
|
|
8
|
+
const n = i.forwardRef(({ className: a, ...e }, s) => /* @__PURE__ */ o.jsx(
|
|
9
|
+
t.Overlay,
|
|
10
|
+
{
|
|
11
|
+
className: l(
|
|
12
|
+
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
13
|
+
a
|
|
14
|
+
),
|
|
15
|
+
...e,
|
|
16
|
+
ref: s
|
|
17
|
+
}
|
|
18
|
+
));
|
|
19
|
+
n.displayName = t.Overlay.displayName;
|
|
20
|
+
const m = i.forwardRef(({ className: a, ...e }, s) => /* @__PURE__ */ o.jsxs(d, { children: [
|
|
21
|
+
/* @__PURE__ */ o.jsx(n, {}),
|
|
22
|
+
/* @__PURE__ */ o.jsx(
|
|
23
|
+
t.Content,
|
|
24
|
+
{
|
|
25
|
+
ref: s,
|
|
26
|
+
className: l(
|
|
27
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
|
|
28
|
+
a
|
|
29
|
+
),
|
|
30
|
+
...e
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] }));
|
|
34
|
+
m.displayName = t.Content.displayName;
|
|
35
|
+
const c = ({ className: a, ...e }) => /* @__PURE__ */ o.jsx("div", { className: l("flex flex-col space-y-2 text-center sm:text-left", a), ...e });
|
|
36
|
+
c.displayName = "AlertDialogHeader";
|
|
37
|
+
const p = ({ className: a, ...e }) => /* @__PURE__ */ o.jsx("div", { className: l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", a), ...e });
|
|
38
|
+
p.displayName = "AlertDialogFooter";
|
|
39
|
+
const f = i.forwardRef(({ className: a, ...e }, s) => /* @__PURE__ */ o.jsx(t.Title, { ref: s, className: l("text-lg font-semibold", a), ...e }));
|
|
40
|
+
f.displayName = t.Title.displayName;
|
|
41
|
+
const g = i.forwardRef(({ className: a, ...e }, s) => /* @__PURE__ */ o.jsx(t.Description, { ref: s, className: l("text-sm text-muted-foreground", a), ...e }));
|
|
42
|
+
g.displayName = t.Description.displayName;
|
|
43
|
+
const x = i.forwardRef(({ className: a, ...e }, s) => /* @__PURE__ */ o.jsx(t.Action, { ref: s, className: l(r(), a), ...e }));
|
|
44
|
+
x.displayName = t.Action.displayName;
|
|
45
|
+
const N = i.forwardRef(({ className: a, ...e }, s) => /* @__PURE__ */ o.jsx(
|
|
46
|
+
t.Cancel,
|
|
47
|
+
{
|
|
48
|
+
ref: s,
|
|
49
|
+
className: l(r({ variant: "outline" }), "mt-2 sm:mt-0", a),
|
|
50
|
+
...e
|
|
51
|
+
}
|
|
52
|
+
));
|
|
53
|
+
N.displayName = t.Cancel.displayName;
|
|
54
|
+
export {
|
|
55
|
+
D as A,
|
|
56
|
+
j as a,
|
|
57
|
+
m as b,
|
|
58
|
+
c,
|
|
59
|
+
p as d,
|
|
60
|
+
f as e,
|
|
61
|
+
g as f,
|
|
62
|
+
x as g,
|
|
63
|
+
N as h
|
|
64
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("./jsx-runtime-JYMCiFoE.cjs"),A=require("react"),N=require("@radix-ui/react-alert-dialog"),l=require("./utils-qK_SjzzV.cjs"),n=require("./skeleton-JHP9zwL2.cjs");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const i=c(A),s=c(N),y=s.Root,R=s.Trigger,d=({className:e,...t})=>o.jsxRuntimeExports.jsx(s.Portal,{className:l.cn(e),...t});d.displayName=s.Portal.displayName;const m=i.forwardRef(({className:e,...t},a)=>o.jsxRuntimeExports.jsx(s.Overlay,{className:l.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));m.displayName=s.Overlay.displayName;const p=i.forwardRef(({className:e,...t},a)=>o.jsxRuntimeExports.jsxs(d,{children:[o.jsxRuntimeExports.jsx(m,{}),o.jsxRuntimeExports.jsx(s.Content,{ref:a,className:l.cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...t})]}));p.displayName=s.Content.displayName;const u=({className:e,...t})=>o.jsxRuntimeExports.jsx("div",{className:l.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});u.displayName="AlertDialogHeader";const x=({className:e,...t})=>o.jsxRuntimeExports.jsx("div",{className:l.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});x.displayName="AlertDialogFooter";const g=i.forwardRef(({className:e,...t},a)=>o.jsxRuntimeExports.jsx(s.Title,{ref:a,className:l.cn("text-lg font-semibold",e),...t}));g.displayName=s.Title.displayName;const f=i.forwardRef(({className:e,...t},a)=>o.jsxRuntimeExports.jsx(s.Description,{ref:a,className:l.cn("text-sm text-muted-foreground",e),...t}));f.displayName=s.Description.displayName;const D=i.forwardRef(({className:e,...t},a)=>o.jsxRuntimeExports.jsx(s.Action,{ref:a,className:l.cn(n.buttonVariants(),e),...t}));D.displayName=s.Action.displayName;const j=i.forwardRef(({className:e,...t},a)=>o.jsxRuntimeExports.jsx(s.Cancel,{ref:a,className:l.cn(n.buttonVariants({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));j.displayName=s.Cancel.displayName;exports.AlertDialog=y;exports.AlertDialogAction=D;exports.AlertDialogCancel=j;exports.AlertDialogContent=p;exports.AlertDialogDescription=f;exports.AlertDialogFooter=x;exports.AlertDialogHeader=u;exports.AlertDialogTitle=g;exports.AlertDialogTrigger=R;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./jsx-runtime-
|
|
1
|
+
"use strict";const a=require("./jsx-runtime-JYMCiFoE.cjs"),C=require("react"),n=require("./utils-qK_SjzzV.cjs"),j=require("@radix-ui/react-icons"),m=require("cmdk"),i=require("./dialog-S_QbL1iq.cjs");function h(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const d=h(C),p=d.forwardRef(({className:e,type:t,...o},r)=>a.jsxRuntimeExports.jsx("input",{type:t,className:n.cn("flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...o}));p.displayName="Input";const s=d.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Command,{ref:o,className:n.cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));s.displayName=m.Command.displayName;const N=({children:e,...t})=>a.jsxRuntimeExports.jsx(i.Dialog,{...t,children:a.jsxRuntimeExports.jsx(i.DialogContent,{className:"overflow-hidden p-0",children:a.jsxRuntimeExports.jsx(s,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),c=d.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[a.jsxRuntimeExports.jsx(j.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),a.jsxRuntimeExports.jsx(m.Command.Input,{ref:o,className:n.cn("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));c.displayName=m.Command.Input.displayName;const u=d.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Command.List,{ref:o,className:n.cn("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));u.displayName=m.Command.List.displayName;const l=d.forwardRef((e,t)=>a.jsxRuntimeExports.jsx(m.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));l.displayName=m.Command.Empty.displayName;const x=d.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Command.Group,{ref:o,className:n.cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));x.displayName=m.Command.Group.displayName;const f=d.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Command.Separator,{ref:o,className:n.cn("-mx-1 h-px bg-border",e),...t}));f.displayName=m.Command.Separator.displayName;const g=d.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Command.Item,{ref:o,className:n.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));g.displayName=m.Command.Item.displayName;const y=({className:e,...t})=>a.jsxRuntimeExports.jsx("span",{className:n.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});y.displayName="CommandShortcut";exports.Command=s;exports.CommandDialog=N;exports.CommandEmpty=l;exports.CommandGroup=x;exports.CommandInput=c;exports.CommandItem=g;exports.CommandList=u;exports.CommandSeparator=f;exports.CommandShortcut=y;exports.Input=p;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { j as o } from "./jsx-runtime-
|
|
1
|
+
import { j as o } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
2
|
import * as t from "react";
|
|
3
|
-
import { c as r } from "./utils-
|
|
3
|
+
import { c as r } from "./utils-dze1SGvB.js";
|
|
4
4
|
import { MagnifyingGlassIcon as i } from "@radix-ui/react-icons";
|
|
5
5
|
import { Command as d } from "cmdk";
|
|
6
|
-
import { D as p, b as l } from "./dialog-
|
|
6
|
+
import { D as p, b as l } from "./dialog-jrw9DF1f.js";
|
|
7
7
|
const c = t.forwardRef(({ className: e, type: a, ...s }, n) => /* @__PURE__ */ o.jsx(
|
|
8
8
|
"input",
|
|
9
9
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),c=require("./skeleton-JHP9zwL2.cjs"),r=require("./alert-dialog-Mv0-wAvS.cjs");require("react");require("jotai");require("lodash");require("@radix-ui/react-slot");require("class-variance-authority");require("./utils-qK_SjzzV.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-tooltip");require("@radix-ui/react-icons");require("@radix-ui/react-toast");require("@radix-ui/react-alert-dialog");const a=({open:s,onCancel:n=()=>{},onConfirm:l,title:u,description:i,disabled:t,cancelText:o="Discard",confirmText:x="Save"})=>e.jsxRuntimeExports.jsx(r.AlertDialog,{open:s,children:e.jsxRuntimeExports.jsxs(r.AlertDialogContent,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTitle,{children:u}),i&&e.jsxRuntimeExports.jsx(r.AlertDialogDescription,{children:i}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-3",children:[e.jsxRuntimeExports.jsx(r.AlertDialogCancel,{disabled:t,onClick:n,children:o}),e.jsxRuntimeExports.jsx(c.Button,{variant:"default",onClick:l,disabled:t,children:x})]})]})});exports.default=a;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { j as r } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
|
+
import { B as n } from "./skeleton-CU_FIbg3.js";
|
|
3
|
+
import { A as p, b as c, e as x, f as j, h as d } from "./alert-dialog-GNfnpqFB.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "jotai";
|
|
6
|
+
import "lodash";
|
|
7
|
+
import "@radix-ui/react-slot";
|
|
8
|
+
import "class-variance-authority";
|
|
9
|
+
import "./utils-dze1SGvB.js";
|
|
10
|
+
import "clsx";
|
|
11
|
+
import "tailwind-merge";
|
|
12
|
+
import "@radix-ui/react-tooltip";
|
|
13
|
+
import "@radix-ui/react-icons";
|
|
14
|
+
import "@radix-ui/react-toast";
|
|
15
|
+
import "@radix-ui/react-alert-dialog";
|
|
16
|
+
const T = ({
|
|
17
|
+
open: o,
|
|
18
|
+
onCancel: e = () => {
|
|
19
|
+
},
|
|
20
|
+
onConfirm: l,
|
|
21
|
+
title: s,
|
|
22
|
+
description: i,
|
|
23
|
+
disabled: t,
|
|
24
|
+
cancelText: a = "Discard",
|
|
25
|
+
confirmText: m = "Save"
|
|
26
|
+
}) => /* @__PURE__ */ r.jsx(p, { open: o, children: /* @__PURE__ */ r.jsxs(c, { children: [
|
|
27
|
+
/* @__PURE__ */ r.jsx(x, { children: s }),
|
|
28
|
+
i && /* @__PURE__ */ r.jsx(j, { children: i }),
|
|
29
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-end gap-x-3", children: [
|
|
30
|
+
/* @__PURE__ */ r.jsx(d, { disabled: t, onClick: e, children: a }),
|
|
31
|
+
/* @__PURE__ */ r.jsx(n, { variant: "default", onClick: l, disabled: t, children: m })
|
|
32
|
+
] })
|
|
33
|
+
] }) });
|
|
34
|
+
export {
|
|
35
|
+
T as default
|
|
36
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as o } from "./jsx-runtime-
|
|
1
|
+
import { j as o } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
2
|
import * as r from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-context-menu";
|
|
4
4
|
import { ChevronRightIcon as l, CheckIcon as c, DotFilledIcon as m } from "@radix-ui/react-icons";
|
|
5
|
-
import { c as d } from "./utils-
|
|
5
|
+
import { c as d } from "./utils-dze1SGvB.js";
|
|
6
6
|
const M = e.Root, R = e.Trigger, I = e.Group, v = e.Portal, S = e.Sub, k = e.RadioGroup, u = r.forwardRef(({ className: t, inset: a, children: s, ...n }, i) => /* @__PURE__ */ o.jsxs(
|
|
7
7
|
e.SubTrigger,
|
|
8
8
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./jsx-runtime-
|
|
1
|
+
"use strict";const a=require("./jsx-runtime-JYMCiFoE.cjs"),R=require("react"),M=require("@radix-ui/react-context-menu"),c=require("@radix-ui/react-icons"),r=require("./utils-qK_SjzzV.cjs");function u(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const i=u(R),e=u(M),h=e.Root,N=e.Trigger,y=e.Group,w=e.Portal,I=e.Sub,S=e.RadioGroup,l=i.forwardRef(({className:t,inset:o,children:n,...s},d)=>a.jsxRuntimeExports.jsxs(e.SubTrigger,{ref:d,className:r.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",o&&"pl-8",t),...s,children:[n,a.jsxRuntimeExports.jsx(c.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));l.displayName=e.SubTrigger.displayName;const m=i.forwardRef(({className:t,...o},n)=>a.jsxRuntimeExports.jsx(e.SubContent,{ref:n,className:r.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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),...o}));m.displayName=e.SubContent.displayName;const x=i.forwardRef(({className:t,...o},n)=>a.jsxRuntimeExports.jsx(e.Portal,{children:a.jsxRuntimeExports.jsx(e.Content,{ref:n,className:r.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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),...o})}));x.displayName=e.Content.displayName;const p=i.forwardRef(({className:t,inset:o,...n},s)=>a.jsxRuntimeExports.jsx(e.Item,{ref:s,className:r.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o&&"pl-8",t),...n}));p.displayName=e.Item.displayName;const f=i.forwardRef(({className:t,children:o,checked:n,...s},d)=>a.jsxRuntimeExports.jsxs(e.CheckboxItem,{ref:d,className:r.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...s,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(e.ItemIndicator,{children:a.jsxRuntimeExports.jsx(c.CheckIcon,{className:"h-4 w-4"})})}),o]}));f.displayName=e.CheckboxItem.displayName;const b=i.forwardRef(({className:t,children:o,...n},s)=>a.jsxRuntimeExports.jsxs(e.RadioItem,{ref:s,className:r.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(e.ItemIndicator,{children:a.jsxRuntimeExports.jsx(c.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),o]}));b.displayName=e.RadioItem.displayName;const C=i.forwardRef(({className:t,inset:o,...n},s)=>a.jsxRuntimeExports.jsx(e.Label,{ref:s,className:r.cn("px-2 py-1.5 text-sm font-semibold text-foreground",o&&"pl-8",t),...n}));C.displayName=e.Label.displayName;const g=i.forwardRef(({className:t,...o},n)=>a.jsxRuntimeExports.jsx(e.Separator,{ref:n,className:r.cn("-mx-1 my-1 h-px bg-border",t),...o}));g.displayName=e.Separator.displayName;const j=({className:t,...o})=>a.jsxRuntimeExports.jsx("span",{className:r.cn("ml-auto text-xs tracking-widest text-muted-foreground",t),...o});j.displayName="ContextMenuShortcut";exports.ContextMenu=h;exports.ContextMenuCheckboxItem=f;exports.ContextMenuContent=x;exports.ContextMenuGroup=y;exports.ContextMenuItem=p;exports.ContextMenuLabel=C;exports.ContextMenuPortal=w;exports.ContextMenuRadioGroup=S;exports.ContextMenuRadioItem=b;exports.ContextMenuSeparator=g;exports.ContextMenuShortcut=j;exports.ContextMenuSub=I;exports.ContextMenuSubContent=m;exports.ContextMenuSubTrigger=l;exports.ContextMenuTrigger=N;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { get as n, isEmpty as h, map as P, forIn as $, has as b, includes as u, set as E } from "lodash";
|
|
2
|
+
import { g as O } from "./functions-pcUZhFJM.js";
|
|
3
|
+
import { I as y, a as j } from "./MODIFIERS-DsEzQ3aH.js";
|
|
4
|
+
const f = (e, t = "") => {
|
|
5
|
+
switch (e.type) {
|
|
6
|
+
case "singular":
|
|
7
|
+
return e.uiSchema;
|
|
8
|
+
case "model":
|
|
9
|
+
const { properties: s } = e, c = {};
|
|
10
|
+
return Object.keys(s).forEach((i) => {
|
|
11
|
+
const r = s[i];
|
|
12
|
+
if (u(["slot", "styles"], r.type))
|
|
13
|
+
return;
|
|
14
|
+
const o = n(r, "i18n", !1) ? `${i}-${t}` : i;
|
|
15
|
+
c[o] = f(r, t);
|
|
16
|
+
}), c;
|
|
17
|
+
case "list":
|
|
18
|
+
const { itemProperties: a } = e, l = {
|
|
19
|
+
items: {}
|
|
20
|
+
};
|
|
21
|
+
return Object.keys(a).forEach((i) => {
|
|
22
|
+
const r = a[i];
|
|
23
|
+
if (u(["slot", "styles"], r.type))
|
|
24
|
+
return;
|
|
25
|
+
const o = n(r, "i18n", !1) ? `${i}-${t}` : i;
|
|
26
|
+
l.items[o] = f(r, t);
|
|
27
|
+
}), l;
|
|
28
|
+
default:
|
|
29
|
+
return {};
|
|
30
|
+
}
|
|
31
|
+
}, d = (e, t = "") => {
|
|
32
|
+
switch (e.type) {
|
|
33
|
+
case "singular":
|
|
34
|
+
return e.schema;
|
|
35
|
+
case "model":
|
|
36
|
+
const { properties: s, title: c } = e, a = {
|
|
37
|
+
title: c,
|
|
38
|
+
type: "object",
|
|
39
|
+
properties: {}
|
|
40
|
+
};
|
|
41
|
+
return Object.keys(s).forEach((o) => {
|
|
42
|
+
const p = s[o];
|
|
43
|
+
if (u(["slot", "styles"], p.type))
|
|
44
|
+
return;
|
|
45
|
+
const m = n(p, "i18n", !1) ? `${o}-${t}` : o;
|
|
46
|
+
a.properties[m] = d(p, t);
|
|
47
|
+
}), a;
|
|
48
|
+
case "list":
|
|
49
|
+
const { itemProperties: l, title: i } = e, r = {
|
|
50
|
+
title: i,
|
|
51
|
+
type: "array",
|
|
52
|
+
items: {
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
return Object.keys(l).forEach((o) => {
|
|
58
|
+
const p = l[o];
|
|
59
|
+
if (u(["slot", "styles"], p.type))
|
|
60
|
+
return;
|
|
61
|
+
const m = n(p, "i18n", !1) ? `${o}-${t}` : o;
|
|
62
|
+
r.items.properties[m] = d(p, t), E(r.items, "title", n(p, "itemTitle", `${i} item`));
|
|
63
|
+
}), r;
|
|
64
|
+
default:
|
|
65
|
+
return {};
|
|
66
|
+
}
|
|
67
|
+
}, g = (e) => {
|
|
68
|
+
const t = {};
|
|
69
|
+
return Object.keys(e).forEach((s) => {
|
|
70
|
+
t[s] = S(e[s]);
|
|
71
|
+
}), t;
|
|
72
|
+
}, K = (e) => {
|
|
73
|
+
if (h(e.default))
|
|
74
|
+
return [];
|
|
75
|
+
const { itemProperties: t } = e;
|
|
76
|
+
return P(e.default, (s) => {
|
|
77
|
+
const c = { ...s };
|
|
78
|
+
return $(s, (a, l) => {
|
|
79
|
+
b(t, l) && n(t[l], "i18n", !1) && (c[l] = y);
|
|
80
|
+
}), c;
|
|
81
|
+
});
|
|
82
|
+
}, S = (e) => {
|
|
83
|
+
switch (e.type) {
|
|
84
|
+
case "styles":
|
|
85
|
+
return e.default;
|
|
86
|
+
case "slot":
|
|
87
|
+
return `${j}${O()}`;
|
|
88
|
+
case "singular":
|
|
89
|
+
const { i18n: t, schema: s } = e;
|
|
90
|
+
return t ? y : n(s, "default", "");
|
|
91
|
+
case "model":
|
|
92
|
+
return g(e.properties);
|
|
93
|
+
case "list":
|
|
94
|
+
return K(e);
|
|
95
|
+
default:
|
|
96
|
+
return "";
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
export {
|
|
100
|
+
f as a,
|
|
101
|
+
g as b,
|
|
102
|
+
d as g
|
|
103
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("lodash"),n=i=>({type:"singular",default:i.default||"",binding:e.get(i,"binding",!0),i18n:i.i18n||!1,dataType:"string",required:i.required||!1,schema:{type:"string",...e.omit(i,["i18n","required"])},uiSchema:{"ui:placeholder":i.placeholder||"Enter here"}}),r=i=>({type:"singular",default:i.default||"",binding:e.get(i,"binding",!0),dataType:"string",i18n:i.i18n||!1,required:i.required||!1,schema:{type:"string",...e.omit(i,["i18n","required","rows"])},uiSchema:{"ui:widget":"textarea","ui:placeholder":i.placeholder||"Enter here","ui:options":{rows:i.rows||4}}}),d=i=>({type:"singular",i18n:i.i18n||!1,default:i.default||!1,dataType:"boolean",binding:e.get(i,"binding",!0),schema:{type:"boolean",...e.omit(i,["i18n","required"])},uiSchema:{"ui:title":i.title||"Select Item","ui:description":""}}),a=i=>({type:"singular",default:i.default||"",binding:e.get(i,"binding",!0),dataType:"number",i18n:i.i18n||!1,required:i.required||!1,schema:{type:"number",...e.omit(i,["i18n","required"])},uiSchema:{}}),u=i=>({type:"singular",default:i.default||"",binding:e.get(i,"binding",!0),i18n:i.i18n||!1,required:i.required||!1,dataType:"string",schema:{type:"string",...e.omit(i,["i18n","required","options","binding"]),oneOf:i.options.map(t=>({const:t.value,title:t.title}))},uiSchema:{"ui:widget":"select"}}),g=i=>({type:"singular",i18n:i.i18n||!1,default:i.default||"",binding:e.get(i,"binding",!0),dataType:"string",schema:{type:"string",...e.omit(i,["i18n","required"])},uiSchema:{"ui:widget":"color"}}),l=i=>({type:"model",title:i.title,dataType:"object",default:i.default||{},binding:e.get(i,"binding",!0),properties:i.properties}),s=i=>({type:"singular",default:i.default||"",binding:e.get(i,"binding",!0),dataType:"string",i18n:i.i18n||!1,schema:{type:"string",...e.omit(i,["i18n","required"])},uiSchema:{"ui:widget":"image"}});exports.b=l;exports.c=a;exports.f=u;exports.g=r;exports.o=s;exports.r=d;exports.u=n;exports.y=g;
|