konpeki 0.2.0 → 0.3.1

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 (52) hide show
  1. package/AGENTS.md +1 -1
  2. package/CONTRIBUTING.md +36 -0
  3. package/README.md +81 -28
  4. package/SECURITY.md +22 -0
  5. package/SETUP.md +128 -51
  6. package/composition/README.md +16 -3
  7. package/composition/compile.ts +1 -1
  8. package/composition/schema.json +9 -0
  9. package/composition/schema.ts +3 -1
  10. package/composition/types.ts +3 -1
  11. package/design/themes/README.md +25 -7
  12. package/design/themes/index.ts +15 -4
  13. package/docs/development.md +79 -11
  14. package/docs/workflow.md +11 -4
  15. package/index.html +17 -1
  16. package/package.json +10 -2
  17. package/plugin.json +22 -0
  18. package/public/og.png +0 -0
  19. package/runtime/konpeki.mjs +41 -13
  20. package/skills/konpeki/SKILL.md +186 -0
  21. package/skills/konpeki/assets/blank.json +23 -0
  22. package/skills/konpeki/scripts/ensure-runtime.mjs +69 -0
  23. package/skills/konpeki/scripts/prepare-document.mjs +40 -0
  24. package/slides/README.md +35 -132
  25. package/slides/drawing-references.md +32 -0
  26. package/slides/github-cover/PROMPT.md +21 -0
  27. package/slides/github-cover/README.md +21 -0
  28. package/slides/github-cover/author.ts +67 -0
  29. package/slides/github-cover/composition.json +595 -0
  30. package/slides/introducing-konpeki/PROMPT.md +25 -14
  31. package/slides/introducing-konpeki/README.md +32 -42
  32. package/slides/introducing-konpeki/SOURCE.md +13 -14
  33. package/slides/introducing-konpeki/author.ts +44 -42
  34. package/slides/introducing-konpeki/composition.json +135 -135
  35. package/src/app/App.tsx +149 -56
  36. package/src/components/Canvas.tsx +9 -3
  37. package/src/components/InspectorPanel.tsx +104 -67
  38. package/src/components/RevisionNotes.tsx +6 -7
  39. package/src/components/RightPanel.tsx +42 -10
  40. package/src/components/VectorOverflowWarning.tsx +35 -8
  41. package/src/components/WorkspaceChrome.tsx +125 -10
  42. package/src/components/ui.tsx +95 -1
  43. package/src/lib/storage.ts +38 -10
  44. package/src/lib/use-file-session.ts +60 -38
  45. package/src/main.tsx +3 -0
  46. package/src/styles/base.css +7 -0
  47. package/src/styles/chrome.css +188 -25
  48. package/src/styles/feedback.css +101 -49
  49. package/src/styles/left-panel.css +27 -6
  50. package/src/styles/right-panel.css +114 -30
  51. package/src/styles/shell.css +96 -33
  52. package/.agents/skills/authoring-visuals/SKILL.md +0 -93
@@ -0,0 +1,40 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
3
+ import { dirname, resolve } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ try {
7
+ const [cli, input, ...extra] = process.argv.slice(2);
8
+ if (!cli || !input || extra.length)
9
+ throw new Error("Usage: node prepare-document.mjs <cli> <composition.json>");
10
+ const compositionPath = resolve(input);
11
+ function validate(path) {
12
+ // Use the published JS CLI, not TypeScript imports from node_modules.
13
+ const result = spawnSync(process.execPath, [cli, "validate", path], {
14
+ stdio: ["ignore", 2, 2],
15
+ });
16
+ if (result.error || result.status !== 0)
17
+ throw new Error("Document validation failed; existing files were not changed.");
18
+ }
19
+ let created = false;
20
+ if (!existsSync(compositionPath)) {
21
+ if (existsSync(`${compositionPath}.review.json`))
22
+ throw new Error("Review data exists without its composition. Restore the document or choose a new path.");
23
+ const template = fileURLToPath(new URL("../assets/blank.json", import.meta.url));
24
+ validate(template);
25
+ const blank = readFileSync(template);
26
+ mkdirSync(dirname(compositionPath), { recursive: true });
27
+ try {
28
+ writeFileSync(compositionPath, blank, { flag: "wx" });
29
+ created = true;
30
+ } catch (error) {
31
+ // Another initializer may have created it; reopen, never replace it.
32
+ if (error.code !== "EEXIST") throw error;
33
+ }
34
+ }
35
+ validate(compositionPath);
36
+ console.log(JSON.stringify({ compositionPath, created }));
37
+ } catch (error) {
38
+ console.error(error.message);
39
+ process.exitCode = 1;
40
+ }
package/slides/README.md CHANGED
@@ -1,153 +1,56 @@
1
- # Decks and examples
1
+ # What can I make with Konpeki?
2
2
 
