@motion-proto/live-tokens 0.94.2 → 0.95.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-page/SKILL.md +7 -3
- package/CHANGELOG.md +108 -0
- package/README.md +6 -6
- package/dist-plugin/{chunk-7XSUHJUH.js → chunk-4J6JPSVS.js} +53 -2
- package/dist-plugin/{chunk-W5VQV32K.js → chunk-GYRULB2X.js} +1 -1
- package/dist-plugin/{chunk-ONYAIXCZ.js → chunk-QQASYPW7.js} +32 -9
- package/dist-plugin/index.cjs +598 -17
- package/dist-plugin/index.d.cts +9 -1
- package/dist-plugin/index.d.ts +9 -1
- package/dist-plugin/index.js +513 -6
- package/dist-plugin/migrateData/index.cjs +32 -9
- package/dist-plugin/migrateData/index.js +2 -2
- package/dist-plugin/setColors/index.cjs +32 -22
- package/dist-plugin/setColors/index.js +2 -15
- package/dist-plugin/setGeometry/index.cjs +32 -9
- package/dist-plugin/setGeometry/index.js +1 -1
- package/dist-plugin/tokensCssMigrations/index.cjs +53 -2
- package/dist-plugin/tokensCssMigrations/index.d.cts +9 -2
- package/dist-plugin/tokensCssMigrations/index.d.ts +9 -2
- package/dist-plugin/tokensCssMigrations/index.js +1 -1
- package/package.json +8 -3
- package/src/demo/ChromeSelect.svelte +111 -0
- package/src/demo/Demo.svelte +39 -5
- package/src/demo/DemoBar.svelte +33 -14
- package/src/demo/FloatingTokenTags.css +33 -4
- package/src/demo/FloatingTokenTags.svelte +81 -68
- package/src/demo/Section.svelte +1 -7
- package/src/demo/SketchSelect.svelte +36 -12
- package/src/demo/SourceLinks.svelte +5 -4
- package/src/demo/TestingLoops.svelte +128 -19
- package/src/demo/ThemeSelect.svelte +34 -11
- package/src/demo/evalResults.ts +7 -7
- package/src/demo/sections/SectionClaude.svelte +20 -13
- package/src/demo/sections/SectionFooter.svelte +4 -5
- package/src/demo/sections/SectionGetStarted.svelte +5 -6
- package/src/demo/sections/SectionHero.svelte +43 -23
- package/src/demo/sections/SectionKit.svelte +141 -45
- package/src/demo/sections/SectionLayers.svelte +3 -3
- package/src/demo/sections/SectionOffering.svelte +8 -23
- package/src/editor/bootstrap.ts +12 -6
- package/src/editor/component-editor/ImageEditor.svelte +1 -1
- package/src/editor/component-editor/ImageLightboxEditor.svelte +3 -4
- package/src/editor/component-editor/registration.ts +36 -0
- package/src/editor/component-editor/registry.ts +5 -12
- package/src/editor/component-editor/scaffolding/ShadowBackdrop.svelte +11 -2
- package/src/editor/component-editor/scaffolding/StateBlock.svelte +7 -0
- package/src/editor/component-editor/scaffolding/TokenLayout.svelte +1 -2
- package/src/editor/component-editor/scaffolding/VariantGroup.svelte +17 -2
- package/src/editor/core/store/editorPersistence.ts +6 -1
- package/src/editor/core/store/editorRenderer.ts +1 -4
- package/src/editor/core/store/editorStore.ts +5 -9
- package/src/editor/core/store/editorTypes.ts +2 -2
- package/src/editor/core/themes/migrations/2026-10-15-responsive-columns.ts +40 -0
- package/src/editor/core/themes/migrations/index.ts +2 -0
- package/src/editor/core/themes/slices/columns.ts +112 -42
- package/src/editor/docs/Docs.svelte +25 -22
- package/src/editor/docs/chapters.ts +1 -0
- package/src/editor/docs/content/editing-tokens.md +5 -3
- package/src/editor/docs/content/production-css.md +116 -0
- package/src/editor/docs/content/themes-workflow.md +2 -0
- package/src/editor/docs/content.generated.ts +3 -2
- package/src/editor/index.ts +2 -1
- package/src/editor/overlay/LiveEditorOverlay.svelte +67 -19
- package/src/editor/overlay/LiveTokensRouter.svelte +8 -4
- package/src/editor/pages/Editor.svelte +15 -1
- package/src/editor/pages/EditorShell.svelte +312 -99
- package/src/editor/skill-atlas/SkillAtlas.svelte +111 -24
- package/src/editor/skill-atlas/TreeCanvas.svelte +14 -0
- package/src/editor/skill-atlas/skillSources.generated.ts +1 -1
- package/src/editor/skill-atlas/trees/create-page.ts +24 -24
- package/src/editor/skill-atlas/wireLayout.ts +62 -0
- package/src/editor/ui/BezierCurveEditor.svelte +3 -0
- package/src/editor/ui/FontStackEditor.svelte +2 -2
- package/src/editor/ui/PaletteEditor.svelte +64 -6
- package/src/editor/ui/UIPaletteSelector.svelte +2 -0
- package/src/editor/ui/colors/ColorsTab.svelte +5 -2
- package/src/editor/ui/palette/OverridesPanel.svelte +1 -0
- package/src/editor/ui/palette/ScaleCurveEditor.svelte +127 -18
- package/src/editor/ui/sections/ColumnsSection.svelte +79 -49
- package/src/editor/ui/sections/ShadowsSection.svelte +14 -0
- package/src/editor/ui/sections/WashesSection.svelte +11 -0
- package/src/editor/ui/sketch/SketchTab.svelte +1 -1
- package/src/live-tokens/data/colors-and-type/autumn.json +1 -4
- package/src/live-tokens/data/colors-and-type/default.json +1 -4
- package/src/live-tokens/data/colors-and-type/halloween.json +1 -4
- package/src/live-tokens/data/colors-and-type/midnight-study.json +1 -4
- package/src/live-tokens/data/colors-and-type/ocean.json +1 -4
- package/src/live-tokens/data/colors-and-type/royal-velvet.json +1 -4
- package/src/live-tokens/data/colors-and-type/sketchy.json +1 -4
- package/src/live-tokens/data/colors-and-type/spring-meadow.json +1 -4
- package/src/live-tokens/data/colors-and-type/sunset.json +1 -4
- package/src/live-tokens/data/themes/autumn.json +1 -4
- package/src/live-tokens/data/themes/halloween.json +1 -4
- package/src/live-tokens/data/themes/midnight-study.json +1 -4
- package/src/live-tokens/data/themes/ocean.json +1 -4
- package/src/live-tokens/data/themes/royal-velvet.json +1 -4
- package/src/live-tokens/data/themes/sketchy.json +1 -4
- package/src/live-tokens/data/themes/spring-meadow.json +1 -4
- package/src/live-tokens/data/themes/sunset.json +1 -4
- package/src/live-tokens/data/tokens.generated.css +1 -4
- package/src/system/components/SectionDivider.svelte +4 -0
- package/src/system/styles/CONVENTIONS.md +1 -1
- package/src/system/styles/tokens.css +30 -4
- package/template/src/main.ts +2 -2
- package/template/src/pages/Home.svelte +11 -8
- package/template/vite.config.ts +7 -3
- package/src/system/assets/offering.webp +0 -0
- /package/dist-plugin/{chunk-O6GQ6GBH.js → chunk-A4TBP4MM.js} +0 -0
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import LabeledSelect from './LabeledSelect.svelte';
|
|
3
|
+
import ChromeSelect from './ChromeSelect.svelte';
|
|
3
4
|
import { setSketch, sketchPick, sketchStyles, unsavedSketchStyle } from '../editor/core/sketch';
|
|
4
5
|
|
|
5
|
-
let {
|
|
6
|
+
let {
|
|
7
|
+
inline = false,
|
|
8
|
+
size = 'default',
|
|
9
|
+
chrome = false,
|
|
10
|
+
onpick,
|
|
11
|
+
}: {
|
|
12
|
+
inline?: boolean;
|
|
13
|
+
size?: 'default' | 'small';
|
|
14
|
+
/** Paint in the editor's --ui-* chrome; needs an .editor-page ancestor. */
|
|
15
|
+
chrome?: boolean;
|
|
16
|
+
onpick?: (id: string | null) => void;
|
|
17
|
+
} = $props();
|
|
6
18
|
|
|
7
19
|
// The empty string is the placeholder's value, so off needs a name of its own.
|
|
8
20
|
const OFF = 'none';
|
|
@@ -45,14 +57,26 @@
|
|
|
45
57
|
}
|
|
46
58
|
</script>
|
|
47
59
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
{#if chrome}
|
|
61
|
+
<ChromeSelect
|
|
62
|
+
label="Sketch"
|
|
63
|
+
{items}
|
|
64
|
+
value={selected}
|
|
65
|
+
placeholder="Custom"
|
|
66
|
+
disabled={busy}
|
|
67
|
+
{error}
|
|
68
|
+
onchange={changeSketch}
|
|
69
|
+
/>
|
|
70
|
+
{:else}
|
|
71
|
+
<LabeledSelect
|
|
72
|
+
{inline}
|
|
73
|
+
{size}
|
|
74
|
+
label="Sketch"
|
|
75
|
+
{items}
|
|
76
|
+
value={selected}
|
|
77
|
+
placeholder="Custom"
|
|
78
|
+
disabled={busy}
|
|
79
|
+
{error}
|
|
80
|
+
onchange={changeSketch}
|
|
81
|
+
/>
|
|
82
|
+
{/if}
|
|
@@ -48,9 +48,10 @@
|
|
|
48
48
|
<style>
|
|
49
49
|
.source-links {
|
|
50
50
|
display: flex;
|
|
51
|
+
flex-wrap: wrap;
|
|
51
52
|
align-items: center;
|
|
52
|
-
gap: var(--space-48);
|
|
53
|
-
|
|
53
|
+
column-gap: var(--space-48);
|
|
54
|
+
row-gap: var(--space-16);
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
.brand-link {
|
|
@@ -148,9 +149,9 @@
|
|
|
148
149
|
font-size: var(--font-size-xl);
|
|
149
150
|
}
|
|
150
151
|
|
|
151
|
-
@media (max-width:
|
|
152
|
+
@media (max-width: 1200px) {
|
|
152
153
|
.source-links:not(.compact) {
|
|
153
|
-
gap: var(--space-24);
|
|
154
|
+
column-gap: var(--space-24);
|
|
154
155
|
}
|
|
155
156
|
}
|
|
156
157
|
</style>
|
|
@@ -30,6 +30,13 @@
|
|
|
30
30
|
if (id) document.getElementById(id)?.scrollIntoView({ block: 'start' });
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
+
function armName(arm: { skills: boolean; lookup: boolean }) {
|
|
34
|
+
if (arm.skills && arm.lookup) return 'Skills and lookup';
|
|
35
|
+
if (arm.skills) return 'Skills only';
|
|
36
|
+
if (arm.lookup) return 'Lookup only';
|
|
37
|
+
return 'Neither';
|
|
38
|
+
}
|
|
39
|
+
|
|
33
40
|
function jump(event: MouseEvent, id: string) {
|
|
34
41
|
event.preventDefault();
|
|
35
42
|
contentsOpen = false;
|
|
@@ -68,7 +75,7 @@
|
|
|
68
75
|
<h2 id="skills-title">LiveTokens skills</h2>
|
|
69
76
|
<div class="text-columns skills-overview">
|
|
70
77
|
<div>
|
|
71
|
-
<p>The CLI checks verify that skill output uses the design system and works correctly in the browser. They cover token use, component behavior, and page layout. Skills make design decisions and the
|
|
78
|
+
<p>The CLI checks verify that skill output uses the design system and works correctly in the browser. They cover token use, component behavior, and page layout. Skills make design decisions and the checker verifies the code.</p>
|
|
72
79
|
<p>The package includes eight skills, and one setup command copies them into your project.</p>
|
|
73
80
|
</div>
|
|
74
81
|
<ul class="skill-stack">
|
|
@@ -356,29 +363,27 @@
|
|
|
356
363
|
<section class="chapter" id="measured-value" aria-labelledby="measured-value-title">
|
|
357
364
|
<div class="chapter-body">
|
|
358
365
|
<h2 id="measured-value-title">Measured value</h2>
|
|
359
|
-
<p>An eval asked an agent to choose a component for {result.requirements} requirements. It ran in four arms of {result.runsPerArm} runs each: with and without the skills, and with and without the
|
|
366
|
+
<p>An eval asked an agent to choose a component for {result.requirements} requirements. It ran in four arms of {result.runsPerArm} runs each: with and without the skills, and with and without the lookup, the <code>live-tokens components</code> command that lists each component with its entry and props. The arms chose the same components, with one miss among 144 answers, and differ in turns, time, and cost.</p>
|
|
360
367
|
<div class="eval-results">
|
|
361
368
|
<Table>
|
|
362
369
|
<table aria-label="Eval arms">
|
|
363
370
|
<thead>
|
|
364
371
|
<tr>
|
|
365
|
-
<th scope="col">
|
|
366
|
-
<th scope="col">
|
|
367
|
-
<th scope="col">Requirements right</th>
|
|
372
|
+
<th scope="col">Arm</th>
|
|
373
|
+
<th scope="col">Accuracy</th>
|
|
368
374
|
<th scope="col">Turns</th>
|
|
369
375
|
<th scope="col">Seconds</th>
|
|
370
376
|
<th scope="col">Cost</th>
|
|
371
377
|
</tr>
|
|
372
378
|
</thead>
|
|
373
379
|
<tbody>
|
|
374
|
-
{#each result.arms as arm (`${arm.skills}-${arm.
|
|
380
|
+
{#each result.arms as arm (`${arm.skills}-${arm.lookup}`)}
|
|
375
381
|
<tr>
|
|
376
|
-
<td>{arm
|
|
377
|
-
<td>{arm.
|
|
378
|
-
<td>{arm.
|
|
379
|
-
<td>{arm.
|
|
380
|
-
<td>{arm.
|
|
381
|
-
<td>{arm.cost}</td>
|
|
382
|
+
<td>{armName(arm)}</td>
|
|
383
|
+
<td data-label="Accuracy">{arm.rowsRight}</td>
|
|
384
|
+
<td data-label="Turns">{arm.turns}</td>
|
|
385
|
+
<td data-label="Seconds">{arm.seconds}</td>
|
|
386
|
+
<td data-label="Cost">{arm.cost}</td>
|
|
382
387
|
</tr>
|
|
383
388
|
{/each}
|
|
384
389
|
</tbody>
|
|
@@ -386,10 +391,10 @@
|
|
|
386
391
|
</Table>
|
|
387
392
|
</div>
|
|
388
393
|
<ul class="eval-summary">
|
|
389
|
-
<li><strong>Turns:</strong> the skill saves turns only through the
|
|
390
|
-
<li><strong>Time and cost:</strong> the skills and the
|
|
394
|
+
<li><strong>Turns:</strong> the skill saves turns only through the lookup. Without the lookup, the skill arm takes as many turns as the agent with neither.</li>
|
|
395
|
+
<li><strong>Time and cost:</strong> the skills and the lookup each save time on their own, and together the run costs less than half as much as with neither.</li>
|
|
391
396
|
<li><strong>Accuracy:</strong> every arm scores about the same. The choices come from the entries in the component files.</li>
|
|
392
|
-
<li><strong>Change since 2026-09-20:</strong> in that run, no agent without the skills found the
|
|
397
|
+
<li><strong>Change since 2026-09-20:</strong> in that run, no agent without the skills found the lookup; this time 2 of 3 did, so that arm varies from run to run.</li>
|
|
393
398
|
</ul>
|
|
394
399
|
<div class="text-columns">
|
|
395
400
|
<div>
|
|
@@ -456,9 +461,11 @@
|
|
|
456
461
|
display: grid;
|
|
457
462
|
grid-template-columns: repeat(var(--columns-count), minmax(var(--space-0), 1fr));
|
|
458
463
|
column-gap: var(--columns-gutter);
|
|
464
|
+
box-sizing: content-box;
|
|
459
465
|
max-width: var(--columns-max-width);
|
|
460
466
|
margin-inline: auto;
|
|
461
|
-
padding: var(--space-48) var(--space-
|
|
467
|
+
padding-block: var(--space-48) var(--space-64);
|
|
468
|
+
padding-inline: var(--columns-margin);
|
|
462
469
|
color: var(--text-primary);
|
|
463
470
|
}
|
|
464
471
|
|
|
@@ -664,6 +671,16 @@
|
|
|
664
671
|
width: auto;
|
|
665
672
|
}
|
|
666
673
|
|
|
674
|
+
/* The panel's stage padding sized for a figure makes a one-line toggle a tall slab. */
|
|
675
|
+
.contents {
|
|
676
|
+
--panel-stage-padding: var(--space-4);
|
|
677
|
+
--panel-stage-inline-padding: var(--space-8);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.contents :global(.panel) {
|
|
681
|
+
justify-content: flex-start;
|
|
682
|
+
}
|
|
683
|
+
|
|
667
684
|
.contents-body {
|
|
668
685
|
width: 100%;
|
|
669
686
|
min-width: var(--space-0);
|
|
@@ -775,6 +792,24 @@
|
|
|
775
792
|
overflow-x: auto;
|
|
776
793
|
}
|
|
777
794
|
|
|
795
|
+
/* A phone frame scrolls the diagram, and the default overlay bar is too thin
|
|
796
|
+
to signal it. The standard scrollbar-width has no length value, and setting
|
|
797
|
+
it would disable these pseudo-elements in Chromium. */
|
|
798
|
+
.figure-scroll::-webkit-scrollbar {
|
|
799
|
+
height: var(--space-32);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
.figure-scroll::-webkit-scrollbar-track {
|
|
803
|
+
background: var(--surface-neutral-low);
|
|
804
|
+
border-radius: var(--radius-full);
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
.figure-scroll::-webkit-scrollbar-thumb {
|
|
808
|
+
background: var(--surface-neutral-higher);
|
|
809
|
+
border: var(--border-width-1) solid var(--border-neutral);
|
|
810
|
+
border-radius: var(--radius-full);
|
|
811
|
+
}
|
|
812
|
+
|
|
778
813
|
/* Inside the figure's subgrid, so 1 / 7 lines up with the text column. */
|
|
779
814
|
figcaption {
|
|
780
815
|
grid-column: 1 / 7;
|
|
@@ -950,10 +985,16 @@
|
|
|
950
985
|
display: block;
|
|
951
986
|
}
|
|
952
987
|
|
|
988
|
+
/* The top leaves room for the fixed editor toolbar above the back link. */
|
|
953
989
|
.loops {
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
990
|
+
padding-block: var(--space-64) var(--space-48);
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
/* Both outrank the 1023px block's `.chapter-body > *`, so without this
|
|
994
|
+
they keep the 2 / -2 inset the rest of the chapter drops. */
|
|
995
|
+
.chapter-body > h1,
|
|
996
|
+
.chapter-body > .eval-results {
|
|
997
|
+
grid-column: 1 / -1;
|
|
957
998
|
}
|
|
958
999
|
|
|
959
1000
|
h1 {
|
|
@@ -972,5 +1013,73 @@
|
|
|
972
1013
|
padding-block: var(--space-32);
|
|
973
1014
|
}
|
|
974
1015
|
|
|
1016
|
+
/* A phone leaves too little width for side-by-side columns, so each row stacks into a card. */
|
|
1017
|
+
:is(.rule-group, .eval-results) :global(.table-wrapper :is(table, tbody, tr, td)) {
|
|
1018
|
+
display: block;
|
|
1019
|
+
min-width: var(--space-0);
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
:is(.rule-group, .eval-results) :global(.table-wrapper thead) {
|
|
1023
|
+
display: none;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
/* The row's first cell takes the table's header style and captions the card. */
|
|
1027
|
+
:is(.rule-group, .eval-results) :global(.table-wrapper td:first-child) {
|
|
1028
|
+
border-right: none;
|
|
1029
|
+
border-bottom: var(--table-default-header-hairline-width) solid var(--table-default-header-hairline-color);
|
|
1030
|
+
background: var(--table-default-header-surface);
|
|
1031
|
+
color: var(--table-default-header-text);
|
|
1032
|
+
font-family: var(--table-default-header-font-family);
|
|
1033
|
+
font-size: var(--table-default-header-font-size);
|
|
1034
|
+
font-weight: var(--table-default-header-font-weight);
|
|
1035
|
+
line-height: var(--table-default-header-line-height);
|
|
1036
|
+
/* Half again as tall as a body row, so each card's caption marks a break between rules. */
|
|
1037
|
+
padding-top: calc(var(--table-default-cell-padding-top, var(--table-default-cell-padding)) * 1.5 + 0.25lh);
|
|
1038
|
+
padding-bottom: calc(var(--table-default-cell-padding-bottom, var(--table-default-cell-padding)) * 1.5 + 0.25lh);
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
.rule-group :global(.table-wrapper td:last-child) {
|
|
1042
|
+
padding-bottom: calc(var(--table-default-cell-padding-bottom, var(--table-default-cell-padding)) + 0.5lh);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.eval-results :global(.table-wrapper tr:not(:last-child) td:last-child) {
|
|
1046
|
+
border-bottom: var(--table-default-header-hairline-width) solid var(--table-default-header-hairline-color);
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
/* Each rule stands as its own box: the wrapper hands its chrome to every row.
|
|
1050
|
+
Visible overflow keeps the wrapper's scroll box from clipping each row's shadow. */
|
|
1051
|
+
.rule-group :global(.table-wrapper) {
|
|
1052
|
+
overflow: visible;
|
|
1053
|
+
background: none;
|
|
1054
|
+
border: none;
|
|
1055
|
+
border-radius: var(--radius-none);
|
|
1056
|
+
box-shadow: none;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.rule-group :global(.table-wrapper tbody) {
|
|
1060
|
+
display: grid;
|
|
1061
|
+
gap: var(--space-12);
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
.rule-group :global(.table-wrapper tr) {
|
|
1065
|
+
overflow: hidden;
|
|
1066
|
+
background: var(--table-default-surface);
|
|
1067
|
+
border: var(--table-default-border-width) solid var(--table-default-border);
|
|
1068
|
+
border-radius: var(--table-default-radius);
|
|
1069
|
+
box-shadow: var(--table-default-shadow);
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
/* The hidden header row named these columns, so each value carries its own label. */
|
|
1073
|
+
.eval-results :global(.table-wrapper td[data-label]) {
|
|
1074
|
+
display: grid;
|
|
1075
|
+
grid-template-columns: minmax(var(--space-0), 2fr) minmax(var(--space-0), 3fr);
|
|
1076
|
+
column-gap: var(--space-12);
|
|
1077
|
+
border-right: none;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
.eval-results :global(.table-wrapper td[data-label]::before) {
|
|
1081
|
+
content: attr(data-label);
|
|
1082
|
+
font-weight: var(--table-default-header-font-weight);
|
|
1083
|
+
}
|
|
975
1084
|
}
|
|
976
1085
|
</style>
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { onMount } from 'svelte';
|
|
3
3
|
import LabeledSelect from './LabeledSelect.svelte';
|
|
4
|
+
import ChromeSelect from './ChromeSelect.svelte';
|
|
4
5
|
import { listThemes, applyTheme } from '../editor/core/themes/themeService';
|
|
5
6
|
import { openThemeSlug } from '../editor/core/store/editorConfigStore';
|
|
6
7
|
import { carrySketch } from './sketchCarry';
|
|
7
8
|
|
|
8
|
-
let {
|
|
9
|
+
let {
|
|
10
|
+
inline = false,
|
|
11
|
+
size = 'default',
|
|
12
|
+
chrome = false,
|
|
13
|
+
onpick,
|
|
14
|
+
}: {
|
|
15
|
+
inline?: boolean;
|
|
16
|
+
size?: 'default' | 'small';
|
|
17
|
+
/** Paint in the editor's --ui-* chrome; needs an .editor-page ancestor. */
|
|
18
|
+
chrome?: boolean;
|
|
19
|
+
onpick?: (fileName: string) => void;
|
|
20
|
+
} = $props();
|
|
9
21
|
|
|
10
22
|
let themes = $state<{ value: string; label: string }[]>([]);
|
|
11
23
|
let busy = $state(false);
|
|
@@ -40,13 +52,24 @@
|
|
|
40
52
|
|
|
41
53
|
<!-- The open theme drives the selection, so applies from the Themes panel or
|
|
42
54
|
another tab show up here too. -->
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
{#if chrome}
|
|
56
|
+
<ChromeSelect
|
|
57
|
+
label="Theme"
|
|
58
|
+
items={themes}
|
|
59
|
+
value={$openThemeSlug}
|
|
60
|
+
disabled={busy}
|
|
61
|
+
{error}
|
|
62
|
+
onchange={changeTheme}
|
|
63
|
+
/>
|
|
64
|
+
{:else}
|
|
65
|
+
<LabeledSelect
|
|
66
|
+
{inline}
|
|
67
|
+
{size}
|
|
68
|
+
label="Theme"
|
|
69
|
+
items={themes}
|
|
70
|
+
value={$openThemeSlug}
|
|
71
|
+
disabled={busy}
|
|
72
|
+
{error}
|
|
73
|
+
onchange={changeTheme}
|
|
74
|
+
/>
|
|
75
|
+
{/if}
|
package/src/demo/evalResults.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/** One arm of an eval: the same case run with or without the skills, and with or without the
|
|
1
|
+
/** One arm of an eval: the same case run with or without the skills, and with or without the lookup command. */
|
|
2
2
|
export interface EvalArm {
|
|
3
3
|
skills: boolean;
|
|
4
|
-
|
|
4
|
+
lookup: boolean;
|
|
5
5
|
rowsRight: string;
|
|
6
6
|
turns: string;
|
|
7
7
|
seconds: string;
|
|
@@ -28,7 +28,7 @@ export const pickComponentEval: EvalResult = {
|
|
|
28
28
|
arms: [
|
|
29
29
|
{
|
|
30
30
|
skills: true,
|
|
31
|
-
|
|
31
|
+
lookup: true,
|
|
32
32
|
rowsRight: '12 of 12 in all 3 runs',
|
|
33
33
|
turns: '9 to 10',
|
|
34
34
|
seconds: '46 to 76',
|
|
@@ -36,15 +36,15 @@ export const pickComponentEval: EvalResult = {
|
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
skills: false,
|
|
39
|
-
|
|
40
|
-
rowsRight: '12 of 12 in all 3 runs; 2 of 3 found the
|
|
39
|
+
lookup: true,
|
|
40
|
+
rowsRight: '12 of 12 in all 3 runs; 2 of 3 found the lookup on their own',
|
|
41
41
|
turns: '15 to 17',
|
|
42
42
|
seconds: '65 to 102',
|
|
43
43
|
cost: '$0.63 to $0.74',
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
skills: true,
|
|
47
|
-
|
|
47
|
+
lookup: false,
|
|
48
48
|
rowsRight: '12 of 12 in all 3 runs',
|
|
49
49
|
turns: '14 to 20',
|
|
50
50
|
seconds: '66 to 84',
|
|
@@ -52,7 +52,7 @@ export const pickComponentEval: EvalResult = {
|
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
skills: false,
|
|
55
|
-
|
|
55
|
+
lookup: false,
|
|
56
56
|
rowsRight: '11 of 12 in one run, which missed requirement 12',
|
|
57
57
|
turns: '17 to 20',
|
|
58
58
|
seconds: '113 to 169',
|
|
@@ -66,28 +66,26 @@
|
|
|
66
66
|
.claude {
|
|
67
67
|
grid-column: 1 / -1;
|
|
68
68
|
display: grid;
|
|
69
|
-
grid-template-columns:
|
|
70
|
-
column-gap: var(--columns-gutter);
|
|
69
|
+
grid-template-columns: subgrid;
|
|
71
70
|
row-gap: var(--space-8);
|
|
72
71
|
align-items: start;
|
|
73
|
-
margin-bottom: var(--space-96);
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
.claude :global(.section-divider) {
|
|
77
|
-
grid-column:
|
|
75
|
+
grid-column: var(--kit-content);
|
|
78
76
|
}
|
|
79
77
|
|
|
80
|
-
/* Panel sits on page columns 2
|
|
78
|
+
/* Panel sits on page columns 2 to 5; the copy starts on column 6, hard
|
|
81
79
|
against the panel's right edge. */
|
|
82
80
|
.panel-col {
|
|
83
|
-
grid-column: 2 /
|
|
81
|
+
grid-column: 2 / 6;
|
|
84
82
|
grid-row: 2;
|
|
85
83
|
align-self: start;
|
|
86
84
|
margin-top: var(--space-16);
|
|
87
85
|
}
|
|
88
86
|
|
|
89
87
|
.copy {
|
|
90
|
-
grid-column:
|
|
88
|
+
grid-column: 6 / -2;
|
|
91
89
|
grid-row: 2;
|
|
92
90
|
align-self: start;
|
|
93
91
|
display: flex;
|
|
@@ -98,7 +96,7 @@
|
|
|
98
96
|
|
|
99
97
|
.intro {
|
|
100
98
|
font-family: var(--font-sans);
|
|
101
|
-
font-size: var(--font-size
|
|
99
|
+
font-size: var(--body-xl-font-size);
|
|
102
100
|
line-height: var(--line-height-tighter);
|
|
103
101
|
font-weight: var(--font-weight-semibold);
|
|
104
102
|
color: var(--text-primary);
|
|
@@ -114,7 +112,7 @@
|
|
|
114
112
|
.install-caption {
|
|
115
113
|
margin: 0;
|
|
116
114
|
font-family: var(--font-sans);
|
|
117
|
-
font-size: var(--font-size
|
|
115
|
+
font-size: var(--body-md-font-size);
|
|
118
116
|
line-height: var(--line-height-normal);
|
|
119
117
|
color: var(--text-secondary);
|
|
120
118
|
}
|
|
@@ -171,17 +169,16 @@
|
|
|
171
169
|
|
|
172
170
|
.skill-name {
|
|
173
171
|
font-family: var(--font-sans);
|
|
174
|
-
font-size: var(--font-size
|
|
172
|
+
font-size: var(--heading-md-font-size);
|
|
175
173
|
font-weight: var(--font-weight-medium);
|
|
176
174
|
line-height: var(--line-height-normal);
|
|
177
175
|
color: var(--text-primary);
|
|
178
176
|
}
|
|
179
177
|
|
|
180
|
-
@media (max-width:
|
|
181
|
-
.claude :global(.section-divider),
|
|
178
|
+
@media (max-width: 1200px) {
|
|
182
179
|
.panel-col,
|
|
183
180
|
.copy {
|
|
184
|
-
grid-column:
|
|
181
|
+
grid-column: var(--kit-content);
|
|
185
182
|
}
|
|
186
183
|
|
|
187
184
|
.panel-col,
|
|
@@ -189,4 +186,14 @@
|
|
|
189
186
|
grid-row: auto;
|
|
190
187
|
}
|
|
191
188
|
}
|
|
189
|
+
|
|
190
|
+
@media (max-width: 600px) {
|
|
191
|
+
.atlas {
|
|
192
|
+
align-items: stretch;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.atlas-actions {
|
|
196
|
+
flex-direction: column;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
192
199
|
</style>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
<style>
|
|
18
18
|
.provenance {
|
|
19
|
-
grid-column:
|
|
19
|
+
grid-column: var(--kit-content);
|
|
20
20
|
padding-top: var(--space-24);
|
|
21
21
|
border-top: var(--border-width-2) solid var(--border-neutral);
|
|
22
22
|
display: flex;
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
.license {
|
|
35
35
|
margin: 0;
|
|
36
36
|
font-family: var(--font-sans);
|
|
37
|
-
font-size: var(--font-size
|
|
37
|
+
font-size: var(--body-lg-font-size);
|
|
38
38
|
color: var(--text-secondary);
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -52,13 +52,12 @@
|
|
|
52
52
|
.copyright {
|
|
53
53
|
margin: 0;
|
|
54
54
|
font-family: var(--font-sans);
|
|
55
|
-
font-size: var(--font-size
|
|
55
|
+
font-size: var(--body-md-font-size);
|
|
56
56
|
color: var(--text-secondary);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
@media (max-width:
|
|
59
|
+
@media (max-width: 1200px) {
|
|
60
60
|
.provenance {
|
|
61
|
-
grid-column: 1 / -1;
|
|
62
61
|
flex-direction: column;
|
|
63
62
|
align-items: flex-start;
|
|
64
63
|
gap: var(--space-24);
|
|
@@ -34,12 +34,11 @@ npm run dev`;
|
|
|
34
34
|
.get-started {
|
|
35
35
|
grid-column: 1 / -1;
|
|
36
36
|
display: grid;
|
|
37
|
-
grid-template-columns:
|
|
38
|
-
column-gap: var(--columns-gutter);
|
|
37
|
+
grid-template-columns: subgrid;
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
.gs-panel {
|
|
42
|
-
grid-column:
|
|
41
|
+
grid-column: var(--kit-content);
|
|
43
42
|
/* The .kit grid can stretch this section's row past its content (min-height:
|
|
44
43
|
100vh on a short page); keep the panel sized to its content regardless. */
|
|
45
44
|
align-self: start;
|
|
@@ -68,7 +67,7 @@ npm run dev`;
|
|
|
68
67
|
|
|
69
68
|
.intro {
|
|
70
69
|
font-family: var(--font-sans);
|
|
71
|
-
font-size: var(--font-size
|
|
70
|
+
font-size: var(--body-xl-font-size);
|
|
72
71
|
line-height: var(--line-height-tighter);
|
|
73
72
|
font-weight: var(--font-weight-semibold);
|
|
74
73
|
color: var(--text-primary);
|
|
@@ -91,9 +90,9 @@ npm run dev`;
|
|
|
91
90
|
overflow-y: hidden;
|
|
92
91
|
}
|
|
93
92
|
|
|
94
|
-
@media (max-width:
|
|
93
|
+
@media (max-width: 1200px) {
|
|
95
94
|
.columns {
|
|
96
|
-
grid-template-columns: 1fr;
|
|
95
|
+
grid-template-columns: minmax(0, 1fr);
|
|
97
96
|
align-items: stretch;
|
|
98
97
|
}
|
|
99
98
|
}
|