@codemonster-ru/vue-ssg-core 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.
package/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # @codemonster-ru/vue-ssg-core
2
+
3
+ [![npm version](https://img.shields.io/npm/v/%40codemonster-ru%2Fvue-ssg-core)](https://www.npmjs.com/package/@codemonster-ru/vue-ssg-core)
4
+ [![npm downloads/month](https://img.shields.io/npm/dm/%40codemonster-ru%2Fvue-ssg-core)](https://www.npmjs.com/package/@codemonster-ru/vue-ssg-core)
5
+ [![License](https://img.shields.io/npm/l/%40codemonster-ru%2Fvue-ssg-core)](https://www.npmjs.com/package/@codemonster-ru/vue-ssg-core)
6
+
7
+ Core APIs for building SSG applications on top of Vue + Vite SSG.
8
+
9
+ ## Exports
10
+
11
+ - `createViteSsgApp`
12
+ - `defineDocsConfig`
13
+ - docs config types
@@ -0,0 +1,209 @@
1
+ import { createHead } from '@unhead/vue/client';
2
+ import { createHead as createHead$1 } from '@unhead/vue/server';
3
+ import { Component, createApp } from 'vue';
4
+ import { RouteRecordRaw, Router } from 'vue-router';
5
+ import { VfTableOfContentsItem, VfNavMenuItem } from '@codemonster-ru/vueforge-core';
6
+
7
+ type CreateViteSsgContext = {
8
+ app: ReturnType<typeof createApp>;
9
+ head: ReturnType<typeof createHead> | ReturnType<typeof createHead$1> | undefined;
10
+ initialState: Record<string, unknown>;
11
+ isClient: boolean;
12
+ onSSRAppRendered: (cb: () => void | Promise<void>) => void;
13
+ routePath?: string;
14
+ router: Router;
15
+ routes: RouteRecordRaw[];
16
+ transformState?: (state: Record<string, unknown>) => Record<string, unknown>;
17
+ triggerOnSSRAppRendered: () => Promise<void[]>;
18
+ };
19
+ type CreateViteSsgOptions = {
20
+ hydration?: boolean;
21
+ rootContainer?: string;
22
+ useHead?: boolean;
23
+ transformState?: (state: Record<string, unknown>) => Record<string, unknown>;
24
+ };
25
+ declare function createViteSsgApp(App: Component, routerOptions: {
26
+ base?: string;
27
+ routes: RouteRecordRaw[];
28
+ }, fn?: (context: CreateViteSsgContext) => Promise<void> | void, options?: CreateViteSsgOptions): (routePath?: string) => Promise<CreateViteSsgContext>;
29
+
30
+ interface DocsSectionConfig {
31
+ label?: string;
32
+ order?: number;
33
+ }
34
+ interface DocsTocConfig {
35
+ levels?: number[];
36
+ scrollOffset?: number;
37
+ }
38
+ interface DocsSiteLogoConfig {
39
+ src?: string;
40
+ component?: Component;
41
+ alt?: string;
42
+ width?: number | string;
43
+ height?: number | string;
44
+ }
45
+ interface DocsHomeActionConfig {
46
+ label: string;
47
+ to?: string;
48
+ href?: string;
49
+ }
50
+ interface DocsHomeConfig {
51
+ enabled?: boolean;
52
+ title?: string;
53
+ description?: string;
54
+ showGrid?: boolean;
55
+ primaryAction?: DocsHomeActionConfig;
56
+ secondaryAction?: DocsHomeActionConfig;
57
+ }
58
+ interface DocsHeaderNavConfig {
59
+ items?: VfNavMenuItem[];
60
+ ariaLabel?: string;
61
+ }
62
+ type DocsLayoutVariant = 'content' | 'sidebar-content' | 'sidebar-content-aside';
63
+ interface DocsSiteConfig {
64
+ title: string;
65
+ description?: string;
66
+ githubUrl?: string;
67
+ homeTo?: string;
68
+ favicon?: string;
69
+ logo?: DocsSiteLogoConfig;
70
+ logoLabel?: string;
71
+ }
72
+ interface DocsLayoutConfig {
73
+ variant?: DocsLayoutVariant;
74
+ fillViewport?: boolean;
75
+ stickyHeader?: boolean;
76
+ stickySidebar?: boolean;
77
+ stickyAside?: boolean;
78
+ edgeNotches?: boolean;
79
+ hideSidebarOnMobile?: boolean;
80
+ hideAsideOnMobile?: boolean;
81
+ }
82
+ interface DocsFooterConfig {
83
+ left?: string;
84
+ right?: string;
85
+ }
86
+ interface DocsPageMeta {
87
+ title: string;
88
+ path: string;
89
+ }
90
+ interface DocsHeaderProps {
91
+ site: DocsSiteConfig;
92
+ }
93
+ interface DocsBrandProps {
94
+ site: DocsSiteConfig;
95
+ }
96
+ interface DocsFooterProps {
97
+ site: DocsSiteConfig;
98
+ }
99
+ interface DocsHeaderNavProps {
100
+ site: DocsSiteConfig;
101
+ items: VfNavMenuItem[];
102
+ activeValue?: string;
103
+ }
104
+ interface DocsSidebarProps {
105
+ site: DocsSiteConfig;
106
+ page: DocsPageMeta;
107
+ items: VfNavMenuItem[];
108
+ }
109
+ interface DocsAsideProps {
110
+ site: DocsSiteConfig;
111
+ page: DocsPageMeta;
112
+ items: VfTableOfContentsItem[];
113
+ }
114
+ interface DocsLayoutProps {
115
+ site: DocsSiteConfig;
116
+ page: DocsPageMeta;
117
+ layout: Required<DocsLayoutConfig>;
118
+ sidebarItems: VfNavMenuItem[];
119
+ tocItems: VfTableOfContentsItem[];
120
+ }
121
+ interface DocsComponentsConfig {
122
+ Brand?: Component;
123
+ Home?: Component;
124
+ Header?: Component;
125
+ HeaderNav?: Component;
126
+ Footer?: Component;
127
+ SidebarTop?: Component;
128
+ SidebarBottom?: Component;
129
+ AsideTop?: Component;
130
+ AsideBottom?: Component;
131
+ Layout?: Component;
132
+ }
133
+ interface DocsConfig {
134
+ title?: string;
135
+ site?: Partial<DocsSiteConfig>;
136
+ home?: DocsHomeConfig;
137
+ headerNav?: DocsHeaderNavConfig;
138
+ layout?: DocsLayoutConfig;
139
+ footer?: DocsFooterConfig;
140
+ components?: DocsComponentsConfig;
141
+ sectionLabels?: Record<string, DocsSectionConfig>;
142
+ toc?: DocsTocConfig;
143
+ }
144
+ declare function defineDocsConfig(config: DocsConfig): DocsConfig;
145
+
146
+ type DocsContentBlock = {
147
+ type: 'heading';
148
+ depth: 1 | 2 | 3 | 4 | 5 | 6;
149
+ id: string;
150
+ html: string;
151
+ } | {
152
+ type: 'paragraph';
153
+ html: string;
154
+ } | {
155
+ type: 'code';
156
+ code: string;
157
+ language: string;
158
+ } | {
159
+ type: 'list';
160
+ ordered: boolean;
161
+ items: string[];
162
+ } | {
163
+ type: 'blockquote';
164
+ html: string;
165
+ } | {
166
+ type: 'html';
167
+ html: string;
168
+ };
169
+ interface DocsPage {
170
+ id: string;
171
+ path: string;
172
+ sourcePath: string;
173
+ title: string;
174
+ navTitle: string;
175
+ description?: string;
176
+ order: number;
177
+ section: string[];
178
+ blocks: DocsContentBlock[];
179
+ tableOfContents: VfTableOfContentsItem[];
180
+ }
181
+ interface ResolveDocsContentInput {
182
+ docsConfig: DocsConfig;
183
+ markdownFiles: Record<string, string>;
184
+ }
185
+ interface ResolvedDocsContent {
186
+ docsPages: DocsPage[];
187
+ docsSidebar: VfNavMenuItem[];
188
+ docsSite: DocsSiteConfig;
189
+ docsLayout: Required<DocsLayoutConfig>;
190
+ docsFooter: DocsFooterConfig;
191
+ docsHome: Required<DocsHomeConfig>;
192
+ docsHeaderNav: Required<DocsHeaderNavConfig>;
193
+ docsComponents: DocsComponentsConfig;
194
+ docsSiteTitle: string;
195
+ docsScrollOffset: number;
196
+ getDocsPageByPath: (pathname: string) => DocsPage;
197
+ }
198
+ declare function resolveDocsContent({ docsConfig, markdownFiles }: ResolveDocsContentInput): ResolvedDocsContent;
199
+
200
+ interface CreateDocsRoutesInput {
201
+ docsPages: DocsPage[];
202
+ homeEnabled: boolean;
203
+ homeComponent: Component;
204
+ pageComponent: Component;
205
+ notFoundComponent?: Component;
206
+ }
207
+ declare function createDocsRoutes({ docsPages, homeEnabled, homeComponent, pageComponent, notFoundComponent }: CreateDocsRoutesInput): RouteRecordRaw[];
208
+
209
+ export { type CreateDocsRoutesInput, type DocsAsideProps, type DocsBrandProps, type DocsComponentsConfig, type DocsConfig, type DocsContentBlock, type DocsFooterConfig, type DocsFooterProps, type DocsHeaderNavConfig, type DocsHeaderNavProps, type DocsHeaderProps, type DocsHomeActionConfig, type DocsHomeConfig, type DocsLayoutConfig, type DocsLayoutProps, type DocsLayoutVariant, type DocsPage, type DocsPageMeta, type DocsSectionConfig, type DocsSidebarProps, type DocsSiteConfig, type DocsSiteLogoConfig, type DocsTocConfig, type ResolveDocsContentInput, type ResolvedDocsContent, createDocsRoutes, createViteSsgApp, defineDocsConfig, resolveDocsContent };
package/dist/index.js ADDED
@@ -0,0 +1,464 @@
1
+ // src/createViteSsgApp.ts
2
+ import { createHead as createClientHead } from "@unhead/vue/client";
3
+ import { createHead as createServerHead } from "@unhead/vue/server";
4
+ import { createApp, createSSRApp } from "vue";
5
+ import {
6
+ createMemoryHistory,
7
+ createRouter,
8
+ createWebHistory
9
+ } from "vue-router";
10
+ async function documentReady() {
11
+ if (typeof document === "undefined" || document.readyState !== "loading") {
12
+ return;
13
+ }
14
+ await new Promise((resolve) => {
15
+ document.addEventListener("DOMContentLoaded", () => resolve(), { once: true });
16
+ });
17
+ }
18
+ async function nextFrame() {
19
+ await new Promise((resolve) => requestAnimationFrame(() => resolve()));
20
+ }
21
+ function isVisibleElement(element) {
22
+ return Boolean(element && element.offsetParent !== null);
23
+ }
24
+ function getStickyOffsetTop() {
25
+ if (typeof document === "undefined") {
26
+ return 0;
27
+ }
28
+ const header = document.querySelector(".vf-document-layout__header");
29
+ const layoutSubheader = document.querySelector(".vf-document-layout__subheader");
30
+ const contentSubheader = document.querySelector(".vf-document-layout__content-subheader");
31
+ const topGap = 16;
32
+ let offset = topGap;
33
+ if (isVisibleElement(header)) {
34
+ offset += header.getBoundingClientRect().height;
35
+ }
36
+ if (isVisibleElement(layoutSubheader)) {
37
+ offset += layoutSubheader.getBoundingClientRect().height;
38
+ }
39
+ if (isVisibleElement(contentSubheader)) {
40
+ offset += contentSubheader.getBoundingClientRect().height;
41
+ }
42
+ return offset;
43
+ }
44
+ function getInitialState() {
45
+ if (typeof window === "undefined") {
46
+ return {};
47
+ }
48
+ return window.__INITIAL_STATE__ ?? {};
49
+ }
50
+ function ensureHistoryState() {
51
+ if (typeof window === "undefined") {
52
+ return;
53
+ }
54
+ if (window.history.state) {
55
+ return;
56
+ }
57
+ const current = `${window.location.pathname}${window.location.search}${window.location.hash}`;
58
+ window.history.replaceState(
59
+ {
60
+ back: null,
61
+ current,
62
+ forward: null,
63
+ position: window.history.length - 1,
64
+ replaced: true,
65
+ scroll: null
66
+ },
67
+ "",
68
+ current
69
+ );
70
+ }
71
+ function createViteSsgApp(App, routerOptions, fn, options) {
72
+ const { rootContainer = "#app", transformState, useHead = true } = options ?? {};
73
+ async function createSsgApp(routePath) {
74
+ const app = import.meta.env.SSR || options?.hydration ? createSSRApp(App) : createApp(App);
75
+ let head;
76
+ if (useHead) {
77
+ head = import.meta.env.SSR ? createServerHead() : createClientHead();
78
+ app.use(head);
79
+ }
80
+ const router = createRouter({
81
+ history: import.meta.env.SSR ? createMemoryHistory(routerOptions.base) : createWebHistory(routerOptions.base),
82
+ scrollBehavior: async (to, _from, savedPosition) => {
83
+ if (savedPosition) {
84
+ return savedPosition;
85
+ }
86
+ if (to.hash) {
87
+ const targetHash = decodeURIComponent(to.hash);
88
+ await nextFrame();
89
+ await nextFrame();
90
+ const targetElement = document.querySelector(targetHash);
91
+ if (targetElement) {
92
+ const top = targetElement.getBoundingClientRect().top + window.scrollY - getStickyOffsetTop();
93
+ return {
94
+ left: 0,
95
+ top: Math.max(0, top),
96
+ behavior: "smooth"
97
+ };
98
+ }
99
+ }
100
+ return { left: 0, top: 0 };
101
+ },
102
+ ...routerOptions
103
+ });
104
+ const appRenderCallbacks = [];
105
+ const onSSRAppRendered = import.meta.env.SSR ? (cb) => appRenderCallbacks.push(cb) : () => void 0;
106
+ const triggerOnSSRAppRendered = () => Promise.all(appRenderCallbacks.map((cb) => cb()));
107
+ const context = {
108
+ app,
109
+ head,
110
+ initialState: {},
111
+ isClient: !import.meta.env.SSR,
112
+ onSSRAppRendered,
113
+ routePath,
114
+ router,
115
+ routes: routerOptions.routes,
116
+ transformState,
117
+ triggerOnSSRAppRendered
118
+ };
119
+ if (!import.meta.env.SSR) {
120
+ await documentReady();
121
+ ensureHistoryState();
122
+ context.initialState = transformState?.(getInitialState()) ?? getInitialState();
123
+ }
124
+ await fn?.(context);
125
+ app.use(router);
126
+ let entryRoutePath;
127
+ let isFirstRoute = true;
128
+ router.beforeEach((to) => {
129
+ if (isFirstRoute || entryRoutePath && entryRoutePath === to.path) {
130
+ isFirstRoute = false;
131
+ entryRoutePath = to.path;
132
+ to.meta.state = context.initialState;
133
+ }
134
+ return true;
135
+ });
136
+ if (import.meta.env.SSR) {
137
+ const route = context.routePath ?? "/";
138
+ await router.push(route);
139
+ await router.isReady();
140
+ context.initialState = router.currentRoute.value.meta.state || {};
141
+ }
142
+ return context;
143
+ }
144
+ if (!import.meta.env.SSR) {
145
+ ;
146
+ (async () => {
147
+ const { app, router } = await createSsgApp();
148
+ await router.isReady();
149
+ app.mount(rootContainer, true);
150
+ })();
151
+ }
152
+ return createSsgApp;
153
+ }
154
+
155
+ // src/docsContent.ts
156
+ import { Parser, marked } from "marked";
157
+ import GithubSlugger from "github-slugger";
158
+ function parseFrontmatter(source) {
159
+ if (!source.startsWith("---\n")) {
160
+ return { data: {}, content: source };
161
+ }
162
+ const frontmatterEnd = source.indexOf("\n---\n", 4);
163
+ if (frontmatterEnd === -1) {
164
+ return { data: {}, content: source };
165
+ }
166
+ const rawFrontmatter = source.slice(4, frontmatterEnd);
167
+ const content = source.slice(frontmatterEnd + 5);
168
+ const data = {};
169
+ for (const line of rawFrontmatter.split("\n")) {
170
+ const separatorIndex = line.indexOf(":");
171
+ if (separatorIndex === -1) {
172
+ continue;
173
+ }
174
+ const key = line.slice(0, separatorIndex).trim();
175
+ const rawValue = line.slice(separatorIndex + 1).trim();
176
+ const normalizedValue = rawValue.replace(/^['"]|['"]$/g, "");
177
+ if (key === "order") {
178
+ const numericValue = Number(normalizedValue);
179
+ data.order = Number.isFinite(numericValue) ? numericValue : 0;
180
+ continue;
181
+ }
182
+ if (key === "title" || key === "navTitle" || key === "description") {
183
+ data[key] = normalizedValue;
184
+ }
185
+ }
186
+ return { data, content };
187
+ }
188
+ function toTitleCase(value) {
189
+ return value.replace(/[-_]/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
190
+ }
191
+ function normalizeDocPath(sourcePath) {
192
+ const relativePath = sourcePath.replace(/^.*\/(?:content|docs)\//, "").replace(/\.md$/, "");
193
+ if (relativePath === "index") {
194
+ return "/";
195
+ }
196
+ if (relativePath.endsWith("/index")) {
197
+ return `/${relativePath.replace(/\/index$/, "")}`;
198
+ }
199
+ return `/${relativePath}`;
200
+ }
201
+ function toValueFromPath(path) {
202
+ return path === "/" ? "index" : path.replace(/^\//, "").replace(/\//g, "-");
203
+ }
204
+ function renderInline(tokens) {
205
+ return Parser.parseInline(tokens ?? []);
206
+ }
207
+ function renderBlockTokens(tokens) {
208
+ return Parser.parse(tokens ?? []);
209
+ }
210
+ function renderMarkdown(markdown, tocLevels) {
211
+ const tokens = marked.lexer(markdown);
212
+ const headingSlugger = new GithubSlugger();
213
+ const tableOfContents = [];
214
+ const blocks = [];
215
+ for (const token of tokens) {
216
+ switch (token.type) {
217
+ case "space":
218
+ break;
219
+ case "heading": {
220
+ const id = headingSlugger.slug(token.text);
221
+ const html = renderInline(token.tokens);
222
+ blocks.push({
223
+ type: "heading",
224
+ depth: token.depth,
225
+ id,
226
+ html
227
+ });
228
+ if (tocLevels.has(token.depth)) {
229
+ tableOfContents.push({
230
+ id,
231
+ label: token.text,
232
+ level: token.depth - 1
233
+ });
234
+ }
235
+ break;
236
+ }
237
+ case "paragraph":
238
+ blocks.push({
239
+ type: "paragraph",
240
+ html: renderInline(token.tokens)
241
+ });
242
+ break;
243
+ case "code":
244
+ blocks.push({
245
+ type: "code",
246
+ code: token.text,
247
+ language: token.lang?.trim() || "text"
248
+ });
249
+ break;
250
+ case "list":
251
+ blocks.push({
252
+ type: "list",
253
+ ordered: token.ordered,
254
+ items: token.items.map((item) => renderInline(item.tokens))
255
+ });
256
+ break;
257
+ case "blockquote":
258
+ blocks.push({
259
+ type: "blockquote",
260
+ html: renderBlockTokens(token.tokens)
261
+ });
262
+ break;
263
+ default:
264
+ blocks.push({
265
+ type: "html",
266
+ html: renderBlockTokens([token])
267
+ });
268
+ break;
269
+ }
270
+ }
271
+ return { blocks, tableOfContents };
272
+ }
273
+ function parsePage(sourcePath, source, tocLevels) {
274
+ const { data: frontmatter, content } = parseFrontmatter(source);
275
+ const path = normalizeDocPath(sourcePath);
276
+ const pathSegments = path === "/" ? [] : path.replace(/^\//, "").split("/");
277
+ const section = pathSegments.slice(0, -1);
278
+ const filename = pathSegments[pathSegments.length - 1] ?? "index";
279
+ const fallbackTitle = filename === "index" ? "Overview" : toTitleCase(filename);
280
+ const title = frontmatter.title?.trim() || fallbackTitle;
281
+ const navTitle = frontmatter.navTitle?.trim() || title;
282
+ const { blocks, tableOfContents } = renderMarkdown(content, tocLevels);
283
+ return {
284
+ id: toValueFromPath(path),
285
+ path,
286
+ sourcePath,
287
+ title,
288
+ navTitle,
289
+ description: frontmatter.description?.trim(),
290
+ order: frontmatter.order ?? 0,
291
+ section,
292
+ blocks,
293
+ tableOfContents
294
+ };
295
+ }
296
+ function sortNodes(nodes) {
297
+ return [...nodes].sort((left, right) => {
298
+ if (left.order !== right.order) {
299
+ return left.order - right.order;
300
+ }
301
+ return left.label.localeCompare(right.label);
302
+ });
303
+ }
304
+ function buildSidebar(pages, docsConfig) {
305
+ const root = /* @__PURE__ */ new Map();
306
+ for (const page of pages) {
307
+ let current = root;
308
+ let currentPath = "";
309
+ for (const segment of page.section) {
310
+ currentPath = `${currentPath}/${segment}`;
311
+ const sectionConfig = docsConfig.sectionLabels?.[segment];
312
+ if (!current.has(segment)) {
313
+ current.set(segment, {
314
+ label: sectionConfig?.label ?? toTitleCase(segment),
315
+ order: sectionConfig?.order ?? 1e3,
316
+ path: currentPath,
317
+ children: /* @__PURE__ */ new Map()
318
+ });
319
+ }
320
+ current = current.get(segment).children;
321
+ }
322
+ current.set(page.id, {
323
+ label: page.navTitle,
324
+ order: page.order,
325
+ path: page.path,
326
+ children: /* @__PURE__ */ new Map()
327
+ });
328
+ }
329
+ const toItems = (nodes) => sortNodes([...nodes.values()]).map((node) => {
330
+ const item = {
331
+ value: toValueFromPath(node.path ?? node.label),
332
+ label: node.label
333
+ };
334
+ const children = toItems(node.children);
335
+ if (children.length > 0) {
336
+ item.children = children;
337
+ } else if (node.path) {
338
+ item.to = node.path;
339
+ }
340
+ return item;
341
+ });
342
+ return toItems(root);
343
+ }
344
+ function resolveDocsContent({ docsConfig, markdownFiles }) {
345
+ const tocLevels = new Set(docsConfig.toc?.levels ?? [2, 3, 4]);
346
+ const docsPages = Object.entries(markdownFiles).map(([sourcePath, source]) => parsePage(sourcePath, source, tocLevels)).filter((page) => page.path !== "/").sort((left, right) => left.path.localeCompare(right.path));
347
+ const docsSidebar = buildSidebar(docsPages, docsConfig);
348
+ const docsSite = {
349
+ title: docsConfig.site?.title ?? docsConfig.title ?? "docs",
350
+ description: docsConfig.site?.description,
351
+ githubUrl: docsConfig.site?.githubUrl,
352
+ homeTo: docsConfig.site?.homeTo ?? "/",
353
+ favicon: docsConfig.site?.favicon,
354
+ logo: docsConfig.site?.logo,
355
+ logoLabel: docsConfig.site?.logoLabel
356
+ };
357
+ const docsLayout = {
358
+ variant: docsConfig.layout?.variant ?? "sidebar-content-aside",
359
+ fillViewport: docsConfig.layout?.fillViewport ?? true,
360
+ stickyHeader: docsConfig.layout?.stickyHeader ?? true,
361
+ stickySidebar: docsConfig.layout?.stickySidebar ?? true,
362
+ stickyAside: docsConfig.layout?.stickyAside ?? true,
363
+ edgeNotches: docsConfig.layout?.edgeNotches ?? false,
364
+ hideSidebarOnMobile: docsConfig.layout?.hideSidebarOnMobile ?? true,
365
+ hideAsideOnMobile: docsConfig.layout?.hideAsideOnMobile ?? true
366
+ };
367
+ const docsFooter = {
368
+ left: docsConfig.footer?.left ?? "Codemonster documentation",
369
+ right: docsConfig.footer?.right
370
+ };
371
+ const docsHome = {
372
+ enabled: docsConfig.home?.enabled ?? true,
373
+ title: docsConfig.home?.title ?? "Build docs fast",
374
+ description: docsConfig.home?.description ?? "Write markdown, keep the same UI stack, and ship clean developer docs.",
375
+ showGrid: docsConfig.home?.showGrid ?? true,
376
+ primaryAction: docsConfig.home?.primaryAction ?? {
377
+ label: "Get Started",
378
+ to: "/guide/installation"
379
+ },
380
+ secondaryAction: docsConfig.home?.secondaryAction ?? {
381
+ label: "View on GitHub",
382
+ href: docsConfig.site?.githubUrl
383
+ }
384
+ };
385
+ const docsHeaderNav = {
386
+ items: docsConfig.headerNav?.items ?? [],
387
+ ariaLabel: docsConfig.headerNav?.ariaLabel ?? "Header navigation"
388
+ };
389
+ const docsComponents = docsConfig.components ?? {};
390
+ const docsSiteTitle = docsSite.title;
391
+ const docsScrollOffset = docsConfig.toc?.scrollOffset ?? 96;
392
+ function getDocsPageByPath(pathname) {
393
+ const normalizedPath = pathname === "/" ? "/" : pathname.replace(/\/$/, "");
394
+ return docsPages.find((page) => page.path === normalizedPath) ?? docsPages[0];
395
+ }
396
+ return {
397
+ docsPages,
398
+ docsSidebar,
399
+ docsSite,
400
+ docsLayout,
401
+ docsFooter,
402
+ docsHome,
403
+ docsHeaderNav,
404
+ docsComponents,
405
+ docsSiteTitle,
406
+ docsScrollOffset,
407
+ getDocsPageByPath
408
+ };
409
+ }
410
+
411
+ // src/routes.ts
412
+ function createDocsRoutes({
413
+ docsPages,
414
+ homeEnabled,
415
+ homeComponent,
416
+ pageComponent,
417
+ notFoundComponent
418
+ }) {
419
+ const docsPageRoutes = docsPages.map((page) => ({
420
+ path: page.path,
421
+ name: page.id,
422
+ component: pageComponent
423
+ }));
424
+ const docsLandingRoute = [...docsPages].sort((left, right) => {
425
+ if (left.order !== right.order) {
426
+ return left.order - right.order;
427
+ }
428
+ return left.path.localeCompare(right.path);
429
+ })[0];
430
+ const rootRoute = homeEnabled ? {
431
+ path: "/",
432
+ name: "home",
433
+ component: homeComponent
434
+ } : docsLandingRoute ? {
435
+ path: "/",
436
+ name: "home",
437
+ redirect: docsLandingRoute.path
438
+ } : {
439
+ path: "/",
440
+ name: "home",
441
+ component: homeComponent
442
+ };
443
+ const routes = [rootRoute, ...docsPageRoutes];
444
+ if (notFoundComponent) {
445
+ routes.push({
446
+ path: "/:pathMatch(.*)*",
447
+ name: "not-found",
448
+ component: notFoundComponent
449
+ });
450
+ }
451
+ return routes;
452
+ }
453
+
454
+ // src/config.ts
455
+ function defineDocsConfig(config) {
456
+ return config;
457
+ }
458
+ export {
459
+ createDocsRoutes,
460
+ createViteSsgApp,
461
+ defineDocsConfig,
462
+ resolveDocsContent
463
+ };
464
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/createViteSsgApp.ts","../src/docsContent.ts","../src/routes.ts","../src/config.ts"],"sourcesContent":["import { createHead as createClientHead } from '@unhead/vue/client'\nimport { createHead as createServerHead } from '@unhead/vue/server'\nimport { createApp, createSSRApp, type Component } from 'vue'\nimport {\n createMemoryHistory,\n createRouter,\n createWebHistory,\n type RouteRecordRaw,\n type Router\n} from 'vue-router'\n\ntype CreateViteSsgContext = {\n app: ReturnType<typeof createApp>\n head: ReturnType<typeof createClientHead> | ReturnType<typeof createServerHead> | undefined\n initialState: Record<string, unknown>\n isClient: boolean\n onSSRAppRendered: (cb: () => void | Promise<void>) => void\n routePath?: string\n router: Router\n routes: RouteRecordRaw[]\n transformState?: (state: Record<string, unknown>) => Record<string, unknown>\n triggerOnSSRAppRendered: () => Promise<void[]>\n}\n\ntype CreateViteSsgOptions = {\n hydration?: boolean\n rootContainer?: string\n useHead?: boolean\n transformState?: (state: Record<string, unknown>) => Record<string, unknown>\n}\n\nasync function documentReady(): Promise<void> {\n if (typeof document === 'undefined' || document.readyState !== 'loading') {\n return\n }\n\n await new Promise<void>((resolve) => {\n document.addEventListener('DOMContentLoaded', () => resolve(), { once: true })\n })\n}\n\nasync function nextFrame(): Promise<void> {\n await new Promise<void>((resolve) => requestAnimationFrame(() => resolve()))\n}\n\nfunction isVisibleElement(element: HTMLElement | null): element is HTMLElement {\n return Boolean(element && element.offsetParent !== null)\n}\n\nfunction getStickyOffsetTop(): number {\n if (typeof document === 'undefined') {\n return 0\n }\n\n const header = document.querySelector<HTMLElement>('.vf-document-layout__header')\n const layoutSubheader = document.querySelector<HTMLElement>('.vf-document-layout__subheader')\n const contentSubheader = document.querySelector<HTMLElement>('.vf-document-layout__content-subheader')\n const topGap = 16\n let offset = topGap\n\n if (isVisibleElement(header)) {\n offset += header.getBoundingClientRect().height\n }\n\n if (isVisibleElement(layoutSubheader)) {\n offset += layoutSubheader.getBoundingClientRect().height\n }\n\n if (isVisibleElement(contentSubheader)) {\n offset += contentSubheader.getBoundingClientRect().height\n }\n\n return offset\n}\n\nfunction getInitialState(): Record<string, unknown> {\n if (typeof window === 'undefined') {\n return {}\n }\n\n return ((window as Window & { __INITIAL_STATE__?: Record<string, unknown> }).__INITIAL_STATE__ ?? {})\n}\n\nfunction ensureHistoryState(): void {\n if (typeof window === 'undefined') {\n return\n }\n\n if (window.history.state) {\n return\n }\n\n const current = `${window.location.pathname}${window.location.search}${window.location.hash}`\n\n window.history.replaceState(\n {\n back: null,\n current,\n forward: null,\n position: window.history.length - 1,\n replaced: true,\n scroll: null\n },\n '',\n current\n )\n}\n\nexport function createViteSsgApp(\n App: Component,\n routerOptions: { base?: string; routes: RouteRecordRaw[] },\n fn?: (context: CreateViteSsgContext) => Promise<void> | void,\n options?: CreateViteSsgOptions\n) {\n const { rootContainer = '#app', transformState, useHead = true } = options ?? {}\n\n async function createSsgApp(routePath?: string): Promise<CreateViteSsgContext> {\n const app = import.meta.env.SSR || options?.hydration ? createSSRApp(App) : createApp(App)\n let head: CreateViteSsgContext['head']\n\n if (useHead) {\n head = import.meta.env.SSR ? createServerHead() : createClientHead()\n app.use(head)\n }\n\n const router = createRouter({\n history: import.meta.env.SSR\n ? createMemoryHistory(routerOptions.base)\n : createWebHistory(routerOptions.base),\n scrollBehavior: async (to, _from, savedPosition) => {\n if (savedPosition) {\n return savedPosition\n }\n\n if (to.hash) {\n const targetHash = decodeURIComponent(to.hash)\n\n await nextFrame()\n await nextFrame()\n\n const targetElement = document.querySelector<HTMLElement>(targetHash)\n\n if (targetElement) {\n const top = targetElement.getBoundingClientRect().top + window.scrollY - getStickyOffsetTop()\n\n return {\n left: 0,\n top: Math.max(0, top),\n behavior: 'smooth'\n }\n }\n }\n\n return { left: 0, top: 0 }\n },\n ...routerOptions\n })\n\n const appRenderCallbacks: Array<() => void | Promise<void>> = []\n const onSSRAppRendered = import.meta.env.SSR\n ? (cb: () => void | Promise<void>) => appRenderCallbacks.push(cb)\n : () => undefined\n const triggerOnSSRAppRendered = () => Promise.all(appRenderCallbacks.map((cb) => cb()))\n\n const context: CreateViteSsgContext = {\n app,\n head,\n initialState: {},\n isClient: !import.meta.env.SSR,\n onSSRAppRendered,\n routePath,\n router,\n routes: routerOptions.routes,\n transformState,\n triggerOnSSRAppRendered\n }\n\n if (!import.meta.env.SSR) {\n await documentReady()\n ensureHistoryState()\n context.initialState = transformState?.(getInitialState()) ?? getInitialState()\n }\n\n await fn?.(context)\n app.use(router)\n\n let entryRoutePath: string | undefined\n let isFirstRoute = true\n\n router.beforeEach((to) => {\n if (isFirstRoute || (entryRoutePath && entryRoutePath === to.path)) {\n isFirstRoute = false\n entryRoutePath = to.path\n to.meta.state = context.initialState\n }\n\n return true\n })\n\n if (import.meta.env.SSR) {\n const route = context.routePath ?? '/'\n await router.push(route)\n await router.isReady()\n context.initialState = (router.currentRoute.value.meta.state as Record<string, unknown>) || {}\n }\n\n return context\n }\n\n if (!import.meta.env.SSR) {\n ;(async () => {\n const { app, router } = await createSsgApp()\n await router.isReady()\n app.mount(rootContainer, true)\n })()\n }\n\n return createSsgApp\n}\n","import { Parser, type Tokens, marked } from 'marked'\nimport GithubSlugger from 'github-slugger'\nimport type { VfNavMenuItem, VfTableOfContentsItem } from '@codemonster-ru/vueforge-core'\nimport type {\n DocsComponentsConfig,\n DocsConfig,\n DocsFooterConfig,\n DocsHeaderNavConfig,\n DocsHomeConfig,\n DocsLayoutConfig,\n DocsSiteConfig\n} from './config'\n\nexport type DocsContentBlock =\n | {\n type: 'heading'\n depth: 1 | 2 | 3 | 4 | 5 | 6\n id: string\n html: string\n }\n | {\n type: 'paragraph'\n html: string\n }\n | {\n type: 'code'\n code: string\n language: string\n }\n | {\n type: 'list'\n ordered: boolean\n items: string[]\n }\n | {\n type: 'blockquote'\n html: string\n }\n | {\n type: 'html'\n html: string\n }\n\nexport interface DocsPage {\n id: string\n path: string\n sourcePath: string\n title: string\n navTitle: string\n description?: string\n order: number\n section: string[]\n blocks: DocsContentBlock[]\n tableOfContents: VfTableOfContentsItem[]\n}\n\ninterface Frontmatter {\n title?: string\n navTitle?: string\n description?: string\n order?: number\n}\n\ninterface NavNode {\n label: string\n order: number\n path?: string\n children: Map<string, NavNode>\n}\n\ntype TokensList = Tokens.Generic[]\n\nexport interface ResolveDocsContentInput {\n docsConfig: DocsConfig\n markdownFiles: Record<string, string>\n}\n\nexport interface ResolvedDocsContent {\n docsPages: DocsPage[]\n docsSidebar: VfNavMenuItem[]\n docsSite: DocsSiteConfig\n docsLayout: Required<DocsLayoutConfig>\n docsFooter: DocsFooterConfig\n docsHome: Required<DocsHomeConfig>\n docsHeaderNav: Required<DocsHeaderNavConfig>\n docsComponents: DocsComponentsConfig\n docsSiteTitle: string\n docsScrollOffset: number\n getDocsPageByPath: (pathname: string) => DocsPage\n}\n\nfunction parseFrontmatter(source: string): { data: Frontmatter; content: string } {\n if (!source.startsWith('---\\n')) {\n return { data: {}, content: source }\n }\n\n const frontmatterEnd = source.indexOf('\\n---\\n', 4)\n\n if (frontmatterEnd === -1) {\n return { data: {}, content: source }\n }\n\n const rawFrontmatter = source.slice(4, frontmatterEnd)\n const content = source.slice(frontmatterEnd + 5)\n const data: Frontmatter = {}\n\n for (const line of rawFrontmatter.split('\\n')) {\n const separatorIndex = line.indexOf(':')\n\n if (separatorIndex === -1) {\n continue\n }\n\n const key = line.slice(0, separatorIndex).trim()\n const rawValue = line.slice(separatorIndex + 1).trim()\n const normalizedValue = rawValue.replace(/^['\"]|['\"]$/g, '')\n\n if (key === 'order') {\n const numericValue = Number(normalizedValue)\n data.order = Number.isFinite(numericValue) ? numericValue : 0\n continue\n }\n\n if (key === 'title' || key === 'navTitle' || key === 'description') {\n data[key] = normalizedValue\n }\n }\n\n return { data, content }\n}\n\nfunction toTitleCase(value: string): string {\n return value\n .replace(/[-_]/g, ' ')\n .replace(/\\b\\w/g, (letter) => letter.toUpperCase())\n}\n\nfunction normalizeDocPath(sourcePath: string): string {\n const relativePath = sourcePath.replace(/^.*\\/(?:content|docs)\\//, '').replace(/\\.md$/, '')\n\n if (relativePath === 'index') {\n return '/'\n }\n\n if (relativePath.endsWith('/index')) {\n return `/${relativePath.replace(/\\/index$/, '')}`\n }\n\n return `/${relativePath}`\n}\n\nfunction toValueFromPath(path: string): string {\n return path === '/' ? 'index' : path.replace(/^\\//, '').replace(/\\//g, '-')\n}\n\nfunction renderInline(tokens: Tokens.Generic[] | undefined): string {\n return Parser.parseInline(tokens ?? [])\n}\n\nfunction renderBlockTokens(tokens: TokensList | undefined): string {\n return Parser.parse(tokens ?? [])\n}\n\nfunction renderMarkdown(markdown: string, tocLevels: Set<number>): {\n blocks: DocsContentBlock[]\n tableOfContents: VfTableOfContentsItem[]\n} {\n const tokens = marked.lexer(markdown) as TokensList\n const headingSlugger = new GithubSlugger()\n const tableOfContents: VfTableOfContentsItem[] = []\n const blocks: DocsContentBlock[] = []\n\n for (const token of tokens) {\n switch (token.type) {\n case 'space':\n break\n case 'heading': {\n const id = headingSlugger.slug(token.text)\n const html = renderInline(token.tokens)\n\n blocks.push({\n type: 'heading',\n depth: token.depth as 1 | 2 | 3 | 4 | 5 | 6,\n id,\n html\n })\n\n if (tocLevels.has(token.depth)) {\n tableOfContents.push({\n id,\n label: token.text,\n level: token.depth - 1\n })\n }\n break\n }\n case 'paragraph':\n blocks.push({\n type: 'paragraph',\n html: renderInline(token.tokens)\n })\n break\n case 'code':\n blocks.push({\n type: 'code',\n code: token.text,\n language: token.lang?.trim() || 'text'\n })\n break\n case 'list':\n blocks.push({\n type: 'list',\n ordered: token.ordered,\n items: token.items.map((item: Tokens.ListItem) => renderInline(item.tokens))\n })\n break\n case 'blockquote':\n blocks.push({\n type: 'blockquote',\n html: renderBlockTokens(token.tokens)\n })\n break\n default:\n blocks.push({\n type: 'html',\n html: renderBlockTokens([token])\n })\n break\n }\n }\n\n return { blocks, tableOfContents }\n}\n\nfunction parsePage(sourcePath: string, source: string, tocLevels: Set<number>): DocsPage {\n const { data: frontmatter, content } = parseFrontmatter(source)\n const path = normalizeDocPath(sourcePath)\n const pathSegments = path === '/' ? [] : path.replace(/^\\//, '').split('/')\n const section = pathSegments.slice(0, -1)\n const filename = pathSegments[pathSegments.length - 1] ?? 'index'\n const fallbackTitle = filename === 'index' ? 'Overview' : toTitleCase(filename)\n const title = frontmatter.title?.trim() || fallbackTitle\n const navTitle = frontmatter.navTitle?.trim() || title\n const { blocks, tableOfContents } = renderMarkdown(content, tocLevels)\n\n return {\n id: toValueFromPath(path),\n path,\n sourcePath,\n title,\n navTitle,\n description: frontmatter.description?.trim(),\n order: frontmatter.order ?? 0,\n section,\n blocks,\n tableOfContents\n }\n}\n\nfunction sortNodes(nodes: NavNode[]): NavNode[] {\n return [...nodes].sort((left, right) => {\n if (left.order !== right.order) {\n return left.order - right.order\n }\n\n return left.label.localeCompare(right.label)\n })\n}\n\nfunction buildSidebar(pages: DocsPage[], docsConfig: DocsConfig): VfNavMenuItem[] {\n const root = new Map<string, NavNode>()\n\n for (const page of pages) {\n let current = root\n let currentPath = ''\n\n for (const segment of page.section) {\n currentPath = `${currentPath}/${segment}`\n const sectionConfig = docsConfig.sectionLabels?.[segment]\n\n if (!current.has(segment)) {\n current.set(segment, {\n label: sectionConfig?.label ?? toTitleCase(segment),\n order: sectionConfig?.order ?? 1_000,\n path: currentPath,\n children: new Map()\n })\n }\n\n current = current.get(segment)!.children\n }\n\n current.set(page.id, {\n label: page.navTitle,\n order: page.order,\n path: page.path,\n children: new Map()\n })\n }\n\n const toItems = (nodes: Map<string, NavNode>): VfNavMenuItem[] =>\n sortNodes([...nodes.values()]).map((node) => {\n const item: VfNavMenuItem = {\n value: toValueFromPath(node.path ?? node.label),\n label: node.label\n }\n\n const children = toItems(node.children)\n\n if (children.length > 0) {\n item.children = children\n } else if (node.path) {\n item.to = node.path\n }\n\n return item\n })\n\n return toItems(root)\n}\n\nexport function resolveDocsContent({ docsConfig, markdownFiles }: ResolveDocsContentInput): ResolvedDocsContent {\n const tocLevels = new Set(docsConfig.toc?.levels ?? [2, 3, 4])\n\n const docsPages = Object.entries(markdownFiles)\n .map(([sourcePath, source]) => parsePage(sourcePath, source, tocLevels))\n .filter((page) => page.path !== '/')\n .sort((left, right) => left.path.localeCompare(right.path))\n\n const docsSidebar = buildSidebar(docsPages, docsConfig)\n const docsSite: DocsSiteConfig = {\n title: docsConfig.site?.title ?? docsConfig.title ?? 'docs',\n description: docsConfig.site?.description,\n githubUrl: docsConfig.site?.githubUrl,\n homeTo: docsConfig.site?.homeTo ?? '/',\n favicon: docsConfig.site?.favicon,\n logo: docsConfig.site?.logo,\n logoLabel: docsConfig.site?.logoLabel\n }\n const docsLayout: Required<DocsLayoutConfig> = {\n variant: docsConfig.layout?.variant ?? 'sidebar-content-aside',\n fillViewport: docsConfig.layout?.fillViewport ?? true,\n stickyHeader: docsConfig.layout?.stickyHeader ?? true,\n stickySidebar: docsConfig.layout?.stickySidebar ?? true,\n stickyAside: docsConfig.layout?.stickyAside ?? true,\n edgeNotches: docsConfig.layout?.edgeNotches ?? false,\n hideSidebarOnMobile: docsConfig.layout?.hideSidebarOnMobile ?? true,\n hideAsideOnMobile: docsConfig.layout?.hideAsideOnMobile ?? true\n }\n const docsFooter: DocsFooterConfig = {\n left: docsConfig.footer?.left ?? 'Codemonster documentation',\n right: docsConfig.footer?.right\n }\n const docsHome: Required<DocsHomeConfig> = {\n enabled: docsConfig.home?.enabled ?? true,\n title: docsConfig.home?.title ?? 'Build docs fast',\n description: docsConfig.home?.description ?? 'Write markdown, keep the same UI stack, and ship clean developer docs.',\n showGrid: docsConfig.home?.showGrid ?? true,\n primaryAction: docsConfig.home?.primaryAction ?? {\n label: 'Get Started',\n to: '/guide/installation'\n },\n secondaryAction: docsConfig.home?.secondaryAction ?? {\n label: 'View on GitHub',\n href: docsConfig.site?.githubUrl\n }\n }\n const docsHeaderNav: Required<DocsHeaderNavConfig> = {\n items: docsConfig.headerNav?.items ?? [],\n ariaLabel: docsConfig.headerNav?.ariaLabel ?? 'Header navigation'\n }\n const docsComponents: DocsComponentsConfig = docsConfig.components ?? {}\n const docsSiteTitle = docsSite.title\n const docsScrollOffset = docsConfig.toc?.scrollOffset ?? 96\n\n function getDocsPageByPath(pathname: string): DocsPage {\n const normalizedPath = pathname === '/' ? '/' : pathname.replace(/\\/$/, '')\n\n return docsPages.find((page) => page.path === normalizedPath) ?? docsPages[0]\n }\n\n return {\n docsPages,\n docsSidebar,\n docsSite,\n docsLayout,\n docsFooter,\n docsHome,\n docsHeaderNav,\n docsComponents,\n docsSiteTitle,\n docsScrollOffset,\n getDocsPageByPath\n }\n}\n","import type { Component } from 'vue'\nimport type { RouteRecordRaw } from 'vue-router'\nimport type { DocsPage } from './docsContent'\n\nexport interface CreateDocsRoutesInput {\n docsPages: DocsPage[]\n homeEnabled: boolean\n homeComponent: Component\n pageComponent: Component\n notFoundComponent?: Component\n}\n\nexport function createDocsRoutes({\n docsPages,\n homeEnabled,\n homeComponent,\n pageComponent,\n notFoundComponent\n}: CreateDocsRoutesInput): RouteRecordRaw[] {\n const docsPageRoutes: RouteRecordRaw[] = docsPages.map((page) => ({\n path: page.path,\n name: page.id,\n component: pageComponent\n }))\n\n const docsLandingRoute = [...docsPages].sort((left, right) => {\n if (left.order !== right.order) {\n return left.order - right.order\n }\n\n return left.path.localeCompare(right.path)\n })[0]\n\n const rootRoute: RouteRecordRaw = homeEnabled\n ? {\n path: '/',\n name: 'home',\n component: homeComponent\n }\n : docsLandingRoute\n ? {\n path: '/',\n name: 'home',\n redirect: docsLandingRoute.path\n }\n : {\n path: '/',\n name: 'home',\n component: homeComponent\n }\n\n const routes: RouteRecordRaw[] = [rootRoute, ...docsPageRoutes]\n\n if (notFoundComponent) {\n routes.push({\n path: '/:pathMatch(.*)*',\n name: 'not-found',\n component: notFoundComponent\n })\n }\n\n return routes\n}\n","import type { Component } from 'vue'\nimport type { VfNavMenuItem, VfTableOfContentsItem } from '@codemonster-ru/vueforge-core'\n\nexport interface DocsSectionConfig {\n label?: string\n order?: number\n}\n\nexport interface DocsTocConfig {\n levels?: number[]\n scrollOffset?: number\n}\n\nexport interface DocsSiteLogoConfig {\n src?: string\n component?: Component\n alt?: string\n width?: number | string\n height?: number | string\n}\n\nexport interface DocsHomeActionConfig {\n label: string\n to?: string\n href?: string\n}\n\nexport interface DocsHomeConfig {\n enabled?: boolean\n title?: string\n description?: string\n showGrid?: boolean\n primaryAction?: DocsHomeActionConfig\n secondaryAction?: DocsHomeActionConfig\n}\n\nexport interface DocsHeaderNavConfig {\n items?: VfNavMenuItem[]\n ariaLabel?: string\n}\n\nexport type DocsLayoutVariant =\n | 'content'\n | 'sidebar-content'\n | 'sidebar-content-aside'\n\nexport interface DocsSiteConfig {\n title: string\n description?: string\n githubUrl?: string\n homeTo?: string\n favicon?: string\n logo?: DocsSiteLogoConfig\n logoLabel?: string\n}\n\nexport interface DocsLayoutConfig {\n variant?: DocsLayoutVariant\n fillViewport?: boolean\n stickyHeader?: boolean\n stickySidebar?: boolean\n stickyAside?: boolean\n edgeNotches?: boolean\n hideSidebarOnMobile?: boolean\n hideAsideOnMobile?: boolean\n}\n\nexport interface DocsFooterConfig {\n left?: string\n right?: string\n}\n\nexport interface DocsPageMeta {\n title: string\n path: string\n}\n\nexport interface DocsHeaderProps {\n site: DocsSiteConfig\n}\n\nexport interface DocsBrandProps {\n site: DocsSiteConfig\n}\n\nexport interface DocsFooterProps {\n site: DocsSiteConfig\n}\n\nexport interface DocsHeaderNavProps {\n site: DocsSiteConfig\n items: VfNavMenuItem[]\n activeValue?: string\n}\n\nexport interface DocsSidebarProps {\n site: DocsSiteConfig\n page: DocsPageMeta\n items: VfNavMenuItem[]\n}\n\nexport interface DocsAsideProps {\n site: DocsSiteConfig\n page: DocsPageMeta\n items: VfTableOfContentsItem[]\n}\n\nexport interface DocsLayoutProps {\n site: DocsSiteConfig\n page: DocsPageMeta\n layout: Required<DocsLayoutConfig>\n sidebarItems: VfNavMenuItem[]\n tocItems: VfTableOfContentsItem[]\n}\n\nexport interface DocsComponentsConfig {\n Brand?: Component\n Home?: Component\n Header?: Component\n HeaderNav?: Component\n Footer?: Component\n SidebarTop?: Component\n SidebarBottom?: Component\n AsideTop?: Component\n AsideBottom?: Component\n Layout?: Component\n}\n\nexport interface DocsConfig {\n title?: string\n site?: Partial<DocsSiteConfig>\n home?: DocsHomeConfig\n headerNav?: DocsHeaderNavConfig\n layout?: DocsLayoutConfig\n footer?: DocsFooterConfig\n components?: DocsComponentsConfig\n sectionLabels?: Record<string, DocsSectionConfig>\n toc?: DocsTocConfig\n}\n\nexport function defineDocsConfig(config: DocsConfig): DocsConfig {\n return config\n}\n"],"mappings":";AAAA,SAAS,cAAc,wBAAwB;AAC/C,SAAS,cAAc,wBAAwB;AAC/C,SAAS,WAAW,oBAAoC;AACxD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAsBP,eAAe,gBAA+B;AAC5C,MAAI,OAAO,aAAa,eAAe,SAAS,eAAe,WAAW;AACxE;AAAA,EACF;AAEA,QAAM,IAAI,QAAc,CAAC,YAAY;AACnC,aAAS,iBAAiB,oBAAoB,MAAM,QAAQ,GAAG,EAAE,MAAM,KAAK,CAAC;AAAA,EAC/E,CAAC;AACH;AAEA,eAAe,YAA2B;AACxC,QAAM,IAAI,QAAc,CAAC,YAAY,sBAAsB,MAAM,QAAQ,CAAC,CAAC;AAC7E;AAEA,SAAS,iBAAiB,SAAqD;AAC7E,SAAO,QAAQ,WAAW,QAAQ,iBAAiB,IAAI;AACzD;AAEA,SAAS,qBAA6B;AACpC,MAAI,OAAO,a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,52 @@
1
+ {
2
+ "name": "@codemonster-ru/vue-ssg-core",
3
+ "version": "1.0.0",
4
+ "description": "Core APIs for Codemonster SSG apps.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Kirill Kolesnikov (https://github.com/kolesnikovKirill)",
8
+ "homepage": "https://github.com/codemonster-ru/vue-ssg#readme",
9
+ "bugs": {
10
+ "url": "https://github.com/codemonster-ru/vue-ssg/issues"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/codemonster-ru/vue-ssg.git"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "main": "./dist/index.js",
20
+ "module": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "import": "./dist/index.js"
26
+ }
27
+ },
28
+ "files": [
29
+ "dist"
30
+ ],
31
+ "scripts": {
32
+ "build": "tsup",
33
+ "dev": "tsup --watch",
34
+ "lint": "eslint \"src/**/*.{ts,js}\"",
35
+ "typecheck": "tsc --noEmit",
36
+ "prepublishOnly": "npm run typecheck && npm run build"
37
+ },
38
+ "peerDependencies": {
39
+ "vue": "^3.5.0",
40
+ "vue-router": "^4.0.0 || ^5.0.0",
41
+ "@unhead/vue": "^2.0.0"
42
+ },
43
+ "dependencies": {
44
+ "@codemonster-ru/vueforge-core": "^1.17.2",
45
+ "github-slugger": "^2.0.0",
46
+ "marked": "^17.0.5"
47
+ },
48
+ "devDependencies": {
49
+ "tsup": "^8.5.0",
50
+ "typescript": "^5.9.3"
51
+ }
52
+ }