tungsten 0.6.2 → 0.7.0
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/dist/.build-complete +1 -1
- package/dist/Brands.d.ts +16 -0
- package/dist/Brands.d.ts.map +1 -0
- package/dist/Brands.js +22 -0
- package/dist/Components.d.ts +4 -1
- package/dist/Components.d.ts.map +1 -1
- package/dist/Components.js +24 -6
- package/dist/ContentNode.d.ts +3 -2
- package/dist/ContentNode.d.ts.map +1 -1
- package/dist/ContentNode.js +11 -0
- package/dist/Framework.d.ts.map +1 -1
- package/dist/Framework.js +23 -4
- package/dist/FrameworkConfig.d.ts +7 -1
- package/dist/FrameworkConfig.d.ts.map +1 -1
- package/dist/FunctionComponent.d.ts +1 -0
- package/dist/FunctionComponent.d.ts.map +1 -1
- package/dist/FunctionComponentStandIn.d.ts.map +1 -1
- package/dist/Instance/Instance.d.ts +29 -12
- package/dist/Instance/Instance.d.ts.map +1 -1
- package/dist/Instance/Instance.js +59 -21
- package/dist/Instance/InstanceConfig.d.ts +2 -1
- package/dist/Instance/InstanceConfig.d.ts.map +1 -1
- package/dist/RenderedContentNode.d.ts.map +1 -1
- package/dist/RenderingNode.d.ts.map +1 -1
- package/dist/Servers/DevServer.d.ts +4 -2
- package/dist/Servers/DevServer.d.ts.map +1 -1
- package/dist/Servers/DevServer.js +62 -20
- package/dist/Servers/ProdServer.d.ts +4 -2
- package/dist/Servers/ProdServer.d.ts.map +1 -1
- package/dist/Servers/ProdServer.js +77 -18
- package/dist/Servers/StaticSiteServer.d.ts +1 -1
- package/dist/Servers/StaticSiteServer.d.ts.map +1 -1
- package/dist/Servers/TungstenServer.d.ts +2 -1
- package/dist/Servers/TungstenServer.d.ts.map +1 -1
- package/dist/Servers/TungstenServer.js +7 -0
- package/dist/Servers/cacheVersioned.d.ts +3 -0
- package/dist/Servers/cacheVersioned.d.ts.map +1 -0
- package/dist/Servers/cacheVersioned.js +23 -0
- package/dist/Servers/devErrorPageAutoRetry.d.ts.map +1 -1
- package/dist/Servers/devErrorPageAutoRetry.js +1 -0
- package/dist/Servers/initStores.d.ts +4 -4
- package/dist/Servers/initStores.d.ts.map +1 -1
- package/dist/Servers/initStores.js +2 -2
- package/dist/Servers/loadEnvsDev.d.ts.map +1 -1
- package/dist/Servers/loadEnvsDev.js +7 -6
- package/dist/Servers/resetRegistrations.d.ts +2 -0
- package/dist/Servers/resetRegistrations.d.ts.map +1 -0
- package/dist/Servers/resetRegistrations.js +13 -0
- package/dist/Servers/routing.d.ts +3 -2
- package/dist/Servers/routing.d.ts.map +1 -1
- package/dist/Servers/routing.js +3 -2
- package/dist/Store/InternalStoreSchema.d.ts +1 -1
- package/dist/Store/Store.js +2 -1
- package/dist/Store/StoreSchemaClass.d.ts +6 -3
- package/dist/Store/StoreSchemaClass.d.ts.map +1 -1
- package/dist/Store/StoreSchemaClass.js +8 -1
- package/dist/Store/TypeSafeStore.js +2 -1
- package/dist/Store/createStores.d.ts +3 -3
- package/dist/Store/createStores.d.ts.map +1 -1
- package/dist/Store/createStores.js +7 -2
- package/dist/Store/getInternalStore.d.ts.map +1 -1
- package/dist/Store/registerStore.d.ts.map +1 -1
- package/dist/Store/registerStore.js +2 -2
- package/dist/Store/storeCreators.d.ts +2 -2
- package/dist/Store/storeCreators.d.ts.map +1 -1
- package/dist/TungstenApp.d.ts +3 -3
- package/dist/TungstenApp.d.ts.map +1 -1
- package/dist/_client/cjsHelpers.d.ts.map +1 -1
- package/dist/_client/cjsHelpers.js +5 -3
- package/dist/_client/client.d.ts +2 -0
- package/dist/_client/client.d.ts.map +1 -1
- package/dist/_client/client.js +10 -3
- package/dist/api/getApiRoutes.d.ts.map +1 -1
- package/dist/api/getExport.d.ts +1 -1
- package/dist/api/getExport.d.ts.map +1 -1
- package/dist/api/getExport.js +2 -1
- package/dist/api/getExportDev.d.ts +1 -1
- package/dist/api/getExportDev.d.ts.map +1 -1
- package/dist/appBuilder.d.ts +69 -0
- package/dist/appBuilder.d.ts.map +1 -0
- package/dist/appBuilder.js +98 -0
- package/dist/appBuilder.types.test.d.ts +110 -0
- package/dist/appBuilder.types.test.d.ts.map +1 -0
- package/dist/appBuilder.types.test.js +240 -0
- package/dist/babelPlugins/BabelTransformBindDirect.js +7 -7
- package/dist/babelPlugins/BabelTransformBindVar.js +7 -7
- package/dist/babelPlugins/BabelTransformComponentState.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformComponentStyles.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformComponentStyles.js +5 -5
- package/dist/babelPlugins/BabelTransformCssImports.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformCssImports.js +2 -2
- package/dist/babelPlugins/BabelTransformDeproxyState.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformPackageImports.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformPackageImports.js +11 -6
- package/dist/babelPlugins/BabelTransformRemoveDevBlocks.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformRemoveServerBlocks.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTypes.d.ts.map +1 -1
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.d.ts.map +1 -1
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.js +1 -1
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.d.ts.map +1 -1
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.js +2 -2
- package/dist/bin/commands/compile.d.ts.map +1 -1
- package/dist/bin/commands/compile.js +2 -1
- package/dist/build/CompilationInfo.d.ts +3 -0
- package/dist/build/CompilationInfo.d.ts.map +1 -1
- package/dist/build/assetVersions.d.ts +9 -0
- package/dist/build/assetVersions.d.ts.map +1 -0
- package/dist/build/assetVersions.js +39 -0
- package/dist/build/babel.user.common.config.d.ts.map +1 -1
- package/dist/build/bundle.d.ts.map +1 -1
- package/dist/build/bundle.js +2 -1
- package/dist/build/bundleBabelOptions.d.ts.map +1 -1
- package/dist/build/clientRoutesFile.d.ts +2 -0
- package/dist/build/clientRoutesFile.d.ts.map +1 -0
- package/dist/build/clientRoutesFile.js +13 -0
- package/dist/build/compileJavascript.d.ts.map +1 -1
- package/dist/build/compileJavascript.js +4 -3
- package/dist/build/compileStyles.d.ts +2 -1
- package/dist/build/compileStyles.d.ts.map +1 -1
- package/dist/build/compileStyles.js +38 -83
- package/dist/build/compileUserApp.d.ts.map +1 -1
- package/dist/build/componentStylesCache.d.ts.map +1 -1
- package/dist/build/componentStylesCache.js +3 -2
- package/dist/build/copyAssets.d.ts.map +1 -1
- package/dist/build/copyAssets.js +2 -1
- package/dist/build/copyPackageModulesToPackagesFolder.d.ts.map +1 -1
- package/dist/build/copyPackageModulesToPackagesFolder.js +1 -1
- package/dist/build/copyPublicFiles.d.ts.map +1 -1
- package/dist/build/copyPublicFiles.js +2 -1
- package/dist/build/createClientFiles.d.ts.map +1 -1
- package/dist/build/createClientFiles.js +9 -5
- package/dist/build/createInstanceConfigFile.d.ts +1 -1
- package/dist/build/createInstanceConfigFile.d.ts.map +1 -1
- package/dist/build/createInstanceConfigFile.js +9 -3
- package/dist/build/frameworkDestLocation.d.ts.map +1 -1
- package/dist/build/frameworkDestLocation.js +5 -6
- package/dist/build/frameworkStylesheets.d.ts.map +1 -1
- package/dist/build/frameworkStylesheets.js +1 -1
- package/dist/build/makeBabelRawConfig.d.ts.map +1 -1
- package/dist/build/makeBabelUserDevConfig.d.ts +2 -2
- package/dist/build/makeBabelUserDevConfig.d.ts.map +1 -1
- package/dist/build/makeBabelUserProdConfig.d.ts.map +1 -1
- package/dist/build/rollup.user.prod.config.d.ts.map +1 -1
- package/dist/build/rollup.user.prod.config.js +5 -3
- package/dist/build/rollupProdConstants.d.ts +5 -0
- package/dist/build/rollupProdConstants.d.ts.map +1 -0
- package/dist/build/rollupProdConstants.js +21 -0
- package/dist/cacheControl.d.ts +13 -0
- package/dist/cacheControl.d.ts.map +1 -0
- package/dist/cacheControl.js +22 -0
- package/dist/compat/types.d.ts +1 -1
- package/dist/compat/types.d.ts.map +1 -1
- package/dist/componentHelpers.d.ts +18 -0
- package/dist/componentHelpers.d.ts.map +1 -0
- package/dist/componentHelpers.js +28 -0
- package/dist/componentProxyHandlers.d.ts.map +1 -1
- package/dist/components/Fragment.d.ts +8 -0
- package/dist/components/Fragment.d.ts.map +1 -0
- package/dist/components/Fragment.js +10 -0
- package/dist/components/Link.d.ts +4 -3
- package/dist/components/Link.d.ts.map +1 -1
- package/dist/components/Link.js +1 -0
- package/dist/components/NoEscape.d.ts +8 -0
- package/dist/components/NoEscape.d.ts.map +1 -0
- package/dist/components/NoEscape.js +6 -0
- package/dist/components/RouteRedirectComponent.d.ts.map +1 -1
- package/dist/components/RouteRedirectComponent.js +1 -1
- package/dist/components/WebRedirectComponent.d.ts.map +1 -1
- package/dist/components/WebRedirectComponent.js +1 -1
- package/dist/components/bindable/BindVariable.d.ts +1 -0
- package/dist/components/bindable/BindVariable.d.ts.map +1 -1
- package/dist/components/bindable/BindableCheckbox.d.ts +7 -7
- package/dist/components/bindable/BindableCheckbox.d.ts.map +1 -1
- package/dist/components/bindable/BindableInput.d.ts +7 -7
- package/dist/components/bindable/BindableInput.d.ts.map +1 -1
- package/dist/components/bindable/BindableInputNonString.d.ts +2 -2
- package/dist/components/bindable/BindableInputNonString.d.ts.map +1 -1
- package/dist/components/bindable/BindableInputString.d.ts +2 -2
- package/dist/components/bindable/BindableInputString.d.ts.map +1 -1
- package/dist/components/bindable/BindableInputTyped.d.ts +3 -3
- package/dist/components/bindable/BindableInputTyped.d.ts.map +1 -1
- package/dist/components/bindable/BindableInputTypedLegacy.d.ts +3 -3
- package/dist/components/bindable/BindableInputTypedLegacy.d.ts.map +1 -1
- package/dist/components/bindable/BindableRadio.js +2 -2
- package/dist/components/bindable/BindableSelect.d.ts +13 -10
- package/dist/components/bindable/BindableSelect.d.ts.map +1 -1
- package/dist/components/bindable/BindableSelectNaive.js +3 -3
- package/dist/components/bindable/BindableTextarea.d.ts +7 -7
- package/dist/components/bindable/BindableTextarea.d.ts.map +1 -1
- package/dist/components/bindable/bindableCandidates.comparison.d.ts +136 -0
- package/dist/components/bindable/bindableCandidates.comparison.d.ts.map +1 -0
- package/dist/components/bindable/bindableCandidates.comparison.js +268 -0
- package/dist/components/bindable/bindableProps.types.test.d.ts +50 -0
- package/dist/components/bindable/bindableProps.types.test.d.ts.map +1 -0
- package/dist/components/bindable/bindableProps.types.test.js +252 -0
- package/dist/components/library/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/components/library/RichTextEditor/contentTree.d.ts.map +1 -1
- package/dist/components/makeTypedLink.d.ts +9 -0
- package/dist/components/makeTypedLink.d.ts.map +1 -0
- package/dist/components/makeTypedLink.js +15 -0
- package/dist/context/registerContext.d.ts +22 -0
- package/dist/context/registerContext.d.ts.map +1 -0
- package/dist/context/registerContext.js +18 -0
- package/dist/env/getEnvSchemas.d.ts.map +1 -1
- package/dist/env/getEnvSchemas.js +2 -1
- package/dist/fileVersions.d.ts +9 -0
- package/dist/fileVersions.d.ts.map +1 -0
- package/dist/fileVersions.js +28 -0
- package/dist/findUserConfig.d.ts +1 -1
- package/dist/findUserConfig.d.ts.map +1 -1
- package/dist/findUserConfig.js +2 -1
- package/dist/frameworkConfigSchema.d.ts +14 -2
- package/dist/frameworkConfigSchema.d.ts.map +1 -1
- package/dist/frameworkConfigSchema.js +11 -2
- package/dist/getComponent.d.ts.map +1 -1
- package/dist/getComponent.js +4 -3
- package/dist/getRoutes.d.ts.map +1 -1
- package/dist/getRoutes.js +9 -8
- package/dist/hmr/applyHmrModule.d.ts.map +1 -1
- package/dist/hmr/componentIdentity.js +1 -1
- package/dist/hooks/getCurrentComponent.d.ts +1 -1
- package/dist/hooks/getCurrentComponent.d.ts.map +1 -1
- package/dist/hydrate/hydrate.d.ts +5 -1
- package/dist/hydrate/hydrate.d.ts.map +1 -1
- package/dist/hydrate/hydrate.js +59 -46
- package/dist/hydrate/hydrateGlobalData.d.ts +4 -3
- package/dist/hydrate/hydrateGlobalData.d.ts.map +1 -1
- package/dist/hydrate/reconcileHydratedAttributes.d.ts +2 -1
- package/dist/hydrate/reconcileHydratedAttributes.d.ts.map +1 -1
- package/dist/hydrate/reconcileHydratedAttributes.js +4 -3
- package/dist/hydrate/renderHydrationMismatchBanner.d.ts.map +1 -1
- package/dist/hydrate/renderHydrationMismatchBanner.js +2 -1
- package/dist/importDevModuleWithRetry.d.ts +2 -1
- package/dist/importDevModuleWithRetry.d.ts.map +1 -1
- package/dist/importDevModuleWithRetry.js +2 -1
- package/dist/importModule.d.ts +3 -0
- package/dist/importModule.d.ts.map +1 -0
- package/dist/importModule.js +4 -0
- package/dist/index.js +2 -1
- package/dist/indexInner.d.ts +30 -7
- package/dist/indexInner.d.ts.map +1 -1
- package/dist/indexInner.js +37 -2
- package/dist/json.d.ts +12 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +8 -0
- package/dist/jsxHelpers.d.ts +3 -0
- package/dist/jsxHelpers.d.ts.map +1 -0
- package/dist/jsxHelpers.js +6 -0
- package/dist/jsxRuntime.d.ts +1 -0
- package/dist/jsxRuntime.d.ts.map +1 -1
- package/dist/jsxRuntime.js +3 -1
- package/dist/jsxRuntimeSignals.d.ts.map +1 -1
- package/dist/jsxRuntimeSignals.js +1 -0
- package/dist/makeInstanceConfigFromFrameworkConfig.d.ts.map +1 -1
- package/dist/makeInstanceConfigFromFrameworkConfig.js +1 -0
- package/dist/mergeConfigs.d.ts.map +1 -1
- package/dist/mergeConfigs.js +2 -6
- package/dist/nbsp.d.ts +1 -2
- package/dist/nbsp.d.ts.map +1 -1
- package/dist/nbsp.js +3 -7
- package/dist/objectMap.d.ts +1 -1
- package/dist/objectMap.d.ts.map +1 -1
- package/dist/pipeline/PipelineRequestHandler.d.ts +25 -0
- package/dist/pipeline/PipelineRequestHandler.d.ts.map +1 -0
- package/dist/pipeline/PipelineRequestHandler.js +96 -0
- package/dist/pipeline/contextStore.d.ts +12 -0
- package/dist/pipeline/contextStore.d.ts.map +1 -0
- package/dist/pipeline/contextStore.js +13 -0
- package/dist/pipeline/hydratePipeline.d.ts +4 -0
- package/dist/pipeline/hydratePipeline.d.ts.map +1 -0
- package/dist/pipeline/hydratePipeline.js +64 -0
- package/dist/pipeline/importRoutesModule.d.ts +6 -0
- package/dist/pipeline/importRoutesModule.d.ts.map +1 -0
- package/dist/pipeline/importRoutesModule.js +33 -0
- package/dist/pipeline/networkedTransport.d.ts +11 -0
- package/dist/pipeline/networkedTransport.d.ts.map +1 -0
- package/dist/pipeline/networkedTransport.js +54 -0
- package/dist/pipeline/pipeline.d.ts +105 -0
- package/dist/pipeline/pipeline.d.ts.map +1 -0
- package/dist/pipeline/pipeline.js +108 -0
- package/dist/pipeline/pipeline.types.test.d.ts +650 -0
- package/dist/pipeline/pipeline.types.test.d.ts.map +1 -0
- package/dist/pipeline/pipeline.types.test.js +342 -0
- package/dist/pipeline/pipelineDefinition.d.ts +67 -0
- package/dist/pipeline/pipelineDefinition.d.ts.map +1 -0
- package/dist/pipeline/pipelineDefinition.js +11 -0
- package/dist/pipeline/pipelineSplit.types.test.d.ts +1971 -0
- package/dist/pipeline/pipelineSplit.types.test.d.ts.map +1 -0
- package/dist/pipeline/pipelineSplit.types.test.js +440 -0
- package/dist/pipeline/runPipeline.d.ts +31 -0
- package/dist/pipeline/runPipeline.d.ts.map +1 -0
- package/dist/pipeline/runPipeline.js +71 -0
- package/dist/pipeline/runSplitPipeline.d.ts +10 -0
- package/dist/pipeline/runSplitPipeline.d.ts.map +1 -0
- package/dist/pipeline/runSplitPipeline.js +48 -0
- package/dist/pipeline/splitPipeline.d.ts +62 -0
- package/dist/pipeline/splitPipeline.d.ts.map +1 -0
- package/dist/pipeline/splitPipeline.js +76 -0
- package/dist/pop.js +1 -1
- package/dist/rawHtml/filterContentNode.d.ts.map +1 -1
- package/dist/render/HeadData.d.ts +3 -1
- package/dist/render/HeadData.d.ts.map +1 -1
- package/dist/render/classComponentNodeToRenderingTree.d.ts.map +1 -1
- package/dist/render/componentNodeToRenderingTree.d.ts.map +1 -1
- package/dist/render/contentToHtml.d.ts +2 -2
- package/dist/render/contentToHtml.d.ts.map +1 -1
- package/dist/render/contentToHtml.js +2 -1
- package/dist/render/contentToHtmlDev.d.ts +1 -1
- package/dist/render/contentToHtmlDev.d.ts.map +1 -1
- package/dist/render/contentTreeToRenderingTree.d.ts.map +1 -1
- package/dist/render/contentTreeToRenderingTree.js +2 -1
- package/dist/render/functionComponentNodeToRenderingTree.d.ts.map +1 -1
- package/dist/render/functionComponentNodeToRenderingTree.js +2 -2
- package/dist/render/instantiateComponent.d.ts.map +1 -1
- package/dist/render/processHead.d.ts.map +1 -1
- package/dist/render/processHead.js +12 -18
- package/dist/render/renderingTreeToHtml.d.ts.map +1 -1
- package/dist/render/renderingTreeToHtml.js +6 -3
- package/dist/render/rootToHtml.d.ts +2 -2
- package/dist/render/rootToHtml.d.ts.map +1 -1
- package/dist/requests/fetch/delete.d.ts.map +1 -1
- package/dist/requests/fetch/delete.js +5 -2
- package/dist/requests/fetch/get.js +1 -1
- package/dist/requests/fetch/patch.d.ts.map +1 -1
- package/dist/requests/fetch/patch.js +5 -2
- package/dist/requests/fetch/post.d.ts.map +1 -1
- package/dist/requests/fetch/post.js +5 -2
- package/dist/requests/fetch/put.d.ts.map +1 -1
- package/dist/requests/fetch/put.js +5 -2
- package/dist/routesLocationParts.d.ts +6 -0
- package/dist/routesLocationParts.d.ts.map +1 -0
- package/dist/routesLocationParts.js +10 -0
- package/dist/routing/AppRoutes.d.ts +5 -3
- package/dist/routing/AppRoutes.d.ts.map +1 -1
- package/dist/routing/MatchedRouteInfo.d.ts +11 -0
- package/dist/routing/MatchedRouteInfo.d.ts.map +1 -0
- package/dist/routing/RouteContentFunction.d.ts +1 -2
- package/dist/routing/RouteContentFunction.d.ts.map +1 -1
- package/dist/routing/RouteDataFunction.type.d.ts +4 -2
- package/dist/routing/RouteDataFunction.type.d.ts.map +1 -1
- package/dist/routing/RoutePaths.d.ts +12 -0
- package/dist/routing/RoutePaths.d.ts.map +1 -0
- package/dist/routing/RoutePaths.js +1 -0
- package/dist/routing/RouteTypes.d.ts +6 -4
- package/dist/routing/RouteTypes.d.ts.map +1 -1
- package/dist/routing/Routes.d.ts +17 -11
- package/dist/routing/Routes.d.ts.map +1 -1
- package/dist/routing/RoutesFunction.d.ts +11 -2
- package/dist/routing/RoutesFunction.d.ts.map +1 -1
- package/dist/routing/Serializable.d.ts +5 -0
- package/dist/routing/Serializable.d.ts.map +1 -0
- package/dist/routing/Serializable.js +1 -0
- package/dist/routing/builder.d.ts +99 -0
- package/dist/routing/builder.d.ts.map +1 -0
- package/dist/routing/builder.js +213 -0
- package/dist/routing/builder.trial.d.ts +2 -0
- package/dist/routing/builder.trial.d.ts.map +1 -0
- package/dist/routing/builder.trial.js +85 -0
- package/dist/routing/defineRoutes.d.ts +8 -0
- package/dist/routing/defineRoutes.d.ts.map +1 -0
- package/dist/routing/defineRoutes.js +3 -0
- package/dist/routing/pyramidRouting.d.ts +2 -0
- package/dist/routing/pyramidRouting.d.ts.map +1 -0
- package/dist/routing/pyramidRouting.js +13 -0
- package/dist/routing/registerGlobalData.d.ts +11 -3
- package/dist/routing/registerGlobalData.d.ts.map +1 -1
- package/dist/routing/registerGlobalData.js +6 -0
- package/dist/routing/registerParts.types.test.d.ts +2 -0
- package/dist/routing/registerParts.types.test.d.ts.map +1 -0
- package/dist/routing/registerParts.types.test.js +139 -0
- package/dist/routing/registerRoutes.d.ts +10 -0
- package/dist/routing/registerRoutes.d.ts.map +1 -0
- package/dist/routing/registerRoutes.js +9 -0
- package/dist/routing/registerRouting.d.ts +36 -0
- package/dist/routing/registerRouting.d.ts.map +1 -0
- package/dist/routing/registerRouting.js +34 -0
- package/dist/routing/registerRouting.types.test.d.ts +80 -0
- package/dist/routing/registerRouting.types.test.d.ts.map +1 -0
- package/dist/routing/registerRouting.types.test.js +120 -0
- package/dist/routing/registrationTypes.d.ts +11 -0
- package/dist/routing/registrationTypes.d.ts.map +1 -0
- package/dist/routing/registrationTypes.js +1 -0
- package/dist/routing/resolveAppRoutes.d.ts +5 -0
- package/dist/routing/resolveAppRoutes.d.ts.map +1 -0
- package/dist/routing/resolveAppRoutes.js +25 -0
- package/dist/routing/routeUrl.d.ts +4 -0
- package/dist/routing/routeUrl.d.ts.map +1 -1
- package/dist/routing/routeUrl.js +4 -0
- package/dist/routing/routesArray.d.ts +23 -0
- package/dist/routing/routesArray.d.ts.map +1 -0
- package/dist/routing/routesArray.js +20 -0
- package/dist/routing/routesArray.types.test.d.ts +2 -0
- package/dist/routing/routesArray.types.test.d.ts.map +1 -0
- package/dist/routing/routesArray.types.test.js +132 -0
- package/dist/routing/routingBuilder.d.ts +34 -0
- package/dist/routing/routingBuilder.d.ts.map +1 -0
- package/dist/routing/routingBuilder.js +33 -0
- package/dist/routing/routingBuilder.types.test.d.ts +2 -0
- package/dist/routing/routingBuilder.types.test.d.ts.map +1 -0
- package/dist/routing/routingBuilder.types.test.js +171 -0
- package/dist/routing/routingRegistry.d.ts +19 -0
- package/dist/routing/routingRegistry.d.ts.map +1 -0
- package/dist/routing/routingRegistry.js +29 -0
- package/dist/staticGen/getAppRoutes.d.ts +2 -2
- package/dist/staticGen/getAppRoutes.d.ts.map +1 -1
- package/dist/staticGen/getAppRoutes.js +9 -6
- package/dist/staticGen/staticGen.d.ts.map +1 -1
- package/dist/staticGen/staticGen.js +8 -2
- package/dist/style/styleContentSxy.d.ts.map +1 -1
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +2 -0
- package/dist/syncServer/index.cjs +1 -2
- package/dist/syncServer/preload.js +2 -0
- package/dist/testing/createTestApp.d.ts +25 -1
- package/dist/testing/createTestApp.d.ts.map +1 -1
- package/dist/testing/createTestApp.js +12 -3
- package/dist/testing/createTestPipelineApp.d.ts +25 -0
- package/dist/testing/createTestPipelineApp.d.ts.map +1 -0
- package/dist/testing/createTestPipelineApp.js +153 -0
- package/dist/testing/ensure.d.ts +108 -0
- package/dist/testing/ensure.d.ts.map +1 -0
- package/dist/testing/ensure.js +522 -0
- package/dist/testing/ensure.trial.d.ts +2 -0
- package/dist/testing/ensure.trial.d.ts.map +1 -0
- package/dist/testing/ensure.trial.js +9 -0
- package/dist/testing/helpers/contentHtmlElements.d.ts.map +1 -1
- package/dist/testing/host.d.ts +80 -9
- package/dist/testing/host.d.ts.map +1 -1
- package/dist/testing/host.js +81 -20
- package/dist/testing/hostPipeline.d.ts +157 -0
- package/dist/testing/hostPipeline.d.ts.map +1 -0
- package/dist/testing/hostPipeline.js +341 -0
- package/dist/testing/hydrateTestApp.d.ts +17 -0
- package/dist/testing/hydrateTestApp.d.ts.map +1 -1
- package/dist/testing/hydrateTestApp.js +26 -6
- package/dist/testing/hydrateTestPipelineApp.d.ts +30 -0
- package/dist/testing/hydrateTestPipelineApp.d.ts.map +1 -0
- package/dist/testing/hydrateTestPipelineApp.js +190 -0
- package/dist/testing/index.d.ts +6 -3
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +4 -1
- package/dist/testing/resolveContent.d.ts +16 -0
- package/dist/testing/resolveContent.d.ts.map +1 -0
- package/dist/testing/resolveContent.js +65 -0
- package/dist/testing/testingComponentPackage.d.ts +3 -1
- package/dist/testing/testingComponentPackage.d.ts.map +1 -1
- package/dist/testing/testingComponentPackage.js +16 -1
- package/dist/update/integrateUpdateVdom.d.ts.map +1 -1
- package/dist/update/integrateUpdateVdom.js +35 -31
- package/dist/update/integrateUpdateVdomPrebuild.js +20 -20
- package/dist/validChildren.d.ts.map +1 -1
- package/dist/zones/react.d.ts.map +1 -1
- package/package.json +20 -18
- package/types/helpers.d.ts +11 -2
- package/types/jsx/html.d.ts +29 -25
- package/types/jsx/jsx.d.ts +8 -8
- package/types/modules.d.ts +14 -3
- package/types/testing.d.ts +0 -0
- package/vendor/babel-core.js +5 -5
- package/vendor/babel-parser.js +1 -1
- package/vendor/babel-preset-react.js +32 -34
- package/vendor/babel-preset-typescript.js +5 -5
- package/vendor/chalk-extensions.js +3 -146
- package/vendor/chokidar.js +311 -5
- package/vendor/chunk-B34JUlnS.js +169 -0
- package/vendor/{chunk-Bu8ZRE-c.js → chunk-B9ttgKqg.js} +28 -25
- package/vendor/{chunk-D2EnpcLg.js → chunk-BGvapINa.js} +3 -164
- package/vendor/{chunk-Cqrj-Zqr.js → chunk-BmAiqUzD.js} +22 -8
- package/vendor/{chunk-BiUcnLhT.js → chunk-But4T5N_.js} +8 -3
- package/vendor/{chunk-OUnVY4Wm.js → chunk-DuR6SGzI.js} +162 -35
- package/vendor/dotenv.js +2 -2
- package/vendor/express.js +61 -10
- package/vendor/manifest.json +2 -2
- package/vendor/postcss.js +1 -1
- package/vendor/precinct.js +5914 -3591
- package/vendor/valibot.js +418 -504
- package/dist/Servers/MatchedRouteInfo.d.ts +0 -11
- package/dist/Servers/MatchedRouteInfo.d.ts.map +0 -1
- package/dist/routing/__fluentRouteBuilder.d.ts +0 -80
- package/dist/routing/__fluentRouteBuilder.d.ts.map +0 -1
- package/dist/routing/__fluentRouteBuilder.js +0 -183
- package/dist/routing/__fluentRoutes.d.ts +0 -2
- package/dist/routing/__fluentRoutes.d.ts.map +0 -1
- package/dist/routing/__fluentRoutes.js +0 -59
- package/vendor/chunk-Hy-cCmu-.js +0 -23
- /package/dist/{Servers → routing}/MatchedRouteInfo.js +0 -0
package/dist/testing/host.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ContentNode } from '../ContentNode.js';
|
|
1
|
+
import type { ContentNode, ContentNodeElement } from '../ContentNode.js';
|
|
2
2
|
import type { InternalStoreSchema } from '../Store/InternalStoreSchema.js';
|
|
3
3
|
import type { TrueStore } from '../Store/makeStore.js';
|
|
4
4
|
import type { Routes } from '../routing/Routes.js';
|
|
5
5
|
import type { RoutesFunction } from '../routing/RoutesFunction.js';
|
|
6
6
|
import type { Path, RouteKey } from '../routing/RouteTypes.js';
|
|
7
|
-
import {
|
|
7
|
+
import { type ComponentStore, type TungstenComponent, type TungstenComponentClass, type TungstenComponentPropsBase, type TungstenStatefulComponent, TungstenBaseComponent, TungstenSimpleComponent } from '../Components.jsx';
|
|
8
8
|
type StateOf<Component> = Component extends {
|
|
9
9
|
state?: infer State;
|
|
10
10
|
} ? State : never;
|
|
@@ -30,6 +30,11 @@ type HostedCore<Component extends TungstenBaseComponent<any, any>> = {
|
|
|
30
30
|
updateState: (setter: StateSetter<Component>) => Promise<Awaited<ContentOf<Component>>>;
|
|
31
31
|
};
|
|
32
32
|
export type Hosted<Component extends TungstenBaseComponent<any, any>> = HostedCore<Component> & ComponentApi<Component>;
|
|
33
|
+
export type HostedResolved<Component extends TungstenBaseComponent<any, any>> = Omit<HostedCore<Component>, 'content' | 'updateProps' | 'updateState'> & {
|
|
34
|
+
content: () => Promise<ContentNode>;
|
|
35
|
+
updateProps: (props: Component['props']) => Promise<ContentNode>;
|
|
36
|
+
updateState: (setter: StateSetter<Component>) => Promise<ContentNode>;
|
|
37
|
+
} & ComponentApi<Component>;
|
|
33
38
|
type StoreSchemaOf<Component> = Component extends {
|
|
34
39
|
store: ComponentStore<infer Schema extends object>;
|
|
35
40
|
} ? Schema : never;
|
|
@@ -42,12 +47,12 @@ export type HostedRoute = {
|
|
|
42
47
|
type RouteOptions = {
|
|
43
48
|
routing: true;
|
|
44
49
|
location: Path;
|
|
45
|
-
routes: Routes | RoutesFunction
|
|
50
|
+
routes: Routes<any> | RoutesFunction<any>;
|
|
46
51
|
matchedRoute?: never;
|
|
47
52
|
} | {
|
|
48
53
|
routing?: false;
|
|
49
54
|
location?: Path;
|
|
50
|
-
routes?: Routes
|
|
55
|
+
routes?: Routes<any>;
|
|
51
56
|
matchedRoute?: HostedRoute;
|
|
52
57
|
};
|
|
53
58
|
type NoStore = {
|
|
@@ -81,13 +86,34 @@ type StoreOptionsFor<Schema extends object> = {
|
|
|
81
86
|
partialStore?: never;
|
|
82
87
|
storeData?: never;
|
|
83
88
|
};
|
|
84
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Resolve the content through every component in the tree (the default). false: the hosted
|
|
91
|
+
* component's own content alone, its child components unexpanded.
|
|
92
|
+
*/
|
|
93
|
+
type ResolveOption = {
|
|
94
|
+
resolve?: boolean;
|
|
95
|
+
};
|
|
96
|
+
type Resolved = {
|
|
97
|
+
resolve?: true;
|
|
98
|
+
};
|
|
99
|
+
type Unresolved = {
|
|
100
|
+
resolve: false;
|
|
101
|
+
};
|
|
102
|
+
type AppDataOptions = {
|
|
103
|
+
/** What this.tungsten.context reads. An empty object when not given. */
|
|
104
|
+
context?: object;
|
|
105
|
+
/** What this.tungsten.networkedData reads. An empty object when not given. */
|
|
106
|
+
networkedData?: object;
|
|
107
|
+
/** What this.tungsten.globalData reads. An empty object when not given. */
|
|
108
|
+
globalData?: object;
|
|
109
|
+
};
|
|
110
|
+
export type HostStoreOptions<Schema extends object> = (RouteOptions & ResolveOption & AppDataOptions & StoreOptionsFor<Schema>) extends infer Options ? Options extends unknown ? {
|
|
85
111
|
[K in keyof Options]: Options[K];
|
|
86
112
|
} : never : never;
|
|
87
|
-
export type HostOptions<Component> = [StoreOf<Component>] extends [never] ? (RouteOptions & NoStore) extends infer Options ? Options extends unknown ? {
|
|
113
|
+
export type HostOptions<Component> = [StoreOf<Component>] extends [never] ? (RouteOptions & ResolveOption & AppDataOptions & (NoStore | StoreOptionsFor<any>)) extends infer Options ? Options extends unknown ? {
|
|
88
114
|
[K in keyof Options]: Options[K];
|
|
89
115
|
} : never : never : HostStoreOptions<StoreOf<Component>>;
|
|
90
|
-
type HostArgs<Props, Component> = [StoreOf<Component>] extends [never] ? object extends Props ? [props?: Props, options?: HostOptions<Component>] : [props: Props, options?: HostOptions<Component>] : object extends Props ? [props: Props | undefined, options: HostOptions<Component>] : [props: Props, options: HostOptions<Component>];
|
|
116
|
+
type HostArgs<Props, Component> = [StoreOf<Component>] extends [never] ? object extends Props ? [props?: Props, options?: HostOptions<Component> & Resolved] : [props: Props, options?: HostOptions<Component> & Resolved] : object extends Props ? [props: Props | undefined, options: HostOptions<Component> & Resolved] : [props: Props, options: HostOptions<Component> & Resolved];
|
|
91
117
|
/**
|
|
92
118
|
* Constructs a component outside of any app and drives it the way the framework
|
|
93
119
|
* does - init, then the mount lifecycles - calling its content function with
|
|
@@ -111,7 +137,52 @@ export declare function host<Props extends TungstenComponentPropsBase, Schema ex
|
|
|
111
137
|
store: ComponentStore<Schema>;
|
|
112
138
|
}>(ComponentType: TungstenComponentClass<Props, Component> & (new (...args: any) => {
|
|
113
139
|
store: ComponentStore<Schema>;
|
|
114
|
-
}), props: Props, options: NoInfer<[
|
|
115
|
-
|
|
140
|
+
}), props: Props, options: NoInfer<[
|
|
141
|
+
Schema
|
|
142
|
+
] extends [InternalStoreSchema] ? never : HostStoreOptions<Schema> & Unresolved>): Promise<Hosted<Component>>;
|
|
143
|
+
export declare function host<Props extends TungstenComponentPropsBase, Component extends TungstenBaseComponent<any, any>>(ComponentType: TungstenComponentClass<Props, Component>, props: Props | undefined, options: HostOptions<Component> & Unresolved): Promise<Hosted<Component>>;
|
|
144
|
+
export declare function host<Props extends TungstenComponentPropsBase, Schema extends object, Component extends TungstenBaseComponent<any, any> & {
|
|
145
|
+
store: ComponentStore<Schema>;
|
|
146
|
+
}>(ComponentType: TungstenComponentClass<Props, Component> & (new (...args: any) => {
|
|
147
|
+
store: ComponentStore<Schema>;
|
|
148
|
+
}), props: Props, options: NoInfer<[
|
|
149
|
+
Schema
|
|
150
|
+
] extends [InternalStoreSchema] ? never : HostStoreOptions<Schema> & Resolved>): Promise<HostedResolved<Component>>;
|
|
151
|
+
export declare function host<Props extends TungstenComponentPropsBase, Component extends TungstenBaseComponent<any, any>>(ComponentType: TungstenComponentClass<Props, Component>, ...[props, options]: HostArgs<Props, Component>): Promise<HostedResolved<Component>>;
|
|
152
|
+
export declare namespace host {
|
|
153
|
+
var generic: typeof hostGeneric;
|
|
154
|
+
var jsx: typeof hostJsx;
|
|
155
|
+
}
|
|
156
|
+
type HostGenericArgs<Component> = [StoreOf<Component>] extends [never] ? [options?: HostOptions<Component> & Resolved] : [options: HostOptions<Component> & Resolved];
|
|
157
|
+
/**
|
|
158
|
+
* host() for a generic component class, whose type arguments it cannot infer: passed as an
|
|
159
|
+
* argument, the class's own parameters are erased to their constraints before the props are
|
|
160
|
+
* looked at, so `bind: [form, 'value']` widens to an array and the class stops fitting.
|
|
161
|
+
* Taking the class in a call of its own gets higher-order inference instead, so the props
|
|
162
|
+
* are checked against the component the way JSX checks them.
|
|
163
|
+
*
|
|
164
|
+
* await hostGeneric(BoundValue)({ bind: [form, 'value'] })
|
|
165
|
+
* await hostGeneric(BoundValue, { resolve: false })({ bind: [form, 'value'] })
|
|
166
|
+
*
|
|
167
|
+
* Options go on the first call because the returned signature has to stay a single plain
|
|
168
|
+
* one: give it type parameters of its own, or a second call signature, and the inference
|
|
169
|
+
* that makes this work is lost.
|
|
170
|
+
*/
|
|
171
|
+
export declare function hostGeneric<Props extends TungstenComponentPropsBase, Component extends TungstenBaseComponent<any, any>>(ComponentType: TungstenComponentClass<Props, Component>, options: HostOptions<Component> & Unresolved): (props: Props) => Promise<Hosted<Component>>;
|
|
172
|
+
export declare function hostGeneric<Props extends TungstenComponentPropsBase, Component extends TungstenBaseComponent<any, any>>(ComponentType: TungstenComponentClass<Props, Component>, ...args: HostGenericArgs<Component>): (props: Props) => Promise<HostedResolved<Component>>;
|
|
173
|
+
type AnyClassComponent = TungstenBaseComponent<any, any>;
|
|
174
|
+
/**
|
|
175
|
+
* host(), given the element rather than the class and a props object:
|
|
176
|
+
* `await hostJsx(<DataTable head={head} rows={rows} columns={2} />)`. The options are host()'s,
|
|
177
|
+
* and everything else about it is the same - a class component, its init and mount lifecycles run.
|
|
178
|
+
*
|
|
179
|
+
* TypeScript types every JSX expression as `JSX.Element` (here `ContentNodeElement`), so the
|
|
180
|
+
* element does not carry the component it names: the wrapper comes back as the base component
|
|
181
|
+
* unless the call says which - `hostJsx<DataTable>(<DataTable … />)` - which is what gives back
|
|
182
|
+
* `props`, `state` and the component's own methods. host() itself infers all of that from the
|
|
183
|
+
* class, so a test that leans on the wrapper's api is better off with host().
|
|
184
|
+
*/
|
|
185
|
+
export declare function hostJsx<Component extends AnyClassComponent = AnyClassComponent>(element: ContentNodeElement, options: HostOptions<Component> & Unresolved): Promise<Hosted<Component>>;
|
|
186
|
+
export declare function hostJsx<Component extends AnyClassComponent = AnyClassComponent>(element: ContentNodeElement, options?: HostOptions<Component> & Resolved): Promise<HostedResolved<Component>>;
|
|
116
187
|
export {};
|
|
117
188
|
//# sourceMappingURL=host.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/testing/host.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/testing/host.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAExE,OAAO,KAAK,EACR,mBAAmB,EACtB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAClE,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAE9D,OAAO,EACH,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,sBAAsB,EACxE,KAAK,0BAA0B,EAAE,KAAK,yBAAyB,EAC/D,qBAAqB,EACO,uBAAuB,EACtD,MAAM,mBAAmB,CAAA;AAc1B,KAAK,OAAO,CAAC,SAAS,IAAI,SAAS,SAAS;IAAE,KAAK,CAAC,E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S,CAAC,EACvD,GAAG,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,GACpC,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAA;AAkBvD,KAAK,iBAAiB,GAAG,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;AAExD;;;;;;;;;;GAUG;AACH,wBAAsB,OAAO,CAAC,SAAS,SAAS,iBAAiB,GAAG,iBAAiB,EACjF,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,UAAU,GAC1E,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAA;AAC7B,wBAAsB,OAAO,CAAC,SAAS,SAAS,iBAAiB,GAAG,iBAAiB,EACjF,OAAO,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,QAAQ,GACzE,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAA"}
|
package/dist/testing/host.js
CHANGED
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
import { TungstenBaseComponent, TungstenBaseSimpleStoreComponent, TungstenBaseStatefulStoreComponent, TungstenBaseStoreComponent, TungstenSimpleComponent } from "../Components.js";
|
|
2
|
+
import { ContentNodeComponentIsClassComponent, ContentNodeElementIsComponent } from '../ContentNode.js';
|
|
3
|
+
import { $props, $type } from '../contentNodeSymbols.js';
|
|
4
|
+
import { componentTypeIdentityKey } from '../hmr/componentIdentity.js';
|
|
2
5
|
import { makeStore } from '../Store/makeStore.js';
|
|
3
6
|
import { routing } from "../Servers/routing.js";
|
|
7
|
+
import { resolveContent } from './resolveContent.js';
|
|
4
8
|
import { missingStoreValue, testingComponentPackage } from './testingComponentPackage.js';
|
|
5
9
|
const isPromise = value => value instanceof Promise || typeof value === 'object' && value !== null && 'then' in value;
|
|
6
10
|
// The same list at runtime. Underscore-prefixed members are excluded by rule
|
|
7
11
|
// (the framework's naming scheme), so only the plain-named ones are listed, and
|
|
8
12
|
// frameworkMembersAreComplete below fails to compile if one is ever missed.
|
|
9
|
-
const frameworkMemberNames = ['props', 'routeParams', 'routeData', 'parentComponent', 'childComponents', 'globalData', 'state', 'storeData', 'style', 'title', 'content', 'render', 'init', 'clientInit', 'serverInit', 'componentDidMount', 'componentDidHydrate', 'componentDidUpdate', 'componentDidRender', 'componentWillUnmount', 'componentDidUnmount', 'shouldStoreComponentUpdate', 'setState', 'triggerUpdate', 'pickProps', 'pickState', 'using', 'reactive', 'setTimeout', 'setInterval', 'clearTimeout', 'clearInterval'];
|
|
13
|
+
const frameworkMemberNames = ['props', 'routeParams', 'routeData', 'parentComponent', 'childComponents', 'globalData', 'state', 'storeData', 'style', 'title', 'content', 'render', 'init', 'clientInit', 'serverInit', 'componentDidMount', 'componentDidHydrate', 'componentDidUpdate', 'componentDidRender', 'componentWillUnmount', 'componentDidUnmount', 'shouldStoreComponentUpdate', 'setState', 'triggerUpdate', 'pickProps', 'pickState', 'using', 'reactive', 'setTimeout', 'setInterval', 'clearTimeout', 'clearInterval', 'tungsten'];
|
|
10
14
|
const frameworkMembers = new Set(frameworkMemberNames);
|
|
15
|
+
// a key the store does not hold names itself when it is read, rather than coming back undefined
|
|
16
|
+
const namingMissingKeys = store => new Proxy(store, {
|
|
17
|
+
get: (target, key) => typeof key === 'symbol' || key in target ? Reflect.get(target, key) : missingStoreValue(`store.${key}`)
|
|
18
|
+
});
|
|
11
19
|
const isStoreComponent = component => component instanceof TungstenBaseStoreComponent || component instanceof TungstenBaseSimpleStoreComponent || component instanceof TungstenBaseStatefulStoreComponent;
|
|
12
20
|
// Runs routing only when asked: a unit test otherwise states the route itself.
|
|
13
|
-
async function hostedRouting(options) {
|
|
21
|
+
async function hostedRouting(options, context, networkedData) {
|
|
14
22
|
if (options.routing === true) {
|
|
15
|
-
const routes = typeof options.routes === 'function' ? options.routes(null) : options.routes;
|
|
23
|
+
const routes = typeof options.routes === 'function' ? options.routes(null, context, networkedData) : options.routes;
|
|
16
24
|
return {
|
|
17
25
|
routes,
|
|
18
26
|
internalStore: {
|
|
19
27
|
location: options.location,
|
|
20
|
-
matchedRouteInfo: await routing(options.location, routes),
|
|
28
|
+
matchedRouteInfo: await routing(options.location, routes, context, networkedData),
|
|
21
29
|
popMessages: []
|
|
22
30
|
}
|
|
23
31
|
};
|
|
@@ -47,6 +55,7 @@ async function hostedRouting(options) {
|
|
|
47
55
|
}
|
|
48
56
|
};
|
|
49
57
|
}
|
|
58
|
+
// actual
|
|
50
59
|
export async function host(ComponentType, props,
|
|
51
60
|
// unknown, not a loose object type: the general overload's rest tuple can't be related to one
|
|
52
61
|
options) {
|
|
@@ -54,7 +63,16 @@ options) {
|
|
|
54
63
|
const storeData = stored.storeData ?? stored.partialStoreData;
|
|
55
64
|
const store = stored.store ?? stored.partialStore ?? (storeData === undefined ? undefined : makeStore(storeData, new Map()));
|
|
56
65
|
const partial = stored.partialStore !== undefined || stored.partialStoreData !== undefined;
|
|
57
|
-
|
|
66
|
+
// a partial store holds only the keys supplied, so name any other one read. On the store the
|
|
67
|
+
// instance shares, so a component resolve: true constructs is named it the same way
|
|
68
|
+
const shared = partial && store !== undefined ? namingMissingKeys(store) : store;
|
|
69
|
+
// one object each, so the routes function, the data function and the component see the same
|
|
70
|
+
// ones, as a request's do. Branded here, as the framework brands what it builds
|
|
71
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
72
|
+
const context = stored.context ?? {};
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
74
|
+
const networkedData = stored.networkedData ?? {};
|
|
75
|
+
const route = await hostedRouting(stored, context, networkedData);
|
|
58
76
|
const pending = [];
|
|
59
77
|
const failures = [];
|
|
60
78
|
// Instance.trackWork's no-scheduler path, except the work is kept so host
|
|
@@ -80,16 +98,22 @@ options) {
|
|
|
80
98
|
};
|
|
81
99
|
let title;
|
|
82
100
|
const navigations = [];
|
|
83
|
-
|
|
101
|
+
// kept, not inlined: its instance is what resolving renders the rest of the tree against
|
|
102
|
+
const constructPackage = testingComponentPackage(
|
|
84
103
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- an absent props object is only reachable when Props allows {}
|
|
85
104
|
props ?? {}, {
|
|
86
|
-
...(
|
|
87
|
-
store
|
|
105
|
+
...(shared !== undefined ? {
|
|
106
|
+
store: shared
|
|
88
107
|
} : {}),
|
|
89
108
|
...(route.routes !== undefined ? {
|
|
90
109
|
routes: route.routes
|
|
91
110
|
} : {}),
|
|
92
111
|
internalStore: route.internalStore,
|
|
112
|
+
context,
|
|
113
|
+
networkedData,
|
|
114
|
+
...(stored.globalData !== undefined ? {
|
|
115
|
+
globalData: stored.globalData
|
|
116
|
+
} : {}),
|
|
93
117
|
trackWork,
|
|
94
118
|
// setState's work, run and awaited here rather than left to a timer
|
|
95
119
|
queueTask: (task, description) => {
|
|
@@ -112,19 +136,16 @@ options) {
|
|
|
112
136
|
to
|
|
113
137
|
});
|
|
114
138
|
}
|
|
115
|
-
})
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
get: (target, key) => typeof key === 'symbol' || key in target ? Reflect.get(target, key) : missingStoreValue(`store.${key}`)
|
|
120
|
-
});
|
|
121
|
-
}
|
|
139
|
+
});
|
|
140
|
+
const component = new ComponentType(constructPackage);
|
|
141
|
+
// the component's own store is built at construction, from the keys there were: guard it too
|
|
142
|
+
if (partial && isStoreComponent(component)) component.store = namingMissingKeys(component.store);
|
|
122
143
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- state isn't on the base class, see StateOf
|
|
123
144
|
const stateful = component;
|
|
124
145
|
const simple = component instanceof TungstenSimpleComponent;
|
|
125
146
|
// Not awaited here: what the component's own content function returns is
|
|
126
147
|
// what comes back, so its declared type tells a test whether to await.
|
|
127
|
-
const
|
|
148
|
+
const ownContent = () => {
|
|
128
149
|
const contentFunction = component.content ?? component.render;
|
|
129
150
|
if (contentFunction === undefined) {
|
|
130
151
|
throw new Error(`host(): ${ComponentType.name} has no content or render function.`);
|
|
@@ -134,6 +155,16 @@ options) {
|
|
|
134
155
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- ContentOf recovers the concrete component's own return type
|
|
135
156
|
return result;
|
|
136
157
|
};
|
|
158
|
+
// resolve: the tree the app would render - every component in it constructed and asked for its
|
|
159
|
+
// content - so it is awaited whatever the hosted component's own content function returns
|
|
160
|
+
const guardPartialStore = built => {
|
|
161
|
+
if (isStoreComponent(built)) built.store = namingMissingKeys(built.store);
|
|
162
|
+
};
|
|
163
|
+
const resolved = async () => resolveContent(
|
|
164
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- ContentOf stays unresolved inside the generic; a content function returns a content tree
|
|
165
|
+
await ownContent(), component, constructPackage.instance, partial ? guardPartialStore : undefined);
|
|
166
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- resolving has its own overloads, whose content this is
|
|
167
|
+
const content = stored.resolve === false ? ownContent : resolved;
|
|
137
168
|
await component.__init();
|
|
138
169
|
component.__didMount();
|
|
139
170
|
await settle();
|
|
@@ -188,6 +219,35 @@ options) {
|
|
|
188
219
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- componentApi() collects exactly the members ComponentApi describes
|
|
189
220
|
return Object.assign(core, componentApi(component, core));
|
|
190
221
|
}
|
|
222
|
+
export function hostGeneric(ComponentType, options) {
|
|
223
|
+
// host()'s args are a conditional on Component, which stays deferred in a generic
|
|
224
|
+
// wrapper, so nothing is assignable to it here - the implementation signature is
|
|
225
|
+
// what this is calling
|
|
226
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- as above
|
|
227
|
+
const call = host;
|
|
228
|
+
return async props => call(ComponentType, props, options);
|
|
229
|
+
}
|
|
230
|
+
export async function hostJsx(element,
|
|
231
|
+
// unknown: the overloads' options are conditional on Component, which nothing satisfies here
|
|
232
|
+
options) {
|
|
233
|
+
if (!ContentNodeElementIsComponent(element) || !ContentNodeComponentIsClassComponent(element)) {
|
|
234
|
+
throw new Error(`hostJsx(): ${described(element)} is not a class component element.` + ' Give host() a component class; a function component is a function - call it.');
|
|
235
|
+
}
|
|
236
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- the element's own class, which the call names when it wants the wrapper typed
|
|
237
|
+
const ComponentType = element[$type];
|
|
238
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- as above: host() checks them against the class it was given
|
|
239
|
+
return host(ComponentType, element[$props], options);
|
|
240
|
+
}
|
|
241
|
+
// an html tag as written, a fragment as <>, a function component by name
|
|
242
|
+
function described(element) {
|
|
243
|
+
const type = element[$type];
|
|
244
|
+
if (typeof type === 'string') return `<${type}>`;
|
|
245
|
+
if (typeof type === 'function') return `<${componentTypeIdentityKey(type)}>`;
|
|
246
|
+
return '<>';
|
|
247
|
+
}
|
|
248
|
+
// the variants hang off host() too, so a test reaches for one name
|
|
249
|
+
host.generic = hostGeneric;
|
|
250
|
+
host.jsx = hostJsx;
|
|
191
251
|
// The component's own function members, bound and ready to call. Framework
|
|
192
252
|
// members and anything the wrapper already provides are left out; the framework
|
|
193
253
|
// keeps its internals under an underscore, which is the rest of the rule.
|
|
@@ -197,19 +257,20 @@ function componentApi(component, core) {
|
|
|
197
257
|
if (descriptor === undefined || typeof descriptor.value !== 'function') return;
|
|
198
258
|
if (name.startsWith('_') || frameworkMembers.has(name)) return;
|
|
199
259
|
if (name in core || name in api) return;
|
|
200
|
-
|
|
201
|
-
|
|
260
|
+
const method = descriptor.value; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- guarded by the typeof above
|
|
261
|
+
// looked up only when called: a proxy field (a tRPC client) reads .bind as a procedure
|
|
262
|
+
api[name] = (...args) => Reflect.apply(method, component, args);
|
|
202
263
|
};
|
|
203
264
|
for (const name of Object.getOwnPropertyNames(component)) {
|
|
204
265
|
add(name, Object.getOwnPropertyDescriptor(component, name));
|
|
205
266
|
}
|
|
206
|
-
let prototype = Object.getPrototypeOf(component);
|
|
267
|
+
let prototype = Object.getPrototypeOf(component); // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
207
268
|
while (prototype !== null && prototype !== TungstenBaseComponent.prototype) {
|
|
208
269
|
for (const name of Object.getOwnPropertyNames(prototype)) {
|
|
209
270
|
if (name === 'constructor') continue;
|
|
210
271
|
add(name, Object.getOwnPropertyDescriptor(prototype, name));
|
|
211
272
|
}
|
|
212
|
-
prototype = Object.getPrototypeOf(prototype);
|
|
273
|
+
prototype = Object.getPrototypeOf(prototype); // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
213
274
|
}
|
|
214
275
|
return api;
|
|
215
276
|
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import type { ContentNode, ContentNodeElement } from '../ContentNode.js';
|
|
2
|
+
import type { TrueStore } from '../Store/makeStore.js';
|
|
3
|
+
import type { Routes } from '../routing/Routes.js';
|
|
4
|
+
import type { RoutesFunction } from '../routing/RoutesFunction.js';
|
|
5
|
+
import type { Path, RouteKey } from '../routing/RouteTypes.js';
|
|
6
|
+
import { type TungstenComponent, type TungstenComponentClass, type TungstenComponentPropsBase, type TungstenStatefulComponent, TungstenBaseComponent, TungstenSimpleComponent } from '../Components.jsx';
|
|
7
|
+
type StateOf<Component> = Component extends {
|
|
8
|
+
state?: infer State;
|
|
9
|
+
} ? State : never;
|
|
10
|
+
type ContentOf<Component extends TungstenBaseComponent<any, any>> = NonNullable<Component['content']> extends (...args: any[]) => infer Result ? Result : ContentNode | Promise<ContentNode>;
|
|
11
|
+
type FrameworkMember = keyof TungstenSimpleComponent<any, any> | keyof TungstenComponent<any, any, any> | keyof TungstenStatefulComponent<any, any, any>;
|
|
12
|
+
type ReservedMember = keyof HostedCore<TungstenBaseComponent<any, any>>;
|
|
13
|
+
export type ComponentApi<Component extends TungstenBaseComponent<any, any>> = {
|
|
14
|
+
[Key in keyof Component as Key extends FrameworkMember | ReservedMember ? never : NonNullable<Component[Key]> extends (...args: any[]) => any ? Key : never]: Component[Key];
|
|
15
|
+
};
|
|
16
|
+
export type Navigation = {
|
|
17
|
+
kind: 'goto' | 'redirect';
|
|
18
|
+
to: string;
|
|
19
|
+
};
|
|
20
|
+
export type StateSetter<Component extends TungstenBaseComponent<any, any>> = (state: StateOf<Component>) => StateOf<Component> | void;
|
|
21
|
+
type HostedCore<Component extends TungstenBaseComponent<any, any>> = {
|
|
22
|
+
readonly component: Component;
|
|
23
|
+
readonly props: Component['props'];
|
|
24
|
+
readonly state: StateOf<Component>;
|
|
25
|
+
readonly title: string | undefined;
|
|
26
|
+
readonly navigations: readonly Navigation[];
|
|
27
|
+
content: () => ContentOf<Component>;
|
|
28
|
+
updateProps: (props: Component['props']) => Promise<Awaited<ContentOf<Component>>>;
|
|
29
|
+
updateState: (setter: StateSetter<Component>) => Promise<Awaited<ContentOf<Component>>>;
|
|
30
|
+
};
|
|
31
|
+
export type Hosted<Component extends TungstenBaseComponent<any, any>> = HostedCore<Component> & ComponentApi<Component>;
|
|
32
|
+
export type HostedResolved<Component extends TungstenBaseComponent<any, any>> = Omit<HostedCore<Component>, 'content' | 'updateProps' | 'updateState'> & {
|
|
33
|
+
content: () => Promise<ContentNode>;
|
|
34
|
+
updateProps: (props: Component['props']) => Promise<ContentNode>;
|
|
35
|
+
updateState: (setter: StateSetter<Component>) => Promise<ContentNode>;
|
|
36
|
+
} & ComponentApi<Component>;
|
|
37
|
+
export type HostedRoute = {
|
|
38
|
+
key: RouteKey | null;
|
|
39
|
+
params?: Record<string, string>;
|
|
40
|
+
data?: unknown;
|
|
41
|
+
};
|
|
42
|
+
type RouteOptions = {
|
|
43
|
+
routing: true;
|
|
44
|
+
location: Path;
|
|
45
|
+
routes: Routes<any> | RoutesFunction<any>;
|
|
46
|
+
matchedRoute?: never;
|
|
47
|
+
} | {
|
|
48
|
+
routing?: false;
|
|
49
|
+
location?: Path;
|
|
50
|
+
routes?: Routes<any>;
|
|
51
|
+
matchedRoute?: HostedRoute;
|
|
52
|
+
};
|
|
53
|
+
type StoreOptionsFor<Schema extends object> = {
|
|
54
|
+
/** A real store (makeStore), used as-is: its cells keep state, so one can be shared between hosts. */
|
|
55
|
+
store: TrueStore<Schema>;
|
|
56
|
+
partialStore?: never;
|
|
57
|
+
storeData?: never;
|
|
58
|
+
partialStoreData?: never;
|
|
59
|
+
} | {
|
|
60
|
+
/** Some real cells. A key not given is missing, not defaulted: reading it throws, naming it. */
|
|
61
|
+
partialStore: Partial<TrueStore<Schema>>;
|
|
62
|
+
store?: never;
|
|
63
|
+
storeData?: never;
|
|
64
|
+
partialStoreData?: never;
|
|
65
|
+
} | {
|
|
66
|
+
/** Values for every key, each wrapped in a cell of its own. */
|
|
67
|
+
storeData: Schema;
|
|
68
|
+
store?: never;
|
|
69
|
+
partialStore?: never;
|
|
70
|
+
partialStoreData?: never;
|
|
71
|
+
} | {
|
|
72
|
+
/** Values for some keys. A key not given is missing, not defaulted: reading it throws, naming it. */
|
|
73
|
+
partialStoreData: Partial<Schema>;
|
|
74
|
+
store?: never;
|
|
75
|
+
partialStore?: never;
|
|
76
|
+
storeData?: never;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Resolve the content through every component in the tree (the default). false: the hosted
|
|
80
|
+
* component's own content alone, its child components unexpanded.
|
|
81
|
+
*/
|
|
82
|
+
type ResolveOption = {
|
|
83
|
+
resolve?: boolean;
|
|
84
|
+
};
|
|
85
|
+
type Resolved = {
|
|
86
|
+
resolve?: true;
|
|
87
|
+
};
|
|
88
|
+
type Unresolved = {
|
|
89
|
+
resolve: false;
|
|
90
|
+
};
|
|
91
|
+
type AppDataOptions = {
|
|
92
|
+
/** What this.tungsten.context reads. An empty object when not given. */
|
|
93
|
+
context?: object;
|
|
94
|
+
/** What this.tungsten.networkedData reads. An empty object when not given. */
|
|
95
|
+
networkedData?: object;
|
|
96
|
+
/** What this.tungsten.globalData reads. An empty object when not given. */
|
|
97
|
+
globalData?: object;
|
|
98
|
+
};
|
|
99
|
+
export type HostStoreOptions<Schema extends object> = (RouteOptions & ResolveOption & AppDataOptions & StoreOptionsFor<Schema>) extends infer Options ? Options extends unknown ? {
|
|
100
|
+
[K in keyof Options]: Options[K];
|
|
101
|
+
} : never : never;
|
|
102
|
+
export type HostPipelineOptions = RouteOptions & ResolveOption & AppDataOptions;
|
|
103
|
+
/**
|
|
104
|
+
* Constructs a component outside of any app and drives it the way the framework
|
|
105
|
+
* does - init, then the mount lifecycles - calling its content function with
|
|
106
|
+
* whatever arguments its flavour takes, so tests don't have to match the
|
|
107
|
+
* (props) / (props, state) signature themselves.
|
|
108
|
+
*
|
|
109
|
+
* No DOM: content is returned as a content node tree, unstyled, and never
|
|
110
|
+
* reconciled. createTestApp() is the harness for anything that needs a document
|
|
111
|
+
* or app state. Lifecycle failures are thrown rather than only reported, so a
|
|
112
|
+
* test can't pass over one.
|
|
113
|
+
*
|
|
114
|
+
* State is not proxied (the construct package is marked `hosted`), so nothing
|
|
115
|
+
* re-renders on its own: updateProps() and updateState() are the renders.
|
|
116
|
+
*
|
|
117
|
+
* Store components have a structural overload: Schema is its own parameter, inferred from
|
|
118
|
+
* the class, so a generic wrapper (`Component extends { store: ComponentStore<S> }`) can
|
|
119
|
+
* call through without a cast. HostArgs is a conditional on Component, and a conditional
|
|
120
|
+
* on a type parameter is deferred, so nothing is assignable to it inside such a wrapper.
|
|
121
|
+
*/
|
|
122
|
+
export declare function hostPipeline<Props extends TungstenComponentPropsBase, Component extends TungstenBaseComponent<any, any>>(ComponentType: TungstenComponentClass<Props, Component>, props?: Props, options?: HostPipelineOptions): Promise<Hosted<Component> | HostedResolved<Component>>;
|
|
123
|
+
export declare namespace hostPipeline {
|
|
124
|
+
var generic: typeof hostPipelineGeneric;
|
|
125
|
+
var jsx: typeof hostPipelineJsx;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* host() for a generic component class, whose type arguments it cannot infer: passed as an
|
|
129
|
+
* argument, the class's own parameters are erased to their constraints before the props are
|
|
130
|
+
* looked at, so `bind: [form, 'value']` widens to an array and the class stops fitting.
|
|
131
|
+
* Taking the class in a call of its own gets higher-order inference instead, so the props
|
|
132
|
+
* are checked against the component the way JSX checks them.
|
|
133
|
+
*
|
|
134
|
+
* await hostGeneric(BoundValue)({ bind: [form, 'value'] })
|
|
135
|
+
* await hostGeneric(BoundValue, { resolve: false })({ bind: [form, 'value'] })
|
|
136
|
+
*
|
|
137
|
+
* Options go on the first call because the returned signature has to stay a single plain
|
|
138
|
+
* one: give it type parameters of its own, or a second call signature, and the inference
|
|
139
|
+
* that makes this work is lost.
|
|
140
|
+
*/
|
|
141
|
+
export declare function hostPipelineGeneric<Props extends TungstenComponentPropsBase, Component extends TungstenBaseComponent<any, any>>(ComponentType: TungstenComponentClass<Props, Component>, options: HostPipelineOptions & Unresolved): (props: Props) => Promise<Hosted<Component>>;
|
|
142
|
+
type AnyClassComponent = TungstenBaseComponent<any, any>;
|
|
143
|
+
/**
|
|
144
|
+
* host(), given the element rather than the class and a props object:
|
|
145
|
+
* `await hostJsx(<DataTable head={head} rows={rows} columns={2} />)`. The options are host()'s,
|
|
146
|
+
* and everything else about it is the same - a class component, its init and mount lifecycles run.
|
|
147
|
+
*
|
|
148
|
+
* TypeScript types every JSX expression as `JSX.Element` (here `ContentNodeElement`), so the
|
|
149
|
+
* element does not carry the component it names: the wrapper comes back as the base component
|
|
150
|
+
* unless the call says which - `hostJsx<DataTable>(<DataTable … />)` - which is what gives back
|
|
151
|
+
* `props`, `state` and the component's own methods. host() itself infers all of that from the
|
|
152
|
+
* class, so a test that leans on the wrapper's api is better off with host().
|
|
153
|
+
*/
|
|
154
|
+
export declare function hostPipelineJsx<Component extends AnyClassComponent = AnyClassComponent>(element: ContentNodeElement, options: HostPipelineOptions & Unresolved): Promise<Hosted<Component>>;
|
|
155
|
+
export declare function hostPipelineJsx<Component extends AnyClassComponent = AnyClassComponent>(element: ContentNodeElement, options?: HostPipelineOptions & Resolved): Promise<HostedResolved<Component>>;
|
|
156
|
+
export {};
|
|
157
|
+
//# sourceMappingURL=hostPipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hostPipeline.d.ts","sourceRoot":"","sources":["../../src/testing/hostPipeline.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAKxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAClE,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAE9D,OAAO,EACkB,KAAK,iBAAiB,EAAE,KAAK,sBAAsB,EACxE,KAAK,0BAA0B,EAAE,KAAK,yBAAyB,EAC/D,qBAAqB,EACO,uBAAuB,EACtD,MAAM,mBAAmB,CAAA;AAc1B,KAAK,OAAO,CAAC,SAAS,IAAI,SAAS,SAAS;IAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAA;CAAE,GAAG,KAAK,GAAG,KAAK,CAAA;AAInF,KAAK,SAAS,CAAC,SAAS,SAAS,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,IAC1D,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,MAAM,GACtE,MAAM,GACN,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;AAe5C,KAAK,eAAe,GACZ,MAAM,uBAAuB,CAAC,GAAG,EAAE,GAAG,CAAC,GACzC,MAAM,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,GACtC,MAAM,yBAAyB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,C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