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.
- package/app.codegen +2 -3
- package/lib/Piral.js +8 -13
- package/lib/Piral.js.map +1 -1
- package/lib/PiralContext.js +11 -16
- package/lib/PiralContext.js.map +1 -1
- package/lib/RootListener.js +8 -13
- package/lib/RootListener.js.map +1 -1
- package/lib/actions/app.js +19 -30
- package/lib/actions/app.js.map +1 -1
- package/lib/actions/components.js +9 -16
- package/lib/actions/components.js.map +1 -1
- package/lib/actions/data.js +7 -15
- package/lib/actions/data.js.map +1 -1
- package/lib/actions/define.js +2 -7
- package/lib/actions/define.js.map +1 -1
- package/lib/actions/index.js +6 -9
- package/lib/actions/index.js.map +1 -1
- package/lib/actions/portal.js +9 -16
- package/lib/actions/portal.js.map +1 -1
- package/lib/actions/state.js +4 -9
- package/lib/actions/state.js.map +1 -1
- package/lib/components/ErrorBoundary.js +9 -14
- package/lib/components/ErrorBoundary.js.map +1 -1
- package/lib/components/ExtensionSlot.js +9 -14
- package/lib/components/ExtensionSlot.js.map +1 -1
- package/lib/components/ForeignComponentContainer.js +6 -11
- package/lib/components/ForeignComponentContainer.js.map +1 -1
- package/lib/components/Mediator.js +8 -13
- package/lib/components/Mediator.js.map +1 -1
- package/lib/components/PiralGlobals.js +6 -11
- package/lib/components/PiralGlobals.js.map +1 -1
- package/lib/components/PiralRoutes.js +11 -16
- package/lib/components/PiralRoutes.js.map +1 -1
- package/lib/components/PiralSuspense.js +6 -11
- package/lib/components/PiralSuspense.js.map +1 -1
- package/lib/components/PiralView.js +13 -18
- package/lib/components/PiralView.js.map +1 -1
- package/lib/components/PortalRenderer.js +5 -9
- package/lib/components/PortalRenderer.js.map +1 -1
- package/lib/components/ResponsiveLayout.js +6 -11
- package/lib/components/ResponsiveLayout.js.map +1 -1
- package/lib/components/SwitchErrorInfo.js +7 -12
- package/lib/components/SwitchErrorInfo.js.map +1 -1
- package/lib/components/components.js +10 -15
- package/lib/components/components.js.map +1 -1
- package/lib/components/index.js +12 -15
- package/lib/components/index.js.map +1 -1
- package/lib/components/wrapComponent.js +12 -17
- package/lib/components/wrapComponent.js.map +1 -1
- package/lib/createInstance.js +15 -19
- package/lib/createInstance.js.map +1 -1
- package/lib/defaults/DefaultErrorInfo.js +5 -10
- package/lib/defaults/DefaultErrorInfo.js.map +1 -1
- package/lib/defaults/DefaultLayout.js +3 -7
- package/lib/defaults/DefaultLayout.js.map +1 -1
- package/lib/defaults/DefaultLoadingIndicator.js +3 -8
- package/lib/defaults/DefaultLoadingIndicator.js.map +1 -1
- package/lib/defaults/DefaultRouteSwitch_v5.js +7 -12
- package/lib/defaults/DefaultRouteSwitch_v5.js.map +1 -1
- package/lib/defaults/DefaultRouteSwitch_v6.js +7 -12
- package/lib/defaults/DefaultRouteSwitch_v6.js.map +1 -1
- package/lib/defaults/DefaultRouter_v5.js +5 -10
- package/lib/defaults/DefaultRouter_v5.js.map +1 -1
- package/lib/defaults/DefaultRouter_v6.js +5 -10
- package/lib/defaults/DefaultRouter_v6.js.map +1 -1
- package/lib/defaults/navigator_none.js +4 -11
- package/lib/defaults/navigator_none.js.map +1 -1
- package/lib/defaults/navigator_v5.js +9 -17
- package/lib/defaults/navigator_v5.js.map +1 -1
- package/lib/defaults/navigator_v6.js +9 -17
- package/lib/defaults/navigator_v6.js.map +1 -1
- package/lib/helpers.js +8 -12
- package/lib/helpers.js.map +1 -1
- package/lib/hooks/action.js +3 -7
- package/lib/hooks/action.js.map +1 -1
- package/lib/hooks/actions.js +4 -8
- package/lib/hooks/actions.js.map +1 -1
- package/lib/hooks/globalState.js +5 -10
- package/lib/hooks/globalState.js.map +1 -1
- package/lib/hooks/index.js +7 -10
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/media.js +8 -12
- package/lib/hooks/media.js.map +1 -1
- package/lib/hooks/piletApi.js +5 -9
- package/lib/hooks/piletApi.js.map +1 -1
- package/lib/hooks/setter.js +5 -9
- package/lib/hooks/setter.js.map +1 -1
- package/lib/hooks/sharedData.js +3 -7
- package/lib/hooks/sharedData.js.map +1 -1
- package/lib/index.js +10 -13
- package/lib/index.js.map +1 -1
- package/lib/modules/api.js +8 -13
- package/lib/modules/api.js.map +1 -1
- package/lib/modules/core.js +11 -15
- package/lib/modules/core.js.map +1 -1
- package/lib/modules/dependencies.js +7 -12
- package/lib/modules/dependencies.js.map +1 -1
- package/lib/modules/element.js +22 -26
- package/lib/modules/element.js.map +1 -1
- package/lib/modules/index.js +3 -6
- package/lib/modules/index.js.map +1 -1
- package/lib/setters/SetComponent.js +4 -8
- package/lib/setters/SetComponent.js.map +1 -1
- package/lib/setters/SetError.js +4 -8
- package/lib/setters/SetError.js.map +1 -1
- package/lib/setters/SetErrors.js +4 -9
- package/lib/setters/SetErrors.js.map +1 -1
- package/lib/setters/SetLayout.js +4 -9
- package/lib/setters/SetLayout.js.map +1 -1
- package/lib/setters/SetProvider.js +4 -8
- package/lib/setters/SetProvider.js.map +1 -1
- package/lib/setters/SetRedirect.js +5 -9
- package/lib/setters/SetRedirect.js.map +1 -1
- package/lib/setters/SetRoute.js +4 -8
- package/lib/setters/SetRoute.js.map +1 -1
- package/lib/setters/index.js +7 -10
- package/lib/setters/index.js.map +1 -1
- package/lib/state/createActions.js +5 -11
- package/lib/state/createActions.js.map +1 -1
- package/lib/state/createGlobalState.js +5 -10
- package/lib/state/createGlobalState.js.map +1 -1
- package/lib/state/index.js +4 -7
- package/lib/state/index.js.map +1 -1
- package/lib/state/stateContext.js +3 -7
- package/lib/state/stateContext.js.map +1 -1
- package/lib/state/withApi.js +7 -12
- package/lib/state/withApi.js.map +1 -1
- package/lib/tools/codegen.js +15 -22
- package/lib/tools/codegen.js.map +1 -1
- package/lib/tools/debugger.js +3 -7
- package/lib/tools/debugger.js.map +1 -1
- package/lib/tools/emulator.js +3 -7
- package/lib/tools/emulator.js.map +1 -1
- package/lib/types/api.js +1 -2
- package/lib/types/common.js +1 -2
- package/lib/types/components.js +1 -2
- package/lib/types/config.js +1 -2
- package/lib/types/custom.js +1 -2
- package/lib/types/data.js +1 -2
- package/lib/types/extension.js +1 -2
- package/lib/types/index.js +14 -17
- package/lib/types/index.js.map +1 -1
- package/lib/types/instance.js +1 -2
- package/lib/types/layout.js +1 -2
- package/lib/types/navigation.js +1 -2
- package/lib/types/plugin.js +1 -2
- package/lib/types/state.js +1 -2
- package/lib/types/utils.js +1 -2
- package/lib/types/web.js +1 -2
- package/lib/utils/compare.js +1 -5
- package/lib/utils/compare.js.map +1 -1
- package/lib/utils/data.js +3 -9
- package/lib/utils/data.js.map +1 -1
- package/lib/utils/extension.js +3 -9
- package/lib/utils/extension.js.map +1 -1
- package/lib/utils/foreign.js +15 -23
- package/lib/utils/foreign.js.map +1 -1
- package/lib/utils/guid.js +2 -7
- package/lib/utils/guid.js.map +1 -1
- package/lib/utils/helpers.js +24 -41
- package/lib/utils/helpers.js.map +1 -1
- package/lib/utils/index.js +12 -18
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/media.js +5 -9
- package/lib/utils/media.js.map +1 -1
- package/lib/utils/react.js +2 -7
- package/lib/utils/react.js.map +1 -1
- package/lib/utils/routes.js +3 -8
- package/lib/utils/routes.js.map +1 -1
- package/lib/utils/state.js +19 -30
- package/lib/utils/state.js.map +1 -1
- package/lib/utils/storage.js +2 -5
- package/lib/utils/storage.js.map +1 -1
- package/package.json +11 -26
- package/esm/Piral.d.ts +0 -18
- package/esm/Piral.js +0 -24
- package/esm/Piral.js.map +0 -1
- package/esm/PiralContext.d.ts +0 -21
- package/esm/PiralContext.js +0 -34
- package/esm/PiralContext.js.map +0 -1
- package/esm/RootListener.d.ts +0 -2
- package/esm/RootListener.js +0 -44
- package/esm/RootListener.js.map +0 -1
- package/esm/actions/app.d.ts +0 -13
- package/esm/actions/app.js +0 -61
- package/esm/actions/app.js.map +0 -1
- package/esm/actions/components.d.ts +0 -5
- package/esm/actions/components.js +0 -14
- package/esm/actions/components.js.map +0 -1
- package/esm/actions/data.d.ts +0 -6
- package/esm/actions/data.js +0 -46
- package/esm/actions/data.js.map +0 -1
- package/esm/actions/define.d.ts +0 -3
- package/esm/actions/define.js +0 -10
- package/esm/actions/define.js.map +0 -1
- package/esm/actions/index.d.ts +0 -6
- package/esm/actions/index.js +0 -7
- package/esm/actions/index.js.map +0 -1
- package/esm/actions/portal.d.ts +0 -6
- package/esm/actions/portal.js +0 -26
- package/esm/actions/portal.js.map +0 -1
- package/esm/actions/state.d.ts +0 -3
- package/esm/actions/state.js +0 -12
- package/esm/actions/state.js.map +0 -1
- package/esm/components/ErrorBoundary.d.ts +0 -33
- package/esm/components/ErrorBoundary.js +0 -50
- package/esm/components/ErrorBoundary.js.map +0 -1
- package/esm/components/ExtensionSlot.d.ts +0 -11
- package/esm/components/ExtensionSlot.js +0 -29
- package/esm/components/ExtensionSlot.js.map +0 -1
- package/esm/components/ForeignComponentContainer.d.ts +0 -19
- package/esm/components/ForeignComponentContainer.js +0 -46
- package/esm/components/ForeignComponentContainer.js.map +0 -1
- package/esm/components/Mediator.d.ts +0 -15
- package/esm/components/Mediator.js +0 -24
- package/esm/components/Mediator.js.map +0 -1
- package/esm/components/PiralGlobals.d.ts +0 -6
- package/esm/components/PiralGlobals.js +0 -13
- package/esm/components/PiralGlobals.js.map +0 -1
- package/esm/components/PiralRoutes.d.ts +0 -20
- package/esm/components/PiralRoutes.js +0 -36
- package/esm/components/PiralRoutes.js.map +0 -1
- package/esm/components/PiralSuspense.d.ts +0 -5
- package/esm/components/PiralSuspense.js +0 -8
- package/esm/components/PiralSuspense.js.map +0 -1
- package/esm/components/PiralView.d.ts +0 -20
- package/esm/components/PiralView.js +0 -19
- package/esm/components/PiralView.js.map +0 -1
- package/esm/components/PortalRenderer.d.ts +0 -5
- package/esm/components/PortalRenderer.js +0 -7
- package/esm/components/PortalRenderer.js.map +0 -1
- package/esm/components/ResponsiveLayout.d.ts +0 -23
- package/esm/components/ResponsiveLayout.js +0 -12
- package/esm/components/ResponsiveLayout.js.map +0 -1
- package/esm/components/SwitchErrorInfo.d.ts +0 -3
- package/esm/components/SwitchErrorInfo.js +0 -23
- package/esm/components/SwitchErrorInfo.js.map +0 -1
- package/esm/components/components.d.ts +0 -40
- package/esm/components/components.js +0 -47
- package/esm/components/components.js.map +0 -1
- package/esm/components/index.d.ts +0 -12
- package/esm/components/index.js +0 -13
- package/esm/components/index.js.map +0 -1
- package/esm/components/wrapComponent.d.ts +0 -7
- package/esm/components/wrapComponent.js +0 -41
- package/esm/components/wrapComponent.js.map +0 -1
- package/esm/createInstance.d.ts +0 -22
- package/esm/createInstance.js +0 -68
- package/esm/createInstance.js.map +0 -1
- package/esm/defaults/DefaultErrorInfo.d.ts +0 -8
- package/esm/defaults/DefaultErrorInfo.js +0 -11
- package/esm/defaults/DefaultErrorInfo.js.map +0 -1
- package/esm/defaults/DefaultLayout.d.ts +0 -6
- package/esm/defaults/DefaultLayout.js +0 -7
- package/esm/defaults/DefaultLayout.js.map +0 -1
- package/esm/defaults/DefaultLoadingIndicator.d.ts +0 -6
- package/esm/defaults/DefaultLoadingIndicator.js +0 -7
- package/esm/defaults/DefaultLoadingIndicator.js.map +0 -1
- package/esm/defaults/DefaultRouteSwitch_v5.d.ts +0 -3
- package/esm/defaults/DefaultRouteSwitch_v5.js +0 -9
- package/esm/defaults/DefaultRouteSwitch_v5.js.map +0 -1
- package/esm/defaults/DefaultRouteSwitch_v6.d.ts +0 -3
- package/esm/defaults/DefaultRouteSwitch_v6.js +0 -13
- package/esm/defaults/DefaultRouteSwitch_v6.js.map +0 -1
- package/esm/defaults/DefaultRouter_v5.d.ts +0 -3
- package/esm/defaults/DefaultRouter_v5.js +0 -7
- package/esm/defaults/DefaultRouter_v5.js.map +0 -1
- package/esm/defaults/DefaultRouter_v6.d.ts +0 -3
- package/esm/defaults/DefaultRouter_v6.js +0 -7
- package/esm/defaults/DefaultRouter_v6.js.map +0 -1
- package/esm/defaults/navigator_none.d.ts +0 -5
- package/esm/defaults/navigator_none.js +0 -31
- package/esm/defaults/navigator_none.js.map +0 -1
- package/esm/defaults/navigator_v5.d.ts +0 -6
- package/esm/defaults/navigator_v5.js +0 -85
- package/esm/defaults/navigator_v5.js.map +0 -1
- package/esm/defaults/navigator_v6.d.ts +0 -6
- package/esm/defaults/navigator_v6.js +0 -84
- package/esm/defaults/navigator_v6.js.map +0 -1
- package/esm/helpers.d.ts +0 -17
- package/esm/helpers.js +0 -19
- package/esm/helpers.js.map +0 -1
- package/esm/hooks/action.d.ts +0 -6
- package/esm/hooks/action.js +0 -10
- package/esm/hooks/action.js.map +0 -1
- package/esm/hooks/actions.d.ts +0 -5
- package/esm/hooks/actions.js +0 -10
- package/esm/hooks/actions.js.map +0 -1
- package/esm/hooks/globalState.d.ts +0 -19
- package/esm/hooks/globalState.js +0 -16
- package/esm/hooks/globalState.js.map +0 -1
- package/esm/hooks/index.d.ts +0 -7
- package/esm/hooks/index.js +0 -8
- package/esm/hooks/index.js.map +0 -1
- package/esm/hooks/media.d.ts +0 -7
- package/esm/hooks/media.js +0 -22
- package/esm/hooks/media.js.map +0 -1
- package/esm/hooks/piletApi.d.ts +0 -7
- package/esm/hooks/piletApi.js +0 -14
- package/esm/hooks/piletApi.js.map +0 -1
- package/esm/hooks/setter.d.ts +0 -5
- package/esm/hooks/setter.js +0 -14
- package/esm/hooks/setter.js.map +0 -1
- package/esm/hooks/sharedData.d.ts +0 -12
- package/esm/hooks/sharedData.js +0 -6
- package/esm/hooks/sharedData.js.map +0 -1
- package/esm/index.d.ts +0 -10
- package/esm/index.js +0 -11
- package/esm/index.js.map +0 -1
- package/esm/modules/api.d.ts +0 -4
- package/esm/modules/api.js +0 -25
- package/esm/modules/api.js.map +0 -1
- package/esm/modules/core.d.ts +0 -3
- package/esm/modules/core.js +0 -50
- package/esm/modules/core.js.map +0 -1
- package/esm/modules/dependencies.d.ts +0 -23
- package/esm/modules/dependencies.js +0 -32
- package/esm/modules/dependencies.js.map +0 -1
- package/esm/modules/element.d.ts +0 -5
- package/esm/modules/element.js +0 -248
- package/esm/modules/element.js.map +0 -1
- package/esm/modules/index.d.ts +0 -3
- package/esm/modules/index.js +0 -4
- package/esm/modules/index.js.map +0 -1
- package/esm/setters/SetComponent.d.ts +0 -19
- package/esm/setters/SetComponent.js +0 -11
- package/esm/setters/SetComponent.js.map +0 -1
- package/esm/setters/SetError.d.ts +0 -19
- package/esm/setters/SetError.js +0 -11
- package/esm/setters/SetError.js.map +0 -1
- package/esm/setters/SetErrors.d.ts +0 -15
- package/esm/setters/SetErrors.js +0 -9
- package/esm/setters/SetErrors.js.map +0 -1
- package/esm/setters/SetLayout.d.ts +0 -15
- package/esm/setters/SetLayout.js +0 -9
- package/esm/setters/SetLayout.js.map +0 -1
- package/esm/setters/SetProvider.d.ts +0 -14
- package/esm/setters/SetProvider.js +0 -11
- package/esm/setters/SetProvider.js.map +0 -1
- package/esm/setters/SetRedirect.d.ts +0 -18
- package/esm/setters/SetRedirect.js +0 -12
- package/esm/setters/SetRedirect.js.map +0 -1
- package/esm/setters/SetRoute.d.ts +0 -23
- package/esm/setters/SetRoute.js +0 -11
- package/esm/setters/SetRoute.js.map +0 -1
- package/esm/setters/index.d.ts +0 -7
- package/esm/setters/index.js +0 -8
- package/esm/setters/index.js.map +0 -1
- package/esm/state/createActions.d.ts +0 -4
- package/esm/state/createActions.js +0 -27
- package/esm/state/createActions.js.map +0 -1
- package/esm/state/createGlobalState.d.ts +0 -2
- package/esm/state/createGlobalState.js +0 -19
- package/esm/state/createGlobalState.js.map +0 -1
- package/esm/state/index.d.ts +0 -4
- package/esm/state/index.js +0 -5
- package/esm/state/index.js.map +0 -1
- package/esm/state/stateContext.d.ts +0 -4
- package/esm/state/stateContext.js +0 -4
- package/esm/state/stateContext.js.map +0 -1
- package/esm/state/withApi.d.ts +0 -3
- package/esm/state/withApi.js +0 -30
- package/esm/state/withApi.js.map +0 -1
- package/esm/tools/codegen.d.ts +0 -23
- package/esm/tools/codegen.js +0 -194
- package/esm/tools/codegen.js.map +0 -1
- package/esm/tools/debugger.d.ts +0 -4
- package/esm/tools/debugger.js +0 -61
- package/esm/tools/debugger.js.map +0 -1
- package/esm/tools/emulator.d.ts +0 -4
- package/esm/tools/emulator.js +0 -12
- package/esm/tools/emulator.js.map +0 -1
- package/esm/types/api.d.ts +0 -141
- package/esm/types/api.js +0 -2
- package/esm/types/api.js.map +0 -1
- package/esm/types/common.d.ts +0 -21
- package/esm/types/common.js +0 -2
- package/esm/types/common.js.map +0 -1
- package/esm/types/components.d.ts +0 -250
- package/esm/types/components.js +0 -2
- package/esm/types/components.js.map +0 -1
- package/esm/types/config.d.ts +0 -94
- package/esm/types/config.js +0 -2
- package/esm/types/config.js.map +0 -1
- package/esm/types/custom.d.ts +0 -50
- package/esm/types/custom.js +0 -2
- package/esm/types/custom.js.map +0 -1
- package/esm/types/data.d.ts +0 -51
- package/esm/types/data.js +0 -2
- package/esm/types/data.js.map +0 -1
- package/esm/types/extension.d.ts +0 -61
- package/esm/types/extension.js +0 -2
- package/esm/types/extension.js.map +0 -1
- package/esm/types/index.d.ts +0 -14
- package/esm/types/index.js +0 -15
- package/esm/types/index.js.map +0 -1
- package/esm/types/instance.d.ts +0 -60
- package/esm/types/instance.js +0 -2
- package/esm/types/instance.js.map +0 -1
- package/esm/types/layout.d.ts +0 -12
- package/esm/types/layout.js +0 -2
- package/esm/types/layout.js.map +0 -1
- package/esm/types/navigation.d.ts +0 -98
- package/esm/types/navigation.js +0 -2
- package/esm/types/navigation.js.map +0 -1
- package/esm/types/plugin.d.ts +0 -14
- package/esm/types/plugin.js +0 -2
- package/esm/types/plugin.js.map +0 -1
- package/esm/types/state.d.ts +0 -346
- package/esm/types/state.js +0 -2
- package/esm/types/state.js.map +0 -1
- package/esm/types/utils.d.ts +0 -84
- package/esm/types/utils.js +0 -2
- package/esm/types/utils.js.map +0 -1
- package/esm/types/web.d.ts +0 -47
- package/esm/types/web.js +0 -2
- package/esm/types/web.js.map +0 -1
- package/esm/utils/compare.d.ts +0 -1
- package/esm/utils/compare.js +0 -42
- package/esm/utils/compare.js.map +0 -1
- package/esm/utils/data.d.ts +0 -4
- package/esm/utils/data.js +0 -39
- package/esm/utils/data.js.map +0 -1
- package/esm/utils/extension.d.ts +0 -16
- package/esm/utils/extension.js +0 -36
- package/esm/utils/extension.js.map +0 -1
- package/esm/utils/foreign.d.ts +0 -14
- package/esm/utils/foreign.js +0 -39
- package/esm/utils/foreign.js.map +0 -1
- package/esm/utils/guid.d.ts +0 -2
- package/esm/utils/guid.js +0 -12
- package/esm/utils/guid.js.map +0 -1
- package/esm/utils/helpers.d.ts +0 -16
- package/esm/utils/helpers.js +0 -76
- package/esm/utils/helpers.js.map +0 -1
- package/esm/utils/index.d.ts +0 -12
- package/esm/utils/index.js +0 -13
- package/esm/utils/index.js.map +0 -1
- package/esm/utils/media.d.ts +0 -4
- package/esm/utils/media.js +0 -12
- package/esm/utils/media.js.map +0 -1
- package/esm/utils/react.d.ts +0 -2
- package/esm/utils/react.js +0 -5
- package/esm/utils/react.js.map +0 -1
- package/esm/utils/routes.d.ts +0 -1
- package/esm/utils/routes.js +0 -5
- package/esm/utils/routes.js.map +0 -1
- package/esm/utils/state.d.ts +0 -57
- package/esm/utils/state.js +0 -113
- package/esm/utils/state.js.map +0 -1
- package/esm/utils/storage.d.ts +0 -3
- package/esm/utils/storage.js +0 -26
- package/esm/utils/storage.js.map +0 -1
- /package/{dist → lib}/codegen.js +0 -0
package/esm/tools/emulator.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { LoadPiletsOptions } from 'piral-base';
|
|
2
|
-
import { DebuggerExtensionOptions } from 'piral-debug-utils';
|
|
3
|
-
import { GlobalStateContext } from '../types';
|
|
4
|
-
export declare function integrateEmulator(context: GlobalStateContext, options: LoadPiletsOptions, debug?: DebuggerExtensionOptions): void;
|
package/esm/tools/emulator.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { installPiletEmulator } from 'piral-debug-utils';
|
|
2
|
-
export function integrateEmulator(context, options, debug = {}) {
|
|
3
|
-
installPiletEmulator(options.fetchPilets, {
|
|
4
|
-
defaultFeedUrl: debug.defaultFeedUrl,
|
|
5
|
-
addPilet: context.addPilet,
|
|
6
|
-
removePilet: context.removePilet,
|
|
7
|
-
integrate(requester) {
|
|
8
|
-
options.fetchPilets = requester;
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=emulator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emulator.js","sourceRoot":"","sources":["../../src/tools/emulator.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAGnF,MAAM,UAAU,iBAAiB,CAAC,OAA2B,EAAE,OAA0B,EAAE,QAAkC,EAAE;IAC7H,oBAAoB,CAAC,OAAO,CAAC,WAAW,EAAE;QACxC,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,SAAS,CAAC,SAAS;YACjB,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;QAClC,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/esm/types/api.d.ts
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import type { RouteComponentProps } from 'react-router';
|
|
3
|
-
import type { PiletApi, Pilet, PiletEntry, PiletEntries, PiletMetadata, EventEmitter, PiletLoader, PiletLoadingStrategy } from 'piral-base';
|
|
4
|
-
import type { PiletCustomApi } from './custom';
|
|
5
|
-
import type { AnyComponent, PiralPageMeta } from './components';
|
|
6
|
-
import type { ExtensionParams, ExtensionSlotProps, PiralExtensionSlotMap } from './extension';
|
|
7
|
-
import type { SharedData, DataStoreOptions } from './data';
|
|
8
|
-
import type { Disposable } from './utils';
|
|
9
|
-
export { PiletApi, Pilet, PiletMetadata, EventEmitter, PiletEntry, PiletEntries, PiletLoader, PiletLoadingStrategy };
|
|
10
|
-
/**
|
|
11
|
-
* The props that every registered component obtains.
|
|
12
|
-
*/
|
|
13
|
-
export interface BaseComponentProps {
|
|
14
|
-
/**
|
|
15
|
-
* The currently used pilet API.
|
|
16
|
-
*/
|
|
17
|
-
piral: PiletApi;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The shape of an implicit unregister function.
|
|
21
|
-
*/
|
|
22
|
-
export interface RegistrationDisposer {
|
|
23
|
-
/**
|
|
24
|
-
* Cleans up the previous registration.
|
|
25
|
-
*/
|
|
26
|
-
(): void;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* The props of an extension component.
|
|
30
|
-
*/
|
|
31
|
-
export interface ExtensionComponentProps<T> extends BaseComponentProps {
|
|
32
|
-
/**
|
|
33
|
-
* The provided parameters for showing the extension.
|
|
34
|
-
*/
|
|
35
|
-
params: T extends keyof PiralExtensionSlotMap ? PiralExtensionSlotMap[T] : T extends string ? any : T;
|
|
36
|
-
/**
|
|
37
|
-
* The optional children to receive, if any.
|
|
38
|
-
*/
|
|
39
|
-
children?: ReactNode;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* The props that every registered page component obtains.
|
|
43
|
-
*/
|
|
44
|
-
export interface RouteBaseProps<UrlParams extends {
|
|
45
|
-
[K in keyof UrlParams]?: string;
|
|
46
|
-
} = {}, UrlState = any> extends RouteComponentProps<UrlParams, {}, UrlState>, BaseComponentProps {
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* The props used by a page component.
|
|
50
|
-
*/
|
|
51
|
-
export interface PageComponentProps<T extends {
|
|
52
|
-
[K in keyof T]?: string;
|
|
53
|
-
} = {}, S = any> extends RouteBaseProps<T, S> {
|
|
54
|
-
/**
|
|
55
|
-
* The meta data registered with the page.
|
|
56
|
-
*/
|
|
57
|
-
meta: PiralPageMeta;
|
|
58
|
-
/**
|
|
59
|
-
* The children of the page.
|
|
60
|
-
*/
|
|
61
|
-
children: ReactNode;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Shorthand for the definition of an extension component.
|
|
65
|
-
*/
|
|
66
|
-
export type AnyExtensionComponent<TName> = TName extends keyof PiralExtensionSlotMap ? AnyComponent<ExtensionComponentProps<TName>> : TName extends string ? AnyComponent<ExtensionComponentProps<any>> : AnyComponent<ExtensionComponentProps<TName>>;
|
|
67
|
-
/**
|
|
68
|
-
* Defines the Pilet API from piral-core.
|
|
69
|
-
* This interface will be consumed by pilet developers so that their pilet can interact with the piral instance.
|
|
70
|
-
*/
|
|
71
|
-
export interface PiletCoreApi {
|
|
72
|
-
/**
|
|
73
|
-
* Gets a shared data value.
|
|
74
|
-
* @param name The name of the data to retrieve.
|
|
75
|
-
*/
|
|
76
|
-
getData<TKey extends string>(name: TKey): SharedData[TKey];
|
|
77
|
-
/**
|
|
78
|
-
* Sets the data using a given name. The name needs to be used exclusively by the current pilet.
|
|
79
|
-
* Using the name occupied by another pilet will result in no change.
|
|
80
|
-
* @param name The name of the data to store.
|
|
81
|
-
* @param value The value of the data to store.
|
|
82
|
-
* @param options The optional configuration for storing this piece of data.
|
|
83
|
-
* @returns True if the data could be set, otherwise false.
|
|
84
|
-
*/
|
|
85
|
-
setData<TKey extends string>(name: TKey, value: SharedData[TKey], options?: DataStoreOptions): boolean;
|
|
86
|
-
/**
|
|
87
|
-
* Registers a route for predefined page component.
|
|
88
|
-
* The route needs to be unique and can contain params.
|
|
89
|
-
* Params are following the path-to-regexp notation, e.g., :id for an id parameter.
|
|
90
|
-
* @param route The route to register.
|
|
91
|
-
* @param Component The component to render the page.
|
|
92
|
-
* @param meta The optional metadata to use.
|
|
93
|
-
*/
|
|
94
|
-
registerPage(route: string, Component: AnyComponent<PageComponentProps>, meta?: PiralPageMeta): RegistrationDisposer;
|
|
95
|
-
/**
|
|
96
|
-
* Unregisters the page identified by the given route.
|
|
97
|
-
* @param route The route that was previously registered.
|
|
98
|
-
*/
|
|
99
|
-
unregisterPage(route: string): void;
|
|
100
|
-
/**
|
|
101
|
-
* Registers an extension component with a predefined extension component.
|
|
102
|
-
* The name must refer to the extension slot.
|
|
103
|
-
* @param name The global name of the extension slot.
|
|
104
|
-
* @param Component The component to be rendered.
|
|
105
|
-
* @param defaults Optionally, sets the default values for the expected data.
|
|
106
|
-
*/
|
|
107
|
-
registerExtension<TName>(name: TName extends string ? TName : string, Component: AnyExtensionComponent<TName>, defaults?: Partial<ExtensionParams<TName>>): RegistrationDisposer;
|
|
108
|
-
/**
|
|
109
|
-
* Unregisters a global extension component.
|
|
110
|
-
* Only previously registered extension components can be unregistered.
|
|
111
|
-
* @param name The name of the extension slot to unregister from.
|
|
112
|
-
* @param Component The registered extension component to unregister.
|
|
113
|
-
*/
|
|
114
|
-
unregisterExtension<TName>(name: TName extends string ? TName : string, Component: AnyExtensionComponent<TName>): void;
|
|
115
|
-
/**
|
|
116
|
-
* React component for displaying extensions for a given name.
|
|
117
|
-
* @param props The extension's rendering props.
|
|
118
|
-
* @return The created React element.
|
|
119
|
-
*/
|
|
120
|
-
Extension<TName>(props: ExtensionSlotProps<TName>): ReactElement | null;
|
|
121
|
-
/**
|
|
122
|
-
* Renders an extension in a plain DOM component.
|
|
123
|
-
* @param element The DOM element or shadow root as a container for rendering the extension.
|
|
124
|
-
* @param props The extension's rendering props.
|
|
125
|
-
* @return The disposer to clear the extension.
|
|
126
|
-
*/
|
|
127
|
-
renderHtmlExtension<TName>(element: HTMLElement | ShadowRoot, props: ExtensionSlotProps<TName>): Disposable;
|
|
128
|
-
}
|
|
129
|
-
declare module 'piral-base/lib/types/runtime' {
|
|
130
|
-
interface PiletApi extends PiletCustomApi, PiletCoreApi {
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Represents the dictionary of the loaded pilets and their APIs.
|
|
135
|
-
*/
|
|
136
|
-
export interface PiletsBag {
|
|
137
|
-
/**
|
|
138
|
-
* Gets the API of the respective pilet name.
|
|
139
|
-
*/
|
|
140
|
-
[name: string]: PiletApi;
|
|
141
|
-
}
|
package/esm/types/api.js
DELETED
package/esm/types/api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":""}
|
package/esm/types/common.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type ValuesOf<T> = T extends {
|
|
2
|
-
[_ in keyof T]: infer U;
|
|
3
|
-
} ? U : never;
|
|
4
|
-
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
5
|
-
export type RemainingArgs<T> = T extends (_: any, ...args: infer U) => any ? U : never;
|
|
6
|
-
export type DeepPartial<T> = {
|
|
7
|
-
[P in keyof T]?: T[P] extends Array<infer U> ? Array<DeepPartial<U>> : T[P] extends {} ? DeepPartial<T[P]> : T[P];
|
|
8
|
-
};
|
|
9
|
-
export type NestedPartial<T> = {
|
|
10
|
-
[P in keyof T]?: T[P] extends Array<infer U> ? Array<Partial<U>> : T[P] extends {} ? Partial<T[P]> : T[P];
|
|
11
|
-
};
|
|
12
|
-
export type Dict<T> = Record<string, T>;
|
|
13
|
-
export type Without<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
14
|
-
export type FirstParameter<T extends (arg: any) => any> = T extends (arg: infer P) => any ? P : never;
|
|
15
|
-
export type FirstParametersOf<T> = {
|
|
16
|
-
[K in keyof T]: T[K] extends (arg: any) => any ? FirstParameter<T[K]> : never;
|
|
17
|
-
}[keyof T];
|
|
18
|
-
export type UnionOf<T> = {
|
|
19
|
-
[K in keyof T]: T[K];
|
|
20
|
-
}[keyof T];
|
|
21
|
-
export type MaybeAsync<T> = T | (() => Promise<T>);
|
package/esm/types/common.js
DELETED
package/esm/types/common.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":""}
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
import type { ComponentType, ReactNode } from 'react';
|
|
2
|
-
import type { RouteComponentProps, SwitchProps } from 'react-router';
|
|
3
|
-
import type { FirstParametersOf, UnionOf } from './common';
|
|
4
|
-
import type { PiralCustomErrors, PiralCustomComponentConverters, PiralCustomPageMeta } from './custom';
|
|
5
|
-
import type { NavigationApi } from './navigation';
|
|
6
|
-
import type { LayoutType } from './layout';
|
|
7
|
-
/**
|
|
8
|
-
* Mapping of available component converters.
|
|
9
|
-
*/
|
|
10
|
-
export interface ComponentConverters<TProps> extends PiralCustomComponentConverters<TProps> {
|
|
11
|
-
/**
|
|
12
|
-
* Converts the HTML component to a framework-independent component.
|
|
13
|
-
* @param component The vanilla JavaScript component to be converted.
|
|
14
|
-
*/
|
|
15
|
-
html(component: HtmlComponent<TProps>): ForeignComponent<TProps>;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Definition of a vanilla JavaScript component.
|
|
19
|
-
*/
|
|
20
|
-
export interface HtmlComponent<TProps> {
|
|
21
|
-
/**
|
|
22
|
-
* Renders a component into the provided element using the given props and context.
|
|
23
|
-
*/
|
|
24
|
-
component: ForeignComponent<TProps>;
|
|
25
|
-
/**
|
|
26
|
-
* The type of the HTML component.
|
|
27
|
-
*/
|
|
28
|
-
type: 'html';
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* The context to be transported into the generic components.
|
|
32
|
-
*/
|
|
33
|
-
export interface ComponentContext {
|
|
34
|
-
/**
|
|
35
|
-
* The router-independent navigation API.
|
|
36
|
-
*/
|
|
37
|
-
navigation: NavigationApi;
|
|
38
|
-
/**
|
|
39
|
-
* The internal router object.
|
|
40
|
-
* @deprecated Exposes internals that can change at any time.
|
|
41
|
-
*/
|
|
42
|
-
router: any;
|
|
43
|
-
/**
|
|
44
|
-
* The public path of the application.
|
|
45
|
-
*/
|
|
46
|
-
publicPath: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Generic definition of a framework-independent component.
|
|
50
|
-
*/
|
|
51
|
-
export interface ForeignComponent<TProps> {
|
|
52
|
-
/**
|
|
53
|
-
* Called when the component is mounted.
|
|
54
|
-
* @param element The container hosting the element.
|
|
55
|
-
* @param props The props to transport.
|
|
56
|
-
* @param ctx The associated context.
|
|
57
|
-
* @param locals The local state of this component instance.
|
|
58
|
-
*/
|
|
59
|
-
mount(element: HTMLElement, props: TProps, ctx: ComponentContext, locals: Record<string, any>): void;
|
|
60
|
-
/**
|
|
61
|
-
* Called when the component should be updated.
|
|
62
|
-
* @param element The container hosting the element.
|
|
63
|
-
* @param props The props to transport.
|
|
64
|
-
* @param ctx The associated context.
|
|
65
|
-
* @param locals The local state of this component instance.
|
|
66
|
-
*/
|
|
67
|
-
update?(element: HTMLElement, props: TProps, ctx: ComponentContext, locals: Record<string, any>): void;
|
|
68
|
-
/**
|
|
69
|
-
* Called when a component is unmounted.
|
|
70
|
-
* @param element The container that was hosting the element.
|
|
71
|
-
* @param locals The local state of this component instance.
|
|
72
|
-
*/
|
|
73
|
-
unmount?(element: HTMLElement, locals: Record<string, any>): void;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Possible shapes for a component.
|
|
77
|
-
*/
|
|
78
|
-
export type AnyComponent<T> = ComponentType<T> | FirstParametersOf<ComponentConverters<T>>;
|
|
79
|
-
/**
|
|
80
|
-
* The error used when a route cannot be resolved.
|
|
81
|
-
*/
|
|
82
|
-
export interface NotFoundErrorInfoProps extends RouteComponentProps {
|
|
83
|
-
/**
|
|
84
|
-
* The type of the error.
|
|
85
|
-
*/
|
|
86
|
-
type: 'not_found';
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* The error used when a registered page component crashes.
|
|
90
|
-
*/
|
|
91
|
-
export interface PageErrorInfoProps extends RouteComponentProps {
|
|
92
|
-
/**
|
|
93
|
-
* The type of the error.
|
|
94
|
-
*/
|
|
95
|
-
type: 'page';
|
|
96
|
-
/**
|
|
97
|
-
* The provided error details.
|
|
98
|
-
*/
|
|
99
|
-
error: any;
|
|
100
|
-
/**
|
|
101
|
-
* The name of the pilet emitting the error.
|
|
102
|
-
*/
|
|
103
|
-
pilet?: string;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* The error used when the app could not be loaded.
|
|
107
|
-
*/
|
|
108
|
-
export interface LoadingErrorInfoProps {
|
|
109
|
-
/**
|
|
110
|
-
* The type of the error.
|
|
111
|
-
*/
|
|
112
|
-
type: 'loading';
|
|
113
|
-
/**
|
|
114
|
-
* The provided error details.
|
|
115
|
-
*/
|
|
116
|
-
error: any;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* The error used when a registered extension component crashed.
|
|
120
|
-
*/
|
|
121
|
-
export interface ExtensionErrorInfoProps {
|
|
122
|
-
/**
|
|
123
|
-
* The type of the error.
|
|
124
|
-
*/
|
|
125
|
-
type: 'extension';
|
|
126
|
-
/**
|
|
127
|
-
* The provided error details.
|
|
128
|
-
*/
|
|
129
|
-
error: any;
|
|
130
|
-
/**
|
|
131
|
-
* The name of the pilet emitting the error.
|
|
132
|
-
*/
|
|
133
|
-
pilet?: string;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* The error used when the exact type is unknown.
|
|
137
|
-
*/
|
|
138
|
-
export interface UnknownErrorInfoProps {
|
|
139
|
-
/**
|
|
140
|
-
* The type of the error.
|
|
141
|
-
*/
|
|
142
|
-
type: 'unknown';
|
|
143
|
-
/**
|
|
144
|
-
* The provided error details.
|
|
145
|
-
*/
|
|
146
|
-
error: any;
|
|
147
|
-
/**
|
|
148
|
-
* The name of the pilet emitting the error.
|
|
149
|
-
*/
|
|
150
|
-
pilet?: string;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Map of all error types to their respective props.
|
|
154
|
-
*/
|
|
155
|
-
export interface Errors extends PiralCustomErrors {
|
|
156
|
-
/**
|
|
157
|
-
* The props type for an extension error.
|
|
158
|
-
*/
|
|
159
|
-
extension: ExtensionErrorInfoProps;
|
|
160
|
-
/**
|
|
161
|
-
* The props type for a loading error.
|
|
162
|
-
*/
|
|
163
|
-
loading: LoadingErrorInfoProps;
|
|
164
|
-
/**
|
|
165
|
-
* The props type for a page error.
|
|
166
|
-
*/
|
|
167
|
-
page: PageErrorInfoProps;
|
|
168
|
-
/**
|
|
169
|
-
* The props type for a not found error.
|
|
170
|
-
*/
|
|
171
|
-
not_found: NotFoundErrorInfoProps;
|
|
172
|
-
/**
|
|
173
|
-
* The props type for an unknown error.
|
|
174
|
-
*/
|
|
175
|
-
unknown: UnknownErrorInfoProps;
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* The props for the ErrorInfo component.
|
|
179
|
-
*/
|
|
180
|
-
export type ErrorInfoProps = UnionOf<Errors>;
|
|
181
|
-
/**
|
|
182
|
-
* The props of a Loading indicator component.
|
|
183
|
-
*/
|
|
184
|
-
export interface LoadingIndicatorProps {
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* The props of a Layout component.
|
|
188
|
-
*/
|
|
189
|
-
export interface LayoutProps {
|
|
190
|
-
/**
|
|
191
|
-
* The currently selected layout type.
|
|
192
|
-
*/
|
|
193
|
-
currentLayout: LayoutType;
|
|
194
|
-
/**
|
|
195
|
-
* The page's content.
|
|
196
|
-
*/
|
|
197
|
-
children: ReactNode;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* The props of a Router component.
|
|
201
|
-
*/
|
|
202
|
-
export interface RouterProps {
|
|
203
|
-
/**
|
|
204
|
-
* The content to be rendered inside the router.
|
|
205
|
-
*/
|
|
206
|
-
children?: ReactNode;
|
|
207
|
-
/**
|
|
208
|
-
* The public path to use.
|
|
209
|
-
*/
|
|
210
|
-
publicPath: string;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* The meta data registered for a page.
|
|
214
|
-
*/
|
|
215
|
-
export interface PiralPageMeta extends PiralCustomPageMeta {
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Represents a path in the app registration.
|
|
219
|
-
*/
|
|
220
|
-
export interface AppPath {
|
|
221
|
-
/**
|
|
222
|
-
* The exact path to use.
|
|
223
|
-
*/
|
|
224
|
-
path: string;
|
|
225
|
-
/**
|
|
226
|
-
* The associated route matcher.
|
|
227
|
-
*/
|
|
228
|
-
matcher: RegExp;
|
|
229
|
-
/**
|
|
230
|
-
* The page metadata.
|
|
231
|
-
*/
|
|
232
|
-
meta: PiralPageMeta;
|
|
233
|
-
/**
|
|
234
|
-
* The component to register for this path.
|
|
235
|
-
*/
|
|
236
|
-
Component: ComponentType<RouteComponentProps>;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* The props of the RouteSwitch component.
|
|
240
|
-
*/
|
|
241
|
-
export interface RouteSwitchProps extends SwitchProps {
|
|
242
|
-
/**
|
|
243
|
-
* The component that should be used in case nothing was found.
|
|
244
|
-
*/
|
|
245
|
-
NotFound: ComponentType<RouteComponentProps>;
|
|
246
|
-
/**
|
|
247
|
-
* The component to register for the different paths.
|
|
248
|
-
*/
|
|
249
|
-
paths: Array<AppPath>;
|
|
250
|
-
}
|
package/esm/types/components.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/types/components.ts"],"names":[],"mappings":""}
|
package/esm/types/config.d.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import type { PiletRequester, PiletLoadingStrategy, PiletLoader, Pilet, AvailableDependencies, CustomSpecLoaders, DefaultLoaderConfig, PiletApiCreator } from 'piral-base';
|
|
2
|
-
import { DebuggerExtensionOptions } from 'piral-debug-utils';
|
|
3
|
-
import type { NestedPartial } from './common';
|
|
4
|
-
import type { PiralPlugin } from './plugin';
|
|
5
|
-
import type { GlobalState, GlobalStateContext, PiralDefineActions } from './state';
|
|
6
|
-
export { PiletLoadingStrategy, PiletRequester, AvailableDependencies };
|
|
7
|
-
/**
|
|
8
|
-
* Definition for customizing the shared dependencies.
|
|
9
|
-
*/
|
|
10
|
-
export interface DependencySelector {
|
|
11
|
-
/**
|
|
12
|
-
* Selects the dependencies to share from the currently available dependencies.
|
|
13
|
-
* @param currentDependencies The currently available dependencies.
|
|
14
|
-
* @default currentDependencies All current dependencies are shared
|
|
15
|
-
* @returns The dependencies selected to be shared.
|
|
16
|
-
*/
|
|
17
|
-
(currentDependencies: AvailableDependencies): AvailableDependencies;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The configuration for loading the pilets of the Piral instance.
|
|
21
|
-
*/
|
|
22
|
-
export interface PiralPiletConfiguration {
|
|
23
|
-
/**
|
|
24
|
-
* Function to load the modules asynchronously, e.g., from a server 🚚.
|
|
25
|
-
*/
|
|
26
|
-
requestPilets?: PiletRequester;
|
|
27
|
-
/**
|
|
28
|
-
* Function to define how to load a pilet given its metadata.
|
|
29
|
-
*/
|
|
30
|
-
loadPilet?: PiletLoader;
|
|
31
|
-
/**
|
|
32
|
-
* Optionally, defines loaders for custom specifications.
|
|
33
|
-
*/
|
|
34
|
-
loaders?: CustomSpecLoaders;
|
|
35
|
-
/**
|
|
36
|
-
* Optionally, configures the default loader.
|
|
37
|
-
*/
|
|
38
|
-
loaderConfig?: DefaultLoaderConfig;
|
|
39
|
-
/**
|
|
40
|
-
* Optionally, configures explicitly what dependencies are shared.
|
|
41
|
-
*/
|
|
42
|
-
shareDependencies?: DependencySelector;
|
|
43
|
-
/**
|
|
44
|
-
* Determines that pilets are loaded asynchronously, essentially showing the
|
|
45
|
-
* app right away without waiting for the pilets to load and evaluate.
|
|
46
|
-
*/
|
|
47
|
-
async?: boolean | PiletLoadingStrategy;
|
|
48
|
-
/**
|
|
49
|
-
* Determines the modules, which are available already from the start 🚀.
|
|
50
|
-
* The given modules are all already evaluated.
|
|
51
|
-
* This can be used for customization or for debugging purposes.
|
|
52
|
-
*/
|
|
53
|
-
availablePilets?: Array<Pilet>;
|
|
54
|
-
/**
|
|
55
|
-
* Extends the Piral instance with additional capabilities.
|
|
56
|
-
*/
|
|
57
|
-
plugins?: PiralPlugin | Array<PiralPlugin>;
|
|
58
|
-
/**
|
|
59
|
-
* Optionally overrides the API factory. By default the `defaultApiFactory`
|
|
60
|
-
* function is used.
|
|
61
|
-
*/
|
|
62
|
-
apiFactory?: PiletApiFactory;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Defines an API creation factory.
|
|
66
|
-
*/
|
|
67
|
-
export interface PiletApiFactory {
|
|
68
|
-
/**
|
|
69
|
-
* @param context The global state context.
|
|
70
|
-
* @param apis The different APIs to consider.
|
|
71
|
-
*/
|
|
72
|
-
(context: GlobalStateContext, apis: Array<PiralPlugin>): PiletApiCreator;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* The initial configuration of Piral's state container.
|
|
76
|
-
*/
|
|
77
|
-
export interface PiralStateConfiguration {
|
|
78
|
-
/**
|
|
79
|
-
* Optionally, sets up the initial state of the application 📦.
|
|
80
|
-
*/
|
|
81
|
-
state?: NestedPartial<GlobalState>;
|
|
82
|
-
/**
|
|
83
|
-
* Optionally, sets up some initial custom actions ⚡️.
|
|
84
|
-
*/
|
|
85
|
-
actions?: PiralDefineActions;
|
|
86
|
-
/**
|
|
87
|
-
* Optionally, sets up additional configuration for the debug tooling 🤖.
|
|
88
|
-
*/
|
|
89
|
-
debug?: DebuggerExtensionOptions;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* The configuration to be used in the Piral instance.
|
|
93
|
-
*/
|
|
94
|
-
export type PiralConfiguration = PiralPiletConfiguration & PiralStateConfiguration;
|
package/esm/types/config.js
DELETED
package/esm/types/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":""}
|
package/esm/types/custom.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom Pilet API parts defined outside of piral-core.
|
|
3
|
-
*/
|
|
4
|
-
export interface PiletCustomApi {
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Custom meta data to include for pages.
|
|
8
|
-
*/
|
|
9
|
-
export interface PiralCustomPageMeta {
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Custom state extensions defined outside of piral-core.
|
|
13
|
-
*/
|
|
14
|
-
export interface PiralCustomState {
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Custom errors defined outside of piral-core.
|
|
18
|
-
*/
|
|
19
|
-
export interface PiralCustomErrors {
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Custom actions defined outside of piral-core.
|
|
23
|
-
*/
|
|
24
|
-
export interface PiralCustomActions {
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Custom events defined outside of piral-core.
|
|
28
|
-
*/
|
|
29
|
-
export interface PiralCustomEventMap {
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Custom extension slots outside of piral-core.
|
|
33
|
-
*/
|
|
34
|
-
export interface PiralCustomExtensionSlotMap {
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Custom parts of the global registry state defined outside of piral-core.
|
|
38
|
-
*/
|
|
39
|
-
export interface PiralCustomRegistryState {
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Custom component converters defined outside of piral-core.
|
|
43
|
-
*/
|
|
44
|
-
export interface PiralCustomComponentConverters<TProps> {
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Custom parts of the global custom component state defined outside of piral-core.
|
|
48
|
-
*/
|
|
49
|
-
export interface PiralCustomComponentsState {
|
|
50
|
-
}
|
package/esm/types/custom.js
DELETED
package/esm/types/custom.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom.js","sourceRoot":"","sources":["../../src/types/custom.ts"],"names":[],"mappings":""}
|
package/esm/types/data.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Defines the shape of the data store for storing shared data.
|
|
3
|
-
*/
|
|
4
|
-
export interface SharedData<TValue = any> {
|
|
5
|
-
/**
|
|
6
|
-
* Access a shared value by its name.
|
|
7
|
-
*/
|
|
8
|
-
readonly [key: string]: TValue;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Defines the potential targets when storing data.
|
|
12
|
-
*/
|
|
13
|
-
export type DataStoreTarget = 'memory' | 'local' | 'remote';
|
|
14
|
-
/**
|
|
15
|
-
* Defines the custom options for storing data.
|
|
16
|
-
*/
|
|
17
|
-
export interface CustomDataStoreOptions {
|
|
18
|
-
/**
|
|
19
|
-
* The target data store. By default the data is only stored in memory.
|
|
20
|
-
*/
|
|
21
|
-
target?: DataStoreTarget;
|
|
22
|
-
/**
|
|
23
|
-
* Optionally determines when the data expires.
|
|
24
|
-
*/
|
|
25
|
-
expires?: 'never' | Date | number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Defines the options to be used for storing data.
|
|
29
|
-
*/
|
|
30
|
-
export type DataStoreOptions = DataStoreTarget | CustomDataStoreOptions;
|
|
31
|
-
/**
|
|
32
|
-
* Defines the shape of a shared data item.
|
|
33
|
-
*/
|
|
34
|
-
export interface SharedDataItem<TValue = any> {
|
|
35
|
-
/**
|
|
36
|
-
* Gets the associated value.
|
|
37
|
-
*/
|
|
38
|
-
value: TValue;
|
|
39
|
-
/**
|
|
40
|
-
* Gets the owner of the item.
|
|
41
|
-
*/
|
|
42
|
-
owner: string;
|
|
43
|
-
/**
|
|
44
|
-
* Gets the storage location.
|
|
45
|
-
*/
|
|
46
|
-
target: DataStoreTarget;
|
|
47
|
-
/**
|
|
48
|
-
* Gets the expiration of the item.
|
|
49
|
-
*/
|
|
50
|
-
expires: number;
|
|
51
|
-
}
|
package/esm/types/data.js
DELETED
package/esm/types/data.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/types/data.ts"],"names":[],"mappings":""}
|