@gpichot/spectacle-deck 1.13.0 → 1.14.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/components/FilePane.d.ts +1 -1
- package/components/map.d.ts +1 -19
- package/components/styled.d.ts +6 -7
- package/engine/CommandPalette.d.ts +10 -0
- package/engine/Deck.d.ts +30 -0
- package/engine/DeckContext.d.ts +36 -0
- package/engine/ExportMode.d.ts +7 -0
- package/engine/Morph.d.ts +51 -0
- package/engine/OverviewMode.d.ts +6 -0
- package/engine/SectionTitle.d.ts +18 -0
- package/engine/Stepper.d.ts +28 -0
- package/engine/Template.d.ts +11 -0
- package/engine/dom-helpers.d.ts +8 -0
- package/engine/global.css.d.ts +11 -0
- package/engine/index.d.ts +19 -0
- package/engine/transitions.d.ts +35 -0
- package/engine/useKeyboard.d.ts +7 -0
- package/engine/useNavigation.d.ts +25 -0
- package/index.cjs +3313 -2249
- package/index.css +411 -0
- package/index.d.ts +4 -54
- package/index.mjs +3320 -2265
- package/layouts/SectionLayout.d.ts +4 -1
- package/layouts/index.d.ts +3 -1
- package/layouts/styled.d.ts +1 -1
- package/package.json +5 -7
- package/RemoteControllerShortcut.d.ts +0 -6
- package/SkipStepsShortcut.d.ts +0 -5
- package/components/Timeline.styled.d.ts +0 -4
- package/template.d.ts +0 -4
- package/transitions.d.ts +0 -14
package/index.css
ADDED
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
/* src/components/DocumentationItem.module.css */
|
|
2
|
+
.DocumentationItem_docWrapper {
|
|
3
|
+
position: absolute;
|
|
4
|
+
bottom: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
z-index: 10000;
|
|
7
|
+
&:hover .DocumentationItem_docContent {
|
|
8
|
+
display: flex;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
.DocumentationItem_docContainer {
|
|
12
|
+
margin: 2rem 1rem;
|
|
13
|
+
background-color: #333;
|
|
14
|
+
border: 1px solid #333;
|
|
15
|
+
padding: 0.5rem 1rem;
|
|
16
|
+
border-radius: 1.5rem;
|
|
17
|
+
}
|
|
18
|
+
.DocumentationItem_docLink {
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
font-weight: normal;
|
|
21
|
+
font-family: var(--font-family);
|
|
22
|
+
color: var(--color-secondary);
|
|
23
|
+
}
|
|
24
|
+
.DocumentationItem_docLinkItem {
|
|
25
|
+
width: fit-content;
|
|
26
|
+
display: inline-block;
|
|
27
|
+
background-color: #333;
|
|
28
|
+
border: 1px solid #333;
|
|
29
|
+
padding: 0.5rem 1rem;
|
|
30
|
+
border-radius: 1.5rem;
|
|
31
|
+
margin: 0.25rem 0;
|
|
32
|
+
}
|
|
33
|
+
.DocumentationItem_docContent {
|
|
34
|
+
display: none;
|
|
35
|
+
flex-flow: column-reverse nowrap;
|
|
36
|
+
position: absolute;
|
|
37
|
+
right: 1rem;
|
|
38
|
+
bottom: 4.5rem;
|
|
39
|
+
text-align: right;
|
|
40
|
+
border-radius: 0.5rem;
|
|
41
|
+
align-items: flex-end;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* src/components/HorizontalList.module.css */
|
|
45
|
+
.HorizontalList_container {
|
|
46
|
+
display: grid;
|
|
47
|
+
grid-gap: 2rem;
|
|
48
|
+
}
|
|
49
|
+
.HorizontalList_item {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
font-family:
|
|
53
|
+
Bitter,
|
|
54
|
+
"Helvetica Neue",
|
|
55
|
+
Helvetica,
|
|
56
|
+
Arial,
|
|
57
|
+
sans-serif;
|
|
58
|
+
}
|
|
59
|
+
.HorizontalList_itemHead {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: row;
|
|
62
|
+
font-size: 1.3rem;
|
|
63
|
+
margin-bottom: 0.4rem;
|
|
64
|
+
& p {
|
|
65
|
+
margin: 0;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
.HorizontalList_itemContent {
|
|
69
|
+
& > * {
|
|
70
|
+
font-size: 1rem;
|
|
71
|
+
padding: 4px !important;
|
|
72
|
+
line-height: 1.5rem !important;
|
|
73
|
+
margin-top: 0;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* src/components/IconBox.module.css */
|
|
78
|
+
.IconBox_content {
|
|
79
|
+
& * {
|
|
80
|
+
margin: 0.2rem !important;
|
|
81
|
+
padding: 0 !important;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* src/layouts/layouts.module.css */
|
|
86
|
+
.layouts_svgObject {
|
|
87
|
+
padding: 3rem 2rem;
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
background-color: white;
|
|
90
|
+
}
|
|
91
|
+
.layouts_bigValue {
|
|
92
|
+
font-family:
|
|
93
|
+
Bitter,
|
|
94
|
+
"Helvetica Neue",
|
|
95
|
+
Helvetica,
|
|
96
|
+
Arial,
|
|
97
|
+
sans-serif;
|
|
98
|
+
font-size: 10rem;
|
|
99
|
+
font-weight: 700;
|
|
100
|
+
line-height: 1;
|
|
101
|
+
color: var(--color-secondary);
|
|
102
|
+
text-align: center;
|
|
103
|
+
}
|
|
104
|
+
.layouts_bigCaption {
|
|
105
|
+
font-family:
|
|
106
|
+
Bitter,
|
|
107
|
+
"Helvetica Neue",
|
|
108
|
+
Helvetica,
|
|
109
|
+
Arial,
|
|
110
|
+
sans-serif;
|
|
111
|
+
font-size: 2rem;
|
|
112
|
+
font-weight: 400;
|
|
113
|
+
color: #ffffffcc;
|
|
114
|
+
text-align: center;
|
|
115
|
+
margin-top: 2rem;
|
|
116
|
+
max-width: 70%;
|
|
117
|
+
}
|
|
118
|
+
.layouts_centeredContent {
|
|
119
|
+
& h1,
|
|
120
|
+
& h2,
|
|
121
|
+
& h3,
|
|
122
|
+
& h4,
|
|
123
|
+
& h5 {
|
|
124
|
+
flex: 0 1 auto;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
.layouts_divWithHeading {
|
|
128
|
+
& h2 {
|
|
129
|
+
margin-top: 0;
|
|
130
|
+
}
|
|
131
|
+
& h2 strong {
|
|
132
|
+
color: var(--color-secondary);
|
|
133
|
+
font-weight: 400;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
.layouts_columnsContainer {
|
|
137
|
+
display: flex;
|
|
138
|
+
flex-direction: row;
|
|
139
|
+
position: absolute;
|
|
140
|
+
left: 0;
|
|
141
|
+
right: 0;
|
|
142
|
+
top: 0;
|
|
143
|
+
bottom: 0;
|
|
144
|
+
align-items: center;
|
|
145
|
+
}
|
|
146
|
+
.layouts_default3Side {
|
|
147
|
+
& svg {
|
|
148
|
+
height: 100%;
|
|
149
|
+
width: auto;
|
|
150
|
+
& path {
|
|
151
|
+
fill: #ffffff22;
|
|
152
|
+
transition: fill 3s;
|
|
153
|
+
&:hover {
|
|
154
|
+
fill: #ffffffbb;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
.layouts_default2Container {
|
|
160
|
+
& h2,
|
|
161
|
+
& h3 {
|
|
162
|
+
text-align: left;
|
|
163
|
+
color: white;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
.layouts_fullImageOverlay {
|
|
167
|
+
position: absolute;
|
|
168
|
+
inset: 0;
|
|
169
|
+
display: flex;
|
|
170
|
+
flex-flow: column nowrap;
|
|
171
|
+
justify-content: flex-end;
|
|
172
|
+
padding: 4rem 6rem;
|
|
173
|
+
z-index: 1;
|
|
174
|
+
& h1,
|
|
175
|
+
& h2,
|
|
176
|
+
& h3 {
|
|
177
|
+
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
|
|
178
|
+
}
|
|
179
|
+
& p {
|
|
180
|
+
text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
.layouts_quoteBase {
|
|
184
|
+
position: absolute;
|
|
185
|
+
inset: 0;
|
|
186
|
+
display: flex;
|
|
187
|
+
flex-flow: column nowrap;
|
|
188
|
+
justify-content: center;
|
|
189
|
+
& .layouts_blockquote > * {
|
|
190
|
+
border-left: 0;
|
|
191
|
+
}
|
|
192
|
+
& .layouts_blockquote {
|
|
193
|
+
text-align: justify;
|
|
194
|
+
position: relative;
|
|
195
|
+
}
|
|
196
|
+
& .layouts_blockquote > :first-child::before {
|
|
197
|
+
content: "\201c";
|
|
198
|
+
position: absolute;
|
|
199
|
+
font-size: 16rem;
|
|
200
|
+
left: -5rem;
|
|
201
|
+
font-family: serif;
|
|
202
|
+
top: 50%;
|
|
203
|
+
transform: translateY(-50%);
|
|
204
|
+
color: #ffffff22;
|
|
205
|
+
}
|
|
206
|
+
& .layouts_blockquote > :first-child::after {
|
|
207
|
+
content: "\201d";
|
|
208
|
+
position: absolute;
|
|
209
|
+
font-size: 16rem;
|
|
210
|
+
right: 3rem;
|
|
211
|
+
bottom: -5rem;
|
|
212
|
+
font-family: serif;
|
|
213
|
+
color: #ffffff22;
|
|
214
|
+
pointer-events: none;
|
|
215
|
+
}
|
|
216
|
+
& .layouts_blockquote * {
|
|
217
|
+
line-height: 3.5rem !important;
|
|
218
|
+
font-size: 2.5rem;
|
|
219
|
+
}
|
|
220
|
+
& .layouts_source {
|
|
221
|
+
font-family:
|
|
222
|
+
Bitter,
|
|
223
|
+
"Helvetica Neue",
|
|
224
|
+
Helvetica,
|
|
225
|
+
Arial,
|
|
226
|
+
sans-serif;
|
|
227
|
+
box-sizing: border-box;
|
|
228
|
+
width: 100%;
|
|
229
|
+
margin-top: 4rem;
|
|
230
|
+
text-align: right;
|
|
231
|
+
font-size: 2rem;
|
|
232
|
+
& a {
|
|
233
|
+
text-decoration: none;
|
|
234
|
+
color: #ffffff77;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
.layouts_sectionLayout {
|
|
239
|
+
display: flex;
|
|
240
|
+
flex-direction: column;
|
|
241
|
+
align-items: center;
|
|
242
|
+
justify-content: center;
|
|
243
|
+
height: 100%;
|
|
244
|
+
& h2 {
|
|
245
|
+
color: white;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
.layouts_codeSide {
|
|
249
|
+
& pre {
|
|
250
|
+
font-size: 0.9rem;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
.layouts_defaultLayoutHeading {
|
|
254
|
+
background-color: #ffffff11;
|
|
255
|
+
padding: 2rem 5rem;
|
|
256
|
+
margin-bottom: 1rem;
|
|
257
|
+
& h2 {
|
|
258
|
+
margin: 0;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* src/components/ItemsColumn.module.css */
|
|
263
|
+
.ItemsColumn_wrapper {
|
|
264
|
+
display: flex;
|
|
265
|
+
justify-content: center;
|
|
266
|
+
& * {
|
|
267
|
+
text-align: center !important;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/* src/components/Timeline.module.css */
|
|
272
|
+
.Timeline_item {
|
|
273
|
+
flex: 1;
|
|
274
|
+
flex-flow: column nowrap;
|
|
275
|
+
display: inline-flex;
|
|
276
|
+
&:nth-child(odd),
|
|
277
|
+
&:nth-child(odd) .Timeline_itemContent {
|
|
278
|
+
flex-direction: column;
|
|
279
|
+
}
|
|
280
|
+
&:nth-child(even),
|
|
281
|
+
&:nth-child(even) .Timeline_itemContent {
|
|
282
|
+
flex-direction: column-reverse;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
.Timeline_itemContent {
|
|
286
|
+
display: flex;
|
|
287
|
+
padding: 0.7rem 0 1rem 12px;
|
|
288
|
+
}
|
|
289
|
+
.Timeline_itemContentPhantom {
|
|
290
|
+
opacity: 0;
|
|
291
|
+
}
|
|
292
|
+
.Timeline_itemBody,
|
|
293
|
+
.Timeline_itemBody > * {
|
|
294
|
+
font-size: 1.3rem !important;
|
|
295
|
+
color: #ffffff !important;
|
|
296
|
+
}
|
|
297
|
+
.Timeline_itemTitle {
|
|
298
|
+
font-family:
|
|
299
|
+
Bitter,
|
|
300
|
+
"Helvetica Neue",
|
|
301
|
+
Helvetica,
|
|
302
|
+
Arial,
|
|
303
|
+
sans-serif;
|
|
304
|
+
font-size: 1rem;
|
|
305
|
+
font-weight: bold;
|
|
306
|
+
color: #ffffffbb;
|
|
307
|
+
}
|
|
308
|
+
.Timeline_guide {
|
|
309
|
+
width: 100%;
|
|
310
|
+
padding-top: 2px;
|
|
311
|
+
display: flex;
|
|
312
|
+
flex-flow: row;
|
|
313
|
+
align-items: center;
|
|
314
|
+
& svg {
|
|
315
|
+
height: 28px;
|
|
316
|
+
width: 28px;
|
|
317
|
+
& path {
|
|
318
|
+
fill: #ffffff;
|
|
319
|
+
}
|
|
320
|
+
margin-right: 4px;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
.Timeline_guideLine {
|
|
324
|
+
border-top: 4px solid #ffffff;
|
|
325
|
+
margin-right: 4px;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/* src/components/CodeStepper/CodeStepper.module.css */
|
|
329
|
+
.CodeStepper_container {
|
|
330
|
+
& pre {
|
|
331
|
+
padding: 1rem 0rem !important;
|
|
332
|
+
background-color: transparent !important;
|
|
333
|
+
}
|
|
334
|
+
& .CodeStepper_linenumber {
|
|
335
|
+
min-width: 2rem !important;
|
|
336
|
+
}
|
|
337
|
+
& [data-highlight-line=true] {
|
|
338
|
+
&::before {
|
|
339
|
+
content: " ";
|
|
340
|
+
position: absolute;
|
|
341
|
+
background-color: rgba(var(--color-primary-rgb), 0.5);
|
|
342
|
+
}
|
|
343
|
+
&[data-step-active=true]::before {
|
|
344
|
+
background-color: var(--color-secondary);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/* src/components/styled.module.css */
|
|
350
|
+
.styled_heading {
|
|
351
|
+
font-family:
|
|
352
|
+
Bitter,
|
|
353
|
+
"Helvetica Neue",
|
|
354
|
+
Helvetica,
|
|
355
|
+
Arial,
|
|
356
|
+
sans-serif;
|
|
357
|
+
font-size: 67px;
|
|
358
|
+
font-weight: 500;
|
|
359
|
+
& strong {
|
|
360
|
+
color: var(--color-secondary);
|
|
361
|
+
font-weight: 500;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
.styled_headingTwo {
|
|
365
|
+
font-family:
|
|
366
|
+
Bitter,
|
|
367
|
+
"Helvetica Neue",
|
|
368
|
+
Helvetica,
|
|
369
|
+
Arial,
|
|
370
|
+
sans-serif;
|
|
371
|
+
font-size: 55px;
|
|
372
|
+
font-weight: 400;
|
|
373
|
+
& strong {
|
|
374
|
+
color: var(--color-secondary);
|
|
375
|
+
font-weight: 500;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
.styled_headingThree {
|
|
379
|
+
font-family:
|
|
380
|
+
Bitter,
|
|
381
|
+
"Helvetica Neue",
|
|
382
|
+
Helvetica,
|
|
383
|
+
Arial,
|
|
384
|
+
sans-serif;
|
|
385
|
+
font-size: 40px;
|
|
386
|
+
font-weight: 400;
|
|
387
|
+
margin-top: 0;
|
|
388
|
+
& strong {
|
|
389
|
+
color: var(--color-secondary);
|
|
390
|
+
font-weight: 500;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
.styled_quote {
|
|
394
|
+
margin: 1rem 0;
|
|
395
|
+
padding-left: 1.5rem;
|
|
396
|
+
padding-top: 0;
|
|
397
|
+
padding-bottom: 0;
|
|
398
|
+
opacity: 0.8;
|
|
399
|
+
& > * {
|
|
400
|
+
padding: 0 !important;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
.styled_inlineCode {
|
|
404
|
+
filter: brightness(1.05);
|
|
405
|
+
zoom: 1.1;
|
|
406
|
+
&::before,
|
|
407
|
+
&::after {
|
|
408
|
+
content: "`";
|
|
409
|
+
font-size: 0.8em;
|
|
410
|
+
}
|
|
411
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { type LayoutComponent } from "./context";
|
|
3
|
-
export * from "spectacle";
|
|
1
|
+
import type React from "react";
|
|
4
2
|
export { AnimatedCounter, FadeIn, ProgressRing, ScaleIn, Spotlight, StaggerChildren, TypeWriter, } from "./components/animations";
|
|
5
3
|
export { Doc, DocItem } from "./components/DocumentationItem";
|
|
6
4
|
export { default as FilePane } from "./components/FilePane";
|
|
@@ -10,60 +8,12 @@ export { Image } from "./components/Image";
|
|
|
10
8
|
export { ItemsColumn } from "./components/ItemsColumn";
|
|
11
9
|
export { Mermaid } from "./components/Mermaid";
|
|
12
10
|
export { default as Timeline, TimelineItem } from "./components/Timeline";
|
|
13
|
-
export {
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
layout?: string;
|
|
17
|
-
};
|
|
18
|
-
slideComponent: React.ElementType<unknown>;
|
|
19
|
-
};
|
|
20
|
-
export type DeckType = {
|
|
21
|
-
metadata: Record<string, unknown>;
|
|
22
|
-
slides: SlideType[];
|
|
23
|
-
};
|
|
11
|
+
export type { DeckState, DeckType, MorphProps, SlideTransition, SlideType, StepperProps, } from "./engine";
|
|
12
|
+
export { Deck, DeckContext, dropTransition, fadeTransition, getCurrentSection, Morph, MorphImage, morphTransition, noneTransition, resolveTransition, SectionTitle, Stepper, slideTransition, useDeck, useKeyboard, } from "./engine";
|
|
13
|
+
export { default as layouts } from "./layouts";
|
|
24
14
|
export declare function PassThrough({ children }: {
|
|
25
15
|
children: React.ReactNode;
|
|
26
16
|
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export declare const layouts: {
|
|
28
|
-
mainSection: ({ children, }: {
|
|
29
|
-
children: React.ReactNode;
|
|
30
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
centered: (props: React.ComponentPropsWithoutRef<"div">) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
default3: ({ children, position, }: {
|
|
33
|
-
children: React.ReactNode;
|
|
34
|
-
position?: "left" | "right";
|
|
35
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
-
quote: typeof import("./layouts/QuoteLayout").QuoteLayout;
|
|
37
|
-
sidedCode: typeof import("./layouts/SideCodeLayout").SidedCodeLayout;
|
|
38
|
-
sidedImage: ({ children, image, position, height, ratio: ratioProp, }: {
|
|
39
|
-
children: React.ReactNode;
|
|
40
|
-
image?: string;
|
|
41
|
-
position?: "left" | "right";
|
|
42
|
-
ratio?: string;
|
|
43
|
-
height?: number;
|
|
44
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
-
side: typeof import("./layouts/SideLayout").SideLayout;
|
|
46
|
-
section: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
47
|
-
fullImage: typeof import("./layouts/FullImageLayout").FullImageLayout;
|
|
48
|
-
bigNumber: typeof import("./layouts/BigNumberLayout").BigNumberLayout;
|
|
49
|
-
twoColumn: typeof import("./layouts/TwoColumnLayout").TwoColumnLayout;
|
|
50
|
-
};
|
|
51
|
-
interface ThemeOptions {
|
|
52
|
-
themeTokens: {
|
|
53
|
-
colors: Record<string, string>;
|
|
54
|
-
fonts?: {
|
|
55
|
-
header?: string;
|
|
56
|
-
text?: string;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
export declare function Deck({ deck, theme, layouts, transition, }: {
|
|
61
|
-
deck: DeckType;
|
|
62
|
-
theme: ThemeOptions;
|
|
63
|
-
layouts?: Record<string, LayoutComponent>;
|
|
64
|
-
/** Default slide transition. Can be a name ("fade", "slide", "drop", "none") or a SlideTransition object. */
|
|
65
|
-
transition?: string;
|
|
66
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
67
17
|
export declare function Danger({ children }: {
|
|
68
18
|
children: React.ReactNode;
|
|
69
19
|
}): import("react/jsx-runtime").JSX.Element;
|