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,22 +0,0 @@
1
- import { useState, useEffect } from 'react';
2
- import { none } from '../utils/helpers';
3
- import { getCurrentLayout } from '../utils/media';
4
- /**
5
- * Hook to detect layout changes (e.g., which UI breakpoint was hit).
6
- * @param queries The available queries matching the breakpoints.
7
- * @param values The values mapping to the breakpoints
8
- * @param defaultValue The default value.
9
- */
10
- export function useMedia(queries, values, defaultValue) {
11
- const match = () => getCurrentLayout(queries, values, defaultValue);
12
- const [value, update] = useState(match);
13
- useEffect(() => {
14
- if (typeof document !== 'undefined') {
15
- const handler = () => update(match);
16
- window.addEventListener('resize', handler);
17
- return () => window.removeEventListener('resize', handler);
18
- }
19
- }, none);
20
- return value;
21
- }
22
- //# sourceMappingURL=media.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/hooks/media.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAI,OAAsB,EAAE,MAAgB,EAAE,YAAe;IACnF,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;IACpE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAExC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;YACnC,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACpC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC3C,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SAC5D;IACH,CAAC,EAAE,IAAI,CAAC,CAAC;IAET,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Uses the global state context to retrieve the pilet API stored
3
- * for the root pilet. This allows interaction with the pilet API
4
- * from the app shell.
5
- * @returns The pilet API object of the root pilet.
6
- */
7
- export declare function usePiletApi(): import("piral-base").PiletApi;
@@ -1,14 +0,0 @@
1
- import { useState } from "react";
2
- import { useGlobalStateContext } from "./globalState";
3
- /**
4
- * Uses the global state context to retrieve the pilet API stored
5
- * for the root pilet. This allows interaction with the pilet API
6
- * from the app shell.
7
- * @returns The pilet API object of the root pilet.
8
- */
9
- export function usePiletApi() {
10
- const context = useGlobalStateContext();
11
- const [api] = useState(() => Object.values(context.apis).shift());
12
- return api;
13
- }
14
- //# sourceMappingURL=piletApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"piletApi.js","sourceRoot":"","sources":["../../src/hooks/piletApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,MAAM,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;IAClE,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Hook for running the callback once on mount.
3
- * @param cb The callback to be invoked on mounting.
4
- */
5
- export declare function useSetter(cb: () => void): void;
@@ -1,14 +0,0 @@
1
- import { useEffect as useSideEffect } from 'react';
2
- import { none } from '../utils/helpers';
3
- function useMainEffect(cb) {
4
- cb();
5
- }
6
- const useEffect = typeof window !== 'undefined' ? useSideEffect : useMainEffect;
7
- /**
8
- * Hook for running the callback once on mount.
9
- * @param cb The callback to be invoked on mounting.
10
- */
11
- export function useSetter(cb) {
12
- useEffect(cb, none);
13
- }
14
- //# sourceMappingURL=setter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setter.js","sourceRoot":"","sources":["../../src/hooks/setter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,SAAS,aAAa,CAAC,EAAc;IACnC,EAAE,EAAE,CAAC;AACP,CAAC;AAED,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC;AAEhF;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,EAAc;IACtC,SAAS,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;AACtB,CAAC"}
@@ -1,12 +0,0 @@
1
- import { SharedDataItem } from '../types';
2
- /**
3
- * Hook that yields the full shared data.
4
- * Any change to the shared data yields the new data.
5
- */
6
- export declare function useSharedData(): Record<string, SharedDataItem>;
7
- /**
8
- * Hook that yields the selected subset of the shared data.
9
- * Only changes to this subset will yield a new data state.
10
- * @param select The subset selection.
11
- */
12
- export declare function useSharedData<R>(select: (source: Record<string, SharedDataItem>) => R): R;
@@ -1,6 +0,0 @@
1
- import { useGlobalState } from './globalState';
2
- export function useSharedData(s) {
3
- const select = s || ((m) => m);
4
- return useGlobalState((s) => select(s.data));
5
- }
6
- //# sourceMappingURL=sharedData.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sharedData.js","sourceRoot":"","sources":["../../src/hooks/sharedData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAgB/C,MAAM,UAAU,aAAa,CAAI,CAAiD;IAChF,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/B,OAAO,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/C,CAAC"}
package/esm/index.d.ts DELETED
@@ -1,10 +0,0 @@
1
- export * from './createInstance';
2
- export * from './helpers';
3
- export * from './components';
4
- export * from './hooks';
5
- export * from './setters';
6
- export * from './state';
7
- export * from './utils';
8
- export * from './Piral';
9
- export * from './PiralContext';
10
- export * from './types';
package/esm/index.js DELETED
@@ -1,11 +0,0 @@
1
- export * from './createInstance';
2
- export * from './helpers';
3
- export * from './components';
4
- export * from './hooks';
5
- export * from './setters';
6
- export * from './state';
7
- export * from './utils';
8
- export * from './Piral';
9
- export * from './PiralContext';
10
- export * from './types';
11
- //# sourceMappingURL=index.js.map
package/esm/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
@@ -1,4 +0,0 @@
1
- import { PiletApiCreator } from 'piral-base';
2
- import { GlobalStateContext, PiralPlugin } from '../types';
3
- export declare function createExtenders(context: GlobalStateContext, apis: Array<PiralPlugin>): import("piral-base").PiletApiExtender<Partial<import("piral-base").PiletApi>>[];
4
- export declare function defaultApiFactory(context: GlobalStateContext, apis: Array<PiralPlugin>): PiletApiCreator;
@@ -1,25 +0,0 @@
1
- import { isfunc, initializeApi, mergeApis } from 'piral-base';
2
- import { createCoreApi } from './core';
3
- export function createExtenders(context, apis) {
4
- const creators = [createCoreApi, ...apis.filter(isfunc)];
5
- return creators.map((c) => {
6
- const ctx = c(context);
7
- if (isfunc(ctx)) {
8
- return ctx;
9
- }
10
- else {
11
- return () => ({
12
- ...ctx,
13
- });
14
- }
15
- });
16
- }
17
- export function defaultApiFactory(context, apis) {
18
- const extenders = createExtenders(context, apis);
19
- return (target) => {
20
- const api = initializeApi(target, context);
21
- context.apis[target.name] = api;
22
- return mergeApis(api, extenders, target);
23
- };
24
- }
25
- //# sourceMappingURL=api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/modules/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAmB,aAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE/E,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAGvC,MAAM,UAAU,eAAe,CAAC,OAA2B,EAAE,IAAwB;IACnF,MAAM,QAAQ,GAAuB,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7E,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACxB,MAAM,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;QAEvB,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE;YACf,OAAO,GAAG,CAAC;SACZ;aAAM;YACL,OAAO,GAAG,EAAE,CAAC,CAAC;gBACZ,GAAG,GAAG;aACP,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAA2B,EAAE,IAAwB;IACrF,MAAM,SAAS,GAAG,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACjD,OAAO,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC3C,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;QAChC,OAAO,SAAS,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC,CAAC;AACJ,CAAC"}
@@ -1,3 +0,0 @@
1
- import { PiletApiExtender } from 'piral-base';
2
- import { GlobalStateContext, PiletCoreApi } from '../types';
3
- export declare function createCoreApi(context: GlobalStateContext): PiletApiExtender<PiletCoreApi>;
@@ -1,50 +0,0 @@
1
- import { renderElement } from './element';
2
- import { withApi } from '../state';
3
- import { ExtensionSlot } from '../components';
4
- import { createDataOptions, getDataExpiration } from '../utils';
5
- export function createCoreApi(context) {
6
- return (api, meta) => {
7
- const pilet = meta.name;
8
- return {
9
- getData(name) {
10
- return context.readDataValue(name);
11
- },
12
- setData(name, value, options) {
13
- const { target = 'memory', expires } = createDataOptions(options);
14
- const expiration = getDataExpiration(expires);
15
- return context.tryWriteDataItem(name, value, pilet, target, expiration);
16
- },
17
- registerPage(route, arg, meta = {}) {
18
- const component = withApi(context, arg, api, 'page', undefined, { meta });
19
- context.registerPage(route, {
20
- pilet,
21
- meta,
22
- component,
23
- });
24
- return () => api.unregisterPage(route);
25
- },
26
- unregisterPage(route) {
27
- context.unregisterPage(route);
28
- },
29
- registerExtension(name, reference, defaults) {
30
- const component = withApi(context, reference, api, 'extension');
31
- context.registerExtension(name, {
32
- pilet,
33
- component,
34
- reference,
35
- defaults,
36
- });
37
- return () => api.unregisterExtension(name, reference);
38
- },
39
- unregisterExtension(name, arg) {
40
- context.unregisterExtension(name, arg);
41
- },
42
- renderHtmlExtension(element, props) {
43
- const [dispose] = renderElement(context, element, props);
44
- return dispose;
45
- },
46
- Extension: ExtensionSlot,
47
- };
48
- };
49
- }
50
- //# sourceMappingURL=core.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../../src/modules/core.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGhE,MAAM,UAAU,aAAa,CAAC,OAA2B;IACvD,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC;QACxB,OAAO;YACL,OAAO,CAAC,IAAI;gBACV,OAAO,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YACrC,CAAC;YACD,OAAO,CAAC,IAAI,EAAE,KA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AAC,OAAO,EAAE,KAAK;gBAChC,MAAM,CAAC,OAAO,CAAC,GAAG,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;gBACzD,OAAO,OAAO,CAAC;YACjB,CAAC;YACD,SAAS,EAAE,aAAa;SACzB,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
@@ -1,23 +0,0 @@
1
- import type { AvailableDependencies, PiletEntries } from '../types';
2
- /**
3
- * The global dependencies, which represent the dependencies
4
- * shared from the app shell itself.
5
- */
6
- export declare const globalDependencies: AvailableDependencies;
7
- /**
8
- * The default dependency selector, which just returns the provided
9
- * dependencies.
10
- */
11
- export declare function defaultDependencySelector(dependencies: AvailableDependencies): AvailableDependencies;
12
- /**
13
- * The default pilet requester, which just returns an empty array.
14
- * Use your own code to connect to the feed service.
15
- *
16
- * @example
17
- ```js
18
- return fetch('https://feed.piral.cloud/api/v1/pilet/sample')
19
- .then(res => res.json())
20
- .then(res => res.items);
21
- ```
22
- */
23
- export declare function defaultModuleRequester(): Promise<PiletEntries>;
@@ -1,32 +0,0 @@
1
- import { isfunc } from 'piral-base';
2
- import { fillDependencies } from '../../app.codegen';
3
- /**
4
- * The global dependencies, which represent the dependencies
5
- * shared from the app shell itself.
6
- */
7
- export const globalDependencies = {};
8
- if (isfunc(fillDependencies)) {
9
- fillDependencies(globalDependencies);
10
- }
11
- /**
12
- * The default dependency selector, which just returns the provided
13
- * dependencies.
14
- */
15
- export function defaultDependencySelector(dependencies) {
16
- return dependencies;
17
- }
18
- /**
19
- * The default pilet requester, which just returns an empty array.
20
- * Use your own code to connect to the feed service.
21
- *
22
- * @example
23
- ```js
24
- return fetch('https://feed.piral.cloud/api/v1/pilet/sample')
25
- .then(res => res.json())
26
- .then(res => res.items);
27
- ```
28
- */
29
- export function defaultModuleRequester() {
30
- return Promise.resolve([]);
31
- }
32
- //# sourceMappingURL=dependencies.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../src/modules/dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA0B,EAAE,CAAC;AAE5D,IAAI,MAAM,CAAC,gBAAgB,CAAC,EAAE;IAC5B,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,YAAmC;IAC3E,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAC7B,CAAC"}
@@ -1,5 +0,0 @@
1
- import { Disposable, GlobalStateContext } from '../types';
2
- export interface Updatable {
3
- (newProps: any): void;
4
- }
5
- export declare function renderElement(context: GlobalStateContext, element: HTMLElement | ShadowRoot, props: any): [Disposable, Updatable];
@@ -1,248 +0,0 @@
1
- import { ExtensionSlot } from '../components';
2
- import { tryParseJson, noop, reactifyContent, renderInDom, changeDomPortal, portalName, extensionName, slotName, isSame, contentName, componentName, defer, } from '../utils';
3
- if (typeof window !== 'undefined' && 'customElements' in window) {
4
- const contents = 'contents';
5
- /**
6
- * This is a nice abstraction allowing anyone to actually use the extension system
7
- * brought by Piral. Not all props of the extension system are actually exposed.
8
- *
9
- * Usage:
10
- *
11
- * ```
12
- * <piral-extension name="my-ext-name"></piral-extension>
13
- * ```
14
- */
15
- class PiralExtension extends HTMLElement {
16
- constructor() {
17
- super(...arguments);
18
- this.dispose = noop;
19
- this.update = noop;
20
- this.props = {
21
- name: this.getAttribute('name'),
22
- emptySkipsRender: typeof this.getAttribute('empty-skips-render') === 'string',
23
- params: tryParseJson(this.getAttribute('params')),
24
- empty: undefined,
25
- order: undefined,
26
- render: undefined,
27
- children: reactifyContent(this.childNodes),
28
- };
29
- }
30
- get params() {
31
- return this.props.params;
32
- }
33
- set params(value) {
34
- if (!isSame(this.props.params, value)) {
35
- this.props.params = value;
36
- this.update(this.props);
37
- }
38
- }
39
- get name() {
40
- return this.props.name;
41
- }
42
- set name(value) {
43
- if (this.props.name !== value) {
44
- this.props.name = value;
45
- this.update(this.props);
46
- }
47
- }
48
- get order() {
49
- return this.props.order;
50
- }
51
- set order(value) {
52
- if (this.props.order !== value) {
53
- this.props.order = value;
54
- this.update(this.props);
55
- }
56
- }
57
- get render() {
58
- return this.props.render;
59
- }
60
- set render(value) {
61
- if (this.props.render !== value) {
62
- this.props.render = value;
63
- this.update(this.props);
64
- }
65
- }
66
- get empty() {
67
- return this.props.empty;
68
- }
69
- set empty(value) {
70
- if (this.props.empty !== value) {
71
- this.props.empty = value;
72
- this.update(this.props);
73
- }
74
- }
75
- get emptySkipsRender() {
76
- return this.props.emptySkipsRender;
77
- }
78
- set emptySkipsRender(value) {
79
- if (this.props.emptySkipsRender !== value) {
80
- this.props.emptySkipsRender = value;
81
- this.update(this.props);
82
- }
83
- }
84
- connectedCallback() {
85
- this.style.display = contents;
86
- if (this.isConnected) {
87
- this.dispatchEvent(new CustomEvent('render-html', {
88
- bubbles: true,
89
- composed: true,
90
- detail: {
91
- target: this,
92
- props: this.props,
93
- },
94
- }));
95
- }
96
- }
97
- disconnectedCallback() {
98
- this.dispose();
99
- this.dispose = noop;
100
- this.update = noop;
101
- }
102
- attributeChangedCallback(name, _, newValue) {
103
- switch (name) {
104
- case 'name':
105
- this.name = newValue;
106
- break;
107
- case 'params':
108
- this.params = tryParseJson(newValue);
109
- break;
110
- case 'empty-skips-render':
111
- this.emptySkipsRender = typeof newValue === 'string';
112
- break;
113
- }
114
- }
115
- static get observedAttributes() {
116
- return ['name', 'params', 'empty-skips-render'];
117
- }
118
- }
119
- customElements.define(extensionName, PiralExtension);
120
- /**
121
- * This is a boundary to host elements from other frameworks - effectively vanishing
122
- * at runtime.
123
- *
124
- * Usage:
125
- *
126
- * ```
127
- * <piral-portal pid="host-1234"></piral-portal>
128
- * ```
129
- */
130
- class PiralPortal extends HTMLElement {
131
- connectedCallback() {
132
- this.style.display = contents;
133
- }
134
- }
135
- customElements.define(portalName, PiralPortal);
136
- /**
137
- * This is a virtual element to aggregate rendering from other frameworks, mostly
138
- * used like piral-portal, but without context-hosting capabilities. This would
139
- * be used exclusively within a foreign framework, not from Piral to initiate.
140
- *
141
- * Usage:
142
- *
143
- * ```
144
- * <piral-slot></piral-slot>
145
- * ```
146
- */
147
- class PiralSlot extends HTMLElement {
148
- connectedCallback() {
149
- this.style.display = contents;
150
- }
151
- }
152
- customElements.define(slotName, PiralSlot);
153
- /**
154
- * This is a virtual element to render children defined in React / by Piral in other
155
- * frameworks.
156
- *
157
- * Internally, you can use the assignContent function to populate the content to be
158
- * rendered once the element is attached / mounted in the DOM.
159
- *
160
- * Usage:
161
- *
162
- * ```
163
- * <piral-content cid="123"></piral-content>
164
- * ```
165
- *
166
- * where you'd
167
- *
168
- * ```
169
- * window.assignContent("123", myReactContent)
170
- * ```
171
- *
172
- * beforehand.
173
- */
174
- class PiralContent extends HTMLElement {
175
- constructor() {
176
- super(...arguments);
177
- this.dispose = noop;
178
- }
179
- connectedCallback() {
180
- this.style.display = contents;
181
- const cid = this.getAttribute('cid');
182
- const content = PiralContent.contentAssignments[cid];
183
- const portal = this.closest('piral-portal');
184
- if (content && portal) {
185
- const portalId = portal.getAttribute('pid');
186
- window.dispatchEvent(new CustomEvent('render-content', {
187
- detail: { target: this, content, portalId },
188
- }));
189
- }
190
- }
191
- disconnectedCallback() {
192
- this.dispose();
193
- this.dispose = noop;
194
- }
195
- }
196
- PiralContent.contentAssignments = {};
197
- window.assignContent = (cid, content) => {
198
- PiralContent.contentAssignments[cid] = content;
199
- };
200
- customElements.define(contentName, PiralContent);
201
- /**
202
- * This is a virtual element to indicate that the contained content is
203
- * rendered from a micro frontend's component. It will be used by the
204
- * orchestrator, so there is nothing you will need to do with it.
205
- *
206
- * Right now this is only used when you opt-in in the createInstance.
207
- */
208
- class PiralComponent extends HTMLElement {
209
- get name() {
210
- return this.getAttribute('name');
211
- }
212
- get origin() {
213
- return this.getAttribute('origin');
214
- }
215
- connectedCallback() {
216
- this.style.display = contents;
217
- this.deferEvent('add-component');
218
- }
219
- disconnectedCallback() {
220
- this.deferEvent('remove-component');
221
- }
222
- deferEvent(eventName) {
223
- const ev = new CustomEvent(eventName, {
224
- detail: { name: this.name, origin: this.origin },
225
- });
226
- defer(() => window.dispatchEvent(ev));
227
- }
228
- }
229
- customElements.define(componentName, PiralComponent);
230
- }
231
- export function renderElement(context, element, props) {
232
- if (typeof window !== 'undefined') {
233
- let [id, portal] = renderInDom(context, element, ExtensionSlot, props);
234
- const evName = 'extension-props-changed';
235
- const handler = (ev) => update(ev.detail);
236
- const dispose = () => {
237
- context.hidePortal(id, portal);
238
- element.removeEventListener(evName, handler);
239
- };
240
- const update = (newProps) => {
241
- [id, portal] = changeDomPortal(id, portal, context, element, ExtensionSlot, newProps);
242
- };
243
- element.addEventListener(evName, handler);
244
- return [dispose, update];
245
- }
246
- return [noop, noop];
247
- }
248
- //# sourceMappingURL=element.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"element.js","sourceRoot":"","sources":["../../src/modules/element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,eAAe,EACf,WAAW,EACX,eAAe,EACf,UAAU,EACV,aAAa,EACb,QAAQ,EACR,MAAM,EACN,WAAW,EACX,aAAa,EACb,KAAK,GACN,MAAM,UAAU,CAAC;AAMlB,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,gBAAgB,IAAI,MAAM,EAAE;IAC/D,MAAM,QAAQ,GAAG,UAAU,CAAC;IAE5B;;;;;;;;;OASG;IACH,MAAM,cAAe,SAAQ,WAAW;QAAxC;;YACE,YAAO,GAAe,IAAI,CAAC;YAC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,EAAE,QAAQ,CAAC,CAAC;QACxF,CAAC,CAAC;QACF,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC1C,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;KAC1B;IAED,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACtB,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './api';
2
- export * from './dependencies';
3
- export * from './element';
@@ -1,4 +0,0 @@
1
- export * from './api';
2
- export * from './dependencies';
3
- export * from './element';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- import { ComponentsState } from '../types';
3
- /**
4
- * The props for the SetComponent component.
5
- */
6
- export interface SetComponentProps<TKey extends keyof ComponentsState> {
7
- /**
8
- * The name of the shared component to set.
9
- */
10
- name: TKey;
11
- /**
12
- * The shared component to define.
13
- */
14
- component: ComponentsState[TKey];
15
- }
16
- /**
17
- * The component capable of setting a layout component at mounting.
18
- */
19
- export declare function SetComponent<TKey extends keyof ComponentsState>({ name, component, }: SetComponentProps<TKey>): React.ReactElement;
@@ -1,11 +0,0 @@
1
- import { useGlobalStateContext, useSetter } from '../hooks';
2
- /**
3
- * The component capable of setting a layout component at mounting.
4
- */
5
- export function SetComponent({ name, component, }) {
6
- const { setComponent } = useGlobalStateContext();
7
- useSetter(() => component && setComponent(name, component));
8
- // tslint:disable-next-line:no-null-keyword
9
- return null;
10
- }
11
- //# sourceMappingURL=SetComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SetComponent.js","sourceRoot":"","sources":["../../src/setters/SetComponent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAiB5D;;GAEG;AACH,MAAM,UAAU,YAAY,CAAqC,EAC/D,IAAI,EACJ,SAAS,GACe;IACxB,MAAM,EAAE,YAAY,EAAE,GAAG,qBAAqB,EAAE,CAAC;IACjD,SAAS,CAAC,GAAG,EAAE,CAAC,SAAS,IAAI,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IAC5D,2CAA2C;IAC3C,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- import { ErrorComponentsState } from '../types';
3
- /**
4
- * The props for the SetError component.
5
- */
6
- export interface SetErrorProps<TKey extends keyof ErrorComponentsState> {
7
- /**
8
- * The name of the error component to set.
9
- */
10
- type: TKey;
11
- /**
12
- * The error component to define.
13
- */
14
- component: ErrorComponentsState[TKey];
15
- }
16
- /**
17
- * The component capable of setting a globally defined error handler component at mounting.
18
- */
19
- export declare function SetError<TKey extends keyof ErrorComponentsState>({ type, component, }: SetErrorProps<TKey>): React.ReactElement;
@@ -1,11 +0,0 @@
1
- import { useGlobalStateContext, useSetter } from '../hooks';
2
- /**
3
- * The component capable of setting a globally defined error handler component at mounting.
4
- */
5
- export function SetError({ type, component, }) {
6
- const { setErrorComponent } = useGlobalStateContext();
7
- useSetter(() => component && setErrorComponent(type, component));
8
- // tslint:disable-next-line:no-null-keyword
9
- return null;
10
- }
11
- //# sourceMappingURL=SetError.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SetError.js","sourceRoot":"","sources":["../../src/setters/SetError.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAiB5D;;GAEG;AACH,MAAM,UAAU,QAAQ,CAA0C,EAChE,IAAI,EACJ,SAAS,GACW;IACpB,MAAM,EAAE,iBAAiB,EAAE,GAAG,qBAAqB,EAAE,CAAC;IACtD,SAAS,CAAC,GAAG,EAAE,CAAC,SAAS,IAAI,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IACjE,2CAA2C;IAC3C,OAAO,IAAI,CAAC;AACd,CAAC"}