@cyber-harbour/ui 1.1.43-dev.0 → 1.1.43-dev.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.
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import {a,x,y,v,d,m,A,D,mb,pa,Wa}from'./chunk-A3IKGYDL.mjs';export{qb as Alert,B as AlertIcon,Ca as AndroidIcon,E as ApiIcon,F as ArrowCircleTopRightIcon,G as ArrowRightIcon,la as BallsMenu,mb as Box,r as BreakpointProvider,H as BugReportIcon,Pa as BurgerMenuIcon,va as BusIcon,A as Button,I as CalendarIcon,wa as CarIcon,ma as CheckIcon,sb as Checkbox,na as ChevronDownIcon,J as ChevronLeftIcon,K as ChevronRightIcon,oa as ChevronUpIcon,Qa as ClockIcon,L as CloseCircleIcon,M as ClosedLockIcon,zb as ContentLoader,eb as ContextMenu,fb as ContextMenuDelimiter,Ya as Counter,ta as CrossIcon,N as DataSetsIcon,O as DeepSearchIcon,P as DisabledVisibleIcon,Q as DocsIcon,R as DownloadIcon,vb as Drawer,xb as DrawerBody,wb as DrawerHeader,S as EditUserIcon,ob as EmptyData,T as EnableVisibleIcon,U as EnterArrowLeftIcon,Fb as FileField,Aa as FileIcon,V as FiltersIcon,La as FlashIcon,kb as FlexContainer,lb as FlexItem,Ea as FolderAlertIcon,Ma as FolderInfoIcon,b as GlobalStyle,$a as Header,ab as HeaderDelimeter,bb as HeaderSection,W as HomepageIcon,C as ImageIcon,ra as InfoCircleFilledIcon,X as InfoCircleIcon,jb as Input,Ba as IosIcon,rb as Label,nb as Line,tb as LinerProgress,Xa as ListMenu,Za as ListMenuItem,_a as ListMenuSection,Y as MapRadarIcon,ua as MaximizeIcon,Da as MicrosoftIcon,D as MinusIcon,Bb as Modal,Db as ModalBody,Eb as ModalFooter,Cb as ModalHeader,Z as MoonIcon,_ as OpenLockIcon,$ as OrganizationIcon,Ab as Overlay,db as Pagination,Ha as PassportIcon,aa as PasswordFinderIcon,Ja as PencilIcon,ba as PhonebookIcon,ya as PlaneIcon,pa as PlusIcon,Ia as PointIcon,ca as PrintIcon,da as Profiler2Icon,ea as ProfilerIcon,Fa as RelationIcon,Ga as RelationPointsIcon,Na as RotateLeftIcon,Oa as RotateRightIcon,ib as RowActionsMenu,fa as SandBoxIcon,ga as SearchIcon,hb as Select,za as ShipIcon,Sa as Sidebar,Ra as SidebarContext,Ua as SidebarDelimeter,Ta as SidebarItem,Va as SidebarSection,ha as StatisticIcon,ia as SunIcon,ub as Switch,cb as Table,pb as Tag,t as ThemeProvider,yb as Tooltip,Wa as Typography,sa as UnfoldIcon,ja as UpRightArrowCircleIcon,Ka as UserInCircleIcon,qa as UsersIcon,ka as VectorIcon,xa as WayIcon,g as convertPaletteToRem,x as createComponent,y as createStyledComponent,q as darkTheme,p as darkThemePx,u as destructSpaceProps,v as generatePropertySpaceStyle,l as getBreakpoint,i as getButtonSizeStyles,h as getButtonStyles,j as getInputStyles,w as getResponsiveProps,k as getTypographyStyles,m as hexToRgba,o as lightTheme,n as lightThemePx,f as propToRem,d as pxToRem,e as remToPx,c as resolveThemeColor,s as useBreakpoint,gb as useContextMenuControl,z as useTheme}from'./chunk-A3IKGYDL.mjs';import pe,{styled,useTheme,keyframes}from'styled-components';export{ServerStyleSheet,StyleSheetManager}from'styled-components';import {jsx,jsxs,Fragment as Fragment$1}from'react/jsx-runtime';import qt,{useState,useRef,useCallback,useEffect,Fragment,forwardRef,useMemo,useImperativeHandle,useLayoutEffect,memo}from'react';import qr from'lodash.clonedeep';import {scaleOrdinal,schemeCategory10,forceCollide,forceSimulation,forceLink,forceManyBody,forceX,forceY,forceCenter}from'd3';import jr from'react-content-loader';import {renderAsync}from'docx-preview';import wn from'lodash.throttle';import In from'@uiw/react-codemirror';import {vscodeDark}from'@uiw/codemirror-theme-vscode';import {javascript}from'@codemirror/lang-javascript';import {json}from'@codemirror/lang-json';import {html}from'@codemirror/lang-html';import {css}from'@codemirror/lang-css';import {python}from'@codemirror/lang-python';import {java}from'@codemirror/lang-java';import {cpp}from'@codemirror/lang-cpp';import {php}from'@codemirror/lang-php';import {rust}from'@codemirror/lang-rust';import {xml}from'@codemirror/lang-xml';import {yaml}from'@codemirror/lang-yaml';import {markdown}from'@codemirror/lang-markdown';import {sql}from'@codemirror/lang-sql';var Si=a(({children:d,className:p})=>jsx(gr,{className:p,children:d}),"PageLayout"),gr=styled.div`
1
+ import {a,x,y,v,d,m,A,D,mb,pa,Wa}from'./chunk-N2ZZP6IW.mjs';export{qb as Alert,B as AlertIcon,Ca as AndroidIcon,E as ApiIcon,F as ArrowCircleTopRightIcon,G as ArrowRightIcon,la as BallsMenu,mb as Box,r as BreakpointProvider,H as BugReportIcon,Pa as BurgerMenuIcon,va as BusIcon,A as Button,I as CalendarIcon,wa as CarIcon,ma as CheckIcon,sb as Checkbox,na as ChevronDownIcon,J as ChevronLeftIcon,K as ChevronRightIcon,oa as ChevronUpIcon,Qa as ClockIcon,L as CloseCircleIcon,M as ClosedLockIcon,zb as ContentLoader,eb as ContextMenu,fb as ContextMenuDelimiter,Ya as Counter,ta as CrossIcon,N as DataSetsIcon,O as DeepSearchIcon,P as DisabledVisibleIcon,Q as DocsIcon,R as DownloadIcon,vb as Drawer,xb as DrawerBody,wb as DrawerHeader,S as EditUserIcon,ob as EmptyData,T as EnableVisibleIcon,U as EnterArrowLeftIcon,Fb as FileField,Aa as FileIcon,V as FiltersIcon,La as FlashIcon,kb as FlexContainer,lb as FlexItem,Ea as FolderAlertIcon,Ma as FolderInfoIcon,b as GlobalStyle,$a as Header,ab as HeaderDelimeter,bb as HeaderSection,W as HomepageIcon,C as ImageIcon,ra as InfoCircleFilledIcon,X as InfoCircleIcon,jb as Input,Ba as IosIcon,rb as Label,nb as Line,tb as LinerProgress,Xa as ListMenu,Za as ListMenuItem,_a as ListMenuSection,Y as MapRadarIcon,ua as MaximizeIcon,Da as MicrosoftIcon,D as MinusIcon,Bb as Modal,Db as ModalBody,Eb as ModalFooter,Cb as ModalHeader,Z as MoonIcon,_ as OpenLockIcon,$ as OrganizationIcon,Ab as Overlay,db as Pagination,Ha as PassportIcon,aa as PasswordFinderIcon,Ja as PencilIcon,ba as PhonebookIcon,ya as PlaneIcon,pa as PlusIcon,Ia as PointIcon,ca as PrintIcon,da as Profiler2Icon,ea as ProfilerIcon,Fa as RelationIcon,Ga as RelationPointsIcon,Na as RotateLeftIcon,Oa as RotateRightIcon,ib as RowActionsMenu,fa as SandBoxIcon,ga as SearchIcon,hb as Select,za as ShipIcon,Sa as Sidebar,Ra as SidebarContext,Ua as SidebarDelimeter,Ta as SidebarItem,Va as SidebarSection,ha as StatisticIcon,ia as SunIcon,ub as Switch,cb as Table,pb as Tag,t as ThemeProvider,yb as Tooltip,Wa as Typography,sa as UnfoldIcon,ja as UpRightArrowCircleIcon,Ka as UserInCircleIcon,qa as UsersIcon,ka as VectorIcon,xa as WayIcon,g as convertPaletteToRem,x as createComponent,y as createStyledComponent,q as darkTheme,p as darkThemePx,u as destructSpaceProps,v as generatePropertySpaceStyle,l as getBreakpoint,i as getButtonSizeStyles,h as getButtonStyles,j as getInputStyles,w as getResponsiveProps,k as getTypographyStyles,m as hexToRgba,o as lightTheme,n as lightThemePx,f as propToRem,d as pxToRem,e as remToPx,c as resolveThemeColor,s as useBreakpoint,gb as useContextMenuControl,z as useTheme}from'./chunk-N2ZZP6IW.mjs';import pe,{styled,useTheme,keyframes}from'styled-components';export{ServerStyleSheet,StyleSheetManager}from'styled-components';import {jsx,jsxs,Fragment as Fragment$1}from'react/jsx-runtime';import qt,{useState,useRef,useCallback,useEffect,Fragment,forwardRef,useMemo,useImperativeHandle,useLayoutEffect,memo}from'react';import qr from'lodash.clonedeep';import {scaleOrdinal,schemeCategory10,forceCollide,forceSimulation,forceLink,forceManyBody,forceX,forceY,forceCenter}from'd3';import jr from'react-content-loader';import {renderAsync}from'docx-preview';import wn from'lodash.throttle';import In from'@uiw/react-codemirror';import {vscodeDark}from'@uiw/codemirror-theme-vscode';import {javascript}from'@codemirror/lang-javascript';import {json}from'@codemirror/lang-json';import {html}from'@codemirror/lang-html';import {css}from'@codemirror/lang-css';import {python}from'@codemirror/lang-python';import {java}from'@codemirror/lang-java';import {cpp}from'@codemirror/lang-cpp';import {php}from'@codemirror/lang-php';import {rust}from'@codemirror/lang-rust';import {xml}from'@codemirror/lang-xml';import {yaml}from'@codemirror/lang-yaml';import {markdown}from'@codemirror/lang-markdown';import {sql}from'@codemirror/lang-sql';var Si=a(({children:d,className:p})=>jsx(gr,{className:p,children:d}),"PageLayout"),gr=styled.div`
2
2
  display: grid;
