@cp949/mui-react19 1.0.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.file-drop.md +843 -0
- package/README.md +211 -0
- package/dist/chunk-3KMZF7M6.cjs +2 -0
- package/dist/chunk-3KMZF7M6.cjs.map +1 -0
- package/dist/chunk-4C666HHU.js +2 -0
- package/dist/chunk-4C666HHU.js.map +1 -0
- package/dist/chunk-M4G6J7DP.cjs +2 -0
- package/dist/chunk-M4G6J7DP.cjs.map +1 -0
- package/dist/chunk-T37ZYZXP.js +2 -0
- package/dist/chunk-T37ZYZXP.js.map +1 -0
- package/dist/closables-BK0Db72u.d.cts +135 -0
- package/dist/closables-BK0Db72u.d.ts +135 -0
- package/dist/file-drop/index.cjs +2 -0
- package/dist/file-drop/index.cjs.map +1 -0
- package/dist/file-drop/index.d.cts +748 -0
- package/dist/file-drop/index.d.ts +748 -0
- package/dist/file-drop/index.js +2 -0
- package/dist/file-drop/index.js.map +1 -0
- package/dist/helper/index.cjs +2 -0
- package/dist/helper/index.cjs.map +1 -0
- package/dist/helper/index.d.cts +113 -0
- package/dist/helper/index.d.ts +113 -0
- package/dist/helper/index.js +2 -0
- package/dist/helper/index.js.map +1 -0
- package/dist/hooks/index.cjs +2 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.cts +1319 -0
- package/dist/hooks/index.d.ts +1319 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +910 -0
- package/dist/index.d.ts +910 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/parallel-map-M764G6IE.js +2 -0
- package/dist/parallel-map-M764G6IE.js.map +1 -0
- package/dist/parallel-map-V2OVUIFQ.cjs +2 -0
- package/dist/parallel-map-V2OVUIFQ.cjs.map +1 -0
- package/package.json +117 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-4C666HHU.js";function $(...t){return t.filter(e=>e&&e.length>0&&e!==".").flatMap(e=>e.split("/")).filter(e=>e.length>0&&e!==".")}var S=class t{static join(...e){return t.split(...e).join("/")}static split=(...e)=>{let r=[];return e.forEach(i=>{Array.isArray(i)?i.forEach(s=>{typeof s=="string"&&s.length>0&&r.push(...$(s))}):typeof i=="string"&&i.length>0&&r.push(...$(i))}),r.filter(i=>typeof i=="string"&&i.length>0&&i!==".")};static pathStartsWith(e,r){return t.segmentsStartsWith(t.split(e),t.split(r))}static segmentsStartsWith(e,r){let i=e,s=r;return s.length>i.length?!1:s.every((o,l)=>o===i[l])}},x=class t{segments;path;constructor(e){Array.isArray(e)?this.segments=e:this.segments=S.split(e),this.path=this.segments.join("/")}static EMPTY=new t([]);static from=(...e)=>new t(S.split(...e));join=(...e)=>{let r=S.split(...this.segments,...e);return new t(r)};changeLast=e=>{if(this.segments.length===0)return new t(e);let r=this.segments.slice();return r[r.length-1]=e,new t(r)};parentOrNull=()=>{if(this.segments.length===0)return null;let e=this.segments.slice(0,this.segments.length-1);return new t(e)};lastSegmentOrNull=()=>this.segments.length===0?null:this.segments[this.segments.length-1];lastSegment=()=>this.segments.length===0?"":this.segments[this.segments.length-1];startsWith=e=>typeof e=="string"?S.segmentsStartsWith(this.segments,S.split(e)):Array.isArray(e)?S.segmentsStartsWith(this.segments,e):S.segmentsStartsWith(this.segments,e.segments);toString(){return this.path}};function C(t){return typeof t>"u"||t===null?"unknown":typeof t=="string"?t:typeof t=="object"&&"message"in t&&typeof t.message=="string"?t.message:String(t)}async function v(t,e,r,i,s="none",o=!0,l=4){let n=s!=="none",m=s==="verbose";if(e.isFile){let a=await B(e);if(!a){m&&console.debug("FileSystemEntry.getFile() error",e);return}i(a)&&r.push({type:"file",file:a,path:t.join(a.name)});return}if(!e.isDirectory)return;r.push({type:"dir",path:t.join(e.name)});let g=t.join(e.name);n&&console.log(`\u{1F50D} Traversing directory (Entry API): ${e.name} at path: ${g.toString()}`);let c=await V(e,s);m&&console.log(` \u{1F4CA} Total children found: ${c.length}`),m&&c.forEach((a,y)=>{console.log(` \u{1F4C4} Found [${y}]: ${a.name} (${a.isFile?"file":"directory"})`)});let{simpleParallelMap:P}=await import("../parallel-map-M764G6IE.js"),h=Math.max(1,l);if(o&&h>1&&c.length>1)n&&console.log(` \u26A1 Processing ${c.length} items in parallel (custom implementation, concurrency=${h})`),await P(c,async a=>{(a.isFile||a.isDirectory)&&await v(g,a,r,i,s,o,h)},h);else{n&&console.log(` \u{1F4DD} Processing ${c.length} item directly`);for(let a of c)(a.isFile||a.isDirectory)&&await v(g,a,r,i,s,o,h)}}async function B(t){try{return await new Promise((e,r)=>{t.file(i=>{e(i)},i=>{r(i)})})}catch{return null}}async function V(t,e="none"){try{return await U(t,e)}catch(r){return e==="verbose"&&console.debug(C(r)),[]}}async function U(t,e="none"){let r=t.createReader(),i=[];async function s(){return new Promise((o,l)=>{r.readEntries(function(n){n.length>0?(i=i.concat(n),o(s())):o(i)},n=>{e!=="none"&&console.warn("XXX readEntries() error",n),l(n)})})}return await s(),i}async function O(t,e,r,i,s="none",o=!0,l=4){let n=s!=="none",m=s==="verbose";if(e.kind==="file"){let c=await e.getFile();if(!c)return;i(c)&&r.push({type:"file",file:c,path:t.join(c.name)});return}if(e.kind!=="directory")return;r.push({type:"dir",path:t.join(e.name)});let g=t.join(e.name);try{let c=[],h=e.values();n&&console.log(`\u{1F50D} Traversing directory: ${e.name} at path: ${g.toString()}`);for await(let d of h)d&&(c.push(d),m&&console.log(` \u{1F4C4} Found: ${d.name} (${d.kind})`));m&&console.log(` \u{1F4CA} Total children found: ${c.length}`);let{simpleParallelMap:E}=await import("../parallel-map-M764G6IE.js"),a=Math.max(1,l);if(o&&a>1&&c.length>1)n&&console.log(` \u26A1 Processing ${c.length} items in parallel (custom implementation, concurrency=${a})`),await E(c,async d=>{(d.kind==="file"||d.kind==="directory")&&await O(g,d,r,i,s,o,a)},a);else{n&&console.log(` \u{1F4DD} Processing ${c.length} item directly`);for(let d of c)(d.kind==="file"||d.kind==="directory")&&await O(g,d,r,i,s,o,a)}}catch(c){n&&console.error(`\u274C Directory traversal error for ${e.name}:`,c)}}var L=(t,...e)=>e.every(r=>r in t);async function w(t,e,r,i,s="none",o=!0,l=4){if(L(e,"filesystem","fullPath","isDirectory","isFile")){await v(t,e,r,i,s,o,l);return}if(L(e,"kind","isSameEntry")){await O(t,e,r,i,s,o,l);return}let n=e;i(n)&&r.push({type:"file",file:n,path:t.join(n.name)})}var f=class extends Error{constructor(r,i,s){super(s||`File drop error: ${r}`);this.code=r;this.item=i;this.name="FileDropError"}};var F=class{static normalize(e){return e.replace(/\/+/g,"/").replace(/\/$/,"")||"/"}static join(...e){return this.normalize(e.filter(Boolean).join("/"))}static dirname(e){let r=this.normalize(e),i=r.lastIndexOf("/");return i<=0?"/":r.slice(0,i)}static basename(e,r){let s=this.normalize(e).split("/").pop()||"";return r&&s.endsWith(r)?s.slice(0,-r.length):s}static extname(e){let r=this.basename(e),i=r.lastIndexOf(".");return i>0?r.slice(i):""}static relative(e,r){let i=this.normalize(e).split("/").filter(Boolean),s=this.normalize(r).split("/").filter(Boolean),o=0;for(;o<i.length&&o<s.length&&i[o]===s[o];)o++;let l=i.length-o,n=s.slice(o);return[...Array(l).fill(".."),...n].join("/")||"."}};function z(t,e){if(e.length===0)return!0;let r=F.extname(t.name).toLowerCase();return e.some(i=>i.toLowerCase()===r||i.toLowerCase()===r.slice(1))}function M(t,e){return t.size<=e}function G(t){if(/[<>:"/\\|?*]/.test(t))return!1;for(let r=0;r<t.length;r+=1){let i=t.charCodeAt(r);if(i>=0&&i<=31)return!1}return t.trim().length>0}function Y(t){if(t.type)return t.type;let e=F.extname(t.name).toLowerCase();return{".txt":"text/plain",".js":"text/javascript",".ts":"text/typescript",".json":"application/json",".html":"text/html",".css":"text/css",".md":"text/markdown",".pdf":"application/pdf",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml"}[e]||"application/octet-stream"}function A(t,e,r=e){let i=F.extname(t.name),s=Y(t);return{type:"file",name:t.name,path:F.normalize(e),pathSegments:e.split("/").filter(Boolean),relativePath:F.normalize(r),size:t.size,lastModified:new Date(t.lastModified),file:t,mimeType:s,extension:i}}function K(t){let e=[];function r(i){let s={type:i.type,name:i.name,path:i.path,pathSegments:i.path.split("/").filter(Boolean),relativePath:i.path,size:i.metadata?.size,lastModified:i.metadata?.lastModified};e.push(s),i.children&&i.children.forEach(r)}return r(t),e}function R(t,e){if(!e(t))return null;let r=t.children?.map(i=>R(i,e)).filter(i=>i!==null);return{...t,children:r}}function k(t,e){if(e(t))return t;if(t.children)for(let r of t.children){let i=k(r,e);if(i)return i}return null}function j(t){let e={name:"",type:"directory",path:"",children:[]},r=new Map;r.set("",e);let i=[...t].sort((s,o)=>s.pathSegments.length-o.pathSegments.length);for(let s of i){let o={name:s.name,type:s.type,path:s.path,metadata:s.size!==void 0?{size:s.size,lastModified:s.lastModified,extension:F.extname(s.name),mimeType:s.mimeType}:void 0,file:s.file};r.set(s.path,o);let l=F.dirname(s.path),n=r.get(l);if(!n&&l!=="/"&&l!==""){let m=l.split("/").filter(Boolean);n={name:m[m.length-1]||"",type:"directory",path:l,children:[]},r.set(l,n)}!n&&(l===""||l==="/")&&(n=e),n&&(n.children||(n.children=[]),n.children.push(o))}return e}var N=class{options;fileCount=0;constructor(e={}){this.options=e}filter(e){if(this.options.excludeDirectories&&e.type==="directory")return{accepted:!1};if(e.type==="file"){let r=e.file;if(this.options.maxFiles&&this.fileCount>=this.options.maxFiles)return{accepted:!1,error:new f("TOO_MANY_FILES",e,`Maximum ${this.options.maxFiles} files allowed`)};if(this.options.maxSize&&!M(r,this.options.maxSize))return{accepted:!1,error:new f("FILE_TOO_LARGE",e,`File size ${r.size} exceeds limit ${this.options.maxSize}`)};if(this.options.allowedExtensions&&!z(r,this.options.allowedExtensions))return{accepted:!1,error:new f("INVALID_FILE_TYPE",e,`File type not allowed: ${r.name}`)};this.fileCount++}return this.options.accept&&!this.options.accept(e)?{accepted:!1}:{accepted:!0}}get currentFileCount(){return this.fileCount}reset(){this.fileCount=0}};var _={imagesOnly:()=>({allowedExtensions:[".jpg",".jpeg",".png",".gif",".svg",".webp"],excludeDirectories:!0}),textOnly:()=>({allowedExtensions:[".txt",".md",".json",".js",".ts",".html",".css"],excludeDirectories:!0}),smallFilesOnly:()=>({maxSize:1024*1024,excludeDirectories:!0}),developmentFiles:()=>({allowedExtensions:[".js",".ts",".tsx",".jsx",".json",".md",".html",".css",".scss",".py",".java",".cpp",".c",".h",".yml",".yaml",".toml"]})};var H=class{startTime;totalItems;processedItems=0;currentItem;onProgress;constructor(e,r){this.totalItems=e,this.startTime=Date.now(),this.onProgress=r?.onProgress}setCurrentItem(e){this.currentItem=e,this.notifyProgress()}completeItem(){this.processedItems++,this.currentItem=void 0,this.notifyProgress()}notifyProgress(){if(!this.onProgress)return;let e=Date.now()-this.startTime,r=this.totalItems>0?Math.round(this.processedItems/this.totalItems*100):0,i;if(this.processedItems>0&&r<100){let o=e/this.processedItems,l=this.totalItems-this.processedItems;i=Math.round(o*l)}let s={totalItems:this.totalItems,processedItems:this.processedItems,currentItem:this.currentItem,percentage:r,estimatedTimeLeft:i};this.onProgress(s)}updateTotalItems(e){this.totalItems=e,this.notifyProgress()}get isComplete(){return this.processedItems>=this.totalItems}get elapsedTime(){return Date.now()-this.startTime}};async function X(t){if("dataTransfer"in t){let e="getAsFileSystemHandle"in DataTransferItem.prototype,r="webkitGetAsEntry"in DataTransferItem.prototype;if(!e&&!r)return Array.from(t.dataTransfer.files);let i=Array.from(t.dataTransfer.items).filter(o=>o.kind==="file").map(o=>r?o.webkitGetAsEntry():e?o.getAsFileSystemHandle():o.getAsFile()).filter(Boolean);return(await Promise.all(i.map(o=>o&&o instanceof Promise?o:Promise.resolve(o)))).filter(Boolean)}return"length"in t?Array.from(t):Array.isArray(t)?t:null}async function q(t,e,r,i={},s,o="none",l){let n=[],m=[],g=0,{simpleParallelMap:c}=await import("../parallel-map-M764G6IE.js"),P=Math.max(1,l?.concurrency??4),h=l?.parallel??!0,E=o!=="none",a=o==="verbose",y=async p=>{if(s?.aborted)throw new f("UNKNOWN",void 0,"Operation aborted");try{await w(x.EMPTY,p,n,u=>{g++,r.updateTotalItems(g);let D=A(u,u.name);r.setCurrentItem(D);let T=e.filter(D);return T.error&&(m.push(T.error),i.onError?.(T.error,D)),T.accepted||r.completeItem(),T.accepted},o,h,P)}catch(u){let D=u instanceof f?u:new f("UNKNOWN",void 0,String(u));m.push(D),i.onError?.(D)}};if(h&&P>1&&t.length>1)E&&console.log(`\u{1F680} Processing ${t.length} handles in parallel (custom implementation, concurrency=${P})`),await c(t,y,P);else{E&&console.log(`\u{1F4DD} Processing ${t.length} handle directly`);for(let p of t)await y(p)}let b=[],I=[];r.updateTotalItems(g),E&&console.log(`\u{1F504} Processing ${n.length} total items from traversal`);for(let p of n)if(p.type==="file"){let u=A(p.file,p.path.toString(),p.path.toString());b.push(u),i.onFile?.(u),r.completeItem(),a&&console.log(` \u2705 File: ${p.path.toString()}`)}else{let u={type:"directory",name:p.path.lastSegment(),path:p.path.toString(),pathSegments:p.path.segments,relativePath:p.path.toString()};I.push(u),a&&console.log(` \u{1F4C1} Directory: ${p.path.toString()}`)}return E&&console.log(`\u{1F4CA} Final results: ${b.length} files, ${I.length} directories`),{items:b,directories:I,errors:m}}async function W(t,e={}){let r=Date.now(),i=Q(e.debug);try{if(e.signal?.aborted)throw new f("UNKNOWN",void 0,"Operation aborted");let s=await X(t);if(!s)throw new f("UNSUPPORTED_API",void 0,"Unsupported file drop source");let o=s.length,l=new H(o,e.callbacks),n=new N(e.filter);if(s.length>0&&s[0]instanceof File){let a=s,y=[],d=[];for(let I of a){if(e.signal?.aborted)throw new f("UNKNOWN",void 0,"Operation aborted");let p=A(I,I.name);l.setCurrentItem(p);let u=n.filter(p);u.accepted?(y.push(p),e.callbacks?.onFile?.(p)):u.error&&(d.push(u.error),e.callbacks?.onError?.(u.error,p)),l.completeItem()}let b=j(y);return{files:y,directories:[],tree:b,metadata:{totalFiles:y.length,totalDirectories:0,totalSize:y.reduce((I,p)=>I+(p.size||0),0),processingTime:Date.now()-r},errors:d}}let{items:m,directories:g,errors:c}=await q(s,n,l,e.callbacks,e.signal,i,e.processing),P=[...m,...g],h=j(P);return{files:m,directories:g,tree:h,metadata:{totalFiles:m.length,totalDirectories:g.length,totalSize:m.reduce((a,y)=>a+(y.size||0),0),processingTime:Date.now()-r},errors:c}}catch(s){throw s instanceof f?s:new f("UNKNOWN",void 0,String(s))}}async function J(t,e={}){try{return await W(t,e)}catch(r){return{success:!1,error:r instanceof f?r:new f("UNKNOWN",void 0,String(r))}}}function Q(t){return t===!0?"verbose":t===!1||t===void 0?"none":t}var Z=t=>!0;async function ee(t,e=Z){let r="getAsFileSystemHandle"in DataTransferItem.prototype,i="webkitGetAsEntry"in DataTransferItem.prototype;if(!r&&!i){let n=Array.from(t.dataTransfer.files);return n.length===0?[]:n.filter(e).map(m=>({type:"file",file:m,path:x.from(m.name).toString()}))}let s=[],o=Array.prototype.slice.call(t.dataTransfer.items).filter(n=>n.kind==="file").map(n=>i?n.webkitGetAsEntry():r?n.getAsFileSystemHandle():n.getAsFile()).filter(Boolean),{simpleParallelMap:l}=await import("../parallel-map-M764G6IE.js");if(o.length>1)await l(o,async n=>{let m=n;await w(x.EMPTY,m,s,e)},4);else for(let n of o){let m=n;await w(x.EMPTY,m,s,e)}return s.map(n=>({...n,path:n.path.toString()}))}export{f as FileDropError,F as FilePathUtils,_ as FilterPresets,x as PathHolder,S as PathUtils,j as buildFileTree,R as filterTree,k as findInTree,K as flattenTree,ee as handleFileTreeDropEvent,G as isValidFileName,M as isValidFileSize,z as isValidFileType,W as processFileTreeDrop,J as processFileTreeDropSafe};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/file-drop/internal/path-util.ts","../../src/file-drop/internal/util.ts","../../src/file-drop/internal/visit-file-system/visit-file-system-entry.ts","../../src/file-drop/internal/visit-file-system/visit-file-system-handle.ts","../../src/file-drop/internal/traverse-tree.ts","../../src/file-drop/types.ts","../../src/file-drop/utils/file-utils.ts","../../src/file-drop/utils/filter.ts","../../src/file-drop/utils/progress-tracker.ts","../../src/file-drop/process-file-drop.ts","../../src/file-drop/handle-file-tree-drop.ts"],"sourcesContent":["function split_(...args: (string | undefined | null)[]): string[] {\n return args\n .filter((it) => it && it.length > 0 && it !== '.')\n .flatMap((it) => it!.split('/'))\n .filter((it) => it.length > 0 && it !== '.');\n}\n\n/**\n * Path utils\n * not support relative path\n */\nexport class PathUtils {\n static join(...args: (string[] | string | undefined | null)[]): string {\n return PathUtils.split(...args).join('/');\n }\n\n static split = (...args: (string[] | string | undefined | null)[]): string[] => {\n const arr = [] as string[];\n args.forEach((item) => {\n if (Array.isArray(item)) {\n item.forEach((it) => {\n if (typeof it === 'string' && it.length > 0) {\n arr.push(...split_(it));\n }\n });\n } else if (typeof item === 'string' && item.length > 0) {\n arr.push(...split_(item));\n }\n });\n\n return arr.filter((it) => typeof it === 'string' && it.length > 0 && it !== '.');\n };\n\n /**\n * check startsWith for path segments\n * pathStartsWith('a/b/c','a/b') = true\n * pathStartsWith('/a/b/c','a/b') = true\n * pathStartsWith('/a/b/c','/a/b') = true\n * pathStartsWith('/a/b/c','/a/b/') = true\n * pathStartsWith('/a//b//c//','//a//b//') = true\n */\n static pathStartsWith(p1: string, p2: string): boolean {\n return PathUtils.segmentsStartsWith(PathUtils.split(p1), PathUtils.split(p2));\n }\n\n /**\n * check startsWith for path segments\n * segmentsStartsWith([1,2,3], [1,2]) = true\n */\n static segmentsStartsWith(p1: string[], p2: string[]): boolean {\n const arr1 = p1;\n const arr2 = p2;\n if (arr2.length > arr1.length) return false;\n return arr2.every((nm, i) => nm === arr1[i]);\n }\n}\n\nexport class PathHolder {\n readonly segments: string[];\n\n readonly path: string;\n\n constructor(path: string | string[]) {\n if (Array.isArray(path)) {\n this.segments = path;\n } else {\n this.segments = PathUtils.split(path);\n }\n this.path = this.segments.join('/');\n }\n\n static EMPTY = new PathHolder([]);\n\n static from = (...args: (string[] | string | undefined | null)[]): PathHolder => {\n return new PathHolder(PathUtils.split(...args));\n };\n\n join = (...args: (string[] | string | undefined | null)[]): PathHolder => {\n const segments = PathUtils.split(...this.segments, ...args);\n return new PathHolder(segments);\n };\n\n changeLast = (fileName: string): PathHolder => {\n if (this.segments.length === 0) {\n return new PathHolder(fileName);\n }\n const segments = this.segments.slice();\n segments[segments.length - 1] = fileName;\n return new PathHolder(segments);\n };\n\n parentOrNull = (): PathHolder | null => {\n if (this.segments.length === 0) {\n return null;\n }\n const segments = this.segments.slice(0, this.segments.length - 1);\n return new PathHolder(segments);\n };\n\n lastSegmentOrNull = (): string | null => {\n if (this.segments.length === 0) {\n return null;\n }\n return this.segments[this.segments.length - 1]!;\n };\n\n lastSegment = (): string => {\n if (this.segments.length === 0) {\n return '';\n }\n return this.segments[this.segments.length - 1]!;\n };\n\n startsWith = (otherPath: string | string[] | PathHolder): boolean => {\n if (typeof otherPath === 'string') {\n return PathUtils.segmentsStartsWith(this.segments, PathUtils.split(otherPath));\n } else if (Array.isArray(otherPath)) {\n return PathUtils.segmentsStartsWith(this.segments, otherPath);\n }\n return PathUtils.segmentsStartsWith(this.segments, otherPath.segments);\n };\n\n toString() {\n return this.path;\n }\n}\n","export function errmsg(err: unknown): string {\n if (typeof err === 'undefined' || err === null) return 'unknown';\n if (typeof err === 'string') return err;\n if (typeof err === 'object' && 'message' in err && typeof err.message === 'string') {\n return err.message;\n }\n return String(err);\n}\n","import type { DebugLevel } from '../../types.js';\nimport type { PathHolder } from '../path-util.js';\nimport { errmsg } from '../util.js';\nimport type { PathAndEntry } from './internal-types.js';\n\n/**\n * visitByFileSystemEntry\n */\nexport async function visitByFileSystemEntry(\n parent: PathHolder,\n item: FileSystemEntry,\n output: PathAndEntry[],\n callbackAccept: (file: File) => boolean,\n debugLevel: DebugLevel = 'none',\n parallel = true,\n concurrency = 4,\n) {\n const isInfoEnabled = debugLevel !== 'none';\n const isVerboseEnabled = debugLevel === 'verbose';\n\n if (item.isFile) {\n const file = await getFile(item as FileSystemFileEntry);\n if (!file) {\n if (isVerboseEnabled) {\n console.debug('FileSystemEntry.getFile() error', item);\n }\n return;\n }\n if (callbackAccept(file)) {\n output.push({\n type: 'file',\n file,\n path: parent.join(file.name),\n });\n }\n return;\n }\n\n if (!item.isDirectory) {\n // ignore\n return;\n }\n\n output.push({\n type: 'dir',\n path: parent.join(item.name),\n });\n\n const newParent = parent.join(item.name);\n if (isInfoEnabled) {\n console.log(\n `๐ Traversing directory (Entry API): ${item.name} at path: ${newParent.toString()}`,\n );\n }\n\n // ๋๋ ํ ๋ฆฌ ๋ด๋ถ์ ๋ชจ๋ ์ํธ๋ฆฌ๋ฅผ ์ฌ๊ท์ ์ผ๋ก ์ฝ์\n const children = await readEntries(item as FileSystemDirectoryEntry, debugLevel);\n if (isVerboseEnabled) {\n console.log(` ๐ Total children found: ${children.length}`);\n }\n\n if (isVerboseEnabled) {\n children.forEach((child, index) => {\n console.log(` ๐ Found [${index}]: ${child.name} (${child.isFile ? 'file' : 'directory'})`);\n });\n }\n\n // ์์ฒด ๊ตฌํํ parallelMap์ ์ฌ์ฉํ์ฌ ์ฑ๋ฅ ์ต์ ํ\n const { simpleParallelMap } = await import('../../utils/parallel-map.js');\n\n const normalizedConcurrency = Math.max(1, concurrency);\n const shouldParallel = parallel && normalizedConcurrency > 1 && children.length > 1;\n\n if (shouldParallel) {\n // ์ฌ๋ฌ ํ์ผ/๋๋ ํ ๋ฆฌ๊ฐ ์์ผ๋ฉด ๋ณ๋ ฌ ์ฒ๋ฆฌ๋ก ์ฑ๋ฅ ํฅ์\n if (isInfoEnabled) {\n console.log(\n ` โก Processing ${children.length} items in parallel (custom implementation, concurrency=${normalizedConcurrency})`,\n );\n }\n await simpleParallelMap(\n children,\n async (entry: FileSystemEntry) => {\n if (entry.isFile || entry.isDirectory) {\n await visitByFileSystemEntry(\n newParent,\n entry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n normalizedConcurrency,\n );\n }\n },\n normalizedConcurrency,\n ); // ์ต๋ 4๊ฐ์ฉ ๋์ ์ฒ๋ฆฌ\n } else {\n // ๋จ์ผ ํญ๋ชฉ์ ์ง์ ์ฒ๋ฆฌ (์ค๋ฒํค๋ ๋ฐฉ์ง)\n if (isInfoEnabled) {\n console.log(` ๐ Processing ${children.length} item directly`);\n }\n for (const entry of children) {\n if (entry.isFile || entry.isDirectory) {\n await visitByFileSystemEntry(\n newParent,\n entry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n normalizedConcurrency,\n );\n }\n }\n }\n}\n\nasync function getFile(fileEntry: FileSystemFileEntry): Promise<File | null> {\n try {\n return await new Promise((resolve, reject) => {\n fileEntry.file(\n (f) => {\n resolve(f);\n },\n (err) => {\n reject(err);\n },\n );\n });\n } catch {\n return null;\n }\n}\n\nasync function readEntries(\n item: FileSystemDirectoryEntry,\n debugLevel: DebugLevel = 'none',\n): Promise<FileSystemEntry[]> {\n try {\n return await readAllEntries(item, debugLevel);\n } catch (err) {\n if (debugLevel === 'verbose') {\n console.debug(errmsg(err));\n }\n return [];\n }\n}\nasync function readAllEntries(\n item: FileSystemDirectoryEntry,\n debugLevel: DebugLevel = 'none',\n): Promise<FileSystemEntry[]> {\n const dirReader = item.createReader();\n let allEntries: FileSystemEntry[] = [];\n\n async function readEntriesRecursively() {\n return new Promise<FileSystemEntry[]>((resolve, reject) => {\n dirReader.readEntries(\n function (entries) {\n if (entries.length > 0) {\n allEntries = allEntries.concat(entries);\n // ์์ง ๋ ์ฝ์ ํ์ผ์ด ๋จ์ ์์ ์ ์์ผ๋ฏ๋ก ์ฌ๊ท์ ์ผ๋ก ํธ์ถ\n resolve(readEntriesRecursively());\n } else {\n // ๋ ์ด์ ์ฝ์ ์ํธ๋ฆฌ๊ฐ ์์ผ๋ฉด ์ ์ฒด ๋ฆฌ์คํธ ๋ฐํ\n resolve(allEntries);\n }\n },\n (err) => {\n if (debugLevel !== 'none') {\n console.warn('XXX readEntries() error', err);\n }\n reject(err);\n },\n );\n });\n }\n\n await readEntriesRecursively();\n return allEntries;\n}\n","import type { DebugLevel } from '../../types.js';\nimport type { PathHolder } from '../path-util.js';\nimport type { PathAndEntry } from './internal-types.js';\n\nexport async function visitByFileSystemHandle(\n parent: PathHolder,\n handle: FileSystemHandle,\n output: PathAndEntry[],\n callbackAccept: (file: File) => boolean,\n debugLevel: DebugLevel = 'none',\n parallel = true,\n concurrency = 4,\n) {\n const isInfoEnabled = debugLevel !== 'none';\n const isVerboseEnabled = debugLevel === 'verbose';\n\n if (handle.kind === 'file') {\n const file = (await (handle as FileSystemFileHandle).getFile()) as File | null;\n if (!file) {\n return;\n }\n if (callbackAccept(file)) {\n output.push({\n type: 'file',\n file,\n path: parent.join(file.name),\n });\n }\n return;\n }\n\n if (handle.kind !== 'directory') {\n // ignore not file or directory\n return;\n }\n\n output.push({\n type: 'dir',\n path: parent.join(handle.name),\n });\n\n const newParent = parent.join(handle.name);\n try {\n // FileSystemDirectoryHandle์ values()๋ async iterator๋ฅผ ๋ฐํ\n const children: FileSystemHandle[] = [];\n // FileSystemDirectoryHandle.values()๋ ์ผ๋ถ ํ๊ฒฝ์ ํ์ค ํ์
์ ์์ ์ ์์ผ๋ฏ๋ก ์ธํฐํ์ด์ค ํ์ฅ ์ฌ์ฉ\n const directoryHandle = handle as FileSystemDirectoryHandle & {\n values(): AsyncIterableIterator<FileSystemHandle>;\n };\n const iterator = directoryHandle.values();\n\n if (isInfoEnabled) {\n console.log(`๐ Traversing directory: ${handle.name} at path: ${newParent.toString()}`);\n }\n\n // async iterator๋ฅผ ๋ฐฐ์ด๋ก ๋ณํ\n for await (const entry of iterator) {\n if (entry) {\n children.push(entry);\n if (isVerboseEnabled) {\n console.log(` ๐ Found: ${entry.name} (${entry.kind})`);\n }\n }\n }\n\n if (isVerboseEnabled) {\n console.log(` ๐ Total children found: ${children.length}`);\n }\n\n // ์์ฒด ๊ตฌํํ parallelMap ์ฌ์ฉ\n const { simpleParallelMap } = await import('../../utils/parallel-map.js');\n\n const normalizedConcurrency = Math.max(1, concurrency);\n const shouldParallel = parallel && normalizedConcurrency > 1 && children.length > 1;\n\n if (shouldParallel) {\n // ๋ณ๋ ฌ ์ฒ๋ฆฌ\n if (isInfoEnabled) {\n console.log(\n ` โก Processing ${children.length} items in parallel (custom implementation, concurrency=${normalizedConcurrency})`,\n );\n }\n await simpleParallelMap(\n children,\n async (entry: FileSystemHandle) => {\n if (entry.kind === 'file' || entry.kind === 'directory') {\n await visitByFileSystemHandle(\n newParent,\n entry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n normalizedConcurrency,\n );\n }\n },\n normalizedConcurrency,\n );\n } else {\n // ๋จ์ผ ํญ๋ชฉ์ ์ง์ ์ฒ๋ฆฌ\n if (isInfoEnabled) {\n console.log(` ๐ Processing ${children.length} item directly`);\n }\n for (const entry of children) {\n if (entry.kind === 'file' || entry.kind === 'directory') {\n await visitByFileSystemHandle(\n newParent,\n entry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n normalizedConcurrency,\n );\n }\n }\n }\n } catch (err) {\n if (isInfoEnabled) {\n console.error(`โ Directory traversal error for ${handle.name}:`, err);\n }\n }\n}\n","import type { DebugLevel } from '../types.js';\nimport type { PathHolder } from './path-util.js';\nimport type { PathAndEntry } from './visit-file-system/internal-types.js';\nimport { visitByFileSystemEntry } from './visit-file-system/visit-file-system-entry.js';\nimport { visitByFileSystemHandle } from './visit-file-system/visit-file-system-handle.js';\n\nconst hasProps = (target: object, ...keys: string[]): boolean => {\n return keys.every((it) => it in target);\n};\n\nexport async function traverseTree(\n parent: PathHolder,\n handle: FileSystemHandle | FileSystemEntry | File,\n output: PathAndEntry[],\n callbackAccept: (file: File) => boolean,\n debugLevel: DebugLevel = 'none',\n parallel = true,\n concurrency = 4,\n) {\n if (hasProps(handle, 'filesystem', 'fullPath', 'isDirectory', 'isFile')) {\n await visitByFileSystemEntry(\n parent,\n handle as FileSystemEntry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n concurrency,\n );\n return;\n }\n\n if (hasProps(handle, 'kind', 'isSameEntry')) {\n await visitByFileSystemHandle(\n parent,\n handle as FileSystemHandle,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n concurrency,\n );\n return;\n }\n\n // file์ ๋๋ ํ ๋ฆฌ์ธ์ง ์ ์ ์์\n const file = handle as File;\n if (callbackAccept(file)) {\n output.push({\n type: 'file',\n file,\n path: parent.join(file.name),\n });\n }\n}\n","/**\n * ๊ธฐ๋ณธ ํ์ผ/๋๋ ํ ๋ฆฌ ์์ดํ
์ ๋ํ๋ด๋ ์ธํฐํ์ด์ค\n *\n * @example\n * ```ts\n * const item: FileItem = {\n * type: 'file',\n * name: 'example.txt',\n * path: '/folder/example.txt',\n * pathSegments: ['folder', 'example.txt'],\n * size: 1024,\n * lastModified: new Date(),\n * relativePath: 'folder/example.txt'\n * };\n * ```\n */\nexport interface FileItem {\n /** ์์ดํ
ํ์
- ํ์ผ ๋๋ ๋๋ ํ ๋ฆฌ */\n type: 'file' | 'directory';\n /** ํ์ผ/๋๋ ํ ๋ฆฌ ์ด๋ฆ (ํ์ฅ์ ํฌํจ) */\n name: string;\n /** ์ ์ฒด ๊ฒฝ๋ก (๋ฃจํธ๋ถํฐ ์์) */\n path: string;\n /** ๊ฒฝ๋ก๋ฅผ ์ธ๊ทธ๋จผํธ๋ก ๋ถํ ํ ๋ฐฐ์ด */\n pathSegments: string[];\n /** ํ์ผ ํฌ๊ธฐ (๋ฐ์ดํธ ๋จ์, ๋๋ ํ ๋ฆฌ์ ๊ฒฝ์ฐ optional) */\n size?: number;\n /** ๋ง์ง๋ง ์์ ๋ ์ง */\n lastModified?: Date;\n /** ๋๋กญ ๋ฃจํธ๋ก๋ถํฐ์ ์๋ ๊ฒฝ๋ก */\n relativePath: string;\n}\n\n/**\n * ์ฒ๋ฆฌ ์๋ฃ๋ ํ์ผ ์ ๋ณด\n * FileItem์ ํ์ฅํ์ฌ ์ค์ File ๊ฐ์ฒด์ MIME ํ์
์ ๋ณด ํฌํจ\n *\n * @example\n * ```ts\n * const processedFile: ProcessedFile = {\n * type: 'file',\n * name: 'image.jpg',\n * file: fileObject,\n * mimeType: 'image/jpeg',\n * extension: '.jpg',\n * // ... ๊ธฐํ FileItem ์์ฑ๋ค\n * };\n * ```\n */\nexport interface ProcessedFile extends FileItem {\n /** ํญ์ 'file' ํ์
*/\n type: 'file';\n /** ๋ธ๋ผ์ฐ์ ์ File ๊ฐ์ฒด */\n file: File;\n /** MIME ํ์
(์: 'image/jpeg', 'text/plain') */\n mimeType: string;\n /** ํ์ผ ํ์ฅ์ (์ ํฌํจ, ์: '.jpg', '.txt') */\n extension: string;\n}\n\n/**\n * ์ฒ๋ฆฌ ์๋ฃ๋ ๋๋ ํ ๋ฆฌ ์ ๋ณด\n * FileItem์ ํ์ฅํ์ฌ ์์ ์์๋ค ํฌํจ ๊ฐ๋ฅ\n *\n * @example\n * ```ts\n * const processedDir: ProcessedDirectory = {\n * type: 'directory',\n * name: 'images',\n * children: [file1, file2],\n * // ... ๊ธฐํ FileItem ์์ฑ๋ค\n * };\n * ```\n */\nexport interface ProcessedDirectory extends FileItem {\n /** ํญ์ 'directory' ํ์
*/\n type: 'directory';\n /** ํ์ ํ์ผ/๋๋ ํ ๋ฆฌ ๋ชฉ๋ก (optional) */\n children?: FileItem[];\n}\n\n/**\n * ํ์ผ ํธ๋ฆฌ ๊ตฌ์กฐ๋ฅผ ๋ํ๋ด๋ ๋
ธ๋\n * ๊ณ์ธต์ ํ์ผ ์์คํ
๊ตฌ์กฐ๋ฅผ ํธ๋ฆฌ ํํ๋ก ํํ\n *\n * @example\n * ```ts\n * const treeNode: FileTreeNode = {\n * name: 'project',\n * type: 'directory',\n * path: '/project',\n * children: [\n * {\n * name: 'src',\n * type: 'directory',\n * path: '/project/src',\n * children: [...]\n * },\n * {\n * name: 'package.json',\n * type: 'file',\n * path: '/project/package.json',\n * file: fileObject,\n * metadata: { size: 1024, ... }\n * }\n * ]\n * };\n * ```\n */\nexport interface FileTreeNode {\n /** ๋
ธ๋ ์ด๋ฆ */\n name: string;\n /** ๋
ธ๋ ํ์
*/\n type: 'file' | 'directory';\n /** ๋
ธ๋์ ์ ์ฒด ๊ฒฝ๋ก */\n path: string;\n /** ์์ ๋
ธ๋๋ค (๋๋ ํ ๋ฆฌ์ธ ๊ฒฝ์ฐ) */\n children?: FileTreeNode[];\n /** ํ์ผ ๊ฐ์ฒด (ํ์ผ ๋
ธ๋์ธ ๊ฒฝ์ฐ) */\n file?: File;\n /** ํ์ผ ๋ฉํ๋ฐ์ดํฐ (ํ์ผ ๋
ธ๋์ธ ๊ฒฝ์ฐ) */\n metadata?: FileMetadata;\n}\n\n/**\n * ํ์ผ์ ๋ฉํ๋ฐ์ดํฐ ์ ๋ณด\n *\n * @example\n * ```ts\n * const metadata: FileMetadata = {\n * size: 2048,\n * lastModified: new Date('2023-12-01'),\n * mimeType: 'application/json',\n * extension: '.json'\n * };\n * ```\n */\nexport interface FileMetadata {\n /** ํ์ผ ํฌ๊ธฐ (๋ฐ์ดํธ ๋จ์) */\n size: number;\n /** ๋ง์ง๋ง ์์ ๋ ์ง */\n lastModified: Date;\n /** MIME ํ์
(optional) */\n mimeType?: string;\n /** ํ์ผ ํ์ฅ์ (์ ํฌํจ) */\n extension: string;\n}\n\n/**\n * ํ์ผ ์ฒ๋ฆฌ ์งํ ์ํฉ ์ ๋ณด\n * onProgress ์ฝ๋ฐฑ์์ ์ ๊ณต๋๋ ์งํ๋ฅ ๋ฐ์ดํฐ\n *\n * @example\n * ```ts\n * const progress: ProgressInfo = {\n * totalItems: 100,\n * processedItems: 45,\n * currentItem: { name: 'loading.txt', ... },\n * percentage: 45,\n * estimatedTimeLeft: 2300\n * };\n * ```\n */\nexport interface ProgressInfo {\n /** ์ ์ฒด ์ฒ๋ฆฌํ ์์ดํ
์ */\n totalItems: number;\n /** ํ์ฌ๊น์ง ์ฒ๋ฆฌ๋ ์์ดํ
์ */\n processedItems: number;\n /** ํ์ฌ ์ฒ๋ฆฌ ์ค์ธ ์์ดํ
(optional) */\n currentItem?: FileItem;\n /** ์งํ๋ฅ ํผ์ผํธ (0-100) */\n percentage: number;\n /** ์์ ๋จ์ ์๊ฐ (๋ฐ๋ฆฌ์ด, optional) */\n estimatedTimeLeft?: number;\n}\n\n/**\n * ํ์ผ ๋๋กญ ์ฒ๋ฆฌ ์ค ๋ฐ์ํ ์ ์๋ ์๋ฌ ์ฝ๋\n *\n * @example\n * ```ts\n * // ๊ฐ ์๋ฌ ์ฝ๋์ ์๋ฏธ:\n * 'UNSUPPORTED_API' // ๋ธ๋ผ์ฐ์ ๊ฐ File API๋ฅผ ์ง์ํ์ง ์์\n * 'FILE_TOO_LARGE' // ํ์ผ ํฌ๊ธฐ๊ฐ ํ์ฉ๋ ์ต๋ ํฌ๊ธฐ ์ด๊ณผ\n * 'ACCESS_DENIED' // ํ์ผ ์ ๊ทผ ๊ถํ ๊ฑฐ๋ถ๋จ\n * 'INVALID_FILE_TYPE' // ํ์ฉ๋์ง ์์ ํ์ผ ํ์\n * 'TOO_MANY_FILES' // ํ์ฉ๋ ์ต๋ ํ์ผ ์ ์ด๊ณผ\n * 'UNKNOWN' // ๊ธฐํ ์ ์ ์๋ ์๋ฌ\n * ```\n */\nexport type FileDropErrorCode =\n | 'UNSUPPORTED_API'\n | 'FILE_TOO_LARGE'\n | 'ACCESS_DENIED'\n | 'INVALID_FILE_TYPE'\n | 'TOO_MANY_FILES'\n | 'UNKNOWN';\n\n/**\n * ํ์ผ ๋๋กญ ์ฒ๋ฆฌ ์ค ๋ฐ์ํ๋ ์๋ฌ๋ฅผ ๋ํ๋ด๋ ํด๋์ค\n * ํ์ค Error๋ฅผ ํ์ฅํ์ฌ ์๋ฌ ์ฝ๋์ ๊ด๋ จ ์์ดํ
์ ๋ณด ํฌํจ\n *\n * @example\n * ```ts\n * throw new FileDropError(\n * 'FILE_TOO_LARGE',\n * fileItem,\n * 'File size exceeds 10MB limit'\n * );\n *\n * // ์๋ฌ ์ฒ๋ฆฌ\n * try {\n * await processFileTreeDrop(event);\n * } catch (error) {\n * if (error instanceof FileDropError) {\n * console.log(`Error code: ${error.code}`);\n * console.log(`Failed item: ${error.item?.name}`);\n * }\n * }\n * ```\n */\nexport class FileDropError extends Error {\n constructor(\n /** ์๋ฌ ์ฝ๋ */\n public code: FileDropErrorCode,\n /** ์๋ฌ์ ๊ด๋ จ๋ ํ์ผ/๋๋ ํ ๋ฆฌ ์์ดํ
(optional) */\n public item?: FileItem,\n /** ์๋ฌ ๋ฉ์์ง (optional, ๊ธฐ๋ณธ๊ฐ ์๋ ์์ฑ) */\n message?: string,\n ) {\n super(message || `File drop error: ${code}`);\n this.name = 'FileDropError';\n }\n}\n\n/**\n * ํ์ผ ํํฐ๋ง ์ต์
\n * ์ฒ๋ฆฌํ ํ์ผ๋ค์ ์ ํํ๊ณ ํํฐ๋งํ๋ ์ค์ \n *\n * @example\n * ```ts\n * const filterOptions: FilterOptions = {\n * maxSize: 10 * 1024 * 1024, // 10MB ์ ํ\n * maxFiles: 50, // ์ต๋ 50๊ฐ ํ์ผ\n * allowedExtensions: ['.jpg', '.png', '.gif'],\n * accept: (item) => !item.name.startsWith('.'), // ์จ๊น ํ์ผ ์ ์ธ\n * excludeDirectories: false // ๋๋ ํ ๋ฆฌ๋ ํฌํจ\n * };\n * ```\n */\nexport interface FilterOptions {\n /** ์ปค์คํ
ํํฐ ํจ์ - true ๋ฐํ์ ํ์ผ ํ์ฉ */\n accept?: (item: FileItem) => boolean;\n /** ์ต๋ ํ์ผ ํฌ๊ธฐ (๋ฐ์ดํธ ๋จ์) */\n maxSize?: number;\n /** ์ต๋ ํ์ผ ๊ฐ์ */\n maxFiles?: number;\n /** ํ์ฉํ ํ์ผ ํ์ฅ์ ๋ชฉ๋ก (์ ํฌํจ, ์: ['.jpg', '.png']) */\n allowedExtensions?: string[];\n /** true์ ๋๋ ํ ๋ฆฌ ์ ์ธํ๊ณ ํ์ผ๋ง ์ฒ๋ฆฌ */\n excludeDirectories?: boolean;\n}\n\n/**\n * ํ์ผ ์ฒ๋ฆฌ ์ต์
\n * ์ฑ๋ฅ๊ณผ ์ฒ๋ฆฌ ๋ฐฉ์์ ์ ์ดํ๋ ์ค์ \n *\n * @example\n * ```ts\n * const processingOptions: ProcessingOptions = {\n * parallel: true, // ๋ณ๋ ฌ ์ฒ๋ฆฌ ํ์ฑํ\n * concurrency: 4, // ๋์ ์ฒ๋ฆฌ ์ 4๊ฐ\n * preserveStructure: true // ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ ์ ์ง\n * };\n * ```\n */\nexport interface ProcessingOptions {\n /** ๋ณ๋ ฌ ์ฒ๋ฆฌ ์ฌ์ฉ ์ฌ๋ถ (๊ธฐ๋ณธ: true) */\n parallel?: boolean;\n /** ๋์ ์ฒ๋ฆฌํ ํ์ผ ์ (๊ธฐ๋ณธ: 4) */\n concurrency?: number;\n /** ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ ์ ๋ณด ์ ์ง ์ฌ๋ถ (๊ธฐ๋ณธ: true) */\n preserveStructure?: boolean;\n}\n\n/**\n * ์ฝ๋ฐฑ ์ต์
\n * ์ฒ๋ฆฌ ๊ณผ์ ์์ ํธ์ถ๋ ์ฝ๋ฐฑ ํจ์๋ค\n *\n * @example\n * ```ts\n * const callbacks: CallbackOptions = {\n * onProgress: (progress) => {\n * console.log(`์งํ๋ฅ : ${progress.percentage}%`);\n * },\n * onError: (error, item) => {\n * console.error(`${item?.name} ์ฒ๋ฆฌ ์คํจ: ${error.message}`);\n * },\n * onFile: (file) => {\n * console.log(`ํ์ผ ์ฒ๋ฆฌ ์๋ฃ: ${file.name}`);\n * }\n * };\n * ```\n */\nexport interface CallbackOptions {\n /** ์งํ์ํฉ ์
๋ฐ์ดํธ์ ํธ์ถ๋๋ ์ฝ๋ฐฑ */\n onProgress?: (progress: ProgressInfo) => void;\n /** ์๋ฌ ๋ฐ์์ ํธ์ถ๋๋ ์ฝ๋ฐฑ */\n onError?: (error: FileDropError, item?: FileItem) => void;\n /** ๊ฐ ํ์ผ ์ฒ๋ฆฌ ์๋ฃ์ ํธ์ถ๋๋ ์ฝ๋ฐฑ */\n onFile?: (file: ProcessedFile) => void;\n}\n\n/**\n * processFileTreeDrop ํจ์์ ์ ์ฒด ์ต์
\n * ๋ชจ๋ ์ค์ ์ ํ ๊ณณ์์ ๊ด๋ฆฌ\n *\n * @example\n * ```ts\n * const options: FileDropOptions = {\n * filter: {\n * maxSize: 10 * 1024 * 1024,\n * allowedExtensions: ['.jpg', '.png']\n * },\n * processing: {\n * parallel: true,\n * concurrency: 4\n * },\n * callbacks: {\n * onProgress: (prog) => console.log(`${prog.percentage}%`)\n * },\n * includeMetadata: true,\n * signal: abortController.signal\n * };\n *\n * const result = await processFileTreeDrop(event, options);\n * ```\n */\nexport interface FileDropOptions {\n /** ํ์ผ ํํฐ๋ง ์ต์
*/\n filter?: FilterOptions;\n /** ์ฒ๋ฆฌ ๋ฐฉ์ ์ต์
*/\n processing?: ProcessingOptions;\n /** ์ฝ๋ฐฑ ํจ์๋ค */\n callbacks?: CallbackOptions;\n /** ์์ธํ ๋ฉํ๋ฐ์ดํฐ ํฌํจ ์ฌ๋ถ (๊ธฐ๋ณธ: true) */\n includeMetadata?: boolean;\n /** ์ฒ๋ฆฌ ์ค๋จ์ ์ํ AbortSignal */\n signal?: AbortSignal;\n /**\n * ๋๋ฒ๊ทธ ๋ก๊ทธ ์ถ๋ ฅ ๋ ๋ฒจ\n * - 'none': ๋ก๊ทธ ๋นํ์ฑํ (๊ธฐ๋ณธ๊ฐ)\n * - 'info': ์ฃผ์ ๋จ๊ณ์ ์์ฝ ์ ๋ณด๋ง ์ถ๋ ฅ\n * - 'verbose': ํ์ผ/๋๋ ํฐ๋ฆฌ ๋จ์์ ์์ธ ๋ก๊ทธ ํฌํจ\n *\n * ๊ธฐ์กด boolean ์ต์
๊ณผ์ ํธํ์ ์ํด true๋ 'verbose', false๋ 'none'์ผ๋ก ๊ฐ์ฃผํฉ๋๋ค.\n */\n debug?: DebugLevel | boolean;\n}\n\n/** ๋๋ฒ๊ทธ ๋ก๊ทธ ์ถ๋ ฅ ๋ ๋ฒจ */\nexport type DebugLevel = 'none' | 'info' | 'verbose';\n\n/**\n * ํ์ผ ํธ๋ฆฌ ์ฒ๋ฆฌ ์ฑ๊ณต ๊ฒฐ๊ณผ\n * processFileTreeDrop ํจ์๊ฐ ์ ์ ์๋ฃ์ ๋ฐํํ๋ ๋ฐ์ดํฐ\n *\n * @example\n * ```ts\n * const result: ProcessResult = {\n * files: [\n * { name: 'image.jpg', type: 'file', file: fileObj, ... },\n * { name: 'document.pdf', type: 'file', file: fileObj2, ... }\n * ],\n * directories: [\n * { name: 'photos', type: 'directory', children: [...] }\n * ],\n * tree: {\n * name: 'root',\n * type: 'directory',\n * children: [...] // ๊ณ์ธต ๊ตฌ์กฐ\n * },\n * metadata: {\n * totalFiles: 25,\n * totalDirectories: 3,\n * totalSize: 1024 * 1024 * 5, // 5MB\n * processingTime: 1250 // 1.25์ด\n * },\n * errors: [] // ์๋ฌ ๋ฐ์์ ์ ๋ณด ํฌํจ\n * };\n * ```\n */\nexport interface ProcessResult {\n /** ์ฒ๋ฆฌ๋ ๋ชจ๋ ํ์ผ๋ค */\n files: ProcessedFile[];\n /** ์ฒ๋ฆฌ๋ ๋ชจ๋ ๋๋ ํ ๋ฆฌ๋ค */\n directories: ProcessedDirectory[];\n /** ๊ณ์ธต ๊ตฌ์กฐ๋ฅผ ๋ํ๋ด๋ ํธ๋ฆฌ */\n tree: FileTreeNode;\n /** ์ฒ๋ฆฌ ๊ฒฐ๊ณผ ํต๊ณ ์ ๋ณด */\n metadata: {\n /** ์ด ํ์ผ ์ */\n totalFiles: number;\n /** ์ด ๋๋ ํ ๋ฆฌ ์ */\n totalDirectories: number;\n /** ์ด ํ์ผ ํฌ๊ธฐ (๋ฐ์ดํธ) */\n totalSize: number;\n /** ์ฒ๋ฆฌ ์์ ์๊ฐ (๋ฐ๋ฆฌ์ด) */\n processingTime: number;\n };\n /** ์ฒ๋ฆฌ ์ค ๋ฐ์ํ ์๋ฌ๋ค (๋ถ๋ถ ์คํจ์ ํฌํจ) */\n errors: FileDropError[];\n}\n\n/**\n * ํ์ผ ํธ๋ฆฌ ์ฒ๋ฆฌ ์คํจ ๊ฒฐ๊ณผ\n * processFileTreeDropSafe ํจ์์์ ์ ์ฒด ์คํจ์ ๋ฐํ\n *\n * @example\n * ```ts\n * const errorResult: ErrorResult = {\n * success: false,\n * error: new FileDropError('ACCESS_DENIED', item, 'Permission denied'),\n * partialResult: { files: [...], ... } // ๋ถ๋ถ์ ์ผ๋ก ์ฒ๋ฆฌ๋ ๊ฒฐ๊ณผ (optional)\n * };\n * ```\n */\nexport interface ErrorResult {\n /** ํญ์ false (์คํจ ํ์) */\n success: false;\n /** ๋ฐ์ํ ์ฃผ์ ์๋ฌ */\n error: FileDropError;\n /** ๋ถ๋ถ์ ์ผ๋ก ์ฒ๋ฆฌ๋ ๊ฒฐ๊ณผ (optional) */\n partialResult?: ProcessResult;\n}\n\n/**\n * ์์ ํ ์ฒ๋ฆฌ ๊ฒฐ๊ณผ ํ์
\n * processFileTreeDropSafe ํจ์์ ๋ฐํ ํ์
\n * ์ฑ๊ณต์ ProcessResult, ์คํจ์ ErrorResult ๋ฐํ\n *\n * @example\n * ```ts\n * const result: SafeProcessResult = await processFileTreeDropSafe(event);\n *\n * if ('error' in result) {\n * // ์คํจํ ๊ฒฝ์ฐ\n * console.error('์ฒ๋ฆฌ ์คํจ:', result.error.message);\n * if (result.partialResult) {\n * console.log('๋ถ๋ถ ๊ฒฐ๊ณผ:', result.partialResult.files.length);\n * }\n * } else {\n * // ์ฑ๊ณตํ ๊ฒฝ์ฐ\n * console.log('์ฒ๋ฆฌ ์ฑ๊ณต:', result.files.length, '๊ฐ ํ์ผ');\n * }\n * ```\n */\nexport type SafeProcessResult = ProcessResult | ErrorResult;\n\n/**\n * ์ง์๋๋ ํ์ผ ๋๋กญ ์์ค ํ์
\n * processFileTreeDrop ํจ์๊ฐ ๋ฐ์ ์ ์๋ ์
๋ ฅ ํ์
๋ค\n *\n * @example\n * ```ts\n * // React ๋๋๊ทธ ์ด๋ฒคํธ\n * const handleDrop = async (event: React.DragEvent<HTMLDivElement>) => {\n * const result = await processFileTreeDrop(event);\n * };\n *\n * // ํ์ผ ๋ฆฌ์คํธ\n * const fileInput = document.querySelector('input[type=\"file\"]');\n * const result = await processFileTreeDrop(fileInput.files);\n *\n * // FileSystemHandle ๋ฐฐ์ด\n * const handles: FileSystemHandle[] = [...];\n * const result = await processFileTreeDrop(handles);\n *\n * // File ๊ฐ์ฒด ๋ฐฐ์ด\n * const files: File[] = [...];\n * const result = await processFileTreeDrop(files);\n * ```\n */\nexport type FileDropSource = React.DragEvent<HTMLElement> | FileList | FileSystemHandle[] | File[];\n\n/**\n * ๋ ๊ฑฐ์ API ํธํ์ฑ์ ์ํ ํ์ผ ์์ดํ
ํ์
\n * handleFileTreeDropEvent ํจ์์์ ์ฌ์ฉ\n *\n * @deprecated ์๋ก์ด ์ฝ๋์์๋ FileItem ์ฌ์ฉ ๊ถ์ฅ\n *\n * @example\n * ```ts\n * // ๋ ๊ฑฐ์ ๋ฐฉ์ (ํ์ ํธํ์ฑ์ฉ)\n * const legacyResult: LegacyFileItem[] = await handleFileTreeDropEvent(event);\n *\n * // ์๋ก์ด ๋ฐฉ์ (๊ถ์ฅ)\n * const newResult: ProcessResult = await processFileTreeDrop(event);\n * ```\n */\nexport interface LegacyFileItem {\n /** ์์ดํ
ํ์
- 'file' ๋๋ 'dir' */\n type: 'file' | 'dir';\n /** ํ์ผ/๋๋ ํ ๋ฆฌ ๊ฒฝ๋ก */\n path: string;\n /** File ๊ฐ์ฒด (ํ์ผ์ธ ๊ฒฝ์ฐ๋ง) */\n file?: File;\n}\n","import type { FileItem, FileTreeNode, ProcessedFile } from '../types.js';\n\n/**\n * ํ์ผ ๊ฒฝ๋ก ์ ํธ๋ฆฌํฐ (๊ธฐ์กด PathUtils ๊ฐ์ )\n */\nexport class FilePathUtils {\n static normalize(path: string): string {\n return path.replace(/\\/+/g, '/').replace(/\\/$/, '') || '/';\n }\n\n static join(...segments: string[]): string {\n return this.normalize(segments.filter(Boolean).join('/'));\n }\n\n static dirname(path: string): string {\n const normalized = this.normalize(path);\n const lastSlash = normalized.lastIndexOf('/');\n return lastSlash <= 0 ? '/' : normalized.slice(0, lastSlash);\n }\n\n static basename(path: string, ext?: string): string {\n const normalized = this.normalize(path);\n const name = normalized.split('/').pop() || '';\n if (ext && name.endsWith(ext)) {\n return name.slice(0, -ext.length);\n }\n return name;\n }\n\n static extname(path: string): string {\n const name = this.basename(path);\n const lastDot = name.lastIndexOf('.');\n return lastDot > 0 ? name.slice(lastDot) : '';\n }\n\n static relative(from: string, to: string): string {\n const fromParts = this.normalize(from).split('/').filter(Boolean);\n const toParts = this.normalize(to).split('/').filter(Boolean);\n\n let i = 0;\n while (i < fromParts.length && i < toParts.length && fromParts[i] === toParts[i]) {\n i++;\n }\n\n const upLevels = fromParts.length - i;\n const remainingParts = toParts.slice(i);\n\n return [...Array(upLevels).fill('..'), ...remainingParts].join('/') || '.';\n }\n}\n\n/**\n * ํ์ผ ๊ฒ์ฆ ํจ์๋ค\n */\nexport function isValidFileType(file: File, allowedExtensions: string[]): boolean {\n if (allowedExtensions.length === 0) return true;\n\n const extension = FilePathUtils.extname(file.name).toLowerCase();\n return allowedExtensions.some(\n (ext) => ext.toLowerCase() === extension || ext.toLowerCase() === extension.slice(1), // '.' ์์ด๋ ํ์ฉ\n );\n}\n\nexport function isValidFileSize(file: File, maxSize: number): boolean {\n return file.size <= maxSize;\n}\n\nexport function isValidFileName(name: string): boolean {\n // ๊ธฐ๋ณธ์ ์ธ ํ์ผ๋ช
๊ฒ์ฆ (ํน์๋ฌธ์ ์ ํ)\n const invalidChars = /[<>:\"/\\\\|?*]/;\n if (invalidChars.test(name)) return false;\n for (let i = 0; i < name.length; i += 1) {\n const code = name.charCodeAt(i);\n if (code >= 0x00 && code <= 0x1f) return false;\n }\n return name.trim().length > 0;\n}\n\n/**\n * MIME ํ์
์ถ๋ก \n */\nexport function inferMimeType(file: File): string {\n if (file.type) return file.type;\n\n const extension = FilePathUtils.extname(file.name).toLowerCase();\n const mimeMap: Record<string, string> = {\n '.txt': 'text/plain',\n '.js': 'text/javascript',\n '.ts': 'text/typescript',\n '.json': 'application/json',\n '.html': 'text/html',\n '.css': 'text/css',\n '.md': 'text/markdown',\n '.pdf': 'application/pdf',\n '.png': 'image/png',\n '.jpg': 'image/jpeg',\n '.jpeg': 'image/jpeg',\n '.gif': 'image/gif',\n '.svg': 'image/svg+xml',\n };\n\n return mimeMap[extension] || 'application/octet-stream';\n}\n\n/**\n * ํ์ผ ์์ดํ
์์ฑ\n */\nexport function createFileItem(\n file: File,\n path: string,\n relativePath: string = path,\n): ProcessedFile {\n const extension = FilePathUtils.extname(file.name);\n const mimeType = inferMimeType(file);\n\n return {\n type: 'file',\n name: file.name,\n path: FilePathUtils.normalize(path),\n pathSegments: path.split('/').filter(Boolean),\n relativePath: FilePathUtils.normalize(relativePath),\n size: file.size,\n lastModified: new Date(file.lastModified),\n file,\n mimeType,\n extension,\n };\n}\n\n/**\n * ํธ๋ฆฌ ๊ตฌ์กฐ ์กฐ์ ์ ํธ๋ฆฌํฐ\n */\nexport function flattenTree(tree: FileTreeNode): FileItem[] {\n const result: FileItem[] = [];\n\n function traverse(node: FileTreeNode) {\n const item: FileItem = {\n type: node.type,\n name: node.name,\n path: node.path,\n pathSegments: node.path.split('/').filter(Boolean),\n relativePath: node.path,\n size: node.metadata?.size,\n lastModified: node.metadata?.lastModified,\n };\n\n result.push(item);\n\n if (node.children) {\n node.children.forEach(traverse);\n }\n }\n\n traverse(tree);\n return result;\n}\n\nexport function filterTree(\n tree: FileTreeNode,\n predicate: (node: FileTreeNode) => boolean,\n): FileTreeNode | null {\n if (!predicate(tree)) {\n return null;\n }\n\n const filteredChildren = tree.children\n ?.map((child) => filterTree(child, predicate))\n .filter((child): child is FileTreeNode => child !== null);\n\n return {\n ...tree,\n children: filteredChildren,\n };\n}\n\nexport function findInTree(\n tree: FileTreeNode,\n predicate: (node: FileTreeNode) => boolean,\n): FileTreeNode | null {\n if (predicate(tree)) {\n return tree;\n }\n\n if (tree.children) {\n for (const child of tree.children) {\n const found = findInTree(child, predicate);\n if (found) return found;\n }\n }\n\n return null;\n}\n\n/**\n * ํธ๋ฆฌ ๋น๋\n */\nexport function buildFileTree(items: FileItem[]): FileTreeNode {\n const root: FileTreeNode = {\n name: '',\n type: 'directory',\n path: '',\n children: [],\n };\n\n const nodeMap = new Map<string, FileTreeNode>();\n nodeMap.set('', root);\n\n // ๊ฒฝ๋ก ๊น์ด ์์ผ๋ก ์ ๋ ฌ\n const sortedItems = [...items].sort((a, b) => a.pathSegments.length - b.pathSegments.length);\n\n for (const item of sortedItems) {\n const node: FileTreeNode = {\n name: item.name,\n type: item.type,\n path: item.path,\n metadata:\n item.size !== undefined\n ? {\n size: item.size,\n lastModified: item.lastModified!,\n extension: FilePathUtils.extname(item.name),\n mimeType: (item as ProcessedFile).mimeType,\n }\n : undefined,\n file: (item as ProcessedFile).file,\n };\n\n nodeMap.set(item.path, node);\n\n // ๋ถ๋ชจ ์ฐพ๊ธฐ\n const parentPath = FilePathUtils.dirname(item.path);\n let parent = nodeMap.get(parentPath);\n\n // ๋ถ๋ชจ๊ฐ ์์ผ๋ฉด ์์ฑ (์ค๊ฐ ๋๋ ํ ๋ฆฌ ์ฒ๋ฆฌ)\n if (!parent && parentPath !== '/' && parentPath !== '') {\n const parentSegments = parentPath.split('/').filter(Boolean);\n parent = {\n name: parentSegments[parentSegments.length - 1] || '',\n type: 'directory' as const,\n path: parentPath,\n children: [],\n };\n nodeMap.set(parentPath, parent);\n }\n\n // ๋ฃจํธ์ ์ถ๊ฐ (parentPath๊ฐ '' ๋๋ '/'์ธ ๊ฒฝ์ฐ)\n if (!parent && (parentPath === '' || parentPath === '/')) {\n parent = root;\n }\n\n if (parent) {\n if (!parent.children) parent.children = [];\n parent.children.push(node);\n }\n }\n\n return root;\n}\n","import type { FileItem, FilterOptions, ProcessedFile } from '../types.js';\nimport { FileDropError } from '../types.js';\nimport { isValidFileSize, isValidFileType } from './file-utils.js';\n\n/**\n * ํ์ผ ํํฐ๋ง ๊ฒฐ๊ณผ\n */\nexport interface FilterResult {\n accepted: boolean;\n error?: FileDropError;\n}\n\n/**\n * ํ์ผ ํํฐ\n */\nexport class FileFilter {\n private options: FilterOptions;\n private fileCount: number = 0;\n\n constructor(options: FilterOptions = {}) {\n this.options = options;\n }\n\n /**\n * ํ์ผ ์์ดํ
ํํฐ๋ง\n */\n filter(item: FileItem): FilterResult {\n // ๋๋ ํ ๋ฆฌ ์ ์ธ ์ต์
ํ์ธ\n if (this.options.excludeDirectories && item.type === 'directory') {\n return { accepted: false };\n }\n\n // ํ์ผ๋ง ์ถ๊ฐ ๊ฒ์ฆ\n if (item.type === 'file') {\n const file = (item as ProcessedFile).file;\n\n // ํ์ผ ๊ฐ์ ์ ํ\n if (this.options.maxFiles && this.fileCount >= this.options.maxFiles) {\n return {\n accepted: false,\n error: new FileDropError(\n 'TOO_MANY_FILES',\n item,\n `Maximum ${this.options.maxFiles} files allowed`,\n ),\n };\n }\n\n // ํ์ผ ํฌ๊ธฐ ์ ํ\n if (this.options.maxSize && !isValidFileSize(file, this.options.maxSize)) {\n return {\n accepted: false,\n error: new FileDropError(\n 'FILE_TOO_LARGE',\n item,\n `File size ${file.size} exceeds limit ${this.options.maxSize}`,\n ),\n };\n }\n\n // ํ์ฅ์ ์ ํ\n if (\n this.options.allowedExtensions &&\n !isValidFileType(file, this.options.allowedExtensions)\n ) {\n return {\n accepted: false,\n error: new FileDropError(\n 'INVALID_FILE_TYPE',\n item,\n `File type not allowed: ${file.name}`,\n ),\n };\n }\n\n this.fileCount++;\n }\n\n // ์ปค์คํ
ํํฐ ํจ์\n if (this.options.accept && !this.options.accept(item)) {\n return { accepted: false };\n }\n\n return { accepted: true };\n }\n\n /**\n * ํ์ฌ ํ์ผ ๊ฐ์\n */\n get currentFileCount(): number {\n return this.fileCount;\n }\n\n /**\n * ํํฐ ์ด๊ธฐํ\n */\n reset() {\n this.fileCount = 0;\n }\n}\n\n/**\n * ํ์ผ ๋ฆฌ์คํธ ํํฐ๋ง\n */\nexport function filterFiles(\n items: FileItem[],\n options: FilterOptions = {},\n): { accepted: FileItem[]; rejected: FileItem[]; errors: FileDropError[] } {\n const filter = new FileFilter(options);\n const accepted: FileItem[] = [];\n const rejected: FileItem[] = [];\n const errors: FileDropError[] = [];\n\n for (const item of items) {\n const result = filter.filter(item);\n\n if (result.accepted) {\n accepted.push(item);\n } else {\n rejected.push(item);\n if (result.error) {\n errors.push(result.error);\n }\n }\n }\n\n return { accepted, rejected, errors };\n}\n\n/**\n * ๊ธฐ๋ณธ ํํฐ ํ๋ฆฌ์
\n */\nexport const FilterPresets = {\n /**\n * ์ด๋ฏธ์ง๋ง ํ์ฉ\n */\n imagesOnly: (): FilterOptions => ({\n allowedExtensions: ['.jpg', '.jpeg', '.png', '.gif', '.svg', '.webp'],\n excludeDirectories: true,\n }),\n\n /**\n * ํ
์คํธ ํ์ผ๋ง ํ์ฉ\n */\n textOnly: (): FilterOptions => ({\n allowedExtensions: ['.txt', '.md', '.json', '.js', '.ts', '.html', '.css'],\n excludeDirectories: true,\n }),\n\n /**\n * ์์ ํ์ผ๋ง ํ์ฉ (1MB ์ดํ)\n */\n smallFilesOnly: (): FilterOptions => ({\n maxSize: 1024 * 1024,\n excludeDirectories: true,\n }),\n\n /**\n * ๊ฐ๋ฐ ํ์ผ๋ง ํ์ฉ\n */\n developmentFiles: (): FilterOptions => ({\n allowedExtensions: [\n '.js',\n '.ts',\n '.tsx',\n '.jsx',\n '.json',\n '.md',\n '.html',\n '.css',\n '.scss',\n '.py',\n '.java',\n '.cpp',\n '.c',\n '.h',\n '.yml',\n '.yaml',\n '.toml',\n ],\n }),\n};\n","import type { CallbackOptions, FileItem, ProgressInfo } from '../types.js';\n\n/**\n * ์งํ ์ํฉ ์ถ์ ๊ธฐ\n */\nexport class ProgressTracker {\n private startTime: number;\n private totalItems: number;\n private processedItems: number = 0;\n private currentItem?: FileItem;\n private onProgress?: (progress: ProgressInfo) => void;\n\n constructor(totalItems: number, callbacks?: CallbackOptions) {\n this.totalItems = totalItems;\n this.startTime = Date.now();\n this.onProgress = callbacks?.onProgress;\n }\n\n /**\n * ํ์ฌ ์ฒ๋ฆฌ ์ค์ธ ์์ดํ
์ค์ \n */\n setCurrentItem(item: FileItem) {\n this.currentItem = item;\n this.notifyProgress();\n }\n\n /**\n * ์์ดํ
์ฒ๋ฆฌ ์๋ฃ\n */\n completeItem() {\n this.processedItems++;\n this.currentItem = undefined;\n this.notifyProgress();\n }\n\n /**\n * ์งํ ์ํฉ ์๋ฆผ\n */\n private notifyProgress() {\n if (!this.onProgress) return;\n\n const elapsed = Date.now() - this.startTime;\n const percentage =\n this.totalItems > 0 ? Math.round((this.processedItems / this.totalItems) * 100) : 0;\n\n let estimatedTimeLeft: number | undefined;\n if (this.processedItems > 0 && percentage < 100) {\n const avgTimePerItem = elapsed / this.processedItems;\n const remainingItems = this.totalItems - this.processedItems;\n estimatedTimeLeft = Math.round(avgTimePerItem * remainingItems);\n }\n\n const progress: ProgressInfo = {\n totalItems: this.totalItems,\n processedItems: this.processedItems,\n currentItem: this.currentItem,\n percentage,\n estimatedTimeLeft,\n };\n\n this.onProgress(progress);\n }\n\n /**\n * ์ด ์์ดํ
์ ์
๋ฐ์ดํธ (๋๋ ํ ๋ฆฌ ์ํ ์ค ๋ฐ๊ฒฌ๋ ๋)\n */\n updateTotalItems(newTotal: number) {\n this.totalItems = newTotal;\n this.notifyProgress();\n }\n\n /**\n * ์ฒ๋ฆฌ ์๋ฃ ์ฌ๋ถ\n */\n get isComplete(): boolean {\n return this.processedItems >= this.totalItems;\n }\n\n /**\n * ์ฒ๋ฆฌ ์๊ฐ (๋ฐ๋ฆฌ์ด)\n */\n get elapsedTime(): number {\n return Date.now() - this.startTime;\n }\n}\n","import { PathHolder } from './internal/path-util.js';\nimport { traverseTree } from './internal/traverse-tree.js';\nimport type { PathAndEntry } from './internal/visit-file-system/internal-types.js';\nimport type {\n DebugLevel,\n FileDropOptions,\n FileDropSource,\n FileItem,\n ProcessedDirectory,\n ProcessedFile,\n ProcessResult,\n SafeProcessResult,\n ProcessingOptions,\n} from './types.js';\nimport { FileDropError } from './types.js';\nimport { buildFileTree, createFileItem } from './utils/file-utils.js';\nimport { FileFilter } from './utils/filter.js';\nimport { ProgressTracker } from './utils/progress-tracker.js';\n\n/**\n * ๋ค์ํ ํ์ผ ๋๋กญ ์์ค๋ฅผ ๋ด๋ถ์ ์ผ๋ก ์ฒ๋ฆฌ ๊ฐ๋ฅํ ํํ๋ก ์ ๊ทํ\n * React DragEvent, FileList, FileSystemHandle[] ๋ฑ์ ํตํฉ ์ฒ๋ฆฌ\n *\n * @internal\n * @param source - ์ ๊ทํํ ํ์ผ ๋๋กญ ์์ค\n * @returns ์ ๊ทํ๋ File[] ๋๋ FileSystemHandle[] ๋ฐฐ์ด, ์คํจ์ null\n */\nasync function normalizeSource(\n source: FileDropSource,\n): Promise<File[] | FileSystemHandle[] | null> {\n if ('dataTransfer' in source) {\n // React DragEvent - ๋๋๊ทธ์ค๋๋กญ ์ด๋ฒคํธ ์ฒ๋ฆฌ\n const supportsFileSystemAccessAPI = 'getAsFileSystemHandle' in DataTransferItem.prototype;\n const supportsWebkitGetAsEntry = 'webkitGetAsEntry' in DataTransferItem.prototype;\n\n // ๋ธ๋ผ์ฐ์ ๊ฐ ๊ณ ๊ธ ํ์ผ API๋ฅผ ์ง์ํ์ง ์์ผ๋ฉด ๊ธฐ๋ณธ ํ์ผ ๋ฆฌ์คํธ๋ง ๋ฐํ\n if (!supportsFileSystemAccessAPI && !supportsWebkitGetAsEntry) {\n return Array.from(source.dataTransfer.files);\n }\n\n // ๋ธ๋ผ์ฐ์ ๋ฅ๋ ฅ์ ๋ฐ๋ผ ์ ์ ํ API ์ฌ์ฉ\n // Chrome: getAsFileSystemHandle (์ต์ )\n // Firefox/Safari: webkitGetAsEntry (๋ ๊ฑฐ์)\n const handles = Array.from(source.dataTransfer.items)\n .filter((item) => item.kind === 'file') // ํ์ผ ์์ดํ
๋ง ํํฐ๋ง\n .map((item) => {\n if (supportsWebkitGetAsEntry) {\n return item.webkitGetAsEntry(); // ๋ ๊ฑฐ์ ์นํท API ์ฌ์ฉ\n } else if (supportsFileSystemAccessAPI) {\n // File System Access API - getAsFileSystemHandle์ ํ์ค ํ์
์ ์์\n return (item as DataTransferItem & { getAsFileSystemHandle(): Promise<FileSystemHandle> }).getAsFileSystemHandle();\n }\n return item.getAsFile(); // fallback\n })\n .filter(Boolean); // null/undefined ์ ๊ฑฐ\n\n const resolvedHandles = await Promise.all(\n handles.map((handle) => {\n if (handle && handle instanceof Promise) {\n return handle;\n }\n return Promise.resolve(handle);\n }),\n );\n\n return resolvedHandles.filter(Boolean) as FileSystemHandle[];\n }\n\n if ('length' in source) {\n // FileList ๋๋ File[]\n return Array.from(source as FileList);\n }\n\n if (Array.isArray(source)) {\n // FileSystemHandle[]\n return source;\n }\n\n return null;\n}\n\n/**\n * ํ์ผ ํธ๋ค๋ค์ ์ํํ๋ฉฐ ํ์ผ ํธ๋ฆฌ๋ฅผ ์ฒ๋ฆฌ\n * FileSystemHandle, FileSystemEntry, File ๊ฐ์ฒด๋ค์ ๋ณ๋ ฌ๋ก ์ฒ๋ฆฌํ์ฌ ์ฑ๋ฅ ์ต์ ํ\n *\n * @internal\n * @param handles - ์ฒ๋ฆฌํ ํ์ผ/๋๋ ํ ๋ฆฌ ํธ๋ค ๋ฐฐ์ด\n * @param filter - ํ์ผ ํํฐ๋ง ๊ฐ์ฒด\n * @param tracker - ์งํ์ํฉ ์ถ์ ๊ฐ์ฒด\n * @param callbacks - ์ฝ๋ฐฑ ํจ์๋ค\n * @param signal - ์ค๋จ ์ ํธ (optional)\n * @returns ์ฒ๋ฆฌ๋ ํ์ผ, ๋๋ ํ ๋ฆฌ, ์๋ฌ ์ ๋ณด\n */\nasync function processFileTree(\n handles: (FileSystemHandle | FileSystemEntry | File)[],\n filter: FileFilter,\n tracker: ProgressTracker,\n callbacks: FileDropOptions['callbacks'] = {},\n signal?: AbortSignal,\n debugLevel: DebugLevel = 'none',\n processing?: ProcessingOptions,\n): Promise<{ items: ProcessedFile[]; directories: ProcessedDirectory[]; errors: FileDropError[] }> {\n const output: PathAndEntry[] = [];\n const errors: FileDropError[] = [];\n let totalFilesEncountered = 0;\n\n // ์์ฒด ๊ตฌํํ parallelMap ์ฌ์ฉ\n const { simpleParallelMap } = await import('./utils/parallel-map.js');\n\n const normalizedConcurrency = Math.max(1, processing?.concurrency ?? 4);\n const enableParallel = processing?.parallel ?? true;\n const isInfoEnabled = debugLevel !== 'none';\n const isVerboseEnabled = debugLevel === 'verbose';\n\n const processHandle = async (handle: FileSystemHandle | FileSystemEntry | File) => {\n if (signal?.aborted) {\n throw new FileDropError('UNKNOWN', undefined, 'Operation aborted');\n }\n\n try {\n await traverseTree(\n PathHolder.EMPTY,\n handle,\n output,\n (file: File) => {\n totalFilesEncountered++;\n tracker.updateTotalItems(totalFilesEncountered);\n const item = createFileItem(file, file.name);\n tracker.setCurrentItem(item);\n\n const filterResult = filter.filter(item);\n if (filterResult.error) {\n errors.push(filterResult.error);\n callbacks.onError?.(filterResult.error, item);\n }\n\n if (!filterResult.accepted) {\n tracker.completeItem();\n }\n\n return filterResult.accepted;\n },\n debugLevel,\n enableParallel,\n normalizedConcurrency,\n );\n } catch (error) {\n const fileError =\n error instanceof FileDropError\n ? error\n : new FileDropError('UNKNOWN', undefined, String(error));\n errors.push(fileError);\n callbacks.onError?.(fileError);\n }\n };\n\n // ๋ณ๋ ฌ ๋๋ ์์ฐจ ์ฒ๋ฆฌ\n const shouldProcessInParallel = enableParallel && normalizedConcurrency > 1 && handles.length > 1;\n\n if (shouldProcessInParallel) {\n if (isInfoEnabled) {\n console.log(\n `๐ Processing ${handles.length} handles in parallel (custom implementation, concurrency=${normalizedConcurrency})`,\n );\n }\n await simpleParallelMap(handles, processHandle, normalizedConcurrency);\n } else {\n if (isInfoEnabled) {\n console.log(`๐ Processing ${handles.length} handle directly`);\n }\n for (const handle of handles) {\n await processHandle(handle);\n }\n }\n\n // ๊ฒฐ๊ณผ ๋ณํ\n const items: ProcessedFile[] = [];\n const directories: ProcessedDirectory[] = [];\n\n tracker.updateTotalItems(totalFilesEncountered);\n\n if (isInfoEnabled) {\n console.log(`๐ Processing ${output.length} total items from traversal`);\n }\n\n for (const entry of output) {\n if (entry.type === 'file') {\n const processedFile = createFileItem(\n entry.file,\n entry.path.toString(),\n entry.path.toString(),\n );\n items.push(processedFile);\n callbacks.onFile?.(processedFile);\n tracker.completeItem();\n if (isVerboseEnabled) {\n console.log(` โ
File: ${entry.path.toString()}`);\n }\n } else {\n const directory: ProcessedDirectory = {\n type: 'directory',\n name: entry.path.lastSegment(),\n path: entry.path.toString(),\n pathSegments: entry.path.segments,\n relativePath: entry.path.toString(),\n };\n directories.push(directory);\n if (isVerboseEnabled) {\n console.log(` ๐ Directory: ${entry.path.toString()}`);\n }\n }\n }\n\n if (isInfoEnabled) {\n console.log(`๐ Final results: ${items.length} files, ${directories.length} directories`);\n }\n\n return { items, directories, errors };\n}\n\n/**\n * ํ์ผ ๋๋๊ทธ์ค๋๋กญ ์ด๋ฒคํธ๋ฅผ ์ฒ๋ฆฌํ์ฌ ํ์ผ ํธ๋ฆฌ๋ฅผ ์ํํ๋ ๋ฉ์ธ API ํจ์\n *\n * React ๋๋๊ทธ ์ด๋ฒคํธ, FileList, FileSystemHandle ๋ฐฐ์ด ๋ฑ ๋ค์ํ ์์ค๋ฅผ ์ง์ํ๋ฉฐ,\n * ๊น์ ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ๋ ์์ ํ ์ํํฉ๋๋ค. ๋ณ๋ ฌ ์ฒ๋ฆฌ๋ก ์ฑ๋ฅ์ ์ต์ ํํ๊ณ ,\n * ๋ถ๋ถ ์คํจ์์๋ ์ฒ๋ฆฌ ๊ฐ๋ฅํ ํ์ผ๋ค์ ๊ณ์ ์ฒ๋ฆฌํฉ๋๋ค.\n *\n * @example\n * ```tsx\n * // ๊ธฐ๋ณธ ์ฌ์ฉ๋ฒ\n * const handleDrop = async (event: React.DragEvent<HTMLDivElement>) => {\n * event.preventDefault();\n *\n * try {\n * const result = await processFileTreeDrop(event);\n * console.log(`์ฒ๋ฆฌ๋ ํ์ผ: ${result.files.length}๊ฐ`);\n * console.log(`์ฒ๋ฆฌ ์๊ฐ: ${result.metadata.processingTime}ms`);\n * } catch (error) {\n * console.error('ํ์ผ ์ฒ๋ฆฌ ์ค ์ค๋ฅ:', error);\n * }\n * };\n * ```\n *\n * @example\n * ```tsx\n * // ๊ณ ๊ธ ์ต์
์ฌ์ฉ\n * const result = await processFileTreeDrop(event, {\n * filter: {\n * maxSize: 10 * 1024 * 1024, // 10MB ์ ํ\n * maxFiles: 50, // ์ต๋ 50๊ฐ ํ์ผ\n * allowedExtensions: ['.jpg', '.png', '.gif']\n * },\n * callbacks: {\n * onProgress: (progress) => {\n * console.log(`์งํ๋ฅ : ${progress.percentage}%`);\n * },\n * onError: (error, item) => {\n * console.error(`${item?.name} ์ฒ๋ฆฌ ์คํจ:`, error.message);\n * }\n * },\n * signal: abortController.signal // ์ทจ์ ๊ฐ๋ฅ\n * });\n * ```\n *\n * @param source - ํ์ผ ๋๋กญ ์์ค (React DragEvent, FileList, FileSystemHandle[], File[])\n * @param options - ์ฒ๋ฆฌ ์ต์
(ํํฐ๋ง, ์ฝ๋ฐฑ, ์ค๋จ ์ ํธ ๋ฑ)\n *\n * @returns Promise<ProcessResult> - ์ฒ๋ฆฌ๋ ํ์ผ๋ค, ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ, ๋ฉํ๋ฐ์ดํฐ, ์๋ฌ ์ ๋ณด\n *\n * @throws {FileDropError} ์ ์ฒด ์ฒ๋ฆฌ๊ฐ ์คํจํ ๊ฒฝ์ฐ\n * - 'UNSUPPORTED_API': ๋ธ๋ผ์ฐ์ ๊ฐ File API๋ฅผ ์ง์ํ์ง ์์\n * - 'ACCESS_DENIED': ํ์ผ ์ ๊ทผ ๊ถํ์ด ๊ฑฐ๋ถ๋จ\n * - 'UNKNOWN': ๊ธฐํ ์ ์ ์๋ ์ค๋ฅ\n *\n * @see {@link processFileTreeDropSafe} ์๋ฌ๋ฅผ ์์ธ๋ก ๋์ง์ง ์๋ ์์ ํ ๋ฒ์ \n * @see {@link FileDropOptions} ์ฌ์ฉ ๊ฐ๋ฅํ ๋ชจ๋ ์ต์
\n * @see {@link ProcessResult} ๋ฐํ ๋ฐ์ดํฐ ๊ตฌ์กฐ\n *\n * @since 1.0.0\n */\nexport async function processFileTreeDrop(\n source: FileDropSource,\n options: FileDropOptions = {},\n): Promise<ProcessResult> {\n const startTime = Date.now();\n const debugLevel = normalizeDebugLevel(options.debug);\n\n try {\n // ์ค๋จ ์ ํธ ํ์ธ\n if (options.signal?.aborted) {\n throw new FileDropError('UNKNOWN', undefined, 'Operation aborted');\n }\n\n // ์์ค ์ ๊ทํ\n const normalized = await normalizeSource(source);\n if (!normalized) {\n throw new FileDropError('UNSUPPORTED_API', undefined, 'Unsupported file drop source');\n }\n\n // ์ด๊ธฐ ํ์ผ ๊ฐ์ ์ถ์ \n const estimatedCount = normalized.length;\n const tracker = new ProgressTracker(estimatedCount, options.callbacks);\n const filter = new FileFilter(options.filter);\n\n // ๋จ์ ํ์ผ ๋ฆฌ์คํธ์ธ ๊ฒฝ์ฐ\n if (normalized.length > 0 && normalized[0] instanceof File) {\n const files = normalized as File[];\n const items: ProcessedFile[] = [];\n const errors: FileDropError[] = [];\n\n for (const file of files) {\n if (options.signal?.aborted) {\n throw new FileDropError('UNKNOWN', undefined, 'Operation aborted');\n }\n\n const item = createFileItem(file, file.name);\n tracker.setCurrentItem(item);\n\n const filterResult = filter.filter(item);\n if (filterResult.accepted) {\n items.push(item);\n options.callbacks?.onFile?.(item);\n } else if (filterResult.error) {\n errors.push(filterResult.error);\n options.callbacks?.onError?.(filterResult.error, item);\n }\n\n tracker.completeItem();\n }\n\n // ํธ๋ฆฌ ๋น๋\n const tree = buildFileTree(items);\n\n return {\n files: items,\n directories: [],\n tree,\n metadata: {\n totalFiles: items.length,\n totalDirectories: 0,\n totalSize: items.reduce((sum, item) => sum + (item.size || 0), 0),\n processingTime: Date.now() - startTime,\n },\n errors,\n };\n }\n\n // FileSystemHandle ์ฒ๋ฆฌ\n const { items, directories, errors } = await processFileTree(\n normalized as FileSystemHandle[],\n filter,\n tracker,\n options.callbacks,\n options.signal,\n debugLevel,\n options.processing,\n );\n\n // ํธ๋ฆฌ ๋น๋\n const allItems: FileItem[] = [...items, ...directories];\n const tree = buildFileTree(allItems);\n\n const result: ProcessResult = {\n files: items,\n directories,\n tree,\n metadata: {\n totalFiles: items.length,\n totalDirectories: directories.length,\n totalSize: items.reduce((sum, item) => sum + (item.size || 0), 0),\n processingTime: Date.now() - startTime,\n },\n errors,\n };\n\n return result;\n } catch (error) {\n const fileError =\n error instanceof FileDropError\n ? error\n : new FileDropError('UNKNOWN', undefined, String(error));\n\n throw fileError;\n }\n}\n\n/**\n * ์์ ํ ๋ฒ์ ์ ํ์ผ ํธ๋ฆฌ ์ฒ๋ฆฌ ํจ์\n *\n * processFileTreeDrop๊ณผ ๋์ผํ ๊ธฐ๋ฅ์ ์ ๊ณตํ์ง๋ง, ์๋ฌ๋ฅผ ์์ธ๋ก ๋์ง์ง ์๊ณ \n * ๊ฒฐ๊ณผ ๊ฐ์ฒด์ ํฌํจ์์ผ ๋ฐํํฉ๋๋ค. ์๋ฌ ์ฒ๋ฆฌ๊ฐ ๋ณต์กํ ์ํฉ์ด๋\n * ๋ถ๋ถ ์คํจ๋ฅผ ํ์ฉํด์ผ ํ๋ ๊ฒฝ์ฐ์ ์ ์ฉํฉ๋๋ค.\n *\n * @example\n * ```tsx\n * // ์๋ฌ๋ฅผ ์์ ํ๊ฒ ์ฒ๋ฆฌ\n * const result = await processFileTreeDropSafe(event, options);\n *\n * if ('error' in result) {\n * // ์คํจํ ๊ฒฝ์ฐ\n * console.error('์ฒ๋ฆฌ ์คํจ:', result.error.message);\n * console.log('์๋ฌ ์ฝ๋:', result.error.code);\n *\n * // ๋ถ๋ถ์ ์ผ๋ก ์ฒ๋ฆฌ๋ ๊ฒฐ๊ณผ๊ฐ ์๋ค๋ฉด ํ์ฉ\n * if (result.partialResult) {\n * console.log('๋ถ๋ถ ๊ฒฐ๊ณผ:', result.partialResult.files.length, '๊ฐ ํ์ผ');\n * }\n * } else {\n * // ์ฑ๊ณตํ ๊ฒฝ์ฐ\n * console.log('์ฒ๋ฆฌ ์ฑ๊ณต:', result.files.length, '๊ฐ ํ์ผ');\n * console.log('์ฒ๋ฆฌ ์๊ฐ:', result.metadata.processingTime, 'ms');\n * }\n * ```\n *\n * @example\n * ```tsx\n * // try-catch ์์ด ์๋ฌ ์ฒ๋ฆฌ\n * const handleDrop = async (event: React.DragEvent<HTMLDivElement>) => {\n * event.preventDefault();\n *\n * const result = await processFileTreeDropSafe(event, {\n * filter: { maxSize: 5 * 1024 * 1024 }, // 5MB ์ ํ\n * callbacks: {\n * onError: (error, item) => {\n * // ๊ฐ๋ณ ํ์ผ ์๋ฌ๋ ์ฌ๊ธฐ์ ์ฒ๋ฆฌ\n * console.warn(`${item?.name} ๊ฑด๋๋:`, error.message);\n * }\n * }\n * });\n *\n * // ํ์
๊ฐ๋๋ฅผ ์ฌ์ฉํ ์์ ํ ์ฒ๋ฆฌ\n * if ('error' in result) {\n * setError(result.error.message);\n * } else {\n * setFiles(result.files);\n * setProcessingTime(result.metadata.processingTime);\n * }\n * };\n * ```\n *\n * @param source - ํ์ผ ๋๋กญ ์์ค (React DragEvent, FileList, FileSystemHandle[], File[])\n * @param options - ์ฒ๋ฆฌ ์ต์
(ํํฐ๋ง, ์ฝ๋ฐฑ, ์ค๋จ ์ ํธ ๋ฑ)\n *\n * @returns Promise<SafeProcessResult> - ์ฑ๊ณต์ ProcessResult, ์คํจ์ ErrorResult\n * - ์ฑ๊ณต: ProcessResult์ ๋์ผํ ๊ตฌ์กฐ\n * - ์คํจ: { success: false, error: FileDropError, partialResult?: ProcessResult }\n *\n * @see {@link processFileTreeDrop} ์๋ฌ๋ฅผ ์์ธ๋ก ๋์ง๋ ๊ธฐ๋ณธ ๋ฒ์ \n * @see {@link SafeProcessResult} ๋ฐํ ํ์
์์ธ ์ ๋ณด\n * @see {@link ErrorResult} ์คํจ์ ๋ฐํ ๊ตฌ์กฐ\n *\n * @since 1.0.0\n */\nexport async function processFileTreeDropSafe(\n source: FileDropSource,\n options: FileDropOptions = {},\n): Promise<SafeProcessResult> {\n try {\n const result = await processFileTreeDrop(source, options);\n return result;\n } catch (error) {\n const fileError =\n error instanceof FileDropError\n ? error\n : new FileDropError('UNKNOWN', undefined, String(error));\n\n return {\n success: false,\n error: fileError,\n };\n }\n}\n\nfunction normalizeDebugLevel(debug: FileDropOptions['debug']): DebugLevel {\n if (debug === true) return 'verbose';\n if (debug === false || debug === undefined) return 'none';\n return debug;\n}\n","import { PathHolder } from './internal/path-util.js';\nimport { traverseTree } from './internal/traverse-tree.js';\nimport type { PathAndEntry } from './internal/visit-file-system/internal-types.js';\n\nconst alwaysAccept = (_file: File) => true;\n\n/**\n * ๋ ๊ฑฐ์ ํ์ผ ํธ๋ฆฌ ๋๋กญ ์ด๋ฒคํธ ์ฒ๋ฆฌ ํจ์\n *\n * @deprecated ์๋ก์ด ์ฝ๋์์๋ `processFileTreeDrop` ๋๋ `processFileTreeDropSafe` ์ฌ์ฉ์ ๊ถ์ฅํฉ๋๋ค.\n *\n * ์ด ํจ์๋ ํ์ ํธํ์ฑ์ ์ํด ์ ์ง๋์ง๋ง ๋ค์๊ณผ ๊ฐ์ ์ ํ์ฌํญ์ด ์์ต๋๋ค:\n * - ์๋ฌ ์ฒ๋ฆฌ๊ฐ ์ ํ์ \n * - ์งํ์ํฉ ์ถ์ ๋ถ๊ฐ\n * - ํํฐ๋ง ์ต์
์ ํ์ \n * - ๋ฐํ ํ์
์ด ์ ํ์ \n *\n * @example\n * ```tsx\n * // โ ๋ ๊ฑฐ์ ๋ฐฉ์ (๊ถ์ฅํ์ง ์์)\n * const legacyResult = await handleFileTreeDropEvent(event, (file) => file.size < 1000000);\n *\n * // โ
์๋ก์ด ๋ฐฉ์ (๊ถ์ฅ)\n * const newResult = await processFileTreeDrop(event, {\n * filter: { maxSize: 1000000 },\n * callbacks: {\n * onProgress: (prog) => console.log(`${prog.percentage}%`)\n * }\n * });\n * ```\n *\n * @param event - React ๋๋๊ทธ ์ด๋ฒคํธ\n * @param callbackAccept - ํ์ผ ํํฐ๋ง ํจ์ (๊ธฐ๋ณธ: ๋ชจ๋ ํ์ผ ํ์ฉ)\n * @returns ๋ ๊ฑฐ์ ํ์์ ํ์ผ/๋๋ ํ ๋ฆฌ ๋ฐฐ์ด\n *\n * @see {@link processFileTreeDrop} - ๊ถ์ฅ๋๋ ์๋ก์ด API\n * @see {@link processFileTreeDropSafe} - ์์ ํ ์๋ฌ ์ฒ๋ฆฌ๊ฐ ํฌํจ๋ ๋ฒ์ \n *\n * @since 1.0.0\n * @deprecated since 1.0.8 - Use processFileTreeDrop instead\n */\nexport async function handleFileTreeDropEvent(\n event: React.DragEvent<HTMLElement>,\n callbackAccept: (file: File) => boolean = alwaysAccept,\n): Promise<\n Array<\n | {\n type: 'dir';\n path: string;\n }\n | {\n type: 'file';\n path: string;\n file: File;\n }\n >\n> {\n const supportsFileSystemAccessAPI = 'getAsFileSystemHandle' in DataTransferItem.prototype;\n const supportsWebkitGetAsEntry = 'webkitGetAsEntry' in DataTransferItem.prototype;\n\n if (!supportsFileSystemAccessAPI && !supportsWebkitGetAsEntry) {\n const files = Array.from(event.dataTransfer.files);\n if (files.length === 0) return [];\n return files.filter(callbackAccept).map((it) => ({\n type: 'file',\n file: it,\n path: PathHolder.from(it.name).toString(),\n }));\n }\n\n const output = [] as Array<PathAndEntry>;\n\n // WebkitGetAsEntry๊ฐ getAsFileSystemHandle๋ณด๋ค ์์ ์ ์\n const fileHandlesPromises = Array.prototype.slice\n .call(event.dataTransfer.items)\n // โฆby including only files (where file misleadingly means actual file _or_ directory)โฆ\n .filter((item) => item.kind === 'file')\n // โฆand, depending on previous feature detectionโฆ\n .map((item) => {\n if (supportsWebkitGetAsEntry) {\n return item.webkitGetAsEntry();\n } else if (supportsFileSystemAccessAPI) {\n return item.getAsFileSystemHandle() as Promise<FileSystemHandle | null>;\n }\n return item.getAsFile();\n })\n .filter(Boolean);\n\n // ์์ฒด ๊ตฌํํ parallelMap ์ฌ์ฉ (p-map ์์กด์ฑ ์ ๊ฑฐ)\n const { simpleParallelMap } = await import('./utils/parallel-map.js');\n\n if (fileHandlesPromises.length > 1) {\n // ๋ณ๋ ฌ ์ฒ๋ฆฌ๋ก ์ฑ๋ฅ ์ต์ ํ\n await simpleParallelMap(\n fileHandlesPromises,\n async (item: unknown) => {\n const fileHandle = item as FileSystemHandle | FileSystemEntry | File;\n await traverseTree(PathHolder.EMPTY, fileHandle, output, callbackAccept);\n },\n 4,\n );\n } else {\n // ๋จ์ผ ํญ๋ชฉ์ ์ง์ ์ฒ๋ฆฌ\n for (const item of fileHandlesPromises) {\n const fileHandle = item as FileSystemHandle | FileSystemEntry | File;\n await traverseTree(PathHolder.EMPTY, fileHandle, output, callbackAccept);\n }\n }\n\n return output.map((it) => {\n return {\n ...it,\n path: it.path.toString(),\n };\n });\n}\n"],"mappings":"6BAAA,SAASA,KAAUC,EAA+C,CAChE,OAAOA,EACJ,OAAQC,GAAOA,GAAMA,EAAG,OAAS,GAAKA,IAAO,GAAG,EAChD,QAASA,GAAOA,EAAI,MAAM,GAAG,CA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","PathHolder","_PathHolder","path","segments","fileName","otherPath","errmsg","err","visitByFileSystemEntry","parent","item","output","callbackAccept","debugLevel","parallel","concurrency","isInfoEnabled","isVerboseEnabled","file","getFile","newParent","children","readEntries","child","index","simpleParallelMap","normalizedConcurrency","entry","fileEntry","resolve","reject","f","err","readAllEntries","errmsg","dirReader","allEntries","readEntriesRecursively","entries","visitByFileSystemHandle","parent","handle","output","callbackAccept","debugLevel","parallel","concurrency","isInfoEnabled","isVerboseEnabled","file","newParent","children","iterator","entry","simpleParallelMap","normalizedConcurrency","err","hasProps","target","keys","it","traverseTree","parent","handle","output","callbackAccept","debugLevel","parallel","concurrency","visitByFileSystemEntry","visitByFileSystemHandle","file","FileDropError","code","item","message","FilePathUtils","path","segments","normalized","lastSlash","ext","name","lastDot","from","to","fromParts","toParts","i","upLevels","remainingParts","isValidFileType","file","allowedExtensions","extension","isValidFileSize","maxSize","isValidFileName","code","inferMimeType","createFileItem","relativePath","mimeType","flattenTree","tree","result","traverse","node","item","filterTree","predicate","filteredChildren","child","findInTree","found","buildFileTree","items","root","nodeMap","sortedItems","a","b","parentPath","parent","parentSegments","FileFilter","options","item","file","FileDropError","isValidFileSize","isValidFileType","FilterPresets","ProgressTracker","totalItems","callbacks","item","elapsed","percentage","estimatedTimeLeft","avgTimePerItem","remainingItems","progress","newTotal","normalizeSource","source","supportsFileSystemAccessAPI","supportsWebkitGetAsEntry","handles","item","handle","processFileTree","filter","tracker","callbacks","signal","debugLevel","processing","output","errors","totalFilesEncountered","simpleParallelMap","normalizedConcurrency","enableParallel","isInfoEnabled","isVerboseEnabled","processHandle","FileDropError","traverseTree","PathHolder","file","createFileItem","filterResult","error","fileError","items","directories","entry","processedFile","directory","processFileTreeDrop","options","startTime","normalizeDebugLevel","normalized","estimatedCount","ProgressTracker","FileFilter","files","tree","buildFileTree","sum","allItems","processFileTreeDropSafe","debug","alwaysAccept","_file","handleFileTreeDropEvent","event","callbackAccept","supportsFileSystemAccessAPI","supportsWebkitGetAsEntry","files","it","PathHolder","output","fileHandlesPromises","item","simpleParallelMap","fileHandle","traverseTree"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkM4G6J7DPcjs = require('../chunk-M4G6J7DP.cjs');var s={};_chunkM4G6J7DPcjs.a.call(void 0, s,{lgOrDown:()=>l,lgOrUp:()=>F,mdOrDown:()=>d,mdOrUp:()=>a,smOrDown:()=>m,smOrUp:()=>y,xlOrUp:()=>f,xsOrDown:()=>S});function S(x,p){return{[x.breakpoints.down("sm")]:p}}function m(x,p){return{[x.breakpoints.down("md")]:p}}function d(x,p){return{[x.breakpoints.down("lg")]:p}}function l(x,p){return{[x.breakpoints.down("xl")]:p}}function y(x,p){return{[x.breakpoints.up("sm")]:p}}function a(x,p){return{[x.breakpoints.up("md")]:p}}function F(x,p){return{[x.breakpoints.up("lg")]:p}}function f(x,p){return{[x.breakpoints.up("xl")]:p}}var o={};_chunkM4G6J7DPcjs.a.call(void 0, o,{color:()=>E,colorChannel:()=>C,rgba:()=>w,shadow:()=>k,shadowValue:()=>P});var _material = require('@mui/material');function t(x,p,r){return p>r?t(x,r,p):Math.min(Math.max(x,p),r)}function C(x,p="main"){return`var(--mui-palette-${x}-${p}Channel)`}function E(x,p="main"){return`var(--mui-palette-${x}-${p})`}function w(x,p,r){return`rgba(var(--mui-palette-${x}-${p}Channel)/${r})`}var n=[(x,p)=>`0px 2px 1px -1px ${p(x,.2)},0px 1px 1px 0px ${p(x,.14)},0px 1px 3px 0px ${p(x,.12)}`,(x,p)=>`0px 3px 1px -2px ${p(x,.2)},0px 2px 2px 0px ${p(x,.14)},0px 1px 5px 0px ${p(x,.12)}`,(x,p)=>`0px 3px 3px -2px ${p(x,.2)},0px 3px 4px 0px ${p(x,.14)},0px 1px 8px 0px ${p(x,.12)}`,(x,p)=>`0px 2px 4px -1px ${p(x,.2)},0px 4px 5px 0px ${p(x,.14)},0px 1px 10px 0px ${p(x,.12)}`,(x,p)=>`0px 3px 5px -1px ${p(x,.2)},0px 5px 8px 0px ${p(x,.14)},0px 1px 14px 0px ${p(x,.12)}`,(x,p)=>`0px 3px 5px -1px ${p(x,.2)},0px 6px 10px 0px ${p(x,.14)},0px 1px 18px 0px ${p(x,.12)}`,(x,p)=>`0px 4px 5px -2px ${p(x,.2)},0px 7px 10px 1px ${p(x,.14)},0px 2px 16px 1px ${p(x,.12)}`,(x,p)=>`0px 5px 5px -3px ${p(x,.2)},0px 8px 10px 1px ${p(x,.14)},0px 3px 14px 2px ${p(x,.12)}`,(x,p)=>`0px 5px 6px -3px ${p(x,.2)},0px 9px 12px 1px ${p(x,.14)},0px 3px 16px 2px ${p(x,.12)}`,(x,p)=>`0px 6px 6px -3px ${p(x,.2)},0px 10px 14px 1px ${p(x,.14)},0px 4px 18px 3px ${p(x,.12)}`,(x,p)=>`0px 6px 7px -4px ${p(x,.2)},0px 11px 15px 1px ${p(x,.14)},0px 4px 20px 3px ${p(x,.12)}`,(x,p)=>`0px 7px 8px -4px ${p(x,.2)},0px 12px 17px 2px ${p(x,.14)},0px 5px 22px 4px ${p(x,.12)}`,(x,p)=>`0px 7px 8px -4px ${p(x,.2)},0px 13px 19px 2px ${p(x,.14)},0px 5px 24px 4px ${p(x,.12)}`,(x,p)=>`0px 7px 9px -4px ${p(x,.2)},0px 14px 21px 2px ${p(x,.14)},0px 5px 26px 4px ${p(x,.12)}`,(x,p)=>`0px 8px 9px -5px ${p(x,.2)},0px 15px 22px 2px ${p(x,.14)},0px 6px 28px 5px ${p(x,.12)}`,(x,p)=>`0px 8px 10px -5px ${p(x,.2)},0px 16px 24px 2px ${p(x,.14)},0px 6px 30px 5px ${p(x,.12)}`,(x,p)=>`0px 8px 11px -5px ${p(x,.2)},0px 17px 26px 2px ${p(x,.14)},0px 6px 32px 5px ${p(x,.12)}`,(x,p)=>`0px 9px 11px -5px ${p(x,.2)},0px 18px 28px 2px ${p(x,.14)},0px 7px 34px 6px ${p(x,.12)}`,(x,p)=>`0px 9px 12px -6px ${p(x,.2)},0px 19px 29px 2px ${p(x,.14)},0px 7px 36px 6px ${p(x,.12)}`,(x,p)=>`0px 10px 13px -6px ${p(x,.2)},0px 20px 31px 3px ${p(x,.14)},0px 8px 38px 7px ${p(x,.12)}`,(x,p)=>`0px 10px 13px -6px ${p(x,.2)},0px 21px 33px 3px ${p(x,.14)},0px 8px 40px 7px ${p(x,.12)}`,(x,p)=>`0px 10px 14px -6px ${p(x,.2)},0px 22px 35px 3px ${p(x,.14)},0px 8px 42px 7px ${p(x,.12)}`,(x,p)=>`0px 11px 14px -7px ${p(x,.2)},0px 23px 36px 3px ${p(x,.14)},0px 9px 44px 8px ${p(x,.12)}`,(x,p)=>`0px 11px 15px -7px ${p(x,.2)},0px 24px 38px 3px ${p(x,.14)},0px 9px 46px 8px ${p(x,.12)}`];function P(x,p="#000"){let r=t(x,0,n.length-1);return r===0?"none":_optionalChain([n, 'access', _ => _[r-1], 'optionalCall', _2 => _2(p,_material.alpha)])||"none"}function k(x,p,r){let $=`var(--mui-palette-${x}-${p}Channel)`,e=t(r,0,n.length-1);if(e===0)return"none";let A=(u,g)=>`rgba(${u}/${g})`;return _optionalChain([n, 'access', _3 => _3[e-1], 'optionalCall', _4 => _4($,A)])||"none"}exports.cssVars = o; exports.mediaQueries = s;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/jjfive/p/cp949/mui-react19/packages/mui/dist/helper/index.cjs","../../src/helper/mui-media-queries.ts","../../src/helper/mui-css-vars.ts"],"names":["mui_media_queries_exports","__export","lgOrDown","lgOrUp","mdOrDown","mdOrUp","smOrDown","smOrUp","xlOrUp","xsOrDown","theme","css","mui_css_vars_exports","color","colorChannel","rgba","shadow","shadowValue","clamp","value","min","max","paletteName","shade","alpha","PREDEFINED_SHADOWS","c"],"mappings":"AAAA,soBAAyC,ICAzCA,CAAAA,CAAA,CAAA,CAAA,CAAAC,iCAAAA,CAAAD,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,EAAAE,CAAAA,CAAA,MAAA,CAAA,CAAA,CAAA,EAAAC,CAAAA,CAAA,QAAA,CAAA,CAAA,CAAA,EAAAC,CAAAA,CAAA,MAAA,CAAA,CAAA,CAAA,EAAAC,CAAAA,CAAA,QAAA,CAAA,CAAA,CAAA,EAAAC,CAAAA,CAAA,MAAA,CAAA,CAAA,CAAA,EAAAC,CAAAA,CAAA,MAAA,CAAA,CAAA,CAAA,EAAAC,CAAAA,CAAA,QAAA,CAAA,CAAA,CAAA,EAAAC,CAAAA,CAAAA,CAAAA,CAUO,SAASA,CAAAA,CAASC,CAAAA,CAAcC,CAAAA,CAAmD,CACxF,MAAO,CAEL,CAACD,CAAAA,CAAM,WAAA,CAAY,IAAA,CAAK,IAAI,CAAC,CAAA,CAAGC,CAClC,CACF,CAEO,SAASL,CAAAA,CAASI,CAAAA,CAAcC,CAAAA,CAAmD,CACxF,MAAO,CAEL,CAACD,CAAAA,CAAM,WAAA,CAAY,IAAA,CAAK,IAAI,CAAC,CAAA,CAAGC,CAClC,CACF,CAEO,SAASP,CAAAA,CAASM,CAAAA,CAAcC,CAAAA,CAAmD,CACxF,MAAO,CAEL,CAACD,CAAAA,CAAM,WAAA,CAAY,IAAA,CAAK,IAAI,CAAC,CAAA,CAAGC,CAClC,CACF,CAEO,SAAST,CAAAA,CAASQ,CAAAA,CAAcC,CAAAA,CAAmD,CACxF,MAAO,CAEL,CAACD,CAAAA,CAAM,WAAA,CAAY,IAAA,CAA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C,CAkBO,SAASP,CAAAA,CACdQ,CAAAA,CACAC,CAAAA,CAAoD,MAAA,CAC5C,CACR,MAAO,CAAA,kBAAA,EAAqBD,CAAW,CAAA,CAAA,EAAIC,CAAK,CAAA,QAAA,CAClD,CAmBO,SAASV,CAAAA,CACdS,CAAAA,CACAC,CAAAA,CAAoD,MAAA,CACpD,CACA,MAAO,CAAA,kBAAA,EAAqBD,CAAW,CAAA,CAAA,EAAIC,CAAK,CAAA,CAAA,CAClD,CAoBO,SAASR,CAAAA,CACdO,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACA,CACA,MAAO,CAAA,uBAAA,EAA0BF,CAAW,CAAA,CAAA,EAAIC,CAAK,CAAA,SAAA,EAAYC,CAAK,CAAA,CAAA,CACxE,CAOA,IAAMC,CAAAA,CAAqB,CACzB,CAACC,CAAAA,CAAWF,CAAAA,CAAAA,EACV,CAAA,iBAAA,EAAoBA,CAAAA,CAAME,CAAAA,CAAG,EAAG,CAAC,CAAA,iBAAA,EAAoBF,CAAAA,CAAME,CAAAA,CAAG,GAAI,CAAC,CAAA,iBAAA,EAAoBF,CAAAA,CAAME,CAAAA,CAAG,GAAI,CAAC,CAAA,CAAA","file":"/home/jjfive/p/cp949/mui-react19/packages/mui/dist/helper/index.cjs","sourcesContent":[null,"import type { Breakpoint } from '@mui/material';\nimport type { AliasesCSSProperties, StandardCSSProperties } from '@mui/system';\n\ntype THEME = {\n breakpoints: {\n down: (breakpoint: Breakpoint) => string;\n up: (breakpoint: Breakpoint) => string;\n };\n};\n\nexport function xsOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // max-width: 600\n [theme.breakpoints.down('sm')]: css,\n };\n}\n\nexport function smOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // max-width: 900\n [theme.breakpoints.down('md')]: css,\n };\n}\n\nexport function mdOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // max-width: 1200\n [theme.breakpoints.down('lg')]: css,\n };\n}\n\nexport function lgOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // max-width: 1536\n [theme.breakpoints.down('xl')]: css,\n };\n}\n\nexport function smOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // min-width: 600\n [theme.breakpoints.up('sm')]: css,\n };\n}\n\nexport function mdOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // min-width: 900\n [theme.breakpoints.up('md')]: css,\n };\n}\n\nexport function lgOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // min-width: 1200\n [theme.breakpoints.up('lg')]: css,\n };\n}\n\nexport function xlOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // min-width: 1500\n [theme.breakpoints.up('xl')]: css,\n };\n}\n","import { alpha as muiAlpha } from '@mui/material';\n\nfunction clamp(value: number, min: number, max: number): number {\n if (min > max) {\n return clamp(value, max, min);\n }\n return Math.min(Math.max(value, min), max);\n}\n\n/**\n * ํน์ MUI ํ๋ ํธ ์์์ CSS ๋ณ์ ๋ฌธ์์ด์ ์์ฑํฉ๋๋ค.\n *\n * @param paletteName - MUI ํ๋ ํธ ์ด๋ฆ ('primary', 'secondary', 'error', 'success', 'warning' ๋ฑ)\n * @param shade - ์์ ๊ณ์ธต ('main', 'light', 'dark') (๊ธฐ๋ณธ๊ฐ: 'main')\n * @returns CSS ๋ณ์ ๋ฌธ์์ด (์: `var(--mui-palette-primary-mainChannel)`)\n *\n * @example\n * // ๊ธฐ๋ณธ ์ฌ์ฉ ์์\n * colorChannelVar('primary', 'dark'); => \"var(--mui-palette-primary-darkChannel)\"\n *\n *\n * @example\n * // ๊ธฐ๋ณธ๊ฐ ์ฌ์ฉ ์์\n * colorChannelVar('secondary'); => \"var(--mui-palette-secondary-mainChannel)\"\n */\nexport function colorChannel(\n paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning',\n shade: 'main' | 'light' | 'dark' | 'contrastText' = 'main',\n): string {\n return `var(--mui-palette-${paletteName}-${shade}Channel)`;\n}\n\n/**\n * ํน์ MUI ํ๋ ํธ ์์์ CSS ๋ณ์ ๋ฌธ์์ด์ ์์ฑํฉ๋๋ค.\n *\n * @param paletteName - MUI ํ๋ ํธ ์ด๋ฆ ('primary', 'secondary', 'warning', 'error', 'success')\n * @param shade - ์์ ๊ณ์ธต ('main', 'light', 'dark') (๊ธฐ๋ณธ๊ฐ: 'main')\n * @returns CSS ๋ณ์ ๋ฌธ์์ด (์: `var(--mui-palette-primary-main)`)\n *\n * @example\n * // ๊ธฐ๋ณธ ์ฌ์ฉ ์์\n * const cssVar = colorVar('primary', 'light');\n * // ๊ฒฐ๊ณผ: \"var(--mui-palette-primary-light)\"\n *\n * @example\n * // ๊ธฐ๋ณธ๊ฐ ์ฌ์ฉ ์์\n * const cssVar = colorVar('secondary');\n * // ๊ฒฐ๊ณผ: \"var(--mui-palette-secondary-main)\"\n */\nexport function color(\n paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning',\n shade: 'main' | 'light' | 'dark' | 'contrastText' = 'main',\n) {\n return `var(--mui-palette-${paletteName}-${shade})`;\n}\n\n/**\n * ํน์ MUI ํ๋ ํธ ์์์ RGBA CSS ๋ณ์ ๋ฌธ์์ด์ ์์ฑํฉ๋๋ค.\n *\n * @param paletteName - MUI ํ๋ ํธ ์ด๋ฆ ('primary', 'secondary', 'warning', 'error', 'success')\n * @param shade - ์์ ๊ณ์ธต ('main', 'light', 'dark') (์: main ์์, ๋ฐ์ ์์, ์ด๋์ด ์์)\n * @param alpha - ํฌ๋ช
๋ ๊ฐ (0๊ณผ 1 ์ฌ์ด์ ์ซ์, ์: 0.1์ 10% ํฌ๋ช
)\n * @returns RGBA CSS ๋ณ์ ๋ฌธ์์ด (์: `rgba(var(--mui-palette-primary-mainChannel)/0.5)`)\n *\n * @example\n * // ๊ธฐ๋ณธ ์ฌ์ฉ ์์\n * const rgbaVar = rgba('primary', 'main', 0.5);\n * // ๊ฒฐ๊ณผ: \"rgba(var(--mui-palette-primary-mainChannel)/0.5)\"\n *\n * @example\n * // ๋ค๋ฅธ ํ๋ ํธ์ ๋ฐ๊ธฐ ์ฌ์ฉ ์์\n * const rgbaVar = rgba('secondary', 'light', 0.8);\n * // ๊ฒฐ๊ณผ: \"rgba(var(--mui-palette-secondary-lightChannel)/0.8)\"\n */\nexport function rgba(\n paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning',\n shade: 'main' | 'light' | 'dark' | 'contrastText',\n alpha: number,\n) {\n return `rgba(var(--mui-palette-${paletteName}-${shade}Channel)/${alpha})`;\n}\n\ntype ApplyAlphaFn = (color: string, opacity: number) => string;\n// const sss = (c: string, alpha: ApplyAlphaFn) => `0px 2px 1px -1px ${alpha(c, 0.2)},0px 1px 1px 0px ${alpha(c, 0.14)},0px 1px 3px 0px ${alpha(c, 0.12)}`;\n\n// copy from https://mui.com/material-ui/customization/default-theme/\n// shadow 23๊ฐ\nconst PREDEFINED_SHADOWS = [\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 2px 1px -1px ${alpha(c, 0.2)},0px 1px 1px 0px ${alpha(c, 0.14)},0px 1px 3px 0px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 3px 1px -2px ${alpha(c, 0.2)},0px 2px 2px 0px ${alpha(c, 0.14)},0px 1px 5px 0px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 3px 3px -2px ${alpha(c, 0.2)},0px 3px 4px 0px ${alpha(c, 0.14)},0px 1px 8px 0px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 2px 4px -1px ${alpha(c, 0.2)},0px 4px 5px 0px ${alpha(c, 0.14)},0px 1px 10px 0px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 3px 5px -1px ${alpha(c, 0.2)},0px 5px 8px 0px ${alpha(c, 0.14)},0px 1px 14px 0px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 3px 5px -1px ${alpha(c, 0.2)},0px 6px 10px 0px ${alpha(c, 0.14)},0px 1px 18px 0px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 4px 5px -2px ${alpha(c, 0.2)},0px 7px 10px 1px ${alpha(c, 0.14)},0px 2px 16px 1px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 5px 5px -3px ${alpha(c, 0.2)},0px 8px 10px 1px ${alpha(c, 0.14)},0px 3px 14px 2px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 5px 6px -3px ${alpha(c, 0.2)},0px 9px 12px 1px ${alpha(c, 0.14)},0px 3px 16px 2px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 6px 6px -3px ${alpha(c, 0.2)},0px 10px 14px 1px ${alpha(c, 0.14)},0px 4px 18px 3px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 6px 7px -4px ${alpha(c, 0.2)},0px 11px 15px 1px ${alpha(c, 0.14)},0px 4px 20px 3px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 7px 8px -4px ${alpha(c, 0.2)},0px 12px 17px 2px ${alpha(c, 0.14)},0px 5px 22px 4px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 7px 8px -4px ${alpha(c, 0.2)},0px 13px 19px 2px ${alpha(c, 0.14)},0px 5px 24px 4px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 7px 9px -4px ${alpha(c, 0.2)},0px 14px 21px 2px ${alpha(c, 0.14)},0px 5px 26px 4px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 8px 9px -5px ${alpha(c, 0.2)},0px 15px 22px 2px ${alpha(c, 0.14)},0px 6px 28px 5px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 8px 10px -5px ${alpha(c, 0.2)},0px 16px 24px 2px ${alpha(c, 0.14)},0px 6px 30px 5px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 8px 11px -5px ${alpha(c, 0.2)},0px 17px 26px 2px ${alpha(c, 0.14)},0px 6px 32px 5px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 9px 11px -5px ${alpha(c, 0.2)},0px 18px 28px 2px ${alpha(c, 0.14)},0px 7px 34px 6px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 9px 12px -6px ${alpha(c, 0.2)},0px 19px 29px 2px ${alpha(c, 0.14)},0px 7px 36px 6px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 10px 13px -6px ${alpha(c, 0.2)},0px 20px 31px 3px ${alpha(c, 0.14)},0px 8px 38px 7px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 10px 13px -6px ${alpha(c, 0.2)},0px 21px 33px 3px ${alpha(c, 0.14)},0px 8px 40px 7px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 10px 14px -6px ${alpha(c, 0.2)},0px 22px 35px 3px ${alpha(c, 0.14)},0px 8px 42px 7px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 11px 14px -7px ${alpha(c, 0.2)},0px 23px 36px 3px ${alpha(c, 0.14)},0px 9px 44px 8px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 11px 15px -7px ${alpha(c, 0.2)},0px 24px 38px 3px ${alpha(c, 0.14)},0px 9px 46px 8px ${alpha(c, 0.12)}`,\n];\n\nexport function shadowValue(index: number, hexColor = '#000'): string {\n const idx = clamp(index, 0, PREDEFINED_SHADOWS.length - 1);\n if (idx === 0) {\n return 'none';\n }\n return PREDEFINED_SHADOWS[idx - 1]?.(hexColor, muiAlpha) || 'none';\n}\n\nexport function shadow(\n paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning',\n shade: 'main' | 'light' | 'dark' | 'contrastText',\n index: number,\n): string {\n //ex: --mui-palette-primary-mainChannel\n const cssVar = `var(--mui-palette-${paletteName}-${shade}Channel)`;\n\n const idx = clamp(index, 0, PREDEFINED_SHADOWS.length - 1);\n if (idx === 0) {\n return 'none';\n }\n\n // ex: channelVar: 244 24 23, opacity: 0.2\n const alphaFn = (channelVar: string, opacity: number) => `rgba(${channelVar}/${opacity})`;\n\n return PREDEFINED_SHADOWS[idx - 1]?.(cssVar, alphaFn) || 'none';\n}\n"]}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Breakpoint } from '@mui/material';
|
|
2
|
+
import { AliasesCSSProperties, StandardCSSProperties } from '@mui/system';
|
|
3
|
+
|
|
4
|
+
type THEME = {
|
|
5
|
+
breakpoints: {
|
|
6
|
+
down: (breakpoint: Breakpoint) => string;
|
|
7
|
+
up: (breakpoint: Breakpoint) => string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
declare function xsOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
11
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
12
|
+
};
|
|
13
|
+
declare function smOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
14
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
15
|
+
};
|
|
16
|
+
declare function mdOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
17
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
18
|
+
};
|
|
19
|
+
declare function lgOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
20
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
21
|
+
};
|
|
22
|
+
declare function smOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
23
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
24
|
+
};
|
|
25
|
+
declare function mdOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
26
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
27
|
+
};
|
|
28
|
+
declare function lgOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
29
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
30
|
+
};
|
|
31
|
+
declare function xlOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
32
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
declare const muiMediaQueries_lgOrDown: typeof lgOrDown;
|
|
36
|
+
declare const muiMediaQueries_lgOrUp: typeof lgOrUp;
|
|
37
|
+
declare const muiMediaQueries_mdOrDown: typeof mdOrDown;
|
|
38
|
+
declare const muiMediaQueries_mdOrUp: typeof mdOrUp;
|
|
39
|
+
declare const muiMediaQueries_smOrDown: typeof smOrDown;
|
|
40
|
+
declare const muiMediaQueries_smOrUp: typeof smOrUp;
|
|
41
|
+
declare const muiMediaQueries_xlOrUp: typeof xlOrUp;
|
|
42
|
+
declare const muiMediaQueries_xsOrDown: typeof xsOrDown;
|
|
43
|
+
declare namespace muiMediaQueries {
|
|
44
|
+
export { muiMediaQueries_lgOrDown as lgOrDown, muiMediaQueries_lgOrUp as lgOrUp, muiMediaQueries_mdOrDown as mdOrDown, muiMediaQueries_mdOrUp as mdOrUp, muiMediaQueries_smOrDown as smOrDown, muiMediaQueries_smOrUp as smOrUp, muiMediaQueries_xlOrUp as xlOrUp, muiMediaQueries_xsOrDown as xsOrDown };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* ํน์ MUI ํ๋ ํธ ์์์ CSS ๋ณ์ ๋ฌธ์์ด์ ์์ฑํฉ๋๋ค.
|
|
49
|
+
*
|
|
50
|
+
* @param paletteName - MUI ํ๋ ํธ ์ด๋ฆ ('primary', 'secondary', 'error', 'success', 'warning' ๋ฑ)
|
|
51
|
+
* @param shade - ์์ ๊ณ์ธต ('main', 'light', 'dark') (๊ธฐ๋ณธ๊ฐ: 'main')
|
|
52
|
+
* @returns CSS ๋ณ์ ๋ฌธ์์ด (์: `var(--mui-palette-primary-mainChannel)`)
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* // ๊ธฐ๋ณธ ์ฌ์ฉ ์์
|
|
56
|
+
* colorChannelVar('primary', 'dark'); => "var(--mui-palette-primary-darkChannel)"
|
|
57
|
+
*
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* // ๊ธฐ๋ณธ๊ฐ ์ฌ์ฉ ์์
|
|
61
|
+
* colorChannelVar('secondary'); => "var(--mui-palette-secondary-mainChannel)"
|
|
62
|
+
*/
|
|
63
|
+
declare function colorChannel(paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning', shade?: 'main' | 'light' | 'dark' | 'contrastText'): string;
|
|
64
|
+
/**
|
|
65
|
+
* ํน์ MUI ํ๋ ํธ ์์์ CSS ๋ณ์ ๋ฌธ์์ด์ ์์ฑํฉ๋๋ค.
|
|
66
|
+
*
|
|
67
|
+
* @param paletteName - MUI ํ๋ ํธ ์ด๋ฆ ('primary', 'secondary', 'warning', 'error', 'success')
|
|
68
|
+
* @param shade - ์์ ๊ณ์ธต ('main', 'light', 'dark') (๊ธฐ๋ณธ๊ฐ: 'main')
|
|
69
|
+
* @returns CSS ๋ณ์ ๋ฌธ์์ด (์: `var(--mui-palette-primary-main)`)
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* // ๊ธฐ๋ณธ ์ฌ์ฉ ์์
|
|
73
|
+
* const cssVar = colorVar('primary', 'light');
|
|
74
|
+
* // ๊ฒฐ๊ณผ: "var(--mui-palette-primary-light)"
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* // ๊ธฐ๋ณธ๊ฐ ์ฌ์ฉ ์์
|
|
78
|
+
* const cssVar = colorVar('secondary');
|
|
79
|
+
* // ๊ฒฐ๊ณผ: "var(--mui-palette-secondary-main)"
|
|
80
|
+
*/
|
|
81
|
+
declare function color(paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning', shade?: 'main' | 'light' | 'dark' | 'contrastText'): string;
|
|
82
|
+
/**
|
|
83
|
+
* ํน์ MUI ํ๋ ํธ ์์์ RGBA CSS ๋ณ์ ๋ฌธ์์ด์ ์์ฑํฉ๋๋ค.
|
|
84
|
+
*
|
|
85
|
+
* @param paletteName - MUI ํ๋ ํธ ์ด๋ฆ ('primary', 'secondary', 'warning', 'error', 'success')
|
|
86
|
+
* @param shade - ์์ ๊ณ์ธต ('main', 'light', 'dark') (์: main ์์, ๋ฐ์ ์์, ์ด๋์ด ์์)
|
|
87
|
+
* @param alpha - ํฌ๋ช
๋ ๊ฐ (0๊ณผ 1 ์ฌ์ด์ ์ซ์, ์: 0.1์ 10% ํฌ๋ช
)
|
|
88
|
+
* @returns RGBA CSS ๋ณ์ ๋ฌธ์์ด (์: `rgba(var(--mui-palette-primary-mainChannel)/0.5)`)
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* // ๊ธฐ๋ณธ ์ฌ์ฉ ์์
|
|
92
|
+
* const rgbaVar = rgba('primary', 'main', 0.5);
|
|
93
|
+
* // ๊ฒฐ๊ณผ: "rgba(var(--mui-palette-primary-mainChannel)/0.5)"
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* // ๋ค๋ฅธ ํ๋ ํธ์ ๋ฐ๊ธฐ ์ฌ์ฉ ์์
|
|
97
|
+
* const rgbaVar = rgba('secondary', 'light', 0.8);
|
|
98
|
+
* // ๊ฒฐ๊ณผ: "rgba(var(--mui-palette-secondary-lightChannel)/0.8)"
|
|
99
|
+
*/
|
|
100
|
+
declare function rgba(paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning', shade: 'main' | 'light' | 'dark' | 'contrastText', alpha: number): string;
|
|
101
|
+
declare function shadowValue(index: number, hexColor?: string): string;
|
|
102
|
+
declare function shadow(paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning', shade: 'main' | 'light' | 'dark' | 'contrastText', index: number): string;
|
|
103
|
+
|
|
104
|
+
declare const muiCssVars_color: typeof color;
|
|
105
|
+
declare const muiCssVars_colorChannel: typeof colorChannel;
|
|
106
|
+
declare const muiCssVars_rgba: typeof rgba;
|
|
107
|
+
declare const muiCssVars_shadow: typeof shadow;
|
|
108
|
+
declare const muiCssVars_shadowValue: typeof shadowValue;
|
|
109
|
+
declare namespace muiCssVars {
|
|
110
|
+
export { muiCssVars_color as color, muiCssVars_colorChannel as colorChannel, muiCssVars_rgba as rgba, muiCssVars_shadow as shadow, muiCssVars_shadowValue as shadowValue };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { muiCssVars as cssVars, muiMediaQueries as mediaQueries };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Breakpoint } from '@mui/material';
|
|
2
|
+
import { AliasesCSSProperties, StandardCSSProperties } from '@mui/system';
|
|
3
|
+
|
|
4
|
+
type THEME = {
|
|
5
|
+
breakpoints: {
|
|
6
|
+
down: (breakpoint: Breakpoint) => string;
|
|
7
|
+
up: (breakpoint: Breakpoint) => string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
declare function xsOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
11
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
12
|
+
};
|
|
13
|
+
declare function smOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
14
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
15
|
+
};
|
|
16
|
+
declare function mdOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
17
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
18
|
+
};
|
|
19
|
+
declare function lgOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
20
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
21
|
+
};
|
|
22
|
+
declare function smOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
23
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
24
|
+
};
|
|
25
|
+
declare function mdOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
26
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
27
|
+
};
|
|
28
|
+
declare function lgOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
29
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
30
|
+
};
|
|
31
|
+
declare function xlOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): {
|
|
32
|
+
[x: string]: AliasesCSSProperties | StandardCSSProperties;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
declare const muiMediaQueries_lgOrDown: typeof lgOrDown;
|
|
36
|
+
declare const muiMediaQueries_lgOrUp: typeof lgOrUp;
|
|
37
|
+
declare const muiMediaQueries_mdOrDown: typeof mdOrDown;
|
|
38
|
+
declare const muiMediaQueries_mdOrUp: typeof mdOrUp;
|
|
39
|
+
declare const muiMediaQueries_smOrDown: typeof smOrDown;
|
|
40
|
+
declare const muiMediaQueries_smOrUp: typeof smOrUp;
|
|
41
|
+
declare const muiMediaQueries_xlOrUp: typeof xlOrUp;
|
|
42
|
+
declare const muiMediaQueries_xsOrDown: typeof xsOrDown;
|
|
43
|
+
declare namespace muiMediaQueries {
|
|
44
|
+
export { muiMediaQueries_lgOrDown as lgOrDown, muiMediaQueries_lgOrUp as lgOrUp, muiMediaQueries_mdOrDown as mdOrDown, muiMediaQueries_mdOrUp as mdOrUp, muiMediaQueries_smOrDown as smOrDown, muiMediaQueries_smOrUp as smOrUp, muiMediaQueries_xlOrUp as xlOrUp, muiMediaQueries_xsOrDown as xsOrDown };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* ํน์ MUI ํ๋ ํธ ์์์ CSS ๋ณ์ ๋ฌธ์์ด์ ์์ฑํฉ๋๋ค.
|
|
49
|
+
*
|
|
50
|
+
* @param paletteName - MUI ํ๋ ํธ ์ด๋ฆ ('primary', 'secondary', 'error', 'success', 'warning' ๋ฑ)
|
|
51
|
+
* @param shade - ์์ ๊ณ์ธต ('main', 'light', 'dark') (๊ธฐ๋ณธ๊ฐ: 'main')
|
|
52
|
+
* @returns CSS ๋ณ์ ๋ฌธ์์ด (์: `var(--mui-palette-primary-mainChannel)`)
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* // ๊ธฐ๋ณธ ์ฌ์ฉ ์์
|
|
56
|
+
* colorChannelVar('primary', 'dark'); => "var(--mui-palette-primary-darkChannel)"
|
|
57
|
+
*
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* // ๊ธฐ๋ณธ๊ฐ ์ฌ์ฉ ์์
|
|
61
|
+
* colorChannelVar('secondary'); => "var(--mui-palette-secondary-mainChannel)"
|
|
62
|
+
*/
|
|
63
|
+
declare function colorChannel(paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning', shade?: 'main' | 'light' | 'dark' | 'contrastText'): string;
|
|
64
|
+
/**
|
|
65
|
+
* ํน์ MUI ํ๋ ํธ ์์์ CSS ๋ณ์ ๋ฌธ์์ด์ ์์ฑํฉ๋๋ค.
|
|
66
|
+
*
|
|
67
|
+
* @param paletteName - MUI ํ๋ ํธ ์ด๋ฆ ('primary', 'secondary', 'warning', 'error', 'success')
|
|
68
|
+
* @param shade - ์์ ๊ณ์ธต ('main', 'light', 'dark') (๊ธฐ๋ณธ๊ฐ: 'main')
|
|
69
|
+
* @returns CSS ๋ณ์ ๋ฌธ์์ด (์: `var(--mui-palette-primary-main)`)
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* // ๊ธฐ๋ณธ ์ฌ์ฉ ์์
|
|
73
|
+
* const cssVar = colorVar('primary', 'light');
|
|
74
|
+
* // ๊ฒฐ๊ณผ: "var(--mui-palette-primary-light)"
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* // ๊ธฐ๋ณธ๊ฐ ์ฌ์ฉ ์์
|
|
78
|
+
* const cssVar = colorVar('secondary');
|
|
79
|
+
* // ๊ฒฐ๊ณผ: "var(--mui-palette-secondary-main)"
|
|
80
|
+
*/
|
|
81
|
+
declare function color(paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning', shade?: 'main' | 'light' | 'dark' | 'contrastText'): string;
|
|
82
|
+
/**
|
|
83
|
+
* ํน์ MUI ํ๋ ํธ ์์์ RGBA CSS ๋ณ์ ๋ฌธ์์ด์ ์์ฑํฉ๋๋ค.
|
|
84
|
+
*
|
|
85
|
+
* @param paletteName - MUI ํ๋ ํธ ์ด๋ฆ ('primary', 'secondary', 'warning', 'error', 'success')
|
|
86
|
+
* @param shade - ์์ ๊ณ์ธต ('main', 'light', 'dark') (์: main ์์, ๋ฐ์ ์์, ์ด๋์ด ์์)
|
|
87
|
+
* @param alpha - ํฌ๋ช
๋ ๊ฐ (0๊ณผ 1 ์ฌ์ด์ ์ซ์, ์: 0.1์ 10% ํฌ๋ช
)
|
|
88
|
+
* @returns RGBA CSS ๋ณ์ ๋ฌธ์์ด (์: `rgba(var(--mui-palette-primary-mainChannel)/0.5)`)
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* // ๊ธฐ๋ณธ ์ฌ์ฉ ์์
|
|
92
|
+
* const rgbaVar = rgba('primary', 'main', 0.5);
|
|
93
|
+
* // ๊ฒฐ๊ณผ: "rgba(var(--mui-palette-primary-mainChannel)/0.5)"
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* // ๋ค๋ฅธ ํ๋ ํธ์ ๋ฐ๊ธฐ ์ฌ์ฉ ์์
|
|
97
|
+
* const rgbaVar = rgba('secondary', 'light', 0.8);
|
|
98
|
+
* // ๊ฒฐ๊ณผ: "rgba(var(--mui-palette-secondary-lightChannel)/0.8)"
|
|
99
|
+
*/
|
|
100
|
+
declare function rgba(paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning', shade: 'main' | 'light' | 'dark' | 'contrastText', alpha: number): string;
|
|
101
|
+
declare function shadowValue(index: number, hexColor?: string): string;
|
|
102
|
+
declare function shadow(paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning', shade: 'main' | 'light' | 'dark' | 'contrastText', index: number): string;
|
|
103
|
+
|
|
104
|
+
declare const muiCssVars_color: typeof color;
|
|
105
|
+
declare const muiCssVars_colorChannel: typeof colorChannel;
|
|
106
|
+
declare const muiCssVars_rgba: typeof rgba;
|
|
107
|
+
declare const muiCssVars_shadow: typeof shadow;
|
|
108
|
+
declare const muiCssVars_shadowValue: typeof shadowValue;
|
|
109
|
+
declare namespace muiCssVars {
|
|
110
|
+
export { muiCssVars_color as color, muiCssVars_colorChannel as colorChannel, muiCssVars_rgba as rgba, muiCssVars_shadow as shadow, muiCssVars_shadowValue as shadowValue };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { muiCssVars as cssVars, muiMediaQueries as mediaQueries };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as i}from"../chunk-4C666HHU.js";var s={};i(s,{lgOrDown:()=>l,lgOrUp:()=>F,mdOrDown:()=>d,mdOrUp:()=>a,smOrDown:()=>m,smOrUp:()=>y,xlOrUp:()=>f,xsOrDown:()=>S});function S(x,p){return{[x.breakpoints.down("sm")]:p}}function m(x,p){return{[x.breakpoints.down("md")]:p}}function d(x,p){return{[x.breakpoints.down("lg")]:p}}function l(x,p){return{[x.breakpoints.down("xl")]:p}}function y(x,p){return{[x.breakpoints.up("sm")]:p}}function a(x,p){return{[x.breakpoints.up("md")]:p}}function F(x,p){return{[x.breakpoints.up("lg")]:p}}function f(x,p){return{[x.breakpoints.up("xl")]:p}}var o={};i(o,{color:()=>E,colorChannel:()=>C,rgba:()=>w,shadow:()=>k,shadowValue:()=>P});import{alpha as b}from"@mui/material";function t(x,p,r){return p>r?t(x,r,p):Math.min(Math.max(x,p),r)}function C(x,p="main"){return`var(--mui-palette-${x}-${p}Channel)`}function E(x,p="main"){return`var(--mui-palette-${x}-${p})`}function w(x,p,r){return`rgba(var(--mui-palette-${x}-${p}Channel)/${r})`}var n=[(x,p)=>`0px 2px 1px -1px ${p(x,.2)},0px 1px 1px 0px ${p(x,.14)},0px 1px 3px 0px ${p(x,.12)}`,(x,p)=>`0px 3px 1px -2px ${p(x,.2)},0px 2px 2px 0px ${p(x,.14)},0px 1px 5px 0px ${p(x,.12)}`,(x,p)=>`0px 3px 3px -2px ${p(x,.2)},0px 3px 4px 0px ${p(x,.14)},0px 1px 8px 0px ${p(x,.12)}`,(x,p)=>`0px 2px 4px -1px ${p(x,.2)},0px 4px 5px 0px ${p(x,.14)},0px 1px 10px 0px ${p(x,.12)}`,(x,p)=>`0px 3px 5px -1px ${p(x,.2)},0px 5px 8px 0px ${p(x,.14)},0px 1px 14px 0px ${p(x,.12)}`,(x,p)=>`0px 3px 5px -1px ${p(x,.2)},0px 6px 10px 0px ${p(x,.14)},0px 1px 18px 0px ${p(x,.12)}`,(x,p)=>`0px 4px 5px -2px ${p(x,.2)},0px 7px 10px 1px ${p(x,.14)},0px 2px 16px 1px ${p(x,.12)}`,(x,p)=>`0px 5px 5px -3px ${p(x,.2)},0px 8px 10px 1px ${p(x,.14)},0px 3px 14px 2px ${p(x,.12)}`,(x,p)=>`0px 5px 6px -3px ${p(x,.2)},0px 9px 12px 1px ${p(x,.14)},0px 3px 16px 2px ${p(x,.12)}`,(x,p)=>`0px 6px 6px -3px ${p(x,.2)},0px 10px 14px 1px ${p(x,.14)},0px 4px 18px 3px ${p(x,.12)}`,(x,p)=>`0px 6px 7px -4px ${p(x,.2)},0px 11px 15px 1px ${p(x,.14)},0px 4px 20px 3px ${p(x,.12)}`,(x,p)=>`0px 7px 8px -4px ${p(x,.2)},0px 12px 17px 2px ${p(x,.14)},0px 5px 22px 4px ${p(x,.12)}`,(x,p)=>`0px 7px 8px -4px ${p(x,.2)},0px 13px 19px 2px ${p(x,.14)},0px 5px 24px 4px ${p(x,.12)}`,(x,p)=>`0px 7px 9px -4px ${p(x,.2)},0px 14px 21px 2px ${p(x,.14)},0px 5px 26px 4px ${p(x,.12)}`,(x,p)=>`0px 8px 9px -5px ${p(x,.2)},0px 15px 22px 2px ${p(x,.14)},0px 6px 28px 5px ${p(x,.12)}`,(x,p)=>`0px 8px 10px -5px ${p(x,.2)},0px 16px 24px 2px ${p(x,.14)},0px 6px 30px 5px ${p(x,.12)}`,(x,p)=>`0px 8px 11px -5px ${p(x,.2)},0px 17px 26px 2px ${p(x,.14)},0px 6px 32px 5px ${p(x,.12)}`,(x,p)=>`0px 9px 11px -5px ${p(x,.2)},0px 18px 28px 2px ${p(x,.14)},0px 7px 34px 6px ${p(x,.12)}`,(x,p)=>`0px 9px 12px -6px ${p(x,.2)},0px 19px 29px 2px ${p(x,.14)},0px 7px 36px 6px ${p(x,.12)}`,(x,p)=>`0px 10px 13px -6px ${p(x,.2)},0px 20px 31px 3px ${p(x,.14)},0px 8px 38px 7px ${p(x,.12)}`,(x,p)=>`0px 10px 13px -6px ${p(x,.2)},0px 21px 33px 3px ${p(x,.14)},0px 8px 40px 7px ${p(x,.12)}`,(x,p)=>`0px 10px 14px -6px ${p(x,.2)},0px 22px 35px 3px ${p(x,.14)},0px 8px 42px 7px ${p(x,.12)}`,(x,p)=>`0px 11px 14px -7px ${p(x,.2)},0px 23px 36px 3px ${p(x,.14)},0px 9px 44px 8px ${p(x,.12)}`,(x,p)=>`0px 11px 15px -7px ${p(x,.2)},0px 24px 38px 3px ${p(x,.14)},0px 9px 46px 8px ${p(x,.12)}`];function P(x,p="#000"){let r=t(x,0,n.length-1);return r===0?"none":n[r-1]?.(p,b)||"none"}function k(x,p,r){let $=`var(--mui-palette-${x}-${p}Channel)`,e=t(r,0,n.length-1);if(e===0)return"none";let A=(u,g)=>`rgba(${u}/${g})`;return n[e-1]?.($,A)||"none"}export{o as cssVars,s as mediaQueries};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/helper/mui-media-queries.ts","../../src/helper/mui-css-vars.ts"],"sourcesContent":["import type { Breakpoint } from '@mui/material';\nimport type { AliasesCSSProperties, StandardCSSProperties } from '@mui/system';\n\ntype THEME = {\n breakpoints: {\n down: (breakpoint: Breakpoint) => string;\n up: (breakpoint: Breakpoint) => string;\n };\n};\n\nexport function xsOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // max-width: 600\n [theme.breakpoints.down('sm')]: css,\n };\n}\n\nexport function smOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // max-width: 900\n [theme.breakpoints.down('md')]: css,\n };\n}\n\nexport function mdOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // max-width: 1200\n [theme.breakpoints.down('lg')]: css,\n };\n}\n\nexport function lgOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // max-width: 1536\n [theme.breakpoints.down('xl')]: css,\n };\n}\n\nexport function smOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // min-width: 600\n [theme.breakpoints.up('sm')]: css,\n };\n}\n\nexport function mdOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // min-width: 900\n [theme.breakpoints.up('md')]: css,\n };\n}\n\nexport function lgOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // min-width: 1200\n [theme.breakpoints.up('lg')]: css,\n };\n}\n\nexport function xlOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties) {\n return {\n // min-width: 1500\n [theme.breakpoints.up('xl')]: css,\n };\n}\n","import { alpha as muiAlpha } from '@mui/material';\n\nfunction clamp(value: number, min: number, max: number): number {\n if (min > max) {\n return clamp(value, max, min);\n }\n return Math.min(Math.max(value, min), max);\n}\n\n/**\n * ํน์ MUI ํ๋ ํธ ์์์ CSS ๋ณ์ ๋ฌธ์์ด์ ์์ฑํฉ๋๋ค.\n *\n * @param paletteName - MUI ํ๋ ํธ ์ด๋ฆ ('primary', 'secondary', 'error', 'success', 'warning' ๋ฑ)\n * @param shade - ์์ ๊ณ์ธต ('main', 'light', 'dark') (๊ธฐ๋ณธ๊ฐ: 'main')\n * @returns CSS ๋ณ์ ๋ฌธ์์ด (์: `var(--mui-palette-primary-mainChannel)`)\n *\n * @example\n * // ๊ธฐ๋ณธ ์ฌ์ฉ ์์\n * colorChannelVar('primary', 'dark'); => \"var(--mui-palette-primary-darkChannel)\"\n *\n *\n * @example\n * // ๊ธฐ๋ณธ๊ฐ ์ฌ์ฉ ์์\n * colorChannelVar('secondary'); => \"var(--mui-palette-secondary-mainChannel)\"\n */\nexport function colorChannel(\n paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning',\n shade: 'main' | 'light' | 'dark' | 'contrastText' = 'main',\n): string {\n return `var(--mui-palette-${paletteName}-${shade}Channel)`;\n}\n\n/**\n * ํน์ MUI ํ๋ ํธ ์์์ CSS ๋ณ์ ๋ฌธ์์ด์ ์์ฑํฉ๋๋ค.\n *\n * @param paletteName - MUI ํ๋ ํธ ์ด๋ฆ ('primary', 'secondary', 'warning', 'error', 'success')\n * @param shade - ์์ ๊ณ์ธต ('main', 'light', 'dark') (๊ธฐ๋ณธ๊ฐ: 'main')\n * @returns CSS ๋ณ์ ๋ฌธ์์ด (์: `var(--mui-palette-primary-main)`)\n *\n * @example\n * // ๊ธฐ๋ณธ ์ฌ์ฉ ์์\n * const cssVar = colorVar('primary', 'light');\n * // ๊ฒฐ๊ณผ: \"var(--mui-palette-primary-light)\"\n *\n * @example\n * // ๊ธฐ๋ณธ๊ฐ ์ฌ์ฉ ์์\n * const cssVar = colorVar('secondary');\n * // ๊ฒฐ๊ณผ: \"var(--mui-palette-secondary-main)\"\n */\nexport function color(\n paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning',\n shade: 'main' | 'light' | 'dark' | 'contrastText' = 'main',\n) {\n return `var(--mui-palette-${paletteName}-${shade})`;\n}\n\n/**\n * ํน์ MUI ํ๋ ํธ ์์์ RGBA CSS ๋ณ์ ๋ฌธ์์ด์ ์์ฑํฉ๋๋ค.\n *\n * @param paletteName - MUI ํ๋ ํธ ์ด๋ฆ ('primary', 'secondary', 'warning', 'error', 'success')\n * @param shade - ์์ ๊ณ์ธต ('main', 'light', 'dark') (์: main ์์, ๋ฐ์ ์์, ์ด๋์ด ์์)\n * @param alpha - ํฌ๋ช
๋ ๊ฐ (0๊ณผ 1 ์ฌ์ด์ ์ซ์, ์: 0.1์ 10% ํฌ๋ช
)\n * @returns RGBA CSS ๋ณ์ ๋ฌธ์์ด (์: `rgba(var(--mui-palette-primary-mainChannel)/0.5)`)\n *\n * @example\n * // ๊ธฐ๋ณธ ์ฌ์ฉ ์์\n * const rgbaVar = rgba('primary', 'main', 0.5);\n * // ๊ฒฐ๊ณผ: \"rgba(var(--mui-palette-primary-mainChannel)/0.5)\"\n *\n * @example\n * // ๋ค๋ฅธ ํ๋ ํธ์ ๋ฐ๊ธฐ ์ฌ์ฉ ์์\n * const rgbaVar = rgba('secondary', 'light', 0.8);\n * // ๊ฒฐ๊ณผ: \"rgba(var(--mui-palette-secondary-lightChannel)/0.8)\"\n */\nexport function rgba(\n paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning',\n shade: 'main' | 'light' | 'dark' | 'contrastText',\n alpha: number,\n) {\n return `rgba(var(--mui-palette-${paletteName}-${shade}Channel)/${alpha})`;\n}\n\ntype ApplyAlphaFn = (color: string, opacity: number) => string;\n// const sss = (c: string, alpha: ApplyAlphaFn) => `0px 2px 1px -1px ${alpha(c, 0.2)},0px 1px 1px 0px ${alpha(c, 0.14)},0px 1px 3px 0px ${alpha(c, 0.12)}`;\n\n// copy from https://mui.com/material-ui/customization/default-theme/\n// shadow 23๊ฐ\nconst PREDEFINED_SHADOWS = [\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 2px 1px -1px ${alpha(c, 0.2)},0px 1px 1px 0px ${alpha(c, 0.14)},0px 1px 3px 0px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 3px 1px -2px ${alpha(c, 0.2)},0px 2px 2px 0px ${alpha(c, 0.14)},0px 1px 5px 0px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 3px 3px -2px ${alpha(c, 0.2)},0px 3px 4px 0px ${alpha(c, 0.14)},0px 1px 8px 0px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 2px 4px -1px ${alpha(c, 0.2)},0px 4px 5px 0px ${alpha(c, 0.14)},0px 1px 10px 0px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 3px 5px -1px ${alpha(c, 0.2)},0px 5px 8px 0px ${alpha(c, 0.14)},0px 1px 14px 0px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 3px 5px -1px ${alpha(c, 0.2)},0px 6px 10px 0px ${alpha(c, 0.14)},0px 1px 18px 0px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 4px 5px -2px ${alpha(c, 0.2)},0px 7px 10px 1px ${alpha(c, 0.14)},0px 2px 16px 1px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 5px 5px -3px ${alpha(c, 0.2)},0px 8px 10px 1px ${alpha(c, 0.14)},0px 3px 14px 2px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 5px 6px -3px ${alpha(c, 0.2)},0px 9px 12px 1px ${alpha(c, 0.14)},0px 3px 16px 2px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 6px 6px -3px ${alpha(c, 0.2)},0px 10px 14px 1px ${alpha(c, 0.14)},0px 4px 18px 3px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 6px 7px -4px ${alpha(c, 0.2)},0px 11px 15px 1px ${alpha(c, 0.14)},0px 4px 20px 3px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 7px 8px -4px ${alpha(c, 0.2)},0px 12px 17px 2px ${alpha(c, 0.14)},0px 5px 22px 4px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 7px 8px -4px ${alpha(c, 0.2)},0px 13px 19px 2px ${alpha(c, 0.14)},0px 5px 24px 4px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 7px 9px -4px ${alpha(c, 0.2)},0px 14px 21px 2px ${alpha(c, 0.14)},0px 5px 26px 4px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 8px 9px -5px ${alpha(c, 0.2)},0px 15px 22px 2px ${alpha(c, 0.14)},0px 6px 28px 5px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 8px 10px -5px ${alpha(c, 0.2)},0px 16px 24px 2px ${alpha(c, 0.14)},0px 6px 30px 5px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 8px 11px -5px ${alpha(c, 0.2)},0px 17px 26px 2px ${alpha(c, 0.14)},0px 6px 32px 5px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 9px 11px -5px ${alpha(c, 0.2)},0px 18px 28px 2px ${alpha(c, 0.14)},0px 7px 34px 6px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 9px 12px -6px ${alpha(c, 0.2)},0px 19px 29px 2px ${alpha(c, 0.14)},0px 7px 36px 6px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 10px 13px -6px ${alpha(c, 0.2)},0px 20px 31px 3px ${alpha(c, 0.14)},0px 8px 38px 7px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 10px 13px -6px ${alpha(c, 0.2)},0px 21px 33px 3px ${alpha(c, 0.14)},0px 8px 40px 7px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 10px 14px -6px ${alpha(c, 0.2)},0px 22px 35px 3px ${alpha(c, 0.14)},0px 8px 42px 7px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 11px 14px -7px ${alpha(c, 0.2)},0px 23px 36px 3px ${alpha(c, 0.14)},0px 9px 44px 8px ${alpha(c, 0.12)}`,\n (c: string, alpha: ApplyAlphaFn) =>\n `0px 11px 15px -7px ${alpha(c, 0.2)},0px 24px 38px 3px ${alpha(c, 0.14)},0px 9px 46px 8px ${alpha(c, 0.12)}`,\n];\n\nexport function shadowValue(index: number, hexColor = '#000'): string {\n const idx = clamp(index, 0, PREDEFINED_SHADOWS.length - 1);\n if (idx === 0) {\n return 'none';\n }\n return PREDEFINED_SHADOWS[idx - 1]?.(hexColor, muiAlpha) || 'none';\n}\n\nexport function shadow(\n paletteName: 'primary' | 'secondary' | 'warning' | 'info' | 'error' | 'success' | 'warning',\n shade: 'main' | 'light' | 'dark' | 'contrastText',\n index: number,\n): string {\n //ex: --mui-palette-primary-mainChannel\n const cssVar = `var(--mui-palette-${paletteName}-${shade}Channel)`;\n\n const idx = clamp(index, 0, PREDEFINED_SHADOWS.length - 1);\n if (idx === 0) {\n return 'none';\n }\n\n // ex: channelVar: 244 24 23, opacity: 0.2\n const alphaFn = (channelVar: string, opacity: number) => `rgba(${channelVar}/${opacity})`;\n\n return PREDEFINED_SHADOWS[idx - 1]?.(cssVar, alphaFn) || 'none';\n}\n"],"mappings":"yCAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,cAAAE,EAAA,WAAAC,EAAA,aAAAC,EAAA,WAAAC,EAAA,aAAAC,EAAA,WAAAC,EAAA,WAAAC,EAAA,aAAAC,IAUO,SAASA,EAASC,EAAcC,EAAmD,CACxF,MAAO,CAEL,CAACD,EAAM,YAAY,KAAK,IAAI,CAAC,EAAGC,CAClC,CACF,CAEO,SAASL,EAASI,EAAcC,EAAmD,CACxF,MAAO,CAEL,CAACD,EAAM,YAAY,KAAK,IAAI,CAAC,EAAGC,CAClC,CACF,CAEO,SAASP,EAASM,EAAcC,EAAmD,CACxF,MAAO,CAEL,CAACD,EAAM,YAAY,KAAK,IAAI,CAAC,EAAGC,CAClC,CACF,CAEO,SAAST,EAASQ,EAAcC,EAAmD,CACxF,MAAO,CAEL,CAACD,EAAM,YAAY,KAAK,IAAI,CAAC,EAAGC,CAClC,CACF,CAEO,SAASJ,EAAOG,EAAcC,EAAmD,CACtF,MAAO,CAEL,CAACD,EAAM,YAAY,GAAG,IAAI,CAAC,EAAGC,CAChC,CACF,CAEO,SAASN,EAAOK,EAAcC,EAAmD,CACtF,MAAO,CAEL,CAACD,EAAM,YAAY,GAAG,IAAI,CAAC,EAAGC,CAChC,CACF,CAEO,SAASR,EAAOO,EAAcC,EAAmD,CACtF,MAAO,CAEL,CAACD,EAAM,YAAY,GAAG,IAAI,CAAC,EAAGC,CAChC,CACF,CAEO,SAASH,EAAOE,EAAcC,EAAmD,CACtF,MAAO,CAEL,CAAC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E,IAAMC,EAAMX,EAAMS,EAAO,EAAGF,EAAmB,OAAS,CAAC,EACzD,OAAII,IAAQ,EACH,OAEFJ,EAAmBI,EAAM,CAAC,IAAID,EAAUX,CAAQ,GAAK,MAC9D,CAEO,SAASF,EACdO,EACAC,EACAI,EACQ,CAER,IAAMG,EAAS,qBAAqBR,CAAW,IAAIC,CAAK,WAElDM,EAAMX,EAAMS,EAAO,EAAGF,EAAmB,OAAS,CAAC,EACzD,GAAII,IAAQ,EACV,MAAO,OAIT,IAAME,EAAU,CAACC,EAAoBC,IAAoB,QAAQD,CAAU,IAAIC,CAAO,IAEtF,OAAOR,EAAmBI,EAAM,CAAC,IAAIC,EAAQC,CAAO,GAAK,MAC3D","names":["mui_media_queries_exports","__export","lgOrDown","lgOrUp","mdOrDown","mdOrUp","smOrDown","smOrUp","xlOrUp","xsOrDown","theme","css","mui_css_vars_exports","__export","color","colorChannel","rgba","shadow","shadowValue","muiAlpha","clamp","value","min","max","paletteName","shade","alpha","PREDEFINED_SHADOWS","c","index","hexColor","idx","cssVar","alphaFn","channelVar","opacity"]}
|