sample-cross-fx 0.14.23-beta.4124 → 0.14.23-beta.4129

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/index.d.ts CHANGED
@@ -89,14 +89,14 @@ declare module "sample-cross-fx" {
89
89
  * @param Component The component to be rendered.
90
90
  * @param defaults Optionally, sets the default values for the expected data.
91
91
  */
92
- registerExtension<TName>(name: TName extends string ? TName : string, Component: AnyComponent<ExtensionComponentProps<TName>>, defaults?: Partial<ExtensionParams<TName>>): RegistrationDisposer;
92
+ registerExtension<TName>(name: TName extends string ? TName : string, Component: AnyExtensionComponent<TName>, defaults?: Partial<ExtensionParams<TName>>): RegistrationDisposer;
93
93
  /**
94
94
  * Unregisters a global extension component.
95
95
  * Only previously registered extension components can be unregistered.
96
96
  * @param name The name of the extension slot to unregister from.
97
97
  * @param Component The registered extension component to unregister.
98
98
  */
99
- unregisterExtension<TName>(name: TName extends string ? TName : string, Component: AnyComponent<ExtensionComponentProps<TName>>): void;
99
+ unregisterExtension<TName>(name: TName extends string ? TName : string, Component: AnyExtensionComponent<TName>): void;
100
100
  /**
101
101
  * React component for displaying extensions for a given name.
102
102
  * @param props The extension's rendering props.
@@ -464,14 +464,9 @@ declare module "sample-cross-fx" {
464
464
  }
465
465
 
466
466
  /**
467
- * The props of an extension component.
467
+ * Shorthand for the definition of an extension component.
468
468
  */
469
- export interface ExtensionComponentProps<T> extends BaseComponentProps {
470
- /**
471
- * The provided parameters for showing the extension.
472
- */
473
- params: T extends keyof PiralExtensionSlotMap ? PiralExtensionSlotMap[T] : T extends string ? any : T;
474
- }
469
+ export type AnyExtensionComponent<TName> = TName extends keyof PiralExtensionSlotMap ? AnyComponent<ExtensionComponentProps<TName>> : TName extends string ? AnyComponent<ExtensionComponentProps<any>> : AnyComponent<ExtensionComponentProps<TName>>;
475
470
 
476
471
  /**
477
472
  * Gives the extension params shape for the given extension slot name.
@@ -875,6 +870,16 @@ declare module "sample-cross-fx" {
875
870
  */
876
871
  export interface PiralCustomPageMeta {}
877
872
 
873
+ /**
874
+ * The props of an extension component.
875
+ */
876
+ export interface ExtensionComponentProps<T> extends BaseComponentProps {
877
+ /**
878
+ * The provided parameters for showing the extension.
879
+ */
880
+ params: T extends keyof PiralExtensionSlotMap ? PiralExtensionSlotMap[T] : T extends string ? any : T;
881
+ }
882
+
878
883
  /**
879
884
  * The mapping of the existing (known) extension slots.
880
885
  */
package/app/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <title>Sample - Cross Framework with Piral</title>
6
6
  <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
7
7
 
8
- <script defer src="/index.851526.js"></script></head>
8
+ <script defer src="/index.86e2da.js"></script></head>
9
9
  <body>
10
10
  <div id="app"></div>
11
11
 
package/app/index.js CHANGED
@@ -2,7 +2,7 @@ if (process.env.NODE_ENV === 'test') {
2
2
  // behavior for the test environment, we'll try to make it work
3
3
 
4
4
  if (typeof window !== 'undefined') {
5
- require('.//index.851526.js');
5
+ require('.//index.86e2da.js');
6
6
  const ctx = window['dbg:piral'];
7
7
  const dependencies = (ctx && ctx.pilets && ctx.pilets.getDependencies({})) || {};
8
8
  module.exports = dependencies['sample-cross-fx'] || {};
package/files.tar CHANGED
Binary file
package/files_once.tar CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sample-cross-fx",
3
3
  "description": "Example project illustrating the mixing of different (opt-in) frameworks via plugins.",
4
- "version": "0.14.23-beta.4124",
4
+ "version": "0.14.23-beta.4129",
5
5
  "license": "MIT",
6
6
  "homepage": "https://piral.io",
7
7
  "keywords": [