3
3
  min-height: 100dvh;
4
4
  position: relative;
@@ -45,6 +45,7 @@ import {a,x,y,v,d,m,A,D,mb,pa,Wa}from'./chunk-A3IKGYDL.mjs';export{qb as Alert,B
45
45
  min-width: 0;
46
46
  `,Fr=pe.div(({theme:d})=>`
47
47
  position: relative;
48
+ z-index: 100;
48
49
  display: none;
49
50
  border-left: 1px solid ${d.colors.stroke.light};
50
51
 
@@ -131,7 +132,7 @@ ${d$1?`
131
132
  width: 100%;
132
133
  height: 100%;
133
134
  padding: 22px;
134
- `;var ct=a(({url:d})=>{let[p,M]=useState(null),[I,k]=useState(false),[j,S]=useState(true),[P,A]=useState(null);useEffect(()=>{k(true);},[]),useEffect(()=>{if(!I)return;a(async()=>{try{let H=await import('./PdfDriver-UGYUI7NF.mjs');M(()=>H.PdfDriver),S(!1);}catch(H){console.error("Failed to load PDF driver:",H),A("Failed to load PDF viewer"),S(false);}},"load")();},[I]);let G=jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%"},children:jsx("span",{style:{color:"#6b7280"},children:"Loading PDF viewer..."})});return !I||j?G:P||!p?jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%"},children:jsx("span",{style:{color:"#ef4444"},children:P||"PDF viewer unavailable"})}):jsx(p,{url:d})},"PdfDriverWrapper");var Qt=50,Sn=1e4,er=a(({url:d,blob:p})=>{let M=useRef(null),I=useRef(null),[k,j]=useState(null),[S,P]=useState(true),[A$1,G]=useState(1),q=useRef(false),[H,re]=useState({width:0,height:0}),R=useRef(0),ne=a(()=>{q.current=true,G(K=>Math.min(K+.25,4));},"handleZoomIn"),le=a(()=>{q.current=true,G(K=>Math.max(K-.25,.25));},"handleZoomOut");return useEffect(()=>{a(async()=>{if(I.current)try{P(!0),j(null);let V=p;if(!V&&d&&(V=await(await fetch(d)).blob()),!V){j("No DOCX file provided");return}if(V.size/(1024*1024)>Qt){j(`File too large (> ${Qt} MB)`);return}I.current.innerHTML="";let X=renderAsync(V,I.current,void 0,{debug:!0,experimental:!0,hideWrapperOnPrint:!0}),t=new Promise((U,Y)=>setTimeout(()=>Y(new Error("DOCX render timed out")),Sn));await Promise.race([X,t]),await new Promise(U=>requestAnimationFrame(U));let te=I.current.querySelector(".docx-wrapper");if(te&&(R.current=te.offsetWidth,re({width:te.offsetWidth,height:te.offsetHeight})),M.current&&R.current>0){let U=Math.min(M.current.clientWidth/R.current,1);G(U);}P(!1);}catch(V){j(V?.message||"Failed to open DOCX file"),P(false);}},"renderDocument")();},[d,p]),useEffect(()=>{if(!M.current)return;let K=wn(se=>{if(!(q.current||R.current===0))for(let X of se){let t=Math.min(X.contentRect.width/R.current,1);G(t);}},150),V=new ResizeObserver(K);return V.observe(M.current),()=>{V.disconnect(),K.cancel();}},[]),jsxs(Mn,{children:[jsxs(Cn,{children:[jsx(A,{variant:"outlined","aria-label":"zoom-out",color:"secondary",size:"small",icon:jsx(D,{style:{width:20,height:20}}),onClick:le,disabled:A$1<=.25,p:5}),jsxs(mb,{py:5,px:8,children:[Math.round(A$1*100),"%"]}),jsx(A,{variant:"outlined","aria-label":"zoom-in",size:"small",color:"secondary",icon:jsx(pa,{style:{width:14,height:14}}),onClick:ne,disabled:A$1>=4,p:8})]}),!!k&&!S&&jsx(Pn,{children:k}),S&&jsx(Dn,{children:"Loading..."}),jsx(Ln,{ref:M,children:jsx(Tn,{style:{width:H.width>0?H.width*A$1:void 0,height:H.height>0?H.height*A$1:void 0},children:jsx(En,{ref:I,style:{transform:`scale(${A$1})`,transformOrigin:"top left"}})})})]})},"DocxDriver"),Mn=pe.div`
135
+ `;var ct=a(({url:d})=>{let[p,M]=useState(null),[I,k]=useState(false),[j,S]=useState(true),[P,A]=useState(null);useEffect(()=>{k(true);},[]),useEffect(()=>{if(!I)return;a(async()=>{try{let H=await import('./PdfDriver-RM2BGGB7.mjs');M(()=>H.PdfDriver),S(!1);}catch(H){console.error("Failed to load PDF driver:",H),A("Failed to load PDF viewer"),S(false);}},"load")();},[I]);let G=jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%"},children:jsx("span",{style:{color:"#6b7280"},children:"Loading PDF viewer..."})});return !I||j?G:P||!p?jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%"},children:jsx("span",{style:{color:"#ef4444"},children:P||"PDF viewer unavailable"})}):jsx(p,{url:d})},"PdfDriverWrapper");var Qt=50,Sn=1e4,er=a(({url:d,blob:p})=>{let M=useRef(null),I=useRef(null),[k,j]=useState(null),[S,P]=useState(true),[A$1,G]=useState(1),q=useRef(false),[H,re]=useState({width:0,height:0}),R=useRef(0),ne=a(()=>{q.current=true,G(K=>Math.min(K+.25,4));},"handleZoomIn"),le=a(()=>{q.current=true,G(K=>Math.max(K-.25,.25));},"handleZoomOut");return useEffect(()=>{a(async()=>{if(I.current)try{P(!0),j(null);let V=p;if(!V&&d&&(V=await(await fetch(d)).blob()),!V){j("No DOCX file provided");return}if(V.size/(1024*1024)>Qt){j(`File too large (> ${Qt} MB)`);return}I.current.innerHTML="";let X=renderAsync(V,I.current,void 0,{debug:!0,experimental:!0,hideWrapperOnPrint:!0}),t=new Promise((U,Y)=>setTimeout(()=>Y(new Error("DOCX render timed out")),Sn));await Promise.race([X,t]),await new Promise(U=>requestAnimationFrame(U));let te=I.current.querySelector(".docx-wrapper");if(te&&(R.current=te.offsetWidth,re({width:te.offsetWidth,height:te.offsetHeight})),M.current&&R.current>0){let U=Math.min(M.current.clientWidth/R.current,1);G(U);}P(!1);}catch(V){j(V?.message||"Failed to open DOCX file"),P(false);}},"renderDocument")();},[d,p]),useEffect(()=>{if(!M.current)return;let K=wn(se=>{if(!(q.current||R.current===0))for(let X of se){let t=Math.min(X.contentRect.width/R.current,1);G(t);}},150),V=new ResizeObserver(K);return V.observe(M.current),()=>{V.disconnect(),K.cancel();}},[]),jsxs(Mn,{children:[jsxs(Cn,{children:[jsx(A,{variant:"outlined","aria-label":"zoom-out",color:"secondary",size:"small",icon:jsx(D,{style:{width:20,height:20}}),onClick:le,disabled:A$1<=.25,p:5}),jsxs(mb,{py:5,px:8,children:[Math.round(A$1*100),"%"]}),jsx(A,{variant:"outlined","aria-label":"zoom-in",size:"small",color:"secondary",icon:jsx(pa,{style:{width:14,height:14}}),onClick:ne,disabled:A$1>=4,p:8})]}),!!k&&!S&&jsx(Pn,{children:k}),S&&jsx(Dn,{children:"Loading..."}),jsx(Ln,{ref:M,children:jsx(Tn,{style:{width:H.width>0?H.width*A$1:void 0,height:H.height>0?H.height*A$1:void 0},children:jsx(En,{ref:I,style:{transform:`scale(${A$1})`,transformOrigin:"top left"}})})})]})},"DocxDriver"),Mn=pe.div`
135
136
  height: 100%;
136
137
  width: 100%;
137
138
  display: flex;