lumiverse-spindle-types 0.6.30 → 0.6.32

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
@@ -205,6 +205,8 @@ export interface MacroDefinitionDTO {
205
205
  export interface MacroInvocationContextDTO {
206
206
  /** False when the host is performing a dry / non-committing resolve. */
207
207
  commit: boolean;
208
+ /** Host-trusted chat id for this invocation when a chat-scoped macro environment exists. */
209
+ chatId?: string;
208
210
  [key: string]: unknown;
209
211
  }
210
212
  export interface MacroResolveOptionsDTO {
@@ -1480,6 +1482,12 @@ export interface RegexScriptDTO {
1480
1482
  sort_order: number;
1481
1483
  description: string;
1482
1484
  folder: string;
1485
+ /**
1486
+ * Preset this row is bound to for the host's delete cascade, or null when
1487
+ * unbound. Host-authored: set at creation through `preset_id`, never re-pointed
1488
+ * by an update, so treat it as read-only here.
1489
+ */
1490
+ readonly preset_id?: string | null;
1483
1491
  /** Host-validated version badge for this Spindle-owned folder, or null when unversioned/unfiled. */
1484
1492
  readonly folder_version?: string | null;
1485
1493
  metadata: Record<string, unknown>;
@@ -1525,10 +1533,29 @@ export interface RegexScriptCreateDTO {
1525
1533
  * to clear an existing label.
1526
1534
  */
1527
1535
  folder_version?: string | null;
1536
+ /**
1537
+ * Bind the created script to one of the calling user's presets. Create-only:
1538
+ * the host validates the id against that user's presets and rejects unknown,
1539
+ * foreign, or malformed ids instead of storing an orphan link, and `update`
1540
+ * never re-points or clears the binding.
1541
+ *
1542
+ * The link is a lifecycle binding: deleting the preset deletes the script with
1543
+ * it, and preset activation does not change the script's `disabled` state, so
1544
+ * the extension keeps control of its own rule's enablement. `null` and an empty
1545
+ * string leave the script unbound.
1546
+ */
1547
+ preset_id?: string | null;
1528
1548
  metadata?: Record<string, unknown>;
1529
1549
  script_id?: string;
1530
1550
  }
1531
- export type RegexScriptUpdateDTO = Partial<RegexScriptCreateDTO>;
1551
+ /**
1552
+ * Every `RegexScriptCreateDTO` field is optional on update, except `preset_id`.
1553
+ * The preset link is create-only: the host strips it from extension input, so it
1554
+ * is excluded from the update DTO instead of accepting a field that would be
1555
+ * ignored. Deleting and recreating the script is how an owner moves it to
1556
+ * another preset.
1557
+ */
1558
+ export type RegexScriptUpdateDTO = Partial<Omit<RegexScriptCreateDTO, "preset_id">>;
1532
1559
  /**
1533
1560
  * One world info entry exposed to a `registerWorldInfoInterceptor` handler.
1534
1561
  * Subset of `WorldBookEntryDTO` covering the fields the interceptor needs to
@@ -34,6 +34,13 @@ export interface SpindleLoomBlockEditorOptions {
34
34
  onChange?: (value: SpindleLoomBlockEditorValue) => void;
35
35
  /** Reports validated in-progress edits, or `null` when the native draft is discarded. */
36
36
  onDraftChange?: (value: SpindleLoomBlockEditorValue | null) => void;
37
+ /**
38
+ * Block opened in the native editor. Omit to let the host own selection;
39
+ * pass `null` to explicitly show the block list.
40
+ */
41
+ selectedBlockId?: string | null;
42
+ /** Reports block navigation initiated by the native editor. */
43
+ onSelectedBlockChange?: (blockId: string | null) => void;
37
44
  readOnly?: boolean;
38
45
  compact?: boolean;
39
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lumiverse-spindle-types",
3
- "version": "0.6.30",
3
+ "version": "0.6.32",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "keywords": [