@presentation-md/export 1.20.3 → 1.20.5

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 CHANGED
@@ -164,16 +164,19 @@ function cardStroke(ctx, opts = {}) {
164
164
  ctx.themeName === "monochrome" ||
165
165
  ctx.themeName === "soft-editorial" ||
166
166
  ctx.themeName === "pin-and-paper" ||
167
- ctx.themeName === "paper-ink" ||
168
167
  ctx.themeName === "notebook-tabs" ||
169
168
  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;
169
+ const color = ctx.themeName === "heritage-editorial" ? ctx.colors.accent : ctx.colors.text;
175
170
  return { color, width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
176
171
  }
172
+ // paper-ink-literary cards: 3px left accent rule (HTML border-left)
173
+ if (ctx.themeName === "paper-ink") {
174
+ return {
175
+ color: ctx.colors.accent,
176
+ width: opts.hero || opts.highlighted ? 2.75 : 2.5,
177
+ leftRule: true,
178
+ };
179
+ }
177
180
  // long-table-supper cards: dashed rust rim (HTML 1.5px dashed)
178
181
  if (ctx.themeName === "long-table") {
179
182
  return {
@@ -204,16 +207,62 @@ function cardStroke(ctx, opts = {}) {
204
207
  if (ctx.themeName === "ft-editorial") {
205
208
  return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
206
209
  }
210
+ // claude warm-paper cards: quiet paper border hairline
211
+ if (ctx.themeName === "claude") {
212
+ return { color: ctx.colors.border, width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
213
+ }
214
+ // default-tech neon-glow cards: violet accent rim
215
+ if (ctx.themeName === "default-tech") {
216
+ return { color: ctx.colors.accent, width: opts.hero || opts.highlighted ? 1.5 : 1.25 };
217
+ }
218
+ // corporate clean-light cards: navy-blue accent hairline
219
+ if (ctx.themeName === "corporate") {
220
+ return { color: ctx.colors.accent, width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
221
+ }
222
+ // playful soft-bento cards: coral accent rim (plump)
223
+ if (ctx.themeName === "playful") {
224
+ return { color: ctx.colors.accent, width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
225
+ }
226
+ // data-editorial data-rule cards: ink hairline
227
+ if (ctx.themeName === "data-editorial") {
228
+ return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
229
+ }
230
+ // developer-dark / fintech-clean / scandinavian peers
231
+ if (ctx.themeName === "developer-dark") {
232
+ return { color: ctx.colors.border, width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
233
+ }
234
+ if (ctx.themeName === "fintech-clean") {
235
+ return { color: ctx.colors.accent, width: opts.hero || opts.highlighted ? 1.35 : 1.15 };
236
+ }
237
+ if (ctx.themeName === "scandinavian") {
238
+ return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 1.25 : 1.1 };
239
+ }
240
+ // pastel-dreamy soft plum hairline (plump radius stays in cardRadius)
241
+ if (ctx.themeName === "pastel-dreamy") {
242
+ return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 1.15 : 1 };
243
+ }
244
+ // scatterbrain sticky notes: ink hairline on yellow
245
+ if (ctx.themeName === "scatterbrain") {
246
+ return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 1.15 : 1 };
247
+ }
248
+ // split-pastel soft white cards: quiet ink hairline (HTML border:none → soft rim)
249
+ if (ctx.themeName === "split-pastel") {
250
+ return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 1.1 : 0.9 };
251
+ }
252
+ // risograph-zine riso-print cards: hard ink (near-square)
253
+ if (ctx.themeName === "risograph-zine") {
254
+ return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 2.25 : 2 };
255
+ }
207
256
  if (opts.hero || opts.highlighted) {
208
257
  return { color: ctx.colors.accent, width: opts.highlighted ? 1.75 : 1.5 };
209
258
  }
210
259
  return { color: ctx.colors.border, width: 1 };
211
260
  }
212
- /** Draw a filled card shell with theme-native stroke (incl. dashed / top-rule). */
261
+ /** Draw a filled card shell with theme-native stroke (incl. dashed / top-rule / left-rule). */
213
262
  function drawCardFace(slide, ctx, x, y, w, h, fill, opts = {}) {
214
263
  const stroke = cardStroke(ctx, opts);
215
264
  const radius = cardRadius(ctx);
216
- if (stroke.topRule) {
265
+ if (stroke.topRule || stroke.leftRule) {
217
266
  slide.addShape(ctx.shapeRoundRect, {
218
267
  x,
219
268
  y,
@@ -223,16 +272,31 @@ function drawCardFace(slide, ctx, x, y, w, h, fill, opts = {}) {
223
272
  line: { color: fill, width: 0 },
224
273
  rectRadius: radius,
225
274
  });
226
- const ruleH = opts.hero || opts.highlighted ? 0.028 : 0.02;
227
- slide.addShape(ctx.shapeRoundRect, {
228
- x: x + 0.04,
229
- y,
230
- w: Math.max(0.2, w - 0.08),
231
- h: ruleH,
232
- fill: { color: stroke.color },
233
- line: { color: stroke.color, width: 0 },
234
- rectRadius: 0,
235
- });
275
+ if (stroke.topRule) {
276
+ const ruleH = opts.hero || opts.highlighted ? 0.028 : 0.02;
277
+ slide.addShape(ctx.shapeRoundRect, {
278
+ x: x + 0.04,
279
+ y,
280
+ w: Math.max(0.2, w - 0.08),
281
+ h: ruleH,
282
+ fill: { color: stroke.color },
283
+ line: { color: stroke.color, width: 0 },
284
+ rectRadius: 0,
285
+ });
286
+ }
287
+ if (stroke.leftRule) {
288
+ // HTML border-left ~3px ≈ 0.03"; keep a readable literary rail in PPTX.
289
+ const ruleW = Math.max(0.028, Math.min(0.04, stroke.width * 0.012));
290
+ slide.addShape(ctx.shapeRoundRect, {
291
+ x,
292
+ y: y + 0.04,
293
+ w: ruleW,
294
+ h: Math.max(0.2, h - 0.08),
295
+ fill: { color: stroke.color },
296
+ line: { color: stroke.color, width: 0 },
297
+ rectRadius: 0,
298
+ });
299
+ }
236
300
  return;
237
301
  }
238
302
  const line = {
@@ -318,8 +382,8 @@ function cardRadius(ctx) {
318
382
  // signal-briefing cards: theme geometry 2px ≈ 0.02"
319
383
  if (ctx.themeName === "signal")
320
384
  return 0.02;
321
- // blue-professional-clean cards: border-radius 12px ≈ 0.125"
322
- if (ctx.themeName === "blue-professional")
385
+ // blue-professional-clean / fintech-soft cards: border-radius 12px ≈ 0.125"
386
+ if (ctx.themeName === "blue-professional" || ctx.themeName === "fintech-clean")
323
387
  return 0.125;
324
388
  // hard-bento (genz-bento) cards: border-radius 14px ≈ 0.15"
325
389
  if (ctx.themeName === "genz-bento")
@@ -345,12 +409,36 @@ function cardRadius(ctx) {
345
409
  // vintage-editorial-geo cards: border-radius 4px ≈ 0.04"
346
410
  if (ctx.themeName === "vintage-editorial")
347
411
  return 0.04;
348
- // scatterbrain-cork cards: border-radius 2px ≈ 0.02"
349
- if (ctx.themeName === "scatterbrain")
412
+ // scatterbrain-cork / risograph-zine cards: border-radius 2px ≈ 0.02"
413
+ if (ctx.themeName === "scatterbrain" || ctx.themeName === "risograph-zine")
350
414
  return 0.02;
351
415
  // sakura-chroma-cassette cards: border-radius 4px ≈ 0.04"
352
416
  if (ctx.themeName === "sakura-chroma")
353
417
  return 0.04;
418
+ // claude warm-paper cards: geometry 12px * 0.85 ≈ 0.1"
419
+ if (ctx.themeName === "claude")
420
+ return 0.1;
421
+ // default-tech neon-glow cards: geometry 18px * 0.85 ≈ 0.16"
422
+ if (ctx.themeName === "default-tech")
423
+ return 0.16;
424
+ // corporate clean-light cards: geometry 8px * 0.85 ≈ 0.07"
425
+ if (ctx.themeName === "corporate")
426
+ return 0.07;
427
+ // playful soft-bento cards: border-radius 20px ≈ 0.21"
428
+ if (ctx.themeName === "playful")
429
+ return 0.21;
430
+ // data-editorial data-rule cards: geometry 4px ≈ 0.04"
431
+ if (ctx.themeName === "data-editorial")
432
+ return 0.04;
433
+ // developer-dark title-bar cards: geometry 8px ≈ 0.08"
434
+ if (ctx.themeName === "developer-dark")
435
+ return 0.08;
436
+ // scandinavian hygge cards: geometry 16px * 0.85 ≈ 0.14"
437
+ if (ctx.themeName === "scandinavian")
438
+ return 0.14;
439
+ // split-pastel soft white cards: border-radius 18px ≈ 0.19"
440
+ if (ctx.themeName === "split-pastel")
441
+ return 0.19;
354
442
  return 0.06;
355
443
  }
356
444
  /**
@@ -2322,7 +2410,7 @@ function paintSlideChrome(slide, ctx, data) {
2322
2410
  });
2323
2411
  }
2324
2412
  if (theme === "default-tech") {
2325
- // Neon-glow corner bloom + secondary cyan wash (HTML blur → soft ovals).
2413
+ // Neon-glow corner bloom + secondary cyan wash + quiet neon inset frame.
2326
2414
  const glowT = isHero ? 55 : 72;
2327
2415
  slide.addShape(ctx.shapeOval, {
2328
2416
  x: ctx.width - 4.2,
@@ -2340,6 +2428,15 @@ function paintSlideChrome(slide, ctx, data) {
2340
2428
  fill: { color: ctx.colors.accent2, transparency: isHero ? 68 : 80 },
2341
2429
  line: { color: ctx.colors.accent2, width: 0 },
2342
2430
  });
2431
+ slide.addShape(ctx.shapeRoundRect, {
2432
+ x: 0.28,
2433
+ y: 0.28,
2434
+ w: ctx.width - 0.56,
2435
+ h: ctx.height - 0.56,
2436
+ fill: { color: ctx.colors.bg, transparency: 100 },
2437
+ line: { color: ctx.colors.accent, width: isHero ? 1.25 : 1 },
2438
+ rectRadius: 0.14,
2439
+ });
2343
2440
  }
2344
2441
  if (theme === "kinetic-wrapped") {
2345
2442
  const tone = typeof data.tone === "string" ? data.tone : undefined;
@@ -5875,7 +5972,7 @@ function paintSlideChrome(slide, ctx, data) {
5875
5972
  });
5876
5973
  }
5877
5974
  if (theme === "playful") {
5878
- // Soft accent blot + rounded candy square + second cloud (soft-bento).
5975
+ // Soft accent blot + rounded candy square + second cloud + plump soft frame.
5879
5976
  slide.addShape(ctx.shapeOval, {
5880
5977
  x: ctx.width * 0.75,
5881
5978
  y: -ctx.height * 0.05,
@@ -5901,9 +5998,18 @@ function paintSlideChrome(slide, ctx, data) {
5901
5998
  line: { color: ctx.colors.accent, width: 0 },
5902
5999
  rectRadius: 0.28,
5903
6000
  });
6001
+ slide.addShape(ctx.shapeRoundRect, {
6002
+ x: 0.22,
6003
+ y: 0.22,
6004
+ w: ctx.width - 0.44,
6005
+ h: ctx.height - 0.44,
6006
+ fill: { color: ctx.colors.bg, transparency: 100 },
6007
+ line: { color: ctx.colors.border, width: 1.1 },
6008
+ rectRadius: 0.2,
6009
+ });
5904
6010
  }
5905
6011
  if (theme === "corporate") {
5906
- // Clean accent stub + soft top wash (clean-light).
6012
+ // Clean accent stub + soft top wash + quiet navy hairline frame (clean-light).
5907
6013
  slide.addShape(ctx.shapeRoundRect, {
5908
6014
  x: 0,
5909
6015
  y: 0,
@@ -5922,6 +6028,15 @@ function paintSlideChrome(slide, ctx, data) {
5922
6028
  line: { color: ctx.colors.accent, width: 0 },
5923
6029
  rectRadius: 0.045,
5924
6030
  });
6031
+ slide.addShape(ctx.shapeRoundRect, {
6032
+ x: 0.28,
6033
+ y: 0.28,
6034
+ w: ctx.width - 0.56,
6035
+ h: ctx.height - 0.56,
6036
+ fill: { color: ctx.colors.bg, transparency: 100 },
6037
+ line: { color: ctx.colors.border, width: 1 },
6038
+ rectRadius: 0.06,
6039
+ });
5925
6040
  }
5926
6041
  }
5927
6042
  export function renderSlide(slide, ctx, data) {