@ankhorage/contracts 22.0.0 → 22.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ankhorage/contracts
2
2
 
3
+ ## 22.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - dae0cab: Keep the portable splash-screen manifest contract independent from Expo package installation.
8
+
3
9
  ## 22.0.0
4
10
 
5
11
  ### Major Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # @ankhorage/contracts
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v19.5.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v22.0.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
7
 
8
8
  Serializable app, action, theme, auth, and secret-store contracts for Ankhorage.
9
9
 
@@ -22,4 +22,6 @@ Serializable app, action, theme, auth, and secret-store contracts for Ankhorage.
22
22
  - [isInfraManifest sequence](././paradox/diagrams/sequences/is-infra-manifest.mmd)
23
23
  - [isInfraWorkloadSpec sequence](././paradox/diagrams/sequences/is-infra-workload-spec.mmd)
24
24
  - [isMediaAssetReference sequence](././paradox/diagrams/sequences/is-media-asset-reference.mmd)
25
+ - [isSerializableSet sequence](././paradox/diagrams/sequences/is-serializable-set.mmd)
26
+ - [isSerializableValue sequence](././paradox/diagrams/sequences/is-serializable-value.mmd)
25
27
  - [parseInfraManifest sequence](././paradox/diagrams/sequences/parse-infra-manifest.mmd)
@@ -1,15 +1,12 @@
1
- import type { Props as ExpoSplashScreenPluginProps } from 'expo-splash-screen/plugin';
2
1
  import type { MediaAssetReference } from '../media';
3
- type ExpoSplashScreenRootProps = Pick<ExpoSplashScreenPluginProps, 'backgroundColor' | 'image' | 'imageWidth' | 'resizeMode'>;
4
- type PortableSplashScreenProps<T extends {
5
- readonly image?: string;
6
- }> = Readonly<Omit<T, 'image'>> & {
2
+ export type SplashScreenResizeMode = 'contain' | 'cover' | 'native';
3
+ export interface SplashScreenModeSpec {
4
+ readonly backgroundColor?: string;
7
5
  readonly image?: MediaAssetReference;
8
- };
9
- export type SplashScreenResizeMode = NonNullable<ExpoSplashScreenPluginProps['resizeMode']>;
10
- export type SplashScreenModeSpec = PortableSplashScreenProps<NonNullable<ExpoSplashScreenPluginProps['dark']>>;
11
- export type SplashScreenSpec = PortableSplashScreenProps<ExpoSplashScreenRootProps> & {
6
+ }
7
+ export interface SplashScreenSpec extends SplashScreenModeSpec {
8
+ readonly imageWidth?: number;
9
+ readonly resizeMode?: SplashScreenResizeMode;
12
10
  readonly dark?: SplashScreenModeSpec;
13
- };
14
- export {};
11
+ }
15
12
  //# sourceMappingURL=splashScreen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"splashScreen.d.ts","sourceRoot":"","sources":["../../src/appManifest/splashScreen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,IAAI,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAEtF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,KAAK,yBAAyB,GAAG,IAAI,CACnC,2BAA2B,EAC3B,iBAAiB,GAAG,OAAO,GAAG,YAAY,GAAG,YAAY,CAC1D,CAAC;AAEF,KAAK,yBAAyB,CAAC,CAAC,SAAS;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,IAAI,QAAQ,CAC9E,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CACjB,GAAG;IACF,QAAQ,CAAC,KAAK,CAAC,EAAE,mBAAmB,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,2BAA2B,CAAC,YAAY,CAAC,CAAC,CAAC;AAE5F,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,CAC1D,WAAW,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC,CACjD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,yBAAyB,CAAC,GAAG;IACpF,QAAQ,CAAC,IAAI,CAAC,EAAE,oBAAoB,CAAC;CACtC,CAAC"}
