@presentation-md/export 1.18.0 → 1.20.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/dist/layouts.js +203 -46
- package/dist/layouts.js.map +1 -1
- package/package.json +2 -2
package/dist/layouts.js
CHANGED
|
@@ -72,6 +72,108 @@ function cardStroke(ctx, opts = {}) {
|
|
|
72
72
|
if (ctx.themeName === "biennale-yellow") {
|
|
73
73
|
return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 1.35 : 1.1 };
|
|
74
74
|
}
|
|
75
|
+
// hard-bento (genz-bento) cards: 2.5px ink
|
|
76
|
+
if (ctx.themeName === "genz-bento") {
|
|
77
|
+
return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 2.75 : 2.5 };
|
|
78
|
+
}
|
|
79
|
+
// acid-block (brutalist-acid) cards: 2px accent, square
|
|
80
|
+
if (ctx.themeName === "brutalist-acid") {
|
|
81
|
+
return { color: ctx.colors.accent, width: opts.hero || opts.highlighted ? 2.25 : 2 };
|
|
82
|
+
}
|
|
83
|
+
// bauhaus-blocks cards: 2px ink, square
|
|
84
|
+
if (ctx.themeName === "bauhaus") {
|
|
85
|
+
return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 2.25 : 2 };
|
|
86
|
+
}
|
|
87
|
+
// neo-grid-panels / bold-poster-ink / tri-tone-blocks cards: 2px ink, square
|
|
88
|
+
if (ctx.themeName === "neo-grid-bold" ||
|
|
89
|
+
ctx.themeName === "bold-poster" ||
|
|
90
|
+
ctx.themeName === "editorial-tri-tone") {
|
|
91
|
+
return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 2.25 : 2 };
|
|
92
|
+
}
|
|
93
|
+
// raw-grid-brutal cards: 3px ink, square
|
|
94
|
+
if (ctx.themeName === "raw-grid") {
|
|
95
|
+
return { color: "0A0A0A", width: opts.hero || opts.highlighted ? 3.25 : 3 };
|
|
96
|
+
}
|
|
97
|
+
// creative-voltage-split cards: 1px neon accent, square
|
|
98
|
+
if (ctx.themeName === "creative-voltage") {
|
|
99
|
+
return { color: ctx.colors.accent, width: opts.hero || opts.highlighted ? 1.5 : 1.25 };
|
|
100
|
+
}
|
|
101
|
+
// wrapped-block (kinetic-wrapped) cards: 3px accent, square
|
|
102
|
+
if (ctx.themeName === "kinetic-wrapped") {
|
|
103
|
+
return { color: ctx.colors.accent, width: opts.hero || opts.highlighted ? 3.25 : 3 };
|
|
104
|
+
}
|
|
105
|
+
// hud-grid / blueprint-grid cards: accent hairline, square
|
|
106
|
+
if (ctx.themeName === "aerospace-hud" || ctx.themeName === "blueprint") {
|
|
107
|
+
return { color: ctx.colors.accent, width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
|
|
108
|
+
}
|
|
109
|
+
// swiss-grid cards: quiet border, square
|
|
110
|
+
if (ctx.themeName === "swiss-typographic") {
|
|
111
|
+
return { color: ctx.colors.border, width: opts.hero || opts.highlighted ? 1.25 : 1 };
|
|
112
|
+
}
|
|
113
|
+
// bold-signal-card: accent rim (plump radius stays in cardRadius)
|
|
114
|
+
if (ctx.themeName === "bold-signal") {
|
|
115
|
+
return { color: ctx.colors.accent, width: opts.hero || opts.highlighted ? 1.5 : 1.25 };
|
|
116
|
+
}
|
|
117
|
+
// vintage-editorial-geo cards: 2px ink, near-square
|
|
118
|
+
if (ctx.themeName === "vintage-editorial") {
|
|
119
|
+
return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 2.25 : 2 };
|
|
120
|
+
}
|
|
121
|
+
// electric-studio-split / studio-acid / grove-monograph / cartesian-draft / botanical /
|
|
122
|
+
// dark-botanical / editorial-serif: square hairline cards
|
|
123
|
+
if (ctx.themeName === "electric-studio" ||
|
|
124
|
+
ctx.themeName === "studio" ||
|
|
125
|
+
ctx.themeName === "grove" ||
|
|
126
|
+
ctx.themeName === "cartesian" ||
|
|
127
|
+
ctx.themeName === "botanical-luxe" ||
|
|
128
|
+
ctx.themeName === "dark-botanical" ||
|
|
129
|
+
ctx.themeName === "editorial-serif") {
|
|
130
|
+
const color = ctx.themeName === "studio"
|
|
131
|
+
? "2E2E2C"
|
|
132
|
+
: ctx.themeName === "botanical-luxe"
|
|
133
|
+
? ctx.colors.accent
|
|
134
|
+
: ctx.themeName === "electric-studio" || ctx.themeName === "dark-botanical"
|
|
135
|
+
? ctx.colors.text
|
|
136
|
+
: ctx.colors.border;
|
|
137
|
+
return { color, width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
|
|
138
|
+
}
|
|
139
|
+
// aurora-glass / glass-mist: frosted white/glass rim
|
|
140
|
+
if (ctx.themeName === "aurora-glass" || ctx.themeName === "glassmorphism") {
|
|
141
|
+
return { color: "FFFFFF", width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
|
|
142
|
+
}
|
|
143
|
+
// crt-phosphor cards: accent hairline, square
|
|
144
|
+
if (ctx.themeName === "crt-terminal") {
|
|
145
|
+
return { color: ctx.colors.accent, width: opts.hero || opts.highlighted ? 1.5 : 1.25 };
|
|
146
|
+
}
|
|
147
|
+
// brutalist-grid (brutalist-mono): hard ink, square
|
|
148
|
+
if (ctx.themeName === "brutalist-mono") {
|
|
149
|
+
return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 2.25 : 2 };
|
|
150
|
+
}
|
|
151
|
+
// emerald-editorial / pink-script / vellum / broadsheet / editorial-forest /
|
|
152
|
+
// soft-editorial / paper-ink / pin-and-paper / monochrome / notebook-tabs
|
|
153
|
+
if (ctx.themeName === "emerald-editorial") {
|
|
154
|
+
return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 2.25 : 2 };
|
|
155
|
+
}
|
|
156
|
+
if (ctx.themeName === "pink-script") {
|
|
157
|
+
return { color: "ED3D8C", width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
|
|
158
|
+
}
|
|
159
|
+
if (ctx.themeName === "vellum") {
|
|
160
|
+
return { color: ctx.colors.accent, width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
|
|
161
|
+
}
|
|
162
|
+
if (ctx.themeName === "broadsheet" ||
|
|
163
|
+
ctx.themeName === "editorial-forest" ||
|
|
164
|
+
ctx.themeName === "monochrome" ||
|
|
165
|
+
ctx.themeName === "soft-editorial" ||
|
|
166
|
+
ctx.themeName === "pin-and-paper" ||
|
|
167
|
+
ctx.themeName === "paper-ink" ||
|
|
168
|
+
ctx.themeName === "notebook-tabs" ||
|
|
169
|
+
ctx.themeName === "heritage-editorial") {
|
|
170
|
+
const color = ctx.themeName === "heritage-editorial"
|
|
171
|
+
? ctx.colors.accent
|
|
172
|
+
: ctx.themeName === "paper-ink"
|
|
173
|
+
? ctx.colors.accent
|
|
174
|
+
: ctx.colors.text;
|
|
175
|
+
return { color, width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
|
|
176
|
+
}
|
|
75
177
|
if (opts.hero || opts.highlighted) {
|
|
76
178
|
return { color: ctx.colors.accent, width: opts.highlighted ? 1.75 : 1.5 };
|
|
77
179
|
}
|
|
@@ -96,7 +198,7 @@ function cardRadius(ctx) {
|
|
|
96
198
|
// stencil-tablet-earth cards: border-radius 24px ≈ 0.25"
|
|
97
199
|
if (ctx.themeName === "stencil-tablet")
|
|
98
200
|
return 0.25;
|
|
99
|
-
// retro-zine-riso / block-frame-brutal / creative-mode-blocks / 8-bit / Win95 / coral / peoples / broadside / cobalt / mat / biennale / arcade: square
|
|
201
|
+
// retro-zine-riso / block-frame-brutal / creative-mode-blocks / 8-bit / Win95 / coral / peoples / broadside / cobalt / mat / biennale / arcade / acid / bauhaus / neo-grid / bold-poster / tri-tone / raw-grid / voltage / Pulse / hud / blueprint / swiss: square
|
|
100
202
|
if (ctx.themeName === "retro-zine" ||
|
|
101
203
|
ctx.themeName === "block-frame" ||
|
|
102
204
|
ctx.themeName === "creative-mode" ||
|
|
@@ -108,10 +210,40 @@ function cardRadius(ctx) {
|
|
|
108
210
|
ctx.themeName === "cobalt-grid" ||
|
|
109
211
|
ctx.themeName === "mat" ||
|
|
110
212
|
ctx.themeName === "biennale-yellow" ||
|
|
111
|
-
ctx.themeName === "retro-arcade"
|
|
213
|
+
ctx.themeName === "retro-arcade" ||
|
|
214
|
+
ctx.themeName === "brutalist-acid" ||
|
|
215
|
+
ctx.themeName === "bauhaus" ||
|
|
216
|
+
ctx.themeName === "neo-grid-bold" ||
|
|
217
|
+
ctx.themeName === "bold-poster" ||
|
|
218
|
+
ctx.themeName === "editorial-tri-tone" ||
|
|
219
|
+
ctx.themeName === "raw-grid" ||
|
|
220
|
+
ctx.themeName === "creative-voltage" ||
|
|
221
|
+
ctx.themeName === "kinetic-wrapped" ||
|
|
222
|
+
ctx.themeName === "aerospace-hud" ||
|
|
223
|
+
ctx.themeName === "blueprint" ||
|
|
224
|
+
ctx.themeName === "swiss-typographic" ||
|
|
225
|
+
ctx.themeName === "electric-studio" ||
|
|
226
|
+
ctx.themeName === "studio" ||
|
|
227
|
+
ctx.themeName === "grove" ||
|
|
228
|
+
ctx.themeName === "cartesian" ||
|
|
229
|
+
ctx.themeName === "botanical-luxe" ||
|
|
230
|
+
ctx.themeName === "dark-botanical" ||
|
|
231
|
+
ctx.themeName === "editorial-serif" ||
|
|
232
|
+
ctx.themeName === "crt-terminal" ||
|
|
233
|
+
ctx.themeName === "brutalist-mono" ||
|
|
234
|
+
ctx.themeName === "emerald-editorial" ||
|
|
235
|
+
ctx.themeName === "pink-script" ||
|
|
236
|
+
ctx.themeName === "vellum" ||
|
|
237
|
+
ctx.themeName === "broadsheet" ||
|
|
238
|
+
ctx.themeName === "editorial-forest" ||
|
|
239
|
+
ctx.themeName === "monochrome" ||
|
|
240
|
+
ctx.themeName === "paper-ink") {
|
|
112
241
|
return 0;
|
|
113
242
|
}
|
|
114
|
-
//
|
|
243
|
+
// hard-bento (genz-bento) cards: border-radius 14px ≈ 0.15"
|
|
244
|
+
if (ctx.themeName === "genz-bento")
|
|
245
|
+
return 0.15;
|
|
246
|
+
// bold-signal-card / aero-bubble / pastel-geometry / pastel-dreamy / glass: plump
|
|
115
247
|
if (ctx.themeName === "bold-signal")
|
|
116
248
|
return 0.16;
|
|
117
249
|
if (ctx.themeName === "y2k-aero")
|
|
@@ -120,6 +252,18 @@ function cardRadius(ctx) {
|
|
|
120
252
|
return 0.18;
|
|
121
253
|
if (ctx.themeName === "pastel-dreamy")
|
|
122
254
|
return 0.22;
|
|
255
|
+
if (ctx.themeName === "aurora-glass" || ctx.themeName === "glassmorphism")
|
|
256
|
+
return 0.14;
|
|
257
|
+
// pin-and-paper / notebook-tabs / heritage: soft paper radii (soft-editorial already above)
|
|
258
|
+
if (ctx.themeName === "pin-and-paper")
|
|
259
|
+
return 0.08;
|
|
260
|
+
if (ctx.themeName === "notebook-tabs")
|
|
261
|
+
return 0.1;
|
|
262
|
+
if (ctx.themeName === "heritage-editorial")
|
|
263
|
+
return 0.06;
|
|
264
|
+
// vintage-editorial-geo cards: border-radius 4px ≈ 0.04"
|
|
265
|
+
if (ctx.themeName === "vintage-editorial")
|
|
266
|
+
return 0.04;
|
|
123
267
|
// scatterbrain-cork cards: border-radius 2px ≈ 0.02"
|
|
124
268
|
if (ctx.themeName === "scatterbrain")
|
|
125
269
|
return 0.02;
|
|
@@ -2709,25 +2853,26 @@ function paintSlideChrome(slide, ctx, data) {
|
|
|
2709
2853
|
}
|
|
2710
2854
|
}
|
|
2711
2855
|
if (theme === "aerospace-hud") {
|
|
2712
|
-
// HUD grid + border + dual reticles +
|
|
2713
|
-
|
|
2856
|
+
// Denser HUD grid + border + dual reticles + crosshair ticks + orange
|
|
2857
|
+
// telemetry stub (hud-grid). Cards get accent hairline via cardStroke.
|
|
2858
|
+
for (let i = 1; i < 12; i++) {
|
|
2714
2859
|
slide.addShape(ctx.shapeRoundRect, {
|
|
2715
|
-
x: (ctx.width /
|
|
2860
|
+
x: (ctx.width / 12) * i,
|
|
2716
2861
|
y: 0,
|
|
2717
2862
|
w: 0.012,
|
|
2718
2863
|
h: ctx.height,
|
|
2719
|
-
fill: { color: ctx.colors.accent, transparency:
|
|
2864
|
+
fill: { color: ctx.colors.accent, transparency: 78 },
|
|
2720
2865
|
line: { color: ctx.colors.accent, width: 0 },
|
|
2721
2866
|
rectRadius: 0,
|
|
2722
2867
|
});
|
|
2723
2868
|
}
|
|
2724
|
-
for (let i = 1; i <
|
|
2869
|
+
for (let i = 1; i < 8; i++) {
|
|
2725
2870
|
slide.addShape(ctx.shapeRoundRect, {
|
|
2726
2871
|
x: 0,
|
|
2727
|
-
y: (ctx.height /
|
|
2872
|
+
y: (ctx.height / 8) * i,
|
|
2728
2873
|
w: ctx.width,
|
|
2729
2874
|
h: 0.012,
|
|
2730
|
-
fill: { color: ctx.colors.accent, transparency:
|
|
2875
|
+
fill: { color: ctx.colors.accent, transparency: 78 },
|
|
2731
2876
|
line: { color: ctx.colors.accent, width: 0 },
|
|
2732
2877
|
rectRadius: 0,
|
|
2733
2878
|
});
|
|
@@ -2738,19 +2883,20 @@ function paintSlideChrome(slide, ctx, data) {
|
|
|
2738
2883
|
w: ctx.width - 0.2,
|
|
2739
2884
|
h: ctx.height - 0.2,
|
|
2740
2885
|
fill: { color: ctx.colors.bg, transparency: 100 },
|
|
2741
|
-
line: { color: ctx.colors.accent, width: 1.
|
|
2886
|
+
line: { color: ctx.colors.accent, width: 1.35 },
|
|
2742
2887
|
rectRadius: 0,
|
|
2743
2888
|
});
|
|
2889
|
+
// Bottom-left instrument square (warning orange).
|
|
2744
2890
|
slide.addShape(ctx.shapeRoundRect, {
|
|
2745
2891
|
x: ctx.margin,
|
|
2746
|
-
y: ctx.margin,
|
|
2892
|
+
y: ctx.height - ctx.margin - 0.55,
|
|
2747
2893
|
w: 0.55,
|
|
2748
2894
|
h: 0.55,
|
|
2749
2895
|
fill: { color: ctx.colors.bg, transparency: 100 },
|
|
2750
2896
|
line: { color: ctx.colors.accent2, width: 1.5 },
|
|
2751
2897
|
rectRadius: 0,
|
|
2752
2898
|
});
|
|
2753
|
-
// Top-right reticle (hud-grid ::after).
|
|
2899
|
+
// Top-right reticle (hud-grid ::after) + crosshair ticks.
|
|
2754
2900
|
slide.addShape(ctx.shapeOval, {
|
|
2755
2901
|
x: ctx.width - 1.45,
|
|
2756
2902
|
y: 0.45,
|
|
@@ -2767,12 +2913,30 @@ function paintSlideChrome(slide, ctx, data) {
|
|
|
2767
2913
|
fill: { color: ctx.colors.bg, transparency: 100 },
|
|
2768
2914
|
line: { color: ctx.colors.accent, width: 0.75 },
|
|
2769
2915
|
});
|
|
2916
|
+
slide.addShape(ctx.shapeRoundRect, {
|
|
2917
|
+
x: ctx.width - 1.08,
|
|
2918
|
+
y: 0.82,
|
|
2919
|
+
w: 0.12,
|
|
2920
|
+
h: 0.02,
|
|
2921
|
+
fill: { color: ctx.colors.accent },
|
|
2922
|
+
line: { color: ctx.colors.accent, width: 0 },
|
|
2923
|
+
rectRadius: 0,
|
|
2924
|
+
});
|
|
2925
|
+
slide.addShape(ctx.shapeRoundRect, {
|
|
2926
|
+
x: ctx.width - 1.05,
|
|
2927
|
+
y: 0.7,
|
|
2928
|
+
w: 0.02,
|
|
2929
|
+
h: 0.28,
|
|
2930
|
+
fill: { color: ctx.colors.accent },
|
|
2931
|
+
line: { color: ctx.colors.accent, width: 0 },
|
|
2932
|
+
rectRadius: 0,
|
|
2933
|
+
});
|
|
2770
2934
|
slide.addShape(ctx.shapeRoundRect, {
|
|
2771
2935
|
x: ctx.width - 2.1,
|
|
2772
2936
|
y: ctx.height - 0.72,
|
|
2773
2937
|
w: 1.35,
|
|
2774
2938
|
h: 0.08,
|
|
2775
|
-
fill: { color: ctx.colors.accent2, transparency:
|
|
2939
|
+
fill: { color: ctx.colors.accent2, transparency: 20 },
|
|
2776
2940
|
line: { color: ctx.colors.accent2, width: 0 },
|
|
2777
2941
|
rectRadius: 0,
|
|
2778
2942
|
});
|
|
@@ -3041,7 +3205,8 @@ function paintSlideChrome(slide, ctx, data) {
|
|
|
3041
3205
|
});
|
|
3042
3206
|
}
|
|
3043
3207
|
if (theme === "bauhaus") {
|
|
3044
|
-
// Hard frame
|
|
3208
|
+
// Hard frame + red square + blue circle on every slide (bauhaus-blocks
|
|
3209
|
+
// ::before/::after are not hero-gated). Heroes get larger primary blocks.
|
|
3045
3210
|
slide.addShape(ctx.shapeRoundRect, {
|
|
3046
3211
|
x: 0.08,
|
|
3047
3212
|
y: 0.08,
|
|
@@ -3051,37 +3216,29 @@ function paintSlideChrome(slide, ctx, data) {
|
|
|
3051
3216
|
line: { color: ctx.colors.text, width: 2 },
|
|
3052
3217
|
rectRadius: 0,
|
|
3053
3218
|
});
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
y: ctx.margin * 0.9,
|
|
3078
|
-
w: 0.55,
|
|
3079
|
-
h: 0.55,
|
|
3080
|
-
fill: { color: ctx.colors.accent },
|
|
3081
|
-
line: { color: ctx.colors.accent, width: 0 },
|
|
3082
|
-
rectRadius: 0,
|
|
3083
|
-
});
|
|
3084
|
-
}
|
|
3219
|
+
const sq = isHero ? 1.05 : 0.72;
|
|
3220
|
+
const circ = isHero ? 1.05 : 0.72;
|
|
3221
|
+
const sqX = isHero ? ctx.width - 2.3 : ctx.width - 1.55;
|
|
3222
|
+
const sqY = isHero ? 0.7 : 0.55;
|
|
3223
|
+
const circX = isHero ? ctx.width - 2.9 : ctx.width - 2.05;
|
|
3224
|
+
const circY = isHero ? 1.35 : 1.0;
|
|
3225
|
+
slide.addShape(ctx.shapeRoundRect, {
|
|
3226
|
+
x: sqX,
|
|
3227
|
+
y: sqY,
|
|
3228
|
+
w: sq,
|
|
3229
|
+
h: sq,
|
|
3230
|
+
fill: { color: ctx.colors.accent },
|
|
3231
|
+
line: { color: ctx.colors.accent, width: 0 },
|
|
3232
|
+
rectRadius: 0,
|
|
3233
|
+
});
|
|
3234
|
+
slide.addShape(ctx.shapeOval, {
|
|
3235
|
+
x: circX,
|
|
3236
|
+
y: circY,
|
|
3237
|
+
w: circ,
|
|
3238
|
+
h: circ,
|
|
3239
|
+
fill: { color: ctx.colors.accent2, transparency: isHero ? 12 : 22 },
|
|
3240
|
+
line: { color: ctx.colors.accent2, width: 0 },
|
|
3241
|
+
});
|
|
3085
3242
|
}
|
|
3086
3243
|
if (theme === "fintech-clean") {
|
|
3087
3244
|
// Soft mint radial wash + clean frame (fintech-soft).
|