piral-core 1.6.0-beta.7240 → 1.6.0-beta.7244

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 (454) hide show
  1. package/app.codegen +2 -3
  2. package/lib/Piral.js +8 -13
  3. package/lib/Piral.js.map +1 -1
  4. package/lib/PiralContext.js +11 -16
  5. package/lib/PiralContext.js.map +1 -1
  6. package/lib/RootListener.js +8 -13
  7. package/lib/RootListener.js.map +1 -1
  8. package/lib/actions/app.js +19 -30
  9. package/lib/actions/app.js.map +1 -1
  10. package/lib/actions/components.js +9 -16
  11. package/lib/actions/components.js.map +1 -1
  12. package/lib/actions/data.js +7 -15
  13. package/lib/actions/data.js.map +1 -1
  14. package/lib/actions/define.js +2 -7
  15. package/lib/actions/define.js.map +1 -1
  16. package/lib/actions/index.js +6 -9
  17. package/lib/actions/index.js.map +1 -1
  18. package/lib/actions/portal.js +9 -16
  19. package/lib/actions/portal.js.map +1 -1
  20. package/lib/actions/state.js +4 -9
  21. package/lib/actions/state.js.map +1 -1
  22. package/lib/components/ErrorBoundary.js +9 -14
  23. package/lib/components/ErrorBoundary.js.map +1 -1
  24. package/lib/components/ExtensionSlot.js +9 -14
  25. package/lib/components/ExtensionSlot.js.map +1 -1
  26. package/lib/components/ForeignComponentContainer.js +6 -11
  27. package/lib/components/ForeignComponentContainer.js.map +1 -1
  28. package/lib/components/Mediator.js +8 -13
  29. package/lib/components/Mediator.js.map +1 -1
  30. package/lib/components/PiralGlobals.js +6 -11
  31. package/lib/components/PiralGlobals.js.map +1 -1
  32. package/lib/components/PiralRoutes.js +11 -16
  33. package/lib/components/PiralRoutes.js.map +1 -1
  34. package/lib/components/PiralSuspense.js +6 -11
  35. package/lib/components/PiralSuspense.js.map +1 -1
  36. package/lib/components/PiralView.js +13 -18
  37. package/lib/components/PiralView.js.map +1 -1
  38. package/lib/components/PortalRenderer.js +5 -9
  39. package/lib/components/PortalRenderer.js.map +1 -1
  40. package/lib/components/ResponsiveLayout.js +6 -11
  41. package/lib/components/ResponsiveLayout.js.map +1 -1
  42. package/lib/components/SwitchErrorInfo.js +7 -12
  43. package/lib/components/SwitchErrorInfo.js.map +1 -1
  44. package/lib/components/components.js +10 -15
  45. package/lib/components/components.js.map +1 -1
  46. package/lib/components/index.js +12 -15
  47. package/lib/components/index.js.map +1 -1
  48. package/lib/components/wrapComponent.js +12 -17
  49. package/lib/components/wrapComponent.js.map +1 -1
  50. package/lib/createInstance.js +15 -19
  51. package/lib/createInstance.js.map +1 -1
  52. package/lib/defaults/DefaultErrorInfo.js +5 -10
  53. package/lib/defaults/DefaultErrorInfo.js.map +1 -1
  54. package/lib/defaults/DefaultLayout.js +3 -7
  55. package/lib/defaults/DefaultLayout.js.map +1 -1
  56. package/lib/defaults/DefaultLoadingIndicator.js +3 -8
  57. package/lib/defaults/DefaultLoadingIndicator.js.map +1 -1
  58. package/lib/defaults/DefaultRouteSwitch_v5.js +7 -12
  59. package/lib/defaults/DefaultRouteSwitch_v5.js.map +1 -1
  60. package/lib/defaults/DefaultRouteSwitch_v6.js +7 -12
  61. package/lib/defaults/DefaultRouteSwitch_v6.js.map +1 -1
  62. package/lib/defaults/DefaultRouter_v5.js +5 -10
  63. package/lib/defaults/DefaultRouter_v5.js.map +1 -1
  64. package/lib/defaults/DefaultRouter_v6.js +5 -10
  65. package/lib/defaults/DefaultRouter_v6.js.map +1 -1
  66. package/lib/defaults/navigator_none.js +4 -11
  67. package/lib/defaults/navigator_none.js.map +1 -1
  68. package/lib/defaults/navigator_v5.js +9 -17
  69. package/lib/defaults/navigator_v5.js.map +1 -1
  70. package/lib/defaults/navigator_v6.js +9 -17
  71. package/lib/defaults/navigator_v6.js.map +1 -1
  72. package/lib/helpers.js +8 -12
  73. package/lib/helpers.js.map +1 -1
  74. package/lib/hooks/action.js +3 -7
  75. package/lib/hooks/action.js.map +1 -1
  76. package/lib/hooks/actions.js +4 -8
  77. package/lib/hooks/actions.js.map +1 -1
  78. package/lib/hooks/globalState.js +5 -10
  79. package/lib/hooks/globalState.js.map +1 -1
  80. package/lib/hooks/index.js +7 -10
  81. package/lib/hooks/index.js.map +1 -1
  82. package/lib/hooks/media.js +8 -12
  83. package/lib/hooks/media.js.map +1 -1
  84. package/lib/hooks/piletApi.js +5 -9
  85. package/lib/hooks/piletApi.js.map +1 -1
  86. package/lib/hooks/setter.js +5 -9
  87. package/lib/hooks/setter.js.map +1 -1
  88. package/lib/hooks/sharedData.js +3 -7
  89. package/lib/hooks/sharedData.js.map +1 -1
  90. package/lib/index.js +10 -13
  91. package/lib/index.js.map +1 -1
  92. package/lib/modules/api.js +8 -13
  93. package/lib/modules/api.js.map +1 -1
  94. package/lib/modules/core.js +11 -15
  95. package/lib/modules/core.js.map +1 -1
  96. package/lib/modules/dependencies.js +7 -12
  97. package/lib/modules/dependencies.js.map +1 -1
  98. package/lib/modules/element.js +22 -26
  99. package/lib/modules/element.js.map +1 -1
  100. package/lib/modules/index.js +3 -6
  101. package/lib/modules/index.js.map +1 -1
  102. package/lib/setters/SetComponent.js +4 -8
  103. package/lib/setters/SetComponent.js.map +1 -1
  104. package/lib/setters/SetError.js +4 -8
  105. package/lib/setters/SetError.js.map +1 -1
  106. package/lib/setters/SetErrors.js +4 -9
  107. package/lib/setters/SetErrors.js.map +1 -1
  108. package/lib/setters/SetLayout.js +4 -9
  109. package/lib/setters/SetLayout.js.map +1 -1
  110. package/lib/setters/SetProvider.js +4 -8
  111. package/lib/setters/SetProvider.js.map +1 -1
  112. package/lib/setters/SetRedirect.js +5 -9
  113. package/lib/setters/SetRedirect.js.map +1 -1
  114. package/lib/setters/SetRoute.js +4 -8
  115. package/lib/setters/SetRoute.js.map +1 -1
  116. package/lib/setters/index.js +7 -10
  117. package/lib/setters/index.js.map +1 -1
  118. package/lib/state/createActions.js +5 -11
  119. package/lib/state/createActions.js.map +1 -1
  120. package/lib/state/createGlobalState.js +5 -10
  121. package/lib/state/createGlobalState.js.map +1 -1
  122. package/lib/state/index.js +4 -7
  123. package/lib/state/index.js.map +1 -1
  124. package/lib/state/stateContext.js +3 -7
  125. package/lib/state/stateContext.js.map +1 -1
  126. package/lib/state/withApi.js +7 -12
  127. package/lib/state/withApi.js.map +1 -1
  128. package/lib/tools/codegen.js +15 -22
  129. package/lib/tools/codegen.js.map +1 -1
  130. package/lib/tools/debugger.js +3 -7
  131. package/lib/tools/debugger.js.map +1 -1
  132. package/lib/tools/emulator.js +3 -7
  133. package/lib/tools/emulator.js.map +1 -1
  134. package/lib/types/api.js +1 -2
  135. package/lib/types/common.js +1 -2
  136. package/lib/types/components.js +1 -2
  137. package/lib/types/config.js +1 -2
  138. package/lib/types/custom.js +1 -2
  139. package/lib/types/data.js +1 -2
  140. package/lib/types/extension.js +1 -2
  141. package/lib/types/index.js +14 -17
  142. package/lib/types/index.js.map +1 -1
  143. package/lib/types/instance.js +1 -2
  144. package/lib/types/layout.js +1 -2
  145. package/lib/types/navigation.js +1 -2
  146. package/lib/types/plugin.js +1 -2
  147. package/lib/types/state.js +1 -2
  148. package/lib/types/utils.js +1 -2
  149. package/lib/types/web.js +1 -2
  150. package/lib/utils/compare.js +1 -5
  151. package/lib/utils/compare.js.map +1 -1
  152. package/lib/utils/data.js +3 -9
  153. package/lib/utils/data.js.map +1 -1
  154. package/lib/utils/extension.js +3 -9
  155. package/lib/utils/extension.js.map +1 -1
  156. package/lib/utils/foreign.js +15 -23
  157. package/lib/utils/foreign.js.map +1 -1
  158. package/lib/utils/guid.js +2 -7
  159. package/lib/utils/guid.js.map +1 -1
  160. package/lib/utils/helpers.js +24 -41
  161. package/lib/utils/helpers.js.map +1 -1
  162. package/lib/utils/index.js +12 -18
  163. package/lib/utils/index.js.map +1 -1
  164. package/lib/utils/media.js +5 -9
  165. package/lib/utils/media.js.map +1 -1
  166. package/lib/utils/react.js +2 -7
  167. package/lib/utils/react.js.map +1 -1
  168. package/lib/utils/routes.js +3 -8
  169. package/lib/utils/routes.js.map +1 -1
  170. package/lib/utils/state.js +19 -30
  171. package/lib/utils/state.js.map +1 -1
  172. package/lib/utils/storage.js +2 -5
  173. package/lib/utils/storage.js.map +1 -1
  174. package/package.json +11 -26
  175. package/esm/Piral.d.ts +0 -18
  176. package/esm/Piral.js +0 -24
  177. package/esm/Piral.js.map +0 -1
  178. package/esm/PiralContext.d.ts +0 -21
  179. package/esm/PiralContext.js +0 -34
  180. package/esm/PiralContext.js.map +0 -1
  181. package/esm/RootListener.d.ts +0 -2
  182. package/esm/RootListener.js +0 -44
  183. package/esm/RootListener.js.map +0 -1
  184. package/esm/actions/app.d.ts +0 -13
  185. package/esm/actions/app.js +0 -61
  186. package/esm/actions/app.js.map +0 -1
  187. package/esm/actions/components.d.ts +0 -5
  188. package/esm/actions/components.js +0 -14
  189. package/esm/actions/components.js.map +0 -1
  190. package/esm/actions/data.d.ts +0 -6
  191. package/esm/actions/data.js +0 -46
  192. package/esm/actions/data.js.map +0 -1
  193. package/esm/actions/define.d.ts +0 -3
  194. package/esm/actions/define.js +0 -10
  195. package/esm/actions/define.js.map +0 -1
  196. package/esm/actions/index.d.ts +0 -6
  197. package/esm/actions/index.js +0 -7
  198. package/esm/actions/index.js.map +0 -1
  199. package/esm/actions/portal.d.ts +0 -6
  200. package/esm/actions/portal.js +0 -26
  201. package/esm/actions/portal.js.map +0 -1
  202. package/esm/actions/state.d.ts +0 -3
  203. package/esm/actions/state.js +0 -12
  204. package/esm/actions/state.js.map +0 -1
  205. package/esm/components/ErrorBoundary.d.ts +0 -33
  206. package/esm/components/ErrorBoundary.js +0 -50
  207. package/esm/components/ErrorBoundary.js.map +0 -1
  208. package/esm/components/ExtensionSlot.d.ts +0 -11
  209. package/esm/components/ExtensionSlot.js +0 -29
  210. package/esm/components/ExtensionSlot.js.map +0 -1
  211. package/esm/components/ForeignComponentContainer.d.ts +0 -19
  212. package/esm/components/ForeignComponentContainer.js +0 -46
  213. package/esm/components/ForeignComponentContainer.js.map +0 -1
  214. package/esm/components/Mediator.d.ts +0 -15
  215. package/esm/components/Mediator.js +0 -24
  216. package/esm/components/Mediator.js.map +0 -1
  217. package/esm/components/PiralGlobals.d.ts +0 -6
  218. package/esm/components/PiralGlobals.js +0 -13
  219. package/esm/components/PiralGlobals.js.map +0 -1
  220. package/esm/components/PiralRoutes.d.ts +0 -20
  221. package/esm/components/PiralRoutes.js +0 -36
  222. package/esm/components/PiralRoutes.js.map +0 -1
  223. package/esm/components/PiralSuspense.d.ts +0 -5
  224. package/esm/components/PiralSuspense.js +0 -8
  225. package/esm/components/PiralSuspense.js.map +0 -1
  226. package/esm/components/PiralView.d.ts +0 -20
  227. package/esm/components/PiralView.js +0 -19
  228. package/esm/components/PiralView.js.map +0 -1
  229. package/esm/components/PortalRenderer.d.ts +0 -5
  230. package/esm/components/PortalRenderer.js +0 -7
  231. package/esm/components/PortalRenderer.js.map +0 -1
  232. package/esm/components/ResponsiveLayout.d.ts +0 -23
  233. package/esm/components/ResponsiveLayout.js +0 -12
  234. package/esm/components/ResponsiveLayout.js.map +0 -1
  235. package/esm/components/SwitchErrorInfo.d.ts +0 -3
  236. package/esm/components/SwitchErrorInfo.js +0 -23
  237. package/esm/components/SwitchErrorInfo.js.map +0 -1
  238. package/esm/components/components.d.ts +0 -40
  239. package/esm/components/components.js +0 -47
  240. package/esm/components/components.js.map +0 -1
  241. package/esm/components/index.d.ts +0 -12
  242. package/esm/components/index.js +0 -13
  243. package/esm/components/index.js.map +0 -1
  244. package/esm/components/wrapComponent.d.ts +0 -7
  245. package/esm/components/wrapComponent.js +0 -41
  246. package/esm/components/wrapComponent.js.map +0 -1
  247. package/esm/createInstance.d.ts +0 -22
  248. package/esm/createInstance.js +0 -68
  249. package/esm/createInstance.js.map +0 -1
  250. package/esm/defaults/DefaultErrorInfo.d.ts +0 -8
  251. package/esm/defaults/DefaultErrorInfo.js +0 -11
  252. package/esm/defaults/DefaultErrorInfo.js.map +0 -1
  253. package/esm/defaults/DefaultLayout.d.ts +0 -6
  254. package/esm/defaults/DefaultLayout.js +0 -7
  255. package/esm/defaults/DefaultLayout.js.map +0 -1
  256. package/esm/defaults/DefaultLoadingIndicator.d.ts +0 -6
  257. package/esm/defaults/DefaultLoadingIndicator.js +0 -7
  258. package/esm/defaults/DefaultLoadingIndicator.js.map +0 -1
  259. package/esm/defaults/DefaultRouteSwitch_v5.d.ts +0 -3
  260. package/esm/defaults/DefaultRouteSwitch_v5.js +0 -9
  261. package/esm/defaults/DefaultRouteSwitch_v5.js.map +0 -1
  262. package/esm/defaults/DefaultRouteSwitch_v6.d.ts +0 -3
  263. package/esm/defaults/DefaultRouteSwitch_v6.js +0 -13
  264. package/esm/defaults/DefaultRouteSwitch_v6.js.map +0 -1
  265. package/esm/defaults/DefaultRouter_v5.d.ts +0 -3
  266. package/esm/defaults/DefaultRouter_v5.js +0 -7
  267. package/esm/defaults/DefaultRouter_v5.js.map +0 -1
  268. package/esm/defaults/DefaultRouter_v6.d.ts +0 -3
  269. package/esm/defaults/DefaultRouter_v6.js +0 -7
  270. package/esm/defaults/DefaultRouter_v6.js.map +0 -1
  271. package/esm/defaults/navigator_none.d.ts +0 -5
  272. package/esm/defaults/navigator_none.js +0 -31
  273. package/esm/defaults/navigator_none.js.map +0 -1
  274. package/esm/defaults/navigator_v5.d.ts +0 -6
  275. package/esm/defaults/navigator_v5.js +0 -85
  276. package/esm/defaults/navigator_v5.js.map +0 -1
  277. package/esm/defaults/navigator_v6.d.ts +0 -6
  278. package/esm/defaults/navigator_v6.js +0 -84
  279. package/esm/defaults/navigator_v6.js.map +0 -1
  280. package/esm/helpers.d.ts +0 -17
  281. package/esm/helpers.js +0 -19
  282. package/esm/helpers.js.map +0 -1
  283. package/esm/hooks/action.d.ts +0 -6
  284. package/esm/hooks/action.js +0 -10
  285. package/esm/hooks/action.js.map +0 -1
  286. package/esm/hooks/actions.d.ts +0 -5
  287. package/esm/hooks/actions.js +0 -10
  288. package/esm/hooks/actions.js.map +0 -1
  289. package/esm/hooks/globalState.d.ts +0 -19
  290. package/esm/hooks/globalState.js +0 -16
  291. package/esm/hooks/globalState.js.map +0 -1
  292. package/esm/hooks/index.d.ts +0 -7
  293. package/esm/hooks/index.js +0 -8
  294. package/esm/hooks/index.js.map +0 -1
  295. package/esm/hooks/media.d.ts +0 -7
  296. package/esm/hooks/media.js +0 -22
  297. package/esm/hooks/media.js.map +0 -1
  298. package/esm/hooks/piletApi.d.ts +0 -7
  299. package/esm/hooks/piletApi.js +0 -14
  300. package/esm/hooks/piletApi.js.map +0 -1
  301. package/esm/hooks/setter.d.ts +0 -5
  302. package/esm/hooks/setter.js +0 -14
  303. package/esm/hooks/setter.js.map +0 -1
  304. package/esm/hooks/sharedData.d.ts +0 -12
  305. package/esm/hooks/sharedData.js +0 -6
  306. package/esm/hooks/sharedData.js.map +0 -1
  307. package/esm/index.d.ts +0 -10
  308. package/esm/index.js +0 -11
  309. package/esm/index.js.map +0 -1
  310. package/esm/modules/api.d.ts +0 -4
  311. package/esm/modules/api.js +0 -25
  312. package/esm/modules/api.js.map +0 -1
  313. package/esm/modules/core.d.ts +0 -3
  314. package/esm/modules/core.js +0 -50
  315. package/esm/modules/core.js.map +0 -1
  316. package/esm/modules/dependencies.d.ts +0 -23
  317. package/esm/modules/dependencies.js +0 -32
  318. package/esm/modules/dependencies.js.map +0 -1
  319. package/esm/modules/element.d.ts +0 -5
  320. package/esm/modules/element.js +0 -248
  321. package/esm/modules/element.js.map +0 -1
  322. package/esm/modules/index.d.ts +0 -3
  323. package/esm/modules/index.js +0 -4
  324. package/esm/modules/index.js.map +0 -1
  325. package/esm/setters/SetComponent.d.ts +0 -19
  326. package/esm/setters/SetComponent.js +0 -11
  327. package/esm/setters/SetComponent.js.map +0 -1
  328. package/esm/setters/SetError.d.ts +0 -19
  329. package/esm/setters/SetError.js +0 -11
  330. package/esm/setters/SetError.js.map +0 -1
  331. package/esm/setters/SetErrors.d.ts +0 -15
  332. package/esm/setters/SetErrors.js +0 -9
  333. package/esm/setters/SetErrors.js.map +0 -1
  334. package/esm/setters/SetLayout.d.ts +0 -15
  335. package/esm/setters/SetLayout.js +0 -9
  336. package/esm/setters/SetLayout.js.map +0 -1
  337. package/esm/setters/SetProvider.d.ts +0 -14
  338. package/esm/setters/SetProvider.js +0 -11
  339. package/esm/setters/SetProvider.js.map +0 -1
  340. package/esm/setters/SetRedirect.d.ts +0 -18
  341. package/esm/setters/SetRedirect.js +0 -12
  342. package/esm/setters/SetRedirect.js.map +0 -1
  343. package/esm/setters/SetRoute.d.ts +0 -23
  344. package/esm/setters/SetRoute.js +0 -11
  345. package/esm/setters/SetRoute.js.map +0 -1
  346. package/esm/setters/index.d.ts +0 -7
  347. package/esm/setters/index.js +0 -8
  348. package/esm/setters/index.js.map +0 -1
  349. package/esm/state/createActions.d.ts +0 -4
  350. package/esm/state/createActions.js +0 -27
  351. package/esm/state/createActions.js.map +0 -1
  352. package/esm/state/createGlobalState.d.ts +0 -2
  353. package/esm/state/createGlobalState.js +0 -19
  354. package/esm/state/createGlobalState.js.map +0 -1
  355. package/esm/state/index.d.ts +0 -4
  356. package/esm/state/index.js +0 -5
  357. package/esm/state/index.js.map +0 -1
  358. package/esm/state/stateContext.d.ts +0 -4
  359. package/esm/state/stateContext.js +0 -4
  360. package/esm/state/stateContext.js.map +0 -1
  361. package/esm/state/withApi.d.ts +0 -3
  362. package/esm/state/withApi.js +0 -30
  363. package/esm/state/withApi.js.map +0 -1
  364. package/esm/tools/codegen.d.ts +0 -23
  365. package/esm/tools/codegen.js +0 -194
  366. package/esm/tools/codegen.js.map +0 -1
  367. package/esm/tools/debugger.d.ts +0 -4
  368. package/esm/tools/debugger.js +0 -61
  369. package/esm/tools/debugger.js.map +0 -1
  370. package/esm/tools/emulator.d.ts +0 -4
  371. package/esm/tools/emulator.js +0 -12
  372. package/esm/tools/emulator.js.map +0 -1
  373. package/esm/types/api.d.ts +0 -141
  374. package/esm/types/api.js +0 -2
  375. package/esm/types/api.js.map +0 -1
  376. package/esm/types/common.d.ts +0 -21
  377. package/esm/types/common.js +0 -2
  378. package/esm/types/common.js.map +0 -1
  379. package/esm/types/components.d.ts +0 -250
  380. package/esm/types/components.js +0 -2
  381. package/esm/types/components.js.map +0 -1
  382. package/esm/types/config.d.ts +0 -94
  383. package/esm/types/config.js +0 -2
  384. package/esm/types/config.js.map +0 -1
  385. package/esm/types/custom.d.ts +0 -50
  386. package/esm/types/custom.js +0 -2
  387. package/esm/types/custom.js.map +0 -1
  388. package/esm/types/data.d.ts +0 -51
  389. package/esm/types/data.js +0 -2
  390. package/esm/types/data.js.map +0 -1
  391. package/esm/types/extension.d.ts +0 -61
  392. package/esm/types/extension.js +0 -2
  393. package/esm/types/extension.js.map +0 -1
  394. package/esm/types/index.d.ts +0 -14
  395. package/esm/types/index.js +0 -15
  396. package/esm/types/index.js.map +0 -1
  397. package/esm/types/instance.d.ts +0 -60
  398. package/esm/types/instance.js +0 -2
  399. package/esm/types/instance.js.map +0 -1
  400. package/esm/types/layout.d.ts +0 -12
  401. package/esm/types/layout.js +0 -2
  402. package/esm/types/layout.js.map +0 -1
  403. package/esm/types/navigation.d.ts +0 -98
  404. package/esm/types/navigation.js +0 -2
  405. package/esm/types/navigation.js.map +0 -1
  406. package/esm/types/plugin.d.ts +0 -14
  407. package/esm/types/plugin.js +0 -2
  408. package/esm/types/plugin.js.map +0 -1
  409. package/esm/types/state.d.ts +0 -346
  410. package/esm/types/state.js +0 -2
  411. package/esm/types/state.js.map +0 -1
  412. package/esm/types/utils.d.ts +0 -84
  413. package/esm/types/utils.js +0 -2
  414. package/esm/types/utils.js.map +0 -1
  415. package/esm/types/web.d.ts +0 -47
  416. package/esm/types/web.js +0 -2
  417. package/esm/types/web.js.map +0 -1
  418. package/esm/utils/compare.d.ts +0 -1
  419. package/esm/utils/compare.js +0 -42
  420. package/esm/utils/compare.js.map +0 -1
  421. package/esm/utils/data.d.ts +0 -4
  422. package/esm/utils/data.js +0 -39
  423. package/esm/utils/data.js.map +0 -1
  424. package/esm/utils/extension.d.ts +0 -16
  425. package/esm/utils/extension.js +0 -36
  426. package/esm/utils/extension.js.map +0 -1
  427. package/esm/utils/foreign.d.ts +0 -14
  428. package/esm/utils/foreign.js +0 -39
  429. package/esm/utils/foreign.js.map +0 -1
  430. package/esm/utils/guid.d.ts +0 -2
  431. package/esm/utils/guid.js +0 -12
  432. package/esm/utils/guid.js.map +0 -1
  433. package/esm/utils/helpers.d.ts +0 -16
  434. package/esm/utils/helpers.js +0 -76
  435. package/esm/utils/helpers.js.map +0 -1
  436. package/esm/utils/index.d.ts +0 -12
  437. package/esm/utils/index.js +0 -13
  438. package/esm/utils/index.js.map +0 -1
  439. package/esm/utils/media.d.ts +0 -4
  440. package/esm/utils/media.js +0 -12
  441. package/esm/utils/media.js.map +0 -1
  442. package/esm/utils/react.d.ts +0 -2
  443. package/esm/utils/react.js +0 -5
  444. package/esm/utils/react.js.map +0 -1
  445. package/esm/utils/routes.d.ts +0 -1
  446. package/esm/utils/routes.js +0 -5
  447. package/esm/utils/routes.js.map +0 -1
  448. package/esm/utils/state.d.ts +0 -57
  449. package/esm/utils/state.js +0 -113
  450. package/esm/utils/state.js.map +0 -1
  451. package/esm/utils/storage.d.ts +0 -3
  452. package/esm/utils/storage.js +0 -26
  453. package/esm/utils/storage.js.map +0 -1
  454. /package/{dist → lib}/codegen.js +0 -0
@@ -1,29 +0,0 @@
1
- import * as React from 'react';
2
- import { isfunc } from 'piral-base';
3
- import { useGlobalState } from '../hooks';
4
- import { defaultRender, none } from '../utils';
5
- function defaultOrder(extensions) {
6
- return extensions;
7
- }
8
- /**
9
- * The extension slot component to be used when the available
10
- * extensions of a given name should be rendered at a specific
11
- * location.
12
- */
13
- export function ExtensionSlot(props) {
14
- const { name, render = defaultRender, empty, params, children, emptySkipsRender = false, order = defaultOrder, } = props;
15
- const extensions = useGlobalState((s) => s.registry.extensions[name] || none);
16
- const isEmpty = extensions.length === 0 && isfunc(empty);
17
- const content = isEmpty
18
- ? [defaultRender(empty(params), 'empty')]
19
- : order(extensions).map(({ component: Component, reference, defaults = {} }, i) => (React.createElement(Component, { key: `${reference?.displayName || '_'}${i}`, children: children, params: {
20
- ...defaults,
21
- ...params,
22
- } })));
23
- if (isEmpty && emptySkipsRender) {
24
- return content[0];
25
- }
26
- return render(content);
27
- }
28
- ExtensionSlot.displayName = `ExtensionSlot`;
29
- //# sourceMappingURL=ExtensionSlot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExtensionSlot.js","sourceRoot":"","sources":["../../src/components/ExtensionSlot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAG/C,SAAS,YAAY,CAAC,UAAwC;IAC5D,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAmB,KAA4B;IAC1E,MAAM,EACJ,IAAI,EACJ,MAAM,GAAG,aAAa,EACtB,KAAK,EACL,MAAM,EACN,QAAQ,EACR,gBAAgB,GAAG,KAAK,EACxB,KAAK,GAAG,YAAY,GACrB,GAAG,KAAK,CAAC;IACV,MAAM,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;IAC9E,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;IACzD,MAAM,OAAO,GAAG,OAAO;QACrB,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;QACzC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAC/E,oBAAC,SAAS,IACR,GAAG,EAAE,GAAG,SAAS,EAAE,WAAW,IAAI,GAAG,GAAG,CAAC,EAAE,EAC3C,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE;gBACN,GAAG,QAAQ;gBACX,GAAG,MAAM;aACV,GACD,CACH,CAAC,CAAC;IAEP,IAAI,OAAO,IAAI,gBAAgB,EAAE;QAC/B,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;KACnB;IAED,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC"}
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- import type { ForeignComponent, BaseComponentProps, ComponentContext } from '../types';
3
- interface ForeignComponentContainerProps<T> {
4
- $portalId: string;
5
- $component: ForeignComponent<T>;
6
- $context: ComponentContext;
7
- innerProps: T & BaseComponentProps;
8
- }
9
- export declare class ForeignComponentContainer<T> extends React.Component<ForeignComponentContainerProps<T>> {
10
- private locals?;
11
- private current?;
12
- private previous?;
13
- private setNode;
14
- componentDidMount(): void;
15
- componentDidUpdate(): void;
16
- componentWillUnmount(): void;
17
- render(): React.JSX.Element;
18
- }
19
- export {};
@@ -1,46 +0,0 @@
1
- import * as React from 'react';
2
- import { isfunc } from 'piral-base';
3
- export class ForeignComponentContainer extends React.Component {
4
- constructor() {
5
- super(...arguments);
6
- this.locals = {};
7
- this.setNode = (node) => {
8
- this.current = node;
9
- };
10
- }
11
- componentDidMount() {
12
- const { current } = this;
13
- const { $component, $context, innerProps } = this.props;
14
- const { mount } = $component;
15
- if (current && isfunc(mount)) {
16
- mount(current, innerProps, $context, this.locals);
17
- }
18
- this.previous = current;
19
- }
20
- componentDidUpdate() {
21
- const { current, previous } = this;
22
- const { $component, $context, innerProps } = this.props;
23
- const { update } = $component;
24
- if (current !== previous) {
25
- previous && this.componentWillUnmount();
26
- current && this.componentDidMount();
27
- }
28
- else if (isfunc(update)) {
29
- update(current, innerProps, $context, this.locals);
30
- }
31
- }
32
- componentWillUnmount() {
33
- const { previous } = this;
34
- const { $component } = this.props;
35
- const { unmount } = $component;
36
- if (previous && isfunc(unmount)) {
37
- unmount(previous, this.locals);
38
- }
39
- this.previous = undefined;
40
- }
41
- render() {
42
- const { $portalId } = this.props;
43
- return React.createElement("piral-portal", { pid: $portalId, ref: this.setNode });
44
- }
45
- }
46
- //# sourceMappingURL=ForeignComponentContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ForeignComponentContainer.js","sourceRoot":"","sources":["../../src/components/ForeignComponentContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAWpC,MAAM,OAAO,yBAA6B,SAAQ,KAAK,CAAC,SAA4C;IAApG;;QACU,WAAM,GAAyB,EAAE,CAAC;QAIlC,YAAO,GAAG,CAAC,IAAoB,EAAE,EAAE;YACzC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACtB,CAAC,CAAC;IA2CJ,CAAC;IAzCC,iBAAiB;QACf,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QACzB,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACxD,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC;QAE7B,IAAI,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE;YAC5B,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;SACnD;QAED,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAED,kBAAkB;QAChB,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QACnC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACxD,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;QAE9B,IAAI,OAAO,KAAK,QAAQ,EAAE;YACxB,QAAQ,IAAI,IAAI,CAAC,oBAAoB,EAAE,CAAC;YACxC,OAAO,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;SACrC;aAAM,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE;YACzB,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;SACpD;IACH,CAAC;IAED,oBAAoB;QAClB,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QAC1B,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAClC,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC;QAE/B,IAAI,QAAQ,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE;YAC/B,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;SAChC;QAED,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC5B,CAAC;IAED,MAAM;QACJ,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACjC,OAAO,sCAAc,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,GAAI,CAAC;IAC7D,CAAC;CACF"}
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
- import { LoadPiletsOptions } from 'piral-base';
3
- /**
4
- * The props of the Mediator component.
5
- */
6
- export interface MediatorProps {
7
- /**
8
- * The options for loading the pilets.
9
- */
10
- options: LoadPiletsOptions;
11
- }
12
- /**
13
- * The Mediator component for interfacing with pilets loading.
14
- */
15
- export declare const Mediator: React.FC<MediatorProps>;
@@ -1,24 +0,0 @@
1
- import * as React from 'react';
2
- import { startLoadingPilets } from 'piral-base';
3
- import { useGlobalStateContext } from '../hooks';
4
- import { none } from '../utils';
5
- /**
6
- * The Mediator component for interfacing with pilets loading.
7
- */
8
- export const Mediator = ({ options }) => {
9
- const { initialize, readState } = useGlobalStateContext();
10
- React.useEffect(() => {
11
- const shouldLoad = readState(s => s.app.loading);
12
- if (shouldLoad) {
13
- const { connect, disconnect } = startLoadingPilets(options);
14
- const notifier = (error, pilets, loaded) => {
15
- initialize(!loaded, error, pilets);
16
- };
17
- connect(notifier);
18
- return () => disconnect(notifier);
19
- }
20
- }, none);
21
- // tslint:disable-next-line:no-null-keyword
22
- return null;
23
- };
24
- //# sourceMappingURL=Mediator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Mediator.js","sourceRoot":"","sources":["../../src/components/Mediator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAqB,kBAAkB,EAAiB,MAAM,YAAY,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAYhC;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IAC/D,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,qBAAqB,EAAE,CAAC;IAE1D,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAEjD,IAAI,UAAU,EAAE;YACd,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;YAC5D,MAAM,QAAQ,GAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;gBACxD,UAAU,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;YACrC,CAAC,CAAC;YACF,OAAO,CAAC,QAAQ,CAAC,CAAC;YAClB,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;SACnC;IAEH,CAAC,EAAE,IAAI,CAAC,CAAC;IAET,2CAA2C;IAC3C,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * Integrates the global portal renderer and the debug utilities
4
- * (if registered).
5
- */
6
- export declare const PiralGlobals: React.FC;
@@ -1,13 +0,0 @@
1
- import * as React from 'react';
2
- import { PortalRenderer } from './PortalRenderer';
3
- import { RegisteredDebug } from './components';
4
- /**
5
- * Integrates the global portal renderer and the debug utilities
6
- * (if registered).
7
- */
8
- export const PiralGlobals = () => {
9
- return (React.createElement(React.Fragment, null,
10
- React.createElement(PortalRenderer, { id: "root" }),
11
- React.createElement(RegisteredDebug, null)));
12
- };
13
- //# sourceMappingURL=PiralGlobals.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PiralGlobals.js","sourceRoot":"","sources":["../../src/components/PiralGlobals.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAa,GAAG,EAAE;IACzC,OAAO,CACL;QACE,oBAAC,cAAc,IAAC,EAAE,EAAC,MAAM,GAAG;QAC5B,oBAAC,eAAe,OAAG,CAClB,CACJ,CAAC;AACJ,CAAC,CAAC"}
@@ -1,20 +0,0 @@
1
- import * as React from 'react';
2
- import { RouteComponentProps, SwitchProps } from 'react-router';
3
- import { RouteSwitchProps } from '../types';
4
- /**
5
- * The props used by the PiralRoutes component.
6
- */
7
- export interface RoutesProps extends SwitchProps {
8
- /**
9
- * Sets the component for showing the not found page.
10
- */
11
- NotFound: React.ComponentType<RouteComponentProps>;
12
- /**
13
- * Sets the component for actually switching the routes.
14
- */
15
- RouteSwitch: React.ComponentType<RouteSwitchProps>;
16
- }
17
- /**
18
- * The component for defining the exclusive routes to be used.
19
- */
20
- export declare const PiralRoutes: React.FC<RoutesProps>;
@@ -1,36 +0,0 @@
1
- import * as React from 'react';
2
- import { useGlobalState } from '../hooks';
3
- import { createRouteMatcher } from '../utils';
4
- import { useRouteFilter } from '../../app.codegen';
5
- function useShellRoutes() {
6
- const routes = useGlobalState((s) => s.routes);
7
- return React.useMemo(() => Object.entries(routes).map(([path, Component]) => ({
8
- path,
9
- Component,
10
- meta: Component?.meta || {},
11
- matcher: createRouteMatcher(path),
12
- })), [routes]);
13
- }
14
- function usePiletRoutes() {
15
- const pages = useGlobalState((s) => s.registry.pages);
16
- return React.useMemo(() => Object.entries(pages).map(([path, entry]) => ({
17
- path,
18
- Component: entry.component,
19
- meta: entry.meta,
20
- matcher: createRouteMatcher(path),
21
- })), [pages]);
22
- }
23
- function useRoutes() {
24
- const shellRoutes = useShellRoutes();
25
- const piletRoutes = usePiletRoutes();
26
- return useRouteFilter([...shellRoutes, ...piletRoutes]);
27
- }
28
- /**
29
- * The component for defining the exclusive routes to be used.
30
- */
31
- export const PiralRoutes = ({ NotFound, RouteSwitch, ...props }) => {
32
- const paths = useRoutes();
33
- return React.createElement(RouteSwitch, { NotFound: NotFound, paths: paths, ...props });
34
- };
35
- PiralRoutes.displayName = 'Routes';
36
- //# sourceMappingURL=PiralRoutes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PiralRoutes.js","sourceRoot":"","sources":["../../src/components/PiralRoutes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAG9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,SAAS,cAAc;IACrB,MAAM,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/C,OAAO,KAAK,CAAC,OAAO,CAClB,GAAG,EAAE,CACH,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;QACjD,IAAI;QACJ,SAAS;QACT,IAAI,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE;QAC3B,OAAO,EAAE,kBAAkB,CAAC,IAAI,CAAC;KAClC,CAAC,CAAC,EACL,CAAC,MAAM,CAAC,CACT,CAAC;AACJ,CAAC;AAED,SAAS,cAAc;IACrB,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,OAAO,KAAK,CAAC,OAAO,CAClB,GAAG,EAAE,CACH,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;QAC5C,IAAI;QACJ,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,kBAAkB,CAAC,IAAI,CAAC;KAClC,CAAC,CAAC,EACL,CAAC,KAAK,CAAC,CACR,CAAC;AACJ,CAAC;AAED,SAAS,SAAS;IAChB,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,OAAO,cAAc,CAAC,CAAC,GAAG,WAAW,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC;AAC1D,CAAC;AAgBD;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACxF,MAAM,KAAK,GAAG,SAAS,EAAE,CAAC;IAC1B,OAAO,oBAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK,GAAI,CAAC;AACtE,CAAC,CAAC;AACF,WAAW,CAAC,WAAW,GAAG,QAAQ,CAAC"}
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface PiralSuspenseProps {
3
- children?: React.ReactNode;
4
- }
5
- export declare const PiralSuspense: React.FC<PiralSuspenseProps>;
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import { RegisteredErrorInfo, RegisteredLoadingIndicator } from './components';
3
- import { useGlobalState } from '../hooks';
4
- export const PiralSuspense = ({ children }) => {
5
- const { error, loading } = useGlobalState((m) => m.app);
6
- return error ? (React.createElement(RegisteredErrorInfo, { type: "loading", error: error })) : loading ? (React.createElement(RegisteredLoadingIndicator, null)) : (React.createElement(React.Fragment, null, children));
7
- };
8
- //# sourceMappingURL=PiralSuspense.js.map
@@ -1 +0,0 @@
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"}
@@ -1,20 +0,0 @@
1
- import * as React from 'react';
2
- import { LayoutBreakpoints } from '../types';
3
- /**
4
- * The props for the PiralView component.
5
- */
6
- export interface PiralViewProps {
7
- /**
8
- * The custom breakpoints for the different layout modi.
9
- */
10
- breakpoints?: LayoutBreakpoints;
11
- /**
12
- * The extra content.
13
- */
14
- children: React.ReactNode;
15
- }
16
- /**
17
- * The component responsible for the generic view of the application.
18
- * This includes the used the current content and some convenience.
19
- */
20
- export declare const PiralView: React.FC<PiralViewProps>;
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- import { PiralGlobals } from './PiralGlobals';
3
- import { PiralRoutes } from './PiralRoutes';
4
- import { PiralSuspense } from './PiralSuspense';
5
- import { ResponsiveLayout } from './ResponsiveLayout';
6
- import { RegisteredErrorInfo, RegisteredRouteSwitch, RegisteredLayout } from './components';
7
- const NotFound = (props) => React.createElement(RegisteredErrorInfo, { type: "not_found", ...props });
8
- /**
9
- * The component responsible for the generic view of the application.
10
- * This includes the used the current content and some convenience.
11
- */
12
- export const PiralView = ({ breakpoints, children }) => (React.createElement(React.Fragment, null,
13
- React.createElement(PiralGlobals, null),
14
- React.createElement(PiralSuspense, null,
15
- React.createElement(ResponsiveLayout, { breakpoints: breakpoints, Layout: RegisteredLayout },
16
- React.createElement(PiralRoutes, { NotFound: NotFound, RouteSwitch: RegisteredRouteSwitch }))),
17
- children));
18
- PiralView.displayName = 'PiralView';
19
- //# sourceMappingURL=PiralView.js.map
@@ -1 +0,0 @@
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,IAAC,IAAI,EAAC,WAAW,KAAK,KAAK,GAAI,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"}
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface PortalRendererProps {
3
- id: string;
4
- }
5
- export declare const PortalRenderer: React.FC<PortalRendererProps>;
@@ -1,7 +0,0 @@
1
- import { useGlobalState } from '../hooks';
2
- import { defaultRender, none } from '../utils';
3
- export const PortalRenderer = ({ id }) => {
4
- const children = useGlobalState((m) => m.portals[id]) || none;
5
- return defaultRender(children);
6
- };
7
- //# sourceMappingURL=PortalRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PortalRenderer.js","sourceRoot":"","sources":["../../src/components/PortalRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAM/C,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;IACtE,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC;IAC9D,OAAO,aAAa,CAAC,QAAQ,CAAC,CAAC;AACjC,CAAC,CAAC"}
@@ -1,23 +0,0 @@
1
- import * as React from 'react';
2
- import { LayoutBreakpoints, LayoutProps } from '../types';
3
- /**
4
- * The props for the ResponsiveLayout component.
5
- */
6
- export interface ResponsiveLayoutProps {
7
- /**
8
- * The individual breakpoints to be used for the different layouts.
9
- */
10
- breakpoints?: LayoutBreakpoints;
11
- /**
12
- * The actual layout component to render to transport.
13
- */
14
- Layout: React.ComponentType<LayoutProps>;
15
- /**
16
- * The content to display.
17
- */
18
- children: React.ReactNode;
19
- }
20
- /**
21
- * The component capable of identifying and switching the currently used layout.
22
- */
23
- export declare const ResponsiveLayout: React.FC<ResponsiveLayoutProps>;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import { useMedia } from '../hooks';
3
- import { defaultLayouts, defaultBreakpoints } from '../utils';
4
- /**
5
- * The component capable of identifying and switching the currently used layout.
6
- */
7
- export const ResponsiveLayout = ({ breakpoints = defaultBreakpoints, Layout, children, }) => {
8
- const selected = useMedia(breakpoints, defaultLayouts, 'desktop');
9
- return React.createElement(Layout, { currentLayout: selected }, children);
10
- };
11
- ResponsiveLayout.displayName = 'ResponsiveLayout';
12
- //# sourceMappingURL=ResponsiveLayout.js.map
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- import * as React from 'react';
2
- import { ErrorInfoProps } from '../types';
3
- export declare const SwitchErrorInfo: React.FC<ErrorInfoProps>;
@@ -1,23 +0,0 @@
1
- import * as React from 'react';
2
- import { useGlobalState } from '../hooks';
3
- import { defaultRender, none } from '../utils';
4
- function renderComponent(components, props) {
5
- const name = props.type;
6
- const Component = components[name];
7
- if (process.env.NODE_ENV === 'development') {
8
- React.useEffect(() => console.error('[dev-info] An error occurred in the Piral instance.', props), none);
9
- }
10
- if (!Component) {
11
- const Unknown = components.unknown;
12
- if (Unknown) {
13
- return React.createElement(Unknown, { ...props, type: "unknown" });
14
- }
15
- return defaultRender(`Error: ${props.type}`);
16
- }
17
- return React.createElement(Component, { ...props });
18
- }
19
- export const SwitchErrorInfo = (props) => {
20
- const components = useGlobalState((m) => m.errorComponents);
21
- return renderComponent(components, props);
22
- };
23
- //# sourceMappingURL=SwitchErrorInfo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SwitchErrorInfo.js","sourceRoot":"","sources":["../../src/components/SwitchErrorInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAG/C,SAAS,eAAe,CACtB,UAAgC,EAChC,KAAmB;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACxB,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAEnC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;QAC1C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,qDAAqD,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;KAC1G;IAED,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;QAEnC,IAAI,OAAO,EAAE;YACX,OAAO,oBAAC,OAAO,OAAM,KAAa,EAAE,IAAI,EAAC,SAAS,GAAG,CAAC;SACvD;QAED,OAAO,aAAa,CAAC,UAAU,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,oBAAC,SAAS,OAAM,KAAa,GAAI,CAAC;AAC3C,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,KAAK,EAAE,EAAE;IACjE,MAAM,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IAC5D,OAAO,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAC"}
@@ -1,40 +0,0 @@
1
- import * as React from 'react';
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
- */
10
- export declare function getPiralComponent<TKey extends keyof ComponentsState>(name: TKey): ComponentsState[TKey];
11
- /**
12
- * Gets the currently registered ErrorInfo component.
13
- * By default the DefaultErrorInfo component is used.
14
- */
15
- export declare const RegisteredErrorInfo: React.ComponentType<import("../types").ErrorInfoProps>;
16
- /**
17
- * Gets the currently registered LoadingIndicator component.
18
- * By default only Loading is rendered.
19
- */
20
- export declare const RegisteredLoadingIndicator: React.ComponentType<import("../types").LoadingIndicatorProps>;
21
- /**
22
- * Gets the currently registered Router component.
23
- * By default the BrowserRouter is used.
24
- */
25
- export declare const RegisteredRouter: React.ComponentType<import("../types").RouterProps>;
26
- /**
27
- * Gets the currently registered Route Switch component.
28
- * By default the DefaultRouteSwitch component is used.
29
- */
30
- export declare const RegisteredRouteSwitch: React.ComponentType<import("../types").RouteSwitchProps>;
31
- /**
32
- * Gets the currently registered Layout component.
33
- * By default the children are rendered.
34
- */
35
- export declare const RegisteredLayout: React.ComponentType<import("../types").LayoutProps>;
36
- /**
37
- * Gets the currently registered Debug component.
38
- * By default nothing is used.
39
- */
40
- export declare const RegisteredDebug: React.ComponentType;
@@ -1,47 +0,0 @@
1
- import * as React from 'react';
2
- import { useGlobalState } from '../hooks';
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
- */
10
- export function getPiralComponent(name) {
11
- return (props) => {
12
- const Component = useGlobalState((s) => s.components[name]);
13
- // tslint:disable-next-line:no-null-keyword
14
- return Component ? React.createElement(Component, { ...props }) : null;
15
- };
16
- }
17
- /**
18
- * Gets the currently registered ErrorInfo component.
19
- * By default the DefaultErrorInfo component is used.
20
- */
21
- export const RegisteredErrorInfo = getPiralComponent('ErrorInfo');
22
- /**
23
- * Gets the currently registered LoadingIndicator component.
24
- * By default only Loading is rendered.
25
- */
26
- export const RegisteredLoadingIndicator = getPiralComponent('LoadingIndicator');
27
- /**
28
- * Gets the currently registered Router component.
29
- * By default the BrowserRouter is used.
30
- */
31
- export const RegisteredRouter = getPiralComponent('Router');
32
- /**
33
- * Gets the currently registered Route Switch component.
34
- * By default the DefaultRouteSwitch component is used.
35
- */
36
- export const RegisteredRouteSwitch = getPiralComponent('RouteSwitch');
37
- /**
38
- * Gets the currently registered Layout component.
39
- * By default the children are rendered.
40
- */
41
- export const RegisteredLayout = getPiralComponent('Layout');
42
- /**
43
- * Gets the currently registered Debug component.
44
- * By default nothing is used.
45
- */
46
- export const RegisteredDebug = getPiralComponent('Debug');
47
- //# sourceMappingURL=components.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/components/components.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAqC,IAAU;IAC9E,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5D,2CAA2C;QAC3C,OAAO,SAAS,CAAC,CAAC,CAAC,oBAAC,SAAS,OAAK,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;AAElE;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;AAEhF;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAC;AAEtE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC"}
@@ -1,12 +0,0 @@
1
- export * from './components';
2
- export * from './ErrorBoundary';
3
- export * from './ExtensionSlot';
4
- export * from './Mediator';
5
- export * from './PiralGlobals';
6
- export * from './PiralRoutes';
7
- export * from './PiralSuspense';
8
- export * from './PiralView';
9
- export * from './PortalRenderer';
10
- export * from './ResponsiveLayout';
11
- export * from './SwitchErrorInfo';
12
- export * from './wrapComponent';
@@ -1,13 +0,0 @@
1
- export * from './components';
2
- export * from './ErrorBoundary';
3
- export * from './ExtensionSlot';
4
- export * from './Mediator';
5
- export * from './PiralGlobals';
6
- export * from './PiralRoutes';
7
- export * from './PiralSuspense';
8
- export * from './PiralView';
9
- export * from './PortalRenderer';
10
- export * from './ResponsiveLayout';
11
- export * from './SwitchErrorInfo';
12
- export * from './wrapComponent';
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import type { AnyComponent, ComponentConverters, PiletApi, BaseComponentProps } from '../types';
3
- interface CapturedProps {
4
- piral: PiletApi;
5
- }
6
- export declare function wrapComponent<T>(converters: ComponentConverters<T & BaseComponentProps>, component: AnyComponent<T & BaseComponentProps>, captured: CapturedProps, Wrapper: React.FC<T>): React.MemoExoticComponent<(props: T) => React.JSX.Element> | React.ComponentType<T>;
7
- export {};
@@ -1,41 +0,0 @@
1
- import * as React from 'react';
2
- import { PortalRenderer } from './PortalRenderer';
3
- import { ForeignComponentContainer } from './ForeignComponentContainer';
4
- import { useGlobalStateContext } from '../hooks';
5
- import { convertComponent, none } from '../utils';
6
- // this is an arbitrary start number to have 6 digits
7
- let portalIdBase = 123456;
8
- function wrapReactComponent(Component, captured, Wrapper) {
9
- return (props) => (React.createElement(Wrapper, { ...props },
10
- React.createElement(Component, { ...props, ...captured })));
11
- }
12
- function wrapForeignComponent(component, captured, Wrapper) {
13
- return React.memo((props) => {
14
- const { destroyPortal, navigation } = useGlobalStateContext();
15
- const id = React.useMemo(() => (portalIdBase++).toString(26), none);
16
- // router added for backwards compatibility
17
- const context = React.useMemo(() => ({ publicPath: navigation.publicPath, navigation, router: navigation.router }), []);
18
- const innerProps = React.useMemo(() => ({ ...props, ...captured }), [props]);
19
- React.useEffect(() => () => destroyPortal(id), none);
20
- return (React.createElement(Wrapper, { ...props },
21
- React.createElement(PortalRenderer, { id: id }),
22
- React.createElement(ForeignComponentContainer, { innerProps: innerProps, "$portalId": id, "$component": component, "$context": context })));
23
- });
24
- }
25
- function isNotExotic(component) {
26
- return !component.$$typeof;
27
- }
28
- export function wrapComponent(converters, component, captured, Wrapper) {
29
- if (!component) {
30
- const pilet = captured.piral.meta.name;
31
- console.error(`[${pilet}] The given value is not a valid component.`);
32
- // tslint:disable-next-line:no-null-keyword
33
- component = () => null;
34
- }
35
- if (typeof component === 'object' && isNotExotic(component)) {
36
- const result = convertComponent(converters[component.type], component);
37
- return wrapForeignComponent(result, captured, Wrapper);
38
- }
39
- return wrapReactComponent(component, captured, Wrapper);
40
- }
41
- //# sourceMappingURL=wrapComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wrapComponent.js","sourceRoot":"","sources":["../../src/components/wrapComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGlD,qDAAqD;AACrD,IAAI,YAAY,GAAG,MAAM,CAAC;AAM1B,SAAS,kBAAkB,CACzB,SAAsD,EACtD,QAAuB,EACvB,OAAoB;IAEpB,OAAO,CAAC,KAAQ,EAAE,EAAE,CAAC,CACnB,oBAAC,OAAO,OAAK,KAAK;QAChB,oBAAC,SAAS,OAAK,KAAK,KAAM,QAAQ,GAAI,CAC9B,CACX,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAC3B,SAAmD,EACnD,QAAuB,EACvB,OAAoB;IAEpB,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,KAAQ,EAAE,EAAE;QAC7B,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,qBAAqB,EAAE,CAAC;QAC9D,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;QACpE,2CAA2C;QAC3C,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAC3B,GAAG,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,EACpF,EAAE,CACH,CAAC;QACF,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QAE7E,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;QAErD,OAAO,CACL,oBAAC,OAAO,OAAK,KAAK;YAChB,oBAAC,cAAc,IAAC,EAAE,EAAE,EAAE,GAAI;YAC1B,oBAAC,yBAAyB,IAAC,UAAU,EAAE,UAAU,eAAa,EAAE,gBAAc,SAAS,cAAY,OAAO,GAAI,CACtG,CACX,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,WAAW,CAAC,SAAc;IACjC,OAAO,CAAE,SAAmC,CAAC,QAAQ,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,UAAuD,EACvD,SAA+C,EAC/C,QAAuB,EACvB,OAAoB;IAEpB,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;QACvC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,6CAA6C,CAAC,CAAC;QACtE,2CAA2C;QAC3C,SAAS,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;KACxB;IAED,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,WAAW,CAAC,SAAS,CAAC,EAAE;QAC3D,MAAM,MAAM,GAAG,gBAAgB,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;QACvE,OAAO,oBAAoB,CAAI,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;KAC3D;IAED,OAAO,kBAAkB,CAAI,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC7D,CAAC"}
@@ -1,22 +0,0 @@
1
- import type { PiralInstanceOptions, PiralInstance } from './types';
2
- /**
3
- * Creates a new PiralInstance component, which can be used for
4
- * bootstrapping the application easily.
5
- *
6
- * @example
7
- ```jsx
8
- const instance = createInstance({
9
- requestPilets() {
10
- return fetch(...);
11
- },
12
- });
13
-
14
- const app = (
15
- <Piral instance={instance}>
16
- <Define name="Layout" component={MyLayout} />
17
- </Piral>
18
- );
19
- render(app, document.querySelector('#app'));
20
- ```
21
- */
22
- export declare function createInstance(config?: PiralInstanceOptions): PiralInstance;