@kubohiroya/turbowarp-bubble 0.13.4 → 0.14.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.
@@ -8,15 +8,15 @@
8
8
 
9
9
  ## 1. 必要な拡張機能
10
10
 
11
- 入力待ちを含む完全な例では5つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variablesを追加し、選択した機能に必要なカスタム拡張機能を「サンドボックスなしで実行」を許可して読み込みます。BubbleはSVG Text 0.10.1の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にはどちらも不要です。
11
+ 入力待ちを含む完全な例では5つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variablesを追加し、選択した機能に必要なカスタム拡張機能を「サンドボックスなしで実行」を許可して読み込みます。BubbleはSVG Text 0.11.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
13
  | 順番 | 拡張機能 | 読み込み先 |
14
14
  | ---: | ------------------------ | -------------------------------------------------------------------------------------------------------- |
15
15
  | 1 | Temporary Variables | TurboWarpの拡張機能ライブラリから追加 |
16
- | 2 | Async Input 0.8.1 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.8.1/dist/async-input.js` |
17
- | 3 | Runtime Expression 0.6.1 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.6.1/dist/runtime-expression.js` |
18
- | 4 | Asset Cache 0.3.1 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.3.1/dist/asset-cache.js` |
19
- | 5 | Bubble 0.13.4 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.4/dist/turbowarp-bubble.js` |
16
+ | 2 | Async Input 0.9.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.9.0/dist/async-input.js` |
17
+ | 3 | Runtime Expression 0.7.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.7.0/dist/runtime-expression.js` |
18
+ | 4 | Asset Cache 0.4.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.4.0/dist/asset-cache.js` |
19
+ | 5 | Bubble 0.14.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.14.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.10.1の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.10.1をBubbleより先に別拡張として読み込んだprojectでは、Bubbleが公開`getLayoutCapability()`を使い、SVG Text blockで定義したnamed styleを維持します。handoffのない古いSVG Textがロード済みならstyleを黙って置換せず互換errorを返し、必要な場合だけ文書化済みscratch-render fallbackを選択します。
62
+ standalone BubbleはSVG Text 0.11.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.11.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.3.1を読み込む |
331
+ | Asset Cacheを要求するエラー | 画像・メディアアセットを使う前にAsset Cache 0.4.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をサンドボックスなしで読み込む |
@@ -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.10.1 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.
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.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
13
  | Order | Extension | URL |
14
14
  | ----: | ------------------------ | -------------------------------------------------------------------------------------------------------- |
15
15
  | 1 | Temporary Variables | Add from the TurboWarp extension library |
16
- | 2 | Async Input 0.8.1 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.8.1/dist/async-input.js` |
17
- | 3 | Runtime Expression 0.6.1 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.6.1/dist/runtime-expression.js` |
18
- | 4 | Asset Cache 0.3.1 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.3.1/dist/asset-cache.js` |
19
- | 5 | Bubble 0.13.4 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.4/dist/turbowarp-bubble.js` |
16
+ | 2 | Async Input 0.9.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.9.0/dist/async-input.js` |
17
+ | 3 | Runtime Expression 0.7.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.7.0/dist/runtime-expression.js` |
18
+ | 4 | Asset Cache 0.4.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.4.0/dist/asset-cache.js` |
19
+ | 5 | Bubble 0.14.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.14.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.10.1 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.10.1 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.
62
+ Standalone Bubble bundles the SVG Text 0.11.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.11.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.3.1 without sandbox before using image/media assets |
331
+ | Asset Cache required error | Load Asset Cache 0.4.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
@@ -19,13 +19,9 @@
19
19
  .header-inner { display: flex; width: min(70rem, calc(100% - 2rem)); min-height: 4.25rem; margin-inline: auto; align-items: center; gap: 1rem; }
20
20
  .brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 800; text-decoration: none; white-space: nowrap; }