3
- The image gallery below is for the repository checkout. The npm package includes
4
- editable examples and prompts but omits gallery PNGs; view this page and its
5
- screenshots in the repository, or render the source locally.
3
+ Reviewed examples with editable text and vector artwork. Scenarios and data
4
+ are illustrative; these are finished documents, not one-click templates.
6
5
 
7
- ## Introducing Konpeki
6
+ Download an example's JSON and choose **Demo Mode → Import** in the
7
+ [playground](https://vcfgdev.github.io/konpeki/). For revision notes and agent
8
+ handoff, open it in a [file-backed preview](../docs/workflow.md#file-backed-editing-with-an-agent).
9
+ Playground edits stay in your browser.
8
10
 
9
- [Introducing Konpeki](introducing-konpeki/README.md) is a six-slide factual product
10
- introduction authored in the shared canvas's editable composition format.
11
- Open `?example=introducing-konpeki` in the running application, or download
12
- its [composition JSON](introducing-konpeki/composition.json) and use **Open**.
11
+ ## Explain a system
13
12
 
14
- ## Retained drawing references
13
+ An order platform's request handling, data, events and fulfillment.
15
14
 
16
- Each retained example contains its approved `PROMPT.md`, editable `index.tsx`, and final
17
- PNGs in `screenshots/`. Generation logs, environment records, review reports and
18
- superseded captures are not included. Subjects and datasets in these retained
19
- references are fictional; they are not another presentation runtime.
15
+ [Editable JSON](gallery/architecture.json) ·
16
+ [Brief](gallery/PROMPT.md#architecture) · [Source](gallery/SOURCE.md#architecture)
20
17
 
21
- ## Representative charts
18
+ ![Editable order-platform architecture](gallery/architecture.png)
22
19
 
23
- ### Line chart — Tide, page 1
20
+ ## Communicate data
24
21
 
25
- Two time series on a shared scale, direct labels, a target line, an event marker
26
- and an explicit gap for missing data. [Editable source](line-chart/index.tsx).
22
+ A proportional Sankey follows 1,000 trial users through activation and outcomes.
27
23
 
28
- ![Line chart with a target and missing-data gap](line-chart/screenshots/page-1.png)
24
+ [Editable JSON](gallery/sankey.json) ·
25
+ [Brief](gallery/PROMPT.md#sankey) · [Source](gallery/SOURCE.md#sankey)
29
26
 
30
- ### Grouped bar chart — Birch, page 1
27
+ ![Editable trial-user flow with proportional ribbons](gallery/sankey.png)
31
28
 
32
- Horizontal before/after bars with a shared zero baseline and direct values.
33
- [Editable source](bar-chart/index.tsx).
29
+ ## Announce a release
34
30
 
35
- ![Grouped horizontal before-and-after bars](bar-chart/screenshots/page-1.png)
31
+ A 1080×1350 Clearpath release announcement: preview, review and export Markdown.
36
32
 
37
- ### Vertical bar chart — Fieldnote, page 1
33
+ [Editable JSON](gallery/release.json) ·
34
+ [Brief](gallery/PROMPT.md#release) · [Source](gallery/SOURCE.md#release)
38
35
 
39
- Zero-based columns compare processing throughput with direct values.
40
- [Editable source](vertical-bar-charts/index.tsx).
36
+ ![Clearpath portrait announcement](gallery/release.png)
41
37
 
42
- ![Vertical bars comparing indexing throughput](vertical-bar-charts/screenshots/page-1.png)
38
+ ## Teach a concept
43
39
 
44
- ### Two charts side by side — Fieldnote, page 2
40
+ A 1200×1600 Folio explainer shows a stale save, its rejection and recovery choices.
45
41
 
46
- Throughput on the left and visibility delay on the right show the trade-off,
47
- with separate units, zero-based scales and acceptance thresholds.
48
- [Editable source](vertical-bar-charts/index.tsx).
42
+ [Editable JSON](gallery/explainer.json) ·
43
+ [Brief](gallery/PROMPT.md#explainer) · [Source](gallery/SOURCE.md#explainer)
49
44
 
50
- ![Side-by-side throughput and visibility-delay bar charts](vertical-bar-charts/screenshots/page-2.png)
45
+ ![Folio optimistic-concurrency explainer](gallery/explainer.png)
51
46
 
52
- ### Stacked bar chart — Fern, page 1
47
+ ## More examples
53
48
 
54
- Direct-count segments compare completion before and after a hint, with the same
55
- denominator for every task. [Editable source](research-brief/index.tsx).
49
+ - [Introducing Konpeki](introducing-konpeki/README.md): six-page product overview.
50
+ - [Repository cover](github-cover/README.md): 1280×640 social preview.
51
+ - [React/SVG drawing references](drawing-references.md): 18 older examples, not editor-importable documents.
56
52
 
57
- ![Stacked bars showing task completion counts](research-brief/screenshots/page-1.png)
58
-
59
- ## Representative content layouts
60
-
61
- ### Two columns — Fern, page 2
62
-
63
- Parallel columns separate observed evidence from researchers' interpretations.
64
- [Editable source](research-brief/index.tsx).
65
-
66
- ![Two-column observations and interpretations](research-brief/screenshots/page-2.png)
67
-
68
- ### Three columns — Lantern, page 2
69
-
70
- Three aligned time-based columns distinguish rollback, partial recovery and
71
- backlog clearance. [Editable source](incident-workflow/index.tsx).
72
-
73
- ![Three-column incident recovery stages](incident-workflow/screenshots/page-2.png)
74
-
75
- ### Main panel and sidebar — Patchnote, page 2
76
-
77
- A large illustrative draft panel pairs with a narrower human-review checklist.
78
- [Editable source](product-introduction/index.tsx).
79
-
80
- ![Draft interface with a review sidebar](product-introduction/screenshots/page-2.png)
81
-
82
- ## Representative diagrams and structured information
83
-
84
- ### Architecture diagram — Parcel Relay, page 1
85
-
86
- Named components and attached connectors explain acceptance and delivery.
87
- [Editable source](architecture/index.tsx).
88
-
89
- ![Event acceptance and delivery architecture](architecture/screenshots/page-1.png)
90
-
91
- ### Sequence diagram — Parcel Relay, page 3
92
-
93
- Two participant lifelines show a lost response and retry of the same event.
94
- [Editable source](architecture/index.tsx).
95
-
96
- ![Timeout and retry sequence diagram](architecture/screenshots/page-3.png)
97
-
98
- ### Gantt chart — Harbor, page 1
99
-
100
- A shared calendar axis compares baseline, completed and forecast work, with
101
- dependencies and release gates. [Editable source](delivery-plan/index.tsx).
102
-
103
- ![Gantt chart with dependencies and gates](delivery-plan/screenshots/page-1.png)
104
-
105
- ### Sankey chart — Brook, page 1
106
-
107
- Proportional flows carry 120 tickets from intake through handling to outcomes,
108
- with direct counts and conservation at each stage.
109
- [Editable source](sankey/index.tsx).
110
-
111
- ![Sankey chart of support ticket routing and outcomes](sankey/screenshots/page-1.png)
112
-
113
- ### Evidence table — Harbor, page 2
114
-
115
- Aligned stage–evidence rows use horizontal rules to make gate requirements easy
116
- to compare. [Editable source](delivery-plan/index.tsx).
117
-
118
- ![Stage and evidence requirements table](delivery-plan/screenshots/page-2.png)
119
-
120
- ## All examples
121
-
122
- The selections above demonstrate distinct visual patterns rather than ranking
123
- decks. All final screenshots remain available below.
124
-
125
- | Example | Prompt | Final screenshots |
126
- | --- | --- | --- |
127
- | Patchnote — product introduction | [Prompt](product-introduction/PROMPT.md) | [Images](product-introduction/screenshots/) |
128
- | Parcel Relay — architecture | [Prompt](architecture/PROMPT.md) | [Images](architecture/screenshots/) |
129
- | Fieldnote — experiment | [Prompt](experiment/PROMPT.md) | [Images](experiment/screenshots/) |
130
- | Lantern — incident workflow | [Prompt](incident-workflow/PROMPT.md) | [Images](incident-workflow/screenshots/) |
131
- | Moss — comparison | [Prompt](comparison/PROMPT.md) | [Images](comparison/screenshots/) |
132
- | Juniper — migration | [Prompt](migration/PROMPT.md) | [Images](migration/screenshots/) |
133
- | Clearpath — OG images | [Prompt](og-images/PROMPT.md) | [Images](og-images/screenshots/) |
134
- | Alder — article briefing | [Prompt](article-brief/PROMPT.md) | [Images](article-brief/screenshots/) |
135
- | Waymark — results explanation | [Prompt](results-explanation/PROMPT.md) | [Images](results-explanation/screenshots/) |
136
- | Dockline — retrospective | [Prompt](retrospective/PROMPT.md) | [Images](retrospective/screenshots/) |
137
- | Fern — research briefing | [Prompt](research-brief/PROMPT.md) | [Images](research-brief/screenshots/) |
138
- | Cedar Support — decision memo | [Prompt](decision-memo/PROMPT.md) | [Images](decision-memo/screenshots/) |
139
- | Harbor — delivery plan | [Prompt](delivery-plan/PROMPT.md) | [Images](delivery-plan/screenshots/) |
140
- | Folio — teaching | [Prompt](teaching/PROMPT.md) | [Images](teaching/screenshots/) |
141
- | Tide — line chart | [Prompt](line-chart/PROMPT.md) | [Images](line-chart/screenshots/) |
142
- | Birch — bar chart | [Prompt](bar-chart/PROMPT.md) | [Images](bar-chart/screenshots/) |
143
- | Fieldnote — vertical and paired bar charts | [Prompt](vertical-bar-charts/PROMPT.md) | [Images](vertical-bar-charts/screenshots/) |
144
- | Brook — Sankey chart | [Prompt](sankey/PROMPT.md) | [Images](sankey/screenshots/) |
145
-
146
- The `index.tsx` files are retained presentation-runtime-independent React/SVG
147
- drawing references, not runnable routes or a second deck format. Agents can
148
- inspect and adapt their techniques, then convert supported SVG primitives into
149
- editable vector elements in the owning composition component.
150
- Shared authoring resources live in `design/` and `lib/`.
151
-
152
- Screenshots reflect the final reviewed browser renders, including manual repairs.
153
- They do not establish PDF/PPTX, cross-browser or cross-application fidelity.
53
+ These four gallery exports are repository-only; their authoring projects are
54
+ maintained separately. They are not bundled in npm or the hosted playground.
55
+ The introduction and cover JSONs are included in npm; the playground bundles
56
+ the introduction. View this gallery in the repository for its screenshots.
@@ -0,0 +1,32 @@
1
+ # React/SVG drawing references
2
+
3
+ These 18 fictional examples preserve the earlier authoring approach: React/SVG
4
+ source, original briefs and reviewed screenshots. Use them for drawing, typography
5
+ and layout techniques; **they cannot be imported directly into the editor**.
6
+ For editable documents, see the [native gallery](README.md).
7
+
8
+ To adapt trusted source, follow the [conversion guide](../docs/development.md#reactsvg-drawing-references)
9
+ and inspect the result in the canvas. These files are not runnable app routes.
10
+ npm includes source and briefs; screenshots remain in the repository and show
11
+ the historical browser renders, not export or cross-application fidelity.
12
+
13
+ | Example / source | Brief | Screenshots |
14
+ | --- | --- | --- |
15
+ | [Patchnote — product introduction](product-introduction/index.tsx) | [Brief](product-introduction/PROMPT.md) | [Images](product-introduction/screenshots/) |
16
+ | [Parcel Relay — architecture and sequence](architecture/index.tsx) | [Brief](architecture/PROMPT.md) | [Images](architecture/screenshots/) |
17
+ | [Fieldnote — experiment](experiment/index.tsx) | [Brief](experiment/PROMPT.md) | [Images](experiment/screenshots/) |
18
+ | [Lantern — incident workflow](incident-workflow/index.tsx) | [Brief](incident-workflow/PROMPT.md) | [Images](incident-workflow/screenshots/) |
19
+ | [Moss — comparison](comparison/index.tsx) | [Brief](comparison/PROMPT.md) | [Images](comparison/screenshots/) |
20
+ | [Juniper — migration](migration/index.tsx) | [Brief](migration/PROMPT.md) | [Images](migration/screenshots/) |
21
+ | [Clearpath — OG images](og-images/index.tsx) | [Brief](og-images/PROMPT.md) | [Images](og-images/screenshots/) |
22
+ | [Alder — article briefing](article-brief/index.tsx) | [Brief](article-brief/PROMPT.md) | [Images](article-brief/screenshots/) |
23
+ | [Waymark — results explanation](results-explanation/index.tsx) | [Brief](results-explanation/PROMPT.md) | [Images](results-explanation/screenshots/) |
24
+ | [Dockline — retrospective](retrospective/index.tsx) | [Brief](retrospective/PROMPT.md) | [Images](retrospective/screenshots/) |
25
+ | [Fern — research and stacked bars](research-brief/index.tsx) | [Brief](research-brief/PROMPT.md) | [Images](research-brief/screenshots/) |
26
+ | [Cedar Support — decision memo](decision-memo/index.tsx) | [Brief](decision-memo/PROMPT.md) | [Images](decision-memo/screenshots/) |
27
+ | [Harbor — delivery plan and Gantt](delivery-plan/index.tsx) | [Brief](delivery-plan/PROMPT.md) | [Images](delivery-plan/screenshots/) |
28
+ | [Folio — teaching](teaching/index.tsx) | [Brief](teaching/PROMPT.md) | [Images](teaching/screenshots/) |
29
+ | [Tide — line chart](line-chart/index.tsx) | [Brief](line-chart/PROMPT.md) | [Images](line-chart/screenshots/) |
30
+ | [Birch — grouped bar chart](bar-chart/index.tsx) | [Brief](bar-chart/PROMPT.md) | [Images](bar-chart/screenshots/) |
31
+ | [Fieldnote — vertical and paired bars](vertical-bar-charts/index.tsx) | [Brief](vertical-bar-charts/PROMPT.md) | [Images](vertical-bar-charts/screenshots/) |
32
+ | [Brook — Sankey chart](sankey/index.tsx) | [Brief](sankey/PROMPT.md) | [Images](sankey/screenshots/) |
@@ -0,0 +1,21 @@
1
+ # Brief
2
+
3
+ > i'd like a cover image for github repo. build it with konpeki
4
+
5
+ ## Adaptation
6
+
7
+ - Assumed a 1280×640 GitHub social preview; unspecified mode resolved to default.
8
+ - Use the existing blue mark, white canvas and IBM Plex Sans. Lead with “Konpeki”
9
+ and “Create clear visuals with your coding agent.”
10
+ - Arrange different canvas sizes on a consistent grid, with white backgrounds
11
+ and text, image, chart, diagram and table motifs. Avoid labels or a single
12
+ workflow that suggests these are the only possible outputs.
13
+ - A generated concept informed placement; the final uses editable text and
14
+ vectors, not a flattened concept image.
15
+
16
+ ## Sources
17
+
18
+ - Product: [README](../../README.md) and [workflow](../../docs/workflow.md).
19
+ - Brand: [project mark](../../src/assets/konpeki-mark.png) and bundled IBM Plex
20
+ Sans under its existing font license.
21
+ - Canvas motifs are conceptual, not screenshots.
@@ -0,0 +1,21 @@
1
+ # GitHub repository cover
2
+
3
+ [composition.json](composition.json) holds the editable text and vectors;
4
+ [cover.png](cover.png) is its 1280×640 Konpeki PNG export.
5
+ The varied canvas sizes illustrate possible formats, not a fixed workflow.
6
+
7
+ Open from the repository root, edit, then choose **Export PNG**:
8
+
9
+ ```sh
10
+ mise exec -- pnpm konpeki preview slides/github-cover/composition.json
11
+ ```
12
+
13
+ Refresh [public/og.png](../../public/og.png) for the playground's social cards.
14
+ Uploading the cover to GitHub's repository social-preview setting is separate.
15
+
16
+ [Brief and sources](PROMPT.md). [author.ts](author.ts) reconstructs the initial
17
+ composition using Node.js and ImageMagick; **it overwrites canvas edits**.
18
+
19
+ Original review: validation, typecheck and build passed; all five components and
20
+ IBM Plex Sans loaded. Inspected the 1280×640 export and a 640×320 copy for alignment,
21
+ clipping and legibility.
@@ -0,0 +1,67 @@
1
+ import {execFileSync} from 'node:child_process';
2
+ import {writeFileSync} from 'node:fs';
3
+ import {fileURLToPath} from 'node:url';
4
+ import {assertComposition} from '../../composition/validate.ts';
5
+ import {compositionSchema, type CompositionComponent, type CompositionDocument, type VectorElement} from '../../composition/types.ts';
6
+
7
+ // Reproduce the existing mark's alpha silhouette as editable vector geometry.
8
+ const mask=execFileSync('magick',[fileURLToPath(new URL('../../src/assets/konpeki-mark.png',import.meta.url)),'-alpha','extract','-threshold','50%','-depth','8','gray:-']);
9
+ let outline='';
10
+ for(let y=0;y<128;y++)for(let x=0;x<128;x++){
11
+ if(mask[y*128+x]<128)continue;
12
+ const start=x;
13
+ while(x+1<128&&mask[y*128+x+1]>=128)x++;
14
+ outline+=`M${start} ${y}h${x-start+1}v1H${start}Z`;
15
+ }
16
+ const ink='#202630',blue='#007fb5',lightGray='#b2bdc2';
17
+ const text=(id:string,content:string,x:number,y:number,width:number,height:number,size:number,weight:400|600=600):CompositionComponent=>({
18
+ id,kind:'text-block',content,slotIds:[`${id}-content`],preferredRect:{x,y,width,height},
19
+ textStyle:{size,weight,lineHeight:1.18,color:'ink',font:'heading'},
20
+ appearance:{role:id==='brand'?'title':'body',alignment:'start',border:'none',rule:'none'},
21
+ });
22
+ const elements:VectorElement[]=[
23
+ {id:'cover-frame',kind:'rect',attributes:{x:10,y:8,width:260,height:140,rx:8,fill:'#ffffff',stroke:blue,'stroke-width':2.5}},
24
+ {id:'cover-mark',kind:'rect',attributes:{x:28,y:28,width:42,height:42,rx:4,fill:blue}},
25
+ {id:'cover-title',kind:'rect',attributes:{x:86,y:29,width:144,height:13,rx:3,fill:lightGray}},
26
+ {id:'cover-copy-1',kind:'rect',attributes:{x:86,y:53,width:112,height:7,rx:3,fill:lightGray}},
27
+ {id:'cover-copy-2',kind:'rect',attributes:{x:28,y:102,width:164,height:7,rx:3,fill:lightGray}},
28
+ {id:'cover-accent',kind:'rect',attributes:{x:211,y:96,width:39,height:28,rx:4,fill:'#eaf6fb'}},
29
+ {id:'square-frame',kind:'rect',attributes:{x:292,y:8,width:140,height:140,rx:8,fill:'#ffffff',stroke:blue,'stroke-width':2.5}},
30
+ {id:'square-title',kind:'rect',attributes:{x:311,y:28,width:82,height:10,rx:3,fill:lightGray}},
31
+ {id:'square-bar-1',kind:'rect',attributes:{x:314,y:93,width:18,height:31,rx:3,fill:blue}},
32
+ {id:'square-bar-2',kind:'rect',attributes:{x:342,y:72,width:18,height:52,rx:3,fill:'#5cb9df'}},
33
+ {id:'square-bar-3',kind:'rect',attributes:{x:370,y:52,width:18,height:72,rx:3,fill:'#9adbed'}},
34
+ {id:'square-baseline',kind:'path',attributes:{d:'M307 126H410',fill:'none',stroke:lightGray,'stroke-width':2}},
35
+ {id:'portrait-frame',kind:'rect',attributes:{x:10,y:172,width:145,height:230,rx:8,fill:'#ffffff',stroke:blue,'stroke-width':2.5}},
36
+ {id:'portrait-title',kind:'rect',attributes:{x:28,y:193,width:94,height:11,rx:3,fill:lightGray}},
37
+ {id:'portrait-visual',kind:'rect',attributes:{x:28,y:224,width:109,height:81,rx:5,fill:'#eaf6fb'}},
38
+ {id:'portrait-rule',kind:'path',attributes:{d:'M45 285L76 247 96 270 122 236',fill:'none',stroke:blue,'stroke-width':4}},
39
+ {id:'portrait-copy-1',kind:'rect',attributes:{x:28,y:326,width:92,height:7,rx:3,fill:lightGray}},
40
+ {id:'portrait-copy-2',kind:'rect',attributes:{x:28,y:344,width:108,height:7,rx:3,fill:lightGray}},
41
+ {id:'portrait-copy-3',kind:'rect',attributes:{x:28,y:362,width:74,height:7,rx:3,fill:lightGray}},
42
+ {id:'slide-frame',kind:'rect',attributes:{x:180,y:172,width:252,height:144,rx:8,fill:'#ffffff',stroke:blue,'stroke-width':2.5}},
43
+ {id:'slide-title',kind:'rect',attributes:{x:199,y:190,width:115,height:11,rx:3,fill:lightGray}},
44
+ {id:'diagram-path',kind:'path',attributes:{d:'M305 251V270H231V278M305 270H379V278',fill:'none',stroke:lightGray,'stroke-width':3}},
45
+ {id:'diagram-parent',kind:'rect',attributes:{x:284,y:215,width:42,height:36,rx:7,fill:blue}},
46
+ {id:'diagram-child-1',kind:'rect',attributes:{x:210,y:278,width:42,height:25,rx:6,fill:'#eaf6fb',stroke:blue,'stroke-width':2}},
47
+ {id:'diagram-child-2',kind:'rect',attributes:{x:358,y:278,width:42,height:25,rx:6,fill:'#eaf6fb',stroke:blue,'stroke-width':2}},
48
+ {id:'table-frame',kind:'rect',attributes:{x:180,y:338,width:252,height:64,rx:8,fill:'#ffffff',stroke:blue,'stroke-width':2.5}},
49
+ {id:'table-header',kind:'rect',attributes:{x:181,y:339,width:250,height:20,rx:7,fill:'#eaf6fb'}},
50
+ {id:'table-grid',kind:'path',attributes:{d:'M250 339V401M330 339V401M181 359H431M181 380H431',fill:'none',stroke:lightGray,'stroke-width':2}},
51
+ {id:'table-emphasis',kind:'rect',attributes:{x:196,y:365,width:38,height:8,rx:3,fill:blue}},
52
+ ];
53
+ const components:CompositionComponent[]=[
54
+ text('brand','Konpeki',150,120,480,110,84),
55
+ {id:'brand-mark',kind:'image',slotIds:['brand-mark-content'],preferredRect:{x:64,y:143,width:66,height:66},customVisual:{format:'vector',viewBox:{x:0,y:0,width:128,height:128},description:'Konpeki blue brush mark',elements:[{id:'mark-silhouette',kind:'path',attributes:{d:outline,fill:blue}}]}},
56
+ text('promise','Create clear visuals',64,302,680,90,62),
57
+ text('audience','with your coding agent.',64,400,660,76,44,400),
58
+ {id:'visual-family',kind:'image',slotIds:['visual-family-content'],preferredRect:{x:772,y:106,width:444,height:412},customVisual:{format:'vector',viewBox:{x:0,y:0,width:444,height:412},description:'Aligned white canvases using Konpeki text, image, bar chart, line chart, diagram and table components.',elements}},
59
+ ];
60
+ const document:CompositionDocument={schema:compositionSchema,title:'Konpeki GitHub cover',authoringMode:'default',theme:{id:'plex',mode:'paper'},slides:[{
61
+ id:'github-cover',name:'GitHub repository cover',canvas:{width:1280,height:640},innerPadding:{top:64,right:64,bottom:64,left:64},pageNumber:{style:'none',color:'muted'},
62
+ audience:'Developers discovering Konpeki on GitHub',question:'What can I create with Konpeki and my coding agent?',intendedViewingSize:'social',components,
63
+ contentSlots:components.map(c=>({id:c.slotIds[0],label:c.id,role:'body',required:true,instruction:c.kind==='text-block'?c.content??'':c.customVisual?.description??''})),
64
+ groups:[],relationships:[],readingOrder:components.map(c=>({kind:'component',id:c.id})),paintOrder:components.map(c=>c.id),
65
+ }]};
66
+ assertComposition(document);
67
+ writeFileSync(new URL('composition.json',import.meta.url),JSON.stringify(document,null,2)+'\n');