@presentation-md/export 1.14.0 → 1.16.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 CHANGED
@@ -4,6 +4,14 @@ function cardStroke(ctx, opts = {}) {
4
4
  if (ctx.themeName === "candy-pop") {
5
5
  return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 2.75 : 2.5 };
6
6
  }
7
+ // daisy-days-pastel cards: 3px charcoal
8
+ if (ctx.themeName === "daisy-days") {
9
+ return { color: "2D2D2D", width: opts.hero || opts.highlighted ? 2.75 : 2.5 };
10
+ }
11
+ // stencil-tablet-earth / retro-zine-riso cards: 2px hard ink
12
+ if (ctx.themeName === "stencil-tablet" || ctx.themeName === "retro-zine") {
13
+ return { color: ctx.colors.text, width: opts.hero || opts.highlighted ? 2.25 : 2 };
14
+ }
7
15
  if (opts.hero || opts.highlighted) {
8
16
  return { color: ctx.colors.accent, width: opts.highlighted ? 1.75 : 1.5 };
9
17
  }
@@ -16,6 +24,21 @@ function cardRadius(ctx) {
16
24
  // soft-editorial-paper cards: border-radius 24px ≈ 0.25"
17
25
  if (ctx.themeName === "soft-editorial")
18
26
  return 0.25;
27
+ // capsule-pills cards: border-radius 2rem ≈ 0.29"
28
+ if (ctx.themeName === "capsule")
29
+ return 0.29;
30
+ // long-table-supper cards: border-radius 1.25rem ≈ 0.21"
31
+ if (ctx.themeName === "long-table")
32
+ return 0.21;
33
+ // daisy-days-pastel cards: border-radius 20px ≈ 0.21"
34
+ if (ctx.themeName === "daisy-days")
35
+ return 0.21;
36
+ // stencil-tablet-earth cards: border-radius 24px ≈ 0.25"
37
+ if (ctx.themeName === "stencil-tablet")
38
+ return 0.25;
39
+ // retro-zine-riso cards: square
40
+ if (ctx.themeName === "retro-zine")
41
+ return 0;
19
42
  return 0.06;
20
43
  }
21
44
  /**
@@ -3307,32 +3330,82 @@ function paintSlideChrome(slide, ctx, data) {
3307
3330
  }
3308
3331
  }
3309
3332
  if (theme === "capsule") {
3310
- // Soft pill ornaments (capsule-pills).
3333
+ // Plump frame + soft shadow + quiet pastel blots on all slides;
3334
+ // hero-gated coral pill + lime circles (capsule-pills HTML ::before/::after).
3335
+ slide.addShape(ctx.shapeRoundRect, {
3336
+ x: 0.38,
3337
+ y: 0.36,
3338
+ w: ctx.width - 0.48,
3339
+ h: ctx.height - 0.48,
3340
+ fill: { color: ctx.colors.text, transparency: 93 },
3341
+ line: { color: ctx.colors.text, width: 0 },
3342
+ rectRadius: 0.29,
3343
+ });
3311
3344
  slide.addShape(ctx.shapeRoundRect, {
3312
- x: ctx.width - 2.1,
3313
- y: 0.55,
3314
- w: 1.45,
3315
- h: 0.42,
3316
- fill: { color: ctx.colors.accent },
3317
- line: { color: ctx.colors.border, width: 1.5 },
3318
- rectRadius: 0.21,
3345
+ x: 0.18,
3346
+ y: 0.18,
3347
+ w: ctx.width - 0.36,
3348
+ h: ctx.height - 0.36,
3349
+ fill: { color: ctx.colors.bg, transparency: 100 },
3350
+ line: { color: ctx.colors.border, width: 2 },
3351
+ rectRadius: 0.29,
3319
3352
  });
3353
+ // Quiet lavender / sky radial blots (HTML --slide-bg candy).
3320
3354
  slide.addShape(ctx.shapeOval, {
3321
- x: 0.55,
3322
- y: ctx.height - 1.55,
3323
- w: 0.95,
3324
- h: 0.95,
3325
- fill: { color: ctx.colors.accent2 },
3326
- line: { color: ctx.colors.border, width: 1.5 },
3355
+ x: 0.35,
3356
+ y: ctx.height - 1.85,
3357
+ w: 0.72,
3358
+ h: 0.72,
3359
+ fill: { color: "C5B5E0", transparency: 42 },
3360
+ line: { color: "C5B5E0", width: 0 },
3327
3361
  });
3328
3362
  slide.addShape(ctx.shapeOval, {
3329
- x: ctx.width * 0.78,
3330
- y: ctx.height * 0.72,
3331
- w: 0.55,
3332
- h: 0.55,
3333
- fill: { color: "C4D94E", transparency: 25 },
3334
- line: { color: ctx.colors.border, width: 1 },
3363
+ x: ctx.width - 1.55,
3364
+ y: 0.55,
3365
+ w: 0.58,
3366
+ h: 0.58,
3367
+ fill: { color: "8BB4F7", transparency: 38 },
3368
+ line: { color: "8BB4F7", width: 0 },
3335
3369
  });
3370
+ if (isHero) {
3371
+ slide.addShape(ctx.shapeRoundRect, {
3372
+ x: ctx.width - 2.15,
3373
+ y: 0.5,
3374
+ w: 1.45,
3375
+ h: 0.42,
3376
+ fill: { color: ctx.colors.accent },
3377
+ line: { color: ctx.colors.border, width: 2 },
3378
+ rectRadius: 0.21,
3379
+ });
3380
+ slide.addShape(ctx.shapeOval, {
3381
+ x: 0.5,
3382
+ y: ctx.height - 1.6,
3383
+ w: 0.95,
3384
+ h: 0.95,
3385
+ fill: { color: ctx.colors.accent2 },
3386
+ line: { color: ctx.colors.border, width: 2 },
3387
+ });
3388
+ slide.addShape(ctx.shapeOval, {
3389
+ x: ctx.width * 0.78,
3390
+ y: ctx.height * 0.72,
3391
+ w: 0.55,
3392
+ h: 0.55,
3393
+ fill: { color: "C4D94E", transparency: 18 },
3394
+ line: { color: ctx.colors.border, width: 1.5 },
3395
+ });
3396
+ }
3397
+ else {
3398
+ // Quiet accent stub when loud pills are off.
3399
+ slide.addShape(ctx.shapeRoundRect, {
3400
+ x: ctx.margin,
3401
+ y: ctx.height - 0.58,
3402
+ w: 0.7,
3403
+ h: 0.03,
3404
+ fill: { color: ctx.colors.accent },
3405
+ line: { color: ctx.colors.accent, width: 0 },
3406
+ rectRadius: 0.015,
3407
+ });
3408
+ }
3336
3409
  }
3337
3410
  if (theme === "cobalt-grid") {
3338
3411
  // Blueprint-ish cobalt grid + corner hatch (cobalt-grid-paper).
@@ -3709,8 +3782,9 @@ function paintSlideChrome(slide, ctx, data) {
3709
3782
  rectRadius: 0,
3710
3783
  });
3711
3784
  }
3712
- if (theme === "retro-zine" && isHero) {
3713
- // Offset green plate + cream card (retro-zine-riso).
3785
+ if (theme === "retro-zine") {
3786
+ // Hard frame + offset green plate + cream card on every slide (retro-zine-riso).
3787
+ // HTML ::before/::after are not hero-gated.
3714
3788
  slide.addShape(ctx.shapeRoundRect, {
3715
3789
  x: ctx.width * 0.68,
3716
3790
  y: ctx.height * 0.18,
@@ -3726,7 +3800,7 @@ function paintSlideChrome(slide, ctx, data) {
3726
3800
  w: ctx.width * 0.26,
3727
3801
  h: ctx.height * 0.34,
3728
3802
  fill: { color: ctx.colors.cardBg },
3729
- line: { color: ctx.colors.text, width: 1.5 },
3803
+ line: { color: ctx.colors.text, width: 2 },
3730
3804
  rectRadius: 0,
3731
3805
  });
3732
3806
  slide.addShape(ctx.shapeRoundRect, {
@@ -3735,7 +3809,7 @@ function paintSlideChrome(slide, ctx, data) {
3735
3809
  w: ctx.width - 0.2,
3736
3810
  h: ctx.height - 0.2,
3737
3811
  fill: { color: ctx.colors.bg, transparency: 100 },
3738
- line: { color: ctx.colors.text, width: 2.5 },
3812
+ line: { color: ctx.colors.text, width: 2.75 },
3739
3813
  rectRadius: 0,
3740
3814
  });
3741
3815
  }
@@ -3793,14 +3867,34 @@ function paintSlideChrome(slide, ctx, data) {
3793
3867
  }
3794
3868
  }
3795
3869
  if (theme === "daisy-days") {
3796
- // Soft pastel dots + hard frame; daisy + pill on heroes (daisy-days-pastel).
3870
+ // Hard frame + charcoal offset shadow + pastel dots + daisy/pill on every
3871
+ // slide (daisy-days-pastel ::before/::after are not hero-gated).
3872
+ const shadow = 0.08;
3873
+ slide.addShape(ctx.shapeRoundRect, {
3874
+ x: ctx.width - shadow,
3875
+ y: shadow,
3876
+ w: shadow,
3877
+ h: ctx.height - shadow,
3878
+ fill: { color: "2D2D2D" },
3879
+ line: { color: "2D2D2D", width: 0 },
3880
+ rectRadius: 0,
3881
+ });
3882
+ slide.addShape(ctx.shapeRoundRect, {
3883
+ x: shadow,
3884
+ y: ctx.height - shadow,
3885
+ w: ctx.width - shadow,
3886
+ h: shadow,
3887
+ fill: { color: "2D2D2D" },
3888
+ line: { color: "2D2D2D", width: 0 },
3889
+ rectRadius: 0,
3890
+ });
3797
3891
  slide.addShape(ctx.shapeRoundRect, {
3798
3892
  x: 0.1,
3799
3893
  y: 0.1,
3800
3894
  w: ctx.width - 0.2,
3801
3895
  h: ctx.height - 0.2,
3802
3896
  fill: { color: ctx.colors.bg, transparency: 100 },
3803
- line: { color: "2D2D2D", width: 2.5 },
3897
+ line: { color: "2D2D2D", width: 2.75 },
3804
3898
  rectRadius: 0.28,
3805
3899
  });
3806
3900
  const dots = [
@@ -3819,25 +3913,23 @@ function paintSlideChrome(slide, ctx, data) {
3819
3913
  line: { color: d.color, width: 0 },
3820
3914
  });
3821
3915
  }
3822
- if (isHero) {
3823
- slide.addShape(ctx.shapeOval, {
3824
- x: ctx.width - 1.55,
3825
- y: 0.55,
3826
- w: 0.7,
3827
- h: 0.7,
3828
- fill: { color: "FDE68A" },
3829
- line: { color: "2D2D2D", width: 2 },
3830
- });
3831
- slide.addShape(ctx.shapeRoundRect, {
3832
- x: 0.55,
3833
- y: ctx.height - 0.95,
3834
- w: 0.95,
3835
- h: 0.36,
3836
- fill: { color: "A8D8F0" },
3837
- line: { color: "2D2D2D", width: 2 },
3838
- rectRadius: 0.18,
3839
- });
3840
- }
3916
+ slide.addShape(ctx.shapeOval, {
3917
+ x: ctx.width - 1.55,
3918
+ y: 0.55,
3919
+ w: 0.7,
3920
+ h: 0.7,
3921
+ fill: { color: "FDE68A" },
3922
+ line: { color: "2D2D2D", width: 2 },
3923
+ });
3924
+ slide.addShape(ctx.shapeRoundRect, {
3925
+ x: 0.55,
3926
+ y: ctx.height - 0.95,
3927
+ w: 0.95,
3928
+ h: 0.36,
3929
+ fill: { color: "A8D8F0" },
3930
+ line: { color: "2D2D2D", width: 2 },
3931
+ rectRadius: 0.18,
3932
+ });
3841
3933
  }
3842
3934
  if (theme === "block-frame") {
3843
3935
  // Hard neobrutalist frame; pastel offset blocks on heroes (block-frame-brutal).
@@ -4154,67 +4246,125 @@ function paintSlideChrome(slide, ctx, data) {
4154
4246
  });
4155
4247
  }
4156
4248
  if (theme === "long-table") {
4157
- // Speckled supper club + outline pill + hairline (long-table-supper).
4158
- for (let i = 0; i < 8; i++) {
4159
- for (let j = 0; j < 5; j++) {
4249
+ // Dense speckles + rust border on all; hero-gated outline pill + hairline
4250
+ // (long-table-supper HTML ::before/::after are title/closing only).
4251
+ slide.addShape(ctx.shapeRoundRect, {
4252
+ x: 0.12,
4253
+ y: 0.12,
4254
+ w: ctx.width - 0.24,
4255
+ h: ctx.height - 0.24,
4256
+ fill: { color: ctx.colors.bg, transparency: 100 },
4257
+ line: { color: ctx.colors.accent, width: 1.6 },
4258
+ rectRadius: 0,
4259
+ });
4260
+ for (let i = 0; i < 10; i++) {
4261
+ for (let j = 0; j < 6; j++) {
4160
4262
  slide.addShape(ctx.shapeOval, {
4161
- x: 0.4 + i * 1.55,
4162
- y: 0.5 + j * 1.15,
4163
- w: 0.06,
4164
- h: 0.06,
4165
- fill: { color: ctx.colors.accent, transparency: 78 },
4263
+ x: 0.35 + i * 1.28,
4264
+ y: 0.42 + j * 0.95,
4265
+ w: 0.055,
4266
+ h: 0.055,
4267
+ fill: { color: ctx.colors.accent, transparency: 74 },
4166
4268
  line: { color: ctx.colors.accent, width: 0 },
4167
4269
  });
4168
4270
  }
4169
4271
  }
4272
+ if (isHero) {
4273
+ slide.addShape(ctx.shapeRoundRect, {
4274
+ x: ctx.width - 1.9,
4275
+ y: 0.5,
4276
+ w: 1.2,
4277
+ h: 0.42,
4278
+ fill: { color: ctx.colors.bg, transparency: 100 },
4279
+ line: { color: ctx.colors.accent, width: 1.75 },
4280
+ rectRadius: 0.21,
4281
+ });
4282
+ slide.addShape(ctx.shapeRoundRect, {
4283
+ x: 0.5,
4284
+ y: ctx.height - 0.72,
4285
+ w: 0.85,
4286
+ h: 0.03,
4287
+ fill: { color: ctx.colors.accent },
4288
+ line: { color: ctx.colors.accent, width: 0 },
4289
+ rectRadius: 0,
4290
+ });
4291
+ }
4292
+ else {
4293
+ // Quiet supper-club stub when pill ornament is off.
4294
+ slide.addShape(ctx.shapeRoundRect, {
4295
+ x: ctx.margin,
4296
+ y: ctx.height - 0.58,
4297
+ w: 0.55,
4298
+ h: 0.02,
4299
+ fill: { color: ctx.colors.accent, transparency: 25 },
4300
+ line: { color: ctx.colors.accent, width: 0 },
4301
+ rectRadius: 0,
4302
+ });
4303
+ }
4304
+ }
4305
+ if (theme === "paper-ink") {
4306
+ // Quiet outer border + crimson top/bottom rules on all; hero-gated
4307
+ // corner blot + drop-cap stub (paper-ink-literary).
4170
4308
  slide.addShape(ctx.shapeRoundRect, {
4171
- x: ctx.width - 1.85,
4172
- y: 0.55,
4173
- w: 1.15,
4174
- h: 0.4,
4309
+ x: 0.16,
4310
+ y: 0.16,
4311
+ w: ctx.width - 0.32,
4312
+ h: ctx.height - 0.32,
4175
4313
  fill: { color: ctx.colors.bg, transparency: 100 },
4176
- line: { color: ctx.colors.accent, width: 1.5 },
4177
- rectRadius: 0.2,
4178
- });
4179
- slide.addShape(ctx.shapeRoundRect, {
4180
- x: 0.55,
4181
- y: ctx.height - 0.75,
4182
- w: 0.7,
4183
- h: 0.025,
4184
- fill: { color: ctx.colors.accent },
4185
- line: { color: ctx.colors.accent, width: 0 },
4314
+ line: { color: ctx.colors.text, width: 1 },
4186
4315
  rectRadius: 0,
4187
4316
  });
4188
- }
4189
- if (theme === "paper-ink") {
4190
- // Crimson top rule + quiet bottom hairline + corner stub (paper-ink-literary).
4191
4317
  slide.addShape(ctx.shapeRoundRect, {
4192
4318
  x: ctx.margin,
4193
- y: 0.65,
4319
+ y: 0.62,
4194
4320
  w: ctx.width - ctx.margin * 2,
4195
- h: 0.03,
4321
+ h: 0.035,
4196
4322
  fill: { color: ctx.colors.accent },
4197
4323
  line: { color: ctx.colors.accent, width: 0 },
4198
4324
  rectRadius: 0,
4199
4325
  });
4200
4326
  slide.addShape(ctx.shapeRoundRect, {
4201
4327
  x: ctx.margin,
4202
- y: ctx.height - 0.7,
4328
+ y: ctx.height - 0.68,
4203
4329
  w: ctx.width - ctx.margin * 2,
4204
- h: 0.015,
4205
- fill: { color: ctx.colors.text, transparency: 55 },
4330
+ h: 0.018,
4331
+ fill: { color: ctx.colors.text, transparency: 48 },
4206
4332
  line: { color: ctx.colors.text, width: 0 },
4207
4333
  rectRadius: 0,
4208
4334
  });
4209
- slide.addShape(ctx.shapeRoundRect, {
4210
- x: ctx.width - ctx.margin - 0.55,
4211
- y: 0.85,
4212
- w: 0.55,
4213
- h: 0.55,
4214
- fill: { color: ctx.colors.accent, transparency: 82 },
4215
- line: { color: ctx.colors.accent, width: 0 },
4216
- rectRadius: 0,
4217
- });
4335
+ if (isHero) {
4336
+ slide.addShape(ctx.shapeRoundRect, {
4337
+ x: ctx.width - ctx.margin - 0.62,
4338
+ y: 0.88,
4339
+ w: 0.62,
4340
+ h: 0.62,
4341
+ fill: { color: ctx.colors.accent, transparency: 78 },
4342
+ line: { color: ctx.colors.accent, width: 0 },
4343
+ rectRadius: 0,
4344
+ });
4345
+ // Drop-cap first-letter stand-in (HTML h1::first-letter crimson).
4346
+ slide.addShape(ctx.shapeRoundRect, {
4347
+ x: ctx.margin,
4348
+ y: 1.05,
4349
+ w: 0.045,
4350
+ h: 0.72,
4351
+ fill: { color: ctx.colors.accent },
4352
+ line: { color: ctx.colors.accent, width: 0 },
4353
+ rectRadius: 0,
4354
+ });
4355
+ }
4356
+ else {
4357
+ // Quiet literary accent hairline when hero blot is off.
4358
+ slide.addShape(ctx.shapeRoundRect, {
4359
+ x: ctx.margin,
4360
+ y: 0.9,
4361
+ w: 0.55,
4362
+ h: 0.015,
4363
+ fill: { color: ctx.colors.accent, transparency: 35 },
4364
+ line: { color: ctx.colors.accent, width: 0 },
4365
+ rectRadius: 0,
4366
+ });
4367
+ }
4218
4368
  }
4219
4369
  if (theme === "vintage-editorial") {
4220
4370
  // Quiet outer border on all slides; geometric ring + dots on heroes.
@@ -4336,15 +4486,16 @@ function paintSlideChrome(slide, ctx, data) {
4336
4486
  rectRadius: 0,
4337
4487
  });
4338
4488
  }
4339
- if (theme === "stencil-tablet" && isHero) {
4340
- // Earth tablet blocks (stencil-tablet-earth).
4489
+ if (theme === "stencil-tablet") {
4490
+ // Hard frame + earth tablet blocks on every slide (stencil-tablet-earth).
4491
+ // HTML ::before/::after are not hero-gated.
4341
4492
  slide.addShape(ctx.shapeRoundRect, {
4342
4493
  x: 0.1,
4343
4494
  y: 0.1,
4344
4495
  w: ctx.width - 0.2,
4345
4496
  h: ctx.height - 0.2,
4346
4497
  fill: { color: ctx.colors.bg, transparency: 100 },
4347
- line: { color: "000000", width: 2 },
4498
+ line: { color: "000000", width: 2.25 },
4348
4499
  rectRadius: 0,
4349
4500
  });
4350
4501
  slide.addShape(ctx.shapeRoundRect, {
@@ -4353,7 +4504,7 @@ function paintSlideChrome(slide, ctx, data) {
4353
4504
  w: ctx.width * 0.18,
4354
4505
  h: ctx.height * 0.22,
4355
4506
  fill: { color: ctx.colors.accent },
4356
- line: { color: "000000", width: 1.5 },
4507
+ line: { color: "000000", width: 1.75 },
4357
4508
  rectRadius: 0.22,
4358
4509
  });
4359
4510
  slide.addShape(ctx.shapeRoundRect, {
@@ -4362,7 +4513,7 @@ function paintSlideChrome(slide, ctx, data) {
4362
4513
  w: ctx.width * 0.14,
4363
4514
  h: ctx.height * 0.18,
4364
4515
  fill: { color: ctx.colors.accent2 },
4365
- line: { color: "000000", width: 1.5 },
4516
+ line: { color: "000000", width: 1.75 },
4366
4517
  rectRadius: 0.2,
4367
4518
  });
4368
4519
  }