@parche/core 0.3.0-alpha.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/LICENSE +21 -0
- package/README.md +11 -0
- package/package.json +55 -0
- package/src/components/DynamicRenderer.astro +96 -0
- package/src/components/LayoutRenderer.astro +65 -0
- package/src/components/SectionWrapper.astro +46 -0
- package/src/components/common/LocaleSwitcher.astro +168 -0
- package/src/components/common/OptimizedImage.astro +41 -0
- package/src/components/common/ThemePanel.astro +152 -0
- package/src/components/common/ThemeSelector.astro +67 -0
- package/src/components/common/ThemeToggle.astro +82 -0
- package/src/config/font-variables.ts +29 -0
- package/src/config/fonts.ts +18 -0
- package/src/content/index.ts +11 -0
- package/src/content/schemas.ts +253 -0
- package/src/integration/index.ts +156 -0
- package/src/integration/registry.ts +193 -0
- package/src/integration/types.ts +193 -0
- package/src/integration/virtual.d.ts +326 -0
- package/src/integration/vite-plugin-parche.ts +432 -0
- package/src/layouts/BaseLayout.astro +121 -0
- package/src/routes/404.astro +46 -0
- package/src/routes/[...slug].astro +216 -0
- package/src/routes/middleware.ts +18 -0
- package/src/styles/base.css +221 -0
- package/src/styles/semantic.css +95 -0
- package/src/styles/shadcn-compat.css +120 -0
- package/src/styles/tokens.css +237 -0
- package/src/types/config.ts +102 -0
- package/src/utils/i18n.ts +79 -0
- package/src/utils/layout.ts +46 -0
- package/src/utils/metadata.ts +277 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
// Type declarations for parche:* virtual modules
|
|
2
|
+
|
|
3
|
+
// Config
|
|
4
|
+
declare module 'parche:config' {
|
|
5
|
+
const config: import('../types/config.js').SiteConfig;
|
|
6
|
+
export default config;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Side-effect style import (injects global CSS)
|
|
10
|
+
declare module 'parche:config/styles' {}
|
|
11
|
+
|
|
12
|
+
// Generated maps
|
|
13
|
+
declare module 'parche:registry/widgets' {
|
|
14
|
+
export const widgetMap: Record<string, import('astro').AstroComponentFactory>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare module 'parche:registry/templates' {
|
|
18
|
+
export const templateMap: Record<string, import('astro').AstroComponentFactory>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare module 'parche:registry/resolvers' {
|
|
22
|
+
export function resolveContent(
|
|
23
|
+
slug: string,
|
|
24
|
+
locale: string,
|
|
25
|
+
opts?: { showDrafts?: boolean; siteUrl?: string; siteName?: string },
|
|
26
|
+
): Promise<{
|
|
27
|
+
template: string;
|
|
28
|
+
layout: string;
|
|
29
|
+
collection: string;
|
|
30
|
+
entryId: string;
|
|
31
|
+
templateProps: Record<string, any>;
|
|
32
|
+
metadata: Record<string, any>;
|
|
33
|
+
extras: {
|
|
34
|
+
seriesNav?: { seriesName: string; posts: any[]; currentOrder: number };
|
|
35
|
+
relatedPosts?: any[];
|
|
36
|
+
};
|
|
37
|
+
} | null>;
|
|
38
|
+
export function getResolverPaths(
|
|
39
|
+
locales: string[],
|
|
40
|
+
defaultLocale: string,
|
|
41
|
+
opts?: { showDrafts?: boolean },
|
|
42
|
+
): Promise<Array<{ params: Record<string, string | undefined>; props: Record<string, any> }>>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare module 'parche:config/i18n' {
|
|
46
|
+
export const locales: string[];
|
|
47
|
+
export const defaultLocale: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare module 'parche:config/themes' {
|
|
51
|
+
export const themes: Array<{ label: string; value: string }>;
|
|
52
|
+
export const showPanel: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Layouts
|
|
56
|
+
declare module 'parche:layouts/BaseLayout' {
|
|
57
|
+
const Component: typeof import('../layouts/BaseLayout.astro').default;
|
|
58
|
+
export default Component;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Components
|
|
62
|
+
declare module 'parche:components/Header' {
|
|
63
|
+
const Component: typeof import('../components/common/Header.astro').default;
|
|
64
|
+
export default Component;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare module 'parche:components/Footer' {
|
|
68
|
+
const Component: typeof import('../components/common/Footer.astro').default;
|
|
69
|
+
export default Component;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare module 'parche:components/ThemeToggle' {
|
|
73
|
+
const Component: typeof import('../components/common/ThemeToggle.astro').default;
|
|
74
|
+
export default Component;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
declare module 'parche:components/ThemeSelector' {
|
|
78
|
+
const Component: typeof import('../components/common/ThemeSelector.astro').default;
|
|
79
|
+
export default Component;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
declare module 'parche:components/OptimizedImage' {
|
|
83
|
+
const Component: typeof import('../components/common/OptimizedImage.astro').default;
|
|
84
|
+
export default Component;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare module 'parche:components/LocaleSwitcher' {
|
|
88
|
+
const Component: typeof import('../components/common/LocaleSwitcher.astro').default;
|
|
89
|
+
export default Component;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
declare module 'parche:components/ThemePanel' {
|
|
93
|
+
const Component: typeof import('../components/common/ThemePanel.astro').default;
|
|
94
|
+
export default Component;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Utils
|
|
98
|
+
declare module 'parche:utils/metadata' {
|
|
99
|
+
export * from '../utils/metadata.js';
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
declare module 'parche:utils/i18n' {
|
|
103
|
+
export * from '../utils/i18n.js';
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Templates
|
|
107
|
+
declare module 'parche:templates/contact' {
|
|
108
|
+
const Component: import('astro').AstroComponentFactory;
|
|
109
|
+
export default Component;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare module 'parche:templates/content' {
|
|
113
|
+
const Component: import('astro').AstroComponentFactory;
|
|
114
|
+
export default Component;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Atoms
|
|
118
|
+
declare module 'parche:primitives/Button' {
|
|
119
|
+
const Component: import('astro').AstroComponentFactory;
|
|
120
|
+
export default Component;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
declare module 'parche:primitives/Container' {
|
|
124
|
+
const Component: import('astro').AstroComponentFactory;
|
|
125
|
+
export default Component;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
declare module 'parche:primitives/Section' {
|
|
129
|
+
const Component: import('astro').AstroComponentFactory;
|
|
130
|
+
export default Component;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
declare module 'parche:primitives/Icon' {
|
|
134
|
+
const Component: import('astro').AstroComponentFactory;
|
|
135
|
+
export default Component;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare module 'parche:primitives/Badge' {
|
|
139
|
+
const Component: import('astro').AstroComponentFactory;
|
|
140
|
+
export default Component;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
declare module 'parche:primitives/Eyebrow' {
|
|
144
|
+
const Component: import('astro').AstroComponentFactory;
|
|
145
|
+
export default Component;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
declare module 'parche:primitives/Avatar' {
|
|
149
|
+
const Component: import('astro').AstroComponentFactory;
|
|
150
|
+
export default Component;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
declare module 'parche:primitives/Divider' {
|
|
154
|
+
const Component: import('astro').AstroComponentFactory;
|
|
155
|
+
export default Component;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
declare module 'parche:primitives/Tag' {
|
|
159
|
+
const Component: import('astro').AstroComponentFactory;
|
|
160
|
+
export default Component;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
declare module 'parche:primitives/Link' {
|
|
164
|
+
const Component: import('astro').AstroComponentFactory;
|
|
165
|
+
export default Component;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
declare module 'parche:primitives/Image' {
|
|
169
|
+
const Component: import('astro').AstroComponentFactory;
|
|
170
|
+
export default Component;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Widgets — Hero
|
|
174
|
+
declare module 'parche:widgets/hero/Hero' {
|
|
175
|
+
const Component: import('astro').AstroComponentFactory;
|
|
176
|
+
export default Component;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
declare module 'parche:widgets/hero/HeroFullscreen' {
|
|
180
|
+
const Component: import('astro').AstroComponentFactory;
|
|
181
|
+
export default Component;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Widgets — Features
|
|
185
|
+
declare module 'parche:widgets/features/Features' {
|
|
186
|
+
const Component: import('astro').AstroComponentFactory;
|
|
187
|
+
export default Component;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
declare module 'parche:widgets/features/FeaturesList' {
|
|
191
|
+
const Component: import('astro').AstroComponentFactory;
|
|
192
|
+
export default Component;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
declare module 'parche:widgets/features/FeaturesBento' {
|
|
196
|
+
const Component: import('astro').AstroComponentFactory;
|
|
197
|
+
export default Component;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Widgets — Stats
|
|
201
|
+
declare module 'parche:widgets/stats/Stats' {
|
|
202
|
+
const Component: import('astro').AstroComponentFactory;
|
|
203
|
+
export default Component;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// Widgets — Steps
|
|
207
|
+
declare module 'parche:widgets/steps/Steps' {
|
|
208
|
+
const Component: import('astro').AstroComponentFactory;
|
|
209
|
+
export default Component;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
declare module 'parche:widgets/steps/StepsHorizontal' {
|
|
213
|
+
const Component: import('astro').AstroComponentFactory;
|
|
214
|
+
export default Component;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Widgets — Content
|
|
218
|
+
declare module 'parche:widgets/content/Content' {
|
|
219
|
+
const Component: import('astro').AstroComponentFactory;
|
|
220
|
+
export default Component;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// Widgets — Pricing
|
|
224
|
+
declare module 'parche:widgets/pricing/Pricing' {
|
|
225
|
+
const Component: import('astro').AstroComponentFactory;
|
|
226
|
+
export default Component;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
declare module 'parche:widgets/pricing/PricingTable' {
|
|
230
|
+
const Component: import('astro').AstroComponentFactory;
|
|
231
|
+
export default Component;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// Widgets — Testimonials
|
|
235
|
+
declare module 'parche:widgets/testimonials/Testimonials' {
|
|
236
|
+
const Component: import('astro').AstroComponentFactory;
|
|
237
|
+
export default Component;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
declare module 'parche:widgets/testimonials/TestimonialsCarousel' {
|
|
241
|
+
const Component: import('astro').AstroComponentFactory;
|
|
242
|
+
export default Component;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
declare module 'parche:widgets/testimonials/TestimonialsMasonry' {
|
|
246
|
+
const Component: import('astro').AstroComponentFactory;
|
|
247
|
+
export default Component;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Widgets — Brands / Logos
|
|
251
|
+
declare module 'parche:widgets/brands/Brands' {
|
|
252
|
+
const Component: import('astro').AstroComponentFactory;
|
|
253
|
+
export default Component;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
declare module 'parche:widgets/brands/LogoWallMarquee' {
|
|
257
|
+
const Component: import('astro').AstroComponentFactory;
|
|
258
|
+
export default Component;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// Widgets — FAQ
|
|
262
|
+
declare module 'parche:widgets/faq/FAQs' {
|
|
263
|
+
const Component: import('astro').AstroComponentFactory;
|
|
264
|
+
export default Component;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// Widgets — Call to Action
|
|
268
|
+
declare module 'parche:widgets/call-to-action/CallToAction' {
|
|
269
|
+
const Component: import('astro').AstroComponentFactory;
|
|
270
|
+
export default Component;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// Widgets — Team
|
|
274
|
+
declare module 'parche:widgets/team/Team' {
|
|
275
|
+
const Component: import('astro').AstroComponentFactory;
|
|
276
|
+
export default Component;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// Widgets — Contact
|
|
280
|
+
declare module 'parche:widgets/contact/Contact' {
|
|
281
|
+
const Component: import('astro').AstroComponentFactory;
|
|
282
|
+
export default Component;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// Widgets — Subscribe
|
|
286
|
+
declare module 'parche:widgets/subscribe/Subscribe' {
|
|
287
|
+
const Component: import('astro').AstroComponentFactory;
|
|
288
|
+
export default Component;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// Widgets — Gallery
|
|
292
|
+
declare module 'parche:widgets/gallery/Gallery' {
|
|
293
|
+
const Component: import('astro').AstroComponentFactory;
|
|
294
|
+
export default Component;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// Widgets — Announce
|
|
298
|
+
declare module 'parche:widgets/announce/Announce' {
|
|
299
|
+
const Component: import('astro').AstroComponentFactory;
|
|
300
|
+
export default Component;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
declare module 'parche:DynamicRenderer' {
|
|
304
|
+
const Component: import('astro').AstroComponentFactory;
|
|
305
|
+
export default Component;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
declare module 'parche:LayoutRenderer' {
|
|
309
|
+
const Component: import('astro').AstroComponentFactory;
|
|
310
|
+
export default Component;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
declare module 'parche:utils/layout' {
|
|
314
|
+
interface Section {
|
|
315
|
+
widget: string;
|
|
316
|
+
props?: Record<string, unknown>;
|
|
317
|
+
wrapper?: false | {
|
|
318
|
+
id?: string;
|
|
319
|
+
isDark?: boolean;
|
|
320
|
+
bg?: string;
|
|
321
|
+
classes?: Record<string, unknown>;
|
|
322
|
+
as?: string;
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
export function resolveLayout(name: string, locale: string, defaultLocale: string): Promise<Section[]>;
|
|
326
|
+
}
|