@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,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Member {
|
|
3
|
+
name: string;
|
|
4
|
+
role: string;
|
|
5
|
+
bio?: string;
|
|
6
|
+
avatarUrl?: string;
|
|
7
|
+
socials?: { label: string; href: string }[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
members: Member[];
|
|
12
|
+
columns?: 2 | 3 | 4;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { members, columns = 3 } = Astro.props;
|
|
16
|
+
|
|
17
|
+
const colCls = columns === 2
|
|
18
|
+
? 'md:grid-cols-2'
|
|
19
|
+
: columns === 4
|
|
20
|
+
? 'md:grid-cols-2 lg:grid-cols-4'
|
|
21
|
+
: 'md:grid-cols-2 lg:grid-cols-3';
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<ul class={`list-none grid gap-6 ${colCls}`}>
|
|
25
|
+
{members.map((member) => (
|
|
26
|
+
<li class="card bg-base-100 border border-base-300">
|
|
27
|
+
<div class="card-body items-center text-center">
|
|
28
|
+
{member.avatarUrl ? (
|
|
29
|
+
<div class="avatar">
|
|
30
|
+
<div class="w-20 rounded-full">
|
|
31
|
+
<img src={member.avatarUrl} alt={`${member.name} avatar`} width="80" height="80" loading="lazy" />
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
) : (
|
|
35
|
+
<div class="avatar placeholder">
|
|
36
|
+
<div class="bg-neutral text-neutral-content w-20 rounded-full">
|
|
37
|
+
<span class="text-2xl">{member.name.charAt(0)}</span>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
)}
|
|
41
|
+
<h3 class="card-title text-base-content">{member.name}</h3>
|
|
42
|
+
<p class="text-sm text-base-content/60">{member.role}</p>
|
|
43
|
+
{member.bio && <p class="text-sm text-base-content/70">{member.bio}</p>}
|
|
44
|
+
{member.socials && member.socials.length > 0 && (
|
|
45
|
+
<ul class="list-none flex gap-3 mt-2">
|
|
46
|
+
{member.socials.map((s) => (
|
|
47
|
+
<li>
|
|
48
|
+
<a
|
|
49
|
+
class="link link-primary text-sm"
|
|
50
|
+
href={s.href}
|
|
51
|
+
target="_blank"
|
|
52
|
+
rel="noopener noreferrer"
|
|
53
|
+
>
|
|
54
|
+
{s.label}
|
|
55
|
+
</a>
|
|
56
|
+
</li>
|
|
57
|
+
))}
|
|
58
|
+
</ul>
|
|
59
|
+
)}
|
|
60
|
+
</div>
|
|
61
|
+
</li>
|
|
62
|
+
))}
|
|
63
|
+
</ul>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props {
|
|
3
|
+
quote: string;
|
|
4
|
+
author: string;
|
|
5
|
+
role?: string;
|
|
6
|
+
company?: string;
|
|
7
|
+
avatarUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { quote, author, role, company, avatarUrl } = Astro.props;
|
|
11
|
+
|
|
12
|
+
const meta = [role, company].filter(Boolean).join(', ');
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<figure class="card bg-base-100 border border-base-300">
|
|
16
|
+
<div class="card-body">
|
|
17
|
+
<svg
|
|
18
|
+
class="text-primary mb-2"
|
|
19
|
+
width="28"
|
|
20
|
+
height="20"
|
|
21
|
+
viewBox="0 0 28 20"
|
|
22
|
+
fill="currentColor"
|
|
23
|
+
aria-hidden="true"
|
|
24
|
+
>
|
|
25
|
+
<path d="M0 20V10C0 4.48 4.48 0 10 0v4c-3.31 0-6 2.69-6 6v10H0Zm16 0V10c0-5.52 4.48-10 10-10v4c-3.31 0-6 2.69-6 6v10h-4Z" />
|
|
26
|
+
</svg>
|
|
27
|
+
<blockquote class="text-base-content text-lg leading-relaxed">{quote}</blockquote>
|
|
28
|
+
<figcaption class="mt-4 flex items-center gap-3">
|
|
29
|
+
{avatarUrl && (
|
|
30
|
+
<div class="avatar">
|
|
31
|
+
<div class="w-10 rounded-full">
|
|
32
|
+
<img src={avatarUrl} alt={`${author} avatar`} width="40" height="40" loading="lazy" />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
)}
|
|
36
|
+
<div class="flex flex-col">
|
|
37
|
+
<span class="font-semibold text-base-content">{author}</span>
|
|
38
|
+
{meta && <span class="text-sm text-base-content/60">{meta}</span>}
|
|
39
|
+
</div>
|
|
40
|
+
</figcaption>
|
|
41
|
+
</div>
|
|
42
|
+
</figure>
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public prop types for the Astro-rendered components of `@publier/ui`.
|
|
3
|
+
*
|
|
4
|
+
* These live in a separate `.ts` file (rather than inline in each `.astro`'s
|
|
5
|
+
* frontmatter) so the barrel `index.ts` can re-export them without relying
|
|
6
|
+
* on TypeScript's `.astro` module inference — which is only provided in
|
|
7
|
+
* Astro build contexts, not during our plain `tsc --noEmit` check. The
|
|
8
|
+
* inline `interface Props` in each `.astro` must stay in sync with these.
|
|
9
|
+
*
|
|
10
|
+
* Mirrors `packages/shell/src/components/types.ts`; see Phase 3b kickoff.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
// Hero
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
export interface HeroProps {
|
|
18
|
+
/** Small, muted label rendered above the title. */
|
|
19
|
+
eyebrow?: string;
|
|
20
|
+
/** Main page title (rendered as `<h1>`). */
|
|
21
|
+
title: string;
|
|
22
|
+
/** Supporting copy below the title. */
|
|
23
|
+
subtitle?: string;
|
|
24
|
+
/** Primary button `{ label, href }`. */
|
|
25
|
+
primaryCta?: { label: string; href: string };
|
|
26
|
+
/** Secondary button `{ label, href }`. */
|
|
27
|
+
secondaryCta?: { label: string; href: string };
|
|
28
|
+
/** Horizontal alignment. Default: `'center'`. */
|
|
29
|
+
align?: 'center' | 'left';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
// CtaBand
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
|
|
36
|
+
export interface CtaBandProps {
|
|
37
|
+
/** Headline of the call-to-action band. */
|
|
38
|
+
title: string;
|
|
39
|
+
/** Supporting copy below the title. */
|
|
40
|
+
description?: string;
|
|
41
|
+
/** Primary button `{ label, href }`. */
|
|
42
|
+
primaryCta: { label: string; href: string };
|
|
43
|
+
/** Secondary button `{ label, href }`. */
|
|
44
|
+
secondaryCta?: { label: string; href: string };
|
|
45
|
+
/** `'primary'` (default) uses the brand color; `'muted'` uses the muted surface. */
|
|
46
|
+
variant?: 'primary' | 'muted';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// ---------------------------------------------------------------------------
|
|
50
|
+
// TestimonialCard
|
|
51
|
+
// ---------------------------------------------------------------------------
|
|
52
|
+
|
|
53
|
+
export interface TestimonialCardProps {
|
|
54
|
+
/** The testimonial body. */
|
|
55
|
+
quote: string;
|
|
56
|
+
/** Author's full name. */
|
|
57
|
+
author: string;
|
|
58
|
+
/** Author's role / title. */
|
|
59
|
+
role?: string;
|
|
60
|
+
/** Optional company name. */
|
|
61
|
+
company?: string;
|
|
62
|
+
/** Optional avatar URL. */
|
|
63
|
+
avatarUrl?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// ---------------------------------------------------------------------------
|
|
67
|
+
// FeatureSection
|
|
68
|
+
// ---------------------------------------------------------------------------
|
|
69
|
+
|
|
70
|
+
export interface FeatureSectionProps {
|
|
71
|
+
/** ALLCAPS tag rendered above the title. */
|
|
72
|
+
eyebrow?: string;
|
|
73
|
+
/** Section heading (rendered as `<h2>`). */
|
|
74
|
+
title: string;
|
|
75
|
+
/** Supporting copy below the title. */
|
|
76
|
+
subtitle?: string;
|
|
77
|
+
/** Optional check-style feature list. */
|
|
78
|
+
bullets?: string[];
|
|
79
|
+
/** Optional inline call-to-action link. */
|
|
80
|
+
primaryCta?: { label: string; href: string };
|
|
81
|
+
/** When true, flips text ↔ visual columns. */
|
|
82
|
+
reverse?: boolean;
|
|
83
|
+
/** Extra class names on the outer `<section>`. */
|
|
84
|
+
class?: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// ---------------------------------------------------------------------------
|
|
88
|
+
// FeatureGrid
|
|
89
|
+
// ---------------------------------------------------------------------------
|
|
90
|
+
|
|
91
|
+
/** A single feature card rendered inside `FeatureGrid`. */
|
|
92
|
+
export interface FeatureGridItem {
|
|
93
|
+
/** Emoji, unicode glyph, or short icon label rendered above the title. */
|
|
94
|
+
icon?: string;
|
|
95
|
+
/** Feature title. */
|
|
96
|
+
title: string;
|
|
97
|
+
/** Short description paragraph. */
|
|
98
|
+
description: string;
|
|
99
|
+
/** Optional link made clickable via the card's overlay anchor. */
|
|
100
|
+
href?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface FeatureGridProps {
|
|
104
|
+
items: FeatureGridItem[];
|
|
105
|
+
/** Number of columns on desktop. 2, 3 (default), or 4. */
|
|
106
|
+
columns?: 2 | 3 | 4;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// ---------------------------------------------------------------------------
|
|
110
|
+
// LogoCloud
|
|
111
|
+
// ---------------------------------------------------------------------------
|
|
112
|
+
|
|
113
|
+
/** A single logo rendered by `LogoCloud`. */
|
|
114
|
+
export interface LogoCloudItem {
|
|
115
|
+
name: string;
|
|
116
|
+
src: string;
|
|
117
|
+
/** Accessible alt text. Falls back to `name` if omitted. */
|
|
118
|
+
alt?: string;
|
|
119
|
+
/** Optional link wrapping the logo. */
|
|
120
|
+
href?: string;
|
|
121
|
+
/** Explicit intrinsic width in px. Defaults to `144` to avoid CLS. */
|
|
122
|
+
width?: number;
|
|
123
|
+
/** Explicit intrinsic height in px. Defaults to `40` to avoid CLS. */
|
|
124
|
+
height?: number;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface LogoCloudProps {
|
|
128
|
+
items: LogoCloudItem[];
|
|
129
|
+
/** Section title rendered above the grid. */
|
|
130
|
+
title?: string;
|
|
131
|
+
/** Supporting copy under the title. */
|
|
132
|
+
subtitle?: string;
|
|
133
|
+
/** Target columns on desktop. Default `5`. */
|
|
134
|
+
columns?: 3 | 4 | 5 | 6;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// ---------------------------------------------------------------------------
|
|
138
|
+
// TeamGrid
|
|
139
|
+
// ---------------------------------------------------------------------------
|
|
140
|
+
|
|
141
|
+
/** A single team member rendered by `TeamGrid`. */
|
|
142
|
+
export interface TeamGridMember {
|
|
143
|
+
name: string;
|
|
144
|
+
role: string;
|
|
145
|
+
bio?: string;
|
|
146
|
+
avatarUrl?: string;
|
|
147
|
+
socials?: { label: string; href: string }[];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface TeamGridProps {
|
|
151
|
+
members: TeamGridMember[];
|
|
152
|
+
columns?: 2 | 3 | 4;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// ---------------------------------------------------------------------------
|
|
156
|
+
// PressGallery
|
|
157
|
+
// ---------------------------------------------------------------------------
|
|
158
|
+
|
|
159
|
+
/** A single press mention rendered by `PressGallery`. */
|
|
160
|
+
export interface PressGalleryItem {
|
|
161
|
+
/** Publication name (e.g. "TechCrunch"). */
|
|
162
|
+
outlet: string;
|
|
163
|
+
/** Optional logo URL. If omitted, the outlet name is rendered as text. */
|
|
164
|
+
logoUrl?: string;
|
|
165
|
+
/** Optional quote / headline from the article. */
|
|
166
|
+
quote?: string;
|
|
167
|
+
/** Link to the source article. */
|
|
168
|
+
href: string;
|
|
169
|
+
/** ISO date (`YYYY-MM-DD`) of the article. */
|
|
170
|
+
date?: string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface PressGalleryProps {
|
|
174
|
+
items: PressGalleryItem[];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// ---------------------------------------------------------------------------
|
|
178
|
+
// Frame
|
|
179
|
+
// ---------------------------------------------------------------------------
|
|
180
|
+
|
|
181
|
+
export interface FrameProps {
|
|
182
|
+
caption?: string;
|
|
183
|
+
hint?: string;
|
|
184
|
+
video?: boolean;
|
|
185
|
+
src?: string;
|
|
186
|
+
autoPlay?: boolean;
|
|
187
|
+
loop?: boolean;
|
|
188
|
+
muted?: boolean;
|
|
189
|
+
poster?: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// ---------------------------------------------------------------------------
|
|
193
|
+
// StatusIndicator
|
|
194
|
+
// ---------------------------------------------------------------------------
|
|
195
|
+
|
|
196
|
+
/** Semantic status level. Controls the dot color and aria labeling. */
|
|
197
|
+
export type StatusLevel = 'operational' | 'degraded' | 'outage' | 'maintenance';
|
|
198
|
+
|
|
199
|
+
export interface StatusIndicatorProps {
|
|
200
|
+
status: StatusLevel;
|
|
201
|
+
label?: string;
|
|
202
|
+
service?: string;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// ---------------------------------------------------------------------------
|
|
206
|
+
// JobsList
|
|
207
|
+
// ---------------------------------------------------------------------------
|
|
208
|
+
|
|
209
|
+
/** A single job posting rendered by `JobsList`. */
|
|
210
|
+
export interface JobsListItem {
|
|
211
|
+
title: string;
|
|
212
|
+
department: string;
|
|
213
|
+
location: string;
|
|
214
|
+
/** Employment type: `"Full-time"`, `"Contract"`, etc. */
|
|
215
|
+
type?: string;
|
|
216
|
+
/** Link to the job description. */
|
|
217
|
+
href: string;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface JobsListProps {
|
|
221
|
+
jobs: JobsListItem[];
|
|
222
|
+
/** Optional heading rendered above the list. */
|
|
223
|
+
heading?: string;
|
|
224
|
+
/** Message shown when `jobs` is empty. */
|
|
225
|
+
emptyMessage?: string;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// ---------------------------------------------------------------------------
|
|
229
|
+
// ChangelogEntry
|
|
230
|
+
// ---------------------------------------------------------------------------
|
|
231
|
+
|
|
232
|
+
/** Semantic type of a changelog entry. Controls the colored badge. */
|
|
233
|
+
export type ChangelogEntryType = 'feature' | 'fix' | 'breaking' | 'security' | 'deprecation';
|
|
234
|
+
|
|
235
|
+
export interface ChangelogEntryProps {
|
|
236
|
+
date: string;
|
|
237
|
+
version?: string;
|
|
238
|
+
type?: ChangelogEntryType;
|
|
239
|
+
title: string;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// ---------------------------------------------------------------------------
|
|
243
|
+
// PricingTable + PricingSection
|
|
244
|
+
// ---------------------------------------------------------------------------
|
|
245
|
+
|
|
246
|
+
/** A single pricing tier displayed by {@link PricingTable}. */
|
|
247
|
+
export interface PricingTier {
|
|
248
|
+
name: string;
|
|
249
|
+
/** E.g. `"$19/mo"` or `"Free"`. */
|
|
250
|
+
price: string;
|
|
251
|
+
/** Short tagline rendered below the price. */
|
|
252
|
+
tagline?: string;
|
|
253
|
+
/** Bullet list of included features. */
|
|
254
|
+
features: string[];
|
|
255
|
+
/** Call-to-action button. */
|
|
256
|
+
cta: { label: string; href: string };
|
|
257
|
+
/** When true, highlights the tier as the featured plan. */
|
|
258
|
+
featured?: boolean;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface PricingTableProps {
|
|
262
|
+
tiers: PricingTier[];
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export type BillingPeriod = 'monthly' | 'yearly';
|
|
266
|
+
|
|
267
|
+
export interface PricingSectionProps {
|
|
268
|
+
title?: string;
|
|
269
|
+
subtitle?: string;
|
|
270
|
+
monthlyTiers: PricingTier[];
|
|
271
|
+
/** When omitted, the billing-period toggle is hidden. */
|
|
272
|
+
yearlyTiers?: PricingTier[];
|
|
273
|
+
/** Initial period. Defaults to `'monthly'`. */
|
|
274
|
+
defaultPeriod?: BillingPeriod;
|
|
275
|
+
/** Copy rendered next to the yearly option (e.g. `"Save 15%"`). */
|
|
276
|
+
yearlyDiscountLabel?: string;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// ---------------------------------------------------------------------------
|
|
280
|
+
// PricingComparisonTable
|
|
281
|
+
// ---------------------------------------------------------------------------
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* A single cell value in the comparison table.
|
|
285
|
+
* - `true` → check mark
|
|
286
|
+
* - `false` → em-dash
|
|
287
|
+
* - string → rendered verbatim (e.g. `"Unlimited"`, `"250/mo"`)
|
|
288
|
+
*/
|
|
289
|
+
export type PricingCellValue = boolean | string;
|
|
290
|
+
|
|
291
|
+
export interface PricingComparisonRow {
|
|
292
|
+
feature: string;
|
|
293
|
+
/** One value per tier, aligned index-wise with `PricingComparisonTableProps.tiers`. */
|
|
294
|
+
values: PricingCellValue[];
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export interface PricingComparisonCategory {
|
|
298
|
+
title: string;
|
|
299
|
+
rows: PricingComparisonRow[];
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface PricingComparisonTableProps {
|
|
303
|
+
/** Column headers — aligned index-wise with each row's `values`. */
|
|
304
|
+
tiers: string[];
|
|
305
|
+
categories: PricingComparisonCategory[];
|
|
306
|
+
/** When true (default), the header row is sticky during vertical scroll. */
|
|
307
|
+
stickyHeader?: boolean;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// ---------------------------------------------------------------------------
|
|
311
|
+
// BlurImage
|
|
312
|
+
// ---------------------------------------------------------------------------
|
|
313
|
+
|
|
314
|
+
export interface BlurImageProps {
|
|
315
|
+
src: string;
|
|
316
|
+
alt: string;
|
|
317
|
+
/** Intrinsic width in pixels (helps prevent CLS). */
|
|
318
|
+
width?: number;
|
|
319
|
+
/** Intrinsic height in pixels (helps prevent CLS). */
|
|
320
|
+
height?: number;
|
|
321
|
+
/** Additional CSS classes appended after `publier-blur-image`. */
|
|
322
|
+
class?: string;
|
|
323
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { shellRenderUpdateBadge } from '@publier/native';
|
|
3
|
+
|
|
4
|
+
export type UpdateBadgeType = 'new' | 'improved' | 'fixed' | 'deprecated' | 'breaking';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
type: UpdateBadgeType;
|
|
8
|
+
version?: string;
|
|
9
|
+
class?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { type, version, class: customClass } = Astro.props;
|
|
13
|
+
const html = shellRenderUpdateBadge(JSON.stringify({ type, version, customClass }));
|
|
14
|
+
---
|
|
15
|
+
<Fragment set:html={html} />
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { shellRenderVersionSwitcher } from '@publier/native';
|
|
3
|
+
|
|
4
|
+
interface DocVersion {
|
|
5
|
+
label: string;
|
|
6
|
+
path: string;
|
|
7
|
+
badge?: 'stable' | 'beta' | 'deprecated' | 'legacy';
|
|
8
|
+
default?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
versions: DocVersion[];
|
|
13
|
+
currentPath?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const { versions, currentPath } = Astro.props;
|
|
17
|
+
const html = shellRenderVersionSwitcher(JSON.stringify({ versions, currentPath }));
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
<Fragment set:html={html} />
|