@ankhorage/contracts 8.2.0 → 10.0.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/dist/appManifest/screens.d.ts +2 -1
- package/dist/appManifest/screens.d.ts.map +1 -1
- package/dist/appManifest/screens.js +102 -9
- package/dist/appManifest/screens.js.map +1 -1
- package/dist/appManifest.js +4 -4
- package/dist/appManifest.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/navigator.d.ts +96 -0
- package/dist/navigator.d.ts.map +1 -0
- package/dist/navigator.js +24 -0
- package/dist/navigator.js.map +1 -0
- package/dist/repository.d.ts +1 -1
- package/dist/repository.d.ts.map +1 -1
- package/dist/repository.js.map +1 -1
- package/dist/types.d.ts +4 -28
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -1
- package/dist/types.js.map +1 -1
- package/package.json +7 -2
- package/src/appManifest/screens.ts +144 -9
- package/src/appManifest.ts +4 -4
- package/src/index.ts +1 -0
- package/src/navigator.test.ts +121 -0
- package/src/navigator.ts +136 -0
- package/src/repository.ts +1 -1
- package/src/types.ts +4 -31
package/src/types.ts
CHANGED
|
@@ -9,7 +9,8 @@ import type {
|
|
|
9
9
|
import type { ApiDefinitionList, DataSourceRegistry } from './data';
|
|
10
10
|
import type { AppDeployManifest } from './deploy';
|
|
11
11
|
import type { MediaManifest } from './media';
|
|
12
|
-
import type {
|
|
12
|
+
import type { AppNavigatorManifest } from './navigator';
|
|
13
|
+
import type { RepositoryManifest } from './repository';
|
|
13
14
|
import type { ScreenRequirements } from './requirements';
|
|
14
15
|
import type { ThemeGlobalTokenOverrides, ThemeRecipeOverrides } from './theme';
|
|
15
16
|
|
|
@@ -135,9 +136,6 @@ export type ComponentEventDtoKind =
|
|
|
135
136
|
export type KnownComponentEventDto =
|
|
136
137
|
ButtonPressEventDto | CollectionItemPressEventDto | FormSubmitEventDto;
|
|
137
138
|
|
|
138
|
-
export const NAVIGATOR_TYPES = ['stack', 'tabs', 'drawer'] as const;
|
|
139
|
-
export type NavigatorType = (typeof NAVIGATOR_TYPES)[number];
|
|
140
|
-
|
|
141
139
|
export const APP_CATEGORIES = [
|
|
142
140
|
'books_reading',
|
|
143
141
|
'business_productivity',
|
|
@@ -258,31 +256,6 @@ export interface ScreenSpec {
|
|
|
258
256
|
requires?: ScreenRequirements;
|
|
259
257
|
}
|
|
260
258
|
|
|
261
|
-
export interface NavigatorSpec {
|
|
262
|
-
type: NavigatorType;
|
|
263
|
-
initialRouteName?: string;
|
|
264
|
-
routes: RouteDefinition[];
|
|
265
|
-
options?: Record<string, unknown>;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
export interface RouteDefinition {
|
|
269
|
-
name: string;
|
|
270
|
-
path?: string;
|
|
271
|
-
label?: string;
|
|
272
|
-
icon?: IconSpec;
|
|
273
|
-
/**
|
|
274
|
-
* Whether this route appears in Tabs and Drawer primary navigation.
|
|
275
|
-
*
|
|
276
|
-
* Omitted routes are visible by default. Setting this to `false` hides the
|
|
277
|
-
* route from primary navigation without making it unnavigable. Stack
|
|
278
|
-
* navigators preserve the value but do not present primary navigation.
|
|
279
|
-
*/
|
|
280
|
-
showInPrimaryNavigation?: boolean;
|
|
281
|
-
guards?: string[];
|
|
282
|
-
screenId?: string;
|
|
283
|
-
navigator?: NavigatorSpec;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
259
|
export type SplashScreenResizeMode = 'contain' | 'cover' | 'native';
|
|
287
260
|
|
|
288
261
|
export interface SplashScreenAssetSpec {
|
|
@@ -396,10 +369,10 @@ export interface AppManifest {
|
|
|
396
369
|
/** App distribution desired state. Infrastructure deployment remains under `infra.deployment`. */
|
|
397
370
|
deploy?: AppDeployManifest;
|
|
398
371
|
infra: InfraManifest;
|
|
399
|
-
navigator:
|
|
372
|
+
navigator: AppNavigatorManifest;
|
|
400
373
|
screens: Record<string, ScreenSpec>;
|
|
401
374
|
dataSources?: DataSourceRegistry;
|
|
402
375
|
dataBindings?: ComponentDataBindingRegistry;
|
|
403
|
-
repository?:
|
|
376
|
+
repository?: RepositoryManifest;
|
|
404
377
|
settings: AppSettings;
|
|
405
378
|
}
|