@kubohiroya/turbowarp-asset-cache 0.3.2 → 0.5.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.ja.md +7 -4
- package/README.md +7 -4
- package/assets/block-icon.svg +1 -0
- package/dist/asset-cache.js +4198 -4140
- package/dist/composition.js +101 -29
- package/dist/types/config.d.ts +17 -0
- package/dist/types/extension.d.ts +9 -9
- package/docs/audio-playback.md +1 -1
- package/package.json +9 -8
package/README.ja.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# TurboWarp-Asset-Cache
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="assets/block-icon.svg" alt="" width="48" height="48">
|
|
4
|
+
|
|
5
|
+
[English](README.md) | 日本語
|
|
4
6
|
|
|
5
7
|
TurboWarpのプロジェクト向けに、画像・音声・実行時テキストをブラウザ内へ保持するasset cacheです。
|
|
6
8
|
composition hostには、OPFSを明示的に選べるhybridなbinary backingを提供します。外部ファイル、
|
|
@@ -53,7 +55,7 @@ Animated Text(`text`)が必要です。
|
|
|
53
55
|
SVG入力は既定で拒否します。remote binaryのcache entryは、保存前にサイズ・content-type・SHA-256を
|
|
54
56
|
検証します。IndexedDBは機密の境界ではなく補助的なcacheとして扱います。
|
|
55
57
|
|
|
56
|
-
メンテナはNode.js
|
|
58
|
+
メンテナはNode.js 24以降と、Corepack経由のpnpmを使います。インストール例とCDN URLのsource of truthは
|
|
57
59
|
`package.json`のversionです。
|
|
58
60
|
|
|
59
61
|
## セキュリティダイアログの説明言語
|
|
@@ -73,14 +75,14 @@ SVG入力は既定で拒否します。remote binaryのcache entryは、保存
|
|
|
73
75
|
versionを付けたnpm packageにも、同じレビュー済みビルドが入っています。
|
|
74
76
|
|
|
75
77
|
```bash
|
|
76
|
-
pnpm add --save-exact @kubohiroya/turbowarp-asset-cache@0.
|
|
78
|
+
pnpm add --save-exact @kubohiroya/turbowarp-asset-cache@0.5.0
|
|
77
79
|
```
|
|
78
80
|
|
|
79
81
|
`node_modules/@kubohiroya/turbowarp-asset-cache/dist/asset-cache.js`を読み込むか、version固定の
|
|
80
82
|
CDN URLを使います。
|
|
81
83
|
|
|
82
84
|
```text
|
|
83
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.
|
|
85
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.5.0/dist/asset-cache.js
|
|
84
86
|
```
|
|
85
87
|
|
|
86
88
|
## クイックスタート
|
|
@@ -119,6 +121,7 @@ assets.releaseAll();
|
|
|
119
121
|
## 開発
|
|
120
122
|
|
|
121
123
|
```bash
|
|
124
|
+
npm install --global corepack@latest
|
|
122
125
|
corepack enable
|
|
123
126
|
pnpm install --frozen-lockfile
|
|
124
127
|
pnpm run check
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# TurboWarp-Asset-Cache
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="assets/block-icon.svg" alt="" width="48" height="48">
|
|
4
|
+
|
|
5
|
+
English | [日本語](README.ja.md)
|
|
4
6
|
|
|
5
7
|
A browser-local image, audio, and runtime-text asset cache for TurboWarp projects, with an explicit OPFS hybrid binary backing for composition hosts. It registers external files, project-local costumes/backdrops/sounds, and Temporary Variables text references for use from TurboWarp blocks or composition hosts.
|
|
6
8
|
|
|
@@ -39,7 +41,7 @@ Standalone use requires TurboWarp Desktop or another TurboWarp environment that
|
|
|
39
41
|
|
|
40
42
|
SVG input is reject-by-default, remote binary cache entries are size/content-type/SHA-256 verified before storage, and IndexedDB is treated as an auxiliary cache rather than a secrecy boundary.
|
|
41
43
|
|
|
42
|
-
Maintainers use Node.js
|
|
44
|
+
Maintainers use Node.js 24 or later with pnpm through Corepack. The package version in `package.json` is the source of truth for install examples and CDN URLs.
|
|
43
45
|
|
|
44
46
|
## Security dialog description language
|
|
45
47
|
|
|
@@ -56,13 +58,13 @@ The built JavaScript file is committed to this repository so users do not need t
|
|
|
56
58
|
The versioned npm package contains the same reviewed build:
|
|
57
59
|
|
|
58
60
|
```bash
|
|
59
|
-
pnpm add --save-exact @kubohiroya/turbowarp-asset-cache@0.
|
|
61
|
+
pnpm add --save-exact @kubohiroya/turbowarp-asset-cache@0.5.0
|
|
60
62
|
```
|
|
61
63
|
|
|
62
64
|
Load `node_modules/@kubohiroya/turbowarp-asset-cache/dist/asset-cache.js`, or use the version-pinned CDN URL:
|
|
63
65
|
|
|
64
66
|
```text
|
|
65
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.
|
|
67
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.5.0/dist/asset-cache.js
|
|
66
68
|
```
|
|
67
69
|
|
|
68
70
|
## Quick Start
|
|
@@ -97,6 +99,7 @@ assets.releaseAll();
|
|
|
97
99
|
## Development
|
|
98
100
|
|
|
99
101
|
```bash
|
|
102
|
+
npm install --global corepack@latest
|
|
100
103
|
corepack enable
|
|
101
104
|
pnpm install --frozen-lockfile
|
|
102
105
|
pnpm run check
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><rect x="4" y="8" width="40" height="32" rx="6" fill="#59C059"/><path d="M14 20h12l3 3h7v12a2 2 0 0 1-2 2H14a2 2 0 0 1-2-2V22a2 2 0 0 1 2-2z" fill="#fff"/><path d="M24 17v8M21 22l3 3 3-3" fill="none" stroke="#59C059" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/></svg>
|