efficient-shell 4.168.0 → 4.173.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/README.md +406 -9
- package/dist/{Browser-PZPREN6H.js → Browser-X7UTQJOX.js} +13 -13
- package/dist/Calculator-IAJLLX67.js +29 -0
- package/dist/ConfirmDialog-EBZ5LHVS.js +1 -0
- package/dist/{CurrencyConverter-3BTIZ2LT.js → CurrencyConverter-RODHLQMG.js} +5 -5
- package/dist/{Documents-YAOM3L47.js → Documents-BJFZHHBZ.js} +8 -8
- package/dist/{Files-2UHYDMLL.js → Files-PL5NE4PQ.js} +27 -27
- package/dist/{Notepad-OWL75AYX.js → Notepad-52LDWEK2.js} +10 -10
- package/dist/PdfViewer-IIXXT7SF.js +1 -0
- package/dist/{PomodoroTimer-SCPEOG6W.js → PomodoroTimer-C3KCTCMB.js} +30 -30
- package/dist/{Preview-5R3QZSJU.js → Preview-O3N26GG6.js} +31 -31
- package/dist/{Sidebar-C5RXL72L.js → Sidebar-QNGQA6J5.js} +24 -24
- package/dist/Spreadsheet-HVKVNQN6.js +37 -0
- package/dist/{Stock-UGDIALNB.js → Stock-YOGVYL6F.js} +6 -6
- package/dist/{Weather-CR2MN5XF.js → Weather-4OQOBM4C.js} +13 -13
- package/dist/{WorldClock-JBNJ7C7J.js → WorldClock-K5KLOOD7.js} +5 -5
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/chunk-6TDPY7WG.js +3 -0
- package/dist/{chunk-SOI4LR67.js → chunk-A6ZY4XSQ.js} +7 -7
- package/dist/{chunk-4P3IWZUC.js → chunk-AYZ4LP2A.js} +9 -9
- package/dist/{chunk-A7Q4BCPI.js → chunk-CQN5CFKA.js} +6 -6
- package/dist/chunk-EXXHI5DO.js +12 -0
- package/dist/{chunk-M4DB7UBZ.js → chunk-FIGVDYJR.js} +16 -16
- package/dist/chunk-FWOPZB6I.js +1 -0
- package/dist/{chunk-XKHAP6N2.js → chunk-MFR4GZSB.js} +15 -15
- package/dist/{chunk-JLPJBO7K.js → chunk-MVUYJAZT.js} +1 -1
- package/dist/{chunk-YWXYBJ5Y.js → chunk-MYNLN25H.js} +2 -2
- package/dist/{chunk-KSSAVLO7.js → chunk-OZMDKNVR.js} +1 -1
- package/dist/{chunk-N3ZXQE4M.js → chunk-PGVUO7GB.js} +5 -5
- package/dist/chunk-RN5V7MDO.js +995 -0
- package/dist/chunk-S5QF4VFG.js +1 -0
- package/dist/{chunk-5J2TKKGH.js → chunk-SXRJYJ7M.js} +1 -1
- package/dist/{chunk-QZG72OVX.js → chunk-TLYGAHZN.js} +1 -1
- package/dist/{chunk-CUX4XGLS.js → chunk-U2SEGSNG.js} +1 -1
- package/dist/{chunk-FZRQBHTK.js → chunk-U6IUYOYS.js} +1 -1
- package/dist/{chunk-3U47BTEV.js → chunk-UOZMVS4Y.js} +11 -11
- package/dist/{chunk-S2AZZGFF.js → chunk-W32SKK3D.js} +1 -1
- package/dist/chunk-W33ZFDRR.js +1 -0
- package/dist/chunk-X5LH3UOJ.js +112 -0
- package/dist/{chunk-6MBERZOS.js → chunk-XHWT4DH2.js} +3 -3
- package/dist/chunk-XJX3NA37.js +1 -0
- package/dist/chunk-YKZHOXI4.js +2 -0
- package/dist/{chunk-FVXBJGY5.js → chunk-Z3JO7MDE.js} +5 -5
- package/dist/{chunk-PLX2N4N6.js → chunk-ZDCOC4IH.js} +9 -9
- package/dist/file-intake/index.js +1 -1
- package/dist/format/index.d.ts +1 -1
- package/dist/format/index.js +1 -1
- package/dist/icons/efficient.d.ts +355 -0
- package/dist/icons/efficient.js +470 -0
- package/dist/icons/heroicons.d.ts +6 -0
- package/dist/icons/heroicons.js +1 -0
- package/dist/icons/index.d.ts +64 -0
- package/dist/icons/index.js +2 -0
- package/dist/icons/lucide.d.ts +6 -0
- package/dist/icons/lucide.js +1 -0
- package/dist/{index-CbLbd__n.d.ts → index-Dod08dsC.d.ts} +302 -11
- package/dist/{index-DCUzlKPZ.d.ts → index-DpUDK9zG.d.ts} +5 -0
- package/dist/index.d.ts +16 -6
- package/dist/index.js +650 -645
- package/dist/map/index.js +3 -3
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/registry-FHdUeVww.d.ts +71 -0
- package/dist/sounds-FO772MN2.js +1 -0
- package/dist/ui/index.d.ts +4 -2
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +81 -0
- package/package.json +27 -1
- package/dist/Calculator-NXMUEH5D.js +0 -29
- package/dist/ConfirmDialog-ZDVMT74Y.js +0 -1
- package/dist/PdfViewer-S2B2DZYB.js +0 -1
- package/dist/Spreadsheet-XT4HF7MQ.js +0 -37
- package/dist/chunk-6KO2U66R.js +0 -3
- package/dist/chunk-7U3F53IG.js +0 -1
- package/dist/chunk-BUTSU7FO.js +0 -1
- package/dist/chunk-GVZLCY3B.js +0 -994
- package/dist/chunk-JYLI2WXW.js +0 -12
- package/dist/chunk-LW27IM3S.js +0 -112
- package/dist/chunk-NCQLGQYR.js +0 -1
- package/dist/sounds-OMHXVVQ4.js +0 -1
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{EditableGrid as e}from"./chunk-PLX2N4N6.js";import"./chunk-BR22X7E5.js";import{AboutApp as t}from"./chunk-6MBERZOS.js";import{peekSpreadsheetPreviewStage as r,claimSpreadsheetPreviewStage as n,SPREADSHEET_PREVIEW_UPDATE_EVENT as o}from"./chunk-VTVSMRFX.js";import"./chunk-7U3F53IG.js";import{WindowTitle as a}from"./chunk-LW27IM3S.js";import"./chunk-A7Q4BCPI.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-JYLI2WXW.js";import"./chunk-6KO2U66R.js";import"./chunk-M4DB7UBZ.js";import"./chunk-N3ZXQE4M.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-NCQLGQYR.js";import"./chunk-D65T4H6J.js";import{useRef as l,useState as s,useEffect as c,useCallback as i}from"react";import{jsxs as u,jsx as d,Fragment as h}from"react/jsx-runtime";var m="ABCDEFGHIJKLMNOPQRSTUVWXYZ",p=10,x=30;function g(e){return e<26?m[e]:m[Math.floor(e/26)-1]+m[e%26]}function y(e){return Array.from({length:e},(e,t)=>({key:`col_${t}`,title:g(t),width:100}))}function b(e,t){return Array.from({length:e},()=>Array(t).fill(""))}function f(e){return{id:crypto.randomUUID(),name:e,columns:y(p),data:b(x,p),cellStyles:{}}}function v(e){return e.split("\n").map(e=>{if(e.includes("\t"))return e.split("\t").map(e=>e.trim());const t=[];let r="",n=!1;for(const o of e)'"'!==o?","!==o||n?r+=o:(t.push(r.trim()),r=""):n=!n;return t.push(r.trim()),t}).filter(e=>e.some(e=>e.trim()))}function w(e,t){const r=v(e);if(0===r.length)return null;const n=Math.max(p,r.reduce((e,t)=>Math.max(e,t.length),0)),o=r.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));return{id:crypto.randomUUID(),name:t,columns:y(n),data:o,cellStyles:{}}}function k(){const m=l(null),g=l(void 0);void 0===g.current&&(g.current=r());const k=l(g.current?.data??null),N=(()=>{const e=g.current;if(!e)return null;const t=w(e.data.csv,"Sheet 1");if(!t)return null;return{sheet:t,title:e.data.filename.replace(/\.(csv|tsv|txt)$/i,"")}})(),[C,S]=s(N?[N.sheet]:[f("Sheet 1")]),[j,M]=s(0),$=l([]),U=l(C),E=l(!1);c(()=>{E.current?E.current=!1:U.current!==C&&($.current.push(U.current),$.current.length>50&&$.current.shift()),U.current=C},[C]);const L=i(()=>{const e=$.current.pop();e&&(E.current=!0,S(e))},[]);c(()=>{const e=e=>{if(!m.current?.contains(document.activeElement)&&!m.current?.matches(":focus-within"))return;(e.ctrlKey||e.metaKey)&&!e.shiftKey&&("z"===e.key||"Z"===e.key)&&(e.preventDefault(),L())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[L]);const[A,D]=s(N?.title??"Untitled"),[R,B]=s(()=>g.current?.data.onEmail),F=i(e=>{const t=w(e.csv,"Sheet 1");t&&(S([t]),M(0),D(e.filename.replace(/\.(csv|tsv|txt)$/i,"")),B(()=>e.onEmail))},[]);c(()=>{const e=g.current;null!=e&&(n(e),e.data!==k.current&&F(e.data))},[]),c(()=>{const e=g.current?.token;if(null==e)return;const t=t=>{const r=t.detail;r&&r.token===e&&F(r.data)};return window.addEventListener(o,t),()=>window.removeEventListener(o,t)},[]);const[I,X]=s(!1),[O,Z]=s(null),[K,Q]=s(""),H=l(null),[P,W]=s("1"),[J,T]=s("10"),V=C[j]||C[0],z=V.data,Y=V.columns,G=V.cellStyles??{},[_,q]=s(null),[ee,te]=s(null),re=i(()=>{if(ee){const e=Math.min(ee.anchor.row,ee.end.row),t=Math.max(ee.anchor.row,ee.end.row),r=Math.min(ee.anchor.col,ee.end.col),n=Math.max(ee.anchor.col,ee.end.col),o=[];for(let a=e;a<=t;a++)for(let e=r;e<=n;e++)o.push({row:a,col:e});return o}return _?[_]:[]},[ee,_]),ne=i((e,t)=>{const r=re();0!==r.length&&S(n=>n.map((n,o)=>{if(o!==j)return n;const a={...n.cellStyles??{}},l=`${r[0].row}:${r[0].col}`,s=void 0!==t?t:!(a[l]??{})[e];for(const{row:t,col:n}of r){const r=`${t}:${n}`;a[r]={...a[r]??{},[e]:s}}return{...n,cellStyles:a}}))},[re,j]),oe=ee?{row:ee.anchor.row,col:ee.anchor.col}:_,ae=oe?G[`${oe.row}:${oe.col}`]??{}:{},le=!!oe,se=i(e=>{S(t=>t.map((t,r)=>r===j?{...t,...e}:t))},[j]),ce=i(e=>{const t=e.reduce((e,t)=>Math.max(e,t.length),0);t!==Y.length?se({data:e,columns:y(t)}):se({data:e})},[se,Y.length]),ie=(e,t)=>{S(r=>r.map((r,n)=>n===e?{...r,name:t}:r)),Z(null)},ue=()=>z.filter(e=>e.some(e=>e.trim())).map(e=>e.map(e=>e.includes(",")||e.includes('"')||e.includes("\n")?`"${e.replace(/"/g,'""')}"`:e).join(",")).join("\n"),de=[];z.forEach(e=>e.forEach(e=>{const t=parseFloat(e);!isNaN(t)&&e.trim()&&de.push(t)}));const he=z.reduce((e,t)=>e+t.filter(e=>e.trim()).length,0);/* @__PURE__ */
|
|
2
|
-
return u("div",{ref:m,className:"flex flex-col h-full",children:[
|
|
3
|
-
/* @__PURE__ */d(a,{title:`${me=A||"Untitled",me.length>24?`${me.slice(0,23)}…`:me} - Spreadsheets`}),
|
|
4
|
-
/* @__PURE__ */d(t,{app:"spreadsheet"}),
|
|
5
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[I?/* @__PURE__ */d("input",{type:"text",value:A,onChange:e=>D(e.target.value),onBlur:()=>X(!1),onKeyDown:e=>{"Enter"===e.key&&X(!1)},autoFocus:!0,className:"text-sm font-medium text-gray-900 border border-gray-300 rounded px-2 py-0.5 w-40 focus:border-blue-500 focus:ring-blue-500"}):/* @__PURE__ */d("button",{onClick:()=>X(!0),className:"text-sm font-medium text-gray-900 hover:text-blue-600 truncate max-w-[200px]",title:"Click to rename",children:A||"Untitled"}),
|
|
6
|
-
/* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
|
|
7
|
-
/* @__PURE__ */d("input",{ref:H,type:"file",accept:".csv,.tsv,.txt,.xlsx,.xls,.ods",onChange:async e=>{const t=e.target.files?.[0];if(!t)return;const r=t.name.replace(/\.(csv|tsv|txt|xlsx|xls|ods)$/i,"");if(/\.(xlsx|xls|ods)$/i.test(t.name)){const e=new Uint8Array(await t.arrayBuffer()),n=await(import("xlsx")),o=n.read(e,{type:"array"}),a=o.SheetNames.map(e=>{const t=n.utils.sheet_to_json(o.Sheets[e],{header:1,defval:""}),r=Math.max(p,t.reduce((e,t)=>Math.max(e,t.length),0)),a=t.map(e=>{const t=e.map(e=>String(e??""));for(;t.length<r;)t.push("");return t});for(;a.length<x;)a.push(Array(r).fill(""));return{id:crypto.randomUUID(),name:e,columns:y(r),data:a}});S(a),M(0),D(r)}else{const e=v(await t.text());if(0===e.length)return;const n=Math.max(p,e.reduce((e,t)=>Math.max(e,t.length),0)),o=e.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));se({columns:y(n),data:o}),D(r)}H.current&&(H.current.value="")},className:"hidden"}),
|
|
8
|
-
/* @__PURE__ */d("button",{onClick:()=>H.current?.click(),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Open"}),
|
|
9
|
-
/* @__PURE__ */d("button",{onClick:()=>{const e=new Blob([ue()],{type:"text/csv"}),t=URL.createObjectURL(e),r=document.createElement("a");r.href=t,r.download=`${A||"spreadsheet"}.csv`,r.click(),URL.revokeObjectURL(t)},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Save CSV"}),R&&/* @__PURE__ */d("button",{onClick:()=>R(ue(),`${A||"spreadsheet"}.csv`),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Email"}),
|
|
10
|
-
/* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
|
|
11
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
|
|
12
|
-
/* @__PURE__ */d("input",{type:"number",min:"1",max:"50",value:P,onChange:e=>W(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
|
|
13
|
-
/* @__PURE__ */d("button",{onClick:()=>(e=>{const t=Y.length+e;se({columns:y(t),data:z.map(t=>[...t,...Array(e).fill("")])})})(parseInt(P)||1),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Col"})]}),
|
|
14
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
|
|
15
|
-
/* @__PURE__ */d("input",{type:"number",min:"1",max:"500",value:J,onChange:e=>T(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
|
|
16
|
-
/* @__PURE__ */d("button",{onClick:()=>{return e=parseInt(J)||10,void se({data:[...z,...Array.from({length:e},()=>Array(Y.length).fill(""))]});var e},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Row"})]}),
|
|
17
|
-
/* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
|
|
18
|
-
/* @__PURE__ */d("button",{onClick:()=>{se({columns:y(p),data:b(x,p)})},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Clear"}),
|
|
19
|
-
/* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
|
|
20
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-0.5",title:le?"":"Click a cell first",children:[
|
|
21
|
-
/* @__PURE__ */d("button",{onClick:()=>ne("bold"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors font-bold ${ae.bold?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"B"}),
|
|
22
|
-
/* @__PURE__ */d("button",{onClick:()=>ne("italic"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors italic ${ae.italic?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"I"}),
|
|
23
|
-
/* @__PURE__ */d("button",{onClick:()=>ne("underline"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors underline ${ae.underline?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"U"}),
|
|
24
|
-
/* @__PURE__ */u("select",{value:ae.fontSize??"base",onChange:e=>ne("fontSize",e.target.value),disabled:!le,className:"ml-1 text-xs border border-gray-300 rounded px-1 py-0.5 bg-white disabled:opacity-40 disabled:cursor-not-allowed",children:[
|
|
25
|
-
/* @__PURE__ */d("option",{value:"sm",children:"XS"}),
|
|
26
|
-
/* @__PURE__ */d("option",{value:"base",children:"S"}),
|
|
27
|
-
/* @__PURE__ */d("option",{value:"lg",children:"M"}),
|
|
28
|
-
/* @__PURE__ */d("option",{value:"xl",children:"L"})]})]})]}),
|
|
29
|
-
/* @__PURE__ */d("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */d(e,{columns:Y,data:z,onChange:ce,onColumnsChange:e=>se({columns:e}),cellStyles:G,onFocusChange:q,onSelectionChange:te,minRows:x,maxHeight:"100%"})}),
|
|
30
|
-
/* @__PURE__ */u("div",{className:"flex items-center border-t border-gray-200 bg-gray-50 shrink-0",children:[
|
|
31
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-0.5 px-1 py-1 overflow-x-auto flex-1 min-w-0",children:[C.map((e,t)=>/* @__PURE__ */d("button",{onClick:()=>M(t),onDoubleClick:()=>{Z(t),Q(e.name)},onContextMenu:e=>{e.preventDefault(),C.length>1&&(e=>{C.length<=1||(S(t=>t.filter((t,r)=>r!==e)),j>=e&&j>0&&M(j-1))})(t)},className:"px-3 py-1 text-xs font-medium rounded-b whitespace-nowrap transition-colors "+(t===j?"bg-white text-blue-700 border border-t-0 border-gray-300 -mt-px relative z-10":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"),children:O===t?/* @__PURE__ */d("input",{type:"text",value:K,onChange:e=>Q(e.target.value),onBlur:()=>ie(t,K||e.name),onKeyDown:r=>{"Enter"===r.key&&ie(t,K||e.name),"Escape"===r.key&&Z(null)},onClick:e=>e.stopPropagation(),autoFocus:!0,className:"w-20 text-xs border border-blue-400 rounded px-1 py-0 focus:ring-0 focus:outline-none"}):e.name},e.id)),
|
|
32
|
-
/* @__PURE__ */d("button",{onClick:()=>{const e=`Sheet ${C.length+1}`;S(t=>[...t,f(e)]),M(C.length)},className:"px-2 py-1 text-xs text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded",title:"Add sheet",children:"+"})]}),
|
|
33
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-4 px-3 py-1 text-xs text-gray-500 shrink-0 border-l border-gray-200",children:[
|
|
34
|
-
/* @__PURE__ */u("span",{children:[he," cells"]}),de.length>0&&/* @__PURE__ */u(h,{children:[
|
|
35
|
-
/* @__PURE__ */u("span",{children:["Sum: ",de.reduce((e,t)=>e+t,0).toLocaleString(void 0,{maximumFractionDigits:2})]}),
|
|
36
|
-
/* @__PURE__ */u("span",{children:["Avg: ",(de.reduce((e,t)=>e+t,0)/de.length).toLocaleString(void 0,{maximumFractionDigits:2})]})]}),
|
|
37
|
-
/* @__PURE__ */u("span",{children:[z.length," × ",Y.length]})]})]})]});var me}export{k as default};
|
package/dist/chunk-6KO2U66R.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{useState as e,useRef as r,useEffect as t,useCallback as o}from"react";import{jsx as n}from"react/jsx-runtime";function i(n){const[i,a]=e(!1),c=r(void 0);t(()=>()=>clearTimeout(c.current),[]);return{copied:i,copy:o(e=>{e?.stopPropagation(),navigator.clipboard?.writeText(n).then(()=>{a(!0),clearTimeout(c.current),c.current=setTimeout(()=>a(!1),1500)},()=>{})},[n])}}function a({copied:e,className:r="w-4 h-4"}){/* @__PURE__ */
|
|
2
|
-
return n("svg",e?{className:`${r} text-green-600`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}:{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}function c({text:e}){const{copied:r,copy:t}=i(e);/* @__PURE__ */
|
|
3
|
-
return n("button",{onClick:t,title:r?"Copied!":`Copy ${e}`,className:"shrink-0 text-gray-400 hover:text-gray-600 transition-colors",children:/* @__PURE__ */n(a,{copied:r})})}export{c as CopyButton,a as CopyGlyph,i as useCopyText};
|
package/dist/chunk-7U3F53IG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="4.168.0",a=r;export{a as APP_VERSION,r as VERSION};
|
package/dist/chunk-BUTSU7FO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=null;function t(t,s,i="sine",o=.15){try{const n=(e||(e=new AudioContext),e),c=n.createOscillator(),r=n.createGain();c.type=i,c.frequency.value=t,r.gain.value=o,r.gain.exponentialRampToValueAtTime(.001,n.currentTime+s),c.connect(r),r.connect(n.destination),c.start(),c.stop(n.currentTime+s)}catch{}}var s={label:"Classic",success:()=>{t(523,.1,"sine",.1),setTimeout(()=>t(659,.1,"sine",.1),100),setTimeout(()=>t(784,.15,"sine",.1),200)},error:()=>{t(200,.15,"sawtooth",.08),setTimeout(()=>t(180,.15,"sawtooth",.08),150)},notification:()=>{t(880,.08,"sine",.12),setTimeout(()=>t(1100,.12,"sine",.1),100)},startup:()=>{t(392,.15,"sine",.08),setTimeout(()=>t(523,.15,"sine",.08),150),setTimeout(()=>t(659,.15,"sine",.08),300),setTimeout(()=>t(784,.25,"sine",.1),450)},logout:()=>{t(784,.15,"sine",.08),setTimeout(()=>t(659,.15,"sine",.08),150),setTimeout(()=>t(523,.15,"sine",.08),300),setTimeout(()=>t(392,.25,"sine",.06),450)},click:()=>{t(800,.05,"square",.05)},timerDone:()=>{for(let e=0;e<3;e++)setTimeout(()=>t(1e3,.15,"sine",.12),300*e),setTimeout(()=>t(800,.15,"sine",.1),300*e+150)}},i={classic:s,minimal:{label:"Minimal",success:()=>{t(1200,.06,"sine",.08)},error:()=>{t(300,.1,"triangle",.06)},notification:()=>{t(900,.06,"sine",.08)},startup:()=>{t(600,.12,"sine",.06),setTimeout(()=>t(900,.15,"sine",.06),120)},click:()=>{t(1e3,.03,"sine",.03)},timerDone:()=>{t(1e3,.2,"sine",.1),setTimeout(()=>t(1e3,.2,"sine",.1),400)},logout:()=>{t(900,.1,"sine",.06),setTimeout(()=>t(600,.15,"sine",.05),120)}},retro:{label:"Retro",success:()=>{t(440,.08,"square",.08),setTimeout(()=>t(550,.08,"square",.08),80),setTimeout(()=>t(660,.08,"square",.08),160),setTimeout(()=>t(880,.12,"square",.1),240)},error:()=>{t(150,.2,"square",.06),setTimeout(()=>t(100,.3,"square",.06),200)},notification:()=>{t(660,.06,"square",.08),setTimeout(()=>t(880,.06,"square",.08),80),setTimeout(()=>t(660,.06,"square",.08),160)},startup:()=>{[262,330,392,523].forEach((e,s)=>setTimeout(()=>t(e,.1,"square",.07),100*s))},click:()=>{t(600,.03,"square",.06)},timerDone:()=>{for(let e=0;e<4;e++)setTimeout(()=>t(880,.1,"square",.1),200*e)},logout:()=>{[523,392,330,262].forEach((e,s)=>setTimeout(()=>t(e,.1,"square",.07),100*s))}},soft:{label:"Soft",success:()=>{t(700,.2,"sine",.06),setTimeout(()=>t(900,.25,"sine",.06),200)},error:()=>{t(250,.2,"sine",.05)},notification:()=>{t(600,.15,"triangle",.06),setTimeout(()=>t(800,.2,"triangle",.05),180)},startup:()=>{t(400,.3,"sine",.05),setTimeout(()=>t(500,.3,"sine",.05),300),setTimeout(()=>t(600,.4,"sine",.06),600)},click:()=>{t(500,.04,"triangle",.03)},timerDone:()=>{t(700,.3,"triangle",.08),setTimeout(()=>t(700,.3,"triangle",.08),500),setTimeout(()=>t(900,.4,"triangle",.08),1e3)},logout:()=>{t(600,.3,"sine",.05),setTimeout(()=>t(400,.4,"sine",.04),300)}},arcade:{label:"Arcade",success:()=>{[523,659,784,1047].forEach((e,s)=>setTimeout(()=>t(e,.06,"square",.07),60*s))},error:()=>{t(100,.3,"sawtooth",.06),setTimeout(()=>t(80,.4,"sawtooth",.05),200)},notification:()=>{t(1047,.05,"square",.08),setTimeout(()=>t(784,.05,"square",.08),60),setTimeout(()=>t(1047,.08,"square",.1),120)},startup:()=>{[262,330,392,523,659,784].forEach((e,s)=>setTimeout(()=>t(e,.08,"square",.06),80*s))},click:()=>{t(1200,.02,"square",.05)},timerDone:()=>{for(let e=0;e<5;e++)setTimeout(()=>t(1200,.05,"square",.1),120*e)},logout:()=>{[784,659,523,392,262].forEach((e,s)=>setTimeout(()=>t(e,.06,"square",.06),60*s))}},silent:{label:"Silent",success:()=>{},error:()=>{},notification:()=>{},startup:()=>{},click:()=>{},timerDone:()=>{},logout:()=>{}}},o=Object.keys(i),n=["click","success","error","notification","startup","timerDone","logout"],c={click:"Click",success:"Success",error:"Error",notification:"Notification",startup:"Startup",timerDone:"Timer",logout:"Logout"},r="erp_sound_config";function u(){return"false"!==localStorage.getItem("erp_sounds")}function a(){const e=!u();return localStorage.setItem("erp_sounds",String(e)),e}function l(){try{const e=JSON.parse(localStorage.getItem(r)||"");if(e&&"object"==typeof e)return{click:"classic",success:"classic",error:"classic",notification:"classic",startup:"classic",timerDone:"classic",logout:"classic",...e}}catch{}return{click:"classic",success:"classic",error:"classic",notification:"classic",startup:"classic",timerDone:"classic",logout:"classic"}}function m(e,t){const s=l();s[e]=t,localStorage.setItem(r,JSON.stringify(s))}function f(e){const t={};n.forEach(s=>{t[s]=e}),localStorage.setItem(r,JSON.stringify(t))}function T(e){const t=l();return i[t[e]]||s}function g(){u()&&T("click").click()}function p(){u()&&T("success").success()}function q(){u()&&T("error").error()}function k(){u()&&T("notification").notification()}function S(){u()&&T("startup").startup()}function h(){u()&&T("timerDone").timerDone()}function D(){u()&&T("logout").logout()}function y(e,t){const s=i[e];s&&"function"==typeof s[t]&&s[t]()}export{i as SOUND_PACKS,o as SOUND_PACK_KEYS,n as SOUND_TYPES,c as SOUND_TYPE_LABELS,l as getSoundConfig,g as playClick,q as playError,D as playLogout,k as playNotification,S as playStartup,p as playSuccess,h as playTimerDone,y as previewSound,f as setAllSounds,m as setSoundForType,u as soundsEnabled,a as toggleSounds};
|