piral-core 0.15.0-alpha.3589 → 0.15.0-alpha.3711
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/debug.codegen +24 -0
- package/debug.codegen.d.ts +11 -0
- package/dependencies.codegen +6 -4
- package/dependencies.codegen.d.ts +1 -0
- package/dependencies.codegen.native.js +1 -1
- package/esm/RootListener.js +1 -1
- package/esm/RootListener.js.map +1 -1
- package/esm/components/ErrorBoundary.js +2 -1
- package/esm/components/ErrorBoundary.js.map +1 -1
- package/esm/components/ExtensionSlot.js +20 -2
- package/esm/components/ExtensionSlot.js.map +1 -1
- package/esm/components/ForeignComponentContainer.d.ts +19 -0
- package/esm/components/ForeignComponentContainer.js +52 -0
- package/esm/components/ForeignComponentContainer.js.map +1 -0
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.js +1 -0
- package/esm/components/index.js.map +1 -1
- package/esm/components/wrapComponent.d.ts +7 -0
- package/esm/components/wrapComponent.js +42 -0
- package/esm/components/wrapComponent.js.map +1 -0
- package/esm/createInstance.js +1 -1
- package/esm/createInstance.js.map +1 -1
- package/esm/debugger.d.ts +1 -1
- package/esm/debugger.js +1 -1
- package/esm/debugger.js.map +1 -1
- package/esm/emulator.d.ts +1 -1
- package/esm/emulator.js +1 -1
- package/esm/emulator.js.map +1 -1
- package/esm/helpers.d.ts +1 -1
- package/esm/helpers.js +3 -10
- package/esm/helpers.js.map +1 -1
- package/esm/modules/dependencies.js +3 -23
- package/esm/modules/dependencies.js.map +1 -1
- package/esm/state/withApi.js +8 -92
- package/esm/state/withApi.js.map +1 -1
- package/esm/types/api.d.ts +2 -2
- package/esm/types/components.d.ts +12 -0
- package/esm/types/extension.d.ts +5 -1
- package/lib/RootListener.js +2 -2
- package/lib/RootListener.js.map +1 -1
- package/lib/components/ErrorBoundary.js +2 -1
- package/lib/components/ErrorBoundary.js.map +1 -1
- package/lib/components/ExtensionSlot.js +19 -1
- package/lib/components/ExtensionSlot.js.map +1 -1
- package/lib/components/ForeignComponentContainer.d.ts +19 -0
- package/lib/components/ForeignComponentContainer.js +56 -0
- package/lib/components/ForeignComponentContainer.js.map +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/wrapComponent.d.ts +7 -0
- package/lib/components/wrapComponent.js +46 -0
- package/lib/components/wrapComponent.js.map +1 -0
- package/lib/createInstance.js +1 -1
- package/lib/createInstance.js.map +1 -1
- package/lib/debugger.d.ts +1 -1
- package/lib/debugger.js +3 -3
- package/lib/debugger.js.map +1 -1
- package/lib/emulator.d.ts +1 -1
- package/lib/emulator.js +3 -3
- package/lib/emulator.js.map +1 -1
- package/lib/helpers.d.ts +1 -1
- package/lib/helpers.js +3 -10
- package/lib/helpers.js.map +1 -1
- package/lib/modules/dependencies.js +3 -23
- package/lib/modules/dependencies.js.map +1 -1
- package/lib/state/withApi.js +7 -91
- package/lib/state/withApi.js.map +1 -1
- package/lib/types/api.d.ts +2 -2
- package/lib/types/components.d.ts +12 -0
- package/lib/types/extension.d.ts +5 -1
- package/package.json +8 -5
- package/src/RootListener.tsx +1 -1
- package/src/components/ErrorBoundary.tsx +2 -1
- package/src/components/ExtensionSlot.tsx +25 -3
- package/src/components/ForeignComponentContainer.tsx +69 -0
- package/src/components/index.ts +1 -0
- package/src/components/wrapComponent.tsx +74 -0
- package/src/createInstance.tsx +1 -1
- package/src/debugger.ts +1 -1
- package/src/emulator.ts +1 -1
- package/src/helpers.tsx +4 -12
- package/src/modules/dependencies.ts +3 -22
- package/src/state/withApi.tsx +21 -156
- package/src/types/api.ts +2 -2
- package/src/types/components.ts +12 -0
- package/src/types/extension.ts +12 -3
package/src/types/components.ts
CHANGED
|
@@ -88,6 +88,10 @@ export interface PageErrorInfoProps extends RouteComponentProps {
|
|
|
88
88
|
* The provided error details.
|
|
89
89
|
*/
|
|
90
90
|
error: any;
|
|
91
|
+
/**
|
|
92
|
+
* The name of the pilet emitting the error.
|
|
93
|
+
*/
|
|
94
|
+
pilet?: string;
|
|
91
95
|
}
|
|
92
96
|
|
|
93
97
|
/**
|
|
@@ -116,6 +120,10 @@ export interface ExtensionErrorInfoProps {
|
|
|
116
120
|
* The provided error details.
|
|
117
121
|
*/
|
|
118
122
|
error: any;
|
|
123
|
+
/**
|
|
124
|
+
* The name of the pilet emitting the error.
|
|
125
|
+
*/
|
|
126
|
+
pilet?: string;
|
|
119
127
|
}
|
|
120
128
|
|
|
121
129
|
/**
|
|
@@ -130,6 +138,10 @@ export interface UnknownErrorInfoProps {
|
|
|
130
138
|
* The provided error details.
|
|
131
139
|
*/
|
|
132
140
|
error: any;
|
|
141
|
+
/**
|
|
142
|
+
* The name of the pilet emitting the error.
|
|
143
|
+
*/
|
|
144
|
+
pilet?: string;
|
|
133
145
|
}
|
|
134
146
|
|
|
135
147
|
/**
|
package/src/types/extension.ts
CHANGED
|
@@ -34,10 +34,19 @@ export interface BaseExtensionSlotProps<TName, TParams> {
|
|
|
34
34
|
name: TName;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Gives the extension params shape for the given extension slot name.
|
|
39
|
+
*/
|
|
40
|
+
export type ExtensionParams<TName> = TName extends keyof PiralExtensionSlotMap
|
|
41
|
+
? PiralExtensionSlotMap[TName]
|
|
42
|
+
: TName extends string
|
|
43
|
+
? any
|
|
44
|
+
: TName;
|
|
45
|
+
|
|
37
46
|
/**
|
|
38
47
|
* The props for defining an extension slot.
|
|
39
48
|
*/
|
|
40
|
-
export type ExtensionSlotProps<
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
export type ExtensionSlotProps<TName = string> = BaseExtensionSlotProps<
|
|
50
|
+
TName extends string ? TName : string,
|
|
51
|
+
ExtensionParams<TName>
|
|
43
52
|
>;
|