@celestia-island/plana-types 0.1.8 → 0.1.9

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.
@@ -0,0 +1,383 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * The base view a template is built on — the spec arm that must be set.
5
+ */
6
+ export type BaseViewKind = "waterfall" | "node-canvas" | "data-grid" | "kanban" | "blank-canvas";
7
+
8
+ /**
9
+ * The blank-canvas base's spec.
10
+ */
11
+ export type BlankCanvasSpec = {
12
+ /**
13
+ * What mounts into the canvas (a renderer id the host resolves).
14
+ */
15
+ mount: string,
16
+ /**
17
+ * Optional DOM overlay drawn above the canvas.
18
+ */
19
+ overlay?: string, };
20
+
21
+ /**
22
+ * Camera behaviour of a node canvas.
23
+ */
24
+ export type CameraSpec = {
25
+ /**
26
+ * Smallest allowed zoom factor.
27
+ */
28
+ min_zoom: number,
29
+ /**
30
+ * Largest allowed zoom factor.
31
+ */
32
+ max_zoom: number,
33
+ /**
34
+ * Zoom step as a fraction (0.05 = 5%).
35
+ */
36
+ zoom_step?: number,
37
+ /**
38
+ * Whether the camera fits the content on first paint.
39
+ */
40
+ fit_on_load: boolean, };
41
+
42
+ /**
43
+ * How a node canvas draws its layers.
44
+ */
45
+ export type CanvasBackend = "svg" | "dom-overlay-svg" | "canvas-edges-dom" | "blank";
46
+
47
+ /**
48
+ * The chrome a template asks the shell to draw around it.
49
+ */
50
+ export type ChromeSpec = {
51
+ /**
52
+ * Docked widgets this view contributes.
53
+ */
54
+ docks: Array<DockContribution>,
55
+ /**
56
+ * Whether the shell draws its breadcrumb bar.
57
+ */
58
+ breadcrumb: boolean, };
59
+
60
+ /**
61
+ * The data-grid base's spec.
62
+ */
63
+ export type DataGridSpec = {
64
+ /**
65
+ * Field schema ids this grid binds to.
66
+ */
67
+ fields: Array<string>,
68
+ /**
69
+ * Whether rows can be edited in place.
70
+ */
71
+ editable: boolean,
72
+ /**
73
+ * Optional overlay widget drawn above the grid (trend, alarms).
74
+ */
75
+ overlay?: string, };
76
+
77
+ /**
78
+ * Drag-and-drop behaviour of a kanban.
79
+ */
80
+ export type DndSpec = {
81
+ /**
82
+ * Whether cards can move between lanes.
83
+ */
84
+ across_lanes: boolean,
85
+ /**
86
+ * Whether cards can be reordered inside a lane.
87
+ */
88
+ reorder: boolean, };
89
+
90
+ /**
91
+ * The plane a dock surface sits on.
92
+ */
93
+ export type DockAnchor = "page" | "plane";
94
+
95
+ /**
96
+ * One dock widget a template hangs.
97
+ */
98
+ export type DockContribution = {
99
+ /**
100
+ * Widget id the host resolves.
101
+ */
102
+ widget: string,
103
+ /**
104
+ * Where it hangs.
105
+ */
106
+ placement: DockPlacement,
107
+ /**
108
+ * Which plane carries it.
109
+ */
110
+ anchor: DockAnchor,
111
+ /**
112
+ * Surface finish.
113
+ */
114
+ surface: DockSurface,
115
+ /**
116
+ * Stacking order among contributions sharing a placement.
117
+ */
118
+ order: number, };
119
+
120
+ /**
121
+ * Where a dock surface hangs.
122
+ */
123
+ export type DockPlacement = "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
124
+
125
+ /**
126
+ * The finish of a dock surface.
127
+ */
128
+ export type DockSurface = "glass" | "solid";
129
+
130
+ /**
131
+ * How a waterfall groups its items into buckets (day sections, lanes, …).
132
+ */
133
+ export type GroupingSpec = {
134
+ /**
135
+ * Field of the item the bucket key is read from.
136
+ */
137
+ field: string,
138
+ /**
139
+ * Whether the buckets are ordered newest-first.
140
+ */
141
+ newest_first: boolean, };
142
+
143
+ /**
144
+ * The kanban base's spec.
145
+ */
146
+ export type KanbanSpec = {
147
+ /**
148
+ * Scroll directions the board supports.
149
+ */
150
+ axes: ScrollAxes,
151
+ /**
152
+ * Lane definition.
153
+ */
154
+ lanes: LaneSpec,
155
+ /**
156
+ * Draggable card kinds, in picker order.
157
+ */
158
+ card_kinds: Array<string>,
159
+ /**
160
+ * Drag-and-drop behaviour.
161
+ */
162
+ dnd: DndSpec,
163
+ /**
164
+ * Optional windowing for long boards.
165
+ */
166
+ windowing?: WindowingSpec, };
167
+
168
+ /**
169
+ * One lane of a kanban.
170
+ */
171
+ export type LaneSpec = {
172
+ /**
173
+ * Field of the item the lane key is read from.
174
+ */
175
+ field: string,
176
+ /**
177
+ * Whether the lane header is drawn as a card of its own.
178
+ */
179
+ header_is_card: boolean, };
180
+
181
+ /**
182
+ * The built-in minimap, which is on by default for node canvases.
183
+ */
184
+ export type MinimapSpec = {
185
+ /**
186
+ * Whether the minimap is drawn.
187
+ */
188
+ enabled: boolean,
189
+ /**
190
+ * Where it is anchored.
191
+ */
192
+ placement: DockPlacement, };
193
+
194
+ /**
195
+ * The node-canvas base's spec.
196
+ */
197
+ export type NodeCanvasSpec = {
198
+ /**
199
+ * Which rendering backend draws the layers.
200
+ */
201
+ backend: CanvasBackend,
202
+ /**
203
+ * Camera bounds and first-paint behaviour.
204
+ */
205
+ camera: CameraSpec,
206
+ /**
207
+ * The minimap, on by default.
208
+ */
209
+ minimap?: MinimapSpec,
210
+ /**
211
+ * Node kinds this canvas may render.
212
+ */
213
+ node_kinds: Array<string>,
214
+ /**
215
+ * Optional left rail (a node palette).
216
+ */
217
+ palette?: string,
218
+ /**
219
+ * Optional right rail (an inspector).
220
+ */
221
+ inspector?: string,
222
+ /**
223
+ * Optional auto-layout algorithm id.
224
+ */
225
+ auto_layout?: string, };
226
+
227
+ /**
228
+ * One panel template: identity, presentation and the base view's spec.
229
+ */
230
+ export type PanelTemplate = {
231
+ /**
232
+ * Template id — kebab-case, stable across config layers.
233
+ */
234
+ id: string,
235
+ /**
236
+ * Display title (the author's language).
237
+ */
238
+ title: string,
239
+ /**
240
+ * Optional i18n key; when present the shell translates it instead of
241
+ * using `title`.
242
+ */
243
+ title_key?: string,
244
+ /**
245
+ * Optional description.
246
+ */
247
+ description?: string,
248
+ /**
249
+ * Optional description i18n key.
250
+ */
251
+ description_key?: string,
252
+ /**
253
+ * Render-engine (plugin) id that draws this template.
254
+ */
255
+ render_engine: string,
256
+ /**
257
+ * The base view and its configuration.
258
+ */
259
+ spec: ViewTemplateSpec, };
260
+
261
+ /**
262
+ * Which way a kanban scrolls.
263
+ */
264
+ export type ScrollAxes = "horizontal" | "vertical" | "both";
265
+
266
+ /**
267
+ * A template file — the TOML document a workspace or plugin ships.
268
+ */
269
+ export type ViewTemplateFile = {
270
+ /**
271
+ * Format version. A reader that does not know the version must reject
272
+ * the file rather than guess — the same explicit stance the MDD
273
+ * descriptor takes for its `schema_version`.
274
+ */
275
+ version: number,
276
+ /**
277
+ * The templates the file declares.
278
+ */
279
+ template: Array<PanelTemplate>, };
280
+
281
+ /**
282
+ * The spec arm matching a template's base view.
283
+ *
284
+ * Exactly one arm is set — the one named by [`ViewTemplateSpec::base`] —
285
+ * so a reader never has to guess which of the five it is looking at.
286
+ */
287
+ export type ViewTemplateSpec = {
288
+ /**
289
+ * The base view this template is drawn on.
290
+ */
291
+ base: BaseViewKind,
292
+ /**
293
+ * Set iff `base` is `waterfall`.
294
+ */
295
+ waterfall?: WaterfallSpec,
296
+ /**
297
+ * Set iff `base` is `node-canvas`.
298
+ */
299
+ node_canvas?: NodeCanvasSpec,
300
+ /**
301
+ * Set iff `base` is `data-grid`.
302
+ */
303
+ data_grid?: DataGridSpec,
304
+ /**
305
+ * Set iff `base` is `kanban`.
306
+ */
307
+ kanban?: KanbanSpec,
308
+ /**
309
+ * Set iff `base` is `blank-canvas`.
310
+ */
311
+ blank_canvas?: BlankCanvasSpec,
312
+ /**
313
+ * Optional chrome (docks, breadcrumb).
314
+ */
315
+ chrome?: ChromeSpec, };
316
+
317
+ /**
318
+ * How a waterfall splits its item stream into columns.
319
+ */
320
+ export type WaterfallColumns = { "kind": "single" } | { "kind": "fixed",
321
+ /**
322
+ * Number of columns (>= 1).
323
+ */
324
+ count: number, } | { "kind": "adaptive",
325
+ /**
326
+ * Upper bound on the derived column count.
327
+ */
328
+ max: number,
329
+ /**
330
+ * Minimum column width in pixels.
331
+ */
332
+ min_width: number, };
333
+
334
+ /**
335
+ * The waterfall base's spec.
336
+ */
337
+ export type WaterfallSpec = {
338
+ /**
339
+ * Column layout.
340
+ */
341
+ columns: WaterfallColumns,
342
+ /**
343
+ * Optional bucketing.
344
+ */
345
+ grouping?: GroupingSpec,
346
+ /**
347
+ * Optional windowing (absent = render the whole list).
348
+ */
349
+ windowing?: WindowingSpec,
350
+ /**
351
+ * Card kinds this view may render, in picker order.
352
+ */
353
+ card_kinds: Array<string>,
354
+ /**
355
+ * Optional rail widget drawn beside the stream (a timeline).
356
+ */
357
+ rail?: string,
358
+ /**
359
+ * Optional search affordance.
360
+ */
361
+ search?: string, };
362
+
363
+ /**
364
+ * Where the windowed rows come from.
365
+ */
366
+ export type WindowingSource = "client" | "host";
367
+
368
+ /**
369
+ * Windowing parameters for a scrolling base view.
370
+ */
371
+ export type WindowingSpec = {
372
+ /**
373
+ * Which side owns the window.
374
+ */
375
+ source: WindowingSource,
376
+ /**
377
+ * Estimated row height in pixels before measurement.
378
+ */
379
+ estimated_item_height?: number,
380
+ /**
381
+ * Screens of overscan kept mounted on either side.
382
+ */
383
+ overscan_screens?: number, };
@@ -1,31 +1,5 @@
1
1
  // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
