konpeki 0.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.
Files changed (121) hide show
  1. package/.agents/skills/authoring-visuals/SKILL.md +82 -0
  2. package/AGENTS.md +33 -0
  3. package/AUTHORING.md +233 -0
  4. package/LICENSE +201 -0
  5. package/README.md +70 -0
  6. package/SETUP.md +86 -0
  7. package/composition/README.md +166 -0
  8. package/composition/compile.ts +227 -0
  9. package/composition/document.ts +709 -0
  10. package/composition/schema.json +2992 -0
  11. package/composition/schema.ts +435 -0
  12. package/composition/theme-tokens.ts +16 -0
  13. package/composition/types.ts +286 -0
  14. package/composition/validate.ts +684 -0
  15. package/composition/vector.ts +143 -0
  16. package/composition/visualizations.ts +335 -0
  17. package/design/README.md +17 -0
  18. package/design/palettes/README.md +14 -0
  19. package/design/palettes/base.ts +14 -0
  20. package/design/palettes/candidates.ts +19 -0
  21. package/design/palettes/index.ts +78 -0
  22. package/design/review/color-theme.md +44 -0
  23. package/design/review/layout.md +16 -0
  24. package/design/review/text.md +18 -0
  25. package/design/review/typography.md +15 -0
  26. package/design/review/visuals.md +31 -0
  27. package/design/semantic-patterns.md +43 -0
  28. package/design/themes/README.md +22 -0
  29. package/design/themes/index.ts +13 -0
  30. package/design/visual-languages/technical-product.md +17 -0
  31. package/design/visual-review.md +88 -0
  32. package/docs/development.md +140 -0
  33. package/docs/workflow.md +61 -0
  34. package/index.html +17 -0
  35. package/lib/assets.d.ts +8 -0
  36. package/lib/charts.ts +18 -0
  37. package/lib/contrast.ts +16 -0
  38. package/lib/layouts.ts +50 -0
  39. package/lib/slide.tsx +42 -0
  40. package/lib/taste.ts +17 -0
  41. package/lib/text.tsx +89 -0
  42. package/lib/typeface.ts +44 -0
  43. package/package.json +85 -0
  44. package/runtime/konpeki.mjs +1685 -0
  45. package/scripts/migrate-react-page.ts +120 -0
  46. package/slides/README.md +153 -0
  47. package/slides/architecture/PROMPT.md +31 -0
  48. package/slides/architecture/index.tsx +102 -0
  49. package/slides/article-brief/PROMPT.md +35 -0
  50. package/slides/article-brief/index.tsx +71 -0
  51. package/slides/bar-chart/PROMPT.md +39 -0
  52. package/slides/bar-chart/index.tsx +97 -0
  53. package/slides/comparison/PROMPT.md +29 -0
  54. package/slides/comparison/index.tsx +95 -0
  55. package/slides/decision-memo/PROMPT.md +34 -0
  56. package/slides/decision-memo/index.tsx +85 -0
  57. package/slides/delivery-plan/PROMPT.md +45 -0
  58. package/slides/delivery-plan/index.tsx +105 -0
  59. package/slides/experiment/PROMPT.md +44 -0
  60. package/slides/experiment/index.tsx +127 -0
  61. package/slides/incident-workflow/PROMPT.md +57 -0
  62. package/slides/incident-workflow/index.tsx +78 -0
  63. package/slides/introducing-konpeki/PROMPT.md +19 -0
  64. package/slides/introducing-konpeki/README.md +54 -0
  65. package/slides/introducing-konpeki/SOURCE.md +20 -0
  66. package/slides/introducing-konpeki/author.ts +163 -0
  67. package/slides/introducing-konpeki/composition.json +3265 -0
  68. package/slides/line-chart/PROMPT.md +40 -0
  69. package/slides/line-chart/index.tsx +72 -0
  70. package/slides/migration/PROMPT.md +38 -0
  71. package/slides/migration/index.tsx +89 -0
  72. package/slides/og-images/PROMPT.md +21 -0
  73. package/slides/og-images/index.tsx +76 -0
  74. package/slides/product-introduction/PROMPT.md +24 -0
  75. package/slides/product-introduction/index.tsx +105 -0
  76. package/slides/research-brief/PROMPT.md +40 -0
  77. package/slides/research-brief/index.tsx +104 -0
  78. package/slides/results-explanation/PROMPT.md +32 -0
  79. package/slides/results-explanation/index.tsx +96 -0
  80. package/slides/retrospective/PROMPT.md +43 -0
  81. package/slides/retrospective/index.tsx +105 -0
  82. package/slides/sankey/PROMPT.md +11 -0
  83. package/slides/sankey/index.tsx +93 -0
  84. package/slides/teaching/PROMPT.md +45 -0
  85. package/slides/teaching/index.tsx +124 -0
  86. package/slides/vertical-bar-charts/PROMPT.md +13 -0
  87. package/slides/vertical-bar-charts/index.tsx +97 -0
  88. package/src/app/App.tsx +694 -0
  89. package/src/assets/konpeki-mark.png +0 -0
  90. package/src/components/Canvas.tsx +1168 -0
  91. package/src/components/DiagramTypeIcon.tsx +78 -0
  92. package/src/components/InspectorPanel.tsx +687 -0
  93. package/src/components/LeftPanel.tsx +107 -0
  94. package/src/components/PageSizePicker.tsx +30 -0
  95. package/src/components/Presentation.tsx +105 -0
  96. package/src/components/RightPanel.tsx +201 -0
  97. package/src/components/VectorOverflowWarning.tsx +46 -0
  98. package/src/components/WorkspaceChrome.tsx +199 -0
  99. package/src/components/ui.tsx +53 -0
  100. package/src/lib/examples/react-page-migration.json +1295 -0
  101. package/src/lib/examples.ts +42 -0
  102. package/src/lib/export-png.ts +101 -0
  103. package/src/lib/file-session.ts +74 -0
  104. package/src/lib/history.ts +53 -0
  105. package/src/lib/model.ts +188 -0
  106. package/src/lib/page-size.ts +24 -0
  107. package/src/lib/presentation.ts +17 -0
  108. package/src/lib/storage.ts +43 -0
  109. package/src/lib/theme.ts +25 -0
  110. package/src/lib/use-file-session.ts +162 -0
  111. package/src/main.tsx +26 -0
  112. package/src/styles/base.css +105 -0
  113. package/src/styles/canvas.css +268 -0
  114. package/src/styles/chrome.css +214 -0
  115. package/src/styles/component-previews.css +386 -0
  116. package/src/styles/feedback.css +71 -0
  117. package/src/styles/left-panel.css +125 -0
  118. package/src/styles/presentation.css +72 -0
  119. package/src/styles/right-panel.css +1172 -0
  120. package/src/styles/shell.css +247 -0
  121. package/vite.config.ts +6 -0
