@motion-proto/live-tokens 0.57.0 → 0.59.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 +13 -2
- package/.claude/skills/live-tokens-create-component/references/sketch-mode.md +202 -0
- package/.claude/skills/live-tokens-pick-component/SKILL.md +1 -1
- package/CHANGELOG.md +117 -0
- package/dist-plugin/generateColorsAndType/index.cjs +4 -3
- package/dist-plugin/generateColorsAndType/index.js +4 -3
- package/package.json +3 -3
- package/src/editor/component-editor/ImageLightboxEditor.svelte +11 -2
- package/src/editor/core/sketch/maskField.ts +10 -6
- package/src/editor/core/sketch/sketchLayer.ts +107 -29
- package/src/editor/core/sketch/sketchPresets.ts +34 -17
- package/src/editor/core/themes/parsers/shadow.ts +12 -4
- package/src/editor/docs/content/editing-tokens.md +2 -2
- package/src/editor/docs/content/sketch-mode.md +106 -12
- package/src/editor/docs/content.generated.ts +2 -2
- package/src/editor/ui/ColorEditPanel.svelte +13 -9
- package/src/editor/ui/EditorViewSwitcher.svelte +20 -20
- package/src/editor/ui/PaletteEditor.svelte +11 -3
- package/src/editor/ui/UIInlineEditActions.svelte +97 -0
- package/src/editor/ui/sketch/SketchTab.svelte +6 -5
- package/src/live-tokens/data/colors-and-type/autumn.json +5 -5
- package/src/live-tokens/data/colors-and-type/default.json +5 -5
- package/src/live-tokens/data/colors-and-type/halloween.json +5 -5
- package/src/live-tokens/data/colors-and-type/midnight-study.json +5 -5
- package/src/live-tokens/data/colors-and-type/ocean.json +5 -5
- package/src/live-tokens/data/colors-and-type/royal-velvet.json +5 -5
- package/src/live-tokens/data/colors-and-type/{sketches.json → sketchy.json} +6 -6
- package/src/live-tokens/data/colors-and-type/spring-meadow.json +5 -5
- package/src/live-tokens/data/colors-and-type/sunset.json +5 -5
- package/src/live-tokens/data/themes/autumn.json +5 -5
- package/src/live-tokens/data/themes/halloween.json +5 -5
- package/src/live-tokens/data/themes/midnight-study.json +5 -5
- package/src/live-tokens/data/themes/ocean.json +5 -5
- package/src/live-tokens/data/themes/royal-velvet.json +5 -5
- package/src/live-tokens/data/themes/{sketches.json → sketchy.json} +32 -32
- package/src/live-tokens/data/themes/spring-meadow.json +5 -5
- package/src/live-tokens/data/themes/sunset.json +5 -5
- package/src/live-tokens/data/tokens.generated.css +5 -5
- package/src/system/components/Card.svelte +12 -1
- package/src/system/components/ImageLightbox.svelte +26 -2
- package/src/system/components/SectionDivider.svelte +4 -0
- package/src/system/styles/tokens.css +5 -5
|
@@ -2302,11 +2302,11 @@
|
|
|
2302
2302
|
"--hover-low": "color-mix(in srgb, var(--text-primary) 5%, transparent)",
|
|
2303
2303
|
"--hover": "color-mix(in srgb, var(--text-primary) 10%, transparent)",
|
|
2304
2304
|
"--hover-high": "color-mix(in srgb, var(--text-primary) 15%, transparent)",
|
|
2305
|
-
"--shadow-sm": "1px 1px 2px
|
|
2306
|
-
"--shadow-md": "3px 3px 6px
|
|
2307
|
-
"--shadow-lg": "5px 5px 9px
|
|
2308
|
-
"--shadow-xl": "6px 7px 13px
|
|
2309
|
-
"--shadow-2xl": "8px 9px 16px
|
|
2305
|
+
"--shadow-sm": "1px 1px 2px hsla(237, 18%, 3%, 0.9)",
|
|
2306
|
+
"--shadow-md": "3px 3px 6px hsla(237, 18%, 3%, 0.9)",
|
|
2307
|
+
"--shadow-lg": "5px 5px 9px hsla(237, 18%, 3%, 0.9)",
|
|
2308
|
+
"--shadow-xl": "6px 7px 13px hsla(237, 18%, 3%, 0.9)",
|
|
2309
|
+
"--shadow-2xl": "8px 9px 16px hsla(237, 18%, 3%, 0.9)"
|
|
2310
2310
|
},
|
|
2311
2311
|
"fontSources": [
|
|
2312
2312
|
{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "Sketchy",
|
|
3
3
|
"createdAt": "2026-08-25T01:11:16.870Z",
|
|
4
4
|
"updatedAt": "2026-08-26T10:04:53.000Z",
|
|
5
5
|
"schemaVersion": 4,
|
|
6
6
|
"colorsAndType": {
|
|
7
|
-
"name": "
|
|
7
|
+
"name": "Sketchy",
|
|
8
8
|
"createdAt": "2026-08-25T01:21:09.181Z",
|
|
9
9
|
"updatedAt": "2026-08-25T01:21:09.181Z",
|
|
10
10
|
"editorConfigs": {
|
|
@@ -2256,11 +2256,11 @@
|
|
|
2256
2256
|
"--hover-low": "color-mix(in srgb, var(--text-primary) 5%, transparent)",
|
|
2257
2257
|
"--hover": "color-mix(in srgb, var(--text-primary) 10%, transparent)",
|
|
2258
2258
|
"--hover-high": "color-mix(in srgb, var(--text-primary) 15%, transparent)",
|
|
2259
|
-
"--shadow-sm": "1px 1px 2px
|
|
2260
|
-
"--shadow-md": "3px 3px 6px
|
|
2261
|
-
"--shadow-lg": "5px 5px 9px
|
|
2262
|
-
"--shadow-xl": "6px 7px 13px
|
|
2263
|
-
"--shadow-2xl": "8px 9px 16px
|
|
2259
|
+
"--shadow-sm": "1px 1px 2px hsla(237, 18%, 3%, 0.2)",
|
|
2260
|
+
"--shadow-md": "3px 3px 6px hsla(237, 18%, 3%, 0.2)",
|
|
2261
|
+
"--shadow-lg": "5px 5px 9px hsla(237, 18%, 3%, 0.2)",
|
|
2262
|
+
"--shadow-xl": "6px 7px 13px hsla(237, 18%, 3%, 0.2)",
|
|
2263
|
+
"--shadow-2xl": "8px 9px 16px hsla(237, 18%, 3%, 0.2)"
|
|
2264
2264
|
},
|
|
2265
2265
|
"fontSources": [
|
|
2266
2266
|
{
|
|
@@ -2525,7 +2525,7 @@
|
|
|
2525
2525
|
},
|
|
2526
2526
|
"componentConfigs": {
|
|
2527
2527
|
"badge": {
|
|
2528
|
-
"name": "
|
|
2528
|
+
"name": "sketchy",
|
|
2529
2529
|
"component": "badge",
|
|
2530
2530
|
"createdAt": "2026-05-01T08:28:00.345Z",
|
|
2531
2531
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -2663,7 +2663,7 @@
|
|
|
2663
2663
|
}
|
|
2664
2664
|
},
|
|
2665
2665
|
"button": {
|
|
2666
|
-
"name": "
|
|
2666
|
+
"name": "sketchy",
|
|
2667
2667
|
"component": "button",
|
|
2668
2668
|
"createdAt": "2026-05-10T19:28:06.893Z",
|
|
2669
2669
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -2779,7 +2779,7 @@
|
|
|
2779
2779
|
}
|
|
2780
2780
|
},
|
|
2781
2781
|
"callout": {
|
|
2782
|
-
"name": "
|
|
2782
|
+
"name": "sketchy",
|
|
2783
2783
|
"component": "callout",
|
|
2784
2784
|
"createdAt": "2026-05-12T00:00:00.000Z",
|
|
2785
2785
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -2851,7 +2851,7 @@
|
|
|
2851
2851
|
}
|
|
2852
2852
|
},
|
|
2853
2853
|
"card": {
|
|
2854
|
-
"name": "
|
|
2854
|
+
"name": "sketchy",
|
|
2855
2855
|
"component": "card",
|
|
2856
2856
|
"createdAt": "2026-05-10T19:26:31.704Z",
|
|
2857
2857
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -2892,7 +2892,7 @@
|
|
|
2892
2892
|
}
|
|
2893
2893
|
},
|
|
2894
2894
|
"codesnippet": {
|
|
2895
|
-
"name": "
|
|
2895
|
+
"name": "sketchy",
|
|
2896
2896
|
"component": "codesnippet",
|
|
2897
2897
|
"createdAt": "2026-05-27T13:22:54.228Z",
|
|
2898
2898
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -2916,7 +2916,7 @@
|
|
|
2916
2916
|
}
|
|
2917
2917
|
},
|
|
2918
2918
|
"collapsiblesection": {
|
|
2919
|
-
"name": "
|
|
2919
|
+
"name": "sketchy",
|
|
2920
2920
|
"component": "collapsiblesection",
|
|
2921
2921
|
"createdAt": "2026-05-10T20:40:17.048Z",
|
|
2922
2922
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -2989,7 +2989,7 @@
|
|
|
2989
2989
|
}
|
|
2990
2990
|
},
|
|
2991
2991
|
"cornerbadge": {
|
|
2992
|
-
"name": "
|
|
2992
|
+
"name": "sketchy",
|
|
2993
2993
|
"component": "cornerbadge",
|
|
2994
2994
|
"createdAt": "2026-05-12T15:31:06.313Z",
|
|
2995
2995
|
"updatedAt": "2026-08-25T01:12:06.370Z",
|
|
@@ -3037,7 +3037,7 @@
|
|
|
3037
3037
|
}
|
|
3038
3038
|
},
|
|
3039
3039
|
"dialog": {
|
|
3040
|
-
"name": "
|
|
3040
|
+
"name": "sketchy",
|
|
3041
3041
|
"component": "dialog",
|
|
3042
3042
|
"createdAt": "2026-05-10T20:05:24.719Z",
|
|
3043
3043
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3072,7 +3072,7 @@
|
|
|
3072
3072
|
}
|
|
3073
3073
|
},
|
|
3074
3074
|
"iconbutton": {
|
|
3075
|
-
"name": "
|
|
3075
|
+
"name": "sketchy",
|
|
3076
3076
|
"component": "iconbutton",
|
|
3077
3077
|
"createdAt": "2026-06-14T00:00:00.000Z",
|
|
3078
3078
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3161,7 +3161,7 @@
|
|
|
3161
3161
|
}
|
|
3162
3162
|
},
|
|
3163
3163
|
"image": {
|
|
3164
|
-
"name": "
|
|
3164
|
+
"name": "sketchy",
|
|
3165
3165
|
"component": "image",
|
|
3166
3166
|
"createdAt": "2026-04-26T00:00:00.000Z",
|
|
3167
3167
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3174,7 +3174,7 @@
|
|
|
3174
3174
|
}
|
|
3175
3175
|
},
|
|
3176
3176
|
"imagelightbox": {
|
|
3177
|
-
"name": "
|
|
3177
|
+
"name": "sketchy",
|
|
3178
3178
|
"component": "imagelightbox",
|
|
3179
3179
|
"createdAt": "2026-05-26T02:03:38.863Z",
|
|
3180
3180
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3193,7 +3193,7 @@
|
|
|
3193
3193
|
}
|
|
3194
3194
|
},
|
|
3195
3195
|
"inlineeditactions": {
|
|
3196
|
-
"name": "
|
|
3196
|
+
"name": "sketchy",
|
|
3197
3197
|
"component": "inlineeditactions",
|
|
3198
3198
|
"createdAt": "2026-05-01T08:34:39.325Z",
|
|
3199
3199
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3229,7 +3229,7 @@
|
|
|
3229
3229
|
}
|
|
3230
3230
|
},
|
|
3231
3231
|
"input": {
|
|
3232
|
-
"name": "
|
|
3232
|
+
"name": "sketchy",
|
|
3233
3233
|
"component": "input",
|
|
3234
3234
|
"createdAt": "2026-05-24T14:28:03.860Z",
|
|
3235
3235
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3287,7 +3287,7 @@
|
|
|
3287
3287
|
}
|
|
3288
3288
|
},
|
|
3289
3289
|
"menuselect": {
|
|
3290
|
-
"name": "
|
|
3290
|
+
"name": "sketchy",
|
|
3291
3291
|
"component": "menuselect",
|
|
3292
3292
|
"createdAt": "2026-05-16T00:00:00.000Z",
|
|
3293
3293
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3337,7 +3337,7 @@
|
|
|
3337
3337
|
}
|
|
3338
3338
|
},
|
|
3339
3339
|
"notification": {
|
|
3340
|
-
"name": "
|
|
3340
|
+
"name": "sketchy",
|
|
3341
3341
|
"component": "notification",
|
|
3342
3342
|
"createdAt": "2026-04-18T02:43:11.330Z",
|
|
3343
3343
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3417,7 +3417,7 @@
|
|
|
3417
3417
|
}
|
|
3418
3418
|
},
|
|
3419
3419
|
"panel": {
|
|
3420
|
-
"name": "
|
|
3420
|
+
"name": "sketchy",
|
|
3421
3421
|
"component": "panel",
|
|
3422
3422
|
"createdAt": "2026-06-01T09:34:52.417Z",
|
|
3423
3423
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3450,7 +3450,7 @@
|
|
|
3450
3450
|
}
|
|
3451
3451
|
},
|
|
3452
3452
|
"progressbar": {
|
|
3453
|
-
"name": "
|
|
3453
|
+
"name": "sketchy",
|
|
3454
3454
|
"component": "progressbar",
|
|
3455
3455
|
"createdAt": "2026-05-10T20:42:26.726Z",
|
|
3456
3456
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3475,7 +3475,7 @@
|
|
|
3475
3475
|
}
|
|
3476
3476
|
},
|
|
3477
3477
|
"radiobutton": {
|
|
3478
|
-
"name": "
|
|
3478
|
+
"name": "sketchy",
|
|
3479
3479
|
"component": "radiobutton",
|
|
3480
3480
|
"createdAt": "2026-05-10T20:44:44.372Z",
|
|
3481
3481
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3510,7 +3510,7 @@
|
|
|
3510
3510
|
}
|
|
3511
3511
|
},
|
|
3512
3512
|
"sectiondivider": {
|
|
3513
|
-
"name": "
|
|
3513
|
+
"name": "sketchy",
|
|
3514
3514
|
"component": "sectiondivider",
|
|
3515
3515
|
"createdAt": "2026-05-10T22:09:00.336Z",
|
|
3516
3516
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3605,7 +3605,7 @@
|
|
|
3605
3605
|
}
|
|
3606
3606
|
},
|
|
3607
3607
|
"segmentedcontrol": {
|
|
3608
|
-
"name": "
|
|
3608
|
+
"name": "sketchy",
|
|
3609
3609
|
"component": "segmentedcontrol",
|
|
3610
3610
|
"createdAt": "2026-04-28T21:13:17.669Z",
|
|
3611
3611
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3665,7 +3665,7 @@
|
|
|
3665
3665
|
}
|
|
3666
3666
|
},
|
|
3667
3667
|
"sidenavigation": {
|
|
3668
|
-
"name": "
|
|
3668
|
+
"name": "sketchy",
|
|
3669
3669
|
"component": "sidenavigation",
|
|
3670
3670
|
"createdAt": "2026-05-25T19:34:09.771Z",
|
|
3671
3671
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3825,7 +3825,7 @@
|
|
|
3825
3825
|
}
|
|
3826
3826
|
},
|
|
3827
3827
|
"tabbar": {
|
|
3828
|
-
"name": "
|
|
3828
|
+
"name": "sketchy",
|
|
3829
3829
|
"component": "tabbar",
|
|
3830
3830
|
"createdAt": "2026-05-12T01:57:26.390Z",
|
|
3831
3831
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3895,7 +3895,7 @@
|
|
|
3895
3895
|
}
|
|
3896
3896
|
},
|
|
3897
3897
|
"table": {
|
|
3898
|
-
"name": "
|
|
3898
|
+
"name": "sketchy",
|
|
3899
3899
|
"component": "table",
|
|
3900
3900
|
"createdAt": "2026-05-12T00:00:00.000Z",
|
|
3901
3901
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3929,7 +3929,7 @@
|
|
|
3929
3929
|
}
|
|
3930
3930
|
},
|
|
3931
3931
|
"toggle": {
|
|
3932
|
-
"name": "
|
|
3932
|
+
"name": "sketchy",
|
|
3933
3933
|
"component": "toggle",
|
|
3934
3934
|
"createdAt": "2026-04-18T02:43:11.333Z",
|
|
3935
3935
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -3961,7 +3961,7 @@
|
|
|
3961
3961
|
}
|
|
3962
3962
|
},
|
|
3963
3963
|
"tooltip": {
|
|
3964
|
-
"name": "
|
|
3964
|
+
"name": "sketchy",
|
|
3965
3965
|
"component": "tooltip",
|
|
3966
3966
|
"createdAt": "2026-04-18T02:43:11.333Z",
|
|
3967
3967
|
"updatedAt": "2026-08-25T01:13:11.520Z",
|
|
@@ -2256,11 +2256,11 @@
|
|
|
2256
2256
|
"--hover-low": "color-mix(in srgb, var(--text-primary) 5%, transparent)",
|
|
2257
2257
|
"--hover": "color-mix(in srgb, var(--text-primary) 10%, transparent)",
|
|
2258
2258
|
"--hover-high": "color-mix(in srgb, var(--text-primary) 15%, transparent)",
|
|
2259
|
-
"--shadow-sm": "1px 1px 2px
|
|
2260
|
-
"--shadow-md": "3px 3px 6px
|
|
2261
|
-
"--shadow-lg": "5px 5px 9px
|
|
2262
|
-
"--shadow-xl": "6px 7px 13px
|
|
2263
|
-
"--shadow-2xl": "8px 9px 16px
|
|
2259
|
+
"--shadow-sm": "1px 1px 2px hsla(237, 18%, 3%, 0.2)",
|
|
2260
|
+
"--shadow-md": "3px 3px 6px hsla(237, 18%, 3%, 0.2)",
|
|
2261
|
+
"--shadow-lg": "5px 5px 9px hsla(237, 18%, 3%, 0.2)",
|
|
2262
|
+
"--shadow-xl": "6px 7px 13px hsla(237, 18%, 3%, 0.2)",
|
|
2263
|
+
"--shadow-2xl": "8px 9px 16px hsla(237, 18%, 3%, 0.2)"
|
|
2264
2264
|
},
|
|
2265
2265
|
"fontSources": [
|
|
2266
2266
|
{
|
|
@@ -2317,11 +2317,11 @@
|
|
|
2317
2317
|
"--hover-low": "color-mix(in srgb, var(--text-primary) 5%, transparent)",
|
|
2318
2318
|
"--hover": "color-mix(in srgb, var(--text-primary) 10%, transparent)",
|
|
2319
2319
|
"--hover-high": "color-mix(in srgb, var(--text-primary) 15%, transparent)",
|
|
2320
|
-
"--shadow-sm": "1px 1px 2px
|
|
2321
|
-
"--shadow-md": "3px 3px 6px
|
|
2322
|
-
"--shadow-lg": "5px 5px 9px
|
|
2323
|
-
"--shadow-xl": "6px 7px 13px
|
|
2324
|
-
"--shadow-2xl": "8px 9px 16px
|
|
2320
|
+
"--shadow-sm": "1px 1px 2px hsla(237, 18%, 3%, 0.9)",
|
|
2321
|
+
"--shadow-md": "3px 3px 6px hsla(237, 18%, 3%, 0.9)",
|
|
2322
|
+
"--shadow-lg": "5px 5px 9px hsla(237, 18%, 3%, 0.9)",
|
|
2323
|
+
"--shadow-xl": "6px 7px 13px hsla(237, 18%, 3%, 0.9)",
|
|
2324
|
+
"--shadow-2xl": "8px 9px 16px hsla(237, 18%, 3%, 0.9)"
|
|
2325
2325
|
},
|
|
2326
2326
|
"fontSources": [
|
|
2327
2327
|
{
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
--hover-low: color-mix(in srgb, var(--text-primary) 5%, transparent);
|
|
54
54
|
--hover: color-mix(in srgb, var(--text-primary) 10%, transparent);
|
|
55
55
|
--hover-high: color-mix(in srgb, var(--text-primary) 15%, transparent);
|
|
56
|
-
--shadow-sm: 1px 1px 2px
|
|
57
|
-
--shadow-md: 3px 3px 6px
|
|
58
|
-
--shadow-lg: 5px 5px 9px
|
|
59
|
-
--shadow-xl: 6px 7px 13px
|
|
60
|
-
--shadow-2xl: 8px 9px 16px
|
|
56
|
+
--shadow-sm: 1px 1px 2px hsla(237, 18%, 3%, 0.9);
|
|
57
|
+
--shadow-md: 3px 3px 6px hsla(237, 18%, 3%, 0.9);
|
|
58
|
+
--shadow-lg: 5px 5px 9px hsla(237, 18%, 3%, 0.9);
|
|
59
|
+
--shadow-xl: 6px 7px 13px hsla(237, 18%, 3%, 0.9);
|
|
60
|
+
--shadow-2xl: 8px 9px 16px hsla(237, 18%, 3%, 0.9);
|
|
61
61
|
--color-brand-100: oklch(0.95 0.0279 355.35);
|
|
62
62
|
--color-brand-200: oklch(0.8508 0.0915 355.35);
|
|
63
63
|
--color-brand-300: oklch(0.7516 0.1697 355.35);
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
size?: 'default' | 'compact';
|
|
7
7
|
/** false → the card stops pinning body typography so the consumer fully owns slotted content's styling. */
|
|
8
8
|
prose?: boolean;
|
|
9
|
+
/** true → the body drops its inset so slotted media runs to the card's edge.
|
|
10
|
+
Pair with `prose={false}`: a flush body is a frame, not a column of text. */
|
|
11
|
+
flush?: boolean;
|
|
9
12
|
/** Apply hover styling on pointer-over. `undefined` inherits the editor's global "Use hover"
|
|
10
13
|
default; `true`/`false` force this instance on/off. */
|
|
11
14
|
hover?: boolean | undefined;
|
|
@@ -19,6 +22,7 @@
|
|
|
19
22
|
title = '',
|
|
20
23
|
size = 'default',
|
|
21
24
|
prose = true,
|
|
25
|
+
flush = false,
|
|
22
26
|
hover = undefined,
|
|
23
27
|
class: className = '',
|
|
24
28
|
children
|
|
@@ -50,7 +54,7 @@
|
|
|
50
54
|
{/if}
|
|
51
55
|
</div>
|
|
52
56
|
{/if}
|
|
53
|
-
<div class="card-body" class:prose>
|
|
57
|
+
<div class="card-body" class:prose class:flush>
|
|
54
58
|
{@render children?.()}
|
|
55
59
|
</div>
|
|
56
60
|
</div>
|
|
@@ -178,4 +182,11 @@
|
|
|
178
182
|
.card.compact .card-body {
|
|
179
183
|
font-size: var(--font-size-sm);
|
|
180
184
|
}
|
|
185
|
+
|
|
186
|
+
/* Last, and at the same weight as the compact override, so a flush card is
|
|
187
|
+
flush at either size. Full-bleed media has to reach the border the card
|
|
188
|
+
already clips it against. */
|
|
189
|
+
.card-body.flush {
|
|
190
|
+
padding: var(--space-0);
|
|
191
|
+
}
|
|
181
192
|
</style>
|
|
@@ -24,6 +24,13 @@
|
|
|
24
24
|
`cover` only crops when the thumbnail has its own box (an aspect from
|
|
25
25
|
`width`/`height`, or a CSS-constrained container). */
|
|
26
26
|
fit?: 'contain' | 'cover';
|
|
27
|
+
/** Where the tile's shadow lands. Both modes read
|
|
28
|
+
`--imagelightbox-tile-shadow`: `box` casts it from the tile's rectangle,
|
|
29
|
+
`content` casts it from the image's own alpha, so art with transparency
|
|
30
|
+
doesn't sit on a phantom rectangle. `none` drops it. A theme that dials
|
|
31
|
+
a non-zero spread has no shadow under `content` — `drop-shadow()` has no
|
|
32
|
+
spread slot. */
|
|
33
|
+
shadow?: 'box' | 'content' | 'none';
|
|
27
34
|
/** 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. */
|
|
28
35
|
extended?: boolean;
|
|
29
36
|
/** Maximum zoom, as a multiple of the image's natural resolution: `1` = 100%
|
|
@@ -55,6 +62,7 @@
|
|
|
55
62
|
images = undefined,
|
|
56
63
|
maxWidth = undefined,
|
|
57
64
|
fit = 'contain',
|
|
65
|
+
shadow = 'box',
|
|
58
66
|
extended = false,
|
|
59
67
|
maxZoom = undefined,
|
|
60
68
|
capNatural = false,
|
|
@@ -582,6 +590,8 @@
|
|
|
582
590
|
<button
|
|
583
591
|
bind:this={thumbEl}
|
|
584
592
|
class="image-lightbox-thumb"
|
|
593
|
+
class:shadow-box={shadow === 'box'}
|
|
594
|
+
class:shadow-content={shadow === 'content'}
|
|
585
595
|
style:--imagelightbox-tile-object-fit={fit}
|
|
586
596
|
type="button"
|
|
587
597
|
aria-label={cover?.alt ? `Expand image: ${cover.alt}` : 'Expand image'}
|
|
@@ -618,6 +628,8 @@
|
|
|
618
628
|
<div
|
|
619
629
|
bind:this={stageEl}
|
|
620
630
|
class="image-lightbox-stage"
|
|
631
|
+
class:shadow-box={shadow === 'box'}
|
|
632
|
+
class:shadow-content={shadow === 'content'}
|
|
621
633
|
role="presentation"
|
|
622
634
|
tabindex="-1"
|
|
623
635
|
onclick={onStageClick}
|
|
@@ -747,12 +759,25 @@
|
|
|
747
759
|
cursor: zoom-in;
|
|
748
760
|
border: var(--imagelightbox-tile-border-width) solid var(--imagelightbox-tile-border);
|
|
749
761
|
border-radius: var(--imagelightbox-tile-radius);
|
|
750
|
-
box-shadow: var(--imagelightbox-tile-shadow);
|
|
751
762
|
background: transparent;
|
|
752
763
|
overflow: hidden;
|
|
753
764
|
transition: transform 250ms ease;
|
|
754
765
|
}
|
|
755
766
|
|
|
767
|
+
.image-lightbox-thumb.shadow-box,
|
|
768
|
+
.image-lightbox-stage.shadow-box {
|
|
769
|
+
box-shadow: var(--imagelightbox-tile-shadow);
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
/* Content mode traces the image's alpha. The filter goes on the tile, not the
|
|
773
|
+
<img>: applied to the element it runs after that element's own overflow
|
|
774
|
+
clip, so the shadow lands outside the box instead of being cropped by it.
|
|
775
|
+
The open modal stays bare — it casts against a near-opaque scrim where no
|
|
776
|
+
shadow reads, and a filter over the pan/zoom surface repaints every frame. */
|
|
777
|
+
.image-lightbox-thumb.shadow-content {
|
|
778
|
+
filter: drop-shadow(var(--imagelightbox-tile-shadow));
|
|
779
|
+
}
|
|
780
|
+
|
|
756
781
|
.image-lightbox-thumb:hover {
|
|
757
782
|
transform: scale(1.02);
|
|
758
783
|
}
|
|
@@ -793,7 +818,6 @@
|
|
|
793
818
|
cursor: zoom-out;
|
|
794
819
|
border: var(--imagelightbox-tile-border-width) solid var(--imagelightbox-tile-border);
|
|
795
820
|
border-radius: var(--imagelightbox-tile-radius);
|
|
796
|
-
box-shadow: var(--imagelightbox-tile-shadow);
|
|
797
821
|
background: transparent;
|
|
798
822
|
}
|
|
799
823
|
|
|
@@ -543,6 +543,10 @@
|
|
|
543
543
|
display: block;
|
|
544
544
|
overflow: visible;
|
|
545
545
|
color: var(--_divider-title);
|
|
546
|
+
/* The title is type that happens to be drawn as an SVG, so Sketch mode
|
|
547
|
+
reads it as one glyph and pushes it as far as it pushes a 16px icon.
|
|
548
|
+
At heading size that is enough travel to pull the letters apart. */
|
|
549
|
+
--sketch-icon-off: var(--sketch-icon-soft);
|
|
546
550
|
}
|
|
547
551
|
svg.divider-label text {
|
|
548
552
|
font-family: var(--_divider-title-font-family);
|
|
@@ -530,11 +530,11 @@
|
|
|
530
530
|
|
|
531
531
|
/* Shadows (elevation scale) */
|
|
532
532
|
--shadow-none: none;
|
|
533
|
-
--shadow-sm: 1px 1px 2px
|
|
534
|
-
--shadow-md: 3px 3px 6px
|
|
535
|
-
--shadow-lg: 5px 5px 9px
|
|
536
|
-
--shadow-xl: 6px 7px 13px
|
|
537
|
-
--shadow-2xl: 8px 9px 16px
|
|
533
|
+
--shadow-sm: 1px 1px 2px hsla(237, 18%, 3%, 0.9);
|
|
534
|
+
--shadow-md: 3px 3px 6px hsla(237, 18%, 3%, 0.9);
|
|
535
|
+
--shadow-lg: 5px 5px 9px hsla(237, 18%, 3%, 0.9);
|
|
536
|
+
--shadow-xl: 6px 7px 13px hsla(237, 18%, 3%, 0.9);
|
|
537
|
+
--shadow-2xl: 8px 9px 16px hsla(237, 18%, 3%, 0.9);
|
|
538
538
|
|
|
539
539
|
/* Focus rings (box-shadow outline) */
|
|
540
540
|
--ring-focus-sm: 0 0 0 2px hsla(0, 78%, 60%, 0.1);
|