2
 
3
- /**
4
- * Dashboard layout — a collection of views arranged in a grid.
5
- */
6
- export type DashboardLayout = {
7
- /**
8
- * Workspace ID this dashboard belongs to.
9
- */
10
- workspace_id: string,
11
- /**
12
- * Dashboard name.
13
- */
14
- name: string,
15
- /**
16
- * All view instances in this dashboard.
17
- */
18
- views: Array<ViewInstance>,
19
- /**
20
- * Grid columns count (0 = auto).
21
- */
22
- grid_columns: number, };
23
-
24
- /**
25
- * Push a dashboard layout update to connected clients.
26
- */
27
- export type DashboardLayoutPushParams = { layout: DashboardLayout, };
28
-
29
3
  /**
30
4
  * A widget inside a webui dashboard descriptor (P3#A4).
31
5
  *
@@ -63,54 +37,6 @@ config?: Record<string, unknown>,
63
37
  */
64
38
  data?: Record<string, unknown>, };
65
39
 
66
- /**
67
- * View data update — incremental data push for a specific view.
68
- */
69
- export type ViewDataPushParams = {
70
- /**
71
- * Target view ID.
72
- */
73
- view_id: string,
74
- /**
75
- * Data payload (format depends on ViewKind).
76
- */
77
- data: Record<string, unknown>,
78
- /**
79
- * Whether this is a full replacement or incremental update.
80
- */
81
- full_replace: boolean, };
82
-
83
- /**
84
- * A view instance — one panel in the dashboard.
85
- */
86
- export type ViewInstance = {
87
- /**
88
- * Unique view ID within the workspace.
89
- */
90
- view_id: string,
91
- /**
92
- * What kind of renderer to use.
93
- */
94
- kind: ViewKind,
95
- /**
96
- * Display title.
97
- */
98
- title: string,
99
- /**
100
- * Data source identifier — what the view is bound to.
101
- * Examples: "industrial:station:19", "chat:conversation:abc",
102
- * "kanban:project:xyz", "media:flow:comfyui"
103
- */
104
- data_source: string,
105
- /**
106
- * View-specific configuration (JSON, interpreted by the renderer).
107
- */
108
- config: Record<string, unknown>,
109
- /**
110
- * Layout position (grid area, tab order, etc.).
111
- */
112
- layout?: ViewLayout, };
113
-
114
40
  /**
115
41
  * Widget create/update/delete on an existing layout (P3#A4).
116
42
  */
