piral-core 0.15.0-alpha.4041 → 0.15.0-alpha.4098

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.
Files changed (70) hide show
  1. package/esm/PiralContext.js.map +1 -1
  2. package/esm/components/ErrorBoundary.d.ts +4 -0
  3. package/esm/components/ErrorBoundary.js.map +1 -1
  4. package/esm/components/PiralSuspense.d.ts +4 -1
  5. package/esm/components/PiralSuspense.js.map +1 -1
  6. package/esm/components/PiralView.d.ts +4 -0
  7. package/esm/components/PiralView.js.map +1 -1
  8. package/esm/components/ResponsiveLayout.d.ts +7 -0
  9. package/esm/components/ResponsiveLayout.js.map +1 -1
  10. package/esm/defaults/DefaultRouter.d.ts +2 -1
  11. package/esm/defaults/DefaultRouter.js.map +1 -1
  12. package/esm/state/withApi.js.map +1 -1
  13. package/esm/types/components.d.ts +9 -1
  14. package/esm/types/instance.d.ts +3 -1
  15. package/esm/types/state.d.ts +2 -2
  16. package/lib/PiralContext.js.map +1 -1
  17. package/lib/actions/index.js +6 -6
  18. package/lib/actions/index.js.map +1 -1
  19. package/lib/components/ErrorBoundary.d.ts +4 -0
  20. package/lib/components/ErrorBoundary.js +1 -1
  21. package/lib/components/ErrorBoundary.js.map +1 -1
  22. package/lib/components/PiralRoutes.js +1 -1
  23. package/lib/components/PiralRoutes.js.map +1 -1
  24. package/lib/components/PiralSuspense.d.ts +4 -1
  25. package/lib/components/PiralSuspense.js.map +1 -1
  26. package/lib/components/PiralView.d.ts +4 -0
  27. package/lib/components/PiralView.js.map +1 -1
  28. package/lib/components/ResponsiveLayout.d.ts +7 -0
  29. package/lib/components/ResponsiveLayout.js.map +1 -1
  30. package/lib/components/index.js +12 -12
  31. package/lib/components/index.js.map +1 -1
  32. package/lib/defaults/DefaultRouteSwitch.js +1 -1
  33. package/lib/defaults/DefaultRouteSwitch.js.map +1 -1
  34. package/lib/defaults/DefaultRouter.d.ts +2 -1
  35. package/lib/defaults/DefaultRouter.js.map +1 -1
  36. package/lib/defaults/index.js +5 -5
  37. package/lib/defaults/index.js.map +1 -1
  38. package/lib/hooks/actions.js +1 -1
  39. package/lib/hooks/actions.js.map +1 -1
  40. package/lib/hooks/index.js +6 -6
  41. package/lib/hooks/index.js.map +1 -1
  42. package/lib/index.js +9 -9
  43. package/lib/index.js.map +1 -1
  44. package/lib/modules/index.js +3 -3
  45. package/lib/modules/index.js.map +1 -1
  46. package/lib/setters/index.js +7 -7
  47. package/lib/setters/index.js.map +1 -1
  48. package/lib/state/index.js +4 -4
  49. package/lib/state/index.js.map +1 -1
  50. package/lib/state/withApi.js.map +1 -1
  51. package/lib/types/components.d.ts +9 -1
  52. package/lib/types/index.js +12 -12
  53. package/lib/types/index.js.map +1 -1
  54. package/lib/types/instance.d.ts +3 -1
  55. package/lib/types/state.d.ts +2 -2
  56. package/lib/utils/helpers.js +1 -1
  57. package/lib/utils/helpers.js.map +1 -1
  58. package/lib/utils/index.js +10 -10
  59. package/lib/utils/index.js.map +1 -1
  60. package/package.json +8 -8
  61. package/src/PiralContext.tsx +5 -1
  62. package/src/components/ErrorBoundary.tsx +4 -0
  63. package/src/components/PiralSuspense.tsx +5 -1
  64. package/src/components/PiralView.tsx +4 -0
  65. package/src/components/ResponsiveLayout.tsx +7 -0
  66. package/src/defaults/DefaultRouter.tsx +2 -1
  67. package/src/state/withApi.tsx +2 -2
  68. package/src/types/components.ts +11 -2
  69. package/src/types/instance.ts +3 -1
  70. package/src/types/state.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"PiralContext.js","sourceRoot":"","sources":["../src/PiralContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MA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C,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC;IACrE,OAAO,oBAAC,QAAQ,QAAE,QAAQ,CAAY,CAAC;AACzC,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EAAE,QAAQ,GAAG,cAAc,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACtG,oBAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,CAAC,OAAO;IAC5C,oBAAC,QAAQ,IAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,GAAI;IACzD,oBAAC,YAAY,OAAG;IAChB,oBAAC,aAAa,QAAE,QAAQ,CAAiB,CACnB,CACzB,CAAC;AACF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
@@ -9,6 +9,10 @@ export interface ErrorBoundaryProps {
9
9
  * The associated pilet api for the metadata.
10
10
  */
11
11
  piral: PiletApi;
12
+ /**
13
+ * The content to render (i.e., where to apply the boundary to).
14
+ */
15
+ children: React.ReactNode;
12
16
  }
13
17
  export interface ErrorBoundaryState {
14
18
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAqB/E;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAiD;IAA1F;;QACE,UAAK,GAAG;YACN,KAAK,EAAE,SAAS;SACjB,CAAC;IAwBJ,CAAC;IAtBC,iBAAiB,CAAC,KAAY;QAC5B,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,CAA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C;QACxC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9B,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,qCAAqC,SAAS,IAAI,EAAE,KAAK,CAAC,CAAC;QAElF,IAAI,CAAC,QAAQ,CAAC;YACZ,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED,MAAM;QACJ,MAAM,KAAiD,IAAI,CAAC,KAAK,EAA3D,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,OAA+B,EAA1B,WAAW,cAA5C,kCAA8C,CAAa,CAAC;QAClE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7B,MAAM,IAAI,GAAQ,WAAW,CAAC;QAE9B,IAAI,KAAK,EAAE;YACT,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YAC9B,OAAO,oBAAC,mBAAmB,kBAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAAM,IAAI,EAAI,CAAC;SACvF;QAED,OAAO,oBAAC,KAAK,CAAC,QAAQ,IAAC,QAAQ,EAAE,oBAAC,0BAA0B,OAAG,IAAG,QAAQ,CAAkB,CAAC;IAC/F,CAAC;CACF"}
@@ -1,2 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare const PiralSuspense: React.FC;
2
+ export interface PiralSuspenseProps {
3
+ children?: React.ReactNode;
4
+ }
5
+ export declare const PiralSuspense: React.FC<PiralSuspenseProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"PiralSuspense.js","sourceRoot":"","sources":["../../src/components/PiralSuspense.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACtD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAExD,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,oBAAC,mBAAmB,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,KAAK,GAAI,CACrD,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACZ,oBAAC,0BAA0B,OAAG,CAC/B,CAAC,CAAC,CAAC,CACF,0CAAG,QAAQ,CAAI,CAChB,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"PiralSuspense.js","sourceRoot":"","sources":["../../src/components/PiralSuspense.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAM1C,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC1E,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAExD,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,oBAAC,mBAAmB,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,KAAK,GAAI,CACrD,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACZ,oBAAC,0BAA0B,OAAG,CAC/B,CAAC,CAAC,CAAC,CACF,0CAAG,QAAQ,CAAI,CAChB,CAAC;AACJ,CAAC,CAAC"}
@@ -8,6 +8,10 @@ export interface PiralViewProps {
8
8
  * The custom breakpoints for the different layout modi.
9
9
  */
10
10
  breakpoints?: LayoutBreakpoints;
11
+ /**
12
+ * The extra content.
13
+ */
14
+ children: React.ReactNode;
11
15
  }
12
16
  /**
13
17
  * The component responsible for the generic view of the application.
@@ -1 +1 @@
1
- {"version":3,"file":"PiralView.js","sourceRoot":"","sources":["../../src/components/PiralView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG5F,MAAM,QAAQ,GAAkC,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAC,mBAAmB,kBAAC,IAAI,EAAC,WAAW,IAAK,KAAK,EAAI,CAAC;AAY/G;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAA6B,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAChF;IACE,oBAAC,YAAY,OAAG;IAChB,oBAAC,aAAa;QACZ,oBAAC,gBAAgB,IAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB;YAClE,oBAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,GAAI,CACtD,CACL;IACf,QAAQ,CACR,CACJ,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
1
+ {"version":3,"file":"PiralView.js","sourceRoot":"","sources":["../../src/components/PiralView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG5F,MAAM,QAAQ,GAAkC,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAC,mBAAmB,kBAAC,IAAI,EAAC,WAAW,IAAK,KAAK,EAAI,CAAC;AAgB/G;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAA6B,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAChF;IACE,oBAAC,YAAY,OAAG;IAChB,oBAAC,aAAa;QACZ,oBAAC,gBAAgB,IAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB;YAClE,oBAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,GAAI,CACtD,CACL;IACf,QAAQ,CACR,CACJ,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
@@ -8,7 +8,14 @@ export interface ResponsiveLayoutProps {
8
8
  * The individual breakpoints to be used for the different layouts.
9
9
  */
10
10
  breakpoints?: LayoutBreakpoints;
11
+ /**
12
+ * The actual layout component to render to transport.
13
+ */
11
14
  Layout: React.ComponentType<LayoutProps>;
15
+ /**
16
+ * The content to display.
17
+ */
18
+ children: React.ReactNode;
12
19
  }
13
20
  /**
14
21
  * The component capable of identifying and switching the currently used layout.
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsiveLayout.js","sourceRoot":"","sources":["../../src/components/ResponsiveLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAc9D;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,WAAW,GAAG,kBAAkB,EAChC,MAAM,EACN,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;IAClE,OAAO,oBAAC,MAAM,IAAC,aAAa,EAAE,QAAQ,IAAG,QAAQ,CAAU,CAAC;AAC9D,CAAC,CAAC;AACF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
1
+ {"version":3,"file":"ResponsiveLayout.js","sourceRoot":"","sources":["../../src/components/ResponsiveLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAqB9D;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,WAAW,GAAG,kBAAkB,EAChC,MAAM,EACN,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;IAClE,OAAO,oBAAC,MAAM,IAAC,aAAa,EAAE,QAAQ,IAAG,QAAQ,CAAU,CAAC;AAC9D,CAAC,CAAC;AACF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  import * as React from 'react';
2
- export declare const DefaultRouter: React.FC;
2
+ import { RouterProps } from '../types';
3
+ export declare const DefaultRouter: React.FC<RouterProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultRouter.js","sourceRoot":"","sources":["../../src/defaults/DefaultRouter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACtD,MAAM,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC3D,OAAO,oBAAC,aAAa,IAAC,QAAQ,EAAE,UAAU,IAAG,QAAQ,CAAiB,CAAC;AACzE,CAAC,CAAC"}
1
+ {"version":3,"file":"DefaultRouter.js","sourceRoot":"","sources":["../../src/defaults/DefaultRouter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,MAAM,CAAC,MAAM,aAAa,GAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnE,MAAM,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC3D,OAAO,oBAAC,aAAa,IAAC,QAAQ,EAAE,UAAU,IAAG,QAAQ,CAAiB,CAAC;AACzE,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"withApi.js","sourceRoot":"","sources":["../../src/state/withApi.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,cAAc,GAAa,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAE1E,SAAS,UAAU,CAAC,QAAkD,EAAE,W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Q,GAAG,EAAE;IAEb,MAAM,UAAU,mCAAQ,QAAQ,KAAE,KAAK,GAAE,CAAC;IAC1C,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,MAAM,OAAO,GAAG,WAAW,CAAS,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;IACjF,OAAO,aAAa,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AACnE,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ComponentType } from 'react';
1
+ import type { ComponentType, ReactNode } from 'react';
2
2
  import type { RouteComponentProps, SwitchProps } from 'react-router';
3
3
  import type { FirstParametersOf, UnionOf } from './common';
4
4
  import type { PiralCustomErrors, PiralCustomComponentConverters } from './custom';
@@ -178,11 +178,19 @@ export interface LayoutProps {
178
178
  * The currently selected layout type.
179
179
  */
180
180
  currentLayout: LayoutType;
181
+ /**
182
+ * The page's content.
183
+ */
184
+ children: ReactNode;
181
185
  }
182
186
  /**
183
187
  * The props of a Router component.
184
188
  */
185
189
  export interface RouterProps {
190
+ /**
191
+ * The content to be rendered inside the router.
192
+ */
193
+ children?: ReactNode;
186
194
  }
187
195
  /**
188
196
  * The props of the RouteSwitch component.
@@ -1,7 +1,8 @@
1
+ import type { ReactNode } from 'react';
1
2
  import type { PiletApi, PiletApiCreator, LoadPiletsOptions, EventEmitter } from 'piral-base';
2
3
  import type { GlobalStateContext } from './state';
3
4
  import type { LayoutBreakpoints } from './layout';
4
- import { PiralConfiguration } from './config';
5
+ import type { PiralConfiguration } from './config';
5
6
  /**
6
7
  * The props of the Piral context.
7
8
  */
@@ -10,6 +11,7 @@ export interface PiralContextProps {
10
11
  * The specific Piral instance to be used.
11
12
  */
12
13
  instance?: PiralInstance;
14
+ children?: ReactNode;
13
15
  }
14
16
  /**
15
17
  * The props of the Piral component.
@@ -1,4 +1,4 @@
1
- import type { ComponentType, ReactPortal } from 'react';
1
+ import type { ComponentType, ReactPortal, PropsWithChildren } from 'react';
2
2
  import type { RouteComponentProps } from 'react-router';
3
3
  import type { Atom } from '@dbeining/react-atom';
4
4
  import type { LoadPiletsOptions } from 'piral-base';
@@ -16,7 +16,7 @@ declare module './components' {
16
16
  readState: PiralActions['readState'];
17
17
  }
18
18
  }
19
- export declare type WrappedComponent<TProps> = ComponentType<Without<TProps, keyof BaseComponentProps>>;
19
+ export declare type WrappedComponent<TProps> = ComponentType<PropsWithChildren<Without<TProps, keyof BaseComponentProps>>>;
20
20
  /**
21
21
  * The base type for pilet component registration in the global state context.
22
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"PiralContext.js","sourceRoot":"","sources":["../src/PiralContext.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,mCAAuC;AACvC,qDAAkD;AAClD,6CAAwC;AACxC,mCAAyC;AACzC,iDAA8C;AAG9C,MAAM,aAAa,GAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC/C,MAAM,QAAQ,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC;IACrE,OAAO,oBAAC,QAAQ,QAAE,QAAQ,CAAY,CAAC;AACzC,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,YAAY,GAAgC,CAAC,EAAE,QAAQ,GAAG,IAAA,+BAAc,GAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACtG,oBAAC,oBAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,CAAC,OAAO;IAC5C,oBAAC,qBAAQ,IAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,GAAI;IACzD,oBAAC,2BAAY,OAAG;IAChB,oBAAC,aAAa,QAAE,QAAQ,CAAiB,CACnB,CACzB,CAAC;AANW,QAAA,YAAY,gBAMvB;AACF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
1
+ {"version":3,"file":"PiralContext.js","sourceRoot":"","sources":["../src/PiralContext.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,mCAAuC;AACvC,qDAAkD;AAClD,6CAAwC;AACxC,mCAAyC;AACzC,iDAA8C;AAO9C,MAAM,aAAa,GAAiC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnE,MAAM,QAAQ,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC;IACrE,OAAO,oBAAC,QAAQ,QAAE,QAAQ,CAAY,CAAC;AACzC,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,YAAY,GAAgC,CAAC,EAAE,QAAQ,GAAG,IAAA,+BAAc,GAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACtG,oBAAC,oBAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,CAAC,OAAO;IAC5C,oBAAC,qBAAQ,IAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,GAAI;IACzD,oBAAC,2BAAY,OAAG;IAChB,oBAAC,aAAa,QAAE,QAAQ,CAAiB,CACnB,CACzB,CAAC;AANW,QAAA,YAAY,gBAMvB;AACF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./app"), exports);
5
- (0, tslib_1.__exportStar)(require("./components"), exports);
6
- (0, tslib_1.__exportStar)(require("./data"), exports);
7
- (0, tslib_1.__exportStar)(require("./define"), exports);
8
- (0, tslib_1.__exportStar)(require("./portal"), exports);
9
- (0, tslib_1.__exportStar)(require("./state"), exports);
4
+ tslib_1.__exportStar(require("./app"), exports);
5
+ tslib_1.__exportStar(require("./components"), exports);
6
+ tslib_1.__exportStar(require("./data"), exports);
7
+ tslib_1.__exportStar(require("./define"), exports);
8
+ tslib_1.__exportStar(require("./portal"), exports);
9
+ tslib_1.__exportStar(require("./state"), exports);
10
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":";;;AAAA,qDAAsB;AACtB,4DAA6B;AAC7B,sDAAuB;AACvB,wDAAyB;AACzB,wDAAyB;AACzB,uDAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,uDAA6B;AAC7B,iDAAuB;AACvB,mDAAyB;AACzB,mDAAyB;AACzB,kDAAwB"}
@@ -9,6 +9,10 @@ export interface ErrorBoundaryProps {
9
9
  * The associated pilet api for the metadata.
10
10
  */
11
11
  piral: PiletApi;
12
+ /**
13
+ * The content to render (i.e., where to apply the boundary to).
14
+ */
15
+ children: React.ReactNode;
12
16
  }
13
17
  export interface ErrorBoundaryState {
14
18
  /**
@@ -23,7 +23,7 @@ class ErrorBoundary extends React.Component {
23
23
  });
24
24
  }
25
25
  render() {
26
- const _a = this.props, { children, piral, errorType } = _a, renderProps = (0, tslib_1.__rest)(_a, ["children", "piral", "errorType"]);
26
+ const _a = this.props, { children, piral, errorType } = _a, renderProps = tslib_1.__rest(_a, ["children", "piral", "errorType"]);
27
27
  const { error } = this.state;
28
28
  const rest = renderProps;
29
29
  if (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,6CAA+E;AAqB/E;;GAEG;AACH,MAAa,aAAc,SAAQ,KAAK,CAAC,SAAiD;IAA1F;;QACE,UAAK,GAAG;YACN,KAAK,EA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QAC5B,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACxC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9B,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,qCAAqC,SAAS,IAAI,EAAE,KAAK,CAAC,CAAC;QAElF,IAAI,CAAC,QAAQ,CAAC;YACZ,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED,MAAM;QACJ,MAAM,KAAiD,IAAI,CAAC,KAAK,EAA3D,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,OAA+B,EAA1B,WAAW,sBAA5C,kCAA8C,CAAa,CAAC;QAClE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7B,MAAM,IAAI,GAAQ,WAAW,CAAC;QAE9B,IAAI,KAAK,EAAE;YACT,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YAC9B,OAAO,oBAAC,gCAAmB,kBAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAAM,IAAI,EAAI,CAAC;SACvF;QAED,OAAO,oBAAC,KAAK,CAAC,QAAQ,IAAC,QAAQ,EAAE,oBAAC,uCAA0B,OAAG,IAAG,QAAQ,CAAkB,CAAC;IAC/F,CAAC;CACF;AA3BD,sCA2BC"}
@@ -8,7 +8,7 @@ const hooks_1 = require("../hooks");
8
8
  * The component for defining the exclusive routes to be used.
9
9
  */
10
10
  const PiralRoutes = (_a) => {
11
- var { NotFound, RouteSwitch } = _a, props = (0, tslib_1.__rest)(_a, ["NotFound", "RouteSwitch"]);
11
+ var { NotFound, RouteSwitch } = _a, props = tslib_1.__rest(_a, ["NotFound", "RouteSwitch"]);
12
12
  const routes = (0, hooks_1.useGlobalState)((s) => s.routes);
13
13
  const pages = (0, hooks_1.useGlobalState)((s) => s.registry.pages);
14
14
  const paths = [];
@@ -1 +1 @@
1
- {"version":3,"file":"PiralRoutes.js","sourceRoot":"","sources":["../../src/components/PiralRoutes.tsx"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAE/B,oCAA0C;AAiB1C;;GAEG;AACI,MAAM,WAAW,GAA0B,CAAC,EAAmC,EAAE,EAAE;QAAvC,EAAE,QAAQ,EAAE,WAAW,OAAY,EAAP,KAAK,2BAAjC,2BAAmC,CAAF;IAClF,MAAM,MAAM,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG,EAAE,CAAC;IAEjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACjF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAEzF,OAAO,oBAAC,WAAW,kBAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,IAAM,KAAK,EAAI,CAAC;AACtE,CAAC,CAAC;AATW,QAAA,WAAW,eAStB;AACF,mBAAW,CAAC,WAAW,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"PiralRoutes.js","sourceRoot":"","sources":["../../src/components/PiralRoutes.tsx"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAE/B,oCAA0C;AAiB1C;;GAEG;AACI,MAAM,WAAW,GAA0B,CAAC,EAAmC,EAAE,EAAE;QAAvC,EAAE,QAAQ,EAAE,WAAW,OAAY,EAAP,KAAK,sBAAjC,2BAAmC,CAAF;IAClF,MAAM,MAAM,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG,EAAE,CAAC;IAEjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACjF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAEzF,OAAO,oBAAC,WAAW,kBAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,IAAM,KAAK,EAAI,CAAC;AACtE,CAAC,CAAC;AATW,QAAA,WAAW,eAStB;AACF,mBAAW,CAAC,WAAW,GAAG,QAAQ,CAAC"}
@@ -1,2 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare const PiralSuspense: React.FC;
2
+ export interface PiralSuspenseProps {
3
+ children?: React.ReactNode;
4
+ }
5
+ export declare const PiralSuspense: React.FC<PiralSuspenseProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"PiralSuspense.js","sourceRoot":"","sources":["../../src/components/PiralSuspense.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,6CAA+E;AAC/E,oCAA0C;AAEnC,MAAM,aAAa,GAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACtD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAExD,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,oBAAC,gCAAmB,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,KAAK,GAAI,CACrD,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACZ,oBAAC,uCAA0B,OAAG,CAC/B,CAAC,CAAC,CAAC,CACF,0CAAG,QAAQ,CAAI,CAChB,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,aAAa,iBAUxB"}
1
+ {"version":3,"file":"PiralSuspense.js","sourceRoot":"","sources":["../../src/components/PiralSuspense.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,6CAA+E;AAC/E,oCAA0C;AAMnC,MAAM,aAAa,GAAiC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC1E,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAExD,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,oBAAC,gCAAmB,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,KAAK,GAAI,CACrD,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACZ,oBAAC,uCAA0B,OAAG,CAC/B,CAAC,CAAC,CAAC,CACF,0CAAG,QAAQ,CAAI,CAChB,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,aAAa,iBAUxB"}
@@ -8,6 +8,10 @@ export interface PiralViewProps {
8
8
  * The custom breakpoints for the different layout modi.
9
9
  */
10
10
  breakpoints?: LayoutBreakpoints;
11
+ /**
12
+ * The extra content.
13
+ */
14
+ children: React.ReactNode;
11
15
  }
12
16
  /**
13
17
  * The component responsible for the generic view of the application.
@@ -1 +1 @@
1
- {"version":3,"file":"PiralView.js","sourceRoot":"","sources":["../../src/components/PiralView.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAE/B,iDAA8C;AAC9C,+CAA4C;AAC5C,mDAAgD;AAChD,yDAAsD;AACtD,6CAA4F;AAG5F,MAAM,QAAQ,GAAkC,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAC,gCAAmB,kBAAC,IAAI,EAAC,WAAW,IAAK,KAAK,EAAI,CAAC;AAY/G;;;GAGG;AACI,MAAM,SAAS,GAA6B,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAChF;IACE,oBAAC,2BAAY,OAAG;IAChB,oBAAC,6BAAa;QACZ,oBAAC,mCAAgB,IAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,6BAAgB;YAClE,oBAAC,yBAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,kCAAqB,GAAI,CACtD,CACL;IACf,QAAQ,CACR,CACJ,CAAC;AAVW,QAAA,SAAS,aAUpB;AACF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
1
+ {"version":3,"file":"PiralView.js","sourceRoot":"","sources":["../../src/components/PiralView.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAE/B,iDAA8C;AAC9C,+CAA4C;AAC5C,mDAAgD;AAChD,yDAAsD;AACtD,6CAA4F;AAG5F,MAAM,QAAQ,GAAkC,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAC,gCAAmB,kBAAC,IAAI,EAAC,WAAW,IAAK,KAAK,EAAI,CAAC;AAgB/G;;;GAGG;AACI,MAAM,SAAS,GAA6B,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAChF;IACE,oBAAC,2BAAY,OAAG;IAChB,oBAAC,6BAAa;QACZ,oBAAC,mCAAgB,IAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,6BAAgB;YAClE,oBAAC,yBAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,kCAAqB,GAAI,CACtD,CACL;IACf,QAAQ,CACR,CACJ,CAAC;AAVW,QAAA,SAAS,aAUpB;AACF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
@@ -8,7 +8,14 @@ export interface ResponsiveLayoutProps {
8
8
  * The individual breakpoints to be used for the different layouts.
9
9
  */
10
10
  breakpoints?: LayoutBreakpoints;
11
+ /**
12
+ * The actual layout component to render to transport.
13
+ */
11
14
  Layout: React.ComponentType<LayoutProps>;
15
+ /**
16
+ * The content to display.
17
+ */
18
+ children: React.ReactNode;
12
19
  }
13
20
  /**
14
21
  * The component capable of identifying and switching the currently used layout.
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsiveLayout.js","sourceRoot":"","sources":["../../src/components/ResponsiveLayout.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,oCAAoC;AACpC,oCAA8D;AAc9D;;GAEG;AACI,MAAM,gBAAgB,GAAoC,CAAC,EAChE,WAAW,GAAG,0BAAkB,EAChC,MAAM,EACN,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,IAAA,gBAAQ,EAAC,WAAW,EAAE,sBAAc,EAAE,SAAS,CAAC,CAAC;IAClE,OAAO,oBAAC,MAAM,IAAC,aAAa,EAAE,QAAQ,IAAG,QAAQ,CAAU,CAAC;AAC9D,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B;AACF,wBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
1
+ {"version":3,"file":"ResponsiveLayout.js","sourceRoot":"","sources":["../../src/components/ResponsiveLayout.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,oCAAoC;AACpC,oCAA8D;AAqB9D;;GAEG;AACI,MAAM,gBAAgB,GAAoC,CAAC,EAChE,WAAW,GAAG,0BAAkB,EAChC,MAAM,EACN,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,IAAA,gBAAQ,EAAC,WAAW,EAAE,sBAAc,EAAE,SAAS,CAAC,CAAC;IAClE,OAAO,oBAAC,MAAM,IAAC,aAAa,EAAE,QAAQ,IAAG,QAAQ,CAAU,CAAC;AAC9D,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B;AACF,wBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./components"), exports);
5
- (0, tslib_1.__exportStar)(require("./ErrorBoundary"), exports);
6
- (0, tslib_1.__exportStar)(require("./ExtensionSlot"), exports);
7
- (0, tslib_1.__exportStar)(require("./Mediator"), exports);
8
- (0, tslib_1.__exportStar)(require("./PiralGlobals"), exports);
9
- (0, tslib_1.__exportStar)(require("./PiralRoutes"), exports);
10
- (0, tslib_1.__exportStar)(require("./PiralSuspense"), exports);
11
- (0, tslib_1.__exportStar)(require("./PiralView"), exports);
12
- (0, tslib_1.__exportStar)(require("./PortalRenderer"), exports);
13
- (0, tslib_1.__exportStar)(require("./ResponsiveLayout"), exports);
14
- (0, tslib_1.__exportStar)(require("./SwitchErrorInfo"), exports);
15
- (0, tslib_1.__exportStar)(require("./wrapComponent"), exports);
4
+ tslib_1.__exportStar(require("./components"), exports);
5
+ tslib_1.__exportStar(require("./ErrorBoundary"), exports);
6
+ tslib_1.__exportStar(require("./ExtensionSlot"), exports);
7
+ tslib_1.__exportStar(require("./Mediator"), exports);
8
+ tslib_1.__exportStar(require("./PiralGlobals"), exports);
9
+ tslib_1.__exportStar(require("./PiralRoutes"), exports);
10
+ tslib_1.__exportStar(require("./PiralSuspense"), exports);
11
+ tslib_1.__exportStar(require("./PiralView"), exports);
12
+ tslib_1.__exportStar(require("./PortalRenderer"), exports);
13
+ tslib_1.__exportStar(require("./ResponsiveLayout"), exports);
14
+ tslib_1.__exportStar(require("./SwitchErrorInfo"), exports);
15
+ tslib_1.__exportStar(require("./wrapComponent"), exports);
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,4DAA6B;AAC7B,+DAAgC;AAChC,+DAAgC;AAChC,0DAA2B;AAC3B,8DAA+B;AAC/B,6DAA8B;AAC9B,+DAAgC;AAChC,2DAA4B;AAC5B,gEAAiC;AACjC,kEAAmC;AACnC,iEAAkC;AAClC,+DAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,0DAAgC;AAChC,0DAAgC;AAChC,qDAA2B;AAC3B,yDAA+B;AAC/B,wDAA8B;AAC9B,0DAAgC;AAChC,sDAA4B;AAC5B,2DAAiC;AACjC,6DAAmC;AACnC,4DAAkC;AAClC,0DAAgC"}
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const React = require("react");
6
6
  const react_router_1 = require("react-router");
7
7
  const DefaultRouteSwitch = (_a) => {
8
- var { paths, NotFound } = _a, props = (0, tslib_1.__rest)(_a, ["paths", "NotFound"]);
8
+ var { paths, NotFound } = _a, props = tslib_1.__rest(_a, ["paths", "NotFound"]);
9
9
  return (React.createElement(react_router_1.Switch, Object.assign({}, props),
10
10
  paths.map(({ path, Component }) => (React.createElement(react_router_1.Route, { exact: true, key: path, path: path, component: Component }))),
11
11
  React.createElement(react_router_1.Route, { component: NotFound })));
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultRouteSwitch.js","sourceRoot":"","sources":["../../src/defaults/DefaultRouteSwitch.tsx"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,+CAA6C;AAGtC,MAAM,kBAAkB,GAA+B,CAAC,EAA6B,EAAE,EAAE;QAAjC,EAAE,KAAK,EAAE,QAAQ,OAAY,EAAP,KAAK,2BAA3B,qBAA6B,CAAF;IACxF,OAAO,CACL,oBAAC,qBAAM,oBAAK,KAAK;QACd,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAClC,oBAAC,oBAAK,IAAC,KAAK,QAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,GAAI,CAC7D,CAAC;QACF,oBAAC,oBAAK,IAAC,SAAS,EAAE,QAAQ,GAAI,CACvB,CACV,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,kBAAkB,sBAS7B"}
1
+ {"version":3,"file":"DefaultRouteSwitch.js","sourceRoot":"","sources":["../../src/defaults/DefaultRouteSwitch.tsx"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,+CAA6C;AAGtC,MAAM,kBAAkB,GAA+B,CAAC,EAA6B,EAAE,EAAE;QAAjC,EAAE,KAAK,EAAE,QAAQ,OAAY,EAAP,KAAK,sBAA3B,qBAA6B,CAAF;IACxF,OAAO,CACL,oBAAC,qBAAM,oBAAK,KAAK;QACd,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAClC,oBAAC,oBAAK,IAAC,KAAK,QAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,GAAI,CAC7D,CAAC;QACF,oBAAC,oBAAK,IAAC,SAAS,EAAE,QAAQ,GAAI,CACvB,CACV,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,kBAAkB,sBAS7B"}
@@ -1,2 +1,3 @@
1
1
  import * as React from 'react';
2
- export declare const DefaultRouter: React.FC;
2
+ import { RouterProps } from '../types';
3
+ export declare const DefaultRouter: React.FC<RouterProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultRouter.js","sourceRoot":"","sources":["../../src/defaults/DefaultRouter.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,uDAAiD;AACjD,oCAA0C;AAEnC,MAAM,aAAa,GAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACtD,MAAM,UAAU,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC3D,OAAO,oBAAC,gCAAa,IAAC,QAAQ,EAAE,UAAU,IAAG,QAAQ,CAAiB,CAAC;AACzE,CAAC,CAAC;AAHW,QAAA,aAAa,iBAGxB"}
1
+ {"version":3,"file":"DefaultRouter.js","sourceRoot":"","sources":["../../src/defaults/DefaultRouter.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,uDAAiD;AACjD,oCAA0C;AAGnC,MAAM,aAAa,GAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnE,MAAM,UAAU,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC3D,OAAO,oBAAC,gCAAa,IAAC,QAAQ,EAAE,UAAU,IAAG,QAAQ,CAAiB,CAAC;AACzE,CAAC,CAAC;AAHW,QAAA,aAAa,iBAGxB"}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./DefaultErrorInfo"), exports);
5
- (0, tslib_1.__exportStar)(require("./DefaultLayout"), exports);
6
- (0, tslib_1.__exportStar)(require("./DefaultLoadingIndicator"), exports);
7
- (0, tslib_1.__exportStar)(require("./DefaultRouter"), exports);
8
- (0, tslib_1.__exportStar)(require("./DefaultRouteSwitch"), exports);
4
+ tslib_1.__exportStar(require("./DefaultErrorInfo"), exports);
5
+ tslib_1.__exportStar(require("./DefaultLayout"), exports);
6
+ tslib_1.__exportStar(require("./DefaultLoadingIndicator"), exports);
7
+ tslib_1.__exportStar(require("./DefaultRouter"), exports);
8
+ tslib_1.__exportStar(require("./DefaultRouteSwitch"), exports);
9
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/defaults/index.ts"],"names":[],"mappings":";;;AAAA,kEAAmC;AACnC,+DAAgC;AAChC,yEAA0C;AAC1C,+DAAgC;AAChC,oEAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/defaults/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,0DAAgC;AAChC,oEAA0C;AAC1C,0DAAgC;AAChC,+DAAqC"}
@@ -8,7 +8,7 @@ const stateContext_1 = require("../state/stateContext");
8
8
  * Hook that gets the actions for manipulating the global state.
9
9
  */
10
10
  function useActions() {
11
- const _a = (0, react_1.useContext)(stateContext_1.StateContext), { state } = _a, actions = (0, tslib_1.__rest)(_a, ["state"]);
11
+ const _a = (0, react_1.useContext)(stateContext_1.StateContext), { state } = _a, actions = tslib_1.__rest(_a, ["state"]);
12
12
  return actions;
13
13
  }
14
14
  exports.useActions = useActions;
@@ -1 +1 @@
1
- {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/hooks/actions.ts"],"names":[],"mappings":";;;;AAAA,iCAAmC;AACnC,wDAAqD;AAGrD;;GAEG;AACH,SAAgB,UAAU;IACxB,MAAM,KAAwB,IAAA,kBAAU,EAAqB,2BAAY,CAAC,EAApE,EAAE,KAAK,OAA6D,EAAxD,OAAO,2BAAnB,SAAqB,CAA+C,CAAC;IAC3E,OAAO,OAAuB,CAAC;AACjC,CAAC;AAHD,gCAGC"}
1
+ {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/hooks/actions.ts"],"names":[],"mappings":";;;;AAAA,iCAAmC;AACnC,wDAAqD;AAGrD;;GAEG;AACH,SAAgB,UAAU;IACxB,MAAM,KAAwB,IAAA,kBAAU,EAAqB,2BAAY,CAAC,EAApE,EAAE,KAAK,OAA6D,EAAxD,OAAO,sBAAnB,SAAqB,CAA+C,CAAC;IAC3E,OAAO,OAAuB,CAAC;AACjC,CAAC;AAHD,gCAGC"}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./action"), exports);
5
- (0, tslib_1.__exportStar)(require("./actions"), exports);
6
- (0, tslib_1.__exportStar)(require("./globalState"), exports);
7
- (0, tslib_1.__exportStar)(require("./media"), exports);
8
- (0, tslib_1.__exportStar)(require("./setter"), exports);
9
- (0, tslib_1.__exportStar)(require("./sharedData"), exports);
4
+ tslib_1.__exportStar(require("./action"), exports);
5
+ tslib_1.__exportStar(require("./actions"), exports);
6
+ tslib_1.__exportStar(require("./globalState"), exports);
7
+ tslib_1.__exportStar(require("./media"), exports);
8
+ tslib_1.__exportStar(require("./setter"), exports);
9
+ tslib_1.__exportStar(require("./sharedData"), exports);
10
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":";;;AAAA,wDAAyB;AACzB,yDAA0B;AAC1B,6DAA8B;AAC9B,uDAAwB;AACxB,wDAAyB;AACzB,4DAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,oDAA0B;AAC1B,wDAA8B;AAC9B,kDAAwB;AACxB,mDAAyB;AACzB,uDAA6B"}
package/lib/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./createInstance"), exports);
5
- (0, tslib_1.__exportStar)(require("./Piral"), exports);
6
- (0, tslib_1.__exportStar)(require("./helpers"), exports);
7
- (0, tslib_1.__exportStar)(require("./components"), exports);
8
- (0, tslib_1.__exportStar)(require("./hooks"), exports);
9
- (0, tslib_1.__exportStar)(require("./setters"), exports);
10
- (0, tslib_1.__exportStar)(require("./state"), exports);
11
- (0, tslib_1.__exportStar)(require("./utils"), exports);
12
- (0, tslib_1.__exportStar)(require("./types"), exports);
4
+ tslib_1.__exportStar(require("./createInstance"), exports);
5
+ tslib_1.__exportStar(require("./Piral"), exports);
6
+ tslib_1.__exportStar(require("./helpers"), exports);
7
+ tslib_1.__exportStar(require("./components"), exports);
8
+ tslib_1.__exportStar(require("./hooks"), exports);
9
+ tslib_1.__exportStar(require("./setters"), exports);
10
+ tslib_1.__exportStar(require("./state"), exports);
11
+ tslib_1.__exportStar(require("./utils"), exports);
12
+ tslib_1.__exportStar(require("./types"), exports);
13
13
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;AAAA,gEAAiC;AACjC,uDAAwB;AACxB,yDAA0B;AAC1B,4DAA6B;AAC7B,uDAAwB;AACxB,yDAA0B;AAC1B,uDAAwB;AACxB,uDAAwB;AACxB,uDAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,kDAAwB;AACxB,oDAA0B;AAC1B,uDAA6B;AAC7B,kDAAwB;AACxB,oDAA0B;AAC1B,kDAAwB;AACxB,kDAAwB;AACxB,kDAAwB"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./api"), exports);
5
- (0, tslib_1.__exportStar)(require("./dependencies"), exports);
6
- (0, tslib_1.__exportStar)(require("./element"), exports);
4
+ tslib_1.__exportStar(require("./api"), exports);
5
+ tslib_1.__exportStar(require("./dependencies"), exports);
6
+ tslib_1.__exportStar(require("./element"), exports);
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;AAAA,qDAAsB;AACtB,8DAA+B;AAC/B,yDAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,yDAA+B;AAC/B,oDAA0B"}
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./SetComponent"), exports);
5
- (0, tslib_1.__exportStar)(require("./SetError"), exports);
6
- (0, tslib_1.__exportStar)(require("./SetErrors"), exports);
7
- (0, tslib_1.__exportStar)(require("./SetLayout"), exports);
8
- (0, tslib_1.__exportStar)(require("./SetProvider"), exports);
9
- (0, tslib_1.__exportStar)(require("./SetRedirect"), exports);
10
- (0, tslib_1.__exportStar)(require("./SetRoute"), exports);
4
+ tslib_1.__exportStar(require("./SetComponent"), exports);
5
+ tslib_1.__exportStar(require("./SetError"), exports);
6
+ tslib_1.__exportStar(require("./SetErrors"), exports);
7
+ tslib_1.__exportStar(require("./SetLayout"), exports);
8
+ tslib_1.__exportStar(require("./SetProvider"), exports);
9
+ tslib_1.__exportStar(require("./SetRedirect"), exports);
10
+ tslib_1.__exportStar(require("./SetRoute"), exports);
11
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/setters/index.ts"],"names":[],"mappings":";;;AAAA,8DAA+B;AAC/B,0DAA2B;AAC3B,2DAA4B;AAC5B,2DAA4B;AAC5B,6DAA8B;AAC9B,6DAA8B;AAC9B,0DAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/setters/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,qDAA2B;AAC3B,sDAA4B;AAC5B,sDAA4B;AAC5B,wDAA8B;AAC9B,wDAA8B;AAC9B,qDAA2B"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./createActions"), exports);
5
- (0, tslib_1.__exportStar)(require("./createGlobalState"), exports);
6
- (0, tslib_1.__exportStar)(require("./stateContext"), exports);
7
- (0, tslib_1.__exportStar)(require("./withApi"), exports);
4
+ tslib_1.__exportStar(require("./createActions"), exports);
5
+ tslib_1.__exportStar(require("./createGlobalState"), exports);
6
+ tslib_1.__exportStar(require("./stateContext"), exports);
7
+ tslib_1.__exportStar(require("./withApi"), exports);
8
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":";;;AAAA,+DAAgC;AAChC,mEAAoC;AACpC,8DAA+B;AAC/B,yDAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC;AAChC,8DAAoC;AACpC,yDAA+B;AAC/B,oDAA0B"}
@@ -1 +1 @@
1
- {"version":3,"file":"withApi.js","sourceRoot":"","sources":["../../src/state/withApi.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAE/B,8CAA6D;AAC7D,oCAAyC;AAGzC,MAAM,cAAc,GAAa,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,qBAAa,EAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAE1E,SAAS,UAAU,CAAC,QAAkD,EAAE,WAAmB;IACzF,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IAEvC,IAAI,OAAO,IAAI,QAAQ,EAAE;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C,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AACnE,CAAC;AAZD,0BAYC"}
@@ -1,4 +1,4 @@
1
- import type { ComponentType } from 'react';
1
+ import type { ComponentType, ReactNode } from 'react';
2
2
  import type { RouteComponentProps, SwitchProps } from 'react-router';
3
3
  import type { FirstParametersOf, UnionOf } from './common';
4
4
  import type { PiralCustomErrors, PiralCustomComponentConverters } from './custom';
@@ -178,11 +178,19 @@ export interface LayoutProps {
178
178
  * The currently selected layout type.
179
179
  */
180
180
  currentLayout: LayoutType;
181
+ /**
182
+ * The page's content.
183
+ */
184
+ children: ReactNode;
181
185
  }
182
186
  /**
183
187
  * The props of a Router component.
184
188
  */
185
189
  export interface RouterProps {
190
+ /**
191
+ * The content to be rendered inside the router.
192
+ */
193
+ children?: ReactNode;
186
194
  }
187
195
  /**
188
196
  * The props of the RouteSwitch component.
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./api"), exports);
5
- (0, tslib_1.__exportStar)(require("./common"), exports);
6
- (0, tslib_1.__exportStar)(require("./components"), exports);
7
- (0, tslib_1.__exportStar)(require("./config"), exports);
8
- (0, tslib_1.__exportStar)(require("./custom"), exports);
9
- (0, tslib_1.__exportStar)(require("./data"), exports);
10
- (0, tslib_1.__exportStar)(require("./extension"), exports);
11
- (0, tslib_1.__exportStar)(require("./instance"), exports);
12
- (0, tslib_1.__exportStar)(require("./layout"), exports);
13
- (0, tslib_1.__exportStar)(require("./plugin"), exports);
14
- (0, tslib_1.__exportStar)(require("./state"), exports);
15
- (0, tslib_1.__exportStar)(require("./utils"), exports);
4
+ tslib_1.__exportStar(require("./api"), exports);
5
+ tslib_1.__exportStar(require("./common"), exports);
6
+ tslib_1.__exportStar(require("./components"), exports);
7
+ tslib_1.__exportStar(require("./config"), exports);
8
+ tslib_1.__exportStar(require("./custom"), exports);
9
+ tslib_1.__exportStar(require("./data"), exports);
10
+ tslib_1.__exportStar(require("./extension"), exports);
11
+ tslib_1.__exportStar(require("./instance"), exports);
12
+ tslib_1.__exportStar(require("./layout"), exports);
13
+ tslib_1.__exportStar(require("./plugin"), exports);
14
+ tslib_1.__exportStar(require("./state"), exports);
15
+ tslib_1.__exportStar(require("./utils"), exports);
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,qDAAsB;AACtB,wDAAyB;AACzB,4DAA6B;AAC7B,wDAAyB;AACzB,wDAAyB;AACzB,sDAAuB;AACvB,2DAA4B;AAC5B,0DAA2B;AAC3B,wDAAyB;AACzB,wDAAyB;AACzB,uDAAwB;AACxB,uDAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,mDAAyB;AACzB,uDAA6B;AAC7B,mDAAyB;AACzB,mDAAyB;AACzB,iDAAuB;AACvB,sDAA4B;AAC5B,qDAA2B;AAC3B,mDAAyB;AACzB,mDAAyB;AACzB,kDAAwB;AACxB,kDAAwB"}
@@ -1,7 +1,8 @@
1
+ import type { ReactNode } from 'react';
1
2
  import type { PiletApi, PiletApiCreator, LoadPiletsOptions, EventEmitter } from 'piral-base';
2
3
  import type { GlobalStateContext } from './state';
3
4
  import type { LayoutBreakpoints } from './layout';
4
- import { PiralConfiguration } from './config';
5
+ import type { PiralConfiguration } from './config';
5
6
  /**
6
7
  * The props of the Piral context.
7
8
  */
@@ -10,6 +11,7 @@ export interface PiralContextProps {
10
11
  * The specific Piral instance to be used.
11
12
  */
12
13
  instance?: PiralInstance;
14
+ children?: ReactNode;
13
15
  }
14
16
  /**
15
17
  * The props of the Piral component.
@@ -1,4 +1,4 @@
1
- import type { ComponentType, ReactPortal } from 'react';
1
+ import type { ComponentType, ReactPortal, PropsWithChildren } from 'react';
2
2
  import type { RouteComponentProps } from 'react-router';
3
3
  import type { Atom } from '@dbeining/react-atom';
4
4
  import type { LoadPiletsOptions } from 'piral-base';
@@ -16,7 +16,7 @@ declare module './components' {
16
16
  readState: PiralActions['readState'];
17
17
  }
18
18
  }
19
- export declare type WrappedComponent<TProps> = ComponentType<Without<TProps, keyof BaseComponentProps>>;
19
+ export declare type WrappedComponent<TProps> = ComponentType<PropsWithChildren<Without<TProps, keyof BaseComponentProps>>>;
20
20
  /**
21
21
  * The base type for pilet component registration in the global state context.
22
22
  */
@@ -75,7 +75,7 @@ function withKey(obj, key, value) {
75
75
  }
76
76
  exports.withKey = withKey;
77
77
  function withoutKey(obj, key) {
78
- const _a = obj || {}, _b = key, _ = _a[_b], newObj = (0, tslib_1.__rest)(_a, [typeof _b === "symbol" ? _b : _b + ""]);
78
+ const _a = obj || {}, _b = key, _ = _a[_b], newObj = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
79
79
  return newObj;
80
80
  }
81
81
  exports.withoutKey = withoutKey;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":";;;;AAAA,2BAA2B;AACd,QAAA,eAAe,GAAG,IAAI,CAAC;AAEpC,6CAA6C;AAChC,QAAA,IAAI,GAAG,EAAE,CAAC;AAEvB,gDAAgD;AACzC,MAAM,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;AAAhB,QAAA,IAAI,QAAY;AAE7B,SAAgB,WAAW,CAAI,KAAe,EAAE,IAAO;IACrD,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,IAAI,YAAI,CAAC,CAAC,CAAC;AACpC,CAAC;AAFD,kCAEC;AAED,SAAgB,UAAU,CAAI,KAAe,EAAE,IAAO;IACpD,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,YAAI,CAAC,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AAFD,gCAEC;AAED,S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AY,CAAC,OAAe;IAC1C,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;KAC5B;IAAC,WAAM;QACN,OAAO,EAAE,CAAC;KACX;AACH,CAAC;AAND,oCAMC"}
@@ -5,14 +5,14 @@ const tslib_1 = require("tslib");
5
5
  var piral_base_1 = require("piral-base");
6
6
  Object.defineProperty(exports, "isfunc", { enumerable: true, get: function () { return piral_base_1.isfunc; } });
7
7
  Object.defineProperty(exports, "requireModule", { enumerable: true, get: function () { return piral_base_1.requireModule; } });
8
- (0, tslib_1.__exportStar)(require("./compare"), exports);
9
- (0, tslib_1.__exportStar)(require("./data"), exports);
10
- (0, tslib_1.__exportStar)(require("./extension"), exports);
11
- (0, tslib_1.__exportStar)(require("./foreign"), exports);
12
- (0, tslib_1.__exportStar)(require("./guid"), exports);
13
- (0, tslib_1.__exportStar)(require("./helpers"), exports);
14
- (0, tslib_1.__exportStar)(require("./media"), exports);
15
- (0, tslib_1.__exportStar)(require("./react"), exports);
16
- (0, tslib_1.__exportStar)(require("./state"), exports);
17
- (0, tslib_1.__exportStar)(require("./storage"), exports);
8
+ tslib_1.__exportStar(require("./compare"), exports);
9
+ tslib_1.__exportStar(require("./data"), exports);
10
+ tslib_1.__exportStar(require("./extension"), exports);
11
+ tslib_1.__exportStar(require("./foreign"), exports);
12
+ tslib_1.__exportStar(require("./guid"), exports);
13
+ tslib_1.__exportStar(require("./helpers"), exports);
14
+ tslib_1.__exportStar(require("./media"), exports);
15
+ tslib_1.__exportStar(require("./react"), exports);
16
+ tslib_1.__exportStar(require("./state"), exports);
17
+ tslib_1.__exportStar(require("./storage"), exports);
18
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;AAAA,yCAAmD;AAA1C,oGAAA,MAAM,OAAA;AAAE,2GAAA,aAAa,OAAA;AAE9B,yDAA0B;AAC1B,sDAAuB;AACvB,2DAA4B;AAC5B,yDAA0B;AAC1B,sDAAuB;AACvB,yDAA0B;AAC1B,uDAAwB;AACxB,uDAAwB;AACxB,uDAAwB;AACxB,yDAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;AAAA,yCAAmD;AAA1C,oGAAA,MAAM,OAAA;AAAE,2GAAA,aAAa,OAAA;AAE9B,oDAA0B;AAC1B,iDAAuB;AACvB,sDAA4B;AAC5B,oDAA0B;AAC1B,iDAAuB;AACvB,oDAA0B;AAC1B,kDAAwB;AACxB,kDAAwB;AACxB,kDAAwB;AACxB,oDAA0B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-core",
3
- "version": "0.15.0-alpha.4041",
3
+ "version": "0.15.0-alpha.4098",
4
4
  "description": "The core library for creating a Piral instance.",
5
5
  "keywords": [
6
6
  "portal",
@@ -60,8 +60,8 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@dbeining/react-atom": "^4.0.0",
63
- "piral-base": "0.15.0-alpha.4041",
64
- "piral-debug-utils": "0.15.0-alpha.4041"
63
+ "piral-base": "0.15.0-alpha.4098",
64
+ "piral-debug-utils": "0.15.0-alpha.4098"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "react": ">=16.8.0",
@@ -71,12 +71,12 @@
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/history": "^4.7.8",
74
- "@types/react": "^17.0.0",
75
- "@types/react-dom": "^17.0.0",
74
+ "@types/react": "^18.0.0",
75
+ "@types/react-dom": "^18.0.0",
76
76
  "@types/react-router": "^5.1.8",
77
77
  "@types/react-router-dom": "^5.1.6",
78
- "react": "^17.0.1",
79
- "react-dom": "^17.0.1",
78
+ "react": "^18.0.0",
79
+ "react-dom": "^18.0.0",
80
80
  "react-router": "^5.2.0",
81
81
  "react-router-dom": "^5.2.0"
82
82
  },
@@ -91,5 +91,5 @@
91
91
  "@libre/atom",
92
92
  "@dbeining/react-atom"
93
93
  ],
94
- "gitHead": "3d305d88c72e3e05a44acbf240a38f6ad7b03959"
94
+ "gitHead": "02ef35574b29cc5dd93c515bfdf27dd523893b28"
95
95
  }
@@ -6,7 +6,11 @@ import { useGlobalState } from './hooks';
6
6
  import { RootListener } from './RootListener';
7
7
  import type { PiralContextProps } from './types';
8
8
 
9
- const PiralProvider: React.FC = ({ children }) => {
9
+ interface PiralProviderProps {
10
+ children: React.ReactNode;
11
+ }
12
+
13
+ const PiralProvider: React.FC<PiralProviderProps> = ({ children }) => {
10
14
  const Provider = useGlobalState((m) => m.provider || React.Fragment);
11
15
  return <Provider>{children}</Provider>;
12
16
  };
@@ -11,6 +11,10 @@ export interface ErrorBoundaryProps {
11
11
  * The associated pilet api for the metadata.
12
12
  */
13
13
  piral: PiletApi;
14
+ /**
15
+ * The content to render (i.e., where to apply the boundary to).
16
+ */
17
+ children: React.ReactNode;
14
18
  }
15
19
 
16
20
  export interface ErrorBoundaryState {
@@ -2,7 +2,11 @@ import * as React from 'react';
2
2
  import { RegisteredErrorInfo, RegisteredLoadingIndicator } from './components';
3
3
  import { useGlobalState } from '../hooks';
4
4
 
5
- export const PiralSuspense: React.FC = ({ children }) => {
5
+ export interface PiralSuspenseProps {
6
+ children?: React.ReactNode;
7
+ }
8
+
9
+ export const PiralSuspense: React.FC<PiralSuspenseProps> = ({ children }) => {
6
10
  const { error, loading } = useGlobalState((m) => m.app);
7
11
 
8
12
  return error ? (
@@ -17,6 +17,10 @@ export interface PiralViewProps {
17
17
  * The custom breakpoints for the different layout modi.
18
18
  */
19
19
  breakpoints?: LayoutBreakpoints;
20
+ /**
21
+ * The extra content.
22
+ */
23
+ children: React.ReactNode;
20
24
  }
21
25
 
22
26
  /**
@@ -11,7 +11,14 @@ export interface ResponsiveLayoutProps {
11
11
  * The individual breakpoints to be used for the different layouts.
12
12
  */
13
13
  breakpoints?: LayoutBreakpoints;
14
+ /**
15
+ * The actual layout component to render to transport.
16
+ */
14
17
  Layout: React.ComponentType<LayoutProps>;
18
+ /**
19
+ * The content to display.
20
+ */
21
+ children: React.ReactNode;
15
22
  }
16
23
 
17
24
  /**
@@ -1,8 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { BrowserRouter } from 'react-router-dom';
3
3
  import { useGlobalState } from '../hooks';
4
+ import { RouterProps } from '../types';
4
5
 
5
- export const DefaultRouter: React.FC = ({ children }) => {
6
+ export const DefaultRouter: React.FC<RouterProps> = ({ children }) => {
6
7
  const publicPath = useGlobalState((s) => s.app.publicPath);
7
8
  return <BrowserRouter basename={publicPath}>{children}</BrowserRouter>;
8
9
  };
@@ -4,7 +4,7 @@ import { ErrorBoundary, wrapComponent } from '../components';
4
4
  import { defaultRender } from '../utils';
5
5
  import { AnyComponent, Errors, PiletApi, BaseComponentProps, GlobalStateContext } from '../types';
6
6
 
7
- const DefaultWrapper: React.FC = (props) => defaultRender(props.children);
7
+ const DefaultWrapper: React.FC<React.PropsWithChildren<{}>> = (props) => defaultRender(props.children);
8
8
 
9
9
  function getWrapper(wrappers: Record<string, React.ComponentType<any>>, wrapperType: string) {
10
10
  const WrapAll = wrappers['*'];
@@ -26,7 +26,7 @@ function makeWrapper<TProps>(
26
26
  outerProps: any,
27
27
  wrapperType: string,
28
28
  errorType: keyof Errors,
29
- ): React.FC<TProps> {
29
+ ): React.FC<React.PropsWithChildren<TProps>> {
30
30
  const OuterWrapper = context.readState((m) => getWrapper(m.registry.wrappers, wrapperType));
31
31
 
32
32
  return (props) => (
@@ -1,4 +1,4 @@
1
- import type { ComponentType } from 'react';
1
+ import type { ComponentType, ReactNode } from 'react';
2
2
  import type { RouteComponentProps, SwitchProps } from 'react-router';
3
3
  import type { FirstParametersOf, UnionOf } from './common';
4
4
  import type { PiralCustomErrors, PiralCustomComponentConverters } from './custom';
@@ -191,12 +191,21 @@ export interface LayoutProps {
191
191
  * The currently selected layout type.
192
192
  */
193
193
  currentLayout: LayoutType;
194
+ /**
195
+ * The page's content.
196
+ */
197
+ children: ReactNode;
194
198
  }
195
199
 
196
200
  /**
197
201
  * The props of a Router component.
198
202
  */
199
- export interface RouterProps {}
203
+ export interface RouterProps {
204
+ /**
205
+ * The content to be rendered inside the router.
206
+ */
207
+ children?: ReactNode;
208
+ }
200
209
 
201
210
  /**
202
211
  * The props of the RouteSwitch component.
@@ -1,7 +1,8 @@
1
+ import type { ReactNode } from 'react';
1
2
  import type { PiletApi, PiletApiCreator, LoadPiletsOptions, EventEmitter } from 'piral-base';
2
3
  import type { GlobalStateContext } from './state';
3
4
  import type { LayoutBreakpoints } from './layout';
4
- import { PiralConfiguration } from './config';
5
+ import type { PiralConfiguration } from './config';
5
6
 
6
7
  /**
7
8
  * The props of the Piral context.
@@ -11,6 +12,7 @@ export interface PiralContextProps {
11
12
  * The specific Piral instance to be used.
12
13
  */
13
14
  instance?: PiralInstance;
15
+ children?: ReactNode;
14
16
  }
15
17
 
16
18
  /**
@@ -1,4 +1,4 @@
1
- import type { ComponentType, ReactPortal } from 'react';
1
+ import type { ComponentType, ReactPortal, PropsWithChildren } from 'react';
2
2
  import type { RouteComponentProps } from 'react-router';
3
3
  import type { Atom } from '@dbeining/react-atom';
4
4
  import type { LoadPiletsOptions } from 'piral-base';
@@ -41,7 +41,7 @@ declare module './components' {
41
41
  }
42
42
  }
43
43
 
44
- export type WrappedComponent<TProps> = ComponentType<Without<TProps, keyof BaseComponentProps>>;
44
+ export type WrappedComponent<TProps> = ComponentType<PropsWithChildren<Without<TProps, keyof BaseComponentProps>>>;
45
45
 
46
46
  /**
47
47
  * The base type for pilet component registration in the global state context.