narraleaf-studio 1.5.0 → 1.6.1

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 CHANGED
@@ -1048,9 +1048,10 @@ type StoryActionPayload = {
1048
1048
  /** The plugin's story-action id, itself namespaced by `pluginId`. */
1049
1049
  actionId: string;
1050
1050
  /**
1051
- * What the author filled in on the row, for the owning pass to interpret. Studio never
1052
- * reads inside it - the keys are the plugin's vocabulary - so it is only constrained to be
1053
- * JSON, which is what makes the row survive a round trip through the project file.
1051
+ * What the author filled in on the row, for the owning plugin to interpret. Studio never
1052
+ * interprets it - the keys are the plugin's vocabulary - and writes a key only through a
1053
+ * field the plugin's action declares (`params` on its registration). It is only constrained
1054
+ * to be JSON, which is what makes the row survive a round trip through the project file.
1054
1055
  */
1055
1056
  params: Record<string, StoryPluginActionParamValue>;
1056
1057
  }
@@ -2014,6 +2015,22 @@ declare const en: {
2014
2015
  readonly right: "right";
2015
2016
  readonly overview: "Overview";
2016
2017
  };
2018
+ readonly keys: {
2019
+ readonly arrowUp: "Arrow Up";
2020
+ readonly arrowDown: "Arrow Down";
2021
+ readonly arrowLeft: "Arrow Left";
2022
+ readonly arrowRight: "Arrow Right";
2023
+ readonly space: "Space";
2024
+ readonly plus: "Plus";
2025
+ readonly dpadUp: "D-pad Up";
2026
+ readonly dpadDown: "D-pad Down";
2027
+ readonly dpadLeft: "D-pad Left";
2028
+ readonly dpadRight: "D-pad Right";
2029
+ readonly leftStickUp: "Left Stick Up";
2030
+ readonly leftStickDown: "Left Stick Down";
2031
+ readonly leftStickLeft: "Left Stick Left";
2032
+ readonly leftStickRight: "Left Stick Right";
2033
+ };
2017
2034
  };
2018
2035
  readonly menu: {
2019
2036
  readonly app: {
@@ -2166,7 +2183,7 @@ declare const en: {
2166
2183
  };
2167
2184
  readonly developerMode: {
2168
2185
  readonly label: "Developer options";
2169
- readonly description: "Right-click menus gain a section for copying the ID of the item clicked.";
2186
+ readonly description: "Right-click menus gain a section for copying the ID of the item clicked, and the blueprint add-node menu shows each node's type ID.";
2170
2187
  };
2171
2188
  readonly screenEffectThreads: {
2172
2189
  readonly label: "Threads for screen effects";
@@ -2552,8 +2569,7 @@ declare const en: {
2552
2569
  readonly failed: "Could not start: {message}";
2553
2570
  readonly token: "Access token";
2554
2571
  readonly tokenHint: "Every request must carry it. It is part of the copied configuration.";
2555
- readonly show: "Show";
2556
- readonly hide: "Hide";
2572
+ readonly copyToken: "Copy token";
2557
2573
  readonly regenerate: "Regenerate access token";
2558
2574
  readonly regenerateHint: "Clients set up with the current token stop being let in.";
2559
2575
  readonly regenerateAction: "Regenerate";
@@ -2598,11 +2614,13 @@ declare const en: {
2598
2614
  readonly data: {
2599
2615
  readonly projectTrust: {
2600
2616
  readonly loading: "Reading\u2026";
2601
- readonly empty: "Every project opened so far was created by Studio.";
2617
+ readonly empty: "No projects.";
2602
2618
  readonly waiting: "Waiting for a decision";
2603
2619
  readonly granted: "Trusted";
2604
2620
  readonly trust: "Trust";
2605
- readonly remove: "Remove";
2621
+ readonly revoke: "Revoke";
2622
+ readonly delete: "Remove from list";
2623
+ readonly deleteCovered: "Inside a trusted project and cannot be removed";
2606
2624
  readonly reloadNote: "A project that is open reloads when its trust changes.";
2607
2625
  readonly origin: {
2608
2626
  readonly package: "From a package";
@@ -3587,10 +3605,6 @@ declare const en: {
3587
3605
  readonly noActiveEditor: "No active editor";
3588
3606
  readonly closePanel: "Close panel";
3589
3607
  readonly closeTab: "Close {name}";
3590
- readonly newTab: "New tab";
3591
- readonly newTabPage: {
3592
- readonly title: "New Tab";
3593
- };
3594
3608
  readonly tabMenu: {
3595
3609
  readonly keepOpen: "Keep open";
3596
3610
  readonly close: "Close";
@@ -6558,6 +6572,9 @@ declare const en: {
6558
6572
  readonly storyActionTitle: "Story Action";
6559
6573
  readonly name: "Blueprint name";
6560
6574
  };
6575
+ readonly plugin: {
6576
+ readonly missingOption: "{value} (missing)";
6577
+ };
6561
6578
  readonly audio: {
6562
6579
  readonly track: "Track";
6563
6580
  readonly trackDefault: "Default ({name})";
@@ -7811,6 +7828,31 @@ declare const en: {
7811
7828
  readonly unbound: "Unbound";
7812
7829
  readonly clear: "Clear binding";
7813
7830
  };
7831
+ readonly family: {
7832
+ readonly compare: "Compare";
7833
+ readonly key: "On Key";
7834
+ readonly gamepadButton: "On Gamepad Button";
7835
+ readonly getPreference: "Get Preference";
7836
+ readonly setPreference: "Set Preference";
7837
+ readonly trim: "Trim Whitespace";
7838
+ readonly changeCase: "Change Case";
7839
+ readonly pad: "Pad Text";
7840
+ readonly replace: "Replace Text";
7841
+ readonly checkType: "Check Type";
7842
+ readonly convert: "Convert Type";
7843
+ readonly rounding: "Rounding";
7844
+ readonly random: "Random Number";
7845
+ readonly literal: "Literal";
7846
+ readonly saveInfo: "Get Save Info";
7847
+ readonly getTextStyle: "Get Text Style";
7848
+ readonly setTextStyle: "Set Text Style";
7849
+ readonly getImageFraming: "Get Image Framing";
7850
+ readonly setImageFraming: "Set Image Framing";
7851
+ readonly getVisibleEnabled: "Get Visible or Enabled";
7852
+ readonly setVisibleEnabled: "Set Visible or Enabled";
7853
+ readonly rowSubtitle: "{category} \u00B7 {count} nodes";
7854
+ readonly switchLabel: "Switch to another node of this kind";
7855
+ };
7814
7856
  readonly element: {
7815
7857
  readonly select: "Select element";
7816
7858
  readonly selectNamed: "Select element {name}";
@@ -8922,8 +8964,8 @@ declare const en: {
8922
8964
  readonly nodeDescription: {
8923
8965
  readonly getComponentParam: "The value this placement sets for the chosen parameter, or the parameter's default when it sets none. A Text parameter that reads from a translation key gives the key's name; Translation Key Text gives its words.";
8924
8966
  readonly getPageParam: "The value the page was opened with for the chosen param, or the param's default when it was given none. Params are declared in the page's properties.";
8925
- readonly compareEqual: "True when A and B are the same value of the same type. The number 1 and the text \"1\" are not equal.";
8926
- readonly compareNotEqual: "True when A and B differ in value or in type. The number 1 and the text \"1\" count as different.";
8967
+ readonly compareEqual: "True when A and B are the same value of the same type. Lists and objects are compared by their contents, an element by which element it is. The number 1 and the text \"1\" are not equal; an input left unconnected counts as Null.";
8968
+ readonly compareNotEqual: "True when A and B differ in value or in type, judged as Equal judges them. The number 1 and the text \"1\" count as different.";
8927
8969
  readonly compareGreaterThan: "True when A is greater than B. Both sides are compared as numbers; a side that cannot be read as a number gives false.";
8928
8970
  readonly compareGreaterThanOrEqual: "True when A is greater than or equal to B. Both sides are compared as numbers; a side that cannot be read as a number gives false.";
8929
8971
  readonly compareLessThan: "True when A is less than B. Both sides are compared as numbers; a side that cannot be read as a number gives false.";
@@ -15013,6 +15055,14 @@ declare const en: {
15013
15055
  readonly title: "Actions in blueprints";
15014
15056
  readonly body: string;
15015
15057
  };
15058
+ readonly focusNavigation: {
15059
+ readonly title: "Focus navigation";
15060
+ readonly body: string;
15061
+ };
15062
+ readonly focusNavigationSettings: {
15063
+ readonly title: "Navigation settings";
15064
+ readonly body: string;
15065
+ };
15016
15066
  readonly uiSurfaces: {
15017
15067
  readonly title: "Game screens";
15018
15068
  readonly body: string;
@@ -19721,6 +19771,84 @@ type PropertyFieldBindingMeta = {
19721
19771
  /** Current literal from the document when creating a binding (persisted as fallback). */
19722
19772
  readLiteral: (data: UIInspectorData) => string | number | boolean | null;
19723
19773
  };
19774
+ declare const HELP_TOPIC_IDS: readonly [
19775
+ "gettingHelp",
19776
+ "workspaceLayout",
19777
+ "newProject",
19778
+ "runModes",
19779
+ "keyboard",
19780
+ "search",
19781
+ "undo",
19782
+ "studioSettings",
19783
+ "storyScene",
19784
+ "storyCommands",
19785
+ "storyVariables",
19786
+ "storyExpressions",
19787
+ "storyFlow",
19788
+ "storyScript",
19789
+ "storyPaste",
19790
+ "sceneSnapshot",
19791
+ "storyMotion",
19792
+ "dictionary",
19793
+ "dictionaryMarks",
19794
+ "assets",
19795
+ "assetSources",
19796
+ "assetSets",
19797
+ "assetSetAxes",
19798
+ "mediaConversion",
19799
+ "characters",
19800
+ "appearances",
19801
+ "puppetRuntimes",
19802
+ "audio",
19803
+ "audioClips",
19804
+ "videoClips",
19805
+ "voice",
19806
+ "localization",
19807
+ "brand",
19808
+ "uiSurfaces",
19809
+ "inputActions",
19810
+ "inputActionBindings",
19811
+ "inputActionAnswering",
19812
+ "inputActionsInBlueprints",
19813
+ "focusNavigation",
19814
+ "focusNavigationSettings",
19815
+ "uiComponents",
19816
+ "blueprints",
19817
+ "scripts",
19818
+ "uiBindings",
19819
+ "networkNodes",
19820
+ "spellcheck",
19821
+ "lint",
19822
+ "tests",
19823
+ "dashboard",
19824
+ "recovery",
19825
+ "versionControl",
19826
+ "versionChanges",
19827
+ "versionViewing",
19828
+ "versionRestore",
19829
+ "versionConflicts",
19830
+ "versionServer",
19831
+ "freeze",
19832
+ "build",
19833
+ "saveLocation",
19834
+ "olderSaves",
19835
+ "saveSameStory",
19836
+ "saveStoryChanged",
19837
+ "patches",
19838
+ "buildVariant",
19839
+ "appTags",
19840
+ "variantContent",
19841
+ "icons",
19842
+ "signing",
19843
+ "assetProtection",
19844
+ "networkAllowlist",
19845
+ "assetCompression",
19846
+ "screenEffects",
19847
+ "plugins"
19848
+ ];
19849
+ type StaticHelpTopicId = (typeof HELP_TOPIC_IDS)[number];
19850
+ type LintRuleHelpTopicId = `lintRule.${string}`;
19851
+ type HelpTopicId = StaticHelpTopicId | LintRuleHelpTopicId;
19724
19852
  type FieldType = "text" | "textarea" | "number" | "toggle" | "select" | "tags" | "custom" | "info" | "thumbnail" | "section" | "colorPicker" | "colorPickerGroup" | "iconButtonGroup" | "dropdownGroup" | "menuTrigger" | "inputGroup" | "inlineRow" | "imageFill" | "fontAsset";
19725
19853
  interface BaseFieldDefinition<TData = any> {
19726
19854
  /** Unique identifier for the field */
@@ -19988,6 +20116,13 @@ interface SectionFieldDefinition<TData = any> extends BaseFieldDefinition<TData>
19988
20116
  collapsible?: boolean;
19989
20117
  /** Whether the section is collapsed by default */
19990
20118
  defaultCollapsed?: boolean;
20119
+ /**
20120
+ * The help topic about the whole section: `F1` anywhere inside it, and a `?` in its header.
20121
+ *
20122
+ * For a section whose effect cannot be read off its own fields, under the rule in
20123
+ * `docs/help-system.md` §5. A section that explains itself through its fields' tips passes none.
20124
+ */
20125
+ helpTopic?: HelpTopicId;
19991
20126
  }
19992
20127
  interface CustomFieldProps<TData = any> {
19993
20128
  data: TData;
@@ -20959,6 +21094,17 @@ export type StoryPluginActionCreateInput = {
20959
21094
  generateId: () => string;
20960
21095
  initialText?: string;
20961
21096
  };
21097
+ /**
21098
+ * One field the scene inspector shows on a row of a plugin story action, editing `params[key]`.
21099
+ *
21100
+ * The descriptor a plugin node's `inspectorParams` already takes, narrowed to the kinds a row's params
21101
+ * can hold: a pick (static `options`, or a `dynamicOptionsSource` registered through
21102
+ * `app.services.blueprintNodes`), a string, or a number. A plugin that offers the same choice on a
21103
+ * node and on a row passes both the same object, so both list the same options.
21104
+ */
21105
+ export type StoryPluginActionParamDef = Pick<BlueprintInspectorParamDef, "key" | "label" | "options" | "dynamicOptionsSource" | "emptyOptionLabel"> & {
21106
+ kind: "select" | "string" | "number";
21107
+ };
20962
21108
  export type StoryPluginActionRegistration = {
20963
21109
  id: string;
20964
21110
  label: string;
@@ -20971,83 +21117,23 @@ export type StoryPluginActionRegistration = {
20971
21117
  * editor, so an action whose params change what the row does says what they are here.
20972
21118
  */
20973
21119
  describe?: (params: Record<string, unknown>) => string | null | undefined;
21120
+ /**
21121
+ * Words a typed command finds this action by in every interface language, as a built-in command
21122
+ * answers to its own word: with `keywords: ["unlock"]`, `/unlock ACH_WIN` commits this action with
21123
+ * "ACH_WIN" as its initial text. Without them a typed command has to start the label or the id.
21124
+ * Single words; a built-in command's word stays the built-in's.
21125
+ */
21126
+ keywords?: readonly string[];
21127
+ /**
21128
+ * The fields the scene inspector shows when one of this action's `{action:"plugin"}` rows is
21129
+ * selected, each editing one key of the row's `params`. Without them a row keeps whatever
21130
+ * `createBlock` wrote, and changing it means inserting the row again.
21131
+ *
21132
+ * A field of a kind this Studio does not know is left out of the inspector, so a plugin written
21133
+ * for a later Studio still registers here.
21134
+ */
21135
+ params?: readonly StoryPluginActionParamDef[];
20974
21136
  };
20975
- declare const HELP_TOPIC_IDS: readonly [
20976
- "gettingHelp",
20977
- "workspaceLayout",
20978
- "newProject",
20979
- "runModes",
20980
- "keyboard",
20981
- "search",
20982
- "undo",
20983
- "studioSettings",
20984
- "storyScene",
20985
- "storyCommands",
20986
- "storyVariables",
20987
- "storyExpressions",
20988
- "storyFlow",
20989
- "storyScript",
20990
- "storyPaste",
20991
- "sceneSnapshot",
20992
- "storyMotion",
20993
- "dictionary",
20994
- "dictionaryMarks",
20995
- "assets",
20996
- "assetSources",
20997
- "assetSets",
20998
- "assetSetAxes",
20999
- "mediaConversion",
21000
- "characters",
21001
- "appearances",
21002
- "puppetRuntimes",
21003
- "audio",
21004
- "audioClips",
21005
- "videoClips",
21006
- "voice",
21007
- "localization",
21008
- "brand",
21009
- "uiSurfaces",
21010
- "inputActions",
21011
- "inputActionBindings",
21012
- "inputActionAnswering",
21013
- "inputActionsInBlueprints",
21014
- "uiComponents",
21015
- "blueprints",
21016
- "scripts",
21017
- "uiBindings",
21018
- "networkNodes",
21019
- "spellcheck",
21020
- "lint",
21021
- "tests",
21022
- "dashboard",
21023
- "recovery",
21024
- "versionControl",
21025
- "versionChanges",
21026
- "versionViewing",
21027
- "versionRestore",
21028
- "versionConflicts",
21029
- "versionServer",
21030
- "freeze",
21031
- "build",
21032
- "saveLocation",
21033
- "olderSaves",
21034
- "saveSameStory",
21035
- "saveStoryChanged",
21036
- "patches",
21037
- "buildVariant",
21038
- "appTags",
21039
- "variantContent",
21040
- "icons",
21041
- "signing",
21042
- "assetProtection",
21043
- "networkAllowlist",
21044
- "assetCompression",
21045
- "screenEffects",
21046
- "plugins"
21047
- ];
21048
- type StaticHelpTopicId = (typeof HELP_TOPIC_IDS)[number];
21049
- type LintRuleHelpTopicId = `lintRule.${string}`;
21050
- type HelpTopicId = StaticHelpTopicId | LintRuleHelpTopicId;
21051
21137
  interface PanelComponentProps<TPayload = any> {
21052
21138
  panelId: string;
21053
21139
  payload?: TPayload;
@@ -23468,11 +23554,14 @@ export type PluginServices = {
23468
23554
  listScenes(storyId: string): Promise<PluginSceneEntry[]>;
23469
23555
  actions: {
23470
23556
  /**
23471
- * Register a scene-editor palette action (shown under the Plugin
23472
- * category) that creates story blocks. The blocks it returns are
23473
- * standard story blocks - the document does not depend on the
23474
- * plugin after creation. Action ids must be prefixed with the
23557
+ * Register a scene-editor palette action (shown under Tools)
23558
+ * that creates story blocks. Action ids must be prefixed with the
23475
23559
  * plugin id.
23560
+ *
23561
+ * A standard story block owes the plugin nothing once inserted. A
23562
+ * `{action:"plugin"}` row is the plugin's own: the runtime entry's
23563
+ * `app.game.storyActions` runs it, and the fields in `params` are
23564
+ * what the scene inspector lets the author change on it.
23476
23565
  */
23477
23566
  register(registration: StoryPluginActionRegistration): PluginCleanup;
23478
23567
  registerMany(registrations: StoryPluginActionRegistration[]): PluginCleanup;
package/dist/plugin.d.ts CHANGED
@@ -127,6 +127,7 @@ export {
127
127
  StoryBlockId,
128
128
  StoryBlockKind,
129
129
  StoryPluginActionCreateInput,
130
+ StoryPluginActionParamDef,
130
131
  StoryPluginActionRegistration,
131
132
  SwitchProps,
132
133
  SwitchSize,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "narraleaf-studio",
3
- "version": "1.5.0",
3
+ "version": "1.6.1",
4
4
  "description": "TypeScript declarations for the NarraLeaf Studio plugin API (narraleaf-studio/plugin and narraleaf-studio/runtime).",
5
5
  "license": "MPL-2.0",
6
6
  "type": "module",