@kubohiroya/turbowarp-bubble 0.5.0 → 0.7.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.md +24 -1
- package/dist/composition.js +297 -245
- package/dist/extension-manifest.json +35 -0
- package/dist/reveal.js +77 -0
- package/dist/turbowarp-adapter.js +497 -399
- package/dist/turbowarp-bubble.js +233 -22
- package/dist/types/composition.d.ts +10 -0
- package/dist/types/portrait-layout.d.ts +14 -0
- package/docs/block-manual.ja.md +36 -31
- package/docs/block-manual.md +36 -31
- package/docs/index.html +11 -3
- package/docs/ja/index.html +11 -3
- package/package.json +28 -25
package/README.md
CHANGED
|
@@ -190,6 +190,17 @@ Composition APIのBubble styleへ`maxWidth`と任意の`textLocale`を渡すと
|
|
|
190
190
|
|
|
191
191
|
standalone機能拡張では、`set bubble visual style`ブロックで形状を選択できます。runtimeは共有`renderBubbleSvg`から本体用SVG skinを生成し、文字・表情より背面の専用drawableへ適用します。Actor相対ではActorを向くtailを生成し、背景相対ではtailを付けません。`NO_BUBBLE`では本体を非表示にして文字・表情などだけを表示します。`NEGATIVE`はfill colorとborder colorで表現できるため独立styleにせず、orientationとsegmentsも公開入力にしません。
|
|
192
192
|
|
|
193
|
+
portraitは`left`/`right`/`top-left`/`top-right`/`bottom-left`/`bottom-right`へ配置し、portrait固有の`[x, y, zoom]`と角丸半径を指定できます。standalone機能拡張では`set portrait [PLACEMENT] offset x [X] y [Y] zoom [ZOOM] % corner radius [RADIUS] px ...`を使い、`none`でportrait全体を解除します。Composition APIでは次のようにstyleへ含めます。
|
|
194
|
+
|
|
195
|
+
```ts
|
|
196
|
+
portrait: {
|
|
197
|
+
base: "HeroFace",
|
|
198
|
+
placement: "top-left",
|
|
199
|
+
offset: [-4, 6, 120],
|
|
200
|
+
cornerRadius: 12,
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
193
204
|
配布bundleに含まれる依存ライブラリのライセンスは、[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)を参照してください。
|
|
194
205
|
|
|
195
206
|
## 利用方法
|
|
@@ -206,6 +217,18 @@ npmを使う場合は同じ依存を次のように追加します。
|
|
|
206
217
|
npm install @kubohiroya/turbowarp-bubble
|
|
207
218
|
```
|
|
208
219
|
|
|
220
|
+
逐次表示の正規化と文字列分割だけが必要な利用側は、Bubble composition全体を含めずに小さな`reveal` entryをimportできます。
|
|
221
|
+
|
|
222
|
+
```ts
|
|
223
|
+
import {
|
|
224
|
+
normalizeBubbleReveal,
|
|
225
|
+
splitBubbleText,
|
|
226
|
+
} from "@kubohiroya/turbowarp-bubble/reveal";
|
|
227
|
+
|
|
228
|
+
const reveal = normalizeBubbleReveal({ unit: "CHARACTER" });
|
|
229
|
+
const chunks = splitBubbleText("A👩🚀B", reveal);
|
|
230
|
+
```
|
|
231
|
+
|
|
209
232
|
現在のpeer dependency範囲は、SVG Textが`>=0.4.0 <1`、Asset Managerが`>=0.7.0 <1`、Async InputとRuntime Expressionがそれぞれ`>=0.3.0 <1`です。4つすべてoptional peer dependencyで、SVG TextはTurboWarp adapterの既定adapterを使う場合だけ必要です。別の`textCapability`を注入するhostはSVG Textをインストールする必要がありません。
|
|
210
233
|
|
|
211
234
|
TurboWarp adapterの既定文字経路を使う場合は、SVG Textを追加します。
|
|
@@ -257,7 +280,7 @@ https://unpkg.com/@kubohiroya/turbowarp-async-input@0.3.0/dist/async-input.js
|
|
|
257
280
|
https://unpkg.com/@kubohiroya/turbowarp-runtime-expression@0.3.0/dist/runtime-expression.js
|
|
258
281
|
|
|
259
282
|
# Bubble(必ず最後)
|
|
260
|
-
https://unpkg.com/@kubohiroya/turbowarp-bubble@0.
|
|
283
|
+
https://unpkg.com/@kubohiroya/turbowarp-bubble@0.7.0/dist/turbowarp-bubble.js
|
|
261
284
|
```
|
|
262
285
|
|
|
263
286
|
TurboWarpのカスタム拡張機能はURLからJavaScriptを読み込むため、初回読み込み時にネットワーク接続が必要です。開発中は、リポジトリをローカルHTTPサーバーで配信して`dist/turbowarp-bubble.js`を指定できます。`file://`で直接開いたファイルや、サンドボックス付きの拡張機能としては動作しません。
|