@ranx729/ducktape-assets 1.1.0 → 1.3.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/AGENTS.md +2 -2
- package/README.md +1 -1
- package/catalog.json +1676 -1676
- package/index.json +10 -10
- package/package.json +3 -3
- package/sets/illuminated-acanthus.json +6 -6
- package/sets/medieval-cutouts.json +6 -5
- package/sets/walters-w102.json +10 -6
- package/src/generate.mjs +2 -2
- package/src/resolver.mjs +5 -0
package/index.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
|
-
"generatedAt": "2026-10-
|
|
3
|
+
"generatedAt": "2026-10-27T18:39:58.960Z",
|
|
4
4
|
"sets": {
|
|
5
5
|
"illuminated-acanthus": {
|
|
6
|
-
"version": "2.0.
|
|
6
|
+
"version": "2.0.2",
|
|
7
7
|
"package": "@ranx729/ducktape-assets-illuminated-acanthus",
|
|
8
8
|
"parts": [],
|
|
9
9
|
"mastersPackage": "@ranx729/ducktape-assets-illuminated-acanthus-masters",
|
|
10
10
|
"mastersParts": [],
|
|
11
|
-
"cdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-illuminated-acanthus@2.0.
|
|
12
|
-
"mastersCdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-illuminated-acanthus-masters@2.0.
|
|
11
|
+
"cdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-illuminated-acanthus@2.0.2/",
|
|
12
|
+
"mastersCdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-illuminated-acanthus-masters@2.0.2/",
|
|
13
13
|
"assets": 36,
|
|
14
14
|
"license": {
|
|
15
15
|
"artwork": "CC-BY-4.0"
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"status": "active"
|
|
19
19
|
},
|
|
20
20
|
"medieval-cutouts": {
|
|
21
|
-
"version": "1.0.
|
|
21
|
+
"version": "1.0.2",
|
|
22
22
|
"package": "@ranx729/ducktape-assets-medieval-cutouts",
|
|
23
23
|
"parts": [],
|
|
24
24
|
"mastersPackage": "@ranx729/ducktape-assets-medieval-cutouts-masters",
|
|
25
25
|
"mastersParts": [],
|
|
26
|
-
"cdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-medieval-cutouts@1.0.
|
|
27
|
-
"mastersCdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-medieval-cutouts-masters@1.0.
|
|
26
|
+
"cdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-medieval-cutouts@1.0.2/",
|
|
27
|
+
"mastersCdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-medieval-cutouts-masters@1.0.2/",
|
|
28
28
|
"assets": 41,
|
|
29
29
|
"license": {
|
|
30
30
|
"artwork": "CC-BY-4.0"
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"status": "active"
|
|
34
34
|
},
|
|
35
35
|
"walters-w102": {
|
|
36
|
-
"version": "1.0.
|
|
36
|
+
"version": "1.0.2",
|
|
37
37
|
"package": "@ranx729/ducktape-assets-walters-w102",
|
|
38
38
|
"parts": [],
|
|
39
39
|
"mastersPackage": "@ranx729/ducktape-assets-walters-w102-masters",
|
|
40
40
|
"mastersParts": [],
|
|
41
|
-
"cdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-walters-w102@1.0.
|
|
42
|
-
"mastersCdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-walters-w102-masters@1.0.
|
|
41
|
+
"cdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-walters-w102@1.0.2/",
|
|
42
|
+
"mastersCdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-walters-w102-masters@1.0.2/",
|
|
43
43
|
"assets": 4,
|
|
44
44
|
"license": {
|
|
45
45
|
"artwork": "CC0-1.0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ranx729/ducktape-assets",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Index, catalog and build-time resolver for the Ducktape Assets library. Metadata only, no images.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
},
|
|
45
45
|
"ducktape": {
|
|
46
46
|
"kind": "index",
|
|
47
|
-
"inputsHash": "sha256:
|
|
48
|
-
"contentHash": "sha256:
|
|
47
|
+
"inputsHash": "sha256:58ed2f623a8983619c1c3375ab2efec42c240d6df3df9fa3df00aea1e47cdfd2",
|
|
48
|
+
"contentHash": "sha256:f1146522ee375be2f6b1edb0ff39f7aaa96325769f70ddcd74d2316e7c0c9011",
|
|
49
49
|
"schema": 1
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -8173,11 +8173,11 @@
|
|
|
8173
8173
|
"width": 1024
|
|
8174
8174
|
}
|
|
8175
8175
|
},
|
|
8176
|
-
"attribution": "adrian729
|
|
8177
|
-
"builtAt": "2026-10-
|
|
8178
|
-
"cdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-illuminated-acanthus@2.0.
|
|
8176
|
+
"attribution": "adrian729",
|
|
8177
|
+
"builtAt": "2026-10-27T18:30:05.646Z",
|
|
8178
|
+
"cdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-illuminated-acanthus@2.0.2/",
|
|
8179
8179
|
"contentHash": "sha256:a7a943d0ee38ad8981251f4e6b723f69a5638417b682595a863563941510a81c",
|
|
8180
|
-
"inputsHash": "sha256:
|
|
8180
|
+
"inputsHash": "sha256:27157d8c1d091ef9fe9e84e9222088d855fa4c99f5cc178b405cfdc65660e56e",
|
|
8181
8181
|
"kind": "authored",
|
|
8182
8182
|
"license": {
|
|
8183
8183
|
"artwork": "CC-BY-4.0",
|
|
@@ -8196,7 +8196,7 @@
|
|
|
8196
8196
|
"concurrency": 1,
|
|
8197
8197
|
"libvips": "8.18.7",
|
|
8198
8198
|
"sharp": "0.35.5",
|
|
8199
|
-
"tools": "0.
|
|
8199
|
+
"tools": "0.2.0"
|
|
8200
8200
|
},
|
|
8201
|
-
"version": "2.0.
|
|
8201
|
+
"version": "2.0.2"
|
|
8202
8202
|
}
|
|
@@ -8464,10 +8464,11 @@
|
|
|
8464
8464
|
"width": 1360
|
|
8465
8465
|
}
|
|
8466
8466
|
},
|
|
8467
|
-
"
|
|
8468
|
-
"
|
|
8467
|
+
"attribution": "adrian729",
|
|
8468
|
+
"builtAt": "2026-10-27T18:34:01.083Z",
|
|
8469
|
+
"cdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-medieval-cutouts@1.0.2/",
|
|
8469
8470
|
"contentHash": "sha256:3a32da2486e69bf5ce5152ce0105f383428d78c74ff75a96f82b7fdbdb13e4f2",
|
|
8470
|
-
"inputsHash": "sha256:
|
|
8471
|
+
"inputsHash": "sha256:b2eb0a10d371af02d2ee07aac1f3d7c845cf45d55124eb01718535cb3607201f",
|
|
8471
8472
|
"kind": "imported",
|
|
8472
8473
|
"license": {
|
|
8473
8474
|
"artwork": "CC-BY-4.0",
|
|
@@ -8486,7 +8487,7 @@
|
|
|
8486
8487
|
"concurrency": 1,
|
|
8487
8488
|
"libvips": "8.18.7",
|
|
8488
8489
|
"sharp": "0.35.5",
|
|
8489
|
-
"tools": "0.
|
|
8490
|
+
"tools": "0.2.0"
|
|
8490
8491
|
},
|
|
8491
|
-
"version": "1.0.
|
|
8492
|
+
"version": "1.0.2"
|
|
8492
8493
|
}
|
package/sets/walters-w102.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"assets": {
|
|
3
3
|
"centaur-archer": {
|
|
4
|
+
"attribution": "Walters Art Museum W.102, fol. 82v",
|
|
4
5
|
"categories": [
|
|
5
6
|
"hybrids",
|
|
6
7
|
"fantasy",
|
|
@@ -195,6 +196,7 @@
|
|
|
195
196
|
"width": 720
|
|
196
197
|
},
|
|
197
198
|
"elephant-castle": {
|
|
199
|
+
"attribution": "Walters Art Museum W.102, fol. 28r",
|
|
198
200
|
"categories": [
|
|
199
201
|
"animals",
|
|
200
202
|
"humans",
|
|
@@ -364,6 +366,7 @@
|
|
|
364
366
|
"width": 270
|
|
365
367
|
},
|
|
366
368
|
"horse-flute-drum": {
|
|
369
|
+
"attribution": "Walters Art Museum W.102, fol. 74v",
|
|
367
370
|
"categories": [
|
|
368
371
|
"animals",
|
|
369
372
|
"music",
|
|
@@ -518,6 +521,7 @@
|
|
|
518
521
|
"width": 236
|
|
519
522
|
},
|
|
520
523
|
"rabbit-church-bells": {
|
|
524
|
+
"attribution": "Walters Art Museum W.102, fol. 81r",
|
|
521
525
|
"categories": [
|
|
522
526
|
"animals",
|
|
523
527
|
"music",
|
|
@@ -730,11 +734,11 @@
|
|
|
730
734
|
"width": 823
|
|
731
735
|
}
|
|
732
736
|
},
|
|
733
|
-
"attribution": "Walters Art Museum W.102
|
|
734
|
-
"builtAt": "2026-10-
|
|
735
|
-
"cdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-walters-w102@1.0.
|
|
737
|
+
"attribution": "Walters Art Museum W.102",
|
|
738
|
+
"builtAt": "2026-10-27T18:38:16.005Z",
|
|
739
|
+
"cdn": "https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-walters-w102@1.0.2/",
|
|
736
740
|
"contentHash": "sha256:af3a33a4e36be1b741107aef88b7abcd613fb23e5d951f334e97f1c8176b8947",
|
|
737
|
-
"inputsHash": "sha256:
|
|
741
|
+
"inputsHash": "sha256:6a5c69cc4fa64c07754faefdf125f54bb9730d226ba767e6457c220575877109",
|
|
738
742
|
"kind": "historical",
|
|
739
743
|
"license": {
|
|
740
744
|
"artwork": "CC0-1.0",
|
|
@@ -753,7 +757,7 @@
|
|
|
753
757
|
"concurrency": 1,
|
|
754
758
|
"libvips": "8.18.7",
|
|
755
759
|
"sharp": "0.35.5",
|
|
756
|
-
"tools": "0.
|
|
760
|
+
"tools": "0.2.0"
|
|
757
761
|
},
|
|
758
|
-
"version": "1.0.
|
|
762
|
+
"version": "1.0.2"
|
|
759
763
|
}
|
package/src/generate.mjs
CHANGED
|
@@ -91,7 +91,7 @@ function table(list) {
|
|
|
91
91
|
|
|
92
92
|
const FLOWS = `1. **Paste a URL.** Any HTML, CSS or Markdown references one file on jsDelivr, for example \`https://cdn.jsdelivr.net/npm/@ranx729/ducktape-assets-walters-w102@1.2.0/webp/rabbit-church-bells-512.webp\`. Only that file is transferred. \`catalog.json\` lists the exact URL of every width and format, so nothing has to be guessed.
|
|
93
93
|
2. **Pick and copy.** Keep a small \`ducktape.json\` listing the asset ids you want, with optional widths, formats and \`masters: true\`. \`npx @ranx729/ducktape-assets copy\` fetches exactly those files into the project (default \`src/assets/ducktape/\`), verifies every SHA-256 against the manifest, and writes \`ducktape.manifest.json\` beside them with type, dimensions (native and of the capped master), transparency, render geometry (tile axis, frame slice), thumbhash, licence and attribution per asset. \`masters: true\` alone copies only the lossless master (for apps that encode their own images); add \`formats\`, \`widths\` or \`max\` to copy ladder files as well. Re-running is idempotent.
|
|
94
|
-
3. **Resolve in code.** \`npm i @ranx729/ducktape-assets\` installs metadata and a resolver, zero images. \`assets.image(id, { width })\` returns \`src\`, \`srcset\`, \`sizes\`, width, height, thumbhash, licence, \`
|
|
94
|
+
3. **Resolve in code.** \`npm i @ranx729/ducktape-assets\` installs metadata and a resolver, zero images. \`assets.image(id, { width })\` returns \`src\`, \`srcset\`, \`sizes\`, width, height, thumbhash, \`license\`, \`attribution\` (the bare credit, licence kept separate), \`set\` / \`package\` / \`version\` (where the bytes come from), and \`file\` / \`files\` (path, bytes and sha256 of every referenced rung, for scripts that record or verify what they use). Bytes come from the CDN at request time, or from flow 2 when \`base\` points at the copied directory.
|
|
95
95
|
|
|
96
96
|
Build-time recipe in Node, offline, no network:
|
|
97
97
|
|
|
@@ -174,7 +174,7 @@ ${URLS}
|
|
|
174
174
|
|
|
175
175
|
## Rules
|
|
176
176
|
|
|
177
|
-
- Honour the licence block: show the \`attribution\`
|
|
177
|
+
- Honour the licence block: show the \`attribution\` credit together with \`license\` (SPDX id) when the licence requires it; \`attribution\` is the institution and object for historical sets, or the author for authored and imported ones, and never contains the licence.
|
|
178
178
|
- Never use \`@latest\` or range URLs; always an exact version from \`index.json\` or \`catalog.json\`.
|
|
179
179
|
- Never put a master on a page. Masters are for re-encoding in a build.
|
|
180
180
|
- Images are decorative by default (\`alt=""\`); use \`description\` when the image carries meaning.
|
package/src/resolver.mjs
CHANGED
|
@@ -115,6 +115,11 @@ export function createResolver({ index, base, formats = ['avif', 'webp'], pin =
|
|
|
115
115
|
}
|
|
116
116
|
if (!fallback) throw new Error(`${id}: none of the formats ${formats.join(', ')} is available`);
|
|
117
117
|
const out = {
|
|
118
|
+
// Where the bytes come from, for scripts that record what they used: the set, its first package and the version
|
|
119
|
+
// the URLs point at (a pin overrides the index). Files in a volume part carry their own `package`.
|
|
120
|
+
set: setId,
|
|
121
|
+
package: entry.package,
|
|
122
|
+
version: pin[setId] ?? entry.version,
|
|
118
123
|
src: urlOf(entry, fallback.src, setId),
|
|
119
124
|
srcset: sources[sources.length - 1].srcset,
|
|
120
125
|
sources,
|