@zyncat/ui 0.15.0 → 0.18.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/README.md +32 -202
- package/dist/alert.css +1 -1
- package/dist/alert.js +18 -10
- package/dist/alert.js.map +1 -1
- package/dist/avatar.css +3 -2
- package/dist/badge.css +1 -1
- package/dist/bloom-HV23M4AW.js +81 -0
- package/dist/bloom-HV23M4AW.js.map +1 -0
- package/dist/button.css +38 -31
- package/dist/button.js +4 -1
- package/dist/checkbox.css +1 -1
- package/dist/{chunk-5W5TKANX.js → chunk-2DNKZ57E.js} +3 -3
- package/dist/{chunk-5W5TKANX.js.map → chunk-2DNKZ57E.js.map} +1 -1
- package/dist/chunk-2YGHPQ66.js +16 -0
- package/dist/chunk-2YGHPQ66.js.map +1 -0
- package/dist/{chunk-N2GJEO5Z.js → chunk-6H3IJ752.js} +24 -9
- package/dist/chunk-6H3IJ752.js.map +1 -0
- package/dist/chunk-7NHY2CRA.js +132 -0
- package/dist/chunk-7NHY2CRA.js.map +1 -0
- package/dist/{chunk-PWQVSVXR.js → chunk-AIAPXRCI.js} +20 -19
- package/dist/chunk-AIAPXRCI.js.map +1 -0
- package/dist/{chunk-K45CWVHS.js → chunk-BRKGYLEQ.js} +12 -9
- package/dist/chunk-BRKGYLEQ.js.map +1 -0
- package/dist/{chunk-MDSRZ4QR.js → chunk-C3D32LE3.js} +6 -5
- package/dist/chunk-C3D32LE3.js.map +1 -0
- package/dist/chunk-F2TB3TT6.js +103 -0
- package/dist/chunk-F2TB3TT6.js.map +1 -0
- package/dist/{chunk-FVPNICF4.js → chunk-F64Z42PJ.js} +6 -6
- package/dist/{chunk-FVPNICF4.js.map → chunk-F64Z42PJ.js.map} +1 -1
- package/dist/{chunk-QGVFFT2B.js → chunk-HBWRKEW4.js} +3 -3
- package/dist/{chunk-QGVFFT2B.js.map → chunk-HBWRKEW4.js.map} +1 -1
- package/dist/{chunk-CAXQJSIE.js → chunk-JINATP4N.js} +13 -13
- package/dist/chunk-JINATP4N.js.map +1 -0
- package/dist/chunk-KSAJ6DED.js +16 -0
- package/dist/chunk-KSAJ6DED.js.map +1 -0
- package/dist/{chunk-BH4JFWXQ.js → chunk-M2KGLH2G.js} +19 -16
- package/dist/chunk-M2KGLH2G.js.map +1 -0
- package/dist/{chunk-6X3G4GIM.js → chunk-N43NDSME.js} +3 -3
- package/dist/{chunk-6X3G4GIM.js.map → chunk-N43NDSME.js.map} +1 -1
- package/dist/chunk-NYQQH4R5.js +40 -0
- package/dist/chunk-NYQQH4R5.js.map +1 -0
- package/dist/{chunk-BTF6DAE3.js → chunk-ODRO3KS6.js} +4 -4
- package/dist/{chunk-BTF6DAE3.js.map → chunk-ODRO3KS6.js.map} +1 -1
- package/dist/chunk-PXQBJMPJ.js +50 -0
- package/dist/chunk-PXQBJMPJ.js.map +1 -0
- package/dist/{chunk-GJTHWB6O.js → chunk-QDAN43B6.js} +3 -3
- package/dist/{chunk-GJTHWB6O.js.map → chunk-QDAN43B6.js.map} +1 -1
- package/dist/{chunk-RBSHRRNO.js → chunk-RJENXXTI.js} +5 -5
- package/dist/{chunk-RBSHRRNO.js.map → chunk-RJENXXTI.js.map} +1 -1
- package/dist/chunk-RLNCRDAL.js +89 -0
- package/dist/chunk-RLNCRDAL.js.map +1 -0
- package/dist/{chunk-GOLSYGRA.js → chunk-TBLPZQSI.js} +84 -48
- package/dist/chunk-TBLPZQSI.js.map +1 -0
- package/dist/{chunk-WZUTBJC4.js → chunk-TDHLZY6I.js} +23 -5
- package/dist/chunk-TDHLZY6I.js.map +1 -0
- package/dist/chunk-TP2AC5MQ.js +13 -0
- package/dist/chunk-TP2AC5MQ.js.map +1 -0
- package/dist/chunk-TRPAKUIB.js +196 -0
- package/dist/chunk-TRPAKUIB.js.map +1 -0
- package/dist/{chunk-5X3MJRIM.js → chunk-UKPX3RIP.js} +3 -3
- package/dist/{chunk-5X3MJRIM.js.map → chunk-UKPX3RIP.js.map} +1 -1
- package/dist/{chunk-5GBV45YD.js → chunk-V6QAAOA5.js} +3 -3
- package/dist/{chunk-5GBV45YD.js.map → chunk-V6QAAOA5.js.map} +1 -1
- package/dist/{chunk-FLQVOSFC.js → chunk-VJXP256V.js} +10 -10
- package/dist/chunk-VJXP256V.js.map +1 -0
- package/dist/{chunk-IUQAUBVM.js → chunk-VQFILXQN.js} +5 -5
- package/dist/chunk-VQFILXQN.js.map +1 -0
- package/dist/{chunk-CFRGQJ23.js → chunk-VZXML7EH.js} +4 -4
- package/dist/{chunk-CFRGQJ23.js.map → chunk-VZXML7EH.js.map} +1 -1
- package/dist/{chunk-FEXUS4SV.js → chunk-XKDR22VE.js} +11 -5
- package/dist/chunk-XKDR22VE.js.map +1 -0
- package/dist/cli.js +262 -45
- package/dist/collapse.css +8 -5
- package/dist/confetti.css +3 -3
- package/dist/confetti.js +2 -2
- package/dist/date-field.js +20 -18
- package/dist/date-field.js.map +1 -1
- package/dist/date-picker.css +168 -43
- package/dist/date-range-field.js +42 -27
- package/dist/date-range-field.js.map +1 -1
- package/dist/datetime-field.js +21 -19
- package/dist/datetime-field.js.map +1 -1
- package/dist/dialog.css +4 -3
- package/dist/dialog.js +12 -12
- package/dist/dialog.js.map +1 -1
- package/dist/digit-strip.css +1 -1
- package/dist/dropdown.css +1 -1
- package/dist/dropdown.js +16 -16
- package/dist/dropdown.js.map +1 -1
- package/dist/emoji-picker.js +41 -26
- package/dist/emoji-picker.js.map +1 -1
- package/dist/facebook-feed.css +1 -1
- package/dist/flow-field.css +4 -4
- package/dist/flow-field.js +3 -3
- package/dist/flow-field.js.map +1 -1
- package/dist/glide.js +3 -3
- package/dist/icon.css +1 -1
- package/dist/input.css +7 -4
- package/dist/instagram-feed.css +1 -1
- package/dist/instagram-feed.js +2 -2
- package/dist/lens.css +1 -2
- package/dist/lens.js +2 -2
- package/dist/mcp.js +1 -1
- package/dist/menu-surface.css +1 -1
- package/dist/modal.css +1 -1
- package/dist/modal.js +10 -10
- package/dist/modal.js.map +1 -1
- package/dist/morphing-text.css +2 -2
- package/dist/morphing-text.js +2 -2
- package/dist/motion-devtools.css +77 -2
- package/dist/motion-devtools.js +194 -37
- package/dist/motion-devtools.js.map +1 -1
- package/dist/motion-tokens.js +1 -1
- package/dist/multi-select.js +12 -12
- package/dist/number-field.js +3 -3
- package/dist/odometer.css +1 -1
- package/dist/odometer.js +2 -2
- package/dist/overlay.css +1 -1
- package/dist/pagination.css +1 -1
- package/dist/pagination.js +6 -4
- package/dist/pagination.js.map +1 -1
- package/dist/paint-CJQCM6ZO.js +260 -0
- package/dist/paint-CJQCM6ZO.js.map +1 -0
- package/dist/popover.css +1 -1
- package/dist/popover.js +10 -10
- package/dist/radio-group.css +6 -4
- package/dist/radio-group.js +6 -6
- package/dist/select.css +1 -1
- package/dist/select.js +12 -12
- package/dist/sheet.css +1 -1
- package/dist/sheet.js +9 -9
- package/dist/spinner.css +115 -0
- package/dist/spinner.js +4 -0
- package/dist/spinner.js.map +1 -0
- package/dist/status-badge.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/support-rail.css +76 -238
- package/dist/support-rail.js +99 -107
- package/dist/support-rail.js.map +1 -1
- package/dist/table.css +2 -2
- package/dist/table.js +8 -6
- package/dist/table.js.map +1 -1
- package/dist/tabs.css +10 -14
- package/dist/tabs.js +17 -11
- package/dist/tabs.js.map +1 -1
- package/dist/tag.css +1 -1
- package/dist/tag.js +6 -6
- package/dist/text-field.js +3 -3
- package/dist/textarea.css +1 -1
- package/dist/textarea.js +2 -2
- package/dist/theme-grid.js +11 -0
- package/dist/theme-grid.js.map +1 -0
- package/dist/theme-switcher.css +107 -0
- package/dist/theme-switcher.js +70 -0
- package/dist/theme-switcher.js.map +1 -0
- package/dist/theme-transition-VGLPZDJI.js +346 -0
- package/dist/theme-transition-VGLPZDJI.js.map +1 -0
- package/dist/theme-transition.css +48 -0
- package/dist/theme.js +57 -26
- package/dist/theme.js.map +1 -1
- package/dist/tide-DJZMDAFT.js +57 -0
- package/dist/tide-DJZMDAFT.js.map +1 -0
- package/dist/tiktok.css +2 -3
- package/dist/tiktok.js +2 -2
- package/dist/time-field.js +4 -4
- package/dist/toast.css +2 -14
- package/dist/toast.js +12 -10
- package/dist/toast.js.map +1 -1
- package/dist/toggle-tag.js +2 -2
- package/dist/toggle.css +1 -1
- package/dist/tooltip.css +1 -1
- package/dist/tooltip.js +25 -22
- package/dist/tooltip.js.map +1 -1
- package/dist/trigger.css +1 -1
- package/dist/types/components/composites/date-picker/month-jump.d.ts +11 -0
- package/dist/types/components/composites/theme-switcher/ThemeGrid.d.ts +20 -0
- package/dist/types/components/composites/theme-switcher/ThemeSwitcher.d.ts +24 -0
- package/dist/types/components/compound/support-rail/SupportRail.d.ts +10 -8
- package/dist/types/components/dev/MotionDevtools.d.ts +10 -5
- package/dist/types/components/expressive/theme-transition/bloom.d.ts +2 -0
- package/dist/types/components/expressive/theme-transition/paint.d.ts +2 -0
- package/dist/types/components/expressive/theme-transition/scene.d.ts +24 -0
- package/dist/types/components/expressive/theme-transition/theme-transition.d.ts +19 -0
- package/dist/types/components/expressive/theme-transition/tide.d.ts +2 -0
- package/dist/types/components/internal/hooks/use-press-feedback.d.ts +7 -0
- package/dist/types/components/internal/icon/Icon.d.ts +1 -0
- package/dist/types/components/internal/overlay/layer.d.ts +7 -1
- package/dist/types/components/internal/utils/token-px.d.ts +1 -1
- package/dist/types/components/primitives/button/Button.d.ts +9 -12
- package/dist/types/components/primitives/button/button-style.d.ts +15 -0
- package/dist/types/components/primitives/spinner/Spinner.d.ts +27 -0
- package/dist/types/engine/animate.d.ts +1 -0
- package/dist/types/motion/motion-timing.d.ts +1 -1
- package/dist/types/tokens/component-styles.generated.d.ts +35 -38
- package/dist/types/tokens/motion-tokens.d.ts +5 -3
- package/dist/types/tokens/theme-store.d.ts +47 -0
- package/dist/types/tokens/theme-sync.d.ts +7 -1
- package/dist/types/tokens/theme-tokens.generated.d.ts +125 -115
- package/dist/types/tokens/theme.d.ts +28 -5
- package/dist/typing-lines.css +1 -1
- package/dist/typing-lines.js +2 -2
- package/dist/typing-lines.js.map +1 -1
- package/dist/weight-field.css +2 -2
- package/dist/youtube.css +1 -1
- package/dist/youtube.js +2 -2
- package/package.json +20 -24
- package/skills/zyncat-ui/SKILL.md +1 -1
- package/skills/zyncat-ui/references/components.md +5 -2
- package/skills/zyncat-ui/references/theming.md +31 -23
- package/src/components/composites/alert/Alert.tsx +7 -3
- package/src/components/composites/alert/alert.css +1 -1
- package/src/components/composites/date-picker/calendar-panel.tsx +10 -4
- package/src/components/composites/date-picker/date-picker.css +168 -43
- package/src/components/composites/date-picker/month-jump.tsx +192 -0
- package/src/components/composites/date-picker/range-panel.tsx +20 -5
- package/src/components/composites/dialog/Dialog.tsx +2 -2
- package/src/components/composites/dialog/dialog.css +4 -3
- package/src/components/composites/dropdown/Dropdown.tsx +5 -5
- package/src/components/composites/dropdown/dropdown.css +1 -1
- package/src/components/composites/emoji-picker/react/category-bar.tsx +17 -5
- package/src/components/composites/emoji-picker/scaffold.ts +6 -5
- package/src/components/composites/emoji-picker/styles.css +1 -1
- package/src/components/composites/modal/Modal.tsx +2 -2
- package/src/components/composites/modal/modal.css +1 -1
- package/src/components/composites/pagination/pagination.css +1 -1
- package/src/components/composites/popover/Popover.tsx +5 -5
- package/src/components/composites/popover/popover.css +1 -1
- package/src/components/composites/select/core/menu.tsx +15 -10
- package/src/components/composites/select/select.css +1 -1
- package/src/components/composites/sheet/Sheet.tsx +2 -2
- package/src/components/composites/sheet/sheet.css +1 -1
- package/src/components/composites/table/table.css +2 -2
- package/src/components/composites/tabs/Tabs.tsx +13 -7
- package/src/components/composites/tabs/tabs.css +10 -14
- package/src/components/composites/theme-switcher/ThemeGrid.tsx +133 -0
- package/src/components/composites/theme-switcher/ThemeGrid.usage.md +20 -0
- package/src/components/composites/theme-switcher/ThemeSwitcher.tsx +75 -0
- package/src/components/composites/theme-switcher/ThemeSwitcher.usage.md +21 -0
- package/src/components/composites/theme-switcher/theme-switcher.css +107 -0
- package/src/components/composites/toast/Toast.tsx +2 -1
- package/src/components/composites/toast/toast.css +2 -14
- package/src/components/composites/tooltip/tooltip-host.tsx +19 -17
- package/src/components/composites/tooltip/tooltip.css +1 -1
- package/src/components/compound/support-rail/SupportRail.tsx +116 -128
- package/src/components/compound/support-rail/SupportRail.usage.md +7 -6
- package/src/components/compound/support-rail/support-rail.css +76 -238
- package/src/components/dev/MotionDevtools.tsx +252 -42
- package/src/components/dev/MotionDevtools.usage.md +12 -4
- package/src/components/dev/motion-devtools.css +77 -2
- package/src/components/dev/slowmo-engine.ts +1 -1
- package/src/components/expressive/confetti/confetti.css +3 -3
- package/src/components/expressive/facebook-feed/facebook-feed.css +1 -1
- package/src/components/expressive/flow-field/FlowField.tsx +1 -1
- package/src/components/expressive/flow-field/flow-field.css +4 -4
- package/src/components/expressive/instagram-feed/instagram-feed.css +1 -1
- package/src/components/expressive/lens/lens.css +1 -2
- package/src/components/expressive/morphing-text/morphing-text.css +2 -2
- package/src/components/expressive/odometer/odometer.css +1 -1
- package/src/components/expressive/theme-transition/bloom.ts +88 -0
- package/src/components/expressive/theme-transition/paint.ts +296 -0
- package/src/components/expressive/theme-transition/scene.ts +38 -0
- package/src/components/expressive/theme-transition/theme-transition.css +48 -0
- package/src/components/expressive/theme-transition/theme-transition.ts +423 -0
- package/src/components/expressive/theme-transition/tide.ts +65 -0
- package/src/components/expressive/tiktok/tiktok.css +2 -3
- package/src/components/expressive/typing-lines/TypingLines.tsx +0 -0
- package/src/components/expressive/typing-lines/typing-lines.css +1 -1
- package/src/components/expressive/weight-field/weight-field.css +2 -2
- package/src/components/expressive/youtube/youtube.css +1 -1
- package/src/components/internal/glass/glass.css +1 -1
- package/src/components/internal/hooks/use-press-feedback.ts +52 -0
- package/src/components/internal/icon/Icon.tsx +2 -0
- package/src/components/internal/icon/icon.css +1 -1
- package/src/components/internal/menu/menu-surface.css +1 -1
- package/src/components/internal/overlay/layer.tsx +35 -2
- package/src/components/internal/overlay/overlay.css +1 -1
- package/src/components/internal/overlay/position.ts +2 -2
- package/src/components/internal/overlay/trigger.css +1 -1
- package/src/components/internal/utils/token-px.ts +4 -4
- package/src/components/primitives/avatar/avatar.css +3 -2
- package/src/components/primitives/badge/badge.css +1 -1
- package/src/components/primitives/badge/digit-strip.css +1 -1
- package/src/components/primitives/button/Button.tsx +28 -27
- package/src/components/primitives/button/button-style.ts +28 -0
- package/src/components/primitives/button/button.css +38 -31
- package/src/components/primitives/checkbox/checkbox.css +1 -1
- package/src/components/primitives/collapse/collapse.css +8 -5
- package/src/components/primitives/input/input.css +7 -4
- package/src/components/primitives/radio-group/radio-group.css +6 -4
- package/src/components/primitives/spinner/Spinner.tsx +70 -0
- package/src/components/primitives/spinner/Spinner.usage.md +19 -0
- package/src/components/primitives/spinner/spinner.css +115 -0
- package/src/components/primitives/tag/tag.css +1 -1
- package/src/components/primitives/textarea/textarea.css +1 -1
- package/src/components/primitives/toggle/toggle.css +1 -1
- package/src/engine/animate.ts +10 -2
- package/src/mcp/server.ts +2 -1
- package/src/motion/glide.tsx +9 -6
- package/src/motion/motion-timing.ts +5 -2
- package/src/styles.css +3 -4
- package/src/tokens/base.css +5 -5
- package/src/tokens/color.css +8 -9
- package/src/tokens/component-styles.generated.ts +36 -38
- package/src/tokens/dark.css +8 -13
- package/src/tokens/decisions.css +9 -12
- package/src/tokens/elevation.css +18 -26
- package/src/tokens/glass.css +3 -2
- package/src/tokens/motion-defaults.generated.ts +1 -1
- package/src/tokens/motion-tokens.ts +27 -8
- package/src/tokens/motion.css +9 -9
- package/src/tokens/radius.css +3 -2
- package/src/tokens/reset.css +36 -0
- package/src/tokens/semantic.css +12 -22
- package/src/tokens/spacing.css +1 -1
- package/src/tokens/theme-store.ts +187 -0
- package/src/tokens/theme-sync.tsx +49 -2
- package/src/tokens/theme-tokens.generated.ts +128 -116
- package/src/tokens/theme.tsx +96 -24
- package/src/tokens/theme.usage.md +25 -24
- package/src/tokens/typography.css +4 -3
- package/tailwind.css +8 -14
- package/dist/chunk-6SUHSSOK.js +0 -25
- package/dist/chunk-6SUHSSOK.js.map +0 -1
- package/dist/chunk-BH4JFWXQ.js.map +0 -1
- package/dist/chunk-CAXQJSIE.js.map +0 -1
- package/dist/chunk-FEXUS4SV.js.map +0 -1
- package/dist/chunk-FLQVOSFC.js.map +0 -1
- package/dist/chunk-GOLSYGRA.js.map +0 -1
- package/dist/chunk-IUQAUBVM.js.map +0 -1
- package/dist/chunk-K45CWVHS.js.map +0 -1
- package/dist/chunk-MDSRZ4QR.js.map +0 -1
- package/dist/chunk-N2GJEO5Z.js.map +0 -1
- package/dist/chunk-PWQVSVXR.js.map +0 -1
- package/dist/chunk-UE63OOVG.js +0 -13
- package/dist/chunk-UE63OOVG.js.map +0 -1
- package/dist/chunk-UYSXJ7MH.js +0 -52
- package/dist/chunk-UYSXJ7MH.js.map +0 -1
- package/dist/chunk-WZUTBJC4.js.map +0 -1
- package/src/tokens/fonts.css +0 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { clamp, easeInOut, easeOut, sample, SAMPLE_MS, TAU, type BloomShape, type EffectFactory } from './scene';
|
|
2
|
+
|
|
3
|
+
const DURATION = { polarity: 1400, palette: 620 };
|
|
4
|
+
const MAX_RELIEF = 2;
|
|
5
|
+
const DEEPEST_CUT = 0.7;
|
|
6
|
+
const COVER_MARGIN = 1.02;
|
|
7
|
+
const SPIN = 0.35;
|
|
8
|
+
const HEX_SIDES = 6;
|
|
9
|
+
const STAR_LOBES = 8;
|
|
10
|
+
const STAR_CUT = 0.38;
|
|
11
|
+
const PETAL_LOBES = 5;
|
|
12
|
+
const PETAL_CUT = 0.26;
|
|
13
|
+
const CURVE_VERTICES = 120;
|
|
14
|
+
const BLOB_WAVES: readonly [lobes: number, depth: number, phase: number, drift: number][] = [
|
|
15
|
+
[2, 0.09, 0.6, 1.1],
|
|
16
|
+
[3, 0.07, 2.4, -0.8],
|
|
17
|
+
[5, 0.045, 4.1, 1.7],
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
interface Outline {
|
|
21
|
+
vertices: number;
|
|
22
|
+
innermost: number;
|
|
23
|
+
radial(theta: number, progress: number): number;
|
|
24
|
+
turn(progress: number): number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const lobed = (lobes: number, cut: number, vertices: number, spin: number): Outline => ({
|
|
28
|
+
vertices,
|
|
29
|
+
innermost: 1 - cut,
|
|
30
|
+
radial: (theta) => 1 - (cut * (1 - Math.cos(lobes * theta))) / 2,
|
|
31
|
+
turn: (progress) => spin * progress,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const OUTLINES: Record<Exclude<BloomShape, 'circle'>, (relief: number) => Outline> = {
|
|
35
|
+
hexagon: (relief) => ({
|
|
36
|
+
vertices: HEX_SIDES,
|
|
37
|
+
innermost: Math.cos(Math.PI / HEX_SIDES),
|
|
38
|
+
radial: () => 1,
|
|
39
|
+
turn: (progress) => Math.PI / HEX_SIDES + SPIN * relief * progress,
|
|
40
|
+
}),
|
|
41
|
+
star: (relief) => lobed(STAR_LOBES, clamp(STAR_CUT * relief, 0, DEEPEST_CUT), STAR_LOBES * 2, SPIN * relief),
|
|
42
|
+
petal: (relief) => lobed(PETAL_LOBES, clamp(PETAL_CUT * relief, 0, DEEPEST_CUT), CURVE_VERTICES, SPIN * relief),
|
|
43
|
+
blob: (relief) => {
|
|
44
|
+
const swell = Math.min(relief, DEEPEST_CUT / BLOB_WAVES.reduce((sum, [, depth]) => sum + depth, 0));
|
|
45
|
+
return {
|
|
46
|
+
vertices: CURVE_VERTICES,
|
|
47
|
+
innermost: 1 - BLOB_WAVES.reduce((sum, [, depth]) => sum + depth * swell, 0),
|
|
48
|
+
radial: (theta, progress) =>
|
|
49
|
+
BLOB_WAVES.reduce(
|
|
50
|
+
(r, [lobes, depth, phase, drift]) => r + depth * swell * Math.sin(lobes * theta + phase + drift * progress),
|
|
51
|
+
1,
|
|
52
|
+
),
|
|
53
|
+
turn: () => 0,
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const polygonAt = (outline: Outline, reach: number, progress: number, ox: number, oy: number) => {
|
|
59
|
+
const turn = outline.turn(progress);
|
|
60
|
+
const points: string[] = [];
|
|
61
|
+
for (let i = 0; i < outline.vertices; i++) {
|
|
62
|
+
const theta = (i / outline.vertices) * TAU;
|
|
63
|
+
const r = reach * outline.radial(theta, progress);
|
|
64
|
+
const a = theta + turn;
|
|
65
|
+
points.push(`${(ox + Math.cos(a) * r).toFixed(1)}px ${(oy + Math.sin(a) * r).toFixed(1)}px`);
|
|
66
|
+
}
|
|
67
|
+
return `polygon(${points.join(', ')})`;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const bloom: EffectFactory = (scene) => {
|
|
71
|
+
const { width: W, height: H, originX: ox, originY: oy, kind, shape } = scene;
|
|
72
|
+
const relief = clamp(scene.intensity, 0, MAX_RELIEF);
|
|
73
|
+
const farthest = Math.max(
|
|
74
|
+
Math.hypot(ox, oy),
|
|
75
|
+
Math.hypot(W - ox, oy),
|
|
76
|
+
Math.hypot(ox, H - oy),
|
|
77
|
+
Math.hypot(W - ox, H - oy),
|
|
78
|
+
);
|
|
79
|
+
const ease = kind === 'polarity' ? easeInOut : easeOut;
|
|
80
|
+
const outline = shape === 'circle' ? null : OUTLINES[shape](relief);
|
|
81
|
+
const reach = (farthest * COVER_MARGIN) / (outline?.innermost ?? 1);
|
|
82
|
+
const at = ` at ${ox.toFixed(1)}px ${oy.toFixed(1)}px)`;
|
|
83
|
+
const clipAt = (p: number) => {
|
|
84
|
+
const e = ease(p);
|
|
85
|
+
return outline ? polygonAt(outline, reach * e, e, ox, oy) : `circle(${(reach * e).toFixed(1)}px${at}`;
|
|
86
|
+
};
|
|
87
|
+
return { duration: DURATION[kind], clips: sample(DURATION[kind], SAMPLE_MS, clipAt) };
|
|
88
|
+
};
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { clamp, sample, TAU, type EffectFactory } from './scene';
|
|
2
|
+
|
|
3
|
+
const DURATION = { polarity: 2200, palette: 800 };
|
|
4
|
+
const PLANS = {
|
|
5
|
+
polarity: { rMax: 0.36, rMin: 0.11, bursts: [6, 7], L: 0.2, hold: 0.15, gap: 0.075, drops: [4, 8], over: 1.7 },
|
|
6
|
+
palette: { rMax: 0.5, rMin: 0.2, bursts: [4, 4], L: 0.34, hold: 0.14, gap: 0.08, drops: [2, 4], over: 1.1 },
|
|
7
|
+
};
|
|
8
|
+
const POP_SHARE = 0.14;
|
|
9
|
+
const COVERAGE = 0.84;
|
|
10
|
+
const MIN_CELL = 28;
|
|
11
|
+
const MAX_CELL = 48;
|
|
12
|
+
const CELLS_ACROSS = 20;
|
|
13
|
+
const MIN_INTENSITY = 0.4;
|
|
14
|
+
const MAX_INTENSITY = 1.8;
|
|
15
|
+
const HERO = { x: 0.3, y: 0.27, jitter: 0.05, swell: 0.1 };
|
|
16
|
+
const INSET = { x: 0.1, y: 0.12, bottom: 0.88 };
|
|
17
|
+
const POOL_INSET = { x: 0.09, right: 0.9, y: 0.12, bottom: 0.9 };
|
|
18
|
+
const NUDGE_INSET = { x: 0.08, right: 0.92, y: 0.1, bottom: 0.9 };
|
|
19
|
+
const CORNER = { x: 0.42, y: 0.58, jitter: 0.3 };
|
|
20
|
+
const ZONE_JITTER = 0.6;
|
|
21
|
+
const SECOND_PICK_CHANCE = 0.3;
|
|
22
|
+
const RUN_CURVE = 1.4;
|
|
23
|
+
const ROUNDING = 0.6;
|
|
24
|
+
const SPLAT_SAMPLE_MS = 32;
|
|
25
|
+
|
|
26
|
+
const f = (v: number) => Math.round(v * 10) / 10;
|
|
27
|
+
|
|
28
|
+
interface Drop {
|
|
29
|
+
a: number;
|
|
30
|
+
d: number;
|
|
31
|
+
r: number;
|
|
32
|
+
delay: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface Splat {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
R: number;
|
|
39
|
+
t0: number;
|
|
40
|
+
Rf: number;
|
|
41
|
+
geo: Float32Array;
|
|
42
|
+
geoR: Float32Array;
|
|
43
|
+
x0: number;
|
|
44
|
+
y0: number;
|
|
45
|
+
xr0: number;
|
|
46
|
+
yr0: number;
|
|
47
|
+
drops: Drop[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface Seed {
|
|
51
|
+
x: number;
|
|
52
|
+
y: number;
|
|
53
|
+
R: number;
|
|
54
|
+
t0: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
interface Spot {
|
|
58
|
+
bl: boolean;
|
|
59
|
+
x: number;
|
|
60
|
+
y: number;
|
|
61
|
+
d: number;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const controlPoints = (Q: Float32Array, pn: number) => {
|
|
65
|
+
const g = new Float32Array(pn * 6);
|
|
66
|
+
for (let j = 0; j < pn; j++) {
|
|
67
|
+
const a = ((j - 1 + pn) % pn) * 2;
|
|
68
|
+
const b = j * 2;
|
|
69
|
+
const c = ((j + 1) % pn) * 2;
|
|
70
|
+
const d = ((j + 2) % pn) * 2;
|
|
71
|
+
const o = j * 6;
|
|
72
|
+
g[o] = Q[b] + (Q[c] - Q[a]) / 6;
|
|
73
|
+
g[o + 1] = Q[b + 1] + (Q[c + 1] - Q[a + 1]) / 6;
|
|
74
|
+
g[o + 2] = Q[c] - (Q[d] - Q[b]) / 6;
|
|
75
|
+
g[o + 3] = Q[c + 1] - (Q[d + 1] - Q[b + 1]) / 6;
|
|
76
|
+
g[o + 4] = Q[c];
|
|
77
|
+
g[o + 5] = Q[c + 1];
|
|
78
|
+
}
|
|
79
|
+
return g;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const paint: EffectFactory = (scene) => {
|
|
83
|
+
const { width: W, height: H, kind } = scene;
|
|
84
|
+
const P = PLANS[kind];
|
|
85
|
+
const rnd = Math.random;
|
|
86
|
+
const intensity = clamp(scene.intensity, MIN_INTENSITY, MAX_INTENSITY);
|
|
87
|
+
const m = Math.min(W, H);
|
|
88
|
+
const rMax = m * P.rMax;
|
|
89
|
+
const rMin = m * P.rMin;
|
|
90
|
+
const cell = Math.max(MIN_CELL, Math.min(MAX_CELL, m / CELLS_ACROSS));
|
|
91
|
+
const cols = Math.ceil(W / cell);
|
|
92
|
+
const rows = Math.ceil(H / cell);
|
|
93
|
+
const n = cols * rows;
|
|
94
|
+
const cx = new Float32Array(n);
|
|
95
|
+
const cy = new Float32Array(n);
|
|
96
|
+
for (let i = 0; i < n; i++) {
|
|
97
|
+
cx[i] = ((i % cols) + 0.5) * cell;
|
|
98
|
+
cy[i] = (Math.floor(i / cols) + 0.5) * cell;
|
|
99
|
+
}
|
|
100
|
+
const seeds: Seed[] = [
|
|
101
|
+
{
|
|
102
|
+
x: W * (HERO.x + HERO.jitter * (rnd() - 0.5)),
|
|
103
|
+
y: H * (HERO.y + HERO.jitter * (rnd() - 0.5)),
|
|
104
|
+
R: rMax * (1 + HERO.swell * rnd()),
|
|
105
|
+
t0: 0,
|
|
106
|
+
},
|
|
107
|
+
];
|
|
108
|
+
const bursts = P.bursts[0] + Math.floor(rnd() * (P.bursts[1] - P.bursts[0] + 1));
|
|
109
|
+
const L = P.L;
|
|
110
|
+
const edgeAt = (s: Seed, p: number) => {
|
|
111
|
+
if (p <= s.t0) return 0;
|
|
112
|
+
const e0 = s.t0 + POP_SHARE * L;
|
|
113
|
+
const ps = Math.max(0, Math.min(1, (p - e0) / Math.max(0.01, 1 - e0)));
|
|
114
|
+
return s.R * (0.1 + 0.9 * Math.min(1, (p - s.t0) / L)) * (1 + 0.35 * Math.pow(ps, RUN_CURVE));
|
|
115
|
+
};
|
|
116
|
+
const cz = W >= H ? (bursts > 4 ? 3 : 2) : 2;
|
|
117
|
+
const rz = bursts > 4 ? (W >= H ? 2 : 3) : 2;
|
|
118
|
+
const zw = W / cz;
|
|
119
|
+
const zh = H / rz;
|
|
120
|
+
const zx0 = Math.min(cz - 1, Math.floor(seeds[0].x / zw));
|
|
121
|
+
const zy0 = Math.min(rz - 1, Math.floor(seeds[0].y / zh));
|
|
122
|
+
const pool: Spot[] = [];
|
|
123
|
+
for (let r = 0; r < rz; r++) {
|
|
124
|
+
for (let c = 0; c < cz; c++) {
|
|
125
|
+
if (c === zx0 && r === zy0) continue;
|
|
126
|
+
const bl = c === 0 && r === rz - 1;
|
|
127
|
+
const jitter = bl ? CORNER.jitter : ZONE_JITTER;
|
|
128
|
+
pool.push({
|
|
129
|
+
bl,
|
|
130
|
+
x: clamp((c + (bl ? CORNER.x : 0.5) + jitter * (rnd() - 0.5)) * zw, W * POOL_INSET.x, W * POOL_INSET.right),
|
|
131
|
+
y: clamp((r + (bl ? CORNER.y : 0.5) + jitter * (rnd() - 0.5)) * zh, H * POOL_INSET.y, H * POOL_INSET.bottom),
|
|
132
|
+
d: Infinity,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
while (seeds.length < bursts) {
|
|
137
|
+
const t0 = P.hold + (seeds.length - 1) * P.gap;
|
|
138
|
+
let pt: { x: number; y: number };
|
|
139
|
+
if (pool.length) {
|
|
140
|
+
for (const q of pool) {
|
|
141
|
+
q.d = Infinity;
|
|
142
|
+
for (const s of seeds) q.d = Math.min(q.d, Math.hypot(q.x - s.x, q.y - s.y));
|
|
143
|
+
}
|
|
144
|
+
pool.sort((a, b) => (b.bl ? 1e6 : b.d) - (a.bl ? 1e6 : a.d));
|
|
145
|
+
pt = pool.splice(!pool[0].bl && pool.length > 1 && rnd() < SECOND_PICK_CHANCE ? 1 : 0, 1)[0];
|
|
146
|
+
} else {
|
|
147
|
+
const cands: [number, number][] = [];
|
|
148
|
+
for (let i = 0; i < n; i += 2) {
|
|
149
|
+
if (cx[i] < W * INSET.x || cx[i] > W * (1 - INSET.x) || cy[i] < H * INSET.y || cy[i] > H * INSET.bottom)
|
|
150
|
+
continue;
|
|
151
|
+
let d = Infinity;
|
|
152
|
+
for (const s of seeds) d = Math.min(d, Math.hypot(cx[i] - s.x, cy[i] - s.y) - edgeAt(s, t0));
|
|
153
|
+
cands.push([d, i]);
|
|
154
|
+
}
|
|
155
|
+
cands.sort((a, b) => b[0] - a[0]);
|
|
156
|
+
const i = cands[Math.min(cands.length - 1, Math.floor(rnd() * rnd() * 4))][1];
|
|
157
|
+
pt = { x: cx[i] + (rnd() - 0.5) * cell * 2, y: cy[i] + (rnd() - 0.5) * cell * 2 };
|
|
158
|
+
}
|
|
159
|
+
let d = Infinity;
|
|
160
|
+
let nearest: Seed | null = null;
|
|
161
|
+
for (const s of seeds) {
|
|
162
|
+
const g = Math.hypot(pt.x - s.x, pt.y - s.y) - edgeAt(s, t0);
|
|
163
|
+
if (g < d) {
|
|
164
|
+
d = g;
|
|
165
|
+
nearest = s;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if (d < rMin && nearest) {
|
|
169
|
+
const dx = pt.x - nearest.x;
|
|
170
|
+
const dy = pt.y - nearest.y;
|
|
171
|
+
const len = Math.hypot(dx, dy) || 1;
|
|
172
|
+
const push = rMin - d;
|
|
173
|
+
pt.x = clamp(pt.x + (dx / len) * push, W * NUDGE_INSET.x, W * NUDGE_INSET.right);
|
|
174
|
+
pt.y = clamp(pt.y + (dy / len) * push, H * NUDGE_INSET.y, H * NUDGE_INSET.bottom);
|
|
175
|
+
d = rMin;
|
|
176
|
+
}
|
|
177
|
+
seeds.push({ x: pt.x, y: pt.y, R: clamp(d * (0.7 + 0.25 * rnd()), rMin, rMax * 0.85), t0 });
|
|
178
|
+
}
|
|
179
|
+
const own = seeds.map(() => 0);
|
|
180
|
+
for (let i = 0; i < n; i++) {
|
|
181
|
+
let k = 0;
|
|
182
|
+
let bd = Infinity;
|
|
183
|
+
seeds.forEach((s, j) => {
|
|
184
|
+
const d = Math.hypot(cx[i] - s.x, cy[i] - s.y) - s.R;
|
|
185
|
+
if (d < bd) {
|
|
186
|
+
bd = d;
|
|
187
|
+
k = j;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
own[k] = Math.max(own[k], bd + seeds[k].R);
|
|
191
|
+
}
|
|
192
|
+
const splats: Splat[] = seeds.map((s, i) => {
|
|
193
|
+
const Rf = Math.max(s.R * 1.05, (own[i] / COVERAGE + cell * 0.7) * 1.02);
|
|
194
|
+
const rot = rnd() * TAU;
|
|
195
|
+
const pn = Math.max(20, Math.min(36, Math.round(s.R / 9)));
|
|
196
|
+
const harmonics = [
|
|
197
|
+
[2, 0.035 + 0.035 * rnd(), rnd() * TAU],
|
|
198
|
+
[3, 0.02 + 0.03 * rnd(), rnd() * TAU],
|
|
199
|
+
[5, 0.01 + 0.015 * rnd(), rnd() * TAU],
|
|
200
|
+
];
|
|
201
|
+
const bumps = Array.from({ length: 3 + Math.floor(rnd() * 3) }, () => [
|
|
202
|
+
rnd() * TAU,
|
|
203
|
+
0.14 + 0.12 * rnd(),
|
|
204
|
+
0.14 + 0.28 * rnd(),
|
|
205
|
+
]);
|
|
206
|
+
const pts = new Float32Array(pn * 2);
|
|
207
|
+
for (let j = 0; j < pn; j++) {
|
|
208
|
+
const th = (j / pn) * TAU;
|
|
209
|
+
let r = 1;
|
|
210
|
+
for (const [k, a, ph] of harmonics) r += a * Math.cos(k * th + ph);
|
|
211
|
+
for (const [bt, bw, bh] of bumps) {
|
|
212
|
+
let dt = th - bt;
|
|
213
|
+
dt = Math.atan2(Math.sin(dt), Math.cos(dt));
|
|
214
|
+
r += bh * Math.exp((-dt * dt) / (2 * bw * bw));
|
|
215
|
+
}
|
|
216
|
+
pts[2 * j] = r * Math.cos(th + rot);
|
|
217
|
+
pts[2 * j + 1] = r * Math.sin(th + rot);
|
|
218
|
+
}
|
|
219
|
+
const rp = new Float32Array(pn * 2);
|
|
220
|
+
for (let j = 0; j < pn; j++) {
|
|
221
|
+
const th = (j / pn) * TAU + rot;
|
|
222
|
+
rp[2 * j] = Math.cos(th);
|
|
223
|
+
rp[2 * j + 1] = Math.sin(th);
|
|
224
|
+
}
|
|
225
|
+
const size = clamp((s.R - rMin) / Math.max(1, rMax - rMin), 0, 1);
|
|
226
|
+
const K = Math.round((P.drops[0] + (P.drops[1] - P.drops[0]) * size) * Math.min(1.4, Math.max(0.6, intensity)));
|
|
227
|
+
const drops: Drop[] = Array.from({ length: K }, () => ({
|
|
228
|
+
a: rnd() * TAU,
|
|
229
|
+
d: 1.25 + 0.6 * rnd(),
|
|
230
|
+
r: 0.04 + 0.07 * rnd(),
|
|
231
|
+
delay: rnd() * 0.25,
|
|
232
|
+
}));
|
|
233
|
+
return {
|
|
234
|
+
...s,
|
|
235
|
+
Rf,
|
|
236
|
+
geo: controlPoints(pts, pn),
|
|
237
|
+
geoR: controlPoints(rp, pn),
|
|
238
|
+
x0: pts[0],
|
|
239
|
+
y0: pts[1],
|
|
240
|
+
xr0: rp[0],
|
|
241
|
+
yr0: rp[1],
|
|
242
|
+
drops,
|
|
243
|
+
};
|
|
244
|
+
});
|
|
245
|
+
const over = P.over * intensity;
|
|
246
|
+
|
|
247
|
+
const shape = (p: number) => {
|
|
248
|
+
let d = '';
|
|
249
|
+
for (const s of splats) {
|
|
250
|
+
const uu = clamp((p - s.t0) / L, 0, 1);
|
|
251
|
+
let sc: number;
|
|
252
|
+
let v = 0;
|
|
253
|
+
let mix = 0;
|
|
254
|
+
if (uu < POP_SHARE) {
|
|
255
|
+
const q = uu / POP_SHARE;
|
|
256
|
+
sc = 0.1 * q * q * (3 - 2 * q);
|
|
257
|
+
} else {
|
|
258
|
+
v = (uu - POP_SHARE) / (1 - POP_SHARE);
|
|
259
|
+
const w = v - 1;
|
|
260
|
+
sc = 0.1 + 0.9 * (1 + (over + 1) * w * w * w + over * w * w);
|
|
261
|
+
const e0 = s.t0 + POP_SHARE * L;
|
|
262
|
+
const es = Math.pow(Math.min(1, (p - e0) / Math.max(0.01, 1 - e0)), RUN_CURVE);
|
|
263
|
+
sc += (s.Rf / s.R - 1) * es;
|
|
264
|
+
mix = ROUNDING * es;
|
|
265
|
+
}
|
|
266
|
+
const k = s.R * sc;
|
|
267
|
+
const { x, y, geo: g, geoR: gr } = s;
|
|
268
|
+
const mm = 1 - mix;
|
|
269
|
+
const X = (o: number) => f(x + (mm * g[o] + mix * gr[o]) * k);
|
|
270
|
+
const Y = (o: number) => f(y + (mm * g[o] + mix * gr[o]) * k);
|
|
271
|
+
let b = `M${f(x + (mm * s.x0 + mix * s.xr0) * k)} ${f(y + (mm * s.y0 + mix * s.yr0) * k)}`;
|
|
272
|
+
for (let o = 0; o < g.length; o += 6) b += `C${X(o)} ${Y(o + 1)} ${X(o + 2)} ${Y(o + 3)} ${X(o + 4)} ${Y(o + 5)}`;
|
|
273
|
+
d += b + 'Z';
|
|
274
|
+
for (const dr of s.drops) {
|
|
275
|
+
const w = clamp((v - dr.delay) / (1 - dr.delay), 0, 1);
|
|
276
|
+
const e = 1 - Math.pow(1 - w, 3);
|
|
277
|
+
const dist = s.R * (sc * 0.9 * (1 - e) + dr.d * e);
|
|
278
|
+
const rr = s.R * dr.r * Math.min(1, w * 4);
|
|
279
|
+
const rx = rr * (1 + 1.8 * (1 - e));
|
|
280
|
+
const ca = Math.cos(dr.a);
|
|
281
|
+
const sa = Math.sin(dr.a);
|
|
282
|
+
const px = x + ca * dist;
|
|
283
|
+
const py = y + sa * dist;
|
|
284
|
+
const x1 = f(px - ca * rx);
|
|
285
|
+
const y1 = f(py - sa * rx);
|
|
286
|
+
const x2 = f(px + ca * rx);
|
|
287
|
+
const y2 = f(py + sa * rx);
|
|
288
|
+
const deg = f((dr.a * 180) / Math.PI);
|
|
289
|
+
d += `M${x1} ${y1}A${f(rx)} ${f(rr)} ${deg} 1 1 ${x2} ${y2}A${f(rx)} ${f(rr)} ${deg} 1 1 ${x1} ${y1}Z`;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return `path("${d}")`;
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
return { duration: DURATION[kind], clips: sample(DURATION[kind], SPLAT_SAMPLE_MS, shape) };
|
|
296
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type ThemeChangeKind = 'polarity' | 'palette';
|
|
2
|
+
export type SweepDirection = 'down' | 'up' | 'right' | 'left';
|
|
3
|
+
export type BloomShape = 'circle' | 'hexagon' | 'star' | 'petal' | 'blob';
|
|
4
|
+
|
|
5
|
+
export interface Scene {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
originX: number;
|
|
9
|
+
originY: number;
|
|
10
|
+
kind: ThemeChangeKind;
|
|
11
|
+
direction: SweepDirection;
|
|
12
|
+
intensity: number;
|
|
13
|
+
shape: BloomShape;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface Effect {
|
|
17
|
+
duration: number;
|
|
18
|
+
clips: readonly string[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type EffectFactory = (scene: Scene) => Effect;
|
|
22
|
+
|
|
23
|
+
export const TAU = Math.PI * 2;
|
|
24
|
+
|
|
25
|
+
export const clamp = (value: number, low: number, high: number) => Math.max(low, Math.min(high, value));
|
|
26
|
+
|
|
27
|
+
export const easeInOut = (p: number) => (p < 0.5 ? 2 * p * p : 1 - Math.pow(-2 * p + 2, 2) / 2);
|
|
28
|
+
|
|
29
|
+
export const easeOut = (p: number) => 1 - Math.pow(1 - p, 3);
|
|
30
|
+
|
|
31
|
+
export const SAMPLE_MS = 8;
|
|
32
|
+
|
|
33
|
+
export const sample = <T>(duration: number, step: number, at: (progress: number, elapsed: number) => T): T[] => {
|
|
34
|
+
const last = Math.ceil(duration / step);
|
|
35
|
+
const table: T[] = [];
|
|
36
|
+
for (let i = 0; i <= last; i++) table.push(at(i / last, (i / last) * duration));
|
|
37
|
+
return table;
|
|
38
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
2
|
+
|
|
3
|
+
@layer zyncat.components {
|
|
4
|
+
.zc-theme-transition {
|
|
5
|
+
/* The z-index the arriving page paints at, above every panel it covers. */
|
|
6
|
+
--theme-transition-layer: var(--layer-infinity);
|
|
7
|
+
|
|
8
|
+
position: fixed;
|
|
9
|
+
inset: 0;
|
|
10
|
+
z-index: var(--theme-transition-layer);
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.zc-theme-transition {
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
isolation: isolate;
|
|
17
|
+
color: var(--text-body);
|
|
18
|
+
background: var(--bg-app);
|
|
19
|
+
transition: none;
|
|
20
|
+
will-change: clip-path;
|
|
21
|
+
}
|
|
22
|
+
.zc-theme-transition__inner {
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
}
|
|
25
|
+
.zc-theme-transition *,
|
|
26
|
+
.zc-theme-transition *::before,
|
|
27
|
+
.zc-theme-transition *::after {
|
|
28
|
+
transition: none !important;
|
|
29
|
+
-webkit-backdrop-filter: none !important;
|
|
30
|
+
backdrop-filter: none !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.zc-theme-transition__probe {
|
|
34
|
+
position: fixed;
|
|
35
|
+
inset: 0 auto auto 0;
|
|
36
|
+
visibility: hidden;
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
color: var(--bg-app);
|
|
39
|
+
background-color: var(--text-body);
|
|
40
|
+
border-color: var(--accent);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[data-theme-settling] *,
|
|
44
|
+
[data-theme-settling] *::before,
|
|
45
|
+
[data-theme-settling] *::after {
|
|
46
|
+
transition: none !important;
|
|
47
|
+
}
|
|
48
|
+
}
|