@publier/shell 2.1.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/README.md +1 -0
- package/dist/build-integration.d.mts +7 -0
- package/dist/build-integration.mjs +1 -0
- package/dist/index-DWtFsw7E.d.mts +1033 -0
- package/dist/index.d.mts +33 -0
- package/dist/index.mjs +1 -0
- package/dist/integration-BIJIcnAT.mjs +99 -0
- package/dist/integration-CKjtSkwa.d.mts +183 -0
- package/dist/integration.d.mts +2 -0
- package/dist/integration.mjs +1 -0
- package/dist/loaders/index.d.mts +54 -0
- package/dist/loaders/index.mjs +1 -0
- package/dist/plugins/remark-asides.d.mts +8 -0
- package/dist/plugins/remark-asides.mjs +2 -0
- package/dist/plugins/remark-snippets.d.mts +11 -0
- package/dist/plugins/remark-snippets.mjs +1 -0
- package/dist/plugins/remark-structure.d.mts +13 -0
- package/dist/plugins/remark-structure.mjs +1 -0
- package/dist/plugins/remark-vars.d.mts +7 -0
- package/dist/plugins/remark-vars.mjs +1 -0
- package/dist/presets-C7z73xlB.d.mts +16 -0
- package/dist/presets-DL0qjtya.mjs +1 -0
- package/dist/runtime/code-group-sync.d.mts +30 -0
- package/dist/runtime/code-group-sync.mjs +103 -0
- package/dist/runtime/lazy-upgrade-registry.d.mts +29 -0
- package/dist/runtime/lazy-upgrade-registry.mjs +1 -0
- package/dist/runtime/tabs-sync.d.mts +25 -0
- package/dist/runtime/tabs-sync.mjs +106 -0
- package/dist/search/index.d.mts +92 -0
- package/dist/search/index.mjs +1 -0
- package/dist/tailwind/css-plugin.d.mts +16 -0
- package/dist/tailwind/css-plugin.mjs +1 -0
- package/dist/tailwind/index.d.mts +6 -0
- package/dist/tailwind/index.mjs +1 -0
- package/dist/tailwind/loader.d.mts +94 -0
- package/dist/tailwind/loader.mjs +2 -0
- package/dist/theme-toggle-element-DzFjxwpS.mjs +1 -0
- package/dist/themes/almond.css +115 -0
- package/dist/themes/aspen.css +95 -0
- package/dist/themes/catppuccin.css +98 -0
- package/dist/themes/dark.css +98 -0
- package/dist/themes/dusk.css +98 -0
- package/dist/themes/emerald.css +95 -0
- package/dist/themes/light.css +95 -0
- package/dist/themes/maple.css +119 -0
- package/dist/themes/neutral.css +73 -0
- package/dist/themes/ocean.css +98 -0
- package/dist/themes/purple.css +95 -0
- package/dist/themes/ruby.css +95 -0
- package/dist/themes/solar.css +98 -0
- package/dist/themes/vitepress.css +95 -0
- package/package.json +189 -0
- package/publier-gate +0 -0
- package/src/astro-modules.d.ts +20 -0
- package/src/components/LastModified.astro +25 -0
- package/src/components/announcement-banner.astro +25 -0
- package/src/components/aside.astro +17 -0
- package/src/components/ask-ai.tsx +146 -0
- package/src/components/badge.astro +18 -0
- package/src/components/breadcrumbs.astro +23 -0
- package/src/components/callouts/caution.astro +13 -0
- package/src/components/callouts/check.astro +13 -0
- package/src/components/callouts/danger.astro +13 -0
- package/src/components/callouts/info.astro +13 -0
- package/src/components/callouts/note.astro +13 -0
- package/src/components/callouts/tip.astro +13 -0
- package/src/components/callouts/warning.astro +13 -0
- package/src/components/card-grid.astro +14 -0
- package/src/components/card.astro +18 -0
- package/src/components/code-group.astro +55 -0
- package/src/components/columns.astro +18 -0
- package/src/components/docs-layout.astro +25 -0
- package/src/components/file-tree-node.astro +13 -0
- package/src/components/file-tree.astro +9 -0
- package/src/components/icon.astro +18 -0
- package/src/components/index.ts +155 -0
- package/src/components/link-button.astro +21 -0
- package/src/components/link-card.astro +21 -0
- package/src/components/open-in-ai.astro +13 -0
- package/src/components/package-install.astro +17 -0
- package/src/components/panels.astro +16 -0
- package/src/components/search-button.astro +21 -0
- package/src/components/sidebar.astro +12 -0
- package/src/components/skip-link.astro +12 -0
- package/src/components/steps.astro +13 -0
- package/src/components/table-of-contents.astro +22 -0
- package/src/components/tabs.astro +17 -0
- package/src/components/theme-storage.ts +5 -0
- package/src/components/theme-toggle-element.ts +85 -0
- package/src/components/theme-toggle.astro +25 -0
- package/src/components/tile-grid.astro +13 -0
- package/src/components/tile.astro +17 -0
- package/src/components/top-nav-mobile.astro +11 -0
- package/src/components/top-nav.astro +20 -0
- package/src/components/types.ts +510 -0
- package/src/components/ui/blur-image.astro +60 -0
- package/src/components/ui/changelog-entry.astro +56 -0
- package/src/components/ui/cta-band.astro +30 -0
- package/src/components/ui/feature-grid.astro +38 -0
- package/src/components/ui/feature-section.astro +85 -0
- package/src/components/ui/frame.astro +52 -0
- package/src/components/ui/hero.astro +47 -0
- package/src/components/ui/jobs-list.astro +53 -0
- package/src/components/ui/logo-cloud.astro +68 -0
- package/src/components/ui/press-gallery.astro +52 -0
- package/src/components/ui/pricing-comparison-table.astro +73 -0
- package/src/components/ui/pricing-section.astro +113 -0
- package/src/components/ui/pricing-table.astro +54 -0
- package/src/components/ui/status-indicator.astro +38 -0
- package/src/components/ui/team-grid.astro +63 -0
- package/src/components/ui/testimonial-card.astro +42 -0
- package/src/components/ui/types.ts +323 -0
- package/src/components/update-badge.astro +15 -0
- package/src/components/version-switcher.astro +20 -0
- package/src/icons/index.tsx +246 -0
- package/src/icons/resolve.tsx +45 -0
- package/src/layouts/base-layout.astro +63 -0
- package/src/qwik.ts +3 -0
- package/src/routes/blog-index.astro +20 -0
- package/src/routes/blog-rss.xml.ts +40 -0
- package/src/routes/blog-slug.astro +32 -0
- package/src/routes/changelog-index.astro +25 -0
- package/src/routes/changelog-rss.xml.ts +47 -0
- package/src/routes/docs-slug.astro +31 -0
- package/src/routes/not-found.astro +14 -0
- package/src/runtime/banner-init.ts +9 -0
- package/src/runtime/lazy-upgrade-init.ts +5 -0
- package/src/runtime/sidebar-scroll-init.ts +3 -0
- package/src/runtime/theme-init.ts +16 -0
- package/src/schemas/blog.ts +37 -0
- package/src/schemas/changelog.ts +28 -0
- package/src/schemas/common.ts +82 -0
- package/src/schemas/docs.ts +101 -0
- package/src/schemas/index.ts +14 -0
- package/src/schemas/pages.ts +22 -0
- package/src/styles/base.css +627 -0
- package/src/styles/expressive-code.css +41 -0
- package/src/styles/rules.css +66 -0
- package/src/styles/tailwind-sources.css +17 -0
- package/src/tailwind/preset.css +193 -0
- package/src/virtual-modules.d.ts +164 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* @publier/ui — Tailwind-directive-free rules.
|
|
2
|
+
*
|
|
3
|
+
* Pure CSS rules that work against Tailwind's emitted custom properties
|
|
4
|
+
* (`--color-*`, `--color-base-*`) without re-declaring any Tailwind
|
|
5
|
+
* directives. Imported in two places:
|
|
6
|
+
* 1) `@publier/ui/src/css/base.css` (the standalone-ui marketing entry,
|
|
7
|
+
* which DOES declare `@import "tailwindcss"` etc. on top of these
|
|
8
|
+
* rules) — for sites using `@publier/ui` without `@publier/shell`.
|
|
9
|
+
* 2) `@publier/shell/src/styles/base.css` (the docs entry chained from
|
|
10
|
+
* BaseLayout) — which already runs Tailwind via the shell's auto-
|
|
11
|
+
* composed entry, so it MUST NOT pick up a second `@import
|
|
12
|
+
* "tailwindcss"`. Importing this rules-only sibling avoids that
|
|
13
|
+
* double-compile (which previously fragmented the cascade in dev:
|
|
14
|
+
* two competing `<style>` tags fighting for `.hidden` vs. `.lg:block`
|
|
15
|
+
* ordering).
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/* Shiki dual-theme toggle — toggle light/dark colors based on .dark class. */
|
|
19
|
+
.dark .shiki,
|
|
20
|
+
.dark .shiki span {
|
|
21
|
+
color: var(--shiki-dark) !important;
|
|
22
|
+
background-color: var(--shiki-dark-bg) !important;
|
|
23
|
+
font-style: var(--shiki-dark-font-style) !important;
|
|
24
|
+
font-weight: var(--shiki-dark-font-weight) !important;
|
|
25
|
+
text-decoration: var(--shiki-dark-text-decoration) !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Shiki line / word / diff highlighting (transformers). */
|
|
29
|
+
.shiki .highlighted {
|
|
30
|
+
background-color: color-mix(in oklab, var(--color-base-content) 12%, transparent);
|
|
31
|
+
display: inline-block;
|
|
32
|
+
width: 100%;
|
|
33
|
+
}
|
|
34
|
+
.shiki .highlighted-word {
|
|
35
|
+
background-color: color-mix(in oklab, var(--color-base-content) 18%, transparent);
|
|
36
|
+
border-radius: 0.25rem;
|
|
37
|
+
padding: 0.125rem 0.25rem;
|
|
38
|
+
margin: -0.125rem -0.25rem;
|
|
39
|
+
}
|
|
40
|
+
.shiki .diff {
|
|
41
|
+
position: relative;
|
|
42
|
+
padding-left: 1.25rem;
|
|
43
|
+
}
|
|
44
|
+
.shiki .diff.add {
|
|
45
|
+
background-color: color-mix(in oklab, var(--color-success) 16%, transparent);
|
|
46
|
+
display: inline-block;
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
.shiki .diff.add::before {
|
|
50
|
+
content: "+";
|
|
51
|
+
color: var(--color-success);
|
|
52
|
+
position: absolute;
|
|
53
|
+
left: 0.25rem;
|
|
54
|
+
}
|
|
55
|
+
.shiki .diff.remove {
|
|
56
|
+
background-color: color-mix(in oklab, var(--color-error) 16%, transparent);
|
|
57
|
+
display: inline-block;
|
|
58
|
+
width: 100%;
|
|
59
|
+
opacity: 0.7;
|
|
60
|
+
}
|
|
61
|
+
.shiki .diff.remove::before {
|
|
62
|
+
content: "-";
|
|
63
|
+
color: var(--color-error);
|
|
64
|
+
position: absolute;
|
|
65
|
+
left: 0.25rem;
|
|
66
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* Tailwind v4 source scan registration for @publier/shell.
|
|
2
|
+
*
|
|
3
|
+
* `@import`ed from the auto-composed Tailwind entry generated by `docsShell()`
|
|
4
|
+
* at `<root>/.astro/publier-tailwind-entry.css`. Tailwind v4 resolves the
|
|
5
|
+
* @source pattern below relative to THIS file's on-disk location, so the
|
|
6
|
+
* shell's components (including absorbed ui/ marketing components) are scanned
|
|
7
|
+
* regardless of where the consumer's CSS lives on disk.
|
|
8
|
+
*
|
|
9
|
+
* Why this file exists: a consumer `@source "../../../shell/src/components/**"`
|
|
10
|
+
* relative path only resolves under npm's flat layout. pnpm places each
|
|
11
|
+
* package in its own `.pnpm/<pkg>@<ver>/` directory, so the sibling path
|
|
12
|
+
* points to a directory that doesn't exist — classes used exclusively inside
|
|
13
|
+
* shell components (navbar, drawer-*, lg:drawer-open, min-h-14, md:hidden, …)
|
|
14
|
+
* get tree-shaken out. Making shell own its own @source declaration and
|
|
15
|
+
* shipping it as a package export sidesteps the pnpm path problem entirely. */
|
|
16
|
+
|
|
17
|
+
@source "../components/**/*.{ts,tsx,astro}";
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/* @publier/tailwind — base preset (daisyUI v5).
|
|
2
|
+
*
|
|
3
|
+
* Consumer cascade:
|
|
4
|
+
* @import "tailwindcss";
|
|
5
|
+
* @import "@publier/tailwind/preset.css"; ← this file
|
|
6
|
+
* @import "virtual:publier-theme-css"; ← resolves to one themes/<name>.css
|
|
7
|
+
*
|
|
8
|
+
* daisyUI built-in themes are disabled — Publier ships its own 14-theme set.
|
|
9
|
+
* Theme files each declare two daisyUI named themes (`light` + `dark`) carrying
|
|
10
|
+
* that preset's palette, so the runtime toggle writing `data-theme="light|dark"`
|
|
11
|
+
* activates either variant without importing more CSS.
|
|
12
|
+
*
|
|
13
|
+
* Everything daisyUI owns (semantic color tokens, component CSS, utility
|
|
14
|
+
* classes) comes from the plugin below. Publier-specific structural tokens
|
|
15
|
+
* (shadow tinting, layout widths, fonts) live on `--publier-*` and get wired
|
|
16
|
+
* to Tailwind utilities via the `@theme` block.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
@plugin "daisyui" {
|
|
20
|
+
themes: false;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@theme {
|
|
24
|
+
/* ─── daisyUI component variable overrides ────────────────
|
|
25
|
+
* --menu-font-size bumps the sidebar nav from daisyUI's
|
|
26
|
+
* 14px default to 15px so docs navigation reads comfortably
|
|
27
|
+
* without needing a scoped font-size override in base.css. */
|
|
28
|
+
--menu-font-size: 0.9375rem;
|
|
29
|
+
|
|
30
|
+
/* ─── Typography ──────────────────────────────────────────
|
|
31
|
+
* One layered resolution per slot, namespaces disjoint:
|
|
32
|
+
*
|
|
33
|
+
* `--publier-font-{body,heading,mono}` — customer override hook
|
|
34
|
+
* (theme.yaml#typography or
|
|
35
|
+
* theme CSS); set by Astro
|
|
36
|
+
* Fonts API for customer-
|
|
37
|
+
* configured Google/local
|
|
38
|
+
* fonts with metric
|
|
39
|
+
* optimization.
|
|
40
|
+
* `--publier-font-builtin-{sans,mono}` — Astro Fonts API output
|
|
41
|
+
* for the bundled Inter +
|
|
42
|
+
* JetBrains Mono (with
|
|
43
|
+
* optimized fallback
|
|
44
|
+
* metric overrides for CLS).
|
|
45
|
+
* `--font-{body,heading,sans,mono}` — resolved consumer surface
|
|
46
|
+
* (Tailwind utilities,
|
|
47
|
+
* `--default-font-family`,
|
|
48
|
+
* base.css read here).
|
|
49
|
+
*
|
|
50
|
+
* Resolution at every step: customer override → built-in → system.
|
|
51
|
+
* `--font-sans` aliases body so a customer who sets a body font also
|
|
52
|
+
* gets it from the `font-sans` utility class. Headings inherit body by
|
|
53
|
+
* default, so a single typography override on body cascades to h1–h6
|
|
54
|
+
* without further config.
|
|
55
|
+
*
|
|
56
|
+
* Font-weight defaults are tunable — Inter's variable axis runs
|
|
57
|
+
* 300–700 and the shipped subsets cover the full range, so themes
|
|
58
|
+
* (and customers via `theme.yaml#typography`) can nudge body
|
|
59
|
+
* weight up to 450/500 for a slightly chunkier feel without
|
|
60
|
+
* loading extra font files.
|
|
61
|
+
*/
|
|
62
|
+
--font-body: var(
|
|
63
|
+
--publier-font-body,
|
|
64
|
+
var(--publier-font-builtin-sans, ui-sans-serif, system-ui, sans-serif)
|
|
65
|
+
);
|
|
66
|
+
--font-heading: var(--publier-font-heading, var(--font-body));
|
|
67
|
+
--font-mono: var(
|
|
68
|
+
--publier-font-mono,
|
|
69
|
+
var(--publier-font-builtin-mono, ui-monospace, SFMono-Regular, Menlo, monospace)
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
--font-sans: var(--font-body);
|
|
73
|
+
|
|
74
|
+
--default-font-family: var(--font-body);
|
|
75
|
+
--default-mono-font-family: var(--font-mono);
|
|
76
|
+
|
|
77
|
+
/* Body / heading weight defaults. Themes or customers override via
|
|
78
|
+
* `--publier-font-weight-*` on `:root`. Values are free-form
|
|
79
|
+
* (any valid CSS font-weight) — integer variable-axis values
|
|
80
|
+
* let Inter render at exactly 450 if someone wants it. */
|
|
81
|
+
--publier-font-weight-body: 400;
|
|
82
|
+
--publier-font-weight-heading: 700;
|
|
83
|
+
|
|
84
|
+
/* ─── Shadows ─────────────────────────────────────────────
|
|
85
|
+
* --publier-shadow-color lets themes tint elevation (warm amber for
|
|
86
|
+
* maple, cool slate for ocean). Defaults to neutral slate. The token
|
|
87
|
+
* holds a bare `R G B` triplet so Tailwind's `rgb(var(...) / alpha)`
|
|
88
|
+
* compiler path keeps working — these three values are curator-set
|
|
89
|
+
* per theme, not customer-overridable. */
|
|
90
|
+
--shadow-xs: 0 1px 2px 0
|
|
91
|
+
rgb(var(--publier-shadow-color, 15 23 42) / var(--publier-shadow-opacity, 0.04));
|
|
92
|
+
--shadow-sm:
|
|
93
|
+
0 1px 3px 0 rgb(var(--publier-shadow-color, 15 23 42) / var(--publier-shadow-opacity, 0.06)),
|
|
94
|
+
0 1px 2px -1px rgb(var(--publier-shadow-color, 15 23 42) / var(--publier-shadow-opacity, 0.06));
|
|
95
|
+
--shadow-md:
|
|
96
|
+
0 4px 6px -1px rgb(var(--publier-shadow-color, 15 23 42) / var(--publier-shadow-opacity, 0.08)),
|
|
97
|
+
0 2px 4px -2px rgb(var(--publier-shadow-color, 15 23 42) / var(--publier-shadow-opacity, 0.06));
|
|
98
|
+
--shadow-lg:
|
|
99
|
+
0 10px 15px -3px
|
|
100
|
+
rgb(var(--publier-shadow-color, 15 23 42) / var(--publier-shadow-opacity, 0.08)),
|
|
101
|
+
0 4px 6px -4px rgb(var(--publier-shadow-color, 15 23 42) / var(--publier-shadow-opacity, 0.06));
|
|
102
|
+
--shadow-xl:
|
|
103
|
+
0 20px 25px -5px rgb(var(--publier-shadow-color, 15 23 42) / var(--publier-shadow-opacity, 0.1)),
|
|
104
|
+
0 8px 10px -6px rgb(var(--publier-shadow-color, 15 23 42) / var(--publier-shadow-opacity, 0.06));
|
|
105
|
+
|
|
106
|
+
/* ─── Motion ──────────────────────────────────────────── */
|
|
107
|
+
--default-transition-duration: var(--publier-transition-duration, 150ms);
|
|
108
|
+
--default-transition-timing-function: var(
|
|
109
|
+
--publier-transition-timing,
|
|
110
|
+
cubic-bezier(0.4, 0, 0.2, 1)
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
/* ─── Layout ──────────────────────────────────────────── */
|
|
114
|
+
--layout-width: var(--publier-layout-width, 1400px);
|
|
115
|
+
|
|
116
|
+
/* ─── daisyUI status color fallbacks ─────────────────────
|
|
117
|
+
* daisyUI v5 `alert-info/success/warning/error` read these tokens but
|
|
118
|
+
* they are optional — daisyUI's built-in themes define them, Publier's
|
|
119
|
+
* 14 custom themes do not. These defaults ensure every callout, badge,
|
|
120
|
+
* and alert renders with correct color on any Publier theme. Individual
|
|
121
|
+
* theme files can override them per-theme if needed. */
|
|
122
|
+
--color-info: oklch(55% 0.12 240);
|
|
123
|
+
--color-info-content: oklch(97% 0.01 240);
|
|
124
|
+
--color-success: oklch(72.3% 0.219 149.579);
|
|
125
|
+
--color-success-content: oklch(97.8% 0.014 149.579);
|
|
126
|
+
--color-warning: oklch(76.9% 0.188 70.08);
|
|
127
|
+
--color-warning-content: oklch(97.8% 0.014 70.08);
|
|
128
|
+
--color-error: oklch(63.7% 0.237 25.331);
|
|
129
|
+
--color-error-content: oklch(97.8% 0.014 25.331);
|
|
130
|
+
|
|
131
|
+
/* ─── Publier semantic role surface ──────────────────────
|
|
132
|
+
* 19 per-theme roles + 5 static status roles, inspired by
|
|
133
|
+
* shadcn/ui's paired bg/foreground pattern (also used by
|
|
134
|
+
* Fumadocs). Components should prefer `*-pl-*` utilities
|
|
135
|
+
* over raw daisyUI `--color-base-*` so theme authors can
|
|
136
|
+
* inject one coherent palette from a single place.
|
|
137
|
+
*
|
|
138
|
+
* Defaults below alias the daisyUI base tokens — themes
|
|
139
|
+
* override only the roles that need a theme-specific
|
|
140
|
+
* chroma (`muted`, `card-hover`, `shadow`, etc.) in their
|
|
141
|
+
* own `:root[data-theme="light|dark"]` blocks.
|
|
142
|
+
*
|
|
143
|
+
* Static status roles (bottom of the list) never re-theme
|
|
144
|
+
* — a warning should look like a warning regardless of
|
|
145
|
+
* which preset is active. */
|
|
146
|
+
|
|
147
|
+
/* Foundation — aliases existing daisyUI tokens so there's
|
|
148
|
+
* a single source of truth per page-level surface. */
|
|
149
|
+
--color-pl-bg: var(--color-base-100);
|
|
150
|
+
--color-pl-fg: var(--color-base-content);
|
|
151
|
+
|
|
152
|
+
/* De-emphasized — the "themed body copy" role that publier.net
|
|
153
|
+
* had as `--qw-color-muted-foreground`. Default derives from
|
|
154
|
+
* base-content via color-mix so un-overridden themes still
|
|
155
|
+
* look reasonable; themes with a deliberate warm/cool tint
|
|
156
|
+
* should override. */
|
|
157
|
+
--color-pl-muted: color-mix(in oklch, var(--color-base-content) 62%, var(--color-base-100));
|
|
158
|
+
--color-pl-muted-bg: var(--color-base-200);
|
|
159
|
+
--color-pl-subtle: color-mix(in oklch, var(--color-base-content) 45%, var(--color-base-100));
|
|
160
|
+
|
|
161
|
+
/* Raised — tile / card surfaces. `card-hover` is the
|
|
162
|
+
* visible lift on pointer hover; missing in the daisyUI
|
|
163
|
+
* sweep which is why tiles currently look flat. */
|
|
164
|
+
--color-pl-card: var(--color-base-100);
|
|
165
|
+
--color-pl-card-fg: var(--color-base-content);
|
|
166
|
+
--color-pl-card-hover: var(--color-base-200);
|
|
167
|
+
|
|
168
|
+
/* Overlay — tooltips, popovers, search dialog. Distinct
|
|
169
|
+
* z-plane from card; Fumadocs pattern. */
|
|
170
|
+
--color-pl-popover: var(--color-base-100);
|
|
171
|
+
--color-pl-popover-fg: var(--color-base-content);
|
|
172
|
+
|
|
173
|
+
/* Dividers + focus */
|
|
174
|
+
--color-pl-border: color-mix(in oklch, var(--color-base-300) 70%, var(--color-base-100));
|
|
175
|
+
--color-pl-border-strong: var(--color-base-300);
|
|
176
|
+
--color-pl-ring: var(--color-primary);
|
|
177
|
+
|
|
178
|
+
/* Sidebar sub-theme — shadcn pattern. `sidebar-accent` is
|
|
179
|
+
* the nav-item hover bg; `sidebar-active` is the current-
|
|
180
|
+
* page item. Both were lost when `.btn-ghost` + `.menu-active`
|
|
181
|
+
* replaced publier.net's `--qw-nav-item-bg-*` tokens. */
|
|
182
|
+
--color-pl-sidebar-bg: var(--color-pl-bg);
|
|
183
|
+
--color-pl-sidebar-fg: var(--color-pl-fg);
|
|
184
|
+
--color-pl-sidebar-muted: var(--color-pl-muted);
|
|
185
|
+
--color-pl-sidebar-accent: var(--color-pl-muted-bg);
|
|
186
|
+
--color-pl-sidebar-accent-fg: var(--color-pl-fg);
|
|
187
|
+
/* Active item uses a translucent primary tint rather than a solid
|
|
188
|
+
* primary fill — the publier.net pre-migration pattern. Soft bg
|
|
189
|
+
* + colored text keeps the active row legible without shouting. */
|
|
190
|
+
--color-pl-sidebar-active: color-mix(in oklch, var(--color-primary) 10%, transparent);
|
|
191
|
+
--color-pl-sidebar-active-fg: var(--color-primary);
|
|
192
|
+
--color-pl-sidebar-border: var(--color-pl-border);
|
|
193
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript declarations for Vite virtual modules emitted by docsShell().
|
|
3
|
+
* Not real files — generated at dev/build time by Vite plugins inside the integration.
|
|
4
|
+
*
|
|
5
|
+
* virtual:publier-nav-config — typed nav config from publier.config.yaml#nav
|
|
6
|
+
* virtual:publier-announcement — typed announcement-banner config from #announcement
|
|
7
|
+
* virtual:publier-site — footer text + service-worker flag from #site
|
|
8
|
+
* virtual:publier-docs-config — tab sections + sidebar meta/versions/anchors from #docs
|
|
9
|
+
* virtual:publier-theme-css — bare-side-effect CSS module: theme preset import
|
|
10
|
+
* virtual:publier-custom-css — bare-side-effect CSS module: customCss[] imports
|
|
11
|
+
*
|
|
12
|
+
* The two bare-side-effect CSS modules are imported via
|
|
13
|
+
* `injectScript('page-ssr', "import '…'")` so Astro emits the resulting
|
|
14
|
+
* `<link rel="stylesheet">` tag for every page — the declarations exist so
|
|
15
|
+
* `tsc --noEmit` resolves the specifiers if anything in the workspace
|
|
16
|
+
* imports them directly.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
declare module 'virtual:publier-theme-css';
|
|
20
|
+
declare module 'virtual:publier-custom-css';
|
|
21
|
+
|
|
22
|
+
declare module 'virtual:publier-nav-config' {
|
|
23
|
+
export interface NavLink {
|
|
24
|
+
label: string;
|
|
25
|
+
href: string;
|
|
26
|
+
external?: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface NavCta {
|
|
30
|
+
label: string;
|
|
31
|
+
href: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface NavVariant {
|
|
35
|
+
/** Brand text next to (or replacing) the logo. */
|
|
36
|
+
brand: string;
|
|
37
|
+
/** Logo paths. Null when no logo configured. */
|
|
38
|
+
logo: { light?: string; dark?: string } | null;
|
|
39
|
+
/** Center tab links . */
|
|
40
|
+
tabs: NavLink[];
|
|
41
|
+
/** Right-side links. */
|
|
42
|
+
links: NavLink[];
|
|
43
|
+
/** Primary CTA button. Null when absent. */
|
|
44
|
+
cta: NavCta | null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* One URL-path → variant mapping. Evaluated first-match-wins by
|
|
49
|
+
* BaseLayout when the page doesn't pass an explicit `nav` prop.
|
|
50
|
+
* `variant: false` disables the nav entirely for matching paths.
|
|
51
|
+
*/
|
|
52
|
+
export interface NavPathRule {
|
|
53
|
+
path: string;
|
|
54
|
+
variant: string | false;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface NavConfig {
|
|
58
|
+
/** All named variants keyed by name (e.g., "default", "docs", "marketing"). */
|
|
59
|
+
variants: Record<string, NavVariant>;
|
|
60
|
+
/** URL-path-to-variant routing table. Evaluated first-match-wins. */
|
|
61
|
+
pathRules: NavPathRule[];
|
|
62
|
+
/** Variant name used when no `pathRules` entry matches. Defaults to `"default"`. */
|
|
63
|
+
defaultVariant: string;
|
|
64
|
+
/** Whether search is enabled (`search.enabled` from publier.config.yaml). */
|
|
65
|
+
searchEnabled: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export const navConfig: NavConfig;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare module 'virtual:publier-announcement' {
|
|
72
|
+
export interface AnnouncementConfig {
|
|
73
|
+
message: string;
|
|
74
|
+
href?: string;
|
|
75
|
+
variant?: 'info' | 'warning' | 'success';
|
|
76
|
+
storageKey?: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** `null` when `announcement:` is absent from publier.config.yaml. */
|
|
80
|
+
export const announcement: AnnouncementConfig | null;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
declare module 'virtual:publier-site' {
|
|
84
|
+
/**
|
|
85
|
+
* BaseLayout's rendering surface. Mirrors the `site:` block in
|
|
86
|
+
* publier.config.yaml 1:1 — identity (name, url, description, logo,
|
|
87
|
+
* favicon) and chrome (footer, serviceWorker).
|
|
88
|
+
*/
|
|
89
|
+
export interface SiteConfig {
|
|
90
|
+
/** Site name. Shown as `<title>` fallback + OG defaults. */
|
|
91
|
+
name: string;
|
|
92
|
+
/** Production URL. `null` → canonical tags + absolute OG refs skipped. */
|
|
93
|
+
url: string | null;
|
|
94
|
+
/** Site description / meta tag fallback. `null` → no meta description emitted. */
|
|
95
|
+
description: string | null;
|
|
96
|
+
/** Logo paths. `null` when no logo configured. */
|
|
97
|
+
logo: { light?: string; dark?: string } | null;
|
|
98
|
+
/** Favicon path. `null` → BaseLayout falls back to `/favicon.svg`. */
|
|
99
|
+
favicon: string | null;
|
|
100
|
+
/** Footer text rendered by BaseLayout. `null` → no footer. */
|
|
101
|
+
footer: string | null;
|
|
102
|
+
/** When true, BaseLayout emits a `navigator.serviceWorker.register('/sw.js')` call. */
|
|
103
|
+
serviceWorker: boolean;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export const site: SiteConfig;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
declare module 'virtual:publier-feeds' {
|
|
110
|
+
/**
|
|
111
|
+
* Discovery-link source for `<link rel="alternate" type="application/rss+xml">`
|
|
112
|
+
* tags emitted by BaseLayout. Derived from `shellPlanDefaultRoutes` so
|
|
113
|
+
* opt-outs (`routes.rss: false`, `routes.blog: false`, missing
|
|
114
|
+
* `site.url`) automatically suppress the matching link tag.
|
|
115
|
+
*
|
|
116
|
+
* `href` is a site-relative path (e.g. `/blog/rss.xml`). BaseLayout
|
|
117
|
+
* prefixes it with `site.url` so the emitted tag is absolute.
|
|
118
|
+
*/
|
|
119
|
+
export interface FeedDescriptor {
|
|
120
|
+
title: string;
|
|
121
|
+
href: string;
|
|
122
|
+
}
|
|
123
|
+
export const feeds: FeedDescriptor[];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
declare module 'virtual:publier-fonts' {
|
|
127
|
+
/**
|
|
128
|
+
* Active customer font slots from `publier.config.yaml#fonts`. Each entry
|
|
129
|
+
* names a slot whose font was registered with Astro's Fonts API via
|
|
130
|
+
* `fontProviders.google()` or `fontProviders.local()` — base-layout emits
|
|
131
|
+
* `<Font cssVariable="--publier-font-{slot}" />` for each so the
|
|
132
|
+
* generated @font-face + preload tags reach the page.
|
|
133
|
+
*
|
|
134
|
+
* Slots that the customer left at family-only (no provider, just a CSS
|
|
135
|
+
* var alias) are NOT included here — those are handled by an inline
|
|
136
|
+
* `<style>` injection that doesn't need a `<Font />` emitter.
|
|
137
|
+
*/
|
|
138
|
+
export interface FontsConfig {
|
|
139
|
+
slots: Array<'heading' | 'body' | 'mono'>;
|
|
140
|
+
}
|
|
141
|
+
export const fonts: FontsConfig;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
declare module 'virtual:publier-docs-config' {
|
|
145
|
+
import type { DocVersion, SidebarAnchor } from '@publier/shell/components';
|
|
146
|
+
import type { SidebarMetaOverride } from '@publier/shell/search';
|
|
147
|
+
|
|
148
|
+
export interface DocsConfig {
|
|
149
|
+
/**
|
|
150
|
+
* Top-level folders under `src/content/docs/` that render as their own
|
|
151
|
+
* tab-scoped sidebars. Empty array → single flat sidebar for every
|
|
152
|
+
* docs page.
|
|
153
|
+
*/
|
|
154
|
+
tabSections: string[];
|
|
155
|
+
/** Display + ordering overrides keyed by group path. */
|
|
156
|
+
sidebarMeta: Record<string, SidebarMetaOverride>;
|
|
157
|
+
/** Optional versions row rendered above the sidebar. */
|
|
158
|
+
versions: DocVersion[];
|
|
159
|
+
/** Optional anchor links rendered below the sidebar. */
|
|
160
|
+
anchors: SidebarAnchor[];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export const docsConfig: DocsConfig;
|
|
164
|
+
}
|