@autumnsgrove/groveengine 0.6.4 → 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/dist/auth/index.d.ts +1 -2
- package/dist/auth/index.js +8 -4
- package/dist/auth/session.d.ts +14 -33
- package/dist/auth/session.js +5 -103
- package/dist/components/admin/FloatingToolbar.svelte +373 -0
- package/dist/components/admin/FloatingToolbar.svelte.d.ts +17 -0
- package/dist/components/admin/MarkdownEditor.svelte +26 -347
- package/dist/components/admin/MarkdownEditor.svelte.d.ts +1 -1
- package/dist/components/admin/composables/index.d.ts +0 -2
- package/dist/components/admin/composables/index.js +0 -2
- package/dist/components/custom/ContentWithGutter.svelte +22 -25
- package/dist/components/custom/MobileTOC.svelte +20 -13
- package/dist/components/quota/UpgradePrompt.svelte +1 -1
- package/dist/server/services/database.d.ts +138 -0
- package/dist/server/services/database.js +234 -0
- package/dist/server/services/index.d.ts +5 -1
- package/dist/server/services/index.js +24 -2
- package/dist/server/services/turnstile.d.ts +66 -0
- package/dist/server/services/turnstile.js +131 -0
- package/dist/server/services/users.d.ts +104 -0
- package/dist/server/services/users.js +158 -0
- package/dist/styles/README.md +50 -0
- package/dist/styles/vine-pattern.css +24 -0
- package/dist/types/turnstile.d.ts +42 -0
- package/dist/ui/components/forms/TurnstileWidget.svelte +111 -0
- package/dist/ui/components/forms/TurnstileWidget.svelte.d.ts +14 -0
- package/dist/ui/components/primitives/dialog/dialog-overlay.svelte +1 -1
- package/dist/ui/components/primitives/sheet/sheet-overlay.svelte +1 -1
- package/dist/ui/components/ui/Glass.svelte +158 -0
- package/dist/ui/components/ui/Glass.svelte.d.ts +52 -0
- package/dist/ui/components/ui/GlassButton.svelte +157 -0
- package/dist/ui/components/ui/GlassButton.svelte.d.ts +39 -0
- package/dist/ui/components/ui/GlassCard.svelte +160 -0
- package/dist/ui/components/ui/GlassCard.svelte.d.ts +39 -0
- package/dist/ui/components/ui/GlassConfirmDialog.svelte +208 -0
- package/dist/ui/components/ui/GlassConfirmDialog.svelte.d.ts +52 -0
- package/dist/ui/components/ui/GlassOverlay.svelte +93 -0
- package/dist/ui/components/ui/GlassOverlay.svelte.d.ts +33 -0
- package/dist/ui/components/ui/Logo.svelte +161 -23
- package/dist/ui/components/ui/Logo.svelte.d.ts +4 -10
- package/dist/ui/components/ui/index.d.ts +5 -0
- package/dist/ui/components/ui/index.js +6 -0
- package/dist/ui/styles/grove.css +136 -0
- package/dist/ui/tokens/fonts.d.ts +69 -0
- package/dist/ui/tokens/fonts.js +341 -0
- package/dist/ui/tokens/index.d.ts +6 -5
- package/dist/ui/tokens/index.js +7 -6
- package/dist/utils/gutter.d.ts +2 -8
- package/dist/utils/markdown.d.ts +1 -0
- package/dist/utils/markdown.js +32 -11
- package/package.json +1 -1
- package/static/robots.txt +520 -0
- package/dist/auth/jwt.d.ts +0 -20
- package/dist/auth/jwt.js +0 -123
- package/dist/components/admin/composables/useCommandPalette.svelte.d.ts +0 -87
- package/dist/components/admin/composables/useCommandPalette.svelte.js +0 -158
- package/dist/components/admin/composables/useSlashCommands.svelte.d.ts +0 -104
- package/dist/components/admin/composables/useSlashCommands.svelte.js +0 -215
package/dist/ui/styles/grove.css
CHANGED
|
@@ -712,4 +712,140 @@
|
|
|
712
712
|
outline: none;
|
|
713
713
|
box-shadow: inset 0 0 0 2px var(--grove-500);
|
|
714
714
|
}
|
|
715
|
+
|
|
716
|
+
/* ─────────────────────────────────────────────────────────────
|
|
717
|
+
GLASSMORPHISM UTILITIES
|
|
718
|
+
|
|
719
|
+
Apply these classes to any element for glass effects.
|
|
720
|
+
Combine with Tailwind backdrop-blur-* for blur intensity.
|
|
721
|
+
|
|
722
|
+
Usage:
|
|
723
|
+
<div class="glass">...</div>
|
|
724
|
+
<div class="glass-accent backdrop-blur-md">...</div>
|
|
725
|
+
───────────────────────────────────────────────────────────── */
|
|
726
|
+
|
|
727
|
+
/* Base glass - light translucent background */
|
|
728
|
+
.glass {
|
|
729
|
+
background-color: rgb(255 255 255 / 0.7);
|
|
730
|
+
border: 1px solid rgb(255 255 255 / 0.3);
|
|
731
|
+
backdrop-filter: blur(4px);
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
:is(.dark .glass) {
|
|
735
|
+
background-color: rgb(30 41 59 / 0.6);
|
|
736
|
+
border-color: rgb(71 85 105 / 0.3);
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
/* Glass surface - higher opacity for headers/navbars */
|
|
740
|
+
.glass-surface {
|
|
741
|
+
background-color: rgb(255 255 255 / 0.95);
|
|
742
|
+
border: 1px solid rgb(255 255 255 / 0.3);
|
|
743
|
+
backdrop-filter: blur(4px);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
:is(.dark .glass-surface) {
|
|
747
|
+
background-color: rgb(30 41 59 / 0.95);
|
|
748
|
+
border-color: rgb(71 85 105 / 0.3);
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
/* Glass overlay - dark backdrop for modals */
|
|
752
|
+
.glass-overlay {
|
|
753
|
+
background-color: rgb(0 0 0 / 0.5);
|
|
754
|
+
backdrop-filter: blur(4px);
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
:is(.dark .glass-overlay) {
|
|
758
|
+
background-color: rgb(0 0 0 / 0.6);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
/* Glass accent - tinted with grove green (accent color) */
|
|
762
|
+
.glass-accent {
|
|
763
|
+
background-color: color-mix(in srgb, var(--grove-500) 20%, transparent);
|
|
764
|
+
border: 1px solid color-mix(in srgb, var(--grove-500) 30%, transparent);
|
|
765
|
+
backdrop-filter: blur(4px);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
:is(.dark .glass-accent) {
|
|
769
|
+
background-color: color-mix(in srgb, var(--grove-500) 15%, transparent);
|
|
770
|
+
border-color: color-mix(in srgb, var(--grove-500) 20%, transparent);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/* Glass muted - subtle, barely visible */
|
|
774
|
+
.glass-muted {
|
|
775
|
+
background-color: rgb(255 255 255 / 0.4);
|
|
776
|
+
border: 1px solid rgb(255 255 255 / 0.2);
|
|
777
|
+
backdrop-filter: blur(4px);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
:is(.dark .glass-muted) {
|
|
781
|
+
background-color: rgb(15 23 42 / 0.3);
|
|
782
|
+
border-color: rgb(51 65 85 / 0.2);
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/* Glass tint - light background for text readability */
|
|
786
|
+
.glass-tint {
|
|
787
|
+
background-color: rgb(255 255 255 / 0.6);
|
|
788
|
+
border: 1px solid rgb(255 255 255 / 0.2);
|
|
789
|
+
backdrop-filter: blur(4px);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
:is(.dark .glass-tint) {
|
|
793
|
+
background-color: rgb(15 23 42 / 0.5);
|
|
794
|
+
border-color: rgb(51 65 85 / 0.3);
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
/* Glass dark - dark translucent background */
|
|
798
|
+
.glass-dark {
|
|
799
|
+
background-color: rgb(15 23 42 / 0.7);
|
|
800
|
+
border: 1px solid rgb(51 65 85 / 0.3);
|
|
801
|
+
backdrop-filter: blur(4px);
|
|
802
|
+
color: white;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
:is(.dark .glass-dark) {
|
|
806
|
+
background-color: rgb(2 6 23 / 0.8);
|
|
807
|
+
border-color: rgb(51 65 85 / 0.3);
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
/* Glass frosted - stronger effect, more opaque */
|
|
811
|
+
.glass-frosted {
|
|
812
|
+
background-color: rgb(255 255 255 / 0.85);
|
|
813
|
+
border: 1px solid rgb(255 255 255 / 0.4);
|
|
814
|
+
backdrop-filter: blur(12px);
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
:is(.dark .glass-frosted) {
|
|
818
|
+
background-color: rgb(30 41 59 / 0.8);
|
|
819
|
+
border-color: rgb(71 85 105 / 0.4);
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
/* No border variants */
|
|
823
|
+
.glass-borderless {
|
|
824
|
+
border: none;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/* Hover states for interactive glass elements */
|
|
828
|
+
.glass-hover:hover {
|
|
829
|
+
background-color: rgb(255 255 255 / 0.85);
|
|
830
|
+
border-color: rgb(255 255 255 / 0.5);
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
:is(.dark .glass-hover:hover) {
|
|
834
|
+
background-color: rgb(30 41 59 / 0.75);
|
|
835
|
+
border-color: rgb(71 85 105 / 0.4);
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/* Reduced motion: disable blur effects for performance/accessibility */
|
|
839
|
+
@media (prefers-reduced-motion: reduce) {
|
|
840
|
+
.glass,
|
|
841
|
+
.glass-surface,
|
|
842
|
+
.glass-overlay,
|
|
843
|
+
.glass-accent,
|
|
844
|
+
.glass-muted,
|
|
845
|
+
.glass-tint,
|
|
846
|
+
.glass-dark,
|
|
847
|
+
.glass-frosted {
|
|
848
|
+
backdrop-filter: none;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
715
851
|
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grove Design System - Font Tokens
|
|
3
|
+
*
|
|
4
|
+
* Complete font catalog with metadata, CDN URLs, and helper utilities.
|
|
5
|
+
* All fonts are served from cdn.grove.place for optimal performance.
|
|
6
|
+
*/
|
|
7
|
+
/** CDN base URL for all font assets */
|
|
8
|
+
export declare const FONT_CDN_BASE = "https://cdn.grove.place/fonts";
|
|
9
|
+
/** Font category for organizing fonts */
|
|
10
|
+
export type FontCategory = "default" | "accessibility" | "sans-serif" | "serif" | "monospace" | "display";
|
|
11
|
+
/** Font format for @font-face src declarations */
|
|
12
|
+
export type FontFormat = "truetype" | "opentype";
|
|
13
|
+
/** Complete font definition with metadata */
|
|
14
|
+
export interface FontDefinition {
|
|
15
|
+
/** Unique identifier used in database and fontMap */
|
|
16
|
+
id: string;
|
|
17
|
+
/** Display name shown to users */
|
|
18
|
+
name: string;
|
|
19
|
+
/** Font file name on CDN */
|
|
20
|
+
file: string;
|
|
21
|
+
/** Font format (truetype or opentype) */
|
|
22
|
+
format: FontFormat;
|
|
23
|
+
/** CSS font-family name (may include spaces) */
|
|
24
|
+
fontFamily: string;
|
|
25
|
+
/** Category for organizing fonts */
|
|
26
|
+
category: FontCategory;
|
|
27
|
+
/** Brief description of the font's purpose/style */
|
|
28
|
+
description: string;
|
|
29
|
+
/** CSS fallback stack */
|
|
30
|
+
fallback: string[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Complete catalog of available fonts
|
|
34
|
+
* These fonts are served from cdn.grove.place
|
|
35
|
+
*/
|
|
36
|
+
export declare const fonts: readonly FontDefinition[];
|
|
37
|
+
/** All valid font IDs */
|
|
38
|
+
export type FontId = (typeof fonts)[number]["id"];
|
|
39
|
+
/** Map of font IDs to their definitions */
|
|
40
|
+
export declare const fontById: Record<FontId, FontDefinition>;
|
|
41
|
+
/** Get fonts by category */
|
|
42
|
+
export declare function getFontsByCategory(category: FontCategory): FontDefinition[];
|
|
43
|
+
/** Get CDN URL for a font */
|
|
44
|
+
export declare function getFontUrl(fontIdOrFile: string): string;
|
|
45
|
+
/** Get complete CSS font-family value with fallbacks */
|
|
46
|
+
export declare function getFontStack(fontId: FontId): string;
|
|
47
|
+
/**
|
|
48
|
+
* Generate @font-face CSS for a single font
|
|
49
|
+
* @param fontId - Font ID to generate CSS for
|
|
50
|
+
* @returns CSS @font-face declaration string
|
|
51
|
+
*/
|
|
52
|
+
export declare function generateFontFace(fontId: FontId): string;
|
|
53
|
+
/**
|
|
54
|
+
* Generate @font-face CSS for multiple fonts
|
|
55
|
+
* @param fontIds - Array of font IDs (defaults to all fonts)
|
|
56
|
+
* @returns CSS string with all @font-face declarations
|
|
57
|
+
*/
|
|
58
|
+
export declare function generateAllFontFaces(fontIds?: FontId[]): string;
|
|
59
|
+
/**
|
|
60
|
+
* Font map matching the format used in +layout.svelte
|
|
61
|
+
* Maps font IDs to their complete CSS font-family values
|
|
62
|
+
*/
|
|
63
|
+
export declare const fontMap: Record<FontId, string>;
|
|
64
|
+
/** Default font ID */
|
|
65
|
+
export declare const DEFAULT_FONT: FontId;
|
|
66
|
+
/** Total number of available fonts */
|
|
67
|
+
export declare const FONT_COUNT: number;
|
|
68
|
+
/** Font categories with human-readable labels */
|
|
69
|
+
export declare const fontCategoryLabels: Record<FontCategory, string>;
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grove Design System - Font Tokens
|
|
3
|
+
*
|
|
4
|
+
* Complete font catalog with metadata, CDN URLs, and helper utilities.
|
|
5
|
+
* All fonts are served from cdn.grove.place for optimal performance.
|
|
6
|
+
*/
|
|
7
|
+
/** CDN base URL for all font assets */
|
|
8
|
+
export const FONT_CDN_BASE = "https://cdn.grove.place/fonts";
|
|
9
|
+
/**
|
|
10
|
+
* Complete catalog of available fonts
|
|
11
|
+
* These fonts are served from cdn.grove.place
|
|
12
|
+
*/
|
|
13
|
+
export const fonts = [
|
|
14
|
+
// Default
|
|
15
|
+
{
|
|
16
|
+
id: "lexend",
|
|
17
|
+
name: "Lexend",
|
|
18
|
+
file: "Lexend-Regular.ttf",
|
|
19
|
+
format: "truetype",
|
|
20
|
+
fontFamily: "Lexend",
|
|
21
|
+
category: "default",
|
|
22
|
+
description: "Modern, highly readable sans-serif. Grove default.",
|
|
23
|
+
fallback: [
|
|
24
|
+
"-apple-system",
|
|
25
|
+
"BlinkMacSystemFont",
|
|
26
|
+
"Segoe UI",
|
|
27
|
+
"Roboto",
|
|
28
|
+
"sans-serif",
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
// Accessibility fonts
|
|
32
|
+
{
|
|
33
|
+
id: "atkinson",
|
|
34
|
+
name: "Atkinson Hyperlegible",
|
|
35
|
+
file: "AtkinsonHyperlegible-Regular.ttf",
|
|
36
|
+
format: "truetype",
|
|
37
|
+
fontFamily: "Atkinson Hyperlegible",
|
|
38
|
+
category: "accessibility",
|
|
39
|
+
description: "Designed for low vision readers. Maximum character distinction.",
|
|
40
|
+
fallback: [
|
|
41
|
+
"-apple-system",
|
|
42
|
+
"BlinkMacSystemFont",
|
|
43
|
+
"Segoe UI",
|
|
44
|
+
"Roboto",
|
|
45
|
+
"sans-serif",
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: "opendyslexic",
|
|
50
|
+
name: "OpenDyslexic",
|
|
51
|
+
file: "OpenDyslexic-Regular.otf",
|
|
52
|
+
format: "opentype",
|
|
53
|
+
fontFamily: "OpenDyslexic",
|
|
54
|
+
category: "accessibility",
|
|
55
|
+
description: "Weighted bottoms reduce letter confusion for dyslexic readers.",
|
|
56
|
+
fallback: [
|
|
57
|
+
"-apple-system",
|
|
58
|
+
"BlinkMacSystemFont",
|
|
59
|
+
"Segoe UI",
|
|
60
|
+
"Roboto",
|
|
61
|
+
"sans-serif",
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "luciole",
|
|
66
|
+
name: "Luciole",
|
|
67
|
+
file: "Luciole-Regular.ttf",
|
|
68
|
+
format: "truetype",
|
|
69
|
+
fontFamily: "Luciole",
|
|
70
|
+
category: "accessibility",
|
|
71
|
+
description: "French accessibility font designed for visually impaired readers.",
|
|
72
|
+
fallback: [
|
|
73
|
+
"-apple-system",
|
|
74
|
+
"BlinkMacSystemFont",
|
|
75
|
+
"Segoe UI",
|
|
76
|
+
"Roboto",
|
|
77
|
+
"sans-serif",
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
// Modern sans-serif fonts
|
|
81
|
+
{
|
|
82
|
+
id: "nunito",
|
|
83
|
+
name: "Nunito",
|
|
84
|
+
file: "Nunito-Regular.ttf",
|
|
85
|
+
format: "truetype",
|
|
86
|
+
fontFamily: "Nunito",
|
|
87
|
+
category: "sans-serif",
|
|
88
|
+
description: "Friendly rounded sans-serif. Warm and approachable.",
|
|
89
|
+
fallback: [
|
|
90
|
+
"-apple-system",
|
|
91
|
+
"BlinkMacSystemFont",
|
|
92
|
+
"Segoe UI",
|
|
93
|
+
"Roboto",
|
|
94
|
+
"sans-serif",
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: "quicksand",
|
|
99
|
+
name: "Quicksand",
|
|
100
|
+
file: "Quicksand-Regular.ttf",
|
|
101
|
+
format: "truetype",
|
|
102
|
+
fontFamily: "Quicksand",
|
|
103
|
+
category: "sans-serif",
|
|
104
|
+
description: "Geometric sans with rounded terminals. Light and modern.",
|
|
105
|
+
fallback: [
|
|
106
|
+
"-apple-system",
|
|
107
|
+
"BlinkMacSystemFont",
|
|
108
|
+
"Segoe UI",
|
|
109
|
+
"Roboto",
|
|
110
|
+
"sans-serif",
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: "manrope",
|
|
115
|
+
name: "Manrope",
|
|
116
|
+
file: "Manrope-Regular.ttf",
|
|
117
|
+
format: "truetype",
|
|
118
|
+
fontFamily: "Manrope",
|
|
119
|
+
category: "sans-serif",
|
|
120
|
+
description: "Professional geometric sans. Clean and contemporary.",
|
|
121
|
+
fallback: [
|
|
122
|
+
"-apple-system",
|
|
123
|
+
"BlinkMacSystemFont",
|
|
124
|
+
"Segoe UI",
|
|
125
|
+
"Roboto",
|
|
126
|
+
"sans-serif",
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: "instrument-sans",
|
|
131
|
+
name: "Instrument Sans",
|
|
132
|
+
file: "InstrumentSans-Regular.ttf",
|
|
133
|
+
format: "truetype",
|
|
134
|
+
fontFamily: "Instrument Sans",
|
|
135
|
+
category: "sans-serif",
|
|
136
|
+
description: "Low contrast sans with humanist touches. Elegant simplicity.",
|
|
137
|
+
fallback: [
|
|
138
|
+
"-apple-system",
|
|
139
|
+
"BlinkMacSystemFont",
|
|
140
|
+
"Segoe UI",
|
|
141
|
+
"Roboto",
|
|
142
|
+
"sans-serif",
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: "plus-jakarta-sans",
|
|
147
|
+
name: "Plus Jakarta Sans",
|
|
148
|
+
file: "PlusJakartaSans-Regular.ttf",
|
|
149
|
+
format: "truetype",
|
|
150
|
+
fontFamily: "Plus Jakarta Sans",
|
|
151
|
+
category: "sans-serif",
|
|
152
|
+
description: "Contemporary geometric sans. Balanced and versatile.",
|
|
153
|
+
fallback: [
|
|
154
|
+
"-apple-system",
|
|
155
|
+
"BlinkMacSystemFont",
|
|
156
|
+
"Segoe UI",
|
|
157
|
+
"Roboto",
|
|
158
|
+
"sans-serif",
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
// Serif fonts
|
|
162
|
+
{
|
|
163
|
+
id: "cormorant",
|
|
164
|
+
name: "Cormorant",
|
|
165
|
+
file: "Cormorant-Regular.ttf",
|
|
166
|
+
format: "truetype",
|
|
167
|
+
fontFamily: "Cormorant",
|
|
168
|
+
category: "serif",
|
|
169
|
+
description: "Elegant display serif inspired by Garamond. Refined and classic.",
|
|
170
|
+
fallback: ["Georgia", "Times New Roman", "serif"],
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
id: "bodoni-moda",
|
|
174
|
+
name: "Bodoni Moda",
|
|
175
|
+
file: "BodoniModa-Regular.ttf",
|
|
176
|
+
format: "truetype",
|
|
177
|
+
fontFamily: "Bodoni Moda",
|
|
178
|
+
category: "serif",
|
|
179
|
+
description: "High contrast modern serif. Bold and sophisticated.",
|
|
180
|
+
fallback: ["Georgia", "Times New Roman", "serif"],
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
id: "lora",
|
|
184
|
+
name: "Lora",
|
|
185
|
+
file: "Lora-Regular.ttf",
|
|
186
|
+
format: "truetype",
|
|
187
|
+
fontFamily: "Lora",
|
|
188
|
+
category: "serif",
|
|
189
|
+
description: "Well-balanced contemporary serif. Excellent for body text.",
|
|
190
|
+
fallback: ["Georgia", "Times New Roman", "serif"],
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "eb-garamond",
|
|
194
|
+
name: "EB Garamond",
|
|
195
|
+
file: "EBGaramond-Regular.ttf",
|
|
196
|
+
format: "truetype",
|
|
197
|
+
fontFamily: "EB Garamond",
|
|
198
|
+
category: "serif",
|
|
199
|
+
description: "Revival of classic Garamond. Timeless book typography.",
|
|
200
|
+
fallback: ["Georgia", "Times New Roman", "serif"],
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
id: "merriweather",
|
|
204
|
+
name: "Merriweather",
|
|
205
|
+
file: "Merriweather-Regular.ttf",
|
|
206
|
+
format: "truetype",
|
|
207
|
+
fontFamily: "Merriweather",
|
|
208
|
+
category: "serif",
|
|
209
|
+
description: "Designed for screen reading. Excellent legibility.",
|
|
210
|
+
fallback: ["Georgia", "Times New Roman", "serif"],
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
id: "fraunces",
|
|
214
|
+
name: "Fraunces",
|
|
215
|
+
file: "Fraunces-Regular.ttf",
|
|
216
|
+
format: "truetype",
|
|
217
|
+
fontFamily: "Fraunces",
|
|
218
|
+
category: "serif",
|
|
219
|
+
description: 'Soft serif with "wonky" optical axes. Warm personality.',
|
|
220
|
+
fallback: ["Georgia", "Times New Roman", "serif"],
|
|
221
|
+
},
|
|
222
|
+
// Monospace fonts
|
|
223
|
+
{
|
|
224
|
+
id: "ibm-plex-mono",
|
|
225
|
+
name: "IBM Plex Mono",
|
|
226
|
+
file: "IBMPlexMono-Regular.ttf",
|
|
227
|
+
format: "truetype",
|
|
228
|
+
fontFamily: "IBM Plex Mono",
|
|
229
|
+
category: "monospace",
|
|
230
|
+
description: "Corporate monospace with human warmth. Great for code.",
|
|
231
|
+
fallback: ["Courier New", "Consolas", "monospace"],
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
id: "cozette",
|
|
235
|
+
name: "Cozette",
|
|
236
|
+
file: "CozetteVector.ttf",
|
|
237
|
+
format: "truetype",
|
|
238
|
+
fontFamily: "Cozette",
|
|
239
|
+
category: "monospace",
|
|
240
|
+
description: "Bitmap-style vector font. Retro terminal aesthetic.",
|
|
241
|
+
fallback: ["Courier New", "Consolas", "monospace"],
|
|
242
|
+
},
|
|
243
|
+
// Display/special fonts
|
|
244
|
+
{
|
|
245
|
+
id: "alagard",
|
|
246
|
+
name: "Alagard",
|
|
247
|
+
file: "alagard.ttf",
|
|
248
|
+
format: "truetype",
|
|
249
|
+
fontFamily: "Alagard",
|
|
250
|
+
category: "display",
|
|
251
|
+
description: "Pixel art medieval display font. Fantasy and gaming.",
|
|
252
|
+
fallback: ["fantasy", "cursive"],
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
id: "calistoga",
|
|
256
|
+
name: "Calistoga",
|
|
257
|
+
file: "Calistoga-Regular.ttf",
|
|
258
|
+
format: "truetype",
|
|
259
|
+
fontFamily: "Calistoga",
|
|
260
|
+
category: "display",
|
|
261
|
+
description: "Casual brush serif. Friendly headlines.",
|
|
262
|
+
fallback: ["Georgia", "serif"],
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
id: "caveat",
|
|
266
|
+
name: "Caveat",
|
|
267
|
+
file: "Caveat-Regular.ttf",
|
|
268
|
+
format: "truetype",
|
|
269
|
+
fontFamily: "Caveat",
|
|
270
|
+
category: "display",
|
|
271
|
+
description: "Handwritten script. Personal and informal.",
|
|
272
|
+
fallback: ["cursive", "sans-serif"],
|
|
273
|
+
},
|
|
274
|
+
];
|
|
275
|
+
/** Map of font IDs to their definitions */
|
|
276
|
+
export const fontById = Object.fromEntries(fonts.map((font) => [font.id, font]));
|
|
277
|
+
/** Get fonts by category */
|
|
278
|
+
export function getFontsByCategory(category) {
|
|
279
|
+
return fonts.filter((font) => font.category === category);
|
|
280
|
+
}
|
|
281
|
+
/** Get CDN URL for a font */
|
|
282
|
+
export function getFontUrl(fontIdOrFile) {
|
|
283
|
+
// If it's a font ID, look up the file
|
|
284
|
+
const font = fonts.find((f) => f.id === fontIdOrFile);
|
|
285
|
+
const file = font ? font.file : fontIdOrFile;
|
|
286
|
+
return `${FONT_CDN_BASE}/${file}`;
|
|
287
|
+
}
|
|
288
|
+
/** Get complete CSS font-family value with fallbacks */
|
|
289
|
+
export function getFontStack(fontId) {
|
|
290
|
+
const font = fontById[fontId];
|
|
291
|
+
if (!font)
|
|
292
|
+
return fontById.lexend.fallback.join(", ");
|
|
293
|
+
const primary = font.fontFamily.includes(" ")
|
|
294
|
+
? `'${font.fontFamily}'`
|
|
295
|
+
: font.fontFamily;
|
|
296
|
+
return [primary, ...font.fallback].join(", ");
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Generate @font-face CSS for a single font
|
|
300
|
+
* @param fontId - Font ID to generate CSS for
|
|
301
|
+
* @returns CSS @font-face declaration string
|
|
302
|
+
*/
|
|
303
|
+
export function generateFontFace(fontId) {
|
|
304
|
+
const font = fontById[fontId];
|
|
305
|
+
if (!font)
|
|
306
|
+
return "";
|
|
307
|
+
return `@font-face {
|
|
308
|
+
font-family: '${font.fontFamily}';
|
|
309
|
+
src: url('${getFontUrl(font.file)}') format('${font.format}');
|
|
310
|
+
font-weight: normal;
|
|
311
|
+
font-style: normal;
|
|
312
|
+
font-display: swap;
|
|
313
|
+
}`;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Generate @font-face CSS for multiple fonts
|
|
317
|
+
* @param fontIds - Array of font IDs (defaults to all fonts)
|
|
318
|
+
* @returns CSS string with all @font-face declarations
|
|
319
|
+
*/
|
|
320
|
+
export function generateAllFontFaces(fontIds) {
|
|
321
|
+
const ids = fontIds ?? fonts.map((f) => f.id);
|
|
322
|
+
return ids.map(generateFontFace).filter(Boolean).join("\n\n");
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Font map matching the format used in +layout.svelte
|
|
326
|
+
* Maps font IDs to their complete CSS font-family values
|
|
327
|
+
*/
|
|
328
|
+
export const fontMap = Object.fromEntries(fonts.map((font) => [font.id, getFontStack(font.id)]));
|
|
329
|
+
/** Default font ID */
|
|
330
|
+
export const DEFAULT_FONT = "lexend";
|
|
331
|
+
/** Total number of available fonts */
|
|
332
|
+
export const FONT_COUNT = fonts.length;
|
|
333
|
+
/** Font categories with human-readable labels */
|
|
334
|
+
export const fontCategoryLabels = {
|
|
335
|
+
default: "Default",
|
|
336
|
+
accessibility: "Accessibility",
|
|
337
|
+
"sans-serif": "Sans-Serif",
|
|
338
|
+
serif: "Serif",
|
|
339
|
+
monospace: "Monospace",
|
|
340
|
+
display: "Display & Special",
|
|
341
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./colors.js";
|
|
2
|
+
export * from "./typography.js";
|
|
3
|
+
export * from "./spacing.js";
|
|
4
|
+
export * from "./effects.js";
|
|
5
|
+
export * from "./animation.js";
|
|
6
|
+
export * from "./fonts.js";
|
|
6
7
|
export declare const TOKENS_VERSION = "0.2.0";
|
package/dist/ui/tokens/index.js
CHANGED
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
// - Bark Brown: Text and dark accents (#3d2914)
|
|
12
12
|
// - Cream: Background and light surfaces (#fefdfb)
|
|
13
13
|
// Design token exports
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export
|
|
14
|
+
export * from "./colors.js";
|
|
15
|
+
export * from "./typography.js";
|
|
16
|
+
export * from "./spacing.js";
|
|
17
|
+
export * from "./effects.js";
|
|
18
|
+
export * from "./animation.js";
|
|
19
|
+
export * from "./fonts.js";
|
|
20
|
+
export const TOKENS_VERSION = "0.2.0";
|
package/dist/utils/gutter.d.ts
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* and anchor resolution. Used by ContentWithGutter component and related
|
|
6
6
|
* functionality across the site.
|
|
7
7
|
*/
|
|
8
|
+
import type { GutterItem as MarkdownGutterItem } from "./markdown.js";
|
|
9
|
+
export type GutterItem = MarkdownGutterItem;
|
|
8
10
|
/** Anchor types supported by the gutter system */
|
|
9
11
|
export type AnchorType = "none" | "paragraph" | "tag" | "header";
|
|
10
12
|
/** Parsed anchor result */
|
|
@@ -18,14 +20,6 @@ export interface Header {
|
|
|
18
20
|
text: string;
|
|
19
21
|
level?: number;
|
|
20
22
|
}
|
|
21
|
-
/** Gutter item with anchor */
|
|
22
|
-
export interface GutterItem {
|
|
23
|
-
anchor?: string;
|
|
24
|
-
type?: string;
|
|
25
|
-
content?: string;
|
|
26
|
-
src?: string;
|
|
27
|
-
[key: string]: unknown;
|
|
28
|
-
}
|
|
29
23
|
/**
|
|
30
24
|
* Parse anchor string to determine anchor type and value
|
|
31
25
|
* @param anchor - The anchor string from manifest
|
package/dist/utils/markdown.d.ts
CHANGED