@kubohiroya/turbowarp-asset-cache 0.2.1 → 0.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/README.md +9 -2
- package/dist/asset-cache.js +911 -148
- package/dist/composition.js +934 -148
- package/dist/types/audio-output.d.ts +5 -0
- package/dist/types/audio-playback.d.ts +46 -0
- package/dist/types/composition.d.ts +3 -0
- package/dist/types/extension.d.ts +7 -0
- package/dist/types/fixed-input-editors.d.ts +10 -0
- package/dist/types/fixed-input-schema.d.ts +46 -0
- package/docs/audio-playback.md +49 -0
- package/docs/fixed-input-editors.ja.md +20 -0
- package/package.json +10 -6
- package/schemas/block-editor-fixed-inputs.schema.json +24 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type AssetManagerAudioSource = Readonly<{
|
|
2
|
+
asset: unknown;
|
|
3
|
+
url?: never;
|
|
4
|
+
}> | Readonly<{
|
|
5
|
+
url: string;
|
|
6
|
+
asset?: never;
|
|
7
|
+
}>;
|
|
8
|
+
export interface AssetManagerAudioFadeOptions {
|
|
9
|
+
readonly fadeIn?: number;
|
|
10
|
+
readonly fadeOut?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface AssetManagerAudioStopOptions {
|
|
13
|
+
readonly fadeOut?: number;
|
|
14
|
+
readonly signal?: AbortSignal;
|
|
15
|
+
}
|
|
16
|
+
export interface AssetManagerAudioPlaybackOptions extends AssetManagerAudioFadeOptions {
|
|
17
|
+
readonly gain?: number;
|
|
18
|
+
readonly muted?: boolean;
|
|
19
|
+
readonly playbackRate?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface AssetManagerAudioPlayOptions extends AssetManagerAudioFadeOptions {
|
|
22
|
+
readonly gain?: number;
|
|
23
|
+
readonly restart?: boolean;
|
|
24
|
+
readonly loop?: boolean;
|
|
25
|
+
readonly signal?: AbortSignal;
|
|
26
|
+
}
|
|
27
|
+
export interface AssetManagerAudioPlayback {
|
|
28
|
+
readonly ended: Promise<void>;
|
|
29
|
+
readonly currentTime: number;
|
|
30
|
+
readonly paused: boolean;
|
|
31
|
+
readonly loop: boolean;
|
|
32
|
+
readonly gain: number;
|
|
33
|
+
readonly muted: boolean;
|
|
34
|
+
readonly playbackRate: number;
|
|
35
|
+
play(options?: AssetManagerAudioPlayOptions): Promise<void>;
|
|
36
|
+
pause(): void;
|
|
37
|
+
stop(options?: AssetManagerAudioStopOptions): void | Promise<void>;
|
|
38
|
+
seek(seconds: number, signal?: AbortSignal): Promise<void>;
|
|
39
|
+
setGain(value: number): void | Promise<void>;
|
|
40
|
+
setMuted(value: boolean): void;
|
|
41
|
+
setPlaybackRate(value: number): void;
|
|
42
|
+
dispose(): void;
|
|
43
|
+
}
|
|
44
|
+
export declare function validateAudioPlaybackOptions(options: AssetManagerAudioPlaybackOptions): void;
|
|
45
|
+
/** One reusable native element; the caller owns source resolution and resource release. */
|
|
46
|
+
export declare function createBrowserAudioPlayback(audio: HTMLAudioElement, options: AssetManagerAudioPlaybackOptions, release: () => void, playbackError: (cause: unknown) => Error): AssetManagerAudioPlayback;
|
|
@@ -7,6 +7,8 @@ import { type NamedAssetBodyProvider } from './named-body-provider.js';
|
|
|
7
7
|
export { type AssetManagerAudioVoice, type AssetManagerAudioVoiceOptions } from './audio-voice.js';
|
|
8
8
|
import { type AssetManagerAudioVoice, type AssetManagerAudioVoiceOptions } from './audio-voice.js';
|
|
9
9
|
export { type DOMImageResource } from './dom-image-resource.js';
|
|
10
|
+
export type { AssetManagerAudioSource, AssetManagerAudioPlayback, AssetManagerAudioPlaybackOptions, AssetManagerAudioPlayOptions, AssetManagerAudioFadeOptions, AssetManagerAudioStopOptions } from './audio-playback.js';
|
|
11
|
+
import type { AssetManagerAudioSource, AssetManagerAudioPlayback, AssetManagerAudioPlaybackOptions } from './audio-playback.js';
|
|
10
12
|
export { NAMED_ASSET_BODY_NAMESPACE, NamedAssetBodyError, type NamedAssetBodyErrorCode, type NamedAssetBodyMetadata, type NamedAssetBodyOpenOptions, type NamedAssetBodyProvider, type NamedAssetBodyReference, type NamedAssetBodySnapshot } from './named-body-provider.js';
|
|
11
13
|
export { createBinaryBundleStore, type BinaryBundleBackendStatus, type BinaryBundleBackendWarning, type BinaryBundleFileInput, type BinaryBundleFileRegistration, type BinaryBundleFileResult, type BinaryBundleKeyInput, type BinaryBundleOperationOptions, type BinaryBundlePruneResult, type BinaryBundlePutInput, type BinaryBundleRegistration, type BinaryBundleResult, type BinaryBundleStore, type BinaryBundleStoreStats, type BinaryBundleStoreOptions } from './binary-bundle-store.js';
|
|
12
14
|
export { createIndexedDBBinaryObjectStore, createOpfsBinaryObjectStore, type BinaryObjectDescriptor, type BinaryObjectOperationOptions, type BinaryObjectResult, type BinaryObjectStore, type BinaryObjectStoreStats, type BinaryObjectStatsOptions, type BinaryStorageBackendPolicy, type IndexedDBBinaryObjectStoreOptions, type OpfsBinaryObjectStoreOptions, type OpfsStorageManager } from './binary-object-store.js';
|
|
@@ -87,6 +89,7 @@ export interface AssetManagerComposition {
|
|
|
87
89
|
untilDone?: boolean;
|
|
88
90
|
}>): Promise<void>;
|
|
89
91
|
createAudioVoice(name: unknown, options?: AssetManagerAudioVoiceOptions): Promise<AssetManagerAudioVoice>;
|
|
92
|
+
createAudioPlayback(source: AssetManagerAudioSource, options?: AssetManagerAudioPlaybackOptions): Promise<AssetManagerAudioPlayback>;
|
|
90
93
|
stopSound(name: unknown): void;
|
|
91
94
|
stopAllSounds(): void;
|
|
92
95
|
resolveVerifiedRemoteBinary(input: VerifiedRemoteBinaryInput, options: VerifiedRemoteBinaryResolveOptions): Promise<VerifiedRemoteBinaryResult>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AssetManagerAudioSource, type AssetManagerAudioPlayback, type AssetManagerAudioPlaybackOptions } from './audio-playback.js';
|
|
1
2
|
import { AssetManagerError } from './asset-cache-error.js';
|
|
2
3
|
import { type AssetManagerFeatureFlags } from './feature-flags.js';
|
|
3
4
|
import { type DOMImageResource } from './dom-image-resource.js';
|
|
@@ -91,6 +92,7 @@ export declare class AssetManagerExtension {
|
|
|
91
92
|
private readonly textAssets;
|
|
92
93
|
private readonly assetRegistry;
|
|
93
94
|
private readonly displayedAssets;
|
|
95
|
+
private readonly explicitAudio;
|
|
94
96
|
private readonly playingAudio;
|
|
95
97
|
private readonly audioVoiceStops;
|
|
96
98
|
private readonly registrationVersions;
|
|
@@ -121,6 +123,7 @@ export declare class AssetManagerExtension {
|
|
|
121
123
|
private readonly releaseDOMImageResourcesForRuntimeDispose;
|
|
122
124
|
private readonly releaseNamedBodySnapshotsForLifecycle;
|
|
123
125
|
private readonly unregisterNamedBodyProviderForRuntimeDispose;
|
|
126
|
+
private readonly fixedEditors;
|
|
124
127
|
constructor(featureFlags?: AssetManagerFeatureFlags);
|
|
125
128
|
setLoadingBackdrop(args: BlockArgs): void;
|
|
126
129
|
setLoadingCostumes(args: BlockArgs): void;
|
|
@@ -138,6 +141,8 @@ export declare class AssetManagerExtension {
|
|
|
138
141
|
color3: string;
|
|
139
142
|
blocks: Record<string, unknown>[];
|
|
140
143
|
};
|
|
144
|
+
/** Release only this optional editor registration; runtime data remains unchanged. */
|
|
145
|
+
dispose(): void;
|
|
141
146
|
/**
|
|
142
147
|
* Exposes the stock extension registry through a host-neutral DOM image
|
|
143
148
|
* resource contract for other unsandboxed extensions.
|
|
@@ -169,6 +174,8 @@ export declare class AssetManagerExtension {
|
|
|
169
174
|
playSound(args: BlockArgs): Promise<void>;
|
|
170
175
|
playSoundUntilDone(args: BlockArgs): Promise<void>;
|
|
171
176
|
createAudioVoice(value: unknown, options?: AssetManagerAudioVoiceOptions): Promise<AssetManagerAudioVoice>;
|
|
177
|
+
createAudioPlayback(source: AssetManagerAudioSource, options?: AssetManagerAudioPlaybackOptions, onDispose?: () => void): Promise<AssetManagerAudioPlayback>;
|
|
178
|
+
private prepareBrowserAudio;
|
|
172
179
|
stopSound(args: BlockArgs): void;
|
|
173
180
|
stopAllSounds(): void;
|
|
174
181
|
getAssetMimeType(args: BlockArgs): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FixedInputBinding, FixedInputEditorOptions } from '@kubohiroya/turbowarp-extension-data-editor';
|
|
2
|
+
import { type TextStyleProperty } from './text-style.js';
|
|
3
|
+
/** New edits preserve the candidate token; existing aliases are display projections only. */
|
|
4
|
+
export declare function styleBinding(property: TextStyleProperty): FixedInputBinding;
|
|
5
|
+
export declare const fixedInputEditors: readonly FixedInputEditorOptions[];
|
|
6
|
+
/** Per-instance, idempotent registration. Legacy hosts never acquire the fixed capability. */
|
|
7
|
+
export declare function fixedInputRegistration(scratch: unknown): {
|
|
8
|
+
ensure(opcodes: readonly string[]): void;
|
|
9
|
+
dispose: () => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { SchemaBundle, SchemaDocument } from '@kubohiroya/turbowarp-extension-data-editor/schema';
|
|
2
|
+
/** Canonical owner schema fragments; no network resources or runtime providers. */
|
|
3
|
+
export declare function fixedInputBundle(fragment: string, schema: SchemaDocument): SchemaBundle;
|
|
4
|
+
export declare const fixedSchemas: {
|
|
5
|
+
setTextStyle: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
PROPERTY: {
|
|
9
|
+
type: string;
|
|
10
|
+
enum: string[];
|
|
11
|
+
};
|
|
12
|
+
VALUE: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
additionalProperties: boolean;
|
|
17
|
+
};
|
|
18
|
+
animation: {
|
|
19
|
+
type: string;
|
|
20
|
+
enum: string[];
|
|
21
|
+
};
|
|
22
|
+
font: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
color: {
|
|
26
|
+
type: string;
|
|
27
|
+
pattern: string;
|
|
28
|
+
};
|
|
29
|
+
width: {
|
|
30
|
+
type: string;
|
|
31
|
+
$comment: string;
|
|
32
|
+
};
|
|
33
|
+
align: {
|
|
34
|
+
type: string;
|
|
35
|
+
enum: string[];
|
|
36
|
+
};
|
|
37
|
+
loadingCostumeAt: {
|
|
38
|
+
type: string;
|
|
39
|
+
properties: {
|
|
40
|
+
INDEX: {
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
additionalProperties: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# 音声instanceの共通controller
|
|
2
|
+
|
|
3
|
+
追跡: [Issue #6](https://github.com/kubohiroya/turbowarp-asset-cache/issues/6)。開発中の追加APIで、既存公開版に同名APIがあることを示す文書ではありません。
|
|
4
|
+
|
|
5
|
+
`createAudioPlayback({asset: 'Music'}, {gain: 0.7, muted: false, playbackRate: 1, fadeIn: 0.5, fadeOut: 1.5})` は、停止状態の独立したinstanceを返します。`asset` と `url` のどちらか一つが必須です。直接URLは認証情報を含まないHTTP(S)に限定し、anonymous CORSで読み込みます。別originのサーバーにはAccess-Control-Allow-Originが必要です。これは後からsetGainで増幅する場合も必要となる[Web AudioのCORS仕様](https://webaudio.github.io/web-audio-api/#MediaElementAudioSourceNode-security)に従います。準備だけではnative `play()` を呼びません。有効化フラグは不要です。
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
const playback = await assets.createAudioPlayback({asset: 'Music'}, {gain: 0.7, fadeIn: 0.5, fadeOut: 1.5});
|
|
9
|
+
try {
|
|
10
|
+
await playback.play({restart: true, loop: true, gain: 1.5, fadeIn: 0.5, fadeOut: 1.5, signal});
|
|
11
|
+
playback.pause();
|
|
12
|
+
await playback.seek(1.5, signal);
|
|
13
|
+
await playback.setGain(2);
|
|
14
|
+
playback.setMuted(false);
|
|
15
|
+
playback.setPlaybackRate(1.5);
|
|
16
|
+
await playback.play({signal});
|
|
17
|
+
await playback.stop({fadeOut: 0.5});
|
|
18
|
+
} finally {
|
|
19
|
+
playback.dispose();
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- `play` はnative再生の開始まで待ちます。`restart` は先頭へ戻す指定(既定false)、`loop` を省略すると直前の設定を保ちます。
|
|
24
|
+
- `ended` は現在の再生の終了待ちPromiseです。`play` ごとに更新されるため、`await playback.play(); await playback.ended;` の順で使います。自然終了・pause・stop・置換・disposeで待機を完了し、再生失敗やAbortSignalによる中断はrejectします。
|
|
25
|
+
- `pause` は位置を保持します。`stop({fadeOut, signal})` は再生中ならフェードアウト完了まで待ち、ループを解除して先頭へ戻します。0秒・一時停止中・未再生なら即時停止です。いずれもinstanceと素材を保持し、再利用できます。フェードを使うstopはPromiseをawaitしてください。
|
|
26
|
+
- `seek` は必要ならmetadataを最大10秒待ちます。負の秒、有限でない秒、長さを超える秒を拒否します。待機中のabort/disposeでもlistenerとtimerを回収します。
|
|
27
|
+
- gainは0以上の有限数(既定1)、mutedは真偽値、playbackRateは0.25〜4です。音量などは同じ素材の別instanceへ影響しません。gain=0で無音、1で原音、2で2倍です。playのgain省略時は現在値を保持します。100%超の増幅には共有AudioContextとinstanceごとのGainNodeを使い、native volumeは減衰とフェードに使います。極端なgainはWeb Audioのfloat表現上限内で出力します。増幅後のsetGainはAudioContextの再開を待つ場合があるためawaitしてください。
|
|
28
|
+
- `dispose` は冪等です。sourceを外してnative音声と増幅nodeを解放し、最後の増幅instanceでは共有AudioContextもcloseします。所有するObject URLを一度だけrevokeします。直接HTTP(S) URLをrevokeすることはありません。
|
|
29
|
+
|
|
30
|
+
`createAudioVoice` と外部ファイルの `playSound` も同じnative controllerへ委譲します。voiceの `ended` / `setGain` / `stop` の契約は維持します。プロジェクト素材の旧 `playSound` はScratch SoundBankの互換adapterとして残します。
|
|
31
|
+
|
|
32
|
+
明示的に準備したcontrollerは旧 `stopSound(asset)` の停止範囲に含めません。ID単位の所有者はcontrollerの `pause` / `stop` / `dispose` を使ってください。`releaseAsset` は該当素材のinstanceを回収し、compositionの `releaseAll` は直接URLも含めて所有するinstanceを回収します。別compositionのinstanceは対象にしません。全体停止の `stopAllSounds` は従来どおり全音声を停止します。
|
|
33
|
+
|
|
34
|
+
autoplay拒否は `PLAYBACK_FAILED` の `cause` にブラウザの `NotAllowedError` を保持します。アプリはこの原因をDSL側の診断へ変換できます。ポリシーを回避する起動フラグやURLスイッチは追加しません。
|
|
35
|
+
|
|
36
|
+
切り戻しはconsumerを先に旧APIへ戻し、依存版を前版へ固定して行います。旧consumerのvoice APIは変更不要です。
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## フェード
|
|
40
|
+
|
|
41
|
+
`fadeIn` / `fadeOut` は0以上の有限な秒数で、既定は0です。準備時に設定し、`play` の同名optionでその再生を上書きできます。再生開始はnative play成功までを待ち、フェードイン完了までは待ちません。`ended` はフェードインを含む再生全体の自然終了を待ちます。
|
|
42
|
+
|
|
43
|
+
フェードは実時間で線形に変化します。設定gainと音量倍率を分離するため、`gain` と `setGain` はフェード中も元の設定音量を扱います。短い素材で開始と終了のフェードが重なる場合は小さい倍率を使います。
|
|
44
|
+
|
|
45
|
+
非ループは残りのmedia時間を現在の再生速度で換算し、終了前のfadeOutへ追従します。seek・rate変更・duration確定でも再計算します。長さが不明なら自動の終了予測はできないため、明示的なstopを使います。ループの各周回ではfadeOutを行いません。
|
|
46
|
+
|
|
47
|
+
`stop` の秒数省略時はその再生のfadeOutを使い、現在の音量倍率から0へ下げます。完了後はgainを保持して再利用できます。stop中の自然終了は待機を完了し、native errorは失敗を返します。新しいplay・pause・disposeは古いフェードとstop待機をキャンセルし、timerを残しません。stopのAbortSignalはフェードを中断して即時停止し、呼び出しをAbortErrorでrejectします。
|
|
48
|
+
|
|
49
|
+
sceneや素材の解放に使うdisposeはフェードを待たず即時に解放します。旧createAudioVoiceのstopとBGM crossfadeの既存契約は変えません。
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# 固定入力エディターの契約
|
|
2
|
+
|
|
3
|
+
対応GUIの起動時に`blockEditorDialogs=1&blockEditorFixedInputs=1`を指定し、再読込した場合だけ登録する。既定OFFで、旧GUIやCLIに固定登録APIがなければ何もしない。公開するブロック・引数・既定値・`docsURI`・既存データ形式は変更しない。
|
|
4
|
+
|
|
5
|
+
| ブロック | 対象 | UIと保存 |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| `setTextStyle` | `PROPERTY` / `VALUE` | PROPERTYの固定5選択とVALUEの有限分岐。animation/alignは選択、fontは自由入力、colorは色、widthは数値文字列。VALUEは常にSTRINGで空文字reset可能 |
|
|
8
|
+
| `loadingCostumeAt` | `INDEX` | 数値UI。新入力は有限の数値表記。小数・負数を許容し、既存runtimeの切捨て・下限補正・循環を維持。非表示の互換ブロック |
|
|
9
|
+
|
|
10
|
+
Schemaの正本は`schemas/block-editor-fixed-inputs.schema.json`。`getInfo()`と`src/text-style.ts`の`normalizeTextStyleProperty` / `normalizeTextStyleValue`、`src/extension.ts`の`loadingCostumeAt`がruntime契約の正本であり、棚卸しやUI候補だけを受け入れ根拠にしない。新Schemaは登録用の各fragmentに投影し、ネットワークSchema参照を行わない。NP-finite-new-input-v1の対象はINDEXであり、STRINGであるVALUE.widthへ一律適用しない。widthのSchemaはSTRING構造を確認し、CPの正の有限値/resetをpure normalizerで意味検証する。STRINGの数値UIとprogrammatic候補はともに`0x10`・`+20`等を既存runtimeと同じく受け入れる。JSON数値文法のbuffer検査はINDEX等のnumber型投影に限定し、widthと区別する。
|
|
11
|
+
|
|
12
|
+
既存alias(`typing`、短縮色、大小文字、旧数値表記)は表示投影だけでは書き換えない。PROPERTYの修復・変更時は最終branchで必要なVALUEを検査し、不適合なら修正/resetまで全patchを拒否する。selectorがreporter・欠落・非対応ならVALUEは読取専用。reporterを評価・置換しない。未知literal selectorは既知値へ修復可能で、未変更なら未知rawも保持する。NAMEや素材registry、font候補providerには触れない。
|
|
13
|
+
|
|
14
|
+
同じ画面で分岐を切り替えてもdraftを保持し、保存失敗後も保持する。取消・dispose・project/target/登録の失効では共通sessionが破棄する。再openは現在のrawから開始し、旧draftを復活させない。登録はgetInfoに存在するopcodeだけを対象とし、同じinstance/APIへの重複登録を行わず、API置換・部分失敗・runtime終了・disposeでcleanupする。
|
|
15
|
+
|
|
16
|
+
共通依存はGit commit `485f0e550e622235624b5e9176820161aeeba252`に固定する。開発用の型とpure数値parserを使い、登録はhostの`registerFixedInputEditor`へoptionsを渡す。既存composition APIにGUI/React実行依存を追加しない。runtime同梱JSと公開入口の型が外部common参照を要求しないことをbuildとpack consumerで確認する。
|
|
17
|
+
|
|
18
|
+
`tests/fixed-input-editors.test.ts`でCP-asset-cacheのBC01〜05/14全6fixture、全5branchのruntime比較、空文字reset、有限数値と精度表記、旧raw保持、登録とcleanupを検証する。Asset Managerは別ownerであり、この結果を流用して合格とはしない。文書入口は`docs/index.html`と`docs/ja/index.html`の各固定アンカーから到達でき、Markdown再生成ではこれらの静的HTML説明を削除しない。
|
|
19
|
+
|
|
20
|
+
切戻しは固定フラグをOFFにして再読込する。依存を戻す場合はmanifest・lock・実解決を一組で戻す。既存raw値やsb3の移行は不要。今回の作業はローカルのみで、commit・push・PR・merge・Pages公開・npm公開・Issue操作は含まない。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-asset-cache",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A browser-local image, audio, and runtime-text asset cache for TurboWarp projects.",
|
|
5
5
|
"author": "Hiroya Kubo <hiroya@cuc.ac.jp>",
|
|
6
6
|
"type": "module",
|
|
@@ -22,8 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"dist/",
|
|
25
|
+
"schemas/",
|
|
26
|
+
"docs/fixed-input-editors.ja.md",
|
|
25
27
|
"README.md",
|
|
26
|
-
"LICENSE"
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"docs/audio-playback.md"
|
|
27
30
|
],
|
|
28
31
|
"unpkg": "./dist/asset-cache.js",
|
|
29
32
|
"jsdelivr": "./dist/asset-cache.js",
|
|
@@ -60,9 +63,10 @@
|
|
|
60
63
|
},
|
|
61
64
|
"devDependencies": {
|
|
62
65
|
"@eslint/js": "^9.39.5",
|
|
63
|
-
"@kubohiroya/turbowarp-extension-
|
|
64
|
-
"@kubohiroya/turbowarp-
|
|
65
|
-
"@kubohiroya/
|
|
66
|
+
"@kubohiroya/turbowarp-extension-data-editor": "0.2.1",
|
|
67
|
+
"@kubohiroya/turbowarp-extension-manifest": "0.3.2",
|
|
68
|
+
"@kubohiroya/turbowarp-named-data": "0.3.1",
|
|
69
|
+
"@kubohiroya/vite-plugin-turbowarp-extension": "0.6.1",
|
|
66
70
|
"@types/node": "^22.20.1",
|
|
67
71
|
"@xmldom/xmldom": "0.9.11",
|
|
68
72
|
"eslint": "^9.39.5",
|
|
@@ -73,7 +77,7 @@
|
|
|
73
77
|
"vitest": "^4.1.10"
|
|
74
78
|
},
|
|
75
79
|
"peerDependencies": {
|
|
76
|
-
"@kubohiroya/turbowarp-named-data": "
|
|
80
|
+
"@kubohiroya/turbowarp-named-data": "0.3.1"
|
|
77
81
|
},
|
|
78
82
|
"keywords": [
|
|
79
83
|
"turbowarp",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://kubohiroya.github.io/turbowarp-asset-cache/schemas/block-editor-fixed-inputs.schema.json",
|
|
4
|
+
"$defs": {
|
|
5
|
+
"setTextStyle": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"PROPERTY": {"type": "string", "enum": ["animation", "font", "color", "width", "align"]},
|
|
9
|
+
"VALUE": {"type": "string"}
|
|
10
|
+
},
|
|
11
|
+
"additionalProperties": false
|
|
12
|
+
},
|
|
13
|
+
"animation": {"type": "string", "enum": ["", "none", "type", "rainbow", "zoom", "shake"]},
|
|
14
|
+
"font": {"type": "string"},
|
|
15
|
+
"color": {"type": "string", "pattern": "^(?:|#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6})$"},
|
|
16
|
+
"width": {"type": "string", "$comment": "Empty/trimmed empty resets; otherwise normalizeTextStyleValue requires Number(value) finite and positive. Preserve the existing STRING grammar, including hexadecimal and leading plus."},
|
|
17
|
+
"align": {"type": "string", "enum": ["", "left", "center", "right"]},
|
|
18
|
+
"loadingCostumeAt": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {"INDEX": {"type": "number"}},
|
|
21
|
+
"additionalProperties": false
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|