@orbit-work/oem-sdk 0.1.8 → 0.1.10
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 +211 -17
- package/dist/audit-brand.js.map +1 -1
- package/dist/audit.d.ts +38 -2
- package/dist/audit.js +211 -17
- package/dist/audit.js.map +1 -1
- package/dist/{chunk-KFDD7FES.js → chunk-PVX4DQMJ.js} +150 -19
- package/dist/chunk-PVX4DQMJ.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/manifest.d.ts +64 -4
- package/dist/manifest.js +1 -1
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +1 -1
- package/package.json +2 -2
- package/schema/orbit-brand.schema.json +170 -14
- package/dist/chunk-KFDD7FES.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 { ChatMarkAssets, 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,6 +36,7 @@ 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;
|
|
@@ -44,6 +45,7 @@ type PartialBrandManifest = {
|
|
|
44
45
|
/** OEM may opt back into Orbit's decorative empty-home ring backdrop. */
|
|
45
46
|
appearance?: {
|
|
46
47
|
homeBackdrop?: boolean;
|
|
48
|
+
login?: LoginAppearance;
|
|
47
49
|
};
|
|
48
50
|
assets?: PartialBrandAssets;
|
|
49
51
|
branding?: PartialLocalizedBranding;
|
|
@@ -60,13 +62,58 @@ type PartialBrandManifestValidationResult = {
|
|
|
60
62
|
ok: false;
|
|
61
63
|
error: string;
|
|
62
64
|
};
|
|
63
|
-
type BrandAssets = {
|
|
65
|
+
type BrandAssets = ChatMarkAssets & {
|
|
64
66
|
appIcon: string;
|
|
65
67
|
tray?: string;
|
|
68
|
+
/** Platform-ready tray rasters exported as one atomic, canonical set. */
|
|
69
|
+
trayVariants?: TrayVariants;
|
|
66
70
|
logo: string;
|
|
67
71
|
/** Optional login key-visual photo (KV board background on the desktop login page). */
|
|
68
72
|
loginKV?: string;
|
|
69
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";
|
|
70
117
|
type BrandLocaleSources = Record<string, string>;
|
|
71
118
|
/** OEM typography override; both stacks are CSS font-family values. */
|
|
72
119
|
type BrandTypography = {
|
|
@@ -103,6 +150,17 @@ type KeyedSlotContribution = {
|
|
|
103
150
|
};
|
|
104
151
|
}[KeyedSlotName];
|
|
105
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
|
+
};
|
|
106
164
|
type BrandManifest = {
|
|
107
165
|
$schema: typeof BRAND_MANIFEST_SCHEMA;
|
|
108
166
|
id: string;
|
|
@@ -116,12 +174,14 @@ type BrandManifest = {
|
|
|
116
174
|
permissions?: BrandPermissions;
|
|
117
175
|
entry?: string;
|
|
118
176
|
identity: BrandIdentity;
|
|
177
|
+
theme?: BrandManifestTheme;
|
|
119
178
|
tokens?: Partial<Record<"light" | "dark", Partial<Record<BrandThemeToken, string>>>>;
|
|
120
179
|
typography?: BrandTypography;
|
|
121
180
|
/** OEM text-size preset; the personal font-scale preference and user skins still win. */
|
|
122
181
|
fontScale?: OrbitworkFontScale;
|
|
123
182
|
appearance?: {
|
|
124
183
|
homeBackdrop?: boolean;
|
|
184
|
+
login?: LoginAppearance;
|
|
125
185
|
};
|
|
126
186
|
assets: BrandAssets;
|
|
127
187
|
branding: LocalizedBranding;
|
|
@@ -137,7 +197,7 @@ type BrandManifestParseOptions = {
|
|
|
137
197
|
* Platform builds accept manifests resolved from the managed OEM pipeline:
|
|
138
198
|
* every shape/format/safety check stays in force, only the workspace
|
|
139
199
|
* namespacing bindings are relaxed (productName/versionChannel/protocolScheme
|
|
140
|
-
* must equal id,
|
|
200
|
+
* must equal id, reserved feed channels). Application IDs use reverse-DNS format.
|
|
141
201
|
*/
|
|
142
202
|
platform?: boolean;
|
|
143
203
|
};
|
|
@@ -157,4 +217,4 @@ declare function parseBrandManifest(input: unknown, options?: BrandManifestParse
|
|
|
157
217
|
declare function parsePartialBrandManifest(input: unknown): PartialBrandManifestValidationResult;
|
|
158
218
|
declare function manifestToBrandTheme(manifest: BrandManifest): BrandTheme;
|
|
159
219
|
|
|
160
|
-
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-PVX4DQMJ.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
1
|
export { applyOemEntry, createOemActionHost, createRestrictedOemApi, createTranslator, createUnavailableActionApi, validateDictionary } from './chunk-C4G3TUO6.js';
|
|
2
|
-
export { BRAND_MANIFEST_SCHEMA, manifestToBrandTheme, parseBrandManifest, parsePartialBrandManifest } from './chunk-
|
|
2
|
+
export { BRAND_MANIFEST_SCHEMA, TRAY_SOURCE_PATH, TRAY_VARIANT_PATHS, manifestToBrandTheme, parseBrandManifest, parsePartialBrandManifest } from './chunk-PVX4DQMJ.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.10",
|
|
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.11",
|
|
45
45
|
"es-module-lexer": "^2.3.2",
|
|
46
46
|
"esbuild": "^0.27.7"
|
|
47
47
|
},
|
|
@@ -38,8 +38,16 @@
|
|
|
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": [
|
|
@@ -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,
|
|
@@ -110,6 +132,19 @@
|
|
|
110
132
|
"homeBackdrop": {
|
|
111
133
|
"type": "boolean",
|
|
112
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
|
+
}
|
|
113
148
|
}
|
|
114
149
|
}
|
|
115
150
|
},
|
|
@@ -124,17 +159,83 @@
|
|
|
124
159
|
},
|
|
125
160
|
"tray": {
|
|
126
161
|
"allOf": [{ "$ref": "#/$defs/packagePath" }],
|
|
127
|
-
"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."
|
|
128
167
|
},
|
|
129
168
|
"logo": {
|
|
130
169
|
"allOf": [{ "$ref": "#/$defs/packagePath" }],
|
|
131
170
|
"description": "SVG, PNG, WebP, or JPEG. Renderer-only; both transparent and full-bleed backgrounds are accepted."
|
|
132
171
|
},
|
|
172
|
+
"chatThinkingOrbit": {
|
|
173
|
+
"$ref": "#/$defs/packagePath",
|
|
174
|
+
"description": "Optional full-canvas OEM chat mark layer (SVG/PNG/WebP/JPEG)."
|
|
175
|
+
},
|
|
176
|
+
"chatThinkingCenter": {
|
|
177
|
+
"$ref": "#/$defs/packagePath",
|
|
178
|
+
"description": "Optional full-canvas OEM chat mark layer (SVG/PNG/WebP/JPEG)."
|
|
179
|
+
},
|
|
180
|
+
"chatCompletedMark": {
|
|
181
|
+
"$ref": "#/$defs/packagePath",
|
|
182
|
+
"description": "Optional full-canvas OEM chat mark layer (SVG/PNG/WebP/JPEG)."
|
|
183
|
+
},
|
|
184
|
+
"chatThinkingOrbitDark": {
|
|
185
|
+
"$ref": "#/$defs/packagePath",
|
|
186
|
+
"description": "Optional full-canvas OEM chat mark layer (SVG/PNG/WebP/JPEG)."
|
|
187
|
+
},
|
|
188
|
+
"chatThinkingCenterDark": {
|
|
189
|
+
"$ref": "#/$defs/packagePath",
|
|
190
|
+
"description": "Optional full-canvas OEM chat mark layer (SVG/PNG/WebP/JPEG)."
|
|
191
|
+
},
|
|
192
|
+
"chatCompletedMarkDark": {
|
|
193
|
+
"$ref": "#/$defs/packagePath",
|
|
194
|
+
"description": "Optional full-canvas OEM chat mark layer (SVG/PNG/WebP/JPEG)."
|
|
195
|
+
},
|
|
133
196
|
"loginKV": {
|
|
134
197
|
"allOf": [{ "$ref": "#/$defs/packagePath" }],
|
|
135
198
|
"description": "Optional login key-visual photo (PNG, JPEG, or WebP) for the desktop login page background."
|
|
136
199
|
}
|
|
137
|
-
}
|
|
200
|
+
},
|
|
201
|
+
"allOf": [
|
|
202
|
+
{
|
|
203
|
+
"if": {
|
|
204
|
+
"anyOf": [
|
|
205
|
+
{ "required": ["chatThinkingOrbit"] },
|
|
206
|
+
{ "required": ["chatThinkingCenter"] },
|
|
207
|
+
{ "required": ["chatCompletedMark"] }
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"then": { "required": ["chatThinkingOrbit", "chatThinkingCenter", "chatCompletedMark"] }
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"if": {
|
|
214
|
+
"anyOf": [
|
|
215
|
+
{ "required": ["chatThinkingOrbitDark"] },
|
|
216
|
+
{ "required": ["chatThinkingCenterDark"] },
|
|
217
|
+
{ "required": ["chatCompletedMarkDark"] }
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
"then": {
|
|
221
|
+
"required": [
|
|
222
|
+
"chatThinkingOrbitDark",
|
|
223
|
+
"chatThinkingCenterDark",
|
|
224
|
+
"chatCompletedMarkDark",
|
|
225
|
+
"chatThinkingOrbit",
|
|
226
|
+
"chatThinkingCenter",
|
|
227
|
+
"chatCompletedMark"
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"if": { "required": ["trayVariants"] },
|
|
233
|
+
"then": {
|
|
234
|
+
"required": ["tray"],
|
|
235
|
+
"properties": { "tray": { "const": "./assets/tray-source.png" } }
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
]
|
|
138
239
|
},
|
|
139
240
|
"branding": {
|
|
140
241
|
"type": "object",
|
|
@@ -179,6 +280,47 @@
|
|
|
179
280
|
"nonEmpty": { "type": "string", "minLength": 1 },
|
|
180
281
|
"kebabId": { "type": "string", "maxLength": 64, "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
|
|
181
282
|
"packagePath": { "type": "string", "maxLength": 240, "pattern": "^\\./(?!.*(?:^|/)\\.\\.(?:/|$))[^\\\\]+$" },
|
|
283
|
+
"trayVariants": {
|
|
284
|
+
"type": "object",
|
|
285
|
+
"additionalProperties": false,
|
|
286
|
+
"required": ["macos", "windows", "linux"],
|
|
287
|
+
"properties": {
|
|
288
|
+
"macos": {
|
|
289
|
+
"type": "object",
|
|
290
|
+
"additionalProperties": false,
|
|
291
|
+
"required": ["1x", "2x"],
|
|
292
|
+
"properties": {
|
|
293
|
+
"1x": { "const": "./macos/trayTemplate.png" },
|
|
294
|
+
"2x": { "const": "./macos/trayTemplate@2x.png" }
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"windows": {
|
|
298
|
+
"type": "object",
|
|
299
|
+
"additionalProperties": false,
|
|
300
|
+
"required": ["16", "20", "24", "32"],
|
|
301
|
+
"properties": {
|
|
302
|
+
"16": { "const": "./windows/tray-16.png" },
|
|
303
|
+
"20": { "const": "./windows/tray-20.png" },
|
|
304
|
+
"24": { "const": "./windows/tray-24.png" },
|
|
305
|
+
"32": { "const": "./windows/tray-32.png" }
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"linux": {
|
|
309
|
+
"type": "object",
|
|
310
|
+
"additionalProperties": false,
|
|
311
|
+
"required": ["16", "22", "24", "32", "48", "64", "128"],
|
|
312
|
+
"properties": {
|
|
313
|
+
"16": { "const": "./linux/tray-16.png" },
|
|
314
|
+
"22": { "const": "./linux/tray-22.png" },
|
|
315
|
+
"24": { "const": "./linux/tray-24.png" },
|
|
316
|
+
"32": { "const": "./linux/tray-32.png" },
|
|
317
|
+
"48": { "const": "./linux/tray-48.png" },
|
|
318
|
+
"64": { "const": "./linux/tray-64.png" },
|
|
319
|
+
"128": { "const": "./linux/tray-128.png" }
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
182
324
|
"color": { "type": "string", "pattern": "^#(?:[0-9A-Fa-f]{3,4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$" },
|
|
183
325
|
"tokenMode": {
|
|
184
326
|
"type": "object",
|
|
@@ -192,13 +334,15 @@
|
|
|
192
334
|
"--ow-text-3": { "$ref": "#/$defs/color" },
|
|
193
335
|
"--ow-border": { "$ref": "#/$defs/color" },
|
|
194
336
|
"--ow-border-strong": { "$ref": "#/$defs/color" },
|
|
337
|
+
"--ow-login-brand-color": {
|
|
338
|
+
"$ref": "#/$defs/color",
|
|
339
|
+
"description": "OEM product name in the login scene only; optional and independent of palette groups. Login scenes use the light theme, including Desktop."
|
|
340
|
+
},
|
|
195
341
|
"--ow-btn-primary-bg": { "$ref": "#/$defs/color" },
|
|
196
342
|
"--ow-btn-primary-hover": { "$ref": "#/$defs/color" },
|
|
197
343
|
"--ow-btn-primary-press": { "$ref": "#/$defs/color" },
|
|
198
344
|
"--ow-btn-primary-fg": { "$ref": "#/$defs/color" },
|
|
199
|
-
"--ow-
|
|
200
|
-
"--ow-beacon-idle": { "$ref": "#/$defs/color" },
|
|
201
|
-
"--ow-accent-dot": { "$ref": "#/$defs/color" },
|
|
345
|
+
"--ow-signal": { "$ref": "#/$defs/color" },
|
|
202
346
|
"--ow-data-today": { "$ref": "#/$defs/color" }
|
|
203
347
|
},
|
|
204
348
|
"allOf": [
|
|
@@ -235,9 +379,7 @@
|
|
|
235
379
|
{ "required": ["--ow-btn-primary-hover"] },
|
|
236
380
|
{ "required": ["--ow-btn-primary-press"] },
|
|
237
381
|
{ "required": ["--ow-btn-primary-fg"] },
|
|
238
|
-
{ "required": ["--ow-
|
|
239
|
-
{ "required": ["--ow-beacon-idle"] },
|
|
240
|
-
{ "required": ["--ow-accent-dot"] },
|
|
382
|
+
{ "required": ["--ow-signal"] },
|
|
241
383
|
{ "required": ["--ow-data-today"] }
|
|
242
384
|
]
|
|
243
385
|
},
|
|
@@ -247,9 +389,7 @@
|
|
|
247
389
|
"--ow-btn-primary-hover",
|
|
248
390
|
"--ow-btn-primary-press",
|
|
249
391
|
"--ow-btn-primary-fg",
|
|
250
|
-
"--ow-
|
|
251
|
-
"--ow-beacon-idle",
|
|
252
|
-
"--ow-accent-dot",
|
|
392
|
+
"--ow-signal",
|
|
253
393
|
"--ow-data-today"
|
|
254
394
|
]
|
|
255
395
|
}
|
|
@@ -260,10 +400,15 @@
|
|
|
260
400
|
"type": "object",
|
|
261
401
|
"additionalProperties": false,
|
|
262
402
|
"required": ["productName", "companyName"],
|
|
403
|
+
"dependentRequired": { "claimHighlight": ["claim"] },
|
|
263
404
|
"properties": {
|
|
264
405
|
"productName": { "allOf": [{ "$ref": "#/$defs/nonEmpty" }, { "maxLength": 64 }] },
|
|
265
406
|
"companyName": { "allOf": [{ "$ref": "#/$defs/nonEmpty" }, { "maxLength": 80 }] },
|
|
266
407
|
"claim": { "allOf": [{ "$ref": "#/$defs/nonEmpty" }, { "maxLength": 40 }] },
|
|
408
|
+
"claimHighlight": {
|
|
409
|
+
"allOf": [{ "$ref": "#/$defs/nonEmpty" }, { "maxLength": 40 }],
|
|
410
|
+
"description": "Exact substring of claim to emphasize. Only its first occurrence is highlighted."
|
|
411
|
+
},
|
|
267
412
|
"claimNote": { "allOf": [{ "$ref": "#/$defs/nonEmpty" }, { "maxLength": 48 }] },
|
|
268
413
|
"slogan": { "allOf": [{ "$ref": "#/$defs/nonEmpty" }, { "maxLength": 68 }] }
|
|
269
414
|
}
|
|
@@ -328,7 +473,18 @@
|
|
|
328
473
|
"required": ["key"],
|
|
329
474
|
"properties": {
|
|
330
475
|
"key": {
|
|
331
|
-
"enum": [
|
|
476
|
+
"enum": [
|
|
477
|
+
"general",
|
|
478
|
+
"appearance",
|
|
479
|
+
"usage",
|
|
480
|
+
"models",
|
|
481
|
+
"auth",
|
|
482
|
+
"security",
|
|
483
|
+
"assistant",
|
|
484
|
+
"memory",
|
|
485
|
+
"keys",
|
|
486
|
+
"about"
|
|
487
|
+
]
|
|
332
488
|
}
|
|
333
489
|
},
|
|
334
490
|
"not": { "anyOf": [{ "required": ["id"] }, { "required": ["order"] }] }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/manifest.ts"],"names":[],"mappings":";;;;AAgBO,IAAM,qBAAA,GAAwB;AAgJrC,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,E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B;AAAC;AACvC,KACF;AAAA,EACF,SAAS,KAAA,EAAO;AACd,IAAA,OAAO,EAAE,EAAA,EAAI,KAAA,EAAO,KAAA,EAAO,KAAA,YAAiB,QAAQ,KAAA,CAAM,OAAA,GAAU,MAAA,CAAO,KAAK,CAAA,EAAE;AAAA,EACpF;AACF;AAEO,SAAS,qBAAqB,QAAA,EAAqC;AACxE,EAAA,OAAO;AAAA,IACL,IAAI,QAAA,CAAS,EAAA;AAAA,IACb,IAAA,EAAM,SAAS,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-KFDD7FES.js","sourcesContent":["import {\n BRAND_ACTION_TOKENS,\n type BrandTheme,\n type BrandThemeToken,\n type LocalizedBranding,\n ORBITWORK_FONT_SCALES,\n type OrbitworkFontScale,\n type TenantBranding,\n UNIFIED_NEUTRAL_TOKENS,\n ds2ContrastRatio,\n isOrbitworkFontScale,\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 /** OEM may opt back into Orbit's decorative empty-home ring backdrop. */\n appearance?: { homeBackdrop?: boolean }\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 appearance?: { homeBackdrop?: boolean }\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 \"appearance\",\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 APPEARANCE_KEYS = new Set([\"homeBackdrop\"])\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([\"stable\", \"debug\", \"latest\", \"desktop\", \"macos\", \"windows\", \"linux\"])\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, platform ? new Set([...IDENTITY_KEYS, \"userDataNamespace\"]) : IDENTITY_KEYS, \"identity\")\n const productName = text(value.productName, \"identity.productName\", 64)\n const appId = text(value.appId, \"identity.appId\", platform ? 200 : 160)\n const versionChannel = text(value.versionChannel, \"identity.versionChannel\", 64)\n const protocolScheme = text(value.protocolScheme, \"identity.protocolScheme\", 64)\n if (!(platform ? /^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$/ : APP_ID).test(appId))\n 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 if (!platform && RESERVED_VERSION_CHANNELS.has(versionChannel)) {\n throw new Error(`identity.versionChannel is reserved: ${versionChannel}`)\n }\n if (!(platform ? /^[a-z][a-z0-9+.-]{1,62}$/ : 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) && !(platform && protocolScheme === \"orbit\")) {\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 (!platform && OFFICIAL_PRODUCT_NAMES.has(productName.toLowerCase())) {\n throw new Error(`identity.productName is reserved for the official application: ${productName}`)\n }\n if (!platform && 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 if (\n !platform &&\n value.userDataNamespace !== undefined &&\n !KEBAB_ID.test(text(value.userDataNamespace, \"identity.userDataNamespace\", 64))\n ) {\n throw new Error(\"identity.userDataNamespace must be lowercase kebab-case\")\n }\n const userDataNamespace =\n value.userDataNamespace === undefined ? undefined : text(value.userDataNamespace, \"identity.userDataNamespace\", 200)\n if (\n userDataNamespace &&\n (!/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/.test(userDataNamespace) || userDataNamespace.includes(\"..\"))\n )\n throw new Error(\"identity.userDataNamespace must be a safe directory name\")\n if (platform && versionChannel !== id && ![\"stable\", \"debug\", \"oem-dev\"].includes(versionChannel))\n throw new Error(\"Platform environment must be stable, debug, or oem-dev\")\n return { productName, appId, versionChannel, protocolScheme, ...(userDataNamespace ? { userDataNamespace } : {}) }\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 = 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 ? { loginKV: relativePath(value.loginKV, \"assets.loginKV\") } : {}),\n }\n}\n\nfunction parseAppearance(value: unknown): { homeBackdrop?: boolean } | undefined {\n if (value === undefined) return undefined\n if (!isRecord(value)) throw new Error(\"appearance must be an object\")\n assertKnownKeys(value, APPEARANCE_KEYS, \"appearance\")\n if (value.homeBackdrop !== undefined && typeof value.homeBackdrop !== \"boolean\")\n throw new Error(\"appearance.homeBackdrop must be a boolean\")\n return value.homeBackdrop === undefined ? {} : { homeBackdrop: value.homeBackdrop }\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, platform = false): 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 (!platform && 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>> {\n 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 (!(platform ? /^[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$/ : KEBAB_ID).test(id))\n 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 appearance = parseAppearance(input.appearance)\n const locales = parseLocales(input.locales)\n const network = parseNetwork(input.network, platform)\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 ...(appearance ? { appearance } : {}),\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 (\n value.userDataNamespace !== undefined &&\n !KEBAB_ID.test(text(value.userDataNamespace, \"identity.userDataNamespace\", 64))\n ) {\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\n ? { versionChannel: text(value.versionChannel, \"identity.versionChannel\", 64) }\n : {}),\n ...(value.protocolScheme !== undefined\n ? { protocolScheme: text(value.protocolScheme, \"identity.protocolScheme\", 64) }\n : {}),\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.appearance !== undefined ? { appearance: parseAppearance(input.appearance) } : {}),\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"]}
|