konpeki 0.3.1 → 0.4.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.
Files changed (167) hide show
  1. package/AGENTS.md +21 -28
  2. package/AUTHORING.md +68 -229
  3. package/CONTRIBUTING.md +10 -23
  4. package/README.md +98 -106
  5. package/SETUP.md +49 -129
  6. package/docs/development.md +43 -256
  7. package/docs/workflow.md +6 -108
  8. package/html/README.md +140 -0
  9. package/html/browser.ts +103 -0
  10. package/html/document.ts +38 -0
  11. package/html/floor.ts +34 -0
  12. package/html/index.html +5 -0
  13. package/html/inspect.ts +313 -0
  14. package/html/preview.css +62 -0
  15. package/html/preview.tsx +463 -0
  16. package/html/review-hints.ts +63 -0
  17. package/html/server.ts +99 -0
  18. package/html/source.ts +104 -0
  19. package/html/starter.ts +6 -0
  20. package/html/theme-authoring.md +176 -0
  21. package/html/theme.md +61 -0
  22. package/index.html +9 -9
  23. package/package.json +21 -37
  24. package/plugin.json +1 -1
  25. package/public/og.png +0 -0
  26. package/runtime/browser-B-29TH1a.mjs +595 -0
  27. package/runtime/floor-Cmk7G3pU.mjs +41 -0
  28. package/runtime/konpeki.mjs +90 -1410
  29. package/runtime/server-BAqC_5WD.mjs +2 -0
  30. package/runtime/server-DfRpfcY9.mjs +205 -0
  31. package/runtime/source-B_Ui9tMp.mjs +141 -0
  32. package/runtime/source-CZQq9GUO.mjs +2 -0
  33. package/skills/konpeki/SKILL.md +88 -172
  34. package/skills/konpeki/assets/blank.html +17 -0
  35. package/skills/konpeki/floor.md +76 -0
  36. package/skills/konpeki/references/cover.md +27 -0
  37. package/skills/konpeki/references/long-document.md +40 -0
  38. package/skills/konpeki/references/one-pager.md +27 -0
  39. package/skills/konpeki/references/patterns.md +118 -0
  40. package/skills/konpeki/references/resume.md +28 -0
  41. package/skills/konpeki/references/slides.md +28 -0
  42. package/skills/konpeki/scripts/ensure-runtime.mjs +10 -31
  43. package/skills/konpeki/scripts/prepare-document.mjs +25 -14
  44. package/src/components/PageBoard.tsx +156 -0
  45. package/src/lib/alignment.ts +21 -0
  46. package/src/lib/page-board.ts +25 -0
  47. package/src/lib/review-position.ts +19 -0
  48. package/src/styles/base.css +1 -10
  49. package/src/styles/feedback.css +2 -1
  50. package/src/styles/shell.css +94 -354
  51. package/theme-base.css +90 -0
  52. package/theme.css +56 -0
  53. package/vite.config.ts +2 -5
  54. package/composition/README.md +0 -156
  55. package/composition/compile.ts +0 -227
  56. package/composition/document.ts +0 -600
  57. package/composition/schema.json +0 -3001
  58. package/composition/schema.ts +0 -437
  59. package/composition/theme-tokens.ts +0 -16
  60. package/composition/types.ts +0 -269
  61. package/composition/validate.ts +0 -226
  62. package/composition/vector.ts +0 -143
  63. package/composition/visualizations.ts +0 -319
  64. package/design/README.md +0 -17
  65. package/design/palettes/README.md +0 -14
  66. package/design/palettes/base.ts +0 -14
  67. package/design/palettes/candidates.ts +0 -19
  68. package/design/palettes/index.ts +0 -78
  69. package/design/review/color-theme.md +0 -44
  70. package/design/review/layout.md +0 -16
  71. package/design/review/text.md +0 -18
  72. package/design/review/typography.md +0 -15
  73. package/design/review/visuals.md +0 -31
  74. package/design/semantic-patterns.md +0 -43
  75. package/design/themes/README.md +0 -40
  76. package/design/themes/index.ts +0 -24
  77. package/design/visual-languages/technical-product.md +0 -17
  78. package/design/visual-review.md +0 -88
  79. package/lib/assets.d.ts +0 -8
  80. package/lib/charts.ts +0 -18
  81. package/lib/contrast.ts +0 -16
  82. package/lib/layouts.ts +0 -50
  83. package/lib/slide.tsx +0 -42
  84. package/lib/taste.ts +0 -17
  85. package/lib/text.tsx +0 -89
  86. package/lib/typeface.ts +0 -44
  87. package/scripts/migrate-react-page.ts +0 -120
  88. package/skills/konpeki/assets/blank.json +0 -23
  89. package/slides/README.md +0 -56
  90. package/slides/architecture/PROMPT.md +0 -31
  91. package/slides/architecture/index.tsx +0 -102
  92. package/slides/article-brief/PROMPT.md +0 -35
  93. package/slides/article-brief/index.tsx +0 -71
  94. package/slides/bar-chart/PROMPT.md +0 -39
  95. package/slides/bar-chart/index.tsx +0 -97
  96. package/slides/comparison/PROMPT.md +0 -29
  97. package/slides/comparison/index.tsx +0 -95
  98. package/slides/decision-memo/PROMPT.md +0 -34
  99. package/slides/decision-memo/index.tsx +0 -85
  100. package/slides/delivery-plan/PROMPT.md +0 -45
  101. package/slides/delivery-plan/index.tsx +0 -105
  102. package/slides/drawing-references.md +0 -32
  103. package/slides/experiment/PROMPT.md +0 -44
  104. package/slides/experiment/index.tsx +0 -127
  105. package/slides/github-cover/PROMPT.md +0 -21
  106. package/slides/github-cover/README.md +0 -21
  107. package/slides/github-cover/author.ts +0 -67
  108. package/slides/github-cover/composition.json +0 -595
  109. package/slides/incident-workflow/PROMPT.md +0 -57
  110. package/slides/incident-workflow/index.tsx +0 -78
  111. package/slides/introducing-konpeki/PROMPT.md +0 -30
  112. package/slides/introducing-konpeki/README.md +0 -44
  113. package/slides/introducing-konpeki/SOURCE.md +0 -19
  114. package/slides/introducing-konpeki/author.ts +0 -165
  115. package/slides/introducing-konpeki/composition.json +0 -3270
  116. package/slides/line-chart/PROMPT.md +0 -40
  117. package/slides/line-chart/index.tsx +0 -72
  118. package/slides/migration/PROMPT.md +0 -38
  119. package/slides/migration/index.tsx +0 -89
  120. package/slides/og-images/PROMPT.md +0 -21
  121. package/slides/og-images/index.tsx +0 -76
  122. package/slides/product-introduction/PROMPT.md +0 -24
  123. package/slides/product-introduction/index.tsx +0 -105
  124. package/slides/research-brief/PROMPT.md +0 -40
  125. package/slides/research-brief/index.tsx +0 -104
  126. package/slides/results-explanation/PROMPT.md +0 -32
  127. package/slides/results-explanation/index.tsx +0 -96
  128. package/slides/retrospective/PROMPT.md +0 -43
  129. package/slides/retrospective/index.tsx +0 -105
  130. package/slides/sankey/PROMPT.md +0 -11
  131. package/slides/sankey/index.tsx +0 -93
  132. package/slides/teaching/PROMPT.md +0 -45
  133. package/slides/teaching/index.tsx +0 -124
  134. package/slides/vertical-bar-charts/PROMPT.md +0 -13
  135. package/slides/vertical-bar-charts/index.tsx +0 -97
  136. package/src/app/App.tsx +0 -845
  137. package/src/components/BuildOrb.tsx +0 -40
  138. package/src/components/Canvas.tsx +0 -1191
  139. package/src/components/DiagramTypeIcon.tsx +0 -78
  140. package/src/components/InspectorPanel.tsx +0 -757
  141. package/src/components/LeftPanel.tsx +0 -120
  142. package/src/components/PageSizePicker.tsx +0 -30
  143. package/src/components/Presentation.tsx +0 -105
  144. package/src/components/RevisionNotes.tsx +0 -55
  145. package/src/components/RightPanel.tsx +0 -233
  146. package/src/components/VectorOverflowWarning.tsx +0 -73
  147. package/src/components/WorkspaceChrome.tsx +0 -316
  148. package/src/components/ui.tsx +0 -147
  149. package/src/lib/examples/react-page-migration.json +0 -1295
  150. package/src/lib/examples.ts +0 -42
  151. package/src/lib/export-png.ts +0 -104
  152. package/src/lib/file-session.ts +0 -87
  153. package/src/lib/history.ts +0 -53
  154. package/src/lib/model.ts +0 -188
  155. package/src/lib/page-size.ts +0 -24
  156. package/src/lib/presentation.ts +0 -17
  157. package/src/lib/review.ts +0 -26
  158. package/src/lib/storage.ts +0 -71
  159. package/src/lib/theme.ts +0 -25
  160. package/src/lib/use-file-session.ts +0 -249
  161. package/src/main.tsx +0 -29
  162. package/src/styles/canvas.css +0 -299
  163. package/src/styles/chrome.css +0 -475
  164. package/src/styles/component-previews.css +0 -386
  165. package/src/styles/left-panel.css +0 -187
  166. package/src/styles/presentation.css +0 -72
  167. package/src/styles/right-panel.css +0 -1298
