@kubohiroya/turbowarp-bubble 0.13.3 → 0.13.5
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 +23 -17
- package/README.md +15 -9
- package/dist/turbowarp-bubble.js +3 -1
- package/docs/block-manual.ja.md +4 -4
- package/docs/block-manual.md +4 -4
- package/docs/index.html +11 -7
- package/docs/ja/index.html +11 -7
- package/package.json +6 -6
package/README.ja.md
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
`@kubohiroya/turbowarp-bubble`は、TurboWarp上の`say`/`think`表示を、文字、キャラクター表情、入力待ちアイコンに分けて管理するunsandboxed機能拡張です。同じ機能をアプリから直接利用するためのcomposition APIも提供します。
|
|
6
6
|
|
|
7
|
-
現在のリリースはBubble 0.13.
|
|
7
|
+
現在のリリースはBubble 0.13.5です。既定の描画経路はSVG Text 0.10.1を使うskin非依存のSVG overlayです。TurboWarpですべての機能を使う場合、現在の推奨組み合わせはAsset Cache 0.3.2、Async Input 0.8.1、Runtime Expression 0.6.1です。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)を参照してください。
|
|
8
8
|
|
|
9
9
|
## READMEの読み方
|
|
10
10
|
|
|
11
11
|
利用環境を先に決めると、必要な部分だけを読めます。
|
|
12
12
|
|
|
13
13
|
1. TurboWarpでブロックを使う場合は、後述の[TurboWarp機能拡張](#turbowarp機能拡張)と[提供ブロック](#提供ブロック)を確認します。
|
|
14
|
-
2. 独自Webアプリやhostから使う場合は、[Composition API](#composition-api)と[
|
|
14
|
+
2. 独自Webアプリやhostから使う場合は、[Composition API](#composition-api)と[スタイルと表示](#スタイルと表示)を確認します。
|
|
15
15
|
3. 表示単位、改行、外形、portrait、animationの仕様を知りたい場合は、[概念と表示仕様](#概念と表示仕様)を参照します。
|
|
16
16
|
4. Scratch公式エディターでの利用可否は、[Scratchとの互換性](#scratchとの互換性)に記載しています。
|
|
17
17
|
|
|
@@ -73,11 +73,11 @@ flowchart TB
|
|
|
73
73
|
|
|
74
74
|
この構成では、Bubble coreが`BubbleTextCapability`というホスト非依存の契約だけを参照します。TurboWarp adapterの既定経路は直接依存する`@kubohiroya/turbowarp-svg-text@0.10.1`の`createSvgTextLayoutComposition().layoutText()`を使い、SVG skinを生成せず行layoutと文字幅を得ます。standalone SVG Text 0.10.1が既にロードされている場合は、その公開`getLayoutCapability()`を利用し、project blockで定義済みのfont、色、size、alignmentを維持します。吹き出しの外枠、tail、portraitの配置、表示開始・表示終了animationはSVG Textの責務に含めません。Composition APIのhostは別の実装を`textCapability`として注入できます。画像解決、音声再生、入力、条件評価もCapabilityとして切り離し、Asset Cache、Async Input、Runtime Expressionは対応機能を使う場合だけ接続します。
|
|
75
75
|
|
|
76
|
-
###
|
|
76
|
+
### 描画方式(SVGオーバーレイが既定)
|
|
77
77
|
|
|
78
78
|
`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.10.1のhost-neutral layoutを使います。この既定経路ではBubbleの表示、text更新、style更新、animationのために`createDrawable()`、`createSVGSkin()`、`createBitmapSkin()`を呼ばず、Bubble由来の処理はscratch-renderの`SVGSkin`/`Silhouette`経路へ入りません。`"scratch-render"`は互換性とロールバックのため明示指定時だけ使用します。
|
|
79
79
|
|
|
80
|
-
TurboWarpでstock Asset Cache 0.
|
|
80
|
+
TurboWarpでstock Asset Cache 0.3.2をBubbleより先に読み込むと、Bubbleはportrait等を初めて使う時に`runtime.ext_kubohiroyaassetcache.getDOMImageCapability()`を呼び、Asset Cacheブロックで登録された同じregistryへ遅延接続します。文字だけを使う場合はAsset Cacheを読み込みません。Composition APIのhostは、次のようにcapabilityを明示注入できます。
|
|
81
81
|
|
|
82
82
|
```ts
|
|
83
83
|
import { createAssetManagerComposition } from "@kubohiroya/turbowarp-asset-cache/composition";
|
|
@@ -237,7 +237,7 @@ Composition APIのBubble styleへ`maxWidth`と任意の`textLocale`を渡すと
|
|
|
237
237
|
|
|
238
238
|
図の各行はproductionの`wrapText`を直接呼んだ結果です。図版専用の手作業改行は使っていません。
|
|
239
239
|
|
|
240
|
-
###
|
|
240
|
+
### 吹き出しの表示スタイルと形状
|
|
241
241
|
|
|
242
242
|
形状候補は`NORMAL`、`THINKING`、`DREAMING`、`YELLING`、`OFF_PANEL`、`WAVY`、`WHISPERING`、`ANNOUNCEMENT`、`NARRATION`、`NO_BUBBLE`です。
|
|
243
243
|
|
|
@@ -260,6 +260,12 @@ portrait: {
|
|
|
260
260
|
|
|
261
261
|
配布bundleに含まれる依存ライブラリのライセンスは、[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)を参照してください。
|
|
262
262
|
|
|
263
|
+
## セキュリティダイアログの説明言語
|
|
264
|
+
|
|
265
|
+
この版のビルドでは、既定の英語説明に加えて`Description[ja]`コメントへ日本語の説明を出力します。このメタデータに対応した共通セキュリティダイアログは、Editorが日本語なら日本語の説明を表示し、対応する翻訳がなければ元の説明を表示します。
|
|
266
|
+
|
|
267
|
+
説明の翻訳は必要な実行モードを変えません。この拡張は引き続き`Unsandboxed: required`です。
|
|
268
|
+
|
|
263
269
|
## 利用方法
|
|
264
270
|
|
|
265
271
|
### インストール
|
|
@@ -286,7 +292,7 @@ const reveal = normalizeBubbleReveal({ unit: "CHARACTER" });
|
|
|
286
292
|
const chunks = splitBubbleText("A👩🚀B", reveal);
|
|
287
293
|
```
|
|
288
294
|
|
|
289
|
-
SVG Text 0.10.1は既定のskin非依存文字providerとして通常dependencyに含まれます。別途インストールは不要です。standalone SVG Text 0.10.1を先に読み込むと、project blockで定義したstyleを公開handoff経由で再利用します。今回のoptional peerはAsset Cache 0.
|
|
295
|
+
SVG Text 0.10.1は既定のskin非依存文字providerとして通常dependencyに含まれます。別途インストールは不要です。standalone SVG Text 0.10.1を先に読み込むと、project blockで定義したstyleを公開handoff経由で再利用します。今回のoptional peerはAsset Cache 0.3.2、Async Input 0.8.1、Runtime Expression 0.6.1にそれぞれexact固定します。hostが独自の`svgOverlayTextCapability`を注入する場合も、Bubble自身のSVG Text dependencyは0.10.1固定です。Asset Cache 0.1.0はAPI導入履歴の基準であり、今回その旧package版を依存解決に許容する意味ではありません。
|
|
290
296
|
|
|
291
297
|
`bubbleRenderBackend: "scratch-render"`へrollbackした場合も、standalone SVG Text拡張が未ロードなら同じ0.8.1 dependencyからskin版providerを生成します。standalone SVG Text拡張が既にロードされているhostでは、互換性のためその既存providerを引き続き使用します。
|
|
292
298
|
|
|
@@ -316,24 +322,24 @@ TurboWarp Bubbleの`dist/turbowarp-bubble.js`は、TurboWarpのrendererとtarget
|
|
|
316
322
|
|
|
317
323
|
1. 入力待ちの例を使う場合は、TurboWarp Editorでプロジェクトを開き、拡張機能の追加からTemporary Variablesを追加します。
|
|
318
324
|
2. 「カスタム拡張機能」を選び、サンドボックスなし(Run without sandbox)で実行できる状態にします。
|
|
319
|
-
3. portrait、blink、lip-sync、continue frames、音声を使う場合はAsset Cache 0.
|
|
320
|
-
4. `finish [UNIT] ...`にはRuntime Expression 0.6.1、conditionを使う待機またはclose policyにはAsync Input 0.
|
|
321
|
-
5. 最後にBubble 0.13.
|
|
325
|
+
3. portrait、blink、lip-sync、continue frames、音声を使う場合はAsset Cache 0.3.2を読み込みます。
|
|
326
|
+
4. `finish [UNIT] ...`にはRuntime Expression 0.6.1、conditionを使う待機またはclose policyにはAsync Input 0.8.1とRuntime Expression 0.6.1を読み込みます。timeoutだけのclose policyにはどちらも不要です。
|
|
327
|
+
5. 最後にBubble 0.13.5を読み込みます。SVG Text 0.10.1のlayout providerはBubble bundleに含まれます。
|
|
322
328
|
|
|
323
329
|
文字だけの最小構成は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になります。
|
|
324
330
|
|
|
325
331
|
```text
|
|
326
332
|
# portrait/blink/lip-sync/continue/音声を使う場合だけ追加
|
|
327
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.
|
|
333
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.3.2/dist/asset-cache.js
|
|
328
334
|
|
|
329
335
|
# conditionを使う統合待機またはclose policyでAsync Inputを追加
|
|
330
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.
|
|
336
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.8.1/dist/async-input.js
|
|
331
337
|
|
|
332
338
|
# finishまたはconditionを使う待機/close policyでRuntime Expressionを追加
|
|
333
339
|
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.6.1/dist/runtime-expression.js
|
|
334
340
|
|
|
335
341
|
# Bubble(必ず最後)
|
|
336
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.
|
|
342
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.5/dist/turbowarp-bubble.js
|
|
337
343
|
```
|
|
338
344
|
|
|
339
345
|
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)を参照してください。
|
|
@@ -423,7 +429,7 @@ Stage比較では、右側配置、内容に追従する本体、Actor側へ向
|
|
|
423
429
|
|
|
424
430
|
style設定ブロックを1つでも実行するか、`default`以外のtext style名を指定すると、従来のcustom profileになります。custom profileでvisual styleを省略した場合は`NORMAL`、placementを省略した場合は`up-right`です。visual style、placement、distance、tail length、offset、portrait、continue indicator、reveal、audio、motionの明示設定は従来どおり動作します。既定の`svg-overlay` backendでは、選択した本体を共有overlay root内のSVG DOM layerとして描画します。明示的な`scratch-render`ではSVG skinとrenderer drawableを使います。Bubbleのclose/置換、対象停止、runtime破棄では、選択したbackendが所有するresourceを解放します。
|
|
425
431
|
|
|
426
|
-
####
|
|
432
|
+
#### 配置
|
|
427
433
|
|
|
428
434
|
`PLACEMENT`はcustom profileの配置を設定し、Actor相対と背景相対の二系統があります。placementなどのstyle optionを明示したcustom profileでは、省略時は`up-right`です。未変更の基本profileは、Scratch標準と同じ右側優先・収まりに応じた左反転を使います。
|
|
429
435
|
|
|
@@ -453,7 +459,7 @@ Actor相対の`distance`はActorのStage座標AABB(axis-aligned bounding box
|
|
|
453
459
|
|
|
454
460
|
`offset x/y/scale`の既定値は`[0, 0, 100]`です。xは右、yは上が正です。scaleはBubble外形だけでなく、SVG Textの文字(フォントサイズ)、表情画像、次へアイコン、内部余白へ一体で適用します。scaleだけを変えた場合は、拡大量の半径分だけ本体中心をActorから離し、Actor側の間隔を維持します。その後x/y offsetを加え、固定したtail先端へ向けてtailを再生成するため、offset後の実長は`tail length`から変化し得ます。Stage端では全体が画面内に収まるようクランプします。これら3設定は背景相対placementでは無視します。
|
|
455
461
|
|
|
456
|
-
####
|
|
462
|
+
#### 立ち絵・まばたき・口パク
|
|
457
463
|
|
|
458
464
|
portraitは、位置合わせ済みの透明画像を重ねるレイヤーです。ベース画像と差分画像を同じcanvasサイズ・中心位置で用意すると、顔を描き直さずに目と口だけを更新できます。
|
|
459
465
|
|
|
@@ -483,7 +489,7 @@ flowchart TB
|
|
|
483
489
|
|
|
484
490
|

|
|
485
491
|
|
|
486
|
-
####
|
|
492
|
+
#### 吹き出しのアニメーション
|
|
487
493
|
|
|
488
494
|
Bubbleのanimationは、画像フレームのループ(blink、lip-sync、continue)と、Bubble surface自体の変形を分けて考えます。現在公開している`set this bubble animation mode`は前者の動作modeを切り替えます。後者は、同じsurfaceへ適用する汎用animation仕様として整理します。
|
|
489
495
|
|
|
@@ -517,7 +523,7 @@ TurboWarp adapterは最大16ms単位のscheduler tickで各animationを進め、
|
|
|
517
523
|
|
|
518
524
|
animationは`show`、`handle.animate()`、`handle.setAnimationMode()`、`handle.updateStyle()`、`handle.close()`のライフサイクルに接続します。新しいBubbleで同じ`actorKey`を置き換えると、旧animationのtimerとbackend所有の描画resourceを先に解放します。`shake`には`ease`を指定でき、`explode`には`relativeScale`、`count`、`ease`、`animateBubbleShape`には`speed`と`durationSeconds`を指定できます。
|
|
519
525
|
|
|
520
|
-
####
|
|
526
|
+
#### アニメーションモード
|
|
521
527
|
|
|
522
528
|
| mode | 目パチ | 口パク | continue frames |
|
|
523
529
|
| ------------------- | ------ | ------------ | --------------- |
|
|
@@ -607,7 +613,7 @@ surfaceは`updateStyle(style)`も実装し、吹き出しの位置・形状・
|
|
|
607
613
|
|
|
608
614
|
画像レイヤーのtarget IDは互いに異なる必要があります。styleで使わないレイヤーのtargetは省略できます。
|
|
609
615
|
|
|
610
|
-
####
|
|
616
|
+
#### スタイルと表示
|
|
611
617
|
|
|
612
618
|
```ts
|
|
613
619
|
bubbles.defineStyle({
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
`@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.
|
|
6
6
|
|
|
7
|
-
The current release is Bubble 0.13.
|
|
7
|
+
The current release is Bubble 0.13.5. Its default rendering path is the skin-free SVG overlay backed by SVG Text 0.10.1. For the complete TurboWarp feature set, the currently recommended companion releases are Asset Cache 0.3.2, Async Input 0.8.1, and Runtime Expression 0.6.1. 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.
|
|
8
8
|
|
|
9
9
|
## How to read this README
|
|
10
10
|
|
|
@@ -77,7 +77,7 @@ In this architecture, Bubble core refers only to the host-neutral `BubbleTextCap
|
|
|
77
77
|
|
|
78
78
|
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.10.1 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.
|
|
79
79
|
|
|
80
|
-
When the stock Asset Cache 0.
|
|
80
|
+
When the stock Asset Cache 0.3.2 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.
|
|
81
81
|
|
|
82
82
|
```ts
|
|
83
83
|
import { createAssetManagerComposition } from "@kubohiroya/turbowarp-asset-cache/composition";
|
|
@@ -260,6 +260,12 @@ portrait: {
|
|
|
260
260
|
|
|
261
261
|
See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for the licenses of dependencies included in the distributed bundle.
|
|
262
262
|
|
|
263
|
+
## Security dialog description language
|
|
264
|
+
|
|
265
|
+
Builds include a Japanese `Description[ja]` header alongside the default English
|
|
266
|
+
description. A supporting shared security dialog follows the Editor locale and falls back to
|
|
267
|
+
the original description when no translation is available. Translation does not change the `Unsandboxed: required` requirement.
|
|
268
|
+
|
|
263
269
|
## Usage
|
|
264
270
|
|
|
265
271
|
### Installation
|
|
@@ -286,7 +292,7 @@ const reveal = normalizeBubbleReveal({ unit: "CHARACTER" });
|
|
|
286
292
|
const chunks = splitBubbleText("A👩🚀B", reveal);
|
|
287
293
|
```
|
|
288
294
|
|
|
289
|
-
SVG Text 0.10.1 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.10.1 extension first is optional, but doing so lets Bubble reuse styles defined by its project blocks through the public handoff. This release pins the optional peers exactly to Asset Cache 0.
|
|
295
|
+
SVG Text 0.10.1 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.10.1 extension first is optional, but doing so lets Bubble reuse styles defined by its project blocks through the public handoff. This release pins the optional peers exactly to Asset Cache 0.3.2, Async Input 0.8.1, and Runtime Expression 0.6.1. Bubble also pins its SVG Text dependency to 0.10.1 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.
|
|
290
296
|
|
|
291
297
|
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.
|
|
292
298
|
|
|
@@ -316,24 +322,24 @@ TurboWarp Bubble's `dist/turbowarp-bubble.js` is an **unsandboxed custom extensi
|
|
|
316
322
|
|
|
317
323
|
1. For the input-wait example, open your project in the TurboWarp Editor and add Temporary Variables from the extension library.
|
|
318
324
|
2. Select “Custom Extension” and enable Run without sandbox.
|
|
319
|
-
3. Load Asset Cache 0.
|
|
320
|
-
4. Load Runtime Expression 0.6.1 for `finish [UNIT] ...`; load both Async Input 0.
|
|
321
|
-
5. Load Bubble 0.13.
|
|
325
|
+
3. Load Asset Cache 0.3.2 if you use portraits, blinking, lip-sync, continue frames, or audio.
|
|
326
|
+
4. Load Runtime Expression 0.6.1 for `finish [UNIT] ...`; load both Async Input 0.8.1 and Runtime Expression 0.6.1 for condition-based waits and close policies. A timeout-only close policy needs neither extension.
|
|
327
|
+
5. Load Bubble 0.13.5 last. The SVG Text 0.10.1 layout provider is included in the Bubble bundle.
|
|
322
328
|
|
|
323
329
|
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.
|
|
324
330
|
|
|
325
331
|
```text
|
|
326
332
|
# Add only when using portraits, blink, lip-sync, continue, or audio
|
|
327
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.
|
|
333
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.3.2/dist/asset-cache.js
|
|
328
334
|
|
|
329
335
|
# Add Async Input for integrated condition waits and close policies
|
|
330
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.
|
|
336
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.8.1/dist/async-input.js
|
|
331
337
|
|
|
332
338
|
# Add Runtime Expression for finish or condition-based waits and close policies
|
|
333
339
|
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.6.1/dist/runtime-expression.js
|
|
334
340
|
|
|
335
341
|
# Bubble (always load last)
|
|
336
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.
|
|
342
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.5/dist/turbowarp-bubble.js
|
|
337
343
|
```
|
|
338
344
|
|
|
339
345
|
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.
|
package/dist/turbowarp-bubble.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
// Description: Layered say and think bubbles with portrait animation and continue indicators.
|
|
4
4
|
// By: Hiroya Kubo
|
|
5
5
|
// License: MPL-2.0
|
|
6
|
+
// Unsandboxed: required
|
|
7
|
+
// Description[ja]: 立ち絵のアニメーションや入力待ちの表示を伴う吹き出しを、重ねて表示します。
|
|
6
8
|
|
|
7
9
|
(function (Scratch) {
|
|
8
10
|
'use strict';
|
|
@@ -13458,7 +13460,7 @@
|
|
|
13458
13460
|
textStyle: "default"
|
|
13459
13461
|
})]);
|
|
13460
13462
|
var EXTENSION_DOCS_URI = "https://kubohiroya.github.io/turbowarp-bubble/";
|
|
13461
|
-
var EXTENSION_VERSION = "0.13.
|
|
13463
|
+
var EXTENSION_VERSION = "0.13.5";
|
|
13462
13464
|
var BLOCK_ICON_URI = `data:image/svg+xml,${encodeURIComponent("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 64 64\"><path fill=\"none\" stroke=\"#fff\" stroke-width=\"5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 13h40a5 5 0 0 1 5 5v23a5 5 0 0 1-5 5H30L17 55v-9h-5a5 5 0 0 1-5-5V18a5 5 0 0 1 5-5Z\"/><g fill=\"#fff\"><circle cx=\"23\" cy=\"30\" r=\"3\"/><circle cx=\"32\" cy=\"30\" r=\"3\"/><circle cx=\"41\" cy=\"30\" r=\"3\"/></g></svg>")}`;
|
|
13463
13465
|
function extensionError(message) {
|
|
13464
13466
|
const error = /* @__PURE__ */ new Error(`[Bubble] ${message}`);
|
package/docs/block-manual.ja.md
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
| 順番 | 拡張機能 | 読み込み先 |
|
|
14
14
|
| ---: | ------------------------ | -------------------------------------------------------------------------------------------------------- |
|
|
15
15
|
| 1 | Temporary Variables | TurboWarpの拡張機能ライブラリから追加 |
|
|
16
|
-
| 2 | Async Input 0.
|
|
16
|
+
| 2 | Async Input 0.8.1 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.8.1/dist/async-input.js` |
|
|
17
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.
|
|
19
|
-
| 5 | Bubble 0.13.
|
|
18
|
+
| 4 | Asset Cache 0.3.2 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.3.2/dist/asset-cache.js` |
|
|
19
|
+
| 5 | Bubble 0.13.5 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.5/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
|
|
|
@@ -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.3.2を読み込む |
|
|
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
|
@@ -13,10 +13,10 @@ The complete input-wait example uses five extensions. Add Temporary Variables fr
|
|
|
13
13
|
| Order | Extension | URL |
|
|
14
14
|
| ----: | ------------------------ | -------------------------------------------------------------------------------------------------------- |
|
|
15
15
|
| 1 | Temporary Variables | Add from the TurboWarp extension library |
|
|
16
|
-
| 2 | Async Input 0.
|
|
16
|
+
| 2 | Async Input 0.8.1 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.8.1/dist/async-input.js` |
|
|
17
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.
|
|
19
|
-
| 5 | Bubble 0.13.
|
|
18
|
+
| 4 | Asset Cache 0.3.2 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.3.2/dist/asset-cache.js` |
|
|
19
|
+
| 5 | Bubble 0.13.5 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.5/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
|
|
|
@@ -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.3.2 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
|
@@ -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.8.1</td>
|
|
94
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.8.1/dist/async-input.js</code></td>
|
|
95
95
|
</tr>
|
|
96
96
|
<tr>
|
|
97
97
|
<td align="right">3</td>
|
|
@@ -100,13 +100,13 @@
|
|
|
100
100
|
</tr>
|
|
101
101
|
<tr>
|
|
102
102
|
<td align="right">4</td>
|
|
103
|
-
<td>Asset Cache 0.
|
|
104
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.
|
|
103
|
+
<td>Asset Cache 0.3.2</td>
|
|
104
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.3.2/dist/asset-cache.js</code></td>
|
|
105
105
|
</tr>
|
|
106
106
|
<tr>
|
|
107
107
|
<td align="right">5</td>
|
|
108
|
-
<td>Bubble 0.13.
|
|
109
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.
|
|
108
|
+
<td>Bubble 0.13.5</td>
|
|
109
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.5/dist/turbowarp-bubble.js</code></td>
|
|
110
110
|
</tr>
|
|
111
111
|
</tbody></table>
|
|
112
112
|
<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>
|
|
@@ -508,7 +508,7 @@ animate bubble shape to [WAVY] speed [1] for [0.5] seconds
|
|
|
508
508
|
</thead>
|
|
509
509
|
<tbody><tr>
|
|
510
510
|
<td>Asset Cache required error</td>
|
|
511
|
-
<td>Load Asset Cache 0.
|
|
511
|
+
<td>Load Asset Cache 0.3.2 without sandbox before using image/media assets</td>
|
|
512
512
|
</tr>
|
|
513
513
|
<tr>
|
|
514
514
|
<td>SVG overlay backend error</td>
|
|
@@ -2603,5 +2603,9 @@ pnpm docs:check
|
|
|
2603
2603
|
</p>
|
|
2604
2604
|
</section>
|
|
2605
2605
|
|
|
2606
|
+
<!-- The shared TurboWarp Plus header. It inserts itself at the top of the
|
|
2607
|
+
page in a shadow root, so it cannot disturb the styles below. -->
|
|
2608
|
+
<script type="module"
|
|
2609
|
+
src="https://kubohiroya.github.io/turbowarp-plus-site-header/dist/auto.js"></script>
|
|
2606
2610
|
</body>
|
|
2607
2611
|
</html>
|
package/docs/ja/index.html
CHANGED
|
@@ -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.8.1</td>
|
|
94
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.8.1/dist/async-input.js</code></td>
|
|
95
95
|
</tr>
|
|
96
96
|
<tr>
|
|
97
97
|
<td align="right">3</td>
|
|
@@ -100,13 +100,13 @@
|
|
|
100
100
|
</tr>
|
|
101
101
|
<tr>
|
|
102
102
|
<td align="right">4</td>
|
|
103
|
-
<td>Asset Cache 0.
|
|
104
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.
|
|
103
|
+
<td>Asset Cache 0.3.2</td>
|
|
104
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.3.2/dist/asset-cache.js</code></td>
|
|
105
105
|
</tr>
|
|
106
106
|
<tr>
|
|
107
107
|
<td align="right">5</td>
|
|
108
|
-
<td>Bubble 0.13.
|
|
109
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.
|
|
108
|
+
<td>Bubble 0.13.5</td>
|
|
109
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.13.5/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 Cacheがない場合、condition待機の開始時にAsync InputかRuntime Expressionがない場合は、Bubbleが明示的なエラーを返します。低レベルComposition APIでは別のtext capabilityを注入できます。</p>
|
|
@@ -508,7 +508,7 @@ animate bubble shape to [WAVY] speed [1] for [0.5] seconds
|
|
|
508
508
|
</thead>
|
|
509
509
|
<tbody><tr>
|
|
510
510
|
<td>Asset Cacheを要求するエラー</td>
|
|
511
|
-
<td>画像・メディアアセットを使う前にAsset Cache 0.
|
|
511
|
+
<td>画像・メディアアセットを使う前にAsset Cache 0.3.2を読み込む</td>
|
|
512
512
|
</tr>
|
|
513
513
|
<tr>
|
|
514
514
|
<td>SVG overlay backendのエラー</td>
|
|
@@ -2603,5 +2603,9 @@ pnpm docs:check
|
|
|
2603
2603
|
</p>
|
|
2604
2604
|
</section>
|
|
2605
2605
|
|
|
2606
|
+
<!-- The shared TurboWarp Plus header. It inserts itself at the top of the
|
|
2607
|
+
page in a shadow root, so it cannot disturb the styles below. -->
|
|
2608
|
+
<script type="module"
|
|
2609
|
+
src="https://kubohiroya.github.io/turbowarp-plus-site-header/dist/auto.js"></script>
|
|
2606
2610
|
</body>
|
|
2607
2611
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-bubble",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.5",
|
|
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",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"test:fixed-inputs:native": "node --test tests/fixed-inputs.native.mjs"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"@kubohiroya/turbowarp-asset-cache": "0.
|
|
84
|
-
"@kubohiroya/turbowarp-async-input": "0.
|
|
83
|
+
"@kubohiroya/turbowarp-asset-cache": "0.3.2",
|
|
84
|
+
"@kubohiroya/turbowarp-async-input": "0.8.1",
|
|
85
85
|
"@kubohiroya/turbowarp-runtime-expression": "0.6.1"
|
|
86
86
|
},
|
|
87
87
|
"peerDependenciesMeta": {
|
|
@@ -97,12 +97,12 @@
|
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@eslint/js": "^10.0.1",
|
|
100
|
-
"@kubohiroya/turbowarp-asset-cache": "0.
|
|
101
|
-
"@kubohiroya/turbowarp-async-input": "0.
|
|
100
|
+
"@kubohiroya/turbowarp-asset-cache": "0.3.2",
|
|
101
|
+
"@kubohiroya/turbowarp-async-input": "0.8.1",
|
|
102
102
|
"@kubohiroya/turbowarp-extension-data-editor": "0.2.1",
|
|
103
103
|
"@kubohiroya/turbowarp-extension-manifest": "0.3.2",
|
|
104
104
|
"@kubohiroya/turbowarp-runtime-expression": "0.6.1",
|
|
105
|
-
"@kubohiroya/vite-plugin-turbowarp-extension": "0.
|
|
105
|
+
"@kubohiroya/vite-plugin-turbowarp-extension": "0.7.0",
|
|
106
106
|
"@types/node": "^26.1.2",
|
|
107
107
|
"eslint": "^10.8.0",
|
|
108
108
|
"happy-dom": "20.0.8",
|