lumiverse-spindle-types 0.2.6 → 0.2.7

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.2.6",
3
+ "version": "0.2.7",
4
4
  "types": "./src/index.ts",
5
5
  "keywords": [
6
6
  "lumiverse",
package/src/dom.ts CHANGED
@@ -199,26 +199,6 @@ export interface SpindleFrontendContext {
199
199
  requestDockPanel(options: SpindleDockPanelOptions): SpindleDockPanelHandle;
200
200
  mountApp(options?: SpindleAppMountOptions): SpindleAppMountHandle;
201
201
  registerInputBarAction(options: SpindleInputBarActionOptions): SpindleInputBarActionHandle;
202
- /**
203
- * Open the native Lumiverse expanded text editor modal.
204
- * Provides macro syntax highlighting, macro insertion panel with search,
205
- * and a full-screen editing experience.
206
- *
207
- * Returns a Promise that resolves when the user closes the editor.
208
- *
209
- * @example
210
- * ```ts
211
- * const result = await ctx.ui.openTextEditor({
212
- * title: 'Edit System Prompt',
213
- * value: currentText,
214
- * macros: true,
215
- * })
216
- * if (!result.cancelled) {
217
- * currentText = result.text
218
- * }
219
- * ```
220
- */
221
- openTextEditor(options?: SpindleTextEditorOptions): Promise<SpindleTextEditorResult>;
222
202
  };
223
203
  uploads: {
224
204
  pickFile(options?: {
@@ -402,6 +402,39 @@ export interface SpindleAPI {
402
402
  }>;
403
403
  };
404
404
 
405
+ /**
406
+ * Text editor (free tier — no permission needed).
407
+ * Opens the native Lumiverse expanded text editor modal on the user's
408
+ * frontend. Provides macro syntax highlighting, insertion panel, and
409
+ * full-screen editing. The call blocks until the user closes the editor.
410
+ */
411
+ textEditor: {
412
+ /**
413
+ * Open the text editor and wait for the user to close it.
414
+ *
415
+ * @example
416
+ * ```ts
417
+ * const result = await spindle.textEditor.open({
418
+ * title: 'Edit System Prompt',
419
+ * value: currentText,
420
+ * })
421
+ * if (!result.cancelled) {
422
+ * currentText = result.text
423
+ * }
424
+ * ```
425
+ */
426
+ open(options?: {
427
+ title?: string;
428
+ value?: string;
429
+ placeholder?: string;
430
+ /** For operator-scoped extensions only. */
431
+ userId?: string;
432
+ }): Promise<{
433
+ text: string;
434
+ cancelled: boolean;
435
+ }>;
436
+ };
437
+
405
438
  /**
406
439
  * Macro resolution (free tier — no permission needed).
407
440
  * Resolve `{{macro}}` placeholders in arbitrary text using