@kubohiroya/turbowarp-bubble 0.16.0 → 0.17.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 +17 -17
- package/README.md +17 -17
- package/dist/turbowarp-bubble.js +2 -2
- package/docs/block-manual.ja.md +10 -10
- package/docs/block-manual.md +10 -10
- package/docs/index.html +11 -11
- package/docs/ja/index.html +11 -11
- package/package.json +10 -10
package/README.ja.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
`@kubohiroya/turbowarp-bubble`は、TurboWarp上の`say`/`think`表示を、文字、キャラクター表情、入力待ちアイコンに分けて管理するunsandboxed機能拡張です。同じ機能をアプリから直接利用するためのcomposition APIも提供します。
|
|
8
8
|
|
|
9
|
-
現在のリリースはBubble 0.
|
|
9
|
+
現在のリリースはBubble 0.17.0です。既定の描画経路はSVG Text 0.14.0を使うskin非依存のSVG overlayです。TurboWarpですべての機能を使う場合、現在の推奨組み合わせはAsset Cache 0.7.0、Async Input 0.12.0、Runtime Expression 0.10.0です。Asset Cacheへの移行については[0.13.0のリリースノート](docs/release-notes-0.13.0.md)、再利用可能な名前付きclose policyについては[0.10.0のリリースノート](docs/release-notes-0.10.0.md)、組み込み`say`/`think` styleについては[0.9.0のリリースノート](docs/release-notes-0.9.0.md)を参照してください。
|
|
10
10
|
|
|
11
11
|
## 最小デモ
|
|
12
12
|
|
|
@@ -81,13 +81,13 @@ flowchart TB
|
|
|
81
81
|
extension -."optional".-> input
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
この構成では、Bubble coreが`BubbleTextCapability`というホスト非依存の契約だけを参照します。TurboWarp adapterの既定経路は直接依存する`@kubohiroya/turbowarp-svg-text@0.
|
|
84
|
+
この構成では、Bubble coreが`BubbleTextCapability`というホスト非依存の契約だけを参照します。TurboWarp adapterの既定経路は直接依存する`@kubohiroya/turbowarp-svg-text@0.14.0`の`createSvgTextLayoutComposition().layoutText()`を使い、SVG skinを生成せず行layoutと文字幅を得ます。standalone SVG Text 0.14.0が既にロードされている場合は、その公開`getLayoutCapability()`を利用し、project blockで定義済みのfont、色、size、alignmentを維持します。吹き出しの外枠、tail、portraitの配置、表示開始・表示終了animationはSVG Textの責務に含めません。Composition APIのhostは別の実装を`textCapability`として注入できます。画像解決、音声再生、入力、条件評価もCapabilityとして切り離し、Asset Cache、Async Input、Runtime Expressionは対応機能を使う場合だけ接続します。
|
|
85
85
|
|
|
86
86
|
### 描画方式(SVGオーバーレイが既定)
|
|
87
87
|
|
|
88
|
-
`bubbleRenderBackend`を省略した場合の既定値は`"svg-overlay"`です。`renderer.addOverlay(root, "scale")`でstage canvas上に共有SVG rootを置き、body、tail、text、portrait、corner clip、continue indicatorをDOM要素として描画します。文字にはstandalone拡張の共有named-style registry、またはBubble内包compositionから得るSVG Text 0.
|
|
88
|
+
`bubbleRenderBackend`を省略した場合の既定値は`"svg-overlay"`です。`renderer.addOverlay(root, "scale")`でstage canvas上に共有SVG rootを置き、body、tail、text、portrait、corner clip、continue indicatorをDOM要素として描画します。文字にはstandalone拡張の共有named-style registry、またはBubble内包compositionから得るSVG Text 0.14.0のhost-neutral layoutを使います。この既定経路ではBubbleの表示、text更新、style更新、animationのために`createDrawable()`、`createSVGSkin()`、`createBitmapSkin()`を呼ばず、Bubble由来の処理はscratch-renderの`SVGSkin`/`Silhouette`経路へ入りません。`"scratch-render"`は互換性とロールバックのため明示指定時だけ使用します。
|
|
89
89
|
|
|
90
|
-
TurboWarpでstock Asset Cache 0.
|
|
90
|
+
TurboWarpでstock Asset Cache 0.7.0をBubbleより先に読み込むと、Bubbleはportrait等を初めて使う時に`runtime.ext_kubohiroyaassetcache.getDOMImageCapability()`を呼び、Asset Cacheブロックで登録された同じregistryへ遅延接続します。文字だけを使う場合はAsset Cacheを読み込みません。Composition APIのhostは、次のようにcapabilityを明示注入できます。
|
|
91
91
|
|
|
92
92
|
```ts
|
|
93
93
|
import { createAssetManagerComposition } from "@kubohiroya/turbowarp-asset-cache/composition";
|
|
@@ -117,9 +117,9 @@ const bubbles = createTurboWarpBubbleComposition(runtime, {
|
|
|
117
117
|
});
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
`svgOverlayTextCapability`を省略し、standalone SVG Text 0.
|
|
120
|
+
`svgOverlayTextCapability`を省略し、standalone SVG Text 0.14.0がロード済みの場合、Bubbleはfrozenな`getLayoutCapability()`を取得し、SVG Text blockが更新する同じnamed-style registryを解決します。standaloneがない場合だけ、BubbleはSVG Text 0.14.0のlayout compositionを生成し、`default`および初めて参照されたtext-style名を背景透明の既定styleで初期化します。公開handoffがない古いstandaloneが存在する場合はproject styleを黙って置換せず`BUBBLE-RUNTIME-004`を返し、`svgOverlayUnsupportedBehavior: "fallback"`を明示した場合だけscratch-renderへ戻ります。capabilityを明示注入すると両方の自動経路を置換できます。portrait等を使う場合、Bubble所有の`createAssetManagerSvgOverlayImageCapability()`がAsset Cacheの汎用DOM resourceをBubbleの画像契約へ変換します。依存方向はBubbleからAsset Cacheへの一方向であり、Asset CacheはBubbleの型やsecurity markerを参照しません。adapterは両者が許可するMIME typeだけを公開し、検証済みMIME type、intrinsic size、`blob:` URL、`release()`を引き継ぎ、Asset CacheがsanitizeしたSVGへBubble側のmetadataを付与します。Bubbleは任意SVG文字列を挿入せず、canonical bodyから`path`、`group`等の許可要素・属性だけを`createElementNS()`で再構築します。`script`、event handler、`foreignObject`、外部URLは受け付けません。overlay rootは`pointer-events: none`、`aria-hidden="true"`です。
|
|
121
121
|
|
|
122
|
-
既定文字providerは直接依存するSVG Text 0.
|
|
122
|
+
既定文字providerは直接依存するSVG Text 0.14.0です。別にロードしたstock SVG Textのstyleを維持するには0.8.1の`getLayoutCapability()`が必要です。stock画像拡張同士の自動接続には`getDOMImageCapability()`を公開するAsset Cache 0.1.0以降が必要です。Composition APIから`resolveDOMImageResource()`を明示注入する低レベル経路はAsset Cache 0.1.0以降で利用できます。
|
|
123
123
|
|
|
124
124
|
SVG Text/Asset Cacheのskin非依存契約は[turbowarp-svg-text#26](https://github.com/kubohiroya/turbowarp-svg-text/issues/26)、[turbowarp-asset-manager#103](https://github.com/kubohiroya/turbowarp-asset-manager/issues/103)、stock registry handoffの[turbowarp-asset-manager#106](https://github.com/kubohiroya/turbowarp-asset-manager/issues/106)で公開済みです。Bubbleは上流の公開APIだけを利用し、private field参照やskinからの抽出では代替しません。overlay APIがないhostで`svg-overlay`を選ぶと`BUBBLE-RUNTIME-004`を返します。画像使用時にAsset Cache 0.1.0の公開capabilityも明示注入もない場合は`BUBBLE-RUNTIME-002`を返します。`svgOverlayUnsupportedBehavior: "fallback"`を明示した場合だけ、overlay API非対応hostで`scratch-render`へ戻ります。
|
|
125
125
|
|
|
@@ -134,7 +134,7 @@ SVG Text/Asset Cacheのskin非依存契約は[turbowarp-svg-text#26](https://g
|
|
|
134
134
|
|
|
135
135
|
stage native size変更ではrootの`viewBox`と全surfaceを更新し、fullscreenとhigh-DPIのCSS scalingはrendererの`scale` overlay modeへ委譲します。stop、project reload、target/clone破棄、composition disposeではlistener、DOM、capability所有resourceを解放し、最後のBubbleが閉じた時点で`removeOverlay(root)`を呼びます。
|
|
136
136
|
|
|
137
|
-
自動回帰テストでは、既定設定で表示、text更新、shake、shape animationを行ってもBubble由来renderer skin/drawable作成が0回であること、native size更新、共有root、上流SVG Text 0.
|
|
137
|
+
自動回帰テストでは、既定設定で表示、text更新、shake、shape animationを行ってもBubble由来renderer skin/drawable作成が0回であること、native size更新、共有root、上流SVG Text 0.14.0 named styleの行座標・角丸、許可属性、object URL解放を検証します。Web/Desktop/Packagerでのvisual parityとframe time/memoryのmanual gateは[SVG overlay release note](docs/release-notes-0.8.0.md)に記録します。
|
|
138
138
|
|
|
139
139
|
### 逐次表示の単位(CHARACTER / WORD / LINE / BLOCK)
|
|
140
140
|
|
|
@@ -223,7 +223,7 @@ Asset Cacheを音声providerとして接続すると、次の音声を同じ表
|
|
|
223
223
|
| `@kubohiroya/turbowarp-bubble` | 吹き出しsurface、配置、逐次表示、say/think、表情レイヤー、animation、入力待機 |
|
|
224
224
|
| アプリ/host | 必要に応じたアプリ固有の入力からcomposition APIへの変換 |
|
|
225
225
|
|
|
226
|
-
Bubbleは依存パッケージを再exportしません。低レベルComposition APIは`textCapability`を必須の契約として受け取り、SVG Textに限定されません。TurboWarp adapterはstandalone SVG Text 0.
|
|
226
|
+
Bubbleは依存パッケージを再exportしません。低レベルComposition APIは`textCapability`を必須の契約として受け取り、SVG Textに限定されません。TurboWarp adapterはstandalone SVG Text 0.14.0があればnamed-style handoffを使い、なければ直接依存するlayout compositionをproviderとして生成します。画像・音声・入力・条件評価はCapabilityとして差し替えられ、TurboWarp adapterではAsset Cacheを遅延接続し、Composition APIでは`imageResolver`/`audio`をhostが任意に実装できます。Asset Cacheを使う機能は画像だけでなく、フルボイス、タイプライター音、行・段落ごとの効果音などの外部メディアも対象にします。
|
|
227
227
|
|
|
228
228
|
### 自動改行と禁則処理の基盤
|
|
229
229
|
|
|
@@ -302,7 +302,7 @@ const reveal = normalizeBubbleReveal({ unit: "CHARACTER" });
|
|
|
302
302
|
const chunks = splitBubbleText("A👩🚀B", reveal);
|
|
303
303
|
```
|
|
304
304
|
|
|
305
|
-
SVG Text 0.
|
|
305
|
+
SVG Text 0.14.0は既定のskin非依存文字providerとして通常dependencyに含まれます。別途インストールは不要です。standalone SVG Text 0.14.0を先に読み込むと、project blockで定義したstyleを公開handoff経由で再利用します。今回のoptional peerはAsset Cache 0.7.0、Async Input 0.12.0、Runtime Expression 0.10.0以降の互換範囲を指定します。hostが独自の`svgOverlayTextCapability`を注入する場合も、Bubble自身のSVG Text dependencyは0.13.0以降の互換範囲です。Asset Cache 0.1.0はAPI導入履歴の基準であり、今回その旧package版を依存解決に許容する意味ではありません。
|
|
306
306
|
|
|
307
307
|
`bubbleRenderBackend: "scratch-render"`へrollbackした場合も、standalone SVG Text拡張が未ロードなら同じ0.8.1 dependencyからskin版providerを生成します。standalone SVG Text拡張が既にロードされているhostでは、互換性のためその既存providerを引き続き使用します。
|
|
308
308
|
|
|
@@ -332,24 +332,24 @@ TurboWarp Bubbleの`dist/turbowarp-bubble.js`は、TurboWarpのrendererとtarget
|
|
|
332
332
|
|
|
333
333
|
1. 入力待ちの例を使う場合は、TurboWarp Editorでプロジェクトを開き、拡張機能の追加からTemporary Variablesを追加します。
|
|
334
334
|
2. 「カスタム拡張機能」を選び、サンドボックスなし(Run without sandbox)で実行できる状態にします。
|
|
335
|
-
3. portrait、blink、lip-sync、continue frames、音声を使う場合はAsset Cache 0.
|
|
336
|
-
4. `finish [UNIT] ...`にはRuntime Expression 0.
|
|
337
|
-
5. 最後にBubble 0.
|
|
335
|
+
3. portrait、blink、lip-sync、continue frames、音声を使う場合はAsset Cache 0.7.0を読み込みます。
|
|
336
|
+
4. `finish [UNIT] ...`にはRuntime Expression 0.10.0、conditionを使う待機またはclose policyにはAsync Input 0.12.0とRuntime Expression 0.10.0を読み込みます。timeoutだけのclose policyにはどちらも不要です。
|
|
337
|
+
5. 最後にBubble 0.17.0を読み込みます。SVG Text 0.14.0のlayout providerはBubble bundleに含まれます。
|
|
338
338
|
|
|
339
339
|
文字だけの最小構成はBubbleです。Temporary Variables、Asset Cache、Async Input、Runtime Expressionは、対応する機能を使わなければ追加しなくても構いません。Bubbleを読み込むと、基本の`say [MESSAGE]`/`think [MESSAGE]`ブロックはstyle定義なしですぐ使えます。それぞれ組み込みBubble style `say`/`think`を選び、各styleが本体形状とtail/trail形状を不可分な1つの外観として持ちます。どちらも予約text profile `default`を使います。named custom styleが必要な場合だけ`define bubble style`と`show [MESSAGE] with bubble style [STYLE]`を使います。それ以外のnamed text styleや、外形・配置・media・reveal・motionの明示設定はcustom profileになります。
|
|
340
340
|
|
|
341
341
|
```text
|
|
342
342
|
# portrait/blink/lip-sync/continue/音声を使う場合だけ追加
|
|
343
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.
|
|
343
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.7.0/dist/asset-cache.js
|
|
344
344
|
|
|
345
345
|
# conditionを使う統合待機またはclose policyでAsync Inputを追加
|
|
346
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.
|
|
346
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.12.0/dist/async-input.js
|
|
347
347
|
|
|
348
348
|
# finishまたはconditionを使う待機/close policyでRuntime Expressionを追加
|
|
349
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.
|
|
349
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.10.0/dist/runtime-expression.js
|
|
350
350
|
|
|
351
351
|
# Bubble(必ず最後)
|
|
352
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.
|
|
352
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.17.0/dist/turbowarp-bubble.js
|
|
353
353
|
```
|
|
354
354
|
|
|
355
355
|
TurboWarpのカスタム拡張機能はURLからJavaScriptを読み込むため、初回読み込み時にネットワーク接続が必要です。開発用URLをunsandboxedとして読み込むには、server originを正確に`http://localhost:8000/`とする必要があります。`127.0.0.1`、`0.0.0.0`、ほかのportにはこの例外が適用されません。リポジトリrootで`python3 -m http.server 8000`を実行し、`http://localhost:8000/dist/turbowarp-bubble.js`を読み込んでください。別の方法として、カスタム拡張機能のfileまたはtext入力を選び、**サンドボックスなしで実行する**を有効にできます。`file://`で直接開いたファイルや、サンドボックス付きの拡張機能としては動作しません。host制約の詳細は[TurboWarpのunsandboxed拡張機能ドキュメント](https://docs.turbowarp.org/development/extensions/unsandboxed)を参照してください。
|
|
@@ -576,7 +576,7 @@ close this bubble
|
|
|
576
576
|
|
|
577
577
|
### Composition API
|
|
578
578
|
|
|
579
|
-
TurboWarp runtimeのrendererへ接続するhostでは、公開adapterを利用できます。既定ではstandalone SVG Text 0.
|
|
579
|
+
TurboWarp runtimeのrendererへ接続するhostでは、公開adapterを利用できます。既定ではstandalone SVG Text 0.14.0があればnamed-style handoffを使い、なければ内包layout compositionとSVG overlayを使用します。画像portrait、lip-sync、continue indicator、または音声アセットを使う場合だけ、Asset Cacheを追加でロードしてください。
|
|
580
580
|
|
|
581
581
|
```ts
|
|
582
582
|
import { createTurboWarpBubbleComposition } from "@kubohiroya/turbowarp-bubble/turbowarp-adapter";
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ English | [日本語](README.ja.md)
|
|
|
6
6
|
|
|
7
7
|
`@kubohiroya/turbowarp-bubble` is an unsandboxed extension that manages TurboWarp `say` and `think` displays as separate text, character-expression, and input-waiting indicator layers. It also provides a composition API for using the same features directly from applications.
|
|
8
8
|
|
|
9
|
-
The current release is Bubble 0.
|
|
9
|
+
The current release is Bubble 0.17.0. Its default rendering path is the skin-free SVG overlay backed by SVG Text 0.14.0. For the complete TurboWarp feature set, the currently recommended companion releases are Asset Cache 0.7.0, Async Input 0.12.0, and Runtime Expression 0.10.0. See the [0.13.0 release notes](docs/release-notes-0.13.0.md) for the Asset Cache migration, the [0.10.0 release notes](docs/release-notes-0.10.0.md) for reusable named close policies, and the [0.9.0 release notes](docs/release-notes-0.9.0.md) for the built-in `say`/`think` styles.
|
|
10
10
|
|
|
11
11
|
## Minimal demo
|
|
12
12
|
|
|
@@ -81,13 +81,13 @@ flowchart TB
|
|
|
81
81
|
extension -."optional".-> input
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
In this architecture, Bubble core refers only to the host-neutral `BubbleTextCapability` contract. By default, the TurboWarp adapter calls `createSvgTextLayoutComposition().layoutText()` from its direct dependency, `@kubohiroya/turbowarp-svg-text@0.
|
|
84
|
+
In this architecture, Bubble core refers only to the host-neutral `BubbleTextCapability` contract. By default, the TurboWarp adapter calls `createSvgTextLayoutComposition().layoutText()` from its direct dependency, `@kubohiroya/turbowarp-svg-text@0.14.0`, to obtain line layout and text widths without creating SVG skins. When the standalone SVG Text 0.14.0 extension is already loaded, Bubble instead adapts its public `getLayoutCapability()` so styles defined by project blocks retain their font, color, size, and alignment. The bubble outline, tail, portrait placement, and show and hide animations are outside SVG Text's responsibilities. A Composition API host can inject a different implementation as `textCapability`. Image resolution, audio playback, input, and condition evaluation are also separated into capabilities; Asset Cache, Async Input, and Runtime Expression are connected only when their corresponding features are used.
|
|
85
85
|
|
|
86
86
|
### Rendering backend (SVG overlay by default)
|
|
87
87
|
|
|
88
|
-
The default value of `bubbleRenderBackend` is `"svg-overlay"`. Bubble places a shared SVG root over the stage canvas with `renderer.addOverlay(root, "scale")`, then renders the body, tail, text, portrait, corner clip, and continue indicator as DOM elements. Text uses host-neutral SVG Text 0.
|
|
88
|
+
The default value of `bubbleRenderBackend` is `"svg-overlay"`. Bubble places a shared SVG root over the stage canvas with `renderer.addOverlay(root, "scale")`, then renders the body, tail, text, portrait, corner clip, and continue indicator as DOM elements. Text uses host-neutral SVG Text 0.14.0 layout data, either from the loaded standalone extension's shared named-style registry or from Bubble's bundled fallback composition. On this default path, Bubble does not call `createDrawable()`, `createSVGSkin()`, or `createBitmapSkin()` to show bubbles, update text or styles, or run animations, so Bubble-originated work never enters scratch-render's `SVGSkin` / `Silhouette` path. `"scratch-render"` is used only when explicitly selected for compatibility or rollback.
|
|
89
89
|
|
|
90
|
-
When the stock Asset Cache 0.
|
|
90
|
+
When the stock Asset Cache 0.7.0 extension is loaded before Bubble in TurboWarp, Bubble calls `runtime.ext_kubohiroyaassetcache.getDOMImageCapability()` the first time a portrait or another image feature is used. It then lazily connects to the same registry populated by Asset Cache blocks. Asset Cache is not loaded when only text is used. A Composition API host can inject capabilities explicitly as follows.
|
|
91
91
|
|
|
92
92
|
```ts
|
|
93
93
|
import { createAssetManagerComposition } from "@kubohiroya/turbowarp-asset-cache/composition";
|
|
@@ -117,9 +117,9 @@ const bubbles = createTurboWarpBubbleComposition(runtime, {
|
|
|
117
117
|
});
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
When `svgOverlayTextCapability` is omitted and standalone SVG Text 0.
|
|
120
|
+
When `svgOverlayTextCapability` is omitted and standalone SVG Text 0.14.0 is loaded, Bubble obtains its frozen `getLayoutCapability()` and resolves the exact named-style registry populated by SVG Text blocks. If standalone SVG Text is absent, Bubble creates its own SVG Text 0.14.0 layout composition and initializes `default` and each first-referenced text-style name with transparent-background defaults. If an older standalone extension is present without the public handoff, Bubble reports `BUBBLE-RUNTIME-004` instead of silently replacing project styles; explicit `svgOverlayUnsupportedBehavior: "fallback"` selects scratch-render. Supplying a capability directly overrides both automatic paths. For portraits and similar features, Bubble's `createAssetManagerSvgOverlayImageCapability()` converts generic Asset Cache DOM resources into Bubble's image contract. The dependency points one way, from Bubble to Asset Cache; Asset Cache does not refer to Bubble types or security markers. The adapter exposes only MIME types allowed by both packages, carries across the validated MIME type, intrinsic size, `blob:` URL, and `release()`, and adds Bubble metadata to sanitized SVG from Asset Cache. Bubble never inserts arbitrary SVG strings. It reconstructs only allowed elements and attributes, such as `path` and `group`, from the canonical body by using `createElementNS()`. It rejects `script`, event handlers, `foreignObject`, and external URLs. The overlay root uses `pointer-events: none` and `aria-hidden="true"`.
|
|
121
121
|
|
|
122
|
-
The default text provider is the directly depended-on SVG Text 0.
|
|
122
|
+
The default text provider is the directly depended-on SVG Text 0.14.0. Preserving styles from a separately loaded stock SVG Text extension requires its 0.8.1 `getLayoutCapability()`. Automatic image connection between stock extensions requires Asset Cache 0.1.0 or later, which exposes `getDOMImageCapability()`. The lower-level path that explicitly injects `resolveDOMImageResource()` from the Composition API is available with Asset Cache 0.1.0 or later.
|
|
123
123
|
|
|
124
124
|
The skin-independent contracts for SVG Text and Asset Cache are published in [turbowarp-svg-text#26](https://github.com/kubohiroya/turbowarp-svg-text/issues/26), [turbowarp-asset-manager#103](https://github.com/kubohiroya/turbowarp-asset-manager/issues/103), and the stock registry handoff in [turbowarp-asset-manager#106](https://github.com/kubohiroya/turbowarp-asset-manager/issues/106). Bubble uses only public upstream APIs and never substitutes private-field access or extraction from skins. Selecting `svg-overlay` on a host without the overlay API returns `BUBBLE-RUNTIME-004`. Using images without either Asset Cache 0.1.0's public capability or an explicitly injected capability returns `BUBBLE-RUNTIME-002`. Bubble falls back to `scratch-render` on a host without the overlay API only when `svgOverlayUnsupportedBehavior: "fallback"` is explicitly specified.
|
|
125
125
|
|
|
@@ -134,7 +134,7 @@ The skin-independent contracts for SVG Text and Asset Cache are published in [tu
|
|
|
134
134
|
|
|
135
135
|
When the stage's native size changes, Bubble updates the root `viewBox` and every surface. Fullscreen and high-DPI CSS scaling are delegated to the renderer's `scale` overlay mode. On stop, project reload, target or clone destruction, or composition disposal, Bubble releases listeners, DOM nodes, and capability-owned resources. It calls `removeOverlay(root)` when the last Bubble is closed.
|
|
136
136
|
|
|
137
|
-
Automated regression tests verify that showing a Bubble, updating text, shaking it, and animating its shape with the default settings create zero Bubble-originated renderer skins or drawables. They also cover native-size updates, the shared root, upstream SVG Text 0.
|
|
137
|
+
Automated regression tests verify that showing a Bubble, updating text, shaking it, and animating its shape with the default settings create zero Bubble-originated renderer skins or drawables. They also cover native-size updates, the shared root, upstream SVG Text 0.14.0 named-style coordinates and rounded corners, allowed attributes, and object URL release. The manual gates for visual parity and frame-time / memory behavior in Web, Desktop, and Packager are recorded in the [SVG overlay release notes](docs/release-notes-0.8.0.md).
|
|
138
138
|
|
|
139
139
|
### Progressive reveal units (CHARACTER / WORD / LINE / BLOCK)
|
|
140
140
|
|
|
@@ -223,7 +223,7 @@ Per-unit effects play named audio assets; they do not synthesize the displayed s
|
|
|
223
223
|
| `@kubohiroya/turbowarp-bubble` | Bubble surfaces, placement, progressive reveal, say / think, expression layers, animation, and input waiting |
|
|
224
224
|
| Application / host | Convert application-specific input to Composition API calls as needed |
|
|
225
225
|
|
|
226
|
-
Bubble does not re-export its dependencies. The lower-level Composition API requires `textCapability` as a contract and is not limited to SVG Text. The TurboWarp adapter uses the separately loaded SVG Text 0.
|
|
226
|
+
Bubble does not re-export its dependencies. The lower-level Composition API requires `textCapability` as a contract and is not limited to SVG Text. The TurboWarp adapter uses the separately loaded SVG Text 0.14.0 named-style handoff when available, otherwise it creates the directly depended-on layout composition as its provider. Image, audio, input, and condition-evaluation capabilities are replaceable; the TurboWarp adapter connects Asset Cache lazily, while Composition API hosts can implement `imageResolver` and `audio` themselves. Features that use Asset Cache cover external media beyond images, including full voice clips, typewriter sounds, and per-line or per-paragraph effects.
|
|
227
227
|
|
|
228
228
|
### Automatic wrapping and line-breaking rules
|
|
229
229
|
|
|
@@ -302,7 +302,7 @@ const reveal = normalizeBubbleReveal({ unit: "CHARACTER" });
|
|
|
302
302
|
const chunks = splitBubbleText("A👩🚀B", reveal);
|
|
303
303
|
```
|
|
304
304
|
|
|
305
|
-
SVG Text 0.
|
|
305
|
+
SVG Text 0.14.0 is included as a regular dependency and serves as the default skin-independent text provider. You do not need to install it separately. Loading the standalone SVG Text 0.14.0 extension first is optional, but doing so lets Bubble reuse styles defined by its project blocks through the public handoff. This release supports the optional peer ranges starting at Asset Cache 0.7.0, Async Input 0.12.0, and Runtime Expression 0.10.0. Bubble also retains its SVG Text dependency range starting at 0.13.0 when a host injects a custom `svgOverlayTextCapability`. The historical Asset Cache 0.1.0 capability-introduction baseline does not permit resolving that old package version in this release.
|
|
306
306
|
|
|
307
307
|
After rolling back to `bubbleRenderBackend: "scratch-render"`, Bubble creates a skin-based provider from the same 0.8.1 dependency if the standalone SVG Text extension is not loaded. On a host where the standalone SVG Text extension is already loaded, Bubble continues using that existing provider for compatibility.
|
|
308
308
|
|
|
@@ -332,24 +332,24 @@ TurboWarp Bubble's `dist/turbowarp-bubble.js` is an **unsandboxed custom extensi
|
|
|
332
332
|
|
|
333
333
|
1. For the input-wait example, open your project in the TurboWarp Editor and add Temporary Variables from the extension library.
|
|
334
334
|
2. Select “Custom Extension” and enable Run without sandbox.
|
|
335
|
-
3. Load Asset Cache 0.
|
|
336
|
-
4. Load Runtime Expression 0.
|
|
337
|
-
5. Load Bubble 0.
|
|
335
|
+
3. Load Asset Cache 0.7.0 if you use portraits, blinking, lip-sync, continue frames, or audio.
|
|
336
|
+
4. Load Runtime Expression 0.10.0 for `finish [UNIT] ...`; load both Async Input 0.12.0 and Runtime Expression 0.10.0 for condition-based waits and close policies. A timeout-only close policy needs neither extension.
|
|
337
|
+
5. Load Bubble 0.17.0 last. The SVG Text 0.14.0 layout provider is included in the Bubble bundle.
|
|
338
338
|
|
|
339
339
|
Bubble alone is the minimum configuration for text-only use. Temporary Variables, Asset Cache, Async Input, and Runtime Expression can be omitted when you do not use the features they support. After loading Bubble, its basic `say [MESSAGE]` and `think [MESSAGE]` blocks work immediately without a style definition. They select the built-in Bubble styles `say` and `think`, respectively. Each style binds its body shape and tail/trail shape as one visual choice, and both use the reserved text profile `default`. Use `define bubble style` and `show [MESSAGE] with bubble style [STYLE]` only when you need a named custom style. Other named text styles and every explicit body, placement, media, reveal, or motion setting select the custom profile.
|
|
340
340
|
|
|
341
341
|
```text
|
|
342
342
|
# Add only when using portraits, blink, lip-sync, continue, or audio
|
|
343
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.
|
|
343
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.7.0/dist/asset-cache.js
|
|
344
344
|
|
|
345
345
|
# Add Async Input for integrated condition waits and close policies
|
|
346
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.
|
|
346
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.12.0/dist/async-input.js
|
|
347
347
|
|
|
348
348
|
# Add Runtime Expression for finish or condition-based waits and close policies
|
|
349
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.
|
|
349
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.10.0/dist/runtime-expression.js
|
|
350
350
|
|
|
351
351
|
# Bubble (always load last)
|
|
352
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.
|
|
352
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.17.0/dist/turbowarp-bubble.js
|
|
353
353
|
```
|
|
354
354
|
|
|
355
355
|
TurboWarp custom extensions load JavaScript from URLs, so a network connection is required the first time they are loaded. For an unsandboxed development URL, TurboWarp requires the server origin to be exactly `http://localhost:8000/`; `127.0.0.1`, `0.0.0.0`, and other ports do not receive this exception. From the repository root, run `python3 -m http.server 8000`, then load `http://localhost:8000/dist/turbowarp-bubble.js`. Alternatively, choose the custom-extension file or text input and enable **Run extension without sandbox**. The extension does not work when opened directly with `file://` or when run as a sandboxed extension. See [TurboWarp's unsandboxed extension documentation](https://docs.turbowarp.org/development/extensions/unsandboxed) for the host restrictions.
|
|
@@ -576,7 +576,7 @@ Bubble automatically releases its owned timers, overlay DOM, and image leases wh
|
|
|
576
576
|
|
|
577
577
|
### Composition API
|
|
578
578
|
|
|
579
|
-
Hosts that connect to a TurboWarp runtime renderer can use the public adapter. By default, it uses the SVG Text 0.
|
|
579
|
+
Hosts that connect to a TurboWarp runtime renderer can use the public adapter. By default, it uses the SVG Text 0.14.0 named-style handoff when a standalone extension is loaded, otherwise its bundled layout composition, together with an SVG overlay. Load Asset Cache in addition only when using image portraits, lip-sync, continue indicators, or audio assets.
|
|
580
580
|
|
|
581
581
|
```ts
|
|
582
582
|
import { createTurboWarpBubbleComposition } from "@kubohiroya/turbowarp-bubble/turbowarp-adapter";
|
package/dist/turbowarp-bubble.js
CHANGED
|
@@ -10383,7 +10383,7 @@ function createBubbleComposition(options) {
|
|
|
10383
10383
|
});
|
|
10384
10384
|
}
|
|
10385
10385
|
//#endregion
|
|
10386
|
-
//#region node_modules/.pnpm/@kubohiroya+turbowarp-svg-text@0.
|
|
10386
|
+
//#region node_modules/.pnpm/@kubohiroya+turbowarp-svg-text@0.14.0/node_modules/@kubohiroya/turbowarp-svg-text/dist/composition.js
|
|
10387
10387
|
var block_definitions_default = {
|
|
10388
10388
|
extensionName: "SVG Text",
|
|
10389
10389
|
blocks: [{
|
|
@@ -13462,7 +13462,7 @@ var builtInBubbleStyles = Object.freeze([Object.freeze({
|
|
|
13462
13462
|
textStyle: "default"
|
|
13463
13463
|
})]);
|
|
13464
13464
|
var EXTENSION_DOCS_URI = "https://kubohiroya.github.io/turbowarp-bubble/";
|
|
13465
|
-
var EXTENSION_VERSION = "0.
|
|
13465
|
+
var EXTENSION_VERSION = "0.17.0";
|
|
13466
13466
|
var BLOCK_ICON_URI = extensionConfig$1.blockIconURI;
|
|
13467
13467
|
function extensionError(message) {
|
|
13468
13468
|
const error = /* @__PURE__ */ new Error(`[Bubble] ${message}`);
|
package/docs/block-manual.ja.md
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
|
|
9
9
|
## 1. 必要な拡張機能
|
|
10
10
|
|
|
11
|
-
入力待ちを含む完全な例では5つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variablesを追加し、選択した機能に必要なカスタム拡張機能を「サンドボックスなしで実行」を許可して読み込みます。BubbleはSVG Text 0.
|
|
11
|
+
入力待ちを含む完全な例では5つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variablesを追加し、選択した機能に必要なカスタム拡張機能を「サンドボックスなしで実行」を許可して読み込みます。BubbleはSVG Text 0.14.0のhost-neutral layout providerをbundle内に持ち、既定のSVG overlayではskinを作りません。portrait、lip-sync、continue indicator、フルボイス、表示効果音などのメディアアセットにはAsset Cacheが必要です。Async InputとRuntime Expressionはconditionを使うBubble待機またはclose policyで必要です。timeoutだけのclose policyにはどちらも不要です。
|
|
12
12
|
|
|
13
|
-
| 順番 | 拡張機能
|
|
14
|
-
| ---: |
|
|
15
|
-
| 1 | Temporary Variables
|
|
16
|
-
| 2 | Async Input 0.
|
|
17
|
-
| 3 | Runtime Expression 0.
|
|
18
|
-
| 4 | Asset Cache 0.
|
|
19
|
-
| 5 | Bubble 0.
|
|
13
|
+
| 順番 | 拡張機能 | 読み込み先 |
|
|
14
|
+
| ---: | ------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| 1 | Temporary Variables | TurboWarpの拡張機能ライブラリから追加 |
|
|
16
|
+
| 2 | Async Input 0.12.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.12.0/dist/async-input.js` |
|
|
17
|
+
| 3 | Runtime Expression 0.10.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.10.0/dist/runtime-expression.js` |
|
|
18
|
+
| 4 | Asset Cache 0.7.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.7.0/dist/asset-cache.js` |
|
|
19
|
+
| 5 | Bubble 0.17.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.17.0/dist/turbowarp-bubble.js` |
|
|
20
20
|
|
|
21
21
|
開発中のBubbleを試す場合は、このリポジトリの`dist/turbowarp-bubble.js`をローカルカスタム拡張機能として読み込みます。既定SVG overlayに必要なrenderer APIがない場合、画像・メディア機能の使用時にAsset Cacheがない場合、condition待機の開始時にAsync InputかRuntime Expressionがない場合は、Bubbleが明示的なエラーを返します。低レベルComposition APIでは別のtext capabilityを注入できます。
|
|
22
22
|
|
|
@@ -59,7 +59,7 @@ URL画像を使う場合は、`RESOURCE_ID`へHTTPS URLを指定します。Bubb
|
|
|
59
59
|
|
|
60
60
|
## 3. 文字layout styleを選ぶ
|
|
61
61
|
|
|
62
|
-
standalone BubbleはSVG Text 0.
|
|
62
|
+
standalone BubbleはSVG Text 0.14.0のlayout compositionを内包し、2つのBubble styleを組み込みます。`say`はspeech本体とspeech tail、`think`はthought本体とround trailを持ち、本体とtail/trailの形は別項目ではなく1つのvisual styleとして選びます。短い`say [MESSAGE]`/`think [MESSAGE]`ブロックが対応styleを自動選択するため、基本経路にはstyle定義もstyle入力も不要です。どちらも予約text profile `default`、内容に追従するサイズ、14px Helvetica、右側優先・収まりに応じた左反転、block入力の330文字上限、空文字でのcloseを使います。4pxのSVG strokeを白いfillより先に描き、内側半分を隠すことで、見かけの輪郭をTurboWarp標準と同じ細さにします。それ以外のtext style名やstyle設定ブロックを使うとcustom profileになります。custom text styleは初回参照時に背景透明のSVG Text既定styleとして初期化されます。stock SVG Text 0.14.0をBubbleより先に別拡張として読み込んだprojectでは、Bubbleが公開`getLayoutCapability()`を使い、SVG Text blockで定義したnamed styleを維持します。handoffのない古いSVG Textがロード済みならstyleを黙って置換せず互換errorを返し、必要な場合だけ文書化済みscratch-render fallbackを選択します。
|
|
63
63
|
|
|
64
64
|
```text
|
|
65
65
|
define bubble style [hero-dialogue] using text style [default]
|
|
@@ -328,7 +328,7 @@ cloneが停止・削除された場合は、そのtargetに属するtimer、over
|
|
|
328
328
|
|
|
329
329
|
| 状況 | 原因と対処 |
|
|
330
330
|
| ------------------------------------ | ------------------------------------------------------------------------ |
|
|
331
|
-
| Asset Cacheを要求するエラー | 画像・メディアアセットを使う前にAsset Cache 0.
|
|
331
|
+
| Asset Cacheを要求するエラー | 画像・メディアアセットを使う前にAsset Cache 0.7.0を読み込む |
|
|
332
332
|
| SVG overlay backendのエラー | `renderer.addOverlay()`対応hostを使うか`scratch-render`を明示する |
|
|
333
333
|
| Async Inputを要求するエラー | Bubble待機より前にAsync Input 0.3.xをサンドボックスなしで読み込む |
|
|
334
334
|
| Runtime Expressionを要求するエラー | Bubble待機より前にRuntime Expression 0.3.xをサンドボックスなしで読み込む |
|
package/docs/block-manual.md
CHANGED
|
@@ -8,15 +8,15 @@ This manual explains how to use `turbowarp-bubble` as an unsandboxed TurboWarp c
|
|
|
8
8
|
|
|
9
9
|
## 1. Load the required extensions
|
|
10
10
|
|
|
11
|
-
The complete input-wait example uses five extensions. Add Temporary Variables from TurboWarp's extension library, then load the custom extensions needed by the selected features with **Run without sandbox** enabled. Bubble bundles the host-neutral SVG Text 0.
|
|
11
|
+
The complete input-wait example uses five extensions. Add Temporary Variables from TurboWarp's extension library, then load the custom extensions needed by the selected features with **Run without sandbox** enabled. Bubble bundles the host-neutral SVG Text 0.14.0 layout provider and creates no text skin on its default SVG overlay. Asset Cache is required for portrait, lip-sync, continue indicator, voice, and display-sound assets. Async Input and Runtime Expression are required only for condition-based Bubble waits and close policies; a timeout-only close policy needs neither.
|
|
12
12
|
|
|
13
|
-
| Order | Extension
|
|
14
|
-
| ----: |
|
|
15
|
-
| 1 | Temporary Variables
|
|
16
|
-
| 2 | Async Input 0.
|
|
17
|
-
| 3 | Runtime Expression 0.
|
|
18
|
-
| 4 | Asset Cache 0.
|
|
19
|
-
| 5 | Bubble 0.
|
|
13
|
+
| Order | Extension | URL |
|
|
14
|
+
| ----: | ------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| 1 | Temporary Variables | Add from the TurboWarp extension library |
|
|
16
|
+
| 2 | Async Input 0.12.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.12.0/dist/async-input.js` |
|
|
17
|
+
| 3 | Runtime Expression 0.10.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.10.0/dist/runtime-expression.js` |
|
|
18
|
+
| 4 | Asset Cache 0.7.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.7.0/dist/asset-cache.js` |
|
|
19
|
+
| 5 | Bubble 0.17.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.17.0/dist/turbowarp-bubble.js` |
|
|
20
20
|
|
|
21
21
|
To try a development build, load this repository's `dist/turbowarp-bubble.js` as a local custom extension. Bubble reports an explicit error if the renderer lacks the default SVG overlay APIs, if an image/media feature is used without Asset Cache, or if Async Input or Runtime Expression is missing when it starts a condition-based Bubble wait. The lower-level Composition API can inject another text capability.
|
|
22
22
|
|
|
@@ -59,7 +59,7 @@ For a remote image, pass its HTTPS URL as `RESOURCE_ID`. Bubble accepts only ass
|
|
|
59
59
|
|
|
60
60
|
## 3. Select a text layout style
|
|
61
61
|
|
|
62
|
-
Standalone Bubble bundles the SVG Text 0.
|
|
62
|
+
Standalone Bubble bundles the SVG Text 0.14.0 layout composition and installs two Bubble styles: `say` owns the speech body and speech tail, while `think` owns the thought body and round trail. A style's body and tail/trail shapes are one visual choice, not separately selected properties. The short `say [MESSAGE]` and `think [MESSAGE]` blocks select the matching style automatically, so the basic path needs neither a style definition nor a style input. Both styles use the reserved text profile `default`, a content-sized body, 14px Helvetica text, right-first placement with a fit-dependent left flip, 330-character block-input limit, and empty-message close behavior. Their 4px SVG stroke is painted before the white fill, hiding the inner half so the visible outline matches TurboWarp's standard bubble. Any other text style name or explicit style-setting block selects the custom profile. Custom text styles are initialized on first use with transparent-background SVG Text defaults. If a project separately loads the stock SVG Text 0.14.0 extension before Bubble, Bubble uses its public `getLayoutCapability()` instead and preserves the named styles defined by SVG Text blocks. An older loaded SVG Text extension without that handoff produces an explicit compatibility error rather than silently replacing the style; select the documented scratch-render fallback only when needed.
|
|
63
63
|
|
|
64
64
|
```text
|
|
65
65
|
define bubble style [hero-dialogue] using text style [default]
|
|
@@ -328,7 +328,7 @@ Saved projects using the former `say/think [MESSAGE] with bubble style [STYLE]`
|
|
|
328
328
|
|
|
329
329
|
| Symptom | Cause and solution |
|
|
330
330
|
| ------------------------------------ | ------------------------------------------------------------------------------- |
|
|
331
|
-
| Asset Cache required error | Load Asset Cache 0.
|
|
331
|
+
| Asset Cache required error | Load Asset Cache 0.7.0 without sandbox before using image/media assets |
|
|
332
332
|
| SVG overlay backend error | Use a host with `renderer.addOverlay()` or explicitly select `scratch-render` |
|
|
333
333
|
| Async Input required error | Load Async Input 0.3.x without sandbox before using the Bubble wait |
|
|
334
334
|
| Runtime Expression required error | Load Runtime Expression 0.3.x without sandbox before using the Bubble wait |
|
package/docs/index.html
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
</blockquote>
|
|
66
66
|
<p><img src="./assets/block-quick-start.svg" alt="A quick-start block sequence that registers Next1 and Next2 separately, prepares input listeners, then uses Bubble's integrated wait"></p>
|
|
67
67
|
<h2 id="requirements">1. Load the required extensions</h2>
|
|
68
|
-
<p>The complete input-wait example uses five extensions. Add Temporary Variables from TurboWarp's extension library, then load the custom extensions needed by the selected features with <strong>Run without sandbox</strong> enabled. Bubble bundles the host-neutral SVG Text 0.
|
|
68
|
+
<p>The complete input-wait example uses five extensions. Add Temporary Variables from TurboWarp's extension library, then load the custom extensions needed by the selected features with <strong>Run without sandbox</strong> enabled. Bubble bundles the host-neutral SVG Text 0.14.0 layout provider and creates no text skin on its default SVG overlay. Asset Cache is required for portrait, lip-sync, continue indicator, voice, and display-sound assets. Async Input and Runtime Expression are required only for condition-based Bubble waits and close policies; a timeout-only close policy needs neither.</p>
|
|
69
69
|
<table>
|
|
70
70
|
<thead>
|
|
71
71
|
<tr>
|
|
@@ -81,23 +81,23 @@
|
|
|
81
81
|
</tr>
|
|
82
82
|
<tr>
|
|
83
83
|
<td align="right">2</td>
|
|
84
|
-
<td>Async Input 0.
|
|
85
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.
|
|
84
|
+
<td>Async Input 0.12.0</td>
|
|
85
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.12.0/dist/async-input.js</code></td>
|
|
86
86
|
</tr>
|
|
87
87
|
<tr>
|
|
88
88
|
<td align="right">3</td>
|
|
89
|
-
<td>Runtime Expression 0.
|
|
90
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.
|
|
89
|
+
<td>Runtime Expression 0.10.0</td>
|
|
90
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.10.0/dist/runtime-expression.js</code></td>
|
|
91
91
|
</tr>
|
|
92
92
|
<tr>
|
|
93
93
|
<td align="right">4</td>
|
|
94
|
-
<td>Asset Cache 0.
|
|
95
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.
|
|
94
|
+
<td>Asset Cache 0.7.0</td>
|
|
95
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.7.0/dist/asset-cache.js</code></td>
|
|
96
96
|
</tr>
|
|
97
97
|
<tr>
|
|
98
98
|
<td align="right">5</td>
|
|
99
|
-
<td>Bubble 0.
|
|
100
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.
|
|
99
|
+
<td>Bubble 0.17.0</td>
|
|
100
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.17.0/dist/turbowarp-bubble.js</code></td>
|
|
101
101
|
</tr>
|
|
102
102
|
</tbody></table>
|
|
103
103
|
<p>To try a development build, load this repository's <code>dist/turbowarp-bubble.js</code> as a local custom extension. Bubble reports an explicit error if the renderer lacks the default SVG overlay APIs, if an image/media feature is used without Asset Cache, or if Async Input or Runtime Expression is missing when it starts a condition-based Bubble wait. The lower-level Composition API can inject another text capability.</p>
|
|
@@ -166,7 +166,7 @@ register resource [costume:Assets:Next2] as asset [Next2]
|
|
|
166
166
|
</code></pre>
|
|
167
167
|
<p>For a remote image, pass its HTTPS URL as <code>RESOURCE_ID</code>. Bubble accepts only assets already registered with Asset Cache whose MIME type is <code>image/*</code>.</p>
|
|
168
168
|
<h2 id="text-style">3. Select a text layout style</h2>
|
|
169
|
-
<p>Standalone Bubble bundles the SVG Text 0.
|
|
169
|
+
<p>Standalone Bubble bundles the SVG Text 0.14.0 layout composition and installs two Bubble styles: <code>say</code> owns the speech body and speech tail, while <code>think</code> owns the thought body and round trail. A style's body and tail/trail shapes are one visual choice, not separately selected properties. The short <code>say [MESSAGE]</code> and <code>think [MESSAGE]</code> blocks select the matching style automatically, so the basic path needs neither a style definition nor a style input. Both styles use the reserved text profile <code>default</code>, a content-sized body, 14px Helvetica text, right-first placement with a fit-dependent left flip, 330-character block-input limit, and empty-message close behavior. Their 4px SVG stroke is painted before the white fill, hiding the inner half so the visible outline matches TurboWarp's standard bubble. Any other text style name or explicit style-setting block selects the custom profile. Custom text styles are initialized on first use with transparent-background SVG Text defaults. If a project separately loads the stock SVG Text 0.14.0 extension before Bubble, Bubble uses its public <code>getLayoutCapability()</code> instead and preserves the named styles defined by SVG Text blocks. An older loaded SVG Text extension without that handoff produces an explicit compatibility error rather than silently replacing the style; select the documented scratch-render fallback only when needed.</p>
|
|
170
170
|
<pre><code class="language-text">define bubble style [hero-dialogue] using text style [default]
|
|
171
171
|
</code></pre>
|
|
172
172
|
<p>Application hosts that need custom fonts, colors, or alignment can define styles on <code>createSvgTextLayoutComposition()</code> and inject them through <code>createSvgTextOverlayTextCapability()</code>. The custom profile uses the same <code>layoutText()</code> API and does not create an SVG text skin on the default overlay backend. Bubble owns placement, tail, and outer shape.</p>
|
|
@@ -499,7 +499,7 @@ animate bubble shape to [WAVY] speed [1] for [0.5] seconds
|
|
|
499
499
|
</thead>
|
|
500
500
|
<tbody><tr>
|
|
501
501
|
<td>Asset Cache required error</td>
|
|
502
|
-
<td>Load Asset Cache 0.
|
|
502
|
+
<td>Load Asset Cache 0.7.0 without sandbox before using image/media assets</td>
|
|
503
503
|
</tr>
|
|
504
504
|
<tr>
|
|
505
505
|
<td>SVG overlay backend error</td>
|
package/docs/ja/index.html
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
</blockquote>
|
|
66
66
|
<p><img src="../assets/block-quick-start.svg" alt="Next1とNext2を個別登録し、入力listenerを準備してBubble内蔵待機を使うブロック例"></p>
|
|
67
67
|
<h2 id="requirements">1. 必要な拡張機能</h2>
|
|
68
|
-
<p>入力待ちを含む完全な例では5つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variablesを追加し、選択した機能に必要なカスタム拡張機能を「サンドボックスなしで実行」を許可して読み込みます。BubbleはSVG Text 0.
|
|
68
|
+
<p>入力待ちを含む完全な例では5つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variablesを追加し、選択した機能に必要なカスタム拡張機能を「サンドボックスなしで実行」を許可して読み込みます。BubbleはSVG Text 0.14.0のhost-neutral layout providerをbundle内に持ち、既定のSVG overlayではskinを作りません。portrait、lip-sync、continue indicator、フルボイス、表示効果音などのメディアアセットにはAsset Cacheが必要です。Async InputとRuntime Expressionはconditionを使うBubble待機またはclose policyで必要です。timeoutだけのclose policyにはどちらも不要です。</p>
|
|
69
69
|
<table>
|
|
70
70
|
<thead>
|
|
71
71
|
<tr>
|
|
@@ -81,23 +81,23 @@
|
|
|
81
81
|
</tr>
|
|
82
82
|
<tr>
|
|
83
83
|
<td align="right">2</td>
|
|
84
|
-
<td>Async Input 0.
|
|
85
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.
|
|
84
|
+
<td>Async Input 0.12.0</td>
|
|
85
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.12.0/dist/async-input.js</code></td>
|
|
86
86
|
</tr>
|
|
87
87
|
<tr>
|
|
88
88
|
<td align="right">3</td>
|
|
89
|
-
<td>Runtime Expression 0.
|
|
90
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.
|
|
89
|
+
<td>Runtime Expression 0.10.0</td>
|
|
90
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.10.0/dist/runtime-expression.js</code></td>
|
|
91
91
|
</tr>
|
|
92
92
|
<tr>
|
|
93
93
|
<td align="right">4</td>
|
|
94
|
-
<td>Asset Cache 0.
|
|
95
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.
|
|
94
|
+
<td>Asset Cache 0.7.0</td>
|
|
95
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.7.0/dist/asset-cache.js</code></td>
|
|
96
96
|
</tr>
|
|
97
97
|
<tr>
|
|
98
98
|
<td align="right">5</td>
|
|
99
|
-
<td>Bubble 0.
|
|
100
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.
|
|
99
|
+
<td>Bubble 0.17.0</td>
|
|
100
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.17.0/dist/turbowarp-bubble.js</code></td>
|
|
101
101
|
</tr>
|
|
102
102
|
</tbody></table>
|
|
103
103
|
<p>開発中のBubbleを試す場合は、このリポジトリの<code>dist/turbowarp-bubble.js</code>をローカルカスタム拡張機能として読み込みます。既定SVG overlayに必要なrenderer APIがない場合、画像・メディア機能の使用時にAsset Cacheがない場合、condition待機の開始時にAsync InputかRuntime Expressionがない場合は、Bubbleが明示的なエラーを返します。低レベルComposition APIでは別のtext capabilityを注入できます。</p>
|
|
@@ -166,7 +166,7 @@ register resource [costume:Assets:Next2] as asset [Next2]
|
|
|
166
166
|
</code></pre>
|
|
167
167
|
<p>URL画像を使う場合は、<code>RESOURCE_ID</code>へHTTPS URLを指定します。Bubbleに設定できるのは、Asset Cacheへ登録済みでMIME typeが<code>image/*</code>のアセットだけです。</p>
|
|
168
168
|
<h2 id="text-style">3. 文字layout styleを選ぶ</h2>
|
|
169
|
-
<p>standalone BubbleはSVG Text 0.
|
|
169
|
+
<p>standalone BubbleはSVG Text 0.14.0のlayout compositionを内包し、2つのBubble styleを組み込みます。<code>say</code>はspeech本体とspeech tail、<code>think</code>はthought本体とround trailを持ち、本体とtail/trailの形は別項目ではなく1つのvisual styleとして選びます。短い<code>say [MESSAGE]</code>/<code>think [MESSAGE]</code>ブロックが対応styleを自動選択するため、基本経路にはstyle定義もstyle入力も不要です。どちらも予約text profile <code>default</code>、内容に追従するサイズ、14px Helvetica、右側優先・収まりに応じた左反転、block入力の330文字上限、空文字でのcloseを使います。4pxのSVG strokeを白いfillより先に描き、内側半分を隠すことで、見かけの輪郭をTurboWarp標準と同じ細さにします。それ以外のtext style名やstyle設定ブロックを使うとcustom profileになります。custom text styleは初回参照時に背景透明のSVG Text既定styleとして初期化されます。stock SVG Text 0.14.0をBubbleより先に別拡張として読み込んだprojectでは、Bubbleが公開<code>getLayoutCapability()</code>を使い、SVG Text blockで定義したnamed styleを維持します。handoffのない古いSVG Textがロード済みならstyleを黙って置換せず互換errorを返し、必要な場合だけ文書化済みscratch-render fallbackを選択します。</p>
|
|
170
170
|
<pre><code class="language-text">define bubble style [hero-dialogue] using text style [default]
|
|
171
171
|
</code></pre>
|
|
172
172
|
<p>独自のfont、色、alignmentを使うアプリhostは、<code>createSvgTextLayoutComposition()</code>へstyleを定義し、<code>createSvgTextOverlayTextCapability()</code>でBubbleへ注入します。custom profileは同じ<code>layoutText()</code>を使い、既定overlay backendではSVG文字skinを生成しません。Bubbleの配置、tail、吹き出し外形はBubble側が担当します。</p>
|
|
@@ -499,7 +499,7 @@ animate bubble shape to [WAVY] speed [1] for [0.5] seconds
|
|
|
499
499
|
</thead>
|
|
500
500
|
<tbody><tr>
|
|
501
501
|
<td>Asset Cacheを要求するエラー</td>
|
|
502
|
-
<td>画像・メディアアセットを使う前にAsset Cache 0.
|
|
502
|
+
<td>画像・メディアアセットを使う前にAsset Cache 0.7.0を読み込む</td>
|
|
503
503
|
</tr>
|
|
504
504
|
<tr>
|
|
505
505
|
<td>SVG overlay backendのエラー</td>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-bubble",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Composable say and think bubbles with portrait layers and animated continue indicators for TurboWarp.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Hiroya Kubo",
|
|
@@ -88,9 +88,9 @@
|
|
|
88
88
|
"pages:build": "node scripts/prepare-pages.mjs"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@kubohiroya/turbowarp-asset-cache": "^0.
|
|
92
|
-
"@kubohiroya/turbowarp-async-input": "^0.
|
|
93
|
-
"@kubohiroya/turbowarp-runtime-expression": "^0.
|
|
91
|
+
"@kubohiroya/turbowarp-asset-cache": "^0.7.0",
|
|
92
|
+
"@kubohiroya/turbowarp-async-input": "^0.12.0",
|
|
93
|
+
"@kubohiroya/turbowarp-runtime-expression": "^0.10.0"
|
|
94
94
|
},
|
|
95
95
|
"peerDependenciesMeta": {
|
|
96
96
|
"@kubohiroya/turbowarp-async-input": {
|
|
@@ -105,12 +105,12 @@
|
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@eslint/js": "^10.0.1",
|
|
108
|
-
"@kubohiroya/turbowarp-asset-cache": "^0.
|
|
109
|
-
"@kubohiroya/turbowarp-async-input": "^0.
|
|
110
|
-
"@kubohiroya/turbowarp-extension-data-editor": "^0.
|
|
108
|
+
"@kubohiroya/turbowarp-asset-cache": "^0.7.0",
|
|
109
|
+
"@kubohiroya/turbowarp-async-input": "^0.12.0",
|
|
110
|
+
"@kubohiroya/turbowarp-extension-data-editor": "^0.8.1",
|
|
111
111
|
"@kubohiroya/turbowarp-extension-manifest": "^0.5.0",
|
|
112
|
-
"@kubohiroya/turbowarp-runtime-expression": "^0.
|
|
113
|
-
"@kubohiroya/vite-plugin-turbowarp-extension": "^0.
|
|
112
|
+
"@kubohiroya/turbowarp-runtime-expression": "^0.10.0",
|
|
113
|
+
"@kubohiroya/vite-plugin-turbowarp-extension": "^0.11.0",
|
|
114
114
|
"@types/node": "^26.1.2",
|
|
115
115
|
"eslint": "^10.8.0",
|
|
116
116
|
"happy-dom": "20.0.8",
|
|
@@ -135,6 +135,6 @@
|
|
|
135
135
|
],
|
|
136
136
|
"dependencies": {
|
|
137
137
|
"@cto.af/linebreak": "4.0.3",
|
|
138
|
-
"@kubohiroya/turbowarp-svg-text": "^0.
|
|
138
|
+
"@kubohiroya/turbowarp-svg-text": "^0.14.0"
|
|
139
139
|
}
|
|
140
140
|
}
|