narraleaf-studio 1.7.0 → 1.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.
- package/dist/_api.d.ts +162 -3
- package/dist/plugin.d.ts +2 -0
- package/dist/runtime.d.ts +2 -0
- package/package.json +1 -1
package/dist/_api.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { LucideIcon } from 'lucide-react';
|
|
14
14
|
import React$1 from 'react';
|
|
15
|
-
import { ComponentType, InputHTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
|
|
15
|
+
import { CSSProperties, ComponentType, InputHTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
|
|
16
16
|
|
|
17
17
|
declare enum FsRejectErrorCode {
|
|
18
18
|
NOT_FOUND = "NOT_FOUND",
|
|
@@ -1320,6 +1320,13 @@ type StoryTextMarks = {
|
|
|
1320
1320
|
*/
|
|
1321
1321
|
fontSizeStep?: number;
|
|
1322
1322
|
emphasis?: StoryTextEmphasis;
|
|
1323
|
+
/** An inline effect a plugin contributes, such as shaking text. */
|
|
1324
|
+
effect?: StoryTextEffect;
|
|
1325
|
+
};
|
|
1326
|
+
type StoryTextEffectParamValue = number | string | boolean;
|
|
1327
|
+
type StoryTextEffect = {
|
|
1328
|
+
id: string;
|
|
1329
|
+
params?: Record<string, StoryTextEffectParamValue>;
|
|
1323
1330
|
};
|
|
1324
1331
|
type StoryInterpolationRef = {
|
|
1325
1332
|
kind: "variable";
|
|
@@ -2357,6 +2364,10 @@ declare const en: {
|
|
|
2357
2364
|
readonly all: "Show all characters";
|
|
2358
2365
|
};
|
|
2359
2366
|
};
|
|
2367
|
+
readonly groupSubmenus: {
|
|
2368
|
+
readonly label: "Show groups as submenus";
|
|
2369
|
+
readonly description: "In candidate menus, each character group and asset folder is one entry whose contents open in a column beside it.";
|
|
2370
|
+
};
|
|
2360
2371
|
readonly dictionaries: {
|
|
2361
2372
|
readonly label: "Spelling dictionaries";
|
|
2362
2373
|
};
|
|
@@ -3494,6 +3505,7 @@ declare const en: {
|
|
|
3494
3505
|
readonly character_layered_set: "Lay out a layered character";
|
|
3495
3506
|
readonly character_layers_import: "Build a layered character from files";
|
|
3496
3507
|
readonly character_preview: "Preview a character look";
|
|
3508
|
+
readonly character_avatars_autoframe: "Auto-frame dialog avatars";
|
|
3497
3509
|
readonly variables_list: "List variables";
|
|
3498
3510
|
readonly variable_upsert: "Create or update a variable";
|
|
3499
3511
|
readonly variable_delete: "Delete a variable";
|
|
@@ -4539,6 +4551,9 @@ declare const en: {
|
|
|
4539
4551
|
};
|
|
4540
4552
|
readonly sceneActions: "Scene actions";
|
|
4541
4553
|
readonly chapterActions: "Chapter actions";
|
|
4554
|
+
readonly outlineView: "Outline display";
|
|
4555
|
+
readonly showCastAvatars: "Show Cast Avatars";
|
|
4556
|
+
readonly castLabel: "Cast: {names}";
|
|
4542
4557
|
readonly setEntryScene: "Set as Entry Scene";
|
|
4543
4558
|
readonly documentUnavailable: "Story document unavailable.";
|
|
4544
4559
|
readonly newStoryPlaceholder: "Enter story name";
|
|
@@ -4719,6 +4734,7 @@ declare const en: {
|
|
|
4719
4734
|
readonly badTag: "This line carries a formatting tag that is unknown, or left open.";
|
|
4720
4735
|
readonly badExpression: "This expression does not resolve.";
|
|
4721
4736
|
readonly layerDeclaration: "A script cannot declare a layer. Add it to the scene's layers";
|
|
4737
|
+
readonly retiredLead: "Options no longer read \"show if\" or \"enable if\". Write \"hide if\" or \"disable if\" followed by the condition under which the option is hidden or greyed out";
|
|
4722
4738
|
};
|
|
4723
4739
|
readonly view: {
|
|
4724
4740
|
readonly open: "Read as a script";
|
|
@@ -5028,6 +5044,11 @@ declare const en: {
|
|
|
5028
5044
|
readonly speedUnit: "cps";
|
|
5029
5045
|
readonly speedPlaceholder: "Line";
|
|
5030
5046
|
};
|
|
5047
|
+
readonly textEffect: {
|
|
5048
|
+
readonly effect: "Effect";
|
|
5049
|
+
readonly none: "None";
|
|
5050
|
+
readonly unavailable: "{id} (not installed)";
|
|
5051
|
+
};
|
|
5031
5052
|
readonly ruby: {
|
|
5032
5053
|
readonly title: "Ruby text";
|
|
5033
5054
|
readonly placeholder: "Reading";
|
|
@@ -5065,6 +5086,8 @@ declare const en: {
|
|
|
5065
5086
|
readonly rubyHint: "Ruby text (select the words to annotate)";
|
|
5066
5087
|
readonly type: "Type";
|
|
5067
5088
|
readonly typeHint: "Type (select the words to set)";
|
|
5089
|
+
readonly effects: "Effects";
|
|
5090
|
+
readonly effectsHint: "Effects (select the words to set)";
|
|
5068
5091
|
readonly tools: "Rich text tools";
|
|
5069
5092
|
readonly pauseClick: "Pause (waits for a click)";
|
|
5070
5093
|
readonly pauseSeconds: "Pause {seconds}s";
|
|
@@ -9206,6 +9229,20 @@ declare const en: {
|
|
|
9206
9229
|
readonly createCharacter: "create character {name}";
|
|
9207
9230
|
readonly editCharacter: "edit character {name}";
|
|
9208
9231
|
readonly deleteGroup: "delete group {name}";
|
|
9232
|
+
readonly autoFrameAvatars: "auto-frame dialog avatars of {name}";
|
|
9233
|
+
};
|
|
9234
|
+
readonly autoFrame: {
|
|
9235
|
+
readonly all: "Auto-frame all dialog avatars";
|
|
9236
|
+
readonly one: "Auto-frame avatar";
|
|
9237
|
+
readonly running: "Auto-framing dialog avatars";
|
|
9238
|
+
readonly consoleChannel: "Avatars";
|
|
9239
|
+
readonly consoleChannelDescription: "Dialog avatars framed on a detected head";
|
|
9240
|
+
readonly started: "Detecting heads to frame dialog avatars";
|
|
9241
|
+
readonly summary: "Framed {framed} \u00B7 No head found {noHead} \u00B7 Kept existing framing {kept}";
|
|
9242
|
+
readonly noHeadLine: "{name}: no head found in {looks}";
|
|
9243
|
+
readonly nothingToDo: "No dialog avatars to frame";
|
|
9244
|
+
readonly noHead: "No head found";
|
|
9245
|
+
readonly failed: "Auto-framing failed: {message}";
|
|
9209
9246
|
};
|
|
9210
9247
|
readonly create: {
|
|
9211
9248
|
readonly nameRequired: "Give the character a name.";
|
|
@@ -9470,7 +9507,7 @@ declare const en: {
|
|
|
9470
9507
|
readonly resetView: "Reset View";
|
|
9471
9508
|
readonly alt: "Variant preview";
|
|
9472
9509
|
readonly setPortrait: "Portrait framing";
|
|
9473
|
-
readonly resetPortrait: "
|
|
9510
|
+
readonly resetPortrait: "Clear framing";
|
|
9474
9511
|
readonly portraitTitle: "Portrait framing";
|
|
9475
9512
|
readonly portraitScoped: "Frame this look only";
|
|
9476
9513
|
};
|
|
@@ -11829,7 +11866,7 @@ declare const en: {
|
|
|
11829
11866
|
readonly imageWebpQualityTitle: "WebP quality";
|
|
11830
11867
|
readonly imageWebpQualityDescription: "Quality passed to the WebP encoder, from 1 to 100.";
|
|
11831
11868
|
readonly imageMaxDimensionTitle: "Maximum image size";
|
|
11832
|
-
readonly imageMaxDimensionDescription: "
|
|
11869
|
+
readonly imageMaxDimensionDescription: "Backgrounds and interface images longer than this on their longest edge are scaled down. Character sprites and other images drawn at their own pixel size keep their size. 0 keeps every image at the size it was saved.";
|
|
11833
11870
|
readonly audioModeTitle: "Audio compression settings";
|
|
11834
11871
|
readonly audioBitrateKbpsTitle: "Audio bitrate";
|
|
11835
11872
|
readonly audioBitrateKbpsDescription: "AAC bitrate, in kbit/s.";
|
|
@@ -11962,6 +11999,10 @@ declare const en: {
|
|
|
11962
11999
|
readonly one: "{count} action";
|
|
11963
12000
|
readonly other: "{count} actions";
|
|
11964
12001
|
};
|
|
12002
|
+
readonly inlineTextEffect: {
|
|
12003
|
+
readonly one: "{count} text effect";
|
|
12004
|
+
readonly other: "{count} text effects";
|
|
12005
|
+
};
|
|
11965
12006
|
};
|
|
11966
12007
|
};
|
|
11967
12008
|
readonly live: {
|
|
@@ -12293,6 +12334,12 @@ declare const en: {
|
|
|
12293
12334
|
readonly name: "Empty";
|
|
12294
12335
|
readonly description: "Project structure only";
|
|
12295
12336
|
};
|
|
12337
|
+
readonly parts: {
|
|
12338
|
+
readonly label: "Sample content";
|
|
12339
|
+
readonly helper: "Unticked parts are left out of the new project. The screens always come in.";
|
|
12340
|
+
readonly all: "All";
|
|
12341
|
+
readonly none: "No sample content";
|
|
12342
|
+
};
|
|
12296
12343
|
};
|
|
12297
12344
|
readonly project: {
|
|
12298
12345
|
readonly name: "Project Name";
|
|
@@ -13361,6 +13408,8 @@ declare const en: {
|
|
|
13361
13408
|
readonly compressionImages: "Images compressed";
|
|
13362
13409
|
readonly compressionMedia: "Audio and video compressed";
|
|
13363
13410
|
readonly compressionMetadata: "Metadata removed";
|
|
13411
|
+
readonly compressionKeptAtSize: "Kept at full size";
|
|
13412
|
+
readonly compressionKeptAtSizeHint: "Drawn at their own pixels";
|
|
13364
13413
|
readonly includedTitle: "Assets carried";
|
|
13365
13414
|
readonly includedEmpty: "This run carried no assets.";
|
|
13366
13415
|
readonly excludedTitle: "Assets left out";
|
|
@@ -14076,6 +14125,12 @@ declare const en: {
|
|
|
14076
14125
|
readonly message: "This line has no text";
|
|
14077
14126
|
readonly help: string;
|
|
14078
14127
|
};
|
|
14128
|
+
readonly textUnknownEffect: {
|
|
14129
|
+
readonly title: "Text effect not installed";
|
|
14130
|
+
readonly description: "A line uses a text effect that no installed plugin provides";
|
|
14131
|
+
readonly message: "The text effect {effect} is not provided by any installed plugin";
|
|
14132
|
+
readonly help: string;
|
|
14133
|
+
};
|
|
14079
14134
|
readonly localizationMissing: {
|
|
14080
14135
|
readonly title: "Missing translation";
|
|
14081
14136
|
readonly description: "A line or interface text with no translation in a target language";
|
|
@@ -16198,6 +16253,15 @@ export type PluginContributes = {
|
|
|
16198
16253
|
blueprintNodes?: string[];
|
|
16199
16254
|
/** Widget element types this plugin provides (editor module + runtime renderer). */
|
|
16200
16255
|
widgets?: string[];
|
|
16256
|
+
/**
|
|
16257
|
+
* Inline text effects this plugin provides (rich text toolbar entry + runtime word renderer).
|
|
16258
|
+
*
|
|
16259
|
+
* An effect is set on a run of dialogue the way bold is, and the run compiles to the engine word
|
|
16260
|
+
* renderer of the same id. The studio entry registers the toolbar entry through
|
|
16261
|
+
* `app.services.richText.registerInlineEffect`; the runtime entry registers the renderer through
|
|
16262
|
+
* `app.game.wordRenderers.register`. Both refuse an id this list does not name.
|
|
16263
|
+
*/
|
|
16264
|
+
inlineTextEffects?: string[];
|
|
16201
16265
|
/** Studio language packs: locales this plugin adds or fills. */
|
|
16202
16266
|
locales?: PluginLocaleContribution[];
|
|
16203
16267
|
/**
|
|
@@ -22055,6 +22119,47 @@ export type RuntimeWidgetRendererDef = {
|
|
|
22055
22119
|
*/
|
|
22056
22120
|
logicApi?: WidgetLogicApi;
|
|
22057
22121
|
};
|
|
22122
|
+
/**
|
|
22123
|
+
* What an inline text effect draws one word of dialogue with. The engine hands these over each time
|
|
22124
|
+
* the word renders: once per character while the line is being typed, and again when it settles.
|
|
22125
|
+
*/
|
|
22126
|
+
export type RuntimeInlineTextEffectRenderProps = {
|
|
22127
|
+
/**
|
|
22128
|
+
* The word as the engine lays it out, with its reading (ruby), vertical writing and upright short
|
|
22129
|
+
* runs applied, and the characters still being revealed fading in. Draw this to keep all of that;
|
|
22130
|
+
* draw `text` instead only to place each character yourself.
|
|
22131
|
+
*/
|
|
22132
|
+
children: React$1.ReactNode;
|
|
22133
|
+
/** The characters revealed so far. Equal to `fullText` once the typewriter has passed the word. */
|
|
22134
|
+
text: string;
|
|
22135
|
+
/** The whole word, revealed or not. */
|
|
22136
|
+
fullText: string;
|
|
22137
|
+
/** Whether every character of the word has been revealed. */
|
|
22138
|
+
revealed: boolean;
|
|
22139
|
+
/** Whether the whole line has finished revealing. */
|
|
22140
|
+
done: boolean;
|
|
22141
|
+
/** The word's resolved style, already applied to the element around it. */
|
|
22142
|
+
style: Readonly<React$1.CSSProperties>;
|
|
22143
|
+
/** Whether the word carries a reading, which `children` draws and `text` does not. */
|
|
22144
|
+
hasRuby: boolean;
|
|
22145
|
+
/** The parameter values the author set on the run. A parameter left at its default is absent. */
|
|
22146
|
+
params: Readonly<Record<string, number | string | boolean>>;
|
|
22147
|
+
};
|
|
22148
|
+
/**
|
|
22149
|
+
* Runtime-side inline text effect: the component that draws a run of dialogue the author set the
|
|
22150
|
+
* effect on. The studio entry registers the toolbar entry under the same id.
|
|
22151
|
+
*/
|
|
22152
|
+
export type RuntimeInlineTextEffectDef = {
|
|
22153
|
+
/** The effect id; must start with the plugin id and be declared in `contributes.inlineTextEffects`. */
|
|
22154
|
+
id: string;
|
|
22155
|
+
render: (props: RuntimeInlineTextEffectRenderProps) => React$1.ReactElement | null;
|
|
22156
|
+
/**
|
|
22157
|
+
* Whether the word takes the player's clicks once it is revealed, instead of letting them advance
|
|
22158
|
+
* the line. Off by default: an effect that only changes how the text looks must not make part of
|
|
22159
|
+
* the dialogue box stop responding.
|
|
22160
|
+
*/
|
|
22161
|
+
interactive?: boolean;
|
|
22162
|
+
};
|
|
22058
22163
|
/** Removes a subscription. Also tracked by the host, so a failed plugin cannot leak listeners. */
|
|
22059
22164
|
export type RuntimePluginCleanup = () => void;
|
|
22060
22165
|
/**
|
|
@@ -22416,6 +22521,17 @@ export type RuntimePluginGame = {
|
|
|
22416
22521
|
register(def: RuntimeWidgetRendererDef): void;
|
|
22417
22522
|
registerMany(defs: RuntimeWidgetRendererDef[]): void;
|
|
22418
22523
|
};
|
|
22524
|
+
/**
|
|
22525
|
+
* Draw the runs of dialogue the author set one of this plugin's inline text effects on. A run
|
|
22526
|
+
* whose effect has no renderer here is drawn as plain text.
|
|
22527
|
+
*
|
|
22528
|
+
* Always present, like `widgets`: a renderer only draws text the author marked with this
|
|
22529
|
+
* plugin's own effect, so it grants nothing an install prompt would have to name.
|
|
22530
|
+
*/
|
|
22531
|
+
inlineTextEffects: {
|
|
22532
|
+
register(def: RuntimeInlineTextEffectDef): void;
|
|
22533
|
+
registerMany(defs: RuntimeInlineTextEffectDef[]): void;
|
|
22534
|
+
};
|
|
22419
22535
|
/**
|
|
22420
22536
|
* What runs when the story reaches a row one of this plugin's story actions inserted. The id is
|
|
22421
22537
|
* the one the studio entry registered the action under; the story waits on the row until `run`
|
|
@@ -22733,6 +22849,38 @@ export interface AssetSelectorProps {
|
|
|
22733
22849
|
onClose: () => void;
|
|
22734
22850
|
onConfirm: (assets: Asset[]) => void;
|
|
22735
22851
|
}
|
|
22852
|
+
/**
|
|
22853
|
+
* One number an inline text effect lets the author set, drawn as a slider in the effect panel.
|
|
22854
|
+
*
|
|
22855
|
+
* Numbers only: a run's parameters are written into the document and into scripts as `key=value`,
|
|
22856
|
+
* and a slider with a range is the one control every effect so far has needed.
|
|
22857
|
+
*/
|
|
22858
|
+
export type PluginInlineTextEffectParamDef = {
|
|
22859
|
+
/** Unique within the effect. Keys the stored value; never displayed. */
|
|
22860
|
+
key: string;
|
|
22861
|
+
/** Author-facing name of the parameter, in the interface language. Read like the effect's. */
|
|
22862
|
+
label: string;
|
|
22863
|
+
min: number;
|
|
22864
|
+
max: number;
|
|
22865
|
+
/** The slider's increment. Defaults to a hundredth of the range. */
|
|
22866
|
+
step?: number;
|
|
22867
|
+
/** The value a run takes when the author has not moved the slider. Not stored. */
|
|
22868
|
+
default: number;
|
|
22869
|
+
};
|
|
22870
|
+
/**
|
|
22871
|
+
* An inline text effect's entry in the dialogue toolbar. The id is the one the runtime entry
|
|
22872
|
+
* registers the renderer under, and the one the run stores.
|
|
22873
|
+
*/
|
|
22874
|
+
export type PluginInlineTextEffectDef = {
|
|
22875
|
+
/** Must start with the plugin id and be declared in `contributes.inlineTextEffects`. */
|
|
22876
|
+
id: string;
|
|
22877
|
+
/**
|
|
22878
|
+
* Author-facing name, in the interface language. Read each time the panel draws, so a getter
|
|
22879
|
+
* over the plugin's translator follows a language switch without registering again.
|
|
22880
|
+
*/
|
|
22881
|
+
label: string;
|
|
22882
|
+
params?: readonly PluginInlineTextEffectParamDef[];
|
|
22883
|
+
};
|
|
22736
22884
|
type ControlSize = "sm" | "md" | "lg";
|
|
22737
22885
|
export type ButtonVariant = "primary" | "secondary" | "ghost" | "danger";
|
|
22738
22886
|
export type ButtonSize = ControlSize;
|
|
@@ -23808,6 +23956,17 @@ export type PluginServices = {
|
|
|
23808
23956
|
list(): PluginWidgetTypeInfo[];
|
|
23809
23957
|
has(type: string): boolean;
|
|
23810
23958
|
};
|
|
23959
|
+
/**
|
|
23960
|
+
* Contribute an inline text effect to the dialogue toolbar; see {@link PluginInlineTextEffectDef}.
|
|
23961
|
+
*
|
|
23962
|
+
* The author selects text in a line of dialogue and picks the effect, the way they pick bold. The
|
|
23963
|
+
* runtime entry draws the result through `app.game.inlineTextEffects` under the same id. The
|
|
23964
|
+
* toolbar shows its effects control only while at least one effect is registered.
|
|
23965
|
+
*/
|
|
23966
|
+
inlineTextEffects: {
|
|
23967
|
+
register(def: PluginInlineTextEffectDef): PluginCleanup;
|
|
23968
|
+
registerMany(defs: PluginInlineTextEffectDef[]): PluginCleanup;
|
|
23969
|
+
};
|
|
23811
23970
|
story: {
|
|
23812
23971
|
/**
|
|
23813
23972
|
* Read-only project catalogue, for a plugin panel that has to let the
|
package/dist/plugin.d.ts
CHANGED
package/dist/runtime.d.ts
CHANGED
package/package.json
CHANGED