21
21
  .brand-mark { display: grid; width: 2rem; height: 2rem; place-items: center; color: #fff; background: linear-gradient(145deg, #ff6680, #b83255); border-radius: .7rem .7rem .7rem .25rem; box-shadow: 0 7px 18px #b8325559; }
22
+ .primary-nav a { color: var(--muted); text-decoration: none; }
23
+ .primary-nav a:hover { color: var(--ink); }
22
24
  .primary-nav { display: flex; align-items: center; gap: 1rem; margin-left: auto; font-size: .9rem; }
23
- .primary-nav a, .github-link { color: var(--muted); text-decoration: none; }
24
- .primary-nav a:hover, .github-link:hover { color: var(--ink); }
25
- .github-link { padding: .38rem .55rem; border-radius: .6rem; font-size: .84rem; font-weight: 750; }
26
- .language-switch { display: inline-flex; flex: 0 0 auto; padding: .2rem; border: 1px solid var(--line); border-radius: 99rem; background: var(--panel); white-space: nowrap; }
27
- .language-switch a { padding: .26rem .58rem; border-radius: 99rem; color: var(--muted); font-size: .82rem; font-weight: 750; text-decoration: none; }
28
- .language-switch a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }
29
25
  .manual { width: min(1080px, calc(100% - 2rem)); margin: 2rem auto 4rem; padding: clamp(1rem, 4vw, 3.5rem); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 36px #25283a12; }
30
26
  h1, h2, h3 { line-height: 1.35; scroll-margin-top: 5rem; }
31
27
  h1 { margin-top: 0; font-size: clamp(1.9rem, 4vw, 2.8rem); }
@@ -40,8 +36,8 @@
40
36
  pre code { padding: 0; color: inherit; background: transparent; }
41
37
  blockquote { margin-left: 0; padding: .25rem 1rem; color: var(--muted); border-left: 4px solid var(--accent); }
42
38
  .site-footer { padding: 0 1rem 3rem; color: var(--muted); text-align: center; font-size: .9rem; }
43
- @media (max-width: 850px) { .primary-nav { display: none; } .github-link { margin-left: auto; } }
44
- @media (max-width: 620px) { .brand-text { display: none; } .header-inner { gap: .4rem; } .github-link { padding-inline: .3rem; } .language-switch a { padding-inline: .45rem; } .manual { width: 100%; margin-top: 0; border-width: 0; border-radius: 0; box-shadow: none; } }
39
+ @media (max-width: 850px) { .primary-nav { display: none; } }
40
+ @media (max-width: 620px) { .brand-text { display: none; } .header-inner { gap: .4rem; } .manual { width: 100%; margin-top: 0; border-width: 0; border-radius: 0; box-shadow: none; } }
45
41
  @media print { .site-header, .skip-link { display: none; } body { background: #fff; } }
46
42
  </style>
47
43
  </head>
@@ -59,11 +55,6 @@
59
55
  <a href="#lifecycle">Display &amp; wait</a>
60
56
  <a href="#reference">Block reference</a>
61
57
  </nav>
62
- <a class="github-link" href="https://github.com/kubohiroya/turbowarp-bubble">GitHub</a>
63
- <nav class="language-switch" aria-label="Language">
64
- <a href="./" lang="en" hreflang="en" aria-current="page">English</a>
65
- <a href="./ja/" lang="ja" hreflang="ja">日本語</a>
66
- </nav>
67
58
  </div>
68
59
  </header>
69
60
  <main id="manual" class="manual">
@@ -74,7 +65,7 @@
74
65
  </blockquote>
75
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&#39;s integrated wait"></p>
76
67
  <h2 id="requirements">1. Load the required extensions</h2>
77
- <p>The complete input-wait example uses five extensions. Add Temporary Variables from TurboWarp&#39;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.10.1 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>
68
+ <p>The complete input-wait example uses five extensions. Add Temporary Variables from TurboWarp&#39;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.11.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>
78
69
  <table>
79
70
  <thead>
80
71
  <tr>
@@ -90,23 +81,23 @@
90
81
  </tr>
91
82
  <tr>
92
83
  <td align="right">2</td>
93
- <td>Async Input 0.8.1</td>
94
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.8.1/dist/async-input.js</code></td>
84
+ <td>Async Input 0.9.0</td>
85
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.9.0/dist/async-input.js</code></td>
95
86
  </tr>
96
87
  <tr>
97
88
  <td align="right">3</td>
98
- <td>Runtime Expression 0.6.1</td>
99
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.6.1/dist/runtime-expression.js</code></td>
89
+ <td>Runtime Expression 0.7.0</td>
90
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.7.0/dist/runtime-expression.js</code></td>
100
91
  </tr>
101
92
  <tr>
102
93
  <td align="right">4</td>
103
- <td>Asset Cache 0.3.1</td>
104
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.3.1/dist/asset-cache.js</code></td>
94
+ <td>Asset Cache 0.4.0</td>
95
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.4.0/dist/asset-cache.js</code></td>
105
96
  </tr>
106
97
  <tr>
107
98
  <td align="right">5</td>
108
- <td>Bubble 0.13.4</td>
109
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.4/dist/turbowarp-bubble.js</code></td>
99
+ <td>Bubble 0.14.0</td>
100
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.14.0/dist/turbowarp-bubble.js</code></td>
110
101
  </tr>
111
102
  </tbody></table>
112
103
  <p>To try a development build, load this repository&#39;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>
@@ -175,7 +166,7 @@ register resource [costume:Assets:Next2] as asset [Next2]
175
166
  </code></pre>
176
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>
177
168
  <h2 id="text-style">3. Select a text layout style</h2>
178
- <p>Standalone Bubble bundles the SVG Text 0.10.1 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&#39;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&#39;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.10.1 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>
169
+ <p>Standalone Bubble bundles the SVG Text 0.11.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&#39;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&#39;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.11.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>
179
170
  <pre><code class="language-text">define bubble style [hero-dialogue] using text style [default]
180
171
  </code></pre>
181
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>
@@ -508,7 +499,7 @@ animate bubble shape to [WAVY] speed [1] for [0.5] seconds
508
499
  </thead>
509
500
  <tbody><tr>
510
501
  <td>Asset Cache required error</td>
511
- <td>Load Asset Cache 0.3.1 without sandbox before using image/media assets</td>
502
+ <td>Load Asset Cache 0.4.0 without sandbox before using image/media assets</td>
512
503
  </tr>
513
504
  <tr>
514
505
  <td>SVG overlay backend error</td>
@@ -2603,5 +2594,9 @@ pnpm docs:check
2603
2594
  </p>
2604
2595
  </section>
2605
2596
 
2597
+ <!-- The shared TurboWarp Plus header. It inserts itself at the top of the
2598
+ page in a shadow root, so it cannot disturb the styles below. -->
2599
+ <script type="module"
2600
+ src="https://kubohiroya.github.io/turbowarp-plus-site-header/dist/auto.js"></script>
2606
2601
  </body>
2607
2602
  </html>
@@ -19,13 +19,9 @@
19
19
  .header-inner { display: flex; width: min(70rem, calc(100% - 2rem)); min-height: 4.25rem; margin-inline: auto; align-items: center; gap: 1rem; }
20
20
  .brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 800; text-decoration: none; white-space: nowrap; }
21
21
  .brand-mark { display: grid; width: 2rem; height: 2rem; place-items: center; color: #fff; background: linear-gradient(145deg, #ff6680, #b83255); border-radius: .7rem .7rem .7rem .25rem; box-shadow: 0 7px 18px #b8325559; }
22
+ .primary-nav a { color: var(--muted); text-decoration: none; }
23
+ .primary-nav a:hover { color: var(--ink); }
22
24
  .primary-nav { display: flex; align-items: center; gap: 1rem; margin-left: auto; font-size: .9rem; }
23
- .primary-nav a, .github-link { color: var(--muted); text-decoration: none; }
24
- .primary-nav a:hover, .github-link:hover { color: var(--ink); }
25
- .github-link { padding: .38rem .55rem; border-radius: .6rem; font-size: .84rem; font-weight: 750; }
26
- .language-switch { display: inline-flex; flex: 0 0 auto; padding: .2rem; border: 1px solid var(--line); border-radius: 99rem; background: var(--panel); white-space: nowrap; }
27
- .language-switch a { padding: .26rem .58rem; border-radius: 99rem; color: var(--muted); font-size: .82rem; font-weight: 750; text-decoration: none; }
28
- .language-switch a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }
29
25
  .manual { width: min(1080px, calc(100% - 2rem)); margin: 2rem auto 4rem; padding: clamp(1rem, 4vw, 3.5rem); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 36px #25283a12; }
30
26
  h1, h2, h3 { line-height: 1.35; scroll-margin-top: 5rem; }
31
27
  h1 { margin-top: 0; font-size: clamp(1.9rem, 4vw, 2.8rem); }
@@ -40,8 +36,8 @@
40
36
  pre code { padding: 0; color: inherit; background: transparent; }
41
37
  blockquote { margin-left: 0; padding: .25rem 1rem; color: var(--muted); border-left: 4px solid var(--accent); }
42
38
  .site-footer { padding: 0 1rem 3rem; color: var(--muted); text-align: center; font-size: .9rem; }
43
- @media (max-width: 850px) { .primary-nav { display: none; } .github-link { margin-left: auto; } }
44
- @media (max-width: 620px) { .brand-text { display: none; } .header-inner { gap: .4rem; } .github-link { padding-inline: .3rem; } .language-switch a { padding-inline: .45rem; } .manual { width: 100%; margin-top: 0; border-width: 0; border-radius: 0; box-shadow: none; } }
39
+ @media (max-width: 850px) { .primary-nav { display: none; } }
40
+ @media (max-width: 620px) { .brand-text { display: none; } .header-inner { gap: .4rem; } .manual { width: 100%; margin-top: 0; border-width: 0; border-radius: 0; box-shadow: none; } }
45
41
  @media print { .site-header, .skip-link { display: none; } body { background: #fff; } }
46
42
  </style>
47
43
  </head>
@@ -59,11 +55,6 @@
59
55
  <a href="#lifecycle">表示と待機</a>
60
56
  <a href="#reference">ブロック一覧</a>
61
57
  </nav>
62
- <a class="github-link" href="https://github.com/kubohiroya/turbowarp-bubble">GitHub</a>
63
- <nav class="language-switch" aria-label="言語">
64
- <a href="../" lang="en" hreflang="en">English</a>
65
- <a href="./" lang="ja" hreflang="ja" aria-current="page">日本語</a>
66
- </nav>
67
58
  </div>
68
59
  </header>
69
60
  <main id="manual" class="manual">
@@ -74,7 +65,7 @@
74
65
  </blockquote>
75
66
  <p><img src="../assets/block-quick-start.svg" alt="Next1とNext2を個別登録し、入力listenerを準備してBubble内蔵待機を使うブロック例"></p>
76
67
  <h2 id="requirements">1. 必要な拡張機能</h2>
77
- <p>入力待ちを含む完全な例では5つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variablesを追加し、選択した機能に必要なカスタム拡張機能を「サンドボックスなしで実行」を許可して読み込みます。BubbleはSVG Text 0.10.1の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>
68
+ <p>入力待ちを含む完全な例では5つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variablesを追加し、選択した機能に必要なカスタム拡張機能を「サンドボックスなしで実行」を許可して読み込みます。BubbleはSVG Text 0.11.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>
78
69
  <table>
79
70
  <thead>
80
71
  <tr>
@@ -90,23 +81,23 @@
90
81
  </tr>
91
82
  <tr>
92
83
  <td align="right">2</td>
93
- <td>Async Input 0.8.1</td>
94
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.8.1/dist/async-input.js</code></td>
84
+ <td>Async Input 0.9.0</td>
85
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.9.0/dist/async-input.js</code></td>
95
86
  </tr>
96
87
  <tr>
97
88
  <td align="right">3</td>
98
- <td>Runtime Expression 0.6.1</td>
99
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.6.1/dist/runtime-expression.js</code></td>
89
+ <td>Runtime Expression 0.7.0</td>
90
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.7.0/dist/runtime-expression.js</code></td>
100
91
  </tr>
101
92
  <tr>
102
93
  <td align="right">4</td>
103
- <td>Asset Cache 0.3.1</td>
104
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.3.1/dist/asset-cache.js</code></td>
94
+ <td>Asset Cache 0.4.0</td>
95
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.4.0/dist/asset-cache.js</code></td>
105
96
  </tr>
106
97
  <tr>
107
98
  <td align="right">5</td>
108
- <td>Bubble 0.13.4</td>
109
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.4/dist/turbowarp-bubble.js</code></td>
99
+ <td>Bubble 0.14.0</td>
100
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.14.0/dist/turbowarp-bubble.js</code></td>
110
101
  </tr>
111
102
  </tbody></table>
112
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>
@@ -175,7 +166,7 @@ register resource [costume:Assets:Next2] as asset [Next2]
175
166
  </code></pre>
176
167
  <p>URL画像を使う場合は、<code>RESOURCE_ID</code>へHTTPS URLを指定します。Bubbleに設定できるのは、Asset Cacheへ登録済みでMIME typeが<code>image/*</code>のアセットだけです。</p>
177
168
  <h2 id="text-style">3. 文字layout styleを選ぶ</h2>
178
- <p>standalone BubbleはSVG Text 0.10.1の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.10.1をBubbleより先に別拡張として読み込んだprojectでは、Bubbleが公開<code>getLayoutCapability()</code>を使い、SVG Text blockで定義したnamed styleを維持します。handoffのない古いSVG Textがロード済みならstyleを黙って置換せず互換errorを返し、必要な場合だけ文書化済みscratch-render fallbackを選択します。</p>
169
+ <p>standalone BubbleはSVG Text 0.11.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.11.0をBubbleより先に別拡張として読み込んだprojectでは、Bubbleが公開<code>getLayoutCapability()</code>を使い、SVG Text blockで定義したnamed styleを維持します。handoffのない古いSVG Textがロード済みならstyleを黙って置換せず互換errorを返し、必要な場合だけ文書化済みscratch-render fallbackを選択します。</p>
179
170
  <pre><code class="language-text">define bubble style [hero-dialogue] using text style [default]
180
171
  </code></pre>
181
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>
@@ -508,7 +499,7 @@ animate bubble shape to [WAVY] speed [1] for [0.5] seconds
508
499
  </thead>
509
500
  <tbody><tr>
510
501
  <td>Asset Cacheを要求するエラー</td>
511
- <td>画像・メディアアセットを使う前にAsset Cache 0.3.1を読み込む</td>
502
+ <td>画像・メディアアセットを使う前にAsset Cache 0.4.0を読み込む</td>
512
503
  </tr>
513
504
  <tr>
514
505
  <td>SVG overlay backendのエラー</td>
@@ -2603,5 +2594,9 @@ pnpm docs:check
2603
2594
  </p>
2604
2595
  </section>
2605
2596
 
2597
+ <!-- The shared TurboWarp Plus header. It inserts itself at the top of the
2598
+ page in a shadow root, so it cannot disturb the styles below. -->
2599
+ <script type="module"
2600
+ src="https://kubohiroya.github.io/turbowarp-plus-site-header/dist/auto.js"></script>
2606
2601
  </body>
2607
2602
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubohiroya/turbowarp-bubble",
3
- "version": "0.13.4",
3
+ "version": "0.14.0",
4
4
  "description": "Composable say and think bubbles with portrait layers and animated continue indicators for TurboWarp.",
5
5
  "author": "Hiroya Kubo <hiroya@cuc.ac.jp>",
6
6
  "type": "module",
@@ -34,6 +34,7 @@
34
34
  "./package.json": "./package.json"
35
35
  },
36
36
  "files": [
37
+ "assets/",
37
38
  "dist/",
38
39
  "docs/",
39
40
  "README.md",
@@ -80,9 +81,9 @@
80
81
  "test:fixed-inputs:native": "node --test tests/fixed-inputs.native.mjs"
81
82
  },
82
83
  "peerDependencies": {
83
- "@kubohiroya/turbowarp-asset-cache": "0.3.1",
84
- "@kubohiroya/turbowarp-async-input": "0.8.1",
85
- "@kubohiroya/turbowarp-runtime-expression": "0.6.1"
84
+ "@kubohiroya/turbowarp-asset-cache": "^0.4.0",
85
+ "@kubohiroya/turbowarp-async-input": "^0.9.0",
86
+ "@kubohiroya/turbowarp-runtime-expression": "^0.7.0"
86
87
  },
87
88
  "peerDependenciesMeta": {
88
89
  "@kubohiroya/turbowarp-async-input": {
@@ -97,12 +98,12 @@
97
98
  },
98
99
  "devDependencies": {
99
100
  "@eslint/js": "^10.0.1",
100
- "@kubohiroya/turbowarp-asset-cache": "0.3.1",
101
- "@kubohiroya/turbowarp-async-input": "0.8.1",
102
- "@kubohiroya/turbowarp-extension-data-editor": "0.2.1",
103
- "@kubohiroya/turbowarp-extension-manifest": "0.3.2",
104
- "@kubohiroya/turbowarp-runtime-expression": "0.6.1",
105
- "@kubohiroya/vite-plugin-turbowarp-extension": "0.6.1",
101
+ "@kubohiroya/turbowarp-asset-cache": "^0.4.0",
102
+ "@kubohiroya/turbowarp-async-input": "^0.9.0",
103
+ "@kubohiroya/turbowarp-extension-data-editor": "^0.3.4",
104
+ "@kubohiroya/turbowarp-extension-manifest": "^0.3.2",
105
+ "@kubohiroya/turbowarp-runtime-expression": "^0.7.0",
106
+ "@kubohiroya/vite-plugin-turbowarp-extension": "^0.8.0",
106
107
  "@types/node": "^26.1.2",
107
108
  "eslint": "^10.8.0",
108
109
  "happy-dom": "20.0.8",
@@ -127,6 +128,6 @@
127
128
  ],
128
129
  "dependencies": {
129
130
  "@cto.af/linebreak": "4.0.3",
130
- "@kubohiroya/turbowarp-svg-text": "0.10.1"
131
+ "@kubohiroya/turbowarp-svg-text": "^0.11.0"
131
132
  }
132
133
  }