@@ -127,37 +53,3 @@ op: string,
127
53
  * Widget descriptor to create/update (ignored for delete).
128
54
  */
129
55
  widget: DashboardWidget, };
130
-
131
- /**
132
- * View type identifier — determines which frontend renderer handles the view.
133
- */
134
- export type ViewKind = "industrial_scada" | "chat" | "kanban" | "gantt" | "data_table" | "media_flow" | "file_explorer" | "custom";
135
-
136
- /**
137
- * Layout descriptor for a view within the dashboard grid.
138
- */
139
- export type ViewLayout = {
140
- /**
141
- * Grid column start (1-based).
142
- */
143
- col: number,
144
- /**
145
- * Grid row start (1-based).
146
- */
147
- row: number,
148
- /**
149
- * Column span.
150
- */
151
- col_span: number,
152
- /**
153
- * Row span.
154
- */
155
- row_span: number,
156
- /**
157
- * Minimum width in pixels.
158
- */
159
- min_width?: number,
160
- /**
161
- * Minimum height in pixels.
162
- */
163
- min_height?: number, };
package/index.ts CHANGED
@@ -59,6 +59,7 @@ export * from "./bindings/ws/stateSync";
59
59
  export * from "./bindings/ws/systemUi";
60
60
  export * from "./bindings/ws/tasks";
61
61
  export * from "./bindings/ws/views";
62
+ export * from "./bindings/ws/viewTemplate";
62
63
  export * from "./bindings/ws/workspace";
63
64
  export * from "./bindings/ws/yolo";
64
65
  export type { AnomalyDetectParams, AnomalyInfo, AnomalyResult, CausalReasonParams, CausalReasonResult, CorrelationInfo, Hypothesis, LlmChatParams, LlmChatResult, MediaAssetItem, MediaAssetRegisterResult, MediaAssetRetrieveResult, RagDbDeleteParams, RagDbDeleteResult, RagDbReadParams, RagDbReadResult, RagDbStatsParams, RagDbStatsResult, RagDbWriteParams, RagDbWriteResult, RagDocResult, TranslateReportParams, TranslateReportResult, WorkspaceIndexParams, WorkspaceIndexResult, WorkspaceSearchDoc, WorkspaceSearchParams, WorkspaceSearchResult, WorkspaceStatusResult } from "./bindings/tools/aporia";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celestia-island/plana-types",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/celestia-island/plana"