@simplysm/core-browser 13.0.0-beta.41 → 13.0.0-beta.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import "./extensions/element-ext";
2
2
  import "./extensions/html-element-ext";
3
3
  export * from "./extensions/element-ext";
4
4
  export * from "./extensions/html-element-ext";
5
- export * from "./utils/blob";
6
5
  export * from "./utils/download";
6
+ export * from "./utils/fetch";
7
+ export * from "./utils/file-dialog";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,0BAA0B,CAAC;AAClC,OAAO,+BAA+B,CAAC;AAGvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,0BAA0B,CAAC;AAClC,OAAO,+BAA+B,CAAC;AAGvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ import "./extensions/element-ext.js";
2
2
  import "./extensions/html-element-ext.js";
3
3
  export * from "./extensions/element-ext.js";
4
4
  export * from "./extensions/html-element-ext.js";
5
- export * from "./utils/blob.js";
6
5
  export * from "./utils/download.js";
6
+ export * from "./utils/fetch.js";
7
+ export * from "./utils/file-dialog.js";
7
8
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["// core-browser: \uBE0C\uB77C\uC6B0\uC800 \uC804\uC6A9 \uC720\uD2F8\uB9AC\uD2F0\n\n// extensions (side-effect)\nimport \"./extensions/element-ext\";\nimport \"./extensions/html-element-ext\";\n\n// re-exports\nexport * from \"./extensions/element-ext\";\nexport * from \"./extensions/html-element-ext\";\nexport * from \"./utils/blob\";\nexport * from \"./utils/download\";\n"],
5
- "mappings": "AAGA,OAAO;AACP,OAAO;AAGP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
4
+ "sourcesContent": ["// core-browser: \uBE0C\uB77C\uC6B0\uC800 \uC804\uC6A9 \uC720\uD2F8\uB9AC\uD2F0\n\n// extensions (side-effect)\nimport \"./extensions/element-ext\";\nimport \"./extensions/html-element-ext\";\n\n// re-exports\nexport * from \"./extensions/element-ext\";\nexport * from \"./extensions/html-element-ext\";\nexport * from \"./utils/download\";\nexport * from \"./utils/fetch\";\nexport * from \"./utils/file-dialog\";\n"],
5
+ "mappings": "AAGA,OAAO;AACP,OAAO;AAGP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,11 +1,8 @@
1
- export interface DownloadProgress {
2
- receivedLength: number;
3
- contentLength: number;
4
- }
5
1
  /**
6
- * URL에서 바이너리 데이터 다운로드 (진행률 콜백 지원)
2
+ * Blob을 파일로 다운로드
3
+ *
4
+ * @param blob - 다운로드할 Blob 객체
5
+ * @param fileName - 저장될 파일 이름
7
6
  */
8
- export declare function downloadBytes(url: string, options?: {
9
- onProgress?: (progress: DownloadProgress) => void;
10
- }): Promise<Uint8Array>;
7
+ export declare function downloadBlob(blob: Blob, fileName: string): void;
11
8
  //# sourceMappingURL=download.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/utils/download.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAA;CAAE,GAC9D,OAAO,CAAC,UAAU,CAAC,CAsDrB"}
