fancy-ui-svelte 0.5.0 → 0.7.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 +98 -74
- package/dist/fancy-ui/dock/index.d.ts +1 -1
- package/dist/fancy-ui/dock/index.js +0 -1
- package/dist/fancy-ui/editorial-engine/EditorialEngine.svelte +181 -0
- package/dist/fancy-ui/editorial-engine/EditorialEngine.svelte.d.ts +26 -0
- package/dist/fancy-ui/editorial-engine/README.md +56 -0
- package/dist/fancy-ui/editorial-engine/engine.d.ts +7 -0
- package/dist/fancy-ui/editorial-engine/engine.js +581 -0
- package/dist/fancy-ui/editorial-engine/index.d.ts +2 -0
- package/dist/fancy-ui/editorial-engine/index.js +1 -0
- package/dist/fancy-ui/frosted-glass/FrostedGlass.svelte +202 -0
- package/dist/fancy-ui/frosted-glass/FrostedGlass.svelte.d.ts +20 -0
- package/dist/fancy-ui/frosted-glass/FrostedGlass.test.d.ts +1 -0
- package/dist/fancy-ui/frosted-glass/FrostedGlass.test.js +48 -0
- package/dist/fancy-ui/frosted-glass/README.md +59 -0
- package/dist/fancy-ui/frosted-glass/index.d.ts +1 -0
- package/dist/fancy-ui/frosted-glass/index.js +1 -0
- package/dist/fancy-ui/index.d.ts +5 -0
- package/dist/fancy-ui/index.js +5 -0
- package/dist/fancy-ui/line-reveal/LineReveal.svelte +168 -0
- package/dist/fancy-ui/line-reveal/LineReveal.svelte.d.ts +33 -0
- package/dist/fancy-ui/line-reveal/README.md +42 -0
- package/dist/fancy-ui/line-reveal/index.d.ts +2 -0
- package/dist/fancy-ui/line-reveal/index.js +1 -0
- package/dist/fancy-ui/noise-reveal/NoiseReveal.svelte +323 -0
- package/dist/fancy-ui/noise-reveal/NoiseReveal.svelte.d.ts +19 -0
- package/dist/fancy-ui/noise-reveal/NoiseReveal.test.d.ts +1 -0
- package/dist/fancy-ui/noise-reveal/NoiseReveal.test.js +123 -0
- package/dist/fancy-ui/noise-reveal/index.d.ts +2 -0
- package/dist/fancy-ui/noise-reveal/index.js +1 -0
- package/dist/fancy-ui/registry.js +196 -11
- package/dist/fancy-ui/themes.d.ts +38 -0
- package/dist/fancy-ui/themes.js +356 -0
- package/dist/types.d.ts +2 -0
- package/dist/utils/animation.d.ts +109 -0
- package/dist/utils/animation.js +198 -0
- package/dist/utils/color.d.ts +128 -0
- package/dist/utils/color.js +314 -0
- package/dist/utils/geometry.d.ts +125 -0
- package/dist/utils/geometry.js +250 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +39 -0
- package/package.json +13 -3
|
@@ -485,6 +485,88 @@ export const registry = {
|
|
|
485
485
|
],
|
|
486
486
|
slots: [{ name: "children", description: "Link text content" }],
|
|
487
487
|
},
|
|
488
|
+
"line-reveal": {
|
|
489
|
+
name: "LineReveal",
|
|
490
|
+
slug: "line-reveal",
|
|
491
|
+
description: "Staggered line-by-line text reveal with lines computed by pretext instead of DOM splitting",
|
|
492
|
+
category: "text",
|
|
493
|
+
status: "done",
|
|
494
|
+
credits: [{ source: "pretext", url: "https://github.com/chenglou/pretext" }],
|
|
495
|
+
tags: ["text", "animation", "reveal", "stagger", "pretext", "typography"],
|
|
496
|
+
props: [
|
|
497
|
+
{ name: "text", type: "string", description: "Text to reveal", required: true },
|
|
498
|
+
{
|
|
499
|
+
name: "font",
|
|
500
|
+
type: "string",
|
|
501
|
+
default: "'600 32px \"Helvetica Neue\", Helvetica, Arial, sans-serif'",
|
|
502
|
+
description: "CSS font shorthand used for both measurement and rendering",
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
name: "lineHeight",
|
|
506
|
+
type: "number",
|
|
507
|
+
default: "1.2 × font size",
|
|
508
|
+
description: "Line height in pixels",
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
name: "stagger",
|
|
512
|
+
type: "number",
|
|
513
|
+
default: "0.08",
|
|
514
|
+
description: "Delay between lines in seconds",
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
name: "duration",
|
|
518
|
+
type: "number",
|
|
519
|
+
default: "0.7",
|
|
520
|
+
description: "Animation duration per line in seconds",
|
|
521
|
+
},
|
|
522
|
+
{ name: "delay", type: "number", default: "0", description: "Initial delay in seconds" },
|
|
523
|
+
{
|
|
524
|
+
name: "once",
|
|
525
|
+
type: "boolean",
|
|
526
|
+
default: "true",
|
|
527
|
+
description: "Animate only on first viewport entry",
|
|
528
|
+
},
|
|
529
|
+
{ name: "class", type: "string", description: "Additional CSS classes" },
|
|
530
|
+
],
|
|
531
|
+
},
|
|
532
|
+
"editorial-engine": {
|
|
533
|
+
name: "EditorialEngine",
|
|
534
|
+
slug: "editorial-engine",
|
|
535
|
+
description: "Live magazine layout: multi-column text flowing around draggable orbs with zero DOM reads, powered by pretext",
|
|
536
|
+
category: "text",
|
|
537
|
+
status: "done",
|
|
538
|
+
credits: [
|
|
539
|
+
{ source: "pretext editorial engine", url: "https://chenglou.me/pretext/editorial-engine/" },
|
|
540
|
+
],
|
|
541
|
+
tags: ["text", "layout", "magazine", "columns", "pretext", "interactive", "typography"],
|
|
542
|
+
props: [
|
|
543
|
+
{
|
|
544
|
+
name: "headline",
|
|
545
|
+
type: "string",
|
|
546
|
+
default: "built-in copy",
|
|
547
|
+
description: "Auto-sized headline (largest font size that breaks no word)",
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
name: "body",
|
|
551
|
+
type: "string",
|
|
552
|
+
default: "built-in copy",
|
|
553
|
+
description: "Body text, paragraphs separated by blank lines",
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
name: "pullquotes",
|
|
557
|
+
type: "string[]",
|
|
558
|
+
default: "built-in quotes",
|
|
559
|
+
description: "Up to two pullquotes embedded in the columns",
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
name: "fontFamily",
|
|
563
|
+
type: "string",
|
|
564
|
+
default: "Palatino serif stack",
|
|
565
|
+
description: "Font family stack used for all text",
|
|
566
|
+
},
|
|
567
|
+
{ name: "class", type: "string", description: "Additional CSS classes for the stage" },
|
|
568
|
+
],
|
|
569
|
+
},
|
|
488
570
|
"logo-cloud": {
|
|
489
571
|
name: "LogoCloud",
|
|
490
572
|
slug: "logo-cloud",
|
|
@@ -855,17 +937,6 @@ export const registry = {
|
|
|
855
937
|
},
|
|
856
938
|
],
|
|
857
939
|
},
|
|
858
|
-
"fluid-cursor-advanced": {
|
|
859
|
-
name: "FluidCursorAdvanced",
|
|
860
|
-
slug: "fluid-cursor-advanced",
|
|
861
|
-
description: "WebGL fluid simulation confined to a parent container element",
|
|
862
|
-
category: "effects",
|
|
863
|
-
status: "done",
|
|
864
|
-
credits: [
|
|
865
|
-
{ source: "Inspira UI", url: "https://inspira-ui.com/components/cursor/fluid-cursor" },
|
|
866
|
-
],
|
|
867
|
-
tags: ["cursor", "webgl", "fluid", "simulation", "interactive", "contained"],
|
|
868
|
-
},
|
|
869
940
|
"glow-border": {
|
|
870
941
|
name: "GlowBorder",
|
|
871
942
|
slug: "glow-border",
|
|
@@ -1563,6 +1634,74 @@ export const registry = {
|
|
|
1563
1634
|
},
|
|
1564
1635
|
],
|
|
1565
1636
|
},
|
|
1637
|
+
"frosted-glass": {
|
|
1638
|
+
name: "FrostedGlass",
|
|
1639
|
+
slug: "frosted-glass",
|
|
1640
|
+
description: "Frosted glass surface with organic turbulence-noise refraction, an alternative to LiquidGlass",
|
|
1641
|
+
category: "effects",
|
|
1642
|
+
status: "done",
|
|
1643
|
+
tags: ["glass", "effect", "svg", "filter", "turbulence", "displacement", "blur", "navbar"],
|
|
1644
|
+
props: [
|
|
1645
|
+
{ name: "radius", type: "number", default: "24", description: "Border radius in pixels" },
|
|
1646
|
+
{
|
|
1647
|
+
name: "baseFrequency",
|
|
1648
|
+
type: "number",
|
|
1649
|
+
default: "0.008",
|
|
1650
|
+
description: "Turbulence noise frequency (lower = wider waves)",
|
|
1651
|
+
},
|
|
1652
|
+
{
|
|
1653
|
+
name: "numOctaves",
|
|
1654
|
+
type: "number",
|
|
1655
|
+
default: "2",
|
|
1656
|
+
description: "Turbulence octaves controlling noise detail",
|
|
1657
|
+
},
|
|
1658
|
+
{ name: "seed", type: "number", default: "92", description: "Turbulence random seed" },
|
|
1659
|
+
{
|
|
1660
|
+
name: "noiseBlur",
|
|
1661
|
+
type: "number",
|
|
1662
|
+
default: "2",
|
|
1663
|
+
description: "Gaussian blur softening the noise before displacement",
|
|
1664
|
+
},
|
|
1665
|
+
{ name: "scale", type: "number", default: "70", description: "Displacement intensity" },
|
|
1666
|
+
{
|
|
1667
|
+
name: "tint",
|
|
1668
|
+
type: "string",
|
|
1669
|
+
default: '"hsla(0, 0%, 100%, 0.25)"',
|
|
1670
|
+
description: "Overlay tint color",
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
name: "highlight",
|
|
1674
|
+
type: "string",
|
|
1675
|
+
default: '"hsla(0, 0%, 100%, 0.75)"',
|
|
1676
|
+
description: "Specular rim highlight color",
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
name: "border",
|
|
1680
|
+
type: "boolean",
|
|
1681
|
+
default: "true",
|
|
1682
|
+
description: "Show the conic-gradient glass border",
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
name: "fallbackBlur",
|
|
1686
|
+
type: "number",
|
|
1687
|
+
default: "20",
|
|
1688
|
+
description: "Backdrop blur in pixels for the Safari fallback",
|
|
1689
|
+
},
|
|
1690
|
+
{
|
|
1691
|
+
name: "fallbackSaturation",
|
|
1692
|
+
type: "number",
|
|
1693
|
+
default: "180",
|
|
1694
|
+
description: "Backdrop saturation percentage for the Safari fallback",
|
|
1695
|
+
},
|
|
1696
|
+
{
|
|
1697
|
+
name: "containerClass",
|
|
1698
|
+
type: "string",
|
|
1699
|
+
default: '""',
|
|
1700
|
+
description: "CSS classes for the outer container",
|
|
1701
|
+
},
|
|
1702
|
+
],
|
|
1703
|
+
slots: [{ name: "children", description: "Content rendered on top of the glass" }],
|
|
1704
|
+
},
|
|
1566
1705
|
"liquid-glass": {
|
|
1567
1706
|
name: "LiquidGlass",
|
|
1568
1707
|
slug: "liquid-glass",
|
|
@@ -2040,6 +2179,52 @@ export const registry = {
|
|
|
2040
2179
|
},
|
|
2041
2180
|
],
|
|
2042
2181
|
},
|
|
2182
|
+
"noise-reveal": {
|
|
2183
|
+
name: "NoiseReveal",
|
|
2184
|
+
slug: "noise-reveal",
|
|
2185
|
+
description: "WebGL image reveal with a Perlin-noise dissolve mask, contracting radial gradient, and wave displacement, inspired by a Codrops shader effect",
|
|
2186
|
+
category: "media",
|
|
2187
|
+
status: "done",
|
|
2188
|
+
credits: [
|
|
2189
|
+
{
|
|
2190
|
+
source: "Codrops",
|
|
2191
|
+
url: "https://tympanus.net/codrops/2024/12/02/how-to-code-a-shader-based-reveal-effect-with-react-three-fiber-glsl/",
|
|
2192
|
+
},
|
|
2193
|
+
{
|
|
2194
|
+
source: "colindmg/r3f-image-reveal-effect",
|
|
2195
|
+
url: "https://github.com/colindmg/r3f-image-reveal-effect",
|
|
2196
|
+
},
|
|
2197
|
+
],
|
|
2198
|
+
tags: ["media", "image", "reveal", "webgl", "shader", "threejs", "noise"],
|
|
2199
|
+
props: [
|
|
2200
|
+
{ name: "src", type: "string", description: "Image URL", required: true },
|
|
2201
|
+
{ name: "alt", type: "string", description: "Accessible label for the image" },
|
|
2202
|
+
{
|
|
2203
|
+
name: "trigger",
|
|
2204
|
+
type: '"view" | "manual"',
|
|
2205
|
+
default: '"view"',
|
|
2206
|
+
description: 'Reveal trigger: "view" = on viewport entry, "manual" = via revealed prop',
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
name: "revealed",
|
|
2210
|
+
type: "boolean",
|
|
2211
|
+
default: "false",
|
|
2212
|
+
description: 'Manual reveal state (used with trigger="manual"; also allows re-hiding)',
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
name: "duration",
|
|
2216
|
+
type: "number",
|
|
2217
|
+
default: "1.5",
|
|
2218
|
+
description: "Reveal animation duration in seconds",
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
name: "delay",
|
|
2222
|
+
type: "number",
|
|
2223
|
+
default: "0",
|
|
2224
|
+
description: 'Delay before reveal in seconds (trigger="view")',
|
|
2225
|
+
},
|
|
2226
|
+
],
|
|
2227
|
+
},
|
|
2043
2228
|
};
|
|
2044
2229
|
// =============================================================================
|
|
2045
2230
|
// Registry Helpers
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme registry (docs-site theming data).
|
|
3
|
+
*
|
|
4
|
+
* A named theme is a set of CSS-variable overrides applied on top of the base
|
|
5
|
+
* light/dark token sets defined in `src/routes/layout.css`. The theme store
|
|
6
|
+
* (`src/lib/stores/theme.svelte.ts`) applies a theme by setting these variables
|
|
7
|
+
* inline on `<html>`, toggling the `.dark` class per `colorScheme`, and setting
|
|
8
|
+
* a `data-theme` attribute.
|
|
9
|
+
*
|
|
10
|
+
* NOTE: this module is docs/theming data only. It is NOT imported by any shipped
|
|
11
|
+
* component in `src/lib/fancy-ui/*`, so it does not affect the published package.
|
|
12
|
+
*/
|
|
13
|
+
export type ColorScheme = "light" | "dark";
|
|
14
|
+
export interface ThemeDef {
|
|
15
|
+
/** Stable id, used as the `data-theme` value and persistence key. */
|
|
16
|
+
name: string;
|
|
17
|
+
/** Human label shown in the switcher. */
|
|
18
|
+
label: string;
|
|
19
|
+
/** Whether the theme reads as light or dark (drives the `.dark` class). */
|
|
20
|
+
colorScheme: ColorScheme;
|
|
21
|
+
/** CSS custom-property overrides applied on top of the base light/dark set. */
|
|
22
|
+
tokens: Record<string, string>;
|
|
23
|
+
/** Four representative colors for the switcher swatch. */
|
|
24
|
+
swatch: [string, string, string, string];
|
|
25
|
+
}
|
|
26
|
+
/** Every CSS variable a theme may set. The store clears these before applying a theme. */
|
|
27
|
+
export declare const MANAGED_VARS: readonly ["--background", "--foreground", "--card", "--card-foreground", "--popover", "--popover-foreground", "--primary", "--primary-foreground", "--secondary", "--secondary-foreground", "--muted", "--muted-foreground", "--accent", "--accent-foreground", "--border", "--input", "--ring", "--radius", "--rainbow-1", "--rainbow-2", "--rainbow-3", "--rainbow-4", "--rainbow-5", "--sidebar", "--sidebar-foreground", "--sidebar-primary", "--sidebar-primary-foreground", "--sidebar-accent", "--sidebar-accent-foreground", "--sidebar-border"];
|
|
28
|
+
/**
|
|
29
|
+
* The theme list.
|
|
30
|
+
*
|
|
31
|
+
* `light` and `dark` carry no token overrides — they are the base look defined
|
|
32
|
+
* by `:root` / `.dark` in `layout.css`. The remaining themes are self-contained.
|
|
33
|
+
* `sunset` / `ocean` / `mono` mirror the theme-generator presets.
|
|
34
|
+
*/
|
|
35
|
+
export declare const themes: ThemeDef[];
|
|
36
|
+
export declare function getTheme(name: string): ThemeDef | undefined;
|
|
37
|
+
export declare const themeNames: string[];
|
|
38
|
+
export declare const DEFAULT_THEME = "light";
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme registry (docs-site theming data).
|
|
3
|
+
*
|
|
4
|
+
* A named theme is a set of CSS-variable overrides applied on top of the base
|
|
5
|
+
* light/dark token sets defined in `src/routes/layout.css`. The theme store
|
|
6
|
+
* (`src/lib/stores/theme.svelte.ts`) applies a theme by setting these variables
|
|
7
|
+
* inline on `<html>`, toggling the `.dark` class per `colorScheme`, and setting
|
|
8
|
+
* a `data-theme` attribute.
|
|
9
|
+
*
|
|
10
|
+
* NOTE: this module is docs/theming data only. It is NOT imported by any shipped
|
|
11
|
+
* component in `src/lib/fancy-ui/*`, so it does not affect the published package.
|
|
12
|
+
*/
|
|
13
|
+
/** Every CSS variable a theme may set. The store clears these before applying a theme. */
|
|
14
|
+
export const MANAGED_VARS = [
|
|
15
|
+
"--background",
|
|
16
|
+
"--foreground",
|
|
17
|
+
"--card",
|
|
18
|
+
"--card-foreground",
|
|
19
|
+
"--popover",
|
|
20
|
+
"--popover-foreground",
|
|
21
|
+
"--primary",
|
|
22
|
+
"--primary-foreground",
|
|
23
|
+
"--secondary",
|
|
24
|
+
"--secondary-foreground",
|
|
25
|
+
"--muted",
|
|
26
|
+
"--muted-foreground",
|
|
27
|
+
"--accent",
|
|
28
|
+
"--accent-foreground",
|
|
29
|
+
"--border",
|
|
30
|
+
"--input",
|
|
31
|
+
"--ring",
|
|
32
|
+
"--radius",
|
|
33
|
+
"--rainbow-1",
|
|
34
|
+
"--rainbow-2",
|
|
35
|
+
"--rainbow-3",
|
|
36
|
+
"--rainbow-4",
|
|
37
|
+
"--rainbow-5",
|
|
38
|
+
"--sidebar",
|
|
39
|
+
"--sidebar-foreground",
|
|
40
|
+
"--sidebar-primary",
|
|
41
|
+
"--sidebar-primary-foreground",
|
|
42
|
+
"--sidebar-accent",
|
|
43
|
+
"--sidebar-accent-foreground",
|
|
44
|
+
"--sidebar-border",
|
|
45
|
+
];
|
|
46
|
+
const DEFAULT_RAINBOW = [
|
|
47
|
+
"hsl(0 100% 63%)",
|
|
48
|
+
"hsl(270 100% 63%)",
|
|
49
|
+
"hsl(210 100% 63%)",
|
|
50
|
+
"hsl(195 100% 63%)",
|
|
51
|
+
"hsl(90 100% 63%)",
|
|
52
|
+
];
|
|
53
|
+
/** Expand a compact spec into a full ThemeDef with a complete token map. */
|
|
54
|
+
function defineTheme(s) {
|
|
55
|
+
const card = s.card ?? s.bg;
|
|
56
|
+
const secondary = s.secondary ?? s.accent;
|
|
57
|
+
const secondaryFg = s.secondaryFg ?? s.accentFg;
|
|
58
|
+
const muted = s.muted ?? s.border ?? card;
|
|
59
|
+
const mutedFg = s.mutedFg ?? s.fg;
|
|
60
|
+
const border = s.border ?? s.muted ?? s.fg;
|
|
61
|
+
const ring = s.ring ?? s.primary;
|
|
62
|
+
const radius = s.radius ?? "0.625rem";
|
|
63
|
+
const rainbow = s.rainbow ?? DEFAULT_RAINBOW;
|
|
64
|
+
return {
|
|
65
|
+
name: s.name,
|
|
66
|
+
label: s.label,
|
|
67
|
+
colorScheme: s.colorScheme,
|
|
68
|
+
swatch: [s.primary, s.accent, secondary, s.bg],
|
|
69
|
+
tokens: {
|
|
70
|
+
"--background": s.bg,
|
|
71
|
+
"--foreground": s.fg,
|
|
72
|
+
"--card": card,
|
|
73
|
+
"--card-foreground": s.fg,
|
|
74
|
+
"--popover": card,
|
|
75
|
+
"--popover-foreground": s.fg,
|
|
76
|
+
"--primary": s.primary,
|
|
77
|
+
"--primary-foreground": s.primaryFg,
|
|
78
|
+
"--secondary": secondary,
|
|
79
|
+
"--secondary-foreground": secondaryFg,
|
|
80
|
+
"--muted": muted,
|
|
81
|
+
"--muted-foreground": mutedFg,
|
|
82
|
+
"--accent": s.accent,
|
|
83
|
+
"--accent-foreground": s.accentFg,
|
|
84
|
+
"--border": border,
|
|
85
|
+
"--input": border,
|
|
86
|
+
"--ring": ring,
|
|
87
|
+
"--radius": radius,
|
|
88
|
+
"--rainbow-1": rainbow[0],
|
|
89
|
+
"--rainbow-2": rainbow[1],
|
|
90
|
+
"--rainbow-3": rainbow[2],
|
|
91
|
+
"--rainbow-4": rainbow[3],
|
|
92
|
+
"--rainbow-5": rainbow[4],
|
|
93
|
+
"--sidebar": card,
|
|
94
|
+
"--sidebar-foreground": s.fg,
|
|
95
|
+
"--sidebar-primary": s.primary,
|
|
96
|
+
"--sidebar-primary-foreground": s.primaryFg,
|
|
97
|
+
"--sidebar-accent": muted,
|
|
98
|
+
"--sidebar-accent-foreground": s.fg,
|
|
99
|
+
"--sidebar-border": border,
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The theme list.
|
|
105
|
+
*
|
|
106
|
+
* `light` and `dark` carry no token overrides — they are the base look defined
|
|
107
|
+
* by `:root` / `.dark` in `layout.css`. The remaining themes are self-contained.
|
|
108
|
+
* `sunset` / `ocean` / `mono` mirror the theme-generator presets.
|
|
109
|
+
*/
|
|
110
|
+
export const themes = [
|
|
111
|
+
{
|
|
112
|
+
name: "light",
|
|
113
|
+
label: "Light",
|
|
114
|
+
colorScheme: "light",
|
|
115
|
+
tokens: {},
|
|
116
|
+
swatch: [
|
|
117
|
+
"oklch(0.208 0.042 265.755)",
|
|
118
|
+
"oklch(0.65 0.15 265)",
|
|
119
|
+
"oklch(0.929 0.013 255.508)",
|
|
120
|
+
"#ffffff",
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "dark",
|
|
125
|
+
label: "Dark",
|
|
126
|
+
colorScheme: "dark",
|
|
127
|
+
tokens: {},
|
|
128
|
+
swatch: [
|
|
129
|
+
"oklch(0.929 0.013 255.508)",
|
|
130
|
+
"oklch(0.7 0.15 265)",
|
|
131
|
+
"oklch(0.15 0.005 260)",
|
|
132
|
+
"#0a0a0a",
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
defineTheme({
|
|
136
|
+
name: "cupcake",
|
|
137
|
+
label: "Cupcake",
|
|
138
|
+
colorScheme: "light",
|
|
139
|
+
bg: "#faf7f5",
|
|
140
|
+
fg: "#291334",
|
|
141
|
+
card: "#ffffff",
|
|
142
|
+
primary: "#65c3c8",
|
|
143
|
+
primaryFg: "#004b50",
|
|
144
|
+
secondary: "#ef9fbc",
|
|
145
|
+
secondaryFg: "#5c2437",
|
|
146
|
+
accent: "#eeaf3a",
|
|
147
|
+
accentFg: "#4a3000",
|
|
148
|
+
border: "#e7e2df",
|
|
149
|
+
radius: "1rem",
|
|
150
|
+
}),
|
|
151
|
+
defineTheme({
|
|
152
|
+
name: "emerald",
|
|
153
|
+
label: "Emerald",
|
|
154
|
+
colorScheme: "light",
|
|
155
|
+
bg: "#ffffff",
|
|
156
|
+
fg: "#333c4d",
|
|
157
|
+
primary: "#66cc8a",
|
|
158
|
+
primaryFg: "#0c3d24",
|
|
159
|
+
secondary: "#377cfb",
|
|
160
|
+
secondaryFg: "#ffffff",
|
|
161
|
+
accent: "#ea5234",
|
|
162
|
+
accentFg: "#ffffff",
|
|
163
|
+
border: "#e5e7eb",
|
|
164
|
+
radius: "0.5rem",
|
|
165
|
+
}),
|
|
166
|
+
defineTheme({
|
|
167
|
+
name: "corporate",
|
|
168
|
+
label: "Corporate",
|
|
169
|
+
colorScheme: "light",
|
|
170
|
+
bg: "#ffffff",
|
|
171
|
+
fg: "#181a2a",
|
|
172
|
+
primary: "#4b6bfb",
|
|
173
|
+
primaryFg: "#ffffff",
|
|
174
|
+
secondary: "#7b92b2",
|
|
175
|
+
secondaryFg: "#ffffff",
|
|
176
|
+
accent: "#67cba0",
|
|
177
|
+
accentFg: "#00382a",
|
|
178
|
+
border: "#e5e7eb",
|
|
179
|
+
radius: "0.25rem",
|
|
180
|
+
}),
|
|
181
|
+
defineTheme({
|
|
182
|
+
name: "retro",
|
|
183
|
+
label: "Retro",
|
|
184
|
+
colorScheme: "light",
|
|
185
|
+
bg: "#ece3ca",
|
|
186
|
+
fg: "#282425",
|
|
187
|
+
card: "#e4d8b4",
|
|
188
|
+
primary: "#ef9995",
|
|
189
|
+
primaryFg: "#282425",
|
|
190
|
+
secondary: "#a4cbb4",
|
|
191
|
+
secondaryFg: "#282425",
|
|
192
|
+
accent: "#dc8850",
|
|
193
|
+
accentFg: "#282425",
|
|
194
|
+
border: "#d1c7a3",
|
|
195
|
+
radius: "0.5rem",
|
|
196
|
+
}),
|
|
197
|
+
defineTheme({
|
|
198
|
+
name: "cyberpunk",
|
|
199
|
+
label: "Cyberpunk",
|
|
200
|
+
colorScheme: "light",
|
|
201
|
+
bg: "#fff248",
|
|
202
|
+
fg: "#0f0f00",
|
|
203
|
+
card: "#fdf700",
|
|
204
|
+
primary: "#ff7598",
|
|
205
|
+
primaryFg: "#330014",
|
|
206
|
+
secondary: "#75d1f0",
|
|
207
|
+
secondaryFg: "#00222e",
|
|
208
|
+
accent: "#c07eec",
|
|
209
|
+
accentFg: "#1e0033",
|
|
210
|
+
border: "#e6dc00",
|
|
211
|
+
radius: "0rem",
|
|
212
|
+
rainbow: [
|
|
213
|
+
"hsl(330 100% 63%)",
|
|
214
|
+
"hsl(280 100% 63%)",
|
|
215
|
+
"hsl(190 100% 60%)",
|
|
216
|
+
"hsl(55 100% 55%)",
|
|
217
|
+
"hsl(150 100% 55%)",
|
|
218
|
+
],
|
|
219
|
+
}),
|
|
220
|
+
defineTheme({
|
|
221
|
+
name: "synthwave",
|
|
222
|
+
label: "Synthwave",
|
|
223
|
+
colorScheme: "dark",
|
|
224
|
+
bg: "#1a103d",
|
|
225
|
+
fg: "#f9f7fd",
|
|
226
|
+
card: "#241650",
|
|
227
|
+
primary: "#e779c1",
|
|
228
|
+
primaryFg: "#2a0e2b",
|
|
229
|
+
secondary: "#58c7f3",
|
|
230
|
+
secondaryFg: "#003044",
|
|
231
|
+
accent: "#f3cc30",
|
|
232
|
+
accentFg: "#3a2e00",
|
|
233
|
+
muted: "#2b1c5e",
|
|
234
|
+
mutedFg: "#b9a9e6",
|
|
235
|
+
border: "#3a2a6b",
|
|
236
|
+
radius: "0.75rem",
|
|
237
|
+
rainbow: [
|
|
238
|
+
"hsl(320 90% 65%)",
|
|
239
|
+
"hsl(280 90% 68%)",
|
|
240
|
+
"hsl(195 95% 60%)",
|
|
241
|
+
"hsl(48 95% 58%)",
|
|
242
|
+
"hsl(160 80% 55%)",
|
|
243
|
+
],
|
|
244
|
+
}),
|
|
245
|
+
defineTheme({
|
|
246
|
+
name: "dracula",
|
|
247
|
+
label: "Dracula",
|
|
248
|
+
colorScheme: "dark",
|
|
249
|
+
bg: "#282a36",
|
|
250
|
+
fg: "#f8f8f2",
|
|
251
|
+
card: "#343746",
|
|
252
|
+
primary: "#ff79c6",
|
|
253
|
+
primaryFg: "#28202b",
|
|
254
|
+
secondary: "#bd93f9",
|
|
255
|
+
secondaryFg: "#241a33",
|
|
256
|
+
accent: "#ffb86c",
|
|
257
|
+
accentFg: "#3a2600",
|
|
258
|
+
muted: "#3a3d4d",
|
|
259
|
+
mutedFg: "#c7c9d6",
|
|
260
|
+
border: "#44475a",
|
|
261
|
+
radius: "0.5rem",
|
|
262
|
+
}),
|
|
263
|
+
defineTheme({
|
|
264
|
+
name: "forest",
|
|
265
|
+
label: "Forest",
|
|
266
|
+
colorScheme: "dark",
|
|
267
|
+
bg: "#171212",
|
|
268
|
+
fg: "#e0ded9",
|
|
269
|
+
card: "#1f1a1a",
|
|
270
|
+
primary: "#1eb854",
|
|
271
|
+
primaryFg: "#04220f",
|
|
272
|
+
secondary: "#1fd65f",
|
|
273
|
+
secondaryFg: "#04220f",
|
|
274
|
+
accent: "#d99330",
|
|
275
|
+
accentFg: "#2b1c00",
|
|
276
|
+
muted: "#26201f",
|
|
277
|
+
mutedFg: "#b3b0aa",
|
|
278
|
+
border: "#2e2726",
|
|
279
|
+
radius: "0.75rem",
|
|
280
|
+
}),
|
|
281
|
+
defineTheme({
|
|
282
|
+
name: "sunset",
|
|
283
|
+
label: "Sunset",
|
|
284
|
+
colorScheme: "dark",
|
|
285
|
+
bg: "#1c1410",
|
|
286
|
+
fg: "#f5e9e0",
|
|
287
|
+
card: "#261a13",
|
|
288
|
+
primary: "oklch(0.62 0.19 30)",
|
|
289
|
+
primaryFg: "#22100a",
|
|
290
|
+
secondary: "oklch(0.7 0.17 8)",
|
|
291
|
+
secondaryFg: "#2a0d0a",
|
|
292
|
+
accent: "oklch(0.7 0.17 8)",
|
|
293
|
+
accentFg: "#2a0d0a",
|
|
294
|
+
muted: "#33241b",
|
|
295
|
+
mutedFg: "#d8c3b4",
|
|
296
|
+
border: "#3a2a20",
|
|
297
|
+
radius: "1rem",
|
|
298
|
+
rainbow: [
|
|
299
|
+
"hsl(12 100% 63%)",
|
|
300
|
+
"hsl(30 100% 63%)",
|
|
301
|
+
"hsl(350 100% 63%)",
|
|
302
|
+
"hsl(320 100% 63%)",
|
|
303
|
+
"hsl(50 100% 63%)",
|
|
304
|
+
],
|
|
305
|
+
}),
|
|
306
|
+
defineTheme({
|
|
307
|
+
name: "ocean",
|
|
308
|
+
label: "Ocean",
|
|
309
|
+
colorScheme: "light",
|
|
310
|
+
bg: "#f4fbff",
|
|
311
|
+
fg: "#0b2a3a",
|
|
312
|
+
card: "#ffffff",
|
|
313
|
+
primary: "oklch(0.55 0.13 230)",
|
|
314
|
+
primaryFg: "#ffffff",
|
|
315
|
+
secondary: "oklch(0.72 0.13 190)",
|
|
316
|
+
secondaryFg: "#00303a",
|
|
317
|
+
accent: "oklch(0.72 0.13 190)",
|
|
318
|
+
accentFg: "#00303a",
|
|
319
|
+
muted: "#e3f1f9",
|
|
320
|
+
mutedFg: "#3a5c6b",
|
|
321
|
+
border: "#d3e7f0",
|
|
322
|
+
radius: "0.5rem",
|
|
323
|
+
rainbow: [
|
|
324
|
+
"hsl(200 100% 63%)",
|
|
325
|
+
"hsl(220 100% 63%)",
|
|
326
|
+
"hsl(180 100% 63%)",
|
|
327
|
+
"hsl(240 100% 63%)",
|
|
328
|
+
"hsl(160 100% 63%)",
|
|
329
|
+
],
|
|
330
|
+
}),
|
|
331
|
+
defineTheme({
|
|
332
|
+
name: "mono",
|
|
333
|
+
label: "Mono",
|
|
334
|
+
colorScheme: "dark",
|
|
335
|
+
bg: "#0a0a0a",
|
|
336
|
+
fg: "#fafafa",
|
|
337
|
+
card: "#161616",
|
|
338
|
+
primary: "oklch(0.32 0 0)",
|
|
339
|
+
primaryFg: "#fafafa",
|
|
340
|
+
secondary: "oklch(0.6 0 0)",
|
|
341
|
+
secondaryFg: "#0a0a0a",
|
|
342
|
+
accent: "oklch(0.6 0 0)",
|
|
343
|
+
accentFg: "#0a0a0a",
|
|
344
|
+
muted: "#1e1e1e",
|
|
345
|
+
mutedFg: "#a3a3a3",
|
|
346
|
+
border: "#2a2a2a",
|
|
347
|
+
radius: "0.25rem",
|
|
348
|
+
rainbow: ["hsl(0 0% 80%)", "hsl(0 0% 65%)", "hsl(0 0% 90%)", "hsl(0 0% 55%)", "hsl(0 0% 75%)"],
|
|
349
|
+
}),
|
|
350
|
+
];
|
|
351
|
+
const themeByName = new Map(themes.map((t) => [t.name, t]));
|
|
352
|
+
export function getTheme(name) {
|
|
353
|
+
return themeByName.get(name);
|
|
354
|
+
}
|
|
355
|
+
export const themeNames = themes.map((t) => t.name);
|
|
356
|
+
export const DEFAULT_THEME = "light";
|
package/dist/types.d.ts
CHANGED