@nice2dev/ui 1.1.10 → 1.2.0
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/CHANGELOG.md +76 -0
- package/README.md +12 -20
- package/dist/NiceButton-5tWvfXKl.cjs +1 -0
- package/dist/NiceButton-DHSgQT1_.js +112 -0
- package/dist/NiceCodeEditor-B8At55f5.js +1179 -0
- package/dist/NiceCodeEditor-BJSEzhcY.cjs +260 -0
- package/dist/NiceColorPicker-DCgmE-3H.cjs +1 -0
- package/dist/NiceColorPicker-DK30kJgy.js +486 -0
- package/dist/NiceColorPicker-DtPFxDKM.cjs +1 -0
- package/dist/NiceColorPicker-bNJBAU_c.js +598 -0
- package/dist/NiceDataGrid-BOCJr6XF.js +2217 -0
- package/dist/NiceDataGrid-BV5Oh-gy.cjs +10 -0
- package/dist/NiceDataGrid-Dd7SI-M6.cjs +10 -0
- package/dist/NiceDataGrid-DjZchXYG.js +2217 -0
- package/dist/NiceForm-BCEXovJR.cjs +1 -0
- package/dist/NiceForm-D7oyWHXg.js +4820 -0
- package/dist/NiceForm-DUhxXArr.js +4817 -0
- package/dist/NiceForm-uCeVmTrD.cjs +1 -0
- package/dist/NiceHtmlEditor-BYk1roA4.cjs +10 -0
- package/dist/NiceHtmlEditor-C5kLeF9H.cjs +10 -0
- package/dist/NiceHtmlEditor-CFVMIC5L.js +848 -0
- package/dist/NiceHtmlEditor-mWebBmy1.js +849 -0
- package/dist/NiceLoginForm-BHyDY7br.cjs +1 -0
- package/dist/NiceLoginForm-BuxFY2Rk.js +750 -0
- package/dist/NiceLoginForm.css +1 -0
- package/dist/NiceMention-CA7CL5BI.js +11263 -0
- package/dist/NiceMention-CHcKRl-L.cjs +430 -0
- package/dist/NiceMention-DJD0BLcp.js +11269 -0
- package/dist/NiceMention-DcaUEMSg.cjs +430 -0
- package/dist/NiceMention.css +1 -1
- package/dist/NiceModal-C4p8a82e.cjs +1 -0
- package/dist/NiceModal-TNlkaL_i.js +85 -0
- package/dist/NiceModuleLifecyclePanel-BWbKdVC_.js +7054 -0
- package/dist/NiceModuleLifecyclePanel-CZHIzvkE.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-OC9YK2kG.js +7052 -0
- package/dist/NiceModuleLifecyclePanel-_OcfDmtC.cjs +1 -0
- package/dist/NicePagination-8XsBbMNx.js +165 -0
- package/dist/NicePagination-CkOoXf0f.js +165 -0
- package/dist/NicePagination-D7lek1G7.cjs +1 -0
- package/dist/NicePagination-OjTEfZJE.cjs +1 -0
- package/dist/NicePivotGrid-BJRSciWl.js +1183 -0
- package/dist/NicePivotGrid-CS1dPmNI.cjs +152 -0
- package/dist/NicePivotGrid-D2AxqDzJ.js +1183 -0
- package/dist/NicePivotGrid-DxQ6Py9D.cjs +152 -0
- package/dist/NiceSavedQueryPanel-B5HhqlAI.cjs +586 -0
- package/dist/NiceSavedQueryPanel-CMStDOKe.js +5125 -0
- package/dist/NiceSavedQueryPanel-D2i34e_b.cjs +586 -0
- package/dist/NiceSavedQueryPanel-mPO2THs7.js +5142 -0
- package/dist/NiceSavedQueryPanel.css +1 -1
- package/dist/NiceScheduler-7gP7vcLy.cjs +5 -0
- package/dist/NiceScheduler-Cy7F9tgH.js +1693 -0
- package/dist/NiceScheduler-DquRUZxD.cjs +5 -0
- package/dist/NiceScheduler-l8N4yCWd.js +1716 -0
- package/dist/NiceSelect-DZB1Rs9x.js +435 -0
- package/dist/NiceSelect-tMz9QQUs.cjs +1 -0
- package/dist/NiceStreamDashboard.doc-74KUXya1.cjs +8 -0
- package/dist/NiceStreamDashboard.doc-k8PQfCM0.js +32 -0
- package/dist/NiceWindow-BEov3s9F.js +2094 -0
- package/dist/NiceWindow-CDt6PCEg.cjs +1 -0
- package/dist/NiceWindow.css +1 -1
- package/dist/charts-C047IMVn.cjs +768 -0
- package/dist/charts-CCXSb3xk.js +4752 -0
- package/dist/charts-CqETcUhH.js +4752 -0
- package/dist/charts-DouiiHOT.cjs +768 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/core-BL-KmGYC.js +795 -0
- package/dist/core-Chg-oYCr.cjs +1 -0
- package/dist/core-CxBnKAhs.cjs +1 -0
- package/dist/core-D_LRh59n.js +795 -0
- package/dist/data-branching-Km4lc8P_.cjs +1 -0
- package/dist/data-branching-YQtJJEtn.js +6273 -0
- package/dist/data-branching.cjs +1 -1
- package/dist/data-branching.mjs +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +0 -51
- package/dist/data.mjs +3 -3
- package/dist/devops-D5yIDM3e.js +8312 -0
- package/dist/devops-rVpB0ZAX.cjs +17 -0
- package/dist/devops.cjs +1 -1
- package/dist/devops.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +6 -25
- package/dist/editors.mjs +55 -54
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.d.ts +5 -0
- package/dist/feedback.mjs +2 -2
- package/dist/index.cjs +284 -284
- package/dist/index.css +1 -1
- package/dist/index.d.ts +194 -208
- package/dist/index.mjs +20312 -19511
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +29 -29
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.mjs +3 -3
- package/dist/no-code-6WyYb3hL.cjs +331 -0
- package/dist/no-code-BH5oVFC6.js +8186 -0
- package/dist/no-code-CnHG5_Vn.js +8186 -0
- package/dist/no-code-DMKlg1Zl.cjs +331 -0
- package/dist/no-code.cjs +1 -1
- package/dist/no-code.css +1 -1
- package/dist/no-code.d.ts +25 -18
- package/dist/no-code.mjs +3 -3
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.d.ts +24 -24
- package/dist/overlays.mjs +24 -490
- package/dist/pickerCommons-0vyK1Knv.js +547 -0
- package/dist/pickerCommons-BFbItm8o.cjs +1 -0
- package/dist/pickerCommons-BHirHJyn.js +548 -0
- package/dist/pickerCommons-Bt8JIaTN.cjs +1 -0
- package/dist/pickerCommons.css +1 -1
- package/dist/style.css +10 -7
- package/package.json +4 -6
- package/css/legacy-bg-text-aliases.css +0 -87
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),L=require("@nice2dev/ui-core"),n=require("react"),be=require("react-dom"),pt=({visible:t,onClose:i,title:c,items:o,showCancelButton:u=!0,cancelText:d,size:m="md",disabled:w,readOnly:h,loading:k,error:C,className:R,style:I})=>{const{t:l}=L.useNiceTranslation();if(!t)return null;const p=w||k||h;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-actionsheet__overlay",onClick:i}),e.jsxs("div",{className:`nice-actionsheet nice-actionsheet--${m} ${w?"nice-actionsheet--disabled":""} ${h?"nice-actionsheet--readonly":""} ${k?"nice-actionsheet--loading":""} ${C?"nice-actionsheet--error":""} ${R||""}`,style:I,"aria-disabled":w||void 0,"aria-readonly":h||void 0,"aria-busy":k||void 0,children:[C&&e.jsx("div",{className:"nice-actionsheet__error",role:"alert",children:C}),k&&e.jsx("span",{className:"nice-actionsheet__spinner","aria-hidden":"true",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),c&&e.jsx("div",{className:"nice-actionsheet__title",children:c}),e.jsx("div",{className:"nice-actionsheet__items",children:o.map((_,f)=>e.jsxs("button",{className:`nice-actionsheet__item ${_.type==="danger"?"nice-actionsheet__item--danger":""}`,disabled:_.disabled||p,onClick:()=>{p||(_.onClick?.(),i())},children:[_.icon&&e.jsx("span",{className:"nice-actionsheet__icon",children:_.icon}),_.text]},f))}),u&&e.jsx("button",{className:"nice-actionsheet__cancel",onClick:i,children:d||l("cancel","Cancel")})]})]})},xt=({visible:t,onClose:i,targetRef:c,position:o="bottom",title:u,showArrow:d=!0,width:m,children:w,className:h,style:k,displayStyle:C})=>{L.useComponentDisplayClass("tooltip",C);const R=n.useRef(null),[I,l]=n.useState({top:0,left:0}),p=n.useCallback(()=>{const _=c.current,f=R.current;if(!_||!f)return;const r=_.getBoundingClientRect(),v=f.getBoundingClientRect();let a=0,S=0;const E=8;switch(o){case"top":a=r.top-v.height-E,S=r.left+(r.width-v.width)/2;break;case"bottom":a=r.bottom+E,S=r.left+(r.width-v.width)/2;break;case"left":a=r.top+(r.height-v.height)/2,S=r.left-v.width-E;break;case"right":a=r.top+(r.height-v.height)/2,S=r.right+E;break}l({top:a+window.scrollY,left:S+window.scrollX})},[c,o]);return n.useEffect(()=>{if(t){requestAnimationFrame(p);const _=f=>{R.current&&!R.current.contains(f.target)&&c.current&&!c.current.contains(f.target)&&i()};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)}},[t,p,i,c]),t?e.jsxs("div",{ref:R,className:`nice-popover nice-popover--${o} ${h||""}`,style:{...k,position:"absolute",top:I.top,left:I.left,width:m},children:[d&&e.jsx("div",{className:`nice-popover__arrow nice-popover__arrow--${o}`}),u&&e.jsx("div",{className:"nice-popover__title",children:u}),e.jsx("div",{className:"nice-popover__content",children:w})]}):null},wt=({visible:t,message:i,container:c,showIndicator:o=!0,shading:u=!0,className:d,style:m})=>{const{t:w}=L.useNiceTranslation();if(!t)return null;const h=!!c?.current,k=e.jsxs("div",{className:`nice-loadpanel ${d||""}`,style:m,children:[u&&e.jsx("div",{className:"nice-loadpanel__shade"}),e.jsxs("div",{className:"nice-loadpanel__box",children:[o&&e.jsx("div",{className:"nice-spinner nice-spinner--md"}),e.jsx("span",{className:"nice-loadpanel__text",children:i||w("loading","Loading...")})]})]});if(h&&c.current){const C=c.current;return C.style.position=C.style.position||"relative",k}return k},gt=({direction:t="row",align:i,justify:c,wrap:o,gap:u,flex:d,children:m,className:w,style:h})=>e.jsx("div",{className:`nice-box ${w||""}`,style:{display:"flex",flexDirection:t,alignItems:i,justifyContent:c,flexWrap:o?"wrap":void 0,gap:u,flex:d,...h},children:m}),_t=({direction:t="row",items:i,gap:c,className:o,style:u})=>e.jsx("div",{className:`nice-responsivebox ${o||""}`,style:{display:"flex",flexDirection:t,gap:c,...u},children:i.map((d,m)=>e.jsx("div",{style:{flex:d.ratio??1,flexBasis:d.baseSize,flexShrink:d.shrink??1},children:d.children},m))}),bt=({width:t=200,height:i=200,minWidth:c=50,minHeight:o=50,maxWidth:u=1/0,maxHeight:d=1/0,handles:m=["right","bottom","bottomRight"],onResize:w,children:h,className:k,style:C})=>{const[R,I]=n.useState({width:t,height:i}),l=n.useRef(null),p=(r,v)=>{v.preventDefault();const a=v.clientX,S=v.clientY,E=R.width,Y=R.height,N={n:"top",s:"bottom",e:"right",w:"left",ne:"topRight",se:"bottomRight",sw:"bottomLeft",nw:"topLeft"}[r]??r,s=N==="right"||N==="topRight"||N==="bottomRight",y=N==="left"||N==="topLeft"||N==="bottomLeft",j=N==="bottom"||N==="bottomRight"||N==="bottomLeft",M=N==="top"||N==="topRight"||N==="topLeft",z=P=>{const x=P.clientX-a,b=P.clientY-S;let g=E,X=Y;s&&(g=E+x),y&&(g=E-x),j&&(X=Y+b),M&&(X=Y-b),g=Math.max(c,Math.min(u,g)),X=Math.max(o,Math.min(d,X)),I({width:g,height:X}),w?.({width:g,height:X})},$=()=>{document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",$)};document.addEventListener("pointermove",z),document.addEventListener("pointerup",$)},_=r=>{switch(r){case"top":case"bottom":return"ns-resize";case"left":case"right":return"ew-resize";case"topLeft":case"bottomRight":return"nwse-resize";case"topRight":case"bottomLeft":return"nesw-resize";default:return"default"}},f=r=>{const v={position:"absolute",zIndex:1},a=8;return r==="right"?{...v,top:0,right:-a/2,width:a,height:"100%",cursor:_(r)}:r==="bottom"?{...v,left:0,bottom:-a/2,width:"100%",height:a,cursor:_(r)}:r==="left"?{...v,top:0,left:-a/2,width:a,height:"100%",cursor:_(r)}:r==="top"?{...v,top:-a/2,left:0,width:"100%",height:a,cursor:_(r)}:r==="bottomRight"?{...v,bottom:-a/2,right:-a/2,width:a*2,height:a*2,cursor:_(r)}:r==="bottomLeft"?{...v,bottom:-a/2,left:-a/2,width:a*2,height:a*2,cursor:_(r)}:r==="topRight"?{...v,top:-a/2,right:-a/2,width:a*2,height:a*2,cursor:_(r)}:r==="topLeft"?{...v,top:-a/2,left:-a/2,width:a*2,height:a*2,cursor:_(r)}:v};return e.jsxs("div",{ref:l,className:`nice-resizable ${k||""}`,style:{...C,width:R.width,height:R.height,position:"relative",overflow:"hidden"},children:[h,m.map(r=>e.jsx("div",{style:f(r),onPointerDown:v=>p(r,v)},r))]})},vt=({direction:t="vertical",showScrollbar:i="onInteraction",width:c,height:o,onScroll:u,children:d,className:m,style:w})=>{const h=t==="horizontal"||t==="both"?"auto":"hidden",k=t==="vertical"||t==="both"?"auto":"hidden",C=i==="never"?"nice-scrollview--hide-sb":i==="always"?"nice-scrollview--show-sb":"";return e.jsx("div",{className:`nice-scrollview ${C} ${m||""}`,style:{...w,width:c,height:o,overflowX:h,overflowY:k},onScroll:u,children:d})};function ve(){const t=n.useContext(L.NiceThemeContext);return t?.portalTarget?t.portalTarget:typeof document<"u"?document.body:null}const yt=({open:t,onClose:i,children:c,title:o,size:u="md",closeOnBackdropClick:d=!0,closeOnEscape:m=!0,disableFocusTrap:w=!1,disableBodyScroll:h=!0,zIndex:k=1e3,className:C,style:R})=>{const I=n.useRef(null);L.useFocusTrap(I,t&&!w);const l=ve();n.useEffect(()=>{if(!h&&t){const f=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=f}}},[t,h]),n.useEffect(()=>{if(!m||!t)return;const f=r=>{r.key==="Escape"&&(r.preventDefault(),i())};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[m,t,i]);const p=n.useCallback(f=>{d&&f.target===f.currentTarget&&i()},[d,i]);if(!t)return null;const _={sm:"nice-modal--sm",md:"nice-modal--md",lg:"nice-modal--lg",xl:"nice-modal--xl",full:"nice-modal--full"}[u];return be.createPortal(e.jsx("div",{className:"nice-modal__overlay",style:{zIndex:k},onClick:p,role:"presentation",children:e.jsx("div",{ref:I,className:`nice-modal ${_} ${C||""}`,role:"dialog","aria-modal":"true","aria-label":o,style:R,tabIndex:-1,children:c})}),l)},Nt=({children:t,showClose:i=!0,onClose:c,className:o})=>e.jsxs("div",{className:`nice-modal__header ${o||""}`,children:[e.jsx("div",{className:"nice-modal__title",children:t}),i&&c&&e.jsx("button",{type:"button",className:"nice-modal__close",onClick:c,"aria-label":"Close",children:e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M4 4l12 12M4 16L16 4"})})})]}),kt=({children:t,className:i})=>e.jsx("div",{className:`nice-modal__body ${i||""}`,children:t}),jt=({children:t,className:i})=>e.jsx("div",{className:`nice-modal__footer ${i||""}`,children:t}),Ct=({open:t,onClose:i,children:c,position:o="right",size:u=320,title:d,closeOnBackdropClick:m=!0,closeOnEscape:w=!0,swipeToClose:h=!0,zIndex:k=1e3,className:C,style:R})=>{const I=n.useRef(null),[l,p]=n.useState(!1),[_,f]=n.useState(0);L.useFocusTrap(I,t);const r=ve();n.useEffect(()=>{if(!w||!t)return;const s=y=>{y.key==="Escape"&&(y.preventDefault(),i())};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[w,t,i]);const v=n.useCallback(s=>{let y=0;switch(o){case"left":y=Math.min(0,s.deltaX);break;case"right":y=Math.max(0,s.deltaX);break;case"top":y=Math.min(0,s.deltaY);break;case"bottom":y=Math.max(0,s.deltaY);break}f(y)},[o]),a=n.useCallback(s=>{let j=!1;switch(o){case"left":j=s.deltaX<-100;break;case"right":j=s.deltaX>100;break;case"top":j=s.deltaY<-100;break;case"bottom":j=s.deltaY>100;break}j&&(L.triggerHaptic("light"),i()),f(0),p(!1)},[o,i]),{ref:S}=L.usePan({enabled:h&&t,onPanStart:()=>p(!0),onPan:v,onPanEnd:a}),E=n.useCallback(s=>{m&&s.target===s.currentTarget&&i()},[m,i]);if(!t)return null;const Y=o==="left"||o==="right",B=Y?{width:typeof u=="number"?`${u}px`:u}:{height:typeof u=="number"?`${u}px`:u},N=()=>{if(l)return Y?`translateX(${_}px)`:`translateY(${_}px)`};return be.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`nice-drawer__overlay ${t?"nice-drawer__overlay--visible":""}`,style:{zIndex:k},onClick:E}),e.jsx("div",{ref:s=>{I.current=s,S.current=s},className:`nice-drawer nice-drawer--${o} ${t?"nice-drawer--open":""} ${C||""}`,style:{...B,zIndex:k+1,transform:N(),transition:l?"none":void 0,...R},role:"dialog","aria-modal":"true","aria-label":d,tabIndex:-1,children:c})]}),r)},Et=({open:t,onClose:i,children:c,title:o,showHandle:u=!0,snapPoints:d=[.5,.9],initialSnap:m=0,expandable:w=!0,closeOnBackdropClick:h=!0,closeOnEscape:k=!0,hapticFeedback:C=!0,zIndex:R=1e3,className:I,style:l})=>{const p=n.useRef(null),_=n.useRef(null),[f,r]=n.useState(m),[v,a]=n.useState(!1),[S,E]=n.useState(0),Y=n.useRef(0);n.useEffect(()=>{t&&(r(m),E(0))},[t,m]),L.useFocusTrap(p,t);const B=ve();n.useEffect(()=>{if(!k||!t)return;const $=P=>{P.key==="Escape"&&(P.preventDefault(),i())};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[k,t,i]),n.useEffect(()=>{if(t){const $=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=$}}},[t]);const N=n.useCallback($=>{const P=$.target.closest(".nice-bottom-sheet__handle"),x=_.current,b=!x||x.scrollTop<=0;!P&&!b||(a(!0),Y.current=$.touches[0].clientY)},[]),s=n.useCallback($=>{if(!v)return;const P=$.touches[0].clientY-Y.current;(P>0||f<d.length-1)&&E(P)},[v,f,d.length]),y=n.useCallback(()=>{if(!v)return;const $=window.innerHeight;d[f]*$;const P=-S,x=$*.15;P>x&&w&&f<d.length-1?(r(f+1),C&&L.triggerHaptic("selection")):P<-x&&(f>0?(r(f-1),C&&L.triggerHaptic("selection")):(C&&L.triggerHaptic("light"),i())),a(!1),E(0)},[v,S,f,d,w,C,i]),j=n.useCallback(()=>{h&&i()},[h,i]);if(!t)return null;const M=d[f]*100,z=v?S:0;return be.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`nice-bottom-sheet__overlay ${t?"nice-bottom-sheet__overlay--visible":""}`,style:{zIndex:R},onClick:j}),e.jsxs("div",{ref:p,className:`nice-bottom-sheet ${t?"nice-bottom-sheet--open":""} ${I||""}`,style:{zIndex:R+1,height:`${M}vh`,transform:`translateY(${Math.max(0,z)}px)`,transition:v?"none":"transform 0.3s ease-out, height 0.3s ease-out",...l},role:"dialog","aria-modal":"true","aria-label":o,tabIndex:-1,onTouchStart:N,onTouchMove:s,onTouchEnd:y,children:[u&&e.jsx("div",{className:"nice-bottom-sheet__handle","aria-hidden":"true"}),o&&e.jsx("div",{className:"nice-bottom-sheet__title",children:o}),e.jsx("div",{ref:_,className:"nice-bottom-sheet__content",children:c})]})]}),B)},Mt=({trigger:t,children:i,placement:c="bottom",triggerMode:o="click",open:u,onOpenChange:d,hoverDelay:m=200,offset:w=8,className:h,showArrow:k=!0})=>{const[C,R]=n.useState(!1),I=n.useRef(null),l=n.useRef(null),p=n.useRef(null),_=ve(),f=u!==void 0,r=f?u:C,v=n.useCallback(N=>{f||R(N),d?.(N)},[f,d]);L.useClickOutside(l,()=>{o!=="manual"&&r&&v(!1)});const a=n.useCallback(()=>{o==="click"&&v(!r)},[o,r,v]),S=n.useCallback(()=>{o==="hover"&&(p.current&&window.clearTimeout(p.current),p.current=window.setTimeout(()=>v(!0),m))},[o,m,v]),E=n.useCallback(()=>{o==="hover"&&(p.current&&window.clearTimeout(p.current),p.current=window.setTimeout(()=>v(!1),m))},[o,m,v]),[Y,B]=n.useState({top:0,left:0});return n.useEffect(()=>{if(!r||!I.current||!l.current)return;const N=I.current.getBoundingClientRect(),s=l.current.getBoundingClientRect(),y=window.innerWidth,j=window.innerHeight;let M=0,z=0;const[$,P="center"]=c.split("-");switch($){case"top":M=N.top-s.height-w,z=N.left+(N.width-s.width)/2;break;case"bottom":M=N.bottom+w,z=N.left+(N.width-s.width)/2;break;case"left":M=N.top+(N.height-s.height)/2,z=N.left-s.width-w;break;case"right":M=N.top+(N.height-s.height)/2,z=N.right+w;break}$==="top"||$==="bottom"?(P==="start"&&(z=N.left),P==="end"&&(z=N.right-s.width)):(P==="start"&&(M=N.top),P==="end"&&(M=N.bottom-s.height)),z=Math.max(8,Math.min(y-s.width-8,z)),M=Math.max(8,Math.min(j-s.height-8,M)),B({top:M,left:z})},[r,c,w]),e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:I,className:"nice-popover__trigger",onClick:a,onMouseEnter:S,onMouseLeave:E,style:{display:"inline-block"},children:t}),r&&be.createPortal(e.jsxs("div",{ref:l,className:`nice-popover nice-popover--${c} ${h||""}`,style:{position:"fixed",top:Y.top,left:Y.left,zIndex:1100},onMouseEnter:S,onMouseLeave:E,role:"tooltip",children:[k&&e.jsx("div",{className:"nice-popover__arrow"}),e.jsx("div",{className:"nice-popover__content",children:i})]}),_)]})},Rt=({items:t,children:i,onOpen:c,onClose:o,className:u})=>{const[d,m]=n.useState(!1),[w,h]=n.useState({x:0,y:0}),k=n.useRef(null),C=n.useRef(null),R=ve();L.useClickOutside(k,()=>{d&&(m(!1),o?.())});const I=n.useCallback(_=>{_.preventDefault(),h({x:_.clientX,y:_.clientY}),m(!0),c?.()},[c]),l=n.useCallback(_=>{!_.disabled&&_.onClick&&(_.onClick(),m(!1),o?.())},[o]);n.useEffect(()=>{if(!d)return;const _=f=>{f.key==="Escape"&&(m(!1),o?.())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[d,o]);const p=_=>e.jsx("ul",{className:"nice-context-menu__list",role:"menu",children:_.map(f=>f.divider?e.jsx("li",{className:"nice-context-menu__divider",role:"separator"},f.key):e.jsx("li",{role:"presentation",children:e.jsxs("button",{type:"button",className:`nice-context-menu__item ${f.disabled?"nice-context-menu__item--disabled":""} ${f.danger?"nice-context-menu__item--danger":""}`,role:"menuitem",disabled:f.disabled,onClick:()=>l(f),children:[f.icon&&e.jsx("span",{className:"nice-context-menu__icon",children:f.icon}),e.jsx("span",{className:"nice-context-menu__label",children:f.label})]})},f.key))});return e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:C,onContextMenu:I,style:{display:"contents"},children:i}),d&&be.createPortal(e.jsx("div",{ref:k,className:`nice-context-menu ${u||""}`,style:{position:"fixed",left:w.x,top:w.y,zIndex:1200},role:"menu",children:p(t)}),R)]})};function ze(t,i){if(!t)return{score:1,indices:[]};const c=t.toLowerCase(),o=i.toLowerCase();let u=0;const d=[];let m=0,w=-1;for(let h=0;h<o.length&&u<c.length;h++)o[h]===c[u]&&(d.push(h),w===h-1&&(m+=3),(h===0||/[\s\-_/.]/.test(i[h-1]))&&(m+=5),i[h]===t[u]&&(m+=1),m+=1,w=h,u++);return u<c.length?null:(m-=d[0]*.1,{score:m,indices:d})}function qe(t,i){if(i.length===0)return[t];const c=[];let o=0;const u=new Set(i);for(let d=0;d<t.length;d++)u.has(d)&&(o<d&&c.push(t.slice(o,d)),c.push(n.createElement("mark",{key:`m-${d}`,className:"nice-command-palette__match"},t[d])),o=d+1);return o<t.length&&c.push(t.slice(o)),c}function It(t,i){switch(i.type){case"REGISTER":{const c=new Map(t.commands);return c.set(i.command.id,i.command),{...t,commands:c}}case"REGISTER_BATCH":{const c=new Map(t.commands);for(const o of i.commands)c.set(o.id,o);return{...t,commands:c}}case"UNREGISTER":{const c=new Map(t.commands);return c.delete(i.id),{...t,commands:c}}case"OPEN":return{...t,isOpen:!0,query:"",selectedIndex:0};case"CLOSE":return{...t,isOpen:!1,query:"",selectedIndex:0};case"SET_QUERY":return{...t,query:i.query,selectedIndex:0};case"SET_SELECTED":return{...t,selectedIndex:i.index};case"ADD_RECENT":{const c=t.recentIds.filter(o=>o!==i.id);return{...t,recentIds:[i.id,...c].slice(0,i.maxRecent)}}default:return t}}const Fe=n.createContext(null);function We(){const t=n.useContext(Fe);if(!t)throw new Error("useCommandPalette must be used within NiceCommandPaletteProvider");return t}const Ae=({children:t,commands:i,placeholder:c,maxVisible:o=10,maxRecent:u=5,className:d,emptyText:m,closeOnAction:w=!0,onOpen:h,onClose:k})=>{const{t:C}=L.useNiceTranslation(),R=C("commandPalette.general","General"),I=ve(),[l,p]=n.useReducer(It,{commands:new Map(i?.map(x=>[x.id,x])??[]),isOpen:!1,query:"",selectedIndex:0,recentIds:[]}),_=n.useRef(null),f=n.useRef(null),[r,v]=n.useState(!1),a=n.useCallback(x=>{p({type:"REGISTER",command:x})},[]),S=n.useCallback(x=>{p({type:"UNREGISTER",id:x})},[]),E=n.useCallback(x=>{p({type:"REGISTER_BATCH",commands:x})},[]),Y=n.useCallback(()=>{p({type:"OPEN"}),h?.()},[h]),B=n.useCallback(()=>{p({type:"CLOSE"}),k?.()},[k]),N=n.useCallback(()=>{l.isOpen?B():Y()},[l.isOpen,B,Y]),y=n.useMemo(()=>{const x=Array.from(l.commands.values()).filter(g=>!g.hidden);if(!l.query.trim()){const g=l.recentIds.map(O=>l.commands.get(O)).filter(O=>!!O&&!O.hidden),X=x.filter(O=>!l.recentIds.includes(O.id));return X.sort((O,V)=>O.label.localeCompare(V.label)),[...g,...X].map(O=>({command:O,match:null,isRecent:l.recentIds.includes(O.id)}))}return x.map(g=>{const X=ze(l.query,g.label),O=g.description?ze(l.query,g.description):null,V=g.keywords?.map(Z=>ze(l.query,Z)).filter(Boolean)[0]??null,Q=[X,O,V].filter(Boolean).sort((Z,ie)=>(ie?.score??0)-(Z?.score??0))[0]??null;return{command:g,match:Q,isRecent:!1}}).filter(g=>g.match!==null).sort((g,X)=>(X.match?.score??0)-(g.match?.score??0))},[l.commands,l.query,l.recentIds]).slice(0,o),j=n.useCallback(async x=>{const b=l.commands.get(x);if(!(!b||b.disabled)){v(!0);try{await b.action(),p({type:"ADD_RECENT",id:x,maxRecent:u})}finally{v(!1),w&&B()}}},[l.commands,u,w,B]);n.useEffect(()=>{const x=b=>{(b.metaKey||b.ctrlKey)&&b.key==="k"&&(b.preventDefault(),N()),b.key==="Escape"&&l.isOpen&&(b.preventDefault(),B())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[N,l.isOpen,B]),n.useEffect(()=>{l.isOpen&&requestAnimationFrame(()=>_.current?.focus())},[l.isOpen]);const M=n.useCallback(x=>{const b=y.length;if(b){if(x.key==="ArrowDown")x.preventDefault(),p({type:"SET_SELECTED",index:(l.selectedIndex+1)%b});else if(x.key==="ArrowUp")x.preventDefault(),p({type:"SET_SELECTED",index:(l.selectedIndex-1+b)%b});else if(x.key==="Enter"){x.preventDefault();const g=y[l.selectedIndex];g&&j(g.command.id)}}},[y,l.selectedIndex,j]);n.useEffect(()=>{if(!f.current)return;f.current.children[l.selectedIndex]?.scrollIntoView({block:"nearest"})},[l.selectedIndex]);const z=n.useMemo(()=>({registerCommand:a,unregisterCommand:S,registerCommands:E,open:Y,close:B,toggle:N,isOpen:l.isOpen,executeCommand:j}),[a,S,E,Y,B,N,l.isOpen,j]),$=n.useMemo(()=>{const x=new Map;for(const b of y){const g=b.command.category??R;x.has(g)||x.set(g,[]),x.get(g).push(b)}return x},[y,R]);let P=0;return e.jsxs(Fe.Provider,{value:z,children:[t,l.isOpen&&be.createPortal(e.jsx("div",{className:`nice-command-palette__overlay ${d??""}`,onClick:B,children:e.jsxs("div",{className:"nice-command-palette",role:"dialog","aria-label":C("commandPalette.title","Command palette"),"aria-modal":"true",onClick:x=>x.stopPropagation(),children:[e.jsx("div",{className:"nice-command-palette__input-wrapper",children:e.jsx("input",{ref:_,className:"nice-command-palette__input",type:"text",placeholder:c??C("commandPalette.placeholder","Type a command..."),value:l.query,onChange:x=>p({type:"SET_QUERY",query:x.target.value}),onKeyDown:M,"aria-label":C("commandPalette.search","Search commands"),"aria-autocomplete":"list","aria-controls":"nice-command-palette-list","aria-activedescendant":y[l.selectedIndex]?`nice-cmd-${y[l.selectedIndex].command.id}`:void 0})}),e.jsxs("div",{ref:f,id:"nice-command-palette-list",className:"nice-command-palette__list",role:"listbox",children:[y.length===0&&e.jsx("div",{className:"nice-command-palette__empty",children:m??C("commandPalette.empty","No commands found")}),Array.from($.entries()).map(([x,b])=>e.jsxs("div",{className:"nice-command-palette__group",children:[e.jsx("div",{className:"nice-command-palette__category",children:x}),b.map(g=>{const X=P++,O=X===l.selectedIndex;return e.jsxs("div",{id:`nice-cmd-${g.command.id}`,className:`nice-command-palette__item ${O?"nice-command-palette__item--selected":""} ${g.command.disabled?"nice-command-palette__item--disabled":""}`,role:"option","aria-selected":O,"aria-disabled":g.command.disabled,onClick:()=>!g.command.disabled&&j(g.command.id),onMouseEnter:()=>p({type:"SET_SELECTED",index:X}),children:[g.command.icon&&e.jsx("span",{className:"nice-command-palette__icon",children:g.command.icon}),e.jsxs("div",{className:"nice-command-palette__label-group",children:[e.jsx("span",{className:"nice-command-palette__label",children:g.match&&l.query?qe(g.command.label,g.match.indices):g.command.label}),g.command.description&&e.jsx("span",{className:"nice-command-palette__description",children:g.command.description})]}),g.command.shortcut&&e.jsx("kbd",{className:"nice-command-palette__shortcut",children:g.command.shortcut}),g.isRecent&&e.jsx("span",{className:"nice-command-palette__recent-badge",children:C("commandPalette.recent","Recent")})]},g.command.id)})]},x))]}),r&&e.jsx("div",{className:"nice-command-palette__executing",children:C("commandPalette.executing","Executing...")})]})}),I)]})};Ae.displayName="NiceCommandPaletteProvider";function St(t){const{registerCommands:i,unregisterCommand:c}=We();n.useEffect(()=>(i(t),()=>{for(const o of t)c(o.id)}),[])}const Ke=n.forwardRef(({blocked:t,message:i,spinner:c,blur:o,children:u,className:d,style:m,id:w},h)=>{const k=L.useControlId(w);return e.jsxs("div",{ref:h,id:k,className:`nice-block-ui ${d||""}`,style:{position:"relative",...m},children:[u,t&&e.jsx("div",{className:`nice-block-ui__overlay${o?" nice-block-ui__overlay--blur":""}`,"aria-busy":"true",role:"alert",children:(c||i)&&e.jsxs("div",{className:"nice-block-ui__content",children:[c&&e.jsx("div",{className:"nice-block-ui__spinner","aria-hidden":"true"}),i&&e.jsx("div",{className:"nice-block-ui__message",children:i})]})})]})});Ke.displayName="NiceBlockUI";const Ue=n.forwardRef(({windows:t,children:i,onChange:c,onClose:o,onFocus:u,showTaskbar:d=!0,size:m="md",className:w,style:h,id:k,...C},R)=>{const I=L.useControlId(k),{t:l}=L.useNiceTranslation(),[p,_]=n.useState(null),f=n.useRef(null),r=t??[],v=Math.max(1,...r.map(s=>s.zIndex??1)),a=n.useCallback((s,y)=>{const j=r.map(M=>M.key===s?{...M,...y}:M);c?.(j)},[r,c]),S=n.useCallback(s=>{a(s,{zIndex:v+1}),u?.(s)},[a,v,u]),E=n.useCallback(s=>{o?.(s),c?.(r.filter(y=>y.key!==s))},[r,c,o]),Y=n.useCallback(s=>{const y=r.find(j=>j.key===s);y&&a(s,{minimized:!y.minimized,maximized:!1})},[r,a]),B=n.useCallback(s=>{const y=r.find(j=>j.key===s);y&&a(s,{maximized:!y.maximized,minimized:!1})},[r,a]);n.useEffect(()=>{if(!p)return;const s=j=>{const M=r.find(z=>z.key===p.key);if(M)if(p.mode==="move")a(p.key,{x:j.clientX-p.offsetX,y:j.clientY-p.offsetY});else{const $=f.current?.getBoundingClientRect(),P=$?.left??0,x=$?.top??0;a(p.key,{width:Math.max(200,j.clientX-P-M.x),height:Math.max(100,j.clientY-x-M.y)})}},y=()=>_(null);return document.addEventListener("mousemove",s),document.addEventListener("mouseup",y),()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",y)}},[p,r,a]);const N=n.useCallback((s,y,j)=>{y.preventDefault();const M=r.find(z=>z.key===s);M&&(S(s),_({key:s,offsetX:j==="move"?y.clientX-M.x:0,offsetY:j==="move"?y.clientY-M.y:0,mode:j}))},[r,S]);return e.jsxs("div",{ref:s=>{f.current=s,typeof R=="function"?R(s):R&&(R.current=s)},id:I,className:`nice-wm nice-wm--${m} ${w??""}`,style:{...h,position:"relative",overflow:"hidden"},...C,children:[r.map(s=>{if(s.minimized)return null;const y=s.maximized,j=y?{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:s.zIndex??1}:{position:"absolute",top:s.y,left:s.x,width:s.width,height:s.height,zIndex:s.zIndex??1};return e.jsxs("div",{className:`nice-wm__window ${y?"nice-wm__window--maximized":""}`,style:j,onMouseDown:()=>S(s.key),role:"dialog","aria-label":s.title,children:[e.jsxs("div",{className:"nice-wm__titlebar",onMouseDown:M=>!y&&N(s.key,M,"move"),children:[s.icon&&e.jsx("span",{className:"nice-wm__icon",children:s.icon}),e.jsx("span",{className:"nice-wm__title",children:s.title}),e.jsxs("div",{className:"nice-wm__controls",children:[(s.minimizable??!0)&&e.jsx("button",{type:"button",className:"nice-wm__ctrl-btn nice-wm__ctrl-btn--min",onClick:()=>Y(s.key),title:l("wm.minimize","Minimize"),children:e.jsx(L.NiceIcon,{name:"minus",size:14})}),(s.maximizable??!0)&&e.jsx("button",{type:"button",className:"nice-wm__ctrl-btn nice-wm__ctrl-btn--max",onClick:()=>B(s.key),title:l("wm.maximize","Maximize"),children:e.jsx(L.NiceIcon,{name:y?"copy":"window",size:14})}),(s.closable??!0)&&e.jsx("button",{type:"button",className:"nice-wm__ctrl-btn nice-wm__ctrl-btn--close",onClick:()=>E(s.key),title:l("wm.close","Close"),children:e.jsx(L.NiceIcon,{name:"close",size:14})})]})]}),e.jsx("div",{className:"nice-wm__body",children:s.content}),(s.resizable??!0)&&!y&&e.jsx("div",{className:"nice-wm__resize-handle",onMouseDown:M=>N(s.key,M,"resize")})]},s.key)}),t===void 0&&i,d&&e.jsx("div",{className:"nice-wm__taskbar",role:"toolbar","aria-label":l("wm.taskbar","Taskbar"),children:r.map(s=>e.jsxs("button",{type:"button",className:`nice-wm__taskbar-btn ${s.minimized?"nice-wm__taskbar-btn--minimized":""}`,onClick:()=>{s.minimized&&Y(s.key),S(s.key)},children:[s.icon&&e.jsx("span",{className:"nice-wm__taskbar-icon",children:s.icon}),e.jsx("span",{className:"nice-wm__taskbar-label",children:s.title})]},s.key))})]})});Ue.displayName="NiceWindowManager";function Tt(t,i){const c=document.querySelector(t);if(!c)return null;const o=c.getBoundingClientRect();return{top:o.top-i+window.scrollY,left:o.left-i+window.scrollX,width:o.width+i*2,height:o.height+i*2}}function zt(t,i,c,o){const d={w:window.innerWidth,h:window.innerHeight+window.scrollY},m={top:{top:t.top-c-12,left:t.left+t.width/2-i/2},bottom:{top:t.top+t.height+12,left:t.left+t.width/2-i/2},left:{top:t.top+t.height/2-c/2,left:t.left-i-12},right:{top:t.top+t.height/2-c/2,left:t.left+t.width+12}};if(o&&o!=="auto")return{...m[o],actualPlacement:o};for(const w of["bottom","top","right","left"]){const h=m[w];if(h.top>=0&&h.left>=0&&h.top+c<=d.h&&h.left+i<=d.w)return{...h,actualPlacement:w}}return{...m.bottom,actualPlacement:"bottom"}}const ye={width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};function $t(){return e.jsxs("svg",{...ye,children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Lt(){return e.jsx("svg",{...ye,children:e.jsx("polyline",{points:"15 18 9 12 15 6"})})}function Pt(){return e.jsx("svg",{...ye,children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})}function Dt(){return e.jsxs("svg",{...ye,children:[e.jsx("polygon",{points:"5 4 15 12 5 20 5 4"}),e.jsx("line",{x1:"19",y1:"5",x2:"19",y2:"19"})]})}function Yt(){return e.jsx("svg",{...ye,children:e.jsx("polygon",{points:"6 4 20 12 6 20 6 4",fill:"currentColor"})})}function Bt(){return e.jsxs("svg",{...ye,children:[e.jsx("rect",{x:"6",y:"4",width:"4",height:"16",fill:"currentColor"}),e.jsx("rect",{x:"14",y:"4",width:"4",height:"16",fill:"currentColor"})]})}function Te(t,i,c){return c==="text"?e.jsx("span",{className:"nice-tutorial__btn-label",children:i}):c==="icon-text"?e.jsxs(e.Fragment,{children:[t,e.jsx("span",{className:"nice-tutorial__btn-label",children:i})]}):t}const Xt=[],Xe=({steps:t=Xt,active:i,onFinish:c,onSkip:o,onStepChange:u,closeOnEscape:d=!0,closeOnOverlayClick:m=!1,showProgress:w=!0,showSkipButton:h=!0,labels:k,animationDuration:C=300,overlayOpacity:R=.6,zIndex:I=1e4,buttonsPlacement:l="floating-bottom",buttonsDisplay:p="icon",showAutoplay:_=!0,autoplayInterval:f=5e3,autoplaySpeedRange:r={min:2e3,max:15e3},onAutoplayChange:v})=>{const[a,S]=n.useState(0),[E,Y]=n.useState(null),[B,N]=n.useState({w:340,h:200}),[s,y]=n.useState(!0),[j,M]=n.useState(!1),[z,$]=n.useState(f),P=n.useRef(null),x=n.useRef(-1),b=t[a],g=a===t.length-1,X=a===0,O=k?.next??"Next",V=k?.back??"Back",Q=k?.finish??"Finish",Z=k?.skip??"Skip",ie=k?.stepOf??"of",he=k?.play??"Play",fe=k?.pause??"Pause",Ie=k?.speed??"Speed",Ne=k?.close??"Close";n.useEffect(()=>{i&&(S(0),M(!1),$(f))},[i,f]),n.useEffect(()=>{if(P.current){const D=P.current.getBoundingClientRect();N({w:D.width,h:D.height})}},[a,i]),n.useEffect(()=>{if(!i||!b)return;const D=b.highlightPadding??0,H=()=>{const A=Tt(b.target,D);Y(A)};if(H(),b.scrollIntoView!==!1){document.querySelector(b.target)?.scrollIntoView({behavior:"smooth",block:"center"});const J=setTimeout(H,350);return()=>clearTimeout(J)}},[i,b,a]),n.useEffect(()=>{!i||!b||x.current!==a&&(x.current>=0&&x.current<t.length&&t[x.current]?.onLeave?.(),b.onEnter?.(),x.current=a)},[i,b,a,t]);const se=n.useCallback(()=>{if(g)b?.onLeave?.(),c?.();else{const D=a+1;S(D),u?.(D)}},[a,g,c,u,b]),pe=n.useCallback(()=>{if(!X){const D=a-1;S(D),u?.(D)}},[a,X,u]);n.useEffect(()=>{if(!i||!b?.advanceOn)return;const D=document.querySelector(b.target);if(!D)return;const H=()=>se();return D.addEventListener(b.advanceOn.event,H),()=>D.removeEventListener(b.advanceOn.event,H)},[i,b,a,se]),n.useEffect(()=>{if(!i)return;const D=H=>{H.key==="Escape"&&d?o?.():H.key==="ArrowRight"?se():H.key==="ArrowLeft"&&pe()};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[i,a,d,se,pe,o]),n.useEffect(()=>{y(!0);const D=setTimeout(()=>y(!1),C);return()=>clearTimeout(D)},[a,C]),n.useEffect(()=>{if(!i||!j)return;const D=setInterval(()=>{S(H=>{if(H>=t.length-1)return M(!1),v?.(!1),t[H]?.onLeave?.(),c?.(),H;const A=H+1;return u?.(A),A})},Math.max(500,z));return()=>clearInterval(D)},[i,j,z,t,v,c,u]);const Se=n.useCallback(()=>{M(D=>{const H=!D;return v?.(H),H})},[v]),xe=n.useMemo(()=>E?zt(E,B.w,B.h,b?.placement):{top:typeof window<"u"?window.innerHeight/2:0,left:typeof window<"u"?window.innerWidth/2:0,actualPlacement:"bottom"},[E,B,b?.placement]),ke=t.length===0?0:(a+1)/t.length*100,G=n.useCallback(D=>{const H=_&&t.length>1,A=h&&!g&&e.jsx("button",{type:"button",className:`nice-tutorial__btn nice-tutorial__btn--skip nice-tutorial__btn--${p}`,onClick:o,"aria-label":Z,title:Z,children:Te(e.jsx(Dt,{}),Z,p)}),J=!X&&e.jsx("button",{type:"button",className:`nice-tutorial__btn nice-tutorial__btn--back nice-tutorial__btn--${p}`,onClick:pe,"aria-label":V,title:V,children:Te(e.jsx(Lt,{}),V,p)}),we=!b?.waitForAction&&e.jsx("button",{type:"button",className:`nice-tutorial__btn nice-tutorial__btn--next nice-tutorial__btn--${p}`,onClick:se,"aria-label":g?Q:O,title:g?Q:O,children:Te(e.jsx(Pt,{}),g?Q:O,p)}),ge=H&&e.jsx("button",{type:"button",className:["nice-tutorial__btn","nice-tutorial__btn--play",`nice-tutorial__btn--${p}`,j?"nice-tutorial__btn--active":""].filter(Boolean).join(" "),onClick:Se,"aria-label":j?fe:he,title:j?fe:he,"aria-pressed":j,children:Te(j?e.jsx(Bt,{}):e.jsx(Yt,{}),j?fe:he,p)});return e.jsxs("div",{className:["nice-tutorial__controls",D?"nice-tutorial__controls--inline":"nice-tutorial__controls--floating-bottom"].join(" "),style:D?void 0:{zIndex:I+2},role:"group","aria-label":"Tutorial controls",children:[A,J,w&&e.jsxs("span",{className:"nice-tutorial__step-label","aria-live":"polite",children:[a+1," ",ie," ",t.length]}),we,H&&e.jsx("div",{className:"nice-tutorial__progress-bar",role:"progressbar","aria-valuenow":Math.round(ke),"aria-valuemin":0,"aria-valuemax":100,"aria-label":`${a+1} ${ie} ${t.length}`,children:e.jsx("div",{className:"nice-tutorial__progress-bar-fill",style:{width:`${ke}%`}})}),ge,H&&e.jsxs("label",{className:"nice-tutorial__speed",children:[e.jsx("input",{type:"range",className:"nice-tutorial__speed-slider",min:r.min,max:r.max,step:500,value:r.min+r.max-z,onChange:$e=>$(r.min+r.max-Number($e.target.value)),"aria-label":Ie}),e.jsxs("span",{className:"nice-tutorial__speed-value",children:[(z/1e3).toFixed(1),"s"]})]})]})},[_,h,w,p,X,g,o,Z,V,O,Q,he,fe,Ie,ie,pe,se,b,j,Se,a,t.length,ke,z,r,I]);if(!i||!b)return null;const je=typeof document<"u"?Math.max(document.documentElement.scrollWidth,window.innerWidth):0,F=typeof document<"u"?Math.max(document.documentElement.scrollHeight,window.innerHeight):0;return e.jsxs("div",{className:"nice-tutorial",style:{zIndex:I},"aria-modal":"true",role:"dialog","aria-label":"Tutorial",children:[e.jsxs("svg",{className:"nice-tutorial__overlay",style:{position:"absolute",top:0,left:0,width:je,height:F,pointerEvents:"auto"},onClick:m?o:void 0,children:[e.jsx("defs",{children:e.jsxs("mask",{id:"nice-tutorial-mask",children:[e.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),E&&e.jsx("rect",{x:E.left,y:E.top,width:E.width,height:E.height,rx:"4",fill:"black",className:s?"nice-tutorial__spotlight--entering":""})]})}),e.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`rgba(0,0,0,${R})`,mask:"url(#nice-tutorial-mask)"})]}),E&&e.jsx("div",{className:`nice-tutorial__highlight ${s?"nice-tutorial__highlight--entering":""}`,style:{position:"absolute",top:E.top,left:E.left,width:E.width,height:E.height,transition:`all ${C}ms ease`}}),b.disableInteraction&&E&&e.jsx("div",{className:"nice-tutorial__blocker",style:{position:"absolute",top:E.top,left:E.left,width:E.width,height:E.height}}),e.jsxs("div",{ref:P,className:`nice-tutorial__tooltip nice-tutorial__tooltip--${xe.actualPlacement} ${s?"nice-tutorial__tooltip--entering":""}`,style:{position:"absolute",top:xe.top,left:xe.left,transition:`all ${C}ms ease`,maxWidth:380,zIndex:I+1},children:[b.showArrow!==!1&&e.jsx("div",{className:`nice-tutorial__arrow nice-tutorial__arrow--${xe.actualPlacement}`}),e.jsxs("div",{className:"nice-tutorial__header",children:[e.jsx("h4",{className:"nice-tutorial__title",children:b.title}),h&&e.jsx("button",{type:"button",className:"nice-tutorial__close",onClick:o,"aria-label":Ne,title:Ne,children:e.jsx($t,{})})]}),e.jsx("div",{className:"nice-tutorial__content",dangerouslySetInnerHTML:{__html:L.sanitizeHtml(b.content)}}),l==="inline"&&G(!0)]}),l==="floating-bottom"&&G(!1)]})};Xe.displayName="NiceTutorial";const Ge=n.createContext({startTutorial:()=>{},stopTutorial:()=>{},isActive:!1,currentStep:0,nextStep:()=>{},prevStep:()=>{},goToStep:()=>{}});function Ot(){return n.useContext(Ge)}const Ve=({children:t})=>{const[i,c]=n.useState([]),[o,u]=n.useState(!1),[d,m]=n.useState(0),w=n.useCallback(l=>{c(l),m(0),u(!0)},[]),h=n.useCallback(()=>{u(!1),m(0),c([])},[]),k=n.useCallback(()=>{m(l=>Math.min(l+1,i.length-1))},[i.length]),C=n.useCallback(()=>{m(l=>Math.max(l-1,0))},[]),R=n.useCallback(l=>{m(Math.max(0,Math.min(l,i.length-1)))},[i.length]),I={startTutorial:w,stopTutorial:h,isActive:o,currentStep:d,nextStep:k,prevStep:C,goToStep:R};return e.jsxs(Ge.Provider,{value:I,children:[t,o&&i.length>0&&e.jsx(Xe,{steps:i,active:o,onFinish:h,onSkip:h,onStepChange:m})]})};Ve.displayName="NiceTutorialProvider";function Ht(t,i,c,o,u){const d=t<=u,m=t+u>=c,w=i<=u,h=i+u>=o;return w&&d?"top-left":w&&m?"top-right":h&&d?"bottom-left":h&&m?"bottom-right":d?"left":m?"right":w?"top":h?"bottom":"none"}function qt(t){switch(t){case"left":return{left:0,top:0,width:"50%",height:"100%"};case"right":return{left:"50%",top:0,width:"50%",height:"100%"};case"top":return{left:0,top:0,width:"100%",height:"50%"};case"bottom":return{left:0,top:"50%",width:"100%",height:"50%"};case"top-left":return{left:0,top:0,width:"50%",height:"50%"};case"top-right":return{left:"50%",top:0,width:"50%",height:"50%"};case"bottom-left":return{left:0,top:"50%",width:"50%",height:"50%"};case"bottom-right":return{left:"50%",top:"50%",width:"50%",height:"50%"};default:return null}}const Qe=n.forwardRef(({windowKey:t,title:i,icon:c,children:o,footer:u,x:d,y:m,defaultPosition:w,width:h=480,height:k=360,minWidth:C=200,minHeight:R=120,maxWidth:I,maxHeight:l,zIndex:p=1,closable:_=!0,minimizable:f=!0,maximizable:r=!0,fullscreenable:v=!1,pinnable:a=!1,resizable:S=!0,draggable:E=!0,snappable:Y=!0,snapThreshold:B=20,minimized:N,maximized:s,fullscreen:y,pinned:j,focused:M,onClose:z,onMinimize:$,onMaximize:P,onFullscreen:x,onPin:b,onFocus:g,onMove:X,onResize:O,onSnap:V,onTitleBarDoubleClick:Q,size:Z="md",statusBar:ie,titleBarActions:he,className:fe,style:Ie,id:Ne,accessMode:se,...pe},Se)=>{const xe=L.useControlId(Ne),ke=L.useNiceAccessMode(se,Ne),{t:G}=L.useNiceTranslation(),je=n.useRef(null);je.current==null&&(je.current=`nice-window-${Math.random().toString(36).slice(2,10)}`);const F=t??je.current,D=d??w?.x??100,H=m??w?.y??100,[A,J]=n.useState({x:D,y:H}),[we,ge]=n.useState({width:h,height:k}),[$e,Ze]=n.useState(!1),[Je,et]=n.useState(!1),[tt,nt]=n.useState(!1),[it,st]=n.useState(!1),[te,Le]=n.useState("none"),ot=N??$e,ee=s??Je,K=y??tt,Ce=j??it,Pe=M??!0,ue=A.x,me=A.y,oe=we.width,ce=we.height,re=n.useRef(null),U=n.useRef(null),q=n.useRef(null),ct=n.useCallback(()=>{z?.(F)},[F,z]),rt=n.useCallback(()=>{Ze(!0),$?.(F)},[F,$]),De=n.useCallback(()=>{const T=!ee;et(T),!T&&q.current?(J({x:q.current.x,y:q.current.y}),ge({width:q.current.w,height:q.current.h}),q.current=null):T&&(q.current={x:ue,y:me,w:oe,h:ce}),Le("none"),P?.(F,T)},[F,ee,ue,me,oe,ce,P]),Ye=n.useCallback(()=>{const T=!K;nt(T),T?q.current={x:ue,y:me,w:oe,h:ce}:q.current&&(J({x:q.current.x,y:q.current.y}),ge({width:q.current.w,height:q.current.h}),q.current=null),x?.(F,T)},[F,K,ue,me,oe,ce,x]),at=n.useCallback(()=>{const T=!Ce;st(T),b?.(F,T)},[F,Ce,b]),Ee=n.useCallback(()=>{g?.(F)},[F,g]),lt=n.useCallback(()=>{Q?Q(F):r&&De()},[F,r,De,Q]);n.useEffect(()=>{const T=ae=>{if(!re.current)return;const ne=ae.clientX-re.current.startX+re.current.origX,Me=ae.clientY-re.current.startY+re.current.origY;J({x:ne,y:Me}),X?.(F,{x:ne,y:Me})},W=ae=>{if(re.current){if(Y){const ne=Ht(ae.clientX,ae.clientY,window.innerWidth,window.innerHeight,B);ne!=="none"&&(q.current={x:A.x,y:A.y,w:oe,h:ce},Le(ne),V?.(F,ne))}re.current=null}};return document.addEventListener("mousemove",T),document.addEventListener("mouseup",W),()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",W)}});const dt=n.useCallback(T=>{!E||ee||K||(T.preventDefault(),te!=="none"&&(q.current&&(J({x:q.current.x,y:q.current.y}),ge({width:q.current.w,height:q.current.h})),Le("none")),Ee(),re.current={startX:T.clientX,startY:T.clientY,origX:ue,origY:me})},[E,ee,K,te,ue,me,Ee]);n.useEffect(()=>{const T=ae=>{if(!U.current)return;const ne=ae.clientX-U.current.startX,Me=ae.clientY-U.current.startY,_e=U.current.handle;let le=U.current.origW,de=U.current.origH;if(_e.includes("e")&&(le=U.current.origW+ne),_e.includes("w")&&(le=U.current.origW-ne),_e.includes("s")&&(de=U.current.origH+Me),_e.includes("n")&&(de=U.current.origH-Me),le=Math.max(C,I?Math.min(I,le):le),de=Math.max(R,l?Math.min(l,de):de),_e.includes("w")){const Be=we.width-le;J(Re=>({...Re,x:Re.x+Be}))}if(_e.includes("n")){const Be=we.height-de;J(Re=>({...Re,y:Re.y+Be}))}ge({width:le,height:de}),O?.(F,{width:le,height:de})},W=()=>{U.current=null};return document.addEventListener("mousemove",T),document.addEventListener("mouseup",W),()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",W)}});const ut=n.useCallback((T,W)=>{!S||ee||K||te!=="none"||(W.preventDefault(),W.stopPropagation(),Ee(),U.current={startX:W.clientX,startY:W.clientY,origW:oe,origH:ce,handle:T})},[S,ee,K,te,oe,ce,Ee]);if(n.useEffect(()=>{if(!Pe)return;const T=W=>{W.key==="Escape"&&K&&Ye()};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[Pe,K,Ye]),ke==="hidden"||ot)return null;const Oe=te!=="none"?qt(te):null,He=ee||K,mt=K?{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:999999}:ee?{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:p}:Oe?{position:"absolute",...Oe,zIndex:p}:{position:"absolute",top:me,left:ue,width:oe,height:ce,zIndex:p},ht=["n","e","s","w","ne","se","sw","nw"],ft={n:"ns-resize",s:"ns-resize",e:"ew-resize",w:"ew-resize",ne:"nesw-resize",sw:"nesw-resize",nw:"nwse-resize",se:"nwse-resize"};return e.jsxs("div",{ref:Se,id:xe,className:`nice-window nice-window--${Z} ${Pe?"nice-window--focused":""} ${Ce?"nice-window--pinned":""} ${He?"nice-window--maximized":""} ${te!=="none"?`nice-window--snapped-${te}`:""} ${fe??""}`,style:{...mt,...Ie},onMouseDown:Ee,role:"dialog","aria-label":i,...pe,children:[e.jsxs("div",{className:"nice-window__titlebar",onMouseDown:dt,onDoubleClick:lt,children:[c&&e.jsx("span",{className:"nice-window__icon",children:c}),e.jsx("span",{className:"nice-window__title",children:i}),e.jsxs("div",{className:"nice-window__actions",children:[he,a&&e.jsx("button",{type:"button",className:`nice-window__action nice-window__action--pin ${Ce?"nice-window__action--active":""}`,onClick:at,title:Ce?G("window.unpin","Unpin"):G("window.pin","Pin"),children:e.jsx(L.NiceIcon,{name:"paperclip",size:14})}),f&&e.jsx("button",{type:"button",className:"nice-window__action nice-window__action--minimize",onClick:rt,title:G("window.minimize","Minimize"),children:e.jsx(L.NiceIcon,{name:"minus",size:14})}),r&&e.jsx("button",{type:"button",className:"nice-window__action nice-window__action--maximize",onClick:De,title:ee?G("window.restore","Restore"):G("window.maximize","Maximize"),children:e.jsx(L.NiceIcon,{name:ee?"copy":"window",size:14})}),v&&e.jsx("button",{type:"button",className:"nice-window__action nice-window__action--fullscreen",onClick:Ye,title:K?G("window.exitFullscreen","Exit Full Screen"):G("window.fullscreen","Full Screen"),children:e.jsx(L.NiceIcon,{name:K?"collapse":"expand",size:14})}),_&&e.jsx("button",{type:"button",className:"nice-window__action nice-window__action--close",onClick:ct,title:G("window.close","Close"),children:e.jsx(L.NiceIcon,{name:"close",size:14})})]})]}),e.jsx("div",{className:"nice-window__body",children:o}),u&&e.jsx("div",{className:"nice-window__footer",children:u}),ie&&e.jsx("div",{className:"nice-window__statusbar",children:ie}),S&&!He&&te==="none"&&e.jsx(e.Fragment,{children:ht.map(T=>e.jsx("div",{className:`nice-window__resize nice-window__resize--${T}`,style:{cursor:ft[T]},onMouseDown:W=>ut(T,W)},T))})]})});Qe.displayName="NiceWindow";exports.NiceActionSheet=pt;exports.NiceBlockUI=Ke;exports.NiceBottomSheet=Et;exports.NiceBox=gt;exports.NiceCommandPaletteProvider=Ae;exports.NiceContextMenu=Rt;exports.NiceDrawer=Ct;exports.NiceLoadPanel=wt;exports.NiceModal=yt;exports.NiceModalBody=kt;exports.NiceModalFooter=jt;exports.NiceModalHeader=Nt;exports.NicePopover=Mt;exports.NicePopover$1=xt;exports.NiceResizable=bt;exports.NiceResponsiveBox=_t;exports.NiceScrollView=vt;exports.NiceTutorial=Xe;exports.NiceTutorialProvider=Ve;exports.NiceWindow=Qe;exports.NiceWindowManager=Ue;exports.fuzzyMatch=ze;exports.highlightMatches=qe;exports.useCommandPalette=We;exports.useNiceTutorial=Ot;exports.useRegisterCommands=St;
|
package/dist/NiceWindow.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.nice-tutorial{pointer-events:none}.nice-tutorial *{pointer-events:auto}.nice-tutorial__highlight{pointer-events:none;border:2px solid var(--nice-color-primary, #2563eb);border-radius:var(--nice-radius-sm, 4px);box-shadow:0 0 0 2px color-mix(in srgb,var(--nice-color-primary, #2563eb) 30%,transparent)}.nice-tutorial__blocker{background:transparent;cursor:not-allowed}.nice-tutorial__tooltip{background:var(--nice-bg-elevated, var(--nice-bg-primary));color:var(--nice-text-primary);border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-md, 8px);box-shadow:0 8px 24px color-mix(in srgb,#000 18%,transparent);padding:var(--nice-space-4, 16px);pointer-events:auto}.nice-tutorial__tooltip--entering{opacity:0;transform:translateY(-4px)}.nice-tutorial__header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--nice-space-3, 12px)}.nice-tutorial__title{margin:0;font-size:1rem;font-weight:600;line-height:1.3;color:var(--nice-text-primary);flex:1;min-width:0}.nice-tutorial__close{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;background:transparent;border:none;border-radius:var(--nice-radius-sm, 4px);color:var(--nice-text-secondary, var(--nice-text-primary));cursor:pointer;transition:background .15s,color .15s}.nice-tutorial__close:hover,.nice-tutorial__close:focus-visible{background:var(--nice-hover-bg, color-mix(in srgb, var(--nice-text-primary) 8%, transparent));color:var(--nice-text-primary);outline:none}.nice-tutorial__content{margin-top:var(--nice-space-2, 8px);font-size:.9rem;line-height:1.5;color:var(--nice-text-secondary, var(--nice-text-primary))}.nice-tutorial__content p{margin:0 0 var(--nice-space-2, 8px) 0}.nice-tutorial__content p:last-child{margin-bottom:0}.nice-tutorial__content code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.85em;padding:var(--nice-space-px, 1px) var(--nice-space-1, 4px);background:color-mix(in srgb,var(--nice-text-primary) 8%,transparent);border-radius:var(--nice-radius-sm, 4px)}.nice-tutorial__arrow{position:absolute;width:12px;height:12px;background:var(--nice-bg-elevated, var(--nice-bg-primary));border:1px solid var(--nice-border-color);transform:rotate(45deg)}.nice-tutorial__arrow--top{bottom:-7px;left:50%;margin-left:calc(var(--nice-space-1-5, 6px) * -1);border-top:none;border-left:none}.nice-tutorial__arrow--bottom{top:-7px;left:50%;margin-left:calc(var(--nice-space-1-5, 6px) * -1);border-bottom:none;border-right:none}.nice-tutorial__arrow--left{right:-7px;top:50%;margin-top:calc(var(--nice-space-1-5, 6px) * -1);border-left:none;border-bottom:none}.nice-tutorial__arrow--right{left:-7px;top:50%;margin-top:calc(var(--nice-space-1-5, 6px) * -1);border-right:none;border-top:none}.nice-tutorial__controls{display:inline-flex;align-items:center;gap:var(--nice-space-2, 8px);padding:var(--nice-space-2, 8px) var(--nice-space-3, 12px);background:var(--nice-bg-elevated, var(--nice-bg-primary));color:var(--nice-text-primary);border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-full, 999px);box-shadow:0 8px 24px color-mix(in srgb,#000 25%,transparent);font-size:.85rem;pointer-events:auto}.nice-tutorial__controls--floating-bottom{position:fixed;left:50%;bottom:var(--nice-space-6, 24px);transform:translate(-50%)}.nice-tutorial__controls--inline{display:flex;margin-top:var(--nice-space-3, 12px);padding:0;background:transparent;border:none;border-radius:0;box-shadow:none;justify-content:space-between;flex-wrap:wrap}.nice-tutorial__step-label{font-size:.8rem;color:var(--nice-text-secondary, var(--nice-text-primary));padding:0 var(--nice-space-2, 8px);white-space:nowrap;font-variant-numeric:tabular-nums}.nice-tutorial__progress{display:inline-flex;align-items:center;gap:var(--nice-space-1, 4px)}.nice-tutorial__dot{display:inline-block;width:6px;height:6px;border-radius:var(--nice-radius-circle, 50%);background:var(--nice-border-color);transition:background .15s}.nice-tutorial__dot--done{background:color-mix(in srgb,var(--nice-color-primary) 60%,transparent)}.nice-tutorial__dot--active{background:var(--nice-color-primary);transform:scale(1.3)}.nice-tutorial__progress-bar{width:120px;height:6px;background:color-mix(in srgb,var(--nice-text-primary) 10%,transparent);border-radius:var(--nice-radius-full, 999px);overflow:hidden}.nice-tutorial__progress-bar-fill{height:100%;background:var(--nice-color-primary);transition:width .2s ease;border-radius:inherit}.nice-tutorial__speed{display:inline-flex;align-items:center;gap:var(--nice-space-1, 4px);font-size:.75rem;color:var(--nice-text-secondary, var(--nice-text-primary))}.nice-tutorial__speed-slider{width:80px;accent-color:var(--nice-color-primary)}.nice-tutorial__speed-value{min-width:32px;text-align:right;font-variant-numeric:tabular-nums}.nice-tutorial__btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--nice-space-1, 4px);padding:0;width:32px;height:32px;background:transparent;border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-circle, 50%);color:var(--nice-text-primary);font:inherit;cursor:pointer;transition:background .15s,border-color .15s,color .15s,transform .05s}.nice-tutorial__btn:hover,.nice-tutorial__btn:focus-visible{background:var(--nice-hover-bg, color-mix(in srgb, var(--nice-color-primary) 10%, transparent));border-color:var(--nice-color-primary);color:var(--nice-color-primary);outline:none}.nice-tutorial__btn:active{transform:translateY(1px)}.nice-tutorial__btn[disabled]{opacity:.4;cursor:not-allowed;pointer-events:none}.nice-tutorial__btn--next{background:var(--nice-color-primary);color:var(--nice-text-on-primary, #fff);border-color:var(--nice-color-primary)}.nice-tutorial__btn--next:hover,.nice-tutorial__btn--next:focus-visible{background:color-mix(in srgb,var(--nice-color-primary) 85%,#000);color:var(--nice-text-on-primary, #fff)}.nice-tutorial__btn--play.nice-tutorial__btn--active{background:var(--nice-color-primary);color:var(--nice-text-on-primary, #fff);border-color:var(--nice-color-primary)}.nice-tutorial__btn--icon-text,.nice-tutorial__btn--text{width:auto;min-width:32px;height:32px;padding:0 var(--nice-space-3, 12px);border-radius:var(--nice-radius-full, 999px)}.nice-tutorial__btn-label{white-space:nowrap}.nice-tutorial__btn svg{flex-shrink:0}.nice-tutorial__controls--inline .nice-tutorial__actions{display:inline-flex;align-items:center;gap:var(--nice-space-2, 8px)}@media(prefers-reduced-motion:reduce){.nice-tutorial__tooltip,.nice-tutorial__highlight,.nice-tutorial__progress-bar-fill{transition:none!important}}
|
|
1
|
+
.nice-command-palette__overlay{position:fixed;inset:0;z-index:var(--nice-z-modal);display:flex;align-items:flex-start;justify-content:center;padding:15vh var(--nice-space-4, 16px) var(--nice-space-4, 16px);background:var(--nice-overlay-50);animation:nice-fade-in var(--nice-transition)}.nice-command-palette{display:flex;flex-direction:column;width:min(640px,100%);max-height:70vh;overflow:hidden;background:var(--nice-bg-elevated, var(--nice-bg-primary));color:var(--nice-text-primary);border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-xl, 12px);box-shadow:var(--nice-shadow-xl);font-family:var(--nice-font-family)}.nice-command-palette__input-wrapper{padding:var(--nice-space-3, 12px) var(--nice-space-4, 16px);border-bottom:1px solid var(--nice-border-color)}.nice-command-palette__input-wrapper:focus-within{border-bottom-color:var(--nice-color-primary)}.nice-command-palette__input{width:100%;padding:var(--nice-space-1, 4px) 0;border:none;outline:none;background:transparent;color:inherit;font:inherit;font-size:1rem}.nice-command-palette__input::placeholder{color:var(--nice-text-muted)}.nice-command-palette__list{flex:1;min-height:0;overflow-y:auto;padding:var(--nice-space-2, 8px)}.nice-command-palette__group+.nice-command-palette__group{margin-top:var(--nice-space-2, 8px)}.nice-command-palette__category{padding:var(--nice-space-1, 4px) var(--nice-space-3, 12px);color:var(--nice-text-muted);font-size:.75rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.nice-command-palette__item{display:flex;align-items:center;gap:var(--nice-space-3, 12px);padding:var(--nice-space-2, 8px) var(--nice-space-3, 12px);border-radius:var(--nice-radius-md, 8px);cursor:pointer}.nice-command-palette__item--selected{background:var(--nice-primary-tint-15)}.nice-command-palette__item--disabled{opacity:.5;cursor:not-allowed}.nice-command-palette__icon{display:inline-flex;flex-shrink:0;color:var(--nice-text-secondary)}.nice-command-palette__label-group{display:flex;flex:1;flex-direction:column;min-width:0}.nice-command-palette__label,.nice-command-palette__description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nice-command-palette__label{font-size:.875rem}.nice-command-palette__description{color:var(--nice-text-muted);font-size:.75rem}.nice-command-palette__match{background:transparent;color:var(--nice-color-primary);font-weight:600}.nice-command-palette__shortcut{flex-shrink:0;padding:2px var(--nice-space-1-5, 6px);border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-sm, 4px);background:var(--nice-bg-secondary);color:var(--nice-text-secondary);font-family:var(--nice-font-mono, monospace);font-size:.75rem}.nice-command-palette__recent-badge{flex-shrink:0;padding:2px var(--nice-space-2, 8px);border-radius:999px;background:var(--nice-bg-secondary);color:var(--nice-text-muted);font-size:.6875rem}.nice-command-palette__empty{padding:var(--nice-space-6, 24px);color:var(--nice-text-muted);font-size:.875rem;text-align:center}.nice-command-palette__executing{padding:var(--nice-space-2, 8px) var(--nice-space-4, 16px);border-top:1px solid var(--nice-border-color);color:var(--nice-text-muted);font-size:.75rem}@media(prefers-reduced-motion:reduce){.nice-command-palette__overlay{animation:none}}.nice-tutorial{pointer-events:none}.nice-tutorial *{pointer-events:auto}.nice-tutorial__highlight{pointer-events:none;border:2px solid var(--nice-color-primary, #2563eb);border-radius:var(--nice-radius-sm, 4px);box-shadow:0 0 0 2px color-mix(in srgb,var(--nice-color-primary, #2563eb) 30%,transparent)}.nice-tutorial__blocker{background:transparent;cursor:not-allowed}.nice-tutorial__tooltip{background:var(--nice-bg-elevated, var(--nice-bg-primary));color:var(--nice-text-primary);border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-md, 8px);box-shadow:0 8px 24px color-mix(in srgb,#000 18%,transparent);padding:var(--nice-space-4, 16px);pointer-events:auto}.nice-tutorial__tooltip--entering{opacity:0;transform:translateY(-4px)}.nice-tutorial__header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--nice-space-3, 12px)}.nice-tutorial__title{margin:0;font-size:1rem;font-weight:600;line-height:1.3;color:var(--nice-text-primary);flex:1;min-width:0}.nice-tutorial__close{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;background:transparent;border:none;border-radius:var(--nice-radius-sm, 4px);color:var(--nice-text-secondary, var(--nice-text-primary));cursor:pointer;transition:background .15s,color .15s}.nice-tutorial__close:hover,.nice-tutorial__close:focus-visible{background:var(--nice-hover-bg, color-mix(in srgb, var(--nice-text-primary) 8%, transparent));color:var(--nice-text-primary);outline:none}.nice-tutorial__content{margin-top:var(--nice-space-2, 8px);font-size:.9rem;line-height:1.5;color:var(--nice-text-secondary, var(--nice-text-primary))}.nice-tutorial__content p{margin:0 0 var(--nice-space-2, 8px) 0}.nice-tutorial__content p:last-child{margin-bottom:0}.nice-tutorial__content code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.85em;padding:var(--nice-space-px, 1px) var(--nice-space-1, 4px);background:color-mix(in srgb,var(--nice-text-primary) 8%,transparent);border-radius:var(--nice-radius-sm, 4px)}.nice-tutorial__arrow{position:absolute;width:12px;height:12px;background:var(--nice-bg-elevated, var(--nice-bg-primary));border:1px solid var(--nice-border-color);transform:rotate(45deg)}.nice-tutorial__arrow--top{bottom:-7px;left:50%;margin-left:calc(var(--nice-space-1-5, 6px) * -1);border-top:none;border-left:none}.nice-tutorial__arrow--bottom{top:-7px;left:50%;margin-left:calc(var(--nice-space-1-5, 6px) * -1);border-bottom:none;border-right:none}.nice-tutorial__arrow--left{right:-7px;top:50%;margin-top:calc(var(--nice-space-1-5, 6px) * -1);border-left:none;border-bottom:none}.nice-tutorial__arrow--right{left:-7px;top:50%;margin-top:calc(var(--nice-space-1-5, 6px) * -1);border-right:none;border-top:none}.nice-tutorial__controls{display:inline-flex;align-items:center;gap:var(--nice-space-2, 8px);padding:var(--nice-space-2, 8px) var(--nice-space-3, 12px);background:var(--nice-bg-elevated, var(--nice-bg-primary));color:var(--nice-text-primary);border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-full, 999px);box-shadow:0 8px 24px color-mix(in srgb,#000 25%,transparent);font-size:.85rem;pointer-events:auto}.nice-tutorial__controls--floating-bottom{position:fixed;left:50%;bottom:var(--nice-space-6, 24px);transform:translate(-50%)}.nice-tutorial__controls--inline{display:flex;margin-top:var(--nice-space-3, 12px);padding:0;background:transparent;border:none;border-radius:0;box-shadow:none;justify-content:space-between;flex-wrap:wrap}.nice-tutorial__step-label{font-size:.8rem;color:var(--nice-text-secondary, var(--nice-text-primary));padding:0 var(--nice-space-2, 8px);white-space:nowrap;font-variant-numeric:tabular-nums}.nice-tutorial__progress{display:inline-flex;align-items:center;gap:var(--nice-space-1, 4px)}.nice-tutorial__dot{display:inline-block;width:6px;height:6px;border-radius:var(--nice-radius-circle, 50%);background:var(--nice-border-color);transition:background .15s}.nice-tutorial__dot--done{background:color-mix(in srgb,var(--nice-color-primary) 60%,transparent)}.nice-tutorial__dot--active{background:var(--nice-color-primary);transform:scale(1.3)}.nice-tutorial__progress-bar{width:120px;height:6px;background:color-mix(in srgb,var(--nice-text-primary) 10%,transparent);border-radius:var(--nice-radius-full, 999px);overflow:hidden}.nice-tutorial__progress-bar-fill{height:100%;background:var(--nice-color-primary);transition:width .2s ease;border-radius:inherit}.nice-tutorial__speed{display:inline-flex;align-items:center;gap:var(--nice-space-1, 4px);font-size:.75rem;color:var(--nice-text-secondary, var(--nice-text-primary))}.nice-tutorial__speed-slider{width:80px;accent-color:var(--nice-color-primary)}.nice-tutorial__speed-value{min-width:32px;text-align:right;font-variant-numeric:tabular-nums}.nice-tutorial__btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--nice-space-1, 4px);padding:0;width:32px;height:32px;background:transparent;border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-circle, 50%);color:var(--nice-text-primary);font:inherit;cursor:pointer;transition:background .15s,border-color .15s,color .15s,transform .05s}.nice-tutorial__btn:hover,.nice-tutorial__btn:focus-visible{background:var(--nice-hover-bg, color-mix(in srgb, var(--nice-color-primary) 10%, transparent));border-color:var(--nice-color-primary);color:var(--nice-color-primary);outline:none}.nice-tutorial__btn:active{transform:translateY(1px)}.nice-tutorial__btn[disabled]{opacity:.4;cursor:not-allowed;pointer-events:none}.nice-tutorial__btn--next{background:var(--nice-color-primary);color:var(--nice-text-on-primary, #fff);border-color:var(--nice-color-primary)}.nice-tutorial__btn--next:hover,.nice-tutorial__btn--next:focus-visible{background:color-mix(in srgb,var(--nice-color-primary) 85%,#000);color:var(--nice-text-on-primary, #fff)}.nice-tutorial__btn--play.nice-tutorial__btn--active{background:var(--nice-color-primary);color:var(--nice-text-on-primary, #fff);border-color:var(--nice-color-primary)}.nice-tutorial__btn--icon-text,.nice-tutorial__btn--text{width:auto;min-width:32px;height:32px;padding:0 var(--nice-space-3, 12px);border-radius:var(--nice-radius-full, 999px)}.nice-tutorial__btn-label{white-space:nowrap}.nice-tutorial__btn svg{flex-shrink:0}.nice-tutorial__controls--inline .nice-tutorial__actions{display:inline-flex;align-items:center;gap:var(--nice-space-2, 8px)}@media(prefers-reduced-motion:reduce){.nice-tutorial__tooltip,.nice-tutorial__highlight,.nice-tutorial__progress-bar-fill{transition:none!important}}
|