@vezham/config 26.0.0-alpha.5 → 26.0.0-alpha.7

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.
Files changed (169) hide show
  1. package/README.md +14 -0
  2. package/dist/lib/deploy/cli.d.ts +3 -0
  3. package/dist/lib/deploy/cli.d.ts.map +1 -0
  4. package/dist/lib/deploy/cli.js +12 -0
  5. package/dist/lib/deploy/firebase.d.ts +3 -0
  6. package/dist/lib/deploy/firebase.d.ts.map +1 -0
  7. package/dist/lib/deploy/firebase.js +106 -0
  8. package/dist/lib/deploy/index.d.ts +4 -0
  9. package/dist/lib/deploy/index.d.ts.map +1 -0
  10. package/dist/lib/deploy/index.js +42 -0
  11. package/dist/lib/deploy/paths.d.ts +3 -0
  12. package/dist/lib/deploy/paths.d.ts.map +1 -0
  13. package/dist/lib/deploy/paths.js +6 -0
  14. package/dist/lib/deploy/presets.d.ts +5 -0
  15. package/dist/lib/deploy/presets.d.ts.map +1 -0
  16. package/dist/lib/deploy/presets.js +10 -0
  17. package/dist/lib/deploy/types.d.ts +97 -0
  18. package/dist/lib/deploy/types.d.ts.map +1 -0
  19. package/dist/lib/deploy/vercel.d.ts +3 -0
  20. package/dist/lib/deploy/vercel.d.ts.map +1 -0
  21. package/dist/lib/deploy/vercel.js +47 -0
  22. package/dist/lib/framework.d.ts +3 -0
  23. package/dist/lib/framework.d.ts.map +1 -0
  24. package/dist/lib/framework.js +7 -0
  25. package/dist/lib/i18n.d.ts +6 -0
  26. package/dist/lib/i18n.d.ts.map +1 -0
  27. package/dist/lib/i18n.js +11 -0
  28. package/dist/lib/integrations/next/index.d.ts +4 -0
  29. package/dist/lib/integrations/next/index.d.ts.map +1 -0
  30. package/dist/lib/integrations/next/index.js +29 -0
  31. package/dist/lib/integrations/playwright/index.d.ts +11 -0
  32. package/dist/lib/integrations/playwright/index.d.ts.map +1 -0
  33. package/dist/lib/integrations/playwright/index.js +77 -0
  34. package/dist/lib/integrations/playwright/test.d.ts +5 -0
  35. package/dist/lib/integrations/playwright/test.d.ts.map +1 -0
  36. package/dist/lib/integrations/playwright/test.js +23 -0
  37. package/dist/lib/integrations/vite/index.d.ts +12 -0
  38. package/dist/lib/integrations/vite/index.d.ts.map +1 -0
  39. package/dist/lib/integrations/vite/index.js +34 -0
  40. package/dist/lib/integrations/vite-lib/base.d.ts +3 -0
  41. package/dist/lib/integrations/vite-lib/base.d.ts.map +1 -0
  42. package/dist/lib/integrations/vite-lib/base.js +31 -0
  43. package/dist/lib/integrations/vite-lib/index.d.ts +3 -0
  44. package/dist/lib/integrations/vite-lib/index.d.ts.map +1 -0
  45. package/dist/lib/integrations/vite-lib/index.js +50 -0
  46. package/dist/lib/integrations/vite-lib/react.d.ts +3 -0
  47. package/dist/lib/integrations/vite-lib/react.d.ts.map +1 -0
  48. package/dist/lib/integrations/vite-lib/react.js +10 -0
  49. package/dist/lib/integrations/vitest/framework.d.ts +4 -0
  50. package/dist/lib/integrations/vitest/framework.d.ts.map +1 -0
  51. package/dist/lib/integrations/vitest/framework.js +5 -0
  52. package/dist/lib/integrations/vitest/frameworks/docs-plugins.d.ts +3 -0
  53. package/dist/lib/integrations/vitest/frameworks/docs-plugins.d.ts.map +1 -0
  54. package/dist/lib/integrations/vitest/frameworks/docs-plugins.js +27 -0
  55. package/dist/lib/integrations/vitest/frameworks/docs.d.ts +3 -0
  56. package/dist/lib/integrations/vitest/frameworks/docs.d.ts.map +1 -0
  57. package/dist/lib/integrations/vitest/frameworks/docs.js +5 -0
  58. package/dist/lib/integrations/vitest/frameworks/next.d.ts +3 -0
  59. package/dist/lib/integrations/vitest/frameworks/next.d.ts.map +1 -0
  60. package/dist/lib/integrations/vitest/frameworks/next.js +5 -0
  61. package/dist/lib/integrations/vitest/frameworks/react.d.ts +3 -0
  62. package/dist/lib/integrations/vitest/frameworks/react.d.ts.map +1 -0
  63. package/dist/lib/integrations/vitest/frameworks/react.js +5 -0
  64. package/dist/lib/integrations/vitest/index.d.ts +4 -0
  65. package/dist/lib/integrations/vitest/index.d.ts.map +1 -0
  66. package/dist/lib/integrations/vitest/index.js +4 -0
  67. package/dist/lib/integrations/vitest/setup/next.d.ts +2 -0
  68. package/dist/lib/integrations/vitest/setup/next.d.ts.map +1 -0
  69. package/dist/lib/integrations/vitest/setup/next.js +11 -0
  70. package/dist/lib/integrations/vitest/setup/react.d.ts +2 -0
  71. package/dist/lib/integrations/vitest/setup/react.d.ts.map +1 -0
  72. package/dist/lib/integrations/vitest/setup/react.js +36 -0
  73. package/dist/lib/integrations/vitest/shared.d.ts +3 -0
  74. package/dist/lib/integrations/vitest/shared.d.ts.map +1 -0
  75. package/dist/lib/integrations/vitest/shared.js +24 -0
  76. package/dist/lib/metadata/cli.d.ts +3 -0
  77. package/dist/lib/metadata/cli.d.ts.map +1 -0
  78. package/dist/lib/metadata/cli.js +13 -0
  79. package/dist/lib/metadata/env.d.ts +9 -0
  80. package/dist/lib/metadata/env.d.ts.map +1 -0
  81. package/dist/lib/metadata/env.js +36 -0
  82. package/dist/lib/metadata/html.d.ts +3 -0
  83. package/dist/lib/metadata/html.d.ts.map +1 -0
  84. package/dist/lib/metadata/html.js +96 -0
  85. package/dist/lib/metadata/index.d.ts +7 -0
  86. package/dist/lib/metadata/index.d.ts.map +1 -0
  87. package/dist/lib/metadata/index.js +61 -0
  88. package/dist/lib/metadata/next.d.ts +79 -0
  89. package/dist/lib/metadata/next.d.ts.map +1 -0
  90. package/dist/lib/metadata/next.js +106 -0
  91. package/dist/lib/metadata/public.d.ts +3 -0
  92. package/dist/lib/metadata/public.d.ts.map +1 -0
  93. package/dist/lib/metadata/public.js +107 -0
  94. package/dist/lib/metadata/render.d.ts +7 -0
  95. package/dist/lib/metadata/render.d.ts.map +1 -0
  96. package/dist/lib/metadata/render.js +37 -0
  97. package/dist/lib/metadata/runtime.d.ts +68 -0
  98. package/dist/lib/metadata/runtime.d.ts.map +1 -0
  99. package/dist/lib/metadata/runtime.js +134 -0
  100. package/dist/lib/metadata/tanstack.d.ts +71 -0
  101. package/dist/lib/metadata/tanstack.d.ts.map +1 -0
  102. package/dist/lib/metadata/tanstack.js +194 -0
  103. package/dist/lib/metadata/templates/not-found.html +224 -0
  104. package/dist/lib/metadata/templates/offline.html +210 -0
  105. package/dist/lib/metadata/types.d.ts +118 -0
  106. package/dist/lib/metadata/types.d.ts.map +1 -0
  107. package/dist/lib/navigation/app-menu.d.ts +2 -0
  108. package/dist/lib/navigation/app-menu.d.ts.map +1 -0
  109. package/dist/lib/navigation/app-menu.js +45 -0
  110. package/dist/lib/navigation/control-center.d.ts +2 -0
  111. package/dist/lib/navigation/control-center.d.ts.map +1 -0
  112. package/dist/lib/navigation/control-center.js +66 -0
  113. package/dist/lib/navigation/index.d.ts +5 -0
  114. package/dist/lib/navigation/index.d.ts.map +1 -0
  115. package/dist/lib/navigation/index.js +59 -0
  116. package/dist/lib/navigation/toolbar.d.ts +2 -0
  117. package/dist/lib/navigation/toolbar.d.ts.map +1 -0
  118. package/dist/lib/navigation/toolbar.js +78 -0
  119. package/dist/lib/presets/app/index.d.ts +21 -0
  120. package/dist/lib/presets/app/index.d.ts.map +1 -0
  121. package/dist/lib/presets/app/index.js +114 -0
  122. package/dist/lib/presets/cdn/index.d.ts +2 -0
  123. package/dist/lib/presets/cdn/index.d.ts.map +1 -0
  124. package/dist/lib/presets/cdn/index.js +2 -0
  125. package/dist/lib/presets/docs/cli.d.ts +3 -0
  126. package/dist/lib/presets/docs/cli.d.ts.map +1 -0
  127. package/dist/lib/presets/docs/cli.js +18 -0
  128. package/dist/lib/presets/docs/config.d.ts +40 -0
  129. package/dist/lib/presets/docs/config.d.ts.map +1 -0
  130. package/dist/lib/presets/docs/config.js +39 -0
  131. package/dist/lib/presets/docs/files.d.ts +2 -0
  132. package/dist/lib/presets/docs/files.d.ts.map +1 -0
  133. package/dist/lib/presets/docs/files.js +13 -0
  134. package/dist/lib/presets/docs/index.d.ts +7 -0
  135. package/dist/lib/presets/docs/index.d.ts.map +1 -0
  136. package/dist/lib/presets/docs/index.js +6 -0
  137. package/dist/lib/presets/docs/mdx-path.d.ts +7 -0
  138. package/dist/lib/presets/docs/mdx-path.d.ts.map +1 -0
  139. package/dist/lib/presets/docs/mdx-path.js +19 -0
  140. package/dist/lib/presets/docs/og-image.d.ts +9 -0
  141. package/dist/lib/presets/docs/og-image.d.ts.map +1 -0
  142. package/dist/lib/presets/docs/og-image.js +88 -0
  143. package/dist/lib/presets/docs/og-output.d.ts +5 -0
  144. package/dist/lib/presets/docs/og-output.d.ts.map +1 -0
  145. package/dist/lib/presets/docs/og-output.js +34 -0
  146. package/dist/lib/presets/docs/og.d.ts +9 -0
  147. package/dist/lib/presets/docs/og.d.ts.map +1 -0
  148. package/dist/lib/presets/docs/og.js +112 -0
  149. package/dist/lib/presets/docs/openapi.d.ts +3 -0
  150. package/dist/lib/presets/docs/openapi.d.ts.map +1 -0
  151. package/dist/lib/presets/docs/openapi.js +105 -0
  152. package/dist/lib/presets/docs/routes.d.ts +7 -0
  153. package/dist/lib/presets/docs/routes.d.ts.map +1 -0
  154. package/dist/lib/presets/docs/routes.js +109 -0
  155. package/dist/lib/presets/docs/types.d.ts +31 -0
  156. package/dist/lib/presets/docs/types.d.ts.map +1 -0
  157. package/dist/lib/presets/docs/vite.d.ts +11 -0
  158. package/dist/lib/presets/docs/vite.d.ts.map +1 -0
  159. package/dist/lib/presets/docs/vite.js +78 -0
  160. package/dist/lib/presets/files.d.ts +5 -0
  161. package/dist/lib/presets/files.d.ts.map +1 -0
  162. package/dist/lib/presets/files.js +21 -0
  163. package/dist/lib/presets/route-files.d.ts +22 -0
  164. package/dist/lib/presets/route-files.d.ts.map +1 -0
  165. package/dist/lib/presets/route-files.js +49 -0
  166. package/dist/lib/yaml-config.d.ts +2 -0
  167. package/dist/lib/yaml-config.d.ts.map +1 -0
  168. package/dist/lib/yaml-config.js +6 -0
  169. package/package.json +99 -4
@@ -0,0 +1,118 @@
1
+ import type { Framework } from '../framework';
2
+ import type { I18nConfig } from '../i18n';
3
+ import { type DocsConfig, type OgConfig } from '../presets/docs/config';
4
+ export type VxConfig = {
5
+ framework: Framework;
6
+ core: VxCoreConfig;
7
+ docs?: DocsConfig;
8
+ og?: OgConfig;
9
+ i18n?: I18nConfig;
10
+ branding: {
11
+ themeColor: string;
12
+ backgroundColor: string;
13
+ };
14
+ pwa: VxPwaConfig;
15
+ metadata: VxMetadataConfig;
16
+ };
17
+ type VxCoreConfig = {
18
+ id: string;
19
+ name: string;
20
+ shortName: string;
21
+ version: string;
22
+ description: string;
23
+ publisher: {
24
+ name: string;
25
+ url: string;
26
+ };
27
+ url: string;
28
+ };
29
+ type VxPwaConfig = {
30
+ display: string;
31
+ orientation: string;
32
+ scope: string;
33
+ startUrl: string;
34
+ categories: string[];
35
+ icons: VxIconSource;
36
+ screenshots: VxImage[];
37
+ shortcuts: VxShortcut[];
38
+ };
39
+ export type VxIcon = {
40
+ src: string;
41
+ sizes: string;
42
+ type: string;
43
+ };
44
+ type VxIconSet = {
45
+ path: string;
46
+ sizes: number[];
47
+ type: string;
48
+ };
49
+ export type VxIconSource = VxIcon[] | VxIconSet;
50
+ type VxImage = {
51
+ src: string;
52
+ sizes: string;
53
+ type: string;
54
+ };
55
+ type VxShortcut = {
56
+ name: string;
57
+ shortName: string;
58
+ url: string;
59
+ icons: VxIconSource;
60
+ };
61
+ type VxMetadataConfig = {
62
+ title: string;
63
+ keywords: string[];
64
+ theme: {
65
+ lightColor: string;
66
+ darkColor: string;
67
+ lightBackgroundColor: string;
68
+ darkBackgroundColor: string;
69
+ };
70
+ platforms: {
71
+ apple: {
72
+ mobileWebAppCapable: boolean;
73
+ webAppCapable: boolean;
74
+ touchIcon: string;
75
+ startupImages: VxStartupImageSource;
76
+ };
77
+ microsoft: {
78
+ startUrl: string;
79
+ };
80
+ };
81
+ social: {
82
+ openGraph: {
83
+ type: string;
84
+ image?: string;
85
+ };
86
+ twitter: {
87
+ creator: string;
88
+ site: string;
89
+ card: string;
90
+ image?: string;
91
+ };
92
+ };
93
+ };
94
+ export type VxStartupImage = {
95
+ colorScheme?: 'light' | 'dark';
96
+ device?: string;
97
+ width?: number;
98
+ height?: number;
99
+ pixelRatio?: number;
100
+ path?: string;
101
+ media?: string;
102
+ src?: string;
103
+ };
104
+ type VxStartupImageSet = {
105
+ path: string;
106
+ colorSchemes?: Array<'light' | 'dark'>;
107
+ sizes: VxStartupImage[];
108
+ };
109
+ export type VxStartupImageSource = VxStartupImage[] | VxStartupImageSet;
110
+ export type GenerateMetadataOptions = {
111
+ projectRoot?: string;
112
+ };
113
+ export type MetadataFile = {
114
+ path: string;
115
+ content: string;
116
+ };
117
+ export {};
118
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/metadata/types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export declare const validateAppMenu: (value: unknown, location: string) => void;
2
+ //# sourceMappingURL=app-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-menu.d.ts","sourceRoot":"","sources":["../../../src/lib/navigation/app-menu.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,EAAE,UAAU,MAAM,SAwB/D,CAAA"}
@@ -0,0 +1,45 @@
1
+ //#region src/lib/navigation/app-menu.ts
2
+ var MENU_FIELDS = new Set([
3
+ "key",
4
+ "label",
5
+ "icon",
6
+ "groups"
7
+ ]);
8
+ var ACTION_FIELDS = new Set([
9
+ "key",
10
+ "label",
11
+ "icon",
12
+ "shortcut"
13
+ ]);
14
+ var object = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
15
+ var validateEntry = (value, fields, location, keys) => {
16
+ if (!object(value)) throw new Error(`${location} must be an object`);
17
+ for (const field of Object.keys(value)) if (!fields.has(field)) throw new Error(`Unknown field: ${location}.${field}`);
18
+ for (const field of [
19
+ "key",
20
+ "label",
21
+ "icon",
22
+ "shortcut"
23
+ ]) if (field === "key" || field === "label" || value[field] !== void 0) {
24
+ if (typeof value[field] !== "string" || !value[field].trim()) throw new Error(`${location}.${field} must be a non-empty string`);
25
+ }
26
+ const key = value.key;
27
+ if (keys.has(key)) throw new Error(`Duplicate app menu key: ${location}.${key}`);
28
+ keys.add(key);
29
+ return value;
30
+ };
31
+ var validateAppMenu = (value, location) => {
32
+ if (!Array.isArray(value)) throw new Error(`${location} must be an array`);
33
+ const menuKeys = /* @__PURE__ */ new Set();
34
+ const actionKeys = /* @__PURE__ */ new Set();
35
+ for (const entry of value) {
36
+ const menu = validateEntry(entry, MENU_FIELDS, location, menuKeys);
37
+ if (!Array.isArray(menu.groups) || !menu.groups.length) throw new Error(`${location}.${menu.key}.groups must be a non-empty array`);
38
+ for (const group of menu.groups) {
39
+ if (!Array.isArray(group) || !group.length) throw new Error(`${location}.${menu.key} groups must be non-empty arrays`);
40
+ for (const action of group) validateEntry(action, ACTION_FIELDS, `${location}.${menu.key}`, actionKeys);
41
+ }
42
+ }
43
+ };
44
+ //#endregion
45
+ export { validateAppMenu };
@@ -0,0 +1,2 @@
1
+ export declare const validateControlCenter: (value: unknown, location: string) => void;
2
+ //# sourceMappingURL=control-center.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-center.d.ts","sourceRoot":"","sources":["../../../src/lib/navigation/control-center.ts"],"names":[],"mappings":"AA6EA,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,EAAE,UAAU,MAAM,SAcrE,CAAA"}
@@ -0,0 +1,66 @@
1
+ //#region src/lib/navigation/control-center.ts
2
+ var TYPES = new Set([
3
+ "direction-toggle",
4
+ "appearance-toggle",
5
+ "appearance",
6
+ "theme",
7
+ "direction",
8
+ "language",
9
+ "preview-wifi",
10
+ "preview-bluetooth",
11
+ "preview-airdrop",
12
+ "preview-focus",
13
+ "preview-stage-manager",
14
+ "preview-mirroring",
15
+ "preview-media",
16
+ "preview-display",
17
+ "preview-sound",
18
+ "custom"
19
+ ]);
20
+ var FIELDS = new Set([
21
+ "id",
22
+ "type",
23
+ "span",
24
+ "label",
25
+ "description",
26
+ "editable",
27
+ "action"
28
+ ]);
29
+ var object = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
30
+ var validateTileFields = (tile, location) => {
31
+ for (const [field, entry] of Object.entries(tile)) {
32
+ if (!FIELDS.has(field)) throw new Error(`Unknown field: ${location}.${field}`);
33
+ if (field === "editable") {
34
+ if (typeof entry !== "boolean") throw new Error(`${location}.editable must be a boolean`);
35
+ } else if (typeof entry !== "string" || !entry.trim()) throw new Error(`${location}.${field} must be a non-empty string`);
36
+ }
37
+ };
38
+ var validateTileAction = (tile, location) => {
39
+ if (tile.type === "custom") {
40
+ if (typeof tile.action !== "string" || !tile.action.trim()) throw new Error(`${location}.${tile.id}.action is required`);
41
+ } else if (tile.action !== void 0) throw new Error(`${location}.${tile.id}.action is only supported for custom tiles`);
42
+ };
43
+ var validateTile = (tile, location, ids) => {
44
+ if (!object(tile)) throw new Error(`${location}.tiles must contain objects`);
45
+ validateTileFields(tile, location);
46
+ if (typeof tile.id !== "string" || !tile.id.trim()) throw new Error(`${location}.id is required`);
47
+ if (tile.id === "edit-controls") throw new Error(`${location}.edit-controls is a reserved built-in action`);
48
+ if (ids.has(tile.id)) throw new Error(`Duplicate control center tile id: ${tile.id}`);
49
+ ids.add(tile.id);
50
+ if (typeof tile.type !== "string" || !TYPES.has(tile.type)) throw new Error(`Unknown control center tile type: ${tile.type}`);
51
+ if (![
52
+ "compact",
53
+ "standard",
54
+ "wide",
55
+ "full"
56
+ ].includes(String(tile.span))) throw new Error(`${location}.${tile.id}.span is invalid`);
57
+ validateTileAction(tile, location);
58
+ };
59
+ var validateControlCenter = (value, location) => {
60
+ if (!object(value) || Object.keys(value).some((key) => !["tiles", "editControls"].includes(key)) || !Array.isArray(value.tiles)) throw new Error(`${location} must contain a tiles array`);
61
+ if (value.editControls !== void 0 && typeof value.editControls !== "boolean") throw new Error(`${location}.editControls must be a boolean`);
62
+ const ids = /* @__PURE__ */ new Set();
63
+ for (const tile of value.tiles) validateTile(tile, location, ids);
64
+ };
65
+ //#endregion
66
+ export { validateControlCenter };
@@ -0,0 +1,5 @@
1
+ export declare const getNavigationFiles: (projectRoot: string) => {
2
+ path: string;
3
+ content: string;
4
+ }[];
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/navigation/index.ts"],"names":[],"mappings":"AA8CA,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM;;;GAmCrD,CAAA"}
@@ -0,0 +1,59 @@
1
+ import { readYamlConfig } from "../yaml-config.js";
2
+ import { validateAppMenu } from "./app-menu.js";
3
+ import { validateControlCenter } from "./control-center.js";
4
+ import { validateToolbar } from "./toolbar.js";
5
+ import { existsSync } from "node:fs";
6
+ import path from "node:path";
7
+ //#region src/lib/navigation/index.ts
8
+ var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
9
+ var validateItems = (items, location) => {
10
+ if (!Array.isArray(items)) throw new Error(`${location} must be an array`);
11
+ const keys = /* @__PURE__ */ new Set();
12
+ for (const item of items) {
13
+ if (!isObject(item)) throw new Error(`${location} items must be objects`);
14
+ for (const field of ["key", "title"]) if (typeof item[field] !== "string" || !item[field].trim()) throw new Error(`${location}.${field} must be a non-empty string`);
15
+ const key = item.key;
16
+ if (keys.has(key)) throw new Error(`Duplicate navigation key: ${location}.${key}`);
17
+ keys.add(key);
18
+ for (const [field, value] of Object.entries(item)) if (field === "children") validateItems(value, `${location}.${key}.children`);
19
+ else if (field === "childrenDisplay") {
20
+ if (value !== "tabs" && value !== "sidebar") throw new Error(`${location}.${key}.childrenDisplay must be tabs or sidebar`);
21
+ } else if (field === "toolbar") validateToolbar(value, `${location}.${key}.toolbar`);
22
+ else if (![
23
+ "key",
24
+ "title",
25
+ "href",
26
+ "icon",
27
+ "iconActive"
28
+ ].includes(field)) throw new Error(`Unknown navigation field: ${location}.${key}.${field}`);
29
+ else if (typeof value !== "string") throw new Error(`${location}.${key}.${field} must be a string`);
30
+ }
31
+ };
32
+ var getNavigationFiles = (projectRoot) => {
33
+ const file = path.join(projectRoot, "vx.nav.yaml");
34
+ if (!existsSync(file)) return [];
35
+ const config = readYamlConfig(file);
36
+ if (!isObject(config) || Object.keys(config).some((key) => ![
37
+ "navigation",
38
+ "appMenu",
39
+ "controlCenter"
40
+ ].includes(key))) throw new Error(`${file} must contain navigation and optional appMenu or controlCenter`);
41
+ validateItems(config.navigation, `${file}.navigation`);
42
+ if (config.appMenu !== void 0) validateAppMenu(config.appMenu, `${file}.appMenu`);
43
+ if (config.controlCenter !== void 0) validateControlCenter(config.controlCenter, `${file}.controlCenter`);
44
+ return [{
45
+ path: path.join(projectRoot, "src/generated/navigation.ts"),
46
+ content: `// Generated from vx.nav.yaml. DO NOT EDIT.\nimport type { AppNavigationItem, AppMenuItem } from '@vezham/react'\nimport type { ControlCenterConfig } from '@vezham/react/control-center'\n\nexport const navigationItems = ${JSON.stringify(config.navigation, null, 2)} satisfies AppNavigationItem[]\n\nexport const appMenu = ${JSON.stringify(config.appMenu ?? [], null, 2)} satisfies AppMenuItem[]\n\nexport const controlCenter = ${JSON.stringify(config.controlCenter ?? { tiles: [] }, null, 2)} satisfies ControlCenterConfig\n
47
+ export const getNavigationChildren = (key: string) => {
48
+ const items: readonly AppNavigationItem[] = navigationItems
49
+ const item = items.find(item => item.key === key)
50
+ if (!item) {
51
+ throw new Error('Unknown navigation key: ' + key)
52
+ }
53
+ return 'children' in item && Array.isArray(item.children) ? item.children : []
54
+ }
55
+ `
56
+ }];
57
+ };
58
+ //#endregion
59
+ export { getNavigationFiles };
@@ -0,0 +1,2 @@
1
+ export declare const validateToolbar: (value: unknown, location: string) => void;
2
+ //# sourceMappingURL=toolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../src/lib/navigation/toolbar.ts"],"names":[],"mappings":"AAmEA,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,EAAE,UAAU,MAAM,SAsB/D,CAAA"}
@@ -0,0 +1,78 @@
1
+ //#region src/lib/navigation/toolbar.ts
2
+ var ACTION_FIELDS = new Set([
3
+ "key",
4
+ "label",
5
+ "icon",
6
+ "children"
7
+ ]);
8
+ var VIEW_ACTION_FIELDS = new Set([
9
+ "key",
10
+ "label",
11
+ "icon",
12
+ "enabled"
13
+ ]);
14
+ var TOOLBAR_FIELDS = new Set([
15
+ "search",
16
+ "sync",
17
+ "filter",
18
+ "sort",
19
+ "view",
20
+ "menuActions",
21
+ "primaryAction"
22
+ ]);
23
+ var SEARCH_FIELDS = new Set(["label", "placeholder"]);
24
+ var VIEW_ACTION_KEYS = new Set(["grid", "list"]);
25
+ var object = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
26
+ var validateFields = (value, fields, location) => {
27
+ for (const key of Object.keys(value)) if (!fields.has(key)) throw new Error(`Unknown field: ${location}.${key}`);
28
+ };
29
+ var validateString = (value, location) => {
30
+ if (typeof value !== "string" || !value.trim()) throw new Error(`${location} must be a non-empty string`);
31
+ };
32
+ var validateAction = (value, location) => {
33
+ if (!object(value)) throw new Error(`${location} must be an action object`);
34
+ validateFields(value, ACTION_FIELDS, location);
35
+ for (const field of [
36
+ "key",
37
+ "label",
38
+ "icon"
39
+ ]) validateString(value[field], `${location}.${field}`);
40
+ if (value.children !== void 0) validateActions(value.children, `${location}.children`);
41
+ };
42
+ var validateActions = (value, location, validate = validateAction) => {
43
+ if (!Array.isArray(value)) throw new Error(`${location} must be an array`);
44
+ const keys = /* @__PURE__ */ new Set();
45
+ for (const action of value) {
46
+ validate(action, location);
47
+ if (keys.has(action.key)) throw new Error(`Duplicate action key: ${location}.${action.key}`);
48
+ keys.add(action.key);
49
+ }
50
+ };
51
+ var validateViewAction = (value, location) => {
52
+ if (!object(value)) throw new Error(`${location} must contain action objects`);
53
+ validateFields(value, VIEW_ACTION_FIELDS, location);
54
+ for (const field of [
55
+ "key",
56
+ "label",
57
+ "icon"
58
+ ]) validateString(value[field], `${location}.${field}`);
59
+ if (typeof value.key !== "string" || !VIEW_ACTION_KEYS.has(value.key)) throw new Error(`Unknown view action key: ${location}.${value.key}`);
60
+ if (value.enabled !== void 0 && typeof value.enabled !== "boolean") throw new Error(`${location}.${value.key}.enabled must be a boolean`);
61
+ };
62
+ var validateToolbar = (value, location) => {
63
+ if (!object(value)) throw new Error(`${location} must be an object`);
64
+ validateFields(value, TOOLBAR_FIELDS, location);
65
+ if (value.search !== void 0 && typeof value.search !== "boolean") {
66
+ if (!object(value.search)) throw new Error(`${location}.search must be a boolean or an object`);
67
+ validateFields(value.search, SEARCH_FIELDS, `${location}.search`);
68
+ for (const [field, entry] of Object.entries(value.search)) validateString(entry, `${location}.search.${field}`);
69
+ }
70
+ if (value.sync !== void 0 && typeof value.sync !== "boolean") throw new Error(`${location}.sync must be a boolean`);
71
+ if (value.filter !== void 0 && typeof value.filter !== "boolean") throw new Error(`${location}.filter must be a boolean`);
72
+ if (value.sort !== void 0 && typeof value.sort !== "boolean") throw new Error(`${location}.sort must be a boolean`);
73
+ if (value.view !== void 0) validateActions(value.view, `${location}.view`, validateViewAction);
74
+ if (value.menuActions !== void 0) validateActions(value.menuActions, `${location}.menuActions`);
75
+ if (value.primaryAction !== void 0 && value.primaryAction !== false) validateAction(value.primaryAction, `${location}.primaryAction`);
76
+ };
77
+ //#endregion
78
+ export { validateToolbar };
@@ -0,0 +1,21 @@
1
+ import { type ViteConfigOverrides } from '../../integrations/vite';
2
+ export declare const defineConfig: (overrides?: ViteConfigOverrides) => import("vite").UserConfigExport;
3
+ export type PrerenderPage = {
4
+ path: string;
5
+ prerender?: {
6
+ outputPath: string;
7
+ };
8
+ };
9
+ export type RouteConfig = {
10
+ path: string;
11
+ prerender?: boolean | {
12
+ outputPath?: string;
13
+ };
14
+ source?: 'routes';
15
+ };
16
+ export type RouteInput = RouteConfig | string;
17
+ export type PrerenderPagesOptions = {
18
+ routes?: RouteInput[];
19
+ };
20
+ export declare const getPrerenderPages: (projectRoot?: string, { routes: extraRoutes }?: PrerenderPagesOptions) => PrerenderPage[];
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/presets/app/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,mBAAmB,EAGzB,MAAM,yBAAyB,CAAA;AAkIhC,eAAO,MAAM,YAAY,GAAI,YAAW,mBAAwB,oCAQ7D,CAAA;AAEH,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE;QACV,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EACN,OAAO,GACP;QACE,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;IACL,MAAM,CAAC,EAAE,QAAQ,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,MAAM,CAAA;AAM7C,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAA;CACtB,CAAA;AAuED,eAAO,MAAM,iBAAiB,GAC5B,oBAA2B,EAC3B,0BAA8B,qBAA0B,oBA0BzD,CAAA"}
@@ -0,0 +1,114 @@
1
+ import { createViteConfig, getViteConfig } from "../../integrations/vite/index.js";
2
+ import { readYamlConfig } from "../../yaml-config.js";
3
+ import { unique, walkFiles } from "../files.js";
4
+ import { expandFilesystemRoute, normalizeRoute, routePathFromFile, routeRootFromGlob } from "../route-files.js";
5
+ import fs from "node:fs";
6
+ import path from "node:path";
7
+ import { mergeConfig } from "vite";
8
+ import { createRequire } from "node:module";
9
+ //#region src/lib/presets/app/index.ts
10
+ var trimTrailingWildcard = (value) => value.endsWith("/*") ? value.slice(0, -2) : value;
11
+ var getTsConfigPathAliases = (projectRoot = process.cwd()) => {
12
+ const tsconfigFile = path.resolve(projectRoot, "tsconfig.app.json");
13
+ if (!fs.existsSync(tsconfigFile)) return {};
14
+ try {
15
+ const paths = JSON.parse(fs.readFileSync(tsconfigFile, "utf8")).compilerOptions?.paths ?? {};
16
+ return Object.fromEntries(Object.entries(paths).map(([alias, values]) => {
17
+ const value = values[0];
18
+ if (!value) return null;
19
+ return [trimTrailingWildcard(alias), path.resolve(projectRoot, trimTrailingWildcard(value))];
20
+ }).filter((entry) => entry !== null));
21
+ } catch {
22
+ return {};
23
+ }
24
+ };
25
+ var getServerConfig = () => {
26
+ const { env } = process;
27
+ const hostname = env.CI ? "localhost" : env.HOST_NAME || "localhost";
28
+ return {
29
+ port: Number(env.PORT),
30
+ host: hostname
31
+ };
32
+ };
33
+ var getPreviewConfig = () => {
34
+ const { env } = process;
35
+ const hostname = env.CI ? "localhost" : env.HOST_NAME || "localhost";
36
+ const configuredPort = Number(env.PRE_PORT) || Number(env.PORT);
37
+ return {
38
+ port: env.TSS_PRERENDERING === "true" ? 0 : configuredPort || void 0,
39
+ host: hostname
40
+ };
41
+ };
42
+ var getReactPackageDir = (projectRoot = process.cwd()) => {
43
+ const requireFromProject = createRequire(path.join(projectRoot, "package.json"));
44
+ return path.dirname(requireFromProject.resolve("react/package.json"));
45
+ };
46
+ var getViteDefaults = (projectRoot = process.cwd()) => ({
47
+ ...getViteConfig(projectRoot),
48
+ envPrefix: ["V_"],
49
+ server: getServerConfig(),
50
+ resolve: {
51
+ alias: getTsConfigPathAliases(projectRoot),
52
+ tsconfigPaths: true
53
+ },
54
+ build: {
55
+ outDir: "./dist",
56
+ emptyOutDir: true,
57
+ reportCompressedSize: true,
58
+ commonjsOptions: { transformMixedEsModules: true }
59
+ }
60
+ });
61
+ var getPreviewOverride = (env) => ({ preview: process.env.TSS_PRERENDERING === "true" ? {
62
+ host: "localhost",
63
+ port: 0
64
+ } : env.command === "build" ? void 0 : getPreviewConfig() });
65
+ var getResolveOverride = (env, projectRoot = process.cwd()) => ({ resolve: {
66
+ dedupe: ["react", "react-dom"],
67
+ alias: env.command === "build" ? { "react/jsx-dev-runtime": path.join(getReactPackageDir(projectRoot), "cjs/react-jsx-dev-runtime.development.js") } : void 0
68
+ } });
69
+ var defineConfig = (overrides = {}) => createViteConfig((projectRoot, env) => mergeConfig(mergeConfig(getViteDefaults(projectRoot), getPreviewOverride(env)), getResolveOverride(env, projectRoot)), overrides);
70
+ var uniquePrerenderPages = (pages) => {
71
+ return [...new Map(pages.map((page) => [page.path, page])).values()];
72
+ };
73
+ var appRouteFileOptions = {
74
+ emptyRoutePath: "/",
75
+ rootRouteSegments: new Set(["__root", "__root__"]),
76
+ stripLazySuffix: true
77
+ };
78
+ var getStaticPageRoutes = (projectRoot) => {
79
+ const routesDir = path.join(projectRoot, "src/routes");
80
+ return unique(walkFiles(routesDir).filter((filePath) => [".jsx", ".tsx"].includes(path.extname(filePath))).map((filePath) => routePathFromFile(routesDir, filePath, appRouteFileOptions)).filter((routePath) => routePath !== void 0).filter((routePath) => !routePath.startsWith("/api/")).sort((left, right) => left.localeCompare(right)));
81
+ };
82
+ var createPrerenderPage = (route) => {
83
+ if (typeof route.prerender === "object" && route.prerender.outputPath) return {
84
+ path: route.path,
85
+ prerender: { outputPath: route.prerender.outputPath }
86
+ };
87
+ const shouldWriteIndex = route.path !== "/" && path.extname(route.path) === "" && !route.path.startsWith("/api/");
88
+ return {
89
+ path: route.path,
90
+ prerender: shouldWriteIndex ? { outputPath: `${route.path}/index.html` } : void 0
91
+ };
92
+ };
93
+ var createFilesystemRoutePrerenderPages = (projectRoot, route) => {
94
+ return expandFilesystemRoute(projectRoot, route, appRouteFileOptions).map((pagePath) => createPrerenderPage({
95
+ ...route,
96
+ path: pagePath
97
+ }));
98
+ };
99
+ var assertSupportedRoute = (route) => {
100
+ if (!routeRootFromGlob(route.path) || route.source === "routes") return;
101
+ throw new Error(`Unsupported route source "${route.source ?? "none"}" for glob route "${route.path}". Use source "routes" or provide an exact path.`);
102
+ };
103
+ var getPrerenderPages = (projectRoot = process.cwd(), { routes: extraRoutes = [] } = {}) => {
104
+ const routeEntries = [...readYamlConfig(path.join(projectRoot, "vx.app.yaml")).routes ?? [], ...extraRoutes].map(normalizeRoute);
105
+ for (const route of routeEntries) assertSupportedRoute(route);
106
+ return uniquePrerenderPages([
107
+ createPrerenderPage({ path: "/" }),
108
+ ...getStaticPageRoutes(projectRoot).map((pagePath) => createPrerenderPage({ path: pagePath })),
109
+ ...routeEntries.flatMap((route) => route.prerender === false ? [] : createFilesystemRoutePrerenderPages(projectRoot, route)),
110
+ ...routeEntries.filter((route) => !routeRootFromGlob(route.path)).filter((route) => route.prerender !== false).map(createPrerenderPage)
111
+ ]);
112
+ };
113
+ //#endregion
114
+ export { defineConfig, getPrerenderPages };
@@ -0,0 +1,2 @@
1
+ export { defineConfig } from '../app';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/presets/cdn/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { defineConfig } from "../app/index.js";
2
+ export { defineConfig };
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../src/lib/presets/docs/cli.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ import { loadVxDocsConfig } from "./config.js";
3
+ import { generateDocs } from "./openapi.js";
4
+ import { generateDocsOgImages } from "./og.js";
5
+ //#region src/lib/presets/docs/cli.ts
6
+ var [, , command = "generate", projectRoot = process.cwd()] = process.argv;
7
+ var { docs, i18n, routes } = loadVxDocsConfig(projectRoot);
8
+ if (command === "generate" || command === "content") {
9
+ const count = await generateDocs(projectRoot, docs, i18n);
10
+ console.log(`Generated documentation for ${count} OpenAPI specifications`);
11
+ } else if (command === "og") {
12
+ const count = await generateDocsOgImages(projectRoot, docs, i18n, { routes });
13
+ console.log(`Generated ${count} OG images for ${projectRoot}`);
14
+ } else {
15
+ console.error(`Unknown docs command "${command}". Use "generate", "content", or "og".`);
16
+ process.exitCode = 1;
17
+ }
18
+ //#endregion
@@ -0,0 +1,40 @@
1
+ import { type I18nConfig } from '../../i18n';
2
+ import { type RouteInput } from './types';
3
+ export type { I18nConfig } from '../../i18n';
4
+ export type OgConfig = {
5
+ logo?: string;
6
+ site?: string;
7
+ theme?: 'dark' | 'light';
8
+ };
9
+ export type DocsConfig = {
10
+ docsRoute?: string;
11
+ og?: OgConfig;
12
+ };
13
+ export type VxDocsConfig = {
14
+ docs?: DocsConfig;
15
+ i18n?: I18nConfig;
16
+ og?: OgConfig;
17
+ routes?: RouteInput[];
18
+ };
19
+ export declare const resolveDocsConfig: (config?: DocsConfig) => {
20
+ docsDir: string;
21
+ docsRoute: string;
22
+ docsImageRoute: string;
23
+ openapiDir: string;
24
+ ogOutputDir: string;
25
+ };
26
+ export declare const loadVxDocsConfig: (projectRoot?: string) => {
27
+ config: VxDocsConfig;
28
+ configFile: string;
29
+ docs: {
30
+ og: {
31
+ logo?: string;
32
+ site?: string;
33
+ theme?: "dark" | "light";
34
+ };
35
+ docsRoute?: string;
36
+ };
37
+ i18n: I18nConfig;
38
+ routes: RouteInput[];
39
+ };
40
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/lib/presets/docs/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAe,MAAM,YAAY,CAAA;AAEzD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,QAAQ,CAAA;CACd,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,EAAE,CAAC,EAAE,QAAQ,CAAA;IACb,MAAM,CAAC,EAAE,UAAU,EAAE,CAAA;CACtB,CAAA;AAYD,eAAO,MAAM,iBAAiB,GAAI,SAAQ,UAAe;;;;;;CAUxD,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,oBAA2B;;;;;mBAvCnD,MAAM;mBACN,MAAM;oBACL,MAAM,GAAG,OAAO;;oBAIZ,MAAM;;;;CAkDnB,CAAA"}