@abide/abide 0.58.0 → 0.101.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -1774
- package/bin/abide.ts +793 -204
- package/package.json +35 -152
- package/scaffold/src/server/app.ts +6 -0
- package/scaffold/src/shared/.gitkeep +0 -0
- package/scaffold/src/ui/app.html +8 -0
- package/scaffold/src/ui/pages/page.abide +13 -0
- package/src/compiler/CHARACTER_REFERENCES.ts +2242 -0
- package/src/compiler/CheckerAnswer.ts +62 -0
- package/src/compiler/Cursor.ts +367 -0
- package/src/compiler/Finding.ts +2 -0
- package/src/compiler/Lowering.ts +648 -0
- package/src/compiler/PositionTable.ts +125 -0
- package/src/compiler/REACTIVE_MEMBERS.ts +36 -0
- package/src/compiler/SHARED_NAMES.ts +45 -0
- package/src/compiler/SPECIFIERS.ts +16 -0
- package/src/compiler/ShadowMap.ts +144 -0
- package/src/compiler/TemplateNode.ts +176 -0
- package/src/compiler/TypeSession.ts +1079 -0
- package/src/compiler/VOID_ELEMENTS.ts +22 -0
- package/src/compiler/aliasedSymbol.ts +15 -0
- package/src/compiler/ambientReadsIn.ts +152 -0
- package/src/compiler/argsDefaultsIn.ts +173 -0
- package/src/compiler/argsSchemaOf.ts +230 -0
- package/src/compiler/checkApp.ts +117 -0
- package/src/compiler/checkedShadow.ts +182 -0
- package/src/compiler/classifyRead.ts +577 -0
- package/src/compiler/classifyTemplate.ts +501 -0
- package/src/compiler/compileApp.ts +559 -0
- package/src/compiler/compiledEntry.ts +141 -0
- package/src/compiler/componentGraph.ts +139 -0
- package/src/compiler/declaredExports.ts +645 -0
- package/src/compiler/decodeCharacterReferences.ts +111 -0
- package/src/compiler/emitClient.ts +1343 -0
- package/src/compiler/emitComponent.ts +162 -0
- package/src/compiler/emitSource.ts +91 -0
- package/src/compiler/formatDiagnosis.ts +19 -0
- package/src/compiler/handlersUnder.ts +112 -0
- package/src/compiler/index.ts +15 -0
- package/src/compiler/invocationProps.ts +67 -0
- package/src/compiler/isNamedAlone.ts +9 -0
- package/src/compiler/lineOf.ts +38 -0
- package/src/compiler/parseAbide.ts +1341 -0
- package/src/compiler/projectShadow.ts +643 -0
- package/src/compiler/reactiveOptions.ts +82 -0
- package/src/compiler/reactiveTypes.ts +222 -0
- package/src/compiler/readSources.ts +100 -0
- package/src/compiler/readsIn.ts +1023 -0
- package/src/compiler/renderMarkup.ts +781 -0
- package/src/compiler/scaffold.ts +105 -0
- package/src/compiler/scopeStyles.ts +309 -0
- package/src/compiler/serveLanguage.ts +405 -0
- package/src/compiler/shareScope.ts +51 -0
- package/src/compiler/sharedModuleWrites.ts +88 -0
- package/src/compiler/splitImports.ts +387 -0
- package/src/compiler/templateWarnings.ts +128 -0
- package/src/compiler/tokenize.ts +317 -0
- package/src/compiler/trackingWarnings.ts +279 -0
- package/src/compiler/writeDefaultProject.ts +42 -0
- package/src/server/BRIDGE_VERSION.ts +3 -0
- package/src/server/CLIENT_BUILD.ts +56 -0
- package/src/server/DEFAULT_PORT.ts +6 -0
- package/src/server/DOCUMENT_HEADERS.ts +11 -0
- package/src/server/Inbox.ts +36 -0
- package/src/server/LogPanel.ts +239 -0
- package/src/server/MCP_PROTOCOL_VERSION.ts +3 -0
- package/src/server/SETTLE_MILLISECONDS.ts +7 -0
- package/src/server/VIRTUAL_DIRECTORY.ts +6 -0
- package/src/server/answerFailure.ts +91 -0
- package/src/server/answerRequest.ts +560 -0
- package/src/server/answerRpc.ts +550 -0
- package/src/server/answerSocket.ts +585 -0
- package/src/server/answerValue.ts +375 -0
- package/src/server/appDirectories.ts +9 -0
- package/src/server/appKit.ts +204 -0
- package/src/server/appPlugins.ts +26 -0
- package/src/server/argsFor.ts +40 -0
- package/src/server/assistant.ts +163 -0
- package/src/server/banner.ts +43 -0
- package/src/server/bridgeRelay.ts +249 -0
- package/src/server/buildDirectory.ts +10 -0
- package/src/server/callerOf.ts +60 -0
- package/src/server/claudeApi.ts +224 -0
- package/src/server/claudeCode.ts +187 -0
- package/src/server/clientBuildOptions.ts +49 -0
- package/src/server/coerceArgs.ts +110 -0
- package/src/server/commands.ts +442 -0
- package/src/server/componentImports.ts +56 -0
- package/src/server/componentModules.d.ts +9 -0
- package/src/server/compressAnswer.ts +100 -0
- package/src/server/config.ts +192 -0
- package/src/server/configFields.ts +92 -0
- package/src/server/createApp.ts +428 -0
- package/src/server/crossingOrigin.ts +49 -0
- package/src/server/csp.ts +77 -0
- package/src/server/devWorker.ts +641 -0
- package/src/server/faultPolicy.ts +59 -0
- package/src/server/fenceServer.ts +48 -0
- package/src/server/generatedSurfaces.ts +430 -0
- package/src/server/hooks.ts +190 -0
- package/src/server/index.ts +87 -0
- package/src/server/installServer.ts +47 -0
- package/src/server/launcherOptions.ts +62 -0
- package/src/server/launcherPage.ts +156 -0
- package/src/server/manifestOf.ts +114 -0
- package/src/server/muxUpgrade.ts +72 -0
- package/src/server/namesUnder.ts +15 -0
- package/src/server/nativeMenu.ts +296 -0
- package/src/server/negotiateEncoding.ts +39 -0
- package/src/server/plainAnswer.ts +19 -0
- package/src/server/prefers.ts +25 -0
- package/src/server/principal.ts +261 -0
- package/src/server/qualitiesOf.ts +22 -0
- package/src/server/randomToken.ts +9 -0
- package/src/server/reachable.ts +31 -0
- package/src/server/refuseAddressCollision.ts +30 -0
- package/src/server/remote.ts +242 -0
- package/src/server/render.ts +464 -0
- package/src/server/renderComponent.ts +33 -0
- package/src/server/reportHealth.ts +46 -0
- package/src/server/requestScope.ts +435 -0
- package/src/server/responseHelpers.ts +75 -0
- package/src/server/runCompiled.ts +44 -0
- package/src/server/runDesktop.ts +572 -0
- package/src/server/seedBuffer.ts +293 -0
- package/src/server/serveBuild.ts +198 -0
- package/src/server/serveDev.ts +505 -0
- package/src/server/shell.ts +506 -0
- package/src/server/surfaceOf.ts +47 -0
- package/src/server/testBuild.ts +237 -0
- package/src/server/trace.ts +151 -0
- package/src/server/versionOf.ts +109 -0
- package/src/server/withoutTrailingSlash.ts +4 -0
- package/src/shared/ADDRESSES.ts +69 -0
- package/src/shared/ANCHORS.ts +54 -0
- package/src/shared/Attributes.ts +339 -0
- package/src/shared/BOOLEAN_ATTRIBUTES.ts +41 -0
- package/src/shared/CHILDREN.ts +11 -0
- package/src/shared/CURRENT_ROUTER.ts +25 -0
- package/src/shared/CopyOptions.ts +19 -0
- package/src/shared/DEBUG_META.ts +6 -0
- package/src/shared/EARLY_CALLS.ts +8 -0
- package/src/shared/FAILURE_STATUS_TEXT.ts +48 -0
- package/src/shared/Failed.ts +146 -0
- package/src/shared/GLOBAL_GETS.ts +13 -0
- package/src/shared/Issues.ts +49 -0
- package/src/shared/JsonValue.ts +18 -0
- package/src/shared/LOAD_SIGNAL.ts +10 -0
- package/src/shared/MOUNT_META.ts +6 -0
- package/src/shared/Middleware.ts +34 -0
- package/src/shared/NAVIGATION_HEADER.ts +7 -0
- package/src/shared/PRINCIPAL_HEADER.ts +6 -0
- package/src/shared/RPC_SERVER.ts +67 -0
- package/src/shared/Raw.ts +90 -0
- package/src/shared/Schema.ts +229 -0
- package/src/shared/UNEXPECTED.ts +11 -0
- package/src/shared/URL_ATTRIBUTES.ts +19 -0
- package/src/shared/VERSION_HEADER.ts +6 -0
- package/src/shared/WORK.ts +37 -0
- package/src/shared/anchorMarkup.ts +15 -0
- package/src/shared/answerOf.ts +141 -0
- package/src/shared/applyPatch.ts +173 -0
- package/src/shared/armAnchor.ts +17 -0
- package/src/shared/attributeText.ts +50 -0
- package/src/shared/boundValue.ts +58 -0
- package/src/shared/cookies.ts +271 -0
- package/src/shared/csp.ts +55 -0
- package/src/shared/decodedOrKept.ts +14 -0
- package/src/shared/escapeText.ts +103 -0
- package/src/shared/framing.ts +131 -0
- package/src/shared/headKeyOf.ts +34 -0
- package/src/shared/health.ts +51 -0
- package/src/shared/index.ts +117 -0
- package/src/shared/isEventName.ts +10 -0
- package/src/shared/isRecord.ts +4 -0
- package/src/shared/issuesOf.ts +18 -0
- package/src/shared/jsonSchema.ts +50 -0
- package/src/shared/listOf.ts +20 -0
- package/src/shared/log.ts +284 -0
- package/src/shared/matchRoute.ts +99 -0
- package/src/shared/menuItem.ts +80 -0
- package/src/shared/mount.ts +45 -0
- package/src/shared/muxFrames.ts +35 -0
- package/src/shared/navigate.ts +26 -0
- package/src/shared/note.ts +24 -0
- package/src/shared/numberFromText.ts +10 -0
- package/src/shared/online.ts +19 -0
- package/src/shared/paint.ts +4 -0
- package/src/shared/principal.ts +145 -0
- package/src/shared/principalRotated.ts +47 -0
- package/src/shared/propCell.ts +99 -0
- package/src/shared/props.ts +24 -0
- package/src/shared/putOwn.ts +24 -0
- package/src/shared/queryText.ts +18 -0
- package/src/shared/reactive/CELL.ts +8 -0
- package/src/shared/reactive/Cursor.ts +217 -0
- package/src/shared/reactive/ENTRY_LIVES.ts +7 -0
- package/src/shared/reactive/Expiry.ts +103 -0
- package/src/shared/reactive/FOLLOWED.ts +8 -0
- package/src/shared/reactive/KEYED_BRAND.ts +8 -0
- package/src/shared/reactive/Keyed.ts +424 -0
- package/src/shared/reactive/MUTATION.ts +5 -0
- package/src/shared/reactive/NO_INITIAL.ts +6 -0
- package/src/shared/reactive/NotLanded.ts +21 -0
- package/src/shared/reactive/PATCHES.ts +11 -0
- package/src/shared/reactive/PATCH_SINKS.ts +26 -0
- package/src/shared/reactive/REACTIVE_BRAND.ts +9 -0
- package/src/shared/reactive/RESHAPING.ts +13 -0
- package/src/shared/reactive/Reactive.ts +4501 -0
- package/src/shared/reactive/SELECTION_MEMBERS.ts +12 -0
- package/src/shared/reactive/STREAMING.ts +5 -0
- package/src/shared/reactive/argsContract.ts +97 -0
- package/src/shared/reactive/byOf.ts +18 -0
- package/src/shared/reactive/callLoad.ts +200 -0
- package/src/shared/reactive/canonicalKey.ts +95 -0
- package/src/shared/reactive/chunksOfStream.ts +51 -0
- package/src/shared/reactive/index.ts +542 -0
- package/src/shared/reactive/isReactive.ts +19 -0
- package/src/shared/reactive/isThenable.ts +14 -0
- package/src/shared/reactive/matchesPattern.ts +16 -0
- package/src/shared/reactive/pairReactive.ts +41 -0
- package/src/shared/reactive/parameterDefaults.ts +356 -0
- package/src/shared/reactive/recordWrites.ts +472 -0
- package/src/shared/reactive/scoped.ts +157 -0
- package/src/shared/reactive/scoping.ts +64 -0
- package/src/shared/reactive/share.ts +91 -0
- package/src/shared/reactive/structural.ts +62 -0
- package/src/shared/reactive/tracking.ts +552 -0
- package/src/shared/reactive/watch.ts +314 -0
- package/src/shared/refuse.ts +224 -0
- package/src/shared/route.ts +29 -0
- package/src/shared/routePattern.ts +146 -0
- package/src/shared/rpc.ts +501 -0
- package/src/shared/rpcRequest.ts +73 -0
- package/src/shared/safeUrl.ts +68 -0
- package/src/shared/seededDocument.ts +36 -0
- package/src/shared/setUpLevels.ts +53 -0
- package/src/shared/slotValue.ts +34 -0
- package/src/shared/spread.ts +79 -0
- package/src/shared/takeEarlyCall.ts +86 -0
- package/src/shared/url.ts +140 -0
- package/src/shared/validateJson.ts +578 -0
- package/src/shared/versionInEtag.ts +14 -0
- package/src/shared/writePath.ts +95 -0
- package/src/ui/ArmRegion.ts +185 -0
- package/src/ui/LAYER_NAMES.ts +30 -0
- package/src/ui/List.ts +273 -0
- package/src/ui/Mismatch.ts +32 -0
- package/src/ui/RawRun.ts +99 -0
- package/src/ui/Router.ts +698 -0
- package/src/ui/Scope.ts +115 -0
- package/src/ui/TryRegion.ts +278 -0
- package/src/ui/adoptWalk.ts +126 -0
- package/src/ui/applyHead.ts +146 -0
- package/src/ui/bindElement.ts +44 -0
- package/src/ui/bindProperty.ts +79 -0
- package/src/ui/bindSpread.ts +44 -0
- package/src/ui/escapeless.ts +14 -0
- package/src/ui/index.ts +64 -0
- package/src/ui/leave.ts +35 -0
- package/src/ui/listenForRoutes.ts +92 -0
- package/src/ui/measureLayer.ts +34 -0
- package/src/ui/menuBridge.ts +19 -0
- package/src/ui/moveNode.ts +34 -0
- package/src/ui/parseMarkup.ts +35 -0
- package/src/ui/reconcile.ts +368 -0
- package/src/ui/regions.ts +137 -0
- package/src/ui/reportMenu.ts +57 -0
- package/src/ui/routing.ts +18 -0
- package/src/ui/rowKeyOf.ts +19 -0
- package/src/ui/rows.ts +99 -0
- package/src/ui/setAttribute.ts +37 -0
- package/src/ui/setClass.ts +27 -0
- package/src/ui/setMarkup.ts +20 -0
- package/src/ui/setStyleProperty.ts +30 -0
- package/src/ui/setText.ts +28 -0
- package/src/ui/socketWire.ts +258 -0
- package/src/ui/wire.ts +141 -0
- package/AGENTS.md +0 -446
- package/README.md +0 -249
- package/src/abideLsp.ts +0 -251
- package/src/abideModules.d.ts +0 -8
- package/src/abideResolverPlugin.ts +0 -1101
- package/src/appEntry.ts +0 -161
- package/src/assets/app.html +0 -12
- package/src/build.ts +0 -189
- package/src/buildCli.ts +0 -125
- package/src/buildDisconnected.ts +0 -117
- package/src/bundleApp.ts +0 -146
- package/src/bundleDisconnectedEntry.ts +0 -14
- package/src/checkAbide.ts +0 -145
- package/src/cliEntry.ts +0 -25
- package/src/clientBuildPlugins.ts +0 -33
- package/src/clientEntry.ts +0 -17
- package/src/compile.ts +0 -61
- package/src/controlServerWorker.ts +0 -433
- package/src/devEntry.ts +0 -381
- package/src/discoveryEntry.ts +0 -82
- package/src/initAgent.ts +0 -50
- package/src/lib/bundle/BundleMenu.ts +0 -12
- package/src/lib/bundle/BundleMenuItem.ts +0 -25
- package/src/lib/bundle/BundleWindow.ts +0 -37
- package/src/lib/bundle/WEBVIEW_BUILD_REVISION.ts +0 -9
- package/src/lib/bundle/WEBVIEW_VERSION.ts +0 -7
- package/src/lib/bundle/bindConnectedFlag.ts +0 -29
- package/src/lib/bundle/bindRequestNavigate.ts +0 -34
- package/src/lib/bundle/buildWebviewLib.ts +0 -111
- package/src/lib/bundle/bundled.ts +0 -35
- package/src/lib/bundle/disconnected.abide +0 -265
- package/src/lib/bundle/disconnected.css +0 -9
- package/src/lib/bundle/ensureWebviewLib.ts +0 -20
- package/src/lib/bundle/exitWithParent.ts +0 -30
- package/src/lib/bundle/infoPlist.ts +0 -52
- package/src/lib/bundle/installDownloads.ts +0 -34
- package/src/lib/bundle/installMacMenu.ts +0 -49
- package/src/lib/bundle/listenLocalControlServer.ts +0 -19
- package/src/lib/bundle/native/abideMenu.mm +0 -422
- package/src/lib/bundle/native/webview.h +0 -4557
- package/src/lib/bundle/onMenu.ts +0 -42
- package/src/lib/bundle/openWebview.ts +0 -104
- package/src/lib/bundle/pngToIcns.ts +0 -47
- package/src/lib/bundle/probeAbideServer.ts +0 -57
- package/src/lib/bundle/resolveServerBinary.ts +0 -12
- package/src/lib/bundle/resolveWebviewLib.ts +0 -53
- package/src/lib/bundle/serverBinaryFilename.ts +0 -8
- package/src/lib/bundle/signMacApp.ts +0 -37
- package/src/lib/bundle/spawnEmbeddedServer.ts +0 -73
- package/src/lib/bundle/stableLocalPort.ts +0 -19
- package/src/lib/bundle/waitForServer.ts +0 -28
- package/src/lib/bundle/webviewCachePath.ts +0 -23
- package/src/lib/bundle/webviewLibName.ts +0 -11
- package/src/lib/cli/completeCli.ts +0 -38
- package/src/lib/cli/connectToServer.ts +0 -23
- package/src/lib/cli/createClient.ts +0 -108
- package/src/lib/cli/dispatchCommand.ts +0 -72
- package/src/lib/cli/loadEnvFromBinaryDir.ts +0 -15
- package/src/lib/cli/parseArgvForRpc.ts +0 -131
- package/src/lib/cli/printCommandHelp.ts +0 -43
- package/src/lib/cli/printSessionHelp.ts +0 -28
- package/src/lib/cli/printSessionStatus.ts +0 -21
- package/src/lib/cli/printTopLevelHelp.ts +0 -83
- package/src/lib/cli/printTrimmed.ts +0 -8
- package/src/lib/cli/printValue.ts +0 -10
- package/src/lib/cli/renderCliCompletions.ts +0 -56
- package/src/lib/cli/resolveCliTarget.ts +0 -47
- package/src/lib/cli/runCli.ts +0 -188
- package/src/lib/cli/runSession.ts +0 -107
- package/src/lib/cli/startLocalInstance.ts +0 -14
- package/src/lib/cli/tokenizeArgvFlags.ts +0 -86
- package/src/lib/cli/tokenizeLine.ts +0 -51
- package/src/lib/cli/types/CliManifest.ts +0 -11
- package/src/lib/cli/types/CliManifestEntry.ts +0 -17
- package/src/lib/cli/types/CliTarget.ts +0 -13
- package/src/lib/mcp/annotationsForMethod.ts +0 -29
- package/src/lib/mcp/buildPrompts.ts +0 -25
- package/src/lib/mcp/createMcpResourceServer.ts +0 -113
- package/src/lib/mcp/createMcpServer.ts +0 -56
- package/src/lib/mcp/dispatchMcpRequest.ts +0 -159
- package/src/lib/mcp/mcpResourceServerSlot.ts +0 -13
- package/src/lib/mcp/mcpSurface.ts +0 -57
- package/src/lib/mcp/mcpTools.ts +0 -196
- package/src/lib/mcp/renderPrompt.ts +0 -25
- package/src/lib/mcp/toolResultFromResponse.ts +0 -100
- package/src/lib/mcp/types/JsonRpcRequest.ts +0 -12
- package/src/lib/mcp/types/JsonRpcResponse.ts +0 -20
- package/src/lib/mcp/types/McpResourceContents.ts +0 -10
- package/src/lib/mcp/types/McpResourceDescriptor.ts +0 -6
- package/src/lib/mcp/types/McpResourceServer.ts +0 -12
- package/src/lib/mcp/types/McpServer.ts +0 -9
- package/src/lib/mcp/types/McpServerOptions.ts +0 -16
- package/src/lib/mcp/types/McpSurface.ts +0 -15
- package/src/lib/mcp/types/PromptDescriptor.ts +0 -5
- package/src/lib/mcp/types/PromptMessage.ts +0 -2
- package/src/lib/mcp/types/ToolDescriptor.ts +0 -7
- package/src/lib/mcp/types/ToolResult.ts +0 -2
- package/src/lib/server/AppModule.ts +0 -47
- package/src/lib/server/DELETE.ts +0 -10
- package/src/lib/server/GET.ts +0 -10
- package/src/lib/server/HEAD.ts +0 -10
- package/src/lib/server/PATCH.ts +0 -10
- package/src/lib/server/POST.ts +0 -10
- package/src/lib/server/PUT.ts +0 -10
- package/src/lib/server/agent.ts +0 -86
- package/src/lib/server/appDataDir.ts +0 -16
- package/src/lib/server/cli/buildEnvContent.ts +0 -19
- package/src/lib/server/cli/createTarGz.ts +0 -77
- package/src/lib/server/cli/handleCliDownload.ts +0 -152
- package/src/lib/server/cli/handleCliInstall.ts +0 -37
- package/src/lib/server/cli/installScript.ts +0 -31
- package/src/lib/server/cli/maxSourceMtime.ts +0 -26
- package/src/lib/server/cookies.ts +0 -30
- package/src/lib/server/env.ts +0 -51
- package/src/lib/server/error.ts +0 -110
- package/src/lib/server/json.ts +0 -57
- package/src/lib/server/jsonl.ts +0 -47
- package/src/lib/server/prompts/definePrompt.ts +0 -21
- package/src/lib/server/prompts/promptRegistry.ts +0 -9
- package/src/lib/server/prompts/registerPrompt.ts +0 -6
- package/src/lib/server/prompts/renderPromptTemplate.ts +0 -17
- package/src/lib/server/prompts/types/Prompt.ts +0 -14
- package/src/lib/server/prompts/types/PromptOptions.ts +0 -12
- package/src/lib/server/prompts/types/PromptRegistryEntry.ts +0 -13
- package/src/lib/server/prompts/types/PromptRoutes.ts +0 -10
- package/src/lib/server/redirect.ts +0 -43
- package/src/lib/server/render.ts +0 -70
- package/src/lib/server/request.ts +0 -19
- package/src/lib/server/rpc/defineRpc.ts +0 -271
- package/src/lib/server/rpc/dispatchRpcInProcess.ts +0 -46
- package/src/lib/server/rpc/findRpcByCommandName.ts +0 -18
- package/src/lib/server/rpc/parseArgs.ts +0 -244
- package/src/lib/server/rpc/readBodyWithinLimit.ts +0 -47
- package/src/lib/server/rpc/registerRpc.ts +0 -6
- package/src/lib/server/rpc/resolveRpcJsonSchema.ts +0 -28
- package/src/lib/server/rpc/rpcRegistry.ts +0 -11
- package/src/lib/server/rpc/runWithRpcTimeout.ts +0 -58
- package/src/lib/server/rpc/types/RemoteHandler.ts +0 -31
- package/src/lib/server/rpc/types/RemoteRoutes.ts +0 -13
- package/src/lib/server/rpc/types/RpcHelper.ts +0 -185
- package/src/lib/server/rpc/types/RpcRegistryEntry.ts +0 -50
- package/src/lib/server/rpc/types/TypedError.ts +0 -18
- package/src/lib/server/rpc/types/TypedResponse.ts +0 -18
- package/src/lib/server/rpc/unprocessed.ts +0 -13
- package/src/lib/server/rpc/validationError.ts +0 -17
- package/src/lib/server/runtime/DEFAULT_PORT.ts +0 -6
- package/src/lib/server/runtime/DEV_READY_MESSAGE.ts +0 -6
- package/src/lib/server/runtime/DEV_REBUILD_MESSAGE.ts +0 -4
- package/src/lib/server/runtime/DEV_RELOAD_CLIENT_SCRIPT.ts +0 -92
- package/src/lib/server/runtime/SSR_SWAP_SCRIPT.ts +0 -19
- package/src/lib/server/runtime/STATUS_TEXT.ts +0 -22
- package/src/lib/server/runtime/STREAMED_HTML_HEADER.ts +0 -13
- package/src/lib/server/runtime/acceptsGzip.ts +0 -33
- package/src/lib/server/runtime/amendBroadcaster.ts +0 -53
- package/src/lib/server/runtime/buildCacheSnapshot.ts +0 -63
- package/src/lib/server/runtime/buildHealthPayload.ts +0 -34
- package/src/lib/server/runtime/buildInFlightSnapshot.ts +0 -35
- package/src/lib/server/runtime/buildInspectorSurface.ts +0 -47
- package/src/lib/server/runtime/buildOpenApiSpec.ts +0 -150
- package/src/lib/server/runtime/buildPreloadManifest.ts +0 -153
- package/src/lib/server/runtime/cacheControlForAsset.ts +0 -22
- package/src/lib/server/runtime/cacheStalenessBroadcaster.ts +0 -33
- package/src/lib/server/runtime/containsTraversal.ts +0 -41
- package/src/lib/server/runtime/createAppAssetServer.ts +0 -100
- package/src/lib/server/runtime/createAppRouteResolver.ts +0 -145
- package/src/lib/server/runtime/createAssetHeaderCache.ts +0 -31
- package/src/lib/server/runtime/createPlumbingRouter.ts +0 -212
- package/src/lib/server/runtime/createPublicAssetServer.ts +0 -76
- package/src/lib/server/runtime/createRouteDispatcher.ts +0 -121
- package/src/lib/server/runtime/createServer.ts +0 -605
- package/src/lib/server/runtime/createUiPageRenderer.ts +0 -489
- package/src/lib/server/runtime/crossOriginForbidden.ts +0 -17
- package/src/lib/server/runtime/crossOriginGate.ts +0 -29
- package/src/lib/server/runtime/devClientFingerprint.ts +0 -103
- package/src/lib/server/runtime/devReloadResponse.ts +0 -41
- package/src/lib/server/runtime/disableIdleTimeoutForStream.ts +0 -27
- package/src/lib/server/runtime/envSchemaStore.ts +0 -15
- package/src/lib/server/runtime/finalizeResponse.ts +0 -42
- package/src/lib/server/runtime/findOpenPort.ts +0 -21
- package/src/lib/server/runtime/flushingGzipStream.ts +0 -62
- package/src/lib/server/runtime/getActiveServer.ts +0 -6
- package/src/lib/server/runtime/globToPathSet.ts +0 -29
- package/src/lib/server/runtime/gzipResponse.ts +0 -57
- package/src/lib/server/runtime/inFlightRequests.ts +0 -13
- package/src/lib/server/runtime/inProcessServer.ts +0 -20
- package/src/lib/server/runtime/installAmbientScopeStore.ts +0 -54
- package/src/lib/server/runtime/internalErrorResponse.ts +0 -28
- package/src/lib/server/runtime/isCrossOriginRequest.ts +0 -23
- package/src/lib/server/runtime/listenOnOpenPort.ts +0 -36
- package/src/lib/server/runtime/logExposedSurfaces.ts +0 -156
- package/src/lib/server/runtime/maybeMountInspector.ts +0 -104
- package/src/lib/server/runtime/mimeForExtension.ts +0 -14
- package/src/lib/server/runtime/pageRenderSlot.ts +0 -15
- package/src/lib/server/runtime/pageUrlFromStore.ts +0 -15
- package/src/lib/server/runtime/parseIdleTimeout.ts +0 -10
- package/src/lib/server/runtime/parsePort.ts +0 -11
- package/src/lib/server/runtime/pathStore.ts +0 -15
- package/src/lib/server/runtime/registryManifests.ts +0 -66
- package/src/lib/server/runtime/renderCellBarrierStore.ts +0 -15
- package/src/lib/server/runtime/requestContext.ts +0 -5
- package/src/lib/server/runtime/resolvePageSnapshot.ts +0 -25
- package/src/lib/server/runtime/respondWithEmbeddedAsset.ts +0 -18
- package/src/lib/server/runtime/runWithRequestScope.ts +0 -165
- package/src/lib/server/runtime/serializeCacheSnapshot.ts +0 -31
- package/src/lib/server/runtime/serverSlot.ts +0 -13
- package/src/lib/server/runtime/setActiveServer.ts +0 -6
- package/src/lib/server/runtime/snapshotEntryFromCache.ts +0 -121
- package/src/lib/server/runtime/streamCacheResolutions.ts +0 -44
- package/src/lib/server/runtime/streamFromIterator.ts +0 -124
- package/src/lib/server/runtime/textResponse.ts +0 -23
- package/src/lib/server/runtime/typedErrorResponse.ts +0 -26
- package/src/lib/server/runtime/types/Assets.ts +0 -6
- package/src/lib/server/runtime/types/DevReloadStamp.ts +0 -14
- package/src/lib/server/runtime/types/InspectorCacheEntry.ts +0 -24
- package/src/lib/server/runtime/types/InspectorCacheSnapshot.ts +0 -11
- package/src/lib/server/runtime/types/InspectorContext.ts +0 -34
- package/src/lib/server/runtime/types/InspectorInFlightRequest.ts +0 -20
- package/src/lib/server/runtime/types/InspectorInFlightSnapshot.ts +0 -10
- package/src/lib/server/runtime/types/InspectorPrompt.ts +0 -15
- package/src/lib/server/runtime/types/InspectorRpc.ts +0 -27
- package/src/lib/server/runtime/types/InspectorSocket.ts +0 -17
- package/src/lib/server/runtime/types/InspectorSurface.ts +0 -16
- package/src/lib/server/runtime/types/RequestStore.ts +0 -125
- package/src/lib/server/runtime/warnUnguardedMcp.ts +0 -43
- package/src/lib/server/runtime/withResponseDefaults.ts +0 -29
- package/src/lib/server/server.ts +0 -33
- package/src/lib/server/socket.ts +0 -32
- package/src/lib/server/sockets/amendFamilyEntry.ts +0 -39
- package/src/lib/server/sockets/createSocketDispatcher.ts +0 -397
- package/src/lib/server/sockets/defineSocket.ts +0 -225
- package/src/lib/server/sockets/lookupSocket.ts +0 -6
- package/src/lib/server/sockets/registerSocket.ts +0 -18
- package/src/lib/server/sockets/socketOperations.ts +0 -36
- package/src/lib/server/sockets/socketRegistry.ts +0 -9
- package/src/lib/server/sockets/types/SocketOperation.ts +0 -22
- package/src/lib/server/sockets/types/SocketOptions.ts +0 -26
- package/src/lib/server/sockets/types/SocketRegistryEntry.ts +0 -19
- package/src/lib/server/sockets/types/SocketRoutes.ts +0 -10
- package/src/lib/server/sse.ts +0 -58
- package/src/lib/shared/ABIDE_PACKAGE_NAME.ts +0 -7
- package/src/lib/shared/ABIDE_VERSION.ts +0 -9
- package/src/lib/shared/AMEND_TOPIC_PREFIX.ts +0 -9
- package/src/lib/shared/ASYNC_CELL.ts +0 -5
- package/src/lib/shared/CACHE_CONTROL_VALUES.ts +0 -16
- package/src/lib/shared/CACHE_STALENESS_SOCKET.ts +0 -8
- package/src/lib/shared/CLI_PATH.ts +0 -7
- package/src/lib/shared/DEFER.ts +0 -8
- package/src/lib/shared/DEV_REBUILD_PATH.ts +0 -6
- package/src/lib/shared/DEV_RELOAD_PATH.ts +0 -6
- package/src/lib/shared/HEALTH_PATH.ts +0 -7
- package/src/lib/shared/HTTP_METHODS.ts +0 -6
- package/src/lib/shared/HttpError.ts +0 -30
- package/src/lib/shared/IDENTITY_PATH.ts +0 -6
- package/src/lib/shared/INSPECTOR_PATH.ts +0 -7
- package/src/lib/shared/MCP_PATH.ts +0 -6
- package/src/lib/shared/NAV_HEADER.ts +0 -8
- package/src/lib/shared/OFFLINE_HEADER.ts +0 -8
- package/src/lib/shared/PROXIED_SERVER_SUBDIRS.ts +0 -15
- package/src/lib/shared/REF_JSON_HEADER.ts +0 -9
- package/src/lib/shared/REF_JSON_TAGS.ts +0 -43
- package/src/lib/shared/REMOTE_FUNCTION.ts +0 -8
- package/src/lib/shared/REPLAYABLE_METHODS.ts +0 -12
- package/src/lib/shared/RESERVED_SOCKET_PREFIX.ts +0 -8
- package/src/lib/shared/RPC_ARGS_TYPE.ts +0 -7
- package/src/lib/shared/RPC_SHIM_GLOBALS.ts +0 -9
- package/src/lib/shared/SEEDS.ts +0 -33
- package/src/lib/shared/SOCKETS_PATH.ts +0 -7
- package/src/lib/shared/SOCKET_SEED.ts +0 -12
- package/src/lib/shared/SSR_SCRIPT_ID.ts +0 -11
- package/src/lib/shared/STREAMING_CONTENT_TYPES.ts +0 -12
- package/src/lib/shared/SocketDisconnectedError.ts +0 -13
- package/src/lib/shared/TEXT_PLAIN.ts +0 -7
- package/src/lib/shared/abideImportName.ts +0 -44
- package/src/lib/shared/abideLog.ts +0 -38
- package/src/lib/shared/activeCacheStore.ts +0 -12
- package/src/lib/shared/activePage.ts +0 -12
- package/src/lib/shared/amend.ts +0 -48
- package/src/lib/shared/amendBroadcastSlot.ts +0 -19
- package/src/lib/shared/appDataDir.ts +0 -34
- package/src/lib/shared/appNameSlot.ts +0 -10
- package/src/lib/shared/applyAmendLocally.ts +0 -20
- package/src/lib/shared/applyCacheStalenessLocally.ts +0 -18
- package/src/lib/shared/assertExhaustive.ts +0 -14
- package/src/lib/shared/attachRpcSelectorMethods.ts +0 -44
- package/src/lib/shared/attachSocketSelectorMethods.ts +0 -34
- package/src/lib/shared/augmentModule.ts +0 -18
- package/src/lib/shared/basePath.ts +0 -11
- package/src/lib/shared/basePathFromAppUrl.ts +0 -20
- package/src/lib/shared/baseSlot.ts +0 -9
- package/src/lib/shared/binaryDirEnvPath.ts +0 -12
- package/src/lib/shared/bodyValueForKind.ts +0 -34
- package/src/lib/shared/browserClientFlags.ts +0 -10
- package/src/lib/shared/buildArtifact.ts +0 -20
- package/src/lib/shared/buildRpcProxy.ts +0 -39
- package/src/lib/shared/buildRpcRequest.ts +0 -81
- package/src/lib/shared/buildSocketOverChannel.ts +0 -102
- package/src/lib/shared/bundleGraphFromMetafile.ts +0 -68
- package/src/lib/shared/bundleLayout.ts +0 -36
- package/src/lib/shared/cache.ts +0 -1584
- package/src/lib/shared/cacheEntryFromSnapshot.ts +0 -77
- package/src/lib/shared/cacheManagedSlot.ts +0 -10
- package/src/lib/shared/cacheReaderSocketSlot.ts +0 -11
- package/src/lib/shared/cacheStalenessSlot.ts +0 -21
- package/src/lib/shared/cacheStoreSlot.ts +0 -12
- package/src/lib/shared/cacheStores.ts +0 -10
- package/src/lib/shared/canonicalJson.ts +0 -86
- package/src/lib/shared/carriesBodyArgs.ts +0 -13
- package/src/lib/shared/changeAffectsClient.ts +0 -40
- package/src/lib/shared/clearLastConnection.ts +0 -7
- package/src/lib/shared/commandNameForUrl.ts +0 -17
- package/src/lib/shared/contentBodyKind.ts +0 -27
- package/src/lib/shared/contentTypeOf.ts +0 -6
- package/src/lib/shared/createCacheStore.ts +0 -147
- package/src/lib/shared/createChannelLog.ts +0 -146
- package/src/lib/shared/createLifecycleChannel.ts +0 -62
- package/src/lib/shared/createLivenessWatch.ts +0 -118
- package/src/lib/shared/createPushIterator.ts +0 -132
- package/src/lib/shared/createReachable.ts +0 -78
- package/src/lib/shared/createRemoteFunction.ts +0 -210
- package/src/lib/shared/createResolverSlot.ts +0 -30
- package/src/lib/shared/createRpcServerProgram.ts +0 -1007
- package/src/lib/shared/createSocketSubRegistry.ts +0 -112
- package/src/lib/shared/createSubscriber.ts +0 -55
- package/src/lib/shared/createTraceContext.ts +0 -21
- package/src/lib/shared/dataDirEnvPath.ts +0 -12
- package/src/lib/shared/debugGate.ts +0 -90
- package/src/lib/shared/decodeRefJson.ts +0 -112
- package/src/lib/shared/decodeResponse.ts +0 -54
- package/src/lib/shared/decodeWireBody.ts +0 -35
- package/src/lib/shared/detectRpcMethod.ts +0 -24
- package/src/lib/shared/detectTarget.ts +0 -27
- package/src/lib/shared/docSnapshotsSlot.ts +0 -13
- package/src/lib/shared/done.ts +0 -20
- package/src/lib/shared/emitLogRecord.ts +0 -217
- package/src/lib/shared/encodeRefJson.ts +0 -108
- package/src/lib/shared/encodeSeedValue.ts +0 -24
- package/src/lib/shared/encodeWireBody.ts +0 -18
- package/src/lib/shared/escapeHtml.ts +0 -15
- package/src/lib/shared/escapeRegex.ts +0 -9
- package/src/lib/shared/exeSuffix.ts +0 -9
- package/src/lib/shared/exitOnBuildFailure.ts +0 -18
- package/src/lib/shared/extraForwardHeaders.ts +0 -16
- package/src/lib/shared/fieldErrorsFromIssues.ts +0 -27
- package/src/lib/shared/fileName.ts +0 -9
- package/src/lib/shared/fileStem.ts +0 -11
- package/src/lib/shared/findExportCallSite.ts +0 -233
- package/src/lib/shared/formatTraceparent.ts +0 -6
- package/src/lib/shared/forwardHeaders.ts +0 -44
- package/src/lib/shared/generateDeclarations.ts +0 -72
- package/src/lib/shared/getRemoteMeta.ts +0 -5
- package/src/lib/shared/hasSeedableRequest.ts +0 -25
- package/src/lib/shared/health.ts +0 -179
- package/src/lib/shared/healthReadSlot.ts +0 -11
- package/src/lib/shared/healthSeedSlot.ts +0 -12
- package/src/lib/shared/html.ts +0 -19
- package/src/lib/shared/httpErrorFor.ts +0 -26
- package/src/lib/shared/hydrationWindow.ts +0 -53
- package/src/lib/shared/importNamesToStrip.ts +0 -13
- package/src/lib/shared/invalidate.ts +0 -39
- package/src/lib/shared/invalidateEvent.ts +0 -11
- package/src/lib/shared/invalidateTripwire.ts +0 -40
- package/src/lib/shared/isAbideHealthPayload.ts +0 -11
- package/src/lib/shared/isAsciiWhitespace.ts +0 -5
- package/src/lib/shared/isAsyncCell.ts +0 -11
- package/src/lib/shared/isAsyncIterable.ts +0 -8
- package/src/lib/shared/isCompileTarget.ts +0 -21
- package/src/lib/shared/isDebugEnabled.ts +0 -19
- package/src/lib/shared/isDebugNegated.ts +0 -17
- package/src/lib/shared/isIdentPart.ts +0 -9
- package/src/lib/shared/isIdentStart.ts +0 -8
- package/src/lib/shared/isLayoutFile.ts +0 -12
- package/src/lib/shared/isModuleNotFound.ts +0 -18
- package/src/lib/shared/isReadOnlyMethod.ts +0 -14
- package/src/lib/shared/isReplayableMethod.ts +0 -7
- package/src/lib/shared/isStreamingResponse.ts +0 -12
- package/src/lib/shared/isSubscribable.ts +0 -15
- package/src/lib/shared/isThenable.ts +0 -9
- package/src/lib/shared/jsonSchemaForPromptArguments.ts +0 -29
- package/src/lib/shared/jsonSchemaForSchema.ts +0 -39
- package/src/lib/shared/jsonSchemaForType.ts +0 -245
- package/src/lib/shared/jsonlErrorFrame.ts +0 -24
- package/src/lib/shared/keyForRemoteCall.ts +0 -30
- package/src/lib/shared/keyMatchesPrefix.ts +0 -9
- package/src/lib/shared/keyPrefixForRemote.ts +0 -12
- package/src/lib/shared/lastConnectionPath.ts +0 -7
- package/src/lib/shared/layoutChainForRoute.ts +0 -22
- package/src/lib/shared/lenientDecode.ts +0 -15
- package/src/lib/shared/loadEnvFile.ts +0 -17
- package/src/lib/shared/loadEnvFromDataDir.ts +0 -14
- package/src/lib/shared/loadProjectTsConfig.ts +0 -28
- package/src/lib/shared/log.ts +0 -24
- package/src/lib/shared/logClosingRecord.ts +0 -28
- package/src/lib/shared/logTapSlot.ts +0 -13
- package/src/lib/shared/manifestModule.ts +0 -39
- package/src/lib/shared/markFrameworkSourcesIgnored.ts +0 -47
- package/src/lib/shared/matchRoute.ts +0 -165
- package/src/lib/shared/matcherFromEnvelope.ts +0 -31
- package/src/lib/shared/memoizeByKey.ts +0 -32
- package/src/lib/shared/messageFromError.ts +0 -6
- package/src/lib/shared/normalizePathname.ts +0 -11
- package/src/lib/shared/normalizeTarget.ts +0 -10
- package/src/lib/shared/online.ts +0 -51
- package/src/lib/shared/page.ts +0 -30
- package/src/lib/shared/pageSlot.ts +0 -17
- package/src/lib/shared/pageUrlForFile.ts +0 -14
- package/src/lib/shared/parseBoundedEnvInt.ts +0 -20
- package/src/lib/shared/parseEnv.ts +0 -41
- package/src/lib/shared/parsePromptMarkdown.ts +0 -35
- package/src/lib/shared/parseRouteSegments.ts +0 -31
- package/src/lib/shared/parseTraceparent.ts +0 -26
- package/src/lib/shared/peek.ts +0 -46
- package/src/lib/shared/pending.ts +0 -36
- package/src/lib/shared/pendingAsyncCellsSlot.ts +0 -13
- package/src/lib/shared/prepareRemoteExport.ts +0 -40
- package/src/lib/shared/prepareRpcModule.ts +0 -240
- package/src/lib/shared/prepareSocketModule.ts +0 -46
- package/src/lib/shared/probeRegistries.ts +0 -68
- package/src/lib/shared/producerKey.ts +0 -32
- package/src/lib/shared/programNameForPackage.ts +0 -16
- package/src/lib/shared/promptNameForFile.ts +0 -10
- package/src/lib/shared/queryStringFromArgs.ts +0 -38
- package/src/lib/shared/randomHexId.ts +0 -14
- package/src/lib/shared/reachable.ts +0 -99
- package/src/lib/shared/readEnvFile.ts +0 -15
- package/src/lib/shared/readLastConnection.ts +0 -18
- package/src/lib/shared/readPackageJson.ts +0 -9
- package/src/lib/shared/recordRemoteMeta.ts +0 -5
- package/src/lib/shared/refresh.ts +0 -39
- package/src/lib/shared/refreshing.ts +0 -37
- package/src/lib/shared/remoteMetaStore.ts +0 -16
- package/src/lib/shared/requestScopeSlot.ts +0 -13
- package/src/lib/shared/resolveClientFlags.ts +0 -20
- package/src/lib/shared/resolvedCellsSlot.ts +0 -13
- package/src/lib/shared/responseBodyKind.ts +0 -35
- package/src/lib/shared/responseErrorText.ts +0 -9
- package/src/lib/shared/reviveWireField.ts +0 -49
- package/src/lib/shared/reviveWireOutput.ts +0 -36
- package/src/lib/shared/routeParamsShape.ts +0 -20
- package/src/lib/shared/rpcErrorRegistry.ts +0 -69
- package/src/lib/shared/rpcServerForRoot.ts +0 -25
- package/src/lib/shared/rpcTimeoutSlot.ts +0 -9
- package/src/lib/shared/rpcUrlForFile.ts +0 -19
- package/src/lib/shared/runningAsStandaloneBinary.ts +0 -13
- package/src/lib/shared/safeJsonForScript.ts +0 -17
- package/src/lib/shared/scanPages.ts +0 -25
- package/src/lib/shared/selectorMatcher.ts +0 -55
- package/src/lib/shared/selectorPrefix.ts +0 -32
- package/src/lib/shared/serializeEnv.ts +0 -30
- package/src/lib/shared/serializeSelector.ts +0 -69
- package/src/lib/shared/setAppName.ts +0 -5
- package/src/lib/shared/setOwnProperty.ts +0 -19
- package/src/lib/shared/setsIntersect.ts +0 -15
- package/src/lib/shared/sharedCacheStore.ts +0 -14
- package/src/lib/shared/sharedCacheStoreSlot.ts +0 -10
- package/src/lib/shared/skipNonCode.ts +0 -230
- package/src/lib/shared/snapshotShippable.ts +0 -23
- package/src/lib/shared/snippet.ts +0 -30
- package/src/lib/shared/socketNameForFile.ts +0 -11
- package/src/lib/shared/socketTailsSlot.ts +0 -13
- package/src/lib/shared/socketTapSlot.ts +0 -12
- package/src/lib/shared/sseErrorFrame.ts +0 -29
- package/src/lib/shared/streamResponse.ts +0 -180
- package/src/lib/shared/streamedCellsSlot.ts +0 -14
- package/src/lib/shared/stripImport.ts +0 -29
- package/src/lib/shared/subscribableFromResponse.ts +0 -51
- package/src/lib/shared/subscribableProbes.ts +0 -111
- package/src/lib/shared/tailProbeSlot.ts +0 -23
- package/src/lib/shared/toTagSet.ts +0 -4
- package/src/lib/shared/trace.ts +0 -16
- package/src/lib/shared/types/AmendApply.ts +0 -15
- package/src/lib/shared/types/AsyncComputed.ts +0 -20
- package/src/lib/shared/types/AsyncState.ts +0 -13
- package/src/lib/shared/types/CacheEntry.ts +0 -100
- package/src/lib/shared/types/CacheInvalidation.ts +0 -9
- package/src/lib/shared/types/CacheOnContext.ts +0 -15
- package/src/lib/shared/types/CacheOptions.ts +0 -53
- package/src/lib/shared/types/CachePolicy.ts +0 -31
- package/src/lib/shared/types/CacheReaderHook.ts +0 -11
- package/src/lib/shared/types/CacheSelector.ts +0 -17
- package/src/lib/shared/types/CacheSnapshotEntry.ts +0 -32
- package/src/lib/shared/types/CacheStalenessApply.ts +0 -13
- package/src/lib/shared/types/CacheStalenessFrame.ts +0 -24
- package/src/lib/shared/types/CacheStats.ts +0 -13
- package/src/lib/shared/types/CacheStore.ts +0 -45
- package/src/lib/shared/types/ChannelLog.ts +0 -13
- package/src/lib/shared/types/ClientFlags.ts +0 -13
- package/src/lib/shared/types/CompileTarget.ts +0 -6
- package/src/lib/shared/types/DebugGate.ts +0 -10
- package/src/lib/shared/types/DocSnapshots.ts +0 -12
- package/src/lib/shared/types/ErrorJsonSchemas.ts +0 -8
- package/src/lib/shared/types/ErrorSpec.ts +0 -11
- package/src/lib/shared/types/FrameworkLog.ts +0 -13
- package/src/lib/shared/types/HttpMethod.ts +0 -3
- package/src/lib/shared/types/InputCoercion.ts +0 -17
- package/src/lib/shared/types/LastConnection.ts +0 -9
- package/src/lib/shared/types/Log.ts +0 -13
- package/src/lib/shared/types/LogRecord.ts +0 -42
- package/src/lib/shared/types/LogVoice.ts +0 -7
- package/src/lib/shared/types/NamedAsyncIterable.ts +0 -26
- package/src/lib/shared/types/OutputWirePlan.ts +0 -17
- package/src/lib/shared/types/PageSnapshot.ts +0 -14
- package/src/lib/shared/types/PagesScan.ts +0 -7
- package/src/lib/shared/types/PendingAsyncCells.ts +0 -10
- package/src/lib/shared/types/PromptArgument.ts +0 -12
- package/src/lib/shared/types/RawRemoteFunction.ts +0 -20
- package/src/lib/shared/types/RemoteCallable.ts +0 -40
- package/src/lib/shared/types/RemoteFunction.ts +0 -116
- package/src/lib/shared/types/ReplayableMethod.ts +0 -7
- package/src/lib/shared/types/RequestScopeInfo.ts +0 -16
- package/src/lib/shared/types/ResolvedCells.ts +0 -11
- package/src/lib/shared/types/ResolverSlot.ts +0 -13
- package/src/lib/shared/types/ReturnBody.ts +0 -15
- package/src/lib/shared/types/RpcBuildStamps.ts +0 -32
- package/src/lib/shared/types/RpcError.ts +0 -26
- package/src/lib/shared/types/RpcErrorGuard.ts +0 -35
- package/src/lib/shared/types/RpcInvoker.ts +0 -6
- package/src/lib/shared/types/RpcOptions.ts +0 -22
- package/src/lib/shared/types/Socket.ts +0 -54
- package/src/lib/shared/types/SocketChannel.ts +0 -17
- package/src/lib/shared/types/SocketClientFrame.ts +0 -19
- package/src/lib/shared/types/SocketServerFrame.ts +0 -24
- package/src/lib/shared/types/SocketSubCallbacks.ts +0 -13
- package/src/lib/shared/types/SocketTails.ts +0 -13
- package/src/lib/shared/types/SourceMap.ts +0 -14
- package/src/lib/shared/types/SsrBootState.ts +0 -27
- package/src/lib/shared/types/SsrPayload.ts +0 -36
- package/src/lib/shared/types/StandardSchemaV1.ts +0 -56
- package/src/lib/shared/types/StreamPolicy.ts +0 -11
- package/src/lib/shared/types/StreamedCells.ts +0 -19
- package/src/lib/shared/types/StreamedResolution.ts +0 -28
- package/src/lib/shared/types/TailHooks.ts +0 -13
- package/src/lib/shared/types/TraceContext.ts +0 -17
- package/src/lib/shared/types/ValidationErrorData.ts +0 -20
- package/src/lib/shared/types/WireKind.ts +0 -11
- package/src/lib/shared/url.ts +0 -141
- package/src/lib/shared/validationHttpError.ts +0 -33
- package/src/lib/shared/warmSeedKey.ts +0 -16
- package/src/lib/shared/wireJsonReplacer.ts +0 -30
- package/src/lib/shared/withBase.ts +0 -10
- package/src/lib/shared/withBaseUrl.ts +0 -17
- package/src/lib/shared/withCacheManaged.ts +0 -18
- package/src/lib/shared/withJsonSchema.ts +0 -21
- package/src/lib/shared/writeDts.ts +0 -19
- package/src/lib/shared/writeHealthDts.ts +0 -36
- package/src/lib/shared/writeLastConnection.ts +0 -13
- package/src/lib/shared/writePublicAssetsDts.ts +0 -27
- package/src/lib/shared/writeRoutesDts.ts +0 -41
- package/src/lib/shared/writeRpcDts.ts +0 -60
- package/src/lib/shared/writeTestRpcDts.ts +0 -45
- package/src/lib/shared/writeTestSocketsDts.ts +0 -34
- package/src/lib/test/assertAgentFrameConformance.ts +0 -73
- package/src/lib/test/createScriptedSurface.ts +0 -45
- package/src/lib/test/createTestApp.ts +0 -242
- package/src/lib/test/createTestSocketChannel.ts +0 -85
- package/src/lib/ui/README.md +0 -86
- package/src/lib/ui/activePendingCells.ts +0 -14
- package/src/lib/ui/amendReaderHook.ts +0 -125
- package/src/lib/ui/compile/ABIDE_SEMANTIC_TOKENS_LEGEND.ts +0 -79
- package/src/lib/ui/compile/AbideCompileError.ts +0 -16
- package/src/lib/ui/compile/BLOCK_KEYWORDS.ts +0 -21
- package/src/lib/ui/compile/SSR_ESCAPE.ts +0 -40
- package/src/lib/ui/compile/TS_PRINTER.ts +0 -7
- package/src/lib/ui/compile/UI_RUNTIME_IMPORTS.ts +0 -86
- package/src/lib/ui/compile/VOID_TAGS.ts +0 -22
- package/src/lib/ui/compile/abideUiPlugin.ts +0 -109
- package/src/lib/ui/compile/analyzeComponent.ts +0 -222
- package/src/lib/ui/compile/asOutlet.ts +0 -30
- package/src/lib/ui/compile/assertTranspiles.ts +0 -19
- package/src/lib/ui/compile/assetModulesFile.ts +0 -32
- package/src/lib/ui/compile/assignmentTargetNames.ts +0 -54
- package/src/lib/ui/compile/asyncInterpolationFields.ts +0 -152
- package/src/lib/ui/compile/asyncValuePositionError.ts +0 -21
- package/src/lib/ui/compile/asyncValuePositionInterpolations.ts +0 -64
- package/src/lib/ui/compile/attrLiftPosition.ts +0 -18
- package/src/lib/ui/compile/awaitPlan.ts +0 -60
- package/src/lib/ui/compile/awaitSubjectExpr.ts +0 -23
- package/src/lib/ui/compile/bindListenEvent.ts +0 -18
- package/src/lib/ui/compile/cachedShadowProgram.ts +0 -39
- package/src/lib/ui/compile/cachedSourceFile.ts +0 -40
- package/src/lib/ui/compile/catchBinding.ts +0 -10
- package/src/lib/ui/compile/classStyleMergePlan.ts +0 -108
- package/src/lib/ui/compile/classifyInterpolationType.ts +0 -46
- package/src/lib/ui/compile/collectAbideDiagnostics.ts +0 -166
- package/src/lib/ui/compile/compileComponent.ts +0 -46
- package/src/lib/ui/compile/compileModule.ts +0 -306
- package/src/lib/ui/compile/compileSSR.ts +0 -119
- package/src/lib/ui/compile/compileShadow.ts +0 -1326
- package/src/lib/ui/compile/componentOrdinals.ts +0 -39
- package/src/lib/ui/compile/composeProps.ts +0 -64
- package/src/lib/ui/compile/createShadowLanguageService.ts +0 -348
- package/src/lib/ui/compile/createShadowProgram.ts +0 -127
- package/src/lib/ui/compile/createShadowScope.ts +0 -42
- package/src/lib/ui/compile/declaredNames.ts +0 -36
- package/src/lib/ui/compile/decodeHtmlEntities.ts +0 -53
- package/src/lib/ui/compile/destructureBindingNames.ts +0 -38
- package/src/lib/ui/compile/desugarSignals.ts +0 -1113
- package/src/lib/ui/compile/eachPlan.ts +0 -61
- package/src/lib/ui/compile/elementPlan.ts +0 -55
- package/src/lib/ui/compile/encodeSemanticTokens.ts +0 -60
- package/src/lib/ui/compile/expressionIsPrefixEvaluable.ts +0 -19
- package/src/lib/ui/compile/generateBuild.ts +0 -903
- package/src/lib/ui/compile/generateSSR.ts +0 -973
- package/src/lib/ui/compile/groupBindParts.ts +0 -28
- package/src/lib/ui/compile/hasTopLevelAwait.ts +0 -28
- package/src/lib/ui/compile/hoistCells.ts +0 -120
- package/src/lib/ui/compile/hoistableAwaits.ts +0 -183
- package/src/lib/ui/compile/hoistableChildRenders.ts +0 -112
- package/src/lib/ui/compile/identifierReferencePattern.ts +0 -13
- package/src/lib/ui/compile/ifPlan.ts +0 -36
- package/src/lib/ui/compile/interpolatedTemplateLiteral.ts +0 -27
- package/src/lib/ui/compile/interpolationClassifierForRoot.ts +0 -32
- package/src/lib/ui/compile/isAnchorPositioned.ts +0 -19
- package/src/lib/ui/compile/isControlFlow.ts +0 -20
- package/src/lib/ui/compile/isFunctionScopeBoundary.ts +0 -20
- package/src/lib/ui/compile/isPlainIdentifier.ts +0 -7
- package/src/lib/ui/compile/isSpuriousAsyncReadDiagnostic.ts +0 -215
- package/src/lib/ui/compile/isTextLeaf.ts +0 -16
- package/src/lib/ui/compile/isWhitespaceText.ts +0 -19
- package/src/lib/ui/compile/liftAsyncSubExpressions.ts +0 -166
- package/src/lib/ui/compile/liftScriptSeed.ts +0 -47
- package/src/lib/ui/compile/loadShadowTsConfig.ts +0 -31
- package/src/lib/ui/compile/lowerAsyncInterpolations.ts +0 -92
- package/src/lib/ui/compile/lowerCompoundAssignment.ts +0 -49
- package/src/lib/ui/compile/lowerContext.ts +0 -167
- package/src/lib/ui/compile/lowerDocAccess.ts +0 -302
- package/src/lib/ui/compile/lowerScript.ts +0 -190
- package/src/lib/ui/compile/lowerUpdateExpression.ts +0 -32
- package/src/lib/ui/compile/makeVarNamer.ts +0 -10
- package/src/lib/ui/compile/nearestProjectRoot.ts +0 -16
- package/src/lib/ui/compile/nodeAtShadowOffset.ts +0 -28
- package/src/lib/ui/compile/offsetToLineColumn.ts +0 -16
- package/src/lib/ui/compile/offsetToPosition.ts +0 -9
- package/src/lib/ui/compile/pagePropsType.ts +0 -23
- package/src/lib/ui/compile/parseTemplate.ts +0 -25
- package/src/lib/ui/compile/parseTemplateRecovering.ts +0 -1385
- package/src/lib/ui/compile/prepareNestedScript.ts +0 -62
- package/src/lib/ui/compile/reactiveBinding.ts +0 -47
- package/src/lib/ui/compile/referencedIdentifiers.ts +0 -35
- package/src/lib/ui/compile/remapShadowDiagnostic.ts +0 -30
- package/src/lib/ui/compile/renameSignalRefs.ts +0 -425
- package/src/lib/ui/compile/resolveAbideImports.ts +0 -29
- package/src/lib/ui/compile/resolveBranches.ts +0 -21
- package/src/lib/ui/compile/resolveReactiveExport.ts +0 -92
- package/src/lib/ui/compile/scopeAttr.ts +0 -9
- package/src/lib/ui/compile/scopeCss.ts +0 -138
- package/src/lib/ui/compile/seedTypeClassifierForRoot.ts +0 -60
- package/src/lib/ui/compile/shadowInterpolationClassifier.ts +0 -47
- package/src/lib/ui/compile/shadowNaming.ts +0 -11
- package/src/lib/ui/compile/signalCallee.ts +0 -24
- package/src/lib/ui/compile/skeletonContext.ts +0 -133
- package/src/lib/ui/compile/skeletonable.ts +0 -68
- package/src/lib/ui/compile/snippetPlan.ts +0 -28
- package/src/lib/ui/compile/sourceFileOptionsSignature.ts +0 -20
- package/src/lib/ui/compile/sourceToShadowOffset.ts +0 -24
- package/src/lib/ui/compile/spreadExcludedNames.ts +0 -27
- package/src/lib/ui/compile/staticAttr.ts +0 -11
- package/src/lib/ui/compile/staticAttrValue.ts +0 -13
- package/src/lib/ui/compile/staticTextPart.ts +0 -12
- package/src/lib/ui/compile/stripEffects.ts +0 -48
- package/src/lib/ui/compile/structuralHeadTokens.ts +0 -107
- package/src/lib/ui/compile/switchPlan.ts +0 -28
- package/src/lib/ui/compile/templateAnchorAdapter.ts +0 -61
- package/src/lib/ui/compile/templateElementAdapter.ts +0 -44
- package/src/lib/ui/compile/templateSemanticTokens.ts +0 -21
- package/src/lib/ui/compile/templateStartOffset.ts +0 -15
- package/src/lib/ui/compile/tryPlan.ts +0 -37
- package/src/lib/ui/compile/types/AbideDiagnostic.ts +0 -14
- package/src/lib/ui/compile/types/AnalyzedComponent.ts +0 -42
- package/src/lib/ui/compile/types/AsyncInterpolationField.ts +0 -19
- package/src/lib/ui/compile/types/Binding.ts +0 -24
- package/src/lib/ui/compile/types/CompiledShadow.ts +0 -27
- package/src/lib/ui/compile/types/ElementPlan.ts +0 -43
- package/src/lib/ui/compile/types/InterpolationClassifier.ts +0 -12
- package/src/lib/ui/compile/types/InterpolationKind.ts +0 -7
- package/src/lib/ui/compile/types/ParseDiagnostic.ts +0 -8
- package/src/lib/ui/compile/types/SeedTypeClassifier.ts +0 -15
- package/src/lib/ui/compile/types/SemanticToken.ts +0 -11
- package/src/lib/ui/compile/types/ShadowKind.ts +0 -9
- package/src/lib/ui/compile/types/ShadowScope.ts +0 -19
- package/src/lib/ui/compile/types/SkeletonContext.ts +0 -21
- package/src/lib/ui/compile/types/TemplateAttr.ts +0 -34
- package/src/lib/ui/compile/types/TemplateNode.ts +0 -137
- package/src/lib/ui/compile/types/TextPart.ts +0 -8
- package/src/lib/ui/compile/types/ValuePositionInterpolation.ts +0 -13
- package/src/lib/ui/compile/unwrapParens.ts +0 -10
- package/src/lib/ui/compile/walkAnchorOrder.ts +0 -57
- package/src/lib/ui/compile/walkElementOrder.ts +0 -60
- package/src/lib/ui/compile/withBindings.ts +0 -45
- package/src/lib/ui/compile/wrapReactionCellSources.ts +0 -121
- package/src/lib/ui/compile/wrapReactiveSeeds.ts +0 -44
- package/src/lib/ui/compile/wrapSeed.ts +0 -28
- package/src/lib/ui/compile/writtenTemplateNames.ts +0 -84
- package/src/lib/ui/computed.ts +0 -75
- package/src/lib/ui/createScope.ts +0 -157
- package/src/lib/ui/dom/MATHML_NAMESPACE.ts +0 -6
- package/src/lib/ui/dom/SVG_NAMESPACE.ts +0 -8
- package/src/lib/ui/dom/adoptRange.ts +0 -27
- package/src/lib/ui/dom/anchorCursor.ts +0 -25
- package/src/lib/ui/dom/anchoredBranch.ts +0 -153
- package/src/lib/ui/dom/appendSnippet.ts +0 -75
- package/src/lib/ui/dom/appendStatic.ts +0 -26
- package/src/lib/ui/dom/appendText.ts +0 -160
- package/src/lib/ui/dom/appendTextAt.ts +0 -39
- package/src/lib/ui/dom/assertClaimedText.ts +0 -30
- package/src/lib/ui/dom/attach.ts +0 -25
- package/src/lib/ui/dom/attr.ts +0 -57
- package/src/lib/ui/dom/awaitBlock.ts +0 -314
- package/src/lib/ui/dom/awaitSubject.ts +0 -118
- package/src/lib/ui/dom/bindProp.ts +0 -22
- package/src/lib/ui/dom/bindSelectValue.ts +0 -48
- package/src/lib/ui/dom/bindableProp.ts +0 -47
- package/src/lib/ui/dom/buildDetachedRange.ts +0 -31
- package/src/lib/ui/dom/cellPending.ts +0 -24
- package/src/lib/ui/dom/claimText.ts +0 -38
- package/src/lib/ui/dom/clearBetween.ts +0 -16
- package/src/lib/ui/dom/cloneStatic.ts +0 -69
- package/src/lib/ui/dom/commentData.ts +0 -14
- package/src/lib/ui/dom/depthZeroNodes.ts +0 -34
- package/src/lib/ui/dom/discardAndRebuild.ts +0 -23
- package/src/lib/ui/dom/discardBoundary.ts +0 -46
- package/src/lib/ui/dom/disposeRange.ts +0 -18
- package/src/lib/ui/dom/domAnchorAdapter.ts +0 -29
- package/src/lib/ui/dom/domElementAdapter.ts +0 -20
- package/src/lib/ui/dom/each.ts +0 -253
- package/src/lib/ui/dom/eachAsync.ts +0 -188
- package/src/lib/ui/dom/effectiveChildNamespace.ts +0 -13
- package/src/lib/ui/dom/enterNamespace.ts +0 -20
- package/src/lib/ui/dom/fillBefore.ts +0 -42
- package/src/lib/ui/dom/fillBoundary.ts +0 -38
- package/src/lib/ui/dom/fillRange.ts +0 -30
- package/src/lib/ui/dom/foreignWrapperTag.ts +0 -22
- package/src/lib/ui/dom/hydrate.ts +0 -34
- package/src/lib/ui/dom/inheritedNamespace.ts +0 -19
- package/src/lib/ui/dom/isComment.ts +0 -6
- package/src/lib/ui/dom/isElement.ts +0 -6
- package/src/lib/ui/dom/markerDepthDelta.ts +0 -19
- package/src/lib/ui/dom/matchingRangeClose.ts +0 -29
- package/src/lib/ui/dom/mergeProps.ts +0 -32
- package/src/lib/ui/dom/mount.ts +0 -30
- package/src/lib/ui/dom/mountChild.ts +0 -129
- package/src/lib/ui/dom/mountRange.ts +0 -48
- package/src/lib/ui/dom/mountSlot.ts +0 -38
- package/src/lib/ui/dom/mountSwappableRange.ts +0 -122
- package/src/lib/ui/dom/moveRange.ts +0 -19
- package/src/lib/ui/dom/mutateDocContainer.ts +0 -65
- package/src/lib/ui/dom/on.ts +0 -33
- package/src/lib/ui/dom/openMarker.ts +0 -22
- package/src/lib/ui/dom/outlet.ts +0 -63
- package/src/lib/ui/dom/parseRawNodes.ts +0 -17
- package/src/lib/ui/dom/readCall.ts +0 -29
- package/src/lib/ui/dom/readCell.ts +0 -55
- package/src/lib/ui/dom/readTextOrSuspend.ts +0 -21
- package/src/lib/ui/dom/removeRange.ts +0 -18
- package/src/lib/ui/dom/replaceRange.ts +0 -24
- package/src/lib/ui/dom/restProps.ts +0 -32
- package/src/lib/ui/dom/skeleton.ts +0 -153
- package/src/lib/ui/dom/spreadAttrs.ts +0 -95
- package/src/lib/ui/dom/spreadProps.ts +0 -31
- package/src/lib/ui/dom/switchBlock.ts +0 -80
- package/src/lib/ui/dom/templateFor.ts +0 -28
- package/src/lib/ui/dom/tryBlock.ts +0 -263
- package/src/lib/ui/dom/types/EachRow.ts +0 -21
- package/src/lib/ui/dom/types/SkeletonHoles.ts +0 -10
- package/src/lib/ui/dom/types/SwitchCase.ts +0 -11
- package/src/lib/ui/dom/when.ts +0 -58
- package/src/lib/ui/dom/withScope.ts +0 -37
- package/src/lib/ui/dom/withSuspense.ts +0 -22
- package/src/lib/ui/dom/writeCell.ts +0 -22
- package/src/lib/ui/effect.ts +0 -24
- package/src/lib/ui/enterScope.ts +0 -18
- package/src/lib/ui/exitScope.ts +0 -8
- package/src/lib/ui/finalizeStreamedChildren.ts +0 -88
- package/src/lib/ui/flight.ts +0 -56
- package/src/lib/ui/html.ts +0 -39
- package/src/lib/ui/isolateCellBarrier.ts +0 -17
- package/src/lib/ui/linked.ts +0 -125
- package/src/lib/ui/navigate.ts +0 -77
- package/src/lib/ui/probeNavigation.ts +0 -33
- package/src/lib/ui/props.ts +0 -17
- package/src/lib/ui/remoteProxy.ts +0 -256
- package/src/lib/ui/renderChain.ts +0 -113
- package/src/lib/ui/renderToStream.ts +0 -128
- package/src/lib/ui/resumeSeedScript.ts +0 -27
- package/src/lib/ui/router.ts +0 -649
- package/src/lib/ui/runtime/AsyncCellError.ts +0 -21
- package/src/lib/ui/runtime/BRANCH_SEGMENT.ts +0 -24
- package/src/lib/ui/runtime/CELL_SEED.ts +0 -12
- package/src/lib/ui/runtime/CHILD_PRESENT.ts +0 -8
- package/src/lib/ui/runtime/CURRENT_BOUNDARY.ts +0 -11
- package/src/lib/ui/runtime/CURRENT_PATH.ts +0 -29
- package/src/lib/ui/runtime/CURRENT_SCOPE.ts +0 -23
- package/src/lib/ui/runtime/DOC_SEED.ts +0 -10
- package/src/lib/ui/runtime/HOLE_ATTRIBUTE.ts +0 -9
- package/src/lib/ui/runtime/NODE_STATE.ts +0 -22
- package/src/lib/ui/runtime/OUTLET_MARKER.ts +0 -10
- package/src/lib/ui/runtime/OUTLET_TAG.ts +0 -7
- package/src/lib/ui/runtime/OWNER.ts +0 -8
- package/src/lib/ui/runtime/PENDING_OUTLET.ts +0 -8
- package/src/lib/ui/runtime/RANGE_MARKER.ts +0 -18
- package/src/lib/ui/runtime/REACTIVE_CONTEXT.ts +0 -20
- package/src/lib/ui/runtime/RENDER.ts +0 -35
- package/src/lib/ui/runtime/REQUEST_SUPERSEDED.ts +0 -8
- package/src/lib/ui/runtime/RESUME.ts +0 -21
- package/src/lib/ui/runtime/SEED_MARKS.ts +0 -14
- package/src/lib/ui/runtime/STREAMED_CELLS.ts +0 -57
- package/src/lib/ui/runtime/SuspenseSignal.ts +0 -24
- package/src/lib/ui/runtime/abortNode.ts +0 -22
- package/src/lib/ui/runtime/ambientPathBacking.ts +0 -32
- package/src/lib/ui/runtime/ambientScopeBacking.ts +0 -26
- package/src/lib/ui/runtime/applyPatchToTree.ts +0 -54
- package/src/lib/ui/runtime/batch.ts +0 -22
- package/src/lib/ui/runtime/blockId.ts +0 -31
- package/src/lib/ui/runtime/boundaryFor.ts +0 -11
- package/src/lib/ui/runtime/cellBarrierBacking.ts +0 -30
- package/src/lib/ui/runtime/claimChild.ts +0 -8
- package/src/lib/ui/runtime/claimExpected.ts +0 -27
- package/src/lib/ui/runtime/claimMarker.ts +0 -13
- package/src/lib/ui/runtime/claimRun.ts +0 -22
- package/src/lib/ui/runtime/clientPage.ts +0 -116
- package/src/lib/ui/runtime/consumeSeed.ts +0 -38
- package/src/lib/ui/runtime/createAsyncCell.ts +0 -358
- package/src/lib/ui/runtime/createComputedNode.ts +0 -19
- package/src/lib/ui/runtime/createDoc.ts +0 -334
- package/src/lib/ui/runtime/createEffectNode.ts +0 -81
- package/src/lib/ui/runtime/createSignalNode.ts +0 -19
- package/src/lib/ui/runtime/currentAbortSignal.ts +0 -26
- package/src/lib/ui/runtime/detachLink.ts +0 -21
- package/src/lib/ui/runtime/endTracking.ts +0 -24
- package/src/lib/ui/runtime/enterRenderPass.ts +0 -13
- package/src/lib/ui/runtime/escapeKey.ts +0 -19
- package/src/lib/ui/runtime/exitRenderPass.ts +0 -7
- package/src/lib/ui/runtime/flushEffects.ts +0 -91
- package/src/lib/ui/runtime/generationGuard.ts +0 -40
- package/src/lib/ui/runtime/historyEntries.ts +0 -151
- package/src/lib/ui/runtime/inScope.ts +0 -19
- package/src/lib/ui/runtime/isAsyncFunction.ts +0 -14
- package/src/lib/ui/runtime/nextBlockId.ts +0 -12
- package/src/lib/ui/runtime/parkCursor.ts +0 -10
- package/src/lib/ui/runtime/pathSegments.ts +0 -10
- package/src/lib/ui/runtime/reactiveAbortState.ts +0 -15
- package/src/lib/ui/runtime/readNode.ts +0 -38
- package/src/lib/ui/runtime/renderPath.ts +0 -16
- package/src/lib/ui/runtime/reportHydrationDivergence.ts +0 -30
- package/src/lib/ui/runtime/routeBareSeed.ts +0 -28
- package/src/lib/ui/runtime/runHydrationPass.ts +0 -69
- package/src/lib/ui/runtime/runNode.ts +0 -75
- package/src/lib/ui/runtime/runtimePath.ts +0 -9
- package/src/lib/ui/runtime/scope.ts +0 -46
- package/src/lib/ui/runtime/scopeGroup.ts +0 -40
- package/src/lib/ui/runtime/toTeardown.ts +0 -38
- package/src/lib/ui/runtime/track.ts +0 -60
- package/src/lib/ui/runtime/trigger.ts +0 -74
- package/src/lib/ui/runtime/types/AbideHistoryState.ts +0 -9
- package/src/lib/ui/runtime/types/Boundary.ts +0 -9
- package/src/lib/ui/runtime/types/Cell.ts +0 -7
- package/src/lib/ui/runtime/types/Computed.ts +0 -3
- package/src/lib/ui/runtime/types/Doc.ts +0 -24
- package/src/lib/ui/runtime/types/EffectResult.ts +0 -10
- package/src/lib/ui/runtime/types/HydrationCursor.ts +0 -8
- package/src/lib/ui/runtime/types/NavVerdict.ts +0 -9
- package/src/lib/ui/runtime/types/Patch.ts +0 -11
- package/src/lib/ui/runtime/types/PathWalk.ts +0 -10
- package/src/lib/ui/runtime/types/ReactiveLink.ts +0 -21
- package/src/lib/ui/runtime/types/ReactiveNode.ts +0 -33
- package/src/lib/ui/runtime/types/RenderContext.ts +0 -10
- package/src/lib/ui/runtime/types/Route.ts +0 -9
- package/src/lib/ui/runtime/types/RouteLoader.ts +0 -7
- package/src/lib/ui/runtime/types/SsrRender.ts +0 -34
- package/src/lib/ui/runtime/types/State.ts +0 -3
- package/src/lib/ui/runtime/types/Teardown.ts +0 -5
- package/src/lib/ui/runtime/types/UiComponent.ts +0 -24
- package/src/lib/ui/runtime/types/UiProps.ts +0 -12
- package/src/lib/ui/runtime/unescapeKey.ts +0 -12
- package/src/lib/ui/runtime/unlinkDeps.ts +0 -28
- package/src/lib/ui/runtime/untrack.ts +0 -20
- package/src/lib/ui/runtime/updateIfNecessary.ts +0 -40
- package/src/lib/ui/runtime/walkPath.ts +0 -41
- package/src/lib/ui/runtime/withOptionalPath.ts +0 -8
- package/src/lib/ui/runtime/withPath.ts +0 -16
- package/src/lib/ui/runtime/withPathFrom.ts +0 -20
- package/src/lib/ui/runtime/withoutHydration.ts +0 -22
- package/src/lib/ui/runtime/writeNode.ts +0 -16
- package/src/lib/ui/scope.ts +0 -20
- package/src/lib/ui/seedBootState.ts +0 -53
- package/src/lib/ui/seedStreamedResolution.ts +0 -56
- package/src/lib/ui/settleAsyncCells.ts +0 -51
- package/src/lib/ui/socketChannel.ts +0 -156
- package/src/lib/ui/socketProxy.ts +0 -47
- package/src/lib/ui/startClient.ts +0 -156
- package/src/lib/ui/state.ts +0 -77
- package/src/lib/ui/subscribeCacheStaleness.ts +0 -85
- package/src/lib/ui/trackedComputed.ts +0 -68
- package/src/lib/ui/tryEncodeResume.ts +0 -11
- package/src/lib/ui/types/Layouts.ts +0 -9
- package/src/lib/ui/types/Pages.ts +0 -8
- package/src/lib/ui/types/Scope.ts +0 -68
- package/src/lib/ui/watch.ts +0 -150
- package/src/preload.ts +0 -19
- package/src/scaffold.ts +0 -153
- package/src/serverBuildPlugins.ts +0 -25
- package/src/serverEntry.ts +0 -138
- package/src/zodCjsPlugin.ts +0 -51
- package/template/.zed/settings.json +0 -10
- package/template/CLAUDE.md +0 -22
- package/template/bunfig.toml +0 -4
- package/template/package.json +0 -21
- package/template/src/app.ts +0 -28
- package/template/src/bundle/icon.png +0 -0
- package/template/src/cli/banner.txt +0 -3
- package/template/src/cli/footer.txt +0 -1
- package/template/src/server/config.ts +0 -17
- package/template/src/server/rpc/getHello.ts +0 -38
- package/template/src/ui/app.css +0 -21
- package/template/src/ui/app.html +0 -24
- package/template/src/ui/pages/about/page.abide +0 -7
- package/template/src/ui/pages/layout.abide +0 -19
- package/template/src/ui/pages/page.abide +0 -19
- package/template/test/app.test.ts +0 -30
- package/template/tsconfig.json +0 -18
- package/tsconfig.app.json +0 -17
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { staticAttrValue } from './staticAttrValue.ts'
|
|
2
|
-
import type { TemplateNode } from './types/TemplateNode.ts'
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
The pieces a `bind:group` needs from its own element: `valueCode` is the JS source
|
|
6
|
-
of the control's `value` (a string literal for static `value="x"`, the expression
|
|
7
|
-
for `value={expr}`); `isRadio` selects single-value (radio) vs array-membership
|
|
8
|
-
(checkbox) semantics. Throws on the two cases the binding can't mean anything for —
|
|
9
|
-
a missing `value`, or a `type` not statically `radio`/`checkbox` (the semantics are
|
|
10
|
-
chosen at compile time, so the type can't be dynamic).
|
|
11
|
-
*/
|
|
12
|
-
export function groupBindParts(node: Extract<TemplateNode, { kind: 'element' }>): {
|
|
13
|
-
valueCode: string
|
|
14
|
-
isRadio: boolean
|
|
15
|
-
} {
|
|
16
|
-
const value = node.attrs.find(
|
|
17
|
-
(attr) => (attr.kind === 'static' || attr.kind === 'expression') && attr.name === 'value',
|
|
18
|
-
)
|
|
19
|
-
if (value === undefined || (value.kind !== 'static' && value.kind !== 'expression')) {
|
|
20
|
-
throw new Error('bind:group requires a `value` attribute on the same element')
|
|
21
|
-
}
|
|
22
|
-
const valueCode = value.kind === 'static' ? JSON.stringify(value.value) : value.code
|
|
23
|
-
const type = staticAttrValue(node, 'type')
|
|
24
|
-
if (type !== 'radio' && type !== 'checkbox') {
|
|
25
|
-
throw new Error('bind:group requires a static type="radio" or type="checkbox"')
|
|
26
|
-
}
|
|
27
|
-
return { valueCode, isRadio: type === 'radio' }
|
|
28
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import ts from 'typescript'
|
|
2
|
-
import { isFunctionScopeBoundary } from './isFunctionScopeBoundary.ts'
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
True when `node` contains an `await` at its OWN top level — not nested inside any function scope
|
|
6
|
-
(`isFunctionScopeBoundary`: function/arrow/method/accessor/constructor). The SINGLE seed classifier
|
|
7
|
-
both the build lowering (`desugarSignals`: `await` present → a BLOCKING cell that suspends its render
|
|
8
|
-
region) and the type shadow (`compileShadow`: `$$cellValue` `T` vs `$$cellValuePending` `T | undefined`)
|
|
9
|
-
share, so the runtime blocking flag and the shadow type can never disagree on whether a seed is
|
|
10
|
-
`await`-marked (ADR-0042 D5's "one predicate"). An `await` in an inner callback / method
|
|
11
|
-
(`items.map(async (x) => await f(x))`, `{ async m() { await x } }`) does NOT count — only a
|
|
12
|
-
top-level `await` marks the seed itself.
|
|
13
|
-
*/
|
|
14
|
-
export function hasTopLevelAwait(node: ts.Node): boolean {
|
|
15
|
-
let found = false
|
|
16
|
-
const visit = (child: ts.Node): void => {
|
|
17
|
-
if (found || isFunctionScopeBoundary(child)) {
|
|
18
|
-
return
|
|
19
|
-
}
|
|
20
|
-
if (ts.isAwaitExpression(child)) {
|
|
21
|
-
found = true
|
|
22
|
-
return
|
|
23
|
-
}
|
|
24
|
-
ts.forEachChild(child, visit)
|
|
25
|
-
}
|
|
26
|
-
visit(node)
|
|
27
|
-
return found
|
|
28
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import ts from 'typescript'
|
|
2
|
-
import { TS_PRINTER } from './TS_PRINTER.ts'
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
The perf pass that follows `lowerDocAccess`. Within a render scope, a static path
|
|
6
|
-
is read and written many times; resolving it to a node + parent + key on every
|
|
7
|
-
access (what `read`/`replace` do) is the path-string floor the bench measured.
|
|
8
|
-
This hoists each distinct static path to a `cell` bound once at the top of the
|
|
9
|
-
scope and rewrites accesses to the string-free `get`/`set` — the form that runs
|
|
10
|
-
~20x faster than re-resolving:
|
|
11
|
-
|
|
12
|
-
model.read("count") → _cell0.get()
|
|
13
|
-
model.replace("count", v) → _cell0.set(v)
|
|
14
|
-
// with, prepended once: const _cell0 = model.cell("count")
|
|
15
|
-
|
|
16
|
-
The input is a render-scope body where `docName` is already in scope (the cell
|
|
17
|
-
decls are prepended to it, so the doc must exist first). Dynamic-path accesses
|
|
18
|
-
(`read(`a/${i}`)`) and structural ops (`add`/`remove`) are left untouched — a
|
|
19
|
-
cell binds one fixed scalar leaf.
|
|
20
|
-
*/
|
|
21
|
-
export function hoistCells(code: string, docName: string): string {
|
|
22
|
-
const source = ts.createSourceFile('component.ts', code, ts.ScriptTarget.Latest, true)
|
|
23
|
-
const cellIdForPath = new Map<string, string>()
|
|
24
|
-
|
|
25
|
-
/* Pass 1: assign a cell id to each distinct static read/replace path. */
|
|
26
|
-
const collect = (node: ts.Node): void => {
|
|
27
|
-
const path = staticDocPath(node, docName, 'read') ?? staticDocPath(node, docName, 'replace')
|
|
28
|
-
if (path !== undefined && !cellIdForPath.has(path)) {
|
|
29
|
-
cellIdForPath.set(path, `_cell${cellIdForPath.size}`)
|
|
30
|
-
}
|
|
31
|
-
ts.forEachChild(node, collect)
|
|
32
|
-
}
|
|
33
|
-
collect(source)
|
|
34
|
-
if (cellIdForPath.size === 0) {
|
|
35
|
-
return code
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const result = ts.transform(source, [hoistTransformer(docName, cellIdForPath)])
|
|
39
|
-
const output = TS_PRINTER.printFile(result.transformed[0] as ts.SourceFile)
|
|
40
|
-
result.dispose()
|
|
41
|
-
return output
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* Returns the literal path of a `docName.method("literal", …)` call, else undefined. */
|
|
45
|
-
function staticDocPath(node: ts.Node, docName: string, method: string): string | undefined {
|
|
46
|
-
if (
|
|
47
|
-
ts.isCallExpression(node) &&
|
|
48
|
-
ts.isPropertyAccessExpression(node.expression) &&
|
|
49
|
-
ts.isIdentifier(node.expression.expression) &&
|
|
50
|
-
node.expression.expression.text === docName &&
|
|
51
|
-
node.expression.name.text === method
|
|
52
|
-
) {
|
|
53
|
-
const first = node.arguments[0]
|
|
54
|
-
if (first !== undefined && ts.isStringLiteral(first)) {
|
|
55
|
-
return first.text
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return undefined
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function hoistTransformer(
|
|
62
|
-
docName: string,
|
|
63
|
-
cellIdForPath: Map<string, string>,
|
|
64
|
-
): ts.TransformerFactory<ts.SourceFile> {
|
|
65
|
-
return (context) => (root) => {
|
|
66
|
-
function visit(node: ts.Node): ts.Node {
|
|
67
|
-
const readPath = staticDocPath(node, docName, 'read')
|
|
68
|
-
if (readPath !== undefined) {
|
|
69
|
-
return cellCall(cellIdForPath.get(readPath) as string, 'get', [])
|
|
70
|
-
}
|
|
71
|
-
const replacePath = staticDocPath(node, docName, 'replace')
|
|
72
|
-
if (replacePath !== undefined) {
|
|
73
|
-
const value = (node as ts.CallExpression).arguments[1]
|
|
74
|
-
return cellCall(cellIdForPath.get(replacePath) as string, 'set', [
|
|
75
|
-
ts.visitNode(value, visit) as ts.Expression,
|
|
76
|
-
])
|
|
77
|
-
}
|
|
78
|
-
return ts.visitEachChild(node, visit, context)
|
|
79
|
-
}
|
|
80
|
-
const visited = ts.visitNode(root, visit) as ts.SourceFile
|
|
81
|
-
const declarations = [...cellIdForPath].map(([path, id]) =>
|
|
82
|
-
cellDeclaration(docName, id, path),
|
|
83
|
-
)
|
|
84
|
-
return ts.factory.updateSourceFile(visited, [...declarations, ...visited.statements])
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/* Builds `cellId.method(...args)`. */
|
|
89
|
-
function cellCall(cellId: string, method: string, args: ts.Expression[]): ts.CallExpression {
|
|
90
|
-
return ts.factory.createCallExpression(
|
|
91
|
-
ts.factory.createPropertyAccessExpression(ts.factory.createIdentifier(cellId), method),
|
|
92
|
-
undefined,
|
|
93
|
-
args,
|
|
94
|
-
)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/* Builds `const cellId = docName.cell("path")`. */
|
|
98
|
-
function cellDeclaration(docName: string, cellId: string, path: string): ts.VariableStatement {
|
|
99
|
-
return ts.factory.createVariableStatement(
|
|
100
|
-
undefined,
|
|
101
|
-
ts.factory.createVariableDeclarationList(
|
|
102
|
-
[
|
|
103
|
-
ts.factory.createVariableDeclaration(
|
|
104
|
-
cellId,
|
|
105
|
-
undefined,
|
|
106
|
-
undefined,
|
|
107
|
-
ts.factory.createCallExpression(
|
|
108
|
-
ts.factory.createPropertyAccessExpression(
|
|
109
|
-
ts.factory.createIdentifier(docName),
|
|
110
|
-
'cell',
|
|
111
|
-
),
|
|
112
|
-
undefined,
|
|
113
|
-
[ts.factory.createStringLiteral(path)],
|
|
114
|
-
),
|
|
115
|
-
),
|
|
116
|
-
],
|
|
117
|
-
ts.NodeFlags.Const,
|
|
118
|
-
),
|
|
119
|
-
)
|
|
120
|
-
}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import ts from 'typescript'
|
|
2
|
-
import { declaredNames } from './declaredNames.ts'
|
|
3
|
-
import { expressionIsPrefixEvaluable } from './expressionIsPrefixEvaluable.ts'
|
|
4
|
-
import type { TemplateNode } from './types/TemplateNode.ts'
|
|
5
|
-
|
|
6
|
-
/* One hoistable await: the node whose promise-start moves to the SSR prefix, and the
|
|
7
|
-
`$flightN` const name that holds the in-flight promise. */
|
|
8
|
-
export type HoistedFlight = {
|
|
9
|
-
node: Extract<TemplateNode, { kind: 'await' }>
|
|
10
|
-
name: string
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/*
|
|
14
|
-
ADR-0034 — the SSR-only pass that picks which `await` blocks may start their promise in the
|
|
15
|
-
synchronous render prefix so independent flights overlap instead of serializing. An await is
|
|
16
|
-
HOISTABLE iff its promise is evaluable at prefix time and its content is unconditionally rendered:
|
|
17
|
-
|
|
18
|
-
1. Its promise's referenced identifiers avoid every enclosing TEMPLATE-LOCAL binder (a `{#for}`
|
|
19
|
-
item/index, a `{:then}`/`{:catch}`/`then v` value, a snippet param, a nested `<script>`
|
|
20
|
-
local) — those don't exist in the prefix — AND every ASYNC-CELL name (`cellReadNames`, still
|
|
21
|
-
pending at prefix time).
|
|
22
|
-
2. It is not inside a CONDITIONALLY-rendered branch (`{#if}`/`{#switch}`/`{#try}`, a snippet/slot
|
|
23
|
-
body, or another await's pending/then/catch branch) — starting its flight eagerly would fetch
|
|
24
|
-
for a branch that may never render, or surface an error prematurely.
|
|
25
|
-
3. It is STATICALLY-SINGLE: on the top-level spine, or inside a single-element-literal
|
|
26
|
-
`{#for k of [expr] by k}` whose body renders exactly once (so one hoisted flight == one row).
|
|
27
|
-
|
|
28
|
-
Fail-closed: identifiers are over-collected and any doubt blocks the hoist, so a mis-classified
|
|
29
|
-
row-local flight can never collapse a multi-row `{#for}` to one shared value. Server-only — the
|
|
30
|
-
returned nodes are rewired only in `generateSSR`; the client build and the wire are untouched.
|
|
31
|
-
*/
|
|
32
|
-
export function hoistableAwaits(
|
|
33
|
-
nodes: TemplateNode[],
|
|
34
|
-
cellReadNames: ReadonlySet<string>,
|
|
35
|
-
): HoistedFlight[] {
|
|
36
|
-
const flights: HoistedFlight[] = []
|
|
37
|
-
const counter = { next: 0 }
|
|
38
|
-
walkList(nodes, new Set<string>(), false, false, cellReadNames, flights, counter)
|
|
39
|
-
return flights
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/* Walk a sibling list left-to-right so a nested `<script>`'s declared locals extend the binder
|
|
43
|
-
set for the siblings that follow it (they are in that script's lexical scope). */
|
|
44
|
-
function walkList(
|
|
45
|
-
list: TemplateNode[],
|
|
46
|
-
binders: ReadonlySet<string>,
|
|
47
|
-
conditional: boolean,
|
|
48
|
-
multiRow: boolean,
|
|
49
|
-
cellReadNames: ReadonlySet<string>,
|
|
50
|
-
flights: HoistedFlight[],
|
|
51
|
-
counter: { next: number },
|
|
52
|
-
): void {
|
|
53
|
-
/* A running binder set for this list: a `<script>` sibling adds its top-level declarations,
|
|
54
|
-
so a later sibling's await that reads one is (conservatively) not hoistable. */
|
|
55
|
-
let listBinders = binders
|
|
56
|
-
for (const node of list) {
|
|
57
|
-
if (node.kind === 'script') {
|
|
58
|
-
listBinders = union(listBinders, declaredNames(node.code))
|
|
59
|
-
continue
|
|
60
|
-
}
|
|
61
|
-
walkNode(node, listBinders, conditional, multiRow, cellReadNames, flights, counter)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function walkNode(
|
|
66
|
-
node: TemplateNode,
|
|
67
|
-
binders: ReadonlySet<string>,
|
|
68
|
-
conditional: boolean,
|
|
69
|
-
multiRow: boolean,
|
|
70
|
-
cellReadNames: ReadonlySet<string>,
|
|
71
|
-
flights: HoistedFlight[],
|
|
72
|
-
counter: { next: number },
|
|
73
|
-
): void {
|
|
74
|
-
if (node.kind === 'await') {
|
|
75
|
-
/* Hoistability is judged in the INCOMING context — the block's promise starts when the
|
|
76
|
-
block mounts (its pending branch always renders), so it is not gated by its own
|
|
77
|
-
branches, only by an enclosing conditional/multi-row. */
|
|
78
|
-
if (
|
|
79
|
-
!conditional &&
|
|
80
|
-
!multiRow &&
|
|
81
|
-
expressionIsPrefixEvaluable(node.promise, binders, cellReadNames)
|
|
82
|
-
) {
|
|
83
|
-
flights.push({ node, name: `$flight${counter.next++}` })
|
|
84
|
-
}
|
|
85
|
-
/* The resolved/catch/pending branches are conditionally shown and bind the resolved value
|
|
86
|
-
(`node.as` for `{#await p then v}`; a `{:then v}`/`{:catch e}` branch binds via its own
|
|
87
|
-
`as`, added when that branch node is walked). */
|
|
88
|
-
const inner = node.as === undefined ? binders : union(binders, new Set([node.as]))
|
|
89
|
-
walkList(node.children, inner, true, multiRow, cellReadNames, flights, counter)
|
|
90
|
-
return
|
|
91
|
-
}
|
|
92
|
-
if (node.kind === 'each') {
|
|
93
|
-
/* Row/index bindings are template-local; the body is multi-row unless the source is a
|
|
94
|
-
single-element array literal (then it renders exactly once). `{#for await}` drains a
|
|
95
|
-
stream — its body is still per-frame, so treat it as multi-row. */
|
|
96
|
-
const rowBinders = new Set<string>()
|
|
97
|
-
rowBinders.add(node.as)
|
|
98
|
-
if (node.index !== undefined) {
|
|
99
|
-
rowBinders.add(node.index)
|
|
100
|
-
}
|
|
101
|
-
const rowMulti = multiRow || node.async === true || !isSingleElementLiteral(node.items)
|
|
102
|
-
walkList(
|
|
103
|
-
node.children,
|
|
104
|
-
union(binders, rowBinders),
|
|
105
|
-
conditional,
|
|
106
|
-
rowMulti,
|
|
107
|
-
cellReadNames,
|
|
108
|
-
flights,
|
|
109
|
-
counter,
|
|
110
|
-
)
|
|
111
|
-
return
|
|
112
|
-
}
|
|
113
|
-
if (
|
|
114
|
-
node.kind === 'if' ||
|
|
115
|
-
node.kind === 'switch' ||
|
|
116
|
-
node.kind === 'case' ||
|
|
117
|
-
node.kind === 'try'
|
|
118
|
-
) {
|
|
119
|
-
/* Conditionally-rendered subtrees — never hoist a flight out of them. */
|
|
120
|
-
walkList(node.children, binders, true, multiRow, cellReadNames, flights, counter)
|
|
121
|
-
return
|
|
122
|
-
}
|
|
123
|
-
if (node.kind === 'branch') {
|
|
124
|
-
const inner = node.as === undefined ? binders : union(binders, new Set([node.as]))
|
|
125
|
-
walkList(node.children, inner, true, multiRow, cellReadNames, flights, counter)
|
|
126
|
-
return
|
|
127
|
-
}
|
|
128
|
-
if (node.kind === 'snippet') {
|
|
129
|
-
/* A snippet is a builder called conditionally; its params are locals. */
|
|
130
|
-
const params =
|
|
131
|
-
node.params === undefined
|
|
132
|
-
? new Set<string>()
|
|
133
|
-
: declaredNames(`const [${node.params}] = []`)
|
|
134
|
-
walkList(
|
|
135
|
-
node.children,
|
|
136
|
-
union(binders, params),
|
|
137
|
-
true,
|
|
138
|
-
multiRow,
|
|
139
|
-
cellReadNames,
|
|
140
|
-
flights,
|
|
141
|
-
counter,
|
|
142
|
-
)
|
|
143
|
-
return
|
|
144
|
-
}
|
|
145
|
-
if (node.kind === 'component') {
|
|
146
|
-
/* Slot content is a fresh, lazily-built scope rendered at the child's `<slot>`. */
|
|
147
|
-
walkList(node.children, binders, true, multiRow, cellReadNames, flights, counter)
|
|
148
|
-
return
|
|
149
|
-
}
|
|
150
|
-
if (node.kind === 'element' && 'children' in node) {
|
|
151
|
-
walkList(node.children, binders, conditional, multiRow, cellReadNames, flights, counter)
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/* A single-element array literal like `[remountKey]` — the only `{#for}` source that renders its
|
|
156
|
-
body exactly once, so a hoisted flight inside it maps to one row (no shared-flight hazard). */
|
|
157
|
-
function isSingleElementLiteral(items: string): boolean {
|
|
158
|
-
let source: ts.SourceFile
|
|
159
|
-
try {
|
|
160
|
-
source = ts.createSourceFile('items.ts', items, ts.ScriptTarget.Latest, true)
|
|
161
|
-
} catch {
|
|
162
|
-
return false
|
|
163
|
-
}
|
|
164
|
-
const statement = source.statements[0]
|
|
165
|
-
if (
|
|
166
|
-
statement === undefined ||
|
|
167
|
-
source.statements.length !== 1 ||
|
|
168
|
-
!ts.isExpressionStatement(statement) ||
|
|
169
|
-
!ts.isArrayLiteralExpression(statement.expression)
|
|
170
|
-
) {
|
|
171
|
-
return false
|
|
172
|
-
}
|
|
173
|
-
const elements = statement.expression.elements
|
|
174
|
-
return elements.length === 1 && !ts.isSpreadElement(elements[0] as ts.Expression)
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
function union(a: ReadonlySet<string>, b: ReadonlySet<string>): Set<string> {
|
|
178
|
-
const result = new Set(a)
|
|
179
|
-
for (const value of b) {
|
|
180
|
-
result.add(value)
|
|
181
|
-
}
|
|
182
|
-
return result
|
|
183
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { declaredNames } from './declaredNames.ts'
|
|
2
|
-
import { expressionIsPrefixEvaluable } from './expressionIsPrefixEvaluable.ts'
|
|
3
|
-
import type { TemplateNode } from './types/TemplateNode.ts'
|
|
4
|
-
|
|
5
|
-
type ComponentNode = Extract<TemplateNode, { kind: 'component' }>
|
|
6
|
-
|
|
7
|
-
/*
|
|
8
|
-
ADR-0037 Phase 2 — which `<Child/>` renders may START in the synchronous SSR prefix (as a `$$flight`
|
|
9
|
-
awaited at its structural position) so sibling child renders overlap instead of serializing behind
|
|
10
|
-
each other's `await Child.render(...)`. A child render is HOISTABLE iff it is on the TOP-LEVEL SPINE
|
|
11
|
-
— reachable from the template root through only plain elements, so no control-flow / await-branch /
|
|
12
|
-
snippet / slot binder is in scope — AND:
|
|
13
|
-
|
|
14
|
-
1. its component reference and every prop value (including a `{...spread}`) are prefix-evaluable:
|
|
15
|
-
no async-cell name (still pending at the prefix, before the barrier) and no nested-`<script>`
|
|
16
|
-
local declared earlier on the spine (those lower at their body position, not the prefix);
|
|
17
|
-
2. it carries NO slot content (`children` empty) — lazily-built slot content would need its own
|
|
18
|
-
prefix-evaluability proof; a childless card is the common parallel case;
|
|
19
|
-
3. no `bind:` prop — a two-way write-back channel that must wire at its structural position.
|
|
20
|
-
|
|
21
|
-
Off-spine components (inside `{#if}`/`{#for}`/`{#await}`, a snippet, or another component's slot) stay
|
|
22
|
-
sequential: conservatively excluded rather than proven row/branch-safe. Fail-closed throughout — any
|
|
23
|
-
doubt leaves the render sequential, never wrong. Server-only; the client build is untouched.
|
|
24
|
-
*/
|
|
25
|
-
export function hoistableChildRenders(
|
|
26
|
-
nodes: TemplateNode[],
|
|
27
|
-
cellReadNames: ReadonlySet<string>,
|
|
28
|
-
): Set<ComponentNode> {
|
|
29
|
-
const hoistable = new Set<ComponentNode>()
|
|
30
|
-
/* Every `{#snippet name}` in the component is a hoisted builder that may itself render an
|
|
31
|
-
async cell / await; a prop passing one to a child (`<List item={row}/>`) must therefore NOT
|
|
32
|
-
hoist — calling `row()` early, in the prefix, would render it out of order. Seed the binder set
|
|
33
|
-
with all snippet names (collected tree-wide, since a snippet is in scope for the whole
|
|
34
|
-
component) so any prop referencing one fails the prefix-evaluability check. */
|
|
35
|
-
const binders = new Set<string>()
|
|
36
|
-
collectSnippetNames(nodes, binders)
|
|
37
|
-
walkSpine(nodes, binders, cellReadNames, hoistable)
|
|
38
|
-
return hoistable
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* Recursively collect every `{#snippet name}` name in the subtree into `into`. */
|
|
42
|
-
function collectSnippetNames(list: TemplateNode[], into: Set<string>): void {
|
|
43
|
-
for (const node of list) {
|
|
44
|
-
if (node.kind === 'snippet') {
|
|
45
|
-
into.add(node.name)
|
|
46
|
-
}
|
|
47
|
-
if ('children' in node && Array.isArray(node.children)) {
|
|
48
|
-
collectSnippetNames(node.children, into)
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* Walk a spine sibling list left-to-right: a `<script>` sibling's locals bind the siblings that
|
|
54
|
-
follow it; a component is judged in the running binder context; a plain element descends (still on
|
|
55
|
-
the spine). Every other node kind leaves the spine and is not descended — its components stay
|
|
56
|
-
sequential. */
|
|
57
|
-
function walkSpine(
|
|
58
|
-
list: TemplateNode[],
|
|
59
|
-
binders: ReadonlySet<string>,
|
|
60
|
-
cellReadNames: ReadonlySet<string>,
|
|
61
|
-
hoistable: Set<ComponentNode>,
|
|
62
|
-
): void {
|
|
63
|
-
let running = binders
|
|
64
|
-
for (const node of list) {
|
|
65
|
-
if (node.kind === 'script') {
|
|
66
|
-
running = union(running, declaredNames(node.code))
|
|
67
|
-
continue
|
|
68
|
-
}
|
|
69
|
-
if (node.kind === 'component') {
|
|
70
|
-
if (componentIsHoistable(node, running, cellReadNames)) {
|
|
71
|
-
hoistable.add(node)
|
|
72
|
-
}
|
|
73
|
-
/* Slot children are off-spine (built lazily inside the child) — not descended. */
|
|
74
|
-
continue
|
|
75
|
-
}
|
|
76
|
-
if (node.kind === 'element' && 'children' in node) {
|
|
77
|
-
walkSpine(node.children, running, cellReadNames, hoistable)
|
|
78
|
-
}
|
|
79
|
-
/* if / switch / each / await / try / snippet / branch: off the spine, skip. */
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/* Childless, bind-free, with a prefix-evaluable tag and every prop value prefix-evaluable. */
|
|
84
|
-
function componentIsHoistable(
|
|
85
|
-
node: ComponentNode,
|
|
86
|
-
binders: ReadonlySet<string>,
|
|
87
|
-
cellReadNames: ReadonlySet<string>,
|
|
88
|
-
): boolean {
|
|
89
|
-
if (node.children.length > 0) {
|
|
90
|
-
return false
|
|
91
|
-
}
|
|
92
|
-
if (!expressionIsPrefixEvaluable(node.name, binders, cellReadNames)) {
|
|
93
|
-
return false
|
|
94
|
-
}
|
|
95
|
-
for (const prop of node.props) {
|
|
96
|
-
if (prop.bind === true) {
|
|
97
|
-
return false
|
|
98
|
-
}
|
|
99
|
-
if (!expressionIsPrefixEvaluable(prop.code, binders, cellReadNames)) {
|
|
100
|
-
return false
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return true
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function union(a: ReadonlySet<string>, b: ReadonlySet<string>): Set<string> {
|
|
107
|
-
const result = new Set(a)
|
|
108
|
-
for (const value of b) {
|
|
109
|
-
result.add(value)
|
|
110
|
-
}
|
|
111
|
-
return result
|
|
112
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { escapeRegex } from '../../shared/escapeRegex.ts'
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
A RegExp that matches `name` used as a whole identifier in a body of code.
|
|
5
|
-
Boundaries are `(?<![$\w]) … (?![$\w])`, NOT `\b`: `\b` never fires before a
|
|
6
|
-
`$`-leading identifier (`$` is a non-word char, so there's no word boundary
|
|
7
|
-
before it), so `\b$e\b` silently matches nothing — the exact miss that made an
|
|
8
|
-
aliased reactive import (`import { effect as $e }`) read as dead. The name is
|
|
9
|
-
regex-escaped so a `$` or other metachar in it is literal, not an anchor.
|
|
10
|
-
*/
|
|
11
|
-
export function identifierReferencePattern(name: string): RegExp {
|
|
12
|
-
return new RegExp(`(?<![$\\w])${escapeRegex(name)}(?![$\\w])`)
|
|
13
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { Binding } from './types/Binding.ts'
|
|
2
|
-
import type { TemplateNode } from './types/TemplateNode.ts'
|
|
3
|
-
|
|
4
|
-
type Case = Extract<TemplateNode, { kind: 'case' }>
|
|
5
|
-
|
|
6
|
-
/* The structural shape of an `if` chain, resolved once so the build and SSR back-ends share
|
|
7
|
-
one partition of its children and only own emission. Both previously recomputed the
|
|
8
|
-
then-content / branch split and the elseif/else classification. An `if`/`elseif`/`else`
|
|
9
|
-
introduces no names, so `bindings` is empty — present so every block plan answers the
|
|
10
|
-
single binding source uniformly. */
|
|
11
|
-
export type IfPlan = {
|
|
12
|
-
/* The `then` content — every child that is not an `elseif`/`else` branch. */
|
|
13
|
-
thenChildren: TemplateNode[]
|
|
14
|
-
/* The `elseif`/`else` branches in source order (each a `case` node: `condition` set for
|
|
15
|
-
`elseif`, both unset for `else`). */
|
|
16
|
-
branches: Case[]
|
|
17
|
-
/* Any branch carries a condition → a cond-chain (the build lowers it through `switchBlock`);
|
|
18
|
-
otherwise a binary `if`/`else`. */
|
|
19
|
-
hasElseif: boolean
|
|
20
|
-
/* The match-less `else` branch, if present. */
|
|
21
|
-
elseBranch: Case | undefined
|
|
22
|
-
/* An `if` chain binds no names. */
|
|
23
|
-
bindings: Binding[]
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* Partitions an `if` node's children into the shared structural plan. */
|
|
27
|
-
export function ifPlan(node: Extract<TemplateNode, { kind: 'if' }>): IfPlan {
|
|
28
|
-
const branches = node.children.filter((child): child is Case => child.kind === 'case')
|
|
29
|
-
return {
|
|
30
|
-
thenChildren: node.children.filter((child) => child.kind !== 'case'),
|
|
31
|
-
branches,
|
|
32
|
-
hasElseif: branches.some((branch) => branch.condition !== undefined),
|
|
33
|
-
elseBranch: branches.find((branch) => branch.condition === undefined),
|
|
34
|
-
bindings: [],
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { TextPart } from './types/TextPart.ts'
|
|
2
|
-
|
|
3
|
-
/* Escapes a literal attribute chunk for embedding in a JS template literal: a
|
|
4
|
-
backslash, backtick, or `${` would otherwise start an escape/expression. */
|
|
5
|
-
function escapeTemplateChunk(value: string): string {
|
|
6
|
-
return value.replace(/[\\`]/g, '\\$&').replace(/\$\{/g, '\\${')
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
Builds the RAW (un-lowered) template-literal source for an interpolated attribute
|
|
11
|
-
or prop value — static parts escaped, each `{expr}` spliced as `${code}`. The caller
|
|
12
|
-
lowers the whole result through its signal transformer, so the embedded expressions
|
|
13
|
-
are rewritten exactly like any other template expression. Both back-ends and the
|
|
14
|
-
component-prop path share this one builder, so server markup, client binding, and
|
|
15
|
-
prop value can't diverge on the concatenation. Always yields a string, so an
|
|
16
|
-
interpolated attribute is always present.
|
|
17
|
-
*/
|
|
18
|
-
export function interpolatedTemplateLiteral(parts: TextPart[]): string {
|
|
19
|
-
/* A dynamic slot coerces nullish to empty so `attr="a {v} b"` with a pending/undefined
|
|
20
|
-
`v` yields `"a b"`, never `"a undefined b"` (ADR-0032 D3). */
|
|
21
|
-
const body = parts
|
|
22
|
-
.map((part) =>
|
|
23
|
-
part.kind === 'static' ? escapeTemplateChunk(part.value) : `\${(${part.code}) ?? ''}`,
|
|
24
|
-
)
|
|
25
|
-
.join('')
|
|
26
|
-
return `\`${body}\``
|
|
27
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { cachedShadowProgram } from './cachedShadowProgram.ts'
|
|
2
|
-
import type { ShadowProgram } from './createShadowProgram.ts'
|
|
3
|
-
import { shadowInterpolationClassifier } from './shadowInterpolationClassifier.ts'
|
|
4
|
-
import type { InterpolationClassifier } from './types/InterpolationClassifier.ts'
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
Builds the type-directed interpolation classifier for one `.abide` file, backed by
|
|
8
|
-
a WARM shadow program kept once per project root (ADR-0019, Stage B). The shadow
|
|
9
|
-
program (checker + every component's source→shadow `mappings`) is expensive to
|
|
10
|
-
build, so it is created lazily on first request for a root and reused for every
|
|
11
|
-
component in that root — the coupling that makes type-directed lowering affordable.
|
|
12
|
-
The incremental `createShadowLanguageService` does not expose the checker, shadow
|
|
13
|
-
`ts.SourceFile`, or per-file mappings publicly, so v1 uses the one-shot
|
|
14
|
-
`createShadowProgram` (reused per root) rather than the LS overlay path.
|
|
15
|
-
|
|
16
|
-
FAIL-OPEN throughout: if the program can't be built (warned once per root by
|
|
17
|
-
`cachedShadowProgram`), or the file has no shadow, the classifier is absent (→ today's
|
|
18
|
-
plain-value binding); and the returned closure wraps its whole body so ANY throw
|
|
19
|
-
(resolution failure, missing node, checker hiccup) returns `'sync'`. A type-resolution
|
|
20
|
-
problem degrades to today's behavior, never breaks the build.
|
|
21
|
-
*/
|
|
22
|
-
export function interpolationClassifierForRoot(
|
|
23
|
-
cache: Map<string, ShadowProgram | undefined>,
|
|
24
|
-
root: string,
|
|
25
|
-
abidePath: string,
|
|
26
|
-
): InterpolationClassifier | undefined {
|
|
27
|
-
const shadowProgram = cachedShadowProgram(cache, root)
|
|
28
|
-
if (shadowProgram === undefined) {
|
|
29
|
-
return undefined
|
|
30
|
-
}
|
|
31
|
-
return shadowInterpolationClassifier(shadowProgram.program, shadowProgram.shadows, abidePath)
|
|
32
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { OUTLET_TAG } from '../runtime/OUTLET_TAG.ts'
|
|
2
|
-
import { isControlFlow } from './isControlFlow.ts'
|
|
3
|
-
import type { TemplateNode } from './types/TemplateNode.ts'
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
The node kinds that mount as a marker range and so take an `<!--a-->` anchor when in a
|
|
7
|
-
skeleton — control-flow, child component, and the two outlet elements (a layout's
|
|
8
|
-
`OUTLET_TAG`, a component's `<slot>`). The single positioning predicate every back-end
|
|
9
|
-
shares — `generateSSR` gates its anchor emission on it, `skeletonContext` gates its anchor
|
|
10
|
-
indexing on it — so SSR, the client clone, and the shared numberer cannot disagree on which
|
|
11
|
-
nodes anchor.
|
|
12
|
-
*/
|
|
13
|
-
export function isAnchorPositioned(node: TemplateNode): boolean {
|
|
14
|
-
return (
|
|
15
|
-
isControlFlow(node) ||
|
|
16
|
-
node.kind === 'component' ||
|
|
17
|
-
(node.kind === 'element' && (node.tag === OUTLET_TAG || node.tag === 'slot'))
|
|
18
|
-
)
|
|
19
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { TemplateNode } from './types/TemplateNode.ts'
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
A control-flow block — `if`/`each`/`await`/`switch`/`try`. In a skeleton each mounts at an
|
|
5
|
-
`<!--a-->` anchor cloned into its located parent at the block's position (see `anchorCursor`),
|
|
6
|
-
so a block can sit ANYWHERE among static siblings. The shared classification under block
|
|
7
|
-
anchor placement: both back-ends — and `skeletonable` — consult this so they agree on which
|
|
8
|
-
nodes are anchor-positioned. A child component is anchor-positioned too (it mounts as a
|
|
9
|
-
`[`…`]` range like a block, see `mountRange`); the back-ends OR this with `kind ===
|
|
10
|
-
'component'` rather than folding it in here, since a standalone component routes differently.
|
|
11
|
-
*/
|
|
12
|
-
export function isControlFlow(node: TemplateNode): boolean {
|
|
13
|
-
return (
|
|
14
|
-
node.kind === 'if' ||
|
|
15
|
-
node.kind === 'each' ||
|
|
16
|
-
node.kind === 'await' ||
|
|
17
|
-
node.kind === 'switch' ||
|
|
18
|
-
node.kind === 'try'
|
|
19
|
-
)
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import ts from 'typescript'
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
A node that opens its own (possibly async) function scope — awaits inside it are that scope's
|
|
5
|
-
concern, not the enclosing seed's. Both the top-level-await walk (`hasTopLevelAwait`) and the
|
|
6
|
-
top-level-await diagnostics stop descending here, so a seed classifies the same way a value read
|
|
7
|
-
inside such a scope would behave. One predicate shared by the build lowering and the type shadow so
|
|
8
|
-
they can never disagree on a boundary (ADR-0042 D5's "one predicate").
|
|
9
|
-
*/
|
|
10
|
-
export function isFunctionScopeBoundary(node: ts.Node): boolean {
|
|
11
|
-
return (
|
|
12
|
-
ts.isFunctionDeclaration(node) ||
|
|
13
|
-
ts.isFunctionExpression(node) ||
|
|
14
|
-
ts.isArrowFunction(node) ||
|
|
15
|
-
ts.isMethodDeclaration(node) ||
|
|
16
|
-
ts.isGetAccessorDeclaration(node) ||
|
|
17
|
-
ts.isSetAccessorDeclaration(node) ||
|
|
18
|
-
ts.isConstructorDeclaration(node)
|
|
19
|
-
)
|
|
20
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/* Compiled once at module load — re-evaluating the literal per call would recompile it. */
|
|
2
|
-
const PLAIN_IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/
|
|
3
|
-
|
|
4
|
-
/* Matches a JS identifier — a plain binding `as`/index that reads/keys directly, vs a
|
|
5
|
-
destructuring pattern that re-applies per read. Shared by `reactiveBinding` (cell deref)
|
|
6
|
-
and `each` key derivation so the one identifier test stays single-source. */
|
|
7
|
-
export const isPlainIdentifier = (name: string): boolean => PLAIN_IDENTIFIER.test(name)
|