@netnodeag/kraftwerk 0.81.0 → 0.83.0
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/README.md +227 -0
- package/dist/cli/boards.d.ts +2 -0
- package/dist/cli/boards.js +486 -0
- package/dist/cli/init.js +2 -0
- package/dist/cli/kraftwerk.js +6 -0
- package/dist/cli/presentations.d.ts +2 -0
- package/dist/cli/presentations.js +261 -0
- package/dist/client/routes.d.ts +32 -0
- package/dist/client/routes.js +32 -0
- package/dist/config.d.ts +35 -0
- package/dist/config.js +33 -2
- package/dist/core/attention.d.ts +2 -2
- package/dist/core/attention.js +22 -2
- package/dist/core/board-wake.d.ts +21 -0
- package/dist/core/board-wake.js +221 -0
- package/dist/core/boards.d.ts +269 -0
- package/dist/core/boards.js +969 -0
- package/dist/core/chat/acp.d.ts +1 -1
- package/dist/core/chat/acp.js +2 -1
- package/dist/core/chat/backend.d.ts +11 -0
- package/dist/core/chat/backend.js +9 -1
- package/dist/core/chat/context.js +25 -4
- package/dist/core/chat/pi.d.ts +1 -1
- package/dist/core/chat/pi.js +2 -1
- package/dist/core/chat/seats.js +3 -2
- package/dist/core/chat/sessions.d.ts +2 -0
- package/dist/core/chat/sessions.js +1 -0
- package/dist/core/chat/state.js +1 -1
- package/dist/core/chat/types.d.ts +11 -1
- package/dist/core/files.d.ts +1 -1
- package/dist/core/files.js +19 -1
- package/dist/core/git.js +5 -1
- package/dist/core/notifications.d.ts +1 -1
- package/dist/core/presentations/browser.d.ts +43 -0
- package/dist/core/presentations/browser.js +53 -0
- package/dist/core/presentations/builtin.d.ts +3 -0
- package/dist/core/presentations/builtin.js +142 -0
- package/dist/core/presentations/chart.d.ts +34 -0
- package/dist/core/presentations/chart.js +159 -0
- package/dist/core/presentations/deck.d.ts +63 -0
- package/dist/core/presentations/deck.js +198 -0
- package/dist/core/presentations/export.d.ts +21 -0
- package/dist/core/presentations/export.js +75 -0
- package/dist/core/presentations/html.d.ts +135 -0
- package/dist/core/presentations/html.js +389 -0
- package/dist/core/presentations/index.d.ts +252 -0
- package/dist/core/presentations/index.js +753 -0
- package/dist/core/presentations/layout.d.ts +47 -0
- package/dist/core/presentations/layout.js +147 -0
- package/dist/core/presentations/markdown.d.ts +49 -0
- package/dist/core/presentations/markdown.js +158 -0
- package/dist/core/presentations/merge.d.ts +26 -0
- package/dist/core/presentations/merge.js +28 -0
- package/dist/core/presentations/presence.d.ts +31 -0
- package/dist/core/presentations/presence.js +131 -0
- package/dist/core/presentations/render.d.ts +33 -0
- package/dist/core/presentations/render.js +318 -0
- package/dist/core/presentations/slots.d.ts +33 -0
- package/dist/core/presentations/slots.js +114 -0
- package/dist/core/presentations/template.d.ts +253 -0
- package/dist/core/presentations/template.js +141 -0
- package/dist/core/presentations/versions.d.ts +30 -0
- package/dist/core/presentations/versions.js +75 -0
- package/dist/core/refs.d.ts +1 -1
- package/dist/core/refs.js +33 -1
- package/dist/core/search.d.ts +22 -0
- package/dist/core/search.js +25 -0
- package/dist/core/settings.d.ts +4 -0
- package/dist/core/settings.js +24 -1
- package/dist/core/trash.d.ts +1 -1
- package/dist/server/api/boards.d.ts +105 -0
- package/dist/server/api/boards.js +160 -0
- package/dist/server/api/chats.d.ts +2 -0
- package/dist/server/api/chats.js +9 -3
- package/dist/server/api/index.d.ts +167 -3
- package/dist/server/api/index.js +4 -0
- package/dist/server/api/presentations.d.ts +66 -0
- package/dist/server/api/presentations.js +185 -0
- package/dist/server/api/socket.js +24 -1
- package/dist/server/api/workspace.d.ts +10 -0
- package/dist/server/api/workspace.js +4 -0
- package/dist/server/push.js +1 -1
- package/dist/server/server.js +3 -0
- package/package.json +6 -2
- package/schema/kraftwerk.schema.json +57 -0
- package/web/dist/assets/{dist-Ba6WSVOB.js → dist-5-ibIscm.js} +1 -1
- package/web/dist/assets/{dist-ENZYo2jZ.js → dist-5lgY5B-M.js} +1 -1
- package/web/dist/assets/{dist-BiU4F98O.js → dist-BJaPgnhj.js} +1 -1
- package/web/dist/assets/{dist-Dy1SvhKC.js → dist-Bar1_NBq.js} +1 -1
- package/web/dist/assets/{dist-AhnSw4hy.js → dist-BxCxboU8.js} +1 -1
- package/web/dist/assets/dist-CDitSY16.js +1 -0
- package/web/dist/assets/{dist-FfKYtQxT.js → dist-CRXT8IL6.js} +1 -1
- package/web/dist/assets/{dist-BK0VhAPQ.js → dist-CXRjiHpl.js} +1 -1
- package/web/dist/assets/{dist-Dx3aajX1.js → dist-CpnB7MfK.js} +1 -1
- package/web/dist/assets/{dist-8IOFzZx-.js → dist-D1VK1YdB.js} +1 -1
- package/web/dist/assets/{dist-cewmjxFi.js → dist-D52LvyO8.js} +1 -1
- package/web/dist/assets/{editor-CZMrhTTL.css → editor-C0_Snnzk.css} +1 -1
- package/web/dist/assets/{editor-CaRa1NMC.js → editor-HCNTXWWs.js} +3 -3
- package/web/dist/assets/index-Dnlu16AL.css +2 -0
- package/web/dist/assets/index-kwWnQOhD.js +473 -0
- package/web/dist/index.html +2 -2
- package/web/dist/assets/dist-lgUK2Fjt.js +0 -1
- package/web/dist/assets/index-Dpzux3OC.js +0 -231
- package/web/dist/assets/index-Dvt-vE1h.css +0 -2
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export { SLOT_KINDS, CANVAS, BASE_COLORS, PPI, STAGE_W, layoutFor, defaultSlotOf, resolveColor, resolveFont, slideSlots, templateColors, type SlotKind, type SlotPatch } from "./layout.js";
|
|
3
|
+
declare const Slot: z.ZodObject<{
|
|
4
|
+
x: z.ZodNumber;
|
|
5
|
+
y: z.ZodNumber;
|
|
6
|
+
w: z.ZodNumber;
|
|
7
|
+
h: z.ZodNumber;
|
|
8
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
9
|
+
chart: "chart";
|
|
10
|
+
embed: "embed";
|
|
11
|
+
html: "html";
|
|
12
|
+
image: "image";
|
|
13
|
+
markdown: "markdown";
|
|
14
|
+
table: "table";
|
|
15
|
+
text: "text";
|
|
16
|
+
}>>;
|
|
17
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
color: z.ZodOptional<z.ZodString>;
|
|
21
|
+
font: z.ZodOptional<z.ZodString>;
|
|
22
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
center: "center";
|
|
24
|
+
left: "left";
|
|
25
|
+
right: "right";
|
|
26
|
+
}>>;
|
|
27
|
+
valign: z.ZodOptional<z.ZodEnum<{
|
|
28
|
+
bottom: "bottom";
|
|
29
|
+
middle: "middle";
|
|
30
|
+
top: "top";
|
|
31
|
+
}>>;
|
|
32
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
33
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
35
|
+
class: z.ZodOptional<z.ZodString>;
|
|
36
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
strike: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
rotate: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
radius: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
border: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
borderColor: z.ZodOptional<z.ZodString>;
|
|
42
|
+
shadow: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
z: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
fit: z.ZodOptional<z.ZodEnum<{
|
|
46
|
+
contain: "contain";
|
|
47
|
+
cover: "cover";
|
|
48
|
+
}>>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export type SlotDef = z.output<typeof Slot>;
|
|
51
|
+
declare const Shape: z.ZodObject<{
|
|
52
|
+
x: z.ZodNumber;
|
|
53
|
+
y: z.ZodNumber;
|
|
54
|
+
w: z.ZodNumber;
|
|
55
|
+
h: z.ZodNumber;
|
|
56
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
57
|
+
line: "line";
|
|
58
|
+
rect: "rect";
|
|
59
|
+
}>>;
|
|
60
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
61
|
+
color: z.ZodOptional<z.ZodString>;
|
|
62
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
export type ShapeDef = z.output<typeof Shape>;
|
|
65
|
+
declare const Layout: z.ZodObject<{
|
|
66
|
+
background: z.ZodOptional<z.ZodString>;
|
|
67
|
+
shapes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
68
|
+
x: z.ZodNumber;
|
|
69
|
+
y: z.ZodNumber;
|
|
70
|
+
w: z.ZodNumber;
|
|
71
|
+
h: z.ZodNumber;
|
|
72
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
73
|
+
line: "line";
|
|
74
|
+
rect: "rect";
|
|
75
|
+
}>>;
|
|
76
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
77
|
+
color: z.ZodOptional<z.ZodString>;
|
|
78
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
}, z.core.$strip>>>;
|
|
80
|
+
slots: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
81
|
+
x: z.ZodNumber;
|
|
82
|
+
y: z.ZodNumber;
|
|
83
|
+
w: z.ZodNumber;
|
|
84
|
+
h: z.ZodNumber;
|
|
85
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
86
|
+
chart: "chart";
|
|
87
|
+
embed: "embed";
|
|
88
|
+
html: "html";
|
|
89
|
+
image: "image";
|
|
90
|
+
markdown: "markdown";
|
|
91
|
+
table: "table";
|
|
92
|
+
text: "text";
|
|
93
|
+
}>>;
|
|
94
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
97
|
+
color: z.ZodOptional<z.ZodString>;
|
|
98
|
+
font: z.ZodOptional<z.ZodString>;
|
|
99
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
100
|
+
center: "center";
|
|
101
|
+
left: "left";
|
|
102
|
+
right: "right";
|
|
103
|
+
}>>;
|
|
104
|
+
valign: z.ZodOptional<z.ZodEnum<{
|
|
105
|
+
bottom: "bottom";
|
|
106
|
+
middle: "middle";
|
|
107
|
+
top: "top";
|
|
108
|
+
}>>;
|
|
109
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
110
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
112
|
+
class: z.ZodOptional<z.ZodString>;
|
|
113
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
strike: z.ZodOptional<z.ZodBoolean>;
|
|
115
|
+
rotate: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
radius: z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
border: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
borderColor: z.ZodOptional<z.ZodString>;
|
|
119
|
+
shadow: z.ZodOptional<z.ZodBoolean>;
|
|
120
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
z: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
fit: z.ZodOptional<z.ZodEnum<{
|
|
123
|
+
contain: "contain";
|
|
124
|
+
cover: "cover";
|
|
125
|
+
}>>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
default: z.ZodOptional<z.ZodString>;
|
|
128
|
+
description: z.ZodOptional<z.ZodString>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
export type LayoutDef = z.output<typeof Layout>;
|
|
131
|
+
export declare const TemplateSchema: z.ZodObject<{
|
|
132
|
+
name: z.ZodString;
|
|
133
|
+
size: z.ZodDefault<z.ZodEnum<{
|
|
134
|
+
"16:9": "16:9";
|
|
135
|
+
"4:3": "4:3";
|
|
136
|
+
}>>;
|
|
137
|
+
fonts: z.ZodDefault<z.ZodObject<{
|
|
138
|
+
heading: z.ZodDefault<z.ZodString>;
|
|
139
|
+
body: z.ZodDefault<z.ZodString>;
|
|
140
|
+
}, z.core.$strip>>;
|
|
141
|
+
colors: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
142
|
+
layouts: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
143
|
+
background: z.ZodOptional<z.ZodString>;
|
|
144
|
+
shapes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
145
|
+
x: z.ZodNumber;
|
|
146
|
+
y: z.ZodNumber;
|
|
147
|
+
w: z.ZodNumber;
|
|
148
|
+
h: z.ZodNumber;
|
|
149
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
150
|
+
line: "line";
|
|
151
|
+
rect: "rect";
|
|
152
|
+
}>>;
|
|
153
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
154
|
+
color: z.ZodOptional<z.ZodString>;
|
|
155
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
}, z.core.$strip>>>;
|
|
157
|
+
slots: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
158
|
+
x: z.ZodNumber;
|
|
159
|
+
y: z.ZodNumber;
|
|
160
|
+
w: z.ZodNumber;
|
|
161
|
+
h: z.ZodNumber;
|
|
162
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
163
|
+
chart: "chart";
|
|
164
|
+
embed: "embed";
|
|
165
|
+
html: "html";
|
|
166
|
+
image: "image";
|
|
167
|
+
markdown: "markdown";
|
|
168
|
+
table: "table";
|
|
169
|
+
text: "text";
|
|
170
|
+
}>>;
|
|
171
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
174
|
+
color: z.ZodOptional<z.ZodString>;
|
|
175
|
+
font: z.ZodOptional<z.ZodString>;
|
|
176
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
center: "center";
|
|
178
|
+
left: "left";
|
|
179
|
+
right: "right";
|
|
180
|
+
}>>;
|
|
181
|
+
valign: z.ZodOptional<z.ZodEnum<{
|
|
182
|
+
bottom: "bottom";
|
|
183
|
+
middle: "middle";
|
|
184
|
+
top: "top";
|
|
185
|
+
}>>;
|
|
186
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
187
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
188
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
189
|
+
class: z.ZodOptional<z.ZodString>;
|
|
190
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
191
|
+
strike: z.ZodOptional<z.ZodBoolean>;
|
|
192
|
+
rotate: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
radius: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
border: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
borderColor: z.ZodOptional<z.ZodString>;
|
|
196
|
+
shadow: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
198
|
+
z: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
fit: z.ZodOptional<z.ZodEnum<{
|
|
200
|
+
contain: "contain";
|
|
201
|
+
cover: "cover";
|
|
202
|
+
}>>;
|
|
203
|
+
}, z.core.$strip>>;
|
|
204
|
+
default: z.ZodOptional<z.ZodString>;
|
|
205
|
+
description: z.ZodOptional<z.ZodString>;
|
|
206
|
+
}, z.core.$strip>>;
|
|
207
|
+
default: z.ZodOptional<z.ZodString>;
|
|
208
|
+
css: z.ZodOptional<z.ZodString>;
|
|
209
|
+
snippets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
210
|
+
name: z.ZodString;
|
|
211
|
+
description: z.ZodOptional<z.ZodString>;
|
|
212
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
213
|
+
html: "html";
|
|
214
|
+
markdown: "markdown";
|
|
215
|
+
}>>;
|
|
216
|
+
content: z.ZodString;
|
|
217
|
+
w: z.ZodDefault<z.ZodNumber>;
|
|
218
|
+
h: z.ZodDefault<z.ZodNumber>;
|
|
219
|
+
}, z.core.$strip>>>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
export type TemplateDef = z.output<typeof TemplateSchema>;
|
|
222
|
+
export type Snippet = TemplateDef["snippets"][number];
|
|
223
|
+
export interface Template extends TemplateDef {
|
|
224
|
+
slug: string;
|
|
225
|
+
/** The file it came from; absent for the built-in one. */
|
|
226
|
+
path?: string;
|
|
227
|
+
builtin?: boolean;
|
|
228
|
+
/** The theme stylesheet's text, as read (its relative URLs point into the template folder). */
|
|
229
|
+
cssText?: string;
|
|
230
|
+
}
|
|
231
|
+
export { DEFAULT_TEMPLATE, DEFAULT_CSS } from "./builtin.js";
|
|
232
|
+
export declare const TEMPLATES_DIR = "templates";
|
|
233
|
+
export declare const TEMPLATE_FILE = "template.yml";
|
|
234
|
+
/** Parse a template.yml's text. Throws with the field that is wrong. */
|
|
235
|
+
export declare function parseTemplate(slug: string, raw: string, file?: string): Template;
|
|
236
|
+
export interface TemplateSummary {
|
|
237
|
+
slug: string;
|
|
238
|
+
name: string;
|
|
239
|
+
size: "16:9" | "4:3";
|
|
240
|
+
layouts: string[];
|
|
241
|
+
builtin?: boolean;
|
|
242
|
+
path?: string;
|
|
243
|
+
/** Set when the file exists but cannot be used. */
|
|
244
|
+
error?: string;
|
|
245
|
+
}
|
|
246
|
+
/** The workspace's templates (templates/<slug>/template.yml under the root), unusable ones with their error. */
|
|
247
|
+
export declare function loadWorkspaceTemplates(root: string): Promise<{
|
|
248
|
+
templates: Template[];
|
|
249
|
+
errors: TemplateSummary[];
|
|
250
|
+
}>;
|
|
251
|
+
export declare const templateSummary: (t: Template) => TemplateSummary;
|
|
252
|
+
/** The YAML of the built-in template, for `presentations templates init` and the docs. */
|
|
253
|
+
export declare function defaultTemplateYaml(): string;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { promises as fs } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { parse, stringify } from "yaml";
|
|
4
|
+
import * as z from "zod";
|
|
5
|
+
import { SLUG_RE } from "../slug.js";
|
|
6
|
+
/**
|
|
7
|
+
* The template engine: a template names the canvas, the fonts and the
|
|
8
|
+
* colors, and defines layouts — each a set of named slots placed on the
|
|
9
|
+
* canvas in inches, plus decorative shapes behind them. A slide picks a
|
|
10
|
+
* layout and fills its slots with markdown; the renderer draws exactly
|
|
11
|
+
* what the layout says. One template (`default`) is built in; a workspace
|
|
12
|
+
* adds its own as `templates/<slug>/template.yml` under the presentations
|
|
13
|
+
* root with the same schema, and agents can write those too.
|
|
14
|
+
*/
|
|
15
|
+
import { SLOT_KINDS, CANVAS } from "./layout.js";
|
|
16
|
+
export { SLOT_KINDS, CANVAS, BASE_COLORS, PPI, STAGE_W, layoutFor, defaultSlotOf, resolveColor, resolveFont, slideSlots, templateColors } from "./layout.js";
|
|
17
|
+
const Color = z.string().min(1);
|
|
18
|
+
const Box = { x: z.number(), y: z.number(), w: z.number().positive(), h: z.number().positive() };
|
|
19
|
+
const Slot = z.object({
|
|
20
|
+
kind: z.enum(SLOT_KINDS).default("markdown"),
|
|
21
|
+
...Box,
|
|
22
|
+
/** Font size in points (text, markdown, table cells). */
|
|
23
|
+
size: z.number().positive().optional(),
|
|
24
|
+
bold: z.boolean().optional(),
|
|
25
|
+
italic: z.boolean().optional(),
|
|
26
|
+
/** A color name of the template (text, accent, …) or #hex. */
|
|
27
|
+
color: Color.optional(),
|
|
28
|
+
/** `heading`, `body` or a font family name. */
|
|
29
|
+
font: z.string().optional(),
|
|
30
|
+
align: z.enum(["left", "center", "right"]).optional(),
|
|
31
|
+
valign: z.enum(["top", "middle", "bottom"]).optional(),
|
|
32
|
+
/** The box's own background (a color name or #hex). */
|
|
33
|
+
fill: Color.optional(),
|
|
34
|
+
/** A slide using the layout must fill it; the check reports it otherwise. */
|
|
35
|
+
required: z.boolean().optional(),
|
|
36
|
+
/** What the slot shows when empty (the renderer leaves it out; the editor hints it). */
|
|
37
|
+
placeholder: z.string().optional(),
|
|
38
|
+
/** CSS classes of the slot's box in the HTML render (the theme styles them: `eyebrow`, `statement`, …). */
|
|
39
|
+
class: z.string().optional(),
|
|
40
|
+
underline: z.boolean().optional(),
|
|
41
|
+
strike: z.boolean().optional(),
|
|
42
|
+
/** Degrees, clockwise. */
|
|
43
|
+
rotate: z.number().optional(),
|
|
44
|
+
/** Corner radius in points. */
|
|
45
|
+
radius: z.number().min(0).optional(),
|
|
46
|
+
/** Border width in points, and its color (a name of the template or #hex). */
|
|
47
|
+
border: z.number().min(0).optional(),
|
|
48
|
+
borderColor: Color.optional(),
|
|
49
|
+
shadow: z.boolean().optional(),
|
|
50
|
+
/** 0 to 1. */
|
|
51
|
+
opacity: z.number().min(0).max(1).optional(),
|
|
52
|
+
/** Stacking: higher is in front. Default: the order of the slots. */
|
|
53
|
+
z: z.number().optional(),
|
|
54
|
+
/** A picture: `contain` (default) or `cover` the box. */
|
|
55
|
+
fit: z.enum(["contain", "cover"]).optional(),
|
|
56
|
+
});
|
|
57
|
+
const Shape = z.object({
|
|
58
|
+
kind: z.enum(["rect", "line"]).default("rect"),
|
|
59
|
+
...Box,
|
|
60
|
+
fill: Color.optional(),
|
|
61
|
+
color: Color.optional(),
|
|
62
|
+
/** Line width in points. */
|
|
63
|
+
width: z.number().positive().optional(),
|
|
64
|
+
});
|
|
65
|
+
const Layout = z.object({
|
|
66
|
+
/** The slide background (a color name or #hex); the template's `background` otherwise. */
|
|
67
|
+
background: Color.optional(),
|
|
68
|
+
shapes: z.array(Shape).default([]),
|
|
69
|
+
slots: z.record(z.string().regex(/^[a-z][a-z0-9_-]*$/i), Slot),
|
|
70
|
+
/** The slot the slide's unmarked content goes into; the first markdown slot otherwise. */
|
|
71
|
+
default: z.string().optional(),
|
|
72
|
+
/** What the layout is for, shown in the editor's layout picker. */
|
|
73
|
+
description: z.string().optional(),
|
|
74
|
+
});
|
|
75
|
+
export const TemplateSchema = z.object({
|
|
76
|
+
name: z.string().min(1),
|
|
77
|
+
size: z.enum(["16:9", "4:3"]).default("16:9"),
|
|
78
|
+
fonts: z.object({ heading: z.string().default("Calibri"), body: z.string().default("Calibri") }).default({ heading: "Calibri", body: "Calibri" }),
|
|
79
|
+
colors: z.record(z.string(), Color).default({}),
|
|
80
|
+
layouts: z.record(z.string().regex(/^[a-z][a-z0-9-]*$/), Layout),
|
|
81
|
+
/** The layout of a slide that names none. Default: `content` when it exists, else the first. */
|
|
82
|
+
default: z.string().optional(),
|
|
83
|
+
/** The theme stylesheet, relative to the template folder (default: theme.css when it exists). It styles the HTML slides; fonts and pictures it names sit beside it. */
|
|
84
|
+
css: z.string().optional(),
|
|
85
|
+
/** Ready-made pieces for the editor's insert menu: cards, figures, a flow — HTML (or markdown) that the theme styles. */
|
|
86
|
+
snippets: z.array(z.object({ name: z.string().min(1), description: z.string().optional(), kind: z.enum(["html", "markdown"]).default("html"), content: z.string(), w: z.number().positive().default(8), h: z.number().positive().default(2.4) })).default([]),
|
|
87
|
+
});
|
|
88
|
+
export { DEFAULT_TEMPLATE, DEFAULT_CSS } from "./builtin.js";
|
|
89
|
+
import { DEFAULT_TEMPLATE } from "./builtin.js";
|
|
90
|
+
export const TEMPLATES_DIR = "templates";
|
|
91
|
+
export const TEMPLATE_FILE = "template.yml";
|
|
92
|
+
/** Parse a template.yml's text. Throws with the field that is wrong. */
|
|
93
|
+
export function parseTemplate(slug, raw, file) {
|
|
94
|
+
const data = parse(raw);
|
|
95
|
+
const r = TemplateSchema.safeParse(data);
|
|
96
|
+
if (!r.success)
|
|
97
|
+
throw new Error(`${file ?? slug}: ${z.prettifyError(r.error)}`);
|
|
98
|
+
for (const [name, layout] of Object.entries(r.data.layouts)) {
|
|
99
|
+
if (layout.default && !layout.slots[layout.default])
|
|
100
|
+
throw new Error(`${file ?? slug}: layout "${name}" names default slot "${layout.default}" which it does not define`);
|
|
101
|
+
}
|
|
102
|
+
if (r.data.default && !r.data.layouts[r.data.default])
|
|
103
|
+
throw new Error(`${file ?? slug}: default layout "${r.data.default}" is not defined`);
|
|
104
|
+
return { ...r.data, slug, ...(file ? { path: file } : {}) };
|
|
105
|
+
}
|
|
106
|
+
/** The workspace's templates (templates/<slug>/template.yml under the root), unusable ones with their error. */
|
|
107
|
+
export async function loadWorkspaceTemplates(root) {
|
|
108
|
+
const dir = path.join(root, TEMPLATES_DIR);
|
|
109
|
+
const entries = await fs.readdir(dir, { withFileTypes: true }).catch(() => []);
|
|
110
|
+
const templates = [];
|
|
111
|
+
const errors = [];
|
|
112
|
+
for (const e of entries) {
|
|
113
|
+
if (!e.isDirectory() || !SLUG_RE.test(e.name))
|
|
114
|
+
continue;
|
|
115
|
+
const file = path.join(dir, e.name, TEMPLATE_FILE);
|
|
116
|
+
const raw = await fs.readFile(file, "utf8").catch(() => null);
|
|
117
|
+
if (raw === null)
|
|
118
|
+
continue;
|
|
119
|
+
try {
|
|
120
|
+
const t = parseTemplate(e.name, raw, file);
|
|
121
|
+
const css = await fs.readFile(path.join(dir, e.name, t.css ?? "theme.css"), "utf8").catch(() => null);
|
|
122
|
+
if (css !== null)
|
|
123
|
+
t.cssText = css;
|
|
124
|
+
else if (t.css)
|
|
125
|
+
throw new Error(`${file}: css "${t.css}" does not exist`);
|
|
126
|
+
templates.push(t);
|
|
127
|
+
}
|
|
128
|
+
catch (err) {
|
|
129
|
+
errors.push({ slug: e.name, name: e.name, size: "16:9", layouts: [], path: file, error: err.message });
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
templates.sort((a, b) => a.slug.localeCompare(b.slug));
|
|
133
|
+
return { templates, errors };
|
|
134
|
+
}
|
|
135
|
+
export const templateSummary = (t) => ({ slug: t.slug, name: t.name, size: t.size, layouts: Object.keys(t.layouts), ...(t.builtin ? { builtin: true } : {}), ...(t.path ? { path: t.path } : {}) });
|
|
136
|
+
/** The YAML of the built-in template, for `presentations templates init` and the docs. */
|
|
137
|
+
export function defaultTemplateYaml() {
|
|
138
|
+
const { slug: _s, builtin: _b, path: _p, cssText: _c, ...def } = DEFAULT_TEMPLATE;
|
|
139
|
+
// A readable file: the layouts keep their key order; zod defaults are written out so the file is complete.
|
|
140
|
+
return `# A kraftwerk presentation template — copy of the built-in "default".\n# Positions are inches on a ${def.size} canvas (${CANVAS[def.size].w} x ${CANVAS[def.size].h}); colors are names from \`colors\` or #hex.\n${stringify(def)}`;
|
|
141
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type DeckDoc } from "./deck.js";
|
|
2
|
+
/**
|
|
3
|
+
* Earlier versions of a deck, like a document's version history: copies
|
|
4
|
+
* of deck.md in the deck's `.history/` folder, taken before a save
|
|
5
|
+
* replaces it (the editor's saves at most once a minute — it saves while
|
|
6
|
+
* you type) and whenever deck.md changed on disk (an agent, the CLI,
|
|
7
|
+
* another tool). The newest KEEP stay. Works whether or not the
|
|
8
|
+
* workspace commits to git.
|
|
9
|
+
*/
|
|
10
|
+
export declare const HISTORY_DIR = ".history";
|
|
11
|
+
export declare const KEEP = 50;
|
|
12
|
+
export interface DeckVersion {
|
|
13
|
+
id: string;
|
|
14
|
+
at: string;
|
|
15
|
+
title: string;
|
|
16
|
+
slides: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Keep `raw` (the deck as it was) as a version. Skipped when it equals the
|
|
20
|
+
* newest version, and — unless `force` — when the newest is under a minute
|
|
21
|
+
* old (a burst of saves while typing is one version).
|
|
22
|
+
*/
|
|
23
|
+
export declare function snapshot(dir: string, raw: string, force?: boolean): Promise<void>;
|
|
24
|
+
export declare function listVersions(dir: string): Promise<DeckVersion[]>;
|
|
25
|
+
export declare function readVersion(dir: string, id: string): Promise<{
|
|
26
|
+
id: string;
|
|
27
|
+
at: string;
|
|
28
|
+
source: string;
|
|
29
|
+
deck: DeckDoc;
|
|
30
|
+
}>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { promises as fs } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { parseDeck } from "./deck.js";
|
|
4
|
+
/**
|
|
5
|
+
* Earlier versions of a deck, like a document's version history: copies
|
|
6
|
+
* of deck.md in the deck's `.history/` folder, taken before a save
|
|
7
|
+
* replaces it (the editor's saves at most once a minute — it saves while
|
|
8
|
+
* you type) and whenever deck.md changed on disk (an agent, the CLI,
|
|
9
|
+
* another tool). The newest KEEP stay. Works whether or not the
|
|
10
|
+
* workspace commits to git.
|
|
11
|
+
*/
|
|
12
|
+
export const HISTORY_DIR = ".history";
|
|
13
|
+
export const KEEP = 50;
|
|
14
|
+
const THROTTLE_MS = 60_000;
|
|
15
|
+
const ID_RE = /^\d{8}T\d{6}(\d{3})?Z(-\d+)?$/;
|
|
16
|
+
const idOf = (d) => d.toISOString().replace(/[-:]/g, "").replace(/\.(\d{3})Z$/, "$1Z");
|
|
17
|
+
const atOf = (id) => {
|
|
18
|
+
const m = /^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(\d{3})?Z/.exec(id);
|
|
19
|
+
return m ? `${m[1]}-${m[2]}-${m[3]}T${m[4]}:${m[5]}:${m[6]}.${m[7] ?? "000"}Z` : id;
|
|
20
|
+
};
|
|
21
|
+
async function ids(dir) {
|
|
22
|
+
const files = await fs.readdir(path.join(dir, HISTORY_DIR)).catch(() => []);
|
|
23
|
+
return files.filter((f) => f.endsWith(".md") && ID_RE.test(f.slice(0, -3))).map((f) => f.slice(0, -3)).sort().reverse();
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Keep `raw` (the deck as it was) as a version. Skipped when it equals the
|
|
27
|
+
* newest version, and — unless `force` — when the newest is under a minute
|
|
28
|
+
* old (a burst of saves while typing is one version).
|
|
29
|
+
*/
|
|
30
|
+
export async function snapshot(dir, raw, force = false) {
|
|
31
|
+
if (!raw.trim())
|
|
32
|
+
return;
|
|
33
|
+
const have = await ids(dir);
|
|
34
|
+
const newest = have[0];
|
|
35
|
+
if (newest) {
|
|
36
|
+
const last = await fs.readFile(path.join(dir, HISTORY_DIR, `${newest}.md`), "utf8").catch(() => null);
|
|
37
|
+
if (last === raw)
|
|
38
|
+
return;
|
|
39
|
+
if (!force && Date.now() - Date.parse(atOf(newest)) < THROTTLE_MS)
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
await fs.mkdir(path.join(dir, HISTORY_DIR), { recursive: true });
|
|
43
|
+
let id = idOf(new Date());
|
|
44
|
+
for (let n = 2; have.includes(id); n++)
|
|
45
|
+
id = `${idOf(new Date())}-${n}`;
|
|
46
|
+
await fs.writeFile(path.join(dir, HISTORY_DIR, `${id}.md`), raw);
|
|
47
|
+
for (const old of [id, ...have].slice(KEEP))
|
|
48
|
+
await fs.rm(path.join(dir, HISTORY_DIR, `${old}.md`), { force: true });
|
|
49
|
+
}
|
|
50
|
+
export async function listVersions(dir) {
|
|
51
|
+
const out = [];
|
|
52
|
+
for (const id of await ids(dir)) {
|
|
53
|
+
const raw = await fs.readFile(path.join(dir, HISTORY_DIR, `${id}.md`), "utf8").catch(() => "");
|
|
54
|
+
let title = "";
|
|
55
|
+
let slides = 0;
|
|
56
|
+
try {
|
|
57
|
+
const d = parseDeck(raw);
|
|
58
|
+
title = d.title;
|
|
59
|
+
slides = d.slides.length;
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
title = "(cannot be read)";
|
|
63
|
+
}
|
|
64
|
+
out.push({ id, at: atOf(id), title, slides });
|
|
65
|
+
}
|
|
66
|
+
return out;
|
|
67
|
+
}
|
|
68
|
+
export async function readVersion(dir, id) {
|
|
69
|
+
if (!ID_RE.test(id))
|
|
70
|
+
throw new Error(`no version "${id}"`);
|
|
71
|
+
const source = await fs.readFile(path.join(dir, HISTORY_DIR, `${id}.md`), "utf8").catch(() => null);
|
|
72
|
+
if (source === null)
|
|
73
|
+
throw new Error(`no version "${id}"`);
|
|
74
|
+
return { id, at: atOf(id), source, deck: parseDeck(source) };
|
|
75
|
+
}
|
package/dist/core/refs.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* like never do. A target that does not exist is reported (found: false),
|
|
14
14
|
* never an error — the same rule project links have always followed.
|
|
15
15
|
*/
|
|
16
|
-
export declare const REF_KIND_NAMES: readonly ["knowledge", "vibeables", "repos", "workflows", "agents", "projects", "contacts", "places", "events"];
|
|
16
|
+
export declare const REF_KIND_NAMES: readonly ["knowledge", "vibeables", "repos", "workflows", "agents", "projects", "contacts", "places", "events", "boards", "tasks", "presentations"];
|
|
17
17
|
/** The kind's plural: the link-list name in project.yml and the folder/route name. */
|
|
18
18
|
export type RefKind = (typeof REF_KIND_NAMES)[number];
|
|
19
19
|
/** One existing target. */
|
package/dist/core/refs.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { listAgents } from "./agents.js";
|
|
2
2
|
import { CONTACTS, EVENTS, listEntities, PLACES } from "./entities.js";
|
|
3
|
+
import { boardKey, listAllBoards } from "./boards.js";
|
|
4
|
+
import { listAllDecks } from "./presentations/index.js";
|
|
3
5
|
import { knowledgeIndex } from "./knowledge.js";
|
|
4
6
|
import { listProjects } from "./projects.js";
|
|
5
7
|
import { listRepos } from "./repos.js";
|
|
@@ -20,7 +22,7 @@ import { listWorkflows } from "./workflows.js";
|
|
|
20
22
|
* like never do. A target that does not exist is reported (found: false),
|
|
21
23
|
* never an error — the same rule project links have always followed.
|
|
22
24
|
*/
|
|
23
|
-
export const REF_KIND_NAMES = ["knowledge", "vibeables", "repos", "workflows", "agents", "projects", "contacts", "places", "events"];
|
|
25
|
+
export const REF_KIND_NAMES = ["knowledge", "vibeables", "repos", "workflows", "agents", "projects", "contacts", "places", "events", "boards", "tasks", "presentations"];
|
|
24
26
|
/** A list that fails to read is an empty list: a reference into it is "not found", never an error. */
|
|
25
27
|
const safe = async (p, fallback) => p.catch(() => fallback);
|
|
26
28
|
export const REF_KINDS = [
|
|
@@ -80,7 +82,37 @@ export const REF_KINDS = [
|
|
|
80
82
|
noun: "event",
|
|
81
83
|
list: async () => (await safe(listEntities(EVENTS), { items: [] })).items.map((e) => ({ slug: e.slug, label: EVENTS.describe(e), href: `/events/${e.slug}` })),
|
|
82
84
|
},
|
|
85
|
+
{
|
|
86
|
+
kind: "boards",
|
|
87
|
+
token: "board",
|
|
88
|
+
noun: "board",
|
|
89
|
+
// A board's slug is unique within its project; across the workspace the first match wins and the label names where it is.
|
|
90
|
+
list: async () => (await safe(listAllBoards(), [])).map((b) => ({ slug: b.board, label: b.project ? `${b.title} · project ${b.project}` : b.title, href: boardHref(b) })),
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
kind: "tasks",
|
|
94
|
+
token: "task",
|
|
95
|
+
noun: "task",
|
|
96
|
+
list: async () => {
|
|
97
|
+
const { getBoard } = await import("./boards.js");
|
|
98
|
+
const out = [];
|
|
99
|
+
for (const b of await safe(listAllBoards(), [])) {
|
|
100
|
+
const detail = await safe(getBoard(b), null);
|
|
101
|
+
for (const t of detail?.items ?? [])
|
|
102
|
+
out.push({ slug: t.slug, label: `${t.title} · ${boardKey(b)} (${t.status})`, href: `${boardHref(b)}/${t.slug}` });
|
|
103
|
+
}
|
|
104
|
+
return out;
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
kind: "presentations",
|
|
109
|
+
token: "presentation",
|
|
110
|
+
noun: "presentation",
|
|
111
|
+
// A deck's name is unique within its project; across the workspace the first match wins and the label names where it is.
|
|
112
|
+
list: async () => (await safe(listAllDecks(), [])).map((d) => ({ slug: d.name, label: d.project ? `${d.title} · project ${d.project}` : d.title, href: d.project ? `/projects/${d.project}/presentations/${d.name}` : `/presentations/${d.name}` })),
|
|
113
|
+
},
|
|
83
114
|
];
|
|
115
|
+
const boardHref = (b) => (b.project ? `/projects/${b.project}/boards/${b.board}` : `/boards/${b.board}`);
|
|
84
116
|
const byKind = new Map(REF_KINDS.map((d) => [d.kind, d]));
|
|
85
117
|
const byToken = new Map(REF_KINDS.map((d) => [d.token, d]));
|
|
86
118
|
/** The kind registered under a plural name or a token; undefined for anything else. */
|
package/dist/core/search.d.ts
CHANGED
|
@@ -27,6 +27,28 @@ export interface WorkspaceAgents {
|
|
|
27
27
|
projects: ProjectHit[];
|
|
28
28
|
/** Contacts, places and events of this instance (the registry does not carry them); empty for other workspaces and while the features are off. */
|
|
29
29
|
entities: EntityHit[];
|
|
30
|
+
/** Open tasks of this instance's boards; empty for other workspaces and while boards are off. */
|
|
31
|
+
tasks: TaskHit[];
|
|
32
|
+
/** Decks of this instance; empty for other workspaces and while presentations are off. */
|
|
33
|
+
decks: DeckHit[];
|
|
34
|
+
}
|
|
35
|
+
/** What the palette needs of a presentation. */
|
|
36
|
+
export interface DeckHit {
|
|
37
|
+
name: string;
|
|
38
|
+
title: string;
|
|
39
|
+
project?: string;
|
|
40
|
+
slides: number;
|
|
41
|
+
href: string;
|
|
42
|
+
}
|
|
43
|
+
/** What the palette needs of a task. */
|
|
44
|
+
export interface TaskHit {
|
|
45
|
+
slug: string;
|
|
46
|
+
title: string;
|
|
47
|
+
board: string;
|
|
48
|
+
project?: string;
|
|
49
|
+
status: string;
|
|
50
|
+
/** Where it opens. */
|
|
51
|
+
href: string;
|
|
30
52
|
}
|
|
31
53
|
/** What the palette needs of a contact, place or event. */
|
|
32
54
|
export interface EntityHit {
|
package/dist/core/search.js
CHANGED
|
@@ -6,6 +6,27 @@ import { listChannels, toChannelSummary } from "./channels.js";
|
|
|
6
6
|
import { currentInstanceUrl, discoverWorkspaces, listWorkspaceRecords } from "./instances.js";
|
|
7
7
|
import { CONTACTS, EVENTS, listEntities, PLACES } from "./entities.js";
|
|
8
8
|
import { listProjects, toProjectHit } from "./projects.js";
|
|
9
|
+
import { getBoard, listAllBoards } from "./boards.js";
|
|
10
|
+
import { listAllDecks } from "./presentations/index.js";
|
|
11
|
+
async function deckHits() {
|
|
12
|
+
return (await listAllDecks().catch(() => [])).map((d) => ({ name: d.name, title: d.title, ...(d.project ? { project: d.project } : {}), slides: d.slides, href: d.project ? `/projects/${d.project}/presentations/${d.name}` : `/presentations/${d.name}` }));
|
|
13
|
+
}
|
|
14
|
+
async function taskHits() {
|
|
15
|
+
const out = [];
|
|
16
|
+
for (const b of await listAllBoards().catch(() => [])) {
|
|
17
|
+
const detail = await getBoard(b).catch(() => null);
|
|
18
|
+
if (!detail)
|
|
19
|
+
continue;
|
|
20
|
+
const done = new Set(detail.columns.filter((c) => c.done).map((c) => c.slug));
|
|
21
|
+
for (const t of detail.items) {
|
|
22
|
+
if (t.configError || done.has(t.status))
|
|
23
|
+
continue;
|
|
24
|
+
const base = b.project ? `/projects/${b.project}/boards/${b.board}` : `/boards/${b.board}`;
|
|
25
|
+
out.push({ slug: t.slug, title: t.title, board: b.board, ...(b.project ? { project: b.project } : {}), status: t.status, href: `${base}/${t.slug}` });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return out;
|
|
29
|
+
}
|
|
9
30
|
async function entityHits(def) {
|
|
10
31
|
const view = await listEntities(def).catch(() => ({ items: [] }));
|
|
11
32
|
return view.items
|
|
@@ -28,6 +49,8 @@ export async function searchAgents() {
|
|
|
28
49
|
channels: (await listChannels().catch(() => [])).map(toChannelSummary),
|
|
29
50
|
projects: (await listProjects().catch(() => ({ projects: [] }))).projects.filter((p) => p.status !== "archived").map(toProjectHit),
|
|
30
51
|
entities: (await Promise.all([CONTACTS, PLACES, EVENTS].map(entityHits))).flat(),
|
|
52
|
+
tasks: await taskHits(),
|
|
53
|
+
decks: await deckHits(),
|
|
31
54
|
};
|
|
32
55
|
const [workspaces, known] = await Promise.all([discoverWorkspaces(), listWorkspaceRecords()]);
|
|
33
56
|
const records = new Map(known.map((p) => [p.root, p]));
|
|
@@ -45,6 +68,8 @@ export async function searchAgents() {
|
|
|
45
68
|
channels: records.get(w.root)?.channels ?? [],
|
|
46
69
|
projects: records.get(w.root)?.projects ?? [],
|
|
47
70
|
entities: [],
|
|
71
|
+
tasks: [],
|
|
72
|
+
decks: [],
|
|
48
73
|
}));
|
|
49
74
|
return { workspaces: [self, ...others] };
|
|
50
75
|
}
|
package/dist/core/settings.d.ts
CHANGED
|
@@ -36,6 +36,10 @@ export interface SaveSettingsInput {
|
|
|
36
36
|
contacts?: ReposSettingsInput;
|
|
37
37
|
places?: ReposSettingsInput;
|
|
38
38
|
events?: ReposSettingsInput;
|
|
39
|
+
/** Omitted = untouched. Same shape and rules as repos (boards.columns in the file is kept). */
|
|
40
|
+
boards?: ReposSettingsInput;
|
|
41
|
+
/** Omitted = untouched. Same shape and rules as repos. */
|
|
42
|
+
presentations?: ReposSettingsInput;
|
|
39
43
|
}
|
|
40
44
|
export interface ReposSettingsInput {
|
|
41
45
|
enabled: boolean;
|