@cobdfamily/clf-core 7.0.1
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 +250 -0
- package/dist/_variables.scss +973 -0
- package/dist/components/cobd-embed.d.ts +4 -0
- package/dist/components/cobd-embed.js +163 -0
- package/dist/components/cobd-nav.d.ts +1 -0
- package/dist/components/cobd-nav.js +383 -0
- package/dist/components/cobd-support.d.ts +26 -0
- package/dist/components/cobd-support.js +296 -0
- package/dist/components/font-scale-toggle.d.ts +9 -0
- package/dist/components/font-scale-toggle.js +159 -0
- package/dist/components/forms/checkbox.d.ts +1 -0
- package/dist/components/forms/checkbox.js +118 -0
- package/dist/components/forms/common.d.ts +17 -0
- package/dist/components/forms/common.js +137 -0
- package/dist/components/forms/index.d.ts +5 -0
- package/dist/components/forms/index.js +13 -0
- package/dist/components/forms/select.d.ts +1 -0
- package/dist/components/forms/select.js +132 -0
- package/dist/components/forms/submit.d.ts +1 -0
- package/dist/components/forms/submit.js +78 -0
- package/dist/components/forms/textarea.d.ts +1 -0
- package/dist/components/forms/textarea.js +95 -0
- package/dist/components/forms/textfield.d.ts +1 -0
- package/dist/components/forms/textfield.js +125 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.js +33 -0
- package/dist/components/theme-toggle.d.ts +10 -0
- package/dist/components/theme-toggle.js +130 -0
- package/dist/i18n/chrome.json +94 -0
- package/dist/navs/cobd.ca.json +83 -0
- package/dist/navs/more-cobd.json +60 -0
- package/dist/navs.d.ts +27 -0
- package/dist/navs.js +193 -0
- package/dist/theming/font-scale-paint.d.ts +0 -0
- package/dist/theming/font-scale-paint.js +32 -0
- package/dist/theming/init.d.ts +1 -0
- package/dist/theming/init.js +19 -0
- package/dist/theming/runtime.d.ts +22 -0
- package/dist/theming/runtime.js +333 -0
- package/dist/tokens.css +972 -0
- package/dist/tokens.json +97 -0
- package/dist/tokens.scss +95 -0
- package/package.json +123 -0
- package/src/navs/schema.json +64 -0
package/dist/tokens.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"color.primary": "#72cadb",
|
|
3
|
+
"color.primary.dark": "#8fd8e6",
|
|
4
|
+
"color.primary-contrast": "#000000",
|
|
5
|
+
"color.primary-contrast.dark": "#000000",
|
|
6
|
+
"color.primary-strong": "#115a6a",
|
|
7
|
+
"color.primary-strong.dark": "#8fd8e6",
|
|
8
|
+
"color.secondary": "#de1818",
|
|
9
|
+
"color.secondary.dark": "#f25555",
|
|
10
|
+
"color.secondary-contrast": "#ffffff",
|
|
11
|
+
"color.secondary-contrast.dark": "#000000",
|
|
12
|
+
"color.secondary-strong": "#b30e0e",
|
|
13
|
+
"color.secondary-strong.dark": "#f25555",
|
|
14
|
+
"color.tertiary": "#2d5e3a",
|
|
15
|
+
"color.tertiary.dark": "#5d9870",
|
|
16
|
+
"color.tertiary-contrast": "#ffffff",
|
|
17
|
+
"color.tertiary-contrast.dark": "#000000",
|
|
18
|
+
"color.tertiary-strong": "#1e4426",
|
|
19
|
+
"color.tertiary-strong.dark": "#5d9870",
|
|
20
|
+
"color.success": "#2dd36f",
|
|
21
|
+
"color.success.dark": "#5fdc8b",
|
|
22
|
+
"color.success-contrast": "#000000",
|
|
23
|
+
"color.success-contrast.dark": "#000000",
|
|
24
|
+
"color.success-strong": "#0e7c41",
|
|
25
|
+
"color.success-strong.dark": "#5fdc8b",
|
|
26
|
+
"color.warning": "#ffc409",
|
|
27
|
+
"color.warning.dark": "#ffd23d",
|
|
28
|
+
"color.warning-contrast": "#000000",
|
|
29
|
+
"color.warning-contrast.dark": "#000000",
|
|
30
|
+
"color.warning-strong": "#8a5a00",
|
|
31
|
+
"color.warning-strong.dark": "#ffd23d",
|
|
32
|
+
"color.danger": "#c5283b",
|
|
33
|
+
"color.danger.dark": "#b53e51",
|
|
34
|
+
"color.danger-contrast": "#ffffff",
|
|
35
|
+
"color.danger-contrast.dark": "#ffffff",
|
|
36
|
+
"color.danger-strong": "#a31f30",
|
|
37
|
+
"color.danger-strong.dark": "#b53e51",
|
|
38
|
+
"color.medium": "#92949c",
|
|
39
|
+
"color.medium.dark": "#a3a5ad",
|
|
40
|
+
"color.medium-contrast": "#000000",
|
|
41
|
+
"color.medium-contrast.dark": "#000000",
|
|
42
|
+
"color.light": "#f4f5f8",
|
|
43
|
+
"color.light.dark": "#2a2b30",
|
|
44
|
+
"color.light-contrast": "#000000",
|
|
45
|
+
"color.light-contrast.dark": "#ffffff",
|
|
46
|
+
"color.background": "#ffffff",
|
|
47
|
+
"color.background.dark": "#121212",
|
|
48
|
+
"color.foreground": "#1a1a1a",
|
|
49
|
+
"color.foreground.dark": "#f0f0f0",
|
|
50
|
+
"color.toolbar-background": "#72cadb",
|
|
51
|
+
"color.toolbar-background.dark": "#1a3540",
|
|
52
|
+
"color.toolbar-foreground": "#000000",
|
|
53
|
+
"color.toolbar-foreground.dark": "#f0f0f0",
|
|
54
|
+
"color.link": "#0044a3",
|
|
55
|
+
"color.link.dark": "#7eaeec",
|
|
56
|
+
"color.link-visited": "#5c2a91",
|
|
57
|
+
"color.link-visited.dark": "#b794dd",
|
|
58
|
+
"spacing.xs": "4px",
|
|
59
|
+
"spacing.sm": "8px",
|
|
60
|
+
"spacing.md": "16px",
|
|
61
|
+
"spacing.lg": "24px",
|
|
62
|
+
"spacing.xl": "32px",
|
|
63
|
+
"spacing.2xl": "48px",
|
|
64
|
+
"spacing.3xl": "64px",
|
|
65
|
+
"radius.sm": "4px",
|
|
66
|
+
"radius.md": "8px",
|
|
67
|
+
"radius.lg": "16px",
|
|
68
|
+
"radius.xl": "24px",
|
|
69
|
+
"radius.pill": "9999px",
|
|
70
|
+
"typography.family-sans": "'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
|
|
71
|
+
"typography.family-mono": "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
72
|
+
"typography.size-xs": "0.75rem",
|
|
73
|
+
"typography.size-sm": "0.875rem",
|
|
74
|
+
"typography.size-md": "1rem",
|
|
75
|
+
"typography.size-lg": "1.25rem",
|
|
76
|
+
"typography.size-xl": "1.5rem",
|
|
77
|
+
"typography.size-2xl": "2rem",
|
|
78
|
+
"typography.size-3xl": "2.5rem",
|
|
79
|
+
"typography.weight-regular": "400",
|
|
80
|
+
"typography.weight-medium": "500",
|
|
81
|
+
"typography.weight-bold": "700",
|
|
82
|
+
"typography.line-tight": "1.2",
|
|
83
|
+
"typography.line-default": "1.5",
|
|
84
|
+
"typography.line-loose": "1.75",
|
|
85
|
+
"shadows.sm": "0 1px 2px rgba(0, 0, 0, 0.06)",
|
|
86
|
+
"shadows.sm.dark": "0 1px 2px rgba(0, 0, 0, 0.4)",
|
|
87
|
+
"shadows.md": "0 4px 8px rgba(0, 0, 0, 0.08)",
|
|
88
|
+
"shadows.md.dark": "0 4px 8px rgba(0, 0, 0, 0.5)",
|
|
89
|
+
"shadows.lg": "0 12px 24px rgba(0, 0, 0, 0.12)",
|
|
90
|
+
"shadows.lg.dark": "0 12px 24px rgba(0, 0, 0, 0.6)",
|
|
91
|
+
"motion.duration-fast": "120ms",
|
|
92
|
+
"motion.duration-default": "200ms",
|
|
93
|
+
"motion.duration-slow": "320ms",
|
|
94
|
+
"motion.easing-standard": "cubic-bezier(0.2, 0, 0, 1)",
|
|
95
|
+
"motion.easing-decelerate": "cubic-bezier(0, 0, 0, 1)",
|
|
96
|
+
"motion.easing-accelerate": "cubic-bezier(0.3, 0, 1, 1)"
|
|
97
|
+
}
|
package/dist/tokens.scss
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
$cobd-color-primary: #72cadb;
|
|
2
|
+
$cobd-color-primary-dark: #8fd8e6;
|
|
3
|
+
$cobd-color-primary-contrast: #000000;
|
|
4
|
+
$cobd-color-primary-contrast-dark: #000000;
|
|
5
|
+
$cobd-color-primary-strong: #115a6a;
|
|
6
|
+
$cobd-color-primary-strong-dark: #8fd8e6;
|
|
7
|
+
$cobd-color-secondary: #de1818;
|
|
8
|
+
$cobd-color-secondary-dark: #f25555;
|
|
9
|
+
$cobd-color-secondary-contrast: #ffffff;
|
|
10
|
+
$cobd-color-secondary-contrast-dark: #000000;
|
|
11
|
+
$cobd-color-secondary-strong: #b30e0e;
|
|
12
|
+
$cobd-color-secondary-strong-dark: #f25555;
|
|
13
|
+
$cobd-color-tertiary: #2d5e3a;
|
|
14
|
+
$cobd-color-tertiary-dark: #5d9870;
|
|
15
|
+
$cobd-color-tertiary-contrast: #ffffff;
|
|
16
|
+
$cobd-color-tertiary-contrast-dark: #000000;
|
|
17
|
+
$cobd-color-tertiary-strong: #1e4426;
|
|
18
|
+
$cobd-color-tertiary-strong-dark: #5d9870;
|
|
19
|
+
$cobd-color-success: #2dd36f;
|
|
20
|
+
$cobd-color-success-dark: #5fdc8b;
|
|
21
|
+
$cobd-color-success-contrast: #000000;
|
|
22
|
+
$cobd-color-success-contrast-dark: #000000;
|
|
23
|
+
$cobd-color-success-strong: #0e7c41;
|
|
24
|
+
$cobd-color-success-strong-dark: #5fdc8b;
|
|
25
|
+
$cobd-color-warning: #ffc409;
|
|
26
|
+
$cobd-color-warning-dark: #ffd23d;
|
|
27
|
+
$cobd-color-warning-contrast: #000000;
|
|
28
|
+
$cobd-color-warning-contrast-dark: #000000;
|
|
29
|
+
$cobd-color-warning-strong: #8a5a00;
|
|
30
|
+
$cobd-color-warning-strong-dark: #ffd23d;
|
|
31
|
+
$cobd-color-danger: #c5283b;
|
|
32
|
+
$cobd-color-danger-dark: #b53e51;
|
|
33
|
+
$cobd-color-danger-contrast: #ffffff;
|
|
34
|
+
$cobd-color-danger-contrast-dark: #ffffff;
|
|
35
|
+
$cobd-color-danger-strong: #a31f30;
|
|
36
|
+
$cobd-color-danger-strong-dark: #b53e51;
|
|
37
|
+
$cobd-color-medium: #92949c;
|
|
38
|
+
$cobd-color-medium-dark: #a3a5ad;
|
|
39
|
+
$cobd-color-medium-contrast: #000000;
|
|
40
|
+
$cobd-color-medium-contrast-dark: #000000;
|
|
41
|
+
$cobd-color-light: #f4f5f8;
|
|
42
|
+
$cobd-color-light-dark: #2a2b30;
|
|
43
|
+
$cobd-color-light-contrast: #000000;
|
|
44
|
+
$cobd-color-light-contrast-dark: #ffffff;
|
|
45
|
+
$cobd-color-background: #ffffff;
|
|
46
|
+
$cobd-color-background-dark: #121212;
|
|
47
|
+
$cobd-color-foreground: #1a1a1a;
|
|
48
|
+
$cobd-color-foreground-dark: #f0f0f0;
|
|
49
|
+
$cobd-color-toolbar-background: #72cadb;
|
|
50
|
+
$cobd-color-toolbar-background-dark: #1a3540;
|
|
51
|
+
$cobd-color-toolbar-foreground: #000000;
|
|
52
|
+
$cobd-color-toolbar-foreground-dark: #f0f0f0;
|
|
53
|
+
$cobd-color-link: #0044a3;
|
|
54
|
+
$cobd-color-link-dark: #7eaeec;
|
|
55
|
+
$cobd-color-link-visited: #5c2a91;
|
|
56
|
+
$cobd-color-link-visited-dark: #b794dd;
|
|
57
|
+
$cobd-spacing-xs: 4px;
|
|
58
|
+
$cobd-spacing-sm: 8px;
|
|
59
|
+
$cobd-spacing-md: 16px;
|
|
60
|
+
$cobd-spacing-lg: 24px;
|
|
61
|
+
$cobd-spacing-xl: 32px;
|
|
62
|
+
$cobd-spacing-2xl: 48px;
|
|
63
|
+
$cobd-spacing-3xl: 64px;
|
|
64
|
+
$cobd-radius-sm: 4px;
|
|
65
|
+
$cobd-radius-md: 8px;
|
|
66
|
+
$cobd-radius-lg: 16px;
|
|
67
|
+
$cobd-radius-xl: 24px;
|
|
68
|
+
$cobd-radius-pill: 9999px;
|
|
69
|
+
$cobd-typography-family-sans: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
|
|
70
|
+
$cobd-typography-family-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
71
|
+
$cobd-typography-size-xs: 0.75rem;
|
|
72
|
+
$cobd-typography-size-sm: 0.875rem;
|
|
73
|
+
$cobd-typography-size-md: 1rem;
|
|
74
|
+
$cobd-typography-size-lg: 1.25rem;
|
|
75
|
+
$cobd-typography-size-xl: 1.5rem;
|
|
76
|
+
$cobd-typography-size-2xl: 2rem;
|
|
77
|
+
$cobd-typography-size-3xl: 2.5rem;
|
|
78
|
+
$cobd-typography-weight-regular: 400;
|
|
79
|
+
$cobd-typography-weight-medium: 500;
|
|
80
|
+
$cobd-typography-weight-bold: 700;
|
|
81
|
+
$cobd-typography-line-tight: 1.2;
|
|
82
|
+
$cobd-typography-line-default: 1.5;
|
|
83
|
+
$cobd-typography-line-loose: 1.75;
|
|
84
|
+
$cobd-shadows-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
|
|
85
|
+
$cobd-shadows-sm-dark: 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
86
|
+
$cobd-shadows-md: 0 4px 8px rgba(0, 0, 0, 0.08);
|
|
87
|
+
$cobd-shadows-md-dark: 0 4px 8px rgba(0, 0, 0, 0.5);
|
|
88
|
+
$cobd-shadows-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
|
|
89
|
+
$cobd-shadows-lg-dark: 0 12px 24px rgba(0, 0, 0, 0.6);
|
|
90
|
+
$cobd-motion-duration-fast: 120ms;
|
|
91
|
+
$cobd-motion-duration-default: 200ms;
|
|
92
|
+
$cobd-motion-duration-slow: 320ms;
|
|
93
|
+
$cobd-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
94
|
+
$cobd-motion-easing-decelerate: cubic-bezier(0, 0, 0, 1);
|
|
95
|
+
$cobd-motion-easing-accelerate: cubic-bezier(0.3, 0, 1, 1);
|
package/package.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cobdfamily/clf-core",
|
|
3
|
+
"version": "7.0.1",
|
|
4
|
+
"description": "Common Look and Feel core: design tokens, theming runtime, COBD custom elements (theme toggle, font-scale toggle, font-scale-paint, <cobd-nav>, <cobd-support>, <cobd-embed>, plus the form elements), bundled nav metadata, and shared chrome i18n strings. Ships an `./components` side-effect bundle that registers every element + boots the theming runtime in one import -- what the clf-factory chrome auto-loads. The dependency root for every COBD app; pre-built per-engine theme tarballs live in @cobdfamily/clf-factory.",
|
|
5
|
+
"license": "AGPL-3.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/cobdfamily/clf.git",
|
|
10
|
+
"directory": "packages/clf-core"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"src/navs/schema.json"
|
|
15
|
+
],
|
|
16
|
+
"exports": {
|
|
17
|
+
"./tokens.css": "./dist/tokens.css",
|
|
18
|
+
"./tokens.scss": "./dist/tokens.scss",
|
|
19
|
+
"./tokens.json": "./dist/tokens.json",
|
|
20
|
+
"./theming": {
|
|
21
|
+
"types": "./dist/theming/runtime.d.ts",
|
|
22
|
+
"import": "./dist/theming/runtime.js",
|
|
23
|
+
"default": "./dist/theming/runtime.js"
|
|
24
|
+
},
|
|
25
|
+
"./theming/font-scale-paint": "./dist/theming/font-scale-paint.js",
|
|
26
|
+
"./theming/init": "./dist/theming/init.js",
|
|
27
|
+
"./navs": {
|
|
28
|
+
"types": "./dist/navs.d.ts",
|
|
29
|
+
"import": "./dist/navs.js",
|
|
30
|
+
"default": "./dist/navs.js"
|
|
31
|
+
},
|
|
32
|
+
"./navs/*.json": "./dist/navs/*.json",
|
|
33
|
+
"./schema/nav.json": "./src/navs/schema.json",
|
|
34
|
+
"./components": {
|
|
35
|
+
"types": "./dist/components/index.d.ts",
|
|
36
|
+
"import": "./dist/components/index.js",
|
|
37
|
+
"default": "./dist/components/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./components/cobd-nav": {
|
|
40
|
+
"types": "./dist/components/cobd-nav.d.ts",
|
|
41
|
+
"import": "./dist/components/cobd-nav.js",
|
|
42
|
+
"default": "./dist/components/cobd-nav.js"
|
|
43
|
+
},
|
|
44
|
+
"./components/cobd-support": {
|
|
45
|
+
"types": "./dist/components/cobd-support.d.ts",
|
|
46
|
+
"import": "./dist/components/cobd-support.js",
|
|
47
|
+
"default": "./dist/components/cobd-support.js"
|
|
48
|
+
},
|
|
49
|
+
"./components/cobd-embed": {
|
|
50
|
+
"types": "./dist/components/cobd-embed.d.ts",
|
|
51
|
+
"import": "./dist/components/cobd-embed.js",
|
|
52
|
+
"default": "./dist/components/cobd-embed.js"
|
|
53
|
+
},
|
|
54
|
+
"./components/theme-toggle": {
|
|
55
|
+
"types": "./dist/components/theme-toggle.d.ts",
|
|
56
|
+
"import": "./dist/components/theme-toggle.js",
|
|
57
|
+
"default": "./dist/components/theme-toggle.js"
|
|
58
|
+
},
|
|
59
|
+
"./components/font-scale-toggle": {
|
|
60
|
+
"types": "./dist/components/font-scale-toggle.d.ts",
|
|
61
|
+
"import": "./dist/components/font-scale-toggle.js",
|
|
62
|
+
"default": "./dist/components/font-scale-toggle.js"
|
|
63
|
+
},
|
|
64
|
+
"./components/forms": {
|
|
65
|
+
"types": "./dist/components/forms/index.d.ts",
|
|
66
|
+
"import": "./dist/components/forms/index.js",
|
|
67
|
+
"default": "./dist/components/forms/index.js"
|
|
68
|
+
},
|
|
69
|
+
"./components/forms/textfield": {
|
|
70
|
+
"types": "./dist/components/forms/textfield.d.ts",
|
|
71
|
+
"import": "./dist/components/forms/textfield.js",
|
|
72
|
+
"default": "./dist/components/forms/textfield.js"
|
|
73
|
+
},
|
|
74
|
+
"./components/forms/textarea": {
|
|
75
|
+
"types": "./dist/components/forms/textarea.d.ts",
|
|
76
|
+
"import": "./dist/components/forms/textarea.js",
|
|
77
|
+
"default": "./dist/components/forms/textarea.js"
|
|
78
|
+
},
|
|
79
|
+
"./components/forms/select": {
|
|
80
|
+
"types": "./dist/components/forms/select.d.ts",
|
|
81
|
+
"import": "./dist/components/forms/select.js",
|
|
82
|
+
"default": "./dist/components/forms/select.js"
|
|
83
|
+
},
|
|
84
|
+
"./components/forms/checkbox": {
|
|
85
|
+
"types": "./dist/components/forms/checkbox.d.ts",
|
|
86
|
+
"import": "./dist/components/forms/checkbox.js",
|
|
87
|
+
"default": "./dist/components/forms/checkbox.js"
|
|
88
|
+
},
|
|
89
|
+
"./components/forms/submit": {
|
|
90
|
+
"types": "./dist/components/forms/submit.d.ts",
|
|
91
|
+
"import": "./dist/components/forms/submit.js",
|
|
92
|
+
"default": "./dist/components/forms/submit.js"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"scripts": {
|
|
96
|
+
"build:tokens": "node build/build-tokens.mjs",
|
|
97
|
+
"build:navs": "node build/build-navs.mjs",
|
|
98
|
+
"build:i18n": "node build/build-i18n.mjs",
|
|
99
|
+
"build:ts": "tsc -p tsconfig.json",
|
|
100
|
+
"build": "npm run build:tokens && npm run build:navs && npm run build:i18n && npm run build:ts",
|
|
101
|
+
"audit:contrast": "node build/audit-contrast.mjs",
|
|
102
|
+
"clean": "rm -rf dist",
|
|
103
|
+
"test": "node --test test/*.test.mjs",
|
|
104
|
+
"test:watch": "node --test --watch test/*.test.mjs",
|
|
105
|
+
"prepublishOnly": "npm run clean && npm run build && npm test"
|
|
106
|
+
},
|
|
107
|
+
"devDependencies": {
|
|
108
|
+
"typescript": "^5.4.0"
|
|
109
|
+
},
|
|
110
|
+
"publishConfig": {
|
|
111
|
+
"access": "public"
|
|
112
|
+
},
|
|
113
|
+
"keywords": [
|
|
114
|
+
"cobd",
|
|
115
|
+
"design-tokens",
|
|
116
|
+
"theming",
|
|
117
|
+
"dark-mode",
|
|
118
|
+
"ionic",
|
|
119
|
+
"wordpress",
|
|
120
|
+
"keycloak-theme",
|
|
121
|
+
"common-look-and-feel"
|
|
122
|
+
]
|
|
123
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://clf.cobd.ca/schemas/nav.json",
|
|
4
|
+
"title": "CLF Nav",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["slug", "label", "items"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"slug": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^[a-z0-9][a-z0-9.\\-]*$",
|
|
13
|
+
"description": "Stable identifier for this nav. Matches the filename."
|
|
14
|
+
},
|
|
15
|
+
"label": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Default human-readable name (treated as the base locale, usually English)."
|
|
18
|
+
},
|
|
19
|
+
"label_i18n": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"description": "Optional per-locale label overrides keyed by BCP-47 tag (e.g., 'fr', 'pa', 'cr'). Falls back to 'label' if a locale isn't listed.",
|
|
22
|
+
"additionalProperties": { "type": "string" }
|
|
23
|
+
},
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": { "$ref": "#/$defs/navItem" }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"$defs": {
|
|
30
|
+
"navItem": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"required": ["id", "label"],
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"properties": {
|
|
35
|
+
"id": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"pattern": "^[a-z0-9][a-z0-9_\\-]*$",
|
|
38
|
+
"description": "Stable id. Consumers may pattern-match in code."
|
|
39
|
+
},
|
|
40
|
+
"label": { "type": "string" },
|
|
41
|
+
"label_i18n": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"description": "Per-locale label overrides keyed by BCP-47 tag.",
|
|
44
|
+
"additionalProperties": { "type": "string" }
|
|
45
|
+
},
|
|
46
|
+
"href": { "type": "string" },
|
|
47
|
+
"rel": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"enum": ["external"]
|
|
50
|
+
},
|
|
51
|
+
"icon": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "Ionicon name (or any string consumers know how to map)."
|
|
54
|
+
},
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"items": { "$ref": "#/$defs/navItem" }
|
|
58
|
+
},
|
|
59
|
+
"requiresAuth": { "type": "boolean" },
|
|
60
|
+
"description": { "type": "string" }
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|