@motion-proto/live-tokens 0.84.0 → 0.86.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/token-naming.md +0 -1
- package/CHANGELOG.md +85 -0
- package/README.md +1 -1
- package/dist-plugin/{chunk-V2OVSC5Z.js → chunk-GWMEYBZ2.js} +22 -1
- package/dist-plugin/{chunk-FD4FVDOC.js → chunk-ONYAIXCZ.js} +74 -1
- package/dist-plugin/{chunk-M6BWSS6C.js → chunk-W5VQV32K.js} +1 -1
- package/dist-plugin/index.cjs +101 -7
- package/dist-plugin/index.js +3 -3
- package/dist-plugin/migrateData/index.cjs +78 -5
- package/dist-plugin/migrateData/index.js +2 -2
- package/dist-plugin/setColors/index.cjs +74 -1
- package/dist-plugin/setColors/index.js +1 -1
- package/dist-plugin/setGeometry/index.cjs +74 -4
- package/dist-plugin/setGeometry/index.d.cts +1 -1
- package/dist-plugin/setGeometry/index.d.ts +1 -1
- package/dist-plugin/setGeometry/index.js +1 -4
- package/dist-plugin/tokensCssMigrations/index.cjs +22 -1
- package/dist-plugin/tokensCssMigrations/index.js +1 -1
- package/package.json +1 -1
- package/src/editor/component-editor/DialogEditor.svelte +1 -2
- package/src/editor/component-editor/ImageLightboxEditor.svelte +1 -2
- package/src/editor/component-editor/SlidePagerEditor.svelte +118 -0
- package/src/editor/component-editor/VideoFrameEditor.svelte +73 -0
- package/src/editor/component-editor/VideoLightboxEditor.svelte +95 -0
- package/src/editor/component-editor/registry.ts +40 -1
- package/src/editor/component-editor/scaffolding/TokenLayout.svelte +1 -4
- package/src/editor/core/components/aliasKinds.ts +0 -4
- package/src/editor/core/sketch/sketchLayer.ts +8 -1
- package/src/editor/core/store/editorPersistence.ts +46 -23
- package/src/editor/core/store/editorStore.ts +1 -5
- package/src/editor/core/store/editorTypes.ts +11 -7
- package/src/editor/core/themes/migrations/2026-09-21-scrim-surface.ts +56 -0
- package/src/editor/core/themes/migrations/2026-09-21-wash-color-and-opacity.ts +51 -0
- package/src/editor/core/themes/migrations/index.ts +4 -0
- package/src/editor/core/themes/slices/washes.ts +59 -77
- package/src/editor/overlay/LiveEditorOverlay.svelte +45 -52
- package/src/editor/pages/ComponentEditorPage.svelte +1 -1
- package/src/editor/skill-atlas/skillSources.generated.ts +1 -1
- package/src/editor/ui/ThemePanel.svelte +9 -53
- package/src/editor/ui/UIPaletteSelector.svelte +5 -1
- package/src/editor/ui/UIVariantSelector.svelte +1 -1
- package/src/editor/ui/sections/WashesSection.svelte +100 -99
- package/src/editor/ui/variantScales.ts +0 -11
- package/src/live-tokens/data/colors-and-type/autumn.json +9 -7
- package/src/live-tokens/data/colors-and-type/default.json +9 -7
- package/src/live-tokens/data/colors-and-type/halloween.json +9 -7
- package/src/live-tokens/data/colors-and-type/midnight-study.json +9 -7
- package/src/live-tokens/data/colors-and-type/ocean.json +9 -7
- package/src/live-tokens/data/colors-and-type/royal-velvet.json +9 -7
- package/src/live-tokens/data/colors-and-type/sketchy.json +9 -7
- package/src/live-tokens/data/colors-and-type/spring-meadow.json +9 -7
- package/src/live-tokens/data/colors-and-type/sunset.json +9 -7
- package/src/live-tokens/data/themes/autumn.json +98 -12
- package/src/live-tokens/data/themes/halloween.json +98 -12
- package/src/live-tokens/data/themes/midnight-study.json +98 -12
- package/src/live-tokens/data/themes/ocean.json +98 -12
- package/src/live-tokens/data/themes/royal-velvet.json +98 -12
- package/src/live-tokens/data/themes/sketchy.json +98 -12
- package/src/live-tokens/data/themes/spring-meadow.json +98 -12
- package/src/live-tokens/data/themes/sunset.json +98 -12
- package/src/live-tokens/data/tokens.generated.css +8 -6
- package/src/system/assets/slide-04.webp +0 -0
- package/src/system/assets/slide-05.webp +0 -0
- package/src/system/assets/slide-06.webp +0 -0
- package/src/system/assets/watch-navigation-poster.webp +0 -0
- package/src/system/assets/watch-navigation.mp4 +0 -0
- package/src/system/components/Dialog.svelte +2 -7
- package/src/system/components/ImageLightbox.svelte +27 -39
- package/src/system/components/SlidePager.svelte +516 -0
- package/src/system/components/VideoFrame.svelte +284 -0
- package/src/system/components/VideoLightbox.svelte +381 -0
- package/src/system/styles/tokens.css +13 -8
- package/src/testing-js/{chunk-WQJ6QB6Y.js → chunk-OHU5BHGZ.js} +347 -9
- package/src/testing-js/chunk-OHU5BHGZ.js.map +1 -0
- package/src/testing-js/{chunk-XXABJNUU.js → chunk-Y6R7Z7VK.js} +10 -6
- package/src/testing-js/chunk-Y6R7Z7VK.js.map +1 -0
- 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.d.ts +2 -2
- package/src/testing-js/index.js +2 -2
- package/src/testing-js/page-compliance.contract.js +1 -1
- package/src/testing-js/{vitest-BMLIbDs2.d.ts → vitest-5vWtqwWe.d.ts} +2 -2
- package/src/testing-js/vitest.d.ts +1 -1
- package/src/testing-js/vitest.js +2 -2
- package/src/testing-js/chunk-WQJ6QB6Y.js.map +0 -1
- package/src/testing-js/chunk-XXABJNUU.js.map +0 -1
|
@@ -2214,12 +2214,14 @@
|
|
|
2214
2214
|
"--columns-max-width": "1440px",
|
|
2215
2215
|
"--columns-gutter": "32px",
|
|
2216
2216
|
"--columns-margin": "0px",
|
|
2217
|
-
"--scrim-
|
|
2218
|
-
"--scrim": "
|
|
2219
|
-
"--scrim-
|
|
2220
|
-
"--
|
|
2221
|
-
"--tint": "
|
|
2222
|
-
"--tint-
|
|
2217
|
+
"--scrim-color": "var(--surface-neutral-lowest)",
|
|
2218
|
+
"--scrim-opacity-low": "0.7",
|
|
2219
|
+
"--scrim-opacity": "0.8",
|
|
2220
|
+
"--scrim-opacity-high": "0.9",
|
|
2221
|
+
"--tint-color": "var(--text-primary)",
|
|
2222
|
+
"--tint-opacity-low": "0.05",
|
|
2223
|
+
"--tint-opacity": "0.1",
|
|
2224
|
+
"--tint-opacity-high": "0.15",
|
|
2223
2225
|
"--shadow-sm": "1px 1px 2px hsla(237, 18%, 3%, 0.2)",
|
|
2224
2226
|
"--shadow-md": "3px 3px 6px hsla(237, 18%, 3%, 0.2)",
|
|
2225
2227
|
"--shadow-lg": "5px 5px 9px hsla(237, 18%, 3%, 0.2)",
|
|
@@ -2396,7 +2398,7 @@
|
|
|
2396
2398
|
"family": null
|
|
2397
2399
|
}
|
|
2398
2400
|
],
|
|
2399
|
-
"schemaVersion":
|
|
2401
|
+
"schemaVersion": 9,
|
|
2400
2402
|
"gradients": [
|
|
2401
2403
|
{
|
|
2402
2404
|
"variable": "--gradient-1",
|
|
@@ -2982,8 +2984,7 @@
|
|
|
2982
2984
|
"createdAt": "2026-05-10T20:05:24.719Z",
|
|
2983
2985
|
"updatedAt": "2026-08-19T22:39:32.785Z",
|
|
2984
2986
|
"aliases": {
|
|
2985
|
-
"--dialog-scrim-
|
|
2986
|
-
"--dialog-scrim-opacity": "--scrim-opacity-high",
|
|
2987
|
+
"--dialog-scrim-surface": "--scrim-high",
|
|
2987
2988
|
"--dialog-surface": "--surface-neutral-lowest",
|
|
2988
2989
|
"--dialog-border": "--border-neutral-strong",
|
|
2989
2990
|
"--dialog-border-width": "--border-width-2",
|
|
@@ -3127,8 +3128,7 @@
|
|
|
3127
3128
|
"--imagelightbox-tile-border": "--color-transparent",
|
|
3128
3129
|
"--imagelightbox-tile-border-width": "--border-width-0",
|
|
3129
3130
|
"--imagelightbox-tile-shadow": "--shadow-md",
|
|
3130
|
-
"--imagelightbox-scrim-
|
|
3131
|
-
"--imagelightbox-scrim-opacity": "1",
|
|
3131
|
+
"--imagelightbox-scrim-surface": "--scrim-high",
|
|
3132
3132
|
"--imagelightbox-chrome-surface": "--surface-neutral-low",
|
|
3133
3133
|
"--imagelightbox-chrome-border": "--border-brand",
|
|
3134
3134
|
"--imagelightbox-chrome-border-width": "--border-width-1",
|
|
@@ -3980,7 +3980,93 @@
|
|
|
3980
3980
|
"--slider-value-font-weight": "--font-weight-normal",
|
|
3981
3981
|
"--slider-value-line-height": "--line-height-normal"
|
|
3982
3982
|
}
|
|
3983
|
+
},
|
|
3984
|
+
"videolightbox": {
|
|
3985
|
+
"name": "spring-meadow",
|
|
3986
|
+
"component": "videolightbox",
|
|
3987
|
+
"createdAt": "2026-09-21T17:00:00.000Z",
|
|
3988
|
+
"updatedAt": "2026-09-21T17:00:00.000Z",
|
|
3989
|
+
"aliases": {
|
|
3990
|
+
"--videolightbox-tile-surface": "--color-transparent",
|
|
3991
|
+
"--videolightbox-tile-border": "--color-transparent",
|
|
3992
|
+
"--videolightbox-tile-border-width": "--border-width-0",
|
|
3993
|
+
"--videolightbox-tile-radius": "--radius-3xl",
|
|
3994
|
+
"--videolightbox-tile-shadow": "--shadow-md",
|
|
3995
|
+
"--videolightbox-scrim-surface": "--scrim-high",
|
|
3996
|
+
"--videolightbox-overlay-padding": "--space-64",
|
|
3997
|
+
"--videolightbox-overlay-duration": "--duration-500",
|
|
3998
|
+
"--videolightbox-overlay-easing": "--ease-out-quad",
|
|
3999
|
+
"--videolightbox-chrome-surface": "--surface-neutral-low",
|
|
4000
|
+
"--videolightbox-chrome-border": "--border-brand",
|
|
4001
|
+
"--videolightbox-chrome-border-width": "--border-width-1",
|
|
4002
|
+
"--videolightbox-chrome-radius": "--radius-full",
|
|
4003
|
+
"--videolightbox-chrome-icon": "--text-primary",
|
|
4004
|
+
"--videolightbox-chrome-hover-surface": "--surface-brand-high"
|
|
4005
|
+
}
|
|
4006
|
+
},
|
|
4007
|
+
"videoframe": {
|
|
4008
|
+
"name": "spring-meadow",
|
|
4009
|
+
"component": "videoframe",
|
|
4010
|
+
"createdAt": "2026-09-21T18:00:00.000Z",
|
|
4011
|
+
"updatedAt": "2026-09-21T18:00:00.000Z",
|
|
4012
|
+
"aliases": {
|
|
4013
|
+
"--videoframe-frame-surface": "--surface-neutral-lowest",
|
|
4014
|
+
"--videoframe-clip-surface": "--color-transparent",
|
|
4015
|
+
"--videoframe-frame-border": "--border-neutral",
|
|
4016
|
+
"--videoframe-frame-border-width": "--border-width-1",
|
|
4017
|
+
"--videoframe-frame-radius": "--radius-3xl",
|
|
4018
|
+
"--videoframe-badge-default-surface": "--surface-brand-lower",
|
|
4019
|
+
"--videoframe-badge-default-border": "--border-brand-medium",
|
|
4020
|
+
"--videoframe-badge-default-border-width": "--border-width-2",
|
|
4021
|
+
"--videoframe-badge-default-icon": "--text-primary",
|
|
4022
|
+
"--videoframe-badge-default-size": "--space-64",
|
|
4023
|
+
"--videoframe-badge-default-icon-size": "--icon-size-4xl",
|
|
4024
|
+
"--videoframe-badge-duration": "--duration-200",
|
|
4025
|
+
"--videoframe-badge-easing": "--ease-out-quad",
|
|
4026
|
+
"--videoframe-badge-hover-surface": "--surface-brand",
|
|
4027
|
+
"--videoframe-badge-hover-border": "--border-brand-strong",
|
|
4028
|
+
"--videoframe-badge-hover-icon": "--text-primary"
|
|
4029
|
+
}
|
|
4030
|
+
},
|
|
4031
|
+
"slidepager": {
|
|
4032
|
+
"name": "spring-meadow",
|
|
4033
|
+
"component": "slidepager",
|
|
4034
|
+
"createdAt": "2026-09-21T18:00:00.000Z",
|
|
4035
|
+
"updatedAt": "2026-09-21T18:00:00.000Z",
|
|
4036
|
+
"aliases": {
|
|
4037
|
+
"--slidepager-frame-surface": "--surface-neutral-lower",
|
|
4038
|
+
"--slidepager-frame-border": "--border-neutral-subtle",
|
|
4039
|
+
"--slidepager-frame-border-width": "--border-width-1",
|
|
4040
|
+
"--slidepager-frame-radius": "--radius-3xl",
|
|
4041
|
+
"--slidepager-frame-shadow": "--shadow-md",
|
|
4042
|
+
"--slidepager-bar-gap": "--space-16",
|
|
4043
|
+
"--slidepager-bar-padding": "--space-12",
|
|
4044
|
+
"--slidepager-control-surface": "--surface-neutral-low",
|
|
4045
|
+
"--slidepager-control-border": "--border-neutral",
|
|
4046
|
+
"--slidepager-control-border-width": "--border-width-1",
|
|
4047
|
+
"--slidepager-control-radius": "--radius-full",
|
|
4048
|
+
"--slidepager-control-size": "--space-40",
|
|
4049
|
+
"--slidepager-control-icon": "--text-primary",
|
|
4050
|
+
"--slidepager-control-icon-size": "--icon-size-md",
|
|
4051
|
+
"--slidepager-control-hover-surface": "--surface-brand-high",
|
|
4052
|
+
"--slidepager-control-hover-border": "--border-brand",
|
|
4053
|
+
"--slidepager-control-hover-icon": "--text-inverted",
|
|
4054
|
+
"--slidepager-control-disabled-surface": "--surface-neutral-lower",
|
|
4055
|
+
"--slidepager-control-disabled-border": "--border-neutral-subtle",
|
|
4056
|
+
"--slidepager-control-disabled-icon": "--text-disabled",
|
|
4057
|
+
"--slidepager-counter-text": "--text-secondary",
|
|
4058
|
+
"--slidepager-counter-font-family": "--font-sans",
|
|
4059
|
+
"--slidepager-counter-font-size": "--font-size-lg",
|
|
4060
|
+
"--slidepager-counter-font-weight": "--font-weight-medium",
|
|
4061
|
+
"--slidepager-counter-line-height": "--line-height-normal",
|
|
4062
|
+
"--slidepager-counter-letter-spacing": "--letter-spacing-normal",
|
|
4063
|
+
"--slidepager-scrim-surface": "--scrim-high",
|
|
4064
|
+
"--slidepager-overlay-padding": "--space-64",
|
|
4065
|
+
"--slidepager-close-margin": "--space-24",
|
|
4066
|
+
"--slidepager-overlay-duration": "--duration-300",
|
|
4067
|
+
"--slidepager-overlay-easing": "--ease-out-quad"
|
|
4068
|
+
}
|
|
3983
4069
|
}
|
|
3984
4070
|
},
|
|
3985
|
-
"componentSchemaVersion":
|
|
4071
|
+
"componentSchemaVersion": 38
|
|
3986
4072
|
}
|
|
@@ -2275,12 +2275,14 @@
|
|
|
2275
2275
|
"--columns-max-width": "1440px",
|
|
2276
2276
|
"--columns-gutter": "32px",
|
|
2277
2277
|
"--columns-margin": "0px",
|
|
2278
|
-
"--scrim-
|
|
2279
|
-
"--scrim": "
|
|
2280
|
-
"--scrim-
|
|
2281
|
-
"--
|
|
2282
|
-
"--tint": "
|
|
2283
|
-
"--tint-
|
|
2278
|
+
"--scrim-color": "var(--surface-neutral-lowest)",
|
|
2279
|
+
"--scrim-opacity-low": "0.7",
|
|
2280
|
+
"--scrim-opacity": "0.8",
|
|
2281
|
+
"--scrim-opacity-high": "0.9",
|
|
2282
|
+
"--tint-color": "var(--text-primary)",
|
|
2283
|
+
"--tint-opacity-low": "0.05",
|
|
2284
|
+
"--tint-opacity": "0.1",
|
|
2285
|
+
"--tint-opacity-high": "0.15",
|
|
2284
2286
|
"--shadow-sm": "1px 1px 2px hsla(237, 18%, 3%, 0.9)",
|
|
2285
2287
|
"--shadow-md": "3px 3px 6px hsla(237, 18%, 3%, 0.9)",
|
|
2286
2288
|
"--shadow-lg": "5px 5px 9px hsla(237, 18%, 3%, 0.9)",
|
|
@@ -2448,7 +2450,7 @@
|
|
|
2448
2450
|
"family": null
|
|
2449
2451
|
}
|
|
2450
2452
|
],
|
|
2451
|
-
"schemaVersion":
|
|
2453
|
+
"schemaVersion": 9,
|
|
2452
2454
|
"gradients": [
|
|
2453
2455
|
{
|
|
2454
2456
|
"variable": "--gradient-1",
|
|
@@ -3034,8 +3036,7 @@
|
|
|
3034
3036
|
"createdAt": "2026-05-10T20:05:24.719Z",
|
|
3035
3037
|
"updatedAt": "2026-08-19T22:39:32.785Z",
|
|
3036
3038
|
"aliases": {
|
|
3037
|
-
"--dialog-scrim-
|
|
3038
|
-
"--dialog-scrim-opacity": "--scrim-opacity-high",
|
|
3039
|
+
"--dialog-scrim-surface": "--scrim-high",
|
|
3039
3040
|
"--dialog-surface": "--surface-neutral-lowest",
|
|
3040
3041
|
"--dialog-border": "--border-neutral-strong",
|
|
3041
3042
|
"--dialog-border-width": "--border-width-2",
|
|
@@ -3179,8 +3180,7 @@
|
|
|
3179
3180
|
"--imagelightbox-tile-border": "--color-transparent",
|
|
3180
3181
|
"--imagelightbox-tile-border-width": "--border-width-0",
|
|
3181
3182
|
"--imagelightbox-tile-shadow": "--shadow-md",
|
|
3182
|
-
"--imagelightbox-scrim-
|
|
3183
|
-
"--imagelightbox-scrim-opacity": "1",
|
|
3183
|
+
"--imagelightbox-scrim-surface": "--scrim-high",
|
|
3184
3184
|
"--imagelightbox-chrome-surface": "--surface-neutral-low",
|
|
3185
3185
|
"--imagelightbox-chrome-border": "--border-brand",
|
|
3186
3186
|
"--imagelightbox-chrome-border-width": "--border-width-1",
|
|
@@ -4032,7 +4032,93 @@
|
|
|
4032
4032
|
"--slider-value-font-weight": "--font-weight-normal",
|
|
4033
4033
|
"--slider-value-line-height": "--line-height-normal"
|
|
4034
4034
|
}
|
|
4035
|
+
},
|
|
4036
|
+
"videolightbox": {
|
|
4037
|
+
"name": "sunset",
|
|
4038
|
+
"component": "videolightbox",
|
|
4039
|
+
"createdAt": "2026-09-21T17:00:00.000Z",
|
|
4040
|
+
"updatedAt": "2026-09-21T17:00:00.000Z",
|
|
4041
|
+
"aliases": {
|
|
4042
|
+
"--videolightbox-tile-surface": "--color-transparent",
|
|
4043
|
+
"--videolightbox-tile-border": "--color-transparent",
|
|
4044
|
+
"--videolightbox-tile-border-width": "--border-width-0",
|
|
4045
|
+
"--videolightbox-tile-radius": "--radius-3xl",
|
|
4046
|
+
"--videolightbox-tile-shadow": "--shadow-md",
|
|
4047
|
+
"--videolightbox-scrim-surface": "--scrim-high",
|
|
4048
|
+
"--videolightbox-overlay-padding": "--space-64",
|
|
4049
|
+
"--videolightbox-overlay-duration": "--duration-500",
|
|
4050
|
+
"--videolightbox-overlay-easing": "--ease-out-quad",
|
|
4051
|
+
"--videolightbox-chrome-surface": "--surface-neutral-low",
|
|
4052
|
+
"--videolightbox-chrome-border": "--border-brand",
|
|
4053
|
+
"--videolightbox-chrome-border-width": "--border-width-1",
|
|
4054
|
+
"--videolightbox-chrome-radius": "--radius-full",
|
|
4055
|
+
"--videolightbox-chrome-icon": "--text-primary",
|
|
4056
|
+
"--videolightbox-chrome-hover-surface": "--surface-brand-high"
|
|
4057
|
+
}
|
|
4058
|
+
},
|
|
4059
|
+
"videoframe": {
|
|
4060
|
+
"name": "sunset",
|
|
4061
|
+
"component": "videoframe",
|
|
4062
|
+
"createdAt": "2026-09-21T18:00:00.000Z",
|
|
4063
|
+
"updatedAt": "2026-09-21T18:00:00.000Z",
|
|
4064
|
+
"aliases": {
|
|
4065
|
+
"--videoframe-frame-surface": "--surface-neutral-lowest",
|
|
4066
|
+
"--videoframe-clip-surface": "--color-transparent",
|
|
4067
|
+
"--videoframe-frame-border": "--border-neutral",
|
|
4068
|
+
"--videoframe-frame-border-width": "--border-width-1",
|
|
4069
|
+
"--videoframe-frame-radius": "--radius-3xl",
|
|
4070
|
+
"--videoframe-badge-default-surface": "--surface-brand-lower",
|
|
4071
|
+
"--videoframe-badge-default-border": "--border-brand-medium",
|
|
4072
|
+
"--videoframe-badge-default-border-width": "--border-width-2",
|
|
4073
|
+
"--videoframe-badge-default-icon": "--text-primary",
|
|
4074
|
+
"--videoframe-badge-default-size": "--space-64",
|
|
4075
|
+
"--videoframe-badge-default-icon-size": "--icon-size-4xl",
|
|
4076
|
+
"--videoframe-badge-duration": "--duration-200",
|
|
4077
|
+
"--videoframe-badge-easing": "--ease-out-quad",
|
|
4078
|
+
"--videoframe-badge-hover-surface": "--surface-brand",
|
|
4079
|
+
"--videoframe-badge-hover-border": "--border-brand-strong",
|
|
4080
|
+
"--videoframe-badge-hover-icon": "--text-primary"
|
|
4081
|
+
}
|
|
4082
|
+
},
|
|
4083
|
+
"slidepager": {
|
|
4084
|
+
"name": "sunset",
|
|
4085
|
+
"component": "slidepager",
|
|
4086
|
+
"createdAt": "2026-09-21T18:00:00.000Z",
|
|
4087
|
+
"updatedAt": "2026-09-21T18:00:00.000Z",
|
|
4088
|
+
"aliases": {
|
|
4089
|
+
"--slidepager-frame-surface": "--surface-neutral-lower",
|
|
4090
|
+
"--slidepager-frame-border": "--border-neutral-subtle",
|
|
4091
|
+
"--slidepager-frame-border-width": "--border-width-1",
|
|
4092
|
+
"--slidepager-frame-radius": "--radius-3xl",
|
|
4093
|
+
"--slidepager-frame-shadow": "--shadow-md",
|
|
4094
|
+
"--slidepager-bar-gap": "--space-16",
|
|
4095
|
+
"--slidepager-bar-padding": "--space-12",
|
|
4096
|
+
"--slidepager-control-surface": "--surface-neutral-low",
|
|
4097
|
+
"--slidepager-control-border": "--border-neutral",
|
|
4098
|
+
"--slidepager-control-border-width": "--border-width-1",
|
|
4099
|
+
"--slidepager-control-radius": "--radius-full",
|
|
4100
|
+
"--slidepager-control-size": "--space-40",
|
|
4101
|
+
"--slidepager-control-icon": "--text-primary",
|
|
4102
|
+
"--slidepager-control-icon-size": "--icon-size-md",
|
|
4103
|
+
"--slidepager-control-hover-surface": "--surface-brand-high",
|
|
4104
|
+
"--slidepager-control-hover-border": "--border-brand",
|
|
4105
|
+
"--slidepager-control-hover-icon": "--text-inverted",
|
|
4106
|
+
"--slidepager-control-disabled-surface": "--surface-neutral-lower",
|
|
4107
|
+
"--slidepager-control-disabled-border": "--border-neutral-subtle",
|
|
4108
|
+
"--slidepager-control-disabled-icon": "--text-disabled",
|
|
4109
|
+
"--slidepager-counter-text": "--text-secondary",
|
|
4110
|
+
"--slidepager-counter-font-family": "--font-sans",
|
|
4111
|
+
"--slidepager-counter-font-size": "--font-size-lg",
|
|
4112
|
+
"--slidepager-counter-font-weight": "--font-weight-medium",
|
|
4113
|
+
"--slidepager-counter-line-height": "--line-height-normal",
|
|
4114
|
+
"--slidepager-counter-letter-spacing": "--letter-spacing-normal",
|
|
4115
|
+
"--slidepager-scrim-surface": "--scrim-high",
|
|
4116
|
+
"--slidepager-overlay-padding": "--space-64",
|
|
4117
|
+
"--slidepager-close-margin": "--space-24",
|
|
4118
|
+
"--slidepager-overlay-duration": "--duration-300",
|
|
4119
|
+
"--slidepager-overlay-easing": "--ease-out-quad"
|
|
4120
|
+
}
|
|
4035
4121
|
}
|
|
4036
4122
|
},
|
|
4037
|
-
"componentSchemaVersion":
|
|
4123
|
+
"componentSchemaVersion": 38
|
|
4038
4124
|
}
|
|
@@ -11,12 +11,14 @@
|
|
|
11
11
|
--columns-max-width: 1440px;
|
|
12
12
|
--columns-gutter: 32px;
|
|
13
13
|
--columns-margin: 0px;
|
|
14
|
-
--scrim-
|
|
15
|
-
--scrim
|
|
16
|
-
--scrim-
|
|
17
|
-
--
|
|
18
|
-
--tint:
|
|
19
|
-
--tint-
|
|
14
|
+
--scrim-color: var(--surface-neutral-lowest);
|
|
15
|
+
--scrim-opacity-low: 0.7;
|
|
16
|
+
--scrim-opacity: 0.8;
|
|
17
|
+
--scrim-opacity-high: 0.9;
|
|
18
|
+
--tint-color: var(--text-primary);
|
|
19
|
+
--tint-opacity-low: 0.05;
|
|
20
|
+
--tint-opacity: 0.1;
|
|
21
|
+
--tint-opacity-high: 0.15;
|
|
20
22
|
--shadow-sm: 1px 1px 2px hsla(237, 18%, 3%, 0.9);
|
|
21
23
|
--shadow-md: 3px 3px 6px hsla(237, 18%, 3%, 0.9);
|
|
22
24
|
--shadow-lg: 5px 5px 9px hsla(237, 18%, 3%, 0.9);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -180,8 +180,7 @@
|
|
|
180
180
|
<style>
|
|
181
181
|
:global(:root) {
|
|
182
182
|
/* Scrim */
|
|
183
|
-
--dialog-scrim-
|
|
184
|
-
--dialog-scrim-opacity: var(--scrim-opacity-high);
|
|
183
|
+
--dialog-scrim-surface: var(--scrim-high);
|
|
185
184
|
|
|
186
185
|
/* Dialog frame */
|
|
187
186
|
--dialog-surface: var(--surface-neutral-lowest);
|
|
@@ -228,11 +227,7 @@
|
|
|
228
227
|
left: 0;
|
|
229
228
|
width: 100%;
|
|
230
229
|
height: 100%;
|
|
231
|
-
background:
|
|
232
|
-
in srgb,
|
|
233
|
-
var(--dialog-scrim-color) calc(var(--dialog-scrim-opacity) * 100%),
|
|
234
|
-
transparent
|
|
235
|
-
);
|
|
230
|
+
background: var(--dialog-scrim-surface);
|
|
236
231
|
display: flex;
|
|
237
232
|
justify-content: center;
|
|
238
233
|
align-items: center;
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
whenToUse: 'a screenshot, artwork, or chart whose detail is the point, and for a gallery of them.',
|
|
7
7
|
whenNotToUse: [
|
|
8
8
|
{ when: 'the reader takes the picture in at a glance, with no detail to open.', use: 'image' },
|
|
9
|
+
{ when: 'a video clip the reader opens from its still.', use: 'videolightbox' },
|
|
10
|
+
{ when: 'slides or pages the reader reads in order.', use: 'slidepager' },
|
|
9
11
|
],
|
|
10
12
|
} satisfies CatalogueEntry;
|
|
11
13
|
</script>
|
|
@@ -57,16 +59,12 @@
|
|
|
57
59
|
/** The width of that line, as any CSS length. Overrides
|
|
58
60
|
`--imagelightbox-tile-border-width`. */
|
|
59
61
|
borderWidth?: string | undefined;
|
|
60
|
-
/** The scrim
|
|
61
|
-
`--imagelightbox-scrim-
|
|
62
|
-
|
|
63
|
-
say so here. */
|
|
62
|
+
/** The scrim behind the open image, for this instance, as any CSS fill,
|
|
63
|
+
such as `var(--scrim-low)`. Overrides `--imagelightbox-scrim-surface`.
|
|
64
|
+
The modal portals to <body>, out of reach of a wrapper around the tile,
|
|
65
|
+
so a page that wants its own scrim has to say so here. */
|
|
64
66
|
scrim?: string | undefined;
|
|
65
|
-
/**
|
|
66
|
-
`--imagelightbox-scrim-opacity`, and stands on its own: the colour it
|
|
67
|
-
mixes with is whatever the theme holds. */
|
|
68
|
-
scrimOpacity?: number | undefined;
|
|
69
|
-
/** 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. */
|
|
67
|
+
/** When true, shows a bottom toolbar (zoom in/out + percent) and enables wheel/drag zoom inside the open modal. Either way, a click on the unzoomed image closes. */
|
|
70
68
|
extended?: boolean;
|
|
71
69
|
/** Maximum zoom, as a multiple of the image's natural resolution: `1` = 100%
|
|
72
70
|
of the source's real pixels (1 source px = 1 screen px), `2` = 200%. The
|
|
@@ -102,7 +100,6 @@
|
|
|
102
100
|
border = undefined,
|
|
103
101
|
borderWidth = undefined,
|
|
104
102
|
scrim = undefined,
|
|
105
|
-
scrimOpacity = undefined,
|
|
106
103
|
extended = false,
|
|
107
104
|
maxZoom = undefined,
|
|
108
105
|
capNatural = false,
|
|
@@ -319,8 +316,7 @@
|
|
|
319
316
|
});
|
|
320
317
|
}
|
|
321
318
|
|
|
322
|
-
// Move focus into the modal so keyboard users land inside the dialog
|
|
323
|
-
// stage (tabindex -1) is the fallback when there is no chrome to focus.
|
|
319
|
+
// Move focus into the modal so keyboard users land inside the dialog.
|
|
324
320
|
(closeBtnEl ?? stageEl)?.focus();
|
|
325
321
|
}
|
|
326
322
|
|
|
@@ -328,7 +324,7 @@
|
|
|
328
324
|
// the zoom toolbar keeps its bespoke slide so it's handled separately.
|
|
329
325
|
function chromeFadeEls(): HTMLElement[] {
|
|
330
326
|
const els: (HTMLElement | undefined)[] = [];
|
|
331
|
-
|
|
327
|
+
els.push(closeBtnEl);
|
|
332
328
|
if (isGallery) els.push(prevBtnEl, nextBtnEl, counterEl);
|
|
333
329
|
return els.filter((el): el is HTMLElement => !!el);
|
|
334
330
|
}
|
|
@@ -554,11 +550,11 @@
|
|
|
554
550
|
didDrag = false;
|
|
555
551
|
return;
|
|
556
552
|
}
|
|
557
|
-
if (!
|
|
553
|
+
if (!isGallery && scale <= MIN_SCALE) closeLightbox();
|
|
558
554
|
}
|
|
559
555
|
|
|
560
556
|
// Keep Tab inside the open dialog. The stage (tabindex -1) is excluded, so an
|
|
561
|
-
// image-only lightbox
|
|
557
|
+
// image-only lightbox holds focus on its close button.
|
|
562
558
|
function trapTab(e: KeyboardEvent) {
|
|
563
559
|
if (!modalEl) return;
|
|
564
560
|
const f = [
|
|
@@ -658,8 +654,7 @@
|
|
|
658
654
|
<div
|
|
659
655
|
bind:this={overlayEl}
|
|
660
656
|
class="image-lightbox-overlay"
|
|
661
|
-
style:--imagelightbox-scrim-
|
|
662
|
-
style:--imagelightbox-scrim-opacity={scrimOpacity}
|
|
657
|
+
style:--imagelightbox-scrim-surface={scrim}
|
|
663
658
|
class:active={open}
|
|
664
659
|
aria-hidden="true"
|
|
665
660
|
onclick={closeLightbox}
|
|
@@ -694,21 +689,19 @@
|
|
|
694
689
|
</div>
|
|
695
690
|
</div>
|
|
696
691
|
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
>
|
|
706
|
-
<
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
</button>
|
|
711
|
-
{/if}
|
|
692
|
+
<button
|
|
693
|
+
bind:this={closeBtnEl}
|
|
694
|
+
class="image-lightbox-chrome image-lightbox-close"
|
|
695
|
+
class:active={open}
|
|
696
|
+
type="button"
|
|
697
|
+
aria-label="Close"
|
|
698
|
+
onclick={closeLightbox}
|
|
699
|
+
>
|
|
700
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
701
|
+
<path d="M18 6L6 18" />
|
|
702
|
+
<path d="M6 6l12 12" />
|
|
703
|
+
</svg>
|
|
704
|
+
</button>
|
|
712
705
|
|
|
713
706
|
{#if isGallery}
|
|
714
707
|
<button
|
|
@@ -783,8 +776,7 @@
|
|
|
783
776
|
--imagelightbox-tile-object-fit: contain;
|
|
784
777
|
|
|
785
778
|
/* overlay */
|
|
786
|
-
--imagelightbox-scrim-
|
|
787
|
-
--imagelightbox-scrim-opacity: var(--scrim-opacity-high);
|
|
779
|
+
--imagelightbox-scrim-surface: var(--scrim-high);
|
|
788
780
|
|
|
789
781
|
/* chrome (toolbar + close button) */
|
|
790
782
|
--imagelightbox-chrome-surface: var(--surface-neutral-low);
|
|
@@ -910,11 +902,7 @@
|
|
|
910
902
|
.image-lightbox-overlay {
|
|
911
903
|
position: fixed;
|
|
912
904
|
inset: 0;
|
|
913
|
-
background:
|
|
914
|
-
in srgb,
|
|
915
|
-
var(--imagelightbox-scrim-color) calc(var(--imagelightbox-scrim-opacity) * 100%),
|
|
916
|
-
transparent
|
|
917
|
-
);
|
|
905
|
+
background: var(--imagelightbox-scrim-surface);
|
|
918
906
|
backdrop-filter: blur(var(--blur-md));
|
|
919
907
|
z-index: var(--z-overlay);
|
|
920
908
|
opacity: 0;
|