akanjs 3.2.0-rc.2 → 3.2.0-rc.21
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/ARCHITECTURE.md +42 -41
- package/CHANGELOG.md +593 -3
- package/CONTRIBUTING.md +26 -0
- package/base/base.ts +2 -1
- package/client/clientRuntime.ts +1 -0
- package/client/cn.ts +2 -2
- package/client/csrTypes.ts +15 -1
- package/client/frameConfig.ts +5 -2
- package/client/index.ts +249 -26
- package/client/locale.ts +1 -0
- package/client/makePageProto.tsx +33 -82
- package/client/nativeThemeColor.ts +51 -0
- package/client/route/RouteDefinition.ts +24 -7
- package/client/route/RouteGuards.ts +2 -1
- package/client/route/RouteHead.ts +11 -2
- package/client/route/routeArgs.ts +7 -0
- package/client/router.ts +25 -6
- package/client/rscNavigation.ts +3 -3
- package/client/rscRoutePatch.ts +42 -0
- package/client/viewportMeta.ts +34 -4
- package/common/CodeTranscript.ts +1 -1
- package/common/PipelinePlanSchema.ts +2 -2
- package/common/akanGraph.ts +1 -1
- package/common/err.ts +122 -0
- package/common/facetBarrel.ts +38 -0
- package/common/failureCode.ts +18 -0
- package/common/index.ts +9 -0
- package/common/isGuardRefusal.ts +14 -0
- package/common/mcpExposure.ts +17 -4
- package/common/mcpFailure.ts +9 -0
- package/common/pipelinePlan.ts +1 -1
- package/common/restartSchedule.ts +55 -0
- package/common/routeConvention.ts +3 -1
- package/common/types.ts +18 -1
- package/constant/constantRegistry.ts +4 -8
- package/constant/crystalize.ts +1 -2
- package/constant/getDefault.ts +1 -1
- package/constant/immerify.ts +1 -1
- package/constant/index.ts +78 -21
- package/constant/purify.ts +4 -9
- package/constant/serialize.ts +4 -2
- package/constant/types.ts +1 -0
- package/constant/via.ts +1 -2
- package/dictionary/agent.dictionary.ts +4 -0
- package/dictionary/base.dictionary.ts +1 -0
- package/dictionary/locale.ts +1 -1
- package/dictionary/trans.ts +14 -97
- package/document/databaseRegistry.ts +2 -1
- package/document/documentSchema.ts +1 -0
- package/document/filterMeta.ts +4 -1
- package/document/into.ts +2 -1
- package/document/loaderInfo.ts +2 -1
- package/document/noDocumentError.ts +4 -1
- package/document/queryEvaluator.ts +1 -1
- package/document/types.ts +1 -1
- package/fetch/client/fetchClient.ts +87 -270
- package/fetch/client/fetchClientTypes.ts +49 -0
- package/fetch/client/fetchHandle.ts +11 -1
- package/fetch/client/httpClient.ts +14 -2
- package/fetch/client/inflightQueries.ts +17 -0
- package/fetch/client/remoteError.ts +4 -20
- package/fetch/client/requestScope.ts +32 -0
- package/fetch/client/signalCatalog.ts +131 -0
- package/fetch/client/wsClient.ts +11 -0
- package/fetch/index.ts +1 -0
- package/fetch/staleReads.ts +27 -0
- package/fetch/streamedRead.ts +23 -0
- package/package.json +1 -1
- package/server/agentHooks.ts +16 -0
- package/server/akanApp.ts +107 -1272
- package/server/akanOption.ts +17 -4
- package/server/akanServer.ts +167 -675
- package/server/artifact/builderRpc.ts +33 -10
- package/server/artifact/ipcTypes.ts +9 -3
- package/server/artifact/routeSeedIndexStore.ts +4 -2
- package/server/assetHeaders.ts +6 -0
- package/server/console.ts +6 -4
- package/server/decorators.ts +2 -2
- package/server/devtools/README.md +4 -3
- package/server/devtools/devtoolsRouter.ts +9 -5
- package/server/devtools/studio/studioRoute.ts +18 -11
- package/server/di/diLifecycle.ts +24 -35
- package/server/di/predefinedAdaptor.ts +24 -1
- package/server/di/resolveHierarchy.ts +19 -6
- package/server/di/utils.ts +7 -3
- package/server/ed25519Key.ts +31 -15
- package/server/flightRowReader.ts +95 -18
- package/server/gateway/childSupervisor.ts +326 -0
- package/server/gateway/devHostChannel.ts +47 -0
- package/server/gateway/gatewayChildren.ts +135 -0
- package/server/gateway/gatewayConfig.ts +182 -0
- package/server/gateway/gatewayHttpProxy.ts +231 -0
- package/server/gateway/gatewayLogging.ts +111 -0
- package/server/gateway/gatewayRooms.ts +141 -0
- package/server/gateway/gatewayStatus.ts +116 -0
- package/server/gateway/gatewayStatusPage.ts +54 -0
- package/server/gateway/gatewayWebSocketRelay.ts +149 -0
- package/server/head.tsx +4 -19
- package/server/hmr/devHmrController.ts +10 -1
- package/server/htmlResultCache.ts +234 -0
- package/server/imageOptimizer.ts +4 -1
- package/server/index.ts +257 -17
- package/server/lifecycle/parentChannel.ts +78 -0
- package/server/lifecycle/shutdownManager.ts +6 -3
- package/server/lifecycle/startGuard.ts +90 -0
- package/server/logging/logControlSocket.ts +42 -3
- package/server/logging/serverLogging.ts +74 -0
- package/server/machine/machineToken.ts +10 -3
- package/server/mcp/AgentTools.ts +149 -0
- package/server/mcp/AgentToolsAccount.ts +26 -0
- package/server/mcp/McpDispatcher.ts +48 -19
- package/server/mcp/McpPages.ts +21 -6
- package/server/mcp/McpRateLimiter.ts +14 -0
- package/server/mcp/McpRouter.ts +52 -23
- package/server/mcp/McpUiSession.ts +2 -1
- package/server/mcp/index.ts +1 -0
- package/server/nativeFile.ts +30 -11
- package/server/nativeSecret.ts +12 -3
- package/server/oauth/OAuthClientIdMetadata.ts +2 -2
- package/server/ops/opsRoute.ts +5 -1
- package/server/ops/opsToken.ts +3 -1
- package/server/resolver/CascadeRunner.ts +10 -4
- package/server/resolver/database.resolver.ts +10 -417
- package/server/resolver/databaseModelInstance.ts +200 -0
- package/server/resolver/invalidSignal.ts +7 -0
- package/server/resolver/livePause.ts +34 -0
- package/server/resolver/modelFacade.ts +136 -0
- package/server/resolver/modelLoaders.ts +52 -0
- package/server/resolver/modelSchema.ts +52 -0
- package/server/resolver/signal.resolver.ts +92 -116
- package/server/resolver/timedQuery.ts +16 -0
- package/server/resolver/websocketOf.ts +23 -0
- package/server/routeElementComposer.tsx +131 -9
- package/server/routeState.ts +5 -1
- package/server/routeTreeBuilder.ts +22 -9
- package/server/routing/apiRouter.ts +44 -25
- package/server/routing/builtinRoutes.ts +194 -0
- package/server/routing/localRooms.ts +34 -0
- package/server/routing/roomReplay.ts +2 -2
- package/server/routing/serverLimits.ts +4 -1
- package/server/routing/serverListener.ts +194 -0
- package/server/rscClient.tsx +210 -227
- package/server/rscClientCache.ts +165 -0
- package/server/rscClientChunks.ts +209 -0
- package/server/rscClientFetch.ts +15 -3
- package/server/rscClientPatch.ts +78 -15
- package/server/rscDocumentHead.tsx +170 -0
- package/server/rscFlightRenderer.ts +83 -0
- package/server/rscFlightStream.ts +257 -0
- package/server/rscHeadPatch.ts +17 -56
- package/server/rscHostReloads.ts +238 -0
- package/server/rscHostRenderStream.ts +297 -0
- package/server/rscHostRequests.ts +158 -0
- package/server/rscHttp.ts +18 -6
- package/server/rscInlineStream.ts +34 -0
- package/server/rscNavigationState.ts +21 -1
- package/server/rscPagePrompts.ts +11 -5
- package/server/rscParkedRedirect.ts +23 -0
- package/server/rscPatchPlanner.ts +220 -0
- package/server/rscPrefetchCache.ts +68 -32
- package/server/rscRenderControl.ts +33 -0
- package/server/rscRenderFallbacks.ts +297 -0
- package/server/rscRenderHandler.ts +439 -0
- package/server/rscRenderStats.ts +49 -0
- package/server/rscResponse.ts +78 -0
- package/server/rscResultCaches.ts +74 -0
- package/server/rscRouteDocument.tsx +299 -0
- package/server/rscSegmentOutlet.tsx +24 -5
- package/server/rscSegmentOutletReference.ts +14 -12
- package/server/rscWorker.tsx +86 -1392
- package/server/rscWorkerCache.ts +56 -0
- package/server/rscWorkerHost.ts +145 -811
- package/server/rscWorkerProcess.ts +155 -0
- package/server/rscWorkerRecycler.ts +128 -0
- package/server/serverConfig.ts +128 -0
- package/server/serverMetrics.ts +52 -0
- package/server/sitemap.ts +1 -0
- package/server/ssrFromRscRenderer.tsx +20 -20
- package/server/ssrTypes.ts +9 -0
- package/server/webArtifact.ts +86 -0
- package/server/webAssetRoutes.ts +84 -0
- package/server/webCsrSurface.ts +172 -0
- package/server/webDocumentRoute.ts +180 -0
- package/server/webRouteContext.ts +232 -0
- package/server/webRouter.ts +126 -1242
- package/server/webRscRoute.ts +155 -0
- package/server/webSiteFiles.ts +139 -0
- package/server/wellKnownRoutes.ts +73 -0
- package/service/agent.service.ts +59 -5
- package/service/agentAccounts.ts +19 -0
- package/service/agentLoop/agentLoop.ts +387 -0
- package/service/agentLoop/agentLoopTypes.ts +112 -0
- package/service/agentLoop/deltaStream.ts +40 -0
- package/service/agentLoop/loopCompaction.ts +135 -0
- package/service/agentLoop/loopRequest.ts +62 -0
- package/service/agentLoop/loopToolOutput.ts +54 -0
- package/service/agentLoop/loopToolkits.ts +107 -0
- package/service/agentLoop/loopTranscript.ts +102 -0
- package/{signal → service}/agentMeter.ts +83 -15
- package/{signal → service}/agentRelayPolicy.ts +30 -7
- package/service/documentStoreError.ts +16 -0
- package/service/index.ts +7 -0
- package/service/injectError.ts +5 -0
- package/service/injectInfo.ts +30 -18
- package/service/insightQueryError.ts +19 -0
- package/service/ipcTypes.ts +3 -1
- package/service/liveSyncHub.ts +5 -2
- package/service/predefinedAdaptor/agentTools.adaptor.ts +34 -0
- package/service/predefinedAdaptor/anthropicLlm.ts +52 -21
- package/service/predefinedAdaptor/cache.adaptor.ts +3 -2
- package/service/predefinedAdaptor/compress.adaptor.ts +7 -3
- package/service/predefinedAdaptor/database.adaptor.ts +3 -1
- package/service/predefinedAdaptor/documentTransfer.ts +2 -1
- package/service/predefinedAdaptor/index.ts +2 -0
- package/service/predefinedAdaptor/insightQuery.ts +35 -11
- package/service/predefinedAdaptor/llm.adaptor.ts +22 -2
- package/service/predefinedAdaptor/llmSpend.ts +80 -0
- package/service/predefinedAdaptor/openaiDialect.ts +52 -17
- package/service/predefinedAdaptor/openaiLlm.ts +17 -9
- package/service/predefinedAdaptor/role.adaptor.ts +2 -0
- package/service/predefinedAdaptor/searchIndex.ts +5 -1
- package/service/predefinedAdaptor/solidPubsub.adaptor.ts +35 -2
- package/service/predefinedAdaptor/solidQueue.adaptor.ts +2 -2
- package/service/predefinedAdaptor/solidSqlite.ts +3 -2
- package/service/predefinedAdaptor/sql/DocumentHydrator.ts +95 -0
- package/service/predefinedAdaptor/sql/DocumentRowCodec.ts +192 -0
- package/service/predefinedAdaptor/sql/DocumentWriter.ts +292 -0
- package/service/predefinedAdaptor/sql/PostgresInsightSession.ts +15 -5
- package/service/predefinedAdaptor/sql/QueryCompiler.ts +29 -13
- package/service/predefinedAdaptor/sql/QueryScope.ts +70 -0
- package/service/predefinedAdaptor/sql/QueryWriter.ts +200 -0
- package/service/predefinedAdaptor/sql/RawDocumentTable.ts +20 -8
- package/service/predefinedAdaptor/sql/SqlDocumentStore.ts +83 -1124
- package/service/predefinedAdaptor/sql/SqlTableSchema.ts +319 -0
- package/service/predefinedAdaptor/sql/SqliteInsightSession.ts +2 -1
- package/service/predefinedAdaptor/sql/StoredRows.ts +95 -0
- package/service/predefinedAdaptor/sql/UpdateCompiler.ts +6 -2
- package/service/predefinedAdaptor/sql/driver/bunSqlite.ts +3 -3
- package/service/predefinedAdaptor/sql/driver/postgres.ts +1 -1
- package/service/predefinedAdaptor/sql/fieldValues.ts +74 -0
- package/service/predefinedAdaptor/sql/search/fts5.ts +4 -1
- package/service/predefinedAdaptor/sql/search/postgres.ts +6 -2
- package/service/predefinedAdaptor/sql/values.ts +8 -4
- package/service/predefinedAdaptor/sseData.ts +14 -0
- package/service/predefinedAdaptor/storage.adaptor.ts +9 -4
- package/service/predefinedAdaptor/websocket.adaptor.ts +199 -43
- package/service/serve.ts +3 -2
- package/service/serviceModule.ts +2 -2
- package/service/serviceRegistry.ts +1 -0
- package/signal/SignalFailure.ts +30 -1
- package/signal/agent.signal.ts +30 -9
- package/signal/agentTurnStream.ts +12 -8
- package/signal/byIdRead.ts +18 -0
- package/signal/carriedClientIps.ts +1 -0
- package/signal/endpointErrorContract.ts +20 -2
- package/signal/endpointInfo.ts +6 -5
- package/signal/exception.ts +1 -0
- package/signal/index.ts +314 -30
- package/signal/internalInfo.ts +6 -4
- package/signal/mcp/McpDocument.ts +8 -1
- package/signal/mcp/Msg.ts +23 -10
- package/signal/mcp/index.ts +1 -0
- package/signal/mcp/promptError.ts +9 -0
- package/signal/middleware.ts +12 -3
- package/signal/openapi/openapi.ts +10 -1
- package/signal/resolveFieldContext.ts +34 -0
- package/signal/serializer/fetch.serializer.ts +23 -15
- package/signal/signalContext.ts +24 -57
- package/signal/signalContractError.ts +10 -0
- package/signal/signalDeclarationError.ts +13 -0
- package/signal/signalRegistry.ts +3 -1
- package/signal/slice.ts +24 -20
- package/signal/sliceInfo.ts +12 -9
- package/signal/trace.ts +3 -0
- package/signal/types.ts +35 -6
- package/store/action.ts +44 -1086
- package/store/actionErrorKey.ts +9 -0
- package/store/actionOption.ts +22 -0
- package/store/baseSt.ts +1 -0
- package/store/draftFlush.ts +5 -0
- package/store/draftStore.ts +2 -0
- package/store/formDrafts.ts +115 -0
- package/store/formFieldSetters.ts +229 -0
- package/store/index.ts +125 -17
- package/store/modelActionContext.ts +65 -0
- package/store/modelListPatch.ts +53 -0
- package/store/modelOpenActions.ts +158 -0
- package/store/modelWriteActions.ts +240 -0
- package/store/modelWriteGuard.ts +82 -0
- package/store/openSeq.ts +34 -0
- package/store/rootStore.ts +2 -0
- package/store/sliceListActions.ts +370 -0
- package/store/sliceLiveActions.ts +130 -0
- package/store/stateBuilder.ts +2 -0
- package/store/storeInstance.ts +9 -10
- package/store/uploadPoll.ts +52 -0
- package/store/withSelector.ts +6 -4
- package/types/base/base.d.ts +2 -1
- package/types/client/clientRuntime.d.ts +1 -0
- package/types/client/cn.d.ts +2 -2
- package/types/client/csrTypes.d.ts +15 -1
- package/types/client/frameConfig.d.ts +1 -0
- package/types/client/index.d.ts +25 -26
- package/types/client/locale.d.ts +1 -0
- package/types/client/makePageProto.d.ts +28 -26091
- package/types/client/nativeThemeColor.d.ts +6 -0
- package/types/client/route/RouteDefinition.d.ts +2 -2
- package/types/client/route/RouteHead.d.ts +5 -1
- package/types/client/route/routeArgs.d.ts +6 -0
- package/types/client/router.d.ts +6 -3
- package/types/client/rscNavigation.d.ts +3 -2
- package/types/client/rscRoutePatch.d.ts +22 -0
- package/types/client/viewportMeta.d.ts +3 -1
- package/types/common/CodeTranscript.d.ts +1 -1
- package/types/common/akanGraph.d.ts +1 -1
- package/types/common/err.d.ts +48 -0
- package/types/common/facetBarrel.d.ts +4 -0
- package/types/common/failureCode.d.ts +6 -0
- package/types/common/index.d.ts +8 -2
- package/types/common/isGuardRefusal.d.ts +3 -0
- package/types/common/mcpExposure.d.ts +9 -2
- package/types/common/mcpFailure.d.ts +6 -0
- package/types/common/restartSchedule.d.ts +16 -0
- package/types/common/routeConvention.d.ts +2 -0
- package/types/common/types.d.ts +18 -1
- package/types/constant/constantRegistry.d.ts +3 -1
- package/types/constant/crystalize.d.ts +1 -1
- package/types/constant/getDefault.d.ts +1 -1
- package/types/constant/immerify.d.ts +1 -1
- package/types/constant/index.d.ts +21 -21
- package/types/constant/purify.d.ts +2 -1
- package/types/constant/serialize.d.ts +1 -1
- package/types/constant/types.d.ts +1 -0
- package/types/dictionary/agent.dictionary.d.ts +1 -1
- package/types/dictionary/base.dictionary.d.ts +1 -1
- package/types/dictionary/dictionary.d.ts +9 -9
- package/types/dictionary/locale.d.ts +1 -1
- package/types/dictionary/trans.d.ts +3 -26
- package/types/document/databaseRegistry.d.ts +2 -1
- package/types/document/documentSchema.d.ts +1 -0
- package/types/document/filterMeta.d.ts +4 -1
- package/types/document/into.d.ts +1 -1
- package/types/document/loaderInfo.d.ts +2 -1
- package/types/document/noDocumentError.d.ts +8 -1
- package/types/document/queryEvaluator.d.ts +1 -1
- package/types/document/types.d.ts +1 -1
- package/types/fetch/client/fetchClient.d.ts +6 -36
- package/types/fetch/client/fetchClientTypes.d.ts +40 -0
- package/types/fetch/client/fetchHandle.d.ts +1 -0
- package/types/fetch/client/httpClient.d.ts +2 -0
- package/types/fetch/client/inflightQueries.d.ts +2 -0
- package/types/fetch/client/remoteError.d.ts +0 -4
- package/types/fetch/client/requestScope.d.ts +6 -0
- package/types/fetch/client/signalCatalog.d.ts +25 -0
- package/types/fetch/client/wsClient.d.ts +1 -0
- package/types/fetch/index.d.ts +1 -0
- package/types/fetch/staleReads.d.ts +8 -0
- package/types/fetch/streamedRead.d.ts +8 -0
- package/types/server/agentHooks.d.ts +4 -0
- package/types/server/akanApp.d.ts +2 -20
- package/types/server/akanOption.d.ts +9 -3
- package/types/server/akanServer.d.ts +1 -1
- package/types/server/artifact/builderRpc.d.ts +8 -0
- package/types/server/artifact/ipcTypes.d.ts +8 -0
- package/types/server/assetHeaders.d.ts +1 -0
- package/types/server/console.d.ts +4 -3
- package/types/server/devtools/devtoolsRouter.d.ts +4 -1
- package/types/server/devtools/studio/studioRoute.d.ts +2 -1
- package/types/server/di/predefinedAdaptor.d.ts +1 -0
- package/types/server/ed25519Key.d.ts +1 -0
- package/types/server/flightRowReader.d.ts +3 -1
- package/types/server/gateway/childSupervisor.d.ts +33 -0
- package/types/server/gateway/devHostChannel.d.ts +14 -0
- package/types/server/gateway/gatewayChildren.d.ts +47 -0
- package/types/server/gateway/gatewayConfig.d.ts +82 -0
- package/types/server/gateway/gatewayHttpProxy.d.ts +22 -0
- package/types/server/gateway/gatewayLogging.d.ts +16 -0
- package/types/server/gateway/gatewayRooms.d.ts +25 -0
- package/types/server/gateway/gatewayStatus.d.ts +62 -0
- package/types/server/gateway/gatewayStatusPage.d.ts +9 -0
- package/types/server/gateway/gatewayWebSocketRelay.d.ts +17 -0
- package/types/server/head.d.ts +2 -2
- package/types/server/htmlResultCache.d.ts +51 -0
- package/types/server/index.d.ts +17 -17
- package/types/server/lifecycle/parentChannel.d.ts +13 -0
- package/types/server/lifecycle/startGuard.d.ts +10 -0
- package/types/server/logging/rotatingLogWriter.d.ts +1 -1
- package/types/server/logging/serverLogging.d.ts +12 -0
- package/types/server/mcp/AgentTools.d.ts +31 -0
- package/types/server/mcp/AgentToolsAccount.d.ts +7 -0
- package/types/server/mcp/McpDispatcher.d.ts +10 -1
- package/types/server/mcp/McpPages.d.ts +2 -1
- package/types/server/mcp/McpRateLimiter.d.ts +3 -0
- package/types/server/mcp/index.d.ts +1 -0
- package/types/server/resolver/database.resolver.d.ts +2 -2
- package/types/server/resolver/databaseModelInstance.d.ts +4 -0
- package/types/server/resolver/invalidSignal.d.ts +2 -0
- package/types/server/resolver/livePause.d.ts +5 -0
- package/types/server/resolver/modelFacade.d.ts +5 -0
- package/types/server/resolver/modelLoaders.d.ts +9 -0
- package/types/server/resolver/modelSchema.d.ts +6 -0
- package/types/server/resolver/signal.resolver.d.ts +2 -2
- package/types/server/resolver/timedQuery.d.ts +8 -0
- package/types/server/resolver/websocketOf.d.ts +2 -0
- package/types/server/routeElementComposer.d.ts +45 -6
- package/types/server/routeState.d.ts +2 -0
- package/types/server/routing/builtinRoutes.d.ts +24 -0
- package/types/server/routing/localRooms.d.ts +14 -0
- package/types/server/routing/roomReplay.d.ts +2 -2
- package/types/server/routing/serverListener.d.ts +31 -0
- package/types/server/rscClient.d.ts +1 -5
- package/types/server/rscClientCache.d.ts +34 -0
- package/types/server/rscClientChunks.d.ts +18 -0
- package/types/server/rscClientFetch.d.ts +1 -1
- package/types/server/rscClientPatch.d.ts +12 -1
- package/types/server/rscDocumentHead.d.ts +32 -0
- package/types/server/rscFlightRenderer.d.ts +14 -0
- package/types/server/rscFlightStream.d.ts +52 -0
- package/types/server/rscHeadPatch.d.ts +5 -4
- package/types/server/rscHostReloads.d.ts +54 -0
- package/types/server/rscHostRenderStream.d.ts +53 -0
- package/types/server/rscHostRequests.d.ts +29 -0
- package/types/server/rscHttp.d.ts +4 -2
- package/types/server/rscInlineStream.d.ts +9 -0
- package/types/server/rscNavigationState.d.ts +8 -3
- package/types/server/rscParkedRedirect.d.ts +12 -0
- package/types/server/rscPatchPlanner.d.ts +49 -0
- package/types/server/rscPrefetchCache.d.ts +8 -7
- package/types/server/rscRenderControl.d.ts +12 -0
- package/types/server/rscRenderFallbacks.d.ts +41 -0
- package/types/server/rscRenderHandler.d.ts +29 -0
- package/types/server/rscRenderStats.d.ts +32 -0
- package/types/server/rscResponse.d.ts +9 -0
- package/types/server/rscResultCaches.d.ts +18 -0
- package/types/server/rscRouteDocument.d.ts +52 -0
- package/types/server/rscSegmentOutlet.d.ts +5 -0
- package/types/server/rscSegmentOutletReference.d.ts +2 -1
- package/types/server/rscWorker.d.ts +1 -3
- package/types/server/rscWorkerCache.d.ts +33 -1
- package/types/server/rscWorkerHost.d.ts +9 -76
- package/types/server/rscWorkerProcess.d.ts +31 -0
- package/types/server/rscWorkerRecycler.d.ts +22 -0
- package/types/server/serverConfig.d.ts +30 -0
- package/types/server/serverMetrics.d.ts +11 -0
- package/types/server/sitemap.d.ts +1 -0
- package/types/server/ssrFromRscRenderer.d.ts +2 -2
- package/types/server/ssrTypes.d.ts +8 -0
- package/types/server/webArtifact.d.ts +7 -0
- package/types/server/webAssetRoutes.d.ts +11 -0
- package/types/server/webCsrSurface.d.ts +18 -0
- package/types/server/webDocumentRoute.d.ts +19 -0
- package/types/server/webRouteContext.d.ts +45 -0
- package/types/server/webRouter.d.ts +4 -35
- package/types/server/webRscRoute.d.ts +24 -0
- package/types/server/webSiteFiles.d.ts +12 -0
- package/types/server/wellKnownRoutes.d.ts +5 -0
- package/types/service/agent.service.d.ts +13 -4
- package/types/service/agentAccounts.d.ts +8 -0
- package/types/service/agentLoop/agentLoop.d.ts +31 -0
- package/types/service/agentLoop/agentLoopTypes.d.ts +126 -0
- package/types/service/agentLoop/deltaStream.d.ts +3 -0
- package/types/service/agentLoop/loopCompaction.d.ts +11 -0
- package/types/service/agentLoop/loopRequest.d.ts +6 -0
- package/types/service/agentLoop/loopToolOutput.d.ts +7 -0
- package/types/service/agentLoop/loopToolkits.d.ts +14 -0
- package/types/service/agentLoop/loopTranscript.d.ts +12 -0
- package/types/service/agentMeter.d.ts +50 -0
- package/types/service/agentRelayPolicy.d.ts +45 -0
- package/types/service/documentStoreError.d.ts +7 -0
- package/types/service/index.d.ts +7 -0
- package/types/service/injectError.d.ts +4 -0
- package/types/service/injectInfo.d.ts +2 -1
- package/types/service/insightQueryError.d.ts +9 -0
- package/types/service/ipcTypes.d.ts +6 -0
- package/types/service/predefinedAdaptor/agentTools.adaptor.d.ts +31 -0
- package/types/service/predefinedAdaptor/anthropicLlm.d.ts +2 -2
- package/types/service/predefinedAdaptor/index.d.ts +2 -0
- package/types/service/predefinedAdaptor/llm.adaptor.d.ts +18 -2
- package/types/service/predefinedAdaptor/llmSpend.d.ts +22 -0
- package/types/service/predefinedAdaptor/openaiDialect.d.ts +2 -1
- package/types/service/predefinedAdaptor/openaiLlm.d.ts +1 -1
- package/types/service/predefinedAdaptor/role.adaptor.d.ts +2 -0
- package/types/service/predefinedAdaptor/solidPubsub.adaptor.d.ts +3 -0
- package/types/service/predefinedAdaptor/solidSqlite.d.ts +1 -1
- package/types/service/predefinedAdaptor/sql/DocumentHydrator.d.ts +11 -0
- package/types/service/predefinedAdaptor/sql/DocumentRowCodec.d.ts +26 -0
- package/types/service/predefinedAdaptor/sql/DocumentWriter.d.ts +24 -0
- package/types/service/predefinedAdaptor/sql/QueryScope.d.ts +16 -0
- package/types/service/predefinedAdaptor/sql/QueryWriter.d.ts +20 -0
- package/types/service/predefinedAdaptor/sql/SqlDocumentStore.d.ts +1 -32
- package/types/service/predefinedAdaptor/sql/SqlTableSchema.d.ts +20 -0
- package/types/service/predefinedAdaptor/sql/StoredRows.d.ts +27 -0
- package/types/service/predefinedAdaptor/sql/driver/bunSqlite.d.ts +1 -14
- package/types/service/predefinedAdaptor/sql/driver/postgres.d.ts +0 -8
- package/types/service/predefinedAdaptor/sql/fieldValues.d.ts +5 -0
- package/types/service/predefinedAdaptor/sseData.d.ts +5 -0
- package/types/service/predefinedAdaptor/websocket.adaptor.d.ts +14 -5
- package/types/service/serviceModule.d.ts +1 -1
- package/types/service/serviceRegistry.d.ts +1 -0
- package/types/signal/SignalFailure.d.ts +2 -0
- package/types/signal/agentTurnStream.d.ts +2 -1
- package/types/signal/byIdRead.d.ts +7 -0
- package/types/signal/carriedClientIps.d.ts +4 -0
- package/types/signal/endpointErrorContract.d.ts +3 -0
- package/types/signal/exception.d.ts +1 -0
- package/types/signal/index.d.ts +32 -30
- package/types/signal/mcp/McpDocument.d.ts +2 -0
- package/types/signal/mcp/index.d.ts +1 -0
- package/types/signal/mcp/promptError.d.ts +5 -0
- package/types/signal/resolveFieldContext.d.ts +15 -0
- package/types/signal/serializer/fetch.serializer.d.ts +3 -1
- package/types/signal/signalContext.d.ts +1 -13
- package/types/signal/signalContractError.d.ts +4 -0
- package/types/signal/signalDeclarationError.d.ts +4 -0
- package/types/signal/slice.d.ts +15 -13
- package/types/signal/trace.d.ts +3 -0
- package/types/signal/types.d.ts +33 -6
- package/types/store/action.d.ts +8 -27
- package/types/store/actionErrorKey.d.ts +1 -0
- package/types/store/actionOption.d.ts +24 -0
- package/types/store/baseSt.d.ts +2 -295
- package/types/store/draftFlush.d.ts +4 -0
- package/types/store/formDrafts.d.ts +21 -0
- package/types/store/formFieldSetters.d.ts +80 -0
- package/types/store/index.d.ts +17 -16
- package/types/store/modelActionContext.d.ts +189 -0
- package/types/store/modelListPatch.d.ts +34 -0
- package/types/store/modelOpenActions.d.ts +12 -0
- package/types/store/modelWriteActions.d.ts +16 -0
- package/types/store/modelWriteGuard.d.ts +42 -0
- package/types/store/openSeq.d.ts +17 -0
- package/types/store/rootStore.d.ts +6 -0
- package/types/store/sliceListActions.d.ts +295 -0
- package/types/store/sliceLiveActions.d.ts +6 -0
- package/types/store/stateBuilder.d.ts +2 -0
- package/types/store/uploadPoll.d.ts +16 -0
- package/types/store/withSelector.d.ts +1 -1
- package/types/ui/Agent/Chat.d.ts +5 -2
- package/types/ui/Agent/ChatHeader.d.ts +13 -0
- package/types/ui/Agent/ChatPendingCards.d.ts +23 -0
- package/types/ui/Field/Choice.d.ts +2 -1
- package/types/ui/Field/index.d.ts +1 -1
- package/types/ui/Link/inputModality.d.ts +5 -0
- package/types/ui/Link/viewportPrefetch.d.ts +4 -0
- package/types/ui/Load/Edit_Client.d.ts +2 -0
- package/types/ui/Load/Pagination.d.ts +4 -1
- package/types/ui/Load/Stream.d.ts +7 -1
- package/types/ui/Load/StreamBoundary.d.ts +20 -0
- package/types/ui/Load/Units.d.ts +2 -0
- package/types/ui/Load/View.d.ts +2 -0
- package/types/ui/Reference/origin.d.ts +1 -0
- package/types/ui/index.d.ts +1 -1
- package/types/ui/overlayLayer.d.ts +6 -1
- package/types/ui/recipe/badgeRecipe.d.ts +3 -3
- package/types/ui/recipe/buttonRecipe.d.ts +3 -3
- package/types/ui/recipe/inputRecipe.d.ts +1 -1
- package/types/vendor/@akanjs/native/packages/cli/src/lib/project.d.ts +4 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/relaunch.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/appearance/src/index.d.ts +9 -0
- package/types/vendor/@akanjs/native/plugins/external-view/src/index.d.ts +18 -11
- package/types/vendor/use-agentic/AgentClientTools.d.ts +19 -0
- package/types/vendor/use-agentic/failureCode.d.ts +4 -0
- package/types/vendor/use-agentic/index.d.ts +1 -0
- package/types/vendor/use-agentic/types.d.ts +11 -0
- package/types/webkit/CsrGuards.d.ts +2 -0
- package/types/webkit/RouteLevelBoundary.d.ts +17 -0
- package/types/webkit/nativeCore.d.ts +1 -0
- package/types/webkit/nativePurchase.d.ts +2 -1
- package/types/webkit/useCsrKeyboard.d.ts +19 -0
- package/types/webkit/useCsrLocationState.d.ts +21 -0
- package/types/webkit/useCsrNavigation.d.ts +25 -0
- package/types/webkit/useCsrRefs.d.ts +33 -0
- package/types/webkit/useCsrRenderTrace.d.ts +13 -0
- package/types/webkit/useCsrStackLifecycle.d.ts +12 -0
- package/types/webkit/useCsrTransitions.d.ts +2 -0
- package/types/webkit/useFrameRuntime.d.ts +1 -0
- package/types/webkit/useGeoLocation.d.ts +1 -1
- package/types/webkit/useHistory.d.ts +2 -3
- package/types/webkit/usePurchase.d.ts +1 -1
- package/types/webkit/useResolvedFrame.d.ts +38 -0
- package/types/webkit/useSyncNavigation.d.ts +22 -0
- package/types/webkit/useTransitionStore.d.ts +1 -0
- package/ui/Agent/Chat.tsx +392 -235
- package/ui/Agent/ChatHeader.tsx +59 -0
- package/ui/Agent/ChatPendingCards.tsx +49 -0
- package/ui/Agent/fetchRunner.ts +8 -1
- package/ui/BottomSheet.tsx +1 -1
- package/ui/Button.tsx +1 -0
- package/ui/Data/Item.tsx +2 -2
- package/ui/Data/ListContainer.tsx +348 -181
- package/ui/Data/useViewModal.ts +10 -4
- package/ui/Dialog/LegacyModal.tsx +1 -1
- package/ui/Dialog/Modal.tsx +1 -1
- package/ui/Field/Choice.tsx +3 -1
- package/ui/Link/inputModality.ts +21 -0
- package/ui/Link/prefetchIntent.ts +7 -25
- package/ui/Link/viewportPrefetch.ts +30 -0
- package/ui/Load/Edit_Client.tsx +7 -1
- package/ui/Load/Pagination.tsx +10 -2
- package/ui/Load/Stream.tsx +24 -4
- package/ui/Load/StreamBoundary.tsx +65 -0
- package/ui/Load/Units.tsx +3 -0
- package/ui/Load/View.tsx +5 -1
- package/ui/Model/EditModal.tsx +2 -1
- package/ui/Popconfirm.tsx +1 -1
- package/ui/Reference/origin.ts +1 -0
- package/ui/Select.tsx +43 -51
- package/ui/Signal/RestApi.tsx +3 -2
- package/ui/System/Client.tsx +32 -8
- package/ui/index.ts +4 -0
- package/ui/overlayLayer.ts +22 -1
- package/vendor/@akanjs/native/CHANGELOG.md +7 -1
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeActivity.kt +27 -12
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativePlugin.kt +4 -0
- package/vendor/@akanjs/native/native/desktop/src/external.rs +213 -111
- package/vendor/@akanjs/native/native/desktop/src/lib.rs +12 -4
- package/vendor/@akanjs/native/native/desktop/src/linux/external.rs +509 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/mod.rs +1 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeViewController.swift +6 -1
- package/vendor/@akanjs/native/packages/cli/src/lib/native-plugins.ts +5 -3
- package/vendor/@akanjs/native/packages/cli/src/lib/project.ts +25 -1
- package/vendor/@akanjs/native/packages/desktop/src/deeplinks.ts +2 -2
- package/vendor/@akanjs/native/packages/desktop/src/host.ts +2 -2
- package/vendor/@akanjs/native/packages/desktop/src/relaunch.ts +8 -3
- package/vendor/@akanjs/native/plugins/app/src/desktop.ts +2 -2
- package/vendor/@akanjs/native/plugins/appearance/android/AppearancePlugin.kt +13 -0
- package/vendor/@akanjs/native/plugins/appearance/ios/AppearancePlugin.swift +27 -0
- package/vendor/@akanjs/native/plugins/appearance/native-plugin.json +2 -2
- package/vendor/@akanjs/native/plugins/appearance/src/index.ts +8 -1
- package/vendor/@akanjs/native/plugins/autostart/src/desktop.ts +2 -1
- package/vendor/@akanjs/native/plugins/external-view/native-plugin.json +4 -1
- package/vendor/@akanjs/native/plugins/external-view/src/index.ts +18 -11
- package/vendor/use-agentic/AgentClientTools.ts +33 -0
- package/vendor/use-agentic/AgentSession.ts +11 -11
- package/vendor/use-agentic/CHANGELOG.md +46 -1
- package/vendor/use-agentic/Compaction.ts +2 -1
- package/vendor/use-agentic/ToolRunner.ts +6 -3
- package/vendor/use-agentic/Transcript.ts +6 -3
- package/vendor/use-agentic/WIRE.md +29 -7
- package/vendor/use-agentic/failureCode.ts +44 -0
- package/vendor/use-agentic/httpRunner.ts +15 -4
- package/vendor/use-agentic/index.ts +1 -0
- package/vendor/use-agentic/types.ts +11 -0
- package/webkit/CsrGuards.ts +7 -2
- package/webkit/McpAppAgent.ts +8 -3
- package/webkit/McpAppFetchBridge.ts +11 -5
- package/webkit/RouteLevelBoundary.tsx +37 -0
- package/webkit/nativeCore.ts +1 -0
- package/webkit/nativePurchase.ts +6 -3
- package/webkit/useCamera.tsx +22 -21
- package/webkit/useCsrKeyboard.ts +155 -0
- package/webkit/useCsrLocationState.ts +58 -0
- package/webkit/useCsrNavigation.ts +302 -0
- package/webkit/useCsrRefs.ts +52 -0
- package/webkit/useCsrRenderTrace.ts +68 -0
- package/webkit/useCsrStackLifecycle.ts +120 -0
- package/webkit/useCsrTransitions.ts +552 -0
- package/webkit/useCsrValues.ts +69 -1234
- package/webkit/useGeoLocation.tsx +4 -1
- package/webkit/useHistory.ts +2 -2
- package/webkit/useLocation.ts +3 -2
- package/webkit/usePurchase.tsx +4 -2
- package/webkit/useResolvedFrame.ts +116 -0
- package/webkit/useSyncNavigation.ts +109 -0
- package/webkit/useTransitionStore.ts +13 -0
- package/types/signal/agentMeter.d.ts +0 -27
- package/types/signal/agentRelayPolicy.d.ts +0 -25
package/CONTRIBUTING.md
CHANGED
|
@@ -58,6 +58,29 @@ A good pull request should include:
|
|
|
58
58
|
Reviewers should be able to understand the change from the pull request description and the diff without
|
|
59
59
|
reverse-engineering unrelated context.
|
|
60
60
|
|
|
61
|
+
## Public API
|
|
62
|
+
|
|
63
|
+
`api-report/akanjs/` at the repository root records the public API of `akanjs`, one report per entry point, as its
|
|
64
|
+
declaration emit states it. Each report also lists, under "Referenced, not exported", the declarations its exports
|
|
65
|
+
name that no entry point exports, such as the `X_base` const of a mixin class. After changing an export or anything
|
|
66
|
+
it names, rewrite the reports and commit them with the change:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
bun run api:report
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
CI fails when the reports no longer match the source, and on a pull request it compares them with the base branch:
|
|
73
|
+
|
|
74
|
+
- Adding an export or an entry point needs nothing more.
|
|
75
|
+
- Removing an export, or changing its declaration or a referenced one, needs a changeset that bumps `akanjs` by
|
|
76
|
+
`minor` (or `major`) and says how to upgrade. CI prints the old and the new text of each change.
|
|
77
|
+
- A change that only adds to a declaration, such as a new optional property or union member, counts too: the check
|
|
78
|
+
cannot tell it is compatible. Add the `minor` changeset anyway and say that no upgrade step is needed.
|
|
79
|
+
- Mark an export `/** @deprecated <what instead> */` and release that before removing it. The report shows the tag,
|
|
80
|
+
and adding or removing it is not a change.
|
|
81
|
+
- The wildcard subpaths (`akanjs/server/*` and the others in `akanjs.wildcards.api.md`) are listed, but the files
|
|
82
|
+
under them are not reported one by one.
|
|
83
|
+
|
|
61
84
|
## Coding Style
|
|
62
85
|
|
|
63
86
|
- Use TypeScript and Bun-first workflows.
|
|
@@ -65,6 +88,9 @@ reverse-engineering unrelated context.
|
|
|
65
88
|
- Use Biome formatting conventions used by the repository.
|
|
66
89
|
- Keep code readable six months from now: clear declarations beat clever shortcuts.
|
|
67
90
|
- Add comments only when they explain non-obvious behavior or decisions.
|
|
91
|
+
- Under `server/`, `service/` and `signal/`, fail with an `AkanError` subclass carrying a code a caller can branch on,
|
|
92
|
+
never a bare `Error`. `akan lint` fails when the package's total of bare `Error`s, held in `akan.baseline.json`,
|
|
93
|
+
grows, and `bun run error:codes` regenerates the error-code reference a code change touches.
|
|
68
94
|
|
|
69
95
|
## Reporting Issues
|
|
70
96
|
|
package/base/base.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { CLIENT_VALUE, Cls, DEFAULT_VALUE, PURIFIED_VALUE, SERVER_VALUE } from ".";
|
|
2
1
|
import { Float, Int } from "./primitiveRegistry";
|
|
2
|
+
import type { CLIENT_VALUE, DEFAULT_VALUE, PURIFIED_VALUE, SERVER_VALUE } from "./symbols";
|
|
3
|
+
import type { Cls } from "./types";
|
|
3
4
|
|
|
4
5
|
class EnumPrototype {}
|
|
5
6
|
export type EnumInstance<RefName extends string = string, T = string | number> = Cls<
|
package/client/clientRuntime.ts
CHANGED
package/client/cn.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ClassNameValue, extendTailwindMerge } from "tailwind-merge";
|
|
2
2
|
|
|
3
|
-
/** Registered with tailwind-merge so `cn("bg-primary", "bg-open")` resolves to `"bg-open"` instead of keeping both. */
|
|
3
|
+
/** @internal Registered with tailwind-merge so `cn("bg-primary", "bg-open")` resolves to `"bg-open"` instead of keeping both. */
|
|
4
4
|
export const colorTokens = [
|
|
5
5
|
"background",
|
|
6
6
|
"foreground",
|
|
@@ -33,7 +33,7 @@ export const colorTokens = [
|
|
|
33
33
|
"ring",
|
|
34
34
|
];
|
|
35
35
|
|
|
36
|
-
/** `--radius-box` / `--radius-field`; unregistered, `cn("rounded-field", "rounded-full")` would keep both. */
|
|
36
|
+
/** @internal `--radius-box` / `--radius-field`; unregistered, `cn("rounded-field", "rounded-full")` would keep both. */
|
|
37
37
|
export const radiusTokens = ["box", "field"];
|
|
38
38
|
|
|
39
39
|
const twMerge = extendTailwindMerge({
|
package/client/csrTypes.ts
CHANGED
|
@@ -38,8 +38,15 @@ export interface PageConfig {
|
|
|
38
38
|
cache?: boolean;
|
|
39
39
|
/** Initial full-document SSR strategy. Defaults to `"stream"`. */
|
|
40
40
|
ssr?: SsrRenderMode;
|
|
41
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Opt-in suffix-only RSC commits under `AKAN_PUBLIC_RSC_PARTIAL_COMMIT=1`: the page's `.head()` is plain `title`,
|
|
43
|
+
* `meta` and `link` tags, and the layouts above it render the same for each sibling page, apart from what they
|
|
44
|
+
* read through `usePathCtx()`.
|
|
45
|
+
*/
|
|
42
46
|
rscPatchHeadSafe?: boolean;
|
|
47
|
+
/** `false` answers a `Link` prefetch of the page (on a layout, of every page under it) without rendering it, for a
|
|
48
|
+
* render with a side effect such as counting a view; the click renders it as usual. */
|
|
49
|
+
prefetch?: boolean;
|
|
43
50
|
topSafeAreaColor?: string;
|
|
44
51
|
bottomSafeAreaColor?: string;
|
|
45
52
|
/** Keeps the route (on a `_layout`, its whole directory) out of `akan build` while `akan start` serves it. Write a
|
|
@@ -114,6 +121,8 @@ export interface RouteGuardProps {
|
|
|
114
121
|
searchParams: Record<string, string | string[]>;
|
|
115
122
|
/** MCP is listing the screen, so no argument is known: a guard reading one throws `RouteArgPending`. */
|
|
116
123
|
listing?: boolean;
|
|
124
|
+
/** The CSR target's in-app path; a server request's own URL gives it when this is left off. */
|
|
125
|
+
path?: string;
|
|
117
126
|
}
|
|
118
127
|
export type RouteGuard = (props: RouteGuardProps) => Promise<void>;
|
|
119
128
|
export interface RouteRender {
|
|
@@ -399,6 +408,11 @@ export interface PathRoute {
|
|
|
399
408
|
renderRootLayouts: RouteRender[];
|
|
400
409
|
renderLayouts: RouteRender[];
|
|
401
410
|
resolveHead?: ResolveHead;
|
|
411
|
+
/**
|
|
412
|
+
* The layouts' part of `resolveHead`, which a partial commit keeps on screen while it swaps the page's part;
|
|
413
|
+
* `resolveHead` must equal this merged with the page's own head by `RouteHead.mergePage`.
|
|
414
|
+
*/
|
|
415
|
+
resolveLayoutsHead?: ResolveHead;
|
|
402
416
|
}
|
|
403
417
|
|
|
404
418
|
export type FrameSlotScope = "page" | "layout";
|
package/client/frameConfig.ts
CHANGED
|
@@ -42,6 +42,7 @@ const pageConfigKeys = new Set<keyof PageConfig>([
|
|
|
42
42
|
"cache",
|
|
43
43
|
"ssr",
|
|
44
44
|
"rscPatchHeadSafe",
|
|
45
|
+
"prefetch",
|
|
45
46
|
"topSafeAreaColor",
|
|
46
47
|
"bottomSafeAreaColor",
|
|
47
48
|
]);
|
|
@@ -61,8 +62,9 @@ export const validatePageConfig = (routeKey: string, config?: PageConfig) => {
|
|
|
61
62
|
throw new Error(`[route-convention] unsupported pageConfig option "${key}" in ${routeKey}`);
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
for (const key of ["devOnly", "prefetch"] as const) {
|
|
66
|
+
if (pageConfig[key] !== undefined && typeof pageConfig[key] !== "boolean")
|
|
67
|
+
throw new Error(`[route-convention] pageConfig.${key} in ${routeKey} must be a boolean.`);
|
|
66
68
|
}
|
|
67
69
|
if (pageConfig.transition !== undefined && !transitionTypes.includes(pageConfig.transition)) {
|
|
68
70
|
throw new Error(`[route-convention] unsupported pageConfig.transition "${pageConfig.transition}" in ${routeKey}`);
|
|
@@ -89,6 +91,7 @@ const isValidInsetValue = (value: unknown): value is NonNullable<PageConfig["top
|
|
|
89
91
|
return Object.entries(value).every(([key, px]) => responsiveInsetKeys.has(key) && isInsetPx(px));
|
|
90
92
|
};
|
|
91
93
|
|
|
94
|
+
/** @internal */
|
|
92
95
|
export const isResponsiveInset = (inset: PageConfig["topInset"]): inset is ResponsiveInset => isRecord(inset);
|
|
93
96
|
|
|
94
97
|
/** The inset at each breakpoint, each one the nearest declared value at or below it. */
|
package/client/index.ts
CHANGED
|
@@ -1,32 +1,255 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
|
|
1
|
+
export {
|
|
2
|
+
type ClientRuntime,
|
|
3
|
+
Err,
|
|
4
|
+
fetch,
|
|
5
|
+
getClientRuntime,
|
|
6
|
+
isClientRuntimeRegistered,
|
|
7
|
+
msg,
|
|
8
|
+
registerClientRuntime,
|
|
9
|
+
sig,
|
|
10
|
+
usePage,
|
|
11
|
+
} from "./clientRuntime";
|
|
12
|
+
export { cn, colorTokens, radiusTokens } from "./cn";
|
|
13
|
+
export {
|
|
14
|
+
authTokenKey,
|
|
15
|
+
cookieJar,
|
|
16
|
+
cookies,
|
|
17
|
+
type GetOption,
|
|
18
|
+
getAccount,
|
|
19
|
+
getAuthToken,
|
|
20
|
+
getCookie,
|
|
21
|
+
getHeader,
|
|
22
|
+
getSessionClaims,
|
|
23
|
+
getStoredAuthToken,
|
|
24
|
+
headers,
|
|
25
|
+
initAuth,
|
|
26
|
+
removeCookie,
|
|
27
|
+
resetAuth,
|
|
28
|
+
setAuth,
|
|
29
|
+
setCookie,
|
|
30
|
+
} from "./cookie";
|
|
31
|
+
export { createFont, Inter, Nanum_Gothic_Coding, Noto_Sans_KR, Roboto } from "./createFont";
|
|
32
|
+
export { CsrLocation, csrLocation } from "./csrLocation";
|
|
33
|
+
export {
|
|
34
|
+
type AkanHeadSnapshotNode,
|
|
35
|
+
type AkanHeadSnapshotV1,
|
|
36
|
+
type AnimatedDivProps,
|
|
37
|
+
type ContainerTransition,
|
|
38
|
+
type CsrContextType,
|
|
39
|
+
type CsrNavigationKind,
|
|
40
|
+
type CsrNavigationPhase,
|
|
41
|
+
type CsrPageType,
|
|
42
|
+
type CsrStackAccount,
|
|
43
|
+
type CsrStackEntry,
|
|
44
|
+
type CsrState,
|
|
45
|
+
type CsrTransitionStyles,
|
|
46
|
+
csrContext,
|
|
47
|
+
DEFAULT_BOTTOM_INSET,
|
|
48
|
+
DEFAULT_TOP_INSET,
|
|
49
|
+
type FrameContentViewportState,
|
|
50
|
+
type FrameLayer,
|
|
51
|
+
type FrameLayerZIndex,
|
|
52
|
+
type FrameLayoutState,
|
|
53
|
+
type FramePlatformProfile,
|
|
54
|
+
type FrameSlotBucket,
|
|
55
|
+
type FrameSlotRegistration,
|
|
56
|
+
type FrameSlotRole,
|
|
57
|
+
type FrameSlotScope,
|
|
58
|
+
type FrameSlotType,
|
|
59
|
+
type FrameSnapshot,
|
|
60
|
+
type FrameViewportState,
|
|
61
|
+
type GenerateHead,
|
|
62
|
+
type Head,
|
|
63
|
+
type HeadProps,
|
|
64
|
+
type History,
|
|
65
|
+
type KeyboardAccessoryFrameState,
|
|
66
|
+
type KeyboardFrameState,
|
|
67
|
+
type LayoutErrorProps,
|
|
68
|
+
type LayoutErrorRender,
|
|
69
|
+
type LayoutFallbackRoute,
|
|
70
|
+
type LayoutLoadingProps,
|
|
71
|
+
type LayoutLoadingRender,
|
|
72
|
+
type LayoutModule,
|
|
73
|
+
type LayoutNotFoundProps,
|
|
74
|
+
type LayoutNotFoundRender,
|
|
75
|
+
type LayoutProps,
|
|
76
|
+
type LayoutRender,
|
|
77
|
+
type Location,
|
|
78
|
+
type LocationState,
|
|
79
|
+
type NavigationIntent,
|
|
80
|
+
type PageActivity,
|
|
81
|
+
type PageActivityState,
|
|
82
|
+
type PageConfig,
|
|
83
|
+
type PageLoadingProps,
|
|
84
|
+
type PageLoadingRender,
|
|
85
|
+
type PageModule,
|
|
86
|
+
type PageProps,
|
|
87
|
+
type PageRender,
|
|
88
|
+
type PageSafeAreaConfig,
|
|
89
|
+
type PageState,
|
|
90
|
+
type PageTransition,
|
|
91
|
+
type PathContextType,
|
|
92
|
+
type PathRoute,
|
|
93
|
+
pageActivityContext,
|
|
94
|
+
pathContext,
|
|
95
|
+
type ResolvedHead,
|
|
96
|
+
type ResolveHead,
|
|
97
|
+
type ResolveHeadResult,
|
|
98
|
+
type ResponsiveInset,
|
|
99
|
+
type Route,
|
|
100
|
+
type RouteGuard,
|
|
101
|
+
type RouteGuardProps,
|
|
102
|
+
type RouteGuide,
|
|
103
|
+
type RouteModule,
|
|
104
|
+
type RouteRender,
|
|
105
|
+
type RouterProps,
|
|
106
|
+
type RouteState,
|
|
107
|
+
type RouteViewport,
|
|
108
|
+
type SafeAreaTransition,
|
|
109
|
+
type SsrRenderMode,
|
|
110
|
+
type TransitionAction,
|
|
111
|
+
type TransitionActionContext,
|
|
112
|
+
type TransitionPlan,
|
|
113
|
+
type TransitionStyle,
|
|
114
|
+
type UseCsrTransition,
|
|
115
|
+
useCsr,
|
|
116
|
+
usePathCtx,
|
|
117
|
+
type WebAppManifest,
|
|
118
|
+
type WebAppManifestIcon,
|
|
119
|
+
} from "./csrTypes";
|
|
120
|
+
export { Toast } from "./decorators";
|
|
121
|
+
export { Device, debugFrame, isMobileDevice, isNativeTarget } from "./device";
|
|
122
|
+
export {
|
|
123
|
+
breakpointQuery,
|
|
124
|
+
type DevicePlatform,
|
|
125
|
+
defaultPageState,
|
|
126
|
+
getExplicitPageConfigKeys,
|
|
127
|
+
type InsetBreakpoint,
|
|
128
|
+
insetAt,
|
|
129
|
+
insetBreakpoints,
|
|
130
|
+
insetsByBreakpoint,
|
|
131
|
+
isResponsiveInset,
|
|
132
|
+
mergePageConfigs,
|
|
133
|
+
type ResolvePageStateOptions,
|
|
134
|
+
readCssSafeAreaInsets,
|
|
135
|
+
resolvePageState,
|
|
136
|
+
type SafeAreaInsets,
|
|
137
|
+
type TailwindBreakpoint,
|
|
138
|
+
validatePageConfig,
|
|
139
|
+
} from "./frameConfig";
|
|
140
|
+
export { Href } from "./href";
|
|
141
|
+
export { dictionaryContext } from "./locale";
|
|
142
|
+
export {
|
|
143
|
+
type ErrPayload,
|
|
144
|
+
makePageProto,
|
|
145
|
+
type PageErrConstructor,
|
|
146
|
+
type PageErrInstance,
|
|
147
|
+
type TransMessageOption,
|
|
148
|
+
} from "./makePageProto";
|
|
149
|
+
export { isMcpView } from "./mcpView";
|
|
150
|
+
export { desktopPlatform, isNativeApp, isNativeShell, nativePlatform, openExternalUrl } from "./nativeHost";
|
|
15
151
|
export {
|
|
16
152
|
type NavigationAttempt,
|
|
17
153
|
type NavigationGuard,
|
|
18
154
|
type NavigationKind,
|
|
19
155
|
NavigationRefused,
|
|
20
156
|
} from "./navigationGuards";
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
157
|
+
export { resolveServerUrl } from "./resolveServerUrl";
|
|
158
|
+
export {
|
|
159
|
+
assertGuardOnChain,
|
|
160
|
+
isRouteDefinition,
|
|
161
|
+
LayoutDefinition,
|
|
162
|
+
type LayoutExtra,
|
|
163
|
+
layout,
|
|
164
|
+
PageDefinition,
|
|
165
|
+
page,
|
|
166
|
+
type ResolvedRouteModule,
|
|
167
|
+
type ResolveRouteModuleOption,
|
|
168
|
+
RootLayoutDefinition,
|
|
169
|
+
RouteArgError,
|
|
170
|
+
type RouteArgInfo,
|
|
171
|
+
type RouteArgInput,
|
|
172
|
+
type RouteArgOption,
|
|
173
|
+
RouteArgPending,
|
|
174
|
+
type RouteArgResolveOption,
|
|
175
|
+
type RouteArgsShape,
|
|
176
|
+
type RouteArgType,
|
|
177
|
+
type RouteArgValue,
|
|
178
|
+
type RouteBaseArgs,
|
|
179
|
+
RouteDefinition,
|
|
180
|
+
type RouteGuardRequest,
|
|
181
|
+
RouteGuards,
|
|
182
|
+
RouteHead,
|
|
183
|
+
type RouteKind,
|
|
184
|
+
type RouteModuleSource,
|
|
185
|
+
type RoutePromptArgument,
|
|
186
|
+
type RoutePromptMeta,
|
|
187
|
+
type RouteSearchType,
|
|
188
|
+
resolveRouteModule,
|
|
189
|
+
rootLayout,
|
|
190
|
+
routeArgsMarker,
|
|
191
|
+
routeDefinitionMarker,
|
|
192
|
+
} from "./route";
|
|
193
|
+
export {
|
|
194
|
+
AkanNotFoundError,
|
|
195
|
+
AkanRedirectError,
|
|
196
|
+
type DeepLinkOptions,
|
|
197
|
+
getPathInfo,
|
|
198
|
+
isRouteControl,
|
|
199
|
+
normalizeDeepLinkHref,
|
|
200
|
+
type RedirectMethod,
|
|
201
|
+
type RedirectOptions,
|
|
202
|
+
type RedirectStatus,
|
|
203
|
+
type RouteManifest,
|
|
204
|
+
type RouteOptions,
|
|
205
|
+
type RouterInstance,
|
|
206
|
+
router,
|
|
207
|
+
} from "./router";
|
|
208
|
+
export {
|
|
209
|
+
clearRscNavigationCache,
|
|
210
|
+
isRscNavigationFromCache,
|
|
211
|
+
navigateRsc,
|
|
212
|
+
type PrefetchPriority,
|
|
213
|
+
prefetchRsc,
|
|
214
|
+
refreshRsc,
|
|
215
|
+
useRscNavigation,
|
|
216
|
+
} from "./rscNavigation";
|
|
217
|
+
export { sharedContext } from "./sharedContext";
|
|
218
|
+
export { secretStorage, storage } from "./storage";
|
|
219
|
+
export { type TransitionType, transitionTypes } from "./transitionTypes";
|
|
220
|
+
export { type AllDictionary, type Dictionary, Translator } from "./translator";
|
|
221
|
+
export {
|
|
222
|
+
type DataAction,
|
|
223
|
+
type DataColumn,
|
|
224
|
+
type DataMenu,
|
|
225
|
+
type DataMenuItem,
|
|
226
|
+
type DataTool,
|
|
227
|
+
type Font,
|
|
228
|
+
getFontFaces,
|
|
229
|
+
getFontFallbackName,
|
|
230
|
+
getFontStyles,
|
|
231
|
+
getFontVariableName,
|
|
232
|
+
getOptimizedFontSrc,
|
|
233
|
+
isFontOptimizationEnabled,
|
|
234
|
+
isFontPreloadEnabled,
|
|
235
|
+
loadFonts,
|
|
236
|
+
type MenuItem,
|
|
237
|
+
type ModelDashboardProps,
|
|
238
|
+
type ModelEditProps,
|
|
239
|
+
type ModelInsightProps,
|
|
240
|
+
type ModelProps,
|
|
241
|
+
type ModelsProps,
|
|
242
|
+
type ModelViewProps,
|
|
243
|
+
type ReactFont,
|
|
244
|
+
type ReactFontCategory,
|
|
245
|
+
type ReactFontDeclaration,
|
|
246
|
+
type ReactFontDisplay,
|
|
247
|
+
type ReactFontFace,
|
|
248
|
+
type ReactFontPath,
|
|
249
|
+
type ReactFontStyle,
|
|
250
|
+
type ReactFontSubset,
|
|
251
|
+
type RootLayoutProps,
|
|
252
|
+
type UserMenuItem,
|
|
253
|
+
} from "./types";
|
|
254
|
+
export { type ThemeColorTag, ViewportMeta } from "./viewportMeta";
|
|
255
|
+
export { getWebManifestBasePath, toManifestJson, webManifestHref } from "./webManifest";
|
package/client/locale.ts
CHANGED
package/client/makePageProto.tsx
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { getEnv } from "akanjs/base";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Err,
|
|
4
|
+
type ErrConstructor,
|
|
5
|
+
type ErrPayload,
|
|
6
|
+
type ErrRestoreOption,
|
|
7
|
+
parseAkanI18nEnv,
|
|
8
|
+
RequestLocale,
|
|
9
|
+
} from "akanjs/common";
|
|
3
10
|
import { untrackedHeaders, untrackedRequest } from "akanjs/fetch";
|
|
4
11
|
import type { ReactNode } from "react";
|
|
5
12
|
import { csrLocation } from "./csrLocation";
|
|
@@ -9,17 +16,31 @@ type TransMessage<Locale extends Record<string, unknown>> = {
|
|
|
9
16
|
[K in keyof Locale]-?: `${K & string}${Locale[K] extends Record<string, unknown> ? `.${keyof Locale[K] extends string ? keyof Locale[K] : never}` : ""}`;
|
|
10
17
|
}[keyof Locale];
|
|
11
18
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
export type { ErrPayload } from "akanjs/common";
|
|
20
|
+
|
|
21
|
+
/** @deprecated `Err` from `akanjs/common`, the class `makePageProto`'s `Err` is. */
|
|
22
|
+
export interface PageErrInstance extends Error {
|
|
23
|
+
readonly error: string;
|
|
24
|
+
readonly statusCode: number;
|
|
25
|
+
readonly code?: string;
|
|
26
|
+
readonly details?: unknown;
|
|
27
|
+
readonly data?: Record<string, unknown>;
|
|
28
|
+
readonly path?: string;
|
|
29
|
+
readonly timestamp?: string;
|
|
30
|
+
toJSON(): ErrPayload & { statusCode: number };
|
|
18
31
|
}
|
|
19
32
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
data?: Record<string, unknown
|
|
33
|
+
/** @deprecated `ErrConstructor` from `akanjs/common`, the type `makePageProto` returns its `Err` as. */
|
|
34
|
+
export interface PageErrConstructor<ErrorKey extends string> {
|
|
35
|
+
new (key: ErrorKey, data?: Record<string, unknown>, option?: ErrRestoreOption): PageErrInstance;
|
|
36
|
+
prototype: PageErrInstance;
|
|
37
|
+
fromJSON(payload: ErrPayload): PageErrInstance;
|
|
38
|
+
is<Key extends ErrorKey>(error: unknown, ...keys: Key[]): error is PageErrInstance & { readonly error: Key };
|
|
39
|
+
BadRequest: PageErrConstructor<ErrorKey>;
|
|
40
|
+
Unauthorized: PageErrConstructor<ErrorKey>;
|
|
41
|
+
Forbidden: PageErrConstructor<ErrorKey>;
|
|
42
|
+
NotFound: PageErrConstructor<ErrorKey>;
|
|
43
|
+
Conflict: PageErrConstructor<ErrorKey>;
|
|
23
44
|
}
|
|
24
45
|
|
|
25
46
|
const htmlEntities: Record<string, string> = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" };
|
|
@@ -85,79 +106,9 @@ export const makePageProto = <
|
|
|
85
106
|
[key: string]: { [key: string]: Record<string, unknown> };
|
|
86
107
|
}) => {
|
|
87
108
|
const translator = new Translator(dictionary);
|
|
88
|
-
|
|
89
|
-
readonly error: string;
|
|
90
|
-
readonly statusCode: number;
|
|
91
|
-
readonly code?: string;
|
|
92
|
-
readonly details?: unknown;
|
|
93
|
-
readonly data?: Record<string, unknown>;
|
|
94
|
-
readonly path?: string;
|
|
95
|
-
readonly timestamp?: string;
|
|
96
|
-
|
|
97
|
-
constructor(key: ErrorKey, data?: Record<string, unknown>, option: ErrRestoreOption = {}) {
|
|
98
|
-
super(key);
|
|
99
|
-
this.name = this.constructor.name;
|
|
100
|
-
this.error = key;
|
|
101
|
-
this.statusCode = option.statusCode ?? 400;
|
|
102
|
-
this.code = option.code;
|
|
103
|
-
this.details = option.details;
|
|
104
|
-
this.data = data;
|
|
105
|
-
this.path = option.path;
|
|
106
|
-
this.timestamp = option.timestamp;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
toJSON() {
|
|
110
|
-
return {
|
|
111
|
-
error: this.message,
|
|
112
|
-
statusCode: this.statusCode,
|
|
113
|
-
...(this.code !== undefined ? { code: this.code } : {}),
|
|
114
|
-
...(this.details !== undefined ? { details: this.details } : {}),
|
|
115
|
-
...(this.data !== undefined ? { data: this.data } : {}),
|
|
116
|
-
...(this.path !== undefined ? { path: this.path } : {}),
|
|
117
|
-
...(this.timestamp !== undefined ? { timestamp: this.timestamp } : {}),
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
static fromJSON(payload: ErrPayload) {
|
|
122
|
-
return new Err(payload.error as ErrorKey, payload.data, payload);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
static is<Key extends ErrorKey>(error: unknown, ...keys: Key[]): error is Err & { readonly error: Key } {
|
|
126
|
-
return hasErrKey(error, keys);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
static BadRequest = class BadRequestErr extends Err {
|
|
130
|
-
constructor(key: ErrorKey, data?: Record<string, unknown>, option: ErrRestoreOption = {}) {
|
|
131
|
-
super(key, data, { ...option, statusCode: 400 });
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
static Unauthorized = class UnauthorizedErr extends Err {
|
|
136
|
-
constructor(key: ErrorKey, data?: Record<string, unknown>, option: ErrRestoreOption = {}) {
|
|
137
|
-
super(key, data, { ...option, statusCode: 401 });
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
static Forbidden = class ForbiddenErr extends Err {
|
|
142
|
-
constructor(key: ErrorKey, data?: Record<string, unknown>, option: ErrRestoreOption = {}) {
|
|
143
|
-
super(key, data, { ...option, statusCode: 403 });
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
static NotFound = class NotFoundErr extends Err {
|
|
148
|
-
constructor(key: ErrorKey, data?: Record<string, unknown>, option: ErrRestoreOption = {}) {
|
|
149
|
-
super(key, data, { ...option, statusCode: 404 });
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
static Conflict = class ConflictErr extends Err {
|
|
154
|
-
constructor(key: ErrorKey, data?: Record<string, unknown>, option: ErrRestoreOption = {}) {
|
|
155
|
-
super(key, data, { ...option, statusCode: 409 });
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
}
|
|
109
|
+
const PageErr: ErrConstructor<ErrorKey> = Err;
|
|
159
110
|
return {
|
|
160
|
-
Err,
|
|
111
|
+
Err: PageErr,
|
|
161
112
|
msg: msg as {
|
|
162
113
|
info: (key: DictKey, option?: TransMessageOption) => void;
|
|
163
114
|
success: (key: DictKey, option?: TransMessageOption) => void;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Logger } from "akanjs/common";
|
|
2
|
+
import { isNativeApp } from "./nativeHost";
|
|
3
|
+
|
|
4
|
+
export class NativeThemeColor {
|
|
5
|
+
static #sent: string | null = null;
|
|
6
|
+
static #canvas: CanvasRenderingContext2D | null | undefined;
|
|
7
|
+
|
|
8
|
+
static follow(color: string | null) {
|
|
9
|
+
if (!isNativeApp()) return;
|
|
10
|
+
const hex = color === null ? null : NativeThemeColor.hex(color);
|
|
11
|
+
if (hex === NativeThemeColor.#sent) return;
|
|
12
|
+
NativeThemeColor.#sent = hex;
|
|
13
|
+
void import("../vendor/@akanjs/native/plugins/appearance/src/index.ts")
|
|
14
|
+
.then(async ({ appearance }) => {
|
|
15
|
+
if (!appearance.isSupported("setThemeColor") || !appearance.isAllowed("setThemeColor")) return;
|
|
16
|
+
await appearance.setThemeColor({ color: hex });
|
|
17
|
+
})
|
|
18
|
+
.catch((error: unknown) => {
|
|
19
|
+
Logger.warn(`The status bar did not take the theme color ${hex}: ${String(error)}`);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static hex(color: string): string | null {
|
|
24
|
+
if (/^#[0-9a-f]{6}$/i.test(color)) return color.toLowerCase();
|
|
25
|
+
if (!CSS.supports("color", color)) return null;
|
|
26
|
+
const context = NativeThemeColor.#context();
|
|
27
|
+
if (!context) return null;
|
|
28
|
+
|
|
29
|
+
context.clearRect(0, 0, 1, 1);
|
|
30
|
+
|
|
31
|
+
context.fillStyle = "transparent";
|
|
32
|
+
context.fillStyle = color;
|
|
33
|
+
context.fillRect(0, 0, 1, 1);
|
|
34
|
+
return NativeThemeColor.pixelHex(context.getImageData(0, 0, 1, 1).data);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
static pixelHex([red = 0, green = 0, blue = 0, alpha = 0]: Iterable<number>): string | null {
|
|
38
|
+
if (!alpha) return null;
|
|
39
|
+
return `#${[red, green, blue].map((channel) => channel.toString(16).padStart(2, "0")).join("")}`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static #context(): CanvasRenderingContext2D | null {
|
|
43
|
+
if (NativeThemeColor.#canvas === undefined) {
|
|
44
|
+
const canvas = document.createElement("canvas");
|
|
45
|
+
canvas.width = 1;
|
|
46
|
+
canvas.height = 1;
|
|
47
|
+
NativeThemeColor.#canvas = canvas.getContext("2d", { willReadFrequently: true });
|
|
48
|
+
}
|
|
49
|
+
return NativeThemeColor.#canvas;
|
|
50
|
+
}
|
|
51
|
+
}
|