@penguinharness/use-bento-slides 0.2.17 → 0.2.19

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.
Files changed (33) hide show
  1. package/README.md +37 -0
  2. package/README.zh.md +37 -0
  3. package/THIRD-PARTY-NOTICES.md +30 -0
  4. package/ifaces.json +63 -0
  5. package/package.json +19 -21
  6. package/skills/bento-slides/SKILL.md +89 -29
  7. package/skills/bento-slides/references/bento-agents.md +511 -0
  8. package/workbenches/slides/index.ts +677 -0
  9. package/workbenches/slides/package.json +43 -0
  10. package/workbenches/slides/ui/app.js +1101 -0
  11. package/workbenches/slides/ui/bridge.js +190 -0
  12. package/workbenches/slides/ui/conversation-view.js +206 -0
  13. package/workbenches/slides/ui/conversation.css +95 -0
  14. package/workbenches/slides/ui/conversation.js +115 -0
  15. package/workbenches/slides/ui/deck-files.css +279 -0
  16. package/workbenches/slides/ui/deck-files.js +189 -0
  17. package/workbenches/slides/ui/file-menu.js +72 -0
  18. package/workbenches/slides/ui/icon.svg +9 -0
  19. package/workbenches/slides/ui/index.html +252 -0
  20. package/workbenches/slides/ui/model-choice.js +298 -0
  21. package/workbenches/slides/ui/model-control.tsx +90 -0
  22. package/workbenches/slides/ui/powerpoint.js +196 -0
  23. package/workbenches/slides/ui/sample.bento.json +33 -0
  24. package/workbenches/slides/ui/strings.js +184 -0
  25. package/workbenches/slides/ui/style.css +505 -0
  26. package/workbenches/slides/ui/sync.js +268 -0
  27. package/workbenches/slides/ui/template-picker.js +128 -0
  28. package/workbenches/slides/ui/templates.js +256 -0
  29. package/workbenches/slides/ui/vendor/LICENSE-bento.txt +21 -0
  30. package/workbenches/slides/ui/vendor/LICENSE-jszip.txt +25 -0
  31. package/workbenches/slides/ui/vendor/LICENSE-pptxgen.txt +21 -0
  32. package/workbenches/slides/ui/vendor/bento-slides-1.2.13.runtime.txt +310 -0
  33. package/workbenches/slides/ui/vendor/pptxgen-4.0.1.bundle.js +96 -0
@@ -0,0 +1,505 @@
1
+ /* Keep the plain editor controls in the base layer, below Penguin UI components. */
2
+ @import url("/workbench-ui.css") layer(base);
3
+
4
+ /* The Slides workbench's own shell: a bar, the editor frame, the AI rail. The editor inside the
5
+ frame is Bento's and keeps its own light chrome; everything here reads the app's tokens. */
6
+ html,
7
+ body {
8
+ height: 100%;
9
+ margin: 0;
10
+ }
11
+ /* The base stylesheet pads a page's body; this page is a shell that fills its frame. */
12
+ body {
13
+ padding: 0;
14
+ font: 14px/1.5 var(--wb-font);
15
+ color: var(--wb-fg);
16
+ }
17
+ .app {
18
+ display: flex;
19
+ flex-direction: column;
20
+ height: 100%;
21
+ min-height: 0;
22
+ }
23
+ [hidden] {
24
+ display: none !important;
25
+ }
26
+
27
+ .bar {
28
+ display: flex;
29
+ align-items: center;
30
+ gap: 8px;
31
+ flex: none;
32
+ min-width: 0;
33
+ padding: 7px 12px 7px 8px;
34
+ border-bottom: 1px solid var(--wb-border);
35
+ }
36
+ .bar button {
37
+ display: inline-flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ gap: 6px;
41
+ min-height: 34px;
42
+ white-space: nowrap;
43
+ font-size: 13px;
44
+ }
45
+ .bar svg {
46
+ width: 16px;
47
+ height: 16px;
48
+ flex: none;
49
+ fill: none;
50
+ stroke: currentColor;
51
+ stroke-width: 1.7;
52
+ stroke-linecap: round;
53
+ stroke-linejoin: round;
54
+ }
55
+ .bar .back-link,
56
+ .bar .quiet-command {
57
+ border-color: transparent;
58
+ background: transparent;
59
+ }
60
+ .bar .back-link {
61
+ width: 34px;
62
+ flex: none;
63
+ padding: 0;
64
+ color: var(--wb-muted);
65
+ }
66
+ .document-info {
67
+ display: grid;
68
+ max-width: min(42vw, 680px);
69
+ min-width: 0;
70
+ line-height: 1.25;
71
+ }
72
+ .deck-title {
73
+ margin: 0;
74
+ font-size: 15px;
75
+ font-weight: 600;
76
+ }
77
+ .deck-title,
78
+ .sync {
79
+ overflow: hidden;
80
+ text-overflow: ellipsis;
81
+ white-space: nowrap;
82
+ }
83
+ .sync {
84
+ font-size: 11px;
85
+ color: var(--wb-muted);
86
+ }
87
+ .sync[data-tone="attention"] {
88
+ color: var(--wb-tone-attention-fg);
89
+ }
90
+ .file-picker {
91
+ position: relative;
92
+ flex: none;
93
+ margin-inline-start: 5px;
94
+ padding-inline-start: 8px;
95
+ border-inline-start: 1px solid var(--wb-border);
96
+ }
97
+ .bar .chevron {
98
+ width: 12px;
99
+ height: 12px;
100
+ }
101
+ .editor-actions {
102
+ display: flex;
103
+ flex: none;
104
+ align-items: center;
105
+ gap: 6px;
106
+ margin-inline-start: auto;
107
+ }
108
+ .quiet-command[aria-expanded="true"],
109
+ .quiet-command[aria-pressed="true"] {
110
+ background: var(--wb-hover);
111
+ }
112
+ .bar #present {
113
+ padding-inline: 12px;
114
+ }
115
+ .file-menu {
116
+ position: absolute;
117
+ z-index: 20;
118
+ inset-block-start: calc(100% + 5px);
119
+ inset-inline-start: 0;
120
+ width: max-content;
121
+ max-width: calc(100vw - 16px);
122
+ max-height: min(65vh, 420px);
123
+ overflow: auto;
124
+ padding: 5px;
125
+ box-sizing: border-box;
126
+ border: 1px solid var(--wb-border);
127
+ border-radius: var(--wb-radius);
128
+ background: var(--wb-canvas);
129
+ box-shadow: var(--ui-shadow-overlay, 0 6px 20px rgb(0 0 0 / 0.13));
130
+ }
131
+ .file-menu button {
132
+ display: flex;
133
+ justify-content: space-between;
134
+ gap: 18px;
135
+ width: 100%;
136
+ padding-inline: 10px;
137
+ border: 0;
138
+ background: transparent;
139
+ text-align: start;
140
+ font-weight: 450;
141
+ }
142
+ .file-menu button:focus-visible {
143
+ outline-offset: -2px;
144
+ background: var(--wb-hover);
145
+ }
146
+ .file-menu hr {
147
+ height: 1px;
148
+ margin: 4px 5px;
149
+ border: 0;
150
+ background: var(--wb-border);
151
+ }
152
+ .file-menu kbd {
153
+ padding: 0;
154
+ border: 0;
155
+ background: transparent;
156
+ color: var(--wb-muted);
157
+ font: inherit;
158
+ font-size: 11px;
159
+ }
160
+ .notice {
161
+ margin: 0;
162
+ padding: 6px 12px;
163
+ font-size: 12px;
164
+ color: var(--wb-tone-attention-fg);
165
+ background: var(--wb-tone-attention-bg);
166
+ border-bottom: 1px solid var(--wb-tone-attention-line);
167
+ flex: none;
168
+ }
169
+
170
+ .stage {
171
+ display: flex;
172
+ flex: 1;
173
+ min-height: 0;
174
+ }
175
+ .editor {
176
+ flex: 1;
177
+ min-width: 0;
178
+ background: #f5f6fa;
179
+ }
180
+ .editor iframe {
181
+ display: block;
182
+ width: 100%;
183
+ height: 100%;
184
+ border: 0;
185
+ }
186
+ .rail {
187
+ display: flex;
188
+ flex-direction: column;
189
+ flex: none;
190
+ width: 320px;
191
+ min-height: 0;
192
+ border-left: 1px solid var(--wb-border);
193
+ }
194
+ .app[data-rail="off"] .rail {
195
+ display: none;
196
+ }
197
+ .rail-head {
198
+ display: flex;
199
+ align-items: center;
200
+ justify-content: space-between;
201
+ padding: 10px 14px 6px;
202
+ }
203
+ .rail-head h2 {
204
+ margin: 0;
205
+ font-size: 14px;
206
+ font-weight: 600;
207
+ }
208
+ .link {
209
+ padding: 0;
210
+ border: 0;
211
+ background: none;
212
+ color: var(--wb-muted);
213
+ font-size: 12px;
214
+ cursor: pointer;
215
+ }
216
+ .link:hover {
217
+ color: var(--wb-fg);
218
+ background: none;
219
+ }
220
+ .talk {
221
+ flex: 1;
222
+ min-height: 0;
223
+ overflow: auto;
224
+ margin: 0;
225
+ padding: 6px 14px 12px;
226
+ list-style: none;
227
+ display: flex;
228
+ flex-direction: column;
229
+ gap: 10px;
230
+ }
231
+ .talk li {
232
+ white-space: pre-wrap;
233
+ overflow-wrap: anywhere;
234
+ }
235
+ .talk .me {
236
+ align-self: flex-end;
237
+ max-width: 88%;
238
+ padding: 6px 10px;
239
+ border-radius: 12px;
240
+ background: var(--wb-hover);
241
+ }
242
+ .talk .hint {
243
+ color: var(--wb-muted);
244
+ font-size: 13px;
245
+ }
246
+ .ask {
247
+ display: flex;
248
+ flex-direction: column;
249
+ gap: 6px;
250
+ padding: 10px 14px 14px;
251
+ border-top: 1px solid var(--wb-border);
252
+ }
253
+ .context {
254
+ margin: 0;
255
+ min-height: 18px;
256
+ color: var(--wb-muted);
257
+ font-size: 12px;
258
+ }
259
+ .ask textarea,
260
+ .start-ask textarea {
261
+ width: 100%;
262
+ box-sizing: border-box;
263
+ resize: none;
264
+ font: inherit;
265
+ }
266
+ /* Leave the host's bottom-right fullscreen control outside the hit area. */
267
+ .ask-actions {
268
+ display: flex;
269
+ align-items: center;
270
+ gap: 8px;
271
+ }
272
+
273
+ .start,
274
+ .unsupported {
275
+ display: none;
276
+ flex: 1;
277
+ flex-direction: column;
278
+ align-items: center;
279
+ justify-content: center;
280
+ gap: 12px;
281
+ padding: 32px 16px;
282
+ text-align: center;
283
+ }
284
+ .start h1,
285
+ .unsupported h1 {
286
+ margin: 0;
287
+ font-size: 24px;
288
+ }
289
+ .start p,
290
+ .unsupported p {
291
+ margin: 0;
292
+ max-width: 520px;
293
+ }
294
+ .start-ask {
295
+ display: flex;
296
+ flex-direction: column;
297
+ align-items: flex-end;
298
+ gap: 8px;
299
+ width: min(560px, 100%);
300
+ margin-top: 8px;
301
+ }
302
+ .start-more {
303
+ display: flex;
304
+ flex-wrap: wrap;
305
+ justify-content: center;
306
+ gap: 8px;
307
+ }
308
+ .app[data-view="start"] .start,
309
+ .app[data-view="unsupported"] .unsupported {
310
+ display: flex;
311
+ }
312
+ .app[data-view="start"] .stage,
313
+ .app[data-view="unsupported"] .stage,
314
+ .app[data-view="loading"] .stage,
315
+ .app[data-view="start"] .bar,
316
+ .app[data-view="unsupported"] .bar,
317
+ .app[data-view="loading"] .bar {
318
+ display: none;
319
+ }
320
+ .stage {
321
+ position: relative;
322
+ }
323
+ #create-dialog,
324
+ #history-dialog,
325
+ #player {
326
+ color: var(--wb-fg);
327
+ background: var(--wb-canvas);
328
+ border: 1px solid var(--wb-border);
329
+ border-radius: var(--wb-radius);
330
+ padding: 0;
331
+ }
332
+ dialog::backdrop {
333
+ background: rgb(18 24 30 / 0.48);
334
+ }
335
+ #create-dialog {
336
+ margin: auto;
337
+ max-width: calc(100vw - 24px);
338
+ max-height: calc(100dvh - 24px);
339
+ overflow-y: auto;
340
+ }
341
+ #create-form {
342
+ display: grid;
343
+ gap: 16px;
344
+ width: min(340px, calc(100vw - 64px));
345
+ padding: 20px;
346
+ }
347
+ #create-form:has(#template-preview:not([hidden])) {
348
+ width: min(560px, calc(100vw - 28px));
349
+ }
350
+ #template-preview {
351
+ margin: 0;
352
+ min-width: 0;
353
+ }
354
+ #preview-sheet {
355
+ border: 1px solid var(--wb-border);
356
+ border-radius: var(--wb-radius);
357
+ }
358
+ #template-preview figcaption {
359
+ display: flex;
360
+ align-items: center;
361
+ justify-content: space-between;
362
+ gap: 8px;
363
+ margin-top: 6px;
364
+ color: var(--wb-muted);
365
+ font-size: 12px;
366
+ }
367
+ #preview-caption {
368
+ min-width: 0;
369
+ overflow-wrap: anywhere;
370
+ }
371
+ .preview-paging {
372
+ display: flex;
373
+ flex-shrink: 0;
374
+ }
375
+ .preview-paging button {
376
+ border: 0;
377
+ background: none;
378
+ font-size: 12px;
379
+ }
380
+ #create-error {
381
+ color: var(--wb-tone-danger-fg);
382
+ margin: 0;
383
+ }
384
+ #create-error:empty {
385
+ display: none;
386
+ }
387
+ #create-form h2 {
388
+ margin: 0;
389
+ font-size: 20px;
390
+ }
391
+ #create-form label {
392
+ display: grid;
393
+ gap: 5px;
394
+ }
395
+ .dialog-actions,
396
+ #player header {
397
+ display: flex;
398
+ align-items: center;
399
+ justify-content: flex-end;
400
+ gap: 8px;
401
+ }
402
+ #player[open] {
403
+ display: flex;
404
+ flex-direction: column;
405
+ width: 100%;
406
+ height: 100%;
407
+ max-width: 100%;
408
+ max-height: 100%;
409
+ border: 0;
410
+ border-radius: 0;
411
+ }
412
+ #player header {
413
+ justify-content: space-between;
414
+ padding: 8px 12px;
415
+ border-bottom: 1px solid var(--wb-border);
416
+ }
417
+ #player strong {
418
+ overflow: hidden;
419
+ text-overflow: ellipsis;
420
+ white-space: nowrap;
421
+ }
422
+ #player iframe {
423
+ flex: 1;
424
+ min-height: 0;
425
+ width: 100%;
426
+ border: 0;
427
+ }
428
+ #history-dialog {
429
+ box-sizing: border-box;
430
+ width: min(380px, calc(100% - 24px));
431
+ max-height: 80%;
432
+ padding: 16px;
433
+ }
434
+ #history-dialog header,
435
+ #history-menu li {
436
+ display: grid;
437
+ align-items: center;
438
+ gap: 2px 10px;
439
+ grid-template-columns: minmax(0, 1fr) auto;
440
+ }
441
+ #history-dialog h2 {
442
+ margin: 0;
443
+ font-size: 16px;
444
+ }
445
+ #history-status {
446
+ margin: 12px 0 0;
447
+ color: var(--wb-muted);
448
+ }
449
+ #history-menu {
450
+ margin: 0;
451
+ padding: 0;
452
+ list-style: none;
453
+ }
454
+ #history-menu li {
455
+ margin-top: 8px;
456
+ padding-top: 8px;
457
+ border-top: 1px solid var(--wb-border);
458
+ }
459
+ #history-menu time {
460
+ grid-column: 1;
461
+ color: var(--wb-muted);
462
+ font-size: 12px;
463
+ }
464
+ #history-menu button {
465
+ grid-area: 1 / 2 / span 2;
466
+ }
467
+ @media (max-width: 850px) {
468
+ .rail {
469
+ position: absolute;
470
+ inset: 0 0 0 auto;
471
+ width: min(320px, 100%);
472
+ z-index: 10;
473
+ background: var(--wb-canvas);
474
+ }
475
+ }
476
+ @media (max-width: 600px) {
477
+ .bar {
478
+ display: grid;
479
+ grid-template-columns: auto minmax(0, 1fr);
480
+ gap: 2px 5px;
481
+ padding: 4px 8px;
482
+ }
483
+ .document-info {
484
+ display: flex;
485
+ max-width: none;
486
+ align-items: baseline;
487
+ gap: 8px;
488
+ }
489
+ .sync {
490
+ flex: none;
491
+ max-width: 35%;
492
+ }
493
+ .file-picker {
494
+ grid-row: 2;
495
+ grid-column: 1 / -1;
496
+ width: max-content;
497
+ margin: 0;
498
+ padding: 0;
499
+ border: 0;
500
+ }
501
+ .editor-actions {
502
+ grid-row: 2;
503
+ grid-column: 2;
504
+ }
505
+ }