@deckflow/deckuse 1.0.1 → 1.1.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/LICENSE +662 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/bin.js +658 -228
- package/dist/bin.js.map +1 -1
- package/dist/edition.d.ts +11 -0
- package/dist/edition.d.ts.map +1 -0
- package/dist/edition.js +9 -0
- package/dist/edition.js.map +1 -0
- package/dist/help.d.ts +6 -0
- package/dist/help.d.ts.map +1 -0
- package/dist/help.js +575 -0
- package/dist/help.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/monitor.d.ts +24 -0
- package/dist/monitor.d.ts.map +1 -0
- package/dist/monitor.js +884 -0
- package/dist/monitor.js.map +1 -0
- package/dist/render.d.ts +24 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +114 -0
- package/dist/render.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/package.json +19 -9
package/dist/help.js
ADDED
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
import { PROTOCOL_VERSION } from '@deckflow/deckuse-core';
|
|
2
|
+
const GLOBAL_OPTIONS = `Global options:
|
|
3
|
+
--workspace <path> Explicit workspace (default: nearest .deckuse)
|
|
4
|
+
--revision <rev> Read a historical revision (writes reject it)
|
|
5
|
+
--json Machine-readable envelope
|
|
6
|
+
--quiet Suppress human-oriented summaries
|
|
7
|
+
--dry-run Plan a write without committing
|
|
8
|
+
--expect-revision <rev> Optimistic-concurrency guard for writes
|
|
9
|
+
--reason <text> Stored with write history`;
|
|
10
|
+
const WRITE_GLOBALS = `Write globals: --workspace, --json, --dry-run, --expect-revision, --reason`;
|
|
11
|
+
export const HELP_MAIN = `usage: deckuse [global-options] <command> [subcommand] [target] [options]
|
|
12
|
+
|
|
13
|
+
DeckUse Phase 1a CLI (protocol ${PROTOCOL_VERSION}).
|
|
14
|
+
|
|
15
|
+
${GLOBAL_OPTIONS}
|
|
16
|
+
|
|
17
|
+
Commands:
|
|
18
|
+
init Create a workspace from a .pptx
|
|
19
|
+
status Show workspace revision / branch summary
|
|
20
|
+
list List slides, shapes, layouts, masters, or theme
|
|
21
|
+
get Read a target's properties (with provenance)
|
|
22
|
+
inspect Deck/slide structural diagnostic
|
|
23
|
+
search Search text or shapes
|
|
24
|
+
add Add a slide or shape
|
|
25
|
+
remove Remove a slide or shape target
|
|
26
|
+
set Set text or dotted properties on a target
|
|
27
|
+
replace-text Find/replace text across the deck
|
|
28
|
+
xfrm Set geometry (x/y/width/height/rotation)
|
|
29
|
+
z Change z-order
|
|
30
|
+
apply Apply one or many JSON / JSONL write commands
|
|
31
|
+
validate Validate package / relationships
|
|
32
|
+
history Show write history
|
|
33
|
+
undo Undo recent write revisions
|
|
34
|
+
export Pack workspace to .pptx
|
|
35
|
+
monitor Live HTML preview server
|
|
36
|
+
render Screenshot one slide to PNG (for visual review)
|
|
37
|
+
query Back-compat selector query (prefer search / list)
|
|
38
|
+
|
|
39
|
+
Run 'deckuse <command> --help' for details.
|
|
40
|
+
`;
|
|
41
|
+
const entries = {
|
|
42
|
+
init: {
|
|
43
|
+
usage: 'deckuse init <input.pptx> <workspace/>',
|
|
44
|
+
summary: 'Unpack a PPTX into a versioned DeckUse workspace (revision starts at 1).',
|
|
45
|
+
example: 'deckuse init input.pptx ./workspace --json',
|
|
46
|
+
details: `Arguments:
|
|
47
|
+
<input.pptx> Source presentation to unpack
|
|
48
|
+
<workspace/> Destination directory for the workspace
|
|
49
|
+
|
|
50
|
+
Options:
|
|
51
|
+
--json Machine-readable envelope
|
|
52
|
+
|
|
53
|
+
Notes:
|
|
54
|
+
Creates source/, package.pptx, .deckuse/, and a Git baseline.
|
|
55
|
+
Does not normalize or rewrite slide content.`,
|
|
56
|
+
},
|
|
57
|
+
status: {
|
|
58
|
+
usage: 'deckuse status [--workspace <path>]',
|
|
59
|
+
summary: 'Show workspace revision, branch, and package summary.',
|
|
60
|
+
example: 'deckuse status --workspace ./workspace --json',
|
|
61
|
+
details: `Options:
|
|
62
|
+
--workspace <path> Workspace root (default: nearest .deckuse)
|
|
63
|
+
--revision <rev> Read a historical revision
|
|
64
|
+
--json Machine-readable envelope`,
|
|
65
|
+
},
|
|
66
|
+
list: {
|
|
67
|
+
usage: 'deckuse list <slides|shapes|layouts|masters|theme> [options]',
|
|
68
|
+
summary: 'List inventory resources from the workspace index / live package.',
|
|
69
|
+
example: 'deckuse list shapes --slide 1 --workspace ./workspace --json',
|
|
70
|
+
details: `Arguments:
|
|
71
|
+
slides | shapes | layouts | masters | theme
|
|
72
|
+
|
|
73
|
+
Options:
|
|
74
|
+
--slide <n> Required for shapes; one-based slide index
|
|
75
|
+
--workspace <path> Workspace root
|
|
76
|
+
--revision <rev> Read a historical revision
|
|
77
|
+
--json Machine-readable envelope
|
|
78
|
+
|
|
79
|
+
Examples:
|
|
80
|
+
deckuse list slides --json
|
|
81
|
+
deckuse list shapes --slide 12 --json
|
|
82
|
+
deckuse list layouts --json`,
|
|
83
|
+
},
|
|
84
|
+
'list slides': {
|
|
85
|
+
usage: 'deckuse list slides [options]',
|
|
86
|
+
summary: 'List slides with index, uid, title preview, layout, and notes flags.',
|
|
87
|
+
example: 'deckuse list slides --workspace ./workspace --json',
|
|
88
|
+
details: `Options:
|
|
89
|
+
--workspace <path> Workspace root
|
|
90
|
+
--revision <rev> Read a historical revision
|
|
91
|
+
--json Machine-readable envelope`,
|
|
92
|
+
},
|
|
93
|
+
'list shapes': {
|
|
94
|
+
usage: 'deckuse list shapes --slide <n> [options]',
|
|
95
|
+
summary: 'List shapes on a slide (id, name, role, type, bbox, text preview).',
|
|
96
|
+
example: 'deckuse list shapes --slide 1 --workspace ./workspace --json',
|
|
97
|
+
details: `Required:
|
|
98
|
+
--slide <n> One-based slide index
|
|
99
|
+
|
|
100
|
+
Options:
|
|
101
|
+
--workspace <path> Workspace root
|
|
102
|
+
--revision <rev> Read a historical revision
|
|
103
|
+
--json Machine-readable envelope`,
|
|
104
|
+
},
|
|
105
|
+
'list layouts': {
|
|
106
|
+
usage: 'deckuse list layouts [options]',
|
|
107
|
+
summary: 'List slide layouts available in the package.',
|
|
108
|
+
example: 'deckuse list layouts --json',
|
|
109
|
+
details: `Options:
|
|
110
|
+
--workspace <path> Workspace root
|
|
111
|
+
--revision <rev> Read a historical revision
|
|
112
|
+
--json Machine-readable envelope`,
|
|
113
|
+
},
|
|
114
|
+
'list masters': {
|
|
115
|
+
usage: 'deckuse list masters [options]',
|
|
116
|
+
summary: 'List slide masters available in the package.',
|
|
117
|
+
example: 'deckuse list masters --json',
|
|
118
|
+
details: `Options:
|
|
119
|
+
--workspace <path> Workspace root
|
|
120
|
+
--revision <rev> Read a historical revision
|
|
121
|
+
--json Machine-readable envelope`,
|
|
122
|
+
},
|
|
123
|
+
'list theme': {
|
|
124
|
+
usage: 'deckuse list theme [options]',
|
|
125
|
+
summary: 'List theme tokens / theme inventory.',
|
|
126
|
+
example: 'deckuse list theme --json',
|
|
127
|
+
details: `Options:
|
|
128
|
+
--workspace <path> Workspace root
|
|
129
|
+
--revision <rev> Read a historical revision
|
|
130
|
+
--json Machine-readable envelope`,
|
|
131
|
+
},
|
|
132
|
+
get: {
|
|
133
|
+
usage: 'deckuse get <target> [options]',
|
|
134
|
+
summary: 'Read a semantic target with direct/effective values and provenance.',
|
|
135
|
+
example: 'deckuse get slide:1/shape:2 --resolve both --json',
|
|
136
|
+
details: `Arguments:
|
|
137
|
+
<target> e.g. slide:1, slide:1/shape:2, slide:1/shape:2/text
|
|
138
|
+
|
|
139
|
+
Options:
|
|
140
|
+
--resolve <mode> effective | direct | both (default: both)
|
|
141
|
+
--props <a,b,c> Comma-separated property filter
|
|
142
|
+
--no-provenance Omit inheritance source paths
|
|
143
|
+
--workspace <path> Workspace root
|
|
144
|
+
--revision <rev> Read a historical revision
|
|
145
|
+
--json Machine-readable envelope`,
|
|
146
|
+
},
|
|
147
|
+
inspect: {
|
|
148
|
+
usage: 'deckuse inspect [<target>] [options]',
|
|
149
|
+
summary: 'Structural diagnostic for the deck or a slide/target.',
|
|
150
|
+
example: 'deckuse inspect slide:1 --visual-tree --depth 2 --json',
|
|
151
|
+
details: `Arguments:
|
|
152
|
+
<target> Optional; omit for presentation-level inspect
|
|
153
|
+
|
|
154
|
+
Options:
|
|
155
|
+
--visual-tree Include object tree projection
|
|
156
|
+
--depth <n> Tree depth (default: 2)
|
|
157
|
+
--workspace <path> Workspace root
|
|
158
|
+
--revision <rev> Read a historical revision
|
|
159
|
+
--json Machine-readable envelope`,
|
|
160
|
+
},
|
|
161
|
+
search: {
|
|
162
|
+
usage: 'deckuse search <text|shape> ...',
|
|
163
|
+
summary: 'Search indexed text or shapes; never mutates the workspace.',
|
|
164
|
+
example: 'deckuse search text "Q2 Revenue" --limit 50 --json',
|
|
165
|
+
details: `Subcommands:
|
|
166
|
+
text <query> Literal text search
|
|
167
|
+
shape Shape search via --name / --query
|
|
168
|
+
|
|
169
|
+
Options:
|
|
170
|
+
--name <name> Match shape name
|
|
171
|
+
--query <text> Query string (shape mode)
|
|
172
|
+
--limit <n> Max results (default: 100)
|
|
173
|
+
--workspace <path> Workspace root
|
|
174
|
+
--revision <rev> Read a historical revision
|
|
175
|
+
--json Machine-readable envelope
|
|
176
|
+
|
|
177
|
+
Run 'deckuse search <text|shape> --help' for details.`,
|
|
178
|
+
},
|
|
179
|
+
'search text': {
|
|
180
|
+
usage: 'deckuse search text <query> [options]',
|
|
181
|
+
summary: 'Search slide text for a literal query string.',
|
|
182
|
+
example: 'deckuse search text "FY2025" --limit 100 --json',
|
|
183
|
+
details: `Arguments:
|
|
184
|
+
<query> Literal text to find
|
|
185
|
+
|
|
186
|
+
Options:
|
|
187
|
+
--limit <n> Max results (default: 100)
|
|
188
|
+
--workspace <path> Workspace root
|
|
189
|
+
--revision <rev> Read a historical revision
|
|
190
|
+
--json Machine-readable envelope`,
|
|
191
|
+
},
|
|
192
|
+
'search shape': {
|
|
193
|
+
usage: 'deckuse search shape [options]',
|
|
194
|
+
summary: 'Search shapes by name and/or query string.',
|
|
195
|
+
example: 'deckuse search shape --name "Title" --limit 50 --json',
|
|
196
|
+
details: `Options:
|
|
197
|
+
--name <name> Match shape name
|
|
198
|
+
--query <text> Additional query string
|
|
199
|
+
--limit <n> Max results (default: 100)
|
|
200
|
+
--workspace <path> Workspace root
|
|
201
|
+
--revision <rev> Read a historical revision
|
|
202
|
+
--json Machine-readable envelope`,
|
|
203
|
+
},
|
|
204
|
+
add: {
|
|
205
|
+
usage: 'deckuse add <slide|shape> [options]',
|
|
206
|
+
summary: 'Add a slide or shape. One successful write commits one revision.',
|
|
207
|
+
example: 'deckuse add shape --slide 1 --type text --name Title --x 0 --y 0 --width 914400 --height 457200',
|
|
208
|
+
details: `Subcommands:
|
|
209
|
+
slide Insert a new slide
|
|
210
|
+
shape Insert a shape on an existing slide
|
|
211
|
+
|
|
212
|
+
${WRITE_GLOBALS}
|
|
213
|
+
|
|
214
|
+
Run 'deckuse add <slide|shape> --help' for details.`,
|
|
215
|
+
},
|
|
216
|
+
'add slide': {
|
|
217
|
+
usage: 'deckuse add slide [options]',
|
|
218
|
+
summary: 'Insert one slide (and package/relationship updates) in a single revision.',
|
|
219
|
+
example: 'deckuse add slide --after 5 --layout title-and-content --name feature-page --json',
|
|
220
|
+
details: `Options:
|
|
221
|
+
--after <n> Insert after one-based slide index (append if omitted)
|
|
222
|
+
--layout <name-or-id> Layout to use (blank / title-and-content / ...)
|
|
223
|
+
--name <name> Slide name stored in inventory
|
|
224
|
+
${WRITE_GLOBALS}`,
|
|
225
|
+
},
|
|
226
|
+
'add shape': {
|
|
227
|
+
usage: 'deckuse add shape --slide <n> --type <kind> [options]',
|
|
228
|
+
summary: 'Insert a shape on a slide. Geometry uses EMU integers (1 CSS px @ 96 DPI = 9525 EMU).',
|
|
229
|
+
example: 'deckuse add shape --slide 1 --type text --text "Hello" --name Title --x 0 --y 0 --width 914400 --height 457200 --json',
|
|
230
|
+
details: `Required:
|
|
231
|
+
--slide <n> One-based slide index
|
|
232
|
+
--type <kind> text | rect | rounded-rect | ellipse | line | image | group | table | chart | video | audio
|
|
233
|
+
|
|
234
|
+
Common options:
|
|
235
|
+
--name <name> Shape name (should be unique on the slide)
|
|
236
|
+
--role <role> Semantic role (title, body, card, image, ...)
|
|
237
|
+
--x <emu> X position in EMU
|
|
238
|
+
--y <emu> Y position in EMU
|
|
239
|
+
--width <emu> Width in EMU
|
|
240
|
+
--height <emu> Height in EMU
|
|
241
|
+
|
|
242
|
+
Type-specific:
|
|
243
|
+
--text <text> Initial text (--type text)
|
|
244
|
+
--file <path> Media path (required for image | video | audio)
|
|
245
|
+
--rows <json> string[][] JSON (required for table)
|
|
246
|
+
--chart-type <kind> bar | column | line | pie (required for chart)
|
|
247
|
+
--data <json> Chart data JSON (required for chart):
|
|
248
|
+
{"title?":"...","categories":["Q1"],"series":[{"name":"S1","values":[1],"color?":"#5B8DEF"}]}
|
|
249
|
+
|
|
250
|
+
Chart styling (via set / apply setProperties on a chart target):
|
|
251
|
+
title, series[{name,values,color}], textColor / font.color,
|
|
252
|
+
gapWidth, showMajorGridlines
|
|
253
|
+
|
|
254
|
+
Examples:
|
|
255
|
+
deckuse add shape --slide 1 --type text --text 'Hello' --json
|
|
256
|
+
deckuse add shape --slide 1 --type image --file ./photo.png --json
|
|
257
|
+
deckuse add shape --slide 1 --type table --rows '[["A","B"],["1","2"]]' --json
|
|
258
|
+
deckuse add shape --slide 1 --type chart --chart-type column --data '{"categories":["Q1","Q2"],"series":[{"name":"2024","values":[10,20]}]}' --json
|
|
259
|
+
deckuse add shape --slide 1 --type video --file ./clip.mp4 --json
|
|
260
|
+
deckuse add shape --slide 1 --type audio --file ./track.mp3 --json
|
|
261
|
+
|
|
262
|
+
${WRITE_GLOBALS}`,
|
|
263
|
+
},
|
|
264
|
+
remove: {
|
|
265
|
+
usage: 'deckuse remove <target> [options]',
|
|
266
|
+
summary: 'Remove a slide or shape target in one revision.',
|
|
267
|
+
example: 'deckuse remove slide:1/shape:2 --reason "obsolete bullet" --json',
|
|
268
|
+
details: `Arguments:
|
|
269
|
+
<target> e.g. slide:9 or slide:6/shape:17
|
|
270
|
+
|
|
271
|
+
Options:
|
|
272
|
+
${WRITE_GLOBALS}`,
|
|
273
|
+
},
|
|
274
|
+
set: {
|
|
275
|
+
usage: 'deckuse set text <target> --value <text> | deckuse set <target> --prop value ...',
|
|
276
|
+
summary: 'Write text or dotted semantic properties on exactly one target.',
|
|
277
|
+
example: "deckuse set slide:1/shape:2 --font.size 42 --fill.color '#0A2930' --json",
|
|
278
|
+
details: `Forms:
|
|
279
|
+
set text <target> --value <text>
|
|
280
|
+
set <target> --font.size 42 --fill.color '#RRGGBB' ...
|
|
281
|
+
|
|
282
|
+
Common properties:
|
|
283
|
+
font.family, font.size, font.weight, font.color, font.italic
|
|
284
|
+
fill.kind, fill.color, fill.transparency
|
|
285
|
+
line.kind, line.color, line.width, line.dash
|
|
286
|
+
paragraph.align, paragraph.level, bullet, hyperlink, name, visible
|
|
287
|
+
x, y, width, height, rotation
|
|
288
|
+
|
|
289
|
+
Table targets also accept:
|
|
290
|
+
insertRow / deleteRow / insertColumn / deleteColumn (object with index)
|
|
291
|
+
Cell targets accept fill
|
|
292
|
+
|
|
293
|
+
Chart targets also accept:
|
|
294
|
+
title, series (JSON array with name/values/color),
|
|
295
|
+
textColor | font.color, gapWidth, showMajorGridlines,
|
|
296
|
+
fill | background, gridlineColor
|
|
297
|
+
|
|
298
|
+
Options:
|
|
299
|
+
--scope <scope> local only in Phase 1a (default); other scopes reject
|
|
300
|
+
--value <text> Required for set text
|
|
301
|
+
${WRITE_GLOBALS}
|
|
302
|
+
|
|
303
|
+
Run 'deckuse set text --help' for the text form.`,
|
|
304
|
+
},
|
|
305
|
+
'set text': {
|
|
306
|
+
usage: 'deckuse set text <target> --value <text> [options]',
|
|
307
|
+
summary: 'Replace the full text body of a target. Does not search across the deck.',
|
|
308
|
+
example: "deckuse set text slide:1/shape:2 --value 'Hello' --json",
|
|
309
|
+
details: `Arguments:
|
|
310
|
+
<target> e.g. slide:1/shape:2 or slide:1/shape:2/text
|
|
311
|
+
|
|
312
|
+
Required:
|
|
313
|
+
--value <text> Replacement text (use $'...' for newlines in shells)
|
|
314
|
+
|
|
315
|
+
Options:
|
|
316
|
+
${WRITE_GLOBALS}`,
|
|
317
|
+
},
|
|
318
|
+
'replace-text': {
|
|
319
|
+
usage: 'deckuse replace-text --source <text> --target <text> [--regex] [--limit <n>] [--selector <sel>]',
|
|
320
|
+
summary: 'Find and replace text across matching indexed text nodes.',
|
|
321
|
+
example: 'deckuse replace-text --source FY2025 --target FY2026 --json',
|
|
322
|
+
details: `Required:
|
|
323
|
+
--source <text> Find string (non-empty); maps to protocol find
|
|
324
|
+
--target <text> Replacement string; maps to protocol replace
|
|
325
|
+
|
|
326
|
+
Options:
|
|
327
|
+
--regex Treat --source as a Unicode regular expression
|
|
328
|
+
--limit <n> Max replacements
|
|
329
|
+
--selector <sel> Narrow matches (e.g. slide=1)
|
|
330
|
+
${WRITE_GLOBALS}`,
|
|
331
|
+
},
|
|
332
|
+
xfrm: {
|
|
333
|
+
usage: 'deckuse xfrm set (--target <t> | --slide <n> --shape <id>) [geometry]',
|
|
334
|
+
summary: 'Low-level geometry write. All supplied fields apply atomically.',
|
|
335
|
+
example: 'deckuse xfrm set --slide 1 --shape 2 --x 0 --y 0 --width 914400 --height 457200 --json',
|
|
336
|
+
details: `Subcommands:
|
|
337
|
+
set Set transform fields on one shape
|
|
338
|
+
|
|
339
|
+
Options (via set):
|
|
340
|
+
--target <target> e.g. slide:1/shape:2
|
|
341
|
+
--slide <n> --shape <id> Alternative addressing
|
|
342
|
+
--x <emu> --y <emu>
|
|
343
|
+
--width|--cx <emu>
|
|
344
|
+
--height|--cy <emu>
|
|
345
|
+
--rotation <deg> Clockwise degrees
|
|
346
|
+
${WRITE_GLOBALS}
|
|
347
|
+
|
|
348
|
+
Run 'deckuse xfrm set --help' for details.`,
|
|
349
|
+
},
|
|
350
|
+
'xfrm set': {
|
|
351
|
+
usage: 'deckuse xfrm set (--target <t> | --slide <n> --shape <id>) [geometry]',
|
|
352
|
+
summary: 'Set x/y/width/height/rotation on one shape in EMU / degrees.',
|
|
353
|
+
example: 'deckuse xfrm set --target slide:1/shape:2 --x 914400 --y 1371600 --width 6858000 --height 1371600',
|
|
354
|
+
details: `Addressing (one required):
|
|
355
|
+
--target <target> e.g. slide:1/shape:2
|
|
356
|
+
--slide <n> --shape <id> Combined into slide:<n>/shape:<id>
|
|
357
|
+
|
|
358
|
+
Geometry (all optional; supplied fields applied together):
|
|
359
|
+
--x <emu> X position
|
|
360
|
+
--y <emu> Y position
|
|
361
|
+
--width <emu> Width (--cx alias)
|
|
362
|
+
--height <emu> Height (--cy alias)
|
|
363
|
+
--rotation <deg> Clockwise rotation
|
|
364
|
+
|
|
365
|
+
Options:
|
|
366
|
+
${WRITE_GLOBALS}`,
|
|
367
|
+
},
|
|
368
|
+
z: {
|
|
369
|
+
usage: 'deckuse z move <target> (--above <t> | --below <t> | --to-front | --to-back)',
|
|
370
|
+
summary: 'Change relative z-order of a shape.',
|
|
371
|
+
example: 'deckuse z move slide:1/shape:6 --above slide:1/shape:2 --json',
|
|
372
|
+
details: `Subcommands:
|
|
373
|
+
move Reorder one target relative to another
|
|
374
|
+
|
|
375
|
+
Options (via move):
|
|
376
|
+
--above <target> Place above another target
|
|
377
|
+
--below <target> Place below another target
|
|
378
|
+
--to-front Bring to front
|
|
379
|
+
--to-back Send to back
|
|
380
|
+
${WRITE_GLOBALS}
|
|
381
|
+
|
|
382
|
+
Run 'deckuse z move --help' for details.`,
|
|
383
|
+
},
|
|
384
|
+
'z move': {
|
|
385
|
+
usage: 'deckuse z move <target> (--above <t> | --below <t> | --to-front | --to-back)',
|
|
386
|
+
summary: 'Move a shape above/below another target, or to front/back.',
|
|
387
|
+
example: 'deckuse z move slide:1/shape:7 --to-front --json',
|
|
388
|
+
details: `Arguments:
|
|
389
|
+
<target> Shape to move, e.g. slide:1/shape:6
|
|
390
|
+
|
|
391
|
+
Position (choose one):
|
|
392
|
+
--above <target> Place immediately above
|
|
393
|
+
--below <target> Place immediately below
|
|
394
|
+
--to-front Bring to front of the slide
|
|
395
|
+
--to-back Send to back of the slide
|
|
396
|
+
|
|
397
|
+
Options:
|
|
398
|
+
${WRITE_GLOBALS}`,
|
|
399
|
+
},
|
|
400
|
+
apply: {
|
|
401
|
+
usage: 'deckuse apply [<workspace>] [--input <file|->]',
|
|
402
|
+
summary: 'Apply one or many write commands from JSON / JSONL / transaction { "operations": [...] }. Multiple commands run as one atomic batch.',
|
|
403
|
+
example: 'deckuse apply --workspace ./workspace --input ops.jsonl --json',
|
|
404
|
+
details: `Arguments:
|
|
405
|
+
<workspace> Optional workspace path (or use --workspace)
|
|
406
|
+
|
|
407
|
+
Options:
|
|
408
|
+
--input <file|-> Input path; "-" (default) reads stdin
|
|
409
|
+
${WRITE_GLOBALS}
|
|
410
|
+
|
|
411
|
+
Accepted input shapes (batch-capable):
|
|
412
|
+
{ "operations": [ ... ] } Transaction ops
|
|
413
|
+
[ { "type": "setText", ... }, ... ]
|
|
414
|
+
{ "type": "setText", ... } Single command
|
|
415
|
+
JSONL One command object per line
|
|
416
|
+
|
|
417
|
+
Notes:
|
|
418
|
+
One invocation can apply many write commands (JSON array, JSONL, or
|
|
419
|
+
{ "operations": [...] }); multiple commands run as one atomic batch.
|
|
420
|
+
Only write command types are accepted.
|
|
421
|
+
|
|
422
|
+
Examples:
|
|
423
|
+
deckuse apply --input ops.json --json
|
|
424
|
+
deckuse apply --input ops.jsonl --json
|
|
425
|
+
printf '%s\\n' '{"type":"setText",...}' '{"type":"setProperties",...}' | deckuse apply --json`,
|
|
426
|
+
},
|
|
427
|
+
validate: {
|
|
428
|
+
usage: 'deckuse validate [<workspace>] [options]',
|
|
429
|
+
summary: 'Validate package integrity and optional relationship checks.',
|
|
430
|
+
example: 'deckuse validate --workspace ./workspace --package --relationships --json',
|
|
431
|
+
details: `Arguments:
|
|
432
|
+
<workspace> Optional workspace path (or use --workspace)
|
|
433
|
+
|
|
434
|
+
Options:
|
|
435
|
+
--level <level> Validation level (default: full)
|
|
436
|
+
--package Include package checks
|
|
437
|
+
--relationships Include relationship graph checks
|
|
438
|
+
--slide <n> Limit to one slide when supported
|
|
439
|
+
--workspace <path> Workspace root
|
|
440
|
+
--revision <rev> Validate a historical revision
|
|
441
|
+
--json Machine-readable envelope`,
|
|
442
|
+
},
|
|
443
|
+
history: {
|
|
444
|
+
usage: 'deckuse history [<workspace>] [options]',
|
|
445
|
+
summary: 'List committed write operations from the workspace journal.',
|
|
446
|
+
example: 'deckuse history --workspace ./workspace --limit 20 --json',
|
|
447
|
+
details: `Arguments:
|
|
448
|
+
<workspace> Optional workspace path (or use --workspace)
|
|
449
|
+
|
|
450
|
+
Options:
|
|
451
|
+
--limit <n> Max entries (default: 100)
|
|
452
|
+
--offset <n> Skip entries (default: 0)
|
|
453
|
+
--slide <n> Filter to operations affecting a slide
|
|
454
|
+
--workspace <path> Workspace root
|
|
455
|
+
--json Machine-readable envelope`,
|
|
456
|
+
},
|
|
457
|
+
undo: {
|
|
458
|
+
usage: 'deckuse undo [<workspace>] [--steps <n>]',
|
|
459
|
+
summary: 'Undo one or more recent write revisions.',
|
|
460
|
+
example: 'deckuse undo --workspace ./workspace --steps 1 --json',
|
|
461
|
+
details: `Arguments:
|
|
462
|
+
<workspace> Optional workspace path (or use --workspace)
|
|
463
|
+
|
|
464
|
+
Options:
|
|
465
|
+
--steps <n> Number of revisions to undo (default: 1)
|
|
466
|
+
${WRITE_GLOBALS}`,
|
|
467
|
+
},
|
|
468
|
+
export: {
|
|
469
|
+
usage: 'deckuse export <output.pptx> [options]',
|
|
470
|
+
summary: 'Pack the workspace (or a historical revision) into a .pptx file.',
|
|
471
|
+
example: 'deckuse export ./out.pptx --workspace ./workspace --json',
|
|
472
|
+
details: `Arguments:
|
|
473
|
+
<output.pptx> Destination path
|
|
474
|
+
|
|
475
|
+
Options:
|
|
476
|
+
--workspace <path> Workspace root
|
|
477
|
+
--revision <rev> Export a historical revision
|
|
478
|
+
--json Machine-readable envelope`,
|
|
479
|
+
},
|
|
480
|
+
monitor: {
|
|
481
|
+
usage: 'deckuse monitor [<workspace>] [--host <addr>] [--port <n>]',
|
|
482
|
+
summary: 'Start a live HTML preview server for the workspace.',
|
|
483
|
+
example: 'deckuse monitor --workspace ./workspace --port 4173',
|
|
484
|
+
details: `Arguments:
|
|
485
|
+
<workspace> Optional workspace path (or use --workspace)
|
|
486
|
+
|
|
487
|
+
Options:
|
|
488
|
+
--host <addr> Bind address (default: 0.0.0.0)
|
|
489
|
+
--port <n> Port 0–65535 (default: 4173)
|
|
490
|
+
--workspace <path> Workspace root
|
|
491
|
+
|
|
492
|
+
Notes:
|
|
493
|
+
Blocks until SIGINT/SIGTERM. Browser subscribers drive render updates.`,
|
|
494
|
+
},
|
|
495
|
+
render: {
|
|
496
|
+
usage: 'deckuse render --page <n> [--output <file.png>]',
|
|
497
|
+
summary: 'Convert one slide to HTML (office2html), screenshot it with Playwright, then delete the HTML staging output.',
|
|
498
|
+
example: 'deckuse render --page 3 --workspace ./workspace --json',
|
|
499
|
+
details: `Required:
|
|
500
|
+
--page <n> One-based slide index (exactly one page per call)
|
|
501
|
+
|
|
502
|
+
Options:
|
|
503
|
+
--output <file.png> PNG path (default: .deckuse/render/page-<n>.png)
|
|
504
|
+
--workspace <path> Workspace root (default: nearest .deckuse)
|
|
505
|
+
--json Machine-readable envelope
|
|
506
|
+
|
|
507
|
+
Notes:
|
|
508
|
+
Intended for AI agents to visually review whether an edit looks correct.
|
|
509
|
+
Requires a system Chrome / Chromium / Edge, or PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH.
|
|
510
|
+
Temporary office2html output is always removed after the screenshot.`,
|
|
511
|
+
},
|
|
512
|
+
query: {
|
|
513
|
+
usage: 'deckuse query [<workspace>] <selector> [--limit <n>]',
|
|
514
|
+
summary: 'Back-compat selector query (prefer search / list for Phase 1a).',
|
|
515
|
+
example: "deckuse query ./workspace 'text=FY2025' --limit 100 --json",
|
|
516
|
+
details: `Arguments:
|
|
517
|
+
<workspace> Optional workspace path when not using --workspace
|
|
518
|
+
<selector> Selector string (default: *)
|
|
519
|
+
|
|
520
|
+
Options:
|
|
521
|
+
--limit <n> Max results (default: 100)
|
|
522
|
+
--workspace <path> Workspace root
|
|
523
|
+
--json Machine-readable envelope
|
|
524
|
+
|
|
525
|
+
Selector examples:
|
|
526
|
+
* | all
|
|
527
|
+
kind=textbox
|
|
528
|
+
text=Quarter
|
|
529
|
+
text~=pattern
|
|
530
|
+
hasText=true
|
|
531
|
+
slide=1 name=Title`,
|
|
532
|
+
},
|
|
533
|
+
};
|
|
534
|
+
const formatEntry = (entry) => {
|
|
535
|
+
const parts = [`usage: ${entry.usage}`, '', entry.summary, '', `Example:`, ` ${entry.example}`];
|
|
536
|
+
if (entry.details) {
|
|
537
|
+
parts.push('', entry.details);
|
|
538
|
+
}
|
|
539
|
+
parts.push('');
|
|
540
|
+
return parts.join('\n');
|
|
541
|
+
};
|
|
542
|
+
/** Resolve progressive help for a command path such as ['add','shape']. */
|
|
543
|
+
export const resolveHelp = (topic) => {
|
|
544
|
+
if (topic.length === 0)
|
|
545
|
+
return HELP_MAIN;
|
|
546
|
+
const key = topic.map((part) => part.toLowerCase()).join(' ');
|
|
547
|
+
const entry = entries[key];
|
|
548
|
+
if (entry)
|
|
549
|
+
return formatEntry(entry);
|
|
550
|
+
if (topic.length > 1) {
|
|
551
|
+
const parentKey = topic[0].toLowerCase();
|
|
552
|
+
const parent = entries[parentKey];
|
|
553
|
+
if (parent) {
|
|
554
|
+
return (`Unknown subcommand: ${topic.slice(1).join(' ')}\n\n` +
|
|
555
|
+
formatEntry(parent) +
|
|
556
|
+
`Run 'deckuse ${parentKey} --help' for available forms.\n`);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
return (`Unknown command: ${topic[0]}\n\n` +
|
|
560
|
+
HELP_MAIN +
|
|
561
|
+
`Run 'deckuse --help' for the command list.\n`);
|
|
562
|
+
};
|
|
563
|
+
/** Tokens that form a help topic (command path), ignoring options and help flags. */
|
|
564
|
+
export const helpTopicFromArgs = (clean) => {
|
|
565
|
+
if (clean.length === 0)
|
|
566
|
+
return null;
|
|
567
|
+
if (clean[0] === 'help') {
|
|
568
|
+
return clean.slice(1).filter((token) => token !== '--help' && token !== '-h' && !token.startsWith('--'));
|
|
569
|
+
}
|
|
570
|
+
const helpIndex = clean.findIndex((token) => token === '--help' || token === '-h');
|
|
571
|
+
if (helpIndex < 0)
|
|
572
|
+
return null;
|
|
573
|
+
return clean.slice(0, helpIndex).filter((token) => !token.startsWith('--'));
|
|
574
|
+
};
|
|
575
|
+
//# sourceMappingURL=help.js.map
|
package/dist/help.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,cAAc,GAAG;;;;;;;sDAO+B,CAAC;AAEvD,MAAM,aAAa,GAAG,4EAA4E,CAAC;AAEnG,MAAM,CAAC,MAAM,SAAS,GAAG;;iCAEQ,gBAAgB;;EAE/C,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;CAyBf,CAAC;AASF,MAAM,OAAO,GAA8B;IACzC,IAAI,EAAE;QACJ,KAAK,EAAE,wCAAwC;QAC/C,OAAO,EAAE,0EAA0E;QACnF,OAAO,EAAE,4CAA4C;QACrD,OAAO,EAAE;;;;;;;;;+CASkC;KAC5C;IAED,MAAM,EAAE;QACN,KAAK,EAAE,qCAAqC;QAC5C,OAAO,EAAE,uDAAuD;QAChE,OAAO,EAAE,+CAA+C;QACxD,OAAO,EAAE;;;sD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AK,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC;IACnF,IAAI,SAAS,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAE/B,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9E,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Executor, type Result } from '@deckflow/deckuse-core';
|
|
2
2
|
export declare const createDefaultExecutor: () => Executor;
|
|
3
3
|
export declare const runCommand: (input: unknown) => Promise<Result<unknown>>;
|
|
4
|
+
export { startMonitor, type MonitorHandle, type MonitorOptions } from './monitor.js';
|
|
5
|
+
export { renderPage, type RenderDependencies, type RenderOptions, type RenderResult, } from './render.js';
|
|
6
|
+
export { EDITION, EDITION_VARIANT, DISTRIBUTION_CHANNEL, editionMetadata, type Edition, } from './edition.js';
|
|
4
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,QAAQ,EAAE,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAMhF,eAAO,MAAM,qBAAqB,QAAO,QA4BtC,CAAC;AACJ,eAAO,MAAM,UAAU,GAAU,OAAO,OAAO,KAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CACjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,QAAQ,EAAE,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAMhF,eAAO,MAAM,qBAAqB,QAAO,QA4BtC,CAAC;AACJ,eAAO,MAAM,UAAU,GAAU,OAAO,OAAO,KAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CACjC,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,EACL,UAAU,EACV,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,KAAK,OAAO,GACb,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31,4 +31,7 @@ export const createDefaultExecutor = () => new Executor(new AdapterRegistry()
|
|
|
31
31
|
},
|
|
32
32
|
});
|
|
33
33
|
export const runCommand = async (input) => createDefaultExecutor().execute(input);
|
|
34
|
+
export { startMonitor } from './monitor.js';
|
|
35
|
+
export { renderPage, } from './render.js';
|
|
36
|
+
export { EDITION, EDITION_VARIANT, DISTRIBUTION_CHANNEL, editionMetadata, } from './edition.js';
|
|
34
37
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAe,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM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J,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,KAAc,EAA4B,EAAE,CAC3E,qBAAqB,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEzC,OAAO,EAAE,YAAY,EAA2C,MAAM,cAAc,CAAC;AACrF,OAAO,EACL,UAAU,GAIX,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,eAAe,GAEhB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type Server } from 'node:http';
|
|
2
|
+
import office2html from '@deckflow/office2html';
|
|
3
|
+
export interface MonitorWatcher {
|
|
4
|
+
close(): void;
|
|
5
|
+
on(event: 'error', listener: (error: Error) => void): this;
|
|
6
|
+
}
|
|
7
|
+
export interface MonitorDependencies {
|
|
8
|
+
readonly convert?: typeof office2html.convert;
|
|
9
|
+
readonly watch?: (path: string, listener: (event?: string, filename?: string | Buffer | null) => void) => MonitorWatcher;
|
|
10
|
+
readonly debounceMs?: number;
|
|
11
|
+
readonly keepaliveMs?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface MonitorOptions {
|
|
14
|
+
readonly host?: string;
|
|
15
|
+
readonly port?: number;
|
|
16
|
+
readonly dependencies?: MonitorDependencies;
|
|
17
|
+
}
|
|
18
|
+
export interface MonitorHandle {
|
|
19
|
+
readonly server: Server;
|
|
20
|
+
readonly url: string;
|
|
21
|
+
close(): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export declare const startMonitor: (workspace: string, options?: MonitorOptions) => Promise<MonitorHandle>;
|
|
24
|
+
//# sourceMappingURL=monitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monitor.d.ts","sourceRoot":"","sources":["../src/monitor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,KAAK,MAAM,EAAuB,MAAM,WAAW,CAAC;AAE3E,OAAO,WAAW,MAAM,uBAAuB,CAAC;A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