@knitli/docs-components 1.0.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.
@@ -0,0 +1,219 @@
1
+ /**
2
+ * @file variables.css
3
+ * @description CSS custom properties for Copper Archive theme
4
+ * @usage Import this file alone to access all variables for customization
5
+ */
6
+
7
+ :root {
8
+ /* ========================================
9
+ COLOR PALETTE - Copper Archive
10
+ ======================================== */
11
+
12
+ /* Primary Colors */
13
+ --docs-copper: oklch(0.58 0.08 50); /* #b56c30 - Warm copper accent */
14
+ --docs-copper-hover: oklch(0.62 0.1 50); /* Brighter on hover */
15
+ --docs-slate: oklch(0.35 0.02 240); /* #485563 - Technical foundation */
16
+
17
+ /* Background Colors */
18
+ --docs-parchment: oklch(0.96 0.015 70); /* #F2ECE7 - Warm paper */
19
+ --docs-cream: oklch(0.945 0.016 65); /* Slightly warmer parchment */
20
+ --docs-white: oklch(0.984 0.003 229); /* Crisp white for contrast */
21
+
22
+ /* Text Colors */
23
+ --docs-ink: oklch(0.25 0.015 260); /* Deep blue-black for readability */
24
+ --docs-text-primary: var(--docs-ink);
25
+ --docs-text-secondary: oklch(0.45 0.01 250); /* Medium gray */
26
+ --docs-text-muted: oklch(0.6 0.005 240); /* Light gray */
27
+
28
+ /* Border Colors */
29
+ --docs-border-light: oklch(0.85 0.01 50);
30
+ --docs-border-medium: oklch(0.75 0.015 50);
31
+ --docs-border-copper: var(--docs-copper);
32
+
33
+ /* ========================================
34
+ TYPOGRAPHY
35
+ ======================================== */
36
+
37
+ /* Font Families */
38
+ --font-docs-display: 'DM Mono', 'Courier New', monospace;
39
+ --font-docs-body: 'IBM Plex Serif', Georgia, serif;
40
+ --font-docs-code: 'JetBrains Mono', 'Consolas', monospace;
41
+ --font-docs-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
42
+
43
+ /* Font Sizes */
44
+ --text-xs: 0.625rem; /* 10px */
45
+ --text-sm: 0.875rem; /* 14px */
46
+ --text-base: 1rem; /* 16px */
47
+ --text-lg: 1.125rem; /* 18px */
48
+ --text-xl: 1.25rem; /* 20px */
49
+ --text-2xl: 1.5rem; /* 24px */
50
+ --text-3xl: 2rem; /* 32px */
51
+ --text-4xl: 2.5rem; /* 40px */
52
+ --text-5xl: 3rem; /* 48px */
53
+ --text-6xl: 4rem; /* 64px */
54
+
55
+ /* Font Weights */
56
+ --font-regular: 400;
57
+ --font-medium: 500;
58
+ --font-semibold: 600;
59
+ --font-bold: 700;
60
+
61
+ /* Line Heights */
62
+ --leading-tight: 1.25;
63
+ --leading-snug: 1.375;
64
+ --leading-normal: 1.5;
65
+ --leading-relaxed: 1.625;
66
+ --leading-loose: 2;
67
+
68
+ /* Letter Spacing */
69
+ --tracking-tight: -0.02em;
70
+ --tracking-normal: 0;
71
+ --tracking-wide: 0.05em;
72
+ --tracking-wider: 0.1em;
73
+
74
+ /* ========================================
75
+ SPACING SYSTEM
76
+ ======================================== */
77
+
78
+ --space-0: 0;
79
+ --space-1: 0.25rem; /* 4px */
80
+ --space-2: 0.5rem; /* 8px */
81
+ --space-3: 0.75rem; /* 12px */
82
+ --space-4: 1rem; /* 16px */
83
+ --space-5: 1.25rem; /* 20px */
84
+ --space-6: 1.5rem; /* 24px */
85
+ --space-8: 2rem; /* 32px */
86
+ --space-10: 2.5rem; /* 40px */
87
+ --space-12: 3rem; /* 48px */
88
+ --space-16: 4rem; /* 64px */
89
+ --space-20: 5rem; /* 80px */
90
+ --space-24: 6rem; /* 96px */
91
+
92
+ /* ========================================
93
+ LAYOUT
94
+ ======================================== */
95
+
96
+ /* Container Widths */
97
+ --container-sm: 640px;
98
+ --container-md: 768px;
99
+ --container-lg: 1024px;
100
+ --container-xl: 1280px;
101
+ --container-2xl: 1536px;
102
+
103
+ /* Border Radius */
104
+ --radius-sm: 4px;
105
+ --radius-md: 8px;
106
+ --radius-lg: 12px;
107
+ --radius-xl: 16px;
108
+ --radius-full: 9999px;
109
+
110
+ /* ========================================
111
+ SHADOWS
112
+ ======================================== */
113
+
114
+ /* Embossed Effects */
115
+ --shadow-emboss:
116
+ inset 0 1px 2px rgba(255, 255, 255, 0.8),
117
+ 0 4px 16px rgba(0, 0, 0, 0.08),
118
+ 0 1px 3px rgba(0, 0, 0, 0.12);
119
+
120
+ --shadow-emboss-hover:
121
+ inset 0 1px 2px rgba(255, 255, 255, 0.9),
122
+ 0 8px 24px rgba(184, 108, 48, 0.15),
123
+ 0 2px 6px rgba(0, 0, 0, 0.12);
124
+
125
+ --shadow-emboss-strong:
126
+ inset 0 1px 2px rgba(255, 255, 255, 0.9),
127
+ 0 12px 32px rgba(184, 108, 48, 0.2),
128
+ 0 3px 8px rgba(0, 0, 0, 0.15);
129
+
130
+ /* Standard Shadows */
131
+ --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
132
+ --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
133
+ --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
134
+ --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
135
+
136
+ /* ========================================
137
+ ANIMATION TIMING
138
+ ======================================== */
139
+
140
+ --timing-fast: 150ms;
141
+ --timing-base: 300ms;
142
+ --timing-slow: 500ms;
143
+
144
+ --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
145
+ --ease-out: cubic-bezier(0, 0, 0.2, 1);
146
+ --ease-in: cubic-bezier(0.4, 0, 1, 1);
147
+
148
+ /* ========================================
149
+ Z-INDEX LAYERS
150
+ ======================================== */
151
+
152
+ --z-base: 0;
153
+ --z-dropdown: 1000;
154
+ --z-sticky: 1020;
155
+ --z-fixed: 1030;
156
+ --z-overlay: 1040;
157
+ --z-modal: 1050;
158
+ --z-popover: 1060;
159
+ --z-tooltip: 1070;
160
+
161
+ /* ========================================
162
+ COMPONENT-SPECIFIC
163
+ ======================================== */
164
+
165
+ /* Card */
166
+ --card-padding: var(--space-8);
167
+ --card-padding-mobile: var(--space-6);
168
+ --card-radius: var(--radius-lg);
169
+ --card-border-width: 1px;
170
+
171
+ /* Code Block */
172
+ --code-bg: oklch(0.15 0.01 260);
173
+ --code-text: oklch(0.85 0.02 180);
174
+ --code-padding: var(--space-4);
175
+ --code-radius: var(--radius-md);
176
+
177
+ /* Header */
178
+ --header-height: 4rem;
179
+ --header-bg: var(--docs-parchment);
180
+ --header-border: var(--docs-border-light);
181
+
182
+ /* Focus Ring */
183
+ --focus-ring-width: 3px;
184
+ --focus-ring-color: var(--docs-copper);
185
+ --focus-ring-offset: 4px;
186
+
187
+ /* Corner Brackets */
188
+ --bracket-size: 24px;
189
+ --bracket-width: 2px;
190
+ --bracket-color: var(--docs-copper);
191
+
192
+ /* ========================================
193
+ RESPONSIVE BREAKPOINTS
194
+ ======================================== */
195
+
196
+ --breakpoint-sm: 640px;
197
+ --breakpoint-md: 768px;
198
+ --breakpoint-lg: 1024px;
199
+ --breakpoint-xl: 1280px;
200
+ --breakpoint-2xl: 1536px;
201
+ }
202
+
203
+ /* ========================================
204
+ DARK MODE VARIABLES (Optional)
205
+ ======================================== */
206
+
207
+ @media (prefers-color-scheme: dark) {
208
+ :root {
209
+ --docs-parchment: oklch(0.2 0.01 260);
210
+ --docs-cream: oklch(0.22 0.01 260);
211
+ --docs-white: oklch(0.25 0.01 260);
212
+ --docs-ink: oklch(0.9 0.01 180);
213
+ --docs-text-primary: oklch(0.85 0.01 180);
214
+ --docs-text-secondary: oklch(0.65 0.01 200);
215
+ --docs-text-muted: oklch(0.5 0.01 220);
216
+ --docs-border-light: oklch(0.3 0.01 240);
217
+ --docs-border-medium: oklch(0.4 0.01 240);
218
+ }
219
+ }
@@ -0,0 +1,89 @@
1
+ // SPDX-FileCopyrightText: 2025 Knitli Inc.
2
+ // SPDX-FileContributor: Adam Poulemanos <adam@knit.li>
3
+ //
4
+ // SPDX-License-Identifier: MIT OR Apache-2.0
5
+ //
6
+ // TypeScript type definitions for docs-components package
7
+
8
+ /**
9
+ * Supported Knitli products for documentation
10
+ */
11
+ export type ProductName = 'ReCoco' | 'CodeWeaver' | 'Thread';
12
+
13
+ /**
14
+ * Site URLs configuration
15
+ */
16
+ export interface SiteUrls {
17
+ marketing: string;
18
+ blog: string;
19
+ docs: string;
20
+ }
21
+
22
+ /**
23
+ * Props for DocsHeader component
24
+ */
25
+ export interface DocsHeaderProps {
26
+ /**
27
+ * Current product being documented
28
+ */
29
+ currentProduct?: ProductName;
30
+
31
+ /**
32
+ * Current URL path
33
+ */
34
+ currentPath?: string;
35
+
36
+ /**
37
+ * URL to the product's documentation home
38
+ */
39
+ productUrl?: string;
40
+
41
+ /**
42
+ * Whether to show breadcrumb navigation
43
+ * @default true
44
+ */
45
+ showBreadcrumb?: boolean;
46
+
47
+ /**
48
+ * Visual variant of the header
49
+ * @default 'default'
50
+ */
51
+ variant?: 'default' | 'minimal';
52
+ }
53
+
54
+ /**
55
+ * Props for DocsFooter component
56
+ */
57
+ export interface DocsFooterProps {
58
+ /**
59
+ * Visual variant of the footer
60
+ * @default 'default'
61
+ */
62
+ variant?: 'default' | 'minimal';
63
+ }
64
+
65
+ /**
66
+ * Props for DocsBreadcrumb component
67
+ */
68
+ export interface DocsBreadcrumbProps {
69
+ /**
70
+ * Current product name
71
+ */
72
+ product?: ProductName;
73
+
74
+ /**
75
+ * URL to the product's documentation home
76
+ */
77
+ productUrl?: string;
78
+
79
+ /**
80
+ * Current path within the product docs
81
+ */
82
+ path?: string;
83
+
84
+ /**
85
+ * Visual variant of the breadcrumb
86
+ * @default 'default'
87
+ */
88
+ variant?: 'default' | 'compact';
89
+ }