@ankhorage/contracts 7.5.0 → 7.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/appManifest/deploy.d.ts.map +1 -1
- package/dist/appManifest/deploy.js +8 -2
- package/dist/appManifest/deploy.js.map +1 -1
- package/dist/deploy.d.ts +13 -0
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +8 -0
- package/dist/deploy.js.map +1 -1
- package/dist/ui.d.ts +3 -1
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
- package/src/appManifest/deploy.ts +9 -2
- package/src/deploy.test.ts +56 -3
- package/src/deploy.ts +15 -0
- package/src/ui-media.test.ts +33 -0
- package/src/ui.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/contracts
|
|
2
2
|
|
|
3
|
+
## 7.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 00d608f: Add canonical application environment IDs and stable native scheme identity to app deployment target contracts.
|
|
8
|
+
|
|
9
|
+
## 7.6.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 49c4b9f: Add provider-neutral `media` component-property authoring metadata with optional canonical `MediaAssetKind` constraints, so authoring tools can identify accepted media kinds without provider-specific or Image-specific fields.
|
|
14
|
+
|
|
3
15
|
## 7.5.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# CONTRACTS
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Serializable app, action, theme, auth, and secret-store contracts for Ankhorage.
|
|
9
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/appManifest/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,iBAAiB,EAIlB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/appManifest/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,iBAAiB,EAIlB,MAAM,WAAW,CAAC;AAWnB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAE9E"}
|
|
@@ -3,8 +3,9 @@ const DEPLOY_KEYS = new Set(['targets']);
|
|
|
3
3
|
const TARGET_KEYS = new Set(['web', 'android', 'ios']);
|
|
4
4
|
const PROVIDER_KEYS = new Set(['build', 'publish']);
|
|
5
5
|
const WEB_KEYS = new Set(['enabled', 'providers']);
|
|
6
|
-
const ANDROID_KEYS = new Set(['enabled', 'package', 'providers']);
|
|
7
|
-
const IOS_KEYS = new Set(['enabled', 'bundleIdentifier', 'providers']);
|
|
6
|
+
const ANDROID_KEYS = new Set(['enabled', 'package', 'scheme', 'providers']);
|
|
7
|
+
const IOS_KEYS = new Set(['enabled', 'bundleIdentifier', 'scheme', 'providers']);
|
|
8
|
+
const URI_SCHEME_PATTERN = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
|
|
8
9
|
export function isAppDeployManifest(value) {
|
|
9
10
|
return isRecord(value) && hasOnlyKeys(value, DEPLOY_KEYS) && isAppDeployTargets(value.targets);
|
|
10
11
|
}
|
|
@@ -26,6 +27,7 @@ function isAndroidTarget(value) {
|
|
|
26
27
|
hasOnlyKeys(value, ANDROID_KEYS) &&
|
|
27
28
|
typeof value.enabled === 'boolean' &&
|
|
28
29
|
isNonEmptyString(value.package) &&
|
|
30
|
+
isOptionalScheme(value.scheme) &&
|
|
29
31
|
isOptionalProviders(value.providers));
|
|
30
32
|
}
|
|
31
33
|
function isIosTarget(value) {
|
|
@@ -33,8 +35,12 @@ function isIosTarget(value) {
|
|
|
33
35
|
hasOnlyKeys(value, IOS_KEYS) &&
|
|
34
36
|
typeof value.enabled === 'boolean' &&
|
|
35
37
|
isNonEmptyString(value.bundleIdentifier) &&
|
|
38
|
+
isOptionalScheme(value.scheme) &&
|
|
36
39
|
isOptionalProviders(value.providers));
|
|
37
40
|
}
|
|
41
|
+
function isOptionalScheme(value) {
|
|
42
|
+
return value === undefined || (typeof value === 'string' && URI_SCHEME_PATTERN.test(value));
|
|
43
|
+
}
|
|
38
44
|
function isOptionalProviders(value) {
|
|
39
45
|
return value === undefined || isProviderSelection(value);
|
|
40
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/appManifest/deploy.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AACzC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;AACvD,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACpD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AACnD,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/appManifest/deploy.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AACzC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,KA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AAC,OAAO,CAAC,CAAC,CACjE,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,WAAW,CAAC,KAA8B,EAAE,OAA4B;IAC/E,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["import type {\n AppDeployAndroidTargetConfig,\n AppDeployIosTargetConfig,\n AppDeployManifest,\n AppDeployProviderSelection,\n AppDeployTargets,\n AppDeployWebTargetConfig,\n} from '../deploy';\nimport { isRecord } from './shared';\n\nconst DEPLOY_KEYS = new Set(['targets']);\nconst TARGET_KEYS = new Set(['web', 'android', 'ios']);\nconst PROVIDER_KEYS = new Set(['build', 'publish']);\nconst WEB_KEYS = new Set(['enabled', 'providers']);\nconst ANDROID_KEYS = new Set(['enabled', 'package', 'scheme', 'providers']);\nconst IOS_KEYS = new Set(['enabled', 'bundleIdentifier', 'scheme', 'providers']);\nconst URI_SCHEME_PATTERN = /^[A-Za-z][A-Za-z0-9+.-]*$/u;\n\nexport function isAppDeployManifest(value: unknown): value is AppDeployManifest {\n return isRecord(value) && hasOnlyKeys(value, DEPLOY_KEYS) && isAppDeployTargets(value.targets);\n}\n\nfunction isAppDeployTargets(value: unknown): value is AppDeployTargets {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, TARGET_KEYS) &&\n (value.web === undefined || isWebTarget(value.web)) &&\n (value.android === undefined || isAndroidTarget(value.android)) &&\n (value.ios === undefined || isIosTarget(value.ios))\n );\n}\n\nfunction isWebTarget(value: unknown): value is AppDeployWebTargetConfig {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, WEB_KEYS) &&\n typeof value.enabled === 'boolean' &&\n isOptionalProviders(value.providers)\n );\n}\n\nfunction isAndroidTarget(value: unknown): value is AppDeployAndroidTargetConfig {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, ANDROID_KEYS) &&\n typeof value.enabled === 'boolean' &&\n isNonEmptyString(value.package) &&\n isOptionalScheme(value.scheme) &&\n isOptionalProviders(value.providers)\n );\n}\n\nfunction isIosTarget(value: unknown): value is AppDeployIosTargetConfig {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, IOS_KEYS) &&\n typeof value.enabled === 'boolean' &&\n isNonEmptyString(value.bundleIdentifier) &&\n isOptionalScheme(value.scheme) &&\n isOptionalProviders(value.providers)\n );\n}\n\nfunction isOptionalScheme(value: unknown): value is string | undefined {\n return value === undefined || (typeof value === 'string' && URI_SCHEME_PATTERN.test(value));\n}\n\nfunction isOptionalProviders(value: unknown): value is AppDeployProviderSelection | undefined {\n return value === undefined || isProviderSelection(value);\n}\n\nfunction isProviderSelection(value: unknown): value is AppDeployProviderSelection {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, PROVIDER_KEYS) &&\n (value.build === undefined || isNonEmptyString(value.build)) &&\n (value.publish === undefined || isNonEmptyString(value.publish))\n );\n}\n\nfunction isNonEmptyString(value: unknown): value is string {\n return typeof value === 'string' && value.trim().length > 0;\n}\n\nfunction hasOnlyKeys(value: Record<string, unknown>, allowed: ReadonlySet<string>): boolean {\n return Object.keys(value).every((key) => allowed.has(key));\n}\n"]}
|
package/dist/deploy.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
export declare const APP_DEPLOY_TARGET_IDS: readonly ["web", "android", "ios"];
|
|
2
2
|
export type AppDeployTargetId = (typeof APP_DEPLOY_TARGET_IDS)[number];
|
|
3
|
+
/**
|
|
4
|
+
* Logical application environments shared across platform-specific planning.
|
|
5
|
+
*
|
|
6
|
+
* `local` maps to local Web, iOS development, and Android debug execution.
|
|
7
|
+
* Environment-specific endpoints, signing material, and credentials are owned
|
|
8
|
+
* by their dedicated deployment/infra configuration rather than this identity contract.
|
|
9
|
+
*/
|
|
10
|
+
export declare const APP_DEPLOY_ENVIRONMENT_IDS: readonly ["local", "preview", "production"];
|
|
11
|
+
export type AppDeployEnvironmentId = (typeof APP_DEPLOY_ENVIRONMENT_IDS)[number];
|
|
3
12
|
export interface AppDeployProviderSelection {
|
|
4
13
|
readonly build?: string;
|
|
5
14
|
readonly publish?: string;
|
|
@@ -11,11 +20,15 @@ export interface AppDeployWebTargetConfig {
|
|
|
11
20
|
export interface AppDeployAndroidTargetConfig {
|
|
12
21
|
readonly enabled: boolean;
|
|
13
22
|
readonly package: string;
|
|
23
|
+
/** Stable application URI scheme used for target-aware deep links such as OAuth callbacks. */
|
|
24
|
+
readonly scheme?: string;
|
|
14
25
|
readonly providers?: AppDeployProviderSelection;
|
|
15
26
|
}
|
|
16
27
|
export interface AppDeployIosTargetConfig {
|
|
17
28
|
readonly enabled: boolean;
|
|
18
29
|
readonly bundleIdentifier: string;
|
|
30
|
+
/** Stable application URI scheme used for target-aware deep links such as OAuth callbacks. */
|
|
31
|
+
readonly scheme?: string;
|
|
19
32
|
readonly providers?: AppDeployProviderSelection;
|
|
20
33
|
}
|
|
21
34
|
export interface AppDeployTargets {
|
package/dist/deploy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,oCAAqC,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ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,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACjD;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,8FAA8F;IAC9F,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACjD;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,8FAA8F;IAC9F,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACjD;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,CAAC,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,4BAA4B,CAAC;IAChD,QAAQ,CAAC,GAAG,CAAC,EAAE,wBAAwB,CAAC;CACzC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;CACpC;AAED,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/deploy.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
export const APP_DEPLOY_TARGET_IDS = ['web', 'android', 'ios'];
|
|
2
|
+
/**
|
|
3
|
+
* Logical application environments shared across platform-specific planning.
|
|
4
|
+
*
|
|
5
|
+
* `local` maps to local Web, iOS development, and Android debug execution.
|
|
6
|
+
* Environment-specific endpoints, signing material, and credentials are owned
|
|
7
|
+
* by their dedicated deployment/infra configuration rather than this identity contract.
|
|
8
|
+
*/
|
|
9
|
+
export const APP_DEPLOY_ENVIRONMENT_IDS = ['local', 'preview', 'production'];
|
|
2
10
|
export { isAppDeployManifest } from './appManifest/deploy';
|
|
3
11
|
//# sourceMappingURL=deploy.js.map
|
package/dist/deploy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAU,CAAC;AAIxE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,YAAY,CAAU,CAAC;AAwCtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export const APP_DEPLOY_TARGET_IDS = ['web', 'android', 'ios'] as const;\n\nexport type AppDeployTargetId = (typeof APP_DEPLOY_TARGET_IDS)[number];\n\n/**\n * Logical application environments shared across platform-specific planning.\n *\n * `local` maps to local Web, iOS development, and Android debug execution.\n * Environment-specific endpoints, signing material, and credentials are owned\n * by their dedicated deployment/infra configuration rather than this identity contract.\n */\nexport const APP_DEPLOY_ENVIRONMENT_IDS = ['local', 'preview', 'production'] as const;\n\nexport type AppDeployEnvironmentId = (typeof APP_DEPLOY_ENVIRONMENT_IDS)[number];\n\nexport interface AppDeployProviderSelection {\n readonly build?: string;\n readonly publish?: string;\n}\n\nexport interface AppDeployWebTargetConfig {\n readonly enabled: boolean;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployAndroidTargetConfig {\n readonly enabled: boolean;\n readonly package: string;\n /** Stable application URI scheme used for target-aware deep links such as OAuth callbacks. */\n readonly scheme?: string;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployIosTargetConfig {\n readonly enabled: boolean;\n readonly bundleIdentifier: string;\n /** Stable application URI scheme used for target-aware deep links such as OAuth callbacks. */\n readonly scheme?: string;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployTargets {\n readonly web?: AppDeployWebTargetConfig;\n readonly android?: AppDeployAndroidTargetConfig;\n readonly ios?: AppDeployIosTargetConfig;\n}\n\nexport interface AppDeployManifest {\n readonly targets: AppDeployTargets;\n}\n\nexport { isAppDeployManifest } from './appManifest/deploy';\n"]}
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { MediaAssetKind } from './media';
|
|
1
2
|
import type { ComponentEventDtoKind } from './types';
|
|
2
3
|
export type UiComponentCategory = 'component' | 'foundation' | 'layout' | 'pattern';
|
|
3
|
-
export type UiComponentPropType = 'action' | 'array' | 'boolean' | 'color' | 'enum' | 'imageAsset' | 'number' | 'radius' | 'shadow' | 'spacing' | 'string' | 'typographySize' | 'typographyWeight';
|
|
4
|
+
export type UiComponentPropType = 'action' | 'array' | 'boolean' | 'color' | 'enum' | 'imageAsset' | 'media' | 'number' | 'radius' | 'shadow' | 'spacing' | 'string' | 'typographySize' | 'typographyWeight';
|
|
4
5
|
export type UiComponentPropValue = string | number | boolean | null | readonly UiComponentPropValue[] | {
|
|
5
6
|
readonly [key: string]: UiComponentPropValue;
|
|
6
7
|
};
|
|
@@ -15,6 +16,7 @@ export interface UiComponentPropSchema {
|
|
|
15
16
|
readonly enum?: readonly (number | string)[];
|
|
16
17
|
readonly default?: UiComponentPropValue;
|
|
17
18
|
readonly itemSchema?: readonly UiComponentPropArrayItemSchema[];
|
|
19
|
+
readonly mediaKinds?: readonly MediaAssetKind[];
|
|
18
20
|
}
|
|
19
21
|
export interface UiComponentBlueprintIcon {
|
|
20
22
|
readonly name: string;
|
package/dist/ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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W,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,uBAAuB,CAAC;CAC9C"}
|
package/dist/ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentEventDtoKind } from './types';\n\nexport type UiComponentCategory = 'component' | 'foundation' | 'layout' | 'pattern';\n\nexport type UiComponentPropType =\n | 'action'\n | 'array'\n | 'boolean'\n | 'color'\n | 'enum'\n | 'imageAsset'\n | 'number'\n | 'radius'\n | 'shadow'\n | 'spacing'\n | 'string'\n | 'typographySize'\n | 'typographyWeight';\n\nexport type UiComponentPropValue =\n | string\n | number\n | boolean\n | null\n | readonly UiComponentPropValue[]\n | {\n readonly [key: string]: UiComponentPropValue;\n };\n\nexport interface UiComponentPropArrayItemSchema {\n readonly key: string;\n readonly schema: UiComponentPropSchema;\n}\n\nexport interface UiComponentPropSchema {\n readonly type: UiComponentPropType;\n readonly category: string;\n readonly label?: string;\n readonly enum?: readonly (number | string)[];\n readonly default?: UiComponentPropValue;\n readonly itemSchema?: readonly UiComponentPropArrayItemSchema[];\n}\n\nexport interface UiComponentBlueprintIcon {\n readonly name: string;\n readonly provider?: string;\n}\n\nexport interface UiComponentBlueprint {\n readonly label: string;\n readonly icon?: UiComponentBlueprintIcon;\n readonly defaultProps?: Readonly<Record<string, UiComponentPropValue>>;\n}\n\nexport interface UiComponentI18nFieldMeta {\n readonly keyProp: string;\n readonly defaultTextProp: string;\n}\n\nexport interface UiComponentI18nMeta {\n readonly fields: readonly UiComponentI18nFieldMeta[];\n}\n\nexport type UiComponentEventPayloadKind = ComponentEventDtoKind | (string & {});\n\nexport type UiComponentEventPayloadFieldType =\n | 'boolean'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | 'unknown';\n\nexport interface UiComponentEventPayloadFieldMeta {\n readonly path: string;\n readonly type: UiComponentEventPayloadFieldType;\n readonly label?: string;\n readonly description?: string;\n}\n\nexport interface UiComponentEventMeta {\n readonly label: string;\n readonly eventType: UiComponentEventPayloadKind;\n readonly description?: string;\n readonly payloadFields?: readonly UiComponentEventPayloadFieldMeta[];\n}\n\nexport type UiBindableValueType =\n | 'array'\n | 'boolean'\n | 'date'\n | 'imageAsset'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | 'unknown';\n\nexport interface UiBindableValueFieldMeta {\n readonly path: string;\n readonly type: UiBindableValueType;\n readonly label?: string;\n readonly description?: string;\n readonly required?: boolean;\n}\n\nexport interface UiBindableValueMeta {\n readonly type: UiBindableValueType;\n readonly label?: string;\n readonly description?: string;\n readonly fields?: readonly UiBindableValueFieldMeta[];\n readonly itemType?: UiBindableValueType;\n}\n\nexport interface UiBindablePropMeta {\n readonly value: UiBindableValueMeta;\n readonly label?: string;\n readonly description?: string;\n readonly required?: boolean;\n readonly acceptsFallback?: boolean;\n readonly acceptsTransforms?: boolean;\n}\n\nexport interface UiBindableEventPayloadMeta {\n readonly eventType: UiComponentEventPayloadKind;\n readonly fields?: readonly UiComponentEventPayloadFieldMeta[];\n}\n\nexport interface UiBindableEventMeta {\n readonly label?: string;\n readonly description?: string;\n readonly payload?: UiBindableEventPayloadMeta;\n}\n\nexport interface UiComponentBindingMeta {\n readonly props?: Readonly<Record<string, UiBindablePropMeta>>;\n readonly events?: Readonly<Record<string, UiBindableEventMeta>>;\n}\n\nexport interface UiComponentSlotMeta {\n readonly label?: string;\n readonly allowedChildren?: readonly string[];\n}\n\nexport interface UiComponentMeta {\n readonly name: string;\n readonly category: UiComponentCategory;\n readonly description?: string;\n readonly directManifestNode: boolean;\n readonly allowedChildren: readonly string[];\n readonly bindings?: UiComponentBindingMeta;\n readonly blueprint?: UiComponentBlueprint;\n readonly events?: Readonly<Record<string, UiComponentEventMeta>>;\n readonly i18n?: UiComponentI18nMeta;\n readonly slots?: Readonly<Record<string, UiComponentSlotMeta>>;\n readonly note?: string;\n readonly props: Readonly<Record<string, UiComponentPropSchema>>;\n}\n\nexport type UiComponentMetaRegistry = Readonly<Record<string, UiComponentMeta>>;\n\nexport interface UiComponentPackageManifest {\n readonly packageName: string;\n readonly displayName?: string;\n readonly components: UiComponentMetaRegistry;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"","sourcesContent":["import type { MediaAssetKind } from './media';\nimport type { ComponentEventDtoKind } from './types';\n\nexport type UiComponentCategory = 'component' | 'foundation' | 'layout' | 'pattern';\n\nexport type UiComponentPropType =\n | 'action'\n | 'array'\n | 'boolean'\n | 'color'\n | 'enum'\n | 'imageAsset'\n | 'media'\n | 'number'\n | 'radius'\n | 'shadow'\n | 'spacing'\n | 'string'\n | 'typographySize'\n | 'typographyWeight';\n\nexport type UiComponentPropValue =\n | string\n | number\n | boolean\n | null\n | readonly UiComponentPropValue[]\n | {\n readonly [key: string]: UiComponentPropValue;\n };\n\nexport interface UiComponentPropArrayItemSchema {\n readonly key: string;\n readonly schema: UiComponentPropSchema;\n}\n\nexport interface UiComponentPropSchema {\n readonly type: UiComponentPropType;\n readonly category: string;\n readonly label?: string;\n readonly enum?: readonly (number | string)[];\n readonly default?: UiComponentPropValue;\n readonly itemSchema?: readonly UiComponentPropArrayItemSchema[];\n readonly mediaKinds?: readonly MediaAssetKind[];\n}\n\nexport interface UiComponentBlueprintIcon {\n readonly name: string;\n readonly provider?: string;\n}\n\nexport interface UiComponentBlueprint {\n readonly label: string;\n readonly icon?: UiComponentBlueprintIcon;\n readonly defaultProps?: Readonly<Record<string, UiComponentPropValue>>;\n}\n\nexport interface UiComponentI18nFieldMeta {\n readonly keyProp: string;\n readonly defaultTextProp: string;\n}\n\nexport interface UiComponentI18nMeta {\n readonly fields: readonly UiComponentI18nFieldMeta[];\n}\n\nexport type UiComponentEventPayloadKind = ComponentEventDtoKind | (string & {});\n\nexport type UiComponentEventPayloadFieldType =\n | 'boolean'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | 'unknown';\n\nexport interface UiComponentEventPayloadFieldMeta {\n readonly path: string;\n readonly type: UiComponentEventPayloadFieldType;\n readonly label?: string;\n readonly description?: string;\n}\n\nexport interface UiComponentEventMeta {\n readonly label: string;\n readonly eventType: UiComponentEventPayloadKind;\n readonly description?: string;\n readonly payloadFields?: readonly UiComponentEventPayloadFieldMeta[];\n}\n\nexport type UiBindableValueType =\n | 'array'\n | 'boolean'\n | 'date'\n | 'imageAsset'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | 'unknown';\n\nexport interface UiBindableValueFieldMeta {\n readonly path: string;\n readonly type: UiBindableValueType;\n readonly label?: string;\n readonly description?: string;\n readonly required?: boolean;\n}\n\nexport interface UiBindableValueMeta {\n readonly type: UiBindableValueType;\n readonly label?: string;\n readonly description?: string;\n readonly fields?: readonly UiBindableValueFieldMeta[];\n readonly itemType?: UiBindableValueType;\n}\n\nexport interface UiBindablePropMeta {\n readonly value: UiBindableValueMeta;\n readonly label?: string;\n readonly description?: string;\n readonly required?: boolean;\n readonly acceptsFallback?: boolean;\n readonly acceptsTransforms?: boolean;\n}\n\nexport interface UiBindableEventPayloadMeta {\n readonly eventType: UiComponentEventPayloadKind;\n readonly fields?: readonly UiComponentEventPayloadFieldMeta[];\n}\n\nexport interface UiBindableEventMeta {\n readonly label?: string;\n readonly description?: string;\n readonly payload?: UiBindableEventPayloadMeta;\n}\n\nexport interface UiComponentBindingMeta {\n readonly props?: Readonly<Record<string, UiBindablePropMeta>>;\n readonly events?: Readonly<Record<string, UiBindableEventMeta>>;\n}\n\nexport interface UiComponentSlotMeta {\n readonly label?: string;\n readonly allowedChildren?: readonly string[];\n}\n\nexport interface UiComponentMeta {\n readonly name: string;\n readonly category: UiComponentCategory;\n readonly description?: string;\n readonly directManifestNode: boolean;\n readonly allowedChildren: readonly string[];\n readonly bindings?: UiComponentBindingMeta;\n readonly blueprint?: UiComponentBlueprint;\n readonly events?: Readonly<Record<string, UiComponentEventMeta>>;\n readonly i18n?: UiComponentI18nMeta;\n readonly slots?: Readonly<Record<string, UiComponentSlotMeta>>;\n readonly note?: string;\n readonly props: Readonly<Record<string, UiComponentPropSchema>>;\n}\n\nexport type UiComponentMetaRegistry = Readonly<Record<string, UiComponentMeta>>;\n\nexport interface UiComponentPackageManifest {\n readonly packageName: string;\n readonly displayName?: string;\n readonly components: UiComponentMetaRegistry;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -12,8 +12,9 @@ const DEPLOY_KEYS = new Set(['targets']);
|
|
|
12
12
|
const TARGET_KEYS = new Set(['web', 'android', 'ios']);
|
|
13
13
|
const PROVIDER_KEYS = new Set(['build', 'publish']);
|
|
14
14
|
const WEB_KEYS = new Set(['enabled', 'providers']);
|
|
15
|
-
const ANDROID_KEYS = new Set(['enabled', 'package', 'providers']);
|
|
16
|
-
const IOS_KEYS = new Set(['enabled', 'bundleIdentifier', 'providers']);
|
|
15
|
+
const ANDROID_KEYS = new Set(['enabled', 'package', 'scheme', 'providers']);
|
|
16
|
+
const IOS_KEYS = new Set(['enabled', 'bundleIdentifier', 'scheme', 'providers']);
|
|
17
|
+
const URI_SCHEME_PATTERN = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
|
|
17
18
|
|
|
18
19
|
export function isAppDeployManifest(value: unknown): value is AppDeployManifest {
|
|
19
20
|
return isRecord(value) && hasOnlyKeys(value, DEPLOY_KEYS) && isAppDeployTargets(value.targets);
|
|
@@ -44,6 +45,7 @@ function isAndroidTarget(value: unknown): value is AppDeployAndroidTargetConfig
|
|
|
44
45
|
hasOnlyKeys(value, ANDROID_KEYS) &&
|
|
45
46
|
typeof value.enabled === 'boolean' &&
|
|
46
47
|
isNonEmptyString(value.package) &&
|
|
48
|
+
isOptionalScheme(value.scheme) &&
|
|
47
49
|
isOptionalProviders(value.providers)
|
|
48
50
|
);
|
|
49
51
|
}
|
|
@@ -54,10 +56,15 @@ function isIosTarget(value: unknown): value is AppDeployIosTargetConfig {
|
|
|
54
56
|
hasOnlyKeys(value, IOS_KEYS) &&
|
|
55
57
|
typeof value.enabled === 'boolean' &&
|
|
56
58
|
isNonEmptyString(value.bundleIdentifier) &&
|
|
59
|
+
isOptionalScheme(value.scheme) &&
|
|
57
60
|
isOptionalProviders(value.providers)
|
|
58
61
|
);
|
|
59
62
|
}
|
|
60
63
|
|
|
64
|
+
function isOptionalScheme(value: unknown): value is string | undefined {
|
|
65
|
+
return value === undefined || (typeof value === 'string' && URI_SCHEME_PATTERN.test(value));
|
|
66
|
+
}
|
|
67
|
+
|
|
61
68
|
function isOptionalProviders(value: unknown): value is AppDeployProviderSelection | undefined {
|
|
62
69
|
return value === undefined || isProviderSelection(value);
|
|
63
70
|
}
|
package/src/deploy.test.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { join } from 'node:path';
|
|
|
4
4
|
import { describe, expect, it } from 'bun:test';
|
|
5
5
|
|
|
6
6
|
import { isAppManifest } from './appManifest';
|
|
7
|
-
import { APP_DEPLOY_TARGET_IDS, isAppDeployManifest } from './deploy';
|
|
7
|
+
import { APP_DEPLOY_ENVIRONMENT_IDS, APP_DEPLOY_TARGET_IDS, isAppDeployManifest } from './deploy';
|
|
8
8
|
import { DEPLOYMENT_TARGETS } from './types';
|
|
9
9
|
|
|
10
10
|
function createManifest(deploy?: unknown): Record<string, unknown> {
|
|
@@ -39,18 +39,24 @@ describe('app deployment contracts', () => {
|
|
|
39
39
|
expect(DEPLOYMENT_TARGETS).toEqual(['minikube']);
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
it('
|
|
42
|
+
it('defines one logical environment vocabulary across platform-specific execution', () => {
|
|
43
|
+
expect(APP_DEPLOY_ENVIRONMENT_IDS).toEqual(['local', 'preview', 'production']);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('accepts canonical web, Android, and iOS desired state with stable native schemes', () => {
|
|
43
47
|
const deploy = {
|
|
44
48
|
targets: {
|
|
45
49
|
web: { enabled: true, providers: { publish: 'eas' } },
|
|
46
50
|
android: {
|
|
47
51
|
enabled: true,
|
|
48
52
|
package: 'com.example.app',
|
|
53
|
+
scheme: 'example-app',
|
|
49
54
|
providers: { build: 'eas', publish: 'google-play' },
|
|
50
55
|
},
|
|
51
56
|
ios: {
|
|
52
57
|
enabled: false,
|
|
53
58
|
bundleIdentifier: 'com.example.app',
|
|
59
|
+
scheme: 'example-app',
|
|
54
60
|
providers: { build: 'eas', publish: 'app-store-connect' },
|
|
55
61
|
},
|
|
56
62
|
},
|
|
@@ -60,6 +66,40 @@ describe('app deployment contracts', () => {
|
|
|
60
66
|
expect(isAppManifest(createManifest(deploy))).toBe(true);
|
|
61
67
|
});
|
|
62
68
|
|
|
69
|
+
it('keeps native schemes optional for existing deployment manifests', () => {
|
|
70
|
+
expect(
|
|
71
|
+
isAppDeployManifest({
|
|
72
|
+
targets: {
|
|
73
|
+
android: { enabled: true, package: 'com.example.app' },
|
|
74
|
+
ios: { enabled: true, bundleIdentifier: 'com.example.app' },
|
|
75
|
+
},
|
|
76
|
+
}),
|
|
77
|
+
).toBe(true);
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it('accepts every supported platform combination', () => {
|
|
81
|
+
const web = { enabled: true };
|
|
82
|
+
const android = { enabled: true, package: 'com.example.app', scheme: 'example-app' };
|
|
83
|
+
const ios = {
|
|
84
|
+
enabled: true,
|
|
85
|
+
bundleIdentifier: 'com.example.app',
|
|
86
|
+
scheme: 'example-app',
|
|
87
|
+
};
|
|
88
|
+
const combinations = [
|
|
89
|
+
{ web },
|
|
90
|
+
{ android },
|
|
91
|
+
{ ios },
|
|
92
|
+
{ web, android },
|
|
93
|
+
{ web, ios },
|
|
94
|
+
{ android, ios },
|
|
95
|
+
{ web, android, ios },
|
|
96
|
+
];
|
|
97
|
+
|
|
98
|
+
for (const targets of combinations) {
|
|
99
|
+
expect(isAppDeployManifest({ targets })).toBe(true);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
63
103
|
it('keeps deployment optional and accepts an empty target registry structurally', () => {
|
|
64
104
|
expect(isAppManifest(createManifest())).toBe(true);
|
|
65
105
|
expect(isAppDeployManifest({ targets: {} })).toBe(true);
|
|
@@ -86,7 +126,14 @@ describe('app deployment contracts', () => {
|
|
|
86
126
|
{ targets: { desktop: { enabled: true } } },
|
|
87
127
|
{ targets: { web: { enabled: 'yes' } } },
|
|
88
128
|
{ targets: { android: { enabled: true, package: '' } } },
|
|
129
|
+
{ targets: { android: { enabled: true, package: 'com.example.app', scheme: '' } } },
|
|
130
|
+
{ targets: { android: { enabled: true, package: 'com.example.app', scheme: '9app' } } },
|
|
89
131
|
{ targets: { ios: { enabled: true, bundleIdentifier: ' ' } } },
|
|
132
|
+
{
|
|
133
|
+
targets: {
|
|
134
|
+
ios: { enabled: true, bundleIdentifier: 'com.example.app', scheme: 'bad scheme' },
|
|
135
|
+
},
|
|
136
|
+
},
|
|
90
137
|
{ targets: { web: { enabled: true, providers: { publish: '' } } } },
|
|
91
138
|
{ targets: { web: { enabled: true, providerConfig: { region: 'eu' } } } },
|
|
92
139
|
{ targets: { web: { enabled: true, credentials: { token: 'secret' } } } },
|
|
@@ -102,7 +149,13 @@ describe('app deployment contracts', () => {
|
|
|
102
149
|
expect(
|
|
103
150
|
isAppManifest(
|
|
104
151
|
createManifest({
|
|
105
|
-
targets: {
|
|
152
|
+
targets: {
|
|
153
|
+
android: {
|
|
154
|
+
enabled: true,
|
|
155
|
+
package: 'com.example.app',
|
|
156
|
+
credentials: {},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
106
159
|
}),
|
|
107
160
|
),
|
|
108
161
|
).toBe(false);
|
package/src/deploy.ts
CHANGED
|
@@ -2,6 +2,17 @@ export const APP_DEPLOY_TARGET_IDS = ['web', 'android', 'ios'] as const;
|
|
|
2
2
|
|
|
3
3
|
export type AppDeployTargetId = (typeof APP_DEPLOY_TARGET_IDS)[number];
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Logical application environments shared across platform-specific planning.
|
|
7
|
+
*
|
|
8
|
+
* `local` maps to local Web, iOS development, and Android debug execution.
|
|
9
|
+
* Environment-specific endpoints, signing material, and credentials are owned
|
|
10
|
+
* by their dedicated deployment/infra configuration rather than this identity contract.
|
|
11
|
+
*/
|
|
12
|
+
export const APP_DEPLOY_ENVIRONMENT_IDS = ['local', 'preview', 'production'] as const;
|
|
13
|
+
|
|
14
|
+
export type AppDeployEnvironmentId = (typeof APP_DEPLOY_ENVIRONMENT_IDS)[number];
|
|
15
|
+
|
|
5
16
|
export interface AppDeployProviderSelection {
|
|
6
17
|
readonly build?: string;
|
|
7
18
|
readonly publish?: string;
|
|
@@ -15,12 +26,16 @@ export interface AppDeployWebTargetConfig {
|
|
|
15
26
|
export interface AppDeployAndroidTargetConfig {
|
|
16
27
|
readonly enabled: boolean;
|
|
17
28
|
readonly package: string;
|
|
29
|
+
/** Stable application URI scheme used for target-aware deep links such as OAuth callbacks. */
|
|
30
|
+
readonly scheme?: string;
|
|
18
31
|
readonly providers?: AppDeployProviderSelection;
|
|
19
32
|
}
|
|
20
33
|
|
|
21
34
|
export interface AppDeployIosTargetConfig {
|
|
22
35
|
readonly enabled: boolean;
|
|
23
36
|
readonly bundleIdentifier: string;
|
|
37
|
+
/** Stable application URI scheme used for target-aware deep links such as OAuth callbacks. */
|
|
38
|
+
readonly scheme?: string;
|
|
24
39
|
readonly providers?: AppDeployProviderSelection;
|
|
25
40
|
}
|
|
26
41
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import type { UiComponentMeta } from './ui';
|
|
4
|
+
|
|
5
|
+
const imageComponentMeta = {
|
|
6
|
+
name: 'Image',
|
|
7
|
+
category: 'component',
|
|
8
|
+
directManifestNode: true,
|
|
9
|
+
allowedChildren: [],
|
|
10
|
+
props: {
|
|
11
|
+
source: {
|
|
12
|
+
type: 'media',
|
|
13
|
+
category: 'Content',
|
|
14
|
+
label: 'Source',
|
|
15
|
+
mediaKinds: ['image'],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
} as const satisfies UiComponentMeta;
|
|
19
|
+
|
|
20
|
+
describe('UI media authoring metadata', () => {
|
|
21
|
+
it('describes media-backed properties independently from concrete providers', () => {
|
|
22
|
+
expect(imageComponentMeta.props.source).toEqual({
|
|
23
|
+
type: 'media',
|
|
24
|
+
category: 'Content',
|
|
25
|
+
label: 'Source',
|
|
26
|
+
mediaKinds: ['image'],
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('remains serializable for package manifests and Studio metadata', () => {
|
|
31
|
+
expect(JSON.parse(JSON.stringify(imageComponentMeta))).toEqual(imageComponentMeta);
|
|
32
|
+
});
|
|
33
|
+
});
|
package/src/ui.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MediaAssetKind } from './media';
|
|
1
2
|
import type { ComponentEventDtoKind } from './types';
|
|
2
3
|
|
|
3
4
|
export type UiComponentCategory = 'component' | 'foundation' | 'layout' | 'pattern';
|
|
@@ -9,6 +10,7 @@ export type UiComponentPropType =
|
|
|
9
10
|
| 'color'
|
|
10
11
|
| 'enum'
|
|
11
12
|
| 'imageAsset'
|
|
13
|
+
| 'media'
|
|
12
14
|
| 'number'
|
|
13
15
|
| 'radius'
|
|
14
16
|
| 'shadow'
|
|
@@ -39,6 +41,7 @@ export interface UiComponentPropSchema {
|
|
|
39
41
|
readonly enum?: readonly (number | string)[];
|
|
40
42
|
readonly default?: UiComponentPropValue;
|
|
41
43
|
readonly itemSchema?: readonly UiComponentPropArrayItemSchema[];
|
|
44
|
+
readonly mediaKinds?: readonly MediaAssetKind[];
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
export interface UiComponentBlueprintIcon {
|