@kubohiroya/turbowarp-bubble 0.9.0 → 0.11.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 → README.ja.md} +31 -15
- package/README.md +32 -16
- package/dist/extension-manifest.json +37 -0
- package/dist/turbowarp-adapter.js +4 -4
- package/dist/turbowarp-bubble.js +154 -42
- package/dist/types/text-capability.d.ts +1 -1
- package/dist/types/turbowarp-svg-text-adapter.d.ts +1 -1
- package/docs/block-manual.ja.md +32 -19
- package/docs/block-manual.md +19 -6
- package/docs/index.html +28 -10
- package/docs/ja/index.html +26 -8
- package/docs/release-notes-0.10.0.md +50 -0
- package/docs/release-notes-0.11.0.md +21 -0
- package/package.json +33 -30
package/docs/ja/index.html
CHANGED
|
@@ -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はBubble
|
|
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>
|
|
78
78
|
<table>
|
|
79
79
|
<thead>
|
|
80
80
|
<tr>
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
</tr>
|
|
91
91
|
<tr>
|
|
92
92
|
<td align="right">2</td>
|
|
93
|
-
<td>Async Input 0.
|
|
94
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.
|
|
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>
|
|
95
95
|
</tr>
|
|
96
96
|
<tr>
|
|
97
97
|
<td align="right">3</td>
|
|
@@ -100,16 +100,16 @@
|
|
|
100
100
|
</tr>
|
|
101
101
|
<tr>
|
|
102
102
|
<td align="right">4</td>
|
|
103
|
-
<td>Asset Manager 0.
|
|
104
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-manager@0.
|
|
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>
|
|
105
105
|
</tr>
|
|
106
106
|
<tr>
|
|
107
107
|
<td align="right">5</td>
|
|
108
|
-
<td>Bubble 0.
|
|
109
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.
|
|
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>
|
|
110
110
|
</tr>
|
|
111
111
|
</tbody></table>
|
|
112
|
-
<p>開発中のBubbleを試す場合は、このリポジトリの<code>dist/turbowarp-bubble.js</code>をローカルカスタム拡張機能として読み込みます。既定SVG overlayに必要なrenderer APIがない場合、画像・メディア機能の使用時にAsset Manager
|
|
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>
|
|
113
113
|
<p>参考:</p>
|
|
114
114
|
<ul>
|
|
115
115
|
<li><a href="https://kubohiroya.github.io/turbowarp-asset-manager/ja/">Asset Manager 日本語ガイド</a></li>
|
|
@@ -296,6 +296,12 @@ close this bubble
|
|
|
296
296
|
</code></pre>
|
|
297
297
|
<p>まずTemporary Variablesで<code>input</code>を初期化してから、Async Inputのキー入力とタップのlistenerを登録します。Bubbleの待機ブロックは、<code>input == "pressed"</code>をRuntime Expressionへ委譲し、開始直後とVMの各フレームで評価します。待機中は自動的に<code>awaiting-continue</code>となり、口パクを停止して<code>set continue frames</code>の画像をループします。条件成立またはtimeout後は<code>idle</code>へ移り、次の<code>close this bubble</code>へ進みます。timeoutを<code>0</code>にすると時間制限なしです。</p>
|
|
298
298
|
<p>次の待機に入る前に<code>input</code>を空文字へ戻してください。前回の<code>pressed</code>が残っていると、次の条件が直ちに成立します。別のBubble表示、close、対象targetの停止、projectの開始・停止、runtime破棄では、targetが所有する待機とlistener、timerをキャンセルして解放します。</p>
|
|
299
|
+
<p>同じ終了規則を再利用する場合は、名前付きBubble close policyを使います。triggerは<code>condition</code>、<code>timeout</code>、<code>condition-or-timeout</code>から明示的に選びます。policyの適用は定義をsnapshotし、成立まで待ち、Bubbleのhide animationと解放までを1つの待機commandとして実行します。</p>
|
|
300
|
+
<pre><code class="language-text">define bubble close policy [advance-or-timeout] trigger [condition-or-timeout] condition [input == "pressed"] timeout [10] seconds
|
|
301
|
+
show [海へ出発!] with bubble style [hero-dialogue]
|
|
302
|
+
wait and close this bubble using close policy [advance-or-timeout]
|
|
303
|
+
</code></pre>
|
|
304
|
+
<p>timeoutだけのpolicyは現在のanimation modeを変えず、入力用拡張を必要としません。conditionを含むpolicyは<code>awaiting-continue</code>へ移り、既存の統合待機と同じAsync Input/Runtime Expression設定を使います。待機中に同じ名前を再定義しても、変更は次回の適用から有効です。Bubbleの置換やlifecycle cleanupは待機中policyをcancelし、置換後のBubbleを閉じません。</p>
|
|
299
305
|
<p>音声再生や別の文字送り処理と組み合わせる場合は、それらが完了した時点で<code>awaiting-continue</code>へ切り替えます。</p>
|
|
300
306
|
<p><img src="../assets/bubble-lifecycle.gif" alt="sayで口パクし、awaiting-continueでcontinue framesを動かし、入力成立後にBubbleを閉じるアニメーション"></p>
|
|
301
307
|
<p>アニメーションGIFを再生できない環境では、次の比較図で各animation modeを確認できます。</p>
|
|
@@ -371,6 +377,10 @@ animate bubble shape to [WAVY] speed [1] for [0.5] seconds
|
|
|
371
377
|
<td>Bubble styleを定義または再定義する</td>
|
|
372
378
|
</tr>
|
|
373
379
|
<tr>
|
|
380
|
+
<td><code>define bubble close policy [POLICY] trigger [TRIGGER] condition [CONDITION] timeout [TIMEOUT] seconds</code></td>
|
|
381
|
+
<td>名前付きの終了条件を定義または置換する</td>
|
|
382
|
+
</tr>
|
|
383
|
+
<tr>
|
|
374
384
|
<td><code>set bubble placement [PLACEMENT] for bubble style [STYLE]</code></td>
|
|
375
385
|
<td>Actor相対方向・角度、または背景相対領域を設定する</td>
|
|
376
386
|
</tr>
|
|
@@ -475,6 +485,10 @@ animate bubble shape to [WAVY] speed [1] for [0.5] seconds
|
|
|
475
485
|
<td>Runtime Expressionの条件成立またはtimeoutまで待つ</td>
|
|
476
486
|
</tr>
|
|
477
487
|
<tr>
|
|
488
|
+
<td><code>wait and close this bubble using close policy [POLICY]</code></td>
|
|
489
|
+
<td>policyをsnapshotし、成立を待ってBubbleを閉じる</td>
|
|
490
|
+
</tr>
|
|
491
|
+
<tr>
|
|
478
492
|
<td><code>close this bubble</code></td>
|
|
479
493
|
<td>自分のBubbleと所有resourceを解放する</td>
|
|
480
494
|
</tr>
|
|
@@ -513,6 +527,10 @@ animate bubble shape to [WAVY] speed [1] for [0.5] seconds
|
|
|
513
527
|
<td>組み込みの短いsay/thinkを使うか、named custom styleを先に定義する</td>
|
|
514
528
|
</tr>
|
|
515
529
|
<tr>
|
|
530
|
+
<td><code>bubble close policy is not defined</code></td>
|
|
531
|
+
<td>名前付きclose policyを適用前に定義する</td>
|
|
532
|
+
</tr>
|
|
533
|
+
<tr>
|
|
516
534
|
<td>image assetが未登録</td>
|
|
517
535
|
<td><code>register resource ... as asset ...</code>の完了後にBubbleを表示する</td>
|
|
518
536
|
</tr>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# 0.10.0: 名前付きBubble close policy
|
|
2
|
+
|
|
3
|
+
## 概要
|
|
4
|
+
|
|
5
|
+
Bubble 0.10.0では、吹き出しを閉じる条件を再利用可能な名前付きpolicyとして定義し、表示後に名前で適用できる。
|
|
6
|
+
|
|
7
|
+
- `condition`、`timeout`、`condition-or-timeout`の3つのtriggerを明示的に選べる。
|
|
8
|
+
- `wait and close this bubble using close policy [POLICY]`は定義をsnapshotし、成立まで待ち、hide animationとresource解放までを実行する。
|
|
9
|
+
- timeoutだけのpolicyはAsync InputやRuntime Expressionを必要としない。
|
|
10
|
+
- conditionを含むpolicyは既存の統合待機と同じcapabilityを使い、待機中は`awaiting-continue` modeになる。
|
|
11
|
+
- Bubbleの置換、target/projectの停止、runtime破棄では待機をcancelし、置換後のBubbleを閉じない。
|
|
12
|
+
|
|
13
|
+
## 追加ブロック
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
define bubble close policy [three-seconds] trigger [timeout] condition [] timeout [3] seconds
|
|
17
|
+
say [3秒後に閉じます。]
|
|
18
|
+
wait and close this bubble using close policy [three-seconds]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
キー入力やspriteへのタッチをRuntime Expressionのconditionとして登録した場合は、時間制限なしの`condition`、またはtimeoutとの先着になる`condition-or-timeout`を使える。
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
define bubble close policy [advance] trigger [condition] condition [input == "pressed"] timeout [0] seconds
|
|
25
|
+
say [キーを押すかspriteをタッチしてください。]
|
|
26
|
+
wait and close this bubble using close policy [advance]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Bubble close policyは制御フローの設定であり、吹き出しの形やtail/trailを選ぶBubble styleとは別のregistryである。
|
|
30
|
+
|
|
31
|
+
## 互換性
|
|
32
|
+
|
|
33
|
+
- 既存の`say`、`think`、`show ... with bubble style ...`、`wait with this bubble ...`、`close this bubble`の契約は維持する。
|
|
34
|
+
- 保存済みstyled say/thinkブロック向けの非表示opcodeも維持する。
|
|
35
|
+
- standalone manifestは33定義を持ち、paletteには31ブロックを表示する。
|
|
36
|
+
- Composition APIとTurboWarp adapterの既存entry pointに破壊的変更はない。
|
|
37
|
+
|
|
38
|
+
## 検証
|
|
39
|
+
|
|
40
|
+
- `pnpm check`
|
|
41
|
+
- `pnpm release:check`
|
|
42
|
+
- TypeScript declarationとComposition API consumerのcompile成功。
|
|
43
|
+
- lifecycle cancel、定義snapshot、timeout、condition、先着triggerを自動testで検証。
|
|
44
|
+
- ドキュメントsource、Pages生成HTML、extension manifest、配布bundle、npm tarballを一括検証。
|
|
45
|
+
|
|
46
|
+
## 更新とロールバック
|
|
47
|
+
|
|
48
|
+
extension URLまたはnpm dependencyを0.9.0から0.10.0へ更新する。名前付きclose policyを使わない既存projectは変更不要である。
|
|
49
|
+
|
|
50
|
+
回帰が見つかった場合はextension URLまたはnpm dependencyを0.9.0へpinし、修正版0.10.x patchを公開する。公開済み0.10.0 packageをunpublishしたり、対応するGit tag/GitHub Releaseを削除したりしない。
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# 0.11.0: README.ja.md and version consistency checks
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Bubble 0.11.0 standardizes the Japanese README filename as `README.ja.md` and adds repository checks that keep the README, generated Pages, CDN URLs, companion versions, package metadata, and package archive contents aligned.
|
|
6
|
+
|
|
7
|
+
## Compatibility
|
|
8
|
+
|
|
9
|
+
- Runtime behavior, block opcodes, Composition API exports, and rendering behavior are unchanged.
|
|
10
|
+
- The former `README_ja.md` file was renamed to `README.ja.md`.
|
|
11
|
+
- The direct SVG Text dependency remains pinned to `0.8.1` because that is the latest publishable registry version during this release preparation.
|
|
12
|
+
- The recommended companion versions are Asset Manager 0.13.0, Async Input 0.5.0, and Runtime Expression 0.4.0.
|
|
13
|
+
|
|
14
|
+
## Verification
|
|
15
|
+
|
|
16
|
+
- `pnpm run check`
|
|
17
|
+
- `pnpm run release:check`
|
|
18
|
+
|
|
19
|
+
## Rollback
|
|
20
|
+
|
|
21
|
+
If the README rename breaks external documentation links, revert this release commit and republish a patch that restores `README_ja.md`. Do not silently bypass the version checks; adjust `repo-policy.json` when the verified companion matrix changes.
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-bubble",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.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",
|
|
7
7
|
"license": "MPL-2.0",
|
|
8
|
-
"homepage": "https://github.
|
|
8
|
+
"homepage": "https://kubohiroya.github.io/turbowarp-bubble/",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/kubohiroya/turbowarp-bubble.git"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dist/",
|
|
38
38
|
"docs/",
|
|
39
39
|
"README.md",
|
|
40
|
-
"
|
|
40
|
+
"README.ja.md",
|
|
41
41
|
"LICENSE",
|
|
42
42
|
"THIRD_PARTY_NOTICES.md"
|
|
43
43
|
],
|
|
@@ -48,6 +48,32 @@
|
|
|
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"
|
|
76
|
+
},
|
|
51
77
|
"peerDependencies": {
|
|
52
78
|
"@kubohiroya/turbowarp-asset-manager": ">=0.7.0 <1",
|
|
53
79
|
"@kubohiroya/turbowarp-async-input": ">=0.3.0 <1",
|
|
@@ -66,9 +92,9 @@
|
|
|
66
92
|
},
|
|
67
93
|
"devDependencies": {
|
|
68
94
|
"@eslint/js": "^10.0.1",
|
|
69
|
-
"@kubohiroya/turbowarp-asset-manager": "0.
|
|
70
|
-
"@kubohiroya/turbowarp-async-input": "0.
|
|
71
|
-
"@kubohiroya/turbowarp-runtime-expression": "0.
|
|
95
|
+
"@kubohiroya/turbowarp-asset-manager": "0.13.0",
|
|
96
|
+
"@kubohiroya/turbowarp-async-input": "0.5.0",
|
|
97
|
+
"@kubohiroya/turbowarp-runtime-expression": "0.4.0",
|
|
72
98
|
"@kubohiroya/vite-plugin-turbowarp-extension": "0.1.1",
|
|
73
99
|
"@types/node": "^26.1.2",
|
|
74
100
|
"eslint": "^10.8.0",
|
|
@@ -95,28 +121,5 @@
|
|
|
95
121
|
"dependencies": {
|
|
96
122
|
"@cto.af/linebreak": "4.0.3",
|
|
97
123
|
"@kubohiroya/turbowarp-svg-text": "0.8.1"
|
|
98
|
-
},
|
|
99
|
-
"scripts": {
|
|
100
|
-
"typecheck": "tsc --noEmit",
|
|
101
|
-
"build": "pnpm build:extension && pnpm build:composition && pnpm build:reveal && pnpm build:turbowarp-adapter && pnpm build:types",
|
|
102
|
-
"build:extension": "vite build",
|
|
103
|
-
"build:composition": "vite build --config vite.composition.config.ts",
|
|
104
|
-
"build:reveal": "vite build --config vite.reveal.config.ts",
|
|
105
|
-
"build:turbowarp-adapter": "vite build --config vite.turbowarp-adapter.config.ts",
|
|
106
|
-
"build:types": "tsc --project tsconfig.build.json",
|
|
107
|
-
"types:composition:check": "tsc --project tsconfig.composition-consumer.json",
|
|
108
|
-
"lint": "eslint src tests scripts vite.config.ts vite.composition.config.ts vite.reveal.config.ts vite.turbowarp-adapter.config.ts eslint.config.mjs",
|
|
109
|
-
"format": "prettier --check .",
|
|
110
|
-
"format:write": "prettier --write .",
|
|
111
|
-
"docs:render": "node scripts/render-block-manual-assets.mjs && pnpm docs:pages",
|
|
112
|
-
"docs:pages": "node scripts/render-pages.mjs",
|
|
113
|
-
"docs:pages:check": "node scripts/render-pages.mjs --check",
|
|
114
|
-
"docs:check": "node scripts/check-block-manual.mjs && pnpm docs:pages:check",
|
|
115
|
-
"benchmark:render-backends": "pnpm build && node --expose-gc scripts/benchmark-render-backends.mjs",
|
|
116
|
-
"test": "vitest run",
|
|
117
|
-
"check:dist": "pnpm build && node scripts/check-dist.mjs",
|
|
118
|
-
"pack:check": "npm pack --dry-run --ignore-scripts",
|
|
119
|
-
"release:check": "pnpm publish --dry-run --access public",
|
|
120
|
-
"check": "pnpm typecheck && pnpm lint && pnpm format && pnpm test && pnpm docs:check && pnpm check:dist && pnpm types:composition:check && pnpm pack:check"
|
|
121
124
|
}
|
|
122
|
-
}
|
|
125
|
+
}
|