pict-section-prompteditor 1.1.1 → 1.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pict-section-prompteditor",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Prompt crafting and management section for Pict: typed prompts with segments (context, request, success criteria), curated word list matrices with weights, a {~WordListEntry:Name~} template expression for weighted-random generation, batch generation with zip download, and a pluggable data provider that defaults to in-memory AppData.",
5
5
  "main": "source/Pict-Section-PromptEditor.js",
6
6
  "files": [
@@ -732,6 +732,17 @@ class PictViewPromptEditor extends libPictView
732
732
  this.render();
733
733
  }
734
734
 
735
+ /* Replace the selectable prompt-type set (the cascade behind the type dropdown) and repaint. The
736
+ type list is cached as this._types at construction; a host that updates its shape library
737
+ mid-session calls this so the dropdown reflects the new set without a full page reload. */
738
+ setPromptTypes(pTypes)
739
+ {
740
+ this.options.PromptTypes = pTypes || null;
741
+ this._types = libTypes.resolvePromptTypes(this.options.PromptTypes);
742
+ this._shape();
743
+ this.render();
744
+ }
745
+
735
746
  setDataProvider(pProvider)
736
747
  {
737
748
  this._provider = pProvider || null;