1
+ {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/utils/download.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAU/D"}
@@ -1,47 +1,15 @@
1
- async function downloadBytes(url, options) {
2
- var _a, _b;
3
- const response = await fetch(url);
4
- if (!response.ok) {
5
- throw new Error(`Download failed: ${response.status} ${response.statusText}`);
6
- }
7
- const contentLength = Number(response.headers.get("Content-Length") ?? 0);
8
- const reader = (_a = response.body) == null ? void 0 : _a.getReader();
9
- if (!reader) {
10
- throw new Error("Response body is not readable");
11
- }
1
+ function downloadBlob(blob, fileName) {
2
+ const url = URL.createObjectURL(blob);
12
3
  try {
13
- if (contentLength > 0) {
14
- const result2 = new Uint8Array(contentLength);
15
- let receivedLength2 = 0;
16
- while (true) {
17
- const { done, value } = await reader.read();
18
- if (done) break;
19
- result2.set(value, receivedLength2);
20
- receivedLength2 += value.length;
21
- (_b = options == null ? void 0 : options.onProgress) == null ? void 0 : _b.call(options, { receivedLength: receivedLength2, contentLength });
22
- }
23
- return result2;
24
- }
25
- const chunks = [];
26
- let receivedLength = 0;
27
- while (true) {
28
- const { done, value } = await reader.read();
29
- if (done) break;
30
- chunks.push(value);
31
- receivedLength += value.length;
32
- }
33
- const result = new Uint8Array(receivedLength);
34
- let position = 0;
35
- for (const chunk of chunks) {
36
- result.set(chunk, position);
37
- position += chunk.length;
38
- }
39
- return result;
4
+ const link = document.createElement("a");
5
+ link.href = url;
6
+ link.download = fileName;
7
+ link.click();
40
8
  } finally {
41
- reader.releaseLock();
9
+ setTimeout(() => URL.revokeObjectURL(url), 1e3);
42
10
  }
43
11
  }
44
12
  export {
45
- downloadBytes
13
+ downloadBlob
46
14
  };
47
15
  //# sourceMappingURL=download.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/download.ts"],
4
- "sourcesContent": ["export interface DownloadProgress {\n receivedLength: number;\n contentLength: number;\n}\n\n/**\n * URL\uC5D0\uC11C \uBC14\uC774\uB108\uB9AC \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC (\uC9C4\uD589\uB960 \uCF5C\uBC31 \uC9C0\uC6D0)\n */\nexport async function downloadBytes(\n url: string,\n options?: { onProgress?: (progress: DownloadProgress) => void },\n): Promise<Uint8Array> {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`Download failed: ${response.status} ${response.statusText}`);\n }\n\n const contentLength = Number(response.headers.get(\"Content-Length\") ?? 0);\n const reader = response.body?.getReader();\n if (!reader) {\n throw new Error(\"Response body is not readable\");\n }\n\n try {\n // Content-Length\uB97C \uC54C \uC218 \uC788\uC73C\uBA74 \uBBF8\uB9AC \uD560\uB2F9\uD558\uC5EC \uBA54\uBAA8\uB9AC \uD6A8\uC728\uC131 \uD5A5\uC0C1\n if (contentLength > 0) {\n const result = new Uint8Array(contentLength);\n let receivedLength = 0;\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n result.set(value, receivedLength);\n receivedLength += value.length;\n options?.onProgress?.({ receivedLength, contentLength });\n }\n\n return result;\n }\n\n // Content-Length\uB97C \uBAA8\uB974\uBA74 \uCCAD\uD06C \uC218\uC9D1 \uD6C4 \uBCD1\uD569 (chunked encoding)\n const chunks: Uint8Array[] = [];\n let receivedLength = 0;\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n chunks.push(value);\n receivedLength += value.length;\n }\n\n // \uCCAD\uD06C \uBCD1\uD569\n const result = new Uint8Array(receivedLength);\n let position = 0;\n for (const chunk of chunks) {\n result.set(chunk, position);\n position += chunk.length;\n }\n\n return result;\n } finally {\n reader.releaseLock();\n }\n}\n"],
5
- "mappings": "AAQA,eAAsB,cACpB,KACA,SACqB;AAXvB;AAYE,QAAM,WAAW,MAAM,MAAM,GAAG;AAChC,MAAI,CAAC,SAAS,IAAI;AAChB,UAAM,IAAI,MAAM,oBAAoB,SAAS,MAAM,IAAI,SAAS,UAAU,EAAE;AAAA,EAC9E;AAEA,QAAM,gBAAgB,OAAO,SAAS,QAAQ,IAAI,gBAAgB,KAAK,CAAC;AACxE,QAAM,UAAS,cAAS,SAAT,mBAAe;AAC9B,MAAI,CAAC,QAAQ;AACX,UAAM,IAAI,MAAM,+BAA+B;AAAA,EACjD;AAEA,MAAI;AAEF,QAAI,gBAAgB,GAAG;AACrB,YAAMA,UAAS,IAAI,WAAW,aAAa;AAC3C,UAAIC,kBAAiB;AAErB,aAAO,MAAM;AACX,cAAM,EAAE,MAAM,MAAM,IAAI,MAAM,OAAO,KAAK;AAC1C,YAAI,KAAM;AAEV,QAAAD,QAAO,IAAI,OAAOC,eAAc;AAChC,QAAAA,mBAAkB,MAAM;AACxB,iDAAS,eAAT,iCAAsB,EAAE,gBAAAA,iBAAgB,cAAc;AAAA,MACxD;AAEA,aAAOD;AAAA,IACT;AAGA,UAAM,SAAuB,CAAC;AAC9B,QAAI,iBAAiB;AAErB,WAAO,MAAM;AACX,YAAM,EAAE,MAAM,MAAM,IAAI,MAAM,OAAO,KAAK;AAC1C,UAAI,KAAM;AAEV,aAAO,KAAK,KAAK;AACjB,wBAAkB,MAAM;AAAA,IAC1B;AAGA,UAAM,SAAS,IAAI,WAAW,cAAc;AAC5C,QAAI,WAAW;AACf,eAAW,SAAS,QAAQ;AAC1B,aAAO,IAAI,OAAO,QAAQ;AAC1B,kBAAY,MAAM;AAAA,IACpB;AAEA,WAAO;AAAA,EACT,UAAE;AACA,WAAO,YAAY;AAAA,EACrB;AACF;",
6
- "names": ["result", "receivedLength"]
4
+ "sourcesContent": ["/**\n * Blob\uC744 \uD30C\uC77C\uB85C \uB2E4\uC6B4\uB85C\uB4DC\n *\n * @param blob - \uB2E4\uC6B4\uB85C\uB4DC\uD560 Blob \uAC1D\uCCB4\n * @param fileName - \uC800\uC7A5\uB420 \uD30C\uC77C \uC774\uB984\n */\nexport function downloadBlob(blob: Blob, fileName: string): void {\n const url = URL.createObjectURL(blob);\n try {\n const link = document.createElement(\"a\");\n link.href = url;\n link.download = fileName;\n link.click();\n } finally {\n setTimeout(() => URL.revokeObjectURL(url), 1000);\n }\n}\n"],
5
+ "mappings": "AAMO,SAAS,aAAa,MAAY,UAAwB;AAC/D,QAAM,MAAM,IAAI,gBAAgB,IAAI;AACpC,MAAI;AACF,UAAM,OAAO,SAAS,cAAc,GAAG;AACvC,SAAK,OAAO;AACZ,SAAK,WAAW;AAChB,SAAK,MAAM;AAAA,EACb,UAAE;AACA,eAAW,MAAM,IAAI,gBAAgB,GAAG,GAAG,GAAI;AAAA,EACjD;AACF;",
6
+ "names": []
7
7
  }
@@ -0,0 +1,11 @@
1
+ export interface DownloadProgress {
2
+ receivedLength: number;
3
+ contentLength: number;
4
+ }
5
+ /**
6
+ * URL에서 바이너리 데이터 다운로드 (진행률 콜백 지원)
7
+ */
8
+ export declare function fetchUrlBytes(url: string, options?: {
9
+ onProgress?: (progress: DownloadProgress) => void;
10
+ }): Promise<Uint8Array>;
11
+ //# sourceMappingURL=fetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/utils/fetch.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAA;CAAE,GAC9D,OAAO,CAAC,UAAU,CAAC,CAsDrB"}
@@ -0,0 +1,47 @@
1
+ async function fetchUrlBytes(url, options) {
2
+ var _a, _b;
3
+ const response = await fetch(url);
4
+ if (!response.ok) {
5
+ throw new Error(`Download failed: ${response.status} ${response.statusText}`);
6
+ }
7
+ const contentLength = Number(response.headers.get("Content-Length") ?? 0);
8
+ const reader = (_a = response.body) == null ? void 0 : _a.getReader();
9
+ if (!reader) {
10
+ throw new Error("Response body is not readable");
11
+ }
12
+ try {
13
+ if (contentLength > 0) {
14
+ const result2 = new Uint8Array(contentLength);
15
+ let receivedLength2 = 0;
16
+ while (true) {
17
+ const { done, value } = await reader.read();
18
+ if (done) break;
19
+ result2.set(value, receivedLength2);
20
+ receivedLength2 += value.length;
21
+ (_b = options == null ? void 0 : options.onProgress) == null ? void 0 : _b.call(options, { receivedLength: receivedLength2, contentLength });
22
+ }
23
+ return result2;
24
+ }
25
+ const chunks = [];
26
+ let receivedLength = 0;
27
+ while (true) {
28
+ const { done, value } = await reader.read();
29
+ if (done) break;
30
+ chunks.push(value);
31
+ receivedLength += value.length;
32
+ }
33
+ const result = new Uint8Array(receivedLength);
34
+ let position = 0;
35
+ for (const chunk of chunks) {
36
+ result.set(chunk, position);
37
+ position += chunk.length;
38
+ }
39
+ return result;
40
+ } finally {
41
+ reader.releaseLock();
42
+ }
43
+ }
44
+ export {
45
+ fetchUrlBytes
46
+ };
47
+ //# sourceMappingURL=fetch.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/fetch.ts"],
4
+ "sourcesContent": ["export interface DownloadProgress {\n receivedLength: number;\n contentLength: number;\n}\n\n/**\n * URL\uC5D0\uC11C \uBC14\uC774\uB108\uB9AC \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC (\uC9C4\uD589\uB960 \uCF5C\uBC31 \uC9C0\uC6D0)\n */\nexport async function fetchUrlBytes(\n url: string,\n options?: { onProgress?: (progress: DownloadProgress) => void },\n): Promise<Uint8Array> {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`Download failed: ${response.status} ${response.statusText}`);\n }\n\n const contentLength = Number(response.headers.get(\"Content-Length\") ?? 0);\n const reader = response.body?.getReader();\n if (!reader) {\n throw new Error(\"Response body is not readable\");\n }\n\n try {\n // Content-Length\uB97C \uC54C \uC218 \uC788\uC73C\uBA74 \uBBF8\uB9AC \uD560\uB2F9\uD558\uC5EC \uBA54\uBAA8\uB9AC \uD6A8\uC728\uC131 \uD5A5\uC0C1\n if (contentLength > 0) {\n const result = new Uint8Array(contentLength);\n let receivedLength = 0;\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n result.set(value, receivedLength);\n receivedLength += value.length;\n options?.onProgress?.({ receivedLength, contentLength });\n }\n\n return result;\n }\n\n // Content-Length\uB97C \uBAA8\uB974\uBA74 \uCCAD\uD06C \uC218\uC9D1 \uD6C4 \uBCD1\uD569 (chunked encoding)\n const chunks: Uint8Array[] = [];\n let receivedLength = 0;\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n chunks.push(value);\n receivedLength += value.length;\n }\n\n // \uCCAD\uD06C \uBCD1\uD569\n const result = new Uint8Array(receivedLength);\n let position = 0;\n for (const chunk of chunks) {\n result.set(chunk, position);\n position += chunk.length;\n }\n\n return result;\n } finally {\n reader.releaseLock();\n }\n}\n"],
5
+ "mappings": "AAQA,eAAsB,cACpB,KACA,SACqB;AAXvB;AAYE,QAAM,WAAW,MAAM,MAAM,GAAG;AAChC,MAAI,CAAC,SAAS,IAAI;AAChB,UAAM,IAAI,MAAM,oBAAoB,SAAS,MAAM,IAAI,SAAS,UAAU,EAAE;AAAA,EAC9E;AAEA,QAAM,gBAAgB,OAAO,SAAS,QAAQ,IAAI,gBAAgB,KAAK,CAAC;AACxE,QAAM,UAAS,cAAS,SAAT,mBAAe;AAC9B,MAAI,CAAC,QAAQ;AACX,UAAM,IAAI,MAAM,+BAA+B;AAAA,EACjD;AAEA,MAAI;AAEF,QAAI,gBAAgB,GAAG;AACrB,YAAMA,UAAS,IAAI,WAAW,aAAa;AAC3C,UAAIC,kBAAiB;AAErB,aAAO,MAAM;AACX,cAAM,EAAE,MAAM,MAAM,IAAI,MAAM,OAAO,KAAK;AAC1C,YAAI,KAAM;AAEV,QAAAD,QAAO,IAAI,OAAOC,eAAc;AAChC,QAAAA,mBAAkB,MAAM;AACxB,iDAAS,eAAT,iCAAsB,EAAE,gBAAAA,iBAAgB,cAAc;AAAA,MACxD;AAEA,aAAOD;AAAA,IACT;AAGA,UAAM,SAAuB,CAAC;AAC9B,QAAI,iBAAiB;AAErB,WAAO,MAAM;AACX,YAAM,EAAE,MAAM,MAAM,IAAI,MAAM,OAAO,KAAK;AAC1C,UAAI,KAAM;AAEV,aAAO,KAAK,KAAK;AACjB,wBAAkB,MAAM;AAAA,IAC1B;AAGA,UAAM,SAAS,IAAI,WAAW,cAAc;AAC5C,QAAI,WAAW;AACf,eAAW,SAAS,QAAQ;AAC1B,aAAO,IAAI,OAAO,QAAQ;AAC1B,kBAAY,MAAM;AAAA,IACpB;AAEA,WAAO;AAAA,EACT,UAAE;AACA,WAAO,YAAY;AAAA,EACrB;AACF;",
6
+ "names": ["result", "receivedLength"]
7
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 파일 선택 다이얼로그를 프로그래밍 방식으로 열기
3
+ */
4
+ export declare function openFileDialog(options?: {
5
+ accept?: string;
6
+ multiple?: boolean;
7
+ }): Promise<File[] | undefined>;
8
+ //# sourceMappingURL=file-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-dialog.d.ts","sourceRoot":"","sources":["../../src/utils/file-dialog.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,SAAS,CAAC,CAa7G"}
@@ -0,0 +1,18 @@
1
+ function openFileDialog(options) {
2
+ return new Promise((resolve) => {
3
+ const input = document.createElement("input");
4
+ input.type = "file";
5
+ input.multiple = (options == null ? void 0 : options.multiple) ?? false;
6
+ if ((options == null ? void 0 : options.accept) != null) {
7
+ input.accept = options.accept;
8
+ }
9
+ input.onchange = () => {
10
+ resolve(input.files != null && input.files.length > 0 ? [...input.files] : void 0);
11
+ };
12
+ input.click();
13
+ });
14
+ }
15
+ export {
16
+ openFileDialog
17
+ };
18
+ //# sourceMappingURL=file-dialog.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/file-dialog.ts"],
4
+ "sourcesContent": ["/**\n * \uD30C\uC77C \uC120\uD0DD \uB2E4\uC774\uC5BC\uB85C\uADF8\uB97C \uD504\uB85C\uADF8\uB798\uBC0D \uBC29\uC2DD\uC73C\uB85C \uC5F4\uAE30\n */\nexport function openFileDialog(options?: { accept?: string; multiple?: boolean }): Promise<File[] | undefined> {\n return new Promise((resolve) => {\n const input = document.createElement(\"input\");\n input.type = \"file\";\n input.multiple = options?.multiple ?? false;\n if (options?.accept != null) {\n input.accept = options.accept;\n }\n input.onchange = () => {\n resolve(input.files != null && input.files.length > 0 ? [...input.files] : undefined);\n };\n input.click();\n });\n}\n"],
5
+ "mappings": "AAGO,SAAS,eAAe,SAAgF;AAC7G,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,UAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,UAAM,OAAO;AACb,UAAM,YAAW,mCAAS,aAAY;AACtC,SAAI,mCAAS,WAAU,MAAM;AAC3B,YAAM,SAAS,QAAQ;AAAA,IACzB;AACA,UAAM,WAAW,MAAM;AACrB,cAAQ,MAAM,SAAS,QAAQ,MAAM,MAAM,SAAS,IAAI,CAAC,GAAG,MAAM,KAAK,IAAI,MAAS;AAAA,IACtF;AACA,UAAM,MAAM;AAAA,EACd,CAAC;AACH;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/core-browser",
3
- "version": "13.0.0-beta.41",
3
+ "version": "13.0.0-beta.44",
4
4
  "description": "심플리즘 패키지 - 코어 모듈 (browser)",
5
5
  "author": "김석래",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "dependencies": {
23
23
  "tabbable": "^6.4.0",
24
- "@simplysm/core-common": "13.0.0-beta.41"
24
+ "@simplysm/core-common": "13.0.0-beta.44"
25
25
  },
26
26
  "devDependencies": {
27
27
  "happy-dom": "^20.6.1"
@@ -1,10 +0,0 @@
1
- export declare namespace BlobUtils {
2
- /**
3
- * Blob을 파일로 다운로드
4
- *
5
- * @param blob - 다운로드할 Blob 객체
6
- * @param fileName - 저장될 파일 이름
7
- */
8
- function download(blob: Blob, fileName: string): void;
9
- }
10
- //# sourceMappingURL=blob.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"blob.d.ts","sourceRoot":"","sources":["../../src/utils/blob.ts"],"names":[],"mappings":"AAAA,yBAAiB,SAAS,CAAC;IACzB;;;;;OAKG;IACH,SAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAU3D;CACF"}
@@ -1,19 +0,0 @@
1
- var BlobUtils;
2
- ((BlobUtils2) => {
3
- function download(blob, fileName) {
4
- const url = URL.createObjectURL(blob);
5
- try {
6
- const link = document.createElement("a");
7
- link.href = url;
8
- link.download = fileName;
9
- link.click();
10
- } finally {
11
- setTimeout(() => URL.revokeObjectURL(url), 1e3);
12
- }
13
- }
14
- BlobUtils2.download = download;
15
- })(BlobUtils || (BlobUtils = {}));
16
- export {
17
- BlobUtils
18
- };
19
- //# sourceMappingURL=blob.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/utils/blob.ts"],
4
- "sourcesContent": ["export namespace BlobUtils {\n /**\n * Blob\uC744 \uD30C\uC77C\uB85C \uB2E4\uC6B4\uB85C\uB4DC\n *\n * @param blob - \uB2E4\uC6B4\uB85C\uB4DC\uD560 Blob \uAC1D\uCCB4\n * @param fileName - \uC800\uC7A5\uB420 \uD30C\uC77C \uC774\uB984\n */\n export function download(blob: Blob, fileName: string): void {\n const url = URL.createObjectURL(blob);\n try {\n const link = document.createElement(\"a\");\n link.href = url;\n link.download = fileName;\n link.click();\n } finally {\n setTimeout(() => URL.revokeObjectURL(url), 1000);\n }\n }\n}\n"],
5
- "mappings": "AAAO,IAAU;AAAA,CAAV,CAAUA,eAAV;AAOE,WAAS,SAAS,MAAY,UAAwB;AAC3D,UAAM,MAAM,IAAI,gBAAgB,IAAI;AACpC,QAAI;AACF,YAAM,OAAO,SAAS,cAAc,GAAG;AACvC,WAAK,OAAO;AACZ,WAAK,WAAW;AAChB,WAAK,MAAM;AAAA,IACb,UAAE;AACA,iBAAW,MAAM,IAAI,gBAAgB,GAAG,GAAG,GAAI;AAAA,IACjD;AAAA,EACF;AAVO,EAAAA,WAAS;AAAA,GAPD;",
6
- "names": ["BlobUtils"]
7
- }