piral-core 0.15.11 → 0.15.12-beta.5531

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/app.codegen.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { LoadPiletsOptions } from 'prial-base';
1
+ import type { LoadPiletsOptions } from 'piral-base';
2
2
  import type { DebuggerExtensionOptions } from 'piral-debug-utils';
3
3
  import type { ComponentType } from 'react';
4
4
  import type { RouteComponentProps } from 'react-router';
@@ -73,7 +73,7 @@ export interface PiralPageMeta extends PiralCustomPageMeta {
73
73
  /**
74
74
  * Shorthand for the definition of an extension component.
75
75
  */
76
- export declare type AnyExtensionComponent<TName> = TName extends keyof PiralExtensionSlotMap ? AnyComponent<ExtensionComponentProps<TName>> : TName extends string ? AnyComponent<ExtensionComponentProps<any>> : AnyComponent<ExtensionComponentProps<TName>>;
76
+ export type AnyExtensionComponent<TName> = TName extends keyof PiralExtensionSlotMap ? AnyComponent<ExtensionComponentProps<TName>> : TName extends string ? AnyComponent<ExtensionComponentProps<any>> : AnyComponent<ExtensionComponentProps<TName>>;
77
77
  /**
78
78
  * Defines the Pilet API from piral-core.
79
79
  * This interface will be consumed by pilet developers so that their pilet can interact with the piral instance.
@@ -1,21 +1,21 @@
1
- export declare type ValuesOf<T> = T extends {
1
+ export type ValuesOf<T> = T extends {
2
2
  [_ in keyof T]: infer U;
3
3
  } ? U : never;
4
- export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
5
- export declare type RemainingArgs<T> = T extends (_: any, ...args: infer U) => any ? U : never;
6
- export declare type DeepPartial<T> = {
4
+ export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
5
+ export type RemainingArgs<T> = T extends (_: any, ...args: infer U) => any ? U : never;
6
+ export type DeepPartial<T> = {
7
7
  [P in keyof T]?: T[P] extends Array<infer U> ? Array<DeepPartial<U>> : T[P] extends {} ? DeepPartial<T[P]> : T[P];
8
8
  };
9
- export declare type NestedPartial<T> = {
9
+ export type NestedPartial<T> = {
10
10
  [P in keyof T]?: T[P] extends Array<infer U> ? Array<Partial<U>> : T[P] extends {} ? Partial<T[P]> : T[P];
11
11
  };
12
- export declare type Dict<T> = Record<string, T>;
13
- export declare type Without<T, K> = Pick<T, Exclude<keyof T, K>>;
14
- export declare type FirstParameter<T extends (arg: any) => any> = T extends (arg: infer P) => any ? P : never;
15
- export declare type FirstParametersOf<T> = {
12
+ export type Dict<T> = Record<string, T>;
13
+ export type Without<T, K> = Pick<T, Exclude<keyof T, K>>;
14
+ export type FirstParameter<T extends (arg: any) => any> = T extends (arg: infer P) => any ? P : never;
15
+ export type FirstParametersOf<T> = {
16
16
  [K in keyof T]: T[K] extends (arg: any) => any ? FirstParameter<T[K]> : never;
17
17
  }[keyof T];
18
- export declare type UnionOf<T> = {
18
+ export type UnionOf<T> = {
19
19
  [K in keyof T]: T[K];
20
20
  }[keyof T];
21
- export declare type MaybeAsync<T> = T | (() => Promise<T>);
21
+ export type MaybeAsync<T> = T | (() => Promise<T>);
@@ -75,7 +75,7 @@ export interface ForeignComponent<TProps> {
75
75
  /**
76
76
  * Possible shapes for a component.
77
77
  */
78
- export declare type AnyComponent<T> = ComponentType<T> | FirstParametersOf<ComponentConverters<T>>;
78
+ export type AnyComponent<T> = ComponentType<T> | FirstParametersOf<ComponentConverters<T>>;
79
79
  /**
80
80
  * The error used when a route cannot be resolved.
81
81
  */
@@ -177,7 +177,7 @@ export interface Errors extends PiralCustomErrors {
177
177
  /**
178
178
  * The props for the ErrorInfo component.
179
179
  */
180
- export declare type ErrorInfoProps = UnionOf<Errors>;
180
+ export type ErrorInfoProps = UnionOf<Errors>;
181
181
  /**
182
182
  * The props of a Loading indicator component.
183
183
  */
@@ -91,4 +91,4 @@ export interface PiralStateConfiguration {
91
91
  /**
92
92
  * The configuration to be used in the Piral instance.
93
93
  */
94
- export declare type PiralConfiguration = PiralPiletConfiguration & PiralStateConfiguration;
94
+ export type PiralConfiguration = PiralPiletConfiguration & PiralStateConfiguration;
@@ -10,7 +10,7 @@ export interface SharedData<TValue = any> {
10
10
  /**
11
11
  * Defines the potential targets when storing data.
12
12
  */
13
- export declare type DataStoreTarget = 'memory' | 'local' | 'remote';
13
+ export type DataStoreTarget = 'memory' | 'local' | 'remote';
14
14
  /**
15
15
  * Defines the custom options for storing data.
16
16
  */
@@ -27,7 +27,7 @@ export interface CustomDataStoreOptions {
27
27
  /**
28
28
  * Defines the options to be used for storing data.
29
29
  */
30
- export declare type DataStoreOptions = DataStoreTarget | CustomDataStoreOptions;
30
+ export type DataStoreOptions = DataStoreTarget | CustomDataStoreOptions;
31
31
  /**
32
32
  * Defines the shape of a shared data item.
33
33
  */
@@ -54,8 +54,8 @@ export interface BaseExtensionSlotProps<TName, TParams> {
54
54
  /**
55
55
  * Gives the extension params shape for the given extension slot name.
56
56
  */
57
- export declare type ExtensionParams<TName> = TName extends keyof PiralExtensionSlotMap ? PiralExtensionSlotMap[TName] : TName extends string ? any : TName;
57
+ export type ExtensionParams<TName> = TName extends keyof PiralExtensionSlotMap ? PiralExtensionSlotMap[TName] : TName extends string ? any : TName;
58
58
  /**
59
59
  * The props for defining an extension slot.
60
60
  */
61
- export declare type ExtensionSlotProps<TName = string> = BaseExtensionSlotProps<TName extends string ? TName : string, ExtensionParams<TName>>;
61
+ export type ExtensionSlotProps<TName = string> = BaseExtensionSlotProps<TName extends string ? TName : string, ExtensionParams<TName>>;
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * The mapping of breakpoints to layout type index.
3
3
  */
4
- export declare type LayoutBreakpoints = [string, string, string];
4
+ export type LayoutBreakpoints = [string, string, string];
5
5
  /**
6
6
  * The different known layout types.
7
7
  */
8
- export declare type LayoutType = 'mobile' | 'tablet' | 'desktop';
8
+ export type LayoutType = 'mobile' | 'tablet' | 'desktop';
9
9
  /**
10
10
  * The mapping of the layout types to breakpoint index.
11
11
  */
12
- export declare type LayoutTypes = [LayoutType, LayoutType, LayoutType];
12
+ export type LayoutTypes = [LayoutType, LayoutType, LayoutType];
@@ -1,5 +1,5 @@
1
1
  import type { Disposable } from './utils';
2
- export declare type NavigationAction = 'POP' | 'PUSH' | 'REPLACE';
2
+ export type NavigationAction = 'POP' | 'PUSH' | 'REPLACE';
3
3
  export interface NavigationLocation {
4
4
  /**
5
5
  * The fully qualified URL incl. the origin and base path.
@@ -11,7 +11,7 @@ import type { ComponentConverters, LoadingIndicatorProps, ErrorInfoProps, Router
11
11
  export interface StateDispatcher<TState> {
12
12
  (state: TState): Partial<TState>;
13
13
  }
14
- export declare type WrappedComponent<TProps> = ComponentType<PropsWithChildren<Without<TProps, keyof BaseComponentProps>>>;
14
+ export type WrappedComponent<TProps> = ComponentType<PropsWithChildren<Without<TProps, keyof BaseComponentProps>>>;
15
15
  /**
16
16
  * The base type for pilet component registration in the global state context.
17
17
  */
@@ -112,7 +112,7 @@ export interface RegistryState extends PiralCustomRegistryState {
112
112
  */
113
113
  wrappers: Dict<ComponentType<any>>;
114
114
  }
115
- export declare type ErrorComponentsState = {
115
+ export type ErrorComponentsState = {
116
116
  [P in keyof Errors]?: ComponentType<Errors[P]>;
117
117
  };
118
118
  /**
@@ -165,7 +165,7 @@ export interface PiralAction<T extends (...args: any) => any> {
165
165
  /**
166
166
  * A subset of the available app actions in Piral.
167
167
  */
168
- export declare type PiralDefineActions = Partial<{
168
+ export type PiralDefineActions = Partial<{
169
169
  [P in keyof PiralActions]: PiralAction<PiralActions[P]>;
170
170
  }>;
171
171
  /**
@@ -73,7 +73,7 @@ export interface PiralPageMeta extends PiralCustomPageMeta {
73
73
  /**
74
74
  * Shorthand for the definition of an extension component.
75
75
  */
76
- export declare type AnyExtensionComponent<TName> = TName extends keyof PiralExtensionSlotMap ? AnyComponent<ExtensionComponentProps<TName>> : TName extends string ? AnyComponent<ExtensionComponentProps<any>> : AnyComponent<ExtensionComponentProps<TName>>;
76
+ export type AnyExtensionComponent<TName> = TName extends keyof PiralExtensionSlotMap ? AnyComponent<ExtensionComponentProps<TName>> : TName extends string ? AnyComponent<ExtensionComponentProps<any>> : AnyComponent<ExtensionComponentProps<TName>>;
77
77
  /**
78
78
  * Defines the Pilet API from piral-core.
79
79
  * This interface will be consumed by pilet developers so that their pilet can interact with the piral instance.
@@ -1,21 +1,21 @@
1
- export declare type ValuesOf<T> = T extends {
1
+ export type ValuesOf<T> = T extends {
2
2
  [_ in keyof T]: infer U;
3
3
  } ? U : never;
4
- export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
5
- export declare type RemainingArgs<T> = T extends (_: any, ...args: infer U) => any ? U : never;
6
- export declare type DeepPartial<T> = {
4
+ export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
5
+ export type RemainingArgs<T> = T extends (_: any, ...args: infer U) => any ? U : never;
6
+ export type DeepPartial<T> = {
7
7
  [P in keyof T]?: T[P] extends Array<infer U> ? Array<DeepPartial<U>> : T[P] extends {} ? DeepPartial<T[P]> : T[P];
8
8
  };
9
- export declare type NestedPartial<T> = {
9
+ export type NestedPartial<T> = {
10
10
  [P in keyof T]?: T[P] extends Array<infer U> ? Array<Partial<U>> : T[P] extends {} ? Partial<T[P]> : T[P];
11
11
  };
12
- export declare type Dict<T> = Record<string, T>;
13
- export declare type Without<T, K> = Pick<T, Exclude<keyof T, K>>;
14
- export declare type FirstParameter<T extends (arg: any) => any> = T extends (arg: infer P) => any ? P : never;
15
- export declare type FirstParametersOf<T> = {
12
+ export type Dict<T> = Record<string, T>;
13
+ export type Without<T, K> = Pick<T, Exclude<keyof T, K>>;
14
+ export type FirstParameter<T extends (arg: any) => any> = T extends (arg: infer P) => any ? P : never;
15
+ export type FirstParametersOf<T> = {
16
16
  [K in keyof T]: T[K] extends (arg: any) => any ? FirstParameter<T[K]> : never;
17
17
  }[keyof T];
18
- export declare type UnionOf<T> = {
18
+ export type UnionOf<T> = {
19
19
  [K in keyof T]: T[K];
20
20
  }[keyof T];
21
- export declare type MaybeAsync<T> = T | (() => Promise<T>);
21
+ export type MaybeAsync<T> = T | (() => Promise<T>);
@@ -75,7 +75,7 @@ export interface ForeignComponent<TProps> {
75
75
  /**
76
76
  * Possible shapes for a component.
77
77
  */
78
- export declare type AnyComponent<T> = ComponentType<T> | FirstParametersOf<ComponentConverters<T>>;
78
+ export type AnyComponent<T> = ComponentType<T> | FirstParametersOf<ComponentConverters<T>>;
79
79
  /**
80
80
  * The error used when a route cannot be resolved.
81
81
  */
@@ -177,7 +177,7 @@ export interface Errors extends PiralCustomErrors {
177
177
  /**
178
178
  * The props for the ErrorInfo component.
179
179
  */
180
- export declare type ErrorInfoProps = UnionOf<Errors>;
180
+ export type ErrorInfoProps = UnionOf<Errors>;
181
181
  /**
182
182
  * The props of a Loading indicator component.
183
183
  */
@@ -91,4 +91,4 @@ export interface PiralStateConfiguration {
91
91
  /**
92
92
  * The configuration to be used in the Piral instance.
93
93
  */
94
- export declare type PiralConfiguration = PiralPiletConfiguration & PiralStateConfiguration;
94
+ export type PiralConfiguration = PiralPiletConfiguration & PiralStateConfiguration;
@@ -10,7 +10,7 @@ export interface SharedData<TValue = any> {
10
10
  /**
11
11
  * Defines the potential targets when storing data.
12
12
  */
13
- export declare type DataStoreTarget = 'memory' | 'local' | 'remote';
13
+ export type DataStoreTarget = 'memory' | 'local' | 'remote';
14
14
  /**
15
15
  * Defines the custom options for storing data.
16
16
  */
@@ -27,7 +27,7 @@ export interface CustomDataStoreOptions {
27
27
  /**
28
28
  * Defines the options to be used for storing data.
29
29
  */
30
- export declare type DataStoreOptions = DataStoreTarget | CustomDataStoreOptions;
30
+ export type DataStoreOptions = DataStoreTarget | CustomDataStoreOptions;
31
31
  /**
32
32
  * Defines the shape of a shared data item.
33
33
  */
@@ -54,8 +54,8 @@ export interface BaseExtensionSlotProps<TName, TParams> {
54
54
  /**
55
55
  * Gives the extension params shape for the given extension slot name.
56
56
  */
57
- export declare type ExtensionParams<TName> = TName extends keyof PiralExtensionSlotMap ? PiralExtensionSlotMap[TName] : TName extends string ? any : TName;
57
+ export type ExtensionParams<TName> = TName extends keyof PiralExtensionSlotMap ? PiralExtensionSlotMap[TName] : TName extends string ? any : TName;
58
58
  /**
59
59
  * The props for defining an extension slot.
60
60
  */
61
- export declare type ExtensionSlotProps<TName = string> = BaseExtensionSlotProps<TName extends string ? TName : string, ExtensionParams<TName>>;
61
+ export type ExtensionSlotProps<TName = string> = BaseExtensionSlotProps<TName extends string ? TName : string, ExtensionParams<TName>>;
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * The mapping of breakpoints to layout type index.
3
3
  */
4
- export declare type LayoutBreakpoints = [string, string, string];
4
+ export type LayoutBreakpoints = [string, string, string];
5
5
  /**
6
6
  * The different known layout types.
7
7
  */
8
- export declare type LayoutType = 'mobile' | 'tablet' | 'desktop';
8
+ export type LayoutType = 'mobile' | 'tablet' | 'desktop';
9
9
  /**
10
10
  * The mapping of the layout types to breakpoint index.
11
11
  */
12
- export declare type LayoutTypes = [LayoutType, LayoutType, LayoutType];
12
+ export type LayoutTypes = [LayoutType, LayoutType, LayoutType];
@@ -1,5 +1,5 @@
1
1
  import type { Disposable } from './utils';
2
- export declare type NavigationAction = 'POP' | 'PUSH' | 'REPLACE';
2
+ export type NavigationAction = 'POP' | 'PUSH' | 'REPLACE';
3
3
  export interface NavigationLocation {
4
4
  /**
5
5
  * The fully qualified URL incl. the origin and base path.
@@ -11,7 +11,7 @@ import type { ComponentConverters, LoadingIndicatorProps, ErrorInfoProps, Router
11
11
  export interface StateDispatcher<TState> {
12
12
  (state: TState): Partial<TState>;
13
13
  }
14
- export declare type WrappedComponent<TProps> = ComponentType<PropsWithChildren<Without<TProps, keyof BaseComponentProps>>>;
14
+ export type WrappedComponent<TProps> = ComponentType<PropsWithChildren<Without<TProps, keyof BaseComponentProps>>>;
15
15
  /**
16
16
  * The base type for pilet component registration in the global state context.
17
17
  */
@@ -112,7 +112,7 @@ export interface RegistryState extends PiralCustomRegistryState {
112
112
  */
113
113
  wrappers: Dict<ComponentType<any>>;
114
114
  }
115
- export declare type ErrorComponentsState = {
115
+ export type ErrorComponentsState = {
116
116
  [P in keyof Errors]?: ComponentType<Errors[P]>;
117
117
  };
118
118
  /**
@@ -165,7 +165,7 @@ export interface PiralAction<T extends (...args: any) => any> {
165
165
  /**
166
166
  * A subset of the available app actions in Piral.
167
167
  */
168
- export declare type PiralDefineActions = Partial<{
168
+ export type PiralDefineActions = Partial<{
169
169
  [P in keyof PiralActions]: PiralAction<PiralActions[P]>;
170
170
  }>;
171
171
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-core",
3
- "version": "0.15.11",
3
+ "version": "0.15.12-beta.5531",
4
4
  "description": "The core library for creating a Piral instance.",
5
5
  "keywords": [
6
6
  "portal",
@@ -72,8 +72,8 @@
72
72
  "test": "echo \"Error: run tests from root\" && exit 1"
73
73
  },
74
74
  "dependencies": {
75
- "piral-base": "^0.15.11",
76
- "piral-debug-utils": "^0.15.11",
75
+ "piral-base": "0.15.12-beta.5531",
76
+ "piral-debug-utils": "0.15.12-beta.5531",
77
77
  "zustand": "^3.0.0"
78
78
  },
79
79
  "peerDependencies": {
@@ -99,5 +99,5 @@
99
99
  "react-router-dom",
100
100
  "tslib"
101
101
  ],
102
- "gitHead": "513cd05c0234dd02fdc95abb8f391e307f309fea"
102
+ "gitHead": "e305bf2bdfa60d6325a7db20f550b58dabdea245"
103
103
  }