@kubohiroya/turbowarp-bubble 0.7.0 → 0.9.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.
@@ -0,0 +1,18 @@
1
+ import { type BubbleSvgOverlayImageCapability } from "./svg-overlay-surface.js";
2
+ export interface AssetManagerDOMImageResource {
3
+ readonly height: number;
4
+ readonly mimeType: string;
5
+ readonly url: string;
6
+ readonly width: number;
7
+ release(): void;
8
+ }
9
+ export interface AssetManagerDOMImageCapability {
10
+ getMimeType(name: unknown): string;
11
+ isRegistered(name: unknown): boolean;
12
+ resolveDOMImageResource(name: unknown): Promise<AssetManagerDOMImageResource>;
13
+ }
14
+ /**
15
+ * Adapts Asset Manager's host-neutral DOM resource API to Bubble's SVG overlay contract.
16
+ * Asset Manager owns byte validation and SVG sanitization; Bubble owns its capability shape.
17
+ */
18
+ export declare function createAssetManagerSvgOverlayImageCapability(capabilityInput: AssetManagerDOMImageCapability): BubbleSvgOverlayImageCapability;
@@ -1,6 +1,10 @@
1
1
  import type { BubbleOffsetInput } from "./actor-transform.js";
2
2
  export declare const bubbleVisualStyles: readonly ["NORMAL", "THINKING", "DREAMING", "YELLING", "OFF_PANEL", "WAVY", "WHISPERING", "ANNOUNCEMENT", "NARRATION", "NO_BUBBLE"];
3
3
  export type BubbleVisualStyle = (typeof bubbleVisualStyles)[number];