@@ -0,0 +1,247 @@
1
+ .skip-link {
2
+ position: fixed;
3
+ top: -60px;
4
+ left: 12px;
5
+ background: white;
6
+ padding: 10px;
7
+ z-index: 100;
8
+ color: var(--accent);
9
+ }
10
+ .skip-link:focus {
11
+ top: 8px;
12
+ }
13
+ .workspace {
14
+ position: relative;
15
+ height: 100dvh;
16
+ min-height: 100dvh;
17
+ min-width: 1000px;
18
+ overflow: hidden;
19
+ background: var(--ui-bg);
20
+ }
21
+ .left-panel,
22
+ .right-panel {
23
+ position: fixed;
24
+ top: 92px;
25
+ bottom: 92px;
26
+ z-index: 30;
27
+ background: var(--ui-surface);
28
+ min-height: 0;
29
+ border: 1px solid var(--ui-border);
30
+ border-radius: 12px;
31
+ box-shadow: var(--ui-shadow);
32
+ }
33
+ .left-panel {
34
+ top: 76px;
35
+ bottom: 148px;
36
+ left: 20px;
37
+ width: 252px;
38
+ border-top: 0;
39
+ border-bottom: 0;
40
+ border-radius: 0;
41
+ display: flex;
42
+ flex-direction: column;
43
+ overflow: hidden;
44
+ }
45
+ .right-panel {
46
+ top: 20px;
47
+ right: 20px;
48
+ display: flex;
49
+ flex-direction: column;
50
+ width: 328px;
51
+ overflow: hidden;
52
+ }
53
+ .right-panel.collapsed {
54
+ bottom: auto;
55
+ width: 50px;
56
+ height: 56px;
57
+ }
58
+ .right-panel.collapsed > .panel-toolbar {
59
+ height: 54px;
60
+ justify-content: flex-end;
61
+ padding: 0 8px;
62
+ border-bottom: 0;
63
+ }
64
+ .right-panel.collapsed .panel-tabs,
65
+ .right-panel.collapsed .right-panel-body {
66
+ display: none;
67
+ }
68
+ .right-panel-body {
69
+ display: flex;
70
+ flex-direction: column;
71
+ flex: 1;
72
+ min-height: 0;
73
+ }
74
+ .left-panel.collapsed {
75
+ visibility: hidden;
76
+ }
77
+ .panel-toolbar {
78
+ position: sticky;
79
+ top: 0;
80
+ z-index: 2;
81
+ display: flex;
82
+ align-items: center;
83
+ gap: 8px;
84
+ height: 48px;
85
+ background: var(--ui-surface);
86
+ border-bottom: 1px solid var(--ui-border);
87
+ }
88
+ .left-panel > .panel-toolbar {
89
+ flex: none;
90
+ padding: 0 8px 0 16px;
91
+ border-bottom: 0;
92
+ }
93
+ .right-panel > .panel-toolbar {
94
+ flex: none;
95
+ height: 55px;
96
+ padding: 0 8px 0 12px;
97
+ }
98
+ .panel-heading {
99
+ flex: 1;
100
+ color: var(--ui-text);
101
+ font-size: 13px;
102
+ font-weight: 500;
103
+ }
104
+ .panel-toggle {
105
+ flex: none;
106
+ width: 30px;
107
+ height: 30px;
108
+ padding: 0;
109
+ border: 0;
110
+ border-radius: 6px;
111
+ border-color: transparent;
112
+ box-shadow: none;
113
+ }
114
+ .panel-toggle:hover:not(:disabled) {
115
+ border-color: transparent;
116
+ background: var(--ui-hover);
117
+ }
118
+ .panel-close-icon,
119
+ .panel-collapse-icon {
120
+ position: relative;
121
+ display: block;
122
+ width: 14px;
123
+ height: 14px;
124
+ margin: auto;
125
+ }
126
+ .panel-collapse-icon {
127
+ width: 18px;
128
+ height: 18px;
129
+ fill: none;
130
+ stroke: currentColor;
131
+ stroke-linecap: round;
132
+ stroke-linejoin: round;
133
+ stroke-width: 1.7;
134
+ }
135
+ .panel-close-icon::before,
136
+ .panel-close-icon::after {
137
+ position: absolute;
138
+ top: 6px;
139
+ left: 1px;
140
+ width: 12px;
141
+ height: 1.5px;
142
+ border-radius: 1px;
143
+ background: currentColor;
144
+ content: "";
145
+ }
146
+ .panel-close-icon::before {
147
+ transform: rotate(45deg);
148
+ }
149
+ .panel-close-icon::after {
150
+ transform: rotate(-45deg);
151
+ }
152
+ .panel-tabs {
153
+ flex: 1;
154
+ display: flex;
155
+ align-self: stretch;
156
+ min-width: 0;
157
+ justify-content: flex-start;
158
+ gap: 20px;
159
+ }
160
+ .left-panel .panel-tabs {
161
+ gap: 4px;
162
+ }
163
+ .left-panel .panel-tabs button {
164
+ padding-inline: 1px;
165
+ font-size: 12px;
166
+ }
167
+ .panel-tabs button {
168
+ position: relative;
169
+ border: 0;
170
+ border-radius: 0;
171
+ padding: 0 2px;
172
+ background: transparent;
173
+ color: var(--ui-muted);
174
+ font-size: 13px;
175
+ font-weight: 500;
176
+ }
177
+ .panel-tabs button:hover:not(:disabled) {
178
+ border-color: transparent;
179
+ background: transparent;
180
+ color: var(--ui-text);
181
+ }
182
+ .panel-tabs button.active {
183
+ background: transparent;
184
+ color: var(--ui-text);
185
+ box-shadow: none;
186
+ }
187
+ .panel-tabs button.active::after {
188
+ position: absolute;
189
+ right: 0;
190
+ bottom: -1px;
191
+ left: 0;
192
+ height: 2px;
193
+ background: var(--ui-text);
194
+ content: "";
195
+ }
196
+ .stage {
197
+ position: absolute;
198
+ inset: 0;
199
+ padding: 112px 376px 110px 292px;
200
+ display: flex;
201
+ align-items: center;
202
+ justify-content: center;
203
+ min-width: 0;
204
+ }
205
+ .workspace.left-collapsed .stage {
206
+ padding-left: 96px;
207
+ }
208
+ .workspace.right-collapsed .stage {
209
+ padding-right: 96px;
210
+ }
211
+ .slide-wrap {
212
+ width: 100%;
213
+ max-width: min(1200px, calc((100vh - 270px) * var(--page-ratio)));
214
+ }
215
+ .stage-meta {
216
+ display: flex;
217
+ align-items: baseline;
218
+ justify-content: space-between;
219
+ gap: 16px;
220
+ min-height: 26px;
221
+ margin: 0 0 12px;
222
+ }
223
+ .edit-elements-action {
224
+ flex-shrink: 0;
225
+ min-height: 26px;
226
+ padding: 3px 8px;
227
+ font-size: 12px;
228
+ }
229
+ .stage-meta h2 {
230
+ font-size: 12px;
231
+ font-weight: 500;
232
+ color: var(--ui-muted);
233
+ margin: 0;
234
+ cursor: text;
235
+ }
236
+ .stage-meta input {
237
+ width: min(240px, 100%);
238
+ height: 26px;
239
+ padding: 3px 6px;
240
+ font-size: 12px;
241
+ }
242
+ @media (max-width: 1200px) {
243
+ .stage {
244
+ padding-right: 352px;
245
+ padding-left: 276px;
246
+ }
247
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from "vite";
2
+ export default defineConfig({
3
+ base: "./",
4
+ server: { host: "0.0.0.0", allowedHosts: [".onamp.dev"] },
5
+ preview: { host: "0.0.0.0", allowedHosts: [".onamp.dev"] },
6
+ });