@5cover/lectern 0.0.0-stage → 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.
- package/README.md +250 -2
- package/dist/Deck-C1ecJqVD.d.ts +110 -0
- package/dist/cli/index.js +768 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.ts +144 -0
- package/dist/index.js +566 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx-runtime.d.ts +1 -0
- package/dist/jsx-runtime.js +9 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/profiles/engie/index.d.ts +163 -0
- package/dist/profiles/engie/index.js +393 -0
- package/dist/profiles/engie/index.js.map +1 -0
- package/package.json +91 -3
- package/src/cli/build.ts +79 -0
- package/src/cli/dev.ts +58 -0
- package/src/cli/index.ts +126 -0
- package/src/cli/paths.ts +81 -0
- package/src/cli/pdf.ts +70 -0
- package/src/cli/render.ts +40 -0
- package/src/cli/rules.ts +31 -0
- package/src/cli/serve.ts +112 -0
- package/src/client/entry.ts +170 -0
- package/src/client/graph.tsx +207 -0
- package/src/components/Deck.tsx +19 -0
- package/src/components/InfographDiscovery.tsx +51 -0
- package/src/components/layout.tsx +145 -0
- package/src/components/mechanics.tsx +74 -0
- package/src/components/util.ts +12 -0
- package/src/index.ts +37 -0
- package/src/infographDiscovery.ts +188 -0
- package/src/infographDiscoveryView.tsx +202 -0
- package/src/jsx-runtime.ts +4 -0
- package/src/profiles/engie/assets/engie-logo-dark.svg +1 -0
- package/src/profiles/engie/assets/engie-logo-white.svg +6 -0
- package/src/profiles/engie/assets.d.ts +4 -0
- package/src/profiles/engie/atoms.tsx +203 -0
- package/src/profiles/engie/engie.css +916 -0
- package/src/profiles/engie/index.ts +44 -0
- package/src/profiles/engie/profile.ts +132 -0
- package/src/profiles/engie/slides.tsx +230 -0
- package/src/profiles/index.ts +30 -0
- package/src/profiles/types.ts +49 -0
- package/src/render/renderDeck.tsx +74 -0
- package/src/render/template.ts +68 -0
- package/src/types.ts +53 -0
- package/tsconfig.authoring.json +8 -0
- package/vite-env.d.ts +11 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
// src/profiles/engie/index.ts
|
|
2
|
+
import { h } from "preact";
|
|
3
|
+
|
|
4
|
+
// src/jsx-runtime.ts
|
|
5
|
+
import { Fragment, jsx, jsx as jsx2, jsxs } from "preact/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
// src/components/Deck.tsx
|
|
8
|
+
function Deck(props) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Fragment, { children: props.children });
|
|
10
|
+
}
|
|
11
|
+
function isDeck(node) {
|
|
12
|
+
return typeof node === "object" && node !== null && "type" in node && node.type === Deck;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// src/profiles/engie/profile.ts
|
|
16
|
+
var engie = {
|
|
17
|
+
name: "engie",
|
|
18
|
+
label: "ENGIE / Fluid",
|
|
19
|
+
description: "ENGIE corporate house style (Fluid design system): navy #17255F & ENGIE blue #007bc5, Fluid typography, 16:9.",
|
|
20
|
+
stylesheet: "@5cover/lectern/engie.css",
|
|
21
|
+
reveal: {
|
|
22
|
+
// 16:9 design canvas. Reveal scales this scene to the available viewport
|
|
23
|
+
// while preserving its proportions.
|
|
24
|
+
width: 1280,
|
|
25
|
+
height: 720,
|
|
26
|
+
slideNumber: "c/t",
|
|
27
|
+
// Corporate decks are top-anchored (title at top, logo pinned to the corner),
|
|
28
|
+
// not vertically centred — so disable reveal's vertical centering.
|
|
29
|
+
center: false,
|
|
30
|
+
margin: 0
|
|
31
|
+
},
|
|
32
|
+
rules: [
|
|
33
|
+
{
|
|
34
|
+
title: "Structure & titles",
|
|
35
|
+
rules: [
|
|
36
|
+
{
|
|
37
|
+
id: "presentation-title-lines",
|
|
38
|
+
statement: "The cover title fits in two or three lines maximum.",
|
|
39
|
+
severity: "should"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "slide-title-lines",
|
|
43
|
+
statement: "A slide title is two or three lines maximum \u2014 ideally one. The subtitle is one line maximum.",
|
|
44
|
+
severity: "should"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "two-title-levels",
|
|
48
|
+
statement: "Use a second title level (title + subtitle) only when it genuinely adds structure.",
|
|
49
|
+
severity: "advisory"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "chapters-numbered",
|
|
53
|
+
statement: "Introduce each chapter with a numbered section divider (01, 02, \u2026); a Summary slide lists the chapters.",
|
|
54
|
+
severity: "should"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "one-idea-per-slide",
|
|
58
|
+
statement: "Prefer one message per slide; keep body copy concise.",
|
|
59
|
+
severity: "advisory"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: "Confidentiality & rights",
|
|
65
|
+
rules: [
|
|
66
|
+
{
|
|
67
|
+
id: "confidentiality-level",
|
|
68
|
+
statement: "Every deck declares a confidentiality level: Non-confidential, Confidential, or Strictly confidential.",
|
|
69
|
+
severity: "must"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: "visual-rights",
|
|
73
|
+
statement: "Iconography and visuals are for internal use only \u2014 verify the rights of every visual you include.",
|
|
74
|
+
severity: "must"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
title: "Footer",
|
|
80
|
+
rules: [
|
|
81
|
+
{
|
|
82
|
+
id: "footer-format",
|
|
83
|
+
statement: 'Footer format: "\xA9 ENGIE {year} - {presentation title} - {date} - {page}".',
|
|
84
|
+
severity: "should"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
title: "Colours",
|
|
90
|
+
rules: [
|
|
91
|
+
{
|
|
92
|
+
id: "primary-colours",
|
|
93
|
+
statement: "Primary palette: navy #17255F, ENGIE blue #007bc5, teal #00817d, purple #6c4796.",
|
|
94
|
+
severity: "should"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "accent-colours",
|
|
98
|
+
statement: "Accent palette: coral #eb5d40, magenta #e94287, yellow #f4c867 \u2014 use for emphasis, sparingly.",
|
|
99
|
+
severity: "advisory"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: "secondary-colours",
|
|
103
|
+
statement: "Secondary palette: #e18554, #4bb0b9, #67ae6e, #278cbc. Tints at 50% and 20% are available for backgrounds.",
|
|
104
|
+
severity: "advisory"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
title: "Typography",
|
|
110
|
+
rules: [
|
|
111
|
+
{
|
|
112
|
+
id: "fonts",
|
|
113
|
+
statement: "Typography follows the Fluid design system (Lato, with system fallbacks); titles are bold, body is regular.",
|
|
114
|
+
severity: "should"
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
title: "Format & figures",
|
|
120
|
+
rules: [
|
|
121
|
+
{
|
|
122
|
+
id: "aspect-ratio",
|
|
123
|
+
statement: "Slides are 16:9.",
|
|
124
|
+
severity: "must"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: "kpi-style",
|
|
128
|
+
statement: 'Highlight key figures as a large number with a short label (e.g. "9-10 Md\u20AC").',
|
|
129
|
+
severity: "advisory"
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
// src/components/util.ts
|
|
137
|
+
import { toChildArray } from "preact";
|
|
138
|
+
function cx(...parts) {
|
|
139
|
+
return parts.filter(Boolean).join(" ");
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// src/profiles/engie/assets/engie-logo-white.svg
|
|
143
|
+
var engie_logo_white_default = 'data:image/svg+xml,<svg viewBox="0 0 1077 389" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-linejoin="round" stroke-miterlimit="2" fill-rule="evenodd" clip-rule="evenodd" xml:space="preserve" overflow="hidden"><style>%0A.MsftOfcThm_Text1_Fill_v2 {%0A fill:%23FFFFFF; %0A}%0A</style>%0A<g transform="matrix(4.16667 0 0 4.16667 232.582 292.07)"><path d="M0 4.359C2.074-11.486-4.697-22.128-25.432-22.128-41.398-22.128-51.591-14.653-51.591 0.368-51.591 24.373-22.203 26.487-2.255 20.119L-3.985 12.275C-7.067 13.33-35.678 19.113-39.901 4.359L0 4.359ZM-39.902-3.911C-39.902-9.784-33.874-14.123-25.16-14.123-16.543-14.123-10.822-9.784-10.822-3.911L-39.902-3.911Z" class="MsftOfcThm_Text1_Fill_v2" fill="%23FFFFFF" fill-rule="nonzero"/></g><g transform="matrix(4.16667 0 0 4.16667 431.384 271.464)"><path d="M0 10.872 0-16.152 10.827-16.152 10.827 27.024 1.222 27.018-28.476-1.208-28.469 27.024-39.297 27.024-39.297-16.152-28.469-16.152 0 10.872Z" class="MsftOfcThm_Text1_Fill_v2" fill="%23FFFFFF" fill-rule="nonzero"/></g><g transform="matrix(4.16667 0 0 4.16667 713.267 342.5)"><path d="M0-23.269C-31.696-30.496-37.492-23.042-37.492-11.658-37.492-2.06-29.301 4.104-7.469 1.657L-7.469-7.727-23.606-7.727-23.606-16.029 3.308-16.029 3.308 0.108C3.308 4.086 1.521 6.471-1.236 7.959-5.527 10.276-11.778 10.963-19.608 10.963-35.769 10.963-48.832 3.489-48.832-11.658-48.832-25.09-39.924-34.232-21.491-34.232-12.596-34.232-6.106-33.067 0.003-31.387L0-23.269Z" class="MsftOfcThm_Text1_Fill_v2" fill="%23FFFFFF" fill-rule="nonzero"/></g><g transform="matrix(-4.16667 0 0 4.16667 2063.39 -2863.97)"><rect x="301.364" y="747.826" width="10.854" height="31.701" class="MsftOfcThm_Text1_Fill_v2" fill="%23FFFFFF"/></g><g transform="matrix(-4.16667 0 0 4.16667 2063.39 -3058.99)"><rect x="301.364" y="783.148" width="10.854" height="7.862" class="MsftOfcThm_Text1_Fill_v2" fill="%23FFFFFF"/></g><g transform="matrix(4.16667 0 0 4.16667 1057.03 292.07)"><path d="M0 4.359C2.074-11.486-4.697-22.128-25.432-22.128-41.398-22.128-51.591-14.653-51.591 0.368-51.591 24.373-22.203 26.487-2.255 20.119L-3.985 12.275C-7.067 13.33-35.678 19.113-39.901 4.359L0 4.359ZM-39.902-3.911C-39.902-9.784-33.874-14.123-25.16-14.123-16.543-14.123-10.822-9.784-10.822-3.911L-39.902-3.911Z" class="MsftOfcThm_Text1_Fill_v2" fill="%23FFFFFF" fill-rule="nonzero"/></g><g transform="matrix(0 -4.16667 -4.16667 0 616.106 -460.031)"><path d="M-147.865-110.407C-124.55-75.799-110.407-30.658-110.407 18.729-110.407 68.115-124.55 113.257-147.865 147.865-136.316 113.448-128.606 73.205-128.606 18.729-128.606-35.748-136.316-75.99-147.865-110.407" class="MsftOfcThm_Text1_Fill_v2" fill="%23FFFFFF"/></g></svg>';
|
|
144
|
+
|
|
145
|
+
// src/profiles/engie/slides.tsx
|
|
146
|
+
function sectionAttrs(p) {
|
|
147
|
+
return {
|
|
148
|
+
id: p.id,
|
|
149
|
+
"data-background-color": p.background,
|
|
150
|
+
"data-transition": p.transition,
|
|
151
|
+
"data-auto-animate": p.autoAnimate ? true : void 0,
|
|
152
|
+
style: p.style,
|
|
153
|
+
...p.attrs ?? {}
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
var rayId = 0;
|
|
157
|
+
function BrandLogo({ height }) {
|
|
158
|
+
return /* @__PURE__ */ jsx("img", { class: "lectern-brand-logo", src: engie_logo_white_default, height, alt: "ENGIE" });
|
|
159
|
+
}
|
|
160
|
+
function Ray() {
|
|
161
|
+
const gradientId = `present_gradient_ray_${rayId++}`;
|
|
162
|
+
const width = 720, height = 26;
|
|
163
|
+
return /* @__PURE__ */ jsxs(
|
|
164
|
+
"svg",
|
|
165
|
+
{
|
|
166
|
+
class: "lectern-ray",
|
|
167
|
+
width,
|
|
168
|
+
height,
|
|
169
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
170
|
+
preserveAspectRatio: "none",
|
|
171
|
+
fill: "none",
|
|
172
|
+
"aria-hidden": "true",
|
|
173
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ jsx("rect", { width, height, fill: `url(#${gradientId})` }),
|
|
176
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "1", y2: "0", children: [
|
|
177
|
+
/* @__PURE__ */ jsx("stop", { "stop-color": "#00BCFD" }),
|
|
178
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", "stop-color": "#23D2B5" })
|
|
179
|
+
] }) })
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
function Slide({ heading, logo, subtitle, kicker, children, class: cls, ...rest }) {
|
|
185
|
+
return /* @__PURE__ */ jsx("section", { class: cx("lectern-slide", cls), ...sectionAttrs(rest), children: /* @__PURE__ */ jsxs("div", { class: "lectern-slide-content", children: [
|
|
186
|
+
/* @__PURE__ */ jsxs("header", { class: "lectern-slide-header", children: [
|
|
187
|
+
/* @__PURE__ */ jsxs("div", { class: "lectern-slide-header-copy", children: [
|
|
188
|
+
kicker ? /* @__PURE__ */ jsx("p", { class: "lectern-kicker", children: kicker }) : null,
|
|
189
|
+
heading ? /* @__PURE__ */ jsx("h2", { class: "lectern-heading", children: heading }) : null,
|
|
190
|
+
subtitle ? /* @__PURE__ */ jsx("p", { class: "lectern-subtitle", children: subtitle }) : null
|
|
191
|
+
] }),
|
|
192
|
+
logo ? /* @__PURE__ */ jsx("aside", { class: "lectern-slide-logo", children: logo }) : null
|
|
193
|
+
] }),
|
|
194
|
+
/* @__PURE__ */ jsx("main", { class: "lectern-slide-main", children })
|
|
195
|
+
] }) });
|
|
196
|
+
}
|
|
197
|
+
function TitleSlide({
|
|
198
|
+
title,
|
|
199
|
+
subtitle,
|
|
200
|
+
author,
|
|
201
|
+
date,
|
|
202
|
+
eyebrow,
|
|
203
|
+
confidentiality,
|
|
204
|
+
footer,
|
|
205
|
+
children,
|
|
206
|
+
class: cls,
|
|
207
|
+
logoHeight,
|
|
208
|
+
...rest
|
|
209
|
+
}) {
|
|
210
|
+
return /* @__PURE__ */ jsxs(
|
|
211
|
+
"section",
|
|
212
|
+
{
|
|
213
|
+
class: cx("lectern-title-slide", footer ? "has-footer" : false, cls),
|
|
214
|
+
...sectionAttrs({ background: "var(--lectern-navy)", ...rest }),
|
|
215
|
+
children: [
|
|
216
|
+
/* @__PURE__ */ jsxs("div", { class: "lectern-title-main", children: [
|
|
217
|
+
/* @__PURE__ */ jsxs("div", { class: "lectern-title-content", children: [
|
|
218
|
+
/* @__PURE__ */ jsx(BrandLogo, { height: logoHeight }),
|
|
219
|
+
eyebrow ? /* @__PURE__ */ jsx("p", { class: "lectern-eyebrow", children: eyebrow }) : null,
|
|
220
|
+
/* @__PURE__ */ jsx("h1", { class: "lectern-title", children: title })
|
|
221
|
+
] }),
|
|
222
|
+
/* @__PURE__ */ jsx(Ray, {}),
|
|
223
|
+
/* @__PURE__ */ jsxs("div", { class: "lectern-title-meta", children: [
|
|
224
|
+
subtitle ? /* @__PURE__ */ jsx("p", { class: "lectern-subtitle", children: subtitle }) : null,
|
|
225
|
+
(author || date) && /* @__PURE__ */ jsxs("p", { class: "lectern-byline", children: [
|
|
226
|
+
author ? /* @__PURE__ */ jsx("span", { class: "lectern-author", children: author }) : null,
|
|
227
|
+
author && date ? /* @__PURE__ */ jsx("span", { class: "lectern-sep", children: " \xB7 " }) : null,
|
|
228
|
+
date ? /* @__PURE__ */ jsx("span", { class: "lectern-date", children: date }) : null
|
|
229
|
+
] }),
|
|
230
|
+
children
|
|
231
|
+
] })
|
|
232
|
+
] }),
|
|
233
|
+
confidentiality ? /* @__PURE__ */ jsx("p", { class: "lectern-confidentiality", children: confidentiality }) : null,
|
|
234
|
+
footer ? /* @__PURE__ */ jsx("div", { class: "lectern-title-footer", children: footer }) : null
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
function SectionSlide({ title, subtitle, number, class: cls, logoHeight, ...rest }) {
|
|
240
|
+
return /* @__PURE__ */ jsx(
|
|
241
|
+
"section",
|
|
242
|
+
{
|
|
243
|
+
class: cx("lectern-section-slide", cls),
|
|
244
|
+
...sectionAttrs({ background: "var(--lectern-section-bg)", ...rest }),
|
|
245
|
+
children: /* @__PURE__ */ jsxs("div", { class: "lectern-section-main", children: [
|
|
246
|
+
/* @__PURE__ */ jsxs("div", { class: "lectern-section-content", children: [
|
|
247
|
+
/* @__PURE__ */ jsx(BrandLogo, { height: logoHeight }),
|
|
248
|
+
number ? /* @__PURE__ */ jsx("p", { class: "lectern-section-number", children: number }) : null,
|
|
249
|
+
/* @__PURE__ */ jsx("h2", { class: "lectern-section-title", children: title })
|
|
250
|
+
] }),
|
|
251
|
+
/* @__PURE__ */ jsx(Ray, {}),
|
|
252
|
+
subtitle ? /* @__PURE__ */ jsx("p", { class: "lectern-section-subtitle", children: subtitle }) : null
|
|
253
|
+
] })
|
|
254
|
+
}
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
function Summary({ items, heading = "Sommaire", class: cls, children, ...rest }) {
|
|
258
|
+
return /* @__PURE__ */ jsxs("section", { class: cx("lectern-slide lectern-summary-slide", cls), ...sectionAttrs(rest), children: [
|
|
259
|
+
/* @__PURE__ */ jsxs("div", { class: "lectern-slide-content", children: [
|
|
260
|
+
/* @__PURE__ */ jsx("header", { class: "lectern-slide-header", children: /* @__PURE__ */ jsx("div", { class: "lectern-slide-header-copy", children: /* @__PURE__ */ jsx("h2", { class: "lectern-heading", children: heading }) }) }),
|
|
261
|
+
/* @__PURE__ */ jsx("main", { class: "lectern-slide-main", children: /* @__PURE__ */ jsx("ol", { class: "lectern-summary", children: items.map((it, i) => /* @__PURE__ */ jsxs("li", { class: "lectern-summary-item", children: [
|
|
262
|
+
/* @__PURE__ */ jsx("span", { class: "lectern-summary-num", children: String(i + 1).padStart(2, "0") }),
|
|
263
|
+
/* @__PURE__ */ jsx("span", { class: "lectern-summary-title", children: it.title }),
|
|
264
|
+
it.hint ? /* @__PURE__ */ jsx("span", { class: "lectern-summary-hint", children: it.hint }) : null
|
|
265
|
+
] })) }) })
|
|
266
|
+
] }),
|
|
267
|
+
children
|
|
268
|
+
] });
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// src/profiles/engie/atoms.tsx
|
|
272
|
+
function Bullets({ items, ordered, incremental, class: cls, style }) {
|
|
273
|
+
const List = ordered ? "ol" : "ul";
|
|
274
|
+
return /* @__PURE__ */ jsx(List, { class: cx("lectern-bullets", cls), style, children: items.map((item) => /* @__PURE__ */ jsx("li", { class: cx(incremental && "fragment"), children: item })) });
|
|
275
|
+
}
|
|
276
|
+
function Steps(props) {
|
|
277
|
+
return /* @__PURE__ */ jsx(Bullets, { ...props, incremental: true });
|
|
278
|
+
}
|
|
279
|
+
function StarItem({
|
|
280
|
+
kind,
|
|
281
|
+
badge,
|
|
282
|
+
label,
|
|
283
|
+
title,
|
|
284
|
+
children,
|
|
285
|
+
class: cls,
|
|
286
|
+
style
|
|
287
|
+
}) {
|
|
288
|
+
return /* @__PURE__ */ jsxs("div", { class: cx("lectern-star-item", `is-${kind}`, cls), style, children: [
|
|
289
|
+
/* @__PURE__ */ jsx("span", { class: "lectern-star-badge", "aria-hidden": "true", children: badge }),
|
|
290
|
+
/* @__PURE__ */ jsxs("div", { class: "lectern-star-copy", children: [
|
|
291
|
+
/* @__PURE__ */ jsxs("p", { class: "lectern-star-label", children: [
|
|
292
|
+
label,
|
|
293
|
+
title ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
294
|
+
" : ",
|
|
295
|
+
title
|
|
296
|
+
] }) : null
|
|
297
|
+
] }),
|
|
298
|
+
/* @__PURE__ */ jsx("div", { class: "lectern-star-body", children })
|
|
299
|
+
] })
|
|
300
|
+
] });
|
|
301
|
+
}
|
|
302
|
+
var Star = {
|
|
303
|
+
Situation: (props) => /* @__PURE__ */ jsx(StarItem, { ...props, kind: "situation", badge: "S", label: "Situation" }),
|
|
304
|
+
Task: (props) => /* @__PURE__ */ jsx(StarItem, { ...props, kind: "task", badge: "T", label: "T\xE2che" }),
|
|
305
|
+
Action: (props) => /* @__PURE__ */ jsx(StarItem, { ...props, kind: "action", badge: "A", label: "Action" }),
|
|
306
|
+
Result: (props) => /* @__PURE__ */ jsx(StarItem, { ...props, kind: "result", badge: "R", label: "R\xE9sultat" })
|
|
307
|
+
};
|
|
308
|
+
function Swot({ strengths, weaknesses, opportunities, threats, class: cls, style }) {
|
|
309
|
+
return /* @__PURE__ */ jsxs("div", { class: cx("lectern-swot", cls), style, children: [
|
|
310
|
+
/* @__PURE__ */ jsxs("div", { class: "lectern-swot-cell is-strengths", children: [
|
|
311
|
+
/* @__PURE__ */ jsx("h3", { class: "lectern-swot-title", children: "Forces" }),
|
|
312
|
+
/* @__PURE__ */ jsx("div", { class: "lectern-swot-reasons", children: strengths })
|
|
313
|
+
] }),
|
|
314
|
+
/* @__PURE__ */ jsxs("div", { class: "lectern-swot-cell is-weaknesses", children: [
|
|
315
|
+
/* @__PURE__ */ jsx("h3", { class: "lectern-swot-title", children: "Faiblesses" }),
|
|
316
|
+
/* @__PURE__ */ jsx("div", { class: "lectern-swot-reasons", children: weaknesses })
|
|
317
|
+
] }),
|
|
318
|
+
/* @__PURE__ */ jsxs("div", { class: "lectern-swot-cell is-opportunities", children: [
|
|
319
|
+
/* @__PURE__ */ jsx("h3", { class: "lectern-swot-title", children: "Opportunit\xE9s" }),
|
|
320
|
+
/* @__PURE__ */ jsx("div", { class: "lectern-swot-reasons", children: opportunities })
|
|
321
|
+
] }),
|
|
322
|
+
/* @__PURE__ */ jsxs("div", { class: "lectern-swot-cell is-threats", children: [
|
|
323
|
+
/* @__PURE__ */ jsx("h3", { class: "lectern-swot-title", children: "Menaces" }),
|
|
324
|
+
/* @__PURE__ */ jsx("div", { class: "lectern-swot-reasons", children: threats })
|
|
325
|
+
] }),
|
|
326
|
+
/* @__PURE__ */ jsxs("div", { class: "lectern-swot-center", "aria-hidden": "true", children: [
|
|
327
|
+
/* @__PURE__ */ jsx("span", { children: "S" }),
|
|
328
|
+
/* @__PURE__ */ jsx("span", { children: "W" }),
|
|
329
|
+
/* @__PURE__ */ jsx("span", { children: "O" }),
|
|
330
|
+
/* @__PURE__ */ jsx("span", { children: "T" })
|
|
331
|
+
] })
|
|
332
|
+
] });
|
|
333
|
+
}
|
|
334
|
+
function Metric({ value, label, trend, tone = "neutral", class: cls, style }) {
|
|
335
|
+
return /* @__PURE__ */ jsxs("div", { class: cx("lectern-metric", cls), style, children: [
|
|
336
|
+
/* @__PURE__ */ jsx("div", { class: "lectern-metric-value", children: value }),
|
|
337
|
+
/* @__PURE__ */ jsx("div", { class: "lectern-metric-label", children: label }),
|
|
338
|
+
trend ? /* @__PURE__ */ jsx("div", { class: cx("lectern-metric-trend", `is-${tone}`), children: trend }) : null
|
|
339
|
+
] });
|
|
340
|
+
}
|
|
341
|
+
function Collaborator({ name, role, portrait, class: cls, style }) {
|
|
342
|
+
return /* @__PURE__ */ jsxs("div", { class: cx("lectern-collaborator", cls), style, children: [
|
|
343
|
+
/* @__PURE__ */ jsx("img", { src: portrait, alt: `Portrait de ${typeof name === "string" ? name : ""}` }),
|
|
344
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
345
|
+
/* @__PURE__ */ jsx("strong", { class: "lectern-collaborator-name", children: name }),
|
|
346
|
+
/* @__PURE__ */ jsx("span", { class: "lectern-collaborator-role", children: role })
|
|
347
|
+
] })
|
|
348
|
+
] });
|
|
349
|
+
}
|
|
350
|
+
function Timeline({ items, incremental, class: cls, style }) {
|
|
351
|
+
return /* @__PURE__ */ jsx("ol", { class: cx("lectern-timeline", cls), style, children: items.map((it) => /* @__PURE__ */ jsxs("li", { class: cx("lectern-timeline-item", incremental && "fragment"), children: [
|
|
352
|
+
/* @__PURE__ */ jsx("span", { class: "lectern-timeline-dot", "aria-hidden": "true" }),
|
|
353
|
+
/* @__PURE__ */ jsx("span", { class: "lectern-timeline-date", children: it.date }),
|
|
354
|
+
/* @__PURE__ */ jsx("span", { class: "lectern-timeline-title", children: it.title }),
|
|
355
|
+
it.description ? /* @__PURE__ */ jsx("span", { class: "lectern-timeline-desc", children: it.description }) : null
|
|
356
|
+
] })) });
|
|
357
|
+
}
|
|
358
|
+
function Quote({ children, cite, class: cls, style }) {
|
|
359
|
+
return /* @__PURE__ */ jsxs("blockquote", { class: cx("lectern-quote", cls), style, children: [
|
|
360
|
+
/* @__PURE__ */ jsx("p", { class: "lectern-quote-text", children }),
|
|
361
|
+
cite ? /* @__PURE__ */ jsxs("footer", { class: "lectern-quote-cite", children: [
|
|
362
|
+
"\u2014 ",
|
|
363
|
+
cite
|
|
364
|
+
] }) : null
|
|
365
|
+
] });
|
|
366
|
+
}
|
|
367
|
+
function Lead({ children, class: cls, style }) {
|
|
368
|
+
return /* @__PURE__ */ jsx("p", { class: cx("lectern-lead", cls), style, children });
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// src/profiles/engie/index.ts
|
|
372
|
+
function Deck2(props) {
|
|
373
|
+
return h(Deck, { profile: engie, ...props });
|
|
374
|
+
}
|
|
375
|
+
export {
|
|
376
|
+
Bullets,
|
|
377
|
+
Collaborator,
|
|
378
|
+
Deck2 as Deck,
|
|
379
|
+
Lead,
|
|
380
|
+
Metric,
|
|
381
|
+
Quote,
|
|
382
|
+
SectionSlide,
|
|
383
|
+
Slide,
|
|
384
|
+
Star,
|
|
385
|
+
Steps,
|
|
386
|
+
Summary,
|
|
387
|
+
Swot,
|
|
388
|
+
Timeline,
|
|
389
|
+
TitleSlide,
|
|
390
|
+
engie,
|
|
391
|
+
isDeck
|
|
392
|
+
};
|
|
393
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/profiles/engie/index.ts","../../../src/jsx-runtime.ts","../../../src/components/Deck.tsx","../../../src/profiles/engie/profile.ts","../../../src/components/util.ts","../../../src/profiles/engie/slides.tsx","../../../src/profiles/engie/atoms.tsx"],"sourcesContent":["// The ENGIE authoring surface. Import everything you need for an ENGIE deck\n// from here (`@5cover/lectern/engie`); neutral primitives come from `@5cover/lectern`.\n//\n// import { Deck, TitleSlide, Slide, Metric } from '@5cover/lectern/engie'\n// import { Columns, Code, Mermaid } from '@5cover/lectern'\n\nimport { h } from 'preact'\nimport { Deck as CoreDeck } from '../../components/Deck'\nimport type { DeckProps } from '../../types'\nimport { engie } from './profile'\n\n/**\n * ENGIE-bound deck root: pins the ENGIE profile so it never needs restating.\n * Returns a core `<Deck>` vnode (not a Fragment) so the renderer recognises it.\n */\nexport function Deck(props: DeckProps) {\n return h(CoreDeck, { profile: engie, ...props })\n}\nexport { isDeck } from '../../components/Deck'\n\nexport { TitleSlide, SectionSlide, Slide, Summary } from './slides'\nexport type {\n SlideProps,\n TitleSlideProps,\n SectionSlideProps,\n SummaryProps,\n SummaryItem,\n Confidentiality,\n} from './slides'\n\nexport { Bullets, Steps, Star, Swot, Metric, Collaborator, Timeline, Quote, Lead } from './atoms'\nexport type {\n BulletsProps,\n StarItemProps,\n SwotProps,\n MetricProps,\n CollaboratorProps,\n TimelineProps,\n TimelineItem,\n QuoteProps,\n} from './atoms'\n\n// The profile metadata (rules / reveal config / label).\nexport { engie } from './profile'\n","// Lectern owns the automatic JSX runtime used by decks. Re-exporting Preact's\n// JSX namespace is required for TypeScript to type intrinsic elements.\nexport { Fragment, jsx, jsx as jsxDEV, jsxs } from 'preact/jsx-runtime'\nexport type { JSX } from 'preact/jsx-runtime'\n","import type { DeckProps } from '../types'\n\n/**\n * Root of a presentation. Holds deck-level metadata (title, author, theme,\n * transition, footer) and its slides as children.\n *\n * The renderer reads this node's props to assemble the HTML shell and reveal.js\n * config, then renders the children into `.reveal > .slides`. Rendering `<Deck>`\n * directly also works (it emits the slides), but metadata is only applied when\n * the deck is passed to `lectern`'s renderer / CLI.\n */\nexport function Deck(props: DeckProps) {\n return <>{props.children}</>\n}\n\n/** Type guard: is this VNode a <Deck>? Used by the renderer. */\nexport function isDeck(node: unknown): node is { props: DeckProps } {\n return typeof node === 'object' && node !== null && 'type' in node && (node as { type?: unknown }).type === Deck\n}\n","import type { Profile } from '../types'\n\n/**\n * ENGIE / Fluid profile — derived from the official \"ENGIE PowerPoint Template\".\n * Look lives in `engie.css` (Fluid + the template layer). This module holds\n * the Node-safe data: stylesheet, reveal defaults and the natural-language rulebook.\n */\nexport const engie: Profile = {\n name: 'engie',\n label: 'ENGIE / Fluid',\n description:\n 'ENGIE corporate house style (Fluid design system): navy #17255F & ENGIE blue #007bc5, Fluid typography, 16:9.',\n stylesheet: '@5cover/lectern/engie.css',\n reveal: {\n // 16:9 design canvas. Reveal scales this scene to the available viewport\n // while preserving its proportions.\n width: 1280,\n height: 720,\n slideNumber: 'c/t',\n // Corporate decks are top-anchored (title at top, logo pinned to the corner),\n // not vertically centred — so disable reveal's vertical centering.\n center: false,\n margin: 0,\n },\n rules: [\n {\n title: 'Structure & titles',\n rules: [\n {\n id: 'presentation-title-lines',\n statement: 'The cover title fits in two or three lines maximum.',\n severity: 'should',\n },\n {\n id: 'slide-title-lines',\n statement: 'A slide title is two or three lines maximum — ideally one. The subtitle is one line maximum.',\n severity: 'should',\n },\n {\n id: 'two-title-levels',\n statement: 'Use a second title level (title + subtitle) only when it genuinely adds structure.',\n severity: 'advisory',\n },\n {\n id: 'chapters-numbered',\n statement:\n 'Introduce each chapter with a numbered section divider (01, 02, …); a Summary slide lists the chapters.',\n severity: 'should',\n },\n {\n id: 'one-idea-per-slide',\n statement: 'Prefer one message per slide; keep body copy concise.',\n severity: 'advisory',\n },\n ],\n },\n {\n title: 'Confidentiality & rights',\n rules: [\n {\n id: 'confidentiality-level',\n statement:\n 'Every deck declares a confidentiality level: Non-confidential, Confidential, or Strictly confidential.',\n severity: 'must',\n },\n {\n id: 'visual-rights',\n statement:\n 'Iconography and visuals are for internal use only — verify the rights of every visual you include.',\n severity: 'must',\n },\n ],\n },\n {\n title: 'Footer',\n rules: [\n {\n id: 'footer-format',\n statement: 'Footer format: \"© ENGIE {year} - {presentation title} - {date} - {page}\".',\n severity: 'should',\n },\n ],\n },\n {\n title: 'Colours',\n rules: [\n {\n id: 'primary-colours',\n statement: 'Primary palette: navy #17255F, ENGIE blue #007bc5, teal #00817d, purple #6c4796.',\n severity: 'should',\n },\n {\n id: 'accent-colours',\n statement: 'Accent palette: coral #eb5d40, magenta #e94287, yellow #f4c867 — use for emphasis, sparingly.',\n severity: 'advisory',\n },\n {\n id: 'secondary-colours',\n statement:\n 'Secondary palette: #e18554, #4bb0b9, #67ae6e, #278cbc. Tints at 50% and 20% are available for backgrounds.',\n severity: 'advisory',\n },\n ],\n },\n {\n title: 'Typography',\n rules: [\n {\n id: 'fonts',\n statement:\n 'Typography follows the Fluid design system (Lato, with system fallbacks); titles are bold, body is regular.',\n severity: 'should',\n },\n ],\n },\n {\n title: 'Format & figures',\n rules: [\n {\n id: 'aspect-ratio',\n statement: 'Slides are 16:9.',\n severity: 'must',\n },\n {\n id: 'kpi-style',\n statement: 'Highlight key figures as a large number with a short label (e.g. \"9-10 Md€\").',\n severity: 'advisory',\n },\n ],\n },\n ],\n}\n","import type { ComponentChildren } from 'preact'\nimport { toChildArray } from 'preact'\n\n/** Join truthy class names. */\nexport function cx(...parts: Array<string | false | null | undefined>): string {\n return parts.filter(Boolean).join(' ')\n}\n\n/** Normalize children into a flat array (drops null/boolean, keeps text). */\nexport function children(nodes: ComponentChildren) {\n return toChildArray(nodes)\n}\n","import type { ComponentChildren } from 'preact'\nimport type { StyleEscapeHatch, Transition } from '../../types'\nimport { cx } from '../../components/util'\nimport engieLogoWhite from './assets/engie-logo-white.svg'\n\n/*\n * ENGIE slide components — the layout philosophy of the ENGIE PowerPoint\n * template: navy cover with a large white title, restrained navy content\n * titles, navy section dividers, a numbered summary. Styling lives in engie.css.\n */\n\ninterface SlideBaseProps extends StyleEscapeHatch {\n background?: string\n transition?: Transition\n autoAnimate?: boolean\n attrs?: Record<string, string | number | boolean>\n id?: string\n}\n\nfunction sectionAttrs(p: SlideBaseProps) {\n return {\n id: p.id,\n 'data-background-color': p.background,\n 'data-transition': p.transition,\n 'data-auto-animate': p.autoAnimate ? true : undefined,\n style: p.style,\n ...(p.attrs ?? {}),\n }\n}\n\n/**\n * ENGIE Fluid brand gradient ray — inlined as an SVG (not a CSS background) so\n * Reveal scales the SVG uniformly with the slide. The profile anchors it to the\n * canvas edge as a genuine full-bleed visual rather than a painted background.\n *\n * Each instance gets a UNIQUE gradient id: reveal shows one slide at a time and\n * hides the rest with `display:none`. A shared id makes every `url(#id)` resolve\n * to the first definition in the document (on the cover), and Chrome fails to\n * resolve that paint server across the hidden-cover boundary, so section-slide\n * rays paint transparent. Unique ids keep each ray's paint server on its own slide.\n */\nlet rayId = 0\n\nfunction BrandLogo({ height }: { height?: number }) {\n return <img class=\"lectern-brand-logo\" src={engieLogoWhite} height={height} alt=\"ENGIE\" />\n}\n\nfunction Ray() {\n const gradientId = `present_gradient_ray_${rayId++}`\n const width = 720,\n height = 26\n return (\n <svg\n class=\"lectern-ray\"\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n preserveAspectRatio=\"none\"\n fill=\"none\"\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <rect width={width} height={height} fill={`url(#${gradientId})`} />\n <defs>\n <linearGradient id={gradientId} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n <stop stop-color=\"#00BCFD\" />\n <stop offset=\"1\" stop-color=\"#23D2B5\" />\n </linearGradient>\n </defs>\n </svg>\n )\n}\n\n/** Confidentiality level — required by the ENGIE template on every deck. */\nexport type Confidentiality = 'Non-confidentiel' | 'Confidentiel' | 'Strictement confidentiel'\n\n/** Content slide: 25pt navy title (top-left, no underline), optional subtitle, body. */\nexport interface SlideProps extends SlideBaseProps {\n /** Slide title (~25pt navy). */\n heading?: ComponentChildren\n /** Semantic mark rendered in the top-right corner of the slide header. */\n logo?: ComponentChildren\n /** Second-level title, rendered under the heading (use sparingly). */\n subtitle?: ComponentChildren\n /** Small uppercase eyebrow above the heading. */\n kicker?: ComponentChildren\n children?: ComponentChildren\n}\n\nexport function Slide({ heading, logo, subtitle, kicker, children, class: cls, ...rest }: SlideProps) {\n return (\n <section class={cx('lectern-slide', cls)} {...sectionAttrs(rest)}>\n <div class=\"lectern-slide-content\">\n <header class=\"lectern-slide-header\">\n <div class=\"lectern-slide-header-copy\">\n {kicker ? <p class=\"lectern-kicker\">{kicker}</p> : null}\n {heading ? <h2 class=\"lectern-heading\">{heading}</h2> : null}\n {subtitle ? <p class=\"lectern-subtitle\">{subtitle}</p> : null}\n </div>\n {logo ? <aside class=\"lectern-slide-logo\">{logo}</aside> : null}\n </header>\n <main class=\"lectern-slide-main\">{children}</main>\n </div>\n </section>\n )\n}\n\n/** Cover: navy full-bleed, large white title, white logo, confidentiality tag. */\nexport interface TitleSlideProps extends SlideBaseProps {\n title: ComponentChildren\n subtitle?: ComponentChildren\n author?: ComponentChildren\n date?: ComponentChildren\n /** Small eyebrow above the title (e.g. entity / department). */\n eyebrow?: ComponentChildren\n /** Confidentiality level shown bottom-right (ENGIE requirement). */\n confidentiality?: Confidentiality\n /** Full-width panel that occupies the remaining lower part of the cover. */\n footer?: ComponentChildren\n children?: ComponentChildren\n logoHeight?: number\n}\n\nexport function TitleSlide({\n title,\n subtitle,\n author,\n date,\n eyebrow,\n confidentiality,\n footer,\n children,\n class: cls,\n logoHeight,\n ...rest\n}: TitleSlideProps) {\n return (\n <section\n class={cx('lectern-title-slide', footer ? 'has-footer' : false, cls)}\n {...sectionAttrs({ background: 'var(--lectern-navy)', ...rest })}>\n <div class=\"lectern-title-main\">\n <div class=\"lectern-title-content\">\n <BrandLogo height={logoHeight} />\n {eyebrow ? <p class=\"lectern-eyebrow\">{eyebrow}</p> : null}\n <h1 class=\"lectern-title\">{title}</h1>\n </div>\n <Ray />\n <div class=\"lectern-title-meta\">\n {subtitle ? <p class=\"lectern-subtitle\">{subtitle}</p> : null}\n {(author || date) && (\n <p class=\"lectern-byline\">\n {author ? <span class=\"lectern-author\">{author}</span> : null}\n {author && date ? <span class=\"lectern-sep\"> · </span> : null}\n {date ? <span class=\"lectern-date\">{date}</span> : null}\n </p>\n )}\n {children}\n </div>\n </div>\n {confidentiality ? <p class=\"lectern-confidentiality\">{confidentiality}</p> : null}\n {footer ? <div class=\"lectern-title-footer\">{footer}</div> : null}\n </section>\n )\n}\n\n/** Full-bleed navy section divider: number + white title + white logo. */\nexport interface SectionSlideProps extends SlideBaseProps {\n title: ComponentChildren\n subtitle?: ComponentChildren\n /** Section number, e.g. \"02\". */\n number?: ComponentChildren\n logoHeight?: number\n}\n\nexport function SectionSlide({ title, subtitle, number, class: cls, logoHeight, ...rest }: SectionSlideProps) {\n return (\n <section\n class={cx('lectern-section-slide', cls)}\n {...sectionAttrs({ background: 'var(--lectern-section-bg)', ...rest })}>\n <div class=\"lectern-section-main\">\n <div class=\"lectern-section-content\">\n <BrandLogo height={logoHeight} />\n {number ? <p class=\"lectern-section-number\">{number}</p> : null}\n <h2 class=\"lectern-section-title\">{title}</h2>\n </div>\n <Ray />\n {subtitle ? <p class=\"lectern-section-subtitle\">{subtitle}</p> : null}\n </div>\n </section>\n )\n}\n\n/** A summary / agenda slide: auto-numbered chapters (01, 02, …) in a grid. */\nexport interface SummaryItem {\n title: ComponentChildren\n /** Optional complementary line under the chapter title. */\n hint?: ComponentChildren\n}\n\nexport interface SummaryProps extends SlideBaseProps {\n items: SummaryItem[]\n /** Slide heading (defaults to \"Sommaire\"). */\n heading?: ComponentChildren\n children?: ComponentChildren\n}\n\nexport function Summary({ items, heading = 'Sommaire', class: cls, children, ...rest }: SummaryProps) {\n return (\n <section class={cx('lectern-slide lectern-summary-slide', cls)} {...sectionAttrs(rest)}>\n <div class=\"lectern-slide-content\">\n <header class=\"lectern-slide-header\">\n <div class=\"lectern-slide-header-copy\">\n <h2 class=\"lectern-heading\">{heading}</h2>\n </div>\n </header>\n <main class=\"lectern-slide-main\">\n <ol class=\"lectern-summary\">\n {items.map((it, i) => (\n <li class=\"lectern-summary-item\">\n <span class=\"lectern-summary-num\">{String(i + 1).padStart(2, '0')}</span>\n <span class=\"lectern-summary-title\">{it.title}</span>\n {it.hint ? <span class=\"lectern-summary-hint\">{it.hint}</span> : null}\n </li>\n ))}\n </ol>\n </main>\n </div>\n {children}\n </section>\n )\n}\n","import type { ComponentChildren } from 'preact'\nimport type { StyleEscapeHatch } from '../../types'\nimport { cx } from '../../components/util'\n\n/*\n * ENGIE content atoms — opinionated, styled to the ENGIE house style. A\n * different profile might structure these differently (hence not in the core).\n */\n\n/** Bulleted or numbered list. */\nexport interface BulletsProps extends StyleEscapeHatch {\n items: ComponentChildren[]\n ordered?: boolean\n /** Reveal each item incrementally as a reveal.js fragment. */\n incremental?: boolean\n}\n\nexport function Bullets({ items, ordered, incremental, class: cls, style }: BulletsProps) {\n const List = ordered ? 'ol' : 'ul'\n return (\n <List class={cx('lectern-bullets', cls)} style={style}>\n {items.map(item => (\n <li class={cx(incremental && 'fragment')}>{item}</li>\n ))}\n </List>\n )\n}\n\n/** Incremental list — sugar for `<Bullets incremental>`. */\nexport function Steps(props: Omit<BulletsProps, 'incremental'>) {\n return <Bullets {...props} incremental />\n}\n\nexport interface StarItemProps extends StyleEscapeHatch {\n /** Optional short qualifier shown after the STAR label. */\n title?: ComponentChildren\n children: ComponentChildren\n}\n\ntype StarKind = 'situation' | 'task' | 'action' | 'result'\n\nfunction StarItem({\n kind,\n badge,\n label,\n title,\n children,\n class: cls,\n style,\n}: StarItemProps & { kind: StarKind; badge: string; label: string }) {\n return (\n <div class={cx('lectern-star-item', `is-${kind}`, cls)} style={style}>\n <span class=\"lectern-star-badge\" aria-hidden=\"true\">\n {badge}\n </span>\n <div class=\"lectern-star-copy\">\n <p class=\"lectern-star-label\">\n {label}\n {title ? <> : {title}</> : null}\n </p>\n <div class=\"lectern-star-body\">{children}</div>\n </div>\n </div>\n )\n}\n\n/** STAR stages. Use directly in the normal slide flow, without a parent wrapper. */\nexport const Star = {\n Situation: (props: StarItemProps) => <StarItem {...props} kind=\"situation\" badge=\"S\" label=\"Situation\" />,\n Task: (props: StarItemProps) => <StarItem {...props} kind=\"task\" badge=\"T\" label=\"Tâche\" />,\n Action: (props: StarItemProps) => <StarItem {...props} kind=\"action\" badge=\"A\" label=\"Action\" />,\n Result: (props: StarItemProps) => <StarItem {...props} kind=\"result\" badge=\"R\" label=\"Résultat\" />,\n}\n\n/** Editorial SWOT matrix with four contextual quadrants around the S/W/O/T marker. */\nexport interface SwotProps extends StyleEscapeHatch {\n strengths: ComponentChildren\n weaknesses: ComponentChildren\n opportunities: ComponentChildren\n threats: ComponentChildren\n}\n\nexport function Swot({ strengths, weaknesses, opportunities, threats, class: cls, style }: SwotProps) {\n return (\n <div class={cx('lectern-swot', cls)} style={style}>\n <div class=\"lectern-swot-cell is-strengths\">\n <h3 class=\"lectern-swot-title\">Forces</h3>\n <div class=\"lectern-swot-reasons\">{strengths}</div>\n </div>\n <div class=\"lectern-swot-cell is-weaknesses\">\n <h3 class=\"lectern-swot-title\">Faiblesses</h3>\n <div class=\"lectern-swot-reasons\">{weaknesses}</div>\n </div>\n <div class=\"lectern-swot-cell is-opportunities\">\n <h3 class=\"lectern-swot-title\">Opportunités</h3>\n <div class=\"lectern-swot-reasons\">{opportunities}</div>\n </div>\n <div class=\"lectern-swot-cell is-threats\">\n <h3 class=\"lectern-swot-title\">Menaces</h3>\n <div class=\"lectern-swot-reasons\">{threats}</div>\n </div>\n <div class=\"lectern-swot-center\" aria-hidden=\"true\">\n <span>S</span>\n <span>W</span>\n <span>O</span>\n <span>T</span>\n </div>\n </div>\n )\n}\n\n/** KPI card: a large navy figure with a short label (ENGIE \"9-10 Md€\" style). */\nexport interface MetricProps extends StyleEscapeHatch {\n value: ComponentChildren\n label: ComponentChildren\n /** Optional trend/delta text, e.g. \"+12%\". */\n trend?: ComponentChildren\n tone?: 'positive' | 'negative' | 'neutral'\n}\n\nexport function Metric({ value, label, trend, tone = 'neutral', class: cls, style }: MetricProps) {\n return (\n <div class={cx('lectern-metric', cls)} style={style}>\n <div class=\"lectern-metric-value\">{value}</div>\n <div class=\"lectern-metric-label\">{label}</div>\n {trend ? <div class={cx('lectern-metric-trend', `is-${tone}`)}>{trend}</div> : null}\n </div>\n )\n}\n\n/** Compact identity card for a person collaborating on the work presented. */\nexport interface CollaboratorProps extends StyleEscapeHatch {\n name: ComponentChildren\n role: ComponentChildren\n portrait: string\n}\n\nexport function Collaborator({ name, role, portrait, class: cls, style }: CollaboratorProps) {\n return (\n <div class={cx('lectern-collaborator', cls)} style={style}>\n <img src={portrait} alt={`Portrait de ${typeof name === 'string' ? name : ''}`} />\n <div>\n <strong class=\"lectern-collaborator-name\">{name}</strong>\n <span class=\"lectern-collaborator-role\">{role}</span>\n </div>\n </div>\n )\n}\n\n/**\n * Opinionated **horizontal** timeline: milestones laid out left→right along a\n * rule, each with a date, title and optional description below the node.\n */\nexport interface TimelineItem {\n date: ComponentChildren\n title: ComponentChildren\n description?: ComponentChildren\n}\n\nexport interface TimelineProps extends StyleEscapeHatch {\n items: TimelineItem[]\n /** Reveal milestones one by one. */\n incremental?: boolean\n}\n\nexport function Timeline({ items, incremental, class: cls, style }: TimelineProps) {\n return (\n <ol class={cx('lectern-timeline', cls)} style={style}>\n {items.map(it => (\n <li class={cx('lectern-timeline-item', incremental && 'fragment')}>\n <span class=\"lectern-timeline-dot\" aria-hidden=\"true\" />\n <span class=\"lectern-timeline-date\">{it.date}</span>\n <span class=\"lectern-timeline-title\">{it.title}</span>\n {it.description ? <span class=\"lectern-timeline-desc\">{it.description}</span> : null}\n </li>\n ))}\n </ol>\n )\n}\n\n/** Pull quote with optional attribution. */\nexport interface QuoteProps extends StyleEscapeHatch {\n children: ComponentChildren\n cite?: ComponentChildren\n}\n\nexport function Quote({ children, cite, class: cls, style }: QuoteProps) {\n return (\n <blockquote class={cx('lectern-quote', cls)} style={style}>\n <p class=\"lectern-quote-text\">{children}</p>\n {cite ? <footer class=\"lectern-quote-cite\">— {cite}</footer> : null}\n </blockquote>\n )\n}\n\n/** A larger lead paragraph for emphasis. */\nexport function Lead({ children, class: cls, style }: { children: ComponentChildren } & StyleEscapeHatch) {\n return (\n <p class={cx('lectern-lead', cls)} style={style}>\n {children}\n </p>\n )\n}\n"],"mappings":";AAMA,SAAS,SAAS;;;ACJlB,SAAS,UAAU,KAAY,OAAPA,MAAe,YAAY;;;ACS5C,SAAS,KAAK,OAAkB;AACrC,SAAO,gCAAG,gBAAM,UAAS;AAC3B;AAGO,SAAS,OAAO,MAA6C;AAClE,SAAO,OAAO,SAAS,YAAY,SAAS,QAAQ,UAAU,QAAS,KAA4B,SAAS;AAC9G;;;ACXO,IAAM,QAAiB;AAAA,EAC5B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,aACE;AAAA,EACF,YAAY;AAAA,EACZ,QAAQ;AAAA;AAAA;AAAA,IAGN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,aAAa;AAAA;AAAA;AAAA,IAGb,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AAAA,EACA,OAAO;AAAA,IACL;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,QACL;AAAA,UACE,IAAI;AAAA,UACJ,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA;AAAA,UACE,IAAI;AAAA,UACJ,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA;AAAA,UACE,IAAI;AAAA,UACJ,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA;AAAA,UACE,IAAI;AAAA,UACJ,WACE;AAAA,UACF,UAAU;AAAA,QACZ;AAAA,QAC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,GAAG,GAAG,OAChC,UACH;AAEJ;;;AN3LO,SAASC,MAAK,OAAkB;AACrC,SAAO,EAAE,MAAU,EAAE,SAAS,OAAO,GAAG,MAAM,CAAC;AACjD;","names":["jsx","Deck"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,94 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@5cover/lectern",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Author professional reveal.js slide decks as typed TSX components, styled by the ENGIE Fluid design system.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"bin": {
|
|
8
|
+
"lectern": "./dist/cli/index.js"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./jsx-runtime": {
|
|
18
|
+
"types": "./dist/jsx-runtime.d.ts",
|
|
19
|
+
"import": "./dist/jsx-runtime.js"
|
|
20
|
+
},
|
|
21
|
+
"./jsx-dev-runtime": {
|
|
22
|
+
"types": "./dist/jsx-runtime.d.ts",
|
|
23
|
+
"import": "./dist/jsx-runtime.js"
|
|
24
|
+
},
|
|
25
|
+
"./tsconfig.json": "./tsconfig.authoring.json",
|
|
26
|
+
"./vite-env": {
|
|
27
|
+
"types": "./vite-env.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./engie": {
|
|
30
|
+
"types": "./dist/profiles/engie/index.d.ts",
|
|
31
|
+
"import": "./dist/profiles/engie/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./engie.css": "./src/profiles/engie/engie.css"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"src",
|
|
38
|
+
"tsconfig.authoring.json",
|
|
39
|
+
"vite-env.d.ts"
|
|
40
|
+
],
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@engie-group/fluid-design-system": "6.4.0",
|
|
46
|
+
"@engie-group/fluid-design-tokens": "^6.2.1",
|
|
47
|
+
"cytoscape": "^3.35.0",
|
|
48
|
+
"cytoscape-fcose": "^2.2.0",
|
|
49
|
+
"infograph": "^1.1.1",
|
|
50
|
+
"mermaid": "^12.3.0",
|
|
51
|
+
"preact": "^11.2.0",
|
|
52
|
+
"preact-render-to-string": "^6.8.3",
|
|
53
|
+
"reveal.js": "^6.0.2",
|
|
54
|
+
"vite": "^8.3.8",
|
|
55
|
+
"vite-plugin-singlefile": "^2.3.4"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"playwright": "^1.48.0"
|
|
59
|
+
},
|
|
60
|
+
"peerDependenciesMeta": {
|
|
61
|
+
"playwright": {
|
|
62
|
+
"optional": true
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@types/cytoscape-fcose": "^2.2.5",
|
|
67
|
+
"@types/node": "^26.6.6",
|
|
68
|
+
"playwright": "^1.65.1",
|
|
69
|
+
"prettier": "^3.10.1",
|
|
70
|
+
"tsup": "^9.0.0",
|
|
71
|
+
"tsx": "^4.23.15",
|
|
72
|
+
"typescript": "^6.0.3",
|
|
73
|
+
"vitest": "^5.1.0"
|
|
74
|
+
},
|
|
75
|
+
"prettier": {
|
|
76
|
+
"printWidth": 120,
|
|
77
|
+
"tabWidth": 2,
|
|
78
|
+
"singleQuote": true,
|
|
79
|
+
"arrowParens": "avoid",
|
|
80
|
+
"bracketSameLine": true,
|
|
81
|
+
"trailingComma": "es5",
|
|
82
|
+
"semi": false
|
|
83
|
+
},
|
|
84
|
+
"scripts": {
|
|
85
|
+
"build": "tsup",
|
|
86
|
+
"dev": "tsup --watch",
|
|
87
|
+
"test": "vitest run",
|
|
88
|
+
"test:watch": "vitest",
|
|
89
|
+
"prepublish": "tsup && vitest run",
|
|
90
|
+
"typecheck": "tsc --noEmit",
|
|
91
|
+
"format": "prettier --write .",
|
|
92
|
+
"lectern": "node --import tsx ./src/cli/index.ts"
|
|
93
|
+
}
|
|
6
94
|
}
|
package/src/cli/build.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'
|
|
2
|
+
import { join, resolve } from 'node:path'
|
|
3
|
+
import { createServer, build as viteBuild } from 'vite'
|
|
4
|
+
import { viteSingleFile } from 'vite-plugin-singlefile'
|
|
5
|
+
import { htmlShell } from '../render/template'
|
|
6
|
+
import { clientEntrySource, presentAlias } from './paths'
|
|
7
|
+
import { fsAllow, renderDeckViaVite, type RenderedDeck } from './render'
|
|
8
|
+
|
|
9
|
+
export interface BuildOptions {
|
|
10
|
+
deckPath: string
|
|
11
|
+
outDir: string
|
|
12
|
+
/** Inline all assets into a single index.html (default true). */
|
|
13
|
+
singleFile?: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** SSR-render the deck to { meta, slidesHtml } using a throwaway Vite server. */
|
|
17
|
+
export async function renderStatic(deckPath: string): Promise<RenderedDeck> {
|
|
18
|
+
const server = await createServer({
|
|
19
|
+
configFile: false,
|
|
20
|
+
root: process.cwd(),
|
|
21
|
+
logLevel: 'warn',
|
|
22
|
+
appType: 'custom',
|
|
23
|
+
esbuild: { jsx: 'automatic', jsxImportSource: '@5cover/lectern' },
|
|
24
|
+
resolve: { alias: presentAlias() },
|
|
25
|
+
server: { middlewareMode: true, fs: { allow: fsAllow(deckPath) } },
|
|
26
|
+
})
|
|
27
|
+
try {
|
|
28
|
+
return await renderDeckViaVite(server, deckPath)
|
|
29
|
+
} finally {
|
|
30
|
+
await server.close()
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Build a self-contained static deck. The slides are pre-rendered into
|
|
36
|
+
* index.html; a single Vite pass bundles the client runtime (reveal + mermaid)
|
|
37
|
+
* with the profile's stylesheet and, by default, inlines everything into one file.
|
|
38
|
+
*/
|
|
39
|
+
export async function build({ deckPath, outDir, singleFile = true }: BuildOptions): Promise<string> {
|
|
40
|
+
const { meta, profile, slidesHtml } = await renderStatic(deckPath)
|
|
41
|
+
|
|
42
|
+
// The build root must sit inside the project so its `node_modules`
|
|
43
|
+
// (preact, reveal.js, mermaid, fluid…) resolves during bundling.
|
|
44
|
+
const tmpBase = join(process.cwd(), 'node_modules', '.lectern-tmp')
|
|
45
|
+
mkdirSync(tmpBase, { recursive: true })
|
|
46
|
+
const workDir = mkdtempSync(join(tmpBase, 'build-'))
|
|
47
|
+
// A local entry that re-exports the package client entry (keeps its own
|
|
48
|
+
// relative CSS imports resolving from the real location) and the profile's stylesheet.
|
|
49
|
+
writeFileSync(join(workDir, 'lectern-entry.ts'), `${clientEntrySource(profile)}\n`, 'utf8')
|
|
50
|
+
const clientTag = `<script type="module" src="./lectern-entry.ts"></script>`
|
|
51
|
+
writeFileSync(
|
|
52
|
+
join(workDir, 'index.html'),
|
|
53
|
+
htmlShell({ meta, slidesHtml, bodyScripts: clientTag, headTags: '' }),
|
|
54
|
+
'utf8'
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
const outAbs = resolve(process.cwd(), outDir)
|
|
58
|
+
try {
|
|
59
|
+
await viteBuild({
|
|
60
|
+
configFile: false,
|
|
61
|
+
root: workDir,
|
|
62
|
+
logLevel: 'warn',
|
|
63
|
+
esbuild: { jsx: 'automatic', jsxImportSource: '@5cover/lectern' },
|
|
64
|
+
resolve: { alias: presentAlias() },
|
|
65
|
+
plugins: singleFile ? [viteSingleFile()] : [],
|
|
66
|
+
build: {
|
|
67
|
+
outDir: outAbs,
|
|
68
|
+
emptyOutDir: true,
|
|
69
|
+
assetsInlineLimit: singleFile ? Number.MAX_SAFE_INTEGER : 4096,
|
|
70
|
+
chunkSizeWarningLimit: 4096,
|
|
71
|
+
},
|
|
72
|
+
server: { fs: { allow: fsAllow(deckPath) } },
|
|
73
|
+
})
|
|
74
|
+
} finally {
|
|
75
|
+
rmSync(workDir, { recursive: true, force: true })
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return join(outAbs, 'index.html')
|
|
79
|
+
}
|