@thi.ng/dl-asset 1.0.3 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -53
- package/README.md +22 -6
- package/download.d.ts +1 -1
- package/download.js +1 -1
- package/index.d.ts +3 -3
- package/index.js +3 -3
- package/package.json +41 -24
- package/raw.d.ts +1 -1
- package/raw.js +6 -2
- package/lib/index.js +0 -35
- package/lib/index.js.map +0 -1
- package/lib/index.umd.js +0 -1
- package/lib/index.umd.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [
|
|
6
|
+
## [2.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/dl-asset@2.0.0...@thi.ng/dl-asset@2.0.1) (2021-10-13)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @thi.ng/dl-asset
|
|
9
9
|
|
|
@@ -11,82 +11,59 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @thi.ng/dl-asset
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## [1.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/dl-asset@0.4.27...@thi.ng/dl-asset@1.0.1) (2021-08-08)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @thi.ng/dl-asset
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## [0.4.27](https://github.com/thi-ng/umbrella/compare/@thi.ng/dl-asset@0.4.26...@thi.ng/dl-asset@0.4.27) (2021-08-04)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @thi.ng/dl-asset
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
## [0.4.26](https://github.com/thi-ng/umbrella/compare/@thi.ng/dl-asset@0.4.25...@thi.ng/dl-asset@0.4.26) (2021-07-01)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @thi.ng/dl-asset
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## [0.4.25](https://github.com/thi-ng/umbrella/compare/@thi.ng/dl-asset@0.4.24...@thi.ng/dl-asset@0.4.25) (2021-06-08)
|
|
47
|
-
|
|
48
|
-
**Note:** Version bump only for package @thi.ng/dl-asset
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
# [0.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/dl-asset@0.3.14...@thi.ng/dl-asset@0.4.0) (2020-07-08)
|
|
14
|
+
# [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/dl-asset@1.0.5...@thi.ng/dl-asset@2.0.0) (2021-10-12)
|
|
55
15
|
|
|
56
16
|
|
|
57
|
-
###
|
|
17
|
+
### Build System
|
|
58
18
|
|
|
59
|
-
*
|
|
19
|
+
* major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
|
|
60
20
|
|
|
61
21
|
|
|
22
|
+
### BREAKING CHANGES
|
|
62
23
|
|
|
24
|
+
* discontinue CommonJS & UMD versions
|
|
63
25
|
|
|
26
|
+
- only ESM modules will be published from now on
|
|
27
|
+
- CJS obsolete due to ESM support in recent versions of node:
|
|
28
|
+
- i.e. launch NodeJS via:
|
|
29
|
+
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
30
|
+
- in the node REPL use `await import(...)` instead of `require()`
|
|
31
|
+
- UMD obsolete due to widespread browser support for ESM
|
|
64
32
|
|
|
65
|
-
|
|
33
|
+
Also:
|
|
34
|
+
- normalize/restructure/reorg all package.json files
|
|
35
|
+
- cleanup all build scripts, remove obsolete
|
|
36
|
+
- switch from mocha to @thi.ng/testament for all tests
|
|
66
37
|
|
|
67
38
|
|
|
68
|
-
### Features
|
|
69
39
|
|
|
70
|
-
* **dl-asset:** yet another npm forced pkg rename ([2cae33c](https://github.com/thi-ng/umbrella/commit/2cae33cabd379b3d449079edfc255d9cf56c34a5))
|
|
71
40
|
|
|
72
41
|
|
|
73
42
|
|
|
43
|
+
## [1.0.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/dl-asset@1.0.4...@thi.ng/dl-asset@1.0.5) (2021-09-03)
|
|
74
44
|
|
|
45
|
+
**Note:** Version bump only for package @thi.ng/dl-asset
|
|
75
46
|
|
|
76
|
-
#
|
|
47
|
+
# [0.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/dl-asset@0.3.14...@thi.ng/dl-asset@0.4.0) (2020-07-08)
|
|
77
48
|
|
|
49
|
+
### Features
|
|
78
50
|
|
|
79
|
-
|
|
51
|
+
- **dl-asset:** split src, extract `downloadWithMime()` ([d749819](https://github.com/thi-ng/umbrella/commit/d74981963ce4bfbfe3465c71085995173826329c))
|
|
80
52
|
|
|
81
|
-
|
|
53
|
+
# 0.3.0 (2020-02-26)
|
|
82
54
|
|
|
55
|
+
### Features
|
|
83
56
|
|
|
57
|
+
- **dl-asset:** yet another npm forced pkg rename ([2cae33c](https://github.com/thi-ng/umbrella/commit/2cae33cabd379b3d449079edfc255d9cf56c34a5))
|
|
84
58
|
|
|
59
|
+
# 0.2.0 (2020-02-26)
|
|
85
60
|
|
|
61
|
+
### Features
|
|
86
62
|
|
|
87
|
-
|
|
63
|
+
- **download-asset:** rename pkg due to npm name conflict ([b490b46](https://github.com/thi-ng/umbrella/commit/b490b46994333103f653514c96531637d903202d))
|
|
88
64
|
|
|
65
|
+
# 0.1.0 (2020-02-25)
|
|
89
66
|
|
|
90
|
-
###
|
|
67
|
+
### Features
|
|
91
68
|
|
|
92
|
-
|
|
69
|
+
- **download:** import as new pkg ([26caaaa](https://github.com/thi-ng/umbrella/commit/26caaaadf6c3f7b6bb83e8a4160a91b7e2db8714))
|
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ This project is part of the
|
|
|
11
11
|
|
|
12
12
|
- [About](#about)
|
|
13
13
|
- [Status](#status)
|
|
14
|
+
- [Related packages](#related-packages)
|
|
14
15
|
- [Installation](#installation)
|
|
15
16
|
- [Dependencies](#dependencies)
|
|
16
17
|
- [Usage examples](#usage-examples)
|
|
@@ -28,21 +29,34 @@ Local asset download for web apps, with automatic MIME type detection.
|
|
|
28
29
|
|
|
29
30
|
[Search or submit any issues for this package](https://github.com/thi-ng/umbrella/issues?q=%5Bdl-asset%5D+in%3Atitle)
|
|
30
31
|
|
|
32
|
+
### Related packages
|
|
33
|
+
|
|
34
|
+
- [@thi.ng/mime](https://github.com/thi-ng/umbrella/tree/develop/packages/mime) - 650+ file extension to MIME type mappings, based on mime-db
|
|
35
|
+
|
|
31
36
|
## Installation
|
|
32
37
|
|
|
33
38
|
```bash
|
|
34
39
|
yarn add @thi.ng/dl-asset
|
|
35
40
|
```
|
|
36
41
|
|
|
42
|
+
ES module import:
|
|
43
|
+
|
|
37
44
|
```html
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
<script type="module" src="https://cdn.skypack.dev/@thi.ng/dl-asset"></script>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
[Skypack documentation](https://docs.skypack.dev/)
|
|
49
|
+
|
|
50
|
+
For Node.js REPL:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
# with flag only for < v16
|
|
54
|
+
node --experimental-repl-await
|
|
40
55
|
|
|
41
|
-
|
|
42
|
-
<script src="https://unpkg.com/@thi.ng/dl-asset/lib/index.umd.js" crossorigin></script>
|
|
56
|
+
> const dlAsset = await import("@thi.ng/dl-asset");
|
|
43
57
|
```
|
|
44
58
|
|
|
45
|
-
Package sizes (gzipped, pre-treeshake): ESM:
|
|
59
|
+
Package sizes (gzipped, pre-treeshake): ESM: 427 bytes
|
|
46
60
|
|
|
47
61
|
## Dependencies
|
|
48
62
|
|
|
@@ -59,9 +73,11 @@ directory are using this package.
|
|
|
59
73
|
A selection:
|
|
60
74
|
|
|
61
75
|
| Screenshot | Description | Live demo | Source |
|
|
62
|
-
|
|
76
|
+
|:-------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------|:---------------------------------------------------------|:--------------------------------------------------------------------------------------|
|
|
77
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/color-themes.png" width="240"/> | Probabilistic color theme generator | [Demo](https://demo.thi.ng/umbrella/color-themes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/color-themes) |
|
|
63
78
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/dominant-colors.png" width="240"/> | Color palette generation via dominant color extraction from uploaded images | [Demo](https://demo.thi.ng/umbrella/dominant-colors/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/dominant-colors) |
|
|
64
79
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/hdom-canvas/hdom-canvas-shapes-results.png" width="240"/> | Various hdom-canvas shape drawing examples & SVG conversion / export | [Demo](https://demo.thi.ng/umbrella/hdom-canvas-shapes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hdom-canvas-shapes) |
|
|
80
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/mandelbrot.jpg" width="240"/> | Worker based, interactive Mandelbrot visualization | [Demo](https://demo.thi.ng/umbrella/mandelbrot/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/mandelbrot) |
|
|
65
81
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/parse-playground.png" width="240"/> | Parser grammar livecoding editor/playground & codegen | [Demo](https://demo.thi.ng/umbrella/parse-playground/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/parse-playground) |
|
|
66
82
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rotating-voronoi.jpg" width="240"/> | Animated Voronoi diagram, cubic splines & SVG download | [Demo](https://demo.thi.ng/umbrella/rotating-voronoi/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rotating-voronoi) |
|
|
67
83
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rstream-grid.jpg" width="240"/> | Interactive grid generator, SVG generation & export, undo/redo support | [Demo](https://demo.thi.ng/umbrella/rstream-grid/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rstream-grid) |
|
package/download.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TypedArray } from "@thi.ng/api";
|
|
2
|
-
import type { DownloadOpts } from "./api";
|
|
2
|
+
import type { DownloadOpts } from "./api.js";
|
|
3
3
|
/**
|
|
4
4
|
* Similar to (and wrapping) {@link downloadWithMime} with additional
|
|
5
5
|
* automatic MIME type detection. If no MIME type is given, attempts to
|
package/download.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { preferredType } from "@thi.ng/mime";
|
|
2
|
-
import { downloadWithMime } from "./raw";
|
|
2
|
+
import { downloadWithMime } from "./raw.js";
|
|
3
3
|
/**
|
|
4
4
|
* Similar to (and wrapping) {@link downloadWithMime} with additional
|
|
5
5
|
* automatic MIME type detection. If no MIME type is given, attempts to
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./api";
|
|
2
|
-
export * from "./download";
|
|
3
|
-
export * from "./raw";
|
|
1
|
+
export * from "./api.js";
|
|
2
|
+
export * from "./download.js";
|
|
3
|
+
export * from "./raw.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./api";
|
|
2
|
-
export * from "./download";
|
|
3
|
-
export * from "./raw";
|
|
1
|
+
export * from "./api.js";
|
|
2
|
+
export * from "./download.js";
|
|
3
|
+
export * from "./raw.js";
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/dl-asset",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Local asset download for web apps, with automatic MIME type detection",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"module": "./index.js",
|
|
6
|
-
"main": "./lib/index.js",
|
|
7
|
-
"umd:main": "./lib/index.umd.js",
|
|
8
7
|
"typings": "./index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/thi-ng/umbrella.git"
|
|
@@ -24,29 +24,23 @@
|
|
|
24
24
|
"author": "Karsten Schmidt <k+npm@thi.ng>",
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "yarn clean &&
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"build:test": "rimraf build && tsc -p test/tsconfig.json",
|
|
31
|
-
"build:check": "tsc --isolatedModules --noEmit",
|
|
32
|
-
"test": "mocha test",
|
|
33
|
-
"cover": "nyc mocha test && nyc report --reporter=lcov",
|
|
34
|
-
"clean": "rimraf *.js *.d.ts *.map .nyc_output build coverage doc lib",
|
|
35
|
-
"doc:readme": "ts-node -P ../../tools/tsconfig.json ../../tools/src/readme.ts",
|
|
27
|
+
"build": "yarn clean && tsc --declaration",
|
|
28
|
+
"clean": "rimraf *.js *.d.ts *.map doc",
|
|
29
|
+
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
36
30
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
|
|
37
|
-
"doc": "
|
|
38
|
-
"
|
|
31
|
+
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
|
|
32
|
+
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
|
|
33
|
+
"pub": "yarn build && yarn publish --access public",
|
|
34
|
+
"test": "testament test"
|
|
39
35
|
},
|
|
40
36
|
"dependencies": {
|
|
41
|
-
"@thi.ng/api": "^
|
|
42
|
-
"@thi.ng/checks": "^
|
|
43
|
-
"@thi.ng/mime": "^
|
|
37
|
+
"@thi.ng/api": "^8.0.1",
|
|
38
|
+
"@thi.ng/checks": "^3.0.1",
|
|
39
|
+
"@thi.ng/mime": "^2.0.1"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@thi.ng/testament": "^0.1.1"
|
|
44
43
|
},
|
|
45
|
-
"files": [
|
|
46
|
-
"*.js",
|
|
47
|
-
"*.d.ts",
|
|
48
|
-
"lib"
|
|
49
|
-
],
|
|
50
44
|
"keywords": [
|
|
51
45
|
"browser",
|
|
52
46
|
"canvas",
|
|
@@ -56,9 +50,32 @@
|
|
|
56
50
|
"publishConfig": {
|
|
57
51
|
"access": "public"
|
|
58
52
|
},
|
|
59
|
-
"
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=12.7"
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"*.js",
|
|
58
|
+
"*.d.ts"
|
|
59
|
+
],
|
|
60
|
+
"exports": {
|
|
61
|
+
".": {
|
|
62
|
+
"import": "./index.js"
|
|
63
|
+
},
|
|
64
|
+
"./api": {
|
|
65
|
+
"import": "./api.js"
|
|
66
|
+
},
|
|
67
|
+
"./download": {
|
|
68
|
+
"import": "./download.js"
|
|
69
|
+
},
|
|
70
|
+
"./raw": {
|
|
71
|
+
"import": "./raw.js"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
60
74
|
"thi.ng": {
|
|
75
|
+
"related": [
|
|
76
|
+
"mime"
|
|
77
|
+
],
|
|
61
78
|
"year": 2020
|
|
62
79
|
},
|
|
63
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "2e6b3d7c0f4c5686c1e9bdb4902ed7d3f90bcc19"
|
|
64
81
|
}
|
package/raw.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TypedArray } from "@thi.ng/api";
|
|
2
|
-
import type { DownloadOpts } from "./api";
|
|
2
|
+
import type { DownloadOpts } from "./api.js";
|
|
3
3
|
/**
|
|
4
4
|
* Triggers download of given `src` blob (or typed array or string) as
|
|
5
5
|
* local file with filename `name`. MIME type option MUST be given.
|
package/raw.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isString } from "@thi.ng/checks";
|
|
1
|
+
import { isString } from "@thi.ng/checks/is-string";
|
|
2
2
|
/**
|
|
3
3
|
* Triggers download of given `src` blob (or typed array or string) as
|
|
4
4
|
* local file with filename `name`. MIME type option MUST be given.
|
|
@@ -22,7 +22,11 @@ import { isString } from "@thi.ng/checks";
|
|
|
22
22
|
* @param opts
|
|
23
23
|
*/
|
|
24
24
|
export const downloadWithMime = (name, src, opts) => {
|
|
25
|
-
const _opts =
|
|
25
|
+
const _opts = {
|
|
26
|
+
expire: 1e4,
|
|
27
|
+
utf8: false,
|
|
28
|
+
...opts,
|
|
29
|
+
};
|
|
26
30
|
if (isString(src) && _opts.utf8) {
|
|
27
31
|
src = new TextEncoder().encode(src);
|
|
28
32
|
_opts.mime += ";charset=UTF-8";
|
package/lib/index.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var mime = require('@thi.ng/mime');
|
|
6
|
-
var checks = require('@thi.ng/checks');
|
|
7
|
-
|
|
8
|
-
const downloadWithMime = (name, src, opts) => {
|
|
9
|
-
const _opts = Object.assign({ expire: 1e4, utf8: false }, opts);
|
|
10
|
-
if (checks.isString(src) && _opts.utf8) {
|
|
11
|
-
src = new TextEncoder().encode(src);
|
|
12
|
-
_opts.mime += ";charset=UTF-8";
|
|
13
|
-
}
|
|
14
|
-
const uri = URL.createObjectURL(!(src instanceof Blob) ? new Blob([src], { type: _opts.mime }) : src);
|
|
15
|
-
const link = document.createElement("a");
|
|
16
|
-
link.setAttribute("download", name);
|
|
17
|
-
link.setAttribute("href", uri);
|
|
18
|
-
document.body.appendChild(link);
|
|
19
|
-
link.click();
|
|
20
|
-
document.body.removeChild(link);
|
|
21
|
-
if (_opts.expire > 0) {
|
|
22
|
-
setTimeout(() => URL.revokeObjectURL(uri), _opts.expire);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const download = (name, src, opts = {}) => {
|
|
27
|
-
if (opts.mime === undefined) {
|
|
28
|
-
const match = /\.(\w+)$/.exec(name);
|
|
29
|
-
opts.mime = mime.preferredType(match ? match[1] : "bin");
|
|
30
|
-
}
|
|
31
|
-
return downloadWithMime(name, src, opts);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
exports.download = download;
|
|
35
|
-
exports.downloadWithMime = downloadWithMime;
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../raw.js","../download.js"],"sourcesContent":null,"names":["isString","preferredType"],"mappings":";;;;;;;AAuBY,MAAC,gBAAgB,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,KAAK;AACrD,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC;AACpE,IAAI,IAAIA,eAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE;AACrC,QAAQ,GAAG,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC5C,QAAQ,KAAK,CAAC,IAAI,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umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@thi.ng/mime"),require("@thi.ng/checks")):"function"==typeof define&&define.amd?define(["exports","@thi.ng/mime","@thi.ng/checks"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).thi=e.thi||{},e.thi.ng=e.thi.ng||{},e.thi.ng.dlAsset={}),e.thi.ng.mime,e.thi.ng.checks)}(this,(function(e,t,i){"use strict";const n=(e,t,n)=>{const o=Object.assign({expire:1e4,utf8:!1},n);i.isString(t)&&o.utf8&&(t=(new TextEncoder).encode(t),o.mime+=";charset=UTF-8");const c=URL.createObjectURL(t instanceof Blob?t:new Blob([t],{type:o.mime})),d=document.createElement("a");d.setAttribute("download",e),d.setAttribute("href",c),document.body.appendChild(d),d.click(),document.body.removeChild(d),o.expire>0&&setTimeout((()=>URL.revokeObjectURL(c)),o.expire)};e.download=(e,i,o={})=>{if(void 0===o.mime){const i=/\.(\w+)$/.exec(e);o.mime=t.preferredType(i?i[1]:"bin")}return n(e,i,o)},e.downloadWithMime=n,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/index.umd.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../raw.js","../download.js"],"sourcesContent":null,"names":["isString","preferredType"],"mappings":";;;;;;AAuBY,UAAC,gBAAgB,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,KAAK;IACrD,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC;IACpE,IAAI,IAAIA,eAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE;IACrC,QAAQ,GAAG,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC5C,QAAQ,KA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