4
+ export declare function bubbleBodyMinimumSize(...styles: readonly BubbleVisualStyle[]): Readonly<{
5
+ height: number;
6
+ width: number;
7
+ }>;
4
8
  export interface RenderBubbleSvgInput {
5
9
  readonly style: BubbleVisualStyle;
6
10
  readonly lines: readonly string[];
@@ -4,6 +4,7 @@ import { type BubbleVisualStyle } from "./bubble-svg.js";
4
4
  import { type BubbleRevealInput, type BubbleRevealUnit, type NormalizedBubbleReveal } from "./reveal.js";
5
5
  import type { BubbleTextCapability, BubbleTextTarget } from "./text-capability.js";
6
6
  import { type BubblePortraitOffset, type BubblePortraitOffsetInput, type BubblePortraitPlacement } from "./portrait-layout.js";
7
+ import { type BubbleLayoutProfile, type ScratchBubbleTextLayout } from "./scratch-default.js";
7
8
  export type { BubbleTextCapability, BubbleTextTarget, } from "./text-capability.js";
8
9
  export { UnicodeLineBreakProvider, wrapText, type LineBreakOpportunity, type LineBreakProvider, type TextWidthMeasurer, type WrappedTextLayout, type WrappedTextLine, type WrapTextInput, } from "./text-layout.js";
9
10
  export { bubbleBackgroundRegions, bubbleDirectionAliases, bubbleDirectionNames, defaultBubblePlacementInput, normalizeBubblePlacement, type BubbleActorPlacement, type BubbleBackgroundPlacement, type BubbleBackgroundRegion, type BubbleDirectionAlias, type BubbleDirectionName, type BubblePlacement, type BubblePlacementInput, } from "./placement.js";
@@ -11,6 +12,7 @@ export { actorRelativeBubbleCenter, defaultBubbleDistance, defaultBubbleOffset,
11
12
  export { bubbleBodyCenterOffset, bubbleVisualStyles, renderBubbleSvg, type BubbleBodyCenterOffsetInput, type BubbleShapeTransition, type BubbleVisualStyle, type RenderBubbleSvgInput, } from "./bubble-svg.js";
12
13
  export { bubbleRevealUnits, normalizeBubbleReveal, revealedBubbleText, splitBubbleText, type BubbleRevealInput, type BubbleRevealLayout, type BubbleRevealUnit, type NormalizedBubbleReveal, } from "./reveal.js";
13
14
  export { bubblePortraitPlacements, defaultBubblePortraitCornerRadius, defaultBubblePortraitOffset, defaultBubblePortraitPlacement, normalizeBubblePortraitCornerRadius, normalizeBubblePortraitOffset, normalizeBubblePortraitPlacement, type BubblePortraitOffset, type BubblePortraitOffsetInput, type BubblePortraitPlacement, } from "./portrait-layout.js";
15
+ export { bubbleLayoutProfileForStyleInput, formatScratchBubbleArgument, isScratchDefaultBubbleStyleInput, layoutScratchBubbleText, positionScratchBubble, renderScratchBubbleSvg, scratchBubbleMetrics, scratchBubbleCornerRadius, scratchBubbleFontSize, scratchBubbleLineHeight, scratchBubbleMaximumLineWidth, scratchBubbleMinimumTextWidth, scratchBubblePadding, scratchBubbleStrokeWidth, scratchBubbleTailHeight, scratchBubbleTextLimit, type BubbleLayoutProfile, type ScratchBubbleKind, type ScratchBubbleMetrics, type ScratchBubblePosition, type ScratchBubblePositionInput, type ScratchBubbleTextLayout, type ScratchBubbleTextLine, } from "./scratch-default.js";
14
16
  export type BubbleKind = "say" | "think";
15
17
  export type BubbleAnimationMode = "idle" | "talking" | "awaiting-continue";
16
18
  export type BubbleEase = "linear" | "easeIn" | "easeOut" | "easeInOut";
@@ -84,6 +86,7 @@ export interface BubblePortrait {
84
86
  export interface BubbleStyle {
85
87
  readonly name: string;
86
88
  readonly textStyle: string;
89
+ readonly layoutProfile: BubbleLayoutProfile;
87
90
  readonly maxWidth?: number;
88
91
  readonly textLocale?: string;
89
92
  readonly placement: BubblePlacement;
@@ -133,6 +136,8 @@ export interface BubbleSurface {
133
136
  /** Captures the currently rendered text size for RESERVED reveal layout. */
134
137
  captureTextLayout?(): void;
135
138
  clearTextLayout?(): void;
139
+ /** Renders the built-in Scratch-compatible text and body as one surface. */
140
+ renderScratchText?(layout: ScratchBubbleTextLayout): void | Promise<void>;
136
141
  }
137
142
  export interface BubbleSurfaceFactoryInput {
138
143
  readonly actor: unknown;
@@ -0,0 +1,67 @@
1
+ export declare const scratchBubbleTextLimit = 330;
2
+ export declare const scratchBubbleMaximumLineWidth = 170;
3
+ export declare const scratchBubbleMinimumTextWidth = 50;
4
+ export declare const scratchBubbleStrokeWidth = 4;
5
+ export declare const scratchBubblePadding = 10;
6
+ export declare const scratchBubbleCornerRadius = 16;
7
+ export declare const scratchBubbleTailHeight = 12;
8
+ export declare const scratchBubbleFontSize = 14;
9
+ export declare const scratchBubbleLineHeight = 16;
10
+ export type BubbleLayoutProfile = "scratch-default" | "custom";
11
+ export type ScratchBubbleKind = "say" | "think";
12
+ export interface ScratchBubbleTextLine {
13
+ readonly text: string;
14
+ readonly width: number;
15
+ }
16
+ export interface ScratchBubbleTextLayout {
17
+ readonly lines: readonly ScratchBubbleTextLine[];
18
+ readonly maxLineWidth: number;
19
+ readonly text: string;
20
+ }
21
+ export interface ScratchBubbleMetrics {
22
+ readonly bodyHeight: number;
23
+ readonly bodyWidth: number;
24
+ readonly height: number;
25
+ readonly paddedHeight: number;
26
+ readonly paddedWidth: number;
27
+ readonly width: number;
28
+ }
29
+ export interface ScratchBubblePositionInput {
30
+ readonly bounds: Readonly<{
31
+ bottom: number;
32
+ left: number;
33
+ right: number;
34
+ top: number;
35
+ }>;
36
+ readonly height: number;
37
+ /** Whether the bubble body is positioned to the actor's left. */
38
+ readonly pointsLeft: boolean;
39
+ readonly stageHeight: number;
40
+ readonly stageWidth: number;
41
+ readonly width: number;
42
+ }
43
+ export interface ScratchBubblePosition {
44
+ readonly centerX: number;
45
+ readonly centerY: number;
46
+ readonly left: number;
47
+ /** Whether the bubble body is positioned to the actor's left. */
48
+ readonly pointsLeft: boolean;
49
+ readonly top: number;
50
+ }
51
+ /**
52
+ * The block-level basic style is intentionally narrow. Any explicit layout,
53
+ * body, media, reveal, or motion option selects the existing custom renderer.
54
+ */
55
+ export declare function bubbleLayoutProfileForStyleInput(value: unknown): BubbleLayoutProfile;
56
+ export declare function isScratchDefaultBubbleStyleInput(value: unknown): boolean;
57
+ /** Matches the numeric presentation and length limit used by say/think. */
58
+ export declare function formatScratchBubbleArgument(value: unknown): string;
59
+ export declare function layoutScratchBubbleText(value: string, measureText?: (text: string) => number): ScratchBubbleTextLayout;
60
+ export declare function scratchBubbleMetrics(layout: ScratchBubbleTextLayout): ScratchBubbleMetrics;
61
+ export declare function positionScratchBubble(input: ScratchBubblePositionInput): ScratchBubblePosition;
62
+ export declare function renderScratchBubbleSvg(input: Readonly<{
63
+ kind: ScratchBubbleKind;
64
+ layout: ScratchBubbleTextLayout;
65
+ pointsLeft: boolean;
66
+ title?: string;
67
+ }>): string;
@@ -0,0 +1,8 @@
1
+ import type { BubbleMotionInput, BubbleScheduler } from "./composition.js";
2
+ export declare function clampMotionProgress(value: number): number;
3
+ export declare function easeMotionProgress(value: number, ease: BubbleMotionInput["ease"]): number;
4
+ /**
5
+ * Drive a motion with Bubble's scheduler so tests and non-browser hosts can
6
+ * provide deterministic time without requestAnimationFrame.
7
+ */
8
+ export declare function runMotionTimeline(scheduler: BubbleScheduler, durationSeconds: number, onFrame: (progress: number) => void): Promise<void>;
@@ -0,0 +1,97 @@
1
+ import { type BubbleImageCapability, type BubbleKind, type BubbleScheduler, type BubbleStyle, type BubbleSurface, type BubbleTextCapability } from "./composition.js";
2
+ export type BubbleRenderBackend = "scratch-render" | "svg-overlay";
3
+ export type BubbleOverlayUnsupportedBehavior = "error" | "fallback";
4
+ export declare const bubbleRenderBackends: readonly ["scratch-render", "svg-overlay"];
5
+ export declare const defaultBubbleRenderBackend: BubbleRenderBackend;
6
+ export declare const defaultBubbleOverlayUnsupportedBehavior: BubbleOverlayUnsupportedBehavior;
7
+ export interface BubbleSvgOverlayTextLine {
8
+ /** Optional baseline relative to the center of the text layout. */
9
+ readonly baseline?: number;
10
+ readonly text: string;
11
+ /** Optional x coordinate relative to the center of the text layout. */
12
+ readonly x?: number;
13
+ }
14
+ export interface BubbleSvgOverlayTextLayout {
15
+ readonly alignment: "center" | "left" | "right";
16
+ readonly backgroundColor?: string;
17
+ readonly backgroundCornerRadius?: number;
18
+ readonly fill: string;
19
+ readonly fontFamily: string;
20
+ readonly fontSize: number;
21
+ readonly fontStyle?: "normal" | "italic";
22
+ readonly fontWeight?: "normal" | "bold" | number;
23
+ readonly height: number;
24
+ readonly lineHeight: number;
25
+ readonly lines: readonly (string | BubbleSvgOverlayTextLine)[];
26
+ readonly preserveWhitespace?: boolean;
27
+ readonly width: number;
28
+ }
29
+ export interface BubbleSvgOverlayTextCapability {
30
+ layoutText(input: Readonly<{
31
+ nativeSize: Readonly<{
32
+ height: number;
33
+ width: number;
34
+ }>;
35
+ styleName: string;
36
+ text: string;
37
+ }>): BubbleSvgOverlayTextLayout;
38
+ measureText?(input: Readonly<{
39
+ nativeSize: Readonly<{
40
+ height: number;
41
+ width: number;
42
+ }>;
43
+ styleName: string;
44
+ text: string;
45
+ }>): number;
46
+ }
47
+ export interface BubbleSvgOverlayImageResource {
48
+ readonly height: number;
49
+ readonly mimeType: string;
50
+ /** A capability-owned blob URL or an approved raster data URL. */
51
+ readonly src: string;
52
+ /** Required when mimeType is image/svg+xml; the provider owns sanitizing bytes. */
53
+ readonly svgSecurity?: "sanitized";
54
+ readonly width: number;
55
+ /** Required for blob URLs and called on replacement and disposal. */
56
+ readonly release?: () => void | Promise<void>;
57
+ }
58
+ export interface BubbleSvgOverlayImageCapability {
59
+ getMimeType(name: unknown): string;
60
+ isRegistered(name: unknown): boolean;
61
+ resolveImage(name: unknown): BubbleSvgOverlayImageResource | Promise<BubbleSvgOverlayImageResource>;
62
+ }
63
+ export interface BubbleSvgOverlayRenderer {
64
+ addOverlay(element: Element, mode?: string): unknown;
65
+ getNativeSize(): unknown;
66
+ removeOverlay(element: Element): void;
67
+ on?(event: string, listener: (...args: unknown[]) => void): void;
68
+ off?(event: string, listener: (...args: unknown[]) => void): void;
69
+ }
70
+ export interface BubbleSvgOverlayActor {
71
+ readonly id: string;
72
+ readonly isStage: boolean;
73
+ readonly visible?: boolean;
74
+ readonly x?: number;
75
+ readonly y?: number;
76
+ getBoundsForBubble?(): {
77
+ readonly bottom: number;
78
+ readonly left: number;
79
+ readonly right: number;
80
+ readonly top: number;
81
+ };
82
+ onTargetVisualChange?: ((target?: BubbleSvgOverlayActor) => void) | null;
83
+ }
84
+ export interface BubbleSvgOverlaySurfaceManager {
85
+ readonly document: Document;
86
+ readonly renderer: BubbleSvgOverlayRenderer;
87
+ acquire(group: SVGGElement): void;
88
+ release(group: SVGGElement): void;
89
+ updateNativeSize(): Readonly<{
90
+ height: number;
91
+ width: number;
92
+ }>;
93
+ }
94
+ export declare function createSvgOverlayTextAdapter(capabilityInput: BubbleSvgOverlayTextCapability, renderer: Pick<BubbleSvgOverlayRenderer, "getNativeSize">): BubbleTextCapability;
95
+ export declare function createSvgOverlayImageAdapter(capabilityInput: BubbleSvgOverlayImageCapability): BubbleImageCapability;
96
+ export declare function createSvgOverlaySurfaceManager(renderer: BubbleSvgOverlayRenderer, documentInput: Document): BubbleSvgOverlaySurfaceManager;
97
+ export declare function createSvgOverlaySurface(manager: BubbleSvgOverlaySurfaceManager, actor: BubbleSvgOverlayActor, actorKey: string, kind: BubbleKind, style: BubbleStyle, scheduler: BubbleScheduler): BubbleSurface;
@@ -9,8 +9,8 @@ export type BubbleTextTarget = object;
9
9
  * Text rendering contract consumed by Bubble composition.
10
10
  *
11
11
  * Bubble owns placement, outer shape, portraits, reveal, and animation. A
12
- * text adapter owns text styles, SVG/text skin creation, measurement, and
13
- * target skin release.
12
+ * text adapter owns text styles, layout or rendering, measurement, and target
13
+ * resource release.
14
14
  */
15
15
  export interface BubbleTextCapability {
16
16
  setText(input: {
@@ -1,6 +1,10 @@
1
1
  import { type BubbleComposition, type BubbleCompositionOptions, type BubbleAudioCapability, type BubbleImageCapability, type BubbleScheduler, type BubbleTextCapability } from "./composition.js";
2
2
  import { type TurboWarpSvgTextExtension } from "./turbowarp-svg-text-adapter.js";
3
- export { createSvgTextCompositionCapability, createTurboWarpSvgTextCapability, type TurboWarpSvgTextExtension, } from "./turbowarp-svg-text-adapter.js";
3
+ import { type AssetManagerDOMImageCapability } from "./asset-manager-image-adapter.js";
4
+ export { createAssetManagerSvgOverlayImageCapability, type AssetManagerDOMImageCapability, type AssetManagerDOMImageResource, } from "./asset-manager-image-adapter.js";
5
+ export { createSvgTextCompositionCapability, createSvgTextOverlayTextCapability, createTurboWarpSvgTextCapability, createTurboWarpSvgTextOverlayTextCapability, type SvgTextLayoutCompositionLike, type TurboWarpSvgTextExtension, } from "./turbowarp-svg-text-adapter.js";
6
+ import { type BubbleOverlayUnsupportedBehavior, type BubbleRenderBackend, type BubbleSvgOverlayImageCapability, type BubbleSvgOverlayTextCapability } from "./svg-overlay-surface.js";
7
+ export { createSvgOverlayImageAdapter, createSvgOverlaySurface, createSvgOverlaySurfaceManager, createSvgOverlayTextAdapter, bubbleRenderBackends, defaultBubbleOverlayUnsupportedBehavior, defaultBubbleRenderBackend, type BubbleOverlayUnsupportedBehavior, type BubbleRenderBackend, type BubbleSvgOverlayActor, type BubbleSvgOverlayImageCapability, type BubbleSvgOverlayImageResource, type BubbleSvgOverlayRenderer, type BubbleSvgOverlaySurfaceManager, type BubbleSvgOverlayTextCapability, type BubbleSvgOverlayTextLine, type BubbleSvgOverlayTextLayout, } from "./svg-overlay-surface.js";
4
8
  export interface TurboWarpBubbleTarget {
5
9
  readonly id: string;
6
10
  readonly isStage: boolean;
@@ -30,6 +34,10 @@ export interface TurboWarpBubbleRenderer {
30
34
  /** Scratch/TurboWarp's ghost effect is used to implement fade motions. */
31
35
  updateDrawableEffect?(drawableId: number, effectName: string, value: number): void;
32
36
  setDrawableOrder?(drawableId: number, order: number, layerGroup: string, relative?: boolean): void;
37
+ addOverlay?(element: Element, mode?: string): unknown;
38
+ removeOverlay?(element: Element): void;
39
+ on?(event: string, listener: (...args: unknown[]) => void): void;
40
+ off?(event: string, listener: (...args: unknown[]) => void): void;
33
41
  }
34
42
  export interface TurboWarpAssetManagerExtension {
35
43
  isLoaded(args: Readonly<{
@@ -38,6 +46,8 @@ export interface TurboWarpAssetManagerExtension {
38
46
  getAssetMimeType(args: Readonly<{
39
47
  NAME: unknown;
40
48
  }>): string;
49
+ /** Available from Asset Manager 0.12.1 for the skin-free overlay path. */
50
+ getDOMImageCapability?(): AssetManagerDOMImageCapability;
41
51
  playSound?(args: Readonly<{
42
52
  NAME: unknown;
43
53
  }>): Promise<void>;
@@ -57,13 +67,23 @@ export interface TurboWarpBubbleRuntime {
57
67
  requestRedraw?(): void;
58
68
  }
59
69
  export interface TurboWarpBubbleCompositionOptions {
70
+ /** Defaults to the skin-free svg-overlay backend. */
71
+ readonly bubbleRenderBackend?: BubbleRenderBackend;
72
+ /** Defaults to error so the skin-free default never silently creates skins. */
73
+ readonly svgOverlayUnsupportedBehavior?: BubbleOverlayUnsupportedBehavior;
74
+ /** Host-neutral text layout supplied by turbowarp-svg-text or another host. */
75
+ readonly svgOverlayTextCapability?: BubbleSvgOverlayTextCapability;
76
+ /** Releasable DOM image resources supplied by Asset Manager or another host. */
77
+ readonly svgOverlayImageCapability?: BubbleSvgOverlayImageCapability;
78
+ /** Browser document override for packaged players and deterministic tests. */
79
+ readonly document?: Document;
60
80
  readonly imageResolver?: BubbleImageCapability;
61
81
  readonly audio?: BubbleAudioCapability;
62
82
  readonly textCapability?: BubbleTextCapability;
63
83
  readonly scheduler?: BubbleScheduler;
64
84
  readonly onAnimationError?: BubbleCompositionOptions["onAnimationError"];
65
85
  }
66
- export type BubbleRuntimeAdapterErrorCode = "BUBBLE-RUNTIME-001" | "BUBBLE-RUNTIME-002" | "BUBBLE-RUNTIME-003";
86
+ export type BubbleRuntimeAdapterErrorCode = "BUBBLE-RUNTIME-001" | "BUBBLE-RUNTIME-002" | "BUBBLE-RUNTIME-003" | "BUBBLE-RUNTIME-004";
67
87
  export declare class BubbleRuntimeAdapterError extends Error {
68
88
  readonly code: BubbleRuntimeAdapterErrorCode;
69
89
  constructor(code: BubbleRuntimeAdapterErrorCode, message: string);
@@ -1,5 +1,7 @@
1
1
  import type { BubbleTextCapability } from "./text-capability.js";
2
+ import type { BubbleSvgOverlayTextCapability } from "./svg-overlay-surface.js";
2
3
  export interface TurboWarpSvgTextExtension {
4
+ getLayoutCapability?(): SvgTextLayoutCompositionLike;
3
5
  setText(args: Readonly<{
4
6
  STYLE: unknown;
5
7
  TEXT: unknown;
@@ -9,6 +11,34 @@ export interface TurboWarpSvgTextExtension {
9
11
  measureText?(styleName: unknown, text: unknown): number;
10
12
  releaseTextActor(target: unknown): boolean;
11
13
  }
14
+ interface SvgTextLayoutLineLike {
15
+ readonly baseline: number;
16
+ readonly text: string;
17
+ readonly width: number;
18
+ readonly x: number;
19
+ }
20
+ interface SvgTextLayoutLike {
21
+ readonly height: number;
22
+ readonly lines: readonly SvgTextLayoutLineLike[];
23
+ readonly preserveWhitespace: boolean;
24
+ readonly style: Readonly<{
25
+ alignment: "center" | "left" | "right";
26
+ backgroundColor: string;
27
+ cornerRadius: number;
28
+ font: string;
29
+ fontSize: number;
30
+ lineHeight: number;
31
+ textColor: string;
32
+ }>;
33
+ readonly width: number;
34
+ }
35
+ export interface SvgTextLayoutCompositionLike {
36
+ layoutText(input: Readonly<{
37
+ nativeSize: readonly [width: number, height: number];
38
+ styleName: string;
39
+ text: string;
40
+ }>): SvgTextLayoutLike;
41
+ }
12
42
  /**
13
43
  * Adapt the TurboWarp SVG Text extension to Bubble's host-neutral text
14
44
  * capability contract.
@@ -19,3 +49,13 @@ export declare function createTurboWarpSvgTextCapability(extensionInput: unknown
19
49
  * This helper keeps the core package independent from SVG Text's target type.
20
50
  */
21
51
  export declare function createSvgTextCompositionCapability(compositionInput: unknown): BubbleTextCapability;
52
+ /**
53
+ * Adapt SVG Text's host-neutral layout composition to Bubble's SVG overlay.
54
+ * The adapter preserves SVG Text's line coordinates without creating skins.
55
+ */
56
+ export declare function createSvgTextOverlayTextCapability(compositionInput: SvgTextLayoutCompositionLike): BubbleSvgOverlayTextCapability;
57
+ /**
58
+ * Adapts the stock SVG Text extension's shared named-style layout registry.
59
+ */
60
+ export declare function createTurboWarpSvgTextOverlayTextCapability(extensionInput: unknown): BubbleSvgOverlayTextCapability;
61
+ export {};
@@ -14,7 +14,7 @@
14
14
 
15
15
  <rect width="1200" height="880" fill="#f2f4f8"/>
16
16
  <text x="32" y="48" class="heading">Bubbleブロック:最小構成</text>
17
- <text x="32" y="74" class="body">緑の旗でstyleと入力を準備し、セリフごとに say → Bubble内蔵待機 → close を実行します。</text>
17
+ <text x="32" y="74" class="body">緑の旗でstyleと入力を準備し、セリフごとに show → Bubble内蔵待機 → close を実行します。</text>
18
18
  <g>
19
19
  <rect x="24" y="96" width="560" height="752" rx="20" fill="#ffffff" stroke="#d9deea" stroke-width="2"/>
20
20
  <text x="48" y="134" class="subheading">1. 緑の旗で準備</text>
@@ -78,63 +78,38 @@
78
78
  <text x="312" y="302" class="small">Next2</text>
79
79
  <text x="443" y="302" class="small">次へアイコン 2枚目</text>
80
80
  </g></g>
81
- <g role="group" aria-label="SVG Textでdialogue-text styleを定義">
82
- <rect x="48" y="506" width="510" height="94" rx="12" fill="#9966ff" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
83
- <rect x="66" y="506" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
84
- <text x="65" y="533" class="block-text" style="font-size:12px">define text style</text>
85
- <rect x="198.47999999999996" y="514" width="112.71999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
86
- <text x="206.47999999999996" y="533" class="input-text" style="font-size:12px">dialogue-text</text>
87
- <text x="318.19999999999993" y="533" class="block-text" style="font-size:12px">background</text>
88
- <rect x="399.5999999999999" y="514" width="68.07999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
89
- <text x="407.5999999999999" y="533" class="input-text" style="font-size:12px">#fff4cc</text>
90
- <text x="65" y="558" class="block-text" style="font-size:12px">text</text>
91
- <rect x="101.75999999999999" y="539" width="68.07999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
92
- <text x="109.75999999999999" y="558" class="input-text" style="font-size:12px">#332200</text>
93
- <text x="176.83999999999997" y="558" class="block-text" style="font-size:12px">font</text>
94
- <rect x="213.59999999999997" y="539" width="105.27999999999999" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
95
- <text x="221.59999999999997" y="558" class="input-text" style="font-size:12px">Noto Sans JP</text>
96
- <text x="325.87999999999994" y="558" class="block-text" style="font-size:12px">size</text>
97
- <rect x="362.63999999999993" y="539" width="38.32" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
98
- <text x="370.63999999999993" y="558" class="input-text" style="font-size:12px">100</text>
99
- <text x="407.9599999999999" y="558" class="block-text" style="font-size:12px">align</text>
100
- <rect x="452.1599999999999" y="539" width="45.76" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
101
- <text x="460.1599999999999" y="558" class="input-text" style="font-size:12px">left</text>
102
- <text x="65" y="583" class="block-text" style="font-size:12px">bubble direction</text>
103
- <rect x="191.03999999999996" y="564" width="34" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
104
- <text x="199.03999999999996" y="583" class="input-text" style="font-size:12px">up</text>
105
- </g>
106
81
  <g role="group" aria-label="Bubble styleを定義">
107
- <rect x="48" y="612" width="510" height="50" rx="12" fill="#ff6680" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
108
- <rect x="66" y="612" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
109
- <text x="65" y="643" class="block-text" style="font-size:12px">define bubble style</text>
110
- <rect x="213.35999999999999" y="624" width="112.71999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
111
- <text x="221.35999999999999" y="643" class="input-text" style="font-size:12px">hero-dialogue</text>
112
- <text x="333.08" y="643" class="block-text" style="font-size:12px">using text style</text>
113
- <rect x="459.11999999999995" y="624" width="112.71999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
114
- <text x="467.11999999999995" y="643" class="input-text" style="font-size:12px">dialogue-text</text>
82
+ <rect x="48" y="506" width="510" height="50" rx="12" fill="#ff6680" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
83
+ <rect x="66" y="506" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
84
+ <text x="65" y="537" class="block-text" style="font-size:12px">define bubble style</text>
85
+ <rect x="213.35999999999999" y="518" width="112.71999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
86
+ <text x="221.35999999999999" y="537" class="input-text" style="font-size:12px">hero-dialogue</text>
87
+ <text x="333.08" y="537" class="block-text" style="font-size:12px">using text style</text>
88
+ <rect x="459.11999999999995" y="518" width="68.07999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
89
+ <text x="467.11999999999995" y="537" class="input-text" style="font-size:12px">default</text>
115
90
  </g>
116
91
  <g role="group" aria-label="Bubbleの配置を設定">
117
- <rect x="48" y="672" width="510" height="50" rx="12" fill="#ff6680" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
118
- <rect x="66" y="672" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
119
- <text x="65" y="703" class="block-text" style="font-size:12px">set bubble placement</text>
120
- <rect x="220.79999999999998" y="684" width="75.51999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
121
- <text x="228.79999999999998" y="703" class="input-text" style="font-size:12px">up-right</text>
122
- <text x="303.31999999999994" y="703" class="block-text" style="font-size:12px">for bubble style</text>
123
- <rect x="429.3599999999999" y="684" width="112.71999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
124
- <text x="437.3599999999999" y="703" class="input-text" style="font-size:12px">hero-dialogue</text>
92
+ <rect x="48" y="566" width="510" height="50" rx="12" fill="#ff6680" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
93
+ <rect x="66" y="566" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
94
+ <text x="65" y="597" class="block-text" style="font-size:12px">set bubble placement</text>
95
+ <rect x="220.79999999999998" y="578" width="75.51999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
96
+ <text x="228.79999999999998" y="597" class="input-text" style="font-size:12px">up-right</text>
97
+ <text x="303.31999999999994" y="597" class="block-text" style="font-size:12px">for bubble style</text>
98
+ <rect x="429.3599999999999" y="578" width="112.71999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
99
+ <text x="437.3599999999999" y="597" class="input-text" style="font-size:12px">hero-dialogue</text>
125
100
  </g>
126
101
  <g role="group" aria-label="表情ベースを設定">
127
- <rect x="48" y="732" width="510" height="50" rx="12" fill="#ff6680" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
128
- <rect x="66" y="732" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
129
- <text x="65" y="763" class="block-text" style="font-size:12px">set portrait base</text>
130
- <rect x="198.47999999999996" y="744" width="75.51999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
131
- <text x="206.47999999999996" y="763" class="input-text" style="font-size:12px">HeroFace</text>
132
- <text x="280.99999999999994" y="763" class="block-text" style="font-size:12px">for bubble style</text>
133
- <rect x="407.0399999999999" y="744" width="112.71999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
134
- <text x="415.0399999999999" y="763" class="input-text" style="font-size:12px">hero-dialogue</text>
135
- </g>
136
- <text x="52" y="804" class="body">続けて blink・lip-sync・continue のフレームを設定</text>
137
- <text x="52" y="832" class="small">目パチ 0.4秒 / 口パク 0.1秒 / 次へ 0.2秒</text>
102
+ <rect x="48" y="626" width="510" height="50" rx="12" fill="#ff6680" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
103
+ <rect x="66" y="626" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
104
+ <text x="65" y="657" class="block-text" style="font-size:12px">set portrait base</text>
105
+ <rect x="198.47999999999996" y="638" width="75.51999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
106
+ <text x="206.47999999999996" y="657" class="input-text" style="font-size:12px">HeroFace</text>
107
+ <text x="280.99999999999994" y="657" class="block-text" style="font-size:12px">for bubble style</text>
108
+ <rect x="407.0399999999999" y="638" width="112.71999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
109
+ <text x="415.0399999999999" y="657" class="input-text" style="font-size:12px">hero-dialogue</text>
110
+ </g>
111
+ <text x="52" y="698" class="body">続けて blink・lip-sync・continue のフレームを設定</text>
112
+ <text x="52" y="726" class="small">目パチ 0.4秒 / 口パク 0.1秒 / 次へ 0.2秒</text>
138
113
  <g role="group" aria-label="目パチフレームを設定">
139
114
  <rect x="640" y="150" width="510" height="70" rx="12" fill="#ff6680" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
140
115
  <rect x="658" y="150" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
@@ -197,15 +172,15 @@
197
172
  <rect x="1029.0400000000002" y="460" width="68.07999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
198
173
  <text x="1037.0400000000002" y="479" class="input-text" style="font-size:12px">pressed</text>
199
174
  </g>
200
- <g role="group" aria-label="sayブロックでセリフを表示">
175
+ <g role="group" aria-label="showブロックでセリフを表示">
201
176
  <rect x="668" y="506" width="454" height="50" rx="12" fill="#ff6680" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
202
177
  <rect x="686" y="506" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
203
- <text x="685" y="537" class="block-text" style="font-size:14px">say</text>
204
- <rect x="718.04" y="516" width="86" height="27" rx="13.5" fill="#ffffff" fill-opacity="0.96"/>
205
- <text x="726.04" y="537" class="input-text" style="font-size:14px">海へ出発!</text>
206
- <text x="811.04" y="537" class="block-text" style="font-size:14px">with bubble style</text>
207
- <rect x="965.6" y="516" width="128.84000000000003" height="27" rx="13.5" fill="#ffffff" fill-opacity="0.96"/>
208
- <text x="973.6" y="537" class="input-text" style="font-size:14px">hero-dialogue</text>
178
+ <text x="685" y="537" class="block-text" style="font-size:14px">show</text>
179
+ <rect x="726.72" y="516" width="86" height="27" rx="13.5" fill="#ffffff" fill-opacity="0.96"/>
180
+ <text x="734.72" y="537" class="input-text" style="font-size:14px">海へ出発!</text>
181
+ <text x="819.72" y="537" class="block-text" style="font-size:14px">with bubble style</text>
182
+ <rect x="974.2800000000001" y="516" width="128.84000000000003" height="27" rx="13.5" fill="#ffffff" fill-opacity="0.96"/>
183
+ <text x="982.2800000000001" y="537" class="input-text" style="font-size:14px">hero-dialogue</text>
209
184
  </g>
210
185
  <g role="group" aria-label="Bubbleで条件成立またはタイムアウトまで待機">
211
186
  <rect x="668" y="568" width="454" height="72" rx="12" fill="#ff6680" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
Binary file
@@ -30,16 +30,7 @@
30
30
  <rect x="344" y="118" width="296" height="280" rx="18" fill="#ffffff" stroke="#d9deea" stroke-width="2"/>
31
31
  <text x="360" y="150" style="fill:#25283a;font-size:18px;font-weight:700">THINKING</text>
32
32
  <svg x="352" y="162" width="280" height="170" viewBox="0 0 280 170" data-bubble-renderer="canonical" data-bubble-style="THINKING" overflow="visible">
33
- <title>THINKING visual style example</title><circle cx="92.12515224204833" cy="153.37236839860094" r="5" fill="#fff4cc" stroke="#6f5b45" stroke-width="2"/><circle cx="88.82135196866629" cy="158.0906841737055" r="3.5" fill="#fff4cc" stroke="#6f5b45" stroke-width="2"/><g transform="translate(0 0) scale(1)"><path d="M 42 85
34
- C 22 65, 32 42, 60 44
35
- C 68 22, 122 19, 140 37
36
- C 164 16, 228 24, 226 48
37
- C 258 42, 263 82, 253 100
38
- C 264 136, 236 153, 214 139
39
- C 201 158, 152 153, 140 139
40
- C 116 158, 66 153, 62 134
41
- C 31 148, 17 105, 42 85 Z"
42
- fill="#fff4cc" stroke="#6f5b45" stroke-width="3" stroke-linejoin="round"/></g><text x="140" y="89.9" text-anchor="middle" fill="#25283a" font-family="Noto Sans JP, sans-serif" font-size="14">どうしようかな…</text>
33
+ <title>THINKING visual style example</title><circle cx="92.12515224204833" cy="153.37236839860094" r="5" fill="#fff4cc" stroke="#6f5b45" stroke-width="2"/><circle cx="88.82135196866629" cy="158.0906841737055" r="3.5" fill="#fff4cc" stroke="#6f5b45" stroke-width="2"/><g transform="translate(0 0) scale(1)"><path d="M 24.0000 85.0000 C 24.0000 76.8667 24.0000 66.7000 30.9600 60.6000 C 37.9200 54.5000 56.0933 53.6867 65.7600 48.4000 C 75.4267 43.1133 76.5867 29.6933 88.9600 28.8800 C 101.3333 28.0667 124.5333 43.7233 140.0000 43.5200 C 155.4667 43.3167 168.6133 27.2533 181.7600 27.6600 C 194.9067 28.0667 207.2800 40.4700 218.8800 45.9600 C 230.4800 51.4500 245.1733 53.6867 251.3600 60.6000 C 257.5467 67.5133 257.1600 79.3067 256.0000 87.4400 C 254.8400 95.5733 251.3600 103.3000 244.4000 109.4000 C 237.4400 115.5000 224.6800 118.5500 214.2400 124.0400 C 203.8000 129.5300 194.1333 141.9333 181.7600 142.3400 C 169.3867 142.7467 153.9200 126.4800 140.0000 126.4800 C 126.0800 126.4800 110.6133 142.7467 98.2400 142.3400 C 85.8667 141.9333 76.9733 129.5300 65.7600 124.0400 C 54.5467 118.5500 37.9200 115.9067 30.9600 109.4000 C 24.0000 102.8933 24.0000 93.1333 24.0000 85.0000 Z" fill="#fff4cc" stroke="#6f5b45" stroke-width="3" stroke-linejoin="round"/></g><text x="140" y="89.9" text-anchor="middle" fill="#25283a" font-family="Noto Sans JP, sans-serif" font-size="14">どうしようかな…</text>
43
34
  </svg>
44
35
  <text x="492" y="350" text-anchor="middle" class="small">思考</text>
45
36
  <text x="492" y="368" text-anchor="middle" class="small">雲形本体+小さな丸のtrail</text>
@@ -49,16 +40,7 @@
49
40
  <rect x="656" y="118" width="296" height="280" rx="18" fill="#ffffff" stroke="#d9deea" stroke-width="2"/>
50
41
  <text x="672" y="150" style="fill:#25283a;font-size:18px;font-weight:700">DREAMING</text>
51
42
  <svg x="664" y="162" width="280" height="170" viewBox="0 0 280 170" data-bubble-renderer="canonical" data-bubble-style="DREAMING" overflow="visible">
52
- <title>DREAMING visual style example</title><circle cx="92.64137103476426" cy="152.63513155874082" r="7" fill="#fff4cc" stroke="#6f5b45" stroke-width="2"/><circle cx="89.23432700283905" cy="157.50089470181746" r="4.5" fill="#fff4cc" stroke="#6f5b45" stroke-width="2"/><circle cx="86.96296431488891" cy="160.74473679720185" r="3" fill="#fff4cc" stroke="#6f5b45" stroke-width="2"/><g transform="translate(0 0) scale(1)"><path d="M 42 85
53
- C 22 65, 32 42, 60 44
54
- C 68 22, 122 19, 140 37
55
- C 164 16, 228 24, 226 48
56
- C 258 42, 263 82, 253 100
57
- C 264 136, 236 153, 214 139
58
- C 201 158, 152 153, 140 139
59
- C 116 158, 66 153, 62 134
60
- C 31 148, 17 105, 42 85 Z"
61
- fill="#fff4cc" stroke="#6f5b45" stroke-width="3" stroke-linejoin="round"/></g><text x="140" y="89.9" text-anchor="middle" fill="#25283a" font-family="Noto Sans JP, sans-serif" font-size="14">いつか空の向こうへ</text>
43
+ <title>DREAMING visual style example</title><circle cx="92.64137103476426" cy="152.63513155874082" r="7" fill="#fff4cc" stroke="#6f5b45" stroke-width="2"/><circle cx="89.23432700283905" cy="157.50089470181746" r="4.5" fill="#fff4cc" stroke="#6f5b45" stroke-width="2"/><circle cx="86.96296431488891" cy="160.74473679720185" r="3" fill="#fff4cc" stroke="#6f5b45" stroke-width="2"/><g transform="translate(0 0) scale(1)"><path d="M 24.0000 85.0000 C 24.0000 76.8667 24.0000 66.7000 30.9600 60.6000 C 37.9200 54.5000 56.0933 53.6867 65.7600 48.4000 C 75.4267 43.1133 76.5867 29.6933 88.9600 28.8800 C 101.3333 28.0667 124.5333 43.7233 140.0000 43.5200 C 155.4667 43.3167 168.6133 27.2533 181.7600 27.6600 C 194.9067 28.0667 207.2800 40.4700 218.8800 45.9600 C 230.4800 51.4500 245.1733 53.6867 251.3600 60.6000 C 257.5467 67.5133 257.1600 79.3067 256.0000 87.4400 C 254.8400 95.5733 251.3600 103.3000 244.4000 109.4000 C 237.4400 115.5000 224.6800 118.5500 214.2400 124.0400 C 203.8000 129.5300 194.1333 141.9333 181.7600 142.3400 C 169.3867 142.7467 153.9200 126.4800 140.0000 126.4800 C 126.0800 126.4800 110.6133 142.7467 98.2400 142.3400 C 85.8667 141.9333 76.9733 129.5300 65.7600 124.0400 C 54.5467 118.5500 37.9200 115.9067 30.9600 109.4000 C 24.0000 102.8933 24.0000 93.1333 24.0000 85.0000 Z" fill="#fff4cc" stroke="#6f5b45" stroke-width="3" stroke-linejoin="round"/></g><text x="140" y="89.9" text-anchor="middle" fill="#25283a" font-family="Noto Sans JP, sans-serif" font-size="14">いつか空の向こうへ</text>
62
44
  </svg>
63
45
  <text x="804" y="350" text-anchor="middle" class="small">夢・回想</text>
64
46
  <text x="804" y="368" text-anchor="middle" class="small">柔らかな雲形+長い丸trail</text>