sample-piral 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
@@ -82,14 +82,14 @@ declare module "sample-piral" {
82
82
  * @param Component The component to be rendered.
83
83
  * @param defaults Optionally, sets the default values for the expected data.
84
84
  */
85
- registerExtension<TName>(name: TName extends string ? TName : string, Component: AnyComponent<ExtensionComponentProps<TName>>, defaults?: Partial<ExtensionParams<TName>>): RegistrationDisposer;
85
+ registerExtension<TName>(name: TName extends string ? TName : string, Component: AnyExtensionComponent<TName>, defaults?: Partial<ExtensionParams<TName>>): RegistrationDisposer;
86
86
  /**
87
87
  * Unregisters a global extension component.
88
88
  * Only previously registered extension components can be unregistered.
89
89
  * @param name The name of the extension slot to unregister from.
90
90
  * @param Component The registered extension component to unregister.
91
91
  */
92
- unregisterExtension<TName>(name: TName extends string ? TName : string, Component: AnyComponent<ExtensionComponentProps<TName>>): void;
92
+ unregisterExtension<TName>(name: TName extends string ? TName : string, Component: AnyExtensionComponent<TName>): void;
93
93
  /**
94
94
  * React component for displaying extensions for a given name.
95
95
  * @param props The extension's rendering props.
@@ -319,14 +319,9 @@ declare module "sample-piral" {
319
319
  }
320
320
 
321
321
  /**
322
- * The props of an extension component.
322
+ * Shorthand for the definition of an extension component.
323
323
  */
324
- export interface ExtensionComponentProps<T> extends BaseComponentProps {
325
- /**
326
- * The provided parameters for showing the extension.
327
- */
328
- params: T extends keyof PiralExtensionSlotMap ? PiralExtensionSlotMap[T] : T extends string ? any : T;
329
- }
324
+ export type AnyExtensionComponent<TName> = TName extends keyof PiralExtensionSlotMap ? AnyComponent<ExtensionComponentProps<TName>> : TName extends string ? AnyComponent<ExtensionComponentProps<any>> : AnyComponent<ExtensionComponentProps<TName>>;
330
325
 
331
326
  /**
332
327
  * Gives the extension params shape for the given extension slot name.
@@ -592,13 +587,13 @@ declare module "sample-piral" {
592
587
  export interface PiralCustomPageMeta {}
593
588
 
594
589
  /**
595
- * The props that every registered component obtains.
590
+ * The props of an extension component.
596
591
  */
597
- export interface BaseComponentProps {
592
+ export interface ExtensionComponentProps<T> extends BaseComponentProps {
598
593
  /**
599
- * The currently used pilet API.
594
+ * The provided parameters for showing the extension.
600
595
  */
601
- piral: PiletApi;
596
+ params: T extends keyof PiralExtensionSlotMap ? PiralExtensionSlotMap[T] : T extends string ? any : T;
602
597
  }
603
598
 
604
599
  /**
@@ -806,6 +801,16 @@ declare module "sample-piral" {
806
801
  [tag: string]: string;
807
802
  }
808
803
 
804
+ /**
805
+ * The props that every registered component obtains.
806
+ */
807
+ export interface BaseComponentProps {
808
+ /**
809
+ * The currently used pilet API.
810
+ */
811
+ piral: PiletApi;
812
+ }
813
+
809
814
  export interface BareTileComponentProps {
810
815
  /**
811
816
  * The currently used number of columns.
package/app/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <title>Piral Sample</title>
6
6
  <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
7
7
 
8
- <script defer src="/index.a2508c.js"></script></head>
8
+ <script defer src="/index.0df042.js"></script></head>
9
9
  <body>
10
10
  <div id="app">
11
11
  <div class="pi-center">
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.a2508c.js');
5
+ require('.//index.0df042.js');
6
6
  const ctx = window['dbg:piral'];
7
7
  const dependencies = (ctx && ctx.pilets && ctx.pilets.getDependencies({})) || {};
8
8
  module.exports = dependencies['sample-piral'] || {};
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-piral",
3
3
  "description": "Example project illustrating the use of the piral and piral-cli packages.",
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": [