@motion-proto/live-tokens 0.85.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 (43) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +1 -1
  3. package/package.json +1 -1
  4. package/src/editor/component-editor/SlidePagerEditor.svelte +118 -0
  5. package/src/editor/component-editor/VideoFrameEditor.svelte +73 -0
  6. package/src/editor/component-editor/VideoLightboxEditor.svelte +95 -0
  7. package/src/editor/component-editor/registry.ts +40 -1
  8. package/src/editor/core/sketch/sketchLayer.ts +7 -0
  9. package/src/editor/overlay/LiveEditorOverlay.svelte +45 -52
  10. package/src/editor/pages/ComponentEditorPage.svelte +1 -1
  11. package/src/editor/ui/ThemePanel.svelte +9 -53
  12. package/src/live-tokens/data/themes/autumn.json +86 -0
  13. package/src/live-tokens/data/themes/halloween.json +86 -0
  14. package/src/live-tokens/data/themes/midnight-study.json +86 -0
  15. package/src/live-tokens/data/themes/ocean.json +86 -0
  16. package/src/live-tokens/data/themes/royal-velvet.json +86 -0
  17. package/src/live-tokens/data/themes/sketchy.json +86 -0
  18. package/src/live-tokens/data/themes/spring-meadow.json +86 -0
  19. package/src/live-tokens/data/themes/sunset.json +86 -0
  20. package/src/system/assets/slide-04.webp +0 -0
  21. package/src/system/assets/slide-05.webp +0 -0
  22. package/src/system/assets/slide-06.webp +0 -0
  23. package/src/system/assets/watch-navigation-poster.webp +0 -0
  24. package/src/system/assets/watch-navigation.mp4 +0 -0
  25. package/src/system/components/ImageLightbox.svelte +20 -21
  26. package/src/system/components/SlidePager.svelte +516 -0
  27. package/src/system/components/VideoFrame.svelte +284 -0
  28. package/src/system/components/VideoLightbox.svelte +381 -0
  29. package/src/testing-js/{chunk-RDHCBQ6I.js → chunk-OHU5BHGZ.js} +344 -2
  30. package/src/testing-js/chunk-OHU5BHGZ.js.map +1 -0
  31. package/src/testing-js/{chunk-XV5CYADO.js → chunk-Y6R7Z7VK.js} +10 -6
  32. package/src/testing-js/chunk-Y6R7Z7VK.js.map +1 -0
  33. package/src/testing-js/component-behavior.contract.js +1 -1
  34. package/src/testing-js/component-editor.contract.js +1 -1
  35. package/src/testing-js/component-render.contract.js +1 -1
  36. package/src/testing-js/index.d.ts +2 -2
  37. package/src/testing-js/index.js +2 -2
  38. package/src/testing-js/page-compliance.contract.js +1 -1
  39. package/src/testing-js/{vitest-BMLIbDs2.d.ts → vitest-5vWtqwWe.d.ts} +2 -2
  40. package/src/testing-js/vitest.d.ts +1 -1
  41. package/src/testing-js/vitest.js +2 -2
  42. package/src/testing-js/chunk-RDHCBQ6I.js.map +0 -1
  43. package/src/testing-js/chunk-XV5CYADO.js.map +0 -1
@@ -4007,6 +4007,92 @@
4007
4007
  "--slider-value-font-weight": "--font-weight-normal",
4008
4008
  "--slider-value-line-height": "--line-height-normal"
4009
4009
  }
4010
+ },
4011
+ "videolightbox": {
4012
+ "name": "sketchy",
4013
+ "component": "videolightbox",
4014
+ "createdAt": "2026-09-21T17:00:00.000Z",
4015
+ "updatedAt": "2026-09-21T17:00:00.000Z",
4016
+ "aliases": {
4017
+ "--videolightbox-tile-surface": "--color-transparent",
4018
+ "--videolightbox-tile-border": "--color-transparent",
4019
+ "--videolightbox-tile-border-width": "--border-width-1",
4020
+ "--videolightbox-tile-radius": "--radius-none",
4021
+ "--videolightbox-tile-shadow": "--shadow-md",
4022
+ "--videolightbox-scrim-surface": "--scrim-high",
4023
+ "--videolightbox-overlay-padding": "--space-64",
4024
+ "--videolightbox-overlay-duration": "--duration-500",
4025
+ "--videolightbox-overlay-easing": "--ease-out-quad",
4026
+ "--videolightbox-chrome-surface": "--surface-neutral-low",
4027
+ "--videolightbox-chrome-border": "--border-brand",
4028
+ "--videolightbox-chrome-border-width": "--border-width-1",
4029
+ "--videolightbox-chrome-radius": "--radius-none",
4030
+ "--videolightbox-chrome-icon": "--text-primary",
4031
+ "--videolightbox-chrome-hover-surface": "--surface-brand-high"
4032
+ }
4033
+ },
4034
+ "videoframe": {
4035
+ "name": "sketchy",
4036
+ "component": "videoframe",
4037
+ "createdAt": "2026-09-21T18:00:00.000Z",
4038
+ "updatedAt": "2026-09-21T18:00:00.000Z",
4039
+ "aliases": {
4040
+ "--videoframe-frame-surface": "--surface-neutral-lowest",
4041
+ "--videoframe-clip-surface": "--color-transparent",
4042
+ "--videoframe-frame-border": "--border-neutral",
4043
+ "--videoframe-frame-border-width": "--border-width-1",
4044
+ "--videoframe-frame-radius": "--radius-none",
4045
+ "--videoframe-badge-default-surface": "--surface-brand-lower",
4046
+ "--videoframe-badge-default-border": "--border-brand-medium",
4047
+ "--videoframe-badge-default-border-width": "--border-width-2",
4048
+ "--videoframe-badge-default-icon": "--text-primary",
4049
+ "--videoframe-badge-default-size": "--space-64",
4050
+ "--videoframe-badge-default-icon-size": "--icon-size-4xl",
4051
+ "--videoframe-badge-duration": "--duration-200",
4052
+ "--videoframe-badge-easing": "--ease-out-quad",
4053
+ "--videoframe-badge-hover-surface": "--surface-brand",
4054
+ "--videoframe-badge-hover-border": "--border-brand-strong",
4055
+ "--videoframe-badge-hover-icon": "--text-primary"
4056
+ }
4057
+ },
4058
+ "slidepager": {
4059
+ "name": "sketchy",
4060
+ "component": "slidepager",
4061
+ "createdAt": "2026-09-21T18:00:00.000Z",
4062
+ "updatedAt": "2026-09-21T18:00:00.000Z",
4063
+ "aliases": {
4064
+ "--slidepager-frame-surface": "--surface-neutral-lower",
4065
+ "--slidepager-frame-border": "--border-neutral-subtle",
4066
+ "--slidepager-frame-border-width": "--border-width-1",
4067
+ "--slidepager-frame-radius": "--radius-none",
4068
+ "--slidepager-frame-shadow": "--shadow-md",
4069
+ "--slidepager-bar-gap": "--space-16",
4070
+ "--slidepager-bar-padding": "--space-12",
4071
+ "--slidepager-control-surface": "--surface-neutral-low",
4072
+ "--slidepager-control-border": "--border-neutral",
4073
+ "--slidepager-control-border-width": "--border-width-1",
4074
+ "--slidepager-control-radius": "--radius-none",
4075
+ "--slidepager-control-size": "--space-40",
4076
+ "--slidepager-control-icon": "--text-primary",
4077
+ "--slidepager-control-icon-size": "--icon-size-md",
4078
+ "--slidepager-control-hover-surface": "--surface-brand-high",
4079
+ "--slidepager-control-hover-border": "--border-brand",
4080
+ "--slidepager-control-hover-icon": "--text-inverted",
4081
+ "--slidepager-control-disabled-surface": "--surface-neutral-lower",
4082
+ "--slidepager-control-disabled-border": "--border-neutral-subtle",
4083
+ "--slidepager-control-disabled-icon": "--text-disabled",
4084
+ "--slidepager-counter-text": "--text-secondary",
4085
+ "--slidepager-counter-font-family": "--font-sans",
4086
+ "--slidepager-counter-font-size": "--font-size-lg",
4087
+ "--slidepager-counter-font-weight": "--font-weight-medium",
4088
+ "--slidepager-counter-line-height": "--line-height-normal",
4089
+ "--slidepager-counter-letter-spacing": "--letter-spacing-normal",
4090
+ "--slidepager-scrim-surface": "--scrim-high",
4091
+ "--slidepager-overlay-padding": "--space-64",
4092
+ "--slidepager-close-margin": "--space-24",
4093
+ "--slidepager-overlay-duration": "--duration-300",
4094
+ "--slidepager-overlay-easing": "--ease-out-quad"
4095
+ }
4010
4096
  }
4011
4097
  },
4012
4098
  "componentSchemaVersion": 38
@@ -3980,6 +3980,92 @@
3980
3980
  "--slider-value-font-weight": "--font-weight-normal",
3981
3981
  "--slider-value-line-height": "--line-height-normal"
3982
3982
  }
3983
+ },
3984
+ "videolightbox": {
3985
+ "name": "spring-meadow",
3986
+ "component": "videolightbox",
3987
+ "createdAt": "2026-09-21T17:00:00.000Z",
3988
+ "updatedAt": "2026-09-21T17:00:00.000Z",
3989
+ "aliases": {
3990
+ "--videolightbox-tile-surface": "--color-transparent",
3991
+ "--videolightbox-tile-border": "--color-transparent",
3992
+ "--videolightbox-tile-border-width": "--border-width-0",
3993
+ "--videolightbox-tile-radius": "--radius-3xl",
3994
+ "--videolightbox-tile-shadow": "--shadow-md",
3995
+ "--videolightbox-scrim-surface": "--scrim-high",
3996
+ "--videolightbox-overlay-padding": "--space-64",
3997
+ "--videolightbox-overlay-duration": "--duration-500",
3998
+ "--videolightbox-overlay-easing": "--ease-out-quad",
3999
+ "--videolightbox-chrome-surface": "--surface-neutral-low",
4000
+ "--videolightbox-chrome-border": "--border-brand",
4001
+ "--videolightbox-chrome-border-width": "--border-width-1",
4002
+ "--videolightbox-chrome-radius": "--radius-full",
4003
+ "--videolightbox-chrome-icon": "--text-primary",
4004
+ "--videolightbox-chrome-hover-surface": "--surface-brand-high"
4005
+ }
4006
+ },
4007
+ "videoframe": {
4008
+ "name": "spring-meadow",
4009
+ "component": "videoframe",
4010
+ "createdAt": "2026-09-21T18:00:00.000Z",
4011
+ "updatedAt": "2026-09-21T18:00:00.000Z",
4012
+ "aliases": {
4013
+ "--videoframe-frame-surface": "--surface-neutral-lowest",
4014
+ "--videoframe-clip-surface": "--color-transparent",
4015
+ "--videoframe-frame-border": "--border-neutral",
4016
+ "--videoframe-frame-border-width": "--border-width-1",
4017
+ "--videoframe-frame-radius": "--radius-3xl",
4018
+ "--videoframe-badge-default-surface": "--surface-brand-lower",
4019
+ "--videoframe-badge-default-border": "--border-brand-medium",
4020
+ "--videoframe-badge-default-border-width": "--border-width-2",
4021
+ "--videoframe-badge-default-icon": "--text-primary",
4022
+ "--videoframe-badge-default-size": "--space-64",
4023
+ "--videoframe-badge-default-icon-size": "--icon-size-4xl",
4024
+ "--videoframe-badge-duration": "--duration-200",
4025
+ "--videoframe-badge-easing": "--ease-out-quad",
4026
+ "--videoframe-badge-hover-surface": "--surface-brand",
4027
+ "--videoframe-badge-hover-border": "--border-brand-strong",
4028
+ "--videoframe-badge-hover-icon": "--text-primary"
4029
+ }
4030
+ },
4031
+ "slidepager": {
4032
+ "name": "spring-meadow",
4033
+ "component": "slidepager",
4034
+ "createdAt": "2026-09-21T18:00:00.000Z",
4035
+ "updatedAt": "2026-09-21T18:00:00.000Z",
4036
+ "aliases": {
4037
+ "--slidepager-frame-surface": "--surface-neutral-lower",
4038
+ "--slidepager-frame-border": "--border-neutral-subtle",
4039
+ "--slidepager-frame-border-width": "--border-width-1",
4040
+ "--slidepager-frame-radius": "--radius-3xl",
4041
+ "--slidepager-frame-shadow": "--shadow-md",
4042
+ "--slidepager-bar-gap": "--space-16",
4043
+ "--slidepager-bar-padding": "--space-12",
4044
+ "--slidepager-control-surface": "--surface-neutral-low",
4045
+ "--slidepager-control-border": "--border-neutral",
4046
+ "--slidepager-control-border-width": "--border-width-1",
4047
+ "--slidepager-control-radius": "--radius-full",
4048
+ "--slidepager-control-size": "--space-40",
4049
+ "--slidepager-control-icon": "--text-primary",
4050
+ "--slidepager-control-icon-size": "--icon-size-md",
4051
+ "--slidepager-control-hover-surface": "--surface-brand-high",
4052
+ "--slidepager-control-hover-border": "--border-brand",
4053
+ "--slidepager-control-hover-icon": "--text-inverted",
4054
+ "--slidepager-control-disabled-surface": "--surface-neutral-lower",
4055
+ "--slidepager-control-disabled-border": "--border-neutral-subtle",
4056
+ "--slidepager-control-disabled-icon": "--text-disabled",
4057
+ "--slidepager-counter-text": "--text-secondary",
4058
+ "--slidepager-counter-font-family": "--font-sans",
4059
+ "--slidepager-counter-font-size": "--font-size-lg",
4060
+ "--slidepager-counter-font-weight": "--font-weight-medium",
4061
+ "--slidepager-counter-line-height": "--line-height-normal",
4062
+ "--slidepager-counter-letter-spacing": "--letter-spacing-normal",
4063
+ "--slidepager-scrim-surface": "--scrim-high",
4064
+ "--slidepager-overlay-padding": "--space-64",
4065
+ "--slidepager-close-margin": "--space-24",
4066
+ "--slidepager-overlay-duration": "--duration-300",
4067
+ "--slidepager-overlay-easing": "--ease-out-quad"
4068
+ }
3983
4069
  }
3984
4070
  },
3985
4071
  "componentSchemaVersion": 38
@@ -4032,6 +4032,92 @@
4032
4032
  "--slider-value-font-weight": "--font-weight-normal",
4033
4033
  "--slider-value-line-height": "--line-height-normal"
4034
4034
  }
4035
+ },
4036
+ "videolightbox": {
4037
+ "name": "sunset",
4038
+ "component": "videolightbox",
4039
+ "createdAt": "2026-09-21T17:00:00.000Z",
4040
+ "updatedAt": "2026-09-21T17:00:00.000Z",
4041
+ "aliases": {
4042
+ "--videolightbox-tile-surface": "--color-transparent",
4043
+ "--videolightbox-tile-border": "--color-transparent",
4044
+ "--videolightbox-tile-border-width": "--border-width-0",
4045
+ "--videolightbox-tile-radius": "--radius-3xl",
4046
+ "--videolightbox-tile-shadow": "--shadow-md",
4047
+ "--videolightbox-scrim-surface": "--scrim-high",
4048
+ "--videolightbox-overlay-padding": "--space-64",
4049
+ "--videolightbox-overlay-duration": "--duration-500",
4050
+ "--videolightbox-overlay-easing": "--ease-out-quad",
4051
+ "--videolightbox-chrome-surface": "--surface-neutral-low",
4052
+ "--videolightbox-chrome-border": "--border-brand",
4053
+ "--videolightbox-chrome-border-width": "--border-width-1",
4054
+ "--videolightbox-chrome-radius": "--radius-full",
4055
+ "--videolightbox-chrome-icon": "--text-primary",
4056
+ "--videolightbox-chrome-hover-surface": "--surface-brand-high"
4057
+ }
4058
+ },
4059
+ "videoframe": {
4060
+ "name": "sunset",
4061
+ "component": "videoframe",
4062
+ "createdAt": "2026-09-21T18:00:00.000Z",
4063
+ "updatedAt": "2026-09-21T18:00:00.000Z",
4064
+ "aliases": {
4065
+ "--videoframe-frame-surface": "--surface-neutral-lowest",
4066
+ "--videoframe-clip-surface": "--color-transparent",
4067
+ "--videoframe-frame-border": "--border-neutral",
4068
+ "--videoframe-frame-border-width": "--border-width-1",
4069
+ "--videoframe-frame-radius": "--radius-3xl",
4070
+ "--videoframe-badge-default-surface": "--surface-brand-lower",
4071
+ "--videoframe-badge-default-border": "--border-brand-medium",
4072
+ "--videoframe-badge-default-border-width": "--border-width-2",
4073
+ "--videoframe-badge-default-icon": "--text-primary",
4074
+ "--videoframe-badge-default-size": "--space-64",
4075
+ "--videoframe-badge-default-icon-size": "--icon-size-4xl",
4076
+ "--videoframe-badge-duration": "--duration-200",
4077
+ "--videoframe-badge-easing": "--ease-out-quad",
4078
+ "--videoframe-badge-hover-surface": "--surface-brand",
4079
+ "--videoframe-badge-hover-border": "--border-brand-strong",
4080
+ "--videoframe-badge-hover-icon": "--text-primary"
4081
+ }
4082
+ },
4083
+ "slidepager": {
4084
+ "name": "sunset",
4085
+ "component": "slidepager",
4086
+ "createdAt": "2026-09-21T18:00:00.000Z",
4087
+ "updatedAt": "2026-09-21T18:00:00.000Z",
4088
+ "aliases": {
4089
+ "--slidepager-frame-surface": "--surface-neutral-lower",
4090
+ "--slidepager-frame-border": "--border-neutral-subtle",
4091
+ "--slidepager-frame-border-width": "--border-width-1",
4092
+ "--slidepager-frame-radius": "--radius-3xl",
4093
+ "--slidepager-frame-shadow": "--shadow-md",
4094
+ "--slidepager-bar-gap": "--space-16",
4095
+ "--slidepager-bar-padding": "--space-12",
4096
+ "--slidepager-control-surface": "--surface-neutral-low",
4097
+ "--slidepager-control-border": "--border-neutral",
4098
+ "--slidepager-control-border-width": "--border-width-1",
4099
+ "--slidepager-control-radius": "--radius-full",
4100
+ "--slidepager-control-size": "--space-40",
4101
+ "--slidepager-control-icon": "--text-primary",
4102
+ "--slidepager-control-icon-size": "--icon-size-md",
4103
+ "--slidepager-control-hover-surface": "--surface-brand-high",
4104
+ "--slidepager-control-hover-border": "--border-brand",
4105
+ "--slidepager-control-hover-icon": "--text-inverted",
4106
+ "--slidepager-control-disabled-surface": "--surface-neutral-lower",
4107
+ "--slidepager-control-disabled-border": "--border-neutral-subtle",
4108
+ "--slidepager-control-disabled-icon": "--text-disabled",
4109
+ "--slidepager-counter-text": "--text-secondary",
4110
+ "--slidepager-counter-font-family": "--font-sans",
4111
+ "--slidepager-counter-font-size": "--font-size-lg",
4112
+ "--slidepager-counter-font-weight": "--font-weight-medium",
4113
+ "--slidepager-counter-line-height": "--line-height-normal",
4114
+ "--slidepager-counter-letter-spacing": "--letter-spacing-normal",
4115
+ "--slidepager-scrim-surface": "--scrim-high",
4116
+ "--slidepager-overlay-padding": "--space-64",
4117
+ "--slidepager-close-margin": "--space-24",
4118
+ "--slidepager-overlay-duration": "--duration-300",
4119
+ "--slidepager-overlay-easing": "--ease-out-quad"
4120
+ }
4035
4121
  }
4036
4122
  },
4037
4123
  "componentSchemaVersion": 38
Binary file
Binary file
Binary file
@@ -6,6 +6,8 @@
6
6
  whenToUse: 'a screenshot, artwork, or chart whose detail is the point, and for a gallery of them.',
7
7
  whenNotToUse: [
8
8
  { when: 'the reader takes the picture in at a glance, with no detail to open.', use: 'image' },
9
+ { when: 'a video clip the reader opens from its still.', use: 'videolightbox' },
10
+ { when: 'slides or pages the reader reads in order.', use: 'slidepager' },
9
11
  ],
10
12
  } satisfies CatalogueEntry;
11
13
  </script>
@@ -62,7 +64,7 @@
62
64
  The modal portals to <body>, out of reach of a wrapper around the tile,
63
65
  so a page that wants its own scrim has to say so here. */
64
66
  scrim?: string | undefined;
65
- /** When true, shows a bottom toolbar (zoom in/out + percent) and a top-right close button, and enables wheel/drag zoom inside the open modal. When false, click anywhere closes. */
67
+ /** When true, shows a bottom toolbar (zoom in/out + percent) and enables wheel/drag zoom inside the open modal. Either way, a click on the unzoomed image closes. */
66
68
  extended?: boolean;
67
69
  /** Maximum zoom, as a multiple of the image's natural resolution: `1` = 100%
68
70
  of the source's real pixels (1 source px = 1 screen px), `2` = 200%. The
@@ -314,8 +316,7 @@
314
316
  });
315
317
  }
316
318
 
317
- // Move focus into the modal so keyboard users land inside the dialog; the
318
- // stage (tabindex -1) is the fallback when there is no chrome to focus.
319
+ // Move focus into the modal so keyboard users land inside the dialog.
319
320
  (closeBtnEl ?? stageEl)?.focus();
320
321
  }
321
322
 
@@ -323,7 +324,7 @@
323
324
  // the zoom toolbar keeps its bespoke slide so it's handled separately.
324
325
  function chromeFadeEls(): HTMLElement[] {
325
326
  const els: (HTMLElement | undefined)[] = [];
326
- if (extended || isGallery) els.push(closeBtnEl);
327
+ els.push(closeBtnEl);
327
328
  if (isGallery) els.push(prevBtnEl, nextBtnEl, counterEl);
328
329
  return els.filter((el): el is HTMLElement => !!el);
329
330
  }
@@ -549,11 +550,11 @@
549
550
  didDrag = false;
550
551
  return;
551
552
  }
552
- if (!extended && !isGallery) closeLightbox();
553
+ if (!isGallery && scale <= MIN_SCALE) closeLightbox();
553
554
  }
554
555
 
555
556
  // Keep Tab inside the open dialog. The stage (tabindex -1) is excluded, so an
556
- // image-only lightbox with no chrome simply holds focus on the stage.
557
+ // image-only lightbox holds focus on its close button.
557
558
  function trapTab(e: KeyboardEvent) {
558
559
  if (!modalEl) return;
559
560
  const f = [
@@ -688,21 +689,19 @@
688
689
  </div>
689
690
  </div>
690
691
 
691
- {#if extended || isGallery}
692
- <button
693
- bind:this={closeBtnEl}
694
- class="image-lightbox-chrome image-lightbox-close"
695
- class:active={open}
696
- type="button"
697
- aria-label="Close"
698
- onclick={closeLightbox}
699
- >
700
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
701
- <path d="M18 6L6 18" />
702
- <path d="M6 6l12 12" />
703
- </svg>
704
- </button>
705
- {/if}
692
+ <button
693
+ bind:this={closeBtnEl}
694
+ class="image-lightbox-chrome image-lightbox-close"
695
+ class:active={open}
696
+ type="button"
697
+ aria-label="Close"
698
+ onclick={closeLightbox}
699
+ >
700
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
701
+ <path d="M18 6L6 18" />
702
+ <path d="M6 6l12 12" />
703
+ </svg>
704
+ </button>
706
705
 
707
706
  {#if isGallery}
708
707
  <button