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

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 (245) hide show
  1. package/esm/Piral.d.ts +2 -2
  2. package/esm/Piral.js +14 -12
  3. package/esm/Piral.js.map +1 -1
  4. package/esm/PiralContext.d.ts +21 -0
  5. package/esm/PiralContext.js +34 -0
  6. package/esm/PiralContext.js.map +1 -0
  7. package/esm/actions/app.d.ts +1 -2
  8. package/esm/actions/app.js +0 -3
  9. package/esm/actions/app.js.map +1 -1
  10. package/esm/actions/state.js +5 -1
  11. package/esm/actions/state.js.map +1 -1
  12. package/esm/components/ErrorBoundary.js +3 -3
  13. package/esm/components/ErrorBoundary.js.map +1 -1
  14. package/esm/components/PiralGlobals.d.ts +6 -0
  15. package/esm/components/PiralGlobals.js +13 -0
  16. package/esm/components/PiralGlobals.js.map +1 -0
  17. package/esm/components/PiralSuspense.d.ts +2 -0
  18. package/esm/components/PiralSuspense.js +8 -0
  19. package/esm/components/PiralSuspense.js.map +1 -0
  20. package/esm/components/PiralView.d.ts +6 -1
  21. package/esm/components/PiralView.js +12 -24
  22. package/esm/components/PiralView.js.map +1 -1
  23. package/esm/components/ResponsiveLayout.d.ts +2 -1
  24. package/esm/components/ResponsiveLayout.js +5 -12
  25. package/esm/components/ResponsiveLayout.js.map +1 -1
  26. package/esm/components/components.d.ts +13 -6
  27. package/esm/components/components.js +13 -6
  28. package/esm/components/components.js.map +1 -1
  29. package/esm/components/index.d.ts +2 -12
  30. package/esm/components/index.js +2 -12
  31. package/esm/components/index.js.map +1 -1
  32. package/esm/{components → defaults}/DefaultErrorInfo.d.ts +0 -0
  33. package/esm/{components → defaults}/DefaultErrorInfo.js +1 -2
  34. package/esm/defaults/DefaultErrorInfo.js.map +1 -0
  35. package/esm/{components → defaults}/DefaultLayout.d.ts +0 -0
  36. package/esm/{components → defaults}/DefaultLayout.js +0 -0
  37. package/esm/defaults/DefaultLayout.js.map +1 -0
  38. package/esm/{components/DefaultLoader.d.ts → defaults/DefaultLoadingIndicator.d.ts} +0 -0
  39. package/esm/{components/DefaultLoader.js → defaults/DefaultLoadingIndicator.js} +1 -1
  40. package/esm/defaults/DefaultLoadingIndicator.js.map +1 -0
  41. package/esm/{components → defaults}/DefaultRouteSwitch.d.ts +0 -0
  42. package/esm/{components → defaults}/DefaultRouteSwitch.js +0 -0
  43. package/esm/defaults/DefaultRouteSwitch.js.map +1 -0
  44. package/esm/{components → defaults}/DefaultRouter.d.ts +0 -0
  45. package/esm/{components → defaults}/DefaultRouter.js +0 -0
  46. package/esm/defaults/DefaultRouter.js.map +1 -0
  47. package/esm/defaults/index.d.ts +5 -0
  48. package/esm/defaults/index.js +6 -0
  49. package/esm/defaults/index.js.map +1 -0
  50. package/esm/index.d.ts +1 -0
  51. package/esm/index.js +1 -0
  52. package/esm/index.js.map +1 -1
  53. package/esm/{components → setters}/SetComponent.d.ts +0 -0
  54. package/esm/{components → setters}/SetComponent.js +0 -0
  55. package/esm/setters/SetComponent.js.map +1 -0
  56. package/esm/{components → setters}/SetError.d.ts +0 -0
  57. package/esm/{components → setters}/SetError.js +0 -0
  58. package/esm/setters/SetError.js.map +1 -0
  59. package/esm/{components → setters}/SetErrors.d.ts +0 -0
  60. package/esm/{components → setters}/SetErrors.js +0 -0
  61. package/esm/setters/SetErrors.js.map +1 -0
  62. package/esm/{components → setters}/SetLayout.d.ts +0 -0
  63. package/esm/{components → setters}/SetLayout.js +0 -0
  64. package/esm/setters/SetLayout.js.map +1 -0
  65. package/esm/{components → setters}/SetProvider.d.ts +0 -0
  66. package/esm/{components → setters}/SetProvider.js +0 -0
  67. package/esm/setters/SetProvider.js.map +1 -0
  68. package/esm/{components → setters}/SetRedirect.d.ts +0 -0
  69. package/esm/{components → setters}/SetRedirect.js +0 -0
  70. package/esm/setters/SetRedirect.js.map +1 -0
  71. package/esm/{components → setters}/SetRoute.d.ts +0 -0
  72. package/esm/{components → setters}/SetRoute.js +0 -0
  73. package/esm/setters/SetRoute.js.map +1 -0
  74. package/esm/setters/index.d.ts +7 -0
  75. package/esm/setters/index.js +8 -0
  76. package/esm/setters/index.js.map +1 -0
  77. package/esm/state/createGlobalState.js +1 -2
  78. package/esm/state/createGlobalState.js.map +1 -1
  79. package/esm/types/instance.d.ts +7 -2
  80. package/esm/types/state.d.ts +0 -10
  81. package/esm/utils/compare.d.ts +1 -1
  82. package/esm/utils/compare.js +20 -3
  83. package/esm/utils/compare.js.map +1 -1
  84. package/esm/utils/media.js +1 -1
  85. package/esm/utils/media.js.map +1 -1
  86. package/lib/Piral.d.ts +2 -2
  87. package/lib/Piral.js +13 -11
  88. package/lib/Piral.js.map +1 -1
  89. package/lib/PiralContext.d.ts +21 -0
  90. package/lib/PiralContext.js +38 -0
  91. package/lib/PiralContext.js.map +1 -0
  92. package/lib/actions/app.d.ts +1 -2
  93. package/lib/actions/app.js +1 -5
  94. package/lib/actions/app.js.map +1 -1
  95. package/lib/actions/state.js +5 -1
  96. package/lib/actions/state.js.map +1 -1
  97. package/lib/components/ErrorBoundary.js +2 -2
  98. package/lib/components/ErrorBoundary.js.map +1 -1
  99. package/lib/components/PiralGlobals.d.ts +6 -0
  100. package/lib/components/PiralGlobals.js +17 -0
  101. package/lib/components/PiralGlobals.js.map +1 -0
  102. package/lib/components/PiralSuspense.d.ts +2 -0
  103. package/lib/components/PiralSuspense.js +12 -0
  104. package/lib/components/PiralSuspense.js.map +1 -0
  105. package/lib/components/PiralView.d.ts +6 -1
  106. package/lib/components/PiralView.js +11 -23
  107. package/lib/components/PiralView.js.map +1 -1
  108. package/lib/components/ResponsiveLayout.d.ts +2 -1
  109. package/lib/components/ResponsiveLayout.js +3 -10
  110. package/lib/components/ResponsiveLayout.js.map +1 -1
  111. package/lib/components/components.d.ts +13 -6
  112. package/lib/components/components.js +14 -7
  113. package/lib/components/components.js.map +1 -1
  114. package/lib/components/index.d.ts +2 -12
  115. package/lib/components/index.js +2 -12
  116. package/lib/components/index.js.map +1 -1
  117. package/lib/{components → defaults}/DefaultErrorInfo.d.ts +0 -0
  118. package/lib/{components → defaults}/DefaultErrorInfo.js +2 -3
  119. package/lib/defaults/DefaultErrorInfo.js.map +1 -0
  120. package/lib/{components → defaults}/DefaultLayout.d.ts +0 -0
  121. package/lib/{components → defaults}/DefaultLayout.js +0 -0
  122. package/lib/defaults/DefaultLayout.js.map +1 -0
  123. package/lib/{components/DefaultLoader.d.ts → defaults/DefaultLoadingIndicator.d.ts} +0 -0
  124. package/lib/{components/DefaultLoader.js → defaults/DefaultLoadingIndicator.js} +1 -1
  125. package/lib/defaults/DefaultLoadingIndicator.js.map +1 -0
  126. package/lib/{components → defaults}/DefaultRouteSwitch.d.ts +0 -0
  127. package/lib/{components → defaults}/DefaultRouteSwitch.js +0 -0
  128. package/lib/defaults/DefaultRouteSwitch.js.map +1 -0
  129. package/lib/{components → defaults}/DefaultRouter.d.ts +0 -0
  130. package/lib/{components → defaults}/DefaultRouter.js +0 -0
  131. package/lib/defaults/DefaultRouter.js.map +1 -0
  132. package/lib/defaults/index.d.ts +5 -0
  133. package/lib/defaults/index.js +9 -0
  134. package/lib/defaults/index.js.map +1 -0
  135. package/lib/index.d.ts +1 -0
  136. package/lib/index.js +1 -0
  137. package/lib/index.js.map +1 -1
  138. package/lib/{components → setters}/SetComponent.d.ts +0 -0
  139. package/lib/{components → setters}/SetComponent.js +0 -0
  140. package/lib/setters/SetComponent.js.map +1 -0
  141. package/lib/{components → setters}/SetError.d.ts +0 -0
  142. package/lib/{components → setters}/SetError.js +0 -0
  143. package/lib/setters/SetError.js.map +1 -0
  144. package/lib/{components → setters}/SetErrors.d.ts +0 -0
  145. package/lib/{components → setters}/SetErrors.js +0 -0
  146. package/lib/setters/SetErrors.js.map +1 -0
  147. package/lib/{components → setters}/SetLayout.d.ts +0 -0
  148. package/lib/{components → setters}/SetLayout.js +0 -0
  149. package/lib/setters/SetLayout.js.map +1 -0
  150. package/lib/{components → setters}/SetProvider.d.ts +0 -0
  151. package/lib/{components → setters}/SetProvider.js +0 -0
  152. package/lib/setters/SetProvider.js.map +1 -0
  153. package/lib/{components → setters}/SetRedirect.d.ts +0 -0
  154. package/lib/{components → setters}/SetRedirect.js +0 -0
  155. package/lib/setters/SetRedirect.js.map +1 -0
  156. package/lib/{components → setters}/SetRoute.d.ts +0 -0
  157. package/lib/{components → setters}/SetRoute.js +0 -0
  158. package/lib/setters/SetRoute.js.map +1 -0
  159. package/lib/setters/index.d.ts +7 -0
  160. package/lib/setters/index.js +11 -0
  161. package/lib/setters/index.js.map +1 -0
  162. package/lib/state/createGlobalState.js +6 -7
  163. package/lib/state/createGlobalState.js.map +1 -1
  164. package/lib/types/instance.d.ts +7 -2
  165. package/lib/types/state.d.ts +0 -10
  166. package/lib/utils/compare.d.ts +1 -1
  167. package/lib/utils/compare.js +22 -5
  168. package/lib/utils/compare.js.map +1 -1
  169. package/lib/utils/media.js +1 -1
  170. package/lib/utils/media.js.map +1 -1
  171. package/package.json +16 -4
  172. package/src/Piral.test.tsx +3 -3
  173. package/src/Piral.tsx +18 -14
  174. package/src/PiralContext.tsx +39 -0
  175. package/src/actions/app.test.ts +0 -18
  176. package/src/actions/app.ts +0 -8
  177. package/src/actions/state.ts +6 -1
  178. package/src/components/ErrorBoundary.tsx +3 -3
  179. package/src/components/PiralGlobals.tsx +16 -0
  180. package/src/components/PiralRoutes.test.tsx +1 -1
  181. package/src/components/PiralSuspense.tsx +15 -0
  182. package/src/components/PiralView-server.test.tsx +1 -0
  183. package/src/components/PiralView.test.tsx +1 -0
  184. package/src/components/PiralView.tsx +24 -47
  185. package/src/components/ResponsiveLayout.test.tsx +14 -43
  186. package/src/components/ResponsiveLayout.tsx +11 -15
  187. package/src/components/components.tsx +13 -6
  188. package/src/components/index.ts +2 -12
  189. package/src/{components → defaults}/DefaultErrorInfo.test.tsx +0 -0
  190. package/src/{components → defaults}/DefaultErrorInfo.tsx +1 -2
  191. package/src/{components → defaults}/DefaultLayout.test.tsx +0 -0
  192. package/src/{components → defaults}/DefaultLayout.tsx +1 -1
  193. package/src/{components/DefaultLoader.test.tsx → defaults/DefaultLoadingIndicator.test.tsx} +2 -2
  194. package/src/{components/DefaultLoader.tsx → defaults/DefaultLoadingIndicator.tsx} +0 -0
  195. package/src/{components → defaults}/DefaultRouteSwitch.tsx +0 -0
  196. package/src/{components → defaults}/DefaultRouter.tsx +0 -0
  197. package/src/defaults/index.ts +5 -0
  198. package/src/index.tsx +1 -0
  199. package/src/{components → setters}/SetComponent.test.tsx +0 -0
  200. package/src/{components → setters}/SetComponent.tsx +0 -0
  201. package/src/{components → setters}/SetError.test.tsx +0 -0
  202. package/src/{components → setters}/SetError.tsx +0 -0
  203. package/src/{components → setters}/SetErrors.test.tsx +0 -0
  204. package/src/{components → setters}/SetErrors.tsx +0 -0
  205. package/src/{components → setters}/SetLayout.test.tsx +0 -0
  206. package/src/{components → setters}/SetLayout.tsx +0 -0
  207. package/src/{components → setters}/SetProvider.test.tsx +0 -0
  208. package/src/{components → setters}/SetProvider.tsx +0 -0
  209. package/src/{components → setters}/SetRedirect.test.tsx +0 -0
  210. package/src/{components → setters}/SetRedirect.tsx +0 -0
  211. package/src/{components → setters}/SetRoute.test.tsx +0 -0
  212. package/src/{components → setters}/SetRoute.tsx +0 -0
  213. package/src/setters/index.ts +7 -0
  214. package/src/state/createGlobalState.test.ts +1 -10
  215. package/src/state/createGlobalState.ts +2 -3
  216. package/src/types/instance.ts +8 -2
  217. package/src/types/state.ts +0 -10
  218. package/src/utils/compare.test.ts +15 -15
  219. package/src/utils/compare.ts +23 -3
  220. package/src/utils/foreign.test.ts +1 -1
  221. package/src/utils/media.ts +1 -1
  222. package/esm/components/DefaultErrorInfo.js.map +0 -1
  223. package/esm/components/DefaultLayout.js.map +0 -1
  224. package/esm/components/DefaultLoader.js.map +0 -1
  225. package/esm/components/DefaultRouteSwitch.js.map +0 -1
  226. package/esm/components/DefaultRouter.js.map +0 -1
  227. package/esm/components/SetComponent.js.map +0 -1
  228. package/esm/components/SetError.js.map +0 -1
  229. package/esm/components/SetErrors.js.map +0 -1
  230. package/esm/components/SetLayout.js.map +0 -1
  231. package/esm/components/SetProvider.js.map +0 -1
  232. package/esm/components/SetRedirect.js.map +0 -1
  233. package/esm/components/SetRoute.js.map +0 -1
  234. package/lib/components/DefaultErrorInfo.js.map +0 -1
  235. package/lib/components/DefaultLayout.js.map +0 -1
  236. package/lib/components/DefaultLoader.js.map +0 -1
  237. package/lib/components/DefaultRouteSwitch.js.map +0 -1
  238. package/lib/components/DefaultRouter.js.map +0 -1
  239. package/lib/components/SetComponent.js.map +0 -1
  240. package/lib/components/SetError.js.map +0 -1
  241. package/lib/components/SetErrors.js.map +0 -1
  242. package/lib/components/SetLayout.js.map +0 -1
  243. package/lib/components/SetProvider.js.map +0 -1
  244. package/lib/components/SetRedirect.js.map +0 -1
  245. package/lib/components/SetRoute.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PiralView.js","sourceRoot":"","sources":["../../src/components/PiralView.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+CAAiE;AACjE,+CAA4C;AAC5C,6CAOsB;AACtB,oCAA0C;AAE1C,MAAM,QAAQ,GAAkC,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAC,uBAAU,kBAAC,IAAI,EAAC,WAAW,IAAK,KAAK,EAAI,CAAC;AAEtG,MAAM,YAAY,GAAa,GAAG,EAAE;IAClC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAEhE,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,oBAAC,uBAAU,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,KAAK,GAAI,CAC5C,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACZ,oBAAC,kCAAqB,OAAG,CAC1B,CA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C;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,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { LayoutBreakpoints } from '../types';
2
+ import { LayoutBreakpoints, LayoutProps } from '../types';
3
3
  /**
4
4
  * The props for the ResponsiveLayout component.
5
5
  */
@@ -8,6 +8,7 @@ export interface ResponsiveLayoutProps {
8
8
  * The individual breakpoints to be used for the different layouts.
9
9
  */
10
10
  breakpoints?: LayoutBreakpoints;
11
+ Layout: React.ComponentType<LayoutProps>;
11
12
  }
12
13
  /**
13
14
  * The component capable of identifying and switching the currently used layout.
@@ -7,16 +7,9 @@ const utils_1 = require("../utils");
7
7
  /**
8
8
  * The component capable of identifying and switching the currently used layout.
9
9
  */
10
- const ResponsiveLayout = ({ breakpoints = utils_1.defaultBreakpoints, children }) => {
11
- const current = (0, hooks_1.useGlobalState)((m) => m.app.layout) || 'desktop';
12
- const { changeLayout } = (0, hooks_1.useGlobalStateContext)();
13
- const selected = (0, hooks_1.useMedia)(breakpoints, utils_1.defaultLayouts, current);
14
- React.useEffect(() => {
15
- if (selected !== current) {
16
- changeLayout(selected);
17
- }
18
- }, [selected]);
19
- return (0, utils_1.defaultRender)(children);
10
+ const ResponsiveLayout = ({ breakpoints = utils_1.defaultBreakpoints, Layout, children, }) => {
11
+ const selected = (0, hooks_1.useMedia)(breakpoints, utils_1.defaultLayouts, 'desktop');
12
+ return React.createElement(Layout, { currentLayout: selected }, children);
20
13
  };
21
14
  exports.ResponsiveLayout = ResponsiveLayout;
22
15
  exports.ResponsiveLayout.displayName = 'ResponsiveLayout';
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsiveLayout.js","sourceRoot":"","sources":["../../src/components/ResponsiveLayout.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,oCAA2E;AAC3E,oCAA6E;AAa7E;;GAEG;AACI,MAAM,gBAAgB,GAAoC,CAAC,EAAE,WAAW,GAAG,0BAAkB,EAAE,QAAQ,EAAE,EAAE,EAAE;IAClH,MAAM,OAAO,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC;IACjE,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,6BAAqB,GAAE,CAAC;IACjD,MAAM,QAAQ,GAAG,IAAA,gBAAQ,EAAC,WAAW,EAAE,sBAAc,EAAE,OAAO,CAAC,CAAC;IAEhE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,QAAQ,KAAK,OAAO,EAAE;YACxB,YAAY,CAAC,QAAQ,CAAC,CAAC;SACxB;IACH,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,IAAA,qBAAa,EAAC,QAAQ,CAAC,CAAC;AACjC,CAAC,CAAC;AAZW,QAAA,gBAAgB,oBAY3B;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;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,33 +1,40 @@
1
1
  import * as React from 'react';
2
2
  import { ComponentsState } from '../types';
3
+ /**
4
+ * Gets a registered layout component by its name.
5
+ * This will always return a valid component. If nothing is found
6
+ * then the returned component will just return null.
7
+ * @param name The name of the registered layout component.
8
+ * @returns The registered layout component or an empty stub component.
9
+ */
3
10
  export declare function getPiralComponent<TKey extends keyof ComponentsState>(name: TKey): ComponentsState[TKey];
4
11
  /**
5
12
  * Gets the currently registered ErrorInfo component.
6
13
  * By default the DefaultErrorInfo component is used.
7
14
  */
8
- export declare const PiralError: React.ComponentType<import("../types").ErrorInfoProps>;
15
+ export declare const RegisteredErrorInfo: React.ComponentType<import("../types").ErrorInfoProps>;
9
16
  /**
10
17
  * Gets the currently registered LoadingIndicator component.
11
18
  * By default only Loading is rendered.
12
19
  */
13
- export declare const PiralLoadingIndicator: React.ComponentType<import("../types").LoadingIndicatorProps>;
20
+ export declare const RegisteredLoadingIndicator: React.ComponentType<import("../types").LoadingIndicatorProps>;
14
21
  /**
15
22
  * Gets the currently registered Router component.
16
23
  * By default the BrowserRouter is used.
17
24
  */
18
- export declare const PiralRouter: React.ComponentType<import("../types").RouterProps>;
25
+ export declare const RegisteredRouter: React.ComponentType<import("../types").RouterProps>;
19
26
  /**
20
27
  * Gets the currently registered Route Switch component.
21
28
  * By default the DefaultRouteSwitch component is used.
22
29
  */
23
- export declare const PiralRouteSwitch: React.ComponentType<import("../types").RouteSwitchProps>;
30
+ export declare const RegisteredRouteSwitch: React.ComponentType<import("../types").RouteSwitchProps>;
24
31
  /**
25
32
  * Gets the currently registered Layout component.
26
33
  * By default the children are rendered.
27
34
  */
28
- export declare const PiralLayout: React.ComponentType<import("../types").LayoutProps>;
35
+ export declare const RegisteredLayout: React.ComponentType<import("../types").LayoutProps>;
29
36
  /**
30
37
  * Gets the currently registered Debug component.
31
38
  * By default nothing is used.
32
39
  */
33
- export declare const PiralDebug: React.ComponentType<{}>;
40
+ export declare const RegisteredDebug: React.ComponentType<{}>;
@@ -1,8 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PiralDebug = exports.PiralLayout = exports.PiralRouteSwitch = exports.PiralRouter = exports.PiralLoadingIndicator = exports.PiralError = exports.getPiralComponent = void 0;
3
+ exports.RegisteredDebug = exports.RegisteredLayout = exports.RegisteredRouteSwitch = exports.RegisteredRouter = exports.RegisteredLoadingIndicator = exports.RegisteredErrorInfo = exports.getPiralComponent = void 0;
4
4
  const React = require("react");
5
5
  const hooks_1 = require("../hooks");
6
+ /**
7
+ * Gets a registered layout component by its name.
8
+ * This will always return a valid component. If nothing is found
9
+ * then the returned component will just return null.
10
+ * @param name The name of the registered layout component.
11
+ * @returns The registered layout component or an empty stub component.
12
+ */
6
13
  function getPiralComponent(name) {
7
14
  return (props) => {
8
15
  const Component = (0, hooks_1.useGlobalState)((s) => s.components[name]);
@@ -15,30 +22,30 @@ exports.getPiralComponent = getPiralComponent;
15
22
  * Gets the currently registered ErrorInfo component.
16
23
  * By default the DefaultErrorInfo component is used.
17
24
  */
18
- exports.PiralError = getPiralComponent('ErrorInfo');
25
+ exports.RegisteredErrorInfo = getPiralComponent('ErrorInfo');
19
26
  /**
20
27
  * Gets the currently registered LoadingIndicator component.
21
28
  * By default only Loading is rendered.
22
29
  */
23
- exports.PiralLoadingIndicator = getPiralComponent('LoadingIndicator');
30
+ exports.RegisteredLoadingIndicator = getPiralComponent('LoadingIndicator');
24
31
  /**
25
32
  * Gets the currently registered Router component.
26
33
  * By default the BrowserRouter is used.
27
34
  */
28
- exports.PiralRouter = getPiralComponent('Router');
35
+ exports.RegisteredRouter = getPiralComponent('Router');
29
36
  /**
30
37
  * Gets the currently registered Route Switch component.
31
38
  * By default the DefaultRouteSwitch component is used.
32
39
  */
33
- exports.PiralRouteSwitch = getPiralComponent('RouteSwitch');
40
+ exports.RegisteredRouteSwitch = getPiralComponent('RouteSwitch');
34
41
  /**
35
42
  * Gets the currently registered Layout component.
36
43
  * By default the children are rendered.
37
44
  */
38
- exports.PiralLayout = getPiralComponent('Layout');
45
+ exports.RegisteredLayout = getPiralComponent('Layout');
39
46
  /**
40
47
  * Gets the currently registered Debug component.
41
48
  * By default nothing is used.
42
49
  */
43
- exports.PiralDebug = getPiralComponent('Debug');
50
+ exports.RegisteredDebug = getPiralComponent('Debug');
44
51
  //# sourceMappingURL=components.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/components/components.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,oCAA0C;AAG1C,SAAgB,iBAAiB,CAAqC,IAAU;IAC9E,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,MAAM,SAAS,GAAG,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5D,2CAA2C;QAC3C,OAAO,SAAS,CAAC,CAAC,CAAC,oBAAC,SAAS,oBAAK,KAAK,EAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC;AAND,8CAMC;AAED;;;GAGG;AACU,QAAA,UAAU,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;AAEzD;;;GAGG;AACU,QAAA,qBAAqB,GAAG,i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
@@ -1,22 +1,12 @@
1
1
  export * from './components';
2
- export * from './DefaultErrorInfo';
3
- export * from './DefaultLayout';
4
- export * from './DefaultLoader';
5
- export * from './DefaultRouter';
6
- export * from './DefaultRouteSwitch';
7
2
  export * from './ErrorBoundary';
8
3
  export * from './ExtensionSlot';
9
4
  export * from './Mediator';
5
+ export * from './PiralGlobals';
10
6
  export * from './PiralRoutes';
7
+ export * from './PiralSuspense';
11
8
  export * from './PiralView';
12
9
  export * from './PortalRenderer';
13
10
  export * from './ResponsiveLayout';
14
- export * from './SetComponent';
15
- export * from './SetError';
16
- export * from './SetErrors';
17
- export * from './SetLayout';
18
- export * from './SetProvider';
19
- export * from './SetRedirect';
20
- export * from './SetRoute';
21
11
  export * from './SwitchErrorInfo';
22
12
  export * from './wrapComponent';
@@ -2,25 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  (0, tslib_1.__exportStar)(require("./components"), exports);
5
- (0, tslib_1.__exportStar)(require("./DefaultErrorInfo"), exports);
6
- (0, tslib_1.__exportStar)(require("./DefaultLayout"), exports);
7
- (0, tslib_1.__exportStar)(require("./DefaultLoader"), exports);
8
- (0, tslib_1.__exportStar)(require("./DefaultRouter"), exports);
9
- (0, tslib_1.__exportStar)(require("./DefaultRouteSwitch"), exports);
10
5
  (0, tslib_1.__exportStar)(require("./ErrorBoundary"), exports);
11
6
  (0, tslib_1.__exportStar)(require("./ExtensionSlot"), exports);
12
7
  (0, tslib_1.__exportStar)(require("./Mediator"), exports);
8
+ (0, tslib_1.__exportStar)(require("./PiralGlobals"), exports);
13
9
  (0, tslib_1.__exportStar)(require("./PiralRoutes"), exports);
10
+ (0, tslib_1.__exportStar)(require("./PiralSuspense"), exports);
14
11
  (0, tslib_1.__exportStar)(require("./PiralView"), exports);
15
12
  (0, tslib_1.__exportStar)(require("./PortalRenderer"), exports);
16
13
  (0, tslib_1.__exportStar)(require("./ResponsiveLayout"), exports);
17
- (0, tslib_1.__exportStar)(require("./SetComponent"), exports);
18
- (0, tslib_1.__exportStar)(require("./SetError"), exports);
19
- (0, tslib_1.__exportStar)(require("./SetErrors"), exports);
20
- (0, tslib_1.__exportStar)(require("./SetLayout"), exports);
21
- (0, tslib_1.__exportStar)(require("./SetProvider"), exports);
22
- (0, tslib_1.__exportStar)(require("./SetRedirect"), exports);
23
- (0, tslib_1.__exportStar)(require("./SetRoute"), exports);
24
14
  (0, tslib_1.__exportStar)(require("./SwitchErrorInfo"), exports);
25
15
  (0, tslib_1.__exportStar)(require("./wrapComponent"), exports);
26
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,4DAA6B;AAC7B,kEAAmC;AACnC,+DAAgC;AAChC,+DAAgC;AAChC,+DAAgC;AAChC,oEAAqC;AACrC,+DAAgC;AAChC,+DAAgC;AAChC,0DAA2B;AAC3B,6DAA8B;AAC9B,2DAA4B;AAC5B,gEAAiC;AACjC,kEAAmC;AACnC,8DAA+B;AAC/B,0DAA2B;AAC3B,2DAA4B;AAC5B,2DAA4B;AAC5B,6DAA8B;AAC9B,6DAA8B;AAC9B,0DAA2B;AAC3B,iEAAkC;AAClC,+DAAgC"}
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"}
@@ -2,14 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DefaultErrorInfo = void 0;
4
4
  const React = require("react");
5
- const ExtensionSlot_1 = require("./ExtensionSlot");
6
- const SwitchErrorInfo_1 = require("./SwitchErrorInfo");
5
+ const components_1 = require("../components");
7
6
  /**
8
7
  * The default error info component. Just uses the "error" extension slot.
9
8
  * Leverage the default one by registration of respective extensions using
10
9
  * the "error" name.
11
10
  */
12
- const DefaultErrorInfo = (props) => (React.createElement(ExtensionSlot_1.ExtensionSlot, { name: "error", params: props, empty: () => React.createElement(SwitchErrorInfo_1.SwitchErrorInfo, Object.assign({ key: "default_error" }, props)) }));
11
+ const DefaultErrorInfo = (props) => (React.createElement(components_1.ExtensionSlot, { name: "error", params: props, empty: () => React.createElement(components_1.SwitchErrorInfo, Object.assign({ key: "default_error" }, props)) }));
13
12
  exports.DefaultErrorInfo = DefaultErrorInfo;
14
13
  exports.DefaultErrorInfo.displayName = 'DefaultErrorInfo';
15
14
  //# sourceMappingURL=DefaultErrorInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultErrorInfo.js","sourceRoot":"","sources":["../../src/defaults/DefaultErrorInfo.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,8CAA+D;AAG/D;;;;GAIG;AACI,MAAM,gBAAgB,GAA6B,CAAC,KAAK,EAAE,EAAE,CAAC,CACnE,oBAAC,0BAAa,IAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,oBAAC,4BAAe,kBAAC,GAAG,EAAC,eAAe,IAAK,KAAK,EAAI,GAAI,CAC/G,CAAC;AAFW,QAAA,gBAAgB,oBAE3B;AACF,wBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultLayout.js","sourceRoot":"","sources":["../../src/defaults/DefaultLayout.tsx"],"names":[],"mappings":";;;AACA,oCAAyC;AAGzC;;GAEG;AACI,MAAM,aAAa,GAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,IAAA,qBAAa,EAAC,QAAQ,CAAC,CAAC;AAAjF,QAAA,aAAa,iBAAoE;AAC9F,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC"}
@@ -8,4 +8,4 @@ const React = require("react");
8
8
  const DefaultLoadingIndicator = () => React.createElement("div", null, "Loading");
9
9
  exports.DefaultLoadingIndicator = DefaultLoadingIndicator;
10
10
  exports.DefaultLoadingIndicator.displayName = 'DefaultLoadingIndicator';
11
- //# sourceMappingURL=DefaultLoader.js.map
11
+ //# sourceMappingURL=DefaultLoadingIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultLoadingIndicator.js","sourceRoot":"","sources":["../../src/defaults/DefaultLoadingIndicator.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAG/B;;GAEG;AACI,MAAM,uBAAuB,GAAoC,GAAG,EAAE,CAAC,2CAAkB,CAAC;AAApF,QAAA,uBAAuB,2BAA6D;AACjG,+BAAuB,CAAC,WAAW,GAAG,yBAAyB,CAAC"}
@@ -0,0 +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"}
File without changes
File without changes
@@ -0,0 +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"}
@@ -0,0 +1,5 @@
1
+ export * from './DefaultErrorInfo';
2
+ export * from './DefaultLayout';
3
+ export * from './DefaultLoadingIndicator';
4
+ export * from './DefaultRouter';
5
+ export * from './DefaultRouteSwitch';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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);
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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"}
package/lib/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export * from './Piral';
3
3
  export * from './helpers';
4
4
  export * from './components';
5
5
  export * from './hooks';
6
+ export * from './setters';
6
7
  export * from './state';
7
8
  export * from './utils';
8
9
  export * from './types';
package/lib/index.js CHANGED
@@ -6,6 +6,7 @@ const tslib_1 = require("tslib");
6
6
  (0, tslib_1.__exportStar)(require("./helpers"), exports);
7
7
  (0, tslib_1.__exportStar)(require("./components"), exports);
8
8
  (0, tslib_1.__exportStar)(require("./hooks"), exports);
9
+ (0, tslib_1.__exportStar)(require("./setters"), exports);
9
10
  (0, tslib_1.__exportStar)(require("./state"), exports);
10
11
  (0, tslib_1.__exportStar)(require("./utils"), exports);
11
12
  (0, tslib_1.__exportStar)(require("./types"), exports);
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,uDAAwB;AACxB,uDAAwB;AACxB,uDAAwB"}
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"}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SetComponent.js","sourceRoot":"","sources":["../../src/setters/SetComponent.tsx"],"names":[],"mappings":";;;AACA,oCAA4D;AAiB5D;;GAEG;AACH,SAAgB,YAAY,CAAqC,EAC/D,IAAI,EACJ,SAAS,GACe;IACxB,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,6BAAqB,GAAE,CAAC;IACjD,IAAA,iBAAS,EAAC,GAAG,EAAE,CAAC,SAAS,IAAI,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IAC5D,2CAA2C;IAC3C,OAAO,IAAI,CAAC;AACd,CAAC;AARD,oCAQC"}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SetError.js","sourceRoot":"","sources":["../../src/setters/SetError.tsx"],"names":[],"mappings":";;;AACA,oCAA4D;AAiB5D;;GAEG;AACH,SAAgB,QAAQ,CAA0C,EAChE,IAAI,EACJ,SAAS,GACW;IACpB,MAAM,EAAE,iBAAiB,EAAE,GAAG,IAAA,6BAAqB,GAAE,CAAC;IACtD,IAAA,iBAAS,EAAC,GAAG,EAAE,CAAC,SAAS,IAAI,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IACjE,2CAA2C;IAC3C,OAAO,IAAI,CAAC;AACd,CAAC;AARD,4BAQC"}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SetErrors.js","sourceRoot":"","sources":["../../src/setters/SetErrors.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,yCAAsC;AAatC;;GAEG;AACH,SAAgB,SAAS,CAAC,EAAE,MAAM,GAAG,EAAE,EAAkB;IACvD,OAAO,CACL,0CACG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,CACrC,oBAAC,mBAAQ,IAAC,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,GAAI,CAC1D,CAAC,CACD,CACJ,CAAC;AACJ,CAAC;AARD,8BAQC"}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SetLayout.js","sourceRoot":"","sources":["../../src/setters/SetLayout.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,iDAA8C;AAa9C;;GAEG;AACH,SAAgB,SAAS,CAAC,EAAE,MAAM,GAAG,EAAE,EAAkB;IACvD,OAAO,CACL,0CACG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,CACrC,oBAAC,2BAAY,IAAC,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,GAAI,CAC9D,CAAC,CACD,CACJ,CAAC;AACJ,CAAC;AARD,8BAQC"}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SetProvider.js","sourceRoot":"","sources":["../../src/setters/SetProvider.tsx"],"names":[],"mappings":";;;AACA,oCAA4D;AAY5D;;GAEG;AACH,SAAgB,WAAW,CAAC,EAAE,QAAQ,EAAoB;IACxD,MAAM,EAAC,eAAe,EAAC,GAAG,IAAA,6BAAqB,GAAE,CAAC;IAClD,IAAA,iBAAS,EAAC,GAAG,EAAE,CAAC,QAAQ,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvD,2CAA2C;IAC3C,OAAO,IAAI,CAAC;AACd,CAAC;AALD,kCAKC"}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SetRedirect.js","sourceRoot":"","sources":["../../src/setters/SetRedirect.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+CAAwC;AACxC,oCAA4D;AAgB5D;;GAEG;AACH,SAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,EAAoB;IACxD,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,6BAAqB,GAAE,CAAC;IAC7C,IAAA,iBAAS,EAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,oBAAC,uBAAQ,IAAC,EAAE,EAAE,EAAE,GAAI,CAAC,CAAC,CAAC;IAC5D,2CAA2C;IAC3C,OAAO,IAAI,CAAC;AACd,CAAC;AALD,kCAKC"}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SetRoute.js","sourceRoot":"","sources":["../../src/setters/SetRoute.tsx"],"names":[],"mappings":";;;AAEA,oCAA4D;AAgB5D;;GAEG;AACH,SAAgB,QAAQ,CAAS,EAAE,IAAI,EAAE,SAAS,EAAoB;IACpE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,6BAAqB,GAAE,CAAC;IAC7C,IAAA,iBAAS,EAAC,GAAG,EAAE,CAAC,SAAS,IAAI,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IACxD,2CAA2C;IAC3C,OAAO,IAAI,CAAC;AACd,CAAC;AALD,4BAKC"}
@@ -0,0 +1,7 @@
1
+ export * from './SetComponent';
2
+ export * from './SetError';
3
+ export * from './SetErrors';
4
+ export * from './SetLayout';
5
+ export * from './SetProvider';
6
+ export * from './SetRedirect';
7
+ export * from './SetRoute';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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);
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createGlobalState = void 0;
4
4
  const react_atom_1 = require("@dbeining/react-atom");
5
- const components_1 = require("../components");
5
+ const defaults_1 = require("../defaults");
6
6
  function extend(defaultState, customState) {
7
7
  for (const key of Object.keys(customState)) {
8
8
  if (key === '__proto__' || key === 'constructor') {
@@ -20,15 +20,14 @@ function createGlobalState(customState = {}) {
20
20
  app: {
21
21
  error: undefined,
22
22
  loading: typeof window !== 'undefined',
23
- layout: 'desktop',
24
23
  publicPath: process.env.PIRAL_PUBLIC_PATH || '/',
25
24
  },
26
25
  components: {
27
- ErrorInfo: components_1.DefaultErrorInfo,
28
- LoadingIndicator: components_1.DefaultLoadingIndicator,
29
- Router: components_1.DefaultRouter,
30
- RouteSwitch: components_1.DefaultRouteSwitch,
31
- Layout: components_1.DefaultLayout,
26
+ ErrorInfo: defaults_1.DefaultErrorInfo,
27
+ LoadingIndicator: defaults_1.DefaultLoadingIndicator,
28
+ Router: defaults_1.DefaultRouter,
29
+ RouteSwitch: defaults_1.DefaultRouteSwitch,
30
+ Layout: defaults_1.DefaultLayout,
32
31
  },
33
32
  errorComponents: {},
34
33
  registry: {
@@ -1 +1 @@
1
- {"version":3,"file":"createGlobalState.js","sourceRoot":"","sources":["../../src/state/createGlobalState.ts"],"names":[],"mappings":";;;AAAA,qDAA4C;AAC5C,8CAMuB;AAGvB,SAAS,MAAM,CAAI,YAAe,EAAE,WAA6B;IAC/D,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;QAC1C,IAAI,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,aAAa,EAAE;YAChD,SAAS;SACV;QAED,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;QAC/B,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QACnC,MAAM,MAAM,GAAG,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;QACzE,YAAY,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;KAC9D;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAgB,iBAAiB,CAAC,cAA0C,EAAE;IAC5E,MAAM,YAAY,GAAgB;QAChC,GAAG,EAAE;Y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AE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;KAC9D;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAgB,iBAAiB,CAAC,cAA0C,EAAE;IAC5E,MAAM,YAAY,GAAgB;QAChC,GAAG,EAAE;YACH,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,OAAO,MAAM,KAAK,WAAW;YACtC,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,GAAG;SACjD;QACD,UAAU,EAAE;YACV,SAAS,EAAE,2BAAgB;YAC3B,gBAAgB,EAAE,kCAAuB;YACzC,MAAM,EAAE,wBAAa;YACrB,WAAW,EAAE,6BAAkB;YAC/B,MAAM,EAAE,wBAAa;SACtB;QACD,eAAe,EAAE,EAAE;QACnB,QAAQ,EAAE;YACR,UAAU,EAAE,EAAE;YACd,KAAK,EAAE,EAAE;YACT,QAAQ,EAAE,EAAE;SACb;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,EAAE;QACR,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,OAAO,iBAAI,CAAC,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC;AACpD,CAAC;AA3BD,8CA2BC"}
@@ -3,13 +3,18 @@ import type { GlobalStateContext } from './state';
3
3
  import type { LayoutBreakpoints } from './layout';
4
4
  import { PiralConfiguration } from './config';
5
5
  /**
6
- * The props of the Piral component.
6
+ * The props of the Piral context.
7
7
  */
8
- export interface PiralProps {
8
+ export interface PiralContextProps {
9
9
  /**
10
10
  * The specific Piral instance to be used.
11
11
  */
12
12
  instance?: PiralInstance;
13
+ }
14
+ /**
15
+ * The props of the Piral component.
16
+ */
17
+ export interface PiralProps extends PiralContextProps {
13
18
  /**
14
19
  * The custom breakpoints for the different layout modi.
15
20
  */
@@ -3,7 +3,6 @@ import type { RouteComponentProps } from 'react-router';
3
3
  import type { Atom } from '@dbeining/react-atom';
4
4
  import type { LoadPiletsOptions } from 'piral-base';
5
5
  import type { Dict, Without } from './common';
6
- import type { LayoutType } from './layout';
7
6
  import type { SharedDataItem, DataStoreTarget } from './data';
8
7
  import type { PiralCustomActions, PiralCustomState, PiralCustomRegistryState, PiralCustomComponentsState } from './custom';
9
8
  import type { EventEmitter, Pilet, BaseComponentProps, PageComponentProps, ExtensionComponentProps, PiletsBag, PiralPageMeta, PiletEntry } from './api';
@@ -72,10 +71,6 @@ export interface ComponentsState extends PiralCustomComponentsState {
72
71
  * The Piral global app sub-state container for app information.
73
72
  */
74
73
  export interface AppState {
75
- /**
76
- * Information for the layout computation.
77
- */
78
- layout: LayoutType;
79
74
  /**
80
75
  * Gets if the application is currently performing a background loading
81
76
  * activity, e.g., for loading modules asynchronously or fetching
@@ -220,11 +215,6 @@ export interface PiralActions extends PiralCustomActions {
220
215
  * @param expiration The time for when to dispose the shared item.
221
216
  */
222
217
  tryWriteDataItem(name: string, value: any, owner: string, target: DataStoreTarget, expiration: number): boolean;
223
- /**
224
- * Performs a layout change.
225
- * @param current The layout to take.
226
- */
227
- changeLayout(current: LayoutType): void;
228
218
  /**
229
219
  * Registers a new route to be resolved.
230
220
  * @param route The route to register.
@@ -1 +1 @@
1
- export declare function compare<T>(a: T, b: T): boolean;
1
+ export declare function isSame<T>(a: T, b: T): boolean;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.compare = void 0;
3
+ exports.isSame = void 0;
4
4
  function compareObjects(a, b) {
5
5
  for (const i in a) {
6
6
  if (!(i in b)) {
@@ -8,22 +8,39 @@ function compareObjects(a, b) {
8
8
  }
9
9
  }
10
10
  for (const i in b) {
11
- if (!compare(a[i], b[i])) {
11
+ if (!isSame(a[i], b[i])) {
12
12
  return false;
13
13
  }
14
14
  }
15
15
  return true;
16
16
  }
17
- function compare(a, b) {
17
+ function compareArrays(a, b) {
18
+ const l = a.length;
19
+ if (l === b.length) {
20
+ for (let i = 0; i < l; i++) {
21
+ if (!isSame(a[i], b[i])) {
22
+ return false;
23
+ }
24
+ }
25
+ return true;
26
+ }
27
+ return false;
28
+ }
29
+ function isSame(a, b) {
18
30
  if (a !== b) {
19
31
  const ta = typeof a;
20
32
  const tb = typeof b;
21
33
  if (ta === tb && ta === 'object' && a && b) {
22
- return compareObjects(a, b);
34
+ if (Array.isArray(a) && Array.isArray(b)) {
35
+ return compareArrays(a, b);
36
+ }
37
+ else {
38
+ return compareObjects(a, b);
39
+ }
23
40
  }
24
41
  return false;
25
42
  }
26
43
  return true;
27
44
  }
28
- exports.compare = compare;
45
+ exports.isSame = isSame;
29
46
  //# sourceMappingURL=compare.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compare.js","sourceRoot":"","sources":["../../src/utils/compare.ts"],"names":[],"mappings":";;;AAAA,SAAS,cAAc,CAAC,CAAM,EAAE,CAAM;IACpC,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE;QACjB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE;YACb,OAAO,KAAK,CAAC;SACd;KACF;IAED,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE;QACjB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;YACxB,OAAO,KAAK,CAAC;SACd;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,OAAO,CAAI,CAAI,EAAE,CAAI;IACnC,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC;QACpB,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC;QAEpB,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,EAAE;YAC1C,OAAO,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SAC7B;QAED,OAAO,KAAK,CAAC;KACd;IAED,OAA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AAC,CAAC,EAAE;gBACxC,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aAC5B;iBAAM;gBACL,OAAO,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aAC7B;SACF;QAED,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAjBD,wBAiBC"}
@@ -7,7 +7,7 @@ exports.defaultBreakpoints = ['(min-width: 991px)', '(min-width: 481px)', '(max-
7
7
  const mm = typeof window === 'undefined' || !(0, piral_base_1.isfunc)(window.matchMedia)
8
8
  ? () => ({ matches: undefined })
9
9
  : (q) => window.matchMedia(q);
10
- function getCurrentLayout(breakpoints, layouts, defaultLayout) {
10
+ function getCurrentLayout(breakpoints = exports.defaultBreakpoints, layouts, defaultLayout) {
11
11
  const query = breakpoints.findIndex((q) => mm(q).matches);
12
12
  const layout = layouts[query];
13
13
  return layout !== undefined ? layout : defaultLayout;
@@ -1 +1 @@
1
- {"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/utils/media.ts"],"names":[],"mappings":";;;AAAA,2CAAoC;AAGvB,QAAA,cAAc,GAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAE9D,QAAA,kBAAkB,GAAsB,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;AAExH,MAAM,EAAE,GACN,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,IAAA,mBAAM,EAAC,MAAM,CAAC,UAAU,CAAC;IACzD,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAChC,CAAC,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAE1C,SAAgB,gBAAgB,CAAI,WAA0B,EAAE,OAAiB,EAAE,aAAgB;IACjG,MAAM,KAAK,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC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