deckjsx 0.4.1 → 0.6.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/README.md CHANGED
@@ -7,18 +7,19 @@ The intended architecture is:
7
7
 
8
8
  ```text
9
9
  JSX
10
- -> Presentation IR
11
- -> Backend
12
- |- PptxGenJS backend
13
- `- OOXML direct backend (future)
10
+ -> Author Tree
11
+ -> Semantic Author Graph
12
+ -> Output Projection
13
+ -> Output Writer
14
14
  ```
15
15
 
16
16
  This project is being designed as a compiler, not as a thin `PptxGenJS` wrapper.
17
- The API uses a class-based compiler with callback-based `.add()`, `.render()`, and `.output()`.
18
- Authoring uses typed JSX elements with a `style` object prop.
17
+ The API uses a class-based compiler with callback-based `.add()`, `.compile()`, `.project()`, and
18
+ `.render()`. Authoring uses typed JSX elements with CSS-like style and class semantics.
19
19
 
20
20
  The implementation preserves the compiler model with explicit module boundaries for authoring,
21
- style normalization, layout, IR, backend emission, and Node runtime output.
21
+ semantic graph construction, style resolution, output projection, writer adapters, and runtime
22
+ output.
22
23
 
23
24
  ## Install
24
25
 
@@ -26,7 +27,7 @@ style normalization, layout, IR, backend emission, and Node runtime output.
26
27
  npm install deckjsx
27
28
  ```
28
29
 
29
- The package currently targets Node.js output and ships a `pptxgenjs` backend.
30
+ The package currently targets PPTX output and ships a temporary `pptxgenjs` writer adapter.
30
31
 
31
32
  ## Usage
32
33
 
@@ -59,8 +60,7 @@ deck.add(({ composition }) => (
59
60
 
60
61
  <section style={{ display: "grid", gridTemplateColumns: "1fr 1fr", columnGap: 0.35 }}>
61
62
  <p style={{ fontSize: 18, color: "#334155", fit: "shrink" }}>
62
- Author slides with typed JSX, inspect the generated IR, and emit PPTX files through the
63
- backend boundary.
63
+ Author slides with typed JSX, inspect the projected document model, and render PPTX files.
64
64
  </p>
65
65
  <figure style={{ backgroundColor: "#E0F2FE", borderRadius: 0.15, padding: 0.25 }}>
66
66
  <img src="chart.png" style={{ width: "100%", height: "100%", fit: "contain" }} />
@@ -78,12 +78,12 @@ deck.add(({ composition }) => (
78
78
  </Slide>
79
79
  ));
80
80
 
81
- const ir = deck.render();
82
- await deck.output({ backend: "pptxgenjs", output: "quarterly-review.pptx" });
81
+ const project = deck.project();
82
+ await deck.render({ output: "quarterly-review.pptx" });
83
83
  ```
84
84
 
85
- Use `deck.render()` for tests, snapshots, and backend-independent inspection. Use
86
- `deck.output({ backend: "pptxgenjs", output })` when writing a PowerPoint file.
85
+ Use `deck.compile()` for authoring semantics, `deck.project()` for output-facing inspection, and
86
+ `deck.render({ output })` when writing a PowerPoint file.
87
87
 
88
88
  ## JSX elements
89
89
 
@@ -118,7 +118,13 @@ Image elements compile to images and require either `src` or `data`:
118
118
  ```
119
119
 
120
120
  Primitive string and number children inside view-like elements are normalized to implicit text
121
- nodes. Inline rich text with `span` is intentionally reserved for a later release.
121
+ nodes. Inline rich text uses `span` inside text-like elements:
122
+
123
+ ```tsx
124
+ <p>
125
+ Revenue grew <span style={{ color: "#16A34A", fontWeight: 700 }}>12%</span>.
126
+ </p>
127
+ ```
122
128
 
123
129
  ## View Layout Semantics
124
130