@kubohiroya/turbowarp-bubble 0.11.0 → 0.12.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/docs/index.html CHANGED
@@ -74,7 +74,7 @@
74
74
  </blockquote>
75
75
  <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
76
  <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.8.1 layout provider and creates no text skin on its default SVG overlay. Asset Manager 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>
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.0 layout provider and creates no text skin on its default SVG overlay. Asset Manager 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
78
  <table>
79
79
  <thead>
80
80
  <tr>
@@ -90,23 +90,23 @@
90
90
  </tr>
91
91
  <tr>
92
92
  <td align="right">2</td>
93
- <td>Async Input 0.5.0</td>
94
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.5.0/dist/async-input.js</code></td>
93
+ <td>Async Input 0.7.0</td>
94
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.7.0/dist/async-input.js</code></td>
95
95
  </tr>
96
96
  <tr>
97
97
  <td align="right">3</td>
98
- <td>Runtime Expression 0.4.0</td>
99
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.4.0/dist/runtime-expression.js</code></td>
98
+ <td>Runtime Expression 0.6.0</td>
99
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.6.0/dist/runtime-expression.js</code></td>
100
100
  </tr>
101
101
  <tr>
102
102
  <td align="right">4</td>
103
- <td>Asset Manager 0.13.0</td>
104
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-manager@0.13.0/dist/asset-manager.js</code></td>
103
+ <td>Asset Manager 0.15.0</td>
104
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-manager@0.15.0/dist/asset-manager.js</code></td>
105
105
  </tr>
106
106
  <tr>
107
107
  <td align="right">5</td>
108
- <td>Bubble 0.11.0</td>
109
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.11.0/dist/turbowarp-bubble.js</code></td>
108
+ <td>Bubble 0.12.0</td>
109
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.12.0/dist/turbowarp-bubble.js</code></td>
110
110
  </tr>
111
111
  </tbody></table>
112
112
  <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 Manager, 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 +175,7 @@ register resource [costume:Assets:Next2] as asset [Next2]
175
175
  </code></pre>
176
176
  <p>For a remote image, pass its HTTPS URL as <code>RESOURCE_ID</code>. Bubble accepts only assets already registered with Asset Manager whose MIME type is <code>image/*</code>.</p>
177
177
  <h2 id="text-style">3. Select a text layout style</h2>
178
- <p>Standalone Bubble bundles the SVG Text 0.8.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.8.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>
178
+ <p>Standalone Bubble bundles the SVG Text 0.10.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.10.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
179
  <pre><code class="language-text">define bubble style [hero-dialogue] using text style [default]
180
180
  </code></pre>
181
181
  <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>
@@ -74,7 +74,7 @@
74
74
  </blockquote>
75
75
  <p><img src="../assets/block-quick-start.svg" alt="Next1とNext2を個別登録し、入力listenerを準備してBubble内蔵待機を使うブロック例"></p>
76
76
  <h2 id="requirements">1. 必要な拡張機能</h2>
77
- <p>入力待ちを含む完全な例では5つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variablesを追加し、選択した機能に必要なカスタム拡張機能を「サンドボックスなしで実行」を許可して読み込みます。BubbleはSVG Text 0.8.1のhost-neutral layout providerをbundle内に持ち、既定のSVG overlayではskinを作りません。portrait、lip-sync、continue indicator、フルボイス、表示効果音などのメディアアセットにはAsset Managerが必要です。Async InputとRuntime Expressionはconditionを使うBubble待機またはclose policyで必要です。timeoutだけのclose policyにはどちらも不要です。</p>
77
+ <p>入力待ちを含む完全な例では5つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variablesを追加し、選択した機能に必要なカスタム拡張機能を「サンドボックスなしで実行」を許可して読み込みます。BubbleはSVG Text 0.10.0のhost-neutral layout providerをbundle内に持ち、既定のSVG overlayではskinを作りません。portrait、lip-sync、continue indicator、フルボイス、表示効果音などのメディアアセットにはAsset Managerが必要です。Async InputとRuntime Expressionはconditionを使うBubble待機またはclose policyで必要です。timeoutだけのclose policyにはどちらも不要です。</p>
78
78
  <table>
79
79
  <thead>
80
80
  <tr>
@@ -90,23 +90,23 @@
90
90
  </tr>
91
91
  <tr>
92
92
  <td align="right">2</td>
93
- <td>Async Input 0.5.0</td>
94
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.5.0/dist/async-input.js</code></td>
93
+ <td>Async Input 0.7.0</td>
94
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.7.0/dist/async-input.js</code></td>
95
95
  </tr>
96
96
  <tr>
97
97
  <td align="right">3</td>
98
- <td>Runtime Expression 0.4.0</td>
99
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.4.0/dist/runtime-expression.js</code></td>
98
+ <td>Runtime Expression 0.6.0</td>
99
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.6.0/dist/runtime-expression.js</code></td>
100
100
  </tr>
101
101
  <tr>
102
102
  <td align="right">4</td>
103
- <td>Asset Manager 0.13.0</td>
104
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-manager@0.13.0/dist/asset-manager.js</code></td>
103
+ <td>Asset Manager 0.15.0</td>
104
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-manager@0.15.0/dist/asset-manager.js</code></td>
105
105
  </tr>
106
106
  <tr>
107
107
  <td align="right">5</td>
108
- <td>Bubble 0.11.0</td>
109
- <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.11.0/dist/turbowarp-bubble.js</code></td>
108
+ <td>Bubble 0.12.0</td>
109
+ <td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.12.0/dist/turbowarp-bubble.js</code></td>
110
110
  </tr>
111
111
  </tbody></table>
112
112
  <p>開発中のBubbleを試す場合は、このリポジトリの<code>dist/turbowarp-bubble.js</code>をローカルカスタム拡張機能として読み込みます。既定SVG overlayに必要なrenderer APIがない場合、画像・メディア機能の使用時にAsset Managerがない場合、condition待機の開始時にAsync InputかRuntime Expressionがない場合は、Bubbleが明示的なエラーを返します。低レベルComposition APIでは別のtext capabilityを注入できます。</p>
@@ -175,7 +175,7 @@ register resource [costume:Assets:Next2] as asset [Next2]
175
175
  </code></pre>
176
176
  <p>URL画像を使う場合は、<code>RESOURCE_ID</code>へHTTPS URLを指定します。Bubbleに設定できるのは、Asset Managerへ登録済みでMIME typeが<code>image/*</code>のアセットだけです。</p>
177
177
  <h2 id="text-style">3. 文字layout styleを選ぶ</h2>
178
- <p>standalone BubbleはSVG Text 0.8.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.8.1をBubbleより先に別拡張として読み込んだprojectでは、Bubbleが公開<code>getLayoutCapability()</code>を使い、SVG Text blockで定義したnamed styleを維持します。handoffのない古いSVG Textがロード済みならstyleを黙って置換せず互換errorを返し、必要な場合だけ文書化済みscratch-render fallbackを選択します。</p>
178
+ <p>standalone BubbleはSVG Text 0.10.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.10.0をBubbleより先に別拡張として読み込んだprojectでは、Bubbleが公開<code>getLayoutCapability()</code>を使い、SVG Text blockで定義したnamed styleを維持します。handoffのない古いSVG Textがロード済みならstyleを黙って置換せず互換errorを返し、必要な場合だけ文書化済みscratch-render fallbackを選択します。</p>
179
179
  <pre><code class="language-text">define bubble style [hero-dialogue] using text style [default]
180
180
  </code></pre>
181
181
  <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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubohiroya/turbowarp-bubble",
3
- "version": "0.11.0",
3
+ "version": "0.12.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",
@@ -48,31 +48,8 @@
48
48
  "access": "public",
49
49
  "registry": "https://registry.npmjs.org/"
50
50
  },
51
- "packageManager": "pnpm@11.18.0",
52
- "scripts": {
53
- "typecheck": "tsc --noEmit",
54
- "build": "pnpm run build:extension && pnpm run build:composition && pnpm run build:reveal && pnpm run build:turbowarp-adapter && pnpm run build:types",
55
- "build:extension": "vite build",
56
- "build:composition": "vite build --config vite.composition.config.ts",
57
- "build:reveal": "vite build --config vite.reveal.config.ts",
58
- "build:turbowarp-adapter": "vite build --config vite.turbowarp-adapter.config.ts",
59
- "build:types": "tsc --project tsconfig.build.json",
60
- "types:composition:check": "tsc --project tsconfig.composition-consumer.json",
61
- "lint": "eslint src tests scripts vite.config.ts vite.composition.config.ts vite.reveal.config.ts vite.turbowarp-adapter.config.ts eslint.config.mjs",
62
- "format": "prettier --check .",
63
- "format:write": "prettier --write .",
64
- "docs:render": "node scripts/render-block-manual-assets.mjs && pnpm run docs:pages",
65
- "docs:pages": "node scripts/render-pages.mjs",
66
- "docs:pages:check": "node scripts/render-pages.mjs --check",
67
- "docs:check": "node scripts/check-block-manual.mjs && pnpm run docs:pages:check",
68
- "benchmark:render-backends": "pnpm run build && node --expose-gc scripts/benchmark-render-backends.mjs",
69
- "test": "vitest run",
70
- "check:dist": "pnpm run build && node scripts/check-dist.mjs",
71
- "repo:check": "node scripts/check-repo.mjs",
72
- "pack:check": "npm pack --dry-run --ignore-scripts",
73
- "release:check": "pnpm publish --dry-run --access public --no-git-checks",
74
- "check": "pnpm run typecheck && pnpm run lint && pnpm run format && pnpm run test && pnpm run docs:check && pnpm run check:dist && pnpm run types:composition:check && pnpm run repo:check && pnpm run pack:check",
75
- "prepack": "pnpm run check"
51
+ "engines": {
52
+ "node": ">=22.18.0"
76
53
  },
77
54
  "peerDependencies": {
78
55
  "@kubohiroya/turbowarp-asset-manager": ">=0.7.0 <1",
@@ -92,10 +69,10 @@
92
69
  },
93
70
  "devDependencies": {
94
71
  "@eslint/js": "^10.0.1",
95
- "@kubohiroya/turbowarp-asset-manager": "0.13.0",
96
- "@kubohiroya/turbowarp-async-input": "0.5.0",
97
- "@kubohiroya/turbowarp-runtime-expression": "0.4.0",
98
- "@kubohiroya/vite-plugin-turbowarp-extension": "0.1.1",
72
+ "@kubohiroya/turbowarp-asset-manager": "0.15.0",
73
+ "@kubohiroya/turbowarp-async-input": "0.7.0",
74
+ "@kubohiroya/turbowarp-runtime-expression": "0.6.0",
75
+ "@kubohiroya/vite-plugin-turbowarp-extension": "0.4.0",
99
76
  "@types/node": "^26.1.2",
100
77
  "eslint": "^10.8.0",
101
78
  "happy-dom": "20.0.8",
@@ -120,6 +97,30 @@
120
97
  ],
121
98
  "dependencies": {
122
99
  "@cto.af/linebreak": "4.0.3",
123
- "@kubohiroya/turbowarp-svg-text": "0.8.1"
100
+ "@kubohiroya/turbowarp-svg-text": "0.10.0"
101
+ },
102
+ "scripts": {
103
+ "typecheck": "tsc --noEmit",
104
+ "build": "pnpm run build:extension && pnpm run build:composition && pnpm run build:reveal && pnpm run build:turbowarp-adapter && pnpm run build:types",
105
+ "build:extension": "vite build",
106
+ "build:composition": "vite build --config vite.composition.config.ts",
107
+ "build:reveal": "vite build --config vite.reveal.config.ts",
108
+ "build:turbowarp-adapter": "vite build --config vite.turbowarp-adapter.config.ts",
109
+ "build:types": "tsc --project tsconfig.build.json",
110
+ "types:composition:check": "tsc --project tsconfig.composition-consumer.json",
111
+ "lint": "eslint src tests scripts vite.config.ts vite.composition.config.ts vite.reveal.config.ts vite.turbowarp-adapter.config.ts eslint.config.mjs",
112
+ "format": "prettier --check .",
113
+ "format:write": "prettier --write .",
114
+ "docs:render": "node scripts/render-block-manual-assets.ts && pnpm run docs:pages",
115
+ "docs:pages": "node scripts/render-pages.ts",
116
+ "docs:pages:check": "node scripts/render-pages.ts --check",
117
+ "docs:check": "node scripts/check-block-manual.ts && pnpm run docs:pages:check",
118
+ "benchmark:render-backends": "pnpm run build && node --expose-gc scripts/benchmark-render-backends.ts",
119
+ "test": "vitest run",
120
+ "check:dist": "pnpm run build && node scripts/check-dist.ts",
121
+ "repo:check": "node scripts/check-repo.ts",
122
+ "pack:check": "npm pack --dry-run --ignore-scripts",
123
+ "release:check": "pnpm publish --dry-run --access public --no-git-checks",
124
+ "check": "pnpm run typecheck && pnpm run lint && pnpm run format && pnpm run test && pnpm run docs:check && pnpm run check:dist && pnpm run types:composition:check && pnpm run repo:check && pnpm run pack:check"
124
125
  }
125
- }
126
+ }