@motion-proto/live-tokens 0.91.1 → 0.92.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/references/sketch-mode.md +7 -4
- package/.claude/skills/live-tokens-create-page/SKILL.md +10 -3
- package/.claude/skills/live-tokens-set-type/SKILL.md +3 -3
- package/CHANGELOG.md +153 -0
- package/bin/lib/tokenVocabulary.mjs +2 -2
- package/bin/rules/testRuns.mjs +1 -1
- package/bin/rules/tokens.mjs +3 -3
- package/dist-plugin/chunk-JOSSYGR2.js +1634 -0
- package/dist-plugin/index.cjs +932 -15
- package/dist-plugin/index.js +1 -1
- package/dist-plugin/setType/index.cjs +23 -2
- package/dist-plugin/setType/index.js +23 -2
- package/dist-plugin/tokensCssMigrations/index.cjs +936 -15
- package/dist-plugin/tokensCssMigrations/index.d.cts +23 -3
- package/dist-plugin/tokensCssMigrations/index.d.ts +23 -3
- package/dist-plugin/tokensCssMigrations/index.js +5 -1
- package/package.json +1 -1
- package/src/app/site.css +243 -9
- package/src/demo/TestingLoops.svelte +9 -9
- package/src/editor/core/fonts/weightCoverage.ts +31 -2
- package/src/editor/core/palettes/tokenRegistry.ts +36 -37
- package/src/editor/core/sketch/sketchLayer.ts +23 -17
- package/src/editor/core/themes/parsers/mediaBlocks.ts +46 -0
- package/src/editor/core/typeScale/typeScale.ts +341 -0
- package/src/editor/skill-atlas/SourcePane.svelte +3 -3
- package/src/editor/skill-atlas/skillSources.generated.ts +3 -3
- package/src/editor/skill-atlas/trees/create-page.ts +14 -14
- package/src/editor/skill-atlas/trees/set-type.ts +2 -2
- package/src/editor/ui/UIFontFamilySelector.svelte +5 -1
- package/src/editor/ui/UIFontWeightSelector.svelte +4 -0
- package/src/editor/ui/UILetterSpacingSelector.svelte +4 -0
- package/src/editor/ui/UILineHeightSelector.svelte +4 -0
- package/src/editor/ui/UITextTransformSelector.svelte +4 -0
- package/src/editor/ui/UIVariantSelector.svelte +6 -8
- package/src/editor/ui/VariablesTab.svelte +4 -4
- package/src/editor/ui/sections/textStyles.ts +44 -92
- package/src/editor/ui/text-styles/ControlBody.svelte +100 -0
- package/src/editor/ui/text-styles/ResetIcon.svelte +60 -0
- package/src/editor/ui/text-styles/StepRow.svelte +330 -0
- package/src/editor/ui/text-styles/StyleControl.svelte +128 -0
- package/src/editor/ui/text-styles/TextStylesSection.svelte +551 -0
- package/src/editor/ui/text-styles/textStyleEdits.ts +308 -0
- package/src/editor/ui/variantScales.ts +16 -0
- package/src/system/styles/tokens.css +412 -48
- package/src/testing-js/page-compliance.contract.js +233 -80
- package/src/testing-js/page-compliance.contract.js.map +1 -1
- package/dist-plugin/chunk-GWMEYBZ2.js +0 -715
- package/src/editor/ui/TextStylesSection.svelte +0 -171
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import UIFontFamilySelector from './UIFontFamilySelector.svelte';
|
|
3
|
-
import UIFontSizeSelector from './UIFontSizeSelector.svelte';
|
|
4
|
-
import UIFontWeightSelector from './UIFontWeightSelector.svelte';
|
|
5
|
-
import UILetterSpacingSelector from './UILetterSpacingSelector.svelte';
|
|
6
|
-
import UILineHeightSelector from './UILineHeightSelector.svelte';
|
|
7
|
-
import UITextTransformSelector from './UITextTransformSelector.svelte';
|
|
8
|
-
import { TEXT_STYLES } from './sections/textStyles';
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<div class="text-styles">
|
|
12
|
-
{#each TEXT_STYLES as style (style.prefix)}
|
|
13
|
-
<div class="ts-card">
|
|
14
|
-
<div class="ts-id">
|
|
15
|
-
<code class="ts-name">{style.name}</code>
|
|
16
|
-
<span class="ts-el">{style.defaultElement}</span>
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<div
|
|
20
|
-
class="ts-preview"
|
|
21
|
-
style="font-family: var({style.prefix}-font-family); font-size: var({style.prefix}-font-size); font-weight: var({style.prefix}-font-weight); line-height: var({style.prefix}-line-height); letter-spacing: var({style.prefix}-letter-spacing);{style.hasTextTransform ? ` text-transform: var(${style.prefix}-text-transform);` : ''}"
|
|
22
|
-
>{style.preview}</div>
|
|
23
|
-
|
|
24
|
-
<div class="ts-controls">
|
|
25
|
-
<div class="ts-field">
|
|
26
|
-
<span class="ts-label">Family</span>
|
|
27
|
-
<UIFontFamilySelector variable={`${style.prefix}-font-family`} />
|
|
28
|
-
</div>
|
|
29
|
-
<div class="ts-field">
|
|
30
|
-
<span class="ts-label">Size</span>
|
|
31
|
-
<UIFontSizeSelector variable={`${style.prefix}-font-size`} />
|
|
32
|
-
</div>
|
|
33
|
-
<div class="ts-field">
|
|
34
|
-
<span class="ts-label">Weight</span>
|
|
35
|
-
<UIFontWeightSelector variable={`${style.prefix}-font-weight`} />
|
|
36
|
-
</div>
|
|
37
|
-
<div class="ts-field">
|
|
38
|
-
<span class="ts-label">Letter spacing</span>
|
|
39
|
-
<UILetterSpacingSelector variable={`${style.prefix}-letter-spacing`} />
|
|
40
|
-
</div>
|
|
41
|
-
<div class="ts-field">
|
|
42
|
-
<span class="ts-label">Line height</span>
|
|
43
|
-
<UILineHeightSelector variable={`${style.prefix}-line-height`} />
|
|
44
|
-
</div>
|
|
45
|
-
{#if style.hasTextTransform}
|
|
46
|
-
<div class="ts-field">
|
|
47
|
-
<span class="ts-label">Transform</span>
|
|
48
|
-
<UITextTransformSelector variable={`${style.prefix}-text-transform`} />
|
|
49
|
-
</div>
|
|
50
|
-
{/if}
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
{/each}
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<style>
|
|
57
|
-
/* One frame around the stacked list; cards butt together and are separated
|
|
58
|
-
by a faint rule rather than each being its own box. No overflow clipping —
|
|
59
|
-
the pickers' dropdowns must be free to spill past the frame. */
|
|
60
|
-
.text-styles {
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
border: 1px solid var(--ui-border);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/* Two columns: a fixed identity rail and the content column holding the
|
|
67
|
-
preview (top) then the controls (below). The rail spans both rows so a
|
|
68
|
-
stack of cards reads as one continuous, scannable left column. */
|
|
69
|
-
.ts-card {
|
|
70
|
-
display: grid;
|
|
71
|
-
grid-template-columns: 8rem minmax(0, 1fr);
|
|
72
|
-
column-gap: var(--ui-space-12);
|
|
73
|
-
row-gap: var(--ui-space-8);
|
|
74
|
-
padding: var(--ui-space-12) var(--ui-space-10);
|
|
75
|
-
border-bottom: 1px solid var(--ui-border-low);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.ts-card:last-child {
|
|
79
|
-
border-bottom: none;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.ts-id {
|
|
83
|
-
grid-column: 1;
|
|
84
|
-
grid-row: 1 / span 2;
|
|
85
|
-
display: flex;
|
|
86
|
-
flex-direction: column;
|
|
87
|
-
gap: var(--ui-space-2);
|
|
88
|
-
min-width: 0;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.ts-name {
|
|
92
|
-
font-family: var(--ui-font-mono);
|
|
93
|
-
font-size: var(--ui-font-size-sm);
|
|
94
|
-
color: var(--ui-text-primary);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.ts-el {
|
|
98
|
-
font-family: var(--ui-font-mono);
|
|
99
|
-
font-size: var(--ui-font-size-xs);
|
|
100
|
-
color: var(--ui-text-muted);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/* Fixed-height preview well with the sample pinned to the top, so its
|
|
104
|
-
cap-line meets the identity label instead of floating mid-row. Height
|
|
105
|
-
clears the largest style (heading-xl) so every well is uniform and the
|
|
106
|
-
rows keep a steady rhythm regardless of sample size. Preview renders
|
|
107
|
-
through the bundle's own vars (letterforms, not ink); ink stays the
|
|
108
|
-
editor's text colour since colour is outside the style bundle. */
|
|
109
|
-
.ts-preview {
|
|
110
|
-
grid-column: 2;
|
|
111
|
-
grid-row: 1;
|
|
112
|
-
align-self: start;
|
|
113
|
-
min-height: 3rem;
|
|
114
|
-
color: var(--ui-text-primary);
|
|
115
|
-
max-width: 100%;
|
|
116
|
-
min-width: 0;
|
|
117
|
-
text-align: left;
|
|
118
|
-
overflow: hidden;
|
|
119
|
-
text-overflow: ellipsis;
|
|
120
|
-
white-space: nowrap;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/* Fixed-width tracks packed to the left rather than stretching across the
|
|
124
|
-
full-bleed section, so the axis pickers stay a tight, scannable cluster.
|
|
125
|
-
auto-fill wraps them when the panel is too narrow for one row. */
|
|
126
|
-
.ts-controls {
|
|
127
|
-
grid-column: 2;
|
|
128
|
-
grid-row: 2;
|
|
129
|
-
display: grid;
|
|
130
|
-
grid-template-columns: repeat(auto-fill, minmax(6.5rem, 7.5rem));
|
|
131
|
-
justify-content: start;
|
|
132
|
-
gap: var(--ui-space-12);
|
|
133
|
-
align-items: start;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.ts-field {
|
|
137
|
-
display: flex;
|
|
138
|
-
flex-direction: column;
|
|
139
|
-
gap: var(--ui-space-4);
|
|
140
|
-
min-width: 0;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/* The shared picker renders trigger + resolved value side by side (a subgrid
|
|
144
|
-
spanning two parent tracks). Here we want them stacked — label, control,
|
|
145
|
-
then the resolved value beneath — so flip its own layout to a column and
|
|
146
|
-
left-align the value the component otherwise centres. */
|
|
147
|
-
.ts-field :global(.ui-token-selector) {
|
|
148
|
-
display: flex;
|
|
149
|
-
flex-direction: column;
|
|
150
|
-
align-items: flex-start;
|
|
151
|
-
gap: var(--ui-space-4);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.ts-field :global(.ui-ts-trigger-wrap) {
|
|
155
|
-
width: 100%;
|
|
156
|
-
min-width: 0;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.ts-field :global(.ui-ts-meta-text) {
|
|
160
|
-
align-self: flex-start;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/* Quiet eyebrow-scale labels so the eye lands on the control and its value,
|
|
164
|
-
not the field name. */
|
|
165
|
-
.ts-label {
|
|
166
|
-
font-size: var(--ui-font-size-xs);
|
|
167
|
-
font-weight: var(--ui-font-weight-medium);
|
|
168
|
-
color: var(--ui-text-muted);
|
|
169
|
-
white-space: nowrap;
|
|
170
|
-
}
|
|
171
|
-
</style>
|