create-ailk 0.47.0 → 0.48.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 +180 -43
- package/component-catalog.json +223 -285
- package/component-catalog.md +1 -1
- package/dist/apply-design.d.ts +26 -68
- package/dist/apply-design.js +150 -322
- package/dist/cli.js +152 -17
- package/dist/compare-chrome.d.ts +108 -0
- package/dist/compare-chrome.js +481 -0
- package/dist/compare-look.d.ts +94 -0
- package/dist/compare-look.js +378 -0
- package/dist/copy.js +1 -1
- package/dist/design-compile.d.ts +17 -21
- package/dist/design-compile.js +32 -56
- package/dist/design-files.d.ts +93 -0
- package/dist/design-files.js +312 -0
- package/dist/design-home.d.ts +4 -2
- package/dist/design-home.js +88 -6
- package/dist/design-names.d.ts +13 -0
- package/dist/design-names.js +76 -0
- package/dist/design-package.d.ts +46 -56
- package/dist/design-package.js +285 -288
- package/dist/design-presets.d.ts +41 -0
- package/dist/design-presets.js +83 -4
- package/dist/design-scaffold.d.ts +12 -2
- package/dist/design-scaffold.js +72 -34
- package/dist/generated/design-settings.d.ts +56 -0
- package/dist/generated/design-settings.js +237 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/inventory.d.ts +3 -2
- package/dist/inventory.js +10 -4
- package/dist/lib/design-checks.d.ts +46 -0
- package/dist/lib/design-checks.js +79 -1
- package/dist/lib/env-catalog.js +1 -1
- package/dist/lib/module-license-gate.d.ts +1 -1
- package/dist/lib/module-license-gate.js +1 -1
- package/dist/lib/render-verdict.d.ts +13 -1
- package/dist/lib/render-verdict.js +41 -1
- package/dist/look-hub.d.ts +44 -0
- package/dist/look-hub.js +130 -0
- package/dist/look-record.d.ts +35 -0
- package/dist/look-record.js +85 -0
- package/dist/look-samples.d.ts +66 -0
- package/dist/look-samples.js +456 -0
- package/dist/look-settings.d.ts +53 -0
- package/dist/look-settings.js +363 -0
- package/dist/module-architecture.js +12 -0
- package/dist/parse-args.d.ts +10 -6
- package/dist/parse-args.js +26 -13
- package/dist/programmatic.d.ts +1 -19
- package/dist/programmatic.js +65 -103
- package/dist/retired-design-bodies.d.ts +29 -0
- package/dist/retired-design-bodies.js +51 -0
- package/dist/seed-flows.d.ts +1 -1
- package/dist/seed-flows.js +12 -14
- package/dist/seed-workspace.d.ts +4 -1
- package/dist/seed-workspace.js +139 -17
- package/dist/site-chrome.d.ts +41 -41
- package/dist/site-chrome.js +50 -70
- package/dist/site-fonts.d.ts +10 -14
- package/dist/site-fonts.js +5 -1
- package/dist/starter-grid.d.ts +2 -2
- package/dist/strip-look-copies.d.ts +67 -0
- package/dist/strip-look-copies.js +591 -0
- package/dist/template-manifest.d.ts +6 -14
- package/dist/template-manifest.js +0 -9
- package/dist/template-record.d.ts +3 -1
- package/dist/template-record.js +3 -1
- package/dist/topology.d.ts +15 -0
- package/dist/topology.js +60 -0
- package/dist/update.d.ts +57 -1
- package/dist/update.js +742 -13
- package/package.json +3 -4
- package/site-templates/aliases/hub.TEMPLATE-MANIFEST.json +2 -31
- package/site-templates/designs/minimalism/DESIGN.md +163 -297
- package/site-templates/designs/minimalism/LOOK.md +42 -0
- package/site-templates/designs/minimalism/design.yaml +167 -0
- package/site-templates/designs/standard/DESIGN.md +145 -149
- package/site-templates/designs/standard/LOOK.md +42 -0
- package/site-templates/designs/standard/design.yaml +72 -0
- package/site-templates/marketing-site/TEMPLATE-MANIFEST.json +2 -31
- package/site-templates/marketing-site/TEMPLATE-MANIFEST.md +1 -25
- package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.json +2 -31
- package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.md +1 -25
- package/site-templates/shapes/local-business-service/TEMPLATE-MANIFEST.json +2 -31
- package/site-templates/shapes/local-business-service/TEMPLATE-MANIFEST.md +1 -25
- package/site-templates/shapes/organization-service/TEMPLATE-MANIFEST.json +2 -31
- package/site-templates/shapes/organization-service/TEMPLATE-MANIFEST.md +1 -25
- package/site-templates/shapes/person-service/TEMPLATE-MANIFEST.json +2 -31
- package/site-templates/shapes/person-service/TEMPLATE-MANIFEST.md +1 -25
- package/site-templates/shapes/person-service/content/_site.mdx +0 -26
- package/templates/.claude/rules/extending.md +3 -2
- package/templates/.env.example +11 -4
- package/templates/CLAUDE.md +1 -1
- package/templates/DESIGN.md +145 -149
- package/templates/README.md +15 -16
- package/templates/apps/api/.env.example +11 -4
- package/templates/apps/api/CLAUDE.md +6 -4
- package/templates/apps/api/src/lib/__mocks__/prisma.ts +15 -5
- package/templates/apps/mcp/CLAUDE.md +4 -2
- package/templates/apps/web/.env.example +10 -3
- package/templates/apps/web/CLAUDE.md +14 -3
- package/templates/apps/web/app/[locale]/layout.tsx +53 -50
- package/templates/apps/web/app/not-found.tsx +11 -11
- package/templates/apps/web/auth.ts +48 -35
- package/templates/apps/web/jest.config.cjs +5 -0
- package/templates/apps/web/lib/__tests__/hub-site-config.test.ts +179 -31
- package/templates/apps/web/lib/__tests__/library-fonts.test.ts +35 -0
- package/templates/apps/web/lib/__tests__/page-chrome-navigation.test.ts +71 -32
- package/templates/apps/web/lib/__tests__/page-chrome.test.ts +123 -26
- package/templates/apps/web/lib/__tests__/section-look.test.ts +150 -0
- package/templates/apps/web/lib/__tests__/site-theme.test.ts +81 -289
- package/templates/apps/web/lib/deck-page.ts +3 -10
- package/templates/apps/web/lib/deploy-fonts.ts +12 -0
- package/templates/apps/web/lib/hub-site-config.ts +97 -14
- package/templates/apps/web/lib/library-fonts.ts +41 -0
- package/templates/apps/web/lib/mcp-oauth.ts +11 -4
- package/templates/apps/web/lib/page-chrome.ts +52 -34
- package/templates/apps/web/lib/section-look.ts +28 -0
- package/templates/apps/web/lib/site-design.ts +205 -0
- package/templates/apps/web/lib/site-theme-head.ts +98 -13
- package/templates/apps/web/lib/site-theme.ts +40 -62
- package/templates/apps/web/messages/en.json +0 -6
- package/templates/apps/web/next.config.mjs +195 -6
- package/templates/apps/web/package.json +2 -0
- package/templates/apps/web/site-pages.config.tsx +4 -2
- package/templates/content/_site.mdx +0 -26
- package/templates/design.yaml +75 -0
- package/templates/project.yaml +14 -0
- package/versions.json +52 -51
- package/site-templates/marketing-site/DESIGN.md +0 -259
- package/site-templates/marketing-site-free/DESIGN.md +0 -259
- package/site-templates/saas-product/DESIGN.md +0 -259
- package/templates/apps/web/lib/__tests__/deck-page.test.ts +0 -288
- package/templates/apps/web/lib/__tests__/site-theme-head.test.ts +0 -70
- package/templates/apps/web/lib/site-chrome.ts +0 -46
- package/templates/apps/web/lib/site-fonts.ts +0 -15
package/dist/design-package.d.ts
CHANGED
|
@@ -1,26 +1,13 @@
|
|
|
1
|
+
import { BUTTON_SHAPE_VALUES, CHECKMARKS_VALUES, COLOR_KEYS_LIGHT, COPY_DENSITY_VALUES, CORNERS_VALUES, DARK_INK_VALUES, EYEBROW_CASE_VALUES, FIGURES_VALUES, FONT_SOURCE_VALUES, PLACEHOLDERS_VALUES, TYPE_SCALE_VALUES } from "./generated/design-settings.js";
|
|
1
2
|
import { type ResolvedSiteChrome } from "./site-chrome.js";
|
|
2
|
-
/**
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
type DesignColorKeyRequired = (typeof DESIGN_COLOR_KEYS_REQUIRED)[number];
|
|
6
|
-
type DesignColorKeyOptional = (typeof DESIGN_COLOR_KEYS_OPTIONAL)[number];
|
|
7
|
-
/** Duplicated from `SiteThemeSchema`'s colour regex (D3) — proven equal by test. */
|
|
8
|
-
export declare const DESIGN_COLOR_REGEX: RegExp;
|
|
3
|
+
/** A look's light set of colour keys, under the name `update.ts` imports — the generated list, not a copy. */
|
|
4
|
+
export { COLOR_KEYS_LIGHT as DESIGN_COLOR_KEYS_LIGHT } from "./generated/design-settings.js";
|
|
5
|
+
type ColorKeyLight = (typeof COLOR_KEYS_LIGHT)[number];
|
|
9
6
|
export type DesignColors = {
|
|
10
|
-
[K in
|
|
7
|
+
[K in ColorKeyLight | `${ColorKeyLight}-dark`]: string;
|
|
11
8
|
} & {
|
|
12
|
-
[K in
|
|
9
|
+
[K in `${ColorKeyLight}-band`]?: string;
|
|
13
10
|
};
|
|
14
|
-
/** The closed font-source enum (#7720 D1) — a Google Fonts family, self-hosted at build by next/font. */
|
|
15
|
-
export declare const DESIGN_FONT_SOURCE_VALUES: readonly ["google"];
|
|
16
|
-
/** Duplicated from site-config's `FONT_FAMILY_REGEX` (#7720 D1) — proven equal by test. */
|
|
17
|
-
export declare const DESIGN_FONT_STACK_ENTRY_REGEX: RegExp;
|
|
18
|
-
/**
|
|
19
|
-
* #7739 D1.3 — a type size a `typeScale: design` package compiles: a plain
|
|
20
|
-
* length in rem, px or em. Duplicated from site-config's `TYPE_SIZE_REGEX` —
|
|
21
|
-
* proven equal by test.
|
|
22
|
-
*/
|
|
23
|
-
export declare const DESIGN_TYPE_SIZE_REGEX: RegExp;
|
|
24
11
|
/**
|
|
25
12
|
* Typography role fields, D2's `⊆ {fontFamily, fontSize, fontWeight, lineHeight, letterSpacing}`
|
|
26
13
|
* (`fontSize` required), plus #7720's `fontSource` (display/body only) and
|
|
@@ -33,59 +20,45 @@ export interface DesignTypographyRole {
|
|
|
33
20
|
fontWeight?: number;
|
|
34
21
|
lineHeight?: number;
|
|
35
22
|
letterSpacing?: string;
|
|
36
|
-
fontSource?: (typeof
|
|
23
|
+
fontSource?: (typeof FONT_SOURCE_VALUES)[number];
|
|
37
24
|
lineHeightMobile?: number;
|
|
38
25
|
fontSizeMobile?: string;
|
|
39
26
|
}
|
|
40
|
-
/** Role names are open (D2). */
|
|
27
|
+
/** Role names are open (D2), within the name grammar. */
|
|
41
28
|
export type DesignTypography = Record<string, DesignTypographyRole>;
|
|
42
|
-
/** Names open (D2). */
|
|
29
|
+
/** Names open (D2), within the name grammar. */
|
|
43
30
|
export type DesignRounded = Record<string, string>;
|
|
44
31
|
export type DesignSpacing = Record<string, string>;
|
|
45
|
-
/** Duplicated from `SiteThemeSchema`'s enums (D3) — proven equal by test. */
|
|
46
|
-
export declare const DESIGN_CORNERS_VALUES: readonly ["rounded", "square"];
|
|
47
|
-
export declare const DESIGN_EYEBROW_CASE_VALUES: readonly ["upper", "sentence"];
|
|
48
|
-
export declare const DESIGN_PLACEHOLDERS_VALUES: readonly ["outline", "fill"];
|
|
49
|
-
export declare const DESIGN_CHECKMARKS_VALUES: readonly ["circle", "plain"];
|
|
50
|
-
/** #7741 D7 — the button shape. */
|
|
51
|
-
export declare const DESIGN_BUTTON_SHAPE_VALUES: readonly ["control", "pill"];
|
|
52
|
-
export declare const DESIGN_DARK_INK_VALUES: readonly ["fg", "accent"];
|
|
53
|
-
export declare const DESIGN_FIGURES_VALUES: readonly ["platform", "display"];
|
|
54
32
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
|
|
58
|
-
export declare const DESIGN_TYPE_SCALE_VALUES: readonly ["platform", "design"];
|
|
59
|
-
/**
|
|
60
|
-
* D2's optional `treatments` group — the four `SiteThemeSchema` shape
|
|
61
|
-
* settings plus #7741's `buttonShape`, #7739's `darkInk` and `figures` (also runtime settings) and its
|
|
62
|
-
* `typeScale` compile instruction.
|
|
33
|
+
* D2's optional `treatments` group — the runtime shape settings, #7741's
|
|
34
|
+
* `buttonShape`, #7739's `darkInk` and `figures`, and its `typeScale` compile
|
|
35
|
+
* instruction (never written into `theme:`).
|
|
63
36
|
*/
|
|
64
37
|
export interface DesignTreatments {
|
|
65
|
-
corners?: (typeof
|
|
66
|
-
eyebrowCase?: (typeof
|
|
67
|
-
placeholders?: (typeof
|
|
68
|
-
checkmarks?: (typeof
|
|
69
|
-
buttonShape?: (typeof
|
|
70
|
-
typeScale?: (typeof
|
|
71
|
-
darkInk?: (typeof
|
|
72
|
-
figures?: (typeof
|
|
38
|
+
corners?: (typeof CORNERS_VALUES)[number];
|
|
39
|
+
eyebrowCase?: (typeof EYEBROW_CASE_VALUES)[number];
|
|
40
|
+
placeholders?: (typeof PLACEHOLDERS_VALUES)[number];
|
|
41
|
+
checkmarks?: (typeof CHECKMARKS_VALUES)[number];
|
|
42
|
+
buttonShape?: (typeof BUTTON_SHAPE_VALUES)[number];
|
|
43
|
+
typeScale?: (typeof TYPE_SCALE_VALUES)[number];
|
|
44
|
+
darkInk?: (typeof DARK_INK_VALUES)[number];
|
|
45
|
+
figures?: (typeof FIGURES_VALUES)[number];
|
|
73
46
|
}
|
|
74
|
-
/** D2's optional `sections` group —
|
|
47
|
+
/** D2's optional `sections` group — page type → section key → look field → token, number or boolean. */
|
|
75
48
|
export type DesignSections = Record<string, Record<string, unknown>>;
|
|
76
|
-
/** The closed copy-density enum (spec 6892 D4). */
|
|
77
|
-
export declare const DESIGN_COPY_DENSITY_VALUES: readonly ["standard", "sparse"];
|
|
78
49
|
/**
|
|
79
50
|
* Spec 6892 D4's optional `copy` group — how many words a design's own pages
|
|
80
51
|
* carry. Read only by the fill-page/copywriting agents against the scaffold's
|
|
81
|
-
* installed `
|
|
52
|
+
* installed `design.yaml`; no code branches on it.
|
|
82
53
|
*/
|
|
83
54
|
export interface DesignCopy {
|
|
84
|
-
density: (typeof
|
|
55
|
+
density: (typeof COPY_DENSITY_VALUES)[number];
|
|
85
56
|
}
|
|
86
57
|
/** The typed package `readDesignPackage` returns (D2). */
|
|
87
58
|
export interface DesignPackage {
|
|
88
59
|
name: string;
|
|
60
|
+
/** The design's own version (#12500 D4): a whole number from 1, raised by one with each settings change. */
|
|
61
|
+
version: number;
|
|
89
62
|
description: string;
|
|
90
63
|
colors: DesignColors;
|
|
91
64
|
typography: DesignTypography;
|
|
@@ -94,27 +67,44 @@ export interface DesignPackage {
|
|
|
94
67
|
layout: ResolvedSiteChrome;
|
|
95
68
|
treatments?: DesignTreatments;
|
|
96
69
|
sections: DesignSections;
|
|
97
|
-
/** Absent in `
|
|
70
|
+
/** Absent in `design.yaml` resolves to `{ density: "standard" }` (D4). */
|
|
98
71
|
copy: DesignCopy;
|
|
99
72
|
}
|
|
100
73
|
/**
|
|
101
74
|
* Thrown by `readDesignPackage` on any malformed package (D2) — never thrown
|
|
102
75
|
* after a write; every refusal happens before any I/O beyond reading
|
|
103
|
-
* `
|
|
76
|
+
* `design.yaml` itself.
|
|
104
77
|
*/
|
|
105
78
|
export declare class DesignPackageError extends Error {
|
|
106
79
|
readonly file: string;
|
|
107
80
|
readonly field: string;
|
|
108
81
|
constructor(file: string, field: string, reason: string);
|
|
109
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Parse `<dir>/design.yaml` — a bare YAML mapping — into a plain object tree
|
|
85
|
+
* (D5), with every refusal this reader's subset makes. `update` also reads a
|
|
86
|
+
* `theme:` block create-ailk wrote through it (#12500 D7).
|
|
87
|
+
*/
|
|
88
|
+
export declare function parseSettings(text: string, file: string): Record<string, unknown>;
|
|
110
89
|
/** One stack entry, trimmed, with one matching pair of `'` or `"` removed. */
|
|
111
90
|
export declare function unquoteFamily(entry: string): string;
|
|
112
91
|
/**
|
|
113
|
-
*
|
|
92
|
+
* `readDesignPackage`'s check over settings text, with no file read (#12500
|
|
93
|
+
* D7): `update` reads a site's moved settings as a design before it writes them.
|
|
94
|
+
*/
|
|
95
|
+
export declare function readDesignPackageText(text: string, file: string): DesignPackage;
|
|
96
|
+
/**
|
|
97
|
+
* Read `<dir>/design.yaml`, validated exactly as `readDesignPackage` validates
|
|
98
|
+
* it, and answer the parsed settings object rather than the typed package
|
|
99
|
+
* (#12477 D3): the settings a look of a workspace's own is written to its hub
|
|
100
|
+
* design record with. Refuses as `readDesignPackage` does.
|
|
101
|
+
*/
|
|
102
|
+
export declare function readDesignSettings(dir: string): Record<string, unknown>;
|
|
103
|
+
/**
|
|
104
|
+
* Read and validate `<dir>/design.yaml` into a typed
|
|
114
105
|
* `DesignPackage` (D1/D2). Refuses — naming the file and the field — on any
|
|
115
106
|
* malformed package: a missing file, an unknown key, a wrong type, an
|
|
116
107
|
* unknown layout value. Nothing is written; this function has no side
|
|
117
108
|
* effects beyond the one read.
|
|
118
109
|
*/
|
|
119
110
|
export declare function readDesignPackage(dir: string): DesignPackage;
|
|
120
|
-
export {};
|