@motion-proto/live-tokens 0.84.0 → 0.86.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.
Files changed (87) hide show
  1. package/.claude/skills/live-tokens-create-component/references/token-naming.md +0 -1
  2. package/CHANGELOG.md +85 -0
  3. package/README.md +1 -1
  4. package/dist-plugin/{chunk-V2OVSC5Z.js → chunk-GWMEYBZ2.js} +22 -1
  5. package/dist-plugin/{chunk-FD4FVDOC.js → chunk-ONYAIXCZ.js} +74 -1
  6. package/dist-plugin/{chunk-M6BWSS6C.js → chunk-W5VQV32K.js} +1 -1
  7. package/dist-plugin/index.cjs +101 -7
  8. package/dist-plugin/index.js +3 -3
  9. package/dist-plugin/migrateData/index.cjs +78 -5
  10. package/dist-plugin/migrateData/index.js +2 -2
  11. package/dist-plugin/setColors/index.cjs +74 -1
  12. package/dist-plugin/setColors/index.js +1 -1
  13. package/dist-plugin/setGeometry/index.cjs +74 -4
  14. package/dist-plugin/setGeometry/index.d.cts +1 -1
  15. package/dist-plugin/setGeometry/index.d.ts +1 -1
  16. package/dist-plugin/setGeometry/index.js +1 -4
  17. package/dist-plugin/tokensCssMigrations/index.cjs +22 -1
  18. package/dist-plugin/tokensCssMigrations/index.js +1 -1
  19. package/package.json +1 -1
  20. package/src/editor/component-editor/DialogEditor.svelte +1 -2
  21. package/src/editor/component-editor/ImageLightboxEditor.svelte +1 -2
  22. package/src/editor/component-editor/SlidePagerEditor.svelte +118 -0
  23. package/src/editor/component-editor/VideoFrameEditor.svelte +73 -0
  24. package/src/editor/component-editor/VideoLightboxEditor.svelte +95 -0
  25. package/src/editor/component-editor/registry.ts +40 -1
  26. package/src/editor/component-editor/scaffolding/TokenLayout.svelte +1 -4
  27. package/src/editor/core/components/aliasKinds.ts +0 -4
  28. package/src/editor/core/sketch/sketchLayer.ts +8 -1
  29. package/src/editor/core/store/editorPersistence.ts +46 -23
  30. package/src/editor/core/store/editorStore.ts +1 -5
  31. package/src/editor/core/store/editorTypes.ts +11 -7
  32. package/src/editor/core/themes/migrations/2026-09-21-scrim-surface.ts +56 -0
  33. package/src/editor/core/themes/migrations/2026-09-21-wash-color-and-opacity.ts +51 -0
  34. package/src/editor/core/themes/migrations/index.ts +4 -0
  35. package/src/editor/core/themes/slices/washes.ts +59 -77
  36. package/src/editor/overlay/LiveEditorOverlay.svelte +45 -52
  37. package/src/editor/pages/ComponentEditorPage.svelte +1 -1
  38. package/src/editor/skill-atlas/skillSources.generated.ts +1 -1
  39. package/src/editor/ui/ThemePanel.svelte +9 -53
  40. package/src/editor/ui/UIPaletteSelector.svelte +5 -1
  41. package/src/editor/ui/UIVariantSelector.svelte +1 -1
  42. package/src/editor/ui/sections/WashesSection.svelte +100 -99
  43. package/src/editor/ui/variantScales.ts +0 -11
  44. package/src/live-tokens/data/colors-and-type/autumn.json +9 -7
  45. package/src/live-tokens/data/colors-and-type/default.json +9 -7
  46. package/src/live-tokens/data/colors-and-type/halloween.json +9 -7
  47. package/src/live-tokens/data/colors-and-type/midnight-study.json +9 -7
  48. package/src/live-tokens/data/colors-and-type/ocean.json +9 -7
  49. package/src/live-tokens/data/colors-and-type/royal-velvet.json +9 -7
  50. package/src/live-tokens/data/colors-and-type/sketchy.json +9 -7
  51. package/src/live-tokens/data/colors-and-type/spring-meadow.json +9 -7
  52. package/src/live-tokens/data/colors-and-type/sunset.json +9 -7
  53. package/src/live-tokens/data/themes/autumn.json +98 -12
  54. package/src/live-tokens/data/themes/halloween.json +98 -12
  55. package/src/live-tokens/data/themes/midnight-study.json +98 -12
  56. package/src/live-tokens/data/themes/ocean.json +98 -12
  57. package/src/live-tokens/data/themes/royal-velvet.json +98 -12
  58. package/src/live-tokens/data/themes/sketchy.json +98 -12
  59. package/src/live-tokens/data/themes/spring-meadow.json +98 -12
  60. package/src/live-tokens/data/themes/sunset.json +98 -12
  61. package/src/live-tokens/data/tokens.generated.css +8 -6
  62. package/src/system/assets/slide-04.webp +0 -0
  63. package/src/system/assets/slide-05.webp +0 -0
  64. package/src/system/assets/slide-06.webp +0 -0
  65. package/src/system/assets/watch-navigation-poster.webp +0 -0
  66. package/src/system/assets/watch-navigation.mp4 +0 -0
  67. package/src/system/components/Dialog.svelte +2 -7
  68. package/src/system/components/ImageLightbox.svelte +27 -39
  69. package/src/system/components/SlidePager.svelte +516 -0
  70. package/src/system/components/VideoFrame.svelte +284 -0
  71. package/src/system/components/VideoLightbox.svelte +381 -0
  72. package/src/system/styles/tokens.css +13 -8
  73. package/src/testing-js/{chunk-WQJ6QB6Y.js → chunk-OHU5BHGZ.js} +347 -9
  74. package/src/testing-js/chunk-OHU5BHGZ.js.map +1 -0
  75. package/src/testing-js/{chunk-XXABJNUU.js → chunk-Y6R7Z7VK.js} +10 -6
  76. package/src/testing-js/chunk-Y6R7Z7VK.js.map +1 -0
  77. package/src/testing-js/component-behavior.contract.js +1 -1
  78. package/src/testing-js/component-editor.contract.js +1 -1
  79. package/src/testing-js/component-render.contract.js +1 -1
  80. package/src/testing-js/index.d.ts +2 -2
  81. package/src/testing-js/index.js +2 -2
  82. package/src/testing-js/page-compliance.contract.js +1 -1
  83. package/src/testing-js/{vitest-BMLIbDs2.d.ts → vitest-5vWtqwWe.d.ts} +2 -2
  84. package/src/testing-js/vitest.d.ts +1 -1
  85. package/src/testing-js/vitest.js +2 -2
  86. package/src/testing-js/chunk-WQJ6QB6Y.js.map +0 -1
  87. package/src/testing-js/chunk-XXABJNUU.js.map +0 -1
@@ -783,6 +783,7 @@ var dialogContract = {
783
783
  properties: [
784
784
  {
785
785
  paints: {
786
+ backdrop: { backgroundColor: "--dialog-scrim-surface" },
786
787
  root: {
787
788
  backgroundColor: "--dialog-surface",
788
789
  borderTopColor: "--dialog-border",
@@ -831,9 +832,7 @@ var dialogContract = {
831
832
  { state: "footer" }
832
833
  ],
833
834
  uncovered: {
834
- "--dialog-blur": "consumed via backdrop-filter: blur(), which no probe covers",
835
- "--dialog-scrim-color": "composed into the fill through color-mix(), so no computed style reports the token verbatim",
836
- "--dialog-scrim-opacity": "composed into the fill through color-mix(), so no computed style reports the token verbatim"
835
+ "--dialog-blur": "consumed via backdrop-filter: blur(), which no probe covers"
837
836
  },
838
837
  persistence: {
839
838
  cases: [
@@ -1118,6 +1117,7 @@ var imageLightboxContract = {
1118
1117
  borderRadius: "--imagelightbox-tile-radius",
1119
1118
  boxShadow: "--imagelightbox-tile-shadow"
1120
1119
  },
1120
+ overlay: { backgroundColor: "--imagelightbox-scrim-surface" },
1121
1121
  closeButton: {
1122
1122
  backgroundColor: "--imagelightbox-chrome-surface",
1123
1123
  borderTopColor: "--imagelightbox-chrome-border",
@@ -1137,10 +1137,6 @@ var imageLightboxContract = {
1137
1137
  }
1138
1138
  ],
1139
1139
  states: [{ state: "tile" }, { state: "overlay" }, { state: "chrome" }],
1140
- uncovered: {
1141
- "--imagelightbox-scrim-color": "composed into the fill through color-mix(), so no computed style reports the token verbatim",
1142
- "--imagelightbox-scrim-opacity": "composed into the fill through color-mix(), so no computed style reports the token verbatim"
1143
- },
1144
1140
  persistence: {
1145
1141
  cases: [
1146
1142
  {
@@ -3314,6 +3310,345 @@ var tooltipContract = {
3314
3310
  }
3315
3311
  };
3316
3312
 
3313
+ // src/testing/contracts/videolightbox.ts
3314
+ var videoLightboxContract = {
3315
+ id: "videolightbox",
3316
+ origin: "system",
3317
+ root: "root",
3318
+ // The editor renders an `inline` copy of the open lightbox beside the tile,
3319
+ // so the overlay and close button are measurable without opening a modal.
3320
+ parts: {
3321
+ root: ".videolightbox",
3322
+ trigger: ".videolightbox-trigger",
3323
+ overlay: ".videolightbox-modal.inline",
3324
+ closeButton: ".videolightbox-modal.inline .videolightbox-close",
3325
+ closeIcon: ".videolightbox-modal.inline .videolightbox-close svg"
3326
+ },
3327
+ properties: [
3328
+ {
3329
+ paints: {
3330
+ root: {
3331
+ backgroundColor: "--videolightbox-tile-surface",
3332
+ borderTopColor: "--videolightbox-tile-border",
3333
+ borderTopWidth: "--videolightbox-tile-border-width",
3334
+ borderRadius: "--videolightbox-tile-radius",
3335
+ boxShadow: "--videolightbox-tile-shadow"
3336
+ },
3337
+ overlay: {
3338
+ backgroundColor: "--videolightbox-scrim-surface",
3339
+ paddingTop: "--videolightbox-overlay-padding"
3340
+ },
3341
+ closeButton: {
3342
+ backgroundColor: "--videolightbox-chrome-surface",
3343
+ borderTopColor: "--videolightbox-chrome-border",
3344
+ borderTopWidth: "--videolightbox-chrome-border-width",
3345
+ borderRadius: "--videolightbox-chrome-radius",
3346
+ color: "--videolightbox-chrome-icon"
3347
+ },
3348
+ closeIcon: { stroke: "--videolightbox-chrome-icon" }
3349
+ }
3350
+ },
3351
+ // The inline close button has no handler, so the click leaves the pointer
3352
+ // resting on it and its real :hover rule applies.
3353
+ {
3354
+ setup: [{ kind: "click", part: "closeButton" }],
3355
+ paints: { closeButton: { backgroundColor: "--videolightbox-chrome-hover-surface" } }
3356
+ }
3357
+ ],
3358
+ states: [{ state: "default" }, { state: "hover" }],
3359
+ uncovered: {
3360
+ "--videolightbox-overlay-duration": "consumed inside the opacity transition shorthand, never a standalone computed value",
3361
+ "--videolightbox-overlay-easing": "consumed inside the opacity transition shorthand, never a standalone computed value"
3362
+ },
3363
+ persistence: {
3364
+ cases: [
3365
+ {
3366
+ shape: "token",
3367
+ variable: "--videolightbox-tile-border-width",
3368
+ observe: { part: "root", css: "borderTopWidth" }
3369
+ }
3370
+ ],
3371
+ resetVariable: "--videolightbox-tile-border-width"
3372
+ },
3373
+ theme: {
3374
+ theme: "halloween",
3375
+ changed: [
3376
+ "--videolightbox-tile-border-width",
3377
+ "--videolightbox-tile-radius",
3378
+ "--videolightbox-chrome-border-width",
3379
+ "--videolightbox-chrome-radius"
3380
+ ],
3381
+ unchanged: ["--videolightbox-tile-shadow"],
3382
+ aliasedTo: {
3383
+ "--videolightbox-tile-border-width": "--border-width-2",
3384
+ "--videolightbox-tile-radius": "--radius-none"
3385
+ },
3386
+ observe: { part: "root", css: "borderTopWidth", variable: "--videolightbox-tile-border-width" }
3387
+ },
3388
+ interaction: {
3389
+ part: "trigger",
3390
+ role: "button",
3391
+ cases: [
3392
+ {
3393
+ name: "clicking the still opens the lightbox",
3394
+ action: { kind: "click", part: "trigger" },
3395
+ expect: { kind: "attribute", part: "trigger", name: "aria-expanded", value: "true" }
3396
+ }
3397
+ ]
3398
+ },
3399
+ behavior: {
3400
+ applicable: false,
3401
+ reason: "the lightbox declares no callback prop; opening portals a modal and plays media, which happy-dom cannot run"
3402
+ },
3403
+ sketch: {
3404
+ style: "pencil",
3405
+ parts: [
3406
+ { part: "root", fill: "--videolightbox-tile-surface", stroke: "--videolightbox-tile-border" }
3407
+ ]
3408
+ }
3409
+ };
3410
+
3411
+ // src/testing/contracts/videoframe.ts
3412
+ var videoFrameContract = {
3413
+ id: "videoframe",
3414
+ origin: "system",
3415
+ root: "root",
3416
+ parts: {
3417
+ root: ".videoframe-frame",
3418
+ clip: ".videoframe-clip",
3419
+ trigger: ".videoframe-trigger",
3420
+ badge: ".videoframe-badge",
3421
+ badgeIcon: ".videoframe-badge svg"
3422
+ },
3423
+ properties: [
3424
+ {
3425
+ paints: {
3426
+ root: {
3427
+ backgroundColor: "--videoframe-frame-surface",
3428
+ borderTopColor: "--videoframe-frame-border",
3429
+ borderTopWidth: "--videoframe-frame-border-width",
3430
+ borderRadius: "--videoframe-frame-radius"
3431
+ },
3432
+ clip: { backgroundColor: "--videoframe-clip-surface" },
3433
+ badge: {
3434
+ backgroundColor: "--videoframe-badge-default-surface",
3435
+ borderTopColor: "--videoframe-badge-default-border",
3436
+ borderTopWidth: "--videoframe-badge-default-border-width",
3437
+ width: "--videoframe-badge-default-size",
3438
+ color: "--videoframe-badge-default-icon"
3439
+ },
3440
+ badgeIcon: { width: "--videoframe-badge-default-icon-size" }
3441
+ }
3442
+ },
3443
+ {
3444
+ state: "hover",
3445
+ paints: {
3446
+ badge: {
3447
+ backgroundColor: "--videoframe-badge-hover-surface",
3448
+ borderTopColor: "--videoframe-badge-hover-border",
3449
+ color: "--videoframe-badge-hover-icon"
3450
+ }
3451
+ }
3452
+ }
3453
+ ],
3454
+ states: [{ state: "default" }, { state: "hover" }],
3455
+ uncovered: {
3456
+ "--videoframe-badge-duration": "consumed inside the badge transition shorthand, never a standalone computed value",
3457
+ "--videoframe-badge-easing": "consumed inside the badge transition shorthand, never a standalone computed value"
3458
+ },
3459
+ persistence: {
3460
+ cases: [
3461
+ {
3462
+ shape: "token",
3463
+ variable: "--videoframe-frame-border-width",
3464
+ observe: { part: "root", css: "borderTopWidth" }
3465
+ }
3466
+ ],
3467
+ resetVariable: "--videoframe-frame-border-width"
3468
+ },
3469
+ theme: {
3470
+ theme: "halloween",
3471
+ changed: ["--videoframe-frame-border-width", "--videoframe-frame-radius"],
3472
+ unchanged: ["--videoframe-badge-default-size"],
3473
+ aliasedTo: {
3474
+ "--videoframe-frame-border-width": "--border-width-3",
3475
+ "--videoframe-frame-radius": "--radius-none"
3476
+ },
3477
+ observe: { part: "root", css: "borderTopWidth", variable: "--videoframe-frame-border-width" }
3478
+ },
3479
+ interaction: {
3480
+ part: "trigger",
3481
+ role: "button",
3482
+ cases: [
3483
+ {
3484
+ name: "clicking the poster starts the clip",
3485
+ action: { kind: "click", part: "trigger" },
3486
+ expect: { kind: "attribute", part: "root", name: "data-playing", value: "true" }
3487
+ }
3488
+ ]
3489
+ },
3490
+ behavior: {
3491
+ applicable: false,
3492
+ reason: "the frame declares no callback prop; playback is the browser's own media element"
3493
+ },
3494
+ sketch: {
3495
+ style: "pencil",
3496
+ parts: [{ part: "root", fill: "--videoframe-frame-surface", stroke: "--videoframe-frame-border" }]
3497
+ }
3498
+ };
3499
+
3500
+ // src/testing/contracts/slidepager.ts
3501
+ var behaviorSlides = [
3502
+ { src: "a.webp", alt: "First slide" },
3503
+ { src: "b.webp", alt: "Second slide" },
3504
+ { src: "c.webp", alt: "Third slide" }
3505
+ ];
3506
+ var slidePagerContract = {
3507
+ id: "slidepager",
3508
+ origin: "system",
3509
+ root: "root",
3510
+ // The editor renders an `inline` copy of the full-screen read beside the
3511
+ // pager, so the overlay and its close button are measurable in place.
3512
+ parts: {
3513
+ root: ".slidepager",
3514
+ frame: ".slidepager .slidepager-frame",
3515
+ stage: ".slidepager .slidepager-stage",
3516
+ bar: ".slidepager > .slidepager-bar",
3517
+ prevControl: '.slidepager > .slidepager-bar [data-nav="prev"]',
3518
+ nextControl: '.slidepager > .slidepager-bar [data-nav="next"]',
3519
+ controlIcon: '.slidepager > .slidepager-bar [data-nav="next"] svg',
3520
+ counter: ".slidepager > .slidepager-bar .slidepager-counter",
3521
+ overlay: ".slidepager-modal.inline",
3522
+ closeButton: ".slidepager-modal.inline .slidepager-close"
3523
+ },
3524
+ properties: [
3525
+ {
3526
+ paints: {
3527
+ frame: {
3528
+ backgroundColor: "--slidepager-frame-surface",
3529
+ borderTopColor: "--slidepager-frame-border",
3530
+ borderTopWidth: "--slidepager-frame-border-width",
3531
+ borderRadius: "--slidepager-frame-radius",
3532
+ boxShadow: "--slidepager-frame-shadow"
3533
+ },
3534
+ bar: { columnGap: "--slidepager-bar-gap", paddingTop: "--slidepager-bar-padding" },
3535
+ nextControl: {
3536
+ backgroundColor: "--slidepager-control-surface",
3537
+ borderTopColor: "--slidepager-control-border",
3538
+ borderTopWidth: "--slidepager-control-border-width",
3539
+ borderRadius: "--slidepager-control-radius",
3540
+ width: "--slidepager-control-size",
3541
+ color: "--slidepager-control-icon"
3542
+ },
3543
+ controlIcon: { width: "--slidepager-control-icon-size" },
3544
+ counter: {
3545
+ color: "--slidepager-counter-text",
3546
+ fontFamily: "--slidepager-counter-font-family",
3547
+ fontSize: "--slidepager-counter-font-size",
3548
+ fontWeight: "--slidepager-counter-font-weight",
3549
+ lineHeight: "--slidepager-counter-line-height",
3550
+ letterSpacing: "--slidepager-counter-letter-spacing"
3551
+ },
3552
+ overlay: {
3553
+ backgroundColor: "--slidepager-scrim-surface",
3554
+ paddingTop: "--slidepager-overlay-padding"
3555
+ },
3556
+ closeButton: { top: "--slidepager-close-margin" }
3557
+ }
3558
+ },
3559
+ // The inline close button has no handler, so the click leaves the pointer
3560
+ // resting on it and its real :hover rule applies.
3561
+ {
3562
+ setup: [{ kind: "click", part: "closeButton" }],
3563
+ paints: {
3564
+ closeButton: {
3565
+ backgroundColor: "--slidepager-control-hover-surface",
3566
+ borderTopColor: "--slidepager-control-hover-border",
3567
+ color: "--slidepager-control-hover-icon"
3568
+ }
3569
+ }
3570
+ },
3571
+ // The preview opens on the middle slide, so one click back lands on the
3572
+ // first and disables the control under the pointer.
3573
+ {
3574
+ setup: [{ kind: "click", part: "prevControl" }],
3575
+ paints: {
3576
+ prevControl: {
3577
+ backgroundColor: "--slidepager-control-disabled-surface",
3578
+ borderTopColor: "--slidepager-control-disabled-border",
3579
+ color: "--slidepager-control-disabled-icon"
3580
+ }
3581
+ }
3582
+ }
3583
+ ],
3584
+ states: [{ state: "default" }, { state: "hover" }, { state: "disabled" }],
3585
+ uncovered: {
3586
+ "--slidepager-overlay-duration": "consumed inside the opacity transition shorthand, never a standalone computed value",
3587
+ "--slidepager-overlay-easing": "consumed inside the opacity transition shorthand, never a standalone computed value"
3588
+ },
3589
+ persistence: {
3590
+ cases: [
3591
+ {
3592
+ shape: "token",
3593
+ variable: "--slidepager-frame-border-width",
3594
+ observe: { part: "frame", css: "borderTopWidth" }
3595
+ }
3596
+ ],
3597
+ resetVariable: "--slidepager-frame-border-width"
3598
+ },
3599
+ theme: {
3600
+ theme: "halloween",
3601
+ changed: [
3602
+ "--slidepager-frame-border-width",
3603
+ "--slidepager-frame-radius",
3604
+ "--slidepager-control-border-width",
3605
+ "--slidepager-control-radius"
3606
+ ],
3607
+ unchanged: ["--slidepager-control-size"],
3608
+ aliasedTo: {
3609
+ "--slidepager-frame-border-width": "--border-width-3",
3610
+ "--slidepager-frame-radius": "--radius-none"
3611
+ },
3612
+ observe: { part: "frame", css: "borderTopWidth", variable: "--slidepager-frame-border-width" }
3613
+ },
3614
+ interaction: {
3615
+ part: "stage",
3616
+ role: "button",
3617
+ cases: [
3618
+ {
3619
+ name: "the next chevron moves the frame to the next slide",
3620
+ action: { kind: "click", part: "nextControl" },
3621
+ expect: { kind: "attribute", part: "stage", name: "aria-label", value: "Open slide 3 full screen" }
3622
+ }
3623
+ ]
3624
+ },
3625
+ behavior: {
3626
+ cases: [
3627
+ {
3628
+ name: "the next chevron reports the slide it moved to",
3629
+ props: { slides: behaviorSlides, index: 0 },
3630
+ action: { kind: "click", part: "nextControl" },
3631
+ expect: { kind: "callback", prop: "onchange", args: [1] }
3632
+ },
3633
+ {
3634
+ name: "the previous chevron is silent on the first slide",
3635
+ props: { slides: behaviorSlides, index: 0 },
3636
+ action: { kind: "click", part: "prevControl" },
3637
+ expect: { kind: "no-callback", prop: "onchange" }
3638
+ },
3639
+ {
3640
+ name: "the counter names the slide index opens on",
3641
+ props: { slides: behaviorSlides, index: 2 },
3642
+ expect: { kind: "text", part: "counter", value: "3 / 3" }
3643
+ }
3644
+ ]
3645
+ },
3646
+ sketch: {
3647
+ style: "pencil",
3648
+ parts: [{ part: "frame", fill: "--slidepager-frame-surface", stroke: "--slidepager-frame-border" }]
3649
+ }
3650
+ };
3651
+
3317
3652
  // src/testing/contracts/index.ts
3318
3653
  var shippedContracts = [
3319
3654
  badgeContract,
@@ -3341,7 +3676,10 @@ var shippedContracts = [
3341
3676
  tabBarContract,
3342
3677
  tableContract,
3343
3678
  toggleContract,
3344
- tooltipContract
3679
+ tooltipContract,
3680
+ videoLightboxContract,
3681
+ videoFrameContract,
3682
+ slidePagerContract
3345
3683
  ];
3346
3684
  var CONTRACTS_MODULE_ENV = "LIVE_TOKENS_CONTRACTS_MODULE";
3347
3685
  async function loadCustomContracts() {
@@ -3372,4 +3710,4 @@ export {
3372
3710
  allContracts,
3373
3711
  selectedContracts
3374
3712
  };
3375
- //# sourceMappingURL=chunk-WQJ6QB6Y.js.map
3713
+ //# sourceMappingURL=chunk-OHU5BHGZ.js.map