1
+ {"version":3,"file":"splashScreen.d.ts","sourceRoot":"","sources":["../../src/appManifest/splashScreen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEpE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,mBAAmB,CAAC;CACtC;AAED,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,CAAC,EAAE,sBAAsB,CAAC;IAC7C,QAAQ,CAAC,IAAI,CAAC,EAAE,oBAAoB,CAAC;CACtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"splashScreen.js","sourceRoot":"","sources":["../../src/appManifest/splashScreen.ts"],"names":[],"mappings":"","sourcesContent":["import type { Props as ExpoSplashScreenPluginProps } from 'expo-splash-screen/plugin';\n\nimport type { MediaAssetReference } from '../media';\n\ntype ExpoSplashScreenRootProps = Pick<\n ExpoSplashScreenPluginProps,\n 'backgroundColor' | 'image' | 'imageWidth' | 'resizeMode'\n>;\n\ntype PortableSplashScreenProps<T extends { readonly image?: string }> = Readonly<\n Omit<T, 'image'>\n> & {\n readonly image?: MediaAssetReference;\n};\n\nexport type SplashScreenResizeMode = NonNullable<ExpoSplashScreenPluginProps['resizeMode']>;\n\nexport type SplashScreenModeSpec = PortableSplashScreenProps<\n NonNullable<ExpoSplashScreenPluginProps['dark']>\n>;\n\nexport type SplashScreenSpec = PortableSplashScreenProps<ExpoSplashScreenRootProps> & {\n readonly dark?: SplashScreenModeSpec;\n};\n"]}
1
+ {"version":3,"file":"splashScreen.js","sourceRoot":"","sources":["../../src/appManifest/splashScreen.ts"],"names":[],"mappings":"","sourcesContent":["import type { MediaAssetReference } from '../media';\n\nexport type SplashScreenResizeMode = 'contain' | 'cover' | 'native';\n\nexport interface SplashScreenModeSpec {\n readonly backgroundColor?: string;\n readonly image?: MediaAssetReference;\n}\n\nexport interface SplashScreenSpec extends SplashScreenModeSpec {\n readonly imageWidth?: number;\n readonly resizeMode?: SplashScreenResizeMode;\n readonly dark?: SplashScreenModeSpec;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhorage/contracts",
3
- "version": "22.0.0",
3
+ "version": "22.0.1",
4
4
  "main": "./dist/index.js",
5
5
  "ankh": {
6
6
  "category": "contracts",
@@ -11,8 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@ankhorage/color-theory": "^0.3.0",
14
- "@ankhorage/utility": "^0.8.0",
15
- "expo-splash-screen": "~57.0.9"
14
+ "@ankhorage/utility": "^0.8.0"
16
15
  },
17
16
  "devDependencies": {
18
17
  "@ankhorage/devtools": "^1.12.0",
@@ -3,7 +3,7 @@ import { describe, expect, it } from 'bun:test';
3
3
  import type { AppManifest, SplashScreenSpec } from '../index';
4
4
 
5
5
  describe('AppManifest splash screen contract', () => {
6
- it('accepts portable media references with Expo-owned option types', () => {
6
+ it('accepts portable media references with the canonical splash option shape', () => {
7
7
  const splashScreen: SplashScreenSpec = {
8
8
  backgroundColor: '#ffffff',
9
9
  image: { mediaId: 'splash-logo' },
@@ -23,13 +23,13 @@ describe('AppManifest splash screen contract', () => {
23
23
  it('keeps root-only Expo options out of dark-mode overrides', () => {
24
24
  const splashWithDarkImageWidth: SplashScreenSpec = {
25
25
  dark: {
26
- // @ts-expect-error Expo dark-mode options do not include image sizing.
26
+ // @ts-expect-error Dark-mode overrides do not include image sizing.
27
27
  imageWidth: 160,
28
28
  },
29
29
  };
30
30
  const splashWithDarkResizeMode: SplashScreenSpec = {
31
31
  dark: {
32
- // @ts-expect-error Expo dark-mode options do not include resize mode.
32
+ // @ts-expect-error Dark-mode overrides do not include resize mode.
33
33
  resizeMode: 'contain',
34
34
  },
35
35
  };
@@ -1,24 +1,14 @@
1
- import type { Props as ExpoSplashScreenPluginProps } from 'expo-splash-screen/plugin';
2
-
3
1
  import type { MediaAssetReference } from '../media';
4
2
 
5
- type ExpoSplashScreenRootProps = Pick<
6
- ExpoSplashScreenPluginProps,
7
- 'backgroundColor' | 'image' | 'imageWidth' | 'resizeMode'
8
- >;
3
+ export type SplashScreenResizeMode = 'contain' | 'cover' | 'native';
9
4
 
10
- type PortableSplashScreenProps<T extends { readonly image?: string }> = Readonly<
11
- Omit<T, 'image'>
12
- > & {
5
+ export interface SplashScreenModeSpec {
6
+ readonly backgroundColor?: string;
13
7
  readonly image?: MediaAssetReference;
14
- };
15
-
16
- export type SplashScreenResizeMode = NonNullable<ExpoSplashScreenPluginProps['resizeMode']>;
17
-
18
- export type SplashScreenModeSpec = PortableSplashScreenProps<
19
- NonNullable<ExpoSplashScreenPluginProps['dark']>
20
- >;
8
+ }
21
9
 
22
- export type SplashScreenSpec = PortableSplashScreenProps<ExpoSplashScreenRootProps> & {
10
+ export interface SplashScreenSpec extends SplashScreenModeSpec {
11
+ readonly imageWidth?: number;
12
+ readonly resizeMode?: SplashScreenResizeMode;
23
13
  readonly dark?: SplashScreenModeSpec;
24
- };
14
+ }