@motion-proto/live-tokens 0.82.0 → 0.84.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 (91) hide show
  1. package/.claude/skills/live-tokens-create-component/SKILL.md +16 -4
  2. package/.claude/skills/live-tokens-create-page/SKILL.md +19 -17
  3. package/.claude/skills/live-tokens-create-page/references/interaction-sources.md +3 -3
  4. package/.claude/skills/live-tokens-pick-component/SKILL.md +10 -83
  5. package/CHANGELOG.md +84 -0
  6. package/README.md +1 -1
  7. package/bin/cli.mjs +21 -8
  8. package/bin/lib/catalogue.mjs +140 -41
  9. package/bin/rules/componentStructure.mjs +12 -4
  10. package/dist-plugin/{chunk-REBHE3ZM.js → chunk-FD4FVDOC.js} +59 -9
  11. package/dist-plugin/{chunk-D4WRIKEZ.js → chunk-M6BWSS6C.js} +1 -1
  12. package/dist-plugin/{chunk-RFVYPNRO.js → chunk-V2OVSC5Z.js} +22 -1
  13. package/dist-plugin/index.cjs +85 -14
  14. package/dist-plugin/index.js +3 -3
  15. package/dist-plugin/migrateData/index.cjs +59 -9
  16. package/dist-plugin/migrateData/index.js +2 -2
  17. package/dist-plugin/setColors/index.cjs +59 -9
  18. package/dist-plugin/setColors/index.js +1 -1
  19. package/dist-plugin/setGeometry/index.cjs +63 -11
  20. package/dist-plugin/setGeometry/index.d.cts +1 -1
  21. package/dist-plugin/setGeometry/index.d.ts +1 -1
  22. package/dist-plugin/setGeometry/index.js +5 -3
  23. package/dist-plugin/tokensCssMigrations/index.cjs +22 -1
  24. package/dist-plugin/tokensCssMigrations/index.js +1 -1
  25. package/package.json +3 -1
  26. package/src/editor/component-editor/DialogEditor.svelte +2 -1
  27. package/src/editor/component-editor/ImageLightboxEditor.svelte +2 -1
  28. package/src/editor/component-editor/scaffolding/TokenLayout.svelte +4 -1
  29. package/src/editor/component-editor/scaffolding/types.ts +13 -8
  30. package/src/editor/core/components/aliasKinds.ts +5 -1
  31. package/src/editor/core/sketch/sketchLayer.ts +1 -1
  32. package/src/editor/core/themes/migrations/2026-09-20-imagelightbox-scrim.ts +28 -0
  33. package/src/editor/core/themes/migrations/2026-09-20-scrim-color-and-opacity.ts +45 -0
  34. package/src/editor/core/themes/migrations/index.ts +4 -0
  35. package/src/editor/docs/content/creating-components.md +3 -0
  36. package/src/editor/docs/content.generated.ts +1 -1
  37. package/src/editor/skill-atlas/SkillAtlas.svelte +65 -38
  38. package/src/editor/skill-atlas/SkillValue.svelte +202 -0
  39. package/src/editor/skill-atlas/evalResults.ts +46 -0
  40. package/src/editor/skill-atlas/skillSources.generated.ts +4 -4
  41. package/src/editor/skill-atlas/trees/create-component.ts +18 -18
  42. package/src/editor/skill-atlas/trees/create-page.ts +28 -32
  43. package/src/editor/skill-atlas/trees/pick-component.ts +66 -196
  44. package/src/editor/ui/UIVariantSelector.svelte +1 -1
  45. package/src/editor/ui/variantScales.ts +11 -0
  46. package/src/live-tokens/data/themes/autumn.json +6 -4
  47. package/src/live-tokens/data/themes/halloween.json +6 -4
  48. package/src/live-tokens/data/themes/midnight-study.json +6 -4
  49. package/src/live-tokens/data/themes/ocean.json +6 -4
  50. package/src/live-tokens/data/themes/royal-velvet.json +6 -4
  51. package/src/live-tokens/data/themes/sketchy.json +6 -4
  52. package/src/live-tokens/data/themes/spring-meadow.json +6 -4
  53. package/src/live-tokens/data/themes/sunset.json +6 -4
  54. package/src/system/components/Badge.svelte +5 -2
  55. package/src/system/components/Button.svelte +10 -2
  56. package/src/system/components/Callout.svelte +5 -2
  57. package/src/system/components/Card.svelte +8 -3
  58. package/src/system/components/CodeSnippet.svelte +6 -2
  59. package/src/system/components/CollapsibleSection.svelte +6 -2
  60. package/src/system/components/CornerBadge.svelte +5 -2
  61. package/src/system/components/Dialog.svelte +12 -4
  62. package/src/system/components/IconButton.svelte +5 -2
  63. package/src/system/components/Image.svelte +5 -2
  64. package/src/system/components/ImageLightbox.svelte +44 -4
  65. package/src/system/components/InlineEditActions.svelte +5 -2
  66. package/src/system/components/Input.svelte +6 -2
  67. package/src/system/components/MenuSelect.svelte +9 -2
  68. package/src/system/components/Notification.svelte +5 -2
  69. package/src/system/components/Panel.svelte +5 -2
  70. package/src/system/components/ProgressBar.svelte +5 -2
  71. package/src/system/components/RadioButton.svelte +5 -2
  72. package/src/system/components/SectionDivider.svelte +5 -2
  73. package/src/system/components/SegmentedControl.svelte +5 -2
  74. package/src/system/components/SideNavigation.svelte +5 -2
  75. package/src/system/components/Slider.svelte +6 -2
  76. package/src/system/components/TabBar.svelte +5 -2
  77. package/src/system/components/Table.svelte +4 -2
  78. package/src/system/components/Toggle.svelte +5 -2
  79. package/src/system/components/Tooltip.svelte +5 -2
  80. package/src/system/styles/tokens.css +12 -4
  81. package/src/testing-js/{chunk-ZMZQZ33J.js → chunk-WQJ6QB6Y.js} +8 -4
  82. package/src/testing-js/chunk-WQJ6QB6Y.js.map +1 -0
  83. package/src/testing-js/{chunk-Q3YIAAG3.js → chunk-XXABJNUU.js} +2 -2
  84. package/src/testing-js/component-behavior.contract.js +1 -1
  85. package/src/testing-js/component-editor.contract.js +1 -1
  86. package/src/testing-js/component-render.contract.js +1 -1
  87. package/src/testing-js/index.js +2 -2
  88. package/src/testing-js/page-compliance.contract.js +1 -1
  89. package/src/testing-js/vitest.js +2 -2
  90. package/src/testing-js/chunk-ZMZQZ33J.js.map +0 -1
  91. /package/src/testing-js/{chunk-Q3YIAAG3.js.map → chunk-XXABJNUU.js.map} +0 -0
@@ -3,8 +3,11 @@
3
3
 
4
4
  export const catalogue = {
5
5
  description: 'An on/off switch that names the setting it controls.',
6
- useFor: 'a setting that takes effect the moment it flips.',
7
- notFor: 'a choice between two named alternatives (SegmentedControl); a yes/no answer inside a form (RadioButton).',
6
+ whenToUse: 'a setting that takes effect the moment it flips.',
7
+ whenNotToUse: [
8
+ { when: 'the two states have names of their own that the reader compares.', use: 'segmentedcontrol' },
9
+ { when: 'the reader answers yes or no inside a larger form.', use: 'radiobutton' },
10
+ ],
8
11
  } satisfies CatalogueEntry;
9
12
  </script>
10
13
 
@@ -3,8 +3,11 @@
3
3
 
4
4
  export const catalogue = {
5
5
  description: 'A short note that appears on an element on hover or focus.',
6
- useFor: 'a definition or a shortcut the reader can do without.',
7
- notFor: 'content the reader must not miss (Callout); feedback after an action (Notification).',
6
+ whenToUse: 'a definition or a shortcut the reader can do without.',
7
+ whenNotToUse: [
8
+ { when: 'the reader must not miss the content.', use: 'callout' },
9
+ { when: 'the message is feedback about something that just happened.', use: 'notification' },
10
+ ],
8
11
  } satisfies CatalogueEntry;
9
12
  </script>
10
13
 
@@ -267,10 +267,18 @@
267
267
  --surface-danger-highest: oklch(0.6696 0.1423 24.72);
268
268
 
269
269
  /* Scrims — translucent layers that dim what sits behind them. A scrim is not
270
- a tint: it darkens the content underneath, it does not shade a surface. */
271
- --scrim-low: rgba(20, 3, 0, 0.38);
272
- --scrim: rgba(20, 3, 0, 0.51);
273
- --scrim-high: rgba(20, 3, 0, 0.64);
270
+ a tint: it darkens the content underneath, it does not shade a surface.
271
+ Colour and strength are separate, so a theme can hold one and move the
272
+ other: set --scrim-color to a light value for a scrim that pales the page
273
+ instead of darkening it. The three stops stay, composed from the two, for
274
+ anywhere that wants one value. */
275
+ --scrim-color: rgb(20, 3, 0);
276
+ --scrim-opacity-low: 0.38;
277
+ --scrim-opacity: 0.51;
278
+ --scrim-opacity-high: 0.64;
279
+ --scrim-low: color-mix(in srgb, var(--scrim-color) calc(var(--scrim-opacity-low) * 100%), transparent);
280
+ --scrim: color-mix(in srgb, var(--scrim-color) calc(var(--scrim-opacity) * 100%), transparent);
281
+ --scrim-high: color-mix(in srgb, var(--scrim-color) calc(var(--scrim-opacity-high) * 100%), transparent);
274
282
 
275
283
  /* Tints — translucent washes that shade the surface they sit on, for a hover
276
284
  or an active row. The theme aliases these to the text color, so a tint
@@ -783,7 +783,6 @@ var dialogContract = {
783
783
  properties: [
784
784
  {
785
785
  paints: {
786
- backdrop: { backgroundColor: "--dialog-scrim-surface" },
787
786
  root: {
788
787
  backgroundColor: "--dialog-surface",
789
788
  borderTopColor: "--dialog-border",
@@ -832,7 +831,9 @@ var dialogContract = {
832
831
  { state: "footer" }
833
832
  ],
834
833
  uncovered: {
835
- "--dialog-blur": "consumed via backdrop-filter: blur(), which no probe covers"
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"
836
837
  },
837
838
  persistence: {
838
839
  cases: [
@@ -1117,7 +1118,6 @@ var imageLightboxContract = {
1117
1118
  borderRadius: "--imagelightbox-tile-radius",
1118
1119
  boxShadow: "--imagelightbox-tile-shadow"
1119
1120
  },
1120
- overlay: { backgroundColor: "--imagelightbox-overlay-surface" },
1121
1121
  closeButton: {
1122
1122
  backgroundColor: "--imagelightbox-chrome-surface",
1123
1123
  borderTopColor: "--imagelightbox-chrome-border",
@@ -1137,6 +1137,10 @@ 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
+ },
1140
1144
  persistence: {
1141
1145
  cases: [
1142
1146
  {
@@ -3368,4 +3372,4 @@ export {
3368
3372
  allContracts,
3369
3373
  selectedContracts
3370
3374
  };
3371
- //# sourceMappingURL=chunk-ZMZQZ33J.js.map
3375
+ //# sourceMappingURL=chunk-WQJ6QB6Y.js.map