@orbit-work/oem-sdk 0.1.7 → 0.1.9
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/dist/audit-brand.js +231 -48
- package/dist/audit-brand.js.map +1 -1
- package/dist/audit.d.ts +40 -1
- package/dist/audit.js +231 -48
- package/dist/audit.js.map +1 -1
- package/dist/{chunk-YMKYAM23.js → chunk-C4G3TUO6.js} +2 -2
- package/dist/{chunk-YMKYAM23.js.map → chunk-C4G3TUO6.js.map} +1 -1
- package/dist/{chunk-ZOURSTKZ.js → chunk-I3RBZK2G.js} +161 -45
- package/dist/chunk-I3RBZK2G.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/manifest.d.ts +70 -3
- package/dist/manifest.js +1 -1
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +2 -2
- package/package.json +2 -2
- package/schema/orbit-brand.schema.json +124 -15
- package/dist/chunk-ZOURSTKZ.js.map +0 -1
package/dist/manifest.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BrandThemeToken, OrbitworkFontScale, LocalizedBranding, TenantBranding, BrandTheme } from '@orbit-work/ui/appearance';
|
|
1
|
+
import { BrandThemeToken, OrbitworkFontScale, LoginAppearance, LocalizedBranding, TenantBranding, BrandTheme } from '@orbit-work/ui/appearance';
|
|
2
2
|
import { SlotKind, WORKBENCH_SLOT_DECLARATIONS, WORKBENCH_KEYED_SLOT_KEYS } from '@orbit-work/ui/slot/core';
|
|
3
3
|
|
|
4
4
|
type BrandSlotName = keyof typeof WORKBENCH_SLOT_DECLARATIONS;
|
|
@@ -36,11 +36,17 @@ type PartialBrandManifest = {
|
|
|
36
36
|
permissions?: BrandPermissions;
|
|
37
37
|
entry?: string;
|
|
38
38
|
identity?: PartialBrandIdentity;
|
|
39
|
+
theme?: BrandManifestTheme;
|
|
39
40
|
tokens?: BrandManifest["tokens"];
|
|
40
41
|
/** OEM font stacks; user skins and the tenant theme still win at runtime. */
|
|
41
42
|
typography?: BrandTypography;
|
|
42
43
|
/** OEM text-size preset; the personal preference and user skins still win. */
|
|
43
44
|
fontScale?: OrbitworkFontScale;
|
|
45
|
+
/** OEM may opt back into Orbit's decorative empty-home ring backdrop. */
|
|
46
|
+
appearance?: {
|
|
47
|
+
homeBackdrop?: boolean;
|
|
48
|
+
login?: LoginAppearance;
|
|
49
|
+
};
|
|
44
50
|
assets?: PartialBrandAssets;
|
|
45
51
|
branding?: PartialLocalizedBranding;
|
|
46
52
|
locales?: BrandLocaleSources;
|
|
@@ -59,10 +65,55 @@ type PartialBrandManifestValidationResult = {
|
|
|
59
65
|
type BrandAssets = {
|
|
60
66
|
appIcon: string;
|
|
61
67
|
tray?: string;
|
|
68
|
+
/** Platform-ready tray rasters exported as one atomic, canonical set. */
|
|
69
|
+
trayVariants?: TrayVariants;
|
|
62
70
|
logo: string;
|
|
63
71
|
/** Optional login key-visual photo (KV board background on the desktop login page). */
|
|
64
72
|
loginKV?: string;
|
|
65
73
|
};
|
|
74
|
+
type TrayVariants = {
|
|
75
|
+
macos: {
|
|
76
|
+
"1x": string;
|
|
77
|
+
"2x": string;
|
|
78
|
+
};
|
|
79
|
+
windows: {
|
|
80
|
+
"16": string;
|
|
81
|
+
"20": string;
|
|
82
|
+
"24": string;
|
|
83
|
+
"32": string;
|
|
84
|
+
};
|
|
85
|
+
linux: {
|
|
86
|
+
"16": string;
|
|
87
|
+
"22": string;
|
|
88
|
+
"24": string;
|
|
89
|
+
"32": string;
|
|
90
|
+
"48": string;
|
|
91
|
+
"64": string;
|
|
92
|
+
"128": string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
declare const TRAY_VARIANT_PATHS: {
|
|
96
|
+
readonly macos: {
|
|
97
|
+
readonly "1x": "./macos/trayTemplate.png";
|
|
98
|
+
readonly "2x": "./macos/trayTemplate@2x.png";
|
|
99
|
+
};
|
|
100
|
+
readonly windows: {
|
|
101
|
+
readonly "16": "./windows/tray-16.png";
|
|
102
|
+
readonly "20": "./windows/tray-20.png";
|
|
103
|
+
readonly "24": "./windows/tray-24.png";
|
|
104
|
+
readonly "32": "./windows/tray-32.png";
|
|
105
|
+
};
|
|
106
|
+
readonly linux: {
|
|
107
|
+
readonly "16": "./linux/tray-16.png";
|
|
108
|
+
readonly "22": "./linux/tray-22.png";
|
|
109
|
+
readonly "24": "./linux/tray-24.png";
|
|
110
|
+
readonly "32": "./linux/tray-32.png";
|
|
111
|
+
readonly "48": "./linux/tray-48.png";
|
|
112
|
+
readonly "64": "./linux/tray-64.png";
|
|
113
|
+
readonly "128": "./linux/tray-128.png";
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
declare const TRAY_SOURCE_PATH: "./assets/tray-source.png";
|
|
66
117
|
type BrandLocaleSources = Record<string, string>;
|
|
67
118
|
/** OEM typography override; both stacks are CSS font-family values. */
|
|
68
119
|
type BrandTypography = {
|
|
@@ -99,6 +150,17 @@ type KeyedSlotContribution = {
|
|
|
99
150
|
};
|
|
100
151
|
}[KeyedSlotName];
|
|
101
152
|
type SlotContribution = SingleSlotContribution | ListSlotContribution | KeyedSlotContribution;
|
|
153
|
+
/**
|
|
154
|
+
* OEM color input (R17 D-191 / D-192, R18 E7A): one primary color and an optional signal. Every
|
|
155
|
+
* primary role derives from `primary` at runtime; nothing falls back to the official indigo. The
|
|
156
|
+
* enterprise and personal layers may override these defaults. A primary whose hue sits next to danger
|
|
157
|
+
* fails validation unless `allowDangerHue` records the OEM's sign-off.
|
|
158
|
+
*/
|
|
159
|
+
type BrandManifestTheme = {
|
|
160
|
+
primary: string;
|
|
161
|
+
signal?: string;
|
|
162
|
+
allowDangerHue?: boolean;
|
|
163
|
+
};
|
|
102
164
|
type BrandManifest = {
|
|
103
165
|
$schema: typeof BRAND_MANIFEST_SCHEMA;
|
|
104
166
|
id: string;
|
|
@@ -112,10 +174,15 @@ type BrandManifest = {
|
|
|
112
174
|
permissions?: BrandPermissions;
|
|
113
175
|
entry?: string;
|
|
114
176
|
identity: BrandIdentity;
|
|
177
|
+
theme?: BrandManifestTheme;
|
|
115
178
|
tokens?: Partial<Record<"light" | "dark", Partial<Record<BrandThemeToken, string>>>>;
|
|
116
179
|
typography?: BrandTypography;
|
|
117
180
|
/** OEM text-size preset; the personal font-scale preference and user skins still win. */
|
|
118
181
|
fontScale?: OrbitworkFontScale;
|
|
182
|
+
appearance?: {
|
|
183
|
+
homeBackdrop?: boolean;
|
|
184
|
+
login?: LoginAppearance;
|
|
185
|
+
};
|
|
119
186
|
assets: BrandAssets;
|
|
120
187
|
branding: LocalizedBranding;
|
|
121
188
|
/** Package-relative dictionaries owned by this OEM namespace. en-US is the required fallback. */
|
|
@@ -130,7 +197,7 @@ type BrandManifestParseOptions = {
|
|
|
130
197
|
* Platform builds accept manifests resolved from the managed OEM pipeline:
|
|
131
198
|
* every shape/format/safety check stays in force, only the workspace
|
|
132
199
|
* namespacing bindings are relaxed (productName/versionChannel/protocolScheme
|
|
133
|
-
* must equal id,
|
|
200
|
+
* must equal id, reserved feed channels). Application IDs use reverse-DNS format.
|
|
134
201
|
*/
|
|
135
202
|
platform?: boolean;
|
|
136
203
|
};
|
|
@@ -150,4 +217,4 @@ declare function parseBrandManifest(input: unknown, options?: BrandManifestParse
|
|
|
150
217
|
declare function parsePartialBrandManifest(input: unknown): PartialBrandManifestValidationResult;
|
|
151
218
|
declare function manifestToBrandTheme(manifest: BrandManifest): BrandTheme;
|
|
152
219
|
|
|
153
|
-
export { BRAND_MANIFEST_SCHEMA, type BrandAssets, type BrandIdentity, type BrandLocaleSources, type BrandManifest, type BrandManifestParseOptions, type BrandManifestValidationResult, type BrandNetworkAccess, type BrandPermissions, type BrandSlotName, type BrandTypography, type PartialBrandAssets, type PartialBrandIdentity, type PartialBrandManifest, type PartialBrandManifestValidationResult, type PartialLocalizedBranding, type SlotContribution, manifestToBrandTheme, parseBrandManifest, parsePartialBrandManifest };
|
|
220
|
+
export { BRAND_MANIFEST_SCHEMA, type BrandAssets, type BrandIdentity, type BrandLocaleSources, type BrandManifest, type BrandManifestParseOptions, type BrandManifestTheme, type BrandManifestValidationResult, type BrandNetworkAccess, type BrandPermissions, type BrandSlotName, type BrandTypography, type PartialBrandAssets, type PartialBrandIdentity, type PartialBrandManifest, type PartialBrandManifestValidationResult, type PartialLocalizedBranding, type SlotContribution, TRAY_SOURCE_PATH, TRAY_VARIANT_PATHS, type TrayVariants, manifestToBrandTheme, parseBrandManifest, parsePartialBrandManifest };
|
package/dist/manifest.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { BRAND_MANIFEST_SCHEMA, manifestToBrandTheme, parseBrandManifest, parsePartialBrandManifest } from './chunk-
|
|
1
|
+
export { BRAND_MANIFEST_SCHEMA, TRAY_SOURCE_PATH, TRAY_VARIANT_PATHS, manifestToBrandTheme, parseBrandManifest, parsePartialBrandManifest } from './chunk-I3RBZK2G.js';
|
|
2
2
|
//# sourceMappingURL=manifest.js.map
|
|
3
3
|
//# sourceMappingURL=manifest.js.map
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { OemActionApi, OemActionDescriptor, OemActionHandler, OemActionHost, OemActionName, OemActionRegistration, OemActionTranslate, OemEntry, OemRegisterOptions, OemSdkApi, OemSlotApi, OemSlotName, OemSlotProps, OemWorkbenchView, applyOemEntry, createOemActionHost, createRestrictedOemApi, createUnavailableActionApi } from './index.js';
|
|
2
2
|
export { DictionaryValidationResult, LocaleDictionary, TranslationValues, Translator, createTranslator, validateDictionary } from '@orbit-work/ui/locale';
|
|
3
|
-
export { BRAND_MANIFEST_SCHEMA, BrandAssets, BrandIdentity, BrandLocaleSources, BrandManifest, BrandManifestParseOptions, BrandManifestValidationResult, BrandNetworkAccess, BrandPermissions, BrandSlotName, BrandTypography, PartialBrandAssets, PartialBrandIdentity, PartialBrandManifest, PartialBrandManifestValidationResult, PartialLocalizedBranding, SlotContribution, manifestToBrandTheme, parseBrandManifest, parsePartialBrandManifest } from './manifest.js';
|
|
4
|
-
export { BrandTheme, LocalizedBranding, TenantBranding, TenantTheme, UnifiedTheme, UnifiedThemeToken } from '@orbit-work/ui/appearance';
|
|
3
|
+
export { BRAND_MANIFEST_SCHEMA, BrandAssets, BrandIdentity, BrandLocaleSources, BrandManifest, BrandManifestParseOptions, BrandManifestTheme, BrandManifestValidationResult, BrandNetworkAccess, BrandPermissions, BrandSlotName, BrandTypography, PartialBrandAssets, PartialBrandIdentity, PartialBrandManifest, PartialBrandManifestValidationResult, PartialLocalizedBranding, SlotContribution, TRAY_SOURCE_PATH, TRAY_VARIANT_PATHS, TrayVariants, manifestToBrandTheme, parseBrandManifest, parsePartialBrandManifest } from './manifest.js';
|
|
4
|
+
export { BrandTheme, LocalizedBranding, LoginAppearance, TenantBranding, TenantTheme, UnifiedTheme, UnifiedThemeToken } from '@orbit-work/ui/appearance';
|
|
5
5
|
export { SlotCore, SlotRenderer } from '@orbit-work/ui/slot/core';
|
package/dist/runtime.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { applyOemEntry, createOemActionHost, createRestrictedOemApi, createTranslator, createUnavailableActionApi, validateDictionary } from './chunk-
|
|
2
|
-
export { BRAND_MANIFEST_SCHEMA, manifestToBrandTheme, parseBrandManifest, parsePartialBrandManifest } from './chunk-
|
|
1
|
+
export { applyOemEntry, createOemActionHost, createRestrictedOemApi, createTranslator, createUnavailableActionApi, validateDictionary } from './chunk-C4G3TUO6.js';
|
|
2
|
+
export { BRAND_MANIFEST_SCHEMA, TRAY_SOURCE_PATH, TRAY_VARIANT_PATHS, manifestToBrandTheme, parseBrandManifest, parsePartialBrandManifest } from './chunk-I3RBZK2G.js';
|
|
3
3
|
//# sourceMappingURL=runtime.js.map
|
|
4
4
|
//# sourceMappingURL=runtime.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orbit-work/oem-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Public contracts and build-time audit tools for Orbitwork OEM extensions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"schema"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@orbit-work/ui": "0.
|
|
44
|
+
"@orbit-work/ui": "0.2.9",
|
|
45
45
|
"es-module-lexer": "^2.3.2",
|
|
46
46
|
"esbuild": "^0.27.7"
|
|
47
47
|
},
|
|
@@ -38,13 +38,21 @@
|
|
|
38
38
|
"appId": {
|
|
39
39
|
"type": "string",
|
|
40
40
|
"maxLength": 160,
|
|
41
|
-
"pattern": "^[A-Za-z][A-Za-z0-9]*(\\.[A-Za-z0-9][A-Za-z0-9-]*)
|
|
42
|
-
"not": {
|
|
41
|
+
"pattern": "^[A-Za-z][A-Za-z0-9]*(\\.[A-Za-z0-9][A-Za-z0-9-]*){2,}$",
|
|
42
|
+
"not": {
|
|
43
|
+
"enum": [
|
|
44
|
+
"com.orbitwork.desktop",
|
|
45
|
+
"com.orbitwork.desktop-debug",
|
|
46
|
+
"com.orbitwork.desktop-oem-devhost",
|
|
47
|
+
"com.orbitwork.desktop-oem-devhost.sandbox",
|
|
48
|
+
"com.orbitwork.desktop-oem-devhost.workbench"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
43
51
|
},
|
|
44
52
|
"versionChannel": {
|
|
45
53
|
"allOf": [
|
|
46
54
|
{ "$ref": "#/$defs/kebabId" },
|
|
47
|
-
{ "not": { "enum": ["stable", "
|
|
55
|
+
{ "not": { "enum": ["stable", "debug", "latest", "desktop", "macos", "windows", "linux"] } }
|
|
48
56
|
]
|
|
49
57
|
},
|
|
50
58
|
"protocolScheme": {
|
|
@@ -80,6 +88,20 @@
|
|
|
80
88
|
"userDataNamespace": { "$ref": "#/$defs/kebabId" }
|
|
81
89
|
}
|
|
82
90
|
},
|
|
91
|
+
"theme": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": ["primary"],
|
|
95
|
+
"description": "OEM color input (D-191 / D-192): every primary role derives from primary; signal is optional (defaults to #0091E0).",
|
|
96
|
+
"properties": {
|
|
97
|
+
"primary": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
|
|
98
|
+
"signal": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
|
|
99
|
+
"allowDangerHue": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"description": "OEM sign-off for a primary whose hue sits next to danger (D-192 build check)."
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
83
105
|
"tokens": {
|
|
84
106
|
"type": "object",
|
|
85
107
|
"additionalProperties": false,
|
|
@@ -103,6 +125,29 @@
|
|
|
103
125
|
"enum": [0.9, 1, 1.1, 1.2],
|
|
104
126
|
"description": "OEM text-size preset; the personal font-scale preference and user skins still win."
|
|
105
127
|
},
|
|
128
|
+
"appearance": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"properties": {
|
|
132
|
+
"homeBackdrop": {
|
|
133
|
+
"type": "boolean",
|
|
134
|
+
"description": "Whether Orbit's decorative ring backdrop appears on the empty home screen. Defaults to hidden for a custom OEM brand."
|
|
135
|
+
},
|
|
136
|
+
"login": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"properties": {
|
|
140
|
+
"claimColor": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$", "maxLength": 7 },
|
|
141
|
+
"claimNoteColor": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$", "maxLength": 7 },
|
|
142
|
+
"accentColor": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$", "maxLength": 7 },
|
|
143
|
+
"scrim": {
|
|
144
|
+
"type": "boolean",
|
|
145
|
+
"description": "Black scrim under copy on a loaded KV. Defaults to true; set false for copy on a light image."
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
106
151
|
"assets": {
|
|
107
152
|
"type": "object",
|
|
108
153
|
"additionalProperties": false,
|
|
@@ -114,7 +159,11 @@
|
|
|
114
159
|
},
|
|
115
160
|
"tray": {
|
|
116
161
|
"allOf": [{ "$ref": "#/$defs/packagePath" }],
|
|
117
|
-
"description": "
|
|
162
|
+
"description": "Legacy square PNG or JPEG source. When trayVariants is present this must be ./assets/tray-source.png (128x128); otherwise the legacy build normalizes it to 44x44."
|
|
163
|
+
},
|
|
164
|
+
"trayVariants": {
|
|
165
|
+
"$ref": "#/$defs/trayVariants",
|
|
166
|
+
"description": "Atomic platform-ready tray set. Paths and dimensions are canonical and audited; no build-time crop or resize is applied."
|
|
118
167
|
},
|
|
119
168
|
"logo": {
|
|
120
169
|
"allOf": [{ "$ref": "#/$defs/packagePath" }],
|
|
@@ -124,7 +173,16 @@
|
|
|
124
173
|
"allOf": [{ "$ref": "#/$defs/packagePath" }],
|
|
125
174
|
"description": "Optional login key-visual photo (PNG, JPEG, or WebP) for the desktop login page background."
|
|
126
175
|
}
|
|
127
|
-
}
|
|
176
|
+
},
|
|
177
|
+
"allOf": [
|
|
178
|
+
{
|
|
179
|
+
"if": { "required": ["trayVariants"] },
|
|
180
|
+
"then": {
|
|
181
|
+
"required": ["tray"],
|
|
182
|
+
"properties": { "tray": { "const": "./assets/tray-source.png" } }
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
]
|
|
128
186
|
},
|
|
129
187
|
"branding": {
|
|
130
188
|
"type": "object",
|
|
@@ -169,6 +227,47 @@
|
|
|
169
227
|
"nonEmpty": { "type": "string", "minLength": 1 },
|
|
170
228
|
"kebabId": { "type": "string", "maxLength": 64, "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
|
|
171
229
|
"packagePath": { "type": "string", "maxLength": 240, "pattern": "^\\./(?!.*(?:^|/)\\.\\.(?:/|$))[^\\\\]+$" },
|
|
230
|
+
"trayVariants": {
|
|
231
|
+
"type": "object",
|
|
232
|
+
"additionalProperties": false,
|
|
233
|
+
"required": ["macos", "windows", "linux"],
|
|
234
|
+
"properties": {
|
|
235
|
+
"macos": {
|
|
236
|
+
"type": "object",
|
|
237
|
+
"additionalProperties": false,
|
|
238
|
+
"required": ["1x", "2x"],
|
|
239
|
+
"properties": {
|
|
240
|
+
"1x": { "const": "./macos/trayTemplate.png" },
|
|
241
|
+
"2x": { "const": "./macos/trayTemplate@2x.png" }
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"windows": {
|
|
245
|
+
"type": "object",
|
|
246
|
+
"additionalProperties": false,
|
|
247
|
+
"required": ["16", "20", "24", "32"],
|
|
248
|
+
"properties": {
|
|
249
|
+
"16": { "const": "./windows/tray-16.png" },
|
|
250
|
+
"20": { "const": "./windows/tray-20.png" },
|
|
251
|
+
"24": { "const": "./windows/tray-24.png" },
|
|
252
|
+
"32": { "const": "./windows/tray-32.png" }
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"linux": {
|
|
256
|
+
"type": "object",
|
|
257
|
+
"additionalProperties": false,
|
|
258
|
+
"required": ["16", "22", "24", "32", "48", "64", "128"],
|
|
259
|
+
"properties": {
|
|
260
|
+
"16": { "const": "./linux/tray-16.png" },
|
|
261
|
+
"22": { "const": "./linux/tray-22.png" },
|
|
262
|
+
"24": { "const": "./linux/tray-24.png" },
|
|
263
|
+
"32": { "const": "./linux/tray-32.png" },
|
|
264
|
+
"48": { "const": "./linux/tray-48.png" },
|
|
265
|
+
"64": { "const": "./linux/tray-64.png" },
|
|
266
|
+
"128": { "const": "./linux/tray-128.png" }
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
172
271
|
"color": { "type": "string", "pattern": "^#(?:[0-9A-Fa-f]{3,4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$" },
|
|
173
272
|
"tokenMode": {
|
|
174
273
|
"type": "object",
|
|
@@ -186,9 +285,7 @@
|
|
|
186
285
|
"--ow-btn-primary-hover": { "$ref": "#/$defs/color" },
|
|
187
286
|
"--ow-btn-primary-press": { "$ref": "#/$defs/color" },
|
|
188
287
|
"--ow-btn-primary-fg": { "$ref": "#/$defs/color" },
|
|
189
|
-
"--ow-
|
|
190
|
-
"--ow-beacon-idle": { "$ref": "#/$defs/color" },
|
|
191
|
-
"--ow-accent-dot": { "$ref": "#/$defs/color" },
|
|
288
|
+
"--ow-signal": { "$ref": "#/$defs/color" },
|
|
192
289
|
"--ow-data-today": { "$ref": "#/$defs/color" }
|
|
193
290
|
},
|
|
194
291
|
"allOf": [
|
|
@@ -225,9 +322,7 @@
|
|
|
225
322
|
{ "required": ["--ow-btn-primary-hover"] },
|
|
226
323
|
{ "required": ["--ow-btn-primary-press"] },
|
|
227
324
|
{ "required": ["--ow-btn-primary-fg"] },
|
|
228
|
-
{ "required": ["--ow-
|
|
229
|
-
{ "required": ["--ow-beacon-idle"] },
|
|
230
|
-
{ "required": ["--ow-accent-dot"] },
|
|
325
|
+
{ "required": ["--ow-signal"] },
|
|
231
326
|
{ "required": ["--ow-data-today"] }
|
|
232
327
|
]
|
|
233
328
|
},
|
|
@@ -237,9 +332,7 @@
|
|
|
237
332
|
"--ow-btn-primary-hover",
|
|
238
333
|
"--ow-btn-primary-press",
|
|
239
334
|
"--ow-btn-primary-fg",
|
|
240
|
-
"--ow-
|
|
241
|
-
"--ow-beacon-idle",
|
|
242
|
-
"--ow-accent-dot",
|
|
335
|
+
"--ow-signal",
|
|
243
336
|
"--ow-data-today"
|
|
244
337
|
]
|
|
245
338
|
}
|
|
@@ -250,10 +343,15 @@
|
|
|
250
343
|
"type": "object",
|
|
251
344
|
"additionalProperties": false,
|
|
252
345
|
"required": ["productName", "companyName"],
|
|
346
|
+
"dependentRequired": { "claimHighlight": ["claim"] },
|
|
253
347
|
"properties": {
|
|
254
348
|
"productName": { "allOf": [{ "$ref": "#/$defs/nonEmpty" }, { "maxLength": 64 }] },
|
|
255
349
|
"companyName": { "allOf": [{ "$ref": "#/$defs/nonEmpty" }, { "maxLength": 80 }] },
|
|
256
350
|
"claim": { "allOf": [{ "$ref": "#/$defs/nonEmpty" }, { "maxLength": 40 }] },
|
|
351
|
+
"claimHighlight": {
|
|
352
|
+
"allOf": [{ "$ref": "#/$defs/nonEmpty" }, { "maxLength": 40 }],
|
|
353
|
+
"description": "Exact substring of claim to emphasize. Only its first occurrence is highlighted."
|
|
354
|
+
},
|
|
257
355
|
"claimNote": { "allOf": [{ "$ref": "#/$defs/nonEmpty" }, { "maxLength": 48 }] },
|
|
258
356
|
"slogan": { "allOf": [{ "$ref": "#/$defs/nonEmpty" }, { "maxLength": 68 }] }
|
|
259
357
|
}
|
|
@@ -318,7 +416,18 @@
|
|
|
318
416
|
"required": ["key"],
|
|
319
417
|
"properties": {
|
|
320
418
|
"key": {
|
|
321
|
-
"enum": [
|
|
419
|
+
"enum": [
|
|
420
|
+
"general",
|
|
421
|
+
"appearance",
|
|
422
|
+
"usage",
|
|
423
|
+
"models",
|
|
424
|
+
"auth",
|
|
425
|
+
"security",
|
|
426
|
+
"assistant",
|
|
427
|
+
"memory",
|
|
428
|
+
"keys",
|
|
429
|
+
"about"
|
|
430
|
+
]
|
|
322
431
|
}
|
|
323
432
|
},
|
|
324
433
|
"not": { "anyOf": [{ "required": ["id"] }, { "required": ["order"] }] }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/manifest.ts"],"names":[],"mappings":";;;;AAgBO,IAAM,qBAAA,GAAwB;AA6IrC,IAAM,SAAA,uBAAgB,GAAA,CAAI;AAAA,EACxB,SAAA;AAAA,EACA,IAAA;AAAA,EACA,aAAA;AAAA,EACA,eAAA;AAAA,EACA,UAAA;AAAA,EACA,aAAA;AAAA,EACA,OAAA;AAAA,EACA,UAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,E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AAS,MAAA,CAAO,IAAA;AAAA,IACtB,GAAI,QAAA,CAAS,MAAA,CAAO,OAAA,GAAU,EAAE,SAAS,QAAA,CAAS,MAAA,CAAO,OAAA,EAAQ,GAAI,EAAC;AAAA,IACtE,KAAA,EAAO,QAAA,CAAS,MAAA,IAAU,EAAC;AAAA,IAC3B,GAAI,SAAS,UAAA,GAAa,EAAE,YAAY,QAAA,CAAS,UAAA,KAAe,EAAC;AAAA,IACjE,GAAI,SAAS,SAAA,GAAY,EAAE,WAAW,QAAA,CAAS,SAAA,KAAc,EAAC;AAAA,IAC9D,UAAU,QAAA,CAAS;AAAA,GACrB;AACF","file":"chunk-ZOURSTKZ.js","sourcesContent":["import {\n BRAND_ACTION_TOKENS,\n type BrandTheme,\n type BrandThemeToken,\n type LocalizedBranding,\n type OrbitworkFontScale,\n type TenantBranding,\n UNIFIED_NEUTRAL_TOKENS,\n ds2ContrastRatio,\n isOrbitworkFontScale,\n ORBITWORK_FONT_SCALES,\n} from \"@orbit-work/ui/appearance\"\nimport { type SlotKind, WORKBENCH_KEYED_SLOT_KEYS, WORKBENCH_SLOT_DECLARATIONS } from \"@orbit-work/ui/slot/core\"\n\nexport type BrandSlotName = keyof typeof WORKBENCH_SLOT_DECLARATIONS\n\nexport const BRAND_MANIFEST_SCHEMA = \"@orbit-work/oem-sdk/manifest@1\" as const\n\nexport type BrandIdentity = {\n productName: string\n appId: string\n versionChannel: string\n protocolScheme: string\n /**\n * Optional override for the per-installation user data directory namespace.\n * Managed builds default to the identity appId; workspace packages derive\n * storage from appId and omit this field.\n */\n userDataNamespace?: string\n}\n\n/** Upload-time brand manifest: every field optional, filled fields fully validated. */\nexport type PartialBrandIdentity = { [Key in keyof BrandIdentity]?: BrandIdentity[Key] }\n\nexport type PartialBrandAssets = { [Key in keyof BrandAssets]?: BrandAssets[Key] }\n\nexport type PartialLocalizedBranding = Record<string, Partial<TenantBranding>>\n\nexport type PartialBrandManifest = {\n $schema?: typeof BRAND_MANIFEST_SCHEMA\n id?: string\n /** Installer package description (electron-builder `description`). */\n description?: string\n /** Assistant display name in chat copy; defaults to the branding productName. */\n assistantName?: string\n /** Product homepage packaged into installer metadata. */\n homepage?: string\n /** OS permission prompts overridden by the OEM. */\n permissions?: BrandPermissions\n entry?: string\n identity?: PartialBrandIdentity\n tokens?: BrandManifest[\"tokens\"]\n /** OEM font stacks; user skins and the tenant theme still win at runtime. */\n typography?: BrandTypography\n /** OEM text-size preset; the personal preference and user skins still win. */\n fontScale?: OrbitworkFontScale\n assets?: PartialBrandAssets\n branding?: PartialLocalizedBranding\n locales?: BrandLocaleSources\n network?: BrandNetworkAccess\n contributes?: { slots: SlotContribution[] }\n}\n\nexport type PartialBrandManifestValidationResult =\n | { ok: true; manifest: PartialBrandManifest }\n | { ok: false; error: string }\n\nexport type BrandAssets = {\n appIcon: string\n tray?: string\n logo: string\n /** Optional login key-visual photo (KV board background on the desktop login page). */\n loginKV?: string\n}\n\nexport type BrandLocaleSources = Record<string, string>\n\n/** OEM typography override; both stacks are CSS font-family values. */\nexport type BrandTypography = {\n fontSans: string\n fontMono: string\n}\n\nexport type BrandNetworkAccess = {\n /** Exact production HTTPS origins added to the packaged renderer connect-src. */\n allowedOrigins: string[]\n}\n\nexport type BrandPermissions = {\n /** macOS microphone prompt (Info.plist NSMicrophoneUsageDescription), written in the OEM's own language. */\n microphoneUsage: string\n}\n\ntype SlotNameOfKind<Kind extends SlotKind> = {\n [Name in BrandSlotName]: (typeof WORKBENCH_SLOT_DECLARATIONS)[Name][\"kind\"] extends Kind ? Name : never\n}[BrandSlotName]\n\ntype SlotContributionBase<Name extends BrandSlotName> = {\n name: Name\n}\n\ntype SingleSlotContribution = {\n [Name in SlotNameOfKind<\"single\">]: SlotContributionBase<Name>\n}[SlotNameOfKind<\"single\">]\n\ntype ListSlotContribution = {\n [Name in SlotNameOfKind<\"list\">]: SlotContributionBase<Name> & { id: string; order: number }\n}[SlotNameOfKind<\"list\">]\n\ntype KeyedSlotName = Extract<keyof typeof WORKBENCH_KEYED_SLOT_KEYS, BrandSlotName>\ntype KeyedSlotContribution = {\n [Name in KeyedSlotName]: SlotContributionBase<Name> & {\n key: (typeof WORKBENCH_KEYED_SLOT_KEYS)[Name][number]\n }\n}[KeyedSlotName]\n\nexport type SlotContribution = SingleSlotContribution | ListSlotContribution | KeyedSlotContribution\n\nexport type BrandManifest = {\n $schema: typeof BRAND_MANIFEST_SCHEMA\n id: string\n /** Installer package description (electron-builder `description`). */\n description?: string\n /** Assistant display name in chat copy; defaults to the branding productName. */\n assistantName?: string\n /** Product homepage packaged into installer metadata. */\n homepage?: string\n /** OS permission prompts overridden by the OEM. */\n permissions?: BrandPermissions\n entry?: string\n identity: BrandIdentity\n tokens?: Partial<Record<\"light\" | \"dark\", Partial<Record<BrandThemeToken, string>>>>\n typography?: BrandTypography\n /** OEM text-size preset; the personal font-scale preference and user skins still win. */\n fontScale?: OrbitworkFontScale\n assets: BrandAssets\n branding: LocalizedBranding\n /** Package-relative dictionaries owned by this OEM namespace. en-US is the required fallback. */\n locales?: BrandLocaleSources\n network?: BrandNetworkAccess\n contributes?: {\n slots: SlotContribution[]\n }\n}\n\nexport type BrandManifestParseOptions = {\n /**\n * Platform builds accept manifests resolved from the managed OEM pipeline:\n * every shape/format/safety check stays in force, only the workspace\n * namespacing bindings are relaxed (productName/versionChannel/protocolScheme\n * must equal id, appId must end with .oem.<id>, reserved feed channels).\n */\n platform?: boolean\n}\n\nexport type BrandManifestValidationResult = { ok: true; manifest: BrandManifest } | { ok: false; error: string }\n\nconst ROOT_KEYS = new Set([\n \"$schema\",\n \"id\",\n \"description\",\n \"assistantName\",\n \"homepage\",\n \"permissions\",\n \"entry\",\n \"identity\",\n \"tokens\",\n \"typography\",\n \"fontScale\",\n \"assets\",\n \"branding\",\n \"locales\",\n \"network\",\n \"contributes\",\n])\nconst IDENTITY_KEYS = new Set([\"productName\", \"appId\", \"versionChannel\", \"protocolScheme\", \"userDataNamespace\"])\nconst ASSET_KEYS = new Set([\"appIcon\", \"tray\", \"logo\", \"loginKV\"])\nconst MODE_KEYS = new Set([\"light\", \"dark\"])\nconst CONTRIBUTES_KEYS = new Set([\"slots\"])\nconst NETWORK_KEYS = new Set([\"allowedOrigins\"])\nconst PERMISSIONS_KEYS = new Set([\"microphoneUsage\"])\nconst TYPOGRAPHY_KEYS = new Set([\"fontSans\", \"fontMono\"])\nconst BRANDING_KEYS = new Set([\"productName\", \"companyName\", \"claim\", \"claimNote\", \"slogan\"])\nconst SLOT_COMMON_KEYS = new Set([\"name\"])\nconst BRAND_TOKEN_NAMES = new Set<string>([...UNIFIED_NEUTRAL_TOKENS, ...BRAND_ACTION_TOKENS])\nconst SLOT_DECLARATIONS = WORKBENCH_SLOT_DECLARATIONS as Readonly<Record<string, { kind: SlotKind }>>\nconst HEX = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i\nconst KEBAB_ID = /^[a-z0-9]+(?:-[a-z0-9]+)*$/\nconst APP_ID = /^[a-zA-Z][a-zA-Z0-9]*(?:\\.[a-zA-Z0-9][a-zA-Z0-9-]*){2,}$/\nconst PROTOCOL_SCHEME = /^[a-z][a-z0-9+.-]*$/\nconst SOURCE_ENTRY = /^\\.\\/src\\/.+\\.(?:[cm]?js|[jt]sx?)$/\nconst WINDOWS_DEVICE_NAME = /^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\\..*)?$/i\nconst OFFICIAL_APP_ID = \"ai.orbit.desktop\"\nconst OFFICIAL_PRODUCT_NAMES = new Set([\"orbitwork\"])\nconst RESERVED_VERSION_CHANNELS = new Set([\n \"stable\",\n \"preview\",\n \"uat\",\n \"latest\",\n \"desktop\",\n \"macos\",\n \"windows\",\n \"linux\",\n])\nconst RESERVED_PROTOCOL_SCHEMES = new Set([\n \"about\",\n \"blob\",\n \"chrome\",\n \"chrome-extension\",\n \"data\",\n \"devtools\",\n \"electron\",\n \"file\",\n \"ftp\",\n \"geo\",\n \"http\",\n \"https\",\n \"javascript\",\n \"mailto\",\n \"orbit\",\n \"sms\",\n \"tel\",\n \"urn\",\n \"ws\",\n \"wss\",\n])\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === \"object\" && !Array.isArray(value)\n}\n\nfunction hasUnsafeProductNameCharacter(value: string): boolean {\n return [...value].some((character) => {\n const code = character.charCodeAt(0)\n return code <= 31 || code === 127 || '<>:\"/\\\\|?*'.includes(character)\n })\n}\n\nfunction productNameNamespace(value: string): string {\n return value\n .normalize(\"NFKD\")\n .replace(/\\p{M}+/gu, \"\")\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")\n}\n\nfunction assertKnownKeys(value: Record<string, unknown>, allowed: Set<string>, path: string): void {\n const unknown = Object.keys(value).find((key) => !allowed.has(key))\n if (unknown) throw new Error(`${path} contains unsupported field: ${unknown}`)\n}\n\nfunction text(value: unknown, path: string, limit = 100): string {\n if (typeof value !== \"string\" || !value.trim()) throw new Error(`${path} must be a non-empty string`)\n const result = value.trim()\n if (result.length > limit) throw new Error(`${path} exceeds ${limit} characters`)\n return result\n}\n\nfunction canonicalLocale(value: string, path: string): string {\n try {\n const locale = Intl.getCanonicalLocales(value)[0]\n if (!locale || locale !== value) throw new Error()\n return locale\n } catch {\n throw new Error(`${path} must be a canonical BCP 47 locale`)\n }\n}\n\nfunction relativePath(value: unknown, path: string): string {\n const result = text(value, path, 240)\n if (!result.startsWith(\"./\") || result.includes(\"\\\\\") || result.split(\"/\").includes(\"..\")) {\n throw new Error(`${path} must be a package-relative ./ path without traversal`)\n }\n return result\n}\n\nfunction parseIdentity(value: unknown, id: string, platform: boolean): BrandIdentity {\n if (!isRecord(value)) throw new Error(\"identity must be an object\")\n assertKnownKeys(value, IDENTITY_KEYS, \"identity\")\n const productName = text(value.productName, \"identity.productName\", 64)\n const appId = text(value.appId, \"identity.appId\", 160)\n const versionChannel = text(value.versionChannel, \"identity.versionChannel\", 64)\n const protocolScheme = text(value.protocolScheme, \"identity.protocolScheme\", 64)\n if (value.userDataNamespace !== undefined && !KEBAB_ID.test(text(value.userDataNamespace, \"identity.userDataNamespace\", 64))) {\n throw new Error(\"identity.userDataNamespace must be lowercase kebab-case\")\n }\n if (!APP_ID.test(appId)) throw new Error(\"identity.appId must be a reverse-DNS identifier\")\n if (!KEBAB_ID.test(versionChannel)) throw new Error(\"identity.versionChannel must be kebab-case\")\n // Managed platform builds assign the update channel from the frozen build\n // input; reserved feed names and the == id binding only police workspace\n // packages, where collisions would merge OEM feeds.\n if (!platform && RESERVED_VERSION_CHANNELS.has(versionChannel)) {\n throw new Error(`identity.versionChannel is reserved: ${versionChannel}`)\n }\n if (!PROTOCOL_SCHEME.test(protocolScheme)) {\n throw new Error(\"identity.protocolScheme must be a lowercase URI scheme beginning with a letter\")\n }\n if (RESERVED_PROTOCOL_SCHEMES.has(protocolScheme)) {\n throw new Error(`identity.protocolScheme is reserved: ${protocolScheme}`)\n }\n if (\n hasUnsafeProductNameCharacter(productName) ||\n /[. ]$/.test(productName) ||\n productName === \".\" ||\n productName === \"..\" ||\n WINDOWS_DEVICE_NAME.test(productName)\n ) {\n throw new Error(\"identity.productName must be safe for macOS, Windows, Linux, and release artifact paths\")\n }\n if (OFFICIAL_PRODUCT_NAMES.has(productName.toLowerCase())) {\n throw new Error(`identity.productName is reserved for the official application: ${productName}`)\n }\n if (appId === OFFICIAL_APP_ID) {\n throw new Error(`identity.appId is reserved for the official application: ${appId}`)\n }\n if (!platform && productNameNamespace(productName) !== id) {\n throw new Error(\"identity.productName must normalize to manifest id so installation names cannot collide\")\n }\n if (!platform && versionChannel !== id) {\n throw new Error(\"identity.versionChannel must equal manifest id to keep OEM update feeds namespaced\")\n }\n if (!platform && protocolScheme !== id) {\n throw new Error(\"identity.protocolScheme must equal manifest id to keep OEM deep links namespaced\")\n }\n if (!platform && !appId.endsWith(`.oem.${id}`)) {\n throw new Error(\"identity.appId must end with .oem.<manifest id> to isolate installation and user data\")\n }\n return {\n productName,\n appId,\n versionChannel,\n protocolScheme,\n ...(value.userDataNamespace !== undefined ? { userDataNamespace: text(value.userDataNamespace, \"identity.userDataNamespace\", 64) } : {}),\n }\n}\n\nfunction parseAssets(value: unknown): BrandAssets {\n if (!isRecord(value)) throw new Error(\"assets must be an object\")\n assertKnownKeys(value, ASSET_KEYS, \"assets\")\n const tray = value.tray === undefined ? undefined : relativePath(value.tray, \"assets.tray\")\n const loginKV =\n value.loginKV === undefined ? undefined : relativePath(value.loginKV, \"assets.loginKV\")\n return {\n appIcon: relativePath(value.appIcon, \"assets.appIcon\"),\n ...(tray ? { tray } : {}),\n logo: relativePath(value.logo, \"assets.logo\"),\n ...(loginKV ? { loginKV } : {}),\n }\n}\n\nfunction parsePartialAssets(value: unknown): PartialBrandAssets {\n if (!isRecord(value)) throw new Error(\"assets must be an object\")\n assertKnownKeys(value, ASSET_KEYS, \"assets\")\n return {\n ...(value.appIcon !== undefined ? { appIcon: relativePath(value.appIcon, \"assets.appIcon\") } : {}),\n ...(value.logo !== undefined ? { logo: relativePath(value.logo, \"assets.logo\") } : {}),\n ...(value.tray !== undefined ? { tray: relativePath(value.tray, \"assets.tray\") } : {}),\n ...(value.loginKV !== undefined\n ? { loginKV: relativePath(value.loginKV, \"assets.loginKV\") }\n : {}),\n }\n}\n\nfunction parseBrandCopy(value: unknown, path: string): TenantBranding {\n if (!isRecord(value)) throw new Error(`${path} must be an object`)\n assertKnownKeys(value, BRANDING_KEYS, path)\n const result: TenantBranding = {\n productName: text(value.productName, `${path}.productName`, 64),\n companyName: text(value.companyName, `${path}.companyName`, 80),\n }\n for (const [key, limit] of [\n [\"claim\", 40],\n [\"claimNote\", 48],\n [\"slogan\", 68],\n ] as const) {\n if (value[key] !== undefined) result[key] = text(value[key], `${path}.${key}`, limit)\n }\n return result\n}\n\nfunction parseBranding(value: unknown): LocalizedBranding {\n if (!isRecord(value)) throw new Error(\"branding must be a locale map\")\n const result: LocalizedBranding = {}\n for (const [rawLocale, copy] of Object.entries(value)) {\n const locale = canonicalLocale(rawLocale, `branding.${rawLocale}`)\n result[locale] = parseBrandCopy(copy, `branding.${locale}`)\n }\n if (!result[\"en-US\"]) throw new Error(\"branding.en-US is required\")\n return result\n}\n\nfunction parseLocales(value: unknown): BrandLocaleSources | undefined {\n if (value === undefined) return undefined\n if (!isRecord(value)) throw new Error(\"locales must be a locale map\")\n const result: BrandLocaleSources = {}\n for (const [rawLocale, source] of Object.entries(value)) {\n const locale = canonicalLocale(rawLocale, `locales.${rawLocale}`)\n result[locale] = relativePath(source, `locales.${locale}`)\n }\n if (!result[\"en-US\"]) throw new Error(\"locales.en-US is required when locales are declared\")\n return result\n}\n\nfunction isDevelopmentHostname(hostname: string): boolean {\n const lower = hostname.toLowerCase()\n if (lower === \"localhost\" || lower.endsWith(\".localhost\") || lower.endsWith(\".local\")) return true\n if ([\"::1\", \"[::1]\"].includes(lower) || /^(?:fc|fd|fe8|fe9|fea|feb)/.test(lower.replace(/[\\[\\]]/g, \"\"))) {\n return true\n }\n const ipv4 = lower\n .match(/^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/)\n ?.slice(1)\n .map(Number)\n if (ipv4) {\n const [a, b] = ipv4\n if (\n a === 0 ||\n a === 10 ||\n a === 127 ||\n (a === 169 && b === 254) ||\n (a === 172 && b! >= 16 && b! <= 31) ||\n (a === 192 && b === 168)\n ) {\n return true\n }\n }\n return lower\n .split(/[.-]/)\n .some((label) => [\"dev\", \"development\", \"test\", \"testing\", \"stage\", \"staging\", \"uat\"].includes(label))\n}\n\nfunction parseNetwork(value: unknown): BrandNetworkAccess | undefined {\n if (value === undefined) return undefined\n if (!isRecord(value)) throw new Error(\"network must be an object\")\n assertKnownKeys(value, NETWORK_KEYS, \"network\")\n if (!Array.isArray(value.allowedOrigins) || value.allowedOrigins.length === 0) {\n throw new Error(\"network.allowedOrigins must be a non-empty array\")\n }\n const allowedOrigins = value.allowedOrigins.map((raw, index) => {\n const path = `network.allowedOrigins[${index}]`\n const origin = text(raw, path, 240)\n let parsed: URL\n try {\n parsed = new URL(origin)\n } catch {\n throw new Error(`${path} must be an exact HTTPS origin`)\n }\n if (\n parsed.protocol !== \"https:\" ||\n parsed.username ||\n parsed.password ||\n parsed.pathname !== \"/\" ||\n parsed.search ||\n parsed.hash ||\n parsed.origin !== origin\n ) {\n throw new Error(`${path} must be a canonical exact HTTPS origin without credentials, path, query, or fragment`)\n }\n if (isDevelopmentHostname(parsed.hostname)) {\n throw new Error(`${path} must be a production origin, not localhost, private network, dev, test, staging, or UAT`)\n }\n return origin\n })\n if (new Set(allowedOrigins).size !== allowedOrigins.length) {\n throw new Error(\"network.allowedOrigins must not contain duplicates\")\n }\n return { allowedOrigins }\n}\n\nfunction parseHomepage(value: unknown): string {\n const homepage = text(value, \"homepage\", 200)\n let parsed: URL\n try {\n parsed = new URL(homepage)\n } catch {\n throw new Error(\"homepage must be an https URL\")\n }\n if (parsed.protocol !== \"https:\" || !parsed.hostname) {\n throw new Error(\"homepage must be an https URL\")\n }\n return homepage\n}\n\nfunction parsePermissions(value: unknown): BrandPermissions {\n if (!isRecord(value)) throw new Error(\"permissions must be an object\")\n assertKnownKeys(value, PERMISSIONS_KEYS, \"permissions\")\n return { microphoneUsage: text(value.microphoneUsage, \"permissions.microphoneUsage\", 120) }\n}\n\nfunction parseModeTokens(value: unknown, path: string): Partial<Record<BrandThemeToken, string>> { if (!isRecord(value)) throw new Error(`${path} must be an object`)\n const result: Partial<Record<BrandThemeToken, string>> = {}\n for (const [name, raw] of Object.entries(value)) {\n if (!BRAND_TOKEN_NAMES.has(name)) throw new Error(`${path} contains forbidden token: ${name}`)\n if (typeof raw !== \"string\" || !HEX.test(raw)) throw new Error(`${path}.${name} must be a hex color`)\n result[name as BrandThemeToken] = raw.toLowerCase()\n }\n\n const touchedNeutral = UNIFIED_NEUTRAL_TOKENS.some((name) => result[name] !== undefined)\n if (touchedNeutral) {\n const missing = UNIFIED_NEUTRAL_TOKENS.filter((name) => result[name] === undefined)\n if (missing.length) throw new Error(`${path} neutral group is incomplete: ${missing.join(\", \")}`)\n for (const textToken of [\"--ow-text\", \"--ow-text-2\"] as const) {\n for (const surfaceToken of [\"--ow-bg\", \"--ow-surface\", \"--ow-surface-2\"] as const) {\n const ratio = ds2ContrastRatio(result[textToken] as string, result[surfaceToken] as string)\n if (ratio < 4.5) {\n throw new Error(\n `${path} contrast ${textToken} on ${surfaceToken} is ${ratio.toFixed(2)}:1; expected >= 4.5:1`,\n )\n }\n }\n }\n }\n\n const touchedAction = BRAND_ACTION_TOKENS.some((name) => result[name] !== undefined)\n if (touchedAction) {\n const missing = BRAND_ACTION_TOKENS.filter((name) => result[name] === undefined)\n if (missing.length) throw new Error(`${path} action pole group is incomplete: ${missing.join(\", \")}`)\n for (const background of [\"--ow-btn-primary-bg\", \"--ow-btn-primary-hover\", \"--ow-btn-primary-press\"] as const) {\n const ratio = ds2ContrastRatio(result[background] as string, result[\"--ow-btn-primary-fg\"] as string)\n if (ratio < 4.5) {\n throw new Error(\n `${path} contrast --ow-btn-primary-fg on ${background} is ${ratio.toFixed(2)}:1; expected >= 4.5:1`,\n )\n }\n }\n }\n return result\n}\n\nfunction parseTokens(value: unknown): BrandManifest[\"tokens\"] {\n if (value === undefined) return undefined\n if (!isRecord(value)) throw new Error(\"tokens must be an object\")\n assertKnownKeys(value, MODE_KEYS, \"tokens\")\n const light = value.light === undefined ? undefined : parseModeTokens(value.light, \"tokens.light\")\n const dark = value.dark === undefined ? undefined : parseModeTokens(value.dark, \"tokens.dark\")\n if (!light && !dark) throw new Error(\"tokens must define light or dark\")\n return { ...(light ? { light } : {}), ...(dark ? { dark } : {}) }\n}\n\nfunction parseTypography(value: unknown): BrandTypography | undefined {\n if (value === undefined) return undefined\n if (!isRecord(value)) throw new Error(\"typography must be an object\")\n assertKnownKeys(value, TYPOGRAPHY_KEYS, \"typography\")\n return {\n fontSans: text(value.fontSans, \"typography.fontSans\", 200),\n fontMono: text(value.fontMono, \"typography.fontMono\", 200),\n }\n}\n\nfunction parseFontScale(value: unknown): OrbitworkFontScale | undefined {\n if (value === undefined) return undefined\n if (!isOrbitworkFontScale(value)) throw new Error(`fontScale must be one of ${ORBITWORK_FONT_SCALES.join(\", \")}`)\n return value\n}\n\nfunction slotAllowedKeys(kind: SlotKind): Set<string> {\n return new Set([\n ...SLOT_COMMON_KEYS,\n ...(kind === \"list\" ? [\"id\", \"order\"] : []),\n ...(kind === \"keyed\" ? [\"key\"] : []),\n ])\n}\n\nfunction parseSlotContribution(value: unknown, index: number): SlotContribution {\n const path = `contributes.slots[${index}]`\n if (!isRecord(value)) throw new Error(`${path} must be an object`)\n const name = text(value.name, `${path}.name`, 120)\n const declaration = SLOT_DECLARATIONS[name]\n if (!declaration) throw new Error(`${path}.name is not in the host slot whitelist: ${name}`)\n assertKnownKeys(value, slotAllowedKeys(declaration.kind), path)\n const common = { name: name as BrandSlotName }\n if (declaration.kind === \"list\") {\n const id = text(value.id, `${path}.id`, 100)\n if (typeof value.order !== \"number\" || !Number.isFinite(value.order)) {\n throw new Error(`${path}.order must be a finite number`)\n }\n return { ...common, id, order: value.order } as SlotContribution\n }\n if (declaration.kind === \"keyed\") {\n const key = text(value.key, `${path}.key`, 100)\n const allowed = WORKBENCH_KEYED_SLOT_KEYS[name as KeyedSlotName] as readonly string[] | undefined\n if (!allowed?.includes(key)) throw new Error(`${path}.key is not reachable by the host: ${key}`)\n return { ...common, key } as SlotContribution\n }\n return common as SlotContribution\n}\n\nfunction contributionCell(value: SlotContribution): string {\n if (\"id\" in value) return value.id\n if (\"key\" in value) return value.key\n return \"single\"\n}\n\nfunction parseContributes(value: unknown): BrandManifest[\"contributes\"] {\n if (value === undefined) return undefined\n if (!isRecord(value)) throw new Error(\"contributes must be an object\")\n assertKnownKeys(value, CONTRIBUTES_KEYS, \"contributes\")\n if (!Array.isArray(value.slots)) throw new Error(\"contributes.slots must be an array\")\n const slots = value.slots.map(parseSlotContribution)\n const seen = new Set<string>()\n for (const slot of slots) {\n const identity = `${slot.name}\\0${contributionCell(slot)}`\n if (seen.has(identity)) throw new Error(`duplicate slot contribution: ${slot.name} / ${contributionCell(slot)}`)\n seen.add(identity)\n }\n return { slots }\n}\n\nexport function parseBrandManifest(input: unknown, options?: BrandManifestParseOptions): BrandManifestValidationResult {\n try {\n const platform = options?.platform === true\n if (!isRecord(input)) throw new Error(\"brand manifest must be a JSON object\")\n assertKnownKeys(input, ROOT_KEYS, \"manifest\")\n if (input.$schema !== BRAND_MANIFEST_SCHEMA) throw new Error(`$schema must equal ${BRAND_MANIFEST_SCHEMA}`)\n const id = text(input.id, \"id\", 64)\n if (!KEBAB_ID.test(id)) throw new Error(\"id must be lowercase kebab-case\")\n const entry = input.entry === undefined ? undefined : relativePath(input.entry, \"entry\")\n if (entry && !SOURCE_ENTRY.test(entry)) {\n throw new Error(\"entry must point to reviewed source under ./src using .js, .mjs, .jsx, .ts, or .tsx\")\n }\n const contributes = parseContributes(input.contributes)\n if ((contributes?.slots.length ?? 0) > 0 && !entry)\n throw new Error(\"entry is required when contributes.slots is not empty\")\n const tokens = parseTokens(input.tokens)\n const typography = parseTypography(input.typography)\n const fontScale = parseFontScale(input.fontScale)\n const locales = parseLocales(input.locales)\n const network = parseNetwork(input.network)\n const identity = parseIdentity(input.identity, id, platform)\n if (!platform && productNameNamespace(identity.productName) !== id) {\n throw new Error(\"identity.productName must normalize to manifest id so installation names cannot collide\")\n }\n if (!platform && identity.versionChannel !== id) {\n throw new Error(\"identity.versionChannel must equal manifest id to keep OEM update feeds namespaced\")\n }\n if (!platform && identity.protocolScheme !== id) {\n throw new Error(\"identity.protocolScheme must equal manifest id to keep OEM deep links namespaced\")\n }\n if (!platform && !identity.appId.endsWith(`.oem.${id}`)) {\n throw new Error(\"identity.appId must end with .oem.<manifest id> to isolate installation and user data\")\n }\n return {\n ok: true,\n manifest: {\n $schema: BRAND_MANIFEST_SCHEMA,\n id,\n ...(input.description !== undefined ? { description: text(input.description, \"description\", 200) } : {}),\n ...(input.assistantName !== undefined ? { assistantName: text(input.assistantName, \"assistantName\", 48) } : {}),\n ...(input.homepage !== undefined ? { homepage: parseHomepage(input.homepage) } : {}),\n ...(input.permissions !== undefined ? { permissions: parsePermissions(input.permissions) } : {}),\n ...(entry ? { entry } : {}),\n identity,\n ...(tokens ? { tokens } : {}),\n ...(typography ? { typography } : {}),\n ...(fontScale ? { fontScale } : {}),\n assets: parseAssets(input.assets),\n branding: parseBranding(input.branding),\n ...(locales ? { locales } : {}),\n ...(network ? { network } : {}),\n ...(contributes ? { contributes } : {}),\n },\n }\n } catch (cause) {\n return { ok: false, error: cause instanceof Error ? cause.message : String(cause) }\n }\n}\n\nfunction parsePartialIdentity(value: unknown): PartialBrandIdentity {\n if (!isRecord(value)) throw new Error(\"identity must be an object\")\n assertKnownKeys(value, IDENTITY_KEYS, \"identity\")\n // Filled fields are validated exactly like the strict parser (formats,\n // reserved values), but the id-binding rules are skipped: partial manifests\n // are merged with source defaults before consumption, and the resolved\n // product is re-validated where those bindings apply.\n if (value.userDataNamespace !== undefined && !KEBAB_ID.test(text(value.userDataNamespace, \"identity.userDataNamespace\", 64))) {\n throw new Error(\"identity.userDataNamespace must be lowercase kebab-case\")\n }\n if (value.appId !== undefined) {\n const appId = text(value.appId, \"identity.appId\", 160)\n if (!APP_ID.test(appId)) throw new Error(\"identity.appId must be a reverse-DNS identifier\")\n if (appId === OFFICIAL_APP_ID) {\n throw new Error(`identity.appId is reserved for the official application: ${appId}`)\n }\n }\n if (value.versionChannel !== undefined) {\n const versionChannel = text(value.versionChannel, \"identity.versionChannel\", 64)\n if (!KEBAB_ID.test(versionChannel)) throw new Error(\"identity.versionChannel must be kebab-case\")\n }\n if (value.protocolScheme !== undefined) {\n const protocolScheme = text(value.protocolScheme, \"identity.protocolScheme\", 64)\n if (!PROTOCOL_SCHEME.test(protocolScheme)) {\n throw new Error(\"identity.protocolScheme must be a lowercase URI scheme beginning with a letter\")\n }\n if (RESERVED_PROTOCOL_SCHEMES.has(protocolScheme)) {\n throw new Error(`identity.protocolScheme is reserved: ${protocolScheme}`)\n }\n }\n if (value.productName !== undefined) {\n const productName = text(value.productName, \"identity.productName\", 64)\n if (\n hasUnsafeProductNameCharacter(productName) ||\n /[. ]$/.test(productName) ||\n productName === \".\" ||\n productName === \"..\" ||\n WINDOWS_DEVICE_NAME.test(productName)\n ) {\n throw new Error(\"identity.productName must be safe for macOS, Windows, Linux, and release artifact paths\")\n }\n if (OFFICIAL_PRODUCT_NAMES.has(productName.toLowerCase())) {\n throw new Error(`identity.productName is reserved for the official application: ${productName}`)\n }\n }\n return {\n ...(value.productName !== undefined ? { productName: text(value.productName, \"identity.productName\", 64) } : {}),\n ...(value.appId !== undefined ? { appId: text(value.appId, \"identity.appId\", 160) } : {}),\n ...(value.versionChannel !== undefined ? { versionChannel: text(value.versionChannel, \"identity.versionChannel\", 64) } : {}),\n ...(value.protocolScheme !== undefined ? { protocolScheme: text(value.protocolScheme, \"identity.protocolScheme\", 64) } : {}),\n ...(value.userDataNamespace !== undefined\n ? { userDataNamespace: text(value.userDataNamespace, \"identity.userDataNamespace\", 64) }\n : {}),\n }\n}\n\nfunction parsePartialBranding(value: unknown): PartialLocalizedBranding {\n if (!isRecord(value)) throw new Error(\"branding must be a locale map\")\n const result: PartialLocalizedBranding = {}\n for (const [rawLocale, copy] of Object.entries(value)) {\n const locale = canonicalLocale(rawLocale, `branding.${rawLocale}`)\n if (!isRecord(copy)) throw new Error(`branding.${locale} must be an object`)\n assertKnownKeys(copy, BRANDING_KEYS, `branding.${locale}`)\n const partial: Partial<TenantBranding> = {}\n for (const [key, limit] of [\n [\"productName\", 64],\n [\"companyName\", 80],\n [\"claim\", 40],\n [\"claimNote\", 48],\n [\"slogan\", 68],\n ] as const) {\n if (copy[key] !== undefined) partial[key] = text(copy[key], `branding.${locale}.${key}`, limit)\n }\n result[locale] = partial\n }\n return result\n}\n\n/**\n * Validates an upload-time (partial) brand manifest: omitted fields inherit\n * source defaults at merge time; every filled field is fully validated. The\n * resolved product must still pass `parseBrandManifest` where it is consumed.\n */\nexport function parsePartialBrandManifest(input: unknown): PartialBrandManifestValidationResult {\n try {\n if (!isRecord(input)) throw new Error(\"brand manifest must be a JSON object\")\n assertKnownKeys(input, ROOT_KEYS, \"manifest\")\n if (input.$schema !== undefined && input.$schema !== BRAND_MANIFEST_SCHEMA) {\n throw new Error(`$schema must equal ${BRAND_MANIFEST_SCHEMA}`)\n }\n const entry = input.entry === undefined ? undefined : relativePath(input.entry, \"entry\")\n if (entry && !SOURCE_ENTRY.test(entry)) {\n throw new Error(\"entry must point to reviewed source under ./src using .js, .mjs, .jsx, .ts, or .tsx\")\n }\n const contributes = parseContributes(input.contributes)\n if ((contributes?.slots.length ?? 0) > 0 && !entry)\n throw new Error(\"entry is required when contributes.slots is not empty\")\n if (input.id !== undefined) {\n const id = text(input.id, \"id\", 64)\n if (!KEBAB_ID.test(id)) throw new Error(\"id must be lowercase kebab-case\")\n }\n return {\n ok: true,\n manifest: {\n ...(input.id !== undefined ? { id: text(input.id, \"id\", 64) } : {}),\n ...(input.description !== undefined ? { description: text(input.description, \"description\", 200) } : {}),\n ...(input.assistantName !== undefined ? { assistantName: text(input.assistantName, \"assistantName\", 48) } : {}),\n ...(input.homepage !== undefined ? { homepage: parseHomepage(input.homepage) } : {}),\n ...(input.permissions !== undefined ? { permissions: parsePermissions(input.permissions) } : {}),\n ...(entry ? { entry } : {}),\n ...(input.identity !== undefined ? { identity: parsePartialIdentity(input.identity) } : {}),\n ...(input.tokens !== undefined ? { tokens: parseTokens(input.tokens) } : {}),\n ...(input.typography !== undefined ? { typography: parseTypography(input.typography) } : {}),\n ...(input.fontScale !== undefined ? { fontScale: parseFontScale(input.fontScale) } : {}),\n ...(input.assets !== undefined ? { assets: parsePartialAssets(input.assets) } : {}),\n ...(input.branding !== undefined ? { branding: parsePartialBranding(input.branding) } : {}),\n ...(input.locales !== undefined ? { locales: parseLocales(input.locales) } : {}),\n ...(input.network !== undefined ? { network: parseNetwork(input.network) } : {}),\n ...(contributes ? { contributes } : {}),\n },\n }\n } catch (cause) {\n return { ok: false, error: cause instanceof Error ? cause.message : String(cause) }\n }\n}\n\nexport function manifestToBrandTheme(manifest: BrandManifest): BrandTheme {\n return {\n id: manifest.id,\n logo: manifest.assets.logo,\n ...(manifest.assets.loginKV ? { loginKV: manifest.assets.loginKV } : {}),\n modes: manifest.tokens ?? {},\n ...(manifest.typography ? { typography: manifest.typography } : {}),\n ...(manifest.fontScale ? { fontScale: manifest.fontScale } : {}),\n branding: manifest.branding,\n }\n}\n"]}
|