@isardsat/editorial-admin 6.0.0-canary-002 → 6.0.1

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.
@@ -0,0 +1,66 @@
1
+ import{w as ce}from"./index-G-cqIhgh.js";import{l as e,r as d,q as N,N as ue,p as he,t as pe,v as xe,O as fe}from"./chunk-KNED5TY2-CXj9yqcQ.js";import{c as K,u as W,a as be,b as ge,d as me,f as je}from"./editorialApi-DCnC5eM9.js";import{u as ve,d as E,e as we}from"./authSlice-KDhecIDl.js";import{R as Q,C as X,a as Z,T as Y,D as J,P as ee,O as te,b as ye,c as Ne,d as Ce,e as _e,f as Se,A as ke,u as Me}from"./index-C-iH5ItK.js";import{c as r}from"./utils-DslUJpbf.js";import{c as x}from"./createLucideIcon-TQsNVzYU.js";import{B as O,S as R,c as Ee,u as Oe}from"./button-O0EDocjF.js";import{P as k,u as Re,c as Ae,a as ze,b as De,d as Pe}from"./index-B_FOxFgA.js";import{C as L}from"./chevron-down-BMtosYlL.js";import"./tslib.es6-CDuPK5Eb.js";import"./index-B7e3fQ32.js";/**
2
+ * @license lucide-react v0.487.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const Ie=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Te=x("arrow-down",Ie);/**
7
+ * @license lucide-react v0.487.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const Le=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],$e=x("arrow-up",Le);/**
12
+ * @license lucide-react v0.487.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const Be=[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]],He=x("blocks",Be);/**
17
+ * @license lucide-react v0.487.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const Ge=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],qe=x("chevron-right",Ge);/**
22
+ * @license lucide-react v0.487.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const Fe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ve=x("external-link",Fe);/**
27
+ * @license lucide-react v0.487.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const Ue=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],Ke=x("files",Ue);/**
32
+ * @license lucide-react v0.487.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const We=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Qe=x("grid-3x3",We);/**
37
+ * @license lucide-react v0.487.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const Xe=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],Ze=x("heart",Xe);/**
42
+ * @license lucide-react v0.487.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const Ye=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],Je=x("log-out",Ye);/**
47
+ * @license lucide-react v0.487.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const et=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],tt=x("panel-left",et);/**
52
+ * @license lucide-react v0.487.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const at=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],st=x("square",at);/**
57
+ * @license lucide-react v0.487.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const nt=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],ot=x("upload",nt);/**
62
+ * @license lucide-react v0.487.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const it=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ae=x("x",it);function rt({...t}){return e.jsx(Q,{"data-slot":"dialog",...t})}function dt({...t}){return e.jsx(ee,{"data-slot":"dialog-portal",...t})}function lt({className:t,...a}){return e.jsx(te,{"data-slot":"dialog-overlay",className:r("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function ct({className:t,children:a,...n}){return e.jsxs(dt,{"data-slot":"dialog-portal",children:[e.jsx(lt,{}),e.jsxs(X,{"data-slot":"dialog-content",className:r("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...n,children:[a,e.jsxs(Z,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[e.jsx(ae,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ut({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-header",className:r("flex flex-col gap-2 text-center sm:text-left",t),...a})}function ht({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-footer",className:r("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function pt({className:t,...a}){return e.jsx(Y,{"data-slot":"dialog-title",className:r("text-lg leading-none font-semibold",t),...a})}function xt({className:t,...a}){return e.jsx(J,{"data-slot":"dialog-description",className:r("text-muted-foreground text-sm",t),...a})}const ft="#181717",bt=d.forwardRef(function({title:a="GitHub",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=ft),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})}),gt="#85EA2D",mt=d.forwardRef(function({title:a="Swagger",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=gt),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"})]})});function jt({isOpen:t,setOpen:a}){return e.jsx(rt,{open:t,onOpenChange:n=>a(n),children:e.jsxs(ct,{children:[e.jsxs(ut,{children:[e.jsx(pt,{children:"Editorial"}),e.jsx(xt,{children:"A simple CMS for static websites"})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(O,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:new URL("/doc",K.EDITORIAL_API_URL).href,children:[e.jsx(mt,{size:14}),"Swagger API UI"]})}),e.jsx(O,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://github.com/Lobelia-Earth/editorial",children:[e.jsx(bt,{size:14}),"GitHub repository"]})})]}),e.jsx(ht,{children:e.jsxs("p",{className:"flex items-center gap-1",children:["Created with",e.jsx(Ze,{size:14,className:"stroke-red-500 fill-red-500"})," by"," ",e.jsx(N,{to:"https://lobelia.earth",className:"underline hover:text-blue-500",children:"Lobelia.earth"})]})})]})})}var vt="Separator",$="horizontal",wt=["horizontal","vertical"],se=d.forwardRef((t,a)=>{const{decorative:n,orientation:s=$,...o}=t,i=yt(s)?s:$,u=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return e.jsx(k.div,{"data-orientation":i,...u,...o,ref:a})});se.displayName=vt;function yt(t){return wt.includes(t)}var Nt=se;function Ct({className:t,orientation:a="horizontal",decorative:n=!0,...s}){return e.jsx(Nt,{"data-slot":"separator-root",decorative:n,orientation:a,className:r("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...s})}function _t({...t}){return e.jsx(Q,{"data-slot":"sheet",...t})}function St({...t}){return e.jsx(ee,{"data-slot":"sheet-portal",...t})}function kt({className:t,...a}){return e.jsx(te,{"data-slot":"sheet-overlay",className:r("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function Mt({className:t,children:a,side:n="right",...s}){return e.jsxs(St,{children:[e.jsx(kt,{}),e.jsxs(X,{"data-slot":"sheet-content",className:r("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...s,children:[a,e.jsxs(Z,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(ae,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Et({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:r("flex flex-col gap-1.5 p-4",t),...a})}function Ot({className:t,...a}){return e.jsx(Y,{"data-slot":"sheet-title",className:r("text-foreground font-semibold",t),...a})}function Rt({className:t,...a}){return e.jsx(J,{"data-slot":"sheet-description",className:r("text-muted-foreground text-sm",t),...a})}function ne({delayDuration:t=0,...a}){return e.jsx(ye,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function At({...t}){return e.jsx(ne,{children:e.jsx(Ne,{"data-slot":"tooltip",...t})})}function zt({...t}){return e.jsx(Ce,{"data-slot":"tooltip-trigger",...t})}function Dt({className:t,sideOffset:a=0,children:n,...s}){return e.jsx(_e,{children:e.jsxs(Se,{"data-slot":"tooltip-content",sideOffset:a,className:r("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...s,children:[n,e.jsx(ke,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const M=768;function Pt(){const[t,a]=d.useState(void 0);return d.useEffect(()=>{const n=window.matchMedia(`(max-width: ${M-1}px)`),s=()=>{a(window.innerWidth<M)};return n.addEventListener("change",s),a(window.innerWidth<M),()=>n.removeEventListener("change",s)},[]),!!t}const It="sidebar_state",Tt=60*60*24*7,Lt="16rem",$t="18rem",Bt="3rem",Ht="b",oe=d.createContext(null);function A(){const t=d.useContext(oe);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Gt({defaultOpen:t=!0,open:a,onOpenChange:n,className:s,style:o,children:i,...c}){const u=Pt(),[f,p]=d.useState(!1),[g,C]=d.useState(t),m=a??g,j=d.useCallback(h=>{const l=typeof h=="function"?h(m):h;n?n(l):C(l),document.cookie=`${It}=${l}; path=/; max-age=${Tt}`},[n,m]),v=d.useCallback(()=>u?p(h=>!h):j(h=>!h),[u,j,p]);d.useEffect(()=>{const h=l=>{l.key===Ht&&(l.metaKey||l.ctrlKey)&&(l.preventDefault(),v())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[v]);const y=m?"expanded":"collapsed",_=d.useMemo(()=>({state:y,open:m,setOpen:j,isMobile:u,openMobile:f,setOpenMobile:p,toggleSidebar:v}),[y,m,j,u,f,p,v]);return e.jsx(oe.Provider,{value:_,children:e.jsx(ne,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Lt,"--sidebar-width-icon":Bt,...o},className:r("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...c,children:i})})})}function qt({side:t="left",variant:a="sidebar",collapsible:n="offcanvas",className:s,children:o,...i}){const{isMobile:c,state:u,openMobile:f,setOpenMobile:p}=A();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:r("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...i,children:o}):c?e.jsx(_t,{open:f,onOpenChange:p,...i,children:e.jsxs(Mt,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":$t},side:t,children:[e.jsxs(Et,{className:"sr-only",children:[e.jsx(Ot,{children:"Sidebar"}),e.jsx(Rt,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):e.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":u,"data-collapsible":u==="collapsed"?n:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:r("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container",className:r("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...i,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function Ft({className:t,onClick:a,...n}){const{toggleSidebar:s}=A();return e.jsxs(O,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:r("size-7",t),onClick:o=>{a==null||a(o),s()},...n,children:[e.jsx(tt,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Vt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r("flex flex-col gap-2 p-2",t),...a})}function Ut({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r("flex flex-col gap-2 p-2",t),...a})}function Kt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...a})}function S({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r("relative flex w-full min-w-0 flex-col p-2",t),...a})}function B({className:t,asChild:a=!1,...n}){const s=a?R:"div";return e.jsx(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:r("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...n})}function H({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r("w-full text-sm",t),...a})}function G({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r("flex w-full min-w-0 flex-col gap-1",t),...a})}function w({className:t,...a}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r("group/menu-item relative",t),...a})}const Wt=Ee("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function b({asChild:t=!1,isActive:a=!1,variant:n="default",size:s="default",tooltip:o,className:i,...c}){const u=t?R:"button",{isMobile:f,state:p}=A(),g=e.jsx(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":a,className:r(Wt({variant:n,size:s}),i),...c});return o?(typeof o=="string"&&(o={children:o}),e.jsxs(At,{children:[e.jsx(zt,{asChild:!0,children:g}),e.jsx(Dt,{side:"right",align:"center",hidden:p!=="collapsed"||f,...o})]})):g}function Qt({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:r("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...a})}function Xt({asChild:t=!1,size:a="md",isActive:n=!1,className:s,...o}){const i=t?R:"a";return e.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":n,className:r("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...o})}function q({singleton:t}){const{data:a}=W(),{data:n}=be();return a?e.jsx(e.Fragment,{children:Object.entries(a).filter(([,s])=>t?s.singleton:!s.singleton).map(([s,o])=>e.jsx(Qt,{children:e.jsx(ue,{to:t?`/admin/dashboard/${s}/default`:`/admin/dashboard/${s}`,className:({isActive:i,isPending:c})=>c?"pending":i?"active":"",children:({isActive:i})=>e.jsxs(Xt,{isActive:i,children:[e.jsx("span",{className:"inline-block overflow-hidden whitespace-nowrap text-ellipsis text-nowrap w-full",children:o.displayName}),!t&&n&&e.jsx("span",{className:"text-xs text-gray-500 ml-auto pr-1",children:Object.keys(n[s]).length})]})})},o.displayName))}):null}var z="Collapsible",[Zt,ba]=Ae(z),[Yt,D]=Zt(z),ie=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,open:s,defaultOpen:o,disabled:i,onOpenChange:c,...u}=t,[f=!1,p]=Re({prop:s,defaultProp:o,onChange:c});return e.jsx(Yt,{scope:n,disabled:i,contentId:Me(),open:f,onOpenToggle:d.useCallback(()=>p(g=>!g),[p]),children:e.jsx(k.div,{"data-state":I(f),"data-disabled":i?"":void 0,...u,ref:a})})});ie.displayName=z;var re="CollapsibleTrigger",de=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,...s}=t,o=D(re,n);return e.jsx(k.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":I(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...s,ref:a,onClick:ze(t.onClick,o.onOpenToggle)})});de.displayName=re;var P="CollapsibleContent",le=d.forwardRef((t,a)=>{const{forceMount:n,...s}=t,o=D(P,t.__scopeCollapsible);return e.jsx(De,{present:n||o.open,children:({present:i})=>e.jsx(Jt,{...s,ref:a,present:i})})});le.displayName=P;var Jt=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,present:s,children:o,...i}=t,c=D(P,n),[u,f]=d.useState(s),p=d.useRef(null),g=Oe(a,p),C=d.useRef(0),m=C.current,j=d.useRef(0),v=j.current,y=c.open||u,_=d.useRef(y),h=d.useRef(void 0);return d.useEffect(()=>{const l=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(l)},[]),Pe(()=>{const l=p.current;if(l){h.current=h.current||{transitionDuration:l.style.transitionDuration,animationName:l.style.animationName},l.style.transitionDuration="0s",l.style.animationName="none";const T=l.getBoundingClientRect();C.current=T.height,j.current=T.width,_.current||(l.style.transitionDuration=h.current.transitionDuration,l.style.animationName=h.current.animationName),f(s)}},[c.open,s]),e.jsx(k.div,{"data-state":I(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!y,...i,ref:g,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:y&&o})});function I(t){return t?"open":"closed"}var ea=ie;function F({...t}){return e.jsx(ea,{"data-slot":"collapsible",...t})}function V({...t}){return e.jsx(de,{"data-slot":"collapsible-trigger",...t})}function U({...t}){return e.jsx(le,{"data-slot":"collapsible-content",...t})}function ta(){const t=ve(),[a,n]=d.useState(!1),[s]=ge(),[o]=me(),[i]=je(),c=E(u=>u.auth.role);return e.jsxs(qt,{className:"z-50",children:[e.jsx(jt,{isOpen:a,setOpen:n}),e.jsx(Vt,{className:"h-14 justify-center",children:e.jsx(S,{children:e.jsx(N,{to:"/admin/dashboard",className:"text-3xl font-semibold tracking-tight transition-colors",children:"WEkEO"})})}),e.jsxs(Kt,{children:[e.jsxs(S,{children:[e.jsx(B,{children:"Content"}),e.jsx(H,{children:e.jsxs(G,{children:[e.jsx(F,{className:"group/collapsible",children:e.jsxs(w,{children:[e.jsx(V,{asChild:!0,children:e.jsxs(b,{className:"group",children:[e.jsx(Qe,{}),e.jsx("span",{children:"Collections"}),e.jsx(L,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(U,{children:e.jsx(q,{})})]})}),e.jsx(F,{className:"group/collapsible",children:e.jsxs(w,{children:[e.jsx(V,{asChild:!0,children:e.jsxs(b,{className:"group",children:[e.jsx(st,{}),e.jsx("span",{children:"Singles"}),e.jsx(L,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(U,{children:e.jsx(q,{singleton:!0})})]})}),e.jsx(w,{children:e.jsx(b,{asChild:!0,children:e.jsxs(N,{to:"/admin/dashboard/files",children:[e.jsx(Ke,{}),e.jsx("span",{children:"Files"})]})})}),e.jsx(w,{children:e.jsxs(b,{disabled:!0,children:[e.jsx(He,{}),e.jsx("span",{children:"Components"})]})})]})})]}),e.jsxs(S,{children:[e.jsx(B,{children:"Actions"}),e.jsx(H,{children:e.jsxs(G,{children:[c==="developer"&&e.jsxs(e.Fragment,{children:[e.jsx(w,{children:e.jsxs(b,{onClick:()=>o(),children:[e.jsx(Te,{}),e.jsx("span",{children:"Pull from repo"})]})}),e.jsx(w,{children:e.jsxs(b,{onClick:()=>i(),children:[e.jsx($e,{}),e.jsx("span",{children:"Push to repo"})]})})]}),e.jsx(w,{children:e.jsxs(b,{onClick:()=>s(),children:[e.jsx(ot,{}),e.jsx("span",{children:"Publish"})]})})]})})]}),e.jsx(S,{})]}),e.jsxs(Ut,{children:[e.jsx(b,{asChild:!0,children:e.jsxs(N,{to:K.PREVIEW_URL,children:["Preview",e.jsx(Ve,{className:"ml-auto"})]})}),e.jsx(b,{onClick:()=>n(!0),children:"About"}),e.jsxs(b,{onClick:()=>t(we()),children:[e.jsx(Je,{}),"Log out"]})]})]})}function aa({children:t}){const a=he(),n=E(o=>o.auth.user),s=E(o=>o.auth.isLoading);return d.useEffect(()=>{!s&&!n&&a("/")},[s,a,n]),s||!n?null:t}function sa(){const{pathname:t}=pe(),{data:a}=W(),n=t.split("/").filter(s=>!["admin","dashboard"].includes(s)&&s!=="");return a?e.jsx(e.Fragment,{children:n.map((s,o,i)=>e.jsxs(xe.Fragment,{children:[i.length>1&&o>=1&&e.jsx(qe,{size:12,className:"text-gray-500 pt-[1px]"}),e.jsx("p",{className:"text-sm leading-none tracking-tight capitalize text-gray-500 last:text-foreground",children:a[s]?a[s].displayName:s},s)]},o))}):null}const ga=ce(function(){return e.jsx(aa,{children:e.jsxs(Gt,{className:"flex h-full",children:[e.jsx(ta,{}),e.jsxs("main",{className:"flex flex-col flex-1 h-full w-0",children:[e.jsx("header",{className:"flex sticky bg-sidebar dark:bg-sidebar z-40 top-0 h-14 shrink-0 items-center gap-2 border-b",children:e.jsxs("div",{className:"flex items-center gap-2 px-3",children:[e.jsx(Ft,{}),e.jsx(Ct,{orientation:"vertical",className:"h-4"}),e.jsx(sa,{})]})}),e.jsx(fe,{})]})]})})});export{ga as default};
@@ -1 +1 @@
1
- window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-B5Ca3clj.js","imports":["/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/index-B7e3fQ32.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-DHDQPxhg.js","imports":["/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/index-B7e3fQ32.js","/assets/index-G-cqIhgh.js","/assets/authSlice-KDhecIDl.js","/assets/editorialApi-DCnC5eM9.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/root-DS7N36v7.css"]},"routes/home":{"id":"routes/home","parentId":"root","path":"/admin","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/home-wnsWYgD_.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/button-O0EDocjF.js","/assets/input-BH49oaMa.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-TQsNVzYU.js","/assets/authSlice-KDhecIDl.js","/assets/index-B_FOxFgA.js","/assets/index-B7e3fQ32.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":[]},"routes/dashboard._layout":{"id":"routes/dashboard._layout","parentId":"root","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._layout-DYXkFYBf.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/editorialApi-DCnC5eM9.js","/assets/authSlice-KDhecIDl.js","/assets/index-C-iH5ItK.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-TQsNVzYU.js","/assets/button-O0EDocjF.js","/assets/index-B_FOxFgA.js","/assets/chevron-down-BMtosYlL.js","/assets/tslib.es6-CDuPK5Eb.js","/assets/index-B7e3fQ32.js"],"css":[]},"routes/dashboard":{"id":"routes/dashboard","parentId":"routes/dashboard._layout","path":"/admin/dashboard","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard-Binq3-uL.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/utils-DslUJpbf.js","/assets/editorialApi-DCnC5eM9.js","/assets/index-DrhM6FV9.js"],"css":[]},"routes/dashboard.$collection.new":{"id":"routes/dashboard.$collection.new","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/new","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection.new-QbdwRouF.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/itemForm-dtoqbEoC.js","/assets/editorialApi-DCnC5eM9.js","/assets/button-O0EDocjF.js","/assets/utils-DslUJpbf.js","/assets/input-BH49oaMa.js","/assets/index-B_FOxFgA.js","/assets/index-B7e3fQ32.js","/assets/createLucideIcon-TQsNVzYU.js","/assets/index-C-iH5ItK.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/itemForm-CDbHkFXh.css"]},"routes/dashboard.$collection":{"id":"routes/dashboard.$collection","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection-DCypgAsP.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/button-O0EDocjF.js","/assets/editorialApi-DCnC5eM9.js","/assets/index-DrhM6FV9.js","/assets/utils-DslUJpbf.js","/assets/trash-B3lfbu-5.js","/assets/createLucideIcon-TQsNVzYU.js"],"css":[]},"routes/dashboard.$collection.$document":{"id":"routes/dashboard.$collection.$document","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/:documentId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection._document-B9dEIw39.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/itemForm-dtoqbEoC.js","/assets/editorialApi-DCnC5eM9.js","/assets/button-O0EDocjF.js","/assets/utils-DslUJpbf.js","/assets/input-BH49oaMa.js","/assets/index-B_FOxFgA.js","/assets/index-B7e3fQ32.js","/assets/createLucideIcon-TQsNVzYU.js","/assets/index-C-iH5ItK.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/itemForm-CDbHkFXh.css"]},"routes/dashboard.files":{"id":"routes/dashboard.files","parentId":"routes/dashboard._layout","path":"/admin/dashboard/files","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard.files-DVCxRHOl.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/editorialApi-DCnC5eM9.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-TQsNVzYU.js","/assets/chevron-down-BMtosYlL.js","/assets/trash-B3lfbu-5.js"],"css":[]}},"url":"/assets/manifest-a0c3ecb0.js","version":"a0c3ecb0"};
1
+ window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-B5Ca3clj.js","imports":["/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/index-B7e3fQ32.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-DHDQPxhg.js","imports":["/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/index-B7e3fQ32.js","/assets/index-G-cqIhgh.js","/assets/authSlice-KDhecIDl.js","/assets/editorialApi-DCnC5eM9.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/root-DS7N36v7.css"]},"routes/home":{"id":"routes/home","parentId":"root","path":"/admin","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/home-wnsWYgD_.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/button-O0EDocjF.js","/assets/input-BH49oaMa.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-TQsNVzYU.js","/assets/authSlice-KDhecIDl.js","/assets/index-B_FOxFgA.js","/assets/index-B7e3fQ32.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":[]},"routes/dashboard._layout":{"id":"routes/dashboard._layout","parentId":"root","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._layout-BdJ3SrSw.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/editorialApi-DCnC5eM9.js","/assets/authSlice-KDhecIDl.js","/assets/index-C-iH5ItK.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-TQsNVzYU.js","/assets/button-O0EDocjF.js","/assets/index-B_FOxFgA.js","/assets/chevron-down-BMtosYlL.js","/assets/tslib.es6-CDuPK5Eb.js","/assets/index-B7e3fQ32.js"],"css":[]},"routes/dashboard":{"id":"routes/dashboard","parentId":"routes/dashboard._layout","path":"/admin/dashboard","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard-Binq3-uL.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/utils-DslUJpbf.js","/assets/editorialApi-DCnC5eM9.js","/assets/index-DrhM6FV9.js"],"css":[]},"routes/dashboard.$collection.new":{"id":"routes/dashboard.$collection.new","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/new","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection.new-QbdwRouF.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/itemForm-dtoqbEoC.js","/assets/editorialApi-DCnC5eM9.js","/assets/button-O0EDocjF.js","/assets/utils-DslUJpbf.js","/assets/input-BH49oaMa.js","/assets/index-B_FOxFgA.js","/assets/index-B7e3fQ32.js","/assets/createLucideIcon-TQsNVzYU.js","/assets/index-C-iH5ItK.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/itemForm-CDbHkFXh.css"]},"routes/dashboard.$collection":{"id":"routes/dashboard.$collection","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection-DCypgAsP.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/button-O0EDocjF.js","/assets/editorialApi-DCnC5eM9.js","/assets/index-DrhM6FV9.js","/assets/utils-DslUJpbf.js","/assets/trash-B3lfbu-5.js","/assets/createLucideIcon-TQsNVzYU.js"],"css":[]},"routes/dashboard.$collection.$document":{"id":"routes/dashboard.$collection.$document","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/:documentId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection._document-B9dEIw39.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/itemForm-dtoqbEoC.js","/assets/editorialApi-DCnC5eM9.js","/assets/button-O0EDocjF.js","/assets/utils-DslUJpbf.js","/assets/input-BH49oaMa.js","/assets/index-B_FOxFgA.js","/assets/index-B7e3fQ32.js","/assets/createLucideIcon-TQsNVzYU.js","/assets/index-C-iH5ItK.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/itemForm-CDbHkFXh.css"]},"routes/dashboard.files":{"id":"routes/dashboard.files","parentId":"routes/dashboard._layout","path":"/admin/dashboard/files","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard.files-DVCxRHOl.js","imports":["/assets/index-G-cqIhgh.js","/assets/chunk-KNED5TY2-CXj9yqcQ.js","/assets/editorialApi-DCnC5eM9.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-TQsNVzYU.js","/assets/chevron-down-BMtosYlL.js","/assets/trash-B3lfbu-5.js"],"css":[]}},"url":"/assets/manifest-a309df9e.js","version":"a309df9e"};
@@ -1,11 +1,11 @@
1
- <!DOCTYPE html><html lang="en" class="min-h-screen"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Editorial Admin</title><link rel="modulepreload" href="/assets/manifest-a0c3ecb0.js"/><link rel="modulepreload" href="/assets/entry.client-B5Ca3clj.js"/><link rel="modulepreload" href="/assets/chunk-KNED5TY2-CXj9yqcQ.js"/><link rel="modulepreload" href="/assets/index-B7e3fQ32.js"/><link rel="modulepreload" href="/assets/root-DHDQPxhg.js"/><link rel="modulepreload" href="/assets/index-G-cqIhgh.js"/><link rel="modulepreload" href="/assets/authSlice-KDhecIDl.js"/><link rel="modulepreload" href="/assets/editorialApi-DCnC5eM9.js"/><link rel="modulepreload" href="/assets/tslib.es6-CDuPK5Eb.js"/><link rel="stylesheet" href="/assets/root-DS7N36v7.css"/></head><body class="h-full min-h-screen bg-background font-sans antialiased"><script>
1
+ <!DOCTYPE html><html lang="en" class="min-h-screen"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Editorial Admin</title><link rel="modulepreload" href="/assets/manifest-a309df9e.js"/><link rel="modulepreload" href="/assets/entry.client-B5Ca3clj.js"/><link rel="modulepreload" href="/assets/chunk-KNED5TY2-CXj9yqcQ.js"/><link rel="modulepreload" href="/assets/index-B7e3fQ32.js"/><link rel="modulepreload" href="/assets/root-DHDQPxhg.js"/><link rel="modulepreload" href="/assets/index-G-cqIhgh.js"/><link rel="modulepreload" href="/assets/authSlice-KDhecIDl.js"/><link rel="modulepreload" href="/assets/editorialApi-DCnC5eM9.js"/><link rel="modulepreload" href="/assets/tslib.es6-CDuPK5Eb.js"/><link rel="stylesheet" href="/assets/root-DS7N36v7.css"/></head><body class="h-full min-h-screen bg-background font-sans antialiased"><script>
2
2
  console.log(
3
3
  "💿 Hey developer 👋. You can provide a way better UX than this " +
4
4
  "when your app is loading JS modules and/or running `clientLoader` " +
5
5
  "functions. Check out https://remix.run/route/hydrate-fallback " +
6
6
  "for more information."
7
7
  );
8
- </script><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_middleware":false,"unstable_optimizeDeps":false,"unstable_splitRouteModules":false,"unstable_subResourceIntegrity":false,"unstable_viteEnvironmentApi":false},"ssr":false,"isSpaMode":true};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());</script><script type="module" async="">import "/assets/manifest-a0c3ecb0.js";
8
+ </script><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_middleware":false,"unstable_optimizeDeps":false,"unstable_splitRouteModules":false,"unstable_subResourceIntegrity":false,"unstable_viteEnvironmentApi":false},"ssr":false,"isSpaMode":true};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());</script><script type="module" async="">import "/assets/manifest-a309df9e.js";
9
9
  import * as route0 from "/assets/root-DHDQPxhg.js";
10
10
 
11
11
  window.__reactRouterRouteModules = {"root":route0};
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@isardsat/editorial-admin",
3
- "version": "6.0.0-canary-002",
3
+ "version": "6.0.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
7
7
  "import": "./build/client/index.js",
8
8
  "require": "./build/client/index.js"
9
9
  },
10
- "./index.html": "./build/client/index.html"
10
+ "./index.html": "./build/client/index.html",
11
+ "./package.json": "./package.json"
11
12
  },
12
13
  "files": [
13
14
  "build"
@@ -42,10 +43,12 @@
42
43
  "@radix-ui/react-toggle": "^1.1.3",
43
44
  "@radix-ui/react-toggle-group": "^1.1.3",
44
45
  "@radix-ui/react-tooltip": "^1.2.0",
46
+ "@react-router/dev": "^7.5.0",
45
47
  "@react-router/node": "^7.5.0",
46
48
  "@react-router/serve": "^7.5.0",
47
49
  "@reduxjs/toolkit": "^2.5.1",
48
50
  "@tailwindcss/typography": "^0.5.16",
51
+ "@tailwindcss/vite": "^4.1.3",
49
52
  "@tanstack/react-table": "^8.20.6",
50
53
  "babel-plugin-react-compiler": "19.0.0-beta-e993439-20250405",
51
54
  "class-variance-authority": "^0.7.1",
@@ -65,26 +68,24 @@
65
68
  "react-redux": "^9.2.0",
66
69
  "react-resizable-panels": "^2.1.7",
67
70
  "react-router": "^7.5.0",
71
+ "react-router-devtools": "^1.1.0",
68
72
  "react-router-dom": "^7.5.0",
69
73
  "recharts": "^2.15.2",
70
74
  "redux": "^5.0.1",
71
75
  "redux-persist": "^6.0.0",
72
76
  "sonner": "^2.0.3",
73
77
  "tailwind-merge": "^3.2.0",
78
+ "tailwindcss": "^4.1.3",
74
79
  "tailwindcss-animate": "^1.0.7",
75
80
  "vaul": "^1.1.2",
76
81
  "vite-plugin-babel": "^1.3.0",
77
82
  "zod": "^3.24.1",
78
- "@isardsat/editorial-common": "^6.0.0-canary-002"
83
+ "@isardsat/editorial-common": "^6.0.1"
79
84
  },
80
85
  "devDependencies": {
81
- "@react-router/dev": "^7.5.0",
82
- "@tailwindcss/vite": "^4.1.3",
83
86
  "@types/node": "^20",
84
87
  "@types/react": "^19.0.1",
85
88
  "@types/react-dom": "^19.0.1",
86
- "react-router-devtools": "^1.1.0",
87
- "tailwindcss": "^4.1.3",
88
89
  "typescript": "^5.7.2",
89
90
  "vite": "^5.4.11",
90
91
  "vite-tsconfig-paths": "^5.1.4"
@@ -1,66 +0,0 @@
1
- import{w as ue}from"./index-G-cqIhgh.js";import{l as e,r as d,q as N,N as he,t as K,p as pe,v as xe,O as fe}from"./chunk-KNED5TY2-CXj9yqcQ.js";import{c as W,u as Q,a as be,b as ge,d as me,f as je}from"./editorialApi-DCnC5eM9.js";import{u as ve,d as E,e as we}from"./authSlice-KDhecIDl.js";import{R as X,C as Z,a as Y,T as J,D as ee,P as te,O as ae,b as ye,c as Ne,d as Ce,e as _e,f as Se,A as ke,u as Me}from"./index-C-iH5ItK.js";import{c as r}from"./utils-DslUJpbf.js";import{c as f}from"./createLucideIcon-TQsNVzYU.js";import{B as O,S as R,c as Ee,u as Oe}from"./button-O0EDocjF.js";import{P as k,u as Re,c as Ae,a as ze,b as De,d as Pe}from"./index-B_FOxFgA.js";import{C as L}from"./chevron-down-BMtosYlL.js";import"./tslib.es6-CDuPK5Eb.js";import"./index-B7e3fQ32.js";/**
2
- * @license lucide-react v0.487.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const Ie=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Te=f("arrow-down",Ie);/**
7
- * @license lucide-react v0.487.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const Le=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],$e=f("arrow-up",Le);/**
12
- * @license lucide-react v0.487.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const Be=[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]],He=f("blocks",Be);/**
17
- * @license lucide-react v0.487.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const Ge=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],qe=f("chevron-right",Ge);/**
22
- * @license lucide-react v0.487.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const Fe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ve=f("external-link",Fe);/**
27
- * @license lucide-react v0.487.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */const Ue=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],Ke=f("files",Ue);/**
32
- * @license lucide-react v0.487.0 - ISC
33
- *
34
- * This source code is licensed under the ISC license.
35
- * See the LICENSE file in the root directory of this source tree.
36
- */const We=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Qe=f("grid-3x3",We);/**
37
- * @license lucide-react v0.487.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */const Xe=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],Ze=f("heart",Xe);/**
42
- * @license lucide-react v0.487.0 - ISC
43
- *
44
- * This source code is licensed under the ISC license.
45
- * See the LICENSE file in the root directory of this source tree.
46
- */const Ye=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],Je=f("log-out",Ye);/**
47
- * @license lucide-react v0.487.0 - ISC
48
- *
49
- * This source code is licensed under the ISC license.
50
- * See the LICENSE file in the root directory of this source tree.
51
- */const et=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],tt=f("panel-left",et);/**
52
- * @license lucide-react v0.487.0 - ISC
53
- *
54
- * This source code is licensed under the ISC license.
55
- * See the LICENSE file in the root directory of this source tree.
56
- */const at=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],st=f("square",at);/**
57
- * @license lucide-react v0.487.0 - ISC
58
- *
59
- * This source code is licensed under the ISC license.
60
- * See the LICENSE file in the root directory of this source tree.
61
- */const nt=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],ot=f("upload",nt);/**
62
- * @license lucide-react v0.487.0 - ISC
63
- *
64
- * This source code is licensed under the ISC license.
65
- * See the LICENSE file in the root directory of this source tree.
66
- */const it=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],se=f("x",it);function rt({...t}){return e.jsx(X,{"data-slot":"dialog",...t})}function dt({...t}){return e.jsx(te,{"data-slot":"dialog-portal",...t})}function lt({className:t,...a}){return e.jsx(ae,{"data-slot":"dialog-overlay",className:r("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function ct({className:t,children:a,...n}){return e.jsxs(dt,{"data-slot":"dialog-portal",children:[e.jsx(lt,{}),e.jsxs(Z,{"data-slot":"dialog-content",className:r("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...n,children:[a,e.jsxs(Y,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[e.jsx(se,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ut({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-header",className:r("flex flex-col gap-2 text-center sm:text-left",t),...a})}function ht({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-footer",className:r("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function pt({className:t,...a}){return e.jsx(J,{"data-slot":"dialog-title",className:r("text-lg leading-none font-semibold",t),...a})}function xt({className:t,...a}){return e.jsx(ee,{"data-slot":"dialog-description",className:r("text-muted-foreground text-sm",t),...a})}const ft="#181717",bt=d.forwardRef(function({title:a="GitHub",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=ft),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})}),gt="#85EA2D",mt=d.forwardRef(function({title:a="Swagger",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=gt),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"})]})});function jt({isOpen:t,setOpen:a}){return e.jsx(rt,{open:t,onOpenChange:n=>a(n),children:e.jsxs(ct,{children:[e.jsxs(ut,{children:[e.jsx(pt,{children:"Editorial"}),e.jsx(xt,{children:"A simple CMS for static websites"})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(O,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:new URL("/doc",W.EDITORIAL_API_URL).href,children:[e.jsx(mt,{size:14}),"Swagger API UI"]})}),e.jsx(O,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://github.com/Lobelia-Earth/editorial",children:[e.jsx(bt,{size:14}),"GitHub repository"]})})]}),e.jsx(ht,{children:e.jsxs("p",{className:"flex items-center gap-1",children:["Created with",e.jsx(Ze,{size:14,className:"stroke-red-500 fill-red-500"})," by"," ",e.jsx(N,{to:"https://lobelia.earth",className:"underline hover:text-blue-500",children:"Lobelia.earth"})]})})]})})}var vt="Separator",$="horizontal",wt=["horizontal","vertical"],ne=d.forwardRef((t,a)=>{const{decorative:n,orientation:s=$,...o}=t,i=yt(s)?s:$,u=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return e.jsx(k.div,{"data-orientation":i,...u,...o,ref:a})});ne.displayName=vt;function yt(t){return wt.includes(t)}var Nt=ne;function Ct({className:t,orientation:a="horizontal",decorative:n=!0,...s}){return e.jsx(Nt,{"data-slot":"separator-root",decorative:n,orientation:a,className:r("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...s})}function _t({...t}){return e.jsx(X,{"data-slot":"sheet",...t})}function St({...t}){return e.jsx(te,{"data-slot":"sheet-portal",...t})}function kt({className:t,...a}){return e.jsx(ae,{"data-slot":"sheet-overlay",className:r("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function Mt({className:t,children:a,side:n="right",...s}){return e.jsxs(St,{children:[e.jsx(kt,{}),e.jsxs(Z,{"data-slot":"sheet-content",className:r("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...s,children:[a,e.jsxs(Y,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(se,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Et({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:r("flex flex-col gap-1.5 p-4",t),...a})}function Ot({className:t,...a}){return e.jsx(J,{"data-slot":"sheet-title",className:r("text-foreground font-semibold",t),...a})}function Rt({className:t,...a}){return e.jsx(ee,{"data-slot":"sheet-description",className:r("text-muted-foreground text-sm",t),...a})}function oe({delayDuration:t=0,...a}){return e.jsx(ye,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function At({...t}){return e.jsx(oe,{children:e.jsx(Ne,{"data-slot":"tooltip",...t})})}function zt({...t}){return e.jsx(Ce,{"data-slot":"tooltip-trigger",...t})}function Dt({className:t,sideOffset:a=0,children:n,...s}){return e.jsx(_e,{children:e.jsxs(Se,{"data-slot":"tooltip-content",sideOffset:a,className:r("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...s,children:[n,e.jsx(ke,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const M=768;function Pt(){const[t,a]=d.useState(void 0);return d.useEffect(()=>{const n=window.matchMedia(`(max-width: ${M-1}px)`),s=()=>{a(window.innerWidth<M)};return n.addEventListener("change",s),a(window.innerWidth<M),()=>n.removeEventListener("change",s)},[]),!!t}const It="sidebar_state",Tt=60*60*24*7,Lt="16rem",$t="18rem",Bt="3rem",Ht="b",ie=d.createContext(null);function A(){const t=d.useContext(ie);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Gt({defaultOpen:t=!0,open:a,onOpenChange:n,className:s,style:o,children:i,...c}){const u=Pt(),[x,p]=d.useState(!1),[g,C]=d.useState(t),m=a??g,j=d.useCallback(h=>{const l=typeof h=="function"?h(m):h;n?n(l):C(l),document.cookie=`${It}=${l}; path=/; max-age=${Tt}`},[n,m]),v=d.useCallback(()=>u?p(h=>!h):j(h=>!h),[u,j,p]);d.useEffect(()=>{const h=l=>{l.key===Ht&&(l.metaKey||l.ctrlKey)&&(l.preventDefault(),v())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[v]);const y=m?"expanded":"collapsed",_=d.useMemo(()=>({state:y,open:m,setOpen:j,isMobile:u,openMobile:x,setOpenMobile:p,toggleSidebar:v}),[y,m,j,u,x,p,v]);return e.jsx(ie.Provider,{value:_,children:e.jsx(oe,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Lt,"--sidebar-width-icon":Bt,...o},className:r("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...c,children:i})})})}function qt({side:t="left",variant:a="sidebar",collapsible:n="offcanvas",className:s,children:o,...i}){const{isMobile:c,state:u,openMobile:x,setOpenMobile:p}=A();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:r("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...i,children:o}):c?e.jsx(_t,{open:x,onOpenChange:p,...i,children:e.jsxs(Mt,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":$t},side:t,children:[e.jsxs(Et,{className:"sr-only",children:[e.jsx(Ot,{children:"Sidebar"}),e.jsx(Rt,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):e.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":u,"data-collapsible":u==="collapsed"?n:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:r("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container",className:r("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...i,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function Ft({className:t,onClick:a,...n}){const{toggleSidebar:s}=A();return e.jsxs(O,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:r("size-7",t),onClick:o=>{a==null||a(o),s()},...n,children:[e.jsx(tt,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Vt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r("flex flex-col gap-2 p-2",t),...a})}function Ut({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r("flex flex-col gap-2 p-2",t),...a})}function Kt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...a})}function S({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r("relative flex w-full min-w-0 flex-col p-2",t),...a})}function B({className:t,asChild:a=!1,...n}){const s=a?R:"div";return e.jsx(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:r("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...n})}function H({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r("w-full text-sm",t),...a})}function G({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r("flex w-full min-w-0 flex-col gap-1",t),...a})}function w({className:t,...a}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r("group/menu-item relative",t),...a})}const Wt=Ee("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function b({asChild:t=!1,isActive:a=!1,variant:n="default",size:s="default",tooltip:o,className:i,...c}){const u=t?R:"button",{isMobile:x,state:p}=A(),g=e.jsx(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":a,className:r(Wt({variant:n,size:s}),i),...c});return o?(typeof o=="string"&&(o={children:o}),e.jsxs(At,{children:[e.jsx(zt,{asChild:!0,children:g}),e.jsx(Dt,{side:"right",align:"center",hidden:p!=="collapsed"||x,...o})]})):g}function Qt({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:r("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...a})}function Xt({asChild:t=!1,size:a="md",isActive:n=!1,className:s,...o}){const i=t?R:"a";return e.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":n,className:r("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...o})}function q({singleton:t}){const{data:a}=Q(),{data:n}=be();return a?e.jsx(e.Fragment,{children:Object.entries(a).filter(([,s])=>t?s.singleton:!s.singleton).map(([s,o])=>e.jsx(Qt,{children:e.jsx(he,{to:t?`/admin/dashboard/${s}/default`:`/admin/dashboard/${s}`,className:({isActive:i,isPending:c})=>c?"pending":i?"active":"",children:({isActive:i})=>e.jsxs(Xt,{isActive:i,children:[e.jsx("span",{className:"inline-block overflow-hidden whitespace-nowrap text-ellipsis text-nowrap w-full",children:o.displayName}),!t&&n&&e.jsx("span",{className:"text-xs text-gray-500 ml-auto pr-1",children:Object.keys(n[s]).length})]})})},o.displayName))}):null}var z="Collapsible",[Zt,ba]=Ae(z),[Yt,D]=Zt(z),re=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,open:s,defaultOpen:o,disabled:i,onOpenChange:c,...u}=t,[x=!1,p]=Re({prop:s,defaultProp:o,onChange:c});return e.jsx(Yt,{scope:n,disabled:i,contentId:Me(),open:x,onOpenToggle:d.useCallback(()=>p(g=>!g),[p]),children:e.jsx(k.div,{"data-state":I(x),"data-disabled":i?"":void 0,...u,ref:a})})});re.displayName=z;var de="CollapsibleTrigger",le=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,...s}=t,o=D(de,n);return e.jsx(k.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":I(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...s,ref:a,onClick:ze(t.onClick,o.onOpenToggle)})});le.displayName=de;var P="CollapsibleContent",ce=d.forwardRef((t,a)=>{const{forceMount:n,...s}=t,o=D(P,t.__scopeCollapsible);return e.jsx(De,{present:n||o.open,children:({present:i})=>e.jsx(Jt,{...s,ref:a,present:i})})});ce.displayName=P;var Jt=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,present:s,children:o,...i}=t,c=D(P,n),[u,x]=d.useState(s),p=d.useRef(null),g=Oe(a,p),C=d.useRef(0),m=C.current,j=d.useRef(0),v=j.current,y=c.open||u,_=d.useRef(y),h=d.useRef(void 0);return d.useEffect(()=>{const l=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(l)},[]),Pe(()=>{const l=p.current;if(l){h.current=h.current||{transitionDuration:l.style.transitionDuration,animationName:l.style.animationName},l.style.transitionDuration="0s",l.style.animationName="none";const T=l.getBoundingClientRect();C.current=T.height,j.current=T.width,_.current||(l.style.transitionDuration=h.current.transitionDuration,l.style.animationName=h.current.animationName),x(s)}},[c.open,s]),e.jsx(k.div,{"data-state":I(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!y,...i,ref:g,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:y&&o})});function I(t){return t?"open":"closed"}var ea=re;function F({...t}){return e.jsx(ea,{"data-slot":"collapsible",...t})}function V({...t}){return e.jsx(le,{"data-slot":"collapsible-trigger",...t})}function U({...t}){return e.jsx(ce,{"data-slot":"collapsible-content",...t})}function ta(){const t=ve(),{pathname:a}=K(),[n,s]=d.useState(!1),[o]=ge(),[i]=me(),[c]=je(),u=E(x=>x.auth.role);return e.jsxs(qt,{className:"z-50",children:[e.jsx(jt,{isOpen:n,setOpen:s}),e.jsx(Vt,{className:"h-14 justify-center",children:e.jsx(S,{children:e.jsx(N,{to:"/admin/dashboard",className:"text-3xl font-semibold tracking-tight transition-colors",children:"WEkEO"})})}),e.jsxs(Kt,{children:[e.jsxs(S,{children:[e.jsx(B,{children:"Content"}),e.jsx(H,{children:e.jsxs(G,{children:[e.jsx(F,{className:"group/collapsible",children:e.jsxs(w,{children:[e.jsx(V,{asChild:!0,children:e.jsxs(b,{className:"group",children:[e.jsx(Qe,{}),e.jsx("span",{children:"Collections"}),e.jsx(L,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(U,{children:e.jsx(q,{})})]})}),e.jsx(F,{className:"group/collapsible",children:e.jsxs(w,{children:[e.jsx(V,{asChild:!0,children:e.jsxs(b,{className:"group",children:[e.jsx(st,{}),e.jsx("span",{children:"Singles"}),e.jsx(L,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(U,{children:e.jsx(q,{singleton:!0})})]})}),e.jsx(w,{children:e.jsx(b,{asChild:!0,children:e.jsxs(N,{to:"/admin/dashboard/files",children:[e.jsx(Ke,{}),e.jsx("span",{children:"Files"})]})})}),e.jsx(w,{children:e.jsxs(b,{disabled:!0,children:[e.jsx(He,{}),e.jsx("span",{children:"Components"})]})})]})})]}),e.jsxs(S,{children:[e.jsx(B,{children:"Actions"}),e.jsx(H,{children:e.jsxs(G,{children:[u==="developer"&&e.jsxs(e.Fragment,{children:[e.jsx(w,{children:e.jsxs(b,{onClick:()=>i(),children:[e.jsx(Te,{}),e.jsx("span",{children:"Pull from repo"})]})}),e.jsx(w,{children:e.jsxs(b,{onClick:()=>c(),children:[e.jsx($e,{}),e.jsx("span",{children:"Push to repo"})]})})]}),e.jsx(w,{children:e.jsxs(b,{onClick:()=>o(),children:[e.jsx(ot,{}),e.jsx("span",{children:"Publish"})]})})]})})]}),e.jsx(S,{})]}),e.jsxs(Ut,{children:[e.jsx(b,{asChild:!0,children:e.jsxs(N,{to:W.PREVIEW_URL,children:["Preview",e.jsx(Ve,{className:"ml-auto"})]})}),e.jsx(b,{onClick:()=>s(!0),children:"About"}),e.jsxs(b,{onClick:()=>t(we()),children:[e.jsx(Je,{}),"Log out"]})]})]})}function aa({children:t}){const a=pe(),n=E(o=>o.auth.user),s=E(o=>o.auth.isLoading);return d.useEffect(()=>{!s&&!n&&a("/")},[s,a,n]),s||!n?null:t}function sa(){const{pathname:t}=K(),{data:a}=Q(),n=t.split("/").filter(s=>!["admin","dashboard"].includes(s)&&s!=="");return a?e.jsx(e.Fragment,{children:n.map((s,o,i)=>e.jsxs(xe.Fragment,{children:[i.length>1&&o>=1&&e.jsx(qe,{size:12,className:"text-gray-500 pt-[1px]"}),e.jsx("p",{className:"text-sm leading-none tracking-tight capitalize text-gray-500 last:text-foreground",children:a[s]?a[s].displayName:s},s)]},o))}):null}const ga=ue(function(){return e.jsx(aa,{children:e.jsxs(Gt,{className:"flex h-full",children:[e.jsx(ta,{}),e.jsxs("main",{className:"flex flex-col flex-1 h-full w-0",children:[e.jsx("header",{className:"flex sticky bg-sidebar dark:bg-sidebar z-40 top-0 h-14 shrink-0 items-center gap-2 border-b",children:e.jsxs("div",{className:"flex items-center gap-2 px-3",children:[e.jsx(Ft,{}),e.jsx(Ct,{orientation:"vertical",className:"h-4"}),e.jsx(sa,{})]})}),e.jsx(fe,{})]})]})})});export{ga as default};