lumiverse-spindle-types 0.4.4 → 0.4.10

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": "lumiverse-spindle-types",
3
- "version": "0.4.4",
3
+ "version": "0.4.10",
4
4
  "types": "./src/index.ts",
5
5
  "keywords": [
6
6
  "lumiverse",
package/src/api.ts CHANGED
@@ -984,6 +984,7 @@ export type WorkerToHost =
984
984
  | { type: "text_editor_open"; requestId: string; title?: string; value?: string; placeholder?: string; userId?: string }
985
985
  // ─── Modal (free tier) ────────────────────────────────────────────
986
986
  | { type: "modal_open"; requestId: string; title: string; items: SpindleModalItemDTO[]; width?: number; maxHeight?: number; persistent?: boolean; userId?: string }
987
+ | { type: "modal_close"; requestId: string; userId?: string }
987
988
  | { type: "confirm_open"; requestId: string; title: string; message: string; variant?: "info" | "warning" | "danger" | "success"; confirmLabel?: string; cancelLabel?: string; userId?: string }
988
989
  | { type: "input_prompt_open"; requestId: string; title: string; message?: string; placeholder?: string; defaultValue?: string; submitLabel?: string; cancelLabel?: string; multiline?: boolean; userId?: string }
989
990
  // ─── Macro Resolution (free tier) ──────────────────────────────────
@@ -730,6 +730,12 @@ export interface SpindleAPI {
730
730
  /** How the modal was dismissed. */
731
731
  dismissedBy: "user" | "extension" | "cleanup";
732
732
  }>;
733
+ /**
734
+ * Programmatically close a modal that was opened with `spindle.modal.open()`.
735
+ * `openRequestId` is the request ID returned alongside the modal handle.
736
+ * Resolves immediately after the dismiss event is emitted.
737
+ */
738
+ close(openRequestId: string, userId?: string): Promise<void>;
733
739
  /**
734
740
  * Show a confirmation modal and wait for the user's response.
735
741
  * The host renders a themed dialog with a message, variant-colored