@abstractdata/starlight-theme 0.2.0 → 0.3.1
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/package.json +7 -2
- package/src/ambient.d.ts +40 -0
- package/src/styles/hud.css +13 -1
- package/src/styles/theme.css +100 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abstractdata/starlight-theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Branded Astro Starlight theme by Abstract Data — HUD and Calm surfaces, light + dark, motion-aware.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"src/"
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
|
-
"typecheck": "
|
|
20
|
+
"typecheck": "echo 'Standalone typecheck is intentionally a no-op — the theme integrates with Astro/Starlight virtual modules that only resolve in an Astro app context. Run typecheck via the playground app instead (bun --filter @abstract-data/playground typecheck).'"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"astro",
|
|
@@ -37,6 +37,11 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@fontsource-variable/inter": "^5.0.0",
|
|
42
|
+
"@fontsource-variable/jetbrains-mono": "^5.0.0",
|
|
43
|
+
"@fontsource-variable/orbitron": "^5.0.0"
|
|
44
|
+
},
|
|
40
45
|
"peerDependencies": {
|
|
41
46
|
"@astrojs/starlight": ">=0.32.0",
|
|
42
47
|
"astro": ">=5.0.0"
|
package/src/ambient.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ambient type stubs.
|
|
3
|
+
*
|
|
4
|
+
* Starlight's published `.ts` source files (referenced transitively when we
|
|
5
|
+
* `import type { StarlightPlugin } from '@astrojs/starlight/types'`) depend
|
|
6
|
+
* on Astro's runtime virtual modules and a `StarlightApp` global namespace
|
|
7
|
+
* that only exist inside a real Astro build context.
|
|
8
|
+
*
|
|
9
|
+
* `skipLibCheck` only suppresses `.d.ts` checking — Starlight ships actual
|
|
10
|
+
* `.ts` sources, so TypeScript dives into them during our package's
|
|
11
|
+
* typecheck and complains that those modules don't resolve. These stubs
|
|
12
|
+
* tell TypeScript "trust me, those modules exist at runtime" so the
|
|
13
|
+
* typecheck of our own thin plugin code passes cleanly.
|
|
14
|
+
*
|
|
15
|
+
* No runtime impact — this file declares types only.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
declare module 'astro:content';
|
|
19
|
+
declare module 'virtual:starlight/user-config';
|
|
20
|
+
declare module 'virtual:starlight/project-context';
|
|
21
|
+
declare module 'virtual:starlight/plugin-translations';
|
|
22
|
+
|
|
23
|
+
declare module '*.jsonc?raw' {
|
|
24
|
+
const raw: string;
|
|
25
|
+
export default raw;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare module '*.json?raw' {
|
|
29
|
+
const raw: string;
|
|
30
|
+
export default raw;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare namespace StarlightApp {
|
|
34
|
+
// Starlight references this namespace in createTranslationSystem.ts
|
|
35
|
+
// for the i18n strings system. We don't use it ourselves; an empty
|
|
36
|
+
// declaration satisfies the typechecker.
|
|
37
|
+
interface I18n {
|
|
38
|
+
// intentionally empty — Starlight's user augments this in their own d.ts
|
|
39
|
+
}
|
|
40
|
+
}
|
package/src/styles/hud.css
CHANGED
|
@@ -207,6 +207,14 @@
|
|
|
207
207
|
97% { transform: translate(-1px, 0); clip-path: inset(70% 0 10% 0); }
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
+
/* ------------------------------------------------------------
|
|
211
|
+
Search modal — cyan glow on focused input
|
|
212
|
+
------------------------------------------------------------ */
|
|
213
|
+
.pagefind-ui__form input.pagefind-ui__search-input:focus {
|
|
214
|
+
box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.18),
|
|
215
|
+
0 0 16px rgba(0, 217, 255, 0.20);
|
|
216
|
+
}
|
|
217
|
+
|
|
210
218
|
/* ------------------------------------------------------------
|
|
211
219
|
prefers-reduced-motion: collapse to Calm behavior
|
|
212
220
|
------------------------------------------------------------ */
|
|
@@ -223,7 +231,11 @@
|
|
|
223
231
|
display: none;
|
|
224
232
|
}
|
|
225
233
|
.sl-markdown-content > h1:first-child,
|
|
226
|
-
.content-panel h1[data-page-title]
|
|
234
|
+
.content-panel h1[data-page-title],
|
|
235
|
+
.hero h1 {
|
|
227
236
|
text-shadow: none;
|
|
228
237
|
}
|
|
238
|
+
.pagefind-ui__form input.pagefind-ui__search-input:focus {
|
|
239
|
+
box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.18);
|
|
240
|
+
}
|
|
229
241
|
}
|
package/src/styles/theme.css
CHANGED
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
Always loaded. Brand palette, typography, signature decoration.
|
|
4
4
|
============================================================ */
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/* Self-hosted variable fonts via @fontsource-variable.
|
|
7
|
+
No Google Fonts CDN dependency = GDPR-friendly, offline-friendly, faster
|
|
8
|
+
first paint (the woff2 ships in your build output, not over a 3rd-party CDN). */
|
|
9
|
+
@import '@fontsource-variable/inter';
|
|
10
|
+
@import '@fontsource-variable/orbitron';
|
|
11
|
+
@import '@fontsource-variable/jetbrains-mono';
|
|
7
12
|
|
|
8
13
|
/* ------------------------------------------------------------
|
|
9
14
|
Palette tokens — overridden onto Starlight's CSS vars
|
|
@@ -21,10 +26,11 @@
|
|
|
21
26
|
--ad-surface-dark: #101116;
|
|
22
27
|
--ad-cream: #faf7f2;
|
|
23
28
|
|
|
24
|
-
/* Typography
|
|
25
|
-
|
|
26
|
-
--sl-font
|
|
27
|
-
--
|
|
29
|
+
/* Typography (variable family names from @fontsource-variable; static name
|
|
30
|
+
fallback in case a consumer re-pins to non-variable @fontsource) */
|
|
31
|
+
--sl-font: 'Inter Variable', 'Inter', system-ui, -apple-system, sans-serif;
|
|
32
|
+
--sl-font-mono: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
|
|
33
|
+
--ad-font-display: 'Orbitron Variable', 'Orbitron', sans-serif;
|
|
28
34
|
|
|
29
35
|
/* Sizing tweaks */
|
|
30
36
|
--sl-content-width: 52rem;
|
|
@@ -354,6 +360,95 @@ site-search button[data-open-modal] kbd {
|
|
|
354
360
|
color: var(--ad-burgundy-deep);
|
|
355
361
|
}
|
|
356
362
|
|
|
363
|
+
/* ------------------------------------------------------------
|
|
364
|
+
Search modal — branded frame + pagefind UI
|
|
365
|
+
(Starlight DOM: <site-search> → <dialog> → <div.dialog-frame>)
|
|
366
|
+
------------------------------------------------------------ */
|
|
367
|
+
site-search dialog {
|
|
368
|
+
background: var(--sl-color-bg);
|
|
369
|
+
border: 1px solid var(--sl-color-hairline);
|
|
370
|
+
border-radius: 12px;
|
|
371
|
+
box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55),
|
|
372
|
+
0 0 0 1px rgba(0, 217, 255, 0.04);
|
|
373
|
+
padding: 0;
|
|
374
|
+
color: var(--sl-color-text);
|
|
375
|
+
max-width: 720px;
|
|
376
|
+
}
|
|
377
|
+
site-search dialog::backdrop {
|
|
378
|
+
background: rgba(0, 0, 0, 0.65);
|
|
379
|
+
backdrop-filter: blur(4px);
|
|
380
|
+
}
|
|
381
|
+
:root[data-theme='light'] site-search dialog::backdrop {
|
|
382
|
+
background: rgba(60, 50, 40, 0.45);
|
|
383
|
+
}
|
|
384
|
+
site-search dialog .dialog-frame {
|
|
385
|
+
background: var(--sl-color-bg);
|
|
386
|
+
border-radius: 12px;
|
|
387
|
+
padding: 0.5rem 0.75rem 0.75rem;
|
|
388
|
+
}
|
|
389
|
+
site-search dialog .dialog-frame > .header,
|
|
390
|
+
site-search dialog .dialog-frame .header {
|
|
391
|
+
border-bottom: 1px solid var(--sl-color-hairline);
|
|
392
|
+
font-family: var(--ad-font-display);
|
|
393
|
+
font-size: 0.7rem;
|
|
394
|
+
letter-spacing: 0.16em;
|
|
395
|
+
text-transform: uppercase;
|
|
396
|
+
color: var(--sl-color-gray-3);
|
|
397
|
+
}
|
|
398
|
+
site-search dialog .dialog-frame > p {
|
|
399
|
+
font-family: var(--sl-font);
|
|
400
|
+
color: var(--sl-color-gray-3);
|
|
401
|
+
text-align: center;
|
|
402
|
+
padding: 1.5rem 1rem;
|
|
403
|
+
}
|
|
404
|
+
.pagefind-ui {
|
|
405
|
+
--pagefind-ui-primary: var(--ad-cyan);
|
|
406
|
+
--pagefind-ui-text: var(--sl-color-text);
|
|
407
|
+
--pagefind-ui-background: var(--sl-color-bg);
|
|
408
|
+
--pagefind-ui-border: var(--sl-color-hairline);
|
|
409
|
+
--pagefind-ui-tag: var(--sl-color-bg-nav);
|
|
410
|
+
--pagefind-ui-font: var(--sl-font);
|
|
411
|
+
}
|
|
412
|
+
.pagefind-ui__form input.pagefind-ui__search-input {
|
|
413
|
+
background: var(--sl-color-bg-nav);
|
|
414
|
+
border: 1px solid var(--sl-color-hairline);
|
|
415
|
+
color: var(--sl-color-text);
|
|
416
|
+
font-family: var(--sl-font-mono);
|
|
417
|
+
border-radius: 6px;
|
|
418
|
+
}
|
|
419
|
+
.pagefind-ui__form input.pagefind-ui__search-input:focus {
|
|
420
|
+
border-color: var(--ad-cyan);
|
|
421
|
+
outline: none;
|
|
422
|
+
}
|
|
423
|
+
:root[data-theme='light'] .pagefind-ui__form input.pagefind-ui__search-input:focus {
|
|
424
|
+
border-color: var(--ad-cyan-deep);
|
|
425
|
+
}
|
|
426
|
+
.pagefind-ui__result-title,
|
|
427
|
+
.pagefind-ui__result-title a {
|
|
428
|
+
font-family: var(--ad-font-display);
|
|
429
|
+
font-size: 0.95rem;
|
|
430
|
+
letter-spacing: 0.02em;
|
|
431
|
+
color: var(--sl-color-text);
|
|
432
|
+
}
|
|
433
|
+
.pagefind-ui__result-link:hover .pagefind-ui__result-title,
|
|
434
|
+
.pagefind-ui__result-title a:hover {
|
|
435
|
+
color: var(--ad-cyan);
|
|
436
|
+
}
|
|
437
|
+
:root[data-theme='light'] .pagefind-ui__result-link:hover .pagefind-ui__result-title,
|
|
438
|
+
:root[data-theme='light'] .pagefind-ui__result-title a:hover {
|
|
439
|
+
color: var(--ad-cyan-deep);
|
|
440
|
+
}
|
|
441
|
+
.pagefind-ui__result-excerpt mark {
|
|
442
|
+
background: rgba(212, 175, 55, 0.18);
|
|
443
|
+
color: var(--ad-gold);
|
|
444
|
+
padding: 0 3px;
|
|
445
|
+
border-radius: 3px;
|
|
446
|
+
}
|
|
447
|
+
:root[data-theme='light'] .pagefind-ui__result-excerpt mark {
|
|
448
|
+
background: rgba(138, 109, 31, 0.16);
|
|
449
|
+
color: var(--ad-gold-deep);
|
|
450
|
+
}
|
|
451
|
+
|
|
357
452
|
/* ------------------------------------------------------------
|
|
358
453
|
"On this page" right sidebar (TOC) — branded
|
|
359
454
|
------------------------------------------------------------ */
|