@abide/abide 0.58.0 → 0.100.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 +3 -1781
- package/bin/abide.ts +788 -204
- package/package.json +30 -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 +109 -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 +537 -0
- package/src/server/answerSocket.ts +537 -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 +66 -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 +613 -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 +499 -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 +7 -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 +223 -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 +423 -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 +4480 -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 +418 -0
- package/src/shared/reactive/watch.ts +310 -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 +496 -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
package/src/lib/ui/dom/outlet.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { claimMarker } from '../runtime/claimMarker.ts'
|
|
2
|
-
import { OUTLET_CLOSE, OUTLET_OPEN } from '../runtime/OUTLET_MARKER.ts'
|
|
3
|
-
import { PENDING_OUTLET } from '../runtime/PENDING_OUTLET.ts'
|
|
4
|
-
import { parkCursor } from '../runtime/parkCursor.ts'
|
|
5
|
-
import { RENDER } from '../runtime/RENDER.ts'
|
|
6
|
-
import { commentData } from './commentData.ts'
|
|
7
|
-
|
|
8
|
-
/*
|
|
9
|
-
A layout's `<slot/>` outlet: an empty `<!--abide:outlet-->`…`<!--/abide:outlet-->`
|
|
10
|
-
boundary the router fills with the next chain layer (`fillBoundary`). No wrapper
|
|
11
|
-
element, so the filled child lays out as a direct child of the slot's parent.
|
|
12
|
-
|
|
13
|
-
Create: insert the empty boundary at `before` (the anchor's cursor). Hydrate: claim the
|
|
14
|
-
open marker, then SKIP the server-rendered child content — the router re-claims it when
|
|
15
|
-
it fills the boundary — by advancing the parent's claim cursor past the MATCHING close
|
|
16
|
-
(depth-counting nested outlets), so the layout's own claims after the slot stay aligned.
|
|
17
|
-
Records the boundary in `PENDING_OUTLET` (and returns it) so the router learns where the
|
|
18
|
-
next chain layer mounts without scanning the DOM.
|
|
19
|
-
*/
|
|
20
|
-
// @documentation plumbing
|
|
21
|
-
export function outlet(
|
|
22
|
-
parent: Node,
|
|
23
|
-
before: Node | null = null,
|
|
24
|
-
): { open: Comment; close: Comment } {
|
|
25
|
-
const hydration = RENDER.hydration
|
|
26
|
-
if (hydration === undefined) {
|
|
27
|
-
const open = document.createComment(OUTLET_OPEN)
|
|
28
|
-
const close = document.createComment(OUTLET_CLOSE)
|
|
29
|
-
parent.insertBefore(open, before)
|
|
30
|
-
parent.insertBefore(close, before)
|
|
31
|
-
PENDING_OUTLET.current = { open, close }
|
|
32
|
-
return { open, close }
|
|
33
|
-
}
|
|
34
|
-
const open = claimMarker(hydration, parent, 'outlet open marker')
|
|
35
|
-
/* Skip to the matching close: depth-count outlet markers (nested child-layer slots
|
|
36
|
-
are balanced), so a layout wrapping another layout skips its WHOLE subtree. */
|
|
37
|
-
let depth = 1
|
|
38
|
-
let node: Node | null = open.nextSibling
|
|
39
|
-
while (node !== null) {
|
|
40
|
-
const data = commentData(node)
|
|
41
|
-
if (data === OUTLET_OPEN) {
|
|
42
|
-
depth += 1
|
|
43
|
-
} else if (data === OUTLET_CLOSE) {
|
|
44
|
-
depth -= 1
|
|
45
|
-
if (depth === 0) {
|
|
46
|
-
break
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
node = node.nextSibling
|
|
50
|
-
}
|
|
51
|
-
/* No matching close — the server stream ended inside the slot (a mid-render error
|
|
52
|
-
or truncation). Throw AT the divergence like `claimExpected`, rather than store a
|
|
53
|
-
null close that a later `clearBetween(open, null)` would over-clear to end-of-parent. */
|
|
54
|
-
if (node === null) {
|
|
55
|
-
throw new Error(
|
|
56
|
-
'[abide] hydration desync: outlet open marker has no matching close — the server DOM is truncated inside a layout slot.',
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
const close = node as Comment
|
|
60
|
-
parkCursor(hydration, parent, close.nextSibling)
|
|
61
|
-
PENDING_OUTLET.current = { open, close }
|
|
62
|
-
return { open, close }
|
|
63
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { foreignWrapperTag } from './foreignWrapperTag.ts'
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
Parses a trusted raw-markup string into detached nodes in the SAME foreign namespace
|
|
5
|
-
as `parent`. The HTML fragment parser namespaces by its context element, so markup
|
|
6
|
-
bound inside an <svg>/<math> must parse inside a matching wrapper — otherwise a bare
|
|
7
|
-
`<path>` lands in the HTML namespace and never renders. Mirrors `cloneStatic`'s
|
|
8
|
-
foreign handling, but parses per-call into a throwaway `<template>` rather than the
|
|
9
|
-
skeleton cache: raw values are dynamic, so caching every distinct string would leak.
|
|
10
|
-
*/
|
|
11
|
-
export function parseRawNodes(parent: Node, markup: string): Node[] {
|
|
12
|
-
const wrapper = foreignWrapperTag(parent)
|
|
13
|
-
const template = document.createElement('template')
|
|
14
|
-
template.innerHTML = wrapper === undefined ? markup : `<${wrapper}>${markup}</${wrapper}>`
|
|
15
|
-
const source = wrapper === undefined ? template.content : (template.content.firstChild as Node)
|
|
16
|
-
return [...source.childNodes]
|
|
17
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Guarded method call on a reactive-document read. The doc-access lowering rewrites
|
|
3
|
-
a non-optional method call on a reactive-document read — e.g. `model.draft.trim()` —
|
|
4
|
-
directly to `$$readCall(model.read("draft"), "draft", "trim", [...])` rather than
|
|
5
|
-
the naive `model.read("draft").trim()`, which would throw the engine's opaque
|
|
6
|
-
`undefined is not an object (evaluating '…read("draft").trim()')`, naming only the
|
|
7
|
-
desugared call. This wraps the non-optional call so the throw names the authored
|
|
8
|
-
scope path and member instead —
|
|
9
|
-
the source-mapped stack frame still resolves to the `.abide` line, so message and
|
|
10
|
-
location together read in authored terms. Both opaque engine errors are covered: a
|
|
11
|
-
nullish receiver (`undefined is not an object`) AND a present receiver whose member
|
|
12
|
-
is not callable (`… is not a function`, the misspelled/missing-method case).
|
|
13
|
-
Optional-chained calls are left bare: `?.` means skip-if-absent, not throw, so
|
|
14
|
-
guarding them would change semantics. `.apply(target, …)` preserves the receiver, so
|
|
15
|
-
the method sees the same `this` the bare `target.member(…)` would.
|
|
16
|
-
*/
|
|
17
|
-
// @documentation plumbing
|
|
18
|
-
export function readCall(target: unknown, path: string, member: string, args: unknown[]): unknown {
|
|
19
|
-
if (target === undefined || target === null) {
|
|
20
|
-
throw new TypeError(`abide: cannot call .${member}() — scope value "${path}" is ${target}`)
|
|
21
|
-
}
|
|
22
|
-
const method = (target as Record<string, unknown>)[member]
|
|
23
|
-
if (typeof method !== 'function') {
|
|
24
|
-
throw new TypeError(
|
|
25
|
-
`abide: cannot call .${member}() — "${path}".${member} is not a function (got ${typeof method})`,
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
return (method as (...args: unknown[]) => unknown).apply(target, args)
|
|
29
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { isAsyncCell } from '../../shared/isAsyncCell.ts'
|
|
2
|
-
import type { AsyncComputed } from '../../shared/types/AsyncComputed.ts'
|
|
3
|
-
import { AsyncCellError } from '../runtime/AsyncCellError.ts'
|
|
4
|
-
import { SuspenseSignal } from '../runtime/SuspenseSignal.ts'
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
The one read for a `computed`/`linked` reference the compiler lowers to `$$readCell(NAME)`,
|
|
8
|
-
everywhere — script and template, both sides. An async cell (`AsyncComputed`/`AsyncState`)
|
|
9
|
-
yields its latest retained value, a `derive` reader (a function) is called, and a sync
|
|
10
|
-
`Computed`/`State` yields its `.value`. One read shape lets a `linked`/`computed` binding
|
|
11
|
-
auto-track whichever source it resolved to — a settling promise, a stream, or a plain value —
|
|
12
|
-
with no read-site branching in codegen.
|
|
13
|
-
|
|
14
|
-
Whether a read PAUSES is a property of the NODE, not the read site (ADR-0042). A pending
|
|
15
|
-
blocking cell (`cell.blocking` — author `await`, the one that joins the SSR barrier) throws
|
|
16
|
-
a `SuspenseSignal`: the reader's branch of the graph pauses until the value resolves, and
|
|
17
|
-
the throwing read subscribed the reader to the cell so it re-runs on settle. A pending
|
|
18
|
-
STREAMING cell peeks `undefined` (composes with `?.`/`??`). So a rendering region withholds,
|
|
19
|
-
a derive over it pauses too, and the SSR barrier awaits it — all off the same node bit,
|
|
20
|
-
with no per-site knowledge threaded through the compiler.
|
|
21
|
-
|
|
22
|
-
For a settled async cell this stays the value-aware **throwing peek** (ADR-0019 D3.2):
|
|
23
|
-
- error AND no retained value → throw `AsyncCellError` (carries the cell for keep-the-watch);
|
|
24
|
-
- error WITH a retained value → the value (a failed background refresh stays visible — SWR);
|
|
25
|
-
- resolved → the value.
|
|
26
|
-
The throws are codegen behaviour only — `cell.peek()`/`cell.error()` in JS never throw; the
|
|
27
|
-
author handles an error locally via the probes, or lets it reach a `{#try}`.
|
|
28
|
-
*/
|
|
29
|
-
// @documentation plumbing
|
|
30
|
-
export function readCell(cell: unknown): unknown {
|
|
31
|
-
if (isAsyncCell(cell)) {
|
|
32
|
-
const asyncCell = cell as AsyncComputed<unknown> & { blocking?: boolean }
|
|
33
|
-
const value = asyncCell.peek()
|
|
34
|
-
/* A retained value wins over an error (SWR) and over pending — return it. Only when
|
|
35
|
-
nothing is retained does the cell's state decide: an error is "nothing to render"
|
|
36
|
-
(throw to `{#try}`); a pending blocking cell PAUSES (throw suspense); a pending
|
|
37
|
-
streaming cell — or a blocking cell that legitimately resolved to `undefined` — is
|
|
38
|
-
the bare `undefined`. `pending()` (in flight, no value) gates the suspend so a
|
|
39
|
-
resolved-`undefined` blocking cell never suspends forever. */
|
|
40
|
-
if (value === undefined) {
|
|
41
|
-
const error = asyncCell.error()
|
|
42
|
-
if (error !== undefined) {
|
|
43
|
-
throw new AsyncCellError(asyncCell, error)
|
|
44
|
-
}
|
|
45
|
-
if (asyncCell.blocking === true && asyncCell.pending()) {
|
|
46
|
-
throw new SuspenseSignal(asyncCell)
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return value
|
|
50
|
-
}
|
|
51
|
-
if (typeof cell === 'function') {
|
|
52
|
-
return (cell as () => unknown)()
|
|
53
|
-
}
|
|
54
|
-
return (cell as { value: unknown }).value
|
|
55
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SuspenseSignal } from '../runtime/SuspenseSignal.ts'
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
The text a reactive `{expr}` binding writes: the stringified value, or `''` while a blocking
|
|
5
|
-
`await` read is pending — a `SuspenseSignal` (ADR-0042). Nullish stringifies to `''` (never the
|
|
6
|
-
literal `"undefined"`), so a pending streaming read and a suspended blocking read both show nothing.
|
|
7
|
-
A suspending read still tracked its cell before throwing, so the enclosing bind effect re-runs and
|
|
8
|
-
fills in once the value resolves. Rethrows any non-suspense error unchanged.
|
|
9
|
-
*/
|
|
10
|
-
export function readTextOrSuspend(read: () => unknown): string {
|
|
11
|
-
let next: unknown
|
|
12
|
-
try {
|
|
13
|
-
next = read()
|
|
14
|
-
} catch (signal) {
|
|
15
|
-
if (!(signal instanceof SuspenseSignal)) {
|
|
16
|
-
throw signal
|
|
17
|
-
}
|
|
18
|
-
return ''
|
|
19
|
-
}
|
|
20
|
-
return next == null ? '' : String(next)
|
|
21
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Removes a contiguous node range — `start` through `end` inclusive — from the DOM.
|
|
3
|
-
Used to evict a departed keyed-`each` row whose content is a range (markers plus
|
|
4
|
-
whatever they bound). Each next sibling is captured before removal.
|
|
5
|
-
*/
|
|
6
|
-
export function removeRange(start: Node, end: Node): void {
|
|
7
|
-
const parent = end.parentNode
|
|
8
|
-
if (parent === null) {
|
|
9
|
-
return
|
|
10
|
-
}
|
|
11
|
-
let node: Node | null = start
|
|
12
|
-
const stop: Node | null = end.nextSibling
|
|
13
|
-
while (node !== null && node !== stop) {
|
|
14
|
-
const next: Node | null = node.nextSibling
|
|
15
|
-
parent.removeChild(node)
|
|
16
|
-
node = next
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { clearBetween } from './clearBetween.ts'
|
|
2
|
-
import { fillBefore } from './fillBefore.ts'
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
The one "replace a marker-bounded region's contents" operation. A control-flow block
|
|
6
|
-
that swaps a branch as a unit (if/else, switch, snippet) clears the live range
|
|
7
|
-
(disposing its scope and removing its nodes via `clearBetween`), then — if the new
|
|
8
|
-
branch has content — builds it fresh into the range before the close marker
|
|
9
|
-
(`fillBefore`). Returns the new content's disposer, or `undefined` for an empty
|
|
10
|
-
branch.
|
|
11
|
-
|
|
12
|
-
This is the single seam those blocks shared by copy-paste: same `clearBetween` +
|
|
13
|
-
conditional `fillBefore` shape, hand-rolled three times. Routing them through one
|
|
14
|
-
helper makes the region-update strategy a named, testable primitive.
|
|
15
|
-
*/
|
|
16
|
-
export function replaceRange(
|
|
17
|
-
start: Node,
|
|
18
|
-
end: Node,
|
|
19
|
-
dispose: (() => void) | undefined,
|
|
20
|
-
content: ((into: Node) => void) | undefined,
|
|
21
|
-
): (() => void) | undefined {
|
|
22
|
-
clearBetween(start, end, dispose)
|
|
23
|
-
return content !== undefined ? fillBefore(end, content) : undefined
|
|
24
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { UiProps } from '../runtime/types/UiProps.ts'
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
The rest of a component's props — `const { foo, ...rest } = props()` — as a live
|
|
5
|
-
object of the UNCONSUMED prop values. A child receives prop THUNKS, so `rest.key`
|
|
6
|
-
unwraps them (`$props[key]?.()`), tracking as a reactive dependency; a top-level
|
|
7
|
-
page/layout instead receives its route params as PLAIN values, so a non-function
|
|
8
|
-
value is returned as-is rather than called (which would throw `value is not a
|
|
9
|
-
function`). The explicitly-destructured keys and the `children` slot are excluded.
|
|
10
|
-
Enumerable (`ownKeys`/`for…in`/`Object.keys`), so `{...rest}` can forward the
|
|
11
|
-
remaining props onto a child or a native element. Key membership is live, but a
|
|
12
|
-
consumer that captures the key SET (a `{...rest}` spread) snapshots it at that point.
|
|
13
|
-
*/
|
|
14
|
-
// @documentation plumbing
|
|
15
|
-
export function restProps(props: UiProps, consumed: string[]): Record<string, unknown> {
|
|
16
|
-
const skip = new Set([...consumed, 'children'])
|
|
17
|
-
const bag = props as Record<string, unknown>
|
|
18
|
-
const visible = (key: string | symbol): key is string =>
|
|
19
|
-
typeof key === 'string' && !skip.has(key) && key in bag
|
|
20
|
-
const read = (key: string): unknown =>
|
|
21
|
-
typeof bag[key] === 'function' ? (bag[key] as () => unknown)() : bag[key]
|
|
22
|
-
return new Proxy(
|
|
23
|
-
{},
|
|
24
|
-
{
|
|
25
|
-
get: (_target, key) => (visible(key) ? read(key) : undefined),
|
|
26
|
-
has: (_target, key) => visible(key),
|
|
27
|
-
ownKeys: () => Reflect.ownKeys(bag).filter(visible),
|
|
28
|
-
getOwnPropertyDescriptor: (_target, key) =>
|
|
29
|
-
visible(key) ? { enumerable: true, configurable: true } : undefined,
|
|
30
|
-
},
|
|
31
|
-
)
|
|
32
|
-
}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { walkAnchorOrder } from '../compile/walkAnchorOrder.ts'
|
|
2
|
-
import { walkElementOrder } from '../compile/walkElementOrder.ts'
|
|
3
|
-
import { claimRun } from '../runtime/claimRun.ts'
|
|
4
|
-
import { HOLE_ATTRIBUTE } from '../runtime/HOLE_ATTRIBUTE.ts'
|
|
5
|
-
import { RENDER } from '../runtime/RENDER.ts'
|
|
6
|
-
import { commentData } from './commentData.ts'
|
|
7
|
-
import { depthZeroNodes } from './depthZeroNodes.ts'
|
|
8
|
-
import { domAnchorAdapter } from './domAnchorAdapter.ts'
|
|
9
|
-
import { domElementAdapter } from './domElementAdapter.ts'
|
|
10
|
-
import { foreignWrapperTag } from './foreignWrapperTag.ts'
|
|
11
|
-
import { isElement } from './isElement.ts'
|
|
12
|
-
import { markerDepthDelta } from './markerDepthDelta.ts'
|
|
13
|
-
import type { SkeletonHoles } from './types/SkeletonHoles.ts'
|
|
14
|
-
|
|
15
|
-
type CompiledSkeleton = {
|
|
16
|
-
/* The node whose children are the skeleton's top-level run — the template content,
|
|
17
|
-
or a foreign wrapper element (`<svg>`/`<math>`) the run was parsed inside. */
|
|
18
|
-
source: Node
|
|
19
|
-
/* Element holes, in pre-order — each an element-only-index path from a top-level
|
|
20
|
-
node. Element-only indexing keeps a path stable: a reactive text value is a text
|
|
21
|
-
node, so its width never shifts an element hole between the empty client skeleton
|
|
22
|
-
and the value-filled server DOM. */
|
|
23
|
-
elementPaths: number[][]
|
|
24
|
-
topLevelCount: number
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* Parsed-once skeleton per unique string, keyed by the owning document (see
|
|
28
|
-
`templateFor` for the per-document rationale). */
|
|
29
|
-
const CACHES = new WeakMap<object, Map<string, CompiledSkeleton>>()
|
|
30
|
-
|
|
31
|
-
/* The `index`-th depth-0 ELEMENT among `children` — skipping text/comment nodes AND any
|
|
32
|
-
element nested inside a block's rendered range (between `[`…`]` / `abide:…` boundaries),
|
|
33
|
-
which belongs to that block's own skeleton. The compiler indexes element holes over the
|
|
34
|
-
SHALLOW template (block positions are `<!--a-->` anchors, no content), so on hydrate the
|
|
35
|
-
expanded tree must skip that inline content or a hole positioned after a block shifts. In
|
|
36
|
-
create mode the clone is shallow (no markers), so depth stays 0 — a plain element count. */
|
|
37
|
-
function elementChildAt(children: ArrayLike<Node>, index: number): Element | undefined {
|
|
38
|
-
let seen = 0
|
|
39
|
-
let depth = 0
|
|
40
|
-
for (let cursor = 0; cursor < children.length; cursor += 1) {
|
|
41
|
-
const child = children[cursor] as Node
|
|
42
|
-
const data = commentData(child)
|
|
43
|
-
if (data === undefined) {
|
|
44
|
-
if (isElement(child) && depth === 0) {
|
|
45
|
-
if (seen === index) {
|
|
46
|
-
return child
|
|
47
|
-
}
|
|
48
|
-
seen += 1
|
|
49
|
-
}
|
|
50
|
-
continue
|
|
51
|
-
}
|
|
52
|
-
depth += markerDepthDelta(data)
|
|
53
|
-
}
|
|
54
|
-
return undefined
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* Walks an element-only path from the top-level node list to the target element. A step
|
|
58
|
-
that resolves to nothing means the claimed server run is missing an element the skeleton
|
|
59
|
-
expects here — a hydration desync; throw AT it (naming the path) rather than returning
|
|
60
|
-
the undefined that derefs in the downstream `mountChild`/`attr`, far from the cause. */
|
|
61
|
-
function resolveElementHole(topLevel: ArrayLike<Node>, path: number[]): Element {
|
|
62
|
-
let node = elementChildAt(topLevel, path[0] as number)
|
|
63
|
-
for (let depth = 1; depth < path.length && node !== undefined; depth += 1) {
|
|
64
|
-
node = elementChildAt(node.childNodes, path[depth] as number)
|
|
65
|
-
}
|
|
66
|
-
if (node === undefined) {
|
|
67
|
-
throw new Error(
|
|
68
|
-
`[abide] hydration desync: skeleton element hole [${path.join(',')}] resolved to no node — the server DOM is missing an element the client build expects here.`,
|
|
69
|
-
)
|
|
70
|
-
}
|
|
71
|
-
return node
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* When `parent` is foreign (or a control-flow fragment inside foreign content), the
|
|
75
|
-
skeleton's own markup carries no foreign ancestor, so a bare `<circle>` would parse
|
|
76
|
-
into the HTML namespace. Parse it inside the matching wrapper so the parser
|
|
77
|
-
namespaces the run; key the cache by wrapper too, since one string can be realized
|
|
78
|
-
in either context. */
|
|
79
|
-
function compile(html: string, wrapper: string | undefined): CompiledSkeleton {
|
|
80
|
-
let cache = CACHES.get(document)
|
|
81
|
-
if (cache === undefined) {
|
|
82
|
-
cache = new Map()
|
|
83
|
-
CACHES.set(document, cache)
|
|
84
|
-
}
|
|
85
|
-
const key = wrapper === undefined ? html : `${wrapper} ${html}`
|
|
86
|
-
let compiled = cache.get(key)
|
|
87
|
-
if (compiled === undefined) {
|
|
88
|
-
const template = document.createElement('template')
|
|
89
|
-
template.innerHTML = wrapper === undefined ? html : `<${wrapper}>${html}</${wrapper}>`
|
|
90
|
-
const source =
|
|
91
|
-
wrapper === undefined ? template.content : (template.content.firstChild as Node)
|
|
92
|
-
/* Element holes via the ONE shared rule (`walkElementOrder`) — the same element-only
|
|
93
|
-
pre-order the compiler numbers `elIndex` with. Record each `HOLE_ATTRIBUTE`
|
|
94
|
-
element's path and strip the marker so a clone never carries it into the live DOM. */
|
|
95
|
-
const elementPaths: number[][] = []
|
|
96
|
-
walkElementOrder(Array.from(source.childNodes), domElementAdapter, (node, path) => {
|
|
97
|
-
elementPaths.push(path)
|
|
98
|
-
;(node as Element).removeAttribute(HOLE_ATTRIBUTE)
|
|
99
|
-
})
|
|
100
|
-
compiled = { source, elementPaths, topLevelCount: source.childNodes.length }
|
|
101
|
-
cache.set(key, compiled)
|
|
102
|
-
}
|
|
103
|
-
return compiled
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/*
|
|
107
|
-
Realizes a compiled skeleton under `parent` and returns its holes: `el` the element
|
|
108
|
-
holes (attribute/listener/bind), in pre-order; `an` the anchor holes (reactive text,
|
|
109
|
-
control flow, components), in document order. The browser's parser is the sole
|
|
110
|
-
tree-builder here, so foreign content (SVG/MathML) lands in the correct namespace and
|
|
111
|
-
`cloneNode` preserves it — a hand-rolled `createElement` tree-builder could not.
|
|
112
|
-
|
|
113
|
-
Element holes resolve by element-only path (stable against text-value width, computed
|
|
114
|
-
client-side — no server marker). Anchor holes resolve by scanning for their `a` comment
|
|
115
|
-
markers (present in both clone and server DOM). Create mode clones the parsed top-level
|
|
116
|
-
nodes; hydrate mode claims the matching server run.
|
|
117
|
-
*/
|
|
118
|
-
// @documentation plumbing
|
|
119
|
-
export function skeleton(parent: Node, html: string): SkeletonHoles {
|
|
120
|
-
const { source, elementPaths, topLevelCount } = compile(html, foreignWrapperTag(parent))
|
|
121
|
-
const hydration = RENDER.hydration
|
|
122
|
-
const topLevel: Node[] = []
|
|
123
|
-
if (hydration !== undefined) {
|
|
124
|
-
claimRun(hydration, parent, topLevelCount, topLevel)
|
|
125
|
-
} else {
|
|
126
|
-
const children = source.childNodes
|
|
127
|
-
/* Stage clones in a fragment ONLY for a live (connected) parent, where one
|
|
128
|
-
append reflows once instead of per clone. A detached parent triggers no
|
|
129
|
-
reflow on append, so the fragment is pure overhead there — skip it and
|
|
130
|
-
append direct. `topLevel` collects each clone either way for anchor/
|
|
131
|
-
element-hole resolution. */
|
|
132
|
-
const target: Node = parent.isConnected ? document.createDocumentFragment() : parent
|
|
133
|
-
for (let index = 0; index < children.length; index += 1) {
|
|
134
|
-
const clone = (children[index] as Node).cloneNode(true)
|
|
135
|
-
topLevel.push(clone)
|
|
136
|
-
target.appendChild(clone)
|
|
137
|
-
}
|
|
138
|
-
if (target !== parent) {
|
|
139
|
-
parent.appendChild(target)
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
/* Anchor holes via the ONE shared ordering rule (`walkAnchorOrder`) — the same traversal
|
|
143
|
-
the compiler numbers `anIndex` with. The top-level list is depth-0-filtered up front (a
|
|
144
|
-
nested range can sit among the top-level run); the adapter filters each deeper level. */
|
|
145
|
-
const an: Node[] = []
|
|
146
|
-
walkAnchorOrder(depthZeroNodes(topLevel), domAnchorAdapter, (anchor) => {
|
|
147
|
-
an.push(anchor as Node)
|
|
148
|
-
})
|
|
149
|
-
return {
|
|
150
|
-
el: elementPaths.map((path) => resolveElementHole(topLevel, path)),
|
|
151
|
-
an,
|
|
152
|
-
}
|
|
153
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { effect } from '../effect.ts'
|
|
2
|
-
import { SuspenseSignal } from '../runtime/SuspenseSignal.ts'
|
|
3
|
-
import { attr } from './attr.ts'
|
|
4
|
-
import { on } from './on.ts'
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
Spreads an object's keys onto a native element — the `<div {...rest}>` runtime. `source`
|
|
8
|
-
is a thunk over the spread expression; its keys are enumerated ONCE (so the attribute set
|
|
9
|
-
is fixed at build, not reactively added/removed), but each value stays live: an `on<event>`
|
|
10
|
-
key holding a function attaches as that event listener (mirroring `onclick={…}` on an
|
|
11
|
-
element), and every other key binds as a reactive attribute (`attr`, re-reading the source
|
|
12
|
-
per change, with the same present/absent semantics — `false`/`null`/`undefined` removes it,
|
|
13
|
-
`true` sets it bare). A function under a non-`on` key is skipped (no attribute for it). A key
|
|
14
|
-
in `exclude` is skipped — the element names it explicitly, and an explicit attribute wins
|
|
15
|
-
over a spread key (the same set SSR's `$spread` skips, keeping the two sides congruent).
|
|
16
|
-
*/
|
|
17
|
-
// @documentation plumbing
|
|
18
|
-
export function spreadAttrs(
|
|
19
|
-
element: Element,
|
|
20
|
-
source: () => Record<string, unknown>,
|
|
21
|
-
exclude: string[] = [],
|
|
22
|
-
): void {
|
|
23
|
-
const skip = new Set(exclude)
|
|
24
|
-
let object: Record<string, unknown>
|
|
25
|
-
try {
|
|
26
|
-
object = source()
|
|
27
|
-
} catch (signal) {
|
|
28
|
-
/* A spread over a PENDING blocking `await` read throws a `SuspenseSignal` here (ADR-0042):
|
|
29
|
-
its keys can't be enumerated yet. Binding the empty object now would create no `attr`/`on`
|
|
30
|
-
effects, so the attributes would never appear after the cell resolves — instead defer the
|
|
31
|
-
enumeration into a one-shot effect that re-runs on settle (the read tracked its cell). The
|
|
32
|
-
effect is pinned to this build's scope, so the `attr` binds it creates own their lifetime
|
|
33
|
-
correctly; a `spread` flag makes the enumeration fire exactly once (later value changes
|
|
34
|
-
re-read per key via `attr`, never re-enumerate). */
|
|
35
|
-
if (!(signal instanceof SuspenseSignal)) {
|
|
36
|
-
throw signal
|
|
37
|
-
}
|
|
38
|
-
let spread = false
|
|
39
|
-
effect(() => {
|
|
40
|
-
let resolved: Record<string, unknown>
|
|
41
|
-
try {
|
|
42
|
-
resolved = source()
|
|
43
|
-
} catch (retry) {
|
|
44
|
-
if (!(retry instanceof SuspenseSignal)) {
|
|
45
|
-
throw retry
|
|
46
|
-
}
|
|
47
|
-
return
|
|
48
|
-
}
|
|
49
|
-
if (spread) {
|
|
50
|
-
return
|
|
51
|
-
}
|
|
52
|
-
spread = true
|
|
53
|
-
bindKeys(element, source, resolved, skip)
|
|
54
|
-
})
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
bindKeys(element, source, object, skip)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* Binds each own key of `object` onto `element`: an `on<event>` function attaches as a listener,
|
|
61
|
-
any other non-function value binds as a reactive attribute re-reading `source()[key]` per change.
|
|
62
|
-
A key in `skip` is left to its explicit binding. */
|
|
63
|
-
function bindKeys(
|
|
64
|
-
element: Element,
|
|
65
|
-
source: () => Record<string, unknown>,
|
|
66
|
-
object: Record<string, unknown>,
|
|
67
|
-
skip: Set<string>,
|
|
68
|
-
): void {
|
|
69
|
-
for (const key in object) {
|
|
70
|
-
if (skip.has(key)) {
|
|
71
|
-
continue
|
|
72
|
-
}
|
|
73
|
-
/* Reading the value can itself throw a `SuspenseSignal`: when `source()` is a
|
|
74
|
-
restProps proxy (the `<Button {...rest}>` case), its `get` invokes the underlying
|
|
75
|
-
prop thunk, so a key whose expression reads a still-pending blocking `await` suspends
|
|
76
|
-
HERE — after the `source()` enumeration guard already passed. Classify it as an
|
|
77
|
-
attribute; `attr`'s own effect swallows the suspend and fills the value in on settle.
|
|
78
|
-
An event handler never suspends — its thunk returns a function without reading a cell. */
|
|
79
|
-
let value: unknown
|
|
80
|
-
try {
|
|
81
|
-
value = object[key]
|
|
82
|
-
} catch (signal) {
|
|
83
|
-
if (!(signal instanceof SuspenseSignal)) {
|
|
84
|
-
throw signal
|
|
85
|
-
}
|
|
86
|
-
attr(element, key, () => source()[key])
|
|
87
|
-
continue
|
|
88
|
-
}
|
|
89
|
-
if (key.startsWith('on') && typeof value === 'function') {
|
|
90
|
-
on(element, key.slice(2), value as EventListener)
|
|
91
|
-
} else if (typeof value !== 'function') {
|
|
92
|
-
attr(element, key, () => source()[key])
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Wraps a `{...source}` spread layer so every key resolves to a live value thunk —
|
|
3
|
-
the same `() => value` shape an explicit `name={expr}` prop compiles to, so a child
|
|
4
|
-
reads a spread key exactly like an authored one (`$props[key]?.()`). `source` is a
|
|
5
|
-
THUNK over the spread expression (not its value), re-evaluated on each key read and
|
|
6
|
-
membership test, so a reactive source stays live both when its keys mutate and when
|
|
7
|
-
the whole object is replaced — and the read registers as the reader's dependency. A
|
|
8
|
-
nullish source spreads nothing. The reserved `children` slot key is never surfaced —
|
|
9
|
-
a source happening to carry one must not masquerade as slot content.
|
|
10
|
-
*/
|
|
11
|
-
// @documentation plumbing
|
|
12
|
-
export function spreadProps(
|
|
13
|
-
source: () => Record<string, unknown> | null | undefined,
|
|
14
|
-
): Record<string, () => unknown> {
|
|
15
|
-
/* A spread key the merged bag exposes — present on the current source and not the
|
|
16
|
-
reserved `children` slot key (a source carrying one must not become slot content). */
|
|
17
|
-
const carries = (key: string | symbol): boolean => key !== 'children' && key in (source() ?? {})
|
|
18
|
-
return new Proxy(
|
|
19
|
-
{},
|
|
20
|
-
{
|
|
21
|
-
/* Each read returns a fresh thunk that re-evaluates the source for the key. */
|
|
22
|
-
get: (_target, key) => () => source()?.[key as string],
|
|
23
|
-
/* Live membership: whether the current source object carries the key. */
|
|
24
|
-
has: (_target, key) => carries(key),
|
|
25
|
-
/* Enumerable over the current source, so a merged bag reports spread keys. */
|
|
26
|
-
ownKeys: () => Reflect.ownKeys(source() ?? {}).filter(carries),
|
|
27
|
-
getOwnPropertyDescriptor: (_target, key) =>
|
|
28
|
-
carries(key) ? { enumerable: true, configurable: true } : undefined,
|
|
29
|
-
},
|
|
30
|
-
) as Record<string, () => unknown>
|
|
31
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { SuspenseSignal } from '../runtime/SuspenseSignal.ts'
|
|
2
|
-
import { mountSwappableRange } from './mountSwappableRange.ts'
|
|
3
|
-
import type { SwitchCase } from './types/SwitchCase.ts'
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
Multi-branch binding — the runtime for `{#switch}` blocks and for `{#if}` chains that
|
|
7
|
-
include `{:elseif}` branches (compiled as a switch over `true` with Boolean-coerced
|
|
8
|
-
match thunks so the first truthy branch wins). A swappable range evaluates the
|
|
9
|
-
subject, picks the first case whose `match` equals it (strict `===`), falling back
|
|
10
|
-
to the default (`match` undefined); the chosen case's content lives in a RANGE
|
|
11
|
-
bounded by two comment markers, so a case holds any content. Staying on the same
|
|
12
|
-
case across a subject change leaves it mounted; switching clears the range and
|
|
13
|
-
builds the new case fresh. See `mountSwappableRange` for the shared
|
|
14
|
-
hydrate/swap/teardown semantics — the case index is the swap key, which doubles as
|
|
15
|
-
the case's render-path segment (`caseSegment` — the alphabet SSR also emits).
|
|
16
|
-
*/
|
|
17
|
-
// @documentation plumbing
|
|
18
|
-
export function switchBlock(
|
|
19
|
-
parent: Node,
|
|
20
|
-
subject: () => unknown,
|
|
21
|
-
cases: SwitchCase[],
|
|
22
|
-
before: Node | null = null,
|
|
23
|
-
isPending?: () => boolean,
|
|
24
|
-
): void {
|
|
25
|
-
/* Walk the cases in source order (the same order a `{#if}`/`{:elseif}` chain reads): the
|
|
26
|
-
first whose own async condition is still `pending()` HOLDS the chain — returns -1, so no
|
|
27
|
-
later branch renders on a not-yet-known earlier condition; the first whose `match() ===`
|
|
28
|
-
the subject wins; a match-less `default` is the fallback once every case settled without a
|
|
29
|
-
match. A plain `{#switch}` (no per-case `pending`) reduces to first-match-else-default. */
|
|
30
|
-
const select = (value: unknown): number => {
|
|
31
|
-
let fallback = -1
|
|
32
|
-
for (let index = 0; index < cases.length; index++) {
|
|
33
|
-
const entry = cases[index]
|
|
34
|
-
if (entry === undefined) {
|
|
35
|
-
continue
|
|
36
|
-
}
|
|
37
|
-
if (entry.pending?.()) {
|
|
38
|
-
return -1
|
|
39
|
-
}
|
|
40
|
-
if (entry.match === undefined) {
|
|
41
|
-
fallback = index
|
|
42
|
-
} else if (entry.match() === value) {
|
|
43
|
-
return index
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return fallback
|
|
47
|
-
}
|
|
48
|
-
mountSwappableRange(
|
|
49
|
-
parent,
|
|
50
|
-
/* A pending bare async subject (compiler-supplied `isPending`) selects no case — not
|
|
51
|
-
even the default — so the block renders nothing until the cell settles, rather than
|
|
52
|
-
conflating "still loading" with a subject that matched the default. A blocking `await`
|
|
53
|
-
cell embedded in the subject or a `match` (a member access / compound the `isPending`
|
|
54
|
-
gate doesn't cover) throws a `SuspenseSignal` while pending (ADR-0042); select no case
|
|
55
|
-
until it settles, exactly as a bare async subject holds — the read tracked its cell, so
|
|
56
|
-
the swap effect re-runs on resolve. */
|
|
57
|
-
() => {
|
|
58
|
-
if (isPending?.() === true) {
|
|
59
|
-
return -1
|
|
60
|
-
}
|
|
61
|
-
try {
|
|
62
|
-
return select(subject())
|
|
63
|
-
} catch (signal) {
|
|
64
|
-
if (!(signal instanceof SuspenseSignal)) {
|
|
65
|
-
throw signal
|
|
66
|
-
}
|
|
67
|
-
return -1
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
(index) => {
|
|
71
|
-
const chosen = index === -1 ? undefined : cases[index]
|
|
72
|
-
return chosen && ((p) => chosen.render(p))
|
|
73
|
-
},
|
|
74
|
-
before,
|
|
75
|
-
/* Any async subject/branch (a bare async subject, or an async `{:else if}` in a cond-chain)
|
|
76
|
-
can select a different branch on the server than the pending client, so hydration must
|
|
77
|
-
discard the SSR range rather than adopt it in place. */
|
|
78
|
-
isPending !== undefined || cases.some((entry) => entry.pending !== undefined),
|
|
79
|
-
)
|
|
80
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Parsed-once `<template>` per unique static-skeleton string, reused across every
|
|
3
|
-
mount. A `<template>` (not a detached `<div>`) so table/select content parses by
|
|
4
|
-
the real content model, exactly as the browser parsed the server markup. Backs
|
|
5
|
-
`cloneStatic`'s skeleton-string→template cache.
|
|
6
|
-
|
|
7
|
-
The cache is keyed by the owning `document`: a template belongs to the document
|
|
8
|
-
that created it, and its clones must land in that same document. In production there
|
|
9
|
-
is one document, so this is one inner map; under the test harness, which installs a
|
|
10
|
-
fresh `document` per file, it keeps each file's templates (and their node class)
|
|
11
|
-
from leaking into the next.
|
|
12
|
-
*/
|
|
13
|
-
const CACHES = new WeakMap<object, Map<string, HTMLTemplateElement>>()
|
|
14
|
-
|
|
15
|
-
export function templateFor(html: string): HTMLTemplateElement {
|
|
16
|
-
let cache = CACHES.get(document)
|
|
17
|
-
if (cache === undefined) {
|
|
18
|
-
cache = new Map()
|
|
19
|
-
CACHES.set(document, cache)
|
|
20
|
-
}
|
|
21
|
-
let template = cache.get(html)
|
|
22
|
-
if (template === undefined) {
|
|
23
|
-
template = document.createElement('template')
|
|
24
|
-
template.innerHTML = html
|
|
25
|
-
cache.set(html, template)
|
|
26
|
-
}
|
|
27
|
-
return template
|
|
28
|
-
}
|