@vyriy/create 0.9.2 → 0.9.4

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.
Binary file
package/create.js CHANGED
@@ -8,13 +8,29 @@ import { plan } from './plan/index.js';
8
8
  import { conflictStrategy as promptConflictStrategy } from './prompt/index.js';
9
9
  import { presets } from './preset/index.js';
10
10
  const exec = promisify(processExec);
11
+ const dependencyResolutions = {
12
+ 'file-entry-cache': '11.1.5',
13
+ };
14
+ const addDependencyResolutions = (files) => {
15
+ const packageFile = JSON.parse(String(files['package.json']));
16
+ return {
17
+ ...files,
18
+ 'package.json': `${JSON.stringify({
19
+ ...packageFile,
20
+ resolutions: {
21
+ ...packageFile.resolutions,
22
+ ...dependencyResolutions,
23
+ },
24
+ }, null, 2)}\n`,
25
+ };
26
+ };
11
27
  const isPresetName = (preset) => preset in presets;
12
28
  const mergeFiles = (planOption) => {
13
29
  if (!isPresetName(planOption.preset)) {
14
30
  return undefined;
15
31
  }
16
32
  const preset = presets[planOption.preset].preset;
17
- return preset(planOption);
33
+ return addDependencyResolutions(preset(planOption));
18
34
  };
19
35
  const getSortedFileNames = (files) => Object.keys(files).sort((a, b) => a.localeCompare(b));
20
36
  const logFilePlan = (target, files) => {
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
1
  {
2
2
  "name": "@vyriy/create",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "description": "Vyriy project creation CLI.",
5
5
  "homepage": "https://vyriy.dev/docs/create/",
6
6
  "type": "module",
7
7
  "engines": {
8
8
  "node": ">=24.0.0"
9
9
  },
10
- "packageManager": "yarn@4.17.0",
10
+ "packageManager": "yarn@4.18.0",
11
11
  "bin": {
12
12
  "vc": "./bin/index.js",
13
13
  "vyriy-create": "./bin/index.js"
14
14
  },
15
15
  "dependencies": {
16
- "@vyriy/check": "0.9.2",
17
- "@vyriy/tooling": "0.9.2"
16
+ "@vyriy/check": "0.9.4",
17
+ "@vyriy/tooling": "0.9.4"
18
18
  },
19
19
  "peerDependencies": {
20
- "@modelcontextprotocol/sdk": "^1.29.0",
21
- "@storybook/addon-docs": "^10.4.6",
22
- "@storybook/react-webpack5": "^10.4.6",
20
+ "@modelcontextprotocol/sdk": "^1.30.0",
21
+ "@storybook/addon-docs": "^10.5.6",
22
+ "@storybook/react-webpack5": "^10.5.6",
23
23
  "@testing-library/dom": "^10.4.1",
24
24
  "@testing-library/react": "^16.3.2",
25
25
  "@types/jest": "^30.0.0",
26
- "@types/react": "^19.2.17",
27
- "@types/react-dom": "^19.2.3",
26
+ "@types/react": "^19.2.18",
27
+ "@types/react-dom": "^19.2.4",
28
28
  "cross-env": "^10.1.0",
29
- "eslint": "^10.6.0",
29
+ "eslint": "^10.8.0",
30
30
  "graphql": "^17.0.2",
31
31
  "html-entities": "^2.6.0",
32
32
  "husky": "^9.1.7",
33
33
  "jest": "^30.4.2",
34
- "npm-check-updates": "^22.2.9",
35
- "npm-run-all2": "^9.0.2",
36
- "prettier": "^3.9.4",
37
- "react": "^19.2.7",
38
- "react-dom": "^19.2.7",
34
+ "npm-check-updates": "^23.0.1",
35
+ "npm-run-all2": "^9.0.3",
36
+ "prettier": "^3.9.6",
37
+ "react": "^19.2.8",
38
+ "react-dom": "^19.2.8",
39
39
  "rimraf": "^6.1.3",
40
- "sass": "^1.101.0",
41
- "storybook": "^10.4.6",
42
- "stylelint": "^17.14.0",
43
- "tsx": "^4.23.0",
40
+ "sass": "^1.102.0",
41
+ "storybook": "^10.5.6",
42
+ "stylelint": "^17.14.1",
43
+ "tsx": "^4.23.5",
44
44
  "typescript": "^6.0.3",
45
- "webpack": "^5.108.4",
46
- "webpack-cli": "^7.2.1",
45
+ "webpack": "^5.109.2",
46
+ "webpack-cli": "^7.2.2",
47
47
  "zod": "^4.4.3"
48
48
  },
49
49
  "peerDependenciesMeta": {
package/preset/api.js CHANGED
@@ -313,7 +313,7 @@ export default ssr(
313
313
  import { api } from '@vyriy/handler';
314
314
 
315
315
  server(
316
- api(async (event) =>
316
+ api(async (event: { path: string }) =>
317
317
  Promise.resolve({
318
318
  statusCode: 200,
319
319
  body: JSON.stringify({
@@ -9,7 +9,7 @@ const agentsPath = [
9
9
  resolve(presetDir, '../../../../AGENTS.md'),
10
10
  ].find(existsSync) ?? '';
11
11
  const agentsContent = agentsPath ? readFileSync(agentsPath, 'utf8') : '';
12
- const projectFiles = {
12
+ const rawProjectFiles = {
13
13
  '.browserslistrc': '[development]\nextends @vyriy/browserslist-config\n\n[ssr]\nextends @vyriy/browserslist-config\n\n[production]\nextends @vyriy/browserslist-config\n\n[modern]\nextends @vyriy/browserslist-config\n',
14
14
  'packages/env/doc.mdx': "import { Meta, Markdown } from '@storybook/addon-docs/blocks';\nimport ReadMe from './README.md?raw';\n\n<Meta title=\"Packages/Env\" />\n\n<Markdown>{ReadMe}</Markdown>\n",
15
15
  'packages/env/index.ts': "export * from './env.js';\n",
@@ -277,6 +277,12 @@ The tests verify that the entry point mounts into \`#root\` and renders the demo
277
277
  'workspaces/ui/index.tsx': "import { element } from '@vyriy/render/element';\n\nimport { ProfileCard } from '@p/components/profile-card';\nimport '@p/components/styles.scss';\n\nelement({\n root: document.getElementById('root'),\n component: (\n <ProfileCard name=\"Developer\" title=\"Senior IT Professional\" avatarUrl=\"http://localhost:3001/avatar.svg\" />\n ),\n});\n",
278
278
  'workspaces/ui/webpack.config.ts': "import { EnvironmentPlugin } from 'webpack';\n\nimport { csr, html } from '@vyriy/webpack-config';\nimport { path } from '@vyriy/path';\n\nexport default csr(\n '@w/ui',\n {\n path: path('dist', 'cdn'),\n filename: 'index.js',\n },\n (config) => ({\n ...config,\n plugins: [\n ...(config.plugins ?? []),\n new EnvironmentPlugin(['API', 'CDN', 'UI']),\n html({\n htmlAttributes: 'lang=\"en\"',\n title: '<title>Demo</title>',\n meta: '<meta charset=\"utf-8\" /><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />',\n body: '<div id=\"root\"></div>',\n }),\n ],\n }),\n);\n",
279
279
  };
280
+ const projectFiles = {
281
+ ...rawProjectFiles,
282
+ 'workspaces/api/index.tsx': String(rawProjectFiles['workspaces/api/index.tsx'])
283
+ .replace("import { getUi } from '@p/env';\n\nserver(", "import { getUi } from '@p/env';\n\ntype RouterEvent = Parameters<ReturnType<typeof createRouter>['route']>[0];\n\nserver(")
284
+ .replace('api(async (event) =>', 'api(async (event: RouterEvent) =>'),
285
+ };
280
286
  export const fullstack = (options) => ({
281
287
  'AGENTS.md': agentsContent,
282
288
  '.editorconfig': `# https://editorconfig.org
package/preset/mfe.js CHANGED
@@ -9,7 +9,7 @@ const agentsPath = [
9
9
  resolve(presetDir, '../../../../AGENTS.md'),
10
10
  ].find(existsSync) ?? '';
11
11
  const agentsContent = agentsPath ? readFileSync(agentsPath, 'utf8') : '';
12
- const projectFiles = {
12
+ const rawProjectFiles = {
13
13
  '.browserslistrc': '[development]\nextends @vyriy/browserslist-config\n\n[ssr]\nextends @vyriy/browserslist-config\n\n[production]\nextends @vyriy/browserslist-config\n\n[modern]\nextends @vyriy/browserslist-config\n',
14
14
  '.editorconfig': '# https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\nindent_style = space\nindent_size = 2\n\nmax_line_length = 100\n\n# Markdown\n[*.md]\ntrim_trailing_whitespace = false\nmax_line_length = off\n\n# YAML / YML\n[*.{yml,yaml}]\nindent_size = 2\n\n# JSON\n[*.json]\nindent_size = 2\n\n# TypeScript / JavaScript\n[*.{ts,tsx,js,jsx}]\nindent_size = 2\n\n# Shell / Bash\n[*.sh]\nindent_size = 2\n',
15
15
  '.gitignore': '.yarn/*\n!.yarn/cache\n!.yarn/patches\n!.yarn/plugins\n!.yarn/releases\n!.yarn/sdks\n!.yarn/versions\n\n.DS_Store\n.idea\nnode_modules\ncoverage\ndist\nstorybook-static\n*storybook.log\nconsumer\n\ncdk.out\ncdk.context.json\n\n.claude\n.codex\n.agents\n\n!/**/.gitkeep\n',
@@ -206,6 +206,12 @@ const projectFiles = {
206
206
  'workspaces/ui/public/screenshots/default.svg': '<svg\n width="1280"\n height="720"\n viewBox="0 0 1280 720"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n role="img"\n aria-labelledby="title description"\n>\n <title id="title">Default profile card screenshot</title>\n <desc id="description">A profile card microfrontend rendered in a desktop host page.</desc>\n\n <rect width="1280" height="720" fill="#F3F4F6" />\n <rect x="80" y="72" width="1120" height="576" rx="32" fill="white" />\n\n <rect x="128" y="120" width="360" height="480" rx="28" fill="#F9FAFB" stroke="#E5E7EB" />\n <circle cx="308" cy="244" r="72" fill="#9CA3AF" />\n <rect x="188" y="368" width="240" height="28" rx="14" fill="#111827" />\n <rect x="224" y="420" width="168" height="18" rx="9" fill="#6B7280" />\n <rect x="232" y="492" width="152" height="44" rx="22" fill="#10B981" />\n\n <rect x="560" y="152" width="420" height="40" rx="20" fill="#111827" />\n <rect x="560" y="232" width="520" height="20" rx="10" fill="#6B7280" />\n <rect x="560" y="272" width="460" height="20" rx="10" fill="#9CA3AF" />\n <rect x="560" y="312" width="360" height="20" rx="10" fill="#D1D5DB" />\n <rect x="560" y="420" width="520" height="96" rx="24" fill="#F9FAFB" stroke="#E5E7EB" />\n</svg>\n',
207
207
  'workspaces/ui/webpack.config.ts': "import { EnvironmentPlugin } from 'webpack';\n\nimport { csr, html } from '@vyriy/webpack-config';\nimport { path } from '@vyriy/path';\n\ntype ConfigWithDevServer = {\n devServer?: Record<string, unknown>;\n};\n\nexport default csr(\n '@w/ui',\n {\n path: path('dist', 'ui'),\n filename: 'index.js',\n },\n (config) => {\n const configWithDevServer = config as typeof config & ConfigWithDevServer;\n\n return {\n ...config,\n devServer: {\n ...configWithDevServer.devServer,\n static: {\n directory: path('workspaces', 'ui', 'public'),\n },\n },\n plugins: [\n ...(config.plugins ?? []),\n new EnvironmentPlugin(['UI']),\n html(\n {\n htmlAttributes: 'lang=\"en\"',\n title: '<title>Search</title>',\n body: '<vyriy-profile-card name=\"Developer\" title=\"Senior IT Professional\" avatarUrl=\"avatar.svg\"></vyriy-profile-card>',\n script: [\n '<script defer=\"defer\" src=\"index.js\"></script>',\n [\n '<script type=\"module\">',\n \"const card = document.querySelector('vyriy-profile-card');\",\n \"card.addEventListener('vyriy-profile-card.select', (event) => {\",\n \" console.log('UI demo event:', event.detail);\",\n '});',\n '</scr' + 'ipt>',\n ].join(''),\n ].join(''),\n },\n {\n inject: false,\n publicPath: process.env.UI,\n },\n ),\n ],\n };\n },\n);\n",
208
208
  };
209
+ const projectFiles = {
210
+ ...rawProjectFiles,
211
+ 'workspaces/api/index.ts': String(rawProjectFiles['workspaces/api/index.ts'])
212
+ .replace("import { parseProfileCardQuery } from '@p/query';\n\nserver(", "import { parseProfileCardQuery } from '@p/query';\n\ntype RouterEvent = Parameters<ReturnType<typeof createRouter>['route']>[0];\n\nserver(")
213
+ .replace('api(async (event) =>', 'api(async (event: RouterEvent) =>'),
214
+ };
209
215
  export const mfe = (options) => ({
210
216
  ...projectFiles,
211
217
  'AGENTS.md': agentsContent,
package/preset/ssg.js CHANGED
@@ -9,6 +9,7 @@ const agentsPath = [
9
9
  resolve(presetDir, '../../../../AGENTS.md'),
10
10
  ].find(existsSync) ?? '';
11
11
  const agentsContent = agentsPath ? readFileSync(agentsPath, 'utf8') : '';
12
+ const readSsgPublicAsset = (file) => readFileSync(resolve(presetDir, '../assets/ssg-public', file));
12
13
  export const ssg = (options) => ({
13
14
  'package.json': JSON.stringify({
14
15
  name: options.name,
@@ -32,6 +33,7 @@ export const ssg = (options) => ({
32
33
  lint: "run-s 'lint:*'",
33
34
  build: "run-s 'build:*'",
34
35
  test: "run-s 'test:*'",
36
+ start: "run-p 'start:*'",
35
37
  'fix:prettier': 'prettier . --write',
36
38
  'fix:eslint': 'eslint . --fix',
37
39
  'fix:stylelint': 'stylelint "**/*.{css,scss}" --fix',
@@ -41,6 +43,7 @@ export const ssg = (options) => ({
41
43
  'lint:stylelint': 'stylelint "**/*.{css,scss}"',
42
44
  'build:ssg': 'rimraf dist && sh workspaces/ssg/bin/build.sh',
43
45
  'build:storybook': 'cross-env STORYBOOK_DISABLE_TELEMETRY=1 storybook build --quiet --disable-telemetry',
46
+ 'start:ssg': 'npx vs -p 3000 dist --cache static',
44
47
  'test:jest': 'jest',
45
48
  postinstall: 'husky',
46
49
  },
@@ -61,12 +64,14 @@ export const ssg = (options) => ({
61
64
  'cross-env': packageJson.peerDependencies['cross-env'],
62
65
  rimraf: packageJson.peerDependencies.rimraf,
63
66
  '@vyriy/webpack-config': `^${packageJson.version}`,
67
+ webpack: packageJson.peerDependencies.webpack,
64
68
  tsx: packageJson.peerDependencies.tsx,
65
69
  'webpack-cli': packageJson.peerDependencies['webpack-cli'],
66
70
  '@vyriy/stylelint-config': `^${packageJson.version}`,
67
71
  stylelint: packageJson.peerDependencies.stylelint,
68
72
  sass: packageJson.peerDependencies.sass,
69
73
  '@vyriy/ssg': `^${packageJson.version}`,
74
+ '@vyriy/static': `^${packageJson.version}`,
70
75
  },
71
76
  }, null, 2) + '\n',
72
77
  'README.md': `# SSG
@@ -114,6 +119,12 @@ Build the static site:
114
119
  yarn build:ssg
115
120
  \`\`\`
116
121
 
122
+ Preview the built site with the Vyriy static server:
123
+
124
+ \`\`\`bash
125
+ yarn start:ssg
126
+ \`\`\`
127
+
117
128
  Run all checks:
118
129
 
119
130
  \`\`\`bash
@@ -267,25 +278,508 @@ yarn lint:stylelint
267
278
  private: true,
268
279
  type: 'module',
269
280
  }, null, 2) + '\n',
270
- 'packages/components/styles.scss': `:root {
281
+ 'packages/components/styles.scss': `*,
282
+ *::before,
283
+ *::after {
284
+ box-sizing: border-box;
285
+ }
286
+
287
+ :root {
271
288
  --color-bg: #ffffff;
289
+ --color-surface: #f6f7f7;
290
+ --color-surface-muted: #eef1f2;
272
291
  --color-text: #28323c;
292
+ --color-muted: #687580;
273
293
  --color-heading: #3d5165;
274
- --color-link: #365f8c;
294
+ --color-primary: #3d5165;
295
+ --color-primary-hover: #334557;
296
+ --color-accent: #365f8c;
297
+ --color-chrome-bg: var(--color-primary);
298
+ --color-chrome-text: #ffffff;
275
299
  --color-border: #dbe1e5;
300
+ --color-border-strong: #c6d0d8;
301
+ --color-link: var(--color-primary);
302
+ --color-link-hover: #263848;
303
+ --color-focus: #6f8293;
276
304
  --font-sans: system-ui, -apple-system, blinkmacsystemfont, 'Segoe UI', sans-serif;
305
+ --font-mono: 'SFMono-Regular', consolas, 'Liberation Mono', monospace;
306
+ }
307
+
308
+ html {
309
+ background: var(--color-bg);
310
+ color: var(--color-text);
311
+ font-family: var(--font-sans);
312
+ text-size-adjust: none;
277
313
  }
278
314
 
279
315
  body {
316
+ min-width: 20rem;
317
+ min-height: 100vh;
318
+ margin: 0;
280
319
  background: var(--color-bg);
281
320
  color: var(--color-text);
282
321
  font-family: var(--font-sans);
283
322
  }
284
323
 
324
+ img,
325
+ picture,
326
+ svg,
327
+ video,
328
+ canvas {
329
+ display: block;
330
+ max-width: 100%;
331
+ }
332
+
333
+ button,
334
+ input,
335
+ textarea,
336
+ select {
337
+ font: inherit;
338
+ }
339
+
285
340
  a {
286
341
  color: var(--color-link);
287
342
  }
343
+
344
+ a:hover {
345
+ color: var(--color-link-hover);
346
+ }
347
+
348
+ .vyriy-layout {
349
+ display: flex;
350
+ flex-direction: column;
351
+ min-height: 100vh;
352
+ min-height: 100dvh;
353
+ background: var(--color-bg);
354
+ color: var(--color-text);
355
+ }
356
+
357
+ .vyriy-layout__main {
358
+ flex: 1;
359
+ padding-block: 2rem 3rem;
360
+ }
361
+
362
+ .vyriy-header,
363
+ .vyriy-footer {
364
+ background: var(--color-chrome-bg);
365
+ color: var(--color-chrome-text);
366
+ }
367
+
368
+ .vyriy-header {
369
+ position: relative;
370
+ border-block-end: 1px solid rgb(255 255 255 / 14%);
371
+ }
372
+
373
+ .vyriy-header__inner,
374
+ .vyriy-footer__inner {
375
+ box-sizing: border-box;
376
+ width: min(100% - 2rem, 76rem);
377
+ margin-inline: auto;
378
+ }
379
+
380
+ .vyriy-header__inner {
381
+ display: grid;
382
+ grid-template-columns: minmax(0, 1fr) auto;
383
+ gap: 1rem;
384
+ align-items: center;
385
+ padding-block: 1rem;
386
+ }
387
+
388
+ .vyriy-header__brand {
389
+ display: inline-flex;
390
+ gap: 0.6rem;
391
+ align-items: center;
392
+ color: #ffffff;
393
+ font-size: 2rem;
394
+ font-weight: 700;
395
+ text-decoration: none;
396
+ }
397
+
398
+ .vyriy-header__logo {
399
+ width: 4.5rem;
400
+ height: auto;
401
+ object-fit: contain;
402
+ }
403
+
404
+ .vyriy-header__actions {
405
+ display: flex;
406
+ gap: 0.35rem;
407
+ align-items: center;
408
+ justify-content: flex-end;
409
+ }
410
+
411
+ .vyriy-header__search-checkbox,
412
+ .vyriy-header__search-label,
413
+ .vyriy-navigation__checkbox,
414
+ .vyriy-navigation__toggle-text,
415
+ .vyriy-search-form__label {
416
+ position: absolute;
417
+ width: 1px;
418
+ height: 1px;
419
+ overflow: hidden;
420
+ clip-path: inset(50%);
421
+ white-space: nowrap;
422
+ }
423
+
424
+ .vyriy-header__search-toggle,
425
+ .vyriy-navigation__toggle {
426
+ display: inline-flex;
427
+ align-items: center;
428
+ justify-content: center;
429
+ width: 3.25rem;
430
+ min-height: 3.25rem;
431
+ color: #dedbd8;
432
+ cursor: pointer;
433
+ }
434
+
435
+ .vyriy-header__search-icon {
436
+ position: relative;
437
+ display: block;
438
+ width: 1.35rem;
439
+ height: 1.35rem;
440
+ border: 0.18rem solid currentcolor;
441
+ border-radius: 999rem;
442
+ }
443
+
444
+ .vyriy-header__search-icon::after {
445
+ position: absolute;
446
+ inset-block-start: 0.95rem;
447
+ inset-inline-start: 0.95rem;
448
+ display: block;
449
+ width: 0.65rem;
450
+ height: 0.18rem;
451
+ background: currentcolor;
452
+ border-radius: 999rem;
453
+ content: '';
454
+ transform: rotate(45deg);
455
+ transform-origin: 0 50%;
456
+ }
457
+
458
+ .vyriy-search-form {
459
+ display: flex;
460
+ gap: 0.5rem;
461
+ align-items: center;
462
+ width: 100%;
463
+ }
464
+
465
+ .vyriy-search-form__input {
466
+ box-sizing: border-box;
467
+ min-width: 0;
468
+ flex: 1 1 auto;
469
+ width: 100%;
470
+ min-height: 2.5rem;
471
+ padding: 0.45rem 0.75rem;
472
+ border: 1px solid var(--color-border);
473
+ border-radius: 0.25rem;
474
+ background: #ffffff;
475
+ color: var(--color-text);
476
+ }
477
+
478
+ .vyriy-header__search.vyriy-search-form {
479
+ position: absolute;
480
+ inset-block-start: 100%;
481
+ inset-inline: 0;
482
+ z-index: 2;
483
+ max-height: 0;
484
+ padding: 0 1rem;
485
+ overflow: hidden;
486
+ background: var(--color-chrome-bg);
487
+ opacity: 0;
488
+ pointer-events: none;
489
+ visibility: hidden;
490
+ }
491
+
492
+ .vyriy-header__search-checkbox:checked ~ .vyriy-header__search {
493
+ max-height: 5rem;
494
+ padding-block: 0.75rem;
495
+ opacity: 1;
496
+ pointer-events: auto;
497
+ visibility: visible;
498
+ }
499
+
500
+ .vyriy-navigation__toggle-icon {
501
+ display: inline-flex;
502
+ flex-direction: column;
503
+ gap: 0.35rem;
504
+ width: 2rem;
505
+ }
506
+
507
+ .vyriy-navigation__toggle-line {
508
+ display: block;
509
+ height: 0.18rem;
510
+ border-radius: 999rem;
511
+ background: currentcolor;
512
+ }
513
+
514
+ .vyriy-navigation__list {
515
+ display: none;
516
+ flex-direction: column;
517
+ gap: 0.25rem;
518
+ padding: 0;
519
+ margin: 0;
520
+ list-style: none;
521
+ }
522
+
523
+ .vyriy-navigation__checkbox:checked ~ .vyriy-navigation__list {
524
+ display: flex;
525
+ }
526
+
527
+ .vyriy-navigation__link {
528
+ display: block;
529
+ padding-block: 0.35rem;
530
+ color: #dedbd8;
531
+ font-size: 1.2rem;
532
+ text-decoration: none;
533
+ }
534
+
535
+ .vyriy-navigation__link:hover,
536
+ .vyriy-header__brand:hover,
537
+ .vyriy-header__search-toggle:hover,
538
+ .vyriy-navigation__toggle:hover {
539
+ color: #ffffff;
540
+ }
541
+
542
+ .vyriy-page,
543
+ .vyriy-catalog {
544
+ width: min(100% - 2rem, 56rem);
545
+ margin-inline: auto;
546
+ }
547
+
548
+ .vyriy-page__content,
549
+ .vyriy-catalog__content {
550
+ max-width: 56rem;
551
+ color: var(--color-text);
552
+ line-height: 1.7;
553
+ }
554
+
555
+ .vyriy-page__content > :first-child {
556
+ margin-block-start: 0;
557
+ }
558
+
559
+ .vyriy-page__content h1 {
560
+ margin: 0;
561
+ color: var(--color-text);
562
+ font-size: 2rem;
563
+ line-height: 1.08;
564
+ }
565
+
566
+ .vyriy-page__content h2,
567
+ .vyriy-page__content h3 {
568
+ padding-block-start: 1.5rem;
569
+ border-block-start: 1px solid var(--color-border);
570
+ margin: 2rem 0 1rem;
571
+ color: var(--color-heading);
572
+ line-height: 1.25;
573
+ }
574
+
575
+ .vyriy-page__content p,
576
+ .vyriy-page__content ul,
577
+ .vyriy-page__content pre {
578
+ margin: 1rem 0 0;
579
+ }
580
+
581
+ .vyriy-page__content code {
582
+ padding: 0.1rem 0.25rem;
583
+ border: 1px solid var(--color-border);
584
+ border-radius: 4px;
585
+ background: var(--color-surface);
586
+ font-family: var(--font-mono);
587
+ font-size: 0.9em;
588
+ }
589
+
590
+ .vyriy-page__content pre {
591
+ overflow-x: auto;
592
+ padding: 1rem;
593
+ border: 1px solid var(--color-border);
594
+ border-radius: 6px;
595
+ background: var(--color-surface);
596
+ line-height: 1.55;
597
+ }
598
+
599
+ .vyriy-page__content pre code {
600
+ display: block;
601
+ min-width: max-content;
602
+ padding: 0;
603
+ border: 0;
604
+ background: transparent;
605
+ }
606
+
607
+ .vyriy-card,
608
+ .vyriy-search-page__result {
609
+ border-block-end: 1px solid var(--color-border);
610
+ }
611
+
612
+ .vyriy-card__link,
613
+ .vyriy-search-page__result-link {
614
+ display: block;
615
+ padding-block: 1.25rem;
616
+ color: inherit;
617
+ text-decoration: none;
618
+ }
619
+
620
+ .vyriy-card__title,
621
+ .vyriy-search-page__result-title {
622
+ margin: 0;
623
+ color: var(--color-heading);
624
+ font-size: 1.25rem;
625
+ line-height: 1.35;
626
+ }
627
+
628
+ .vyriy-card__description,
629
+ .vyriy-search-page__result-description {
630
+ max-width: 42rem;
631
+ margin: 0.5rem 0 0.75rem;
632
+ color: var(--color-muted);
633
+ line-height: 1.65;
634
+ }
635
+
636
+ .vyriy-card__tags,
637
+ .vyriy-search-page__tags {
638
+ display: flex;
639
+ flex-wrap: wrap;
640
+ gap: 0.4rem;
641
+ padding: 0;
642
+ margin: 0;
643
+ list-style: none;
644
+ }
645
+
646
+ .vyriy-card__tag,
647
+ .vyriy-page__tag,
648
+ .vyriy-search-page__tag {
649
+ max-width: 100%;
650
+ padding: 0.15rem 0.5rem;
651
+ border: 1px solid var(--color-border);
652
+ border-radius: 999px;
653
+ background: var(--color-surface);
654
+ color: var(--color-link);
655
+ font-size: 0.875rem;
656
+ line-height: 1.35;
657
+ overflow-wrap: anywhere;
658
+ text-decoration: none;
659
+ }
660
+
661
+ .vyriy-page__featured,
662
+ .vyriy-page__related {
663
+ padding-block-start: 1.5rem;
664
+ border-block-start: 1px solid var(--color-border);
665
+ margin-block-start: 2rem;
666
+ }
667
+
668
+ .vyriy-page__featured-list,
669
+ .vyriy-page__related-list {
670
+ display: grid;
671
+ gap: 1rem;
672
+ }
673
+
674
+ .vyriy-pagination {
675
+ display: flex;
676
+ flex-wrap: wrap;
677
+ gap: 0.5rem;
678
+ align-items: center;
679
+ justify-content: center;
680
+ margin-block-start: 2rem;
681
+ }
682
+
683
+ .vyriy-pagination__pages {
684
+ display: flex;
685
+ gap: 0.25rem;
686
+ padding: 0;
687
+ margin: 0;
688
+ list-style: none;
689
+ }
690
+
691
+ .vyriy-pagination__control,
692
+ .vyriy-pagination__page,
693
+ .vyriy-search-form__button,
694
+ .vyriy-search-page__more {
695
+ display: inline-flex;
696
+ align-items: center;
697
+ justify-content: center;
698
+ min-height: 2.5rem;
699
+ padding: 0.45rem 0.85rem;
700
+ border: 1px solid var(--color-primary);
701
+ border-radius: 0.25rem;
702
+ background: var(--color-primary);
703
+ color: #ffffff;
704
+ cursor: pointer;
705
+ font: inherit;
706
+ font-weight: 600;
707
+ text-decoration: none;
708
+ }
709
+
710
+ .vyriy-pagination__page[aria-current='page'] {
711
+ background: var(--color-primary-hover);
712
+ }
713
+
714
+ .vyriy-footer {
715
+ border-block-start: 1px solid rgb(255 255 255 / 14%);
716
+ }
717
+
718
+ .vyriy-footer__inner {
719
+ padding-block: 1rem;
720
+ text-align: center;
721
+ }
722
+
723
+ .vyriy-footer__text {
724
+ margin: 0;
725
+ color: #ffffff;
726
+ font-size: 1.125rem;
727
+ }
728
+
729
+ @media (min-width: 48rem) {
730
+ .vyriy-header__inner {
731
+ display: flex;
732
+ min-height: 4rem;
733
+ padding-block: 0;
734
+ justify-content: space-between;
735
+ }
736
+
737
+ .vyriy-header__search-shell {
738
+ position: relative;
739
+ }
740
+
741
+ .vyriy-header__search.vyriy-search-form {
742
+ inset-block-start: 50%;
743
+ inset-inline: auto calc(100% + 0.35rem);
744
+ width: min(21rem, 36vw);
745
+ max-height: none;
746
+ padding: 0;
747
+ background: transparent;
748
+ transform: translateY(-50%);
749
+ }
750
+
751
+ .vyriy-header__search-checkbox:checked ~ .vyriy-header__search {
752
+ max-height: none;
753
+ padding-block: 0;
754
+ }
755
+
756
+ .vyriy-navigation__toggle {
757
+ display: none;
758
+ }
759
+
760
+ .vyriy-navigation__list {
761
+ display: flex;
762
+ flex-flow: row wrap;
763
+ gap: 0.5rem 1rem;
764
+ align-items: center;
765
+ }
766
+
767
+ .vyriy-navigation__link {
768
+ padding-block: 0;
769
+ }
770
+
771
+ .vyriy-page__featured-list,
772
+ .vyriy-page__related-list {
773
+ grid-template-columns: repeat(2, minmax(0, 1fr));
774
+ }
775
+ }
288
776
  `,
777
+ 'site/public/favicon.ico': readSsgPublicAsset('favicon.ico'),
778
+ 'site/public/favicon-16x16.png': readSsgPublicAsset('favicon-16x16.png'),
779
+ 'site/public/favicon-32x32.png': readSsgPublicAsset('favicon-32x32.png'),
780
+ 'site/public/apple-touch-icon.png': readSsgPublicAsset('apple-touch-icon.png'),
781
+ 'site/public/assets/vyriy-v-wings.png': readSsgPublicAsset('assets/vyriy-v-wings.png'),
782
+ 'site/public/assets/vyriy-calm-architecture.png': readSsgPublicAsset('assets/vyriy-calm-architecture.png'),
289
783
  'workspaces/ssg/bin/build.sh': `#!/usr/bin/env sh
290
784
 
291
785
  set -eu
@@ -329,6 +823,14 @@ yarn build:ssg
329
823
  \`\`\`
330
824
 
331
825
  The build writes output into \`dist\`.
826
+
827
+ ## Preview
828
+
829
+ \`\`\`bash
830
+ yarn start:ssg
831
+ \`\`\`
832
+
833
+ This serves \`dist\` with \`vs\`, the CLI provided by \`@vyriy/static\`.
332
834
  `,
333
835
  'workspaces/ssg/webpack.config.ts': `import 'webpack';
334
836
 
package/preset/types.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { PlanResult } from '../plan/types.js';
2
- export type FileMap = Record<string, string>;
2
+ export type FileContent = string | Uint8Array;
3
+ export type FileMap = Record<string, FileContent>;
3
4
  export type Preset = (options: PlanResult) => FileMap;
4
5
  export type PresetKey = 'base' | 'library' | 'api' | 'mcp' | 'ssr' | 'rest' | 'gql' | 'ssg' | 'spa' | 'mfe' | 'fullstack';
5
6
  export type Presets = Partial<Record<PresetKey, {