narraleaf-studio 1.5.0 → 1.6.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 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";
@@ -2598,11 +2615,13 @@ declare const en: {
2598
2615
  readonly data: {
2599
2616
  readonly projectTrust: {
2600
2617
  readonly loading: "Reading\u2026";
2601
- readonly empty: "Every project opened so far was created by Studio.";
2618
+ readonly empty: "No projects.";
2602
2619
  readonly waiting: "Waiting for a decision";
2603
2620
  readonly granted: "Trusted";
2604
2621
  readonly trust: "Trust";
2605
- readonly remove: "Remove";
2622
+ readonly revoke: "Revoke";
2623
+ readonly delete: "Remove from list";
2624
+ readonly deleteCovered: "Inside a trusted project and cannot be removed";
2606
2625
  readonly reloadNote: "A project that is open reloads when its trust changes.";
2607
2626
  readonly origin: {
2608
2627
  readonly package: "From a package";
@@ -3587,10 +3606,6 @@ declare const en: {
3587
3606
  readonly noActiveEditor: "No active editor";
3588
3607
  readonly closePanel: "Close panel";
3589
3608
  readonly closeTab: "Close {name}";
3590
- readonly newTab: "New tab";
3591
- readonly newTabPage: {
3592
- readonly title: "New Tab";
3593
- };
3594
3609
  readonly tabMenu: {
3595
3610
  readonly keepOpen: "Keep open";
3596
3611
  readonly close: "Close";
@@ -6558,6 +6573,9 @@ declare const en: {
6558
6573
  readonly storyActionTitle: "Story Action";
6559
6574
  readonly name: "Blueprint name";
6560
6575
  };
6576
+ readonly plugin: {
6577
+ readonly missingOption: "{value} (missing)";
6578
+ };
6561
6579
  readonly audio: {
6562
6580
  readonly track: "Track";
6563
6581
  readonly trackDefault: "Default ({name})";
@@ -7811,6 +7829,31 @@ declare const en: {
7811
7829
  readonly unbound: "Unbound";
7812
7830
  readonly clear: "Clear binding";
7813
7831
  };
7832
+ readonly family: {
7833
+ readonly compare: "Compare";
7834
+ readonly key: "On Key";
7835
+ readonly gamepadButton: "On Gamepad Button";
7836
+ readonly getPreference: "Get Preference";
7837
+ readonly setPreference: "Set Preference";
7838
+ readonly trim: "Trim Whitespace";
7839
+ readonly changeCase: "Change Case";
7840
+ readonly pad: "Pad Text";
7841
+ readonly replace: "Replace Text";
7842
+ readonly checkType: "Check Type";
7843
+ readonly convert: "Convert Type";
7844
+ readonly rounding: "Rounding";
7845
+ readonly random: "Random Number";
7846
+ readonly literal: "Literal";
7847
+ readonly saveInfo: "Get Save Info";
7848
+ readonly getTextStyle: "Get Text Style";
7849
+ readonly setTextStyle: "Set Text Style";
7850
+ readonly getImageFraming: "Get Image Framing";
7851
+ readonly setImageFraming: "Set Image Framing";
7852
+ readonly getVisibleEnabled: "Get Visible or Enabled";
7853
+ readonly setVisibleEnabled: "Set Visible or Enabled";
7854
+ readonly rowSubtitle: "{category} \u00B7 {count} nodes";
7855
+ readonly switchLabel: "Switch to another node of this kind";
7856
+ };
7814
7857
  readonly element: {
7815
7858
  readonly select: "Select element";
7816
7859
  readonly selectNamed: "Select element {name}";
@@ -8922,8 +8965,8 @@ declare const en: {
8922
8965
  readonly nodeDescription: {
8923
8966
  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
8967
  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.";
8968
+ 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.";
8969
+ 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
8970
  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
8971
  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
8972
  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 +15056,14 @@ declare const en: {
15013
15056
  readonly title: "Actions in blueprints";
15014
15057
  readonly body: string;
15015
15058
  };
15059
+ readonly focusNavigation: {
15060
+ readonly title: "Focus navigation";
15061
+ readonly body: string;
15062
+ };
15063
+ readonly focusNavigationSettings: {
15064
+ readonly title: "Navigation settings";
15065
+ readonly body: string;
15066
+ };
15016
15067
  readonly uiSurfaces: {
15017
15068
  readonly title: "Game screens";
15018
15069
  readonly body: string;
@@ -19721,6 +19772,84 @@ type PropertyFieldBindingMeta = {
19721
19772
  /** Current literal from the document when creating a binding (persisted as fallback). */
19722
19773
  readLiteral: (data: UIInspectorData) => string | number | boolean | null;
19723
19774
  };
19775
+ declare const HELP_TOPIC_IDS: readonly [
19776
+ "gettingHelp",
19777
+ "workspaceLayout",
19778
+ "newProject",
19779
+ "runModes",
19780
+ "keyboard",
19781
+ "search",
19782
+ "undo",
19783
+ "studioSettings",
19784
+ "storyScene",
19785
+ "storyCommands",
19786
+ "storyVariables",
19787
+ "storyExpressions",
19788
+ "storyFlow",
19789
+ "storyScript",
19790
+ "storyPaste",
19791
+ "sceneSnapshot",
19792
+ "storyMotion",
19793
+ "dictionary",
19794
+ "dictionaryMarks",
19795
+ "assets",
19796
+ "assetSources",
19797
+ "assetSets",
19798
+ "assetSetAxes",
19799
+ "mediaConversion",
19800
+ "characters",
19801
+ "appearances",
19802
+ "puppetRuntimes",
19803
+ "audio",
19804
+ "audioClips",
19805
+ "videoClips",
19806
+ "voice",
19807
+ "localization",
19808
+ "brand",
19809
+ "uiSurfaces",
19810
+ "inputActions",
19811
+ "inputActionBindings",
19812
+ "inputActionAnswering",
19813
+ "inputActionsInBlueprints",
19814
+ "focusNavigation",
19815
+ "focusNavigationSettings",
19816
+ "uiComponents",
19817
+ "blueprints",
19818
+ "scripts",
19819
+ "uiBindings",
19820
+ "networkNodes",
19821
+ "spellcheck",
19822
+ "lint",
19823
+ "tests",
19824
+ "dashboard",
19825
+ "recovery",
19826
+ "versionControl",
19827
+ "versionChanges",
19828
+ "versionViewing",
19829
+ "versionRestore",
19830
+ "versionConflicts",
19831
+ "versionServer",
19832
+ "freeze",
19833
+ "build",
19834
+ "saveLocation",
19835
+ "olderSaves",
19836
+ "saveSameStory",
19837
+ "saveStoryChanged",
19838
+ "patches",
19839
+ "buildVariant",
19840
+ "appTags",
19841
+ "variantContent",
19842
+ "icons",
19843
+ "signing",
19844
+ "assetProtection",
19845
+ "networkAllowlist",
19846
+ "assetCompression",
19847
+ "screenEffects",
19848
+ "plugins"
19849
+ ];
19850
+ type StaticHelpTopicId = (typeof HELP_TOPIC_IDS)[number];
19851
+ type LintRuleHelpTopicId = `lintRule.${string}`;
19852
+ type HelpTopicId = StaticHelpTopicId | LintRuleHelpTopicId;
19724
19853
  type FieldType = "text" | "textarea" | "number" | "toggle" | "select" | "tags" | "custom" | "info" | "thumbnail" | "section" | "colorPicker" | "colorPickerGroup" | "iconButtonGroup" | "dropdownGroup" | "menuTrigger" | "inputGroup" | "inlineRow" | "imageFill" | "fontAsset";
19725
19854
  interface BaseFieldDefinition<TData = any> {
19726
19855
  /** Unique identifier for the field */
@@ -19988,6 +20117,13 @@ interface SectionFieldDefinition<TData = any> extends BaseFieldDefinition<TData>
19988
20117
  collapsible?: boolean;
19989
20118
  /** Whether the section is collapsed by default */
19990
20119
  defaultCollapsed?: boolean;
20120
+ /**
20121
+ * The help topic about the whole section: `F1` anywhere inside it, and a `?` in its header.
20122
+ *
20123
+ * For a section whose effect cannot be read off its own fields, under the rule in
20124
+ * `docs/help-system.md` §5. A section that explains itself through its fields' tips passes none.
20125
+ */
20126
+ helpTopic?: HelpTopicId;
19991
20127
  }
19992
20128
  interface CustomFieldProps<TData = any> {
19993
20129
  data: TData;
@@ -20959,6 +21095,17 @@ export type StoryPluginActionCreateInput = {
20959
21095
  generateId: () => string;
20960
21096
  initialText?: string;
20961
21097
  };
21098
+ /**
21099
+ * One field the scene inspector shows on a row of a plugin story action, editing `params[key]`.
21100
+ *
21101
+ * The descriptor a plugin node's `inspectorParams` already takes, narrowed to the kinds a row's params
21102
+ * can hold: a pick (static `options`, or a `dynamicOptionsSource` registered through
21103
+ * `app.services.blueprintNodes`), a string, or a number. A plugin that offers the same choice on a
21104
+ * node and on a row passes both the same object, so both list the same options.
21105
+ */
21106
+ export type StoryPluginActionParamDef = Pick<BlueprintInspectorParamDef, "key" | "label" | "options" | "dynamicOptionsSource" | "emptyOptionLabel"> & {
21107
+ kind: "select" | "string" | "number";
21108
+ };
20962
21109
  export type StoryPluginActionRegistration = {
20963
21110
  id: string;
20964
21111
  label: string;
@@ -20971,83 +21118,23 @@ export type StoryPluginActionRegistration = {
20971
21118
  * editor, so an action whose params change what the row does says what they are here.
20972
21119
  */
20973
21120
  describe?: (params: Record<string, unknown>) => string | null | undefined;
21121
+ /**
21122
+ * Words a typed command finds this action by in every interface language, as a built-in command
21123
+ * answers to its own word: with `keywords: ["unlock"]`, `/unlock ACH_WIN` commits this action with
21124
+ * "ACH_WIN" as its initial text. Without them a typed command has to start the label or the id.
21125
+ * Single words; a built-in command's word stays the built-in's.
21126
+ */
21127
+ keywords?: readonly string[];
21128
+ /**
21129
+ * The fields the scene inspector shows when one of this action's `{action:"plugin"}` rows is
21130
+ * selected, each editing one key of the row's `params`. Without them a row keeps whatever
21131
+ * `createBlock` wrote, and changing it means inserting the row again.
21132
+ *
21133
+ * A field of a kind this Studio does not know is left out of the inspector, so a plugin written
21134
+ * for a later Studio still registers here.
21135
+ */
21136
+ params?: readonly StoryPluginActionParamDef[];
20974
21137
  };
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
21138
  interface PanelComponentProps<TPayload = any> {
21052
21139
  panelId: string;
21053
21140
  payload?: TPayload;
@@ -23468,11 +23555,14 @@ export type PluginServices = {
23468
23555
  listScenes(storyId: string): Promise<PluginSceneEntry[]>;
23469
23556
  actions: {
23470
23557
  /**
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
23558
+ * Register a scene-editor palette action (shown under Tools)
23559
+ * that creates story blocks. Action ids must be prefixed with the
23475
23560
  * plugin id.
23561
+ *
23562
+ * A standard story block owes the plugin nothing once inserted. A
23563
+ * `{action:"plugin"}` row is the plugin's own: the runtime entry's
23564
+ * `app.game.storyActions` runs it, and the fields in `params` are
23565
+ * what the scene inspector lets the author change on it.
23476
23566
  */
23477
23567
  register(registration: StoryPluginActionRegistration): PluginCleanup;
23478
23568
  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.0",
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",