akanjs 2.2.4 → 2.2.6
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/CHANGELOG.md +9 -0
- package/base/base.ts +1 -1
- package/base/primitiveRegistry.ts +6 -10
- package/base/types.ts +1 -4
- package/capacitor.base.config.ts +1 -1
- package/client/capacitor.ts +1 -1
- package/client/cookie.ts +2 -4
- package/client/createFont.ts +2 -2
- package/client/csrTypes.ts +2 -8
- package/client/makePageProto.tsx +4 -10
- package/client/router.ts +3 -8
- package/client/translator.ts +4 -12
- package/common/Logger.ts +1 -4
- package/common/formatNumber.ts +2 -5
- package/common/hmrPhase.ts +1 -1
- package/common/isValidDate.ts +0 -3
- package/constant/fieldInfo.ts +3 -3
- package/constant/purify.ts +1 -2
- package/constant/types.ts +0 -4
- package/constant/via.ts +6 -12
- package/document/databaseRegistry.ts +0 -8
- package/document/into.ts +0 -1
- package/fetch/client/fetchClient.ts +1 -6
- package/fetch/client/httpClient.ts +1 -2
- package/fetch/fetchType/appliedReturn.type.ts +0 -1
- package/fetch/fetchType/endpointFetch.type.ts +0 -3
- package/fetch/fetchType/sliceFetch.type.ts +0 -8
- package/fetch/requestStorage.ts +2 -10
- package/package.json +67 -24
- package/server/akanApp.ts +2 -5
- package/server/akanLib.ts +0 -1
- package/server/akanServer.ts +3 -4
- package/server/artifact/builderRpc.ts +2 -2
- package/server/artifact/ipcTypes.ts +0 -4
- package/server/decorators.ts +1 -1
- package/server/di/diLifecycle.ts +3 -6
- package/server/hmr/clientScript.ts +2 -20
- package/server/hmr/devHmrController.ts +0 -4
- package/server/processMetricsCollector.ts +1 -1
- package/server/resolver/database.resolver.ts +2 -2
- package/server/resolver/resolver.contract.fixture.ts +0 -1
- package/server/resolver/signal.resolver.ts +2 -10
- package/server/routing/apiRouter.ts +2 -4
- package/server/rscClient.tsx +1 -7
- package/server/rscWorkerHost.ts +11 -33
- package/server/ssrFromRscRenderer.tsx +3 -35
- package/server/types/react-server-dom-webpack.d.ts +1 -7
- package/server/vendor/react-dom-client.ts +1 -1
- package/server/vendor/react-dom.ts +2 -3
- package/server/vendor/react-jsx-dev-runtime.ts +1 -1
- package/server/vendor/react-jsx-runtime.ts +1 -1
- package/server/vendor/react-refresh-runtime.ts +2 -2
- package/server/vendor/react-server-dom-webpack-client-browser.ts +1 -1
- package/server/vendor/react.ts +2 -9
- package/server/vendor/scheduler.ts +2 -3
- package/server/webRouter.ts +2 -3
- package/service/adapt.ts +1 -5
- package/service/predefinedAdaptor/cache.adaptor.ts +1 -2
- package/service/predefinedAdaptor/database.adaptor.ts +2 -2
- package/service/predefinedAdaptor/solidSqlite.ts +1 -2
- package/service/predefinedAdaptor/websocket.adaptor.ts +3 -15
- package/service/serve.ts +3 -7
- package/signal/base.signal.ts +0 -1
- package/signal/endpointInfo.ts +0 -7
- package/signal/intercept.ts +0 -2
- package/signal/middleware.ts +1 -2
- package/signal/serverSignal.ts +1 -15
- package/signal/signalContext.ts +1 -1
- package/signal/signalRegistry.ts +0 -5
- package/signal/sliceInfo.ts +0 -3
- package/signal/trace.ts +0 -11
- package/signal/types.ts +2 -11
- package/store/action.ts +3 -5
- package/store/stateBuilder.ts +0 -2
- package/store/stateInfo.ts +1 -2
- package/store/types.ts +1 -1
- package/test/playwright.config.base.ts +5 -28
- package/test/playwright.pageAgent.ts +1 -1
- package/test/sampleOf.ts +1 -1
- package/test/testServer.ts +1 -1
- package/types/base/base.d.ts +53 -0
- package/types/base/baseEnv.d.ts +68 -0
- package/types/base/index.d.ts +6 -0
- package/types/base/primitiveRegistry.d.ts +134 -0
- package/types/base/symbols.d.ts +11 -0
- package/types/base/types.d.ts +68 -0
- package/types/base/utils.d.ts +4 -0
- package/types/base.d.ts +1 -0
- package/types/capacitor.base.config.d.ts +3 -0
- package/types/client/capacitor.d.ts +233 -0
- package/types/client/clientRuntime.d.ts +63 -0
- package/types/client/cookie.d.ts +33 -0
- package/types/client/createFont.d.ts +6 -0
- package/types/client/csrTypes.d.ts +262 -0
- package/types/client/decorators.d.ts +7 -0
- package/types/client/device.d.ts +41 -0
- package/types/client/fetch.d.ts +1 -0
- package/types/client/index.d.ts +14 -0
- package/types/client/locale.d.ts +5 -0
- package/types/client/makePageProto.d.ts +17002 -0
- package/types/client/router.d.ts +66 -0
- package/types/client/rscNavigation.d.ts +19 -0
- package/types/client/storage.d.ts +5 -0
- package/types/client/translator.d.ts +18 -0
- package/types/client/types.d.ts +145 -0
- package/types/client/useClient.d.ts +1 -0
- package/types/client.d.ts +1 -0
- package/types/common/Logger.d.ts +41 -0
- package/types/common/applyMixins.d.ts +3 -0
- package/types/common/capitalize.d.ts +2 -0
- package/types/common/deepObjectify.d.ts +4 -0
- package/types/common/fileUpload.d.ts +28 -0
- package/types/common/formatNumber.d.ts +1 -0
- package/types/common/formatPhone.d.ts +2 -0
- package/types/common/getAllPropertyDescriptors.d.ts +5 -0
- package/types/common/hmrPhase.d.ts +6 -0
- package/types/common/httpClient.d.ts +20 -0
- package/types/common/index.d.ts +29 -0
- package/types/common/isDayjs.d.ts +2 -0
- package/types/common/isEmail.d.ts +2 -0
- package/types/common/isPhoneNumber.d.ts +2 -0
- package/types/common/isQueryEqual.d.ts +1 -0
- package/types/common/isValidDate.d.ts +2 -0
- package/types/common/jwtDecode.d.ts +2 -0
- package/types/common/localeConfig.d.ts +11 -0
- package/types/common/lowerlize.d.ts +2 -0
- package/types/common/mergeVersion.d.ts +10 -0
- package/types/common/objectify.d.ts +1 -0
- package/types/common/pathGet.d.ts +1 -0
- package/types/common/pathSet.d.ts +3 -0
- package/types/common/randomPick.d.ts +1 -0
- package/types/common/randomPicks.d.ts +1 -0
- package/types/common/routeConvention.d.ts +35 -0
- package/types/common/sleep.d.ts +2 -0
- package/types/common/splitVersion.d.ts +11 -0
- package/types/common/subRoute.d.ts +7 -0
- package/types/common/types.d.ts +14 -0
- package/types/common.d.ts +1 -0
- package/types/constant/constantRegistry.d.ts +89 -0
- package/types/constant/crystalize.d.ts +4 -0
- package/types/constant/deserialize.d.ts +7 -0
- package/types/constant/fieldInfo.d.ts +153 -0
- package/types/constant/getDefault.d.ts +3 -0
- package/types/constant/immerify.d.ts +2 -0
- package/types/constant/index.d.ts +10 -0
- package/types/constant/purify.d.ts +12 -0
- package/types/constant/serialize.d.ts +11 -0
- package/types/constant/types.d.ts +77 -0
- package/types/constant/via.d.ts +52 -0
- package/types/constant.d.ts +1 -0
- package/types/dictionary/base.dictionary.d.ts +1 -0
- package/types/dictionary/dictInfo.d.ts +206 -0
- package/types/dictionary/dictionary.d.ts +11 -0
- package/types/dictionary/index.d.ts +4 -0
- package/types/dictionary/locale.d.ts +128 -0
- package/types/dictionary/trans.d.ts +82 -0
- package/types/dictionary.d.ts +1 -0
- package/types/document/by.d.ts +20 -0
- package/types/document/dataLoader.d.ts +36 -0
- package/types/document/database.d.ts +96 -0
- package/types/document/databaseRegistry.d.ts +36 -0
- package/types/document/documentQuery.d.ts +105 -0
- package/types/document/documentSchema.d.ts +33 -0
- package/types/document/filterMeta.d.ts +84 -0
- package/types/document/index.d.ts +11 -0
- package/types/document/into.d.ts +65 -0
- package/types/document/loaderInfo.d.ts +35 -0
- package/types/document/schema.d.ts +5 -0
- package/types/document/types.d.ts +36 -0
- package/types/document.d.ts +1 -0
- package/types/fetch/client/fetchClient.d.ts +78 -0
- package/types/fetch/client/httpClient.d.ts +39 -0
- package/types/fetch/client/index.d.ts +3 -0
- package/types/fetch/client/wsClient.d.ts +37 -0
- package/types/fetch/client.d.ts +1 -0
- package/types/fetch/fetchType/appliedReturn.type.d.ts +67 -0
- package/types/fetch/fetchType/buildFetch.type.d.ts +11 -0
- package/types/fetch/fetchType/clientSignal.type.d.ts +16 -0
- package/types/fetch/fetchType/endpointFetch.type.d.ts +29 -0
- package/types/fetch/fetchType/index.d.ts +5 -0
- package/types/fetch/fetchType/sliceFetch.type.d.ts +76 -0
- package/types/fetch/fetchType.d.ts +1 -0
- package/types/fetch/index.d.ts +4 -0
- package/types/fetch/requestStorage.d.ts +29 -0
- package/types/fetch/serializer/fetch.serializer.d.ts +14 -0
- package/types/fetch/serializer/index.d.ts +1 -0
- package/types/fetch/serializer.d.ts +1 -0
- package/types/fetch/types.d.ts +19 -0
- package/types/fetch.d.ts +1 -0
- package/types/index.d.ts +213 -0
- package/types/server/akanApp.d.ts +17 -0
- package/types/server/akanAppHeaders.d.ts +1 -0
- package/types/server/akanLib.d.ts +33 -0
- package/types/server/akanOption.d.ts +15 -0
- package/types/server/akanServer.d.ts +47 -0
- package/types/server/artifact/builderRpc.d.ts +42 -0
- package/types/server/artifact/index.d.ts +6 -0
- package/types/server/artifact/ipcTypes.d.ts +73 -0
- package/types/server/artifact/manifestTypes.d.ts +16 -0
- package/types/server/artifact/routeClientCache.d.ts +45 -0
- package/types/server/artifact/routeSeedIndexStore.d.ts +43 -0
- package/types/server/artifact/routesManifestStore.d.ts +16 -0
- package/types/server/artifact.d.ts +1 -0
- package/types/server/decorators.d.ts +6 -0
- package/types/server/di/diLifecycle.d.ts +45 -0
- package/types/server/di/index.d.ts +4 -0
- package/types/server/di/predefinedAdaptor.d.ts +33 -0
- package/types/server/di/resolveAdaptorHierarchy.d.ts +21 -0
- package/types/server/di/resolveHierarchy.d.ts +11 -0
- package/types/server/di/resolveServiceHierarchy.d.ts +13 -0
- package/types/server/di/utils.d.ts +14 -0
- package/types/server/di.d.ts +1 -0
- package/types/server/hmr/changeBatch.d.ts +13 -0
- package/types/server/hmr/clientScript.d.ts +1 -0
- package/types/server/hmr/devHmrController.d.ts +24 -0
- package/types/server/hmr/index.d.ts +4 -0
- package/types/server/hmr/wsHub.d.ts +45 -0
- package/types/server/hmr.d.ts +1 -0
- package/types/server/imageOptimizer.d.ts +12 -0
- package/types/server/imageOptimizerError.d.ts +4 -0
- package/types/server/index.d.ts +14 -0
- package/types/server/lifecycle/shutdownManager.d.ts +13 -0
- package/types/server/logging/rotatingLogWriter.d.ts +20 -0
- package/types/server/processMetricsCollector.d.ts +10 -0
- package/types/server/proxy/akanResponse.d.ts +7 -0
- package/types/server/proxy/bunRequestFields.d.ts +1 -0
- package/types/server/proxy/hostBasePathWebProxy.d.ts +6 -0
- package/types/server/proxy/index.d.ts +6 -0
- package/types/server/proxy/localeWebProxy.d.ts +5 -0
- package/types/server/proxy/types.d.ts +37 -0
- package/types/server/proxy/webProxyRunner.d.ts +7 -0
- package/types/server/proxy.d.ts +1 -0
- package/types/server/resolver/database.resolver.d.ts +6 -0
- package/types/server/resolver/index.d.ts +3 -0
- package/types/server/resolver/service.resolver.d.ts +7 -0
- package/types/server/resolver/signal.resolver.d.ts +29 -0
- package/types/server/resolver.d.ts +1 -0
- package/types/server/robots.d.ts +1 -0
- package/types/server/routeElementComposer.d.ts +41 -0
- package/types/server/routeTreeBuilder.d.ts +28 -0
- package/types/server/routing/apiRouter.d.ts +61 -0
- package/types/server/rscClient.d.ts +15 -0
- package/types/server/rscWorker.d.ts +3 -0
- package/types/server/rscWorkerHost.d.ts +83 -0
- package/types/server/sitemap.d.ts +13 -0
- package/types/server/ssrFromRscRenderer.d.ts +6 -0
- package/types/server/ssrTypes.d.ts +47 -0
- package/types/server/systemPages.d.ts +27 -0
- package/types/server/types/react-server-dom-webpack.d.ts +91 -0
- package/types/server/types.d.ts +67 -0
- package/types/server/vendor/akanjs-base.d.ts +1 -0
- package/types/server/vendor/akanjs-common.d.ts +1 -0
- package/types/server/vendor/akanjs-constant.d.ts +1 -0
- package/types/server/vendor/akanjs-store.d.ts +1 -0
- package/types/server/vendor/react-dom-client.d.ts +3 -0
- package/types/server/vendor/react-dom.d.ts +3 -0
- package/types/server/vendor/react-jsx-dev-runtime.d.ts +3 -0
- package/types/server/vendor/react-jsx-runtime.d.ts +3 -0
- package/types/server/vendor/react-refresh-runtime.d.ts +3 -0
- package/types/server/vendor/react-server-dom-webpack-client-browser.d.ts +3 -0
- package/types/server/vendor/react.d.ts +11 -0
- package/types/server/vendor/scheduler.d.ts +3 -0
- package/types/server/webRouter.d.ts +44 -0
- package/types/server.d.ts +1 -0
- package/types/service/adapt.d.ts +15 -0
- package/types/service/base.service.d.ts +18 -0
- package/types/service/index.d.ts +10 -0
- package/types/service/injectInfo.d.ts +102 -0
- package/types/service/ipcTypes.d.ts +194 -0
- package/types/service/predefinedAdaptor/cache.adaptor.d.ts +46 -0
- package/types/service/predefinedAdaptor/compress.adaptor.d.ts +22 -0
- package/types/service/predefinedAdaptor/database.adaptor.d.ts +329 -0
- package/types/service/predefinedAdaptor/index.d.ts +13 -0
- package/types/service/predefinedAdaptor/logging.adaptor.d.ts +20 -0
- package/types/service/predefinedAdaptor/queue.adaptor.d.ts +22 -0
- package/types/service/predefinedAdaptor/role.adaptor.d.ts +17 -0
- package/types/service/predefinedAdaptor/schedule.adaptor.d.ts +60 -0
- package/types/service/predefinedAdaptor/solidCache.adaptor.d.ts +25 -0
- package/types/service/predefinedAdaptor/solidPubsub.adaptor.d.ts +20 -0
- package/types/service/predefinedAdaptor/solidQueue.adaptor.d.ts +19 -0
- package/types/service/predefinedAdaptor/solidSqlite.d.ts +24 -0
- package/types/service/predefinedAdaptor/sqlitePath.d.ts +9 -0
- package/types/service/predefinedAdaptor/storage.adaptor.d.ts +80 -0
- package/types/service/predefinedAdaptor/websocket.adaptor.d.ts +49 -0
- package/types/service/predefinedAdaptor.d.ts +1 -0
- package/types/service/serve.d.ts +31 -0
- package/types/service/serviceModule.d.ts +50 -0
- package/types/service/serviceRegistry.d.ts +9 -0
- package/types/service/types.d.ts +55 -0
- package/types/service.d.ts +1 -0
- package/types/signal/base.signal.d.ts +41 -0
- package/types/signal/endpoint.d.ts +28 -0
- package/types/signal/endpointInfo.d.ts +77 -0
- package/types/signal/exception.d.ts +54786 -0
- package/types/signal/guard.d.ts +10 -0
- package/types/signal/guards.d.ts +10 -0
- package/types/signal/index.d.ts +19 -0
- package/types/signal/intercept.d.ts +17 -0
- package/types/signal/internal.d.ts +18 -0
- package/types/signal/internalArg.d.ts +31 -0
- package/types/signal/internalInfo.d.ts +45 -0
- package/types/signal/middleware.d.ts +51 -0
- package/types/signal/serializer/fetch.serializer.d.ts +14 -0
- package/types/signal/serializer/index.d.ts +1 -0
- package/types/signal/serializer.d.ts +1 -0
- package/types/signal/serverSignal.d.ts +36 -0
- package/types/signal/signalContext.d.ts +96 -0
- package/types/signal/signalRegistry.d.ts +49 -0
- package/types/signal/slice.d.ts +42 -0
- package/types/signal/sliceInfo.d.ts +51 -0
- package/types/signal/trace.d.ts +97 -0
- package/types/signal/types.d.ts +142 -0
- package/types/signal.d.ts +1 -0
- package/types/store/action.d.ts +145 -0
- package/types/store/baseSt.d.ts +412 -0
- package/types/store/hooks.d.ts +1 -0
- package/types/store/index.d.ts +8 -0
- package/types/store/rootStore.d.ts +22 -0
- package/types/store/state.d.ts +91 -0
- package/types/store/stateBuilder.d.ts +141 -0
- package/types/store/stateInfo.d.ts +23 -0
- package/types/store/store.d.ts +36 -0
- package/types/store/storeInstance.d.ts +38 -0
- package/types/store/storeRegistry.d.ts +13 -0
- package/types/store/types.d.ts +42 -0
- package/types/store/withSelector.d.ts +42 -0
- package/types/store.d.ts +1 -0
- package/types/test/index.d.ts +4 -0
- package/types/test/playwright.config.base.d.ts +9 -0
- package/types/test/playwright.pageAgent.d.ts +12 -0
- package/types/test/sample.d.ts +15 -0
- package/types/test/sampleOf.d.ts +5 -0
- package/types/test/signalTest.preload.d.ts +1 -0
- package/types/test/signalTestRuntime.d.ts +29 -0
- package/types/test/testServer.d.ts +26 -0
- package/types/test.d.ts +1 -0
- package/types/ui/BottomSheet.d.ts +13 -0
- package/types/ui/Button.d.ts +11 -0
- package/types/ui/ClientSide.d.ts +8 -0
- package/types/ui/Clipboard.d.ts +7 -0
- package/types/ui/Constant/Doc.d.ts +29 -0
- package/types/ui/Constant/Mermaid.d.ts +8 -0
- package/types/ui/Constant/index.d.ts +6 -0
- package/types/ui/Constant/schemaDoc.d.ts +84 -0
- package/types/ui/Constant.d.ts +1 -0
- package/types/ui/Copy.d.ts +10 -0
- package/types/ui/CsrImage.d.ts +18 -0
- package/types/ui/Data/CardList.d.ts +36 -0
- package/types/ui/Data/Dashboard.d.ts +11 -0
- package/types/ui/Data/Insight.d.ts +9 -0
- package/types/ui/Data/Item.d.ts +75 -0
- package/types/ui/Data/ListContainer.d.ts +49 -0
- package/types/ui/Data/Pagination.d.ts +9 -0
- package/types/ui/Data/QueryMaker.d.ts +8 -0
- package/types/ui/Data/TableList.d.ts +26 -0
- package/types/ui/Data/index.d.ts +9 -0
- package/types/ui/Data/index_.d.ts +8 -0
- package/types/ui/Data.d.ts +1 -0
- package/types/ui/DatePicker.d.ts +36 -0
- package/types/ui/Dialog/Action.d.ts +5 -0
- package/types/ui/Dialog/Close.d.ts +6 -0
- package/types/ui/Dialog/Content.d.ts +6 -0
- package/types/ui/Dialog/Modal.d.ts +9 -0
- package/types/ui/Dialog/Provider.d.ts +11 -0
- package/types/ui/Dialog/Title.d.ts +5 -0
- package/types/ui/Dialog/Trigger.d.ts +6 -0
- package/types/ui/Dialog/context.d.ts +10 -0
- package/types/ui/Dialog/index.d.ts +9 -0
- package/types/ui/Dialog.d.ts +1 -0
- package/types/ui/DragAction.d.ts +24 -0
- package/types/ui/DraggableList.d.ts +31 -0
- package/types/ui/Dropdown.d.ts +14 -0
- package/types/ui/Empty.d.ts +12 -0
- package/types/ui/Field.d.ts +411 -0
- package/types/ui/FontFace.d.ts +6 -0
- package/types/ui/Image.d.ts +49 -0
- package/types/ui/InfiniteScroll.d.ts +10 -0
- package/types/ui/Input.d.ts +95 -0
- package/types/ui/KeyboardAvoiding.d.ts +8 -0
- package/types/ui/Layout/BottomAction.d.ts +6 -0
- package/types/ui/Layout/BottomInset.d.ts +7 -0
- package/types/ui/Layout/BottomTab.d.ts +14 -0
- package/types/ui/Layout/Header.d.ts +8 -0
- package/types/ui/Layout/LeftSider.d.ts +9 -0
- package/types/ui/Layout/Navbar.d.ts +11 -0
- package/types/ui/Layout/RightSider.d.ts +10 -0
- package/types/ui/Layout/Sider.d.ts +7 -0
- package/types/ui/Layout/Template.d.ts +7 -0
- package/types/ui/Layout/TopLeftAction.d.ts +6 -0
- package/types/ui/Layout/Unit.d.ts +9 -0
- package/types/ui/Layout/View.d.ts +8 -0
- package/types/ui/Layout/Zone.d.ts +6 -0
- package/types/ui/Layout/index.d.ts +14 -0
- package/types/ui/Layout.d.ts +1 -0
- package/types/ui/Link/Back.d.ts +7 -0
- package/types/ui/Link/Close.d.ts +7 -0
- package/types/ui/Link/CsrLink.d.ts +2 -0
- package/types/ui/Link/Lang.d.ts +8 -0
- package/types/ui/Link/SsrLink.d.ts +2 -0
- package/types/ui/Link/index.d.ts +10 -0
- package/types/ui/Link/types.d.ts +42 -0
- package/types/ui/Link.d.ts +1 -0
- package/types/ui/Load/Edit.d.ts +4 -0
- package/types/ui/Load/Edit_Client.d.ts +27 -0
- package/types/ui/Load/Page.d.ts +15 -0
- package/types/ui/Load/PageCSR.d.ts +3 -0
- package/types/ui/Load/Pagination.d.ts +8 -0
- package/types/ui/Load/Units.d.ts +30 -0
- package/types/ui/Load/View.d.ts +22 -0
- package/types/ui/Load/index.d.ts +8 -0
- package/types/ui/Load/index_.d.ts +3 -0
- package/types/ui/Load.d.ts +1 -0
- package/types/ui/Loading/Area.d.ts +1 -0
- package/types/ui/Loading/Button.d.ts +7 -0
- package/types/ui/Loading/Input.d.ts +7 -0
- package/types/ui/Loading/ProgressBar.d.ts +6 -0
- package/types/ui/Loading/Skeleton.d.ts +7 -0
- package/types/ui/Loading/Spin.d.ts +7 -0
- package/types/ui/Loading/index.d.ts +8 -0
- package/types/ui/Loading.d.ts +1 -0
- package/types/ui/Menu.d.ts +26 -0
- package/types/ui/Modal.d.ts +19 -0
- package/types/ui/Model/AdminPanel.d.ts +31 -0
- package/types/ui/Model/Edit.d.ts +16 -0
- package/types/ui/Model/EditModal.d.ts +52 -0
- package/types/ui/Model/EditWrapper.d.ts +13 -0
- package/types/ui/Model/LoadInit.d.ts +10 -0
- package/types/ui/Model/New.d.ts +16 -0
- package/types/ui/Model/NewWrapper.d.ts +13 -0
- package/types/ui/Model/NewWrapper_Client.d.ts +13 -0
- package/types/ui/Model/Remove.d.ts +13 -0
- package/types/ui/Model/RemoveWrapper.d.ts +12 -0
- package/types/ui/Model/SureToRemove.d.ts +11 -0
- package/types/ui/Model/View.d.ts +19 -0
- package/types/ui/Model/ViewEditModal.d.ts +12 -0
- package/types/ui/Model/ViewModal.d.ts +14 -0
- package/types/ui/Model/ViewWrapper.d.ts +12 -0
- package/types/ui/Model/index.d.ts +16 -0
- package/types/ui/Model/index_.d.ts +14 -0
- package/types/ui/Model.d.ts +1 -0
- package/types/ui/More.d.ts +12 -0
- package/types/ui/ObjectId.d.ts +5 -0
- package/types/ui/Pagination.d.ts +20 -0
- package/types/ui/Popconfirm.d.ts +28 -0
- package/types/ui/Portal.d.ts +6 -0
- package/types/ui/Radio.d.ts +19 -0
- package/types/ui/RecentTime.d.ts +12 -0
- package/types/ui/Refresh.d.ts +7 -0
- package/types/ui/ScreenNavigator.d.ts +18 -0
- package/types/ui/Select.d.ts +43 -0
- package/types/ui/Signal/Arg.d.ts +78 -0
- package/types/ui/Signal/Doc.d.ts +33 -0
- package/types/ui/Signal/Listener.d.ts +9 -0
- package/types/ui/Signal/Message.d.ts +23 -0
- package/types/ui/Signal/Object.d.ts +20 -0
- package/types/ui/Signal/PubSub.d.ts +24 -0
- package/types/ui/Signal/Request.d.ts +8 -0
- package/types/ui/Signal/Response.d.ts +14 -0
- package/types/ui/Signal/RestApi.d.ts +40 -0
- package/types/ui/Signal/WebSocket.d.ts +11 -0
- package/types/ui/Signal/index.d.ts +18 -0
- package/types/ui/Signal/makeExample.d.ts +4 -0
- package/types/ui/Signal/style.d.ts +15 -0
- package/types/ui/Signal.d.ts +1 -0
- package/types/ui/System/CSR.d.ts +32 -0
- package/types/ui/System/Client.d.ts +47 -0
- package/types/ui/System/Common.d.ts +47 -0
- package/types/ui/System/DevModeToggle.d.ts +1 -0
- package/types/ui/System/Gtag.d.ts +4 -0
- package/types/ui/System/Messages.d.ts +1 -0
- package/types/ui/System/Reconnect.d.ts +1 -0
- package/types/ui/System/Root.d.ts +6 -0
- package/types/ui/System/SSR.d.ts +24 -0
- package/types/ui/System/SelectLanguage.d.ts +5 -0
- package/types/ui/System/ThemeToggle.d.ts +4 -0
- package/types/ui/System/index.d.ts +12 -0
- package/types/ui/System.d.ts +1 -0
- package/types/ui/Tab/Menu.d.ts +12 -0
- package/types/ui/Tab/Menus.d.ts +6 -0
- package/types/ui/Tab/Panel.d.ts +8 -0
- package/types/ui/Tab/Provider.d.ts +10 -0
- package/types/ui/Tab/context.d.ts +9 -0
- package/types/ui/Tab/index.d.ts +7 -0
- package/types/ui/Tab.d.ts +1 -0
- package/types/ui/Table.d.ts +41 -0
- package/types/ui/ToggleSelect.d.ts +33 -0
- package/types/ui/Unauthorized.d.ts +9 -0
- package/types/ui/animated.d.ts +5 -0
- package/types/ui/fontCss.d.ts +11 -0
- package/types/ui/index.d.ts +44 -0
- package/types/ui.d.ts +1 -0
- package/types/webkit/bootCsr.d.ts +16 -0
- package/types/webkit/createRobotPage.d.ts +15 -0
- package/types/webkit/createSitemapPage.d.ts +4 -0
- package/types/webkit/index.d.ts +17 -0
- package/types/webkit/lazy.d.ts +11 -0
- package/types/webkit/types.d.ts +7 -0
- package/types/webkit/useCamera.d.ts +19 -0
- package/types/webkit/useCodepush.d.ts +16 -0
- package/types/webkit/useContact.d.ts +11 -0
- package/types/webkit/useCsrValues.d.ts +30 -0
- package/types/webkit/useDebounce.d.ts +2 -0
- package/types/webkit/useFetch.d.ts +18 -0
- package/types/webkit/useGeoLocation.d.ts +8 -0
- package/types/webkit/useHistory.d.ts +23 -0
- package/types/webkit/useInterval.d.ts +2 -0
- package/types/webkit/useLocation.d.ts +8 -0
- package/types/webkit/usePurchase.d.ts +19 -0
- package/types/webkit/usePushNoti.d.ts +7 -0
- package/types/webkit/useThrottle.d.ts +2 -0
- package/types/webkit.d.ts +1 -0
- package/ui/BottomSheet.tsx +1 -1
- package/ui/Clipboard.tsx +1 -1
- package/ui/CsrImage.tsx +3 -14
- package/ui/Data/ListContainer.tsx +1 -1
- package/ui/Data/Pagination.tsx +1 -1
- package/ui/Data/QueryMaker.tsx +0 -339
- package/ui/Data/index.ts +0 -1
- package/ui/DatePicker.tsx +1 -95
- package/ui/Dialog/Modal.tsx +1 -1
- package/ui/DraggableList.tsx +5 -5
- package/ui/Field.tsx +2 -3
- package/ui/Image.tsx +2 -3
- package/ui/InfiniteScroll.tsx +0 -1
- package/ui/Input.tsx +1 -8
- package/ui/Layout/BottomTab.tsx +2 -2
- package/ui/Link/SsrLink.tsx +1 -2
- package/ui/Load/Page.tsx +1 -1
- package/ui/Load/PageCSR.tsx +0 -1
- package/ui/Load/Units.tsx +1 -2
- package/ui/Load/View.tsx +1 -2
- package/ui/Menu.tsx +5 -8
- package/ui/Model/EditModal.tsx +2 -5
- package/ui/Popconfirm.tsx +2 -4
- package/ui/ScreenNavigator.tsx +2 -3
- package/ui/Signal/Message.tsx +2 -3
- package/ui/Signal/PubSub.tsx +0 -2
- package/ui/Signal/Response.tsx +1 -1
- package/ui/Signal/WebSocket.tsx +2 -11
- package/ui/System/Client.tsx +7 -41
- package/ui/System/Gtag.tsx +2 -5
- package/ui/System/Messages.tsx +2 -2
- package/ui/System/Reconnect.tsx +5 -6
- package/ui/System/Root.tsx +0 -1
- package/ui/System/SSR.tsx +1 -7
- package/ui/ToggleSelect.tsx +3 -8
- package/ui/Unauthorized.tsx +1 -1
- package/webkit/bootCsr.tsx +3 -6
- package/webkit/lazy.tsx +1 -8
- package/webkit/useCamera.tsx +0 -1
- package/webkit/useCodepush.tsx +4 -9
- package/webkit/useContact.tsx +0 -1
- package/webkit/useCsrValues.ts +6 -10
- package/webkit/useDebounce.ts +2 -2
- package/webkit/usePurchase.tsx +5 -9
- package/webkit/usePushNoti.tsx +0 -1
- package/base/base.test.ts +0 -135
- package/base/baseEnv.test.ts +0 -146
- package/base/primitiveRegistry.test.ts +0 -127
- package/base/symbols.test.ts +0 -29
- package/base/utils.test.ts +0 -30
- package/build.ts +0 -318
- package/capacitor.base.config.test.ts +0 -83
- package/client/client.auth-storage.test.ts +0 -210
- package/client/client.decorators.test.ts +0 -74
- package/client/client.device.test.ts +0 -181
- package/client/client.page.test.tsx +0 -175
- package/client/client.pure.test.ts +0 -146
- package/client/client.router.test.ts +0 -290
- package/common/Logger.test.ts +0 -45
- package/common/formatAndValidation.test.ts +0 -61
- package/common/httpClient.test.ts +0 -91
- package/common/objectPath.test.ts +0 -108
- package/common/routeConvention.test.ts +0 -132
- package/common/runtimeConfig.test.ts +0 -84
- package/constant/constant.test.ts +0 -374
- package/dictionary/dictionary.test.ts +0 -352
- package/document/document.test.ts +0 -698
- package/fetch/fetch.test.ts +0 -838
- package/server/akanApp.test.ts +0 -130
- package/server/akanServer.test.ts +0 -157
- package/server/artifact/routeClientCache.test.ts +0 -265
- package/server/artifact/routeSeedIndex.test.ts +0 -56
- package/server/artifact/routesManifest.test.ts +0 -64
- package/server/di/diLifecycle.contract.test.ts +0 -168
- package/server/logging/rotatingLogWriter.test.ts +0 -119
- package/server/processMetrics.test.ts +0 -24
- package/server/proxy/webProxyRunner.test.ts +0 -66
- package/server/resolver/resolver.contract.test.ts +0 -594
- package/server/robots.test.ts +0 -16
- package/server/routeTree.test.tsx +0 -198
- package/server/routing/apiRouter.test.ts +0 -136
- package/server/sitemap.test.ts +0 -61
- package/server/systemPages.test.tsx +0 -93
- package/server/webRouter.test.ts +0 -49
- package/service/predefinedAdaptor/compress.adaptor.test.ts +0 -184
- package/service/predefinedAdaptor/solidCache.adaptor.test.ts +0 -107
- package/service/predefinedAdaptor/solidSqlite.test.ts +0 -457
- package/service/service.test.ts +0 -732
- package/signal/signal.test.ts +0 -892
- package/store/stateBuilder.test.ts +0 -168
- package/store/store.test.ts +0 -427
- package/tsconfig.json +0 -5
- package/ui/Constant/schemaDoc.test.ts +0 -113
- package/ui/InfiniteScroll.test.tsx +0 -155
- package/ui/System/Common.test.ts +0 -37
- package/webkit/bootCsr.test.tsx +0 -153
- package/webkit/native.test.tsx +0 -341
- package/webkit/webkit.test.tsx +0 -531
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type WebProxyRegistration, type WebProxyRunResult } from "./types.d.ts";
|
|
2
|
+
export declare class WebProxyRunner {
|
|
3
|
+
#private;
|
|
4
|
+
static create(registrations?: WebProxyRegistration[]): WebProxyRunner | null;
|
|
5
|
+
constructor(registrations?: WebProxyRegistration[]);
|
|
6
|
+
run(input: Request): Promise<WebProxyRunResult>;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./proxy/index.d.ts";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ConstantModel } from "akanjs/constant";
|
|
2
|
+
import { type DatabaseInstance, type DatabaseModel } from "akanjs/document";
|
|
3
|
+
import { type AdaptorCls } from "akanjs/service";
|
|
4
|
+
export declare class DatabaseResolver {
|
|
5
|
+
static resolveDatabase(constant: ConstantModel, database: DatabaseModel): AdaptorCls<DatabaseInstance>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ConstantModel } from "akanjs/constant";
|
|
2
|
+
import { type DatabaseModel } from "akanjs/document";
|
|
3
|
+
import type { ServiceCls } from "akanjs/service";
|
|
4
|
+
export declare class ServiceResolver {
|
|
5
|
+
#private;
|
|
6
|
+
static resolveDatabaseService(constant: ConstantModel, database: DatabaseModel, srvRef: ServiceCls): ServiceCls;
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type BaseEnv } from "akanjs/base";
|
|
2
|
+
import { Logger } from "akanjs/common";
|
|
3
|
+
import { type InjectRegistry, type LiveRegistry, type WebsocketAdaptor } from "akanjs/service";
|
|
4
|
+
import { type Endpoint, type EndpointCls } from "../../signal/endpoint.d.ts";
|
|
5
|
+
import type { Internal, InternalCls } from "../../signal/internal.d.ts";
|
|
6
|
+
import type { MiddlewareCls } from "../../signal/middleware.d.ts";
|
|
7
|
+
import type { ServerSignalCls } from "../../signal/serverSignal.d.ts";
|
|
8
|
+
import type { SliceCls } from "../../signal/slice.d.ts";
|
|
9
|
+
import type { SignalRoutes } from "../types.d.ts";
|
|
10
|
+
export declare class SignalResolver {
|
|
11
|
+
#private;
|
|
12
|
+
static logger: Logger;
|
|
13
|
+
static makeRoomId(key: string, args: unknown[]): string;
|
|
14
|
+
static setLocalPublish(localPublish: (roomId: string, data: object | object[]) => void, websocket: WebsocketAdaptor): void;
|
|
15
|
+
static resolveServerSignal(serverSignalCls: ServerSignalCls, { registry, live }: {
|
|
16
|
+
registry: InjectRegistry;
|
|
17
|
+
live: LiveRegistry;
|
|
18
|
+
}): ServerSignalCls;
|
|
19
|
+
static resolveSchedule(internalCls: InternalCls, internal: Internal, serverMode: "federation" | "batch" | "all"): void;
|
|
20
|
+
static resolveSlice(sliceCls: SliceCls): EndpointCls;
|
|
21
|
+
static resolveEndpoint(endpointCls: EndpointCls, endpoint: Endpoint, { registry, env, live, middleware, }: {
|
|
22
|
+
registry: InjectRegistry;
|
|
23
|
+
env: BaseEnv;
|
|
24
|
+
live: LiveRegistry;
|
|
25
|
+
middleware: Map<string, MiddlewareCls>;
|
|
26
|
+
}): SignalRoutes;
|
|
27
|
+
static handleWsOpen(ws: Bun.ServerWebSocket<any>, registry: InjectRegistry): Promise<void>;
|
|
28
|
+
static handleWsClose(ws: Bun.ServerWebSocket<any>, registry: InjectRegistry): Promise<void>;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./resolver/index.d.ts";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createDefaultRobotsTxt(): string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Head, LayoutFallbackRoute, PathRoute, RouteRender } from "akanjs/client";
|
|
2
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
3
|
+
export declare class RouteElementComposer {
|
|
4
|
+
#private;
|
|
5
|
+
static compose({ pathRoute, params, searchParams, }: {
|
|
6
|
+
pathRoute: PathRoute;
|
|
7
|
+
params: Record<string, string>;
|
|
8
|
+
searchParams: Record<string, string | string[]>;
|
|
9
|
+
}): ReactNode;
|
|
10
|
+
static resolveHead({ pathRoute, params, searchParams, }: {
|
|
11
|
+
pathRoute: PathRoute;
|
|
12
|
+
params: Record<string, string>;
|
|
13
|
+
searchParams: Record<string, string | string[]>;
|
|
14
|
+
}): Promise<Head | null | undefined>;
|
|
15
|
+
static composeFallback({ kind, route, params, searchParams, pathname, error, digest, }: {
|
|
16
|
+
kind: "not-found" | "error";
|
|
17
|
+
route: PathRoute | LayoutFallbackRoute;
|
|
18
|
+
params: Record<string, string>;
|
|
19
|
+
searchParams: Record<string, string | string[]>;
|
|
20
|
+
pathname: string;
|
|
21
|
+
error?: unknown;
|
|
22
|
+
digest?: string;
|
|
23
|
+
}): Promise<ReactNode | null>;
|
|
24
|
+
static composeRenders({ renders, params, searchParams, }: {
|
|
25
|
+
renders: RouteRender[];
|
|
26
|
+
params: Record<string, string>;
|
|
27
|
+
searchParams: Record<string, string | string[]>;
|
|
28
|
+
}): ReactNode;
|
|
29
|
+
static renderAsync({ routeRender, children, params, searchParams, }: {
|
|
30
|
+
routeRender: RouteRender;
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
params: Record<string, string>;
|
|
33
|
+
searchParams: Record<string, string | string[]>;
|
|
34
|
+
}): Promise<ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | (string | number | bigint | boolean | import("react").ReactPortal | ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined)>;
|
|
35
|
+
static AsyncRender: (props: {
|
|
36
|
+
routeRender: RouteRender;
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
params: Record<string, string>;
|
|
39
|
+
searchParams: Record<string, string | string[]>;
|
|
40
|
+
}) => Promise<ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | (string | number | bigint | boolean | import("react").ReactPortal | ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined)>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { LayoutFallbackRoute, PageState, PathRoute, RouteModule } from "akanjs/client";
|
|
2
|
+
export type PagesContext = Record<string, () => Promise<RouteModule>>;
|
|
3
|
+
export declare const defaultPageState: PageState;
|
|
4
|
+
export interface RouteModuleCacheStats {
|
|
5
|
+
moduleCount: number;
|
|
6
|
+
loadedModuleCount: number;
|
|
7
|
+
cacheHits: number;
|
|
8
|
+
cacheMisses: number;
|
|
9
|
+
cacheDisabled: boolean;
|
|
10
|
+
loadedModuleKeys: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare class RouteTreeBuilder {
|
|
13
|
+
#private;
|
|
14
|
+
constructor(context: PagesContext);
|
|
15
|
+
build(): PathRoute[];
|
|
16
|
+
getFallbackRoutes(): LayoutFallbackRoute[];
|
|
17
|
+
static getCacheStats(): RouteModuleCacheStats;
|
|
18
|
+
static resetCacheStats(): void;
|
|
19
|
+
static match(pathname: string, pathRoutes: PathRoute[]): {
|
|
20
|
+
pathRoute: PathRoute;
|
|
21
|
+
params: Record<string, string>;
|
|
22
|
+
} | null;
|
|
23
|
+
static matchFallback(pathname: string, fallbackRoutes: LayoutFallbackRoute[]): {
|
|
24
|
+
fallbackRoute: LayoutFallbackRoute;
|
|
25
|
+
params: Record<string, string>;
|
|
26
|
+
} | null;
|
|
27
|
+
static parseSearchParams(search: string): Record<string, string | string[]>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Logger } from "akanjs/common";
|
|
2
|
+
import type { InjectRegistry } from "akanjs/service";
|
|
3
|
+
import type { HmrWsHub } from "../hmr/wsHub.d.ts";
|
|
4
|
+
import { type WebProxyRunner } from "../proxy.d.ts";
|
|
5
|
+
import type { HttpRoutes, SignalRouteOptions, WebsocketRoutes } from "../types.d.ts";
|
|
6
|
+
/**
|
|
7
|
+
* Minimal render-state view the HMR WS hello message needs.
|
|
8
|
+
* `LazyHmrController` exposes this shape via `state.buildId` / `state.cssAssets`,
|
|
9
|
+
* so the ws handler can greet freshly-connected clients
|
|
10
|
+
* without reaching into the full controller.
|
|
11
|
+
*/
|
|
12
|
+
export interface HmrStateSource {
|
|
13
|
+
readonly state: {
|
|
14
|
+
buildId: number;
|
|
15
|
+
cssAssets?: Record<string, {
|
|
16
|
+
cssUrl: string;
|
|
17
|
+
cssRelPath: string;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export type NonNullHttpRoutes = NonNullable<HttpRoutes>;
|
|
22
|
+
export interface ApiRouteInputs {
|
|
23
|
+
prefix: string;
|
|
24
|
+
websocketPrefix: string;
|
|
25
|
+
routes: HttpRoutes;
|
|
26
|
+
routeOptions?: Record<string, SignalRouteOptions>;
|
|
27
|
+
renderEnvRoutes: HttpRoutes;
|
|
28
|
+
/** Upgrades the incoming request into an app-signal WebSocket. */
|
|
29
|
+
upgradeAppWs: (req: Request, data: {
|
|
30
|
+
createdAt: number;
|
|
31
|
+
}) => boolean;
|
|
32
|
+
webProxyRunner?: WebProxyRunner | null;
|
|
33
|
+
}
|
|
34
|
+
export interface WebsocketHandlersInputs {
|
|
35
|
+
wsRoutes: WebsocketRoutes;
|
|
36
|
+
registry: InjectRegistry;
|
|
37
|
+
hmrHub: HmrWsHub | null;
|
|
38
|
+
hmrState: HmrStateSource | null;
|
|
39
|
+
logger: Logger;
|
|
40
|
+
}
|
|
41
|
+
type WsTaggedData = {
|
|
42
|
+
kind?: string;
|
|
43
|
+
};
|
|
44
|
+
export declare class ApiRouter {
|
|
45
|
+
#private;
|
|
46
|
+
/**
|
|
47
|
+
* Builds the full route table served by `Bun.serve`. Responsibilities:
|
|
48
|
+
* 1. Expose the WS upgrade endpoint at `<prefix><websocketPrefix>`.
|
|
49
|
+
* 2. Prefix every endpoint-generated route with `prefix`.
|
|
50
|
+
* 3. Merge render-env routes (CSR/SSR) last so they can catch-all `/*`.
|
|
51
|
+
*/
|
|
52
|
+
static buildRoutes({ prefix, websocketPrefix, routes, routeOptions, renderEnvRoutes, upgradeAppWs, webProxyRunner, }: ApiRouteInputs): NonNullHttpRoutes;
|
|
53
|
+
/**
|
|
54
|
+
* Builds the `websocket` handler config for `Bun.serve`. Multiplexes two
|
|
55
|
+
* logical channels on the same upgrade port:
|
|
56
|
+
* - `kind === "akan-hmr"` — dev HMR, delegated to `HmrWsHub`.
|
|
57
|
+
* - everything else — app signal channel, dispatched via `wsRoutes`.
|
|
58
|
+
*/
|
|
59
|
+
static buildWebsocketHandlers({ wsRoutes, registry, hmrHub, hmrState, logger, }: WebsocketHandlersInputs): Bun.WebSocketHandler<WsTaggedData>;
|
|
60
|
+
}
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
var __RSC_CHUNKS__: string[] | undefined;
|
|
3
|
+
var __RSC_CLOSED__: boolean | undefined;
|
|
4
|
+
var __RSC_PUSH__: ((b64: string) => void) | undefined;
|
|
5
|
+
var __RSC_CLOSE__: (() => void) | undefined;
|
|
6
|
+
var __AKAN_RSC_NAVIGATE__: ((href: string, options?: {
|
|
7
|
+
replace?: boolean;
|
|
8
|
+
scrollToTop?: boolean;
|
|
9
|
+
}) => Promise<void>) | undefined;
|
|
10
|
+
var __AKAN_RSC_REFRESH__: ((options?: {
|
|
11
|
+
buildId?: number;
|
|
12
|
+
}) => Promise<void>) | undefined;
|
|
13
|
+
var __AKAN_RSC_CLEAR_CACHE__: (() => void) | undefined;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type AkanI18nConfig } from "akanjs/common";
|
|
2
|
+
import type { AkanTheme } from "akanjs/fetch";
|
|
3
|
+
import type { AkanMetricsReport } from "akanjs/service";
|
|
4
|
+
import type { ClientManifest } from "./artifact.d.ts";
|
|
5
|
+
import type { BaseBuildArtifact, CssAsset } from "./types.d.ts";
|
|
6
|
+
export type RscRedirectMethod = "replace" | "push";
|
|
7
|
+
export type RscRenderResult = {
|
|
8
|
+
type: "stream";
|
|
9
|
+
stream: ReadableStream<Uint8Array>;
|
|
10
|
+
theme?: AkanTheme;
|
|
11
|
+
status?: number;
|
|
12
|
+
} | {
|
|
13
|
+
type: "redirect";
|
|
14
|
+
location: string;
|
|
15
|
+
method: RscRedirectMethod;
|
|
16
|
+
} | {
|
|
17
|
+
type: "not-found";
|
|
18
|
+
};
|
|
19
|
+
export interface RscWorkerReloadInput {
|
|
20
|
+
clientManifest: ClientManifest;
|
|
21
|
+
cssAssets?: Record<string, CssAsset>;
|
|
22
|
+
buildId: number;
|
|
23
|
+
/**
|
|
24
|
+
* When the builder emits a freshly bundled `pages-*.js` the host forwards
|
|
25
|
+
* the new absolute path here so the worker re-imports the new bundle.
|
|
26
|
+
* Undefined means "keep using the current bundle" (e.g. client-manifest-only
|
|
27
|
+
* reload after a lazy route build).
|
|
28
|
+
*/
|
|
29
|
+
pagesBundlePath?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface RscWorkerRestartOptions {
|
|
32
|
+
/** Initial delay before the first restart attempt. Default: 200ms. */
|
|
33
|
+
baseDelayMs?: number;
|
|
34
|
+
/** Upper bound for the exponential backoff. Default: 30s. */
|
|
35
|
+
maxDelayMs?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Give up after this many consecutive failed restarts. `undefined` (default)
|
|
38
|
+
* means retry forever so a short-lived supervisor outage doesn't wedge the
|
|
39
|
+
* SSR path permanently.
|
|
40
|
+
*/
|
|
41
|
+
maxAttempts?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface RscWorkerOptions {
|
|
44
|
+
clientManifest: ClientManifest;
|
|
45
|
+
/**
|
|
46
|
+
* Absolute path to the pre-built server pages bundle. Produced by
|
|
47
|
+
* `akanjs/devkit`'s `PagesBundleBuilder`; the RSC worker imports it with
|
|
48
|
+
* `await import(bundlePath?v=<buildId>)` — no runtime transforms.
|
|
49
|
+
*/
|
|
50
|
+
pagesBundlePath: string;
|
|
51
|
+
/** Initial build id for the pages bundle (see `pagesBundlePath`). */
|
|
52
|
+
pagesBundleBuildId: number;
|
|
53
|
+
cssAssets?: Record<string, CssAsset>;
|
|
54
|
+
i18n?: AkanI18nConfig;
|
|
55
|
+
/** Exponential-backoff settings for automatic crash recovery. */
|
|
56
|
+
restart?: RscWorkerRestartOptions;
|
|
57
|
+
}
|
|
58
|
+
export declare class RscWorker {
|
|
59
|
+
#private;
|
|
60
|
+
readonly ready: Promise<void>;
|
|
61
|
+
constructor(artifact: BaseBuildArtifact);
|
|
62
|
+
render(req: Request): ReadableStream<Uint8Array>;
|
|
63
|
+
renderWithMeta(req: Request, options?: {
|
|
64
|
+
clientManifest?: ClientManifest;
|
|
65
|
+
}): Promise<RscRenderResult>;
|
|
66
|
+
kill(): void;
|
|
67
|
+
getMetrics(): AkanMetricsReport;
|
|
68
|
+
restartWhenIdle(reason: string): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Update just the CSS assets the worker inlines into rendered HTML, without
|
|
71
|
+
* re-importing any pages. Cheap enough to use for CSS-only HMR cycles so
|
|
72
|
+
* a subsequent hard refresh serves the latest hashed stylesheet.
|
|
73
|
+
*/
|
|
74
|
+
updateCssAssets(cssAssets: Record<string, CssAsset>): void;
|
|
75
|
+
/**
|
|
76
|
+
* Apply a new client manifest + CSS assets and instruct the worker to re-import
|
|
77
|
+
* the pages bundle with a bumped cache-bust token. When `pagesBundlePath`
|
|
78
|
+
* is provided the worker switches to the new bundle URL too (the builder
|
|
79
|
+
* emits a fresh hashed filename on every rebundle). Resolves once the
|
|
80
|
+
* worker has acknowledged via `reloaded`.
|
|
81
|
+
*/
|
|
82
|
+
reload(input: RscWorkerReloadInput): Promise<void>;
|
|
83
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AkanI18nConfig } from "akanjs/common";
|
|
2
|
+
import type { RouteSeedEntry } from "./artifact.d.ts";
|
|
3
|
+
export interface DefaultSitemapOptions {
|
|
4
|
+
origin: string;
|
|
5
|
+
basePath?: string | null;
|
|
6
|
+
entries: RouteSeedEntry[];
|
|
7
|
+
i18n: AkanI18nConfig;
|
|
8
|
+
}
|
|
9
|
+
export declare function createSitemapXml(urls: string[]): string;
|
|
10
|
+
export declare function createDefaultSitemapXml({ origin, basePath, entries, i18n }: DefaultSitemapOptions): string;
|
|
11
|
+
export declare function createDefaultSitemapUrls({ origin, basePath, entries, i18n }: DefaultSitemapOptions): string[];
|
|
12
|
+
export declare function isSitemapPath(pathname: string, basePaths: readonly string[]): boolean;
|
|
13
|
+
export declare function getSitemapBasePath(pathname: string, basePaths: readonly string[], headerBasePath?: string | null): string | null | undefined;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AkanTheme } from "akanjs/fetch";
|
|
2
|
+
export interface SsrManifestEntry {
|
|
3
|
+
id: string;
|
|
4
|
+
chunks: string[];
|
|
5
|
+
name: string;
|
|
6
|
+
async?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SsrManifest {
|
|
9
|
+
moduleLoading: {
|
|
10
|
+
prefix: string;
|
|
11
|
+
crossOrigin?: string;
|
|
12
|
+
} | null;
|
|
13
|
+
moduleMap: Record<string, Record<string, SsrManifestEntry>>;
|
|
14
|
+
}
|
|
15
|
+
export interface SsrChunkRegistryStats {
|
|
16
|
+
ssrChunkRegistrySize: number;
|
|
17
|
+
ssrChunkLoadCount: number;
|
|
18
|
+
ssrChunkCacheHitCount: number;
|
|
19
|
+
}
|
|
20
|
+
export interface SsrFromRscInput {
|
|
21
|
+
request?: Request;
|
|
22
|
+
rscStream: ReadableStream<Uint8Array>;
|
|
23
|
+
ssrManifest: SsrManifest;
|
|
24
|
+
bootstrapModules?: string[];
|
|
25
|
+
/** Extra inline JS appended to the framework's bootstrap script. The HMR
|
|
26
|
+
* dev client lives here so the browser wires up its reload channel before
|
|
27
|
+
* any application module evaluates. */
|
|
28
|
+
extraBootstrapInline?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Bare specifier -> served URL mapping for the `<script type="importmap">`
|
|
31
|
+
* the HTML stream should prepend to `<head>`. Used so per-route client
|
|
32
|
+
* chunks (which externalize `react`, `react-dom/client`, ...) resolve
|
|
33
|
+
* those specifiers to the base build's vendor entries at load time,
|
|
34
|
+
* guaranteeing one React instance across rscClient and every route
|
|
35
|
+
* chunk.
|
|
36
|
+
*
|
|
37
|
+
* Injection happens via a stream transform, not React children, because
|
|
38
|
+
* React Fizz hoists `<link rel="modulepreload">` (generated from
|
|
39
|
+
* `bootstrapModules`) to the top of `<head>`, which would otherwise sit
|
|
40
|
+
* before any importmap rendered via JSX. The spec is strict: import maps
|
|
41
|
+
* must be acquired before any module script fetch starts, including
|
|
42
|
+
* modulepreload.
|
|
43
|
+
*/
|
|
44
|
+
importmap?: Record<string, string>;
|
|
45
|
+
theme?: AkanTheme;
|
|
46
|
+
injectThemeInitScript?: boolean;
|
|
47
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AkanI18nConfig } from "akanjs/common";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export type SystemPageKind = "not-found" | "error";
|
|
4
|
+
export interface SystemPageOptions {
|
|
5
|
+
kind: SystemPageKind;
|
|
6
|
+
pathname: string;
|
|
7
|
+
homeHref: string;
|
|
8
|
+
lang?: string;
|
|
9
|
+
stylesheetHref?: string | null;
|
|
10
|
+
showDetails?: boolean;
|
|
11
|
+
error?: unknown;
|
|
12
|
+
}
|
|
13
|
+
export interface SystemPageResponseOptions extends SystemPageOptions {
|
|
14
|
+
method?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface SystemPageHomeHrefOptions {
|
|
17
|
+
pathname: string;
|
|
18
|
+
i18n?: AkanI18nConfig;
|
|
19
|
+
basePaths?: Iterable<string>;
|
|
20
|
+
headerBasePath?: string | null;
|
|
21
|
+
}
|
|
22
|
+
export declare function createSystemPageDocument(options: SystemPageOptions): ReactNode;
|
|
23
|
+
export declare function createSystemPageResponse(options: SystemPageResponseOptions): Promise<Response>;
|
|
24
|
+
export declare function createSystemPageHeaders(): Headers;
|
|
25
|
+
export declare function createSystemPageFallbackText(kind: SystemPageKind): string;
|
|
26
|
+
export declare function getSystemPageErrorDetails(error: unknown): string;
|
|
27
|
+
export declare function getSystemPageHomeHref({ pathname, i18n, basePaths, headerBasePath, }: SystemPageHomeHrefOptions): string;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
declare module "react-server-dom-webpack/server.node" {
|
|
4
|
+
export interface ClientReferenceManifestEntry {
|
|
5
|
+
id: string;
|
|
6
|
+
chunks: string[];
|
|
7
|
+
name: string;
|
|
8
|
+
async?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type ClientManifest = Record<string, ClientReferenceManifestEntry>;
|
|
12
|
+
|
|
13
|
+
export function renderToReadableStream(
|
|
14
|
+
model: unknown,
|
|
15
|
+
clientManifest?: ClientManifest,
|
|
16
|
+
options?: {
|
|
17
|
+
environmentName?: string;
|
|
18
|
+
filterStackFrame?: (url: string, functionName: string) => boolean;
|
|
19
|
+
onError?: (error: unknown) => string | undefined;
|
|
20
|
+
onPostpone?: (reason: string) => void;
|
|
21
|
+
identifierPrefix?: string;
|
|
22
|
+
temporaryReferences?: unknown;
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
},
|
|
25
|
+
): Promise<ReadableStream<Uint8Array>>;
|
|
26
|
+
|
|
27
|
+
export function registerClientReference<T>(proxyImplementation: T, id: string, exportName: string): T;
|
|
28
|
+
|
|
29
|
+
export function registerServerReference<T>(reference: T, id: string, exportName: string | null): T;
|
|
30
|
+
|
|
31
|
+
export function decodeReply<T = unknown>(
|
|
32
|
+
body: string | FormData,
|
|
33
|
+
webpackMap?: unknown,
|
|
34
|
+
options?: { temporaryReferences?: unknown },
|
|
35
|
+
): Promise<T>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare module "react-server-dom-webpack/client.node" {
|
|
39
|
+
import type { ReactNode } from "react";
|
|
40
|
+
|
|
41
|
+
export interface SSRManifestEntry {
|
|
42
|
+
id: string;
|
|
43
|
+
chunks: string[];
|
|
44
|
+
name: string;
|
|
45
|
+
async?: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface SSRManifest {
|
|
49
|
+
moduleLoading: { prefix: string; crossOrigin?: string } | null;
|
|
50
|
+
moduleMap: Record<string, Record<string, SSRManifestEntry>>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function createFromNodeStream<T = ReactNode>(
|
|
54
|
+
stream: NodeJS.ReadableStream,
|
|
55
|
+
ssrManifest: SSRManifest,
|
|
56
|
+
options?: {
|
|
57
|
+
nonce?: string;
|
|
58
|
+
encodeFormAction?: unknown;
|
|
59
|
+
temporaryReferences?: unknown;
|
|
60
|
+
findSourceMapURL?: (fileName: string) => string | null;
|
|
61
|
+
replayConsoleLogs?: boolean;
|
|
62
|
+
environmentName?: string;
|
|
63
|
+
},
|
|
64
|
+
): PromiseLike<T>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare module "react-server-dom-webpack/client.browser" {
|
|
68
|
+
import type { ReactNode } from "react";
|
|
69
|
+
|
|
70
|
+
interface ClientOptions {
|
|
71
|
+
serverConsumerManifest?: unknown;
|
|
72
|
+
nonce?: string;
|
|
73
|
+
encodeFormAction?: unknown;
|
|
74
|
+
temporaryReferences?: unknown;
|
|
75
|
+
findSourceMapURL?: (fileName: string) => string | null;
|
|
76
|
+
replayConsoleLogs?: boolean;
|
|
77
|
+
environmentName?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function createFromReadableStream<T = ReactNode>(
|
|
81
|
+
stream: ReadableStream<Uint8Array>,
|
|
82
|
+
options?: ClientOptions,
|
|
83
|
+
): PromiseLike<T>;
|
|
84
|
+
|
|
85
|
+
export function createFromFetch<T = ReactNode>(response: Promise<Response>, options?: ClientOptions): PromiseLike<T>;
|
|
86
|
+
|
|
87
|
+
export function encodeReply(
|
|
88
|
+
value: unknown,
|
|
89
|
+
options?: { temporaryReferences?: unknown; signal?: AbortSignal },
|
|
90
|
+
): Promise<string | FormData>;
|
|
91
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { PromiseOrObject } from "akanjs/base";
|
|
2
|
+
import type { AkanI18nConfig } from "akanjs/common";
|
|
3
|
+
export type WebsocketRoute = (ws: Bun.ServerWebSocket<unknown>, data: unknown[], event?: "message" | "subscribe" | "unsubscribe") => PromiseOrObject<unknown>;
|
|
4
|
+
export type WebsocketRoutes = Record<string, WebsocketRoute>;
|
|
5
|
+
export type HttpRoutes = Bun.Serve.Options<unknown>["routes"];
|
|
6
|
+
export interface SignalRouteOptions {
|
|
7
|
+
globalPrefix?: false;
|
|
8
|
+
}
|
|
9
|
+
export type SignalRoutes = {
|
|
10
|
+
routes: HttpRoutes;
|
|
11
|
+
wsRoutes: WebsocketRoutes;
|
|
12
|
+
routeOptions?: Record<string, SignalRouteOptions>;
|
|
13
|
+
};
|
|
14
|
+
export interface LocalFile {
|
|
15
|
+
filename: string;
|
|
16
|
+
mimetype: string;
|
|
17
|
+
encoding: string;
|
|
18
|
+
localPath: string;
|
|
19
|
+
}
|
|
20
|
+
export type AkanImageFormat = "image/avif" | "image/webp";
|
|
21
|
+
export interface AkanImagePattern {
|
|
22
|
+
protocol?: "http" | "https";
|
|
23
|
+
hostname?: string;
|
|
24
|
+
port?: string;
|
|
25
|
+
pathname?: string;
|
|
26
|
+
search?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface AkanImageConfig {
|
|
29
|
+
deviceSizes: number[];
|
|
30
|
+
imageSizes: number[];
|
|
31
|
+
formats: AkanImageFormat[];
|
|
32
|
+
qualities: number[];
|
|
33
|
+
minimumCacheTTL: number;
|
|
34
|
+
remotePatterns: AkanImagePattern[];
|
|
35
|
+
localPatterns: Pick<AkanImagePattern, "pathname" | "search">[];
|
|
36
|
+
dangerouslyAllowSVG: boolean;
|
|
37
|
+
maximumRedirects: number;
|
|
38
|
+
fetchTimeoutMs: number;
|
|
39
|
+
maxRemoteBytes: number;
|
|
40
|
+
}
|
|
41
|
+
export declare const defaultAkanImageConfig: AkanImageConfig;
|
|
42
|
+
export declare function mergeAkanImageConfig(config?: Partial<AkanImageConfig>): AkanImageConfig;
|
|
43
|
+
export declare function getAkanImageWidths(config: Pick<AkanImageConfig, "deviceSizes" | "imageSizes">): number[];
|
|
44
|
+
export type BaseBuildArtifact = {
|
|
45
|
+
rscClientUrl: string;
|
|
46
|
+
vendorMap: Record<string, string>;
|
|
47
|
+
pagesBundlePath: string;
|
|
48
|
+
pagesBundleBuildId: number;
|
|
49
|
+
cssAssets: Record<string, CssAsset>;
|
|
50
|
+
domains: string[];
|
|
51
|
+
subRoutes: {
|
|
52
|
+
[key: string]: string[];
|
|
53
|
+
};
|
|
54
|
+
basePaths: string[];
|
|
55
|
+
branches: string[];
|
|
56
|
+
i18n: AkanI18nConfig;
|
|
57
|
+
imageConfig: AkanImageConfig;
|
|
58
|
+
};
|
|
59
|
+
export interface CssAsset {
|
|
60
|
+
cssUrl: string;
|
|
61
|
+
cssRelPath: string;
|
|
62
|
+
}
|
|
63
|
+
export interface RenderState {
|
|
64
|
+
buildId: number;
|
|
65
|
+
cssAssets: Record<string, CssAsset>;
|
|
66
|
+
cssBytesByUrl: Record<string, Uint8Array>;
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "akanjs/base";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "akanjs/common";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "akanjs/constant";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "akanjs/store";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as m from "react-dom";
|
|
2
|
+
export default m;
|
|
3
|
+
export declare const __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE: any, createPortal: typeof m.createPortal, flushSync: typeof m.flushSync, preconnect: typeof m.preconnect, prefetchDNS: typeof m.prefetchDNS, preinit: typeof m.preinit, preinitModule: typeof m.preinitModule, preload: typeof m.preload, preloadModule: typeof m.preloadModule, requestFormReset: typeof m.requestFormReset, unstable_batchedUpdates: typeof m.unstable_batchedUpdates, useFormState: typeof m.useFormState, useFormStatus: typeof m.useFormStatus, version: string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as m from "react-server-dom-webpack/client.browser";
|
|
2
|
+
export default m;
|
|
3
|
+
export declare const createFromFetch: typeof m.createFromFetch, createFromReadableStream: typeof m.createFromReadableStream, createServerReference: any, createTemporaryReferenceSet: any, encodeReply: typeof m.encodeReply, registerServerReference: any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as m from "react";
|
|
2
|
+
export default m;
|
|
3
|
+
export declare const Activity: m.ExoticComponent<m.ActivityProps>, Children: {
|
|
4
|
+
map<T, C>(children: C | readonly C[], fn: (child: C, index: number) => T): C extends null | undefined ? C : Array<Exclude<T, boolean | null | undefined>>;
|
|
5
|
+
forEach<C>(children: C | readonly C[], fn: (child: C, index: number) => void): void;
|
|
6
|
+
count(children: any): number;
|
|
7
|
+
only<C>(children: C): C extends any[] ? never : C;
|
|
8
|
+
toArray(children: m.ReactNode | m.ReactNode[]): Array<Exclude<m.ReactNode, boolean | null | undefined>>;
|
|
9
|
+
}, Component: typeof m.Component, Fragment: m.ExoticComponent<m.FragmentProps>, Profiler: m.ExoticComponent<m.ProfilerProps>, PureComponent: typeof m.PureComponent, StrictMode: m.ExoticComponent<{
|
|
10
|
+
children?: m.ReactNode | undefined;
|
|
11
|
+
}>, Suspense: m.ExoticComponent<m.SuspenseProps>, __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE: any, __COMPILER_RUNTIME: any, act: typeof m.act, cache: typeof m.cache, cacheSignal: typeof m.cacheSignal, captureOwnerStack: typeof m.captureOwnerStack, cloneElement: typeof m.cloneElement, createContext: typeof m.createContext, createElement: typeof m.createElement, createRef: typeof m.createRef, forwardRef: typeof m.forwardRef, isValidElement: typeof m.isValidElement, lazy: typeof m.lazy, memo: typeof m.memo, startTransition: typeof m.startTransition, unstable_useCacheRefresh: any, use: typeof m.use, useActionState: typeof m.useActionState, useCallback: typeof m.useCallback, useContext: typeof m.useContext, useDebugValue: typeof m.useDebugValue, useDeferredValue: typeof m.useDeferredValue, useEffect: typeof m.useEffect, useEffectEvent: typeof m.useEffectEvent, useId: typeof m.useId, useImperativeHandle: typeof m.useImperativeHandle, useInsertionEffect: typeof m.useInsertionEffect, useLayoutEffect: typeof m.useLayoutEffect, useMemo: typeof m.useMemo, useOptimistic: typeof m.useOptimistic, useReducer: typeof m.useReducer, useRef: typeof m.useRef, useState: typeof m.useState, useSyncExternalStore: typeof m.useSyncExternalStore, useTransition: typeof m.useTransition, version: string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as m from "scheduler";
|
|
2
|
+
export default m;
|
|
3
|
+
export declare const unstable_IdlePriority: any, unstable_ImmediatePriority: any, unstable_LowPriority: any, unstable_NormalPriority: any, unstable_Profiling: any, unstable_UserBlockingPriority: any, unstable_cancelCallback: any, unstable_forceFrameRate: any, unstable_getCurrentPriorityLevel: any, unstable_next: any, unstable_now: any, unstable_requestPaint: any, unstable_runWithPriority: any, unstable_scheduleCallback: any, unstable_shouldYield: any, unstable_wrapCallback: any;
|