@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.
- package/.claude/skills/live-tokens-create-component/SKILL.md +16 -4
- package/.claude/skills/live-tokens-create-page/SKILL.md +19 -17
- package/.claude/skills/live-tokens-create-page/references/interaction-sources.md +3 -3
- package/.claude/skills/live-tokens-pick-component/SKILL.md +10 -83
- package/CHANGELOG.md +84 -0
- package/README.md +1 -1
- package/bin/cli.mjs +21 -8
- package/bin/lib/catalogue.mjs +140 -41
- package/bin/rules/componentStructure.mjs +12 -4
- package/dist-plugin/{chunk-REBHE3ZM.js → chunk-FD4FVDOC.js} +59 -9
- package/dist-plugin/{chunk-D4WRIKEZ.js → chunk-M6BWSS6C.js} +1 -1
- package/dist-plugin/{chunk-RFVYPNRO.js → chunk-V2OVSC5Z.js} +22 -1
- package/dist-plugin/index.cjs +85 -14
- package/dist-plugin/index.js +3 -3
- package/dist-plugin/migrateData/index.cjs +59 -9
- package/dist-plugin/migrateData/index.js +2 -2
- package/dist-plugin/setColors/index.cjs +59 -9
- package/dist-plugin/setColors/index.js +1 -1
- package/dist-plugin/setGeometry/index.cjs +63 -11
- package/dist-plugin/setGeometry/index.d.cts +1 -1
- package/dist-plugin/setGeometry/index.d.ts +1 -1
- package/dist-plugin/setGeometry/index.js +5 -3
- package/dist-plugin/tokensCssMigrations/index.cjs +22 -1
- package/dist-plugin/tokensCssMigrations/index.js +1 -1
- package/package.json +3 -1
- package/src/editor/component-editor/DialogEditor.svelte +2 -1
- package/src/editor/component-editor/ImageLightboxEditor.svelte +2 -1
- package/src/editor/component-editor/scaffolding/TokenLayout.svelte +4 -1
- package/src/editor/component-editor/scaffolding/types.ts +13 -8
- package/src/editor/core/components/aliasKinds.ts +5 -1
- package/src/editor/core/sketch/sketchLayer.ts +1 -1
- package/src/editor/core/themes/migrations/2026-09-20-imagelightbox-scrim.ts +28 -0
- package/src/editor/core/themes/migrations/2026-09-20-scrim-color-and-opacity.ts +45 -0
- package/src/editor/core/themes/migrations/index.ts +4 -0
- package/src/editor/docs/content/creating-components.md +3 -0
- package/src/editor/docs/content.generated.ts +1 -1
- package/src/editor/skill-atlas/SkillAtlas.svelte +65 -38
- package/src/editor/skill-atlas/SkillValue.svelte +202 -0
- package/src/editor/skill-atlas/evalResults.ts +46 -0
- package/src/editor/skill-atlas/skillSources.generated.ts +4 -4
- package/src/editor/skill-atlas/trees/create-component.ts +18 -18
- package/src/editor/skill-atlas/trees/create-page.ts +28 -32
- package/src/editor/skill-atlas/trees/pick-component.ts +66 -196
- package/src/editor/ui/UIVariantSelector.svelte +1 -1
- package/src/editor/ui/variantScales.ts +11 -0
- package/src/live-tokens/data/themes/autumn.json +6 -4
- package/src/live-tokens/data/themes/halloween.json +6 -4
- package/src/live-tokens/data/themes/midnight-study.json +6 -4
- package/src/live-tokens/data/themes/ocean.json +6 -4
- package/src/live-tokens/data/themes/royal-velvet.json +6 -4
- package/src/live-tokens/data/themes/sketchy.json +6 -4
- package/src/live-tokens/data/themes/spring-meadow.json +6 -4
- package/src/live-tokens/data/themes/sunset.json +6 -4
- package/src/system/components/Badge.svelte +5 -2
- package/src/system/components/Button.svelte +10 -2
- package/src/system/components/Callout.svelte +5 -2
- package/src/system/components/Card.svelte +8 -3
- package/src/system/components/CodeSnippet.svelte +6 -2
- package/src/system/components/CollapsibleSection.svelte +6 -2
- package/src/system/components/CornerBadge.svelte +5 -2
- package/src/system/components/Dialog.svelte +12 -4
- package/src/system/components/IconButton.svelte +5 -2
- package/src/system/components/Image.svelte +5 -2
- package/src/system/components/ImageLightbox.svelte +44 -4
- package/src/system/components/InlineEditActions.svelte +5 -2
- package/src/system/components/Input.svelte +6 -2
- package/src/system/components/MenuSelect.svelte +9 -2
- package/src/system/components/Notification.svelte +5 -2
- package/src/system/components/Panel.svelte +5 -2
- package/src/system/components/ProgressBar.svelte +5 -2
- package/src/system/components/RadioButton.svelte +5 -2
- package/src/system/components/SectionDivider.svelte +5 -2
- package/src/system/components/SegmentedControl.svelte +5 -2
- package/src/system/components/SideNavigation.svelte +5 -2
- package/src/system/components/Slider.svelte +6 -2
- package/src/system/components/TabBar.svelte +5 -2
- package/src/system/components/Table.svelte +4 -2
- package/src/system/components/Toggle.svelte +5 -2
- package/src/system/components/Tooltip.svelte +5 -2
- package/src/system/styles/tokens.css +12 -4
- package/src/testing-js/{chunk-ZMZQZ33J.js → chunk-WQJ6QB6Y.js} +8 -4
- package/src/testing-js/chunk-WQJ6QB6Y.js.map +1 -0
- package/src/testing-js/{chunk-Q3YIAAG3.js → chunk-XXABJNUU.js} +2 -2
- package/src/testing-js/component-behavior.contract.js +1 -1
- package/src/testing-js/component-editor.contract.js +1 -1
- package/src/testing-js/component-render.contract.js +1 -1
- package/src/testing-js/index.js +2 -2
- package/src/testing-js/page-compliance.contract.js +1 -1
- package/src/testing-js/vitest.js +2 -2
- package/src/testing-js/chunk-ZMZQZ33J.js.map +0 -1
- /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
|
-
|
|
7
|
-
|
|
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
|
-
|
|
7
|
-
|
|
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
|
-
|
|
272
|
-
|
|
273
|
-
|
|
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-
|
|
3375
|
+
//# sourceMappingURL=chunk-WQJ6QB6Y.js.map
|