@snaptrude/plugin-core 0.9.0 → 0.9.1
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/CHANGELOG.md +19 -0
- package/api-manifest.json +312 -0
- package/dist/api/core/io/terrain/index.d.ts +132 -0
- package/dist/api/core/io/terrain/index.d.ts.map +1 -1
- package/dist/api/presentation/annotate.d.ts +23 -4
- package/dist/api/presentation/annotate.d.ts.map +1 -1
- package/dist/api/presentation/diagrams.d.ts +64 -2
- package/dist/api/presentation/diagrams.d.ts.map +1 -1
- package/dist/api/presentation/index.d.ts +11 -1
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +772 -3
- package/dist/api/presentation/placedViews.d.ts.map +1 -1
- package/dist/api/presentation/shapes.d.ts +2 -2
- package/dist/api/presentation/sheets.d.ts +42 -0
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/slideshow.d.ts +125 -0
- package/dist/api/presentation/slideshow.d.ts.map +1 -0
- package/dist/api/presentation/tables.d.ts +81 -0
- package/dist/api/presentation/tables.d.ts.map +1 -0
- package/dist/api/program/site.d.ts +166 -2
- package/dist/api/program/site.d.ts.map +1 -1
- package/dist/api/workspace/index.d.ts +46 -1
- package/dist/api/workspace/index.d.ts.map +1 -1
- package/dist/index.cjs +829 -553
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +797 -553
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/core/io/terrain/index.ts +143 -0
- package/src/api/presentation/annotate.ts +27 -2
- package/src/api/presentation/diagrams.ts +67 -2
- package/src/api/presentation/index.ts +11 -1
- package/src/api/presentation/placedViews.ts +760 -3
- package/src/api/presentation/sheets.ts +54 -0
- package/src/api/presentation/slideshow.ts +134 -0
- package/src/api/presentation/tables.ts +84 -0
- package/src/api/program/site.ts +110 -2
- package/src/api/workspace/index.ts +48 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placedViews.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/placedViews.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C;;;;;;;;;;;;;;;;GAgBG;AACH,8BAAsB,gCAAgC;;IAGpD;;;;;;;;;;;;;;;;;;;;;;;OAuBG;aACa,IAAI,CAClB,OAAO,CAAC,EAAE,MAAM,GACf,eAAe,CAAC,uCAAuC,CAAC;IAE3D;;;;;;;;;;;;;;;;;;;OAmBG;aACa,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAAC,gBAAgB,CAAC;IAEvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;aACa,IAAI,CAClB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAC7B,eAAe,CAAC,gBAAgB,CAAC;IAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;aACa,KAAK,CACnB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,eAAe,CAAC,gBAAgB,CAAC;IAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;aACa,QAAQ,CACtB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,GACZ,eAAe,CAAC,gBAAgB,CAAC;IAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;aACa,OAAO,CACrB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,oBAAoB,GAAG,IAAI,GAChC,eAAe,CAAC,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"placedViews.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/placedViews.ts"],"names":[],"mappings":"AAAA,OAAO,KAA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AAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F,sEAAsE;AACtE,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
|
|
@@ -271,9 +271,9 @@ export declare const PluginPresentationShapeSpec: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
271
271
|
}>>;
|
|
272
272
|
fill: z.ZodOptional<z.ZodEnum<{
|
|
273
273
|
pattern: "pattern";
|
|
274
|
+
solid: "solid";
|
|
274
275
|
none: "none";
|
|
275
276
|
semi: "semi";
|
|
276
|
-
solid: "solid";
|
|
277
277
|
}>>;
|
|
278
278
|
}, z.core.$strip>], "type">;
|
|
279
279
|
export type PluginPresentationShapeSpec = z.infer<typeof PluginPresentationShapeSpec>;
|
|
@@ -426,9 +426,9 @@ export declare const PluginPresentationShapesUpsertArgs: z.ZodObject<{
|
|
|
426
426
|
}>>;
|
|
427
427
|
fill: z.ZodOptional<z.ZodEnum<{
|
|
428
428
|
pattern: "pattern";
|
|
429
|
+
solid: "solid";
|
|
429
430
|
none: "none";
|
|
430
431
|
semi: "semi";
|
|
431
|
-
solid: "solid";
|
|
432
432
|
}>>;
|
|
433
433
|
}, z.core.$strip>], "type">;
|
|
434
434
|
sheetId: z.ZodOptional<z.ZodString>;
|
|
@@ -114,6 +114,30 @@ export declare abstract class PluginPresentationSheetsApi {
|
|
|
114
114
|
* ```
|
|
115
115
|
*/
|
|
116
116
|
abstract setSize(sheetId: string, size: PluginSheetSize, orientation?: PluginSheetOrientation): PluginApiReturn<PluginPresentationSheet>;
|
|
117
|
+
/**
|
|
118
|
+
* Set a sheet's print margin.
|
|
119
|
+
*
|
|
120
|
+
* Applies one of the canonical margin presets — exactly what the sheet
|
|
121
|
+
* header's margin dropdown does. `margin` is unit-agnostic: `0 | 0.25 |
|
|
122
|
+
* 0.5 | 0.75 | 1`, displayed as None / 1/4″ / 1/2″ / 3/4″ / 1″ on imperial
|
|
123
|
+
* projects and None / 5mm / 10mm / 15mm / 20mm on metric ones. One undo
|
|
124
|
+
* step. Requires Present mode to be open.
|
|
125
|
+
*
|
|
126
|
+
* @param sheetId - The id of the sheet.
|
|
127
|
+
* @param margin - The margin preset ({@linkcode PluginSheetMargin}).
|
|
128
|
+
* @returns The updated {@linkcode PluginPresentationSheet}.
|
|
129
|
+
* @throws If Present mode is not open, or the sheet id is invalid.
|
|
130
|
+
*
|
|
131
|
+
* @examplePrompt Set the sheet margin to half an inch
|
|
132
|
+
* @examplePrompt Remove the margins on sheet_1
|
|
133
|
+
* @examplePrompt Give the cover sheet a 10mm margin
|
|
134
|
+
*
|
|
135
|
+
* # Example
|
|
136
|
+
* ```ts
|
|
137
|
+
* const sheet = await snaptrude.presentation.sheets.setMargin("sheet_1", 0.5)
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
abstract setMargin(sheetId: string, margin: PluginSheetMargin): PluginApiReturn<PluginPresentationSheet>;
|
|
117
141
|
/**
|
|
118
142
|
* Place a saved view onto a sheet.
|
|
119
143
|
*
|
|
@@ -303,6 +327,14 @@ export declare const PluginSheetOrientation: z.ZodEnum<{
|
|
|
303
327
|
portrait: "portrait";
|
|
304
328
|
}>;
|
|
305
329
|
export type PluginSheetOrientation = z.infer<typeof PluginSheetOrientation>;
|
|
330
|
+
/**
|
|
331
|
+
* Canonical sheet margin presets — unit-agnostic values matching the sheet
|
|
332
|
+
* header's margin dropdown: `0` (None), `0.25`, `0.5`, `0.75`, `1`.
|
|
333
|
+
* Displayed as None / 1/4″ / 1/2″ / 3/4″ / 1″ on imperial projects and
|
|
334
|
+
* None / 5mm / 10mm / 15mm / 20mm on metric ones.
|
|
335
|
+
*/
|
|
336
|
+
export declare const PluginSheetMargin: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<0.75>, z.ZodLiteral<1>]>;
|
|
337
|
+
export type PluginSheetMargin = z.infer<typeof PluginSheetMargin>;
|
|
306
338
|
/**
|
|
307
339
|
* A layout sheet in the presentation.
|
|
308
340
|
*
|
|
@@ -312,6 +344,7 @@ export type PluginSheetOrientation = z.infer<typeof PluginSheetOrientation>;
|
|
|
312
344
|
* | `name` | `string` | Display name |
|
|
313
345
|
* | `size` | {@linkcode PluginSheetSize}` \| null` | Paper preset (`null` for a legacy sheet without one) |
|
|
314
346
|
* | `orientation` | {@linkcode PluginSheetOrientation}` \| null` | Orientation (`null` for a legacy sheet) |
|
|
347
|
+
* | `margin` | {@linkcode PluginSheetMargin}` \| null` | Margin preset (`null` when absent/unrecognized) |
|
|
315
348
|
*/
|
|
316
349
|
export declare const PluginPresentationSheet: z.ZodObject<{
|
|
317
350
|
id: z.ZodString;
|
|
@@ -338,6 +371,7 @@ export declare const PluginPresentationSheet: z.ZodObject<{
|
|
|
338
371
|
landscape: "landscape";
|
|
339
372
|
portrait: "portrait";
|
|
340
373
|
}>>;
|
|
374
|
+
margin: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<0.75>, z.ZodLiteral<1>]>>;
|
|
341
375
|
}, z.core.$strip>;
|
|
342
376
|
export type PluginPresentationSheet = z.infer<typeof PluginPresentationSheet>;
|
|
343
377
|
/**
|
|
@@ -380,6 +414,7 @@ export declare const PluginPresentationSheetsListResult: z.ZodObject<{
|
|
|
380
414
|
landscape: "landscape";
|
|
381
415
|
portrait: "portrait";
|
|
382
416
|
}>>;
|
|
417
|
+
margin: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<0.75>, z.ZodLiteral<1>]>>;
|
|
383
418
|
}, z.core.$strip>>;
|
|
384
419
|
}, z.core.$strip>;
|
|
385
420
|
export type PluginPresentationSheetsListResult = z.infer<typeof PluginPresentationSheetsListResult>;
|
|
@@ -414,6 +449,7 @@ export declare const PluginPresentationSheetsGetResult: z.ZodNullable<z.ZodObjec
|
|
|
414
449
|
landscape: "landscape";
|
|
415
450
|
portrait: "portrait";
|
|
416
451
|
}>>;
|
|
452
|
+
margin: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<0.75>, z.ZodLiteral<1>]>>;
|
|
417
453
|
}, z.core.$strip>>;
|
|
418
454
|
export type PluginPresentationSheetsGetResult = z.infer<typeof PluginPresentationSheetsGetResult>;
|
|
419
455
|
/** Arguments for {@linkcode PluginPresentationSheetsApi.create}. */
|
|
@@ -470,6 +506,12 @@ export declare const PluginPresentationSheetsSetSizeArgs: z.ZodObject<{
|
|
|
470
506
|
}>>;
|
|
471
507
|
}, z.core.$strip>;
|
|
472
508
|
export type PluginPresentationSheetsSetSizeArgs = z.infer<typeof PluginPresentationSheetsSetSizeArgs>;
|
|
509
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.setMargin}. */
|
|
510
|
+
export declare const PluginPresentationSheetsSetMarginArgs: z.ZodObject<{
|
|
511
|
+
sheetId: z.ZodString;
|
|
512
|
+
margin: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<0.75>, z.ZodLiteral<1>]>;
|
|
513
|
+
}, z.core.$strip>;
|
|
514
|
+
export type PluginPresentationSheetsSetMarginArgs = z.infer<typeof PluginPresentationSheetsSetMarginArgs>;
|
|
473
515
|
/**
|
|
474
516
|
* Arguments for {@linkcode PluginPresentationSheetsApi.place}.
|
|
475
517
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheets.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/sheets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;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AAA;AACF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CACzD,OAAO,qCAAqC,CAC7C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,4CAA4C;;iBAEvD,CAAA;AACF,MAAM,MAAM,4CAA4C,GAAG,CAAC,CAAC,KAAK,CAChE,OAAO,4CAA4C,CACpD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,8CAA8C;;iBAEzD,CAAA;AACF,MAAM,MAAM,8CAA8C,GAAG,CAAC,CAAC,KAAK,CAClE,OAAO,8CAA8C,CACtD,CAAA"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Presentation slideshow — run the Present-mode slideshow programmatically.
|
|
5
|
+
*
|
|
6
|
+
* The scriptable counterpart of the Present toolbar's slideshow: the
|
|
7
|
+
* slideshow plays **all** layout sheets in sheet order (hidden sheets are
|
|
8
|
+
* excluded) — `start` options only pick the slide it opens on. Slide
|
|
9
|
+
* navigation stays with the user (arrow keys / on-screen controls); there is
|
|
10
|
+
* intentionally no `next`/`prev`/`goTo`.
|
|
11
|
+
*
|
|
12
|
+
* **Fullscreen caveat:** browsers only grant fullscreen on a user gesture. A
|
|
13
|
+
* plugin-triggered `start` usually fails that check, in which case the
|
|
14
|
+
* slideshow catches the rejection and runs non-fullscreen (same slides, same
|
|
15
|
+
* controls, windowed).
|
|
16
|
+
*
|
|
17
|
+
* `start`/`stop` are write-gated; `getState` is a never-throw read. Requires
|
|
18
|
+
* Present mode to be open (except `getState`, which reports not-running).
|
|
19
|
+
*
|
|
20
|
+
* Accessed via `snaptrude.presentation.slideshow`.
|
|
21
|
+
*/
|
|
22
|
+
export declare abstract class PluginPresentationSlideshowApi {
|
|
23
|
+
constructor();
|
|
24
|
+
/**
|
|
25
|
+
* Start the slideshow.
|
|
26
|
+
*
|
|
27
|
+
* Launches the Present-mode slideshow over all layout sheets in sheet
|
|
28
|
+
* order. `options.startIndex` opens on that slide (clamped into range);
|
|
29
|
+
* otherwise `options.sheetIds` naming exactly one sheet opens on that
|
|
30
|
+
* sheet; otherwise it opens on the first slide. May run non-fullscreen —
|
|
31
|
+
* see the fullscreen caveat on
|
|
32
|
+
* {@linkcode PluginPresentationSlideshowApi}. Requires Present mode to be
|
|
33
|
+
* open with at least one sheet.
|
|
34
|
+
*
|
|
35
|
+
* @param options - Optional `sheetIds` (open on this sheet when exactly one
|
|
36
|
+
* id is given) and `startIndex` (0-based slide to open on; wins over
|
|
37
|
+
* `sheetIds`; clamped into range).
|
|
38
|
+
* @returns The {@linkcode PluginPresentationSlideshowState} after the
|
|
39
|
+
* launch (`running: true` and the opening `index`).
|
|
40
|
+
* @throws If Present mode is not open or there are no sheets to present.
|
|
41
|
+
*
|
|
42
|
+
* @examplePrompt Start the slideshow
|
|
43
|
+
* @examplePrompt Present the sheets from the beginning
|
|
44
|
+
* @examplePrompt Start the slideshow on sheet 3
|
|
45
|
+
* @examplePrompt Play the presentation starting at the cover sheet
|
|
46
|
+
*
|
|
47
|
+
* # Example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const state = await snaptrude.presentation.slideshow.start({ startIndex: 2 })
|
|
50
|
+
* console.log(state.running, state.index) // true, 2
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
abstract start(options?: {
|
|
54
|
+
sheetIds?: string[];
|
|
55
|
+
startIndex?: number;
|
|
56
|
+
}): PluginApiReturn<PluginPresentationSlideshowState>;
|
|
57
|
+
/**
|
|
58
|
+
* Stop the slideshow.
|
|
59
|
+
*
|
|
60
|
+
* Closes the running slideshow (exiting fullscreen if it entered it) and
|
|
61
|
+
* returns to the Present canvas. A no-op when no slideshow is running.
|
|
62
|
+
*
|
|
63
|
+
* @returns The {@linkcode PluginPresentationSlideshowState} after the stop
|
|
64
|
+
* (`running: false`).
|
|
65
|
+
* @throws If Present mode is not open.
|
|
66
|
+
*
|
|
67
|
+
* @examplePrompt Stop the slideshow
|
|
68
|
+
* @examplePrompt Exit the presentation
|
|
69
|
+
* @examplePrompt Close the slideshow and go back to the sheets
|
|
70
|
+
*
|
|
71
|
+
* # Example
|
|
72
|
+
* ```ts
|
|
73
|
+
* await snaptrude.presentation.slideshow.stop()
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
abstract stop(): PluginApiReturn<PluginPresentationSlideshowState>;
|
|
77
|
+
/**
|
|
78
|
+
* Read the slideshow state.
|
|
79
|
+
*
|
|
80
|
+
* A never-throw read: reports whether a slideshow is running and, when it
|
|
81
|
+
* is, the current 0-based slide index (`index` is `null` when not
|
|
82
|
+
* running — including when Present mode is closed).
|
|
83
|
+
*
|
|
84
|
+
* @returns The current {@linkcode PluginPresentationSlideshowState}.
|
|
85
|
+
*
|
|
86
|
+
* @examplePrompt Is the slideshow running?
|
|
87
|
+
* @examplePrompt Which slide is the presentation on?
|
|
88
|
+
* @examplePrompt Check the slideshow state
|
|
89
|
+
*
|
|
90
|
+
* # Example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const { running, index } = await snaptrude.presentation.slideshow.getState()
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
abstract getState(): PluginApiReturn<PluginPresentationSlideshowState>;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Arguments for {@linkcode PluginPresentationSlideshowApi.start}.
|
|
99
|
+
*
|
|
100
|
+
* | Property | Type | Description |
|
|
101
|
+
* |---|---|---|
|
|
102
|
+
* | `sheetIds` | `string[] \| undefined` | Open on this sheet when exactly one id is given |
|
|
103
|
+
* | `startIndex` | `number \| undefined` | 0-based slide to open on (wins over `sheetIds`; clamped) |
|
|
104
|
+
*/
|
|
105
|
+
export declare const PluginPresentationSlideshowStartArgs: z.ZodObject<{
|
|
106
|
+
sheetIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
107
|
+
startIndex: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
export type PluginPresentationSlideshowStartArgs = z.infer<typeof PluginPresentationSlideshowStartArgs>;
|
|
110
|
+
/**
|
|
111
|
+
* The slideshow state — result of {@linkcode PluginPresentationSlideshowApi.start},
|
|
112
|
+
* {@linkcode PluginPresentationSlideshowApi.stop}, and
|
|
113
|
+
* {@linkcode PluginPresentationSlideshowApi.getState}.
|
|
114
|
+
*
|
|
115
|
+
* | Property | Type | Description |
|
|
116
|
+
* |---|---|---|
|
|
117
|
+
* | `running` | `boolean` | Whether a slideshow is currently running |
|
|
118
|
+
* | `index` | `number \| null` | Current 0-based slide index (`null` when not running) |
|
|
119
|
+
*/
|
|
120
|
+
export declare const PluginPresentationSlideshowState: z.ZodObject<{
|
|
121
|
+
running: z.ZodBoolean;
|
|
122
|
+
index: z.ZodNullable<z.ZodNumber>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export type PluginPresentationSlideshowState = z.infer<typeof PluginPresentationSlideshowState>;
|
|
125
|
+
//# sourceMappingURL=slideshow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slideshow.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/slideshow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,8BAAsB,8BAA8B;;IAGlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;aACa,KAAK,CAAC,OAAO,CAAC,EAAE;QAC9B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,GAAG,eAAe,CAAC,gCAAgC,CAAC;IAErD;;;;;;;;;;;;;;;;;;OAkBG;aACa,IAAI,IAAI,eAAe,CAAC,gCAAgC,CAAC;IAEzE;;;;;;;;;;;;;;;;;OAiBG;aACa,QAAQ,IAAI,eAAe,CAAC,gCAAgC,CAAC;CAC9E;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,oCAAoC;;;iBAG/C,CAAA;AACF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,oCAAoC,CAC5C,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC;;;iBAG3C,CAAA;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,gCAAgC,CACxC,CAAA"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../types";
|
|
3
|
+
import type { PluginCanvasShape } from "./placedViews";
|
|
4
|
+
/**
|
|
5
|
+
* Presentation tables — place data tables on Present-mode sheets.
|
|
6
|
+
*
|
|
7
|
+
* The scriptable counterpart of the Present canvas's table paste (the flow
|
|
8
|
+
* that turns a Program-mode / Google Sheets / Excel paste into a table
|
|
9
|
+
* shape): {@linkcode PluginPresentationTablesApi.place} takes plain string
|
|
10
|
+
* rows and creates one table shape on a sheet. Requires Present mode to be
|
|
11
|
+
* open.
|
|
12
|
+
*
|
|
13
|
+
* Accessed via `snaptrude.presentation.tables`.
|
|
14
|
+
*/
|
|
15
|
+
export declare abstract class PluginPresentationTablesApi {
|
|
16
|
+
constructor();
|
|
17
|
+
/**
|
|
18
|
+
* Place a table on a sheet.
|
|
19
|
+
*
|
|
20
|
+
* Creates one table shape from `table.rows` — the same shape the Present
|
|
21
|
+
* canvas creates when a spreadsheet table is pasted — and returns the
|
|
22
|
+
* created shape as a canvas-shape record. Cells are plain strings; rows may
|
|
23
|
+
* be ragged (each row needs at least one cell), capped at 10000 cells
|
|
24
|
+
* total. `options.position` is sheet-local (relative to the sheet's
|
|
25
|
+
* top-left, in canvas units — the same convention as `annotate.*`); when
|
|
26
|
+
* omitted the table lands where the paste flow would auto-place it (the
|
|
27
|
+
* center of the current viewport). One undo step. Requires Present mode to
|
|
28
|
+
* be open.
|
|
29
|
+
*
|
|
30
|
+
* @param sheetId - The sheet to place the table on.
|
|
31
|
+
* @param table - The table content: `rows`, an array of string-cell rows.
|
|
32
|
+
* @param options - Optional `position` (`{ x, y }`, relative to the sheet's
|
|
33
|
+
* top-left — defaults to the paste flow's auto-placement).
|
|
34
|
+
* @returns The created table shape as a {@linkcode PluginCanvasShape}.
|
|
35
|
+
* @throws If Present mode is not open, the sheet id is invalid, or the
|
|
36
|
+
* table is empty / exceeds the 10000-cell cap.
|
|
37
|
+
*
|
|
38
|
+
* @examplePrompt Put the area schedule as a table on Sheet 1
|
|
39
|
+
* @examplePrompt Add a table of the room programs to the cover sheet
|
|
40
|
+
* @examplePrompt Paste this data as a table on the sheet
|
|
41
|
+
* @examplePrompt Place a two-column table of space names and areas
|
|
42
|
+
*
|
|
43
|
+
* # Example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const shape = await snaptrude.presentation.tables.place("sheet_1", {
|
|
46
|
+
* rows: [
|
|
47
|
+
* ["Room", "Area"],
|
|
48
|
+
* ["Kitchen", "12.4 m²"],
|
|
49
|
+
* ["Living", "28.0 m²"],
|
|
50
|
+
* ],
|
|
51
|
+
* }, { position: { x: 40, y: 40 } })
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
abstract place(sheetId: string, table: {
|
|
55
|
+
rows: string[][];
|
|
56
|
+
}, options?: {
|
|
57
|
+
position?: {
|
|
58
|
+
x: number;
|
|
59
|
+
y: number;
|
|
60
|
+
};
|
|
61
|
+
}): PluginApiReturn<PluginCanvasShape>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Arguments for {@linkcode PluginPresentationTablesApi.place}.
|
|
65
|
+
*
|
|
66
|
+
* | Property | Type | Description |
|
|
67
|
+
* |---|---|---|
|
|
68
|
+
* | `sheetId` | `string` | The sheet to place the table on |
|
|
69
|
+
* | `rows` | `string[][]` | Table cells as string rows (non-empty; ≤ 10000 cells total) |
|
|
70
|
+
* | `position` | `{ x: number; y: number } \| undefined` | Sheet-local position (default: paste auto-placement) |
|
|
71
|
+
*/
|
|
72
|
+
export declare const PluginPresentationTablesPlaceArgs: z.ZodObject<{
|
|
73
|
+
sheetId: z.ZodString;
|
|
74
|
+
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
75
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
x: z.ZodNumber;
|
|
77
|
+
y: z.ZodNumber;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
export type PluginPresentationTablesPlaceArgs = z.infer<typeof PluginPresentationTablesPlaceArgs>;
|
|
81
|
+
//# sourceMappingURL=tables.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/tables.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEtD;;;;;;;;;;GAUG;AACH,8BAAsB,2BAA2B;;IAG/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;aACa,KAAK,CACnB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAA;KAAE,EAC3B,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAChD,eAAe,CAAC,iBAAiB,CAAC;CACtC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iCAAiC;;;;;;;iBAS5C,CAAA;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAA"}
|
|
@@ -8,8 +8,10 @@ import { PluginApiReturn } from "../../types";
|
|
|
8
8
|
* in Snaptrude units — the same plan space as a space's `planPoints`), and —
|
|
9
9
|
* when the project is geo-located on terrain — their geographic
|
|
10
10
|
* (latitude/longitude) rings. This is the program-planning view of the site;
|
|
11
|
-
* zoning numbers (
|
|
12
|
-
*
|
|
11
|
+
* zoning numbers (FAR/FSI, height limits) live in the site-analysis sheet and
|
|
12
|
+
* are not read here — with one exception: `listEdges` reads each parcel's
|
|
13
|
+
* per-edge front/side/rear classification and effective base setbacks, the
|
|
14
|
+
* same resolution the buildable-envelope setback pills show on canvas.
|
|
13
15
|
*
|
|
14
16
|
* All methods are reads: they return plain records and never throw — `get`
|
|
15
17
|
* returns an empty snapshot (zero totals) when there is no site, and the `list`
|
|
@@ -79,6 +81,46 @@ export declare abstract class PluginProgramSiteApi {
|
|
|
79
81
|
* ```
|
|
80
82
|
*/
|
|
81
83
|
abstract listPolygons(): PluginApiReturn<PluginProgramSiteListPolygonsResult>;
|
|
84
|
+
/**
|
|
85
|
+
* List each site parcel's boundary edges with their front / side / rear
|
|
86
|
+
* classification — the same per-edge roles the buildable-envelope setback
|
|
87
|
+
* pills show on canvas, so a plugin can pick up the user's edge tagging
|
|
88
|
+
* without asking them to set it up again.
|
|
89
|
+
*
|
|
90
|
+
* Role resolution mirrors the canvas exactly: the user's per-edge overrides
|
|
91
|
+
* (set via the setback pills) win over the tangent heuristic
|
|
92
|
+
* (`roleSource: "override"` vs `"heuristic"`). `"street"` never appears — it
|
|
93
|
+
* resolves to `front`. When a parcel has a linked zoning buildable envelope,
|
|
94
|
+
* `setbackMeters` is the effective base setback of the edge (a per-edge
|
|
95
|
+
* exception when one exists, else the role's value); parcels without a
|
|
96
|
+
* zoning envelope classify by heuristic alone and report
|
|
97
|
+
* `setbackMeters: null`.
|
|
98
|
+
*
|
|
99
|
+
* Coordinates are **world meters** (`lengthUnit: "m"`) — unlike
|
|
100
|
+
* {@linkcode PluginProgramSiteApi.listPolygons} footprints, which are
|
|
101
|
+
* Snaptrude units. `edgeIndex` is keyed to the canonicalized (sanitized,
|
|
102
|
+
* CCW) boundary, the same index space the envelope's `edgeOverrides` use.
|
|
103
|
+
* `staleOverridesDropped: true` means the site was edited after the
|
|
104
|
+
* envelope was configured and the persisted overrides no longer align with
|
|
105
|
+
* the live boundary — the heuristic classification is reported instead.
|
|
106
|
+
*
|
|
107
|
+
* @returns A {@linkcode PluginProgramSiteListEdgesResult} with one entry per
|
|
108
|
+
* parcel. Empty when the project has no site.
|
|
109
|
+
*
|
|
110
|
+
* @examplePrompt Which edge of my site is the front?
|
|
111
|
+
* @examplePrompt Read the front / side / rear edges of the plot
|
|
112
|
+
* @examplePrompt What setback applies to each site edge?
|
|
113
|
+
* @examplePrompt Get the site edges the way the setback pills show them
|
|
114
|
+
*
|
|
115
|
+
* # Example
|
|
116
|
+
* ```ts
|
|
117
|
+
* const { sites } = await snaptrude.program.site.listEdges()
|
|
118
|
+
* for (const site of sites)
|
|
119
|
+
* for (const e of site.edges)
|
|
120
|
+
* console.log(e.edgeIndex, e.role, e.roleSource, e.setbackMeters)
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
abstract listEdges(): PluginApiReturn<PluginProgramSiteListEdgesResult>;
|
|
82
124
|
/**
|
|
83
125
|
* List the site parcels as geographic latitude/longitude rings.
|
|
84
126
|
*
|
|
@@ -545,4 +587,126 @@ export declare const PluginProgramSiteWeatherResult: z.ZodNullable<z.ZodObject<{
|
|
|
545
587
|
}>;
|
|
546
588
|
}, z.core.$strip>>;
|
|
547
589
|
export type PluginProgramSiteWeatherResult = z.infer<typeof PluginProgramSiteWeatherResult>;
|
|
590
|
+
/**
|
|
591
|
+
* Front / side / rear classification of one site-boundary edge. `"street"`
|
|
592
|
+
* never appears — the backend synonym resolves to `front`.
|
|
593
|
+
*/
|
|
594
|
+
export declare const PluginProgramSiteEdgeRole: z.ZodEnum<{
|
|
595
|
+
front: "front";
|
|
596
|
+
side: "side";
|
|
597
|
+
rear: "rear";
|
|
598
|
+
}>;
|
|
599
|
+
export type PluginProgramSiteEdgeRole = z.infer<typeof PluginProgramSiteEdgeRole>;
|
|
600
|
+
/**
|
|
601
|
+
* One boundary edge of a site parcel, as {@linkcode PluginProgramSiteApi.listEdges}
|
|
602
|
+
* returns it. Coordinates and lengths are world meters.
|
|
603
|
+
*
|
|
604
|
+
* | Property | Type | Description |
|
|
605
|
+
* |---|---|---|
|
|
606
|
+
* | `edgeIndex` | `number` | Index in the canonicalized (sanitized, CCW) boundary — the same index space the envelope's `edgeOverrides` use |
|
|
607
|
+
* | `start` / `end` | `{ x, z }` | Edge endpoints, world XZ meters |
|
|
608
|
+
* | `lengthMeters` | `number` | Edge length in meters |
|
|
609
|
+
* | `role` | `"front" \| "side" \| "rear"` | Resolved classification (user override wins over the heuristic) |
|
|
610
|
+
* | `roleSource` | `"override" \| "heuristic"` | Whether the user reassigned this edge's role or the tangent heuristic classified it |
|
|
611
|
+
* | `setbackMeters` | `number \| null` | Effective base setback (per-edge exception ?? role value); `null` when the parcel has no zoning envelope |
|
|
612
|
+
*/
|
|
613
|
+
export declare const PluginProgramSiteEdge: z.ZodObject<{
|
|
614
|
+
edgeIndex: z.ZodNumber;
|
|
615
|
+
start: z.ZodObject<{
|
|
616
|
+
x: z.ZodNumber;
|
|
617
|
+
z: z.ZodNumber;
|
|
618
|
+
}, z.core.$strip>;
|
|
619
|
+
end: z.ZodObject<{
|
|
620
|
+
x: z.ZodNumber;
|
|
621
|
+
z: z.ZodNumber;
|
|
622
|
+
}, z.core.$strip>;
|
|
623
|
+
lengthMeters: z.ZodNumber;
|
|
624
|
+
role: z.ZodEnum<{
|
|
625
|
+
front: "front";
|
|
626
|
+
side: "side";
|
|
627
|
+
rear: "rear";
|
|
628
|
+
}>;
|
|
629
|
+
roleSource: z.ZodEnum<{
|
|
630
|
+
override: "override";
|
|
631
|
+
heuristic: "heuristic";
|
|
632
|
+
}>;
|
|
633
|
+
setbackMeters: z.ZodNullable<z.ZodNumber>;
|
|
634
|
+
}, z.core.$strip>;
|
|
635
|
+
export type PluginProgramSiteEdge = z.infer<typeof PluginProgramSiteEdge>;
|
|
636
|
+
/**
|
|
637
|
+
* Per-parcel entry of {@linkcode PluginProgramSiteApi.listEdges}.
|
|
638
|
+
*
|
|
639
|
+
* | Property | Type | Description |
|
|
640
|
+
* |---|---|---|
|
|
641
|
+
* | `siteId` | `string` | The parcel's component id (same id space as `listPolygons`) |
|
|
642
|
+
* | `buildableEnvelopeId` | `string \| null` | Linked zoning envelope, when one exists |
|
|
643
|
+
* | `usingLiveSiteBoundary` | `boolean` | `true` when edges come from the live site boundary; `false` when only the envelope's persisted source polygon was resolvable |
|
|
644
|
+
* | `staleOverridesDropped` | `boolean` | `true` when persisted edge overrides no longer index-align with the live boundary and were ignored |
|
|
645
|
+
* | `edges` | `PluginProgramSiteEdge[]` | The classified boundary edges |
|
|
646
|
+
*/
|
|
647
|
+
export declare const PluginProgramSiteEdgesEntry: z.ZodObject<{
|
|
648
|
+
siteId: z.ZodString;
|
|
649
|
+
buildableEnvelopeId: z.ZodNullable<z.ZodString>;
|
|
650
|
+
usingLiveSiteBoundary: z.ZodBoolean;
|
|
651
|
+
staleOverridesDropped: z.ZodBoolean;
|
|
652
|
+
edges: z.ZodArray<z.ZodObject<{
|
|
653
|
+
edgeIndex: z.ZodNumber;
|
|
654
|
+
start: z.ZodObject<{
|
|
655
|
+
x: z.ZodNumber;
|
|
656
|
+
z: z.ZodNumber;
|
|
657
|
+
}, z.core.$strip>;
|
|
658
|
+
end: z.ZodObject<{
|
|
659
|
+
x: z.ZodNumber;
|
|
660
|
+
z: z.ZodNumber;
|
|
661
|
+
}, z.core.$strip>;
|
|
662
|
+
lengthMeters: z.ZodNumber;
|
|
663
|
+
role: z.ZodEnum<{
|
|
664
|
+
front: "front";
|
|
665
|
+
side: "side";
|
|
666
|
+
rear: "rear";
|
|
667
|
+
}>;
|
|
668
|
+
roleSource: z.ZodEnum<{
|
|
669
|
+
override: "override";
|
|
670
|
+
heuristic: "heuristic";
|
|
671
|
+
}>;
|
|
672
|
+
setbackMeters: z.ZodNullable<z.ZodNumber>;
|
|
673
|
+
}, z.core.$strip>>;
|
|
674
|
+
}, z.core.$strip>;
|
|
675
|
+
export type PluginProgramSiteEdgesEntry = z.infer<typeof PluginProgramSiteEdgesEntry>;
|
|
676
|
+
/**
|
|
677
|
+
* Result of {@linkcode PluginProgramSiteApi.listEdges} — one entry per site
|
|
678
|
+
* parcel; empty when the project has no site. `lengthUnit` is always `"m"`.
|
|
679
|
+
*/
|
|
680
|
+
export declare const PluginProgramSiteListEdgesResult: z.ZodObject<{
|
|
681
|
+
lengthUnit: z.ZodLiteral<"m">;
|
|
682
|
+
sites: z.ZodArray<z.ZodObject<{
|
|
683
|
+
siteId: z.ZodString;
|
|
684
|
+
buildableEnvelopeId: z.ZodNullable<z.ZodString>;
|
|
685
|
+
usingLiveSiteBoundary: z.ZodBoolean;
|
|
686
|
+
staleOverridesDropped: z.ZodBoolean;
|
|
687
|
+
edges: z.ZodArray<z.ZodObject<{
|
|
688
|
+
edgeIndex: z.ZodNumber;
|
|
689
|
+
start: z.ZodObject<{
|
|
690
|
+
x: z.ZodNumber;
|
|
691
|
+
z: z.ZodNumber;
|
|
692
|
+
}, z.core.$strip>;
|
|
693
|
+
end: z.ZodObject<{
|
|
694
|
+
x: z.ZodNumber;
|
|
695
|
+
z: z.ZodNumber;
|
|
696
|
+
}, z.core.$strip>;
|
|
697
|
+
lengthMeters: z.ZodNumber;
|
|
698
|
+
role: z.ZodEnum<{
|
|
699
|
+
front: "front";
|
|
700
|
+
side: "side";
|
|
701
|
+
rear: "rear";
|
|
702
|
+
}>;
|
|
703
|
+
roleSource: z.ZodEnum<{
|
|
704
|
+
override: "override";
|
|
705
|
+
heuristic: "heuristic";
|
|
706
|
+
}>;
|
|
707
|
+
setbackMeters: z.ZodNullable<z.ZodNumber>;
|
|
708
|
+
}, z.core.$strip>>;
|
|
709
|
+
}, z.core.$strip>>;
|
|
710
|
+
}, z.core.$strip>;
|
|
711
|
+
export type PluginProgramSiteListEdgesResult = z.infer<typeof PluginProgramSiteListEdgesResult>;
|
|
548
712
|
//# sourceMappingURL=site.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../../../src/api/program/site.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAG7C
|
|
1
|
+
{"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../../../src/api/program/site.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAG7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,8BAAsB,oBAAoB;;IAGxC;;;;;;;;;;;;;;;;;;OAkBG;aACa,GAAG,IAAI,eAAe,CAAC,yBAAyB,CAAC;IAEjE;;;;;;;;;;;;;;;;;;OAkBG;aACa,OAAO,IAAI,eAAe,CAAC,2BAA2B,CAAC;IAEvE;;;;;;;;;;;;;;;;;;OAkBG;aACa,YAAY,IAAI,eAAe,CAAC,mCAAmC,CAAC;IAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;aACa,SAAS,IAAI,eAAe,CAAC,gCAAgC,CAAC;IAE9E;;;;;;;;;;;;;;;;;;;;OAoBG;aACa,eAAe,IAAI,eAAe,CAAC,sCAAsC,CAAC;IAE1F;;;;;;;;;;;;;;;;;;;OAmBG;aACa,UAAU,IAAI,eAAe,CAAC,8BAA8B,CAAC;IAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;aACa,WAAW,IAAI,eAAe,CAAC,+BAA+B,CAAC;IAE/E;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;aACa,aAAa,IAAI,eAAe,CAAC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+BAA+B,4BAAwB,CAAA;AACpE,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,+BAA+B,CACvC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;iBASnC,CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE/E;;;GAGG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;kBACN,CAAA;AACrC,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;EAAoC,CAAA;AAC1E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;iBAQhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMtC,CAAA;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,2BAA2B,CACnC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG3C,CAAA;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,gCAAgC,CACxC,CAAA"}
|
|
@@ -9,16 +9,61 @@ import { PluginApiReturn } from "../../types";
|
|
|
9
9
|
* Teams are **read-only** here (no create/invite/delete in v1, a deliberate
|
|
10
10
|
* safety decision); there are no folders in v1. A `projectId` is the project's
|
|
11
11
|
* floorkey. Plan limits are enforced by the backend — a limit rejection surfaces
|
|
12
|
-
* as a normal host error.
|
|
12
|
+
* as a normal host error. It also carries the workspace-level mode switch for
|
|
13
|
+
* Present mode ({@linkcode PluginWorkspaceApi.openPresentMode} /
|
|
14
|
+
* {@linkcode PluginWorkspaceApi.closePresentMode}).
|
|
13
15
|
*
|
|
14
16
|
* - {@linkcode PluginWorkspaceApi.projects} — Create, copy, list, read & rename projects
|
|
15
17
|
* - {@linkcode PluginWorkspaceApi.teams} — Read teams and their members
|
|
18
|
+
* - {@linkcode PluginWorkspaceApi.openPresentMode} / {@linkcode PluginWorkspaceApi.closePresentMode} — Open/close the Present-mode documentation editor
|
|
16
19
|
*/
|
|
17
20
|
export declare abstract class PluginWorkspaceApi {
|
|
18
21
|
/** Projects — create, copy, list, read & rename. See {@linkcode PluginWorkspaceProjectsApi}. */
|
|
19
22
|
abstract projects: PluginWorkspaceProjectsApi;
|
|
20
23
|
/** Teams — read teams and their members. See {@linkcode PluginWorkspaceTeamsApi}. */
|
|
21
24
|
abstract teams: PluginWorkspaceTeamsApi;
|
|
25
|
+
/**
|
|
26
|
+
* Open Present mode — the documentation editor the `presentation.*`
|
|
27
|
+
* namespaces operate on.
|
|
28
|
+
*
|
|
29
|
+
* Switches the workspace into Present mode and resolves only once the
|
|
30
|
+
* Present canvas has finished mounting (waits up to ~15s; a mount that
|
|
31
|
+
* never completes is refused with a typed `PRECONDITION_FAILED`), so a
|
|
32
|
+
* `presentation.*` call issued right after this resolves finds Present
|
|
33
|
+
* mode open. Idempotent — resolves immediately when Present mode is
|
|
34
|
+
* already open. Write-gated: switching the mode under the user's feet is
|
|
35
|
+
* approval-controlled by design.
|
|
36
|
+
*
|
|
37
|
+
* @throws `PRECONDITION_FAILED` if the Present canvas does not mount within
|
|
38
|
+
* the timeout.
|
|
39
|
+
*
|
|
40
|
+
* @examplePrompt Open present mode
|
|
41
|
+
* @examplePrompt Switch to the presentation editor
|
|
42
|
+
* @examplePrompt Open the sheets so I can lay out views
|
|
43
|
+
*
|
|
44
|
+
* # Example
|
|
45
|
+
* ```ts
|
|
46
|
+
* await snaptrude.workspace.openPresentMode()
|
|
47
|
+
* const { sheets } = await snaptrude.presentation.sheets.list()
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
abstract openPresentMode(): PluginApiReturn<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Close Present mode and return to the modeling canvas.
|
|
53
|
+
*
|
|
54
|
+
* Idempotent — a no-op when Present mode is not open. Write-gated, like
|
|
55
|
+
* {@linkcode PluginWorkspaceApi.openPresentMode}.
|
|
56
|
+
*
|
|
57
|
+
* @examplePrompt Close present mode
|
|
58
|
+
* @examplePrompt Exit the presentation editor
|
|
59
|
+
* @examplePrompt Go back to the modeling canvas
|
|
60
|
+
*
|
|
61
|
+
* # Example
|
|
62
|
+
* ```ts
|
|
63
|
+
* await snaptrude.workspace.closePresentMode()
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
abstract closePresentMode(): PluginApiReturn<void>;
|
|
22
67
|
constructor();
|
|
23
68
|
}
|
|
24
69
|
/**
|