@@ -1,475 +0,0 @@
1
- .component-dock {
2
- position: fixed;
3
- z-index: 40;
4
- display: flex;
5
- align-items: center;
6
- background: var(--ui-surface);
7
- border: 1px solid var(--ui-border);
8
- box-shadow: var(--ui-shadow);
9
- }
10
-
11
- .document-island {
12
- position: relative;
13
- z-index: 2;
14
- display: flex;
15
- align-items: center;
16
- flex: none;
17
- width: 100%;
18
- height: var(--panel-header-height);
19
- gap: 10px;
20
- padding: 8px 10px;
21
- border-bottom: 1px solid var(--ui-border);
22
- transition: border-bottom-color var(--panel-duration) var(--panel-easing);
23
- }
24
-
25
- .left-collapsed .document-island {
26
- border-bottom-color: transparent;
27
- }
28
-
29
- .document-island img {
30
- flex: none;
31
- width: 25px;
32
- height: 27px;
33
- object-fit: contain;
34
- }
35
-
36
- .document-title {
37
- min-width: 0;
38
- flex: 1;
39
- }
40
-
41
- .document-title input {
42
- height: 40px;
43
- border-color: transparent;
44
- background: transparent;
45
- font-size: 13px;
46
- font-weight: 500;
47
- text-overflow: ellipsis;
48
- }
49
-
50
- .document-title input:hover {
51
- border-color: transparent;
52
- background: var(--ui-hover);
53
- }
54
-
55
- .document-title input:focus {
56
- border-color: var(--ui-control);
57
- background: var(--ui-surface);
58
- }
59
-
60
- .document-title-error {
61
- position: absolute;
62
- top: calc(100% + 6px);
63
- right: 12px;
64
- padding: 5px 8px;
65
- border-radius: 4px;
66
- background: #fff1f1;
67
- color: #8d1717;
68
- font-size: 11px;
69
- box-shadow: 0 2px 8px #00000012;
70
- }
71
-
72
- .file-status {
73
- flex: none;
74
- display: inline-flex;
75
- align-items: center;
76
- width: 6px;
77
- gap: 5px;
78
- color: var(--ui-muted);
79
- font-size: 10px;
80
- transition: opacity var(--panel-duration) var(--panel-easing),
81
- width var(--panel-duration) var(--panel-easing),
82
- margin-right var(--panel-duration) var(--panel-easing), visibility 0s;
83
- }
84
-
85
- .left-collapsed .file-status {
86
- width: 0;
87
- margin-right: -10px;
88
- transition-delay: 0s, 0s, 0s, var(--panel-duration);
89
- }
90
-
91
- .file-status::before {
92
- width: 6px;
93
- height: 6px;
94
- border-radius: 50%;
95
- background: #3f875b;
96
- content: "";
97
- }
98
-
99
- .file-status.loading::before,
100
- .file-status.saving::before {
101
- background: #a27616;
102
- }
103
-
104
- .file-status.conflict,
105
- .file-status.error {
106
- color: #8d1717;
107
- }
108
-
109
- .file-status.conflict::before,
110
- .file-status.error::before {
111
- background: #b13d3d;
112
- }
113
-
114
- .action-island {
115
- position: relative;
116
- display: flex;
117
- align-items: center;
118
- flex: none;
119
- width: calc(var(--panel-width) - 2px);
120
- height: 54px;
121
- gap: 4px;
122
- padding: 7px;
123
- border-top: 1px solid var(--ui-border);
124
- }
125
-
126
- .action-island button {
127
- display: inline-flex;
128
- align-items: center;
129
- gap: 6px;
130
- height: 40px;
131
- padding: 0 12px;
132
- border-radius: 7px;
133
- border-color: transparent;
134
- background: transparent;
135
- font-size: 13px;
136
- font-weight: 500;
137
- }
138
-
139
- .action-island button:hover:not(:disabled) {
140
- border-color: transparent;
141
- background: var(--ui-hover);
142
- }
143
-
144
- .action-island button.icon-only {
145
- flex: none;
146
- width: 40px;
147
- padding: 0;
148
- justify-content: center;
149
- }
150
-
151
- .browser-menu {
152
- position: relative;
153
- min-width: 0;
154
- }
155
-
156
- .browser-menu::details-content {
157
- opacity: 0;
158
- transition: opacity 120ms ease-in, content-visibility 120ms allow-discrete;
159
- }
160
-
161
- .browser-menu[open]::details-content {
162
- opacity: 1;
163
- transition: opacity 180ms ease-out, content-visibility 180ms allow-discrete;
164
- }
165
-
166
- .browser-menu > summary {
167
- display: flex;
168
- align-items: center;
169
- justify-content: center;
170
- height: 40px;
171
- gap: 6px;
172
- padding: 0 12px;
173
- border-radius: 7px;
174
- cursor: pointer;
175
- font-size: 13px;
176
- font-weight: 500;
177
- list-style: none;
178
- white-space: nowrap;
179
- }
180
-
181
- .browser-menu > summary::-webkit-details-marker {
182
- display: none;
183
- }
184
-
185
- .browser-menu > summary svg {
186
- width: 14px;
187
- height: 14px;
188
- fill: none;
189
- stroke: currentColor;
190
- stroke-width: 1.5;
191
- stroke-linecap: round;
192
- stroke-linejoin: round;
193
- }
194
-
195
- .browser-menu[open] > summary svg {
196
- transform: rotate(180deg);
197
- }
198
-
199
- .browser-menu > summary:hover,
200
- .browser-menu[open] > summary {
201
- background: var(--ui-hover);
202
- }
203
-
204
- .browser-menu-popover {
205
- position: absolute;
206
- z-index: 3;
207
- bottom: calc(100% + 14px);
208
- left: -88px;
209
- display: grid;
210
- width: 320px;
211
- max-width: calc(100vw - 56px);
212
- max-height: calc(100dvh - var(--panel-top) - 164px);
213
- overflow-y: auto;
214
- overscroll-behavior: contain;
215
- scrollbar-width: thin;
216
- scrollbar-color: #d4d4d8 transparent;
217
- gap: 16px;
218
- padding: 16px;
219
- border: 1px solid var(--ui-border);
220
- border-radius: 12px;
221
- background: var(--ui-surface);
222
- box-shadow: var(--ui-shadow);
223
- transform: translateY(6px) scale(0.98);
224
- transform-origin: bottom center;
225
- transition: transform 120ms ease-in;
226
- }
227
-
228
- .browser-menu[open] .browser-menu-popover {
229
- transform: none;
230
- transition: transform 180ms ease-out;
231
- }
232
-
233
- @starting-style {
234
- .browser-menu[open]::details-content {
235
- opacity: 0;
236
- }
237
-
238
- .browser-menu[open] .browser-menu-popover {
239
- transform: translateY(6px) scale(0.98);
240
- }
241
- }
242
-
243
- .browser-menu-intro,
244
- .browser-agent-handoff {
245
- display: grid;
246
- gap: 6px;
247
- }
248
-
249
- .browser-menu-popover strong {
250
- font-size: 13px;
251
- font-weight: 600;
252
- }
253
-
254
- .browser-menu-intro > strong {
255
- font-size: 14px;
256
- }
257
-
258
- .browser-menu-popover p {
259
- color: var(--ui-muted);
260
- font-size: 12px;
261
- line-height: 1.5;
262
- overflow-wrap: anywhere;
263
- }
264
-
265
- .browser-menu-actions {
266
- display: grid;
267
- grid-template-columns: repeat(2, minmax(0, 1fr));
268
- gap: 6px;
269
- }
270
-
271
- .action-island .browser-menu-actions button {
272
- justify-content: center;
273
- min-width: 0;
274
- min-height: 40px;
275
- height: auto;
276
- padding: 8px;
277
- border-color: var(--ui-border);
278
- background: var(--ui-surface);
279
- font-size: 12px;
280
- }
281
-
282
- .action-island .browser-menu-actions button.secondary {
283
- color: var(--ui-muted);
284
- }
285
-
286
- .action-island .browser-menu-actions button:hover {
287
- background: var(--ui-hover);
288
- color: var(--ui-text);
289
- }
290
-
291
- .browser-agent-handoff {
292
- padding: 12px 12px 4px;
293
- border-radius: 8px;
294
- background: var(--ui-hover);
295
- }
296
-
297
- .browser-agent-handoff a {
298
- display: flex;
299
- align-items: center;
300
- justify-self: start;
301
- min-height: 40px;
302
- color: var(--accent);
303
- font-size: 12px;
304
- font-weight: 500;
305
- text-underline-offset: 3px;
306
- }
307
-
308
- .action-island button.primary {
309
- background: white;
310
- color: var(--ui-text);
311
- }
312
-
313
- .action-island button.primary:hover:not(:disabled) {
314
- background: var(--ui-hover);
315
- }
316
-
317
- .action-island button.primary:disabled {
318
- background: var(--ui-hover);
319
- color: var(--ui-muted);
320
- }
321
-
322
- .action-island .build-button {
323
- position: relative;
324
- overflow: hidden;
325
- justify-content: center;
326
- flex: none;
327
- padding-inline: 9px;
328
- white-space: nowrap;
329
- }
330
-
331
- .build-button .build-label {
332
- min-width: 11ch;
333
- text-align: left;
334
- }
335
-
336
- .action-island button.build-button.building {
337
- background: white;
338
- color: #2449aa;
339
- opacity: 1;
340
- cursor: wait;
341
- }
342
-
343
- .build-button.building .build-label {
344
- background: linear-gradient(110deg, #155e75 10%, #2449aa 30%, #a82d62 45%, #87bdeb 50%, #7535a5 55%, #155e75 80%);
345
- background-size: 250% 100%;
346
- background-clip: text;
347
- color: transparent;
348
- animation: build-colors 3s linear infinite;
349
- }
350
-
351
- .build-orb circle {
352
- fill: currentColor;
353
- stroke: none;
354
- transform: translate(var(--x), var(--y));
355
- }
356
- .build-orb.active circle {
357
- animation: orb-shape 8s ease-in-out infinite;
358
- }
359
- .build-orb.nebula {
360
- width: 100%;
361
- height: 100%;
362
- color: #4265ad;
363
- transform: rotate(-18deg);
364
- }
365
- .build-orb.nebula circle {
366
- animation: orb-sphere 12s ease-in-out infinite;
367
- animation-delay: var(--phase);
368
- }
369
- .build-orb.nebula circle:nth-child(3n) { fill: #9772bb; }
370
- .build-orb.nebula circle:nth-child(3n + 1) { fill: #198faa; }
371
-
372
- @keyframes orb-shape {
373
- 0%, 10%, 100% { transform: translate(var(--x), var(--y)); }
374
- 25%, 35% { transform: translate(var(--tx), var(--ty)); }
375
- 50%, 60% { transform: translate(var(--sx), var(--sy)); }
376
- 75%, 85% { transform: translate(var(--hx), var(--hy)); }
377
- }
378
- @keyframes orb-sphere {
379
- 0%, 100% { transform: translate(var(--radius), var(--y)); opacity: 0.5; }
380
- 25% { transform: translate(0, var(--y)); opacity: 1; }
381
- 50% { transform: translate(calc(-1 * var(--radius)), var(--y)); opacity: 0.5; }
382
- 75% { transform: translate(0, var(--y)); opacity: 0.15; }
383
- }
384
- @keyframes orb-turn {
385
- to { transform: rotate(360deg); }
386
- }
387
-
388
- @keyframes build-colors {
389
- to { background-position: 150% 0; }
390
- }
391
-
392
- @media (prefers-reduced-motion: reduce) {
393
- .browser-menu::details-content {
394
- transition: none !important;
395
- }
396
-
397
- .build-button.building .build-label,
398
- .build-orb.active circle,
399
- .build-orb.nebula circle,
400
- .build-orb.nebula,
401
- .build-nebula::before {
402
- animation: none;
403
- }
404
- }
405
-
406
- .action-island button svg {
407
- flex: none;
408
- width: 18px;
409
- height: 18px;
410
- fill: none;
411
- stroke: currentColor;
412
- stroke-linecap: round;
413
- stroke-linejoin: round;
414
- stroke-width: 1.7;
415
- }
416
-
417
- .action-island .build-button .build-orb {
418
- width: 20px;
419
- height: 20px;
420
- }
421
-
422
- .component-dock {
423
- bottom: 20px;
424
- left: 50%;
425
- min-height: 68px;
426
- gap: 2px;
427
- padding: 6px;
428
- border-radius: 16px;
429
- transform: translateX(-50%);
430
- }
431
-
432
- .component-dock button {
433
- display: grid;
434
- place-items: center;
435
- min-width: 62px;
436
- height: 54px;
437
- gap: 1px;
438
- padding: 4px 7px;
439
- border-color: transparent;
440
- border-radius: 10px;
441
- color: var(--ui-text);
442
- font-size: 11px;
443
- }
444
-
445
- .component-dock button.active {
446
- background: var(--ui-selected);
447
- color: #006aa1;
448
- }
449
-
450
- .dock-glyph {
451
- width: 22px;
452
- height: 22px;
453
- fill: none;
454
- stroke: currentColor;
455
- stroke-linecap: round;
456
- stroke-linejoin: round;
457
- stroke-width: 1.6;
458
- }
459
-
460
- @media (max-width: 1120px) {
461
- .component-dock button {
462
- min-width: 55px;
463
- }
464
- }
465
- @media (max-width: 600px) {
466
- .component-dock {
467
- width: calc(100% - 24px);
468
- }
469
- .component-dock button {
470
- flex: 1;
471
- min-width: 0;
472
- padding-inline: 3px;
473
- font-size: 10px;
474
- }
475
- }