@nice2dev/ui 1.0.6 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/NiceAPIFlow.doc-DnQLPUie.js +30 -0
  2. package/dist/NiceAPIFlow.doc-Dx4qw1lm.cjs +6 -0
  3. package/dist/NiceBranchManager.doc-BXjiENlD.cjs +6 -0
  4. package/dist/NiceBranchManager.doc-xLB82YwU.js +30 -0
  5. package/dist/NiceButton-CDiS45Ya.cjs +1 -0
  6. package/dist/NiceButton-D9l39Rs7.js +595 -0
  7. package/dist/NiceCodeTemplate.doc-BWxTE4C_.cjs +6 -0
  8. package/dist/NiceCodeTemplate.doc-CA2U5F-v.js +30 -0
  9. package/dist/NiceDataBranchGraph.doc-CkitupWc.js +29 -0
  10. package/dist/NiceDataBranchGraph.doc-DDUgipqH.cjs +5 -0
  11. package/dist/NiceDataBranchManager.doc-B0ODKOs4.js +30 -0
  12. package/dist/NiceDataBranchManager.doc-CC5o8ihs.cjs +6 -0
  13. package/dist/NiceDataConflictResolver.doc-CdzScNie.cjs +5 -0
  14. package/dist/NiceDataConflictResolver.doc-V8vxYAeo.js +29 -0
  15. package/dist/NiceDataDiffViewer.doc-CR14Bq3A.cjs +6 -0
  16. package/dist/NiceDataDiffViewer.doc-w2I2QjhX.js +30 -0
  17. package/dist/NiceDataMapper.doc-C7jSyHRM.js +30 -0
  18. package/dist/NiceDataMapper.doc-DXjQHz87.cjs +6 -0
  19. package/dist/NiceDataMergeBuilder.doc-CV32WC_w.cjs +6 -0
  20. package/dist/NiceDataMergeBuilder.doc-DtuYb3nx.js +30 -0
  21. package/dist/NiceDataSnapshot.doc-CFLkY3ry.js +30 -0
  22. package/dist/NiceDataSnapshot.doc-CpZyQ17u.cjs +6 -0
  23. package/dist/NiceErrorBoundary-B5nF-OVn.cjs +1 -0
  24. package/dist/NiceErrorBoundary-BAeqfoSc.cjs +1 -0
  25. package/dist/NiceErrorBoundary-D75yr_WE.js +762 -0
  26. package/dist/NiceErrorBoundary-niMx1aSJ.js +837 -0
  27. package/dist/NiceEventOrchestrator.doc-C4SJfIDV.js +30 -0
  28. package/dist/NiceEventOrchestrator.doc-CxjsLxBG.cjs +6 -0
  29. package/dist/NiceForm-CKoJA6NG.js +5131 -0
  30. package/dist/NiceForm-D7xnpnRJ.cjs +382 -0
  31. package/dist/NiceForm.css +1 -0
  32. package/dist/NiceGitBlame.doc-BG3_K9_0.cjs +6 -0
  33. package/dist/NiceGitBlame.doc-DrJABEat.js +30 -0
  34. package/dist/NiceGitConflictResolver.doc-BK7hAfz6.js +30 -0
  35. package/dist/NiceGitConflictResolver.doc-CgroGM9_.cjs +6 -0
  36. package/dist/NiceGitDiffViewer.doc-BAwgcY_3.cjs +6 -0
  37. package/dist/NiceGitDiffViewer.doc-BXKJeP-E.js +30 -0
  38. package/dist/NiceGitGraph.doc-B-WtGuzn.cjs +5 -0
  39. package/dist/NiceGitGraph.doc-DxnDPCgC.js +29 -0
  40. package/dist/NiceGitHooks.doc-BrEizvMp.js +29 -0
  41. package/dist/NiceGitHooks.doc-C4EdV5zj.cjs +5 -0
  42. package/dist/NiceMergeRequestBuilder.doc-C5p8mYuh.cjs +6 -0
  43. package/dist/NiceMergeRequestBuilder.doc-Ct9RCmU8.js +30 -0
  44. package/dist/NiceModal-1QX7NhyH.js +95 -0
  45. package/dist/NiceModal-CAwsKVQ2.cjs +1 -0
  46. package/dist/NiceModuleLifecyclePanel-Brg1RLwi.cjs +1 -0
  47. package/dist/NiceModuleLifecyclePanel-C9xMSjOF.cjs +1 -0
  48. package/dist/NiceModuleLifecyclePanel-CMrPbSw9.js +5249 -0
  49. package/dist/NiceModuleLifecyclePanel-I_TXRiiY.js +5053 -0
  50. package/dist/NiceModuleLifecyclePanel.css +1 -0
  51. package/dist/NicePagination-DbE-uOkl.js +171 -0
  52. package/dist/NicePagination-DlealakT.cjs +1 -0
  53. package/dist/NicePinCodeInput-B8cI8zu8.js +11830 -0
  54. package/dist/NicePinCodeInput-CrMfdxxc.js +15287 -0
  55. package/dist/NicePinCodeInput-D0aF9MK8.cjs +692 -0
  56. package/dist/NicePinCodeInput-SGQaHvpE.cjs +419 -0
  57. package/dist/NicePinCodeInput.css +1 -1
  58. package/dist/NicePipelineEditor.doc-0eGt8zbX.cjs +5 -0
  59. package/dist/NicePipelineEditor.doc-DTmaOebn.js +29 -0
  60. package/dist/NicePipelineMonitor.doc-67CmsRcf.cjs +5 -0
  61. package/dist/NicePipelineMonitor.doc-mSMdhuG8.js +29 -0
  62. package/dist/NiceSavedQueryPanel-BZNvqSQW.cjs +596 -0
  63. package/dist/NiceSavedQueryPanel-CUAsdOjJ.js +6190 -0
  64. package/dist/NiceSavedQueryPanel-CZ5bYOe_.js +6449 -0
  65. package/dist/NiceSavedQueryPanel-Ce2s060j.cjs +596 -0
  66. package/dist/NiceStateDesigner.doc-B36u0hNU.js +29 -0
  67. package/dist/NiceStateDesigner.doc-MPmvNHSx.cjs +5 -0
  68. package/dist/NiceTabs-DvOmxKyQ.cjs +1 -0
  69. package/dist/NiceTabs-DzLHzwuA.js +1636 -0
  70. package/dist/NiceTestBuilder.doc-BFInj8GJ.js +30 -0
  71. package/dist/NiceTestBuilder.doc-CB03U_uR.cjs +6 -0
  72. package/dist/NiceToggle-CaY1u82g.js +277 -0
  73. package/dist/NiceToggle-DFJFQv_Z.cjs +1 -0
  74. package/dist/NiceWindow-CVgkxcCz.cjs +1 -0
  75. package/dist/NiceWindow-DeC83yfE.js +1409 -0
  76. package/dist/NiceWindow-IdHAcP70.cjs +1 -0
  77. package/dist/NiceWindow-SiCaREbq.js +1408 -0
  78. package/dist/charts-BAS21jkC.js +4621 -0
  79. package/dist/charts-Bx_kNBsE.js +4280 -0
  80. package/dist/charts-DECVsCHX.cjs +754 -0
  81. package/dist/charts-DShUbWrP.cjs +759 -0
  82. package/dist/charts.cjs +1 -1
  83. package/dist/charts.css +1 -0
  84. package/dist/charts.d.ts +45 -48
  85. package/dist/charts.mjs +1 -1
  86. package/dist/core-BZBTsGWN.cjs +96 -0
  87. package/dist/core-BpghV7Ls.js +17555 -0
  88. package/dist/core-C2ZmWe_u.cjs +96 -0
  89. package/dist/core-Da43q-pO.js +22094 -0
  90. package/dist/data-branching-CJlrg8qf.cjs +1 -0
  91. package/dist/data-branching-DCUwI53s.js +6121 -0
  92. package/dist/data-branching-De4ExX-S.cjs +1 -0
  93. package/dist/data-branching-DiRfob1f.js +6071 -0
  94. package/dist/data-branching.cjs +1 -0
  95. package/dist/data-branching.d.ts +364 -0
  96. package/dist/data-branching.mjs +9 -0
  97. package/dist/data.cjs +1 -1
  98. package/dist/data.d.ts +206 -192
  99. package/dist/data.mjs +1 -1
  100. package/dist/devops-BnYinjkT.cjs +17 -0
  101. package/dist/devops-CXynFG3X.cjs +17 -0
  102. package/dist/devops-Ckh57eti.js +7198 -0
  103. package/dist/devops-D0TfzV5B.js +7660 -0
  104. package/dist/devops.cjs +1 -0
  105. package/dist/devops.d.ts +721 -0
  106. package/dist/devops.mjs +12 -0
  107. package/dist/editors.cjs +1 -1
  108. package/dist/editors.d.ts +311 -393
  109. package/dist/editors.mjs +61 -64
  110. package/dist/feedback.cjs +1 -1
  111. package/dist/feedback.d.ts +3 -44
  112. package/dist/feedback.mjs +11 -10
  113. package/dist/index-B8wxZ8Ps.cjs +5192 -0
  114. package/dist/index-CBIZ6mTQ.cjs +5734 -0
  115. package/dist/index-CIl98Vbm.js +72951 -0
  116. package/dist/index-pAuGTbuB.js +57319 -0
  117. package/dist/index.cjs +1 -1
  118. package/dist/index.css +1 -1
  119. package/dist/index.d.ts +4673 -10015
  120. package/dist/index.mjs +880 -969
  121. package/dist/lazy.cjs +1 -0
  122. package/dist/lazy.d.ts +1848 -0
  123. package/dist/lazy.mjs +98 -0
  124. package/dist/navigation.cjs +1 -1
  125. package/dist/navigation.d.ts +151 -216
  126. package/dist/navigation.mjs +111 -48
  127. package/dist/no-code-B5bzduNP.cjs +332 -0
  128. package/dist/no-code-BCuadkm4.cjs +332 -0
  129. package/dist/no-code-D8RJ7lx0.js +7064 -0
  130. package/dist/no-code-TL7PyulA.js +7005 -0
  131. package/dist/no-code.cjs +1 -0
  132. package/dist/no-code.d.ts +833 -0
  133. package/dist/no-code.mjs +13 -0
  134. package/dist/overlays.cjs +1 -1
  135. package/dist/overlays.d.ts +13 -45
  136. package/dist/overlays.mjs +490 -24
  137. package/package.json +24 -2
@@ -0,0 +1 @@
1
+ "use strict";const t=require("react/jsx-runtime"),W=require("./core-BZBTsGWN.cjs"),i=require("react"),ot=({visible:e,onClose:s,title:c,items:r,showCancelButton:h=!0,cancelText:d,className:f,style:w})=>{const{t:p}=W.useNiceTranslation();return e?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"nice-actionsheet__overlay",onClick:s}),t.jsxs("div",{className:`nice-actionsheet ${f||""}`,style:w,children:[c&&t.jsx("div",{className:"nice-actionsheet__title",children:c}),t.jsx("div",{className:"nice-actionsheet__items",children:r.map((N,a)=>t.jsxs("button",{className:`nice-actionsheet__item ${N.type==="danger"?"nice-actionsheet__item--danger":""}`,disabled:N.disabled,onClick:()=>{N.onClick?.(),s()},children:[N.icon&&t.jsx("span",{className:"nice-actionsheet__icon",children:N.icon}),N.text]},a))}),h&&t.jsx("button",{className:"nice-actionsheet__cancel",onClick:s,children:d||p("cancel","Cancel")})]})]}):null},rt=({visible:e,onClose:s,targetRef:c,position:r="bottom",title:h,showArrow:d=!0,width:f,children:w,className:p,style:N,displayStyle:a})=>{W.useComponentDisplayClass("tooltip",a);const y=i.useRef(null),[R,u]=i.useState({top:0,left:0}),Y=i.useCallback(()=>{const _=c.current,T=y.current;if(!_||!T)return;const o=_.getBoundingClientRect(),b=T.getBoundingClientRect();let m=0,E=0;const M=8;switch(r){case"top":m=o.top-b.height-M,E=o.left+(o.width-b.width)/2;break;case"bottom":m=o.bottom+M,E=o.left+(o.width-b.width)/2;break;case"left":m=o.top+(o.height-b.height)/2,E=o.left-b.width-M;break;case"right":m=o.top+(o.height-b.height)/2,E=o.right+M;break}u({top:m+window.scrollY,left:E+window.scrollX})},[c,r]);return i.useEffect(()=>{if(e){requestAnimationFrame(Y);const _=T=>{y.current&&!y.current.contains(T.target)&&c.current&&!c.current.contains(T.target)&&s()};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)}},[e,Y,s,c]),e?t.jsxs("div",{ref:y,className:`nice-popover nice-popover--${r} ${p||""}`,style:{...N,position:"absolute",top:R.top,left:R.left,width:f},children:[d&&t.jsx("div",{className:`nice-popover__arrow nice-popover__arrow--${r}`}),h&&t.jsx("div",{className:"nice-popover__title",children:h}),t.jsx("div",{className:"nice-popover__content",children:w})]}):null},at=({visible:e,message:s,container:c,showIndicator:r=!0,shading:h=!0,className:d,style:f})=>{const{t:w}=W.useNiceTranslation();if(!e)return null;const p=!!c?.current,N=t.jsxs("div",{className:`nice-loadpanel ${d||""}`,style:f,children:[h&&t.jsx("div",{className:"nice-loadpanel__shade"}),t.jsxs("div",{className:"nice-loadpanel__box",children:[r&&t.jsx("div",{className:"nice-spinner nice-spinner--md"}),t.jsx("span",{className:"nice-loadpanel__text",children:s||w("loading","Loading...")})]})]});if(p&&c.current){const a=c.current;return a.style.position=a.style.position||"relative",N}return N},lt=({direction:e="row",align:s,justify:c,wrap:r,gap:h,flex:d,children:f,className:w,style:p})=>t.jsx("div",{className:`nice-box ${w||""}`,style:{display:"flex",flexDirection:e,alignItems:s,justifyContent:c,flexWrap:r?"wrap":void 0,gap:h,flex:d,...p},children:f}),dt=({direction:e="row",items:s,gap:c,className:r,style:h})=>t.jsx("div",{className:`nice-responsivebox ${r||""}`,style:{display:"flex",flexDirection:e,gap:c,...h},children:s.map((d,f)=>t.jsx("div",{style:{flex:d.ratio??1,flexBasis:d.baseSize,flexShrink:d.shrink??1},children:d.children},f))}),ut=({width:e=200,height:s=200,minWidth:c=50,minHeight:r=50,maxWidth:h=1/0,maxHeight:d=1/0,handles:f=["right","bottom","bottomRight"],onResize:w,children:p,className:N,style:a})=>{const[y,R]=i.useState({width:e,height:s}),u=i.useRef(null),Y=(o,b)=>{b.preventDefault();const m=b.clientX,E=b.clientY,M=y.width,$=y.height,n=C=>{const z=C.clientX-m,q=C.clientY-E;let P=M,l=$;(o.includes("right")||o==="right")&&(P=M+z),(o.includes("bottom")||o==="bottom")&&(l=$+q),(o.includes("left")||o==="left")&&(P=M-z),(o.includes("top")||o==="top")&&(l=$-q),P=Math.max(c,Math.min(h,P)),l=Math.max(r,Math.min(d,l)),R({width:P,height:l}),w?.({width:P,height:l})},g=()=>{document.removeEventListener("pointermove",n),document.removeEventListener("pointerup",g)};document.addEventListener("pointermove",n),document.addEventListener("pointerup",g)},_=o=>{switch(o){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"}},T=o=>{const b={position:"absolute",zIndex:1},m=8;return o==="right"?{...b,top:0,right:-m/2,width:m,height:"100%",cursor:_(o)}:o==="bottom"?{...b,left:0,bottom:-m/2,width:"100%",height:m,cursor:_(o)}:o==="left"?{...b,top:0,left:-m/2,width:m,height:"100%",cursor:_(o)}:o==="top"?{...b,top:-m/2,left:0,width:"100%",height:m,cursor:_(o)}:o==="bottomRight"?{...b,bottom:-m/2,right:-m/2,width:m*2,height:m*2,cursor:_(o)}:o==="bottomLeft"?{...b,bottom:-m/2,left:-m/2,width:m*2,height:m*2,cursor:_(o)}:o==="topRight"?{...b,top:-m/2,right:-m/2,width:m*2,height:m*2,cursor:_(o)}:o==="topLeft"?{...b,top:-m/2,left:-m/2,width:m*2,height:m*2,cursor:_(o)}:b};return t.jsxs("div",{ref:u,className:`nice-resizable ${N||""}`,style:{...a,width:y.width,height:y.height,position:"relative",overflow:"hidden"},children:[p,f.map(o=>t.jsx("div",{style:T(o),onPointerDown:b=>Y(o,b)},o))]})},mt=({direction:e="vertical",showScrollbar:s="onInteraction",width:c,height:r,onScroll:h,children:d,className:f,style:w})=>{const p=e==="horizontal"||e==="both"?"auto":"hidden",N=e==="vertical"||e==="both"?"auto":"hidden",a=s==="never"?"nice-scrollview--hide-sb":s==="always"?"nice-scrollview--show-sb":"";return t.jsx("div",{className:`nice-scrollview ${a} ${f||""}`,style:{...w,width:c,height:r,overflowX:p,overflowY:N},onScroll:h,children:d})};function he(e,s){if(!e)return{score:1,indices:[]};const c=e.toLowerCase(),r=s.toLowerCase();let h=0;const d=[];let f=0,w=-1;for(let p=0;p<r.length&&h<c.length;p++)r[p]===c[h]&&(d.push(p),w===p-1&&(f+=3),(p===0||/[\s\-_/.]/.test(s[p-1]))&&(f+=5),s[p]===e[h]&&(f+=1),f+=1,w=p,h++);return h<c.length?null:(f-=d[0]*.1,{score:f,indices:d})}function Ce(e,s){if(s.length===0)return[e];const c=[];let r=0;const h=new Set(s);for(let d=0;d<e.length;d++)h.has(d)&&(r<d&&c.push(e.slice(r,d)),c.push(i.createElement("mark",{key:`m-${d}`,className:"nice-command-palette__match"},e[d])),r=d+1);return r<e.length&&c.push(e.slice(r)),c}function ht(e,s){switch(s.type){case"REGISTER":{const c=new Map(e.commands);return c.set(s.command.id,s.command),{...e,commands:c}}case"REGISTER_BATCH":{const c=new Map(e.commands);for(const r of s.commands)c.set(r.id,r);return{...e,commands:c}}case"UNREGISTER":{const c=new Map(e.commands);return c.delete(s.id),{...e,commands:c}}case"OPEN":return{...e,isOpen:!0,query:"",selectedIndex:0};case"CLOSE":return{...e,isOpen:!1,query:"",selectedIndex:0};case"SET_QUERY":return{...e,query:s.query,selectedIndex:0};case"SET_SELECTED":return{...e,selectedIndex:s.index};case"ADD_RECENT":{const c=e.recentIds.filter(r=>r!==s.id);return{...e,recentIds:[s.id,...c].slice(0,s.maxRecent)}}default:return e}}const je=i.createContext(null);function Ee(){const e=i.useContext(je);if(!e)throw new Error("useCommandPalette must be used within NiceCommandPaletteProvider");return e}const ze=({children:e,commands:s,placeholder:c="Type a command...",maxVisible:r=10,maxRecent:h=5,className:d,emptyText:f="No commands found",closeOnAction:w=!0,onOpen:p,onClose:N})=>{const[a,y]=i.useReducer(ht,{commands:new Map(s?.map(l=>[l.id,l])??[]),isOpen:!1,query:"",selectedIndex:0,recentIds:[]}),R=i.useRef(null),u=i.useRef(null),[Y,_]=i.useState(!1),T=i.useCallback(l=>{y({type:"REGISTER",command:l})},[]),o=i.useCallback(l=>{y({type:"UNREGISTER",id:l})},[]),b=i.useCallback(l=>{y({type:"REGISTER_BATCH",commands:l})},[]),m=i.useCallback(()=>{y({type:"OPEN"}),p?.()},[p]),E=i.useCallback(()=>{y({type:"CLOSE"}),N?.()},[N]),M=i.useCallback(()=>{a.isOpen?E():m()},[a.isOpen,E,m]),n=i.useMemo(()=>{const l=Array.from(a.commands.values()).filter(x=>!x.hidden);if(!a.query.trim()){const x=a.recentIds.map(S=>a.commands.get(S)).filter(S=>!!S&&!S.hidden),D=l.filter(S=>!a.recentIds.includes(S.id));return D.sort((S,K)=>S.label.localeCompare(K.label)),[...x,...D].map(S=>({command:S,match:null,isRecent:a.recentIds.includes(S.id)}))}return l.map(x=>{const D=he(a.query,x.label),S=x.description?he(a.query,x.description):null,K=x.keywords?.map(j=>he(a.query,j)).filter(Boolean)[0]??null,se=[D,S,K].filter(Boolean).sort((j,L)=>(L?.score??0)-(j?.score??0))[0];return{command:x,match:se,isRecent:!1}}).filter(x=>x.match!==null).sort((x,D)=>(D.match?.score??0)-(x.match?.score??0))},[a.commands,a.query,a.recentIds]).slice(0,r),g=i.useCallback(async l=>{const k=a.commands.get(l);if(!(!k||k.disabled)){_(!0);try{await k.action(),y({type:"ADD_RECENT",id:l,maxRecent:h})}finally{_(!1),w&&E()}}},[a.commands,h,w,E]);i.useEffect(()=>{const l=k=>{(k.metaKey||k.ctrlKey)&&k.key==="k"&&(k.preventDefault(),M()),k.key==="Escape"&&a.isOpen&&(k.preventDefault(),E())};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[M,a.isOpen,E]),i.useEffect(()=>{a.isOpen&&requestAnimationFrame(()=>R.current?.focus())},[a.isOpen]);const C=i.useCallback(l=>{const k=n.length;if(k){if(l.key==="ArrowDown")l.preventDefault(),y({type:"SET_SELECTED",index:(a.selectedIndex+1)%k});else if(l.key==="ArrowUp")l.preventDefault(),y({type:"SET_SELECTED",index:(a.selectedIndex-1+k)%k});else if(l.key==="Enter"){l.preventDefault();const x=n[a.selectedIndex];x&&g(x.command.id)}}},[n,a.selectedIndex,g]);i.useEffect(()=>{if(!u.current)return;u.current.children[a.selectedIndex]?.scrollIntoView({block:"nearest"})},[a.selectedIndex]);const z=i.useMemo(()=>({registerCommand:T,unregisterCommand:o,registerCommands:b,open:m,close:E,toggle:M,isOpen:a.isOpen,executeCommand:g}),[T,o,b,m,E,M,a.isOpen,g]),q=i.useMemo(()=>{const l=new Map;for(const k of n){const x=k.command.category??"General";l.has(x)||l.set(x,[]),l.get(x).push(k)}return l},[n]);let P=0;return t.jsxs(je.Provider,{value:z,children:[e,a.isOpen&&t.jsx("div",{className:`nice-command-palette__overlay ${d??""}`,onClick:E,children:t.jsxs("div",{className:"nice-command-palette",role:"dialog","aria-label":"Command Palette","aria-modal":"true",onClick:l=>l.stopPropagation(),children:[t.jsx("div",{className:"nice-command-palette__input-wrapper",children:t.jsx("input",{ref:R,className:"nice-command-palette__input",type:"text",placeholder:c,value:a.query,onChange:l=>y({type:"SET_QUERY",query:l.target.value}),onKeyDown:C,"aria-label":"Search commands","aria-autocomplete":"list","aria-controls":"nice-command-palette-list","aria-activedescendant":n[a.selectedIndex]?`nice-cmd-${n[a.selectedIndex].command.id}`:void 0})}),t.jsxs("div",{ref:u,id:"nice-command-palette-list",className:"nice-command-palette__list",role:"listbox",children:[n.length===0&&t.jsx("div",{className:"nice-command-palette__empty",children:f}),Array.from(q.entries()).map(([l,k])=>t.jsxs("div",{className:"nice-command-palette__group",children:[t.jsx("div",{className:"nice-command-palette__category",children:l}),k.map(x=>{const D=P++,S=D===a.selectedIndex;return t.jsxs("div",{id:`nice-cmd-${x.command.id}`,className:`nice-command-palette__item ${S?"nice-command-palette__item--selected":""} ${x.command.disabled?"nice-command-palette__item--disabled":""}`,role:"option","aria-selected":S,"aria-disabled":x.command.disabled,onClick:()=>!x.command.disabled&&g(x.command.id),onMouseEnter:()=>y({type:"SET_SELECTED",index:D}),children:[x.command.icon&&t.jsx("span",{className:"nice-command-palette__icon",children:x.command.icon}),t.jsxs("div",{className:"nice-command-palette__label-group",children:[t.jsx("span",{className:"nice-command-palette__label",children:x.match&&a.query?Ce(x.command.label,x.match.indices):x.command.label}),x.command.description&&t.jsx("span",{className:"nice-command-palette__description",children:x.command.description})]}),x.command.shortcut&&t.jsx("kbd",{className:"nice-command-palette__shortcut",children:x.command.shortcut}),x.isRecent&&t.jsx("span",{className:"nice-command-palette__recent-badge",children:"Recent"})]},x.command.id)})]},l))]}),Y&&t.jsx("div",{className:"nice-command-palette__executing",children:"Executing..."})]})})]})};ze.displayName="NiceCommandPaletteProvider";function ft(e){const{registerCommands:s,unregisterCommand:c}=Ee();i.useEffect(()=>(s(e),()=>{for(const r of e)c(r.id)}),[])}const Se=i.forwardRef(({blocked:e,message:s,children:c,className:r,style:h,id:d},f)=>{const w=W.useControlId(d);return t.jsxs("div",{ref:f,id:w,className:`nice-block-ui ${r||""}`,style:{position:"relative",...h},children:[c,e&&t.jsx("div",{className:"nice-block-ui__overlay","aria-busy":"true",role:"alert",children:s&&t.jsx("div",{className:"nice-block-ui__message",children:s})})]})});Se.displayName="NiceBlockUI";const Me=i.forwardRef(({windows:e,onChange:s,onClose:c,onFocus:r,showTaskbar:h=!0,size:d="md",className:f,style:w,id:p,...N},a)=>{const y=W.useControlId(p),{t:R}=W.useNiceTranslation(),[u,Y]=i.useState(null),_=i.useRef(null),T=Math.max(1,...e.map(n=>n.zIndex??1)),o=i.useCallback((n,g)=>{const C=e.map(z=>z.key===n?{...z,...g}:z);s?.(C)},[e,s]),b=i.useCallback(n=>{o(n,{zIndex:T+1}),r?.(n)},[o,T,r]),m=i.useCallback(n=>{c?.(n),s?.(e.filter(g=>g.key!==n))},[e,s,c]),E=i.useCallback(n=>{const g=e.find(C=>C.key===n);g&&o(n,{minimized:!g.minimized,maximized:!1})},[e,o]),M=i.useCallback(n=>{const g=e.find(C=>C.key===n);g&&o(n,{maximized:!g.maximized,minimized:!1})},[e,o]);i.useEffect(()=>{if(!u)return;const n=C=>{const z=e.find(q=>q.key===u.key);if(z)if(u.mode==="move")o(u.key,{x:C.clientX-u.offsetX,y:C.clientY-u.offsetY});else{const P=_.current?.getBoundingClientRect(),l=P?.left??0,k=P?.top??0;o(u.key,{width:Math.max(200,C.clientX-l-z.x),height:Math.max(100,C.clientY-k-z.y)})}},g=()=>Y(null);return document.addEventListener("mousemove",n),document.addEventListener("mouseup",g),()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",g)}},[u,e,o]);const $=i.useCallback((n,g,C)=>{g.preventDefault();const z=e.find(q=>q.key===n);z&&(b(n),Y({key:n,offsetX:C==="move"?g.clientX-z.x:0,offsetY:C==="move"?g.clientY-z.y:0,mode:C}))},[e,b]);return t.jsxs("div",{ref:n=>{_.current=n,typeof a=="function"?a(n):a&&(a.current=n)},id:y,className:`nice-wm nice-wm--${d} ${f??""}`,style:{...w,position:"relative",overflow:"hidden"},...N,children:[e.map(n=>{if(n.minimized)return null;const g=n.maximized,C=g?{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:n.zIndex??1}:{position:"absolute",top:n.y,left:n.x,width:n.width,height:n.height,zIndex:n.zIndex??1};return t.jsxs("div",{className:`nice-wm__window ${g?"nice-wm__window--maximized":""}`,style:C,onMouseDown:()=>b(n.key),role:"dialog","aria-label":n.title,children:[t.jsxs("div",{className:"nice-wm__titlebar",onMouseDown:z=>!g&&$(n.key,z,"move"),children:[n.icon&&t.jsx("span",{className:"nice-wm__icon",children:n.icon}),t.jsx("span",{className:"nice-wm__title",children:n.title}),t.jsxs("div",{className:"nice-wm__controls",children:[(n.minimizable??!0)&&t.jsx("button",{type:"button",className:"nice-wm__ctrl-btn nice-wm__ctrl-btn--min",onClick:()=>E(n.key),title:R("wm.minimize","Minimize"),children:"─"}),(n.maximizable??!0)&&t.jsx("button",{type:"button",className:"nice-wm__ctrl-btn nice-wm__ctrl-btn--max",onClick:()=>M(n.key),title:R("wm.maximize","Maximize"),children:g?"❐":"☐"}),(n.closable??!0)&&t.jsx("button",{type:"button",className:"nice-wm__ctrl-btn nice-wm__ctrl-btn--close",onClick:()=>m(n.key),title:R("wm.close","Close"),children:"✕"})]})]}),t.jsx("div",{className:"nice-wm__body",children:n.content}),(n.resizable??!0)&&!g&&t.jsx("div",{className:"nice-wm__resize-handle",onMouseDown:z=>$(n.key,z,"resize")})]},n.key)}),h&&t.jsx("div",{className:"nice-wm__taskbar",role:"toolbar","aria-label":R("wm.taskbar","Taskbar"),children:e.map(n=>t.jsxs("button",{type:"button",className:`nice-wm__taskbar-btn ${n.minimized?"nice-wm__taskbar-btn--minimized":""}`,onClick:()=>{n.minimized&&E(n.key),b(n.key)},children:[n.icon&&t.jsx("span",{className:"nice-wm__taskbar-icon",children:n.icon}),t.jsx("span",{className:"nice-wm__taskbar-label",children:n.title})]},n.key))})]})});Me.displayName="NiceWindowManager";function pt(e,s){const c=document.querySelector(e);if(!c)return null;const r=c.getBoundingClientRect();return{top:r.top-s+window.scrollY,left:r.left-s+window.scrollX,width:r.width+s*2,height:r.height+s*2}}function xt(e,s,c,r){const d={w:window.innerWidth,h:window.innerHeight+window.scrollY},f={top:{top:e.top-c-12,left:e.left+e.width/2-s/2},bottom:{top:e.top+e.height+12,left:e.left+e.width/2-s/2},left:{top:e.top+e.height/2-c/2,left:e.left-s-12},right:{top:e.top+e.height/2-c/2,left:e.left+e.width+12}};if(r&&r!=="auto")return{...f[r],actualPlacement:r};for(const w of["bottom","top","right","left"]){const p=f[w];if(p.top>=0&&p.left>=0&&p.top+c<=d.h&&p.left+s<=d.w)return{...p,actualPlacement:w}}return{...f.bottom,actualPlacement:"bottom"}}const be=({steps:e,active:s,onFinish:c,onSkip:r,onStepChange:h,closeOnEscape:d=!0,closeOnOverlayClick:f=!1,showProgress:w=!0,showSkipButton:p=!0,labels:N,animationDuration:a=300,overlayOpacity:y=.6,zIndex:R=1e4})=>{const[u,Y]=i.useState(0),[_,T]=i.useState(null),[o,b]=i.useState({w:340,h:200}),[m,E]=i.useState(!0),M=i.useRef(null),$=i.useRef(-1),n=e[u],g=u===e.length-1,C=u===0,z=N?.next??"Next",q=N?.back??"Back",P=N?.finish??"Finish",l=N?.skip??"Skip",k=N?.stepOf??"of";i.useEffect(()=>{if(M.current){const j=M.current.getBoundingClientRect();b({w:j.width,h:j.height})}},[u,s]),i.useEffect(()=>{if(!s||!n)return;const j=()=>{const L=pt(n.target,n.highlightPadding??8);T(L)};if(j(),n.scrollIntoView!==!1){document.querySelector(n.target)?.scrollIntoView({behavior:"smooth",block:"center"});const fe=setTimeout(j,350);return()=>clearTimeout(fe)}},[s,n,u]),i.useEffect(()=>{!s||!n||$.current!==u&&($.current>=0&&$.current<e.length&&e[$.current]?.onLeave?.(),n.onEnter?.(),$.current=u)},[s,n,u,e]),i.useEffect(()=>{if(!s||!n?.advanceOn)return;const j=document.querySelector(n.target);if(!j)return;const L=()=>x();return j.addEventListener(n.advanceOn.event,L),()=>j.removeEventListener(n.advanceOn.event,L)},[s,n,u]),i.useEffect(()=>{if(!s)return;const j=L=>{L.key==="Escape"&&d?r?.():L.key==="ArrowRight"?x():L.key==="ArrowLeft"&&D()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[s,u,d]),i.useEffect(()=>{E(!0);const j=setTimeout(()=>E(!1),a);return()=>clearTimeout(j)},[u,a]);const x=i.useCallback(()=>{if(g)n?.onLeave?.(),c?.();else{const j=u+1;Y(j),h?.(j)}},[u,g,c,h,n]),D=i.useCallback(()=>{if(!C){const j=u-1;Y(j),h?.(j)}},[u,C,h]),S=i.useMemo(()=>_?xt(_,o.w,o.h,n?.placement):{top:window.innerHeight/2,left:window.innerWidth/2,actualPlacement:"bottom"},[_,o,n?.placement]);if(!s||!n)return null;const K=Math.max(document.documentElement.scrollWidth,window.innerWidth),se=Math.max(document.documentElement.scrollHeight,window.innerHeight);return t.jsxs("div",{className:"nice-tutorial",style:{zIndex:R},"aria-modal":"true",role:"dialog","aria-label":"Tutorial",children:[t.jsxs("svg",{className:"nice-tutorial__overlay",style:{position:"absolute",top:0,left:0,width:K,height:se,pointerEvents:"auto"},onClick:f?r:void 0,children:[t.jsx("defs",{children:t.jsxs("mask",{id:"nice-tutorial-mask",children:[t.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),_&&t.jsx("rect",{x:_.left,y:_.top,width:_.width,height:_.height,rx:"8",fill:"black",className:m?"nice-tutorial__spotlight--entering":""})]})}),t.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`rgba(0,0,0,${y})`,mask:"url(#nice-tutorial-mask)"})]}),_&&t.jsx("div",{className:`nice-tutorial__highlight ${m?"nice-tutorial__highlight--entering":""}`,style:{position:"absolute",top:_.top,left:_.left,width:_.width,height:_.height,transition:`all ${a}ms ease`}}),n.disableInteraction&&_&&t.jsx("div",{className:"nice-tutorial__blocker",style:{position:"absolute",top:_.top,left:_.left,width:_.width,height:_.height}}),t.jsxs("div",{ref:M,className:`nice-tutorial__tooltip nice-tutorial__tooltip--${S.actualPlacement} ${m?"nice-tutorial__tooltip--entering":""}`,style:{position:"absolute",top:S.top,left:S.left,transition:`all ${a}ms ease`,maxWidth:380,zIndex:R+1},children:[n.showArrow!==!1&&t.jsx("div",{className:`nice-tutorial__arrow nice-tutorial__arrow--${S.actualPlacement}`}),t.jsxs("div",{className:"nice-tutorial__header",children:[t.jsx("h4",{className:"nice-tutorial__title",children:n.title}),p&&t.jsx("button",{type:"button",className:"nice-tutorial__close",onClick:r,"aria-label":l,children:"✕"})]}),t.jsx("div",{className:"nice-tutorial__content",dangerouslySetInnerHTML:{__html:W.sanitizeHtml(n.content)}}),t.jsxs("div",{className:"nice-tutorial__footer",children:[w&&t.jsxs("div",{className:"nice-tutorial__progress",children:[e.map((j,L)=>t.jsx("span",{className:`nice-tutorial__dot ${L===u?"nice-tutorial__dot--active":""} ${L<u?"nice-tutorial__dot--done":""}`},L)),t.jsxs("span",{className:"nice-tutorial__step-label",children:[u+1," ",k," ",e.length]})]}),t.jsxs("div",{className:"nice-tutorial__actions",children:[p&&!g&&t.jsx("button",{type:"button",className:"nice-tutorial__btn nice-tutorial__btn--skip",onClick:r,children:l}),!C&&t.jsx("button",{type:"button",className:"nice-tutorial__btn nice-tutorial__btn--back",onClick:D,children:q}),!n.waitForAction&&t.jsx("button",{type:"button",className:"nice-tutorial__btn nice-tutorial__btn--next",onClick:x,children:g?P:z})]})]})]})]})};be.displayName="NiceTutorial";const Re=i.createContext({startTutorial:()=>{},stopTutorial:()=>{},isActive:!1,currentStep:0,nextStep:()=>{},prevStep:()=>{},goToStep:()=>{}});function _t(){return i.useContext(Re)}const Ie=({children:e})=>{const[s,c]=i.useState([]),[r,h]=i.useState(!1),[d,f]=i.useState(0),w=i.useCallback(u=>{c(u),f(0),h(!0)},[]),p=i.useCallback(()=>{h(!1),f(0),c([])},[]),N=i.useCallback(()=>{f(u=>Math.min(u+1,s.length-1))},[s.length]),a=i.useCallback(()=>{f(u=>Math.max(u-1,0))},[]),y=i.useCallback(u=>{f(Math.max(0,Math.min(u,s.length-1)))},[s.length]),R={startTutorial:w,stopTutorial:p,isActive:r,currentStep:d,nextStep:N,prevStep:a,goToStep:y};return t.jsxs(Re.Provider,{value:R,children:[e,r&&s.length>0&&t.jsx(be,{steps:s,active:r,onFinish:p,onSkip:p,onStepChange:f})]})};Ie.displayName="NiceTutorialProvider";function gt(e,s,c,r,h){const d=e<=h,f=e+h>=c,w=s<=h,p=s+h>=r;return w&&d?"top-left":w&&f?"top-right":p&&d?"bottom-left":p&&f?"bottom-right":d?"left":f?"right":w?"top":p?"bottom":"none"}function wt(e){switch(e){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 Te=i.forwardRef(({windowKey:e,title:s,icon:c,children:r,footer:h,x:d=100,y:f=100,width:w=480,height:p=360,minWidth:N=200,minHeight:a=120,maxWidth:y,maxHeight:R,zIndex:u=1,closable:Y=!0,minimizable:_=!0,maximizable:T=!0,fullscreenable:o=!1,pinnable:b=!1,resizable:m=!0,draggable:E=!0,snappable:M=!0,snapThreshold:$=20,minimized:n,maximized:g,fullscreen:C,pinned:z,focused:q,onClose:P,onMinimize:l,onMaximize:k,onFullscreen:x,onPin:D,onFocus:S,onMove:K,onResize:se,onSnap:j,onTitleBarDoubleClick:L,size:fe="md",statusBar:ve,titleBarActions:Le,className:Pe,style:$e,id:Ne,accessMode:De,...Ye},Xe)=>{const qe=W.useControlId(Ne),Oe=W.useNiceAccessMode(De,Ne),{t:ce}=W.useNiceTranslation();if(Oe==="hidden")return null;const[de,ne]=i.useState({x:d,y:f}),[ue,me]=i.useState({width:w,height:p}),[Ae,Be]=i.useState(!1),[We,Fe]=i.useState(!1),[He,Ue]=i.useState(!1),[Ge,Ve]=i.useState(!1),[F,pe]=i.useState("none"),Qe=n??Ae,B=g??We,A=C??He,oe=z??Ge,xe=q??!0,ee=de.x,te=de.y,G=ue.width,V=ue.height,H=i.useRef(null),O=i.useRef(null),I=i.useRef(null),Ze=i.useCallback(()=>{P?.(e)},[e,P]),Je=i.useCallback(()=>{Be(!0),l?.(e)},[e,l]),_e=i.useCallback(()=>{const v=!B;Fe(v),!v&&I.current?(ne({x:I.current.x,y:I.current.y}),me({width:I.current.w,height:I.current.h}),I.current=null):v&&(I.current={x:ee,y:te,w:G,h:V}),pe("none"),k?.(e,v)},[e,B,ee,te,G,V,k]),ge=i.useCallback(()=>{const v=!A;Ue(v),v?I.current={x:ee,y:te,w:G,h:V}:I.current&&(ne({x:I.current.x,y:I.current.y}),me({width:I.current.w,height:I.current.h}),I.current=null),x?.(e,v)},[e,A,ee,te,G,V,x]),Ke=i.useCallback(()=>{const v=!oe;Ve(v),D?.(e,v)},[e,oe,D]),re=i.useCallback(()=>{S?.(e)},[e,S]),et=i.useCallback(()=>{L?L(e):T&&_e()},[e,T,_e,L]);i.useEffect(()=>{if(!H.current)return;const v=Q=>{if(!H.current)return;const U=Q.clientX-H.current.startX+H.current.origX,ae=Q.clientY-H.current.startY+H.current.origY;ne({x:U,y:ae}),K?.(e,{x:U,y:ae})},X=Q=>{if(H.current){if(M){const U=gt(Q.clientX,Q.clientY,window.innerWidth,window.innerHeight,$);U!=="none"&&(I.current={x:de.x,y:de.y,w:G,h:V},pe(U),j?.(e,U))}H.current=null}};return document.addEventListener("mousemove",v),document.addEventListener("mouseup",X),()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",X)}});const tt=i.useCallback(v=>{!E||B||A||(v.preventDefault(),F!=="none"&&(I.current&&(ne({x:I.current.x,y:I.current.y}),me({width:I.current.w,height:I.current.h})),pe("none")),re(),H.current={startX:v.clientX,startY:v.clientY,origX:ee,origY:te})},[E,B,A,F,ee,te,re]);i.useEffect(()=>{if(!O.current)return;const v=Q=>{if(!O.current)return;const U=Q.clientX-O.current.startX,ae=Q.clientY-O.current.startY,ie=O.current.handle;let Z=O.current.origW,J=O.current.origH;if(ie.includes("e")&&(Z=O.current.origW+U),ie.includes("w")&&(Z=O.current.origW-U),ie.includes("s")&&(J=O.current.origH+ae),ie.includes("n")&&(J=O.current.origH-ae),Z=Math.max(N,y?Math.min(y,Z):Z),J=Math.max(a,R?Math.min(R,J):J),ie.includes("w")){const we=ue.width-Z;ne(le=>({...le,x:le.x+we}))}if(ie.includes("n")){const we=ue.height-J;ne(le=>({...le,y:le.y+we}))}me({width:Z,height:J}),se?.(e,{width:Z,height:J})},X=()=>{O.current=null};return document.addEventListener("mousemove",v),document.addEventListener("mouseup",X),()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",X)}});const nt=i.useCallback((v,X)=>{!m||B||A||F!=="none"||(X.preventDefault(),X.stopPropagation(),re(),O.current={startX:X.clientX,startY:X.clientY,origW:G,origH:V,handle:v})},[m,B,A,F,G,V,re]);if(i.useEffect(()=>{if(!xe)return;const v=X=>{X.key==="Escape"&&A&&ge()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[xe,A,ge]),Qe)return null;const ye=F!=="none"?wt(F):null,ke=B||A,it=A?{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:999999}:B?{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:u}:ye?{position:"absolute",...ye,zIndex:u}:{position:"absolute",top:te,left:ee,width:G,height:V,zIndex:u},st=["n","e","s","w","ne","se","sw","nw"],ct={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 t.jsxs("div",{ref:Xe,id:qe,className:`nice-window nice-window--${fe} ${xe?"nice-window--focused":""} ${oe?"nice-window--pinned":""} ${ke?"nice-window--maximized":""} ${F!=="none"?`nice-window--snapped-${F}`:""} ${Pe??""}`,style:{...it,...$e},onMouseDown:re,role:"dialog","aria-label":s,...Ye,children:[t.jsxs("div",{className:"nice-window__titlebar",onMouseDown:tt,onDoubleClick:et,children:[c&&t.jsx("span",{className:"nice-window__icon",children:c}),t.jsx("span",{className:"nice-window__title",children:s}),t.jsxs("div",{className:"nice-window__actions",children:[Le,b&&t.jsx("button",{type:"button",className:`nice-window__action nice-window__action--pin ${oe?"nice-window__action--active":""}`,onClick:Ke,title:ce("window.pin",oe?"Unpin":"Pin"),children:"📌"}),_&&t.jsx("button",{type:"button",className:"nice-window__action nice-window__action--minimize",onClick:Je,title:ce("window.minimize","Minimize"),children:"─"}),T&&t.jsx("button",{type:"button",className:"nice-window__action nice-window__action--maximize",onClick:_e,title:ce("window.maximize",B?"Restore":"Maximize"),children:B?"❐":"☐"}),o&&t.jsx("button",{type:"button",className:"nice-window__action nice-window__action--fullscreen",onClick:ge,title:ce("window.fullscreen",A?"Exit Full Screen":"Full Screen"),children:A?"⇲":"⇱"}),Y&&t.jsx("button",{type:"button",className:"nice-window__action nice-window__action--close",onClick:Ze,title:ce("window.close","Close"),children:"✕"})]})]}),t.jsx("div",{className:"nice-window__body",children:r}),h&&t.jsx("div",{className:"nice-window__footer",children:h}),ve&&t.jsx("div",{className:"nice-window__statusbar",children:ve}),m&&!ke&&F==="none"&&t.jsx(t.Fragment,{children:st.map(v=>t.jsx("div",{className:`nice-window__resize nice-window__resize--${v}`,style:{cursor:ct[v]},onMouseDown:X=>nt(v,X)},v))})]})});Te.displayName="NiceWindow";exports.NiceActionSheet=ot;exports.NiceBlockUI=Se;exports.NiceBox=lt;exports.NiceCommandPaletteProvider=ze;exports.NiceLoadPanel=at;exports.NicePopover=rt;exports.NiceResizable=ut;exports.NiceResponsiveBox=dt;exports.NiceScrollView=mt;exports.NiceTutorial=be;exports.NiceTutorialProvider=Ie;exports.NiceWindow=Te;exports.NiceWindowManager=Me;exports.fuzzyMatch=he;exports.highlightMatches=Ce;exports.useCommandPalette=Ee;exports.useNiceTutorial=_t;exports.useRegisterCommands=ft;