tungsten 0.7.1 → 0.8.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.
Files changed (1378) hide show
  1. package/AGENTS.md +1385 -0
  2. package/dist/.build-complete +1 -1
  3. package/dist/Components.d.ts +6 -4
  4. package/dist/Components.js +2 -0
  5. package/dist/Framework.js +7 -7
  6. package/dist/FrameworkConfig.d.ts +8 -2
  7. package/dist/Instance/Instance.d.ts +6 -1
  8. package/dist/Instance/Instance.js +62 -22
  9. package/dist/Servers/DevServer.d.ts +8 -5
  10. package/dist/Servers/DevServer.js +196 -113
  11. package/dist/Servers/ProdServer.d.ts +3 -1
  12. package/dist/Servers/ProdServer.js +136 -34
  13. package/dist/Servers/TungstenServer.d.ts +34 -1
  14. package/dist/Servers/TungstenServer.js +94 -42
  15. package/dist/Servers/loadEnvsDev.js +4 -4
  16. package/dist/Servers/watchedServerMiddleware.d.ts +10 -0
  17. package/dist/Servers/watchedServerMiddleware.js +45 -0
  18. package/dist/TungstenApp.js +2 -1
  19. package/dist/_client/cjsHelpers.d.ts +1 -1
  20. package/dist/_client/hmr.js +1 -1
  21. package/dist/_client/liveReloadSource.js +1 -1
  22. package/dist/_testing/errorRoute.d.ts +8 -0
  23. package/dist/_testing/errorRoute.js +9 -0
  24. package/dist/appBuilder.d.ts +2 -1
  25. package/dist/babelPlugins/BabelTransformComponentStyles.js +5 -3
  26. package/dist/babelPlugins/BabelTransformPackageImports.js +3 -1
  27. package/dist/babelPlugins/StyleCompileError.d.ts +4 -0
  28. package/dist/babelPlugins/StyleCompileError.js +11 -0
  29. package/dist/bin/commands/devmon.js +2 -2
  30. package/dist/bin/vendorHook.js +2 -1
  31. package/dist/build/assetVersions.js +2 -1
  32. package/dist/build/babel.user.common.config.d.ts +3 -5
  33. package/dist/build/compileJavascript.js +12 -27
  34. package/dist/build/componentStylesCache.js +2 -2
  35. package/dist/build/frameworkDestLocation.js +2 -1
  36. package/dist/build/ignoreGlobs.d.ts +2 -0
  37. package/dist/build/ignoreGlobs.js +8 -0
  38. package/dist/build/makeBabelRawConfig.d.ts +2 -2
  39. package/dist/build/makeBabelUserDevConfig.d.ts +2 -2
  40. package/dist/build/makeBabelUserProdConfig.d.ts +2 -2
  41. package/dist/build/rollup.user.prod.config.js +2 -2
  42. package/dist/build/tallyBabel.d.ts +2 -2
  43. package/dist/build/tallyBabel.js +1 -1
  44. package/dist/clone.js +1 -0
  45. package/dist/componentHelpers.d.ts +1 -1
  46. package/dist/componentHelpers.js +3 -4
  47. package/dist/componentProxyHandlers.js +2 -1
  48. package/dist/components/NativeHtml.d.ts +1 -1
  49. package/dist/components/bindable/BindableInputTyped.d.ts +3 -1
  50. package/dist/components/bindable/BindableInputTypedLegacy.d.ts +3 -1
  51. package/dist/components/bindable/bindableHtmlElements.d.ts +3 -3
  52. package/dist/components/library/RichTextEditor/RichTextEditor.d.ts +1 -1
  53. package/dist/components/library/RichTextEditor/StoredContentNode.d.ts +6 -1
  54. package/dist/components/library/RichTextEditor/contentTree.js +33 -13
  55. package/dist/env/setPrivateEnvValidator.js +2 -2
  56. package/dist/env/setPublicEnvValidator.d.ts +2 -2
  57. package/dist/env/setPublicEnvValidator.js +2 -2
  58. package/dist/fileVersions.js +5 -1
  59. package/dist/findProjectDir.js +2 -1
  60. package/dist/findUserConfig.d.ts +1 -1
  61. package/dist/frameworkConfigSchema.d.ts +8 -4
  62. package/dist/frameworkConfigSchema.js +2 -0
  63. package/dist/getRoutes.js +0 -4
  64. package/dist/hydrate/hydrate.js +3 -2
  65. package/dist/hydrate/hydrateGlobalData.d.ts +3 -0
  66. package/dist/hydrate/stubRouting.d.ts +2 -1
  67. package/dist/hydrate/stubRouting.js +7 -5
  68. package/dist/indexInner.d.ts +1 -0
  69. package/dist/indexInner.js +1 -0
  70. package/dist/json.d.ts +4 -0
  71. package/dist/json.js +3 -0
  72. package/dist/makeFinalConfig.js +3 -1
  73. package/dist/mutatingFunctions.d.ts +3 -3
  74. package/dist/pipeline/hydratePipeline.js +46 -5
  75. package/dist/pipeline/pipeline.d.ts +21 -6
  76. package/dist/pipeline/pipeline.js +14 -3
  77. package/dist/pipeline/pipelineDefinition.d.ts +11 -3
  78. package/dist/pipeline/pipelineDefinition.js +2 -0
  79. package/dist/pipeline/runPipeline.d.ts +15 -5
  80. package/dist/pipeline/runPipeline.js +71 -29
  81. package/dist/pipeline/runSplitPipeline.d.ts +2 -2
  82. package/dist/pipeline/runSplitPipeline.js +11 -5
  83. package/dist/pipeline/settleRouting.d.ts +10 -0
  84. package/dist/pipeline/settleRouting.js +54 -0
  85. package/dist/pipeline/splitPipeline.d.ts +9 -6
  86. package/dist/pipeline/splitPipeline.js +6 -4
  87. package/dist/postcssPlugins/TransformCssNames.d.ts +6 -6
  88. package/dist/render/contentTreeToRenderingTree.js +1 -3
  89. package/dist/render/instantiateClassComponent.d.ts +1 -1
  90. package/dist/render/processHead.js +31 -0
  91. package/dist/render/processProps.d.ts +6 -1
  92. package/dist/render/processProps.js +6 -4
  93. package/dist/render/rootToHtml.d.ts +1 -1
  94. package/dist/render/rootToHtml.js +2 -2
  95. package/dist/render/rootToHtmlDev.d.ts +1 -1
  96. package/dist/render/rootToHtmlDev.js +2 -2
  97. package/dist/routing/DataRedirect.d.ts +4 -0
  98. package/dist/routing/DataRedirect.js +1 -0
  99. package/dist/routing/Group.d.ts +1 -1
  100. package/dist/routing/MatchedRoute.d.ts +1 -1
  101. package/dist/routing/MatchedRoute.js +9 -3
  102. package/dist/routing/Routes.d.ts +3 -1
  103. package/dist/routing/builder.d.ts +28 -9
  104. package/dist/routing/builder.js +9 -2
  105. package/dist/routing/redirectOf.d.ts +3 -2
  106. package/dist/routing/redirectOf.js +16 -9
  107. package/dist/routing/registerGlobalData.d.ts +4 -3
  108. package/dist/routing/registerRouting.d.ts +2 -1
  109. package/dist/routing/resolveAppRoutes.js +10 -1
  110. package/dist/routing/routesArray.d.ts +3 -2
  111. package/dist/routing/routingBuilder.d.ts +2 -1
  112. package/dist/staticGen/staticGen.js +3 -11
  113. package/dist/style/styleContentSxy.js +8 -8
  114. package/dist/syncServer/preload.js +1 -1
  115. package/dist/testing/createTestApp.d.ts +1 -1
  116. package/dist/testing/ensure.d.ts +1 -1
  117. package/dist/testing/host.d.ts +4 -4
  118. package/dist/testing/hydrateTestApp.d.ts +1 -1
  119. package/dist/testing/loadEnv.js +1 -1
  120. package/dist/testing/pipeline/createTestPipelineApp.js +10 -10
  121. package/dist/testing/pipeline/hostPipeline.d.ts +4 -4
  122. package/dist/testing/pipeline/hydrateTestPipelineApp.js +3 -3
  123. package/dist/testing/pipeline/index.d.ts +2 -0
  124. package/dist/testing/pipeline/index.js +3 -1
  125. package/dist/testing/pipeline/routesOf.d.ts +14 -0
  126. package/dist/testing/pipeline/routesOf.js +19 -0
  127. package/dist/testing/pipeline/testingComponentPackageFromPacket.d.ts +11 -0
  128. package/dist/testing/pipeline/testingComponentPackageFromPacket.js +26 -0
  129. package/dist/testing/testingComponentPackage.d.ts +1 -0
  130. package/dist/testing/testingComponentPackage.js +2 -1
  131. package/dist-ti/AnyComponent.d.ts +7 -0
  132. package/dist-ti/AnyComponentType.d.ts +7 -0
  133. package/dist-ti/AppResponse.d.ts +9 -0
  134. package/dist-ti/AppTypeExtraction.d.ts +3 -0
  135. package/dist-ti/AssignedStyle.d.ts +6 -0
  136. package/dist-ti/Brands.d.ts +17 -0
  137. package/dist-ti/CjsTypes.d.ts +9 -0
  138. package/dist-ti/ComponentInstance.d.ts +3 -0
  139. package/dist-ti/ComponentRenderInfo.type.d.ts +7 -0
  140. package/dist-ti/ComponentStyle.d.ts +7 -0
  141. package/dist-ti/Components.d.ts +344 -0
  142. package/dist-ti/ContentFunction.d.ts +10 -0
  143. package/dist-ti/ContentNode.d.ts +95 -0
  144. package/dist-ti/ContentNodeNew.d.ts +3 -0
  145. package/dist-ti/CssNames.d.ts +10 -0
  146. package/dist-ti/DomNodes.d.ts +4 -0
  147. package/dist-ti/DomPointer.d.ts +24 -0
  148. package/dist-ti/DomRegion.d.ts +23 -0
  149. package/dist-ti/ExtendableHTMLElement.d.ts +6 -0
  150. package/dist-ti/Framework.d.ts +33 -0
  151. package/dist-ti/FrameworkConfig.d.ts +121 -0
  152. package/dist-ti/FunctionComponent.d.ts +14 -0
  153. package/dist-ti/FunctionComponentStandIn.d.ts +62 -0
  154. package/dist-ti/GenericObject.type.d.ts +3 -0
  155. package/dist-ti/HtmlElementAttributes.d.ts +3 -0
  156. package/dist-ti/Instance/ClientRuntimeContext.d.ts +9 -0
  157. package/dist-ti/Instance/Instance.d.ts +89 -0
  158. package/dist-ti/Instance/InstanceConfig.d.ts +14 -0
  159. package/dist-ti/IsDefined.d.ts +3 -0
  160. package/dist-ti/IsIndexableObject.d.ts +3 -0
  161. package/dist-ti/IsNumber.d.ts +3 -0
  162. package/dist-ti/IsObject.d.ts +4 -0
  163. package/dist-ti/Json.type.d.ts +8 -0
  164. package/dist-ti/JsxContent.d.ts +5 -0
  165. package/dist-ti/Key.d.ts +3 -0
  166. package/dist-ti/KeyAttr.d.ts +4 -0
  167. package/dist-ti/MapObject.d.ts +5 -0
  168. package/dist-ti/Mode.d.ts +3 -0
  169. package/dist-ti/Module.d.ts +6 -0
  170. package/dist-ti/NoDeproxy.d.ts +6 -0
  171. package/dist-ti/PopMessage.type.d.ts +7 -0
  172. package/dist-ti/ProcessedStylesObject.d.ts +7 -0
  173. package/dist-ti/RenderFunction.d.ts +4 -0
  174. package/dist-ti/RenderedContentNode.d.ts +83 -0
  175. package/dist-ti/RenderingNode.d.ts +58 -0
  176. package/dist-ti/ReqRes.d.ts +170 -0
  177. package/dist-ti/Sass.d.ts +7 -0
  178. package/dist-ti/Script.d.ts +9 -0
  179. package/dist-ti/ServerRpcFunction.type.d.ts +3 -0
  180. package/dist-ti/Servers/DevServer.d.ts +57 -0
  181. package/dist-ti/Servers/ProdServer.d.ts +38 -0
  182. package/dist-ti/Servers/ServerMiddleware.d.ts +7 -0
  183. package/dist-ti/Servers/StaticSiteServer.d.ts +15 -0
  184. package/dist-ti/Servers/TungstenServer.d.ts +43 -0
  185. package/dist-ti/Servers/cacheVersioned.d.ts +4 -0
  186. package/dist-ti/Servers/devErrorPageAutoRetry.d.ts +5 -0
  187. package/dist-ti/Servers/initStores.d.ts +17 -0
  188. package/dist-ti/Servers/listenVerified.d.ts +13 -0
  189. package/dist-ti/Servers/loadEnvsDev.d.ts +8 -0
  190. package/dist-ti/Servers/portError.d.ts +3 -0
  191. package/dist-ti/Servers/resetRegistrations.d.ts +3 -0
  192. package/dist-ti/Servers/routing.d.ts +7 -0
  193. package/dist-ti/Servers/serveStatic.d.ts +6 -0
  194. package/dist-ti/Servers/stubInstance.d.ts +9 -0
  195. package/dist-ti/Servers/tungstenCorePrivateEnvSchema.d.ts +8 -0
  196. package/dist-ti/Servers/tungstenCorePublicEnvSchema.d.ts +9 -0
  197. package/dist-ti/Servers/watchedServerMiddleware.d.ts +11 -0
  198. package/dist-ti/Store/BaseStoreSchema.d.ts +4 -0
  199. package/dist-ti/Store/InternalStoreSchema.d.ts +22 -0
  200. package/dist-ti/Store/ServerDataLoading.d.ts +5 -0
  201. package/dist-ti/Store/Store.d.ts +3 -0
  202. package/dist-ti/Store/StoreProxyInterface.d.ts +3 -0
  203. package/dist-ti/Store/StoreSchemaClass.d.ts +10 -0
  204. package/dist-ti/Store/StoreSubscriptions.types.d.ts +7 -0
  205. package/dist-ti/Store/TypeSafeStore.d.ts +3 -0
  206. package/dist-ti/Store/createStores.d.ts +9 -0
  207. package/dist-ti/Store/exportStore.d.ts +4 -0
  208. package/dist-ti/Store/getInternalStore.d.ts +5 -0
  209. package/dist-ti/Store/getStore.d.ts +3 -0
  210. package/dist-ti/Store/makeStore.d.ts +53 -0
  211. package/dist-ti/Store/registerStore.d.ts +13 -0
  212. package/dist-ti/Store/storeCreators.d.ts +4 -0
  213. package/dist-ti/StoreBindVariable.d.ts +4 -0
  214. package/dist-ti/StyleProcessor.d.ts +4 -0
  215. package/dist-ti/TElement.d.ts +3 -0
  216. package/dist-ti/TungstenApp.d.ts +27 -0
  217. package/dist-ti/TungstenAppOld.d.ts +3 -0
  218. package/dist-ti/TungstenElement.d.ts +4 -0
  219. package/dist-ti/TungstenError.d.ts +10 -0
  220. package/dist-ti/TungstenStyleObject.d.ts +3 -0
  221. package/dist-ti/__deproxy.d.ts +4 -0
  222. package/dist-ti/_client/RootComponent.d.ts +5 -0
  223. package/dist-ti/_client/cjsHelpers.d.ts +12 -0
  224. package/dist-ti/_client/client.d.ts +15 -0
  225. package/dist-ti/_client/hmr.d.ts +3 -0
  226. package/dist-ti/_client/liveReload.d.ts +3 -0
  227. package/dist-ti/_client/liveReloadSource.d.ts +4 -0
  228. package/dist-ti/_client/rootComponentRelFilePath.d.ts +3 -0
  229. package/dist-ti/_client/routes.d.ts +4 -0
  230. package/dist-ti/_testing/errorRoute.d.ts +9 -0
  231. package/dist-ti/_testing/regexEquals.d.ts +3 -0
  232. package/dist-ti/_testing/should.d.ts +3 -0
  233. package/dist-ti/_testing/sxy-test-runner.types.d.ts +6 -0
  234. package/dist-ti/alive.d.ts +4 -0
  235. package/dist-ti/api/ApiEndpoint.d.ts +4 -0
  236. package/dist-ti/api/ApiMethod.type.d.ts +3 -0
  237. package/dist-ti/api/ApiRoute.d.ts +8 -0
  238. package/dist-ti/api/ApiRoutes.d.ts +6 -0
  239. package/dist-ti/api/Request.d.ts +3 -0
  240. package/dist-ti/api/Response.d.ts +3 -0
  241. package/dist-ti/api/getApiRoutes.d.ts +7 -0
  242. package/dist-ti/api/getExport.d.ts +4 -0
  243. package/dist-ti/api/getExportDev.d.ts +3 -0
  244. package/dist-ti/appBuilder.d.ts +75 -0
  245. package/dist-ti/appOutput.d.ts +7 -0
  246. package/dist-ti/assert.d.ts +3 -0
  247. package/dist-ti/auth/checkPassword.d.ts +4 -0
  248. package/dist-ti/auth/hashPassword.d.ts +4 -0
  249. package/dist-ti/auth/index.d.ts +4 -0
  250. package/dist-ti/babelPlugins/BabelAddDevCacheBust.d.ts +19 -0
  251. package/dist-ti/babelPlugins/BabelExtractComponentStylesheet.d.ts +14 -0
  252. package/dist-ti/babelPlugins/BabelFakeType.d.ts +8 -0
  253. package/dist-ti/babelPlugins/BabelState.type.d.ts +4 -0
  254. package/dist-ti/babelPlugins/BabelTransformBindDirect.d.ts +16 -0
  255. package/dist-ti/babelPlugins/BabelTransformBindVar.d.ts +16 -0
  256. package/dist-ti/babelPlugins/BabelTransformCjsToEsm.d.ts +17 -0
  257. package/dist-ti/babelPlugins/BabelTransformCjsToFunction.d.ts +21 -0
  258. package/dist-ti/babelPlugins/BabelTransformCjsToFunction2.d.ts +22 -0
  259. package/dist-ti/babelPlugins/BabelTransformComponentState.d.ts +27 -0
  260. package/dist-ti/babelPlugins/BabelTransformComponentStyles.d.ts +38 -0
  261. package/dist-ti/babelPlugins/BabelTransformCssImports.d.ts +18 -0
  262. package/dist-ti/babelPlugins/BabelTransformDependencyImportsOld.d.ts +21 -0
  263. package/dist-ti/babelPlugins/BabelTransformDeproxyState.d.ts +23 -0
  264. package/dist-ti/babelPlugins/BabelTransformDocInit.d.ts +10 -0
  265. package/dist-ti/babelPlugins/BabelTransformJsxExtensionsToJs.d.ts +12 -0
  266. package/dist-ti/babelPlugins/BabelTransformJsxSignals.d.ts +3 -0
  267. package/dist-ti/babelPlugins/BabelTransformPackageImports.d.ts +89 -0
  268. package/dist-ti/babelPlugins/BabelTransformReactive.d.ts +16 -0
  269. package/dist-ti/babelPlugins/BabelTransformReactiveSvelteStyle.d.ts +11 -0
  270. package/dist-ti/babelPlugins/BabelTransformRemoveBlocks.d.ts +14 -0
  271. package/dist-ti/babelPlugins/BabelTransformRemoveDevBlocks.d.ts +11 -0
  272. package/dist-ti/babelPlugins/BabelTransformRemoveServerBlocks.d.ts +11 -0
  273. package/dist-ti/babelPlugins/BabelTransformRemoveServerCode.d.ts +3 -0
  274. package/dist-ti/babelPlugins/BabelTransformSxyFrameworkImports.d.ts +11 -0
  275. package/dist-ti/babelPlugins/BabelTransformSxyJsx.d.ts +3 -0
  276. package/dist-ti/babelPlugins/BabelTransformUniqueComponents.d.ts +11 -0
  277. package/dist-ti/babelPlugins/BabelTypes.d.ts +7 -0
  278. package/dist-ti/babelPlugins/StyleCompileError.d.ts +5 -0
  279. package/dist-ti/babelPlugins/fixImportsInSassErrorMessage.d.ts +9 -0
  280. package/dist-ti/babelPlugins/isBareImport.d.ts +3 -0
  281. package/dist-ti/babelPlugins/test.d.ts +3 -0
  282. package/dist-ti/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.d.ts +35 -0
  283. package/dist-ti/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.d.ts +35 -0
  284. package/dist-ti/babelPlugins/transformPackageImports/getWebLocationOfPackageFile.d.ts +3 -0
  285. package/dist-ti/babelPlugins/transformPackageImports/resolveBareImport.d.ts +3 -0
  286. package/dist-ti/bin/args.d.ts +12 -0
  287. package/dist-ti/bin/commands/build.d.ts +3 -0
  288. package/dist-ti/bin/commands/buildHelp.d.ts +3 -0
  289. package/dist-ti/bin/commands/clean.d.ts +3 -0
  290. package/dist-ti/bin/commands/compile.d.ts +3 -0
  291. package/dist-ti/bin/commands/compileSimplePackage.d.ts +3 -0
  292. package/dist-ti/bin/commands/dev.d.ts +3 -0
  293. package/dist-ti/bin/commands/devmon.d.ts +3 -0
  294. package/dist-ti/bin/commands/help.d.ts +3 -0
  295. package/dist-ti/bin/commands/speed.d.ts +3 -0
  296. package/dist-ti/bin/commands/start.d.ts +3 -0
  297. package/dist-ti/bin/commands/static.d.ts +3 -0
  298. package/dist-ti/bin/index.d.ts +3 -0
  299. package/dist-ti/bin/moduleLoadAnalysis.d.ts +3 -0
  300. package/dist-ti/bin/vendorHook.d.ts +4 -0
  301. package/dist-ti/booleanAttributeValue.d.ts +22 -0
  302. package/dist-ti/browserStorage.d.ts +65 -0
  303. package/dist-ti/build/BabelConfig.d.ts +6 -0
  304. package/dist-ti/build/CompilationInfo.d.ts +18 -0
  305. package/dist-ti/build/CompilationInfoFailure.d.ts +3 -0
  306. package/dist-ti/build/CompilationInfoSuccess.d.ts +3 -0
  307. package/dist-ti/build/Event.type.d.ts +3 -0
  308. package/dist-ti/build/ImportAliases.d.ts +5 -0
  309. package/dist-ti/build/PackageList.d.ts +3 -0
  310. package/dist-ti/build/PackagesCacheInfo.d.ts +3 -0
  311. package/dist-ti/build/ProcessPackageResult.d.ts +16 -0
  312. package/dist-ti/build/ProcessPackageResults.d.ts +4 -0
  313. package/dist-ti/build/PromiseSettledResultIsPromiseRejectedResult.d.ts +6 -0
  314. package/dist-ti/build/assetVersions.d.ts +10 -0
  315. package/dist-ti/build/babel.user.common.config.d.ts +11 -0
  316. package/dist-ti/build/bundle.d.ts +3 -0
  317. package/dist-ti/build/bundleBabelOptions.d.ts +6 -0
  318. package/dist-ti/build/clientModuleAliases.d.ts +3 -0
  319. package/dist-ti/build/clientRoutesFile.d.ts +3 -0
  320. package/dist-ti/build/combineComponentCss.d.ts +3 -0
  321. package/dist-ti/build/compileJavascript.d.ts +30 -0
  322. package/dist-ti/build/compileStyles.d.ts +5 -0
  323. package/dist-ti/build/compileUserApp.d.ts +7 -0
  324. package/dist-ti/build/componentStylesCache.d.ts +11 -0
  325. package/dist-ti/build/copyAssets.d.ts +4 -0
  326. package/dist-ti/build/copyPackageModulesToPackagesFolder.d.ts +5 -0
  327. package/dist-ti/build/copyPublicFiles.d.ts +4 -0
  328. package/dist-ti/build/createClientFiles.d.ts +5 -0
  329. package/dist-ti/build/createInstanceConfigFile.d.ts +5 -0
  330. package/dist-ti/build/createPackageVirtualFileSystem.d.ts +4 -0
  331. package/dist-ti/build/createPackageVirtualFileSystems.d.ts +4 -0
  332. package/dist-ti/build/customImportAliases.d.ts +5 -0
  333. package/dist-ti/build/customPackageEntryPoints.d.ts +7 -0
  334. package/dist-ti/build/devBundle.d.ts +3 -0
  335. package/dist-ti/build/devBundle.rollup.config.d.ts +7 -0
  336. package/dist-ti/build/findRequiredUserModules.d.ts +3 -0
  337. package/dist-ti/build/frameworkDestLocation.d.ts +4 -0
  338. package/dist-ti/build/frameworkStylesheets.d.ts +6 -0
  339. package/dist-ti/build/getAllSxyClientModules.d.ts +5 -0
  340. package/dist-ti/build/getPackageDirForFile.d.ts +3 -0
  341. package/dist-ti/build/getSxyClientPackageAliases.d.ts +4 -0
  342. package/dist-ti/build/getTempDirForAppCompilation.d.ts +4 -0
  343. package/dist-ti/build/ignoreGlobs.d.ts +3 -0
  344. package/dist-ti/build/internalAliases.d.ts +5 -0
  345. package/dist-ti/build/makeBabelRawConfig.d.ts +4 -0
  346. package/dist-ti/build/makeBabelUserDevConfig.d.ts +6 -0
  347. package/dist-ti/build/makeBabelUserProdConfig.d.ts +4 -0
  348. package/dist-ti/build/makeEnvJavascriptContent.d.ts +3 -0
  349. package/dist-ti/build/modifySassImports.d.ts +7 -0
  350. package/dist-ti/build/packageIdentifier.d.ts +7 -0
  351. package/dist-ti/build/processDataToLines.d.ts +3 -0
  352. package/dist-ti/build/resolveSassScssImports.d.ts +4 -0
  353. package/dist-ti/build/rollup.user.prod.config.d.ts +7 -0
  354. package/dist-ti/build/rollupExtractComponentStylesheets.d.ts +13 -0
  355. package/dist-ti/build/rollupProdConstants.d.ts +6 -0
  356. package/dist-ti/build/sassImportParser.d.ts +7 -0
  357. package/dist-ti/build/scssImportParserChatgpt.d.ts +7 -0
  358. package/dist-ti/build/tallyBabel.d.ts +4 -0
  359. package/dist-ti/cacheControl.d.ts +14 -0
  360. package/dist-ti/calculateImportedStaticFileLocations.d.ts +11 -0
  361. package/dist-ti/calledFrom.d.ts +8 -0
  362. package/dist-ti/checkedAttributeToBoolean.d.ts +3 -0
  363. package/dist-ti/checkedValueToBoolean.d.ts +3 -0
  364. package/dist-ti/cliOutput.d.ts +17 -0
  365. package/dist-ti/clone.d.ts +7 -0
  366. package/dist-ti/compat/context.d.ts +26 -0
  367. package/dist-ti/compat/forwardRef.d.ts +10 -0
  368. package/dist-ti/compat/index.d.ts +3 -0
  369. package/dist-ti/compat/propTypes.d.ts +18 -0
  370. package/dist-ti/compat/toTungstenClassComponent.d.ts +3 -0
  371. package/dist-ti/compat/toTungstenFunctionComponent.d.ts +3 -0
  372. package/dist-ti/compat/types.d.ts +17 -0
  373. package/dist-ti/componentClassName.d.ts +3 -0
  374. package/dist-ti/componentHelpers.d.ts +20 -0
  375. package/dist-ti/componentProxyHandlers.d.ts +39 -0
  376. package/dist-ti/componentType.d.ts +3 -0
  377. package/dist-ti/components/Await.d.ts +18 -0
  378. package/dist-ti/components/Fragment.d.ts +9 -0
  379. package/dist-ti/components/GoToComponent.d.ts +11 -0
  380. package/dist-ti/components/Lazy.d.ts +18 -0
  381. package/dist-ti/components/Link.d.ts +15 -0
  382. package/dist-ti/components/NativeHtml.d.ts +11 -0
  383. package/dist-ti/components/NoEscape.d.ts +9 -0
  384. package/dist-ti/components/PopMessages.d.ts +13 -0
  385. package/dist-ti/components/Protected.d.ts +11 -0
  386. package/dist-ti/components/RawHtml.d.ts +37 -0
  387. package/dist-ti/components/RouteRedirectComponent.d.ts +13 -0
  388. package/dist-ti/components/Stylesheet.d.ts +9 -0
  389. package/dist-ti/components/WebRedirectComponent.d.ts +12 -0
  390. package/dist-ti/components/_GoToComponent.d.ts +11 -0
  391. package/dist-ti/components/bindable/BindMode.d.ts +3 -0
  392. package/dist-ti/components/bindable/BindVariable.d.ts +37 -0
  393. package/dist-ti/components/bindable/BindableCheckbox.d.ts +26 -0
  394. package/dist-ti/components/bindable/BindableInput.d.ts +22 -0
  395. package/dist-ti/components/bindable/BindableInputNonString.d.ts +23 -0
  396. package/dist-ti/components/bindable/BindableInputString.d.ts +23 -0
  397. package/dist-ti/components/bindable/BindableInputTyped.d.ts +30 -0
  398. package/dist-ti/components/bindable/BindableInputTypedLegacy.d.ts +34 -0
  399. package/dist-ti/components/bindable/BindableRadio.d.ts +15 -0
  400. package/dist-ti/components/bindable/BindableSelect.d.ts +33 -0
  401. package/dist-ti/components/bindable/BindableSelectNaive.d.ts +3 -0
  402. package/dist-ti/components/bindable/BindableTextarea.d.ts +29 -0
  403. package/dist-ti/components/bindable/bindableCandidates.comparison.d.ts +142 -0
  404. package/dist-ti/components/bindable/bindableHtmlElements.d.ts +28 -0
  405. package/dist-ti/components/library/RichTextEditor/RichTextEditor.d.ts +52 -0
  406. package/dist-ti/components/library/RichTextEditor/StoredContentNode.d.ts +11 -0
  407. package/dist-ti/components/library/RichTextEditor/activeFormats.d.ts +21 -0
  408. package/dist-ti/components/library/RichTextEditor/contentTree.d.ts +31 -0
  409. package/dist-ti/components/library/RichTextEditor/sanitizeAuthoredHtml.d.ts +31 -0
  410. package/dist-ti/components/library/__StatefulMessage/MessageData.d.ts +8 -0
  411. package/dist-ti/components/library/__StatefulMessage/StatefulMessage.d.ts +23 -0
  412. package/dist-ti/components/library/index.d.ts +6 -0
  413. package/dist-ti/components/makeTypedLink.d.ts +10 -0
  414. package/dist-ti/concat.d.ts +3 -0
  415. package/dist-ti/contentNodeSymbols.d.ts +14 -0
  416. package/dist-ti/context/registerContext.d.ts +23 -0
  417. package/dist-ti/copy.d.ts +3 -0
  418. package/dist-ti/createElement.d.ts +3 -0
  419. package/dist-ti/createRef.d.ts +8 -0
  420. package/dist-ti/createRoutes.d.ts +4 -0
  421. package/dist-ti/defaultConfig.d.ts +5 -0
  422. package/dist-ti/deleteDirs.d.ts +3 -0
  423. package/dist-ti/devBanner.d.ts +5 -0
  424. package/dist-ti/docInit.d.ts +17 -0
  425. package/dist-ti/domNodeChecks.d.ts +4 -0
  426. package/dist-ti/env/Env.d.ts +3 -0
  427. package/dist-ti/env/Interfaces.d.ts +10 -0
  428. package/dist-ti/env/addToEnv.d.ts +3 -0
  429. package/dist-ti/env/droppedCoreEnvKeys.d.ts +6 -0
  430. package/dist-ti/env/funcs.d.ts +6 -0
  431. package/dist-ti/env/getEnvSchemas.d.ts +11 -0
  432. package/dist-ti/env/index.d.ts +3 -0
  433. package/dist-ti/env/privateEnv.d.ts +3 -0
  434. package/dist-ti/env/privateEnvOrThrow.d.ts +3 -0
  435. package/dist-ti/env/publicEnv.d.ts +3 -0
  436. package/dist-ti/env/publicEnvOrThrow.d.ts +3 -0
  437. package/dist-ti/env/registerEnvSchemas.d.ts +16 -0
  438. package/dist-ti/env/setPrivateEnvValidator.d.ts +9 -0
  439. package/dist-ti/env/setPublicEnvValidator.d.ts +9 -0
  440. package/dist-ti/env/test.d.ts +3 -0
  441. package/dist-ti/env/types.d.ts +4 -0
  442. package/dist-ti/env/windowGlobalEnvStatement.d.ts +3 -0
  443. package/dist-ti/experiments.d.ts +3 -0
  444. package/dist-ti/filePathFromUrl.d.ts +3 -0
  445. package/dist-ti/fileVersions.d.ts +10 -0
  446. package/dist-ti/findPackageDotJson.d.ts +3 -0
  447. package/dist-ti/findProjectDir.d.ts +6 -0
  448. package/dist-ti/findUserConfig.d.ts +7 -0
  449. package/dist-ti/fixExtension.d.ts +3 -0
  450. package/dist-ti/foreach.d.ts +8 -0
  451. package/dist-ti/frameworkConfigSchema.d.ts +107 -0
  452. package/dist-ti/getArrowFunctionBody.d.ts +3 -0
  453. package/dist-ti/getComponent.d.ts +5 -0
  454. package/dist-ti/getComponentDev.d.ts +4 -0
  455. package/dist-ti/getConfig.d.ts +3 -0
  456. package/dist-ti/getContentFromFunctionComponent.d.ts +4 -0
  457. package/dist-ti/getFrameworkDir.d.ts +3 -0
  458. package/dist-ti/getRoutes.d.ts +7 -0
  459. package/dist-ti/getRoutesDevs.d.ts +5 -0
  460. package/dist-ti/getStackTrace.d.ts +3 -0
  461. package/dist-ti/getStyledContentFromFunctionComponent.d.ts +4 -0
  462. package/dist-ti/getUserConfig.d.ts +4 -0
  463. package/dist-ti/glob.d.ts +6 -0
  464. package/dist-ti/globals.d.ts +3 -0
  465. package/dist-ti/goto.d.ts +3 -0
  466. package/dist-ti/hasDomain.d.ts +21 -0
  467. package/dist-ti/hasValidKey.d.ts +4 -0
  468. package/dist-ti/headChildren.d.ts +3 -0
  469. package/dist-ti/helpers/combineClassNames.d.ts +4 -0
  470. package/dist-ti/helpers/forwardingFetch.d.ts +4 -0
  471. package/dist-ti/helpers/getFetchCompatibleHeaders.d.ts +4 -0
  472. package/dist-ti/helpers/index.d.ts +6 -0
  473. package/dist-ti/helpers/perRequest.d.ts +4 -0
  474. package/dist-ti/hmr/applyHmrModule.d.ts +12 -0
  475. package/dist-ti/hmr/componentIdentity.d.ts +10 -0
  476. package/dist-ti/hmr/instanceRegistry.d.ts +5 -0
  477. package/dist-ti/hmr/liveReloadHub.d.ts +11 -0
  478. package/dist-ti/hmr/refreshStylesheets.d.ts +3 -0
  479. package/dist-ti/hooks/clearCurrentComponent.d.ts +3 -0
  480. package/dist-ti/hooks/getCurrentComponent.d.ts +8 -0
  481. package/dist-ti/hooks/globalObj.d.ts +3 -0
  482. package/dist-ti/hooks/globalType.d.ts +3 -0
  483. package/dist-ti/hooks/index.d.ts +7 -0
  484. package/dist-ti/hooks/setCurrentComponent.d.ts +4 -0
  485. package/dist-ti/hooks/shallowCompare.d.ts +3 -0
  486. package/dist-ti/hooks/useCallback.d.ts +3 -0
  487. package/dist-ti/hooks/useContext.d.ts +3 -0
  488. package/dist-ti/hooks/useEffect.d.ts +3 -0
  489. package/dist-ti/hooks/useInstance.d.ts +4 -0
  490. package/dist-ti/hooks/useMemo.d.ts +3 -0
  491. package/dist-ti/hooks/useReducer.d.ts +3 -0
  492. package/dist-ti/hooks/useRef.d.ts +5 -0
  493. package/dist-ti/hooks/useState.d.ts +4 -0
  494. package/dist-ti/htmlEntities.d.ts +3 -0
  495. package/dist-ti/htmlEventHandlerKey.d.ts +4 -0
  496. package/dist-ti/htmlEvents.d.ts +7 -0
  497. package/dist-ti/hydrate/hydrate.d.ts +21 -0
  498. package/dist-ti/hydrate/hydrateGlobalData.d.ts +14 -0
  499. package/dist-ti/hydrate/reconcileHydratedAttributes.d.ts +26 -0
  500. package/dist-ti/hydrate/renderHydrationMismatchBanner.d.ts +9 -0
  501. package/dist-ti/hydrate/stubRouting.d.ts +10 -0
  502. package/dist-ti/importDevModuleWithRetry.d.ts +5 -0
  503. package/dist-ti/importModule.d.ts +4 -0
  504. package/dist-ti/index.d.ts +5 -0
  505. package/dist-ti/indexInner.d.ts +116 -0
  506. package/dist-ti/info.d.ts +3 -0
  507. package/dist-ti/innerHtmlFromProps.d.ts +19 -0
  508. package/dist-ti/isBrowser.d.ts +3 -0
  509. package/dist-ti/isClient.d.ts +3 -0
  510. package/dist-ti/isDev.d.ts +4 -0
  511. package/dist-ti/isProd.d.ts +3 -0
  512. package/dist-ti/isServer.d.ts +3 -0
  513. package/dist-ti/iterationQueryString.d.ts +3 -0
  514. package/dist-ti/json.d.ts +17 -0
  515. package/dist-ti/jsx-runtime.d.ts +3 -0
  516. package/dist-ti/jsxHelpers.d.ts +4 -0
  517. package/dist-ti/jsxRuntime.d.ts +11 -0
  518. package/dist-ti/jsxRuntimeSignals.d.ts +23 -0
  519. package/dist-ti/loadPackageDotJsonFromDir.d.ts +4 -0
  520. package/dist-ti/logAndReturn.d.ts +4 -0
  521. package/dist-ti/makeFinalConfig.d.ts +4 -0
  522. package/dist-ti/makeInstanceConfigFromFrameworkConfig.d.ts +5 -0
  523. package/dist-ti/makeServerRpc.d.ts +8 -0
  524. package/dist-ti/markOptionSelected.d.ts +18 -0
  525. package/dist-ti/mergeConfigs.d.ts +4 -0
  526. package/dist-ti/moduleReloader.d.ts +3 -0
  527. package/dist-ti/mutatingFunctions.d.ts +13 -0
  528. package/dist-ti/nbsp.d.ts +3 -0
  529. package/dist-ti/objectMap.d.ts +4 -0
  530. package/dist-ti/objectTypesToCopy.d.ts +3 -0
  531. package/dist-ti/objectTypesToProxy.d.ts +3 -0
  532. package/dist-ti/output.d.ts +7 -0
  533. package/dist-ti/packageSettings.d.ts +3 -0
  534. package/dist-ti/pipeLog.d.ts +3 -0
  535. package/dist-ti/pipeline/contextStore.d.ts +13 -0
  536. package/dist-ti/pipeline/hydratePipeline.d.ts +5 -0
  537. package/dist-ti/pipeline/importRoutesModule.d.ts +7 -0
  538. package/dist-ti/pipeline/networkedTransport.d.ts +12 -0
  539. package/dist-ti/pipeline/pipeline.d.ts +124 -0
  540. package/dist-ti/pipeline/pipelineDefinition.d.ts +87 -0
  541. package/dist-ti/pipeline/runPipeline.d.ts +40 -0
  542. package/dist-ti/pipeline/runSplitPipeline.d.ts +11 -0
  543. package/dist-ti/pipeline/settleRouting.d.ts +11 -0
  544. package/dist-ti/pipeline/splitPipeline.d.ts +66 -0
  545. package/dist-ti/pop.d.ts +11 -0
  546. package/dist-ti/possibleEnvFiles.d.ts +3 -0
  547. package/dist-ti/postcssPlugins/TransformCssNames.d.ts +16 -0
  548. package/dist-ti/postcssPlugins/parseSelectors.d.ts +3 -0
  549. package/dist-ti/postcssPlugins/parseSelectorsRich.d.ts +9 -0
  550. package/dist-ti/postcssPlugins/scopeAnimationValue.d.ts +3 -0
  551. package/dist-ti/postcssPlugins/splitCssValue.d.ts +3 -0
  552. package/dist-ti/postcssPlugins/unwrapIgnoreMarker.d.ts +3 -0
  553. package/dist-ti/promise.d.ts +3 -0
  554. package/dist-ti/propsAreEqual.d.ts +9 -0
  555. package/dist-ti/rawHtml/HtmlAllowList.d.ts +18 -0
  556. package/dist-ti/rawHtml/decodeHtmlEntities.d.ts +9 -0
  557. package/dist-ti/rawHtml/filterContentNode.d.ts +21 -0
  558. package/dist-ti/rawHtml/htmlParsingTags.d.ts +24 -0
  559. package/dist-ti/rawHtml/parseHtml.d.ts +50 -0
  560. package/dist-ti/rawHtml/safeHtmlAllowList.d.ts +19 -0
  561. package/dist-ti/rawHtml/sanitizeHtml.d.ts +18 -0
  562. package/dist-ti/rawHtml/tokenizeHtml.d.ts +26 -0
  563. package/dist-ti/reRouting/addRequireResolveHooks.d.ts +3 -0
  564. package/dist-ti/reRouting/importLoader.d.ts +8 -0
  565. package/dist-ti/ref.d.ts +3 -0
  566. package/dist-ti/regexEscape.d.ts +3 -0
  567. package/dist-ti/removeRecursive.d.ts +3 -0
  568. package/dist-ti/render/HeadData.d.ts +22 -0
  569. package/dist-ti/render/SxyFrameworkModule.d.ts +6 -0
  570. package/dist-ti/render/SxyFrameworkModules.d.ts +4 -0
  571. package/dist-ti/render/addImportMap.d.ts +5 -0
  572. package/dist-ti/render/classComponentNodeToRenderingTree.d.ts +7 -0
  573. package/dist-ti/render/componentNodeToRenderingTree.d.ts +7 -0
  574. package/dist-ti/render/contentNodeToHtml.d.ts +19 -0
  575. package/dist-ti/render/contentToHtml.d.ts +10 -0
  576. package/dist-ti/render/contentToHtmlDev.d.ts +10 -0
  577. package/dist-ti/render/contentTreeToRenderingTree.d.ts +7 -0
  578. package/dist-ti/render/debug.d.ts +3 -0
  579. package/dist-ti/render/functionComponentNodeToRenderingTree.d.ts +7 -0
  580. package/dist-ti/render/getFunctionBodyAsString.d.ts +4 -0
  581. package/dist-ti/render/htmlMonoTags.d.ts +7 -0
  582. package/dist-ti/render/htmlNoSelfCloseTags.d.ts +28 -0
  583. package/dist-ti/render/htmlSelfClosableTags.d.ts +7 -0
  584. package/dist-ti/render/htmlSingleOnlyTags.d.ts +9 -0
  585. package/dist-ti/render/htmlVoidTags.d.ts +20 -0
  586. package/dist-ti/render/instantiateClassComponent.d.ts +6 -0
  587. package/dist-ti/render/instantiateComponent.d.ts +6 -0
  588. package/dist-ti/render/instantiateFunctionComponent.d.ts +7 -0
  589. package/dist-ti/render/printComponentNameInSource.d.ts +3 -0
  590. package/dist-ti/render/processBody.d.ts +3 -0
  591. package/dist-ti/render/processHead.d.ts +5 -0
  592. package/dist-ti/render/processHtmlNode.d.ts +4 -0
  593. package/dist-ti/render/processProps.d.ts +3 -0
  594. package/dist-ti/render/processRenderingNodeHtml.d.ts +4 -0
  595. package/dist-ti/render/readDocInitScript.d.ts +4 -0
  596. package/dist-ti/render/renderingTreeToHtml.d.ts +5 -0
  597. package/dist-ti/render/rootToHtml.d.ts +10 -0
  598. package/dist-ti/render/rootToHtmlDev.d.ts +10 -0
  599. package/dist-ti/requests/axios/get.d.ts +3 -0
  600. package/dist-ti/requests/axios/post.d.ts +3 -0
  601. package/dist-ti/requests/fetch/FetchExtras.d.ts +32 -0
  602. package/dist-ti/requests/fetch/_fetchPromise.d.ts +3 -0
  603. package/dist-ti/requests/fetch/delete.d.ts +4 -0
  604. package/dist-ti/requests/fetch/get.d.ts +4 -0
  605. package/dist-ti/requests/fetch/mergeFetchInit.d.ts +3 -0
  606. package/dist-ti/requests/fetch/paramsObjectToParamsString.d.ts +3 -0
  607. package/dist-ti/requests/fetch/patch.d.ts +4 -0
  608. package/dist-ti/requests/fetch/post.d.ts +4 -0
  609. package/dist-ti/requests/fetch/put.d.ts +4 -0
  610. package/dist-ti/requests/index.d.ts +7 -0
  611. package/dist-ti/routesLocationParts.d.ts +7 -0
  612. package/dist-ti/routing/AppRoutes.d.ts +7 -0
  613. package/dist-ti/routing/DataRedirect.d.ts +5 -0
  614. package/dist-ti/routing/Default404.d.ts +6 -0
  615. package/dist-ti/routing/ErrorRouteType.d.ts +9 -0
  616. package/dist-ti/routing/Group.d.ts +13 -0
  617. package/dist-ti/routing/Match.type.d.ts +18 -0
  618. package/dist-ti/routing/MatchedRoute.d.ts +15 -0
  619. package/dist-ti/routing/MatchedRouteInfo.d.ts +14 -0
  620. package/dist-ti/routing/Params.d.ts +3 -0
  621. package/dist-ti/routing/ParamsFromPath.d.ts +11 -0
  622. package/dist-ti/routing/RedirectCode.d.ts +3 -0
  623. package/dist-ti/routing/Route.d.ts +3 -0
  624. package/dist-ti/routing/RouteContent.d.ts +5 -0
  625. package/dist-ti/routing/RouteContentFunction.d.ts +6 -0
  626. package/dist-ti/routing/RouteData.d.ts +3 -0
  627. package/dist-ti/routing/RouteDataFunction.type.d.ts +9 -0
  628. package/dist-ti/routing/RouteDataReturnType.d.ts +12 -0
  629. package/dist-ti/routing/RouteParams.type.d.ts +3 -0
  630. package/dist-ti/routing/RoutePaths.d.ts +13 -0
  631. package/dist-ti/routing/RouteProp.d.ts +11 -0
  632. package/dist-ti/routing/RouteType.d.ts +3 -0
  633. package/dist-ti/routing/RouteTypes.d.ts +20 -0
  634. package/dist-ti/routing/Router.d.ts +3 -0
  635. package/dist-ti/routing/Routes.d.ts +39 -0
  636. package/dist-ti/routing/RoutesFunction.d.ts +14 -0
  637. package/dist-ti/routing/RoutesWithSafeParams.d.ts +3 -0
  638. package/dist-ti/routing/RoutingRedirect.d.ts +9 -0
  639. package/dist-ti/routing/Serializable.d.ts +6 -0
  640. package/dist-ti/routing/TungstenErrorInfo.d.ts +7 -0
  641. package/dist-ti/routing/WebRedirect.d.ts +9 -0
  642. package/dist-ti/routing/builder.d.ts +131 -0
  643. package/dist-ti/routing/builder.trial.d.ts +3 -0
  644. package/dist-ti/routing/compareRequestToRegex.d.ts +10 -0
  645. package/dist-ti/routing/debug.d.ts +3 -0
  646. package/dist-ti/routing/defineRoutes.d.ts +9 -0
  647. package/dist-ti/routing/getPathPriority.d.ts +3 -0
  648. package/dist-ti/routing/matchPath.d.ts +4 -0
  649. package/dist-ti/routing/patternToRegex.d.ts +6 -0
  650. package/dist-ti/routing/pyramidRouting.d.ts +3 -0
  651. package/dist-ti/routing/redirectOf.d.ts +13 -0
  652. package/dist-ti/routing/registerGlobalData.d.ts +19 -0
  653. package/dist-ti/routing/registerRoutes.d.ts +11 -0
  654. package/dist-ti/routing/registerRouting.d.ts +38 -0
  655. package/dist-ti/routing/registrationTypes.d.ts +12 -0
  656. package/dist-ti/routing/resolveAppRoutes.d.ts +6 -0
  657. package/dist-ti/routing/routeSymbols.d.ts +10 -0
  658. package/dist-ti/routing/routeUrl.d.ts +9 -0
  659. package/dist-ti/routing/routesArray.d.ts +31 -0
  660. package/dist-ti/routing/routingBuilder.d.ts +36 -0
  661. package/dist-ti/routing/routingRegistry.d.ts +20 -0
  662. package/dist-ti/routing/runContentFunction.d.ts +3 -0
  663. package/dist-ti/routing/splitRequest.d.ts +18 -0
  664. package/dist-ti/run.d.ts +3 -0
  665. package/dist-ti/server.d.ts +5 -0
  666. package/dist-ti/serverModuleLocation.d.ts +4 -0
  667. package/dist-ti/serverRpc.d.ts +3 -0
  668. package/dist-ti/serverRpcs.d.ts +4 -0
  669. package/dist-ti/settings.d.ts +34 -0
  670. package/dist-ti/signals/tracking.d.ts +34 -0
  671. package/dist-ti/slash.d.ts +3 -0
  672. package/dist-ti/spawnShellCommand.d.ts +4 -0
  673. package/dist-ti/standardSchema.d.ts +38 -0
  674. package/dist-ti/standardizeWebPath.d.ts +3 -0
  675. package/dist-ti/startDevServer.d.ts +3 -0
  676. package/dist-ti/stateTracking.d.ts +48 -0
  677. package/dist-ti/staticGen/RouteDefinition.d.ts +9 -0
  678. package/dist-ti/staticGen/getAppRoutes.d.ts +6 -0
  679. package/dist-ti/staticGen/staticGen.d.ts +4 -0
  680. package/dist-ti/staticGen/staticGenFunctions.d.ts +7 -0
  681. package/dist-ti/style/jssToCss.d.ts +3 -0
  682. package/dist-ti/style/styleContent.d.ts +4 -0
  683. package/dist-ti/style/styleContentReact.d.ts +3 -0
  684. package/dist-ti/style/styleContentReactClassOrClassname.d.ts +3 -0
  685. package/dist-ti/style/styleContentSxy.d.ts +5 -0
  686. package/dist-ti/style/styleContentSxyClassOrClassname.d.ts +3 -0
  687. package/dist-ti/style/styleElementContent.d.ts +3 -0
  688. package/dist-ti/style/unusedStyles.d.ts +10 -0
  689. package/dist-ti/styleProcessors.d.ts +3 -0
  690. package/dist-ti/symbols.d.ts +4 -0
  691. package/dist-ti/sync/index.d.ts +5 -0
  692. package/dist-ti/syncServer/preload.d.ts +3 -0
  693. package/dist-ti/testing/contentToString.d.ts +14 -0
  694. package/dist-ti/testing/createTestApp.d.ts +72 -0
  695. package/dist-ti/testing/display.d.ts +3 -0
  696. package/dist-ti/testing/ensure.d.ts +120 -0
  697. package/dist-ti/testing/ensure.trial.d.ts +3 -0
  698. package/dist-ti/testing/helpers/contentHtmlElements.d.ts +4 -0
  699. package/dist-ti/testing/host.d.ts +189 -0
  700. package/dist-ti/testing/hydrateTestApp.d.ts +57 -0
  701. package/dist-ti/testing/index.d.ts +12 -0
  702. package/dist-ti/testing/installTestDocInit.d.ts +3 -0
  703. package/dist-ti/testing/installTestStyleProcessors.d.ts +3 -0
  704. package/dist-ti/testing/loadEnv.d.ts +7 -0
  705. package/dist-ti/testing/normalize.d.ts +3 -0
  706. package/dist-ti/testing/pipeline/createTestPacketApp.d.ts +31 -0
  707. package/dist-ti/testing/pipeline/createTestPipelineApp.d.ts +71 -0
  708. package/dist-ti/testing/pipeline/hostPipeline.d.ts +26 -0
  709. package/dist-ti/testing/pipeline/hydrateTestPipelineApp.d.ts +31 -0
  710. package/dist-ti/testing/pipeline/index.d.ts +8 -0
  711. package/dist-ti/testing/pipeline/pipelineTestApp.d.ts +35 -0
  712. package/dist-ti/testing/pipeline/routesOf.d.ts +15 -0
  713. package/dist-ti/testing/pipeline/testPipelineRoute.d.ts +3 -0
  714. package/dist-ti/testing/pipeline/testingComponentPackageFromPacket.d.ts +12 -0
  715. package/dist-ti/testing/resolveContent.d.ts +19 -0
  716. package/dist-ti/testing/testEnvIsRequested.d.ts +4 -0
  717. package/dist-ti/testing/testingComponentPackage.d.ts +36 -0
  718. package/dist-ti/throwError.d.ts +5 -0
  719. package/dist-ti/timeProfiler.d.ts +17 -0
  720. package/dist-ti/todo.d.ts +3 -0
  721. package/dist-ti/update/UpdateResult.d.ts +7 -0
  722. package/dist-ti/update/UpdateScheduler.d.ts +18 -0
  723. package/dist-ti/update/guardedUpdate.d.ts +10 -0
  724. package/dist-ti/update/integrateUpdateVdom.d.ts +50 -0
  725. package/dist-ti/update/integrateUpdateVdomPrebuild.d.ts +3 -0
  726. package/dist-ti/update/pendingMounts.d.ts +26 -0
  727. package/dist-ti/validChildren.d.ts +6 -0
  728. package/dist-ti/warnOnFrameworkChange.d.ts +3 -0
  729. package/dist-ti/watch.d.ts +10 -0
  730. package/dist-ti/when.d.ts +4 -0
  731. package/dist-ti/zones/react.d.ts +54 -0
  732. package/package.json +80 -13
  733. package/types/globals.d.ts +65 -0
  734. package/types/helpers.d.ts +2 -1
  735. package/types/index.d.ts +2 -57
  736. package/types-ti/helpers.d.ts +0 -0
  737. package/types-ti/index.d.ts +12 -0
  738. package/types-ti/permissions.d.ts +39 -0
  739. package/vendor/manifest.json +2 -2
  740. package/dist/AnyComponent.d.ts.map +0 -1
  741. package/dist/AnyComponentType.d.ts.map +0 -1
  742. package/dist/AppResponse.d.ts.map +0 -1
  743. package/dist/AppTypeExtraction.d.ts.map +0 -1
  744. package/dist/AssignedStyle.d.ts.map +0 -1
  745. package/dist/Brands.d.ts.map +0 -1
  746. package/dist/CjsTypes.d.ts.map +0 -1
  747. package/dist/ComponentInstance.d.ts.map +0 -1
  748. package/dist/ComponentRenderInfo.type.d.ts.map +0 -1
  749. package/dist/ComponentStyle.d.ts.map +0 -1
  750. package/dist/Components.d.ts.map +0 -1
  751. package/dist/ContentFunction.d.ts.map +0 -1
  752. package/dist/ContentNode.d.ts.map +0 -1
  753. package/dist/ContentNodeNew.d.ts.map +0 -1
  754. package/dist/CssNames.d.ts.map +0 -1
  755. package/dist/DomNodes.d.ts.map +0 -1
  756. package/dist/DomPointer.d.ts.map +0 -1
  757. package/dist/DomRegion.d.ts.map +0 -1
  758. package/dist/ExtendableHTMLElement.d.ts.map +0 -1
  759. package/dist/Framework.d.ts.map +0 -1
  760. package/dist/FrameworkConfig.d.ts.map +0 -1
  761. package/dist/FrameworkConfig.types.test.d.ts +0 -2
  762. package/dist/FrameworkConfig.types.test.d.ts.map +0 -1
  763. package/dist/FrameworkConfig.types.test.js +0 -6
  764. package/dist/FunctionComponent.d.ts.map +0 -1
  765. package/dist/FunctionComponentStandIn.d.ts.map +0 -1
  766. package/dist/GenericObject.type.d.ts.map +0 -1
  767. package/dist/HtmlElementAttributes.d.ts.map +0 -1
  768. package/dist/Instance/ClientRuntimeContext.d.ts.map +0 -1
  769. package/dist/Instance/Instance.d.ts.map +0 -1
  770. package/dist/Instance/InstanceConfig.d.ts.map +0 -1
  771. package/dist/IsDefined.d.ts.map +0 -1
  772. package/dist/IsIndexableObject.d.ts.map +0 -1
  773. package/dist/IsNumber.d.ts.map +0 -1
  774. package/dist/IsObject.d.ts.map +0 -1
  775. package/dist/Json.type.d.ts.map +0 -1
  776. package/dist/JsxContent.d.ts.map +0 -1
  777. package/dist/Key.d.ts.map +0 -1
  778. package/dist/KeyAttr.d.ts.map +0 -1
  779. package/dist/MapObject.d.ts.map +0 -1
  780. package/dist/Mode.d.ts.map +0 -1
  781. package/dist/Module.d.ts.map +0 -1
  782. package/dist/NoDeproxy.d.ts.map +0 -1
  783. package/dist/PopMessage.type.d.ts.map +0 -1
  784. package/dist/ProcessedStylesObject.d.ts.map +0 -1
  785. package/dist/RenderFunction.d.ts.map +0 -1
  786. package/dist/RenderedContentNode.d.ts.map +0 -1
  787. package/dist/RenderingNode.d.ts.map +0 -1
  788. package/dist/ReqRes.d.ts.map +0 -1
  789. package/dist/Sass.d.ts.map +0 -1
  790. package/dist/Script.d.ts.map +0 -1
  791. package/dist/ServerRpcFunction.type.d.ts.map +0 -1
  792. package/dist/Servers/DevServer.d.ts.map +0 -1
  793. package/dist/Servers/ProdServer.d.ts.map +0 -1
  794. package/dist/Servers/ServerMiddleware.d.ts.map +0 -1
  795. package/dist/Servers/StaticSiteServer.d.ts.map +0 -1
  796. package/dist/Servers/TungstenServer.d.ts.map +0 -1
  797. package/dist/Servers/cacheVersioned.d.ts.map +0 -1
  798. package/dist/Servers/devErrorPageAutoRetry.d.ts.map +0 -1
  799. package/dist/Servers/initStores.d.ts.map +0 -1
  800. package/dist/Servers/listenVerified.d.ts.map +0 -1
  801. package/dist/Servers/loadEnvsDev.d.ts.map +0 -1
  802. package/dist/Servers/portError.d.ts.map +0 -1
  803. package/dist/Servers/resetRegistrations.d.ts.map +0 -1
  804. package/dist/Servers/routing.d.ts.map +0 -1
  805. package/dist/Servers/serveStatic.d.ts.map +0 -1
  806. package/dist/Servers/stubInstance.d.ts.map +0 -1
  807. package/dist/Servers/tungstenCorePrivateEnvSchema.d.ts.map +0 -1
  808. package/dist/Servers/tungstenCorePublicEnvSchema.d.ts.map +0 -1
  809. package/dist/Store/BaseStoreSchema.d.ts.map +0 -1
  810. package/dist/Store/InternalStoreSchema.d.ts.map +0 -1
  811. package/dist/Store/ServerDataLoading.d.ts.map +0 -1
  812. package/dist/Store/Store.d.ts.map +0 -1
  813. package/dist/Store/StoreProxyInterface.d.ts.map +0 -1
  814. package/dist/Store/StoreSchemaClass.d.ts.map +0 -1
  815. package/dist/Store/StoreSubscriptions.types.d.ts.map +0 -1
  816. package/dist/Store/TypeSafeStore.d.ts.map +0 -1
  817. package/dist/Store/createStores.d.ts.map +0 -1
  818. package/dist/Store/exportStore.d.ts.map +0 -1
  819. package/dist/Store/getInternalStore.d.ts.map +0 -1
  820. package/dist/Store/getStore.d.ts.map +0 -1
  821. package/dist/Store/makeStore.d.ts.map +0 -1
  822. package/dist/Store/registerStore.d.ts.map +0 -1
  823. package/dist/Store/storeCreators.d.ts.map +0 -1
  824. package/dist/StoreBindVariable.d.ts.map +0 -1
  825. package/dist/StyleProcessor.d.ts.map +0 -1
  826. package/dist/TElement.d.ts.map +0 -1
  827. package/dist/TungstenApp.d.ts.map +0 -1
  828. package/dist/TungstenAppOld.d.ts.map +0 -1
  829. package/dist/TungstenElement.d.ts.map +0 -1
  830. package/dist/TungstenError.d.ts.map +0 -1
  831. package/dist/TungstenStyleObject.d.ts.map +0 -1
  832. package/dist/__deproxy.d.ts.map +0 -1
  833. package/dist/_client/RootComponent.d.ts.map +0 -1
  834. package/dist/_client/cjsHelpers.d.ts.map +0 -1
  835. package/dist/_client/client.d.ts.map +0 -1
  836. package/dist/_client/hmr.d.ts.map +0 -1
  837. package/dist/_client/liveReload.d.ts.map +0 -1
  838. package/dist/_client/liveReloadSource.d.ts.map +0 -1
  839. package/dist/_client/rootComponentRelFilePath.d.ts.map +0 -1
  840. package/dist/_client/routes.d.ts.map +0 -1
  841. package/dist/_testing/regexEquals.d.ts.map +0 -1
  842. package/dist/_testing/should.d.ts.map +0 -1
  843. package/dist/_testing/sxy-test-runner.types.d.ts.map +0 -1
  844. package/dist/alive.d.ts.map +0 -1
  845. package/dist/api/ApiEndpoint.d.ts.map +0 -1
  846. package/dist/api/ApiMethod.type.d.ts.map +0 -1
  847. package/dist/api/ApiRoute.d.ts.map +0 -1
  848. package/dist/api/ApiRoutes.d.ts.map +0 -1
  849. package/dist/api/Request.d.ts.map +0 -1
  850. package/dist/api/Response.d.ts.map +0 -1
  851. package/dist/api/getApiRoutes.d.ts.map +0 -1
  852. package/dist/api/getExport.d.ts.map +0 -1
  853. package/dist/api/getExportDev.d.ts.map +0 -1
  854. package/dist/appBuilder.d.ts.map +0 -1
  855. package/dist/appBuilder.types.test.d.ts +0 -110
  856. package/dist/appBuilder.types.test.d.ts.map +0 -1
  857. package/dist/appBuilder.types.test.js +0 -240
  858. package/dist/appOutput.d.ts.map +0 -1
  859. package/dist/assert.d.ts.map +0 -1
  860. package/dist/auth/checkPassword.d.ts.map +0 -1
  861. package/dist/auth/hashPassword.d.ts.map +0 -1
  862. package/dist/auth/index.d.ts.map +0 -1
  863. package/dist/babelPlugins/BabelAddDevCacheBust.d.ts.map +0 -1
  864. package/dist/babelPlugins/BabelExtractComponentStylesheet.d.ts.map +0 -1
  865. package/dist/babelPlugins/BabelFakeType.d.ts.map +0 -1
  866. package/dist/babelPlugins/BabelState.type.d.ts.map +0 -1
  867. package/dist/babelPlugins/BabelTransformBindDirect.d.ts.map +0 -1
  868. package/dist/babelPlugins/BabelTransformBindVar.d.ts.map +0 -1
  869. package/dist/babelPlugins/BabelTransformCjsToEsm.d.ts.map +0 -1
  870. package/dist/babelPlugins/BabelTransformCjsToFunction.d.ts.map +0 -1
  871. package/dist/babelPlugins/BabelTransformCjsToFunction2.d.ts.map +0 -1
  872. package/dist/babelPlugins/BabelTransformComponentState.d.ts.map +0 -1
  873. package/dist/babelPlugins/BabelTransformComponentStyles.d.ts.map +0 -1
  874. package/dist/babelPlugins/BabelTransformCssImports.d.ts.map +0 -1
  875. package/dist/babelPlugins/BabelTransformDependencyImportsOld.d.ts.map +0 -1
  876. package/dist/babelPlugins/BabelTransformDeproxyState.d.ts.map +0 -1
  877. package/dist/babelPlugins/BabelTransformDocInit.d.ts.map +0 -1
  878. package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.d.ts.map +0 -1
  879. package/dist/babelPlugins/BabelTransformJsxSignals.d.ts.map +0 -1
  880. package/dist/babelPlugins/BabelTransformPackageImports.d.ts.map +0 -1
  881. package/dist/babelPlugins/BabelTransformReactive.d.ts.map +0 -1
  882. package/dist/babelPlugins/BabelTransformReactiveSvelteStyle.d.ts.map +0 -1
  883. package/dist/babelPlugins/BabelTransformRemoveBlocks.d.ts.map +0 -1
  884. package/dist/babelPlugins/BabelTransformRemoveDevBlocks.d.ts.map +0 -1
  885. package/dist/babelPlugins/BabelTransformRemoveServerBlocks.d.ts.map +0 -1
  886. package/dist/babelPlugins/BabelTransformRemoveServerCode.d.ts.map +0 -1
  887. package/dist/babelPlugins/BabelTransformSxyFrameworkImports.d.ts.map +0 -1
  888. package/dist/babelPlugins/BabelTransformSxyJsx.d.ts.map +0 -1
  889. package/dist/babelPlugins/BabelTransformUniqueComponents.d.ts.map +0 -1
  890. package/dist/babelPlugins/BabelTypes.d.ts.map +0 -1
  891. package/dist/babelPlugins/fixImportsInSassErrorMessage.d.ts.map +0 -1
  892. package/dist/babelPlugins/isBareImport.d.ts.map +0 -1
  893. package/dist/babelPlugins/test.d.ts.map +0 -1
  894. package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.d.ts.map +0 -1
  895. package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.d.ts.map +0 -1
  896. package/dist/babelPlugins/transformPackageImports/getWebLocationOfPackageFile.d.ts.map +0 -1
  897. package/dist/babelPlugins/transformPackageImports/resolveBareImport.d.ts.map +0 -1
  898. package/dist/bin/args.d.ts.map +0 -1
  899. package/dist/bin/commands/build.d.ts.map +0 -1
  900. package/dist/bin/commands/buildHelp.d.ts.map +0 -1
  901. package/dist/bin/commands/clean.d.ts.map +0 -1
  902. package/dist/bin/commands/compile.d.ts.map +0 -1
  903. package/dist/bin/commands/compileSimplePackage.d.ts.map +0 -1
  904. package/dist/bin/commands/dev.d.ts.map +0 -1
  905. package/dist/bin/commands/devmon.d.ts.map +0 -1
  906. package/dist/bin/commands/help.d.ts.map +0 -1
  907. package/dist/bin/commands/speed.d.ts.map +0 -1
  908. package/dist/bin/commands/start.d.ts.map +0 -1
  909. package/dist/bin/commands/static.d.ts.map +0 -1
  910. package/dist/bin/index.d.ts.map +0 -1
  911. package/dist/bin/moduleLoadAnalysis.d.ts.map +0 -1
  912. package/dist/bin/vendorHook.d.ts.map +0 -1
  913. package/dist/booleanAttributeValue.d.ts.map +0 -1
  914. package/dist/browserStorage.d.ts.map +0 -1
  915. package/dist/build/BabelConfig.d.ts.map +0 -1
  916. package/dist/build/CompilationInfo.d.ts.map +0 -1
  917. package/dist/build/CompilationInfoFailure.d.ts.map +0 -1
  918. package/dist/build/CompilationInfoSuccess.d.ts.map +0 -1
  919. package/dist/build/Event.type.d.ts.map +0 -1
  920. package/dist/build/ImportAliases.d.ts.map +0 -1
  921. package/dist/build/PackageList.d.ts.map +0 -1
  922. package/dist/build/PackagesCacheInfo.d.ts.map +0 -1
  923. package/dist/build/ProcessPackageResult.d.ts.map +0 -1
  924. package/dist/build/ProcessPackageResults.d.ts.map +0 -1
  925. package/dist/build/PromiseSettledResultIsPromiseRejectedResult.d.ts.map +0 -1
  926. package/dist/build/assetVersions.d.ts.map +0 -1
  927. package/dist/build/babel.user.common.config.d.ts.map +0 -1
  928. package/dist/build/bundle.d.ts.map +0 -1
  929. package/dist/build/bundleBabelOptions.d.ts.map +0 -1
  930. package/dist/build/clientModuleAliases.d.ts.map +0 -1
  931. package/dist/build/clientRoutesFile.d.ts.map +0 -1
  932. package/dist/build/combineComponentCss.d.ts.map +0 -1
  933. package/dist/build/compileJavascript.d.ts.map +0 -1
  934. package/dist/build/compileStyles.d.ts.map +0 -1
  935. package/dist/build/compileUserApp.d.ts.map +0 -1
  936. package/dist/build/componentStylesCache.d.ts.map +0 -1
  937. package/dist/build/copyAssets.d.ts.map +0 -1
  938. package/dist/build/copyPackageModulesToPackagesFolder.d.ts.map +0 -1
  939. package/dist/build/copyPublicFiles.d.ts.map +0 -1
  940. package/dist/build/createClientFiles.d.ts.map +0 -1
  941. package/dist/build/createInstanceConfigFile.d.ts.map +0 -1
  942. package/dist/build/createPackageVirtualFileSystem.d.ts.map +0 -1
  943. package/dist/build/createPackageVirtualFileSystems.d.ts.map +0 -1
  944. package/dist/build/customImportAliases.d.ts.map +0 -1
  945. package/dist/build/customPackageEntryPoints.d.ts.map +0 -1
  946. package/dist/build/devBundle.d.ts.map +0 -1
  947. package/dist/build/devBundle.rollup.config.d.ts.map +0 -1
  948. package/dist/build/findRequiredUserModules.d.ts.map +0 -1
  949. package/dist/build/frameworkDestLocation.d.ts.map +0 -1
  950. package/dist/build/frameworkStylesheets.d.ts.map +0 -1
  951. package/dist/build/getAllSxyClientModules.d.ts.map +0 -1
  952. package/dist/build/getPackageDirForFile.d.ts.map +0 -1
  953. package/dist/build/getSxyClientPackageAliases.d.ts.map +0 -1
  954. package/dist/build/getTempDirForAppCompilation.d.ts.map +0 -1
  955. package/dist/build/internalAliases.d.ts.map +0 -1
  956. package/dist/build/makeBabelRawConfig.d.ts.map +0 -1
  957. package/dist/build/makeBabelUserDevConfig.d.ts.map +0 -1
  958. package/dist/build/makeBabelUserProdConfig.d.ts.map +0 -1
  959. package/dist/build/makeEnvJavascriptContent.d.ts.map +0 -1
  960. package/dist/build/modifySassImports.d.ts.map +0 -1
  961. package/dist/build/packageIdentifier.d.ts.map +0 -1
  962. package/dist/build/processDataToLines.d.ts.map +0 -1
  963. package/dist/build/resolveSassScssImports.d.ts.map +0 -1
  964. package/dist/build/rollup.user.prod.config.d.ts.map +0 -1
  965. package/dist/build/rollupExtractComponentStylesheets.d.ts.map +0 -1
  966. package/dist/build/rollupProdConstants.d.ts.map +0 -1
  967. package/dist/build/sassImportParser.d.ts.map +0 -1
  968. package/dist/build/scssImportParserChatgpt.d.ts.map +0 -1
  969. package/dist/build/tallyBabel.d.ts.map +0 -1
  970. package/dist/cacheControl.d.ts.map +0 -1
  971. package/dist/calculateImportedStaticFileLocations.d.ts.map +0 -1
  972. package/dist/calledFrom.d.ts.map +0 -1
  973. package/dist/checkedAttributeToBoolean.d.ts.map +0 -1
  974. package/dist/checkedValueToBoolean.d.ts.map +0 -1
  975. package/dist/cliOutput.d.ts.map +0 -1
  976. package/dist/clone.d.ts.map +0 -1
  977. package/dist/compat/context.d.ts.map +0 -1
  978. package/dist/compat/forwardRef.d.ts.map +0 -1
  979. package/dist/compat/index.d.ts.map +0 -1
  980. package/dist/compat/propTypes.d.ts.map +0 -1
  981. package/dist/compat/toTungstenClassComponent.d.ts.map +0 -1
  982. package/dist/compat/toTungstenFunctionComponent.d.ts.map +0 -1
  983. package/dist/compat/types.d.ts.map +0 -1
  984. package/dist/componentClassName.d.ts.map +0 -1
  985. package/dist/componentHelpers.d.ts.map +0 -1
  986. package/dist/componentProxyHandlers.d.ts.map +0 -1
  987. package/dist/componentType.d.ts.map +0 -1
  988. package/dist/components/Await.d.ts.map +0 -1
  989. package/dist/components/Fragment.d.ts.map +0 -1
  990. package/dist/components/GoToComponent.d.ts.map +0 -1
  991. package/dist/components/Lazy.d.ts.map +0 -1
  992. package/dist/components/Link.d.ts.map +0 -1
  993. package/dist/components/NativeHtml.d.ts.map +0 -1
  994. package/dist/components/NoEscape.d.ts.map +0 -1
  995. package/dist/components/PopMessages.d.ts.map +0 -1
  996. package/dist/components/Protected.d.ts.map +0 -1
  997. package/dist/components/RawHtml.d.ts.map +0 -1
  998. package/dist/components/RouteRedirectComponent.d.ts.map +0 -1
  999. package/dist/components/Stylesheet.d.ts.map +0 -1
  1000. package/dist/components/WebRedirectComponent.d.ts.map +0 -1
  1001. package/dist/components/_GoToComponent.d.ts.map +0 -1
  1002. package/dist/components/bindable/BindMode.d.ts.map +0 -1
  1003. package/dist/components/bindable/BindVariable.d.ts.map +0 -1
  1004. package/dist/components/bindable/BindableCheckbox.d.ts.map +0 -1
  1005. package/dist/components/bindable/BindableInput.d.ts.map +0 -1
  1006. package/dist/components/bindable/BindableInputNonString.d.ts.map +0 -1
  1007. package/dist/components/bindable/BindableInputString.d.ts.map +0 -1
  1008. package/dist/components/bindable/BindableInputTyped.d.ts.map +0 -1
  1009. package/dist/components/bindable/BindableInputTypedLegacy.d.ts.map +0 -1
  1010. package/dist/components/bindable/BindableRadio.d.ts.map +0 -1
  1011. package/dist/components/bindable/BindableSelect.d.ts.map +0 -1
  1012. package/dist/components/bindable/BindableSelectNaive.d.ts.map +0 -1
  1013. package/dist/components/bindable/BindableTextarea.d.ts.map +0 -1
  1014. package/dist/components/bindable/bindableCandidates.comparison.d.ts.map +0 -1
  1015. package/dist/components/bindable/bindableHtmlElements.d.ts.map +0 -1
  1016. package/dist/components/bindable/bindableProps.types.test.d.ts +0 -50
  1017. package/dist/components/bindable/bindableProps.types.test.d.ts.map +0 -1
  1018. package/dist/components/bindable/bindableProps.types.test.js +0 -252
  1019. package/dist/components/library/RichTextEditor/RichTextEditor.d.ts.map +0 -1
  1020. package/dist/components/library/RichTextEditor/StoredContentNode.d.ts.map +0 -1
  1021. package/dist/components/library/RichTextEditor/activeFormats.d.ts.map +0 -1
  1022. package/dist/components/library/RichTextEditor/contentTree.d.ts.map +0 -1
  1023. package/dist/components/library/RichTextEditor/sanitizeAuthoredHtml.d.ts.map +0 -1
  1024. package/dist/components/library/__StatefulMessage/MessageData.d.ts.map +0 -1
  1025. package/dist/components/library/__StatefulMessage/StatefulMessage.d.ts.map +0 -1
  1026. package/dist/components/library/index.d.ts.map +0 -1
  1027. package/dist/components/makeTypedLink.d.ts.map +0 -1
  1028. package/dist/concat.d.ts.map +0 -1
  1029. package/dist/contentNodeSymbols.d.ts.map +0 -1
  1030. package/dist/context/registerContext.d.ts.map +0 -1
  1031. package/dist/copy.d.ts.map +0 -1
  1032. package/dist/createElement.d.ts.map +0 -1
  1033. package/dist/createRef.d.ts.map +0 -1
  1034. package/dist/createRoutes.d.ts.map +0 -1
  1035. package/dist/defaultConfig.d.ts.map +0 -1
  1036. package/dist/deleteDirs.d.ts.map +0 -1
  1037. package/dist/devBanner.d.ts.map +0 -1
  1038. package/dist/docInit.d.ts.map +0 -1
  1039. package/dist/domNodeChecks.d.ts.map +0 -1
  1040. package/dist/env/Env.d.ts.map +0 -1
  1041. package/dist/env/Interfaces.d.ts.map +0 -1
  1042. package/dist/env/addToEnv.d.ts.map +0 -1
  1043. package/dist/env/droppedCoreEnvKeys.d.ts.map +0 -1
  1044. package/dist/env/funcs.d.ts.map +0 -1
  1045. package/dist/env/getEnvSchemas.d.ts.map +0 -1
  1046. package/dist/env/index.d.ts.map +0 -1
  1047. package/dist/env/privateEnv.d.ts.map +0 -1
  1048. package/dist/env/privateEnvOrThrow.d.ts.map +0 -1
  1049. package/dist/env/publicEnv.d.ts.map +0 -1
  1050. package/dist/env/publicEnvOrThrow.d.ts.map +0 -1
  1051. package/dist/env/registerEnvSchemas.d.ts.map +0 -1
  1052. package/dist/env/setPrivateEnvValidator.d.ts.map +0 -1
  1053. package/dist/env/setPublicEnvValidator.d.ts.map +0 -1
  1054. package/dist/env/test.d.ts.map +0 -1
  1055. package/dist/env/types.d.ts.map +0 -1
  1056. package/dist/env/windowGlobalEnvStatement.d.ts.map +0 -1
  1057. package/dist/experiments.d.ts.map +0 -1
  1058. package/dist/filePathFromUrl.d.ts.map +0 -1
  1059. package/dist/fileVersions.d.ts.map +0 -1
  1060. package/dist/findPackageDotJson.d.ts.map +0 -1
  1061. package/dist/findProjectDir.d.ts.map +0 -1
  1062. package/dist/findUserConfig.d.ts.map +0 -1
  1063. package/dist/fixExtension.d.ts.map +0 -1
  1064. package/dist/foreach.d.ts.map +0 -1
  1065. package/dist/frameworkConfigSchema.d.ts.map +0 -1
  1066. package/dist/getArrowFunctionBody.d.ts.map +0 -1
  1067. package/dist/getComponent.d.ts.map +0 -1
  1068. package/dist/getComponentDev.d.ts.map +0 -1
  1069. package/dist/getConfig.d.ts.map +0 -1
  1070. package/dist/getContentFromFunctionComponent.d.ts.map +0 -1
  1071. package/dist/getFrameworkDir.d.ts.map +0 -1
  1072. package/dist/getRoutes.d.ts.map +0 -1
  1073. package/dist/getRoutesDevs.d.ts.map +0 -1
  1074. package/dist/getStackTrace.d.ts.map +0 -1
  1075. package/dist/getStyledContentFromFunctionComponent.d.ts.map +0 -1
  1076. package/dist/getUserConfig.d.ts.map +0 -1
  1077. package/dist/glob.d.ts.map +0 -1
  1078. package/dist/globals.d.ts.map +0 -1
  1079. package/dist/goto.d.ts.map +0 -1
  1080. package/dist/hasDomain.d.ts.map +0 -1
  1081. package/dist/hasValidKey.d.ts.map +0 -1
  1082. package/dist/headChildren.d.ts.map +0 -1
  1083. package/dist/helpers/combineClassNames.d.ts.map +0 -1
  1084. package/dist/helpers/forwardingFetch.d.ts.map +0 -1
  1085. package/dist/helpers/getFetchCompatibleHeaders.d.ts.map +0 -1
  1086. package/dist/helpers/index.d.ts.map +0 -1
  1087. package/dist/helpers/perRequest.d.ts.map +0 -1
  1088. package/dist/hmr/applyHmrModule.d.ts.map +0 -1
  1089. package/dist/hmr/componentIdentity.d.ts.map +0 -1
  1090. package/dist/hmr/instanceRegistry.d.ts.map +0 -1
  1091. package/dist/hmr/liveReloadHub.d.ts.map +0 -1
  1092. package/dist/hmr/refreshStylesheets.d.ts.map +0 -1
  1093. package/dist/hooks/clearCurrentComponent.d.ts.map +0 -1
  1094. package/dist/hooks/getCurrentComponent.d.ts.map +0 -1
  1095. package/dist/hooks/globalObj.d.ts.map +0 -1
  1096. package/dist/hooks/globalType.d.ts.map +0 -1
  1097. package/dist/hooks/index.d.ts.map +0 -1
  1098. package/dist/hooks/setCurrentComponent.d.ts.map +0 -1
  1099. package/dist/hooks/shallowCompare.d.ts.map +0 -1
  1100. package/dist/hooks/useCallback.d.ts.map +0 -1
  1101. package/dist/hooks/useContext.d.ts.map +0 -1
  1102. package/dist/hooks/useEffect.d.ts.map +0 -1
  1103. package/dist/hooks/useInstance.d.ts.map +0 -1
  1104. package/dist/hooks/useMemo.d.ts.map +0 -1
  1105. package/dist/hooks/useReducer.d.ts.map +0 -1
  1106. package/dist/hooks/useRef.d.ts.map +0 -1
  1107. package/dist/hooks/useState.d.ts.map +0 -1
  1108. package/dist/htmlEntities.d.ts.map +0 -1
  1109. package/dist/htmlEventHandlerKey.d.ts.map +0 -1
  1110. package/dist/htmlEvents.d.ts.map +0 -1
  1111. package/dist/hydrate/hydrate.d.ts.map +0 -1
  1112. package/dist/hydrate/hydrateGlobalData.d.ts.map +0 -1
  1113. package/dist/hydrate/reconcileHydratedAttributes.d.ts.map +0 -1
  1114. package/dist/hydrate/renderHydrationMismatchBanner.d.ts.map +0 -1
  1115. package/dist/hydrate/stubRouting.d.ts.map +0 -1
  1116. package/dist/importDevModuleWithRetry.d.ts.map +0 -1
  1117. package/dist/importModule.d.ts.map +0 -1
  1118. package/dist/index.d.ts.map +0 -1
  1119. package/dist/indexInner.d.ts.map +0 -1
  1120. package/dist/info.d.ts.map +0 -1
  1121. package/dist/innerHtmlFromProps.d.ts.map +0 -1
  1122. package/dist/isBrowser.d.ts.map +0 -1
  1123. package/dist/isClient.d.ts.map +0 -1
  1124. package/dist/isDev.d.ts.map +0 -1
  1125. package/dist/isProd.d.ts.map +0 -1
  1126. package/dist/isServer.d.ts.map +0 -1
  1127. package/dist/iterationQueryString.d.ts.map +0 -1
  1128. package/dist/json.d.ts.map +0 -1
  1129. package/dist/jsx-runtime.d.ts.map +0 -1
  1130. package/dist/jsxHelpers.d.ts.map +0 -1
  1131. package/dist/jsxRuntime.d.ts.map +0 -1
  1132. package/dist/jsxRuntimeSignals.d.ts.map +0 -1
  1133. package/dist/loadPackageDotJsonFromDir.d.ts.map +0 -1
  1134. package/dist/logAndReturn.d.ts.map +0 -1
  1135. package/dist/makeFinalConfig.d.ts.map +0 -1
  1136. package/dist/makeInstanceConfigFromFrameworkConfig.d.ts.map +0 -1
  1137. package/dist/makeServerRpc.d.ts.map +0 -1
  1138. package/dist/markOptionSelected.d.ts.map +0 -1
  1139. package/dist/mergeConfigs.d.ts.map +0 -1
  1140. package/dist/moduleReloader.d.ts.map +0 -1
  1141. package/dist/mutatingFunctions.d.ts.map +0 -1
  1142. package/dist/nbsp.d.ts.map +0 -1
  1143. package/dist/objectMap.d.ts.map +0 -1
  1144. package/dist/objectTypesToCopy.d.ts.map +0 -1
  1145. package/dist/objectTypesToProxy.d.ts.map +0 -1
  1146. package/dist/output.d.ts.map +0 -1
  1147. package/dist/packageSettings.d.ts.map +0 -1
  1148. package/dist/pipeLog.d.ts.map +0 -1
  1149. package/dist/pipeline/PipelineRequestHandler.d.ts +0 -25
  1150. package/dist/pipeline/PipelineRequestHandler.d.ts.map +0 -1
  1151. package/dist/pipeline/PipelineRequestHandler.js +0 -104
  1152. package/dist/pipeline/contextStore.d.ts.map +0 -1
  1153. package/dist/pipeline/hydratePipeline.d.ts.map +0 -1
  1154. package/dist/pipeline/importRoutesModule.d.ts.map +0 -1
  1155. package/dist/pipeline/networkedTransport.d.ts.map +0 -1
  1156. package/dist/pipeline/pipeline.d.ts.map +0 -1
  1157. package/dist/pipeline/pipeline.types.test.d.ts +0 -760
  1158. package/dist/pipeline/pipeline.types.test.d.ts.map +0 -1
  1159. package/dist/pipeline/pipeline.types.test.js +0 -344
  1160. package/dist/pipeline/pipelineDefinition.d.ts.map +0 -1
  1161. package/dist/pipeline/pipelineSplit.types.test.d.ts +0 -2445
  1162. package/dist/pipeline/pipelineSplit.types.test.d.ts.map +0 -1
  1163. package/dist/pipeline/pipelineSplit.types.test.js +0 -440
  1164. package/dist/pipeline/runPipeline.d.ts.map +0 -1
  1165. package/dist/pipeline/runSplitPipeline.d.ts.map +0 -1
  1166. package/dist/pipeline/splitPipeline.d.ts.map +0 -1
  1167. package/dist/pop.d.ts.map +0 -1
  1168. package/dist/possibleEnvFiles.d.ts.map +0 -1
  1169. package/dist/postcssPlugins/TransformCssNames.d.ts.map +0 -1
  1170. package/dist/postcssPlugins/parseSelectors.d.ts.map +0 -1
  1171. package/dist/postcssPlugins/parseSelectorsRich.d.ts.map +0 -1
  1172. package/dist/postcssPlugins/scopeAnimationValue.d.ts.map +0 -1
  1173. package/dist/postcssPlugins/splitCssValue.d.ts.map +0 -1
  1174. package/dist/postcssPlugins/unwrapIgnoreMarker.d.ts.map +0 -1
  1175. package/dist/promise.d.ts.map +0 -1
  1176. package/dist/propsAreEqual.d.ts.map +0 -1
  1177. package/dist/rawHtml/HtmlAllowList.d.ts.map +0 -1
  1178. package/dist/rawHtml/decodeHtmlEntities.d.ts.map +0 -1
  1179. package/dist/rawHtml/filterContentNode.d.ts.map +0 -1
  1180. package/dist/rawHtml/htmlParsingTags.d.ts.map +0 -1
  1181. package/dist/rawHtml/parseHtml.d.ts.map +0 -1
  1182. package/dist/rawHtml/safeHtmlAllowList.d.ts.map +0 -1
  1183. package/dist/rawHtml/sanitizeHtml.d.ts.map +0 -1
  1184. package/dist/rawHtml/tokenizeHtml.d.ts.map +0 -1
  1185. package/dist/reRouting/addRequireResolveHooks.d.ts.map +0 -1
  1186. package/dist/reRouting/importLoader.d.ts.map +0 -1
  1187. package/dist/ref.d.ts.map +0 -1
  1188. package/dist/regexEscape.d.ts.map +0 -1
  1189. package/dist/removeRecursive.d.ts.map +0 -1
  1190. package/dist/render/HeadData.d.ts.map +0 -1
  1191. package/dist/render/SxyFrameworkModule.d.ts.map +0 -1
  1192. package/dist/render/SxyFrameworkModules.d.ts.map +0 -1
  1193. package/dist/render/addImportMap.d.ts.map +0 -1
  1194. package/dist/render/classComponentNodeToRenderingTree.d.ts.map +0 -1
  1195. package/dist/render/componentNodeToRenderingTree.d.ts.map +0 -1
  1196. package/dist/render/contentNodeToHtml.d.ts.map +0 -1
  1197. package/dist/render/contentToHtml.d.ts.map +0 -1
  1198. package/dist/render/contentToHtmlDev.d.ts.map +0 -1
  1199. package/dist/render/contentTreeToRenderingTree.d.ts.map +0 -1
  1200. package/dist/render/debug.d.ts.map +0 -1
  1201. package/dist/render/functionComponentNodeToRenderingTree.d.ts.map +0 -1
  1202. package/dist/render/getFunctionBodyAsString.d.ts.map +0 -1
  1203. package/dist/render/htmlMonoTags.d.ts.map +0 -1
  1204. package/dist/render/htmlNoSelfCloseTags.d.ts.map +0 -1
  1205. package/dist/render/htmlSelfClosableTags.d.ts.map +0 -1
  1206. package/dist/render/htmlSingleOnlyTags.d.ts.map +0 -1
  1207. package/dist/render/htmlVoidTags.d.ts.map +0 -1
  1208. package/dist/render/instantiateClassComponent.d.ts.map +0 -1
  1209. package/dist/render/instantiateComponent.d.ts.map +0 -1
  1210. package/dist/render/instantiateFunctionComponent.d.ts.map +0 -1
  1211. package/dist/render/printComponentNameInSource.d.ts.map +0 -1
  1212. package/dist/render/processBody.d.ts.map +0 -1
  1213. package/dist/render/processHead.d.ts.map +0 -1
  1214. package/dist/render/processHtmlNode.d.ts.map +0 -1
  1215. package/dist/render/processProps.d.ts.map +0 -1
  1216. package/dist/render/processRenderingNodeHtml.d.ts.map +0 -1
  1217. package/dist/render/readDocInitScript.d.ts.map +0 -1
  1218. package/dist/render/renderingTreeToHtml.d.ts.map +0 -1
  1219. package/dist/render/rootToHtml.d.ts.map +0 -1
  1220. package/dist/render/rootToHtmlDev.d.ts.map +0 -1
  1221. package/dist/requests/axios/get.d.ts.map +0 -1
  1222. package/dist/requests/axios/post.d.ts.map +0 -1
  1223. package/dist/requests/fetch/FetchExtras.d.ts.map +0 -1
  1224. package/dist/requests/fetch/_fetchPromise.d.ts.map +0 -1
  1225. package/dist/requests/fetch/delete.d.ts.map +0 -1
  1226. package/dist/requests/fetch/get.d.ts.map +0 -1
  1227. package/dist/requests/fetch/mergeFetchInit.d.ts.map +0 -1
  1228. package/dist/requests/fetch/paramsObjectToParamsString.d.ts.map +0 -1
  1229. package/dist/requests/fetch/patch.d.ts.map +0 -1
  1230. package/dist/requests/fetch/post.d.ts.map +0 -1
  1231. package/dist/requests/fetch/put.d.ts.map +0 -1
  1232. package/dist/requests/index.d.ts.map +0 -1
  1233. package/dist/routesLocationParts.d.ts.map +0 -1
  1234. package/dist/routing/AppRoutes.d.ts.map +0 -1
  1235. package/dist/routing/Default404.d.ts.map +0 -1
  1236. package/dist/routing/ErrorRouteType.d.ts.map +0 -1
  1237. package/dist/routing/Group.d.ts.map +0 -1
  1238. package/dist/routing/Match.type.d.ts.map +0 -1
  1239. package/dist/routing/MatchedRoute.d.ts.map +0 -1
  1240. package/dist/routing/MatchedRouteInfo.d.ts.map +0 -1
  1241. package/dist/routing/Params.d.ts.map +0 -1
  1242. package/dist/routing/ParamsFromPath.d.ts.map +0 -1
  1243. package/dist/routing/RedirectCode.d.ts.map +0 -1
  1244. package/dist/routing/Route.d.ts.map +0 -1
  1245. package/dist/routing/RouteContent.d.ts.map +0 -1
  1246. package/dist/routing/RouteContentFunction.d.ts.map +0 -1
  1247. package/dist/routing/RouteData.d.ts.map +0 -1
  1248. package/dist/routing/RouteDataFunction.type.d.ts.map +0 -1
  1249. package/dist/routing/RouteDataReturnType.d.ts.map +0 -1
  1250. package/dist/routing/RouteParams.type.d.ts.map +0 -1
  1251. package/dist/routing/RoutePaths.d.ts.map +0 -1
  1252. package/dist/routing/RouteProp.d.ts.map +0 -1
  1253. package/dist/routing/RouteType.d.ts.map +0 -1
  1254. package/dist/routing/RouteTypes.d.ts.map +0 -1
  1255. package/dist/routing/Router.d.ts.map +0 -1
  1256. package/dist/routing/Routes.d.ts.map +0 -1
  1257. package/dist/routing/RoutesFunction.d.ts.map +0 -1
  1258. package/dist/routing/RoutesWithSafeParams.d.ts.map +0 -1
  1259. package/dist/routing/RoutingRedirect.d.ts.map +0 -1
  1260. package/dist/routing/Serializable.d.ts.map +0 -1
  1261. package/dist/routing/TungstenErrorInfo.d.ts.map +0 -1
  1262. package/dist/routing/WebRedirect.d.ts.map +0 -1
  1263. package/dist/routing/builder.d.ts.map +0 -1
  1264. package/dist/routing/builder.trial.d.ts.map +0 -1
  1265. package/dist/routing/compareRequestToRegex.d.ts.map +0 -1
  1266. package/dist/routing/debug.d.ts.map +0 -1
  1267. package/dist/routing/defineRoutes.d.ts.map +0 -1
  1268. package/dist/routing/getPathPriority.d.ts.map +0 -1
  1269. package/dist/routing/matchPath.d.ts.map +0 -1
  1270. package/dist/routing/patternToRegex.d.ts.map +0 -1
  1271. package/dist/routing/pyramidRouting.d.ts.map +0 -1
  1272. package/dist/routing/redirectOf.d.ts.map +0 -1
  1273. package/dist/routing/registerGlobalData.d.ts.map +0 -1
  1274. package/dist/routing/registerParts.types.test.d.ts +0 -2
  1275. package/dist/routing/registerParts.types.test.d.ts.map +0 -1
  1276. package/dist/routing/registerParts.types.test.js +0 -139
  1277. package/dist/routing/registerRoutes.d.ts.map +0 -1
  1278. package/dist/routing/registerRouting.d.ts.map +0 -1
  1279. package/dist/routing/registerRouting.types.test.d.ts +0 -80
  1280. package/dist/routing/registerRouting.types.test.d.ts.map +0 -1
  1281. package/dist/routing/registerRouting.types.test.js +0 -120
  1282. package/dist/routing/registrationTypes.d.ts.map +0 -1
  1283. package/dist/routing/resolveAppRoutes.d.ts.map +0 -1
  1284. package/dist/routing/routeSymbols.d.ts.map +0 -1
  1285. package/dist/routing/routeUrl.d.ts.map +0 -1
  1286. package/dist/routing/routesArray.d.ts.map +0 -1
  1287. package/dist/routing/routesArray.types.test.d.ts +0 -2
  1288. package/dist/routing/routesArray.types.test.d.ts.map +0 -1
  1289. package/dist/routing/routesArray.types.test.js +0 -132
  1290. package/dist/routing/routingBuilder.d.ts.map +0 -1
  1291. package/dist/routing/routingBuilder.types.test.d.ts +0 -2
  1292. package/dist/routing/routingBuilder.types.test.d.ts.map +0 -1
  1293. package/dist/routing/routingBuilder.types.test.js +0 -171
  1294. package/dist/routing/routingRegistry.d.ts.map +0 -1
  1295. package/dist/routing/runContentFunction.d.ts.map +0 -1
  1296. package/dist/routing/splitRequest.d.ts.map +0 -1
  1297. package/dist/run.d.ts.map +0 -1
  1298. package/dist/server.d.ts.map +0 -1
  1299. package/dist/serverModuleLocation.d.ts.map +0 -1
  1300. package/dist/serverRpc.d.ts.map +0 -1
  1301. package/dist/serverRpcs.d.ts.map +0 -1
  1302. package/dist/settings.d.ts.map +0 -1
  1303. package/dist/signals/tracking.d.ts.map +0 -1
  1304. package/dist/slash.d.ts.map +0 -1
  1305. package/dist/spawnShellCommand.d.ts.map +0 -1
  1306. package/dist/standardSchema.d.ts.map +0 -1
  1307. package/dist/standardizeWebPath.d.ts.map +0 -1
  1308. package/dist/startDevServer.d.ts.map +0 -1
  1309. package/dist/stateTracking.d.ts.map +0 -1
  1310. package/dist/staticGen/RouteDefinition.d.ts.map +0 -1
  1311. package/dist/staticGen/getAppRoutes.d.ts.map +0 -1
  1312. package/dist/staticGen/staticGen.d.ts.map +0 -1
  1313. package/dist/staticGen/staticGenFunctions.d.ts.map +0 -1
  1314. package/dist/style/jssToCss.d.ts.map +0 -1
  1315. package/dist/style/styleContent.d.ts.map +0 -1
  1316. package/dist/style/styleContentReact.d.ts.map +0 -1
  1317. package/dist/style/styleContentReactClassOrClassname.d.ts.map +0 -1
  1318. package/dist/style/styleContentSxy.d.ts.map +0 -1
  1319. package/dist/style/styleContentSxyClassOrClassname.d.ts.map +0 -1
  1320. package/dist/style/styleElementContent.d.ts.map +0 -1
  1321. package/dist/style/unusedStyles.d.ts.map +0 -1
  1322. package/dist/styleProcessors.d.ts.map +0 -1
  1323. package/dist/symbols.d.ts.map +0 -1
  1324. package/dist/sync/index.d.ts.map +0 -1
  1325. package/dist/syncServer/index.d.cts.map +0 -1
  1326. package/dist/syncServer/preload.d.ts.map +0 -1
  1327. package/dist/testing/contentToString.d.ts.map +0 -1
  1328. package/dist/testing/createTestApp.d.ts.map +0 -1
  1329. package/dist/testing/display.d.ts.map +0 -1
  1330. package/dist/testing/ensure.d.ts.map +0 -1
  1331. package/dist/testing/ensure.trial.d.ts.map +0 -1
  1332. package/dist/testing/ensure.types.test.d.ts +0 -2
  1333. package/dist/testing/ensure.types.test.d.ts.map +0 -1
  1334. package/dist/testing/ensure.types.test.js +0 -34
  1335. package/dist/testing/helpers/contentHtmlElements.d.ts.map +0 -1
  1336. package/dist/testing/host.d.ts.map +0 -1
  1337. package/dist/testing/host.types.test.d.ts +0 -2
  1338. package/dist/testing/host.types.test.d.ts.map +0 -1
  1339. package/dist/testing/host.types.test.js +0 -81
  1340. package/dist/testing/hydrateTestApp.d.ts.map +0 -1
  1341. package/dist/testing/index.d.ts.map +0 -1
  1342. package/dist/testing/installTestDocInit.d.ts.map +0 -1
  1343. package/dist/testing/installTestStyleProcessors.d.ts.map +0 -1
  1344. package/dist/testing/loadEnv.d.ts.map +0 -1
  1345. package/dist/testing/normalize.d.ts.map +0 -1
  1346. package/dist/testing/pipeline/createTestPacketApp.d.ts.map +0 -1
  1347. package/dist/testing/pipeline/createTestPacketApp.types.test.d.ts +0 -3
  1348. package/dist/testing/pipeline/createTestPacketApp.types.test.d.ts.map +0 -1
  1349. package/dist/testing/pipeline/createTestPacketApp.types.test.js +0 -101
  1350. package/dist/testing/pipeline/createTestPipelineApp.d.ts.map +0 -1
  1351. package/dist/testing/pipeline/createTestPipelineApp.types.test.d.ts +0 -6
  1352. package/dist/testing/pipeline/createTestPipelineApp.types.test.d.ts.map +0 -1
  1353. package/dist/testing/pipeline/createTestPipelineApp.types.test.js +0 -146
  1354. package/dist/testing/pipeline/hostPipeline.d.ts.map +0 -1
  1355. package/dist/testing/pipeline/hydrateTestPipelineApp.d.ts.map +0 -1
  1356. package/dist/testing/pipeline/hydrateTestPipelineApp.types.test.d.ts +0 -2
  1357. package/dist/testing/pipeline/hydrateTestPipelineApp.types.test.d.ts.map +0 -1
  1358. package/dist/testing/pipeline/hydrateTestPipelineApp.types.test.js +0 -27
  1359. package/dist/testing/pipeline/index.d.ts.map +0 -1
  1360. package/dist/testing/pipeline/pipelineTestApp.d.ts.map +0 -1
  1361. package/dist/testing/pipeline/testPipelineRoute.d.ts.map +0 -1
  1362. package/dist/testing/resolveContent.d.ts.map +0 -1
  1363. package/dist/testing/testEnvIsRequested.d.ts.map +0 -1
  1364. package/dist/testing/testingComponentPackage.d.ts.map +0 -1
  1365. package/dist/throwError.d.ts.map +0 -1
  1366. package/dist/timeProfiler.d.ts.map +0 -1
  1367. package/dist/todo.d.ts.map +0 -1
  1368. package/dist/update/UpdateResult.d.ts.map +0 -1
  1369. package/dist/update/UpdateScheduler.d.ts.map +0 -1
  1370. package/dist/update/guardedUpdate.d.ts.map +0 -1
  1371. package/dist/update/integrateUpdateVdom.d.ts.map +0 -1
  1372. package/dist/update/integrateUpdateVdomPrebuild.d.ts.map +0 -1
  1373. package/dist/update/pendingMounts.d.ts.map +0 -1
  1374. package/dist/validChildren.d.ts.map +0 -1
  1375. package/dist/warnOnFrameworkChange.d.ts.map +0 -1
  1376. package/dist/watch.d.ts.map +0 -1
  1377. package/dist/when.d.ts.map +0 -1
  1378. package/dist/zones/react.d.ts.map +0 -1
package/AGENTS.md ADDED
@@ -0,0 +1,1385 @@
1
+ # Tungsten — guide for coding agents
2
+
3
+ A working guide to building applications with [Tungsten](https://robertsandiford.co.uk/tungsten),
4
+ written for AI coding agents. It covers the parts of the framework you need to write correct code,
5
+ and the places where Tungsten differs from React/Next in ways that silently produce broken output.
6
+
7
+ Read the section for the work you are about to do. The **Things to avoid** list at the end is a
8
+ summary, not a substitute.
9
+
10
+ ## Authority
11
+
12
+ Prefer these sources in order:
13
+
14
+ 1. The installed source and TypeScript declarations — `node_modules/tungsten/dist/**/*.d.ts`, and
15
+ `src/` if you have the framework repo. This is definitive.
16
+ 2. Existing code in the application you are working on. Follow its established patterns rather
17
+ than introducing a second way of doing the same thing.
18
+ 3. This document.
19
+ 4. The [published documentation](https://robertsandiford.co.uk/tungsten). Good for concepts and
20
+ background, but it is a work in progress and some examples use older API names.
21
+
22
+ If this document and the installed declarations disagree, the declarations win — say so rather
23
+ than working around it.
24
+
25
+ ## What Tungsten is
26
+
27
+ A TypeScript, class-component frontend framework whose rendering and updating algorithm is
28
+ deliberately close to React's, wrapped in a scope closer to Next: it supplies routing, scoped
29
+ styling, a reactive store, SSR + hydration, environment handling, dev/prod servers, and a build
30
+ pipeline.
31
+
32
+ What it is **not**:
33
+
34
+ - Not React. Do not add React, React DOM, or hooks-based code to a Tungsten app. Some
35
+ function-component compatibility exists (`src/hooks/`, `src/compat/`) but it is deprioritized —
36
+ function-component stand-ins are not persistent. Class components are the model.
37
+ - Not file-system routed. Routes are defined in code, deliberately.
38
+ - Not a full-stack data framework. It has no server components and no opinion about your API or
39
+ database. tRPC and Prisma appear in the author's own applications by preference; they are not
40
+ part of Tungsten.
41
+
42
+ ## Related packages
43
+
44
+ Two sibling repositories, in `framework/` next to this work folder, ship with Tungsten and track
45
+ its conventions:
46
+
47
+ - **`create-tungsten-app`** — the project generator, with the starter templates under `templates/`.
48
+ A change to an app-facing protocol here (config, env, routing, the JSX runtime) usually has to
49
+ reach the templates too.
50
+ - **`eslint-config-tungsten-flat`** — the lint configuration the generated apps use.
51
+
52
+ Neither is touched from this repo; each has its own working tree and history.
53
+
54
+ ## Runtime model
55
+
56
+ On an initial request the server matches a route, runs that route's `data` function, renders the
57
+ root component and matched page to HTML, and sends it. The browser hydrates that markup.
58
+ Subsequent navigation through `<Link>` is client-side: the destination route's `data` function is
59
+ fetched first, then its content renders.
60
+
61
+ ```
62
+ request -> match route -> route data -> root + page render -> HTML -> hydrate
63
+ ```
64
+
65
+ Two consequences that cause real bugs:
66
+
67
+ - **The server render and the hydration render must produce identical output.** Anything
68
+ environment-dependent — `toLocaleString`, local timezone, `Math.random`, `Date.now` — will
69
+ differ between server and browser and corrupt hydration. Build such strings from fixed parts
70
+ (UTC getters, explicit locales), and coerce defensively: a `Date` in route data may arrive at
71
+ the client as an ISO string.
72
+ - **Clicks before hydration completes are lost.** This is the standard SSR caveat; do not add
73
+ application code to work around it.
74
+
75
+ ## Project layout and configuration
76
+
77
+ `tungsten.config.js` at the project root configures the framework. Defaults are in
78
+ `src/defaultConfig.ts`; the type is `FrameworkConfig` (usable via JSDoc in a `.js` config).
79
+
80
+ | Key | Meaning |
81
+ | --- | --- |
82
+ | `codeDir` | Folder of compiled application code Tungsten consumes, e.g. `'dist'`. |
83
+ | `sourceDir` | Source folder — needed to locate `.sass`/`.css` files if the TS build does not copy them. |
84
+ | `rootComponent` | Entry component, relative to `codeDir`, e.g. `'client/Root.jsx'`. |
85
+ | `routesLocation` | `[file, exportName]`, relative to `codeDir`. Defaults to `['routes.jsx', 'routes']`; set it only when the routes live elsewhere or under another name, e.g. `['client/routes.jsx', 'getRoutes']`. |
86
+ | `envSchemasLocation` | Module that registers the env schemas (see [Environment](#environment)). Defaults to `'env.js'`, e.g. `'common/env.js'`. |
87
+ | `clientDirs` / `clientPatterns` | Sources the browser pipeline compiles. Unset, everything. |
88
+ | `rawDirs` / `rawPatterns` | Sources the node pipeline compiles (types stripped, imports untouched) — server middleware and the like. Unset, nothing. |
89
+ | `ignoreDirs` / `ignorePatterns` | Sources neither pipeline compiles. No default. Each pipeline compiles its selection **and not** these, so an ignored folder cannot be selected back in. `ignoreDirs: ['server']` suits an app whose own build emits its server code; to have Tungsten compile the server, narrow `clientDirs` and select it in `rawDirs` instead. |
90
+ | `serverMiddleware` | `[file, exportName, mountPath]` — Express handlers mounted on Tungsten's own server, so a frontend and an API can share one process. Loaded from the raw pipeline's output when the file is in `rawDirs`, otherwise from `codeDir`. In dev (unreleased) it is loaded once and reloaded when a `.js` file under `codeDir` changes, not on every request — so module-level state lasts until the next edit, as in prod. |
91
+ | `serverIgnoreDirs` / `serverIgnorePatterns` | Dev: files under `codeDir` whose changes don't reload `serverMiddleware`, in the shapes of `ignoreDirs` / `ignorePatterns`. Test files never do. No default; e.g. `serverIgnoreDirs: ['client']`. |
92
+ | `defaultCacheControl` | The `Cache-Control` of prod pages that set none themselves (see [Page caching](#page-caching)). Unset, pages are sent without one. |
93
+ | `serverSideRouting` | 0.7.1+. Unset is `true`. `false`: the server runs none of the app's code for a page. It does no routing and fetches no data, and sends the same stub for every URL (status 200): the root component's `<html>`, `<head>` and `<body>` with nothing in them. The client then fetches the global data (or the pipeline's all-routes data) beside its first routing, with the route data, and builds the head and body. A pipeline app runs, in order: `clientInit`/`init`, then the all-routes data beside routing, then `clientPost`/`post`, then `clientAfterRouting`. A route data redirect is followed on the client before anything is built. Turns `csr` on, and needs a root component. The root's own `content` still runs on the server, and registered stores are built there with an empty context, so neither may depend on the data. Static generation writes the stub for each listed route; routes found only by following links are not found. |
94
+
95
+ ### The two-stage build, and why imports end in `.jsx`
96
+
97
+ The application `tsconfig.json` uses `jsx: "preserve"` with an `outDir`, so **tsc emits `.jsx`
98
+ files**; Tungsten then Babel-processes those (its own JSX runtime plus transforms for component
99
+ state, bindings, styles, css imports, and package handling).
100
+
101
+ Under NodeNext resolution that means source files import the *emitted* extension:
102
+
103
+ ```ts
104
+ import { Home } from './pages/Home.jsx' // even though the file is Home.tsx
105
+ import { formatDate } from './lib/date.js' // even though the file is date.ts
106
+ ```
107
+
108
+ This is correct and intentional. Do not "fix" it to `.tsx`/`.ts` or extensionless.
109
+
110
+ Typical scripts: `dev` = `tsc --watch` alongside `tungsten dev`; `build` = `tsc && tungsten build`;
111
+ `start` = `tungsten start`.
112
+
113
+ ### TightScript declarations (unreleased)
114
+
115
+ Tungsten also ships declarations written for TightScript, the TypeScript fork with permission
116
+ modifiers (`rw`, `exact`, `owned`, …). The runtime code is the same either way; only the types
117
+ differ. An app compiled with the fork opts in through an export condition in its `tsconfig.json`:
118
+
119
+ ```jsonc
120
+ "compilerOptions": {
121
+ "customConditions": ["tightscript"],
122
+ "permissionModifiers": true,
123
+ "permissionDefaults": "read" // the default; tungsten's declarations are written for it
124
+ }
125
+ ```
126
+
127
+ Without the condition, an app gets the stock TypeScript declarations, which is what stock `tsc`
128
+ needs: it can't parse TightScript's modifiers. TightScript's global declarations are
129
+ `tungsten/types-ti/*`, used alongside `tungsten/types/*`.
130
+
131
+ Under these declarations tungsten asks for write permission where it writes. For example, an object
132
+ bound to an input must be writable (`rw`), so a form object declared read-only is refused at the
133
+ `bind`.
134
+
135
+ ## Components
136
+
137
+ Base classes, exported from `tungsten` with both a long and a short name
138
+ (`src/Components.tsx`, `src/indexInner.ts`):
139
+
140
+ | Use | Class | Alias |
141
+ | --- | --- | --- |
142
+ | No local state | `TungstenSimpleComponent<Props, RouteData?>` | `SimpleComponent` |
143
+ | Local state | `TungstenStatefulComponent<Props, State, RouteData?>` | `StatefulComponent` |
144
+ | Optional state | `TungstenComponent<Props, State?, RouteData?>` | — |
145
+ | Store access, stateless | `TungstenBaseSimpleStoreComponent<Props, RouteData, Schema>` | `BaseSimpleStoreComponent` |
146
+ | Store access, stateful | `TungstenBaseStatefulStoreComponent<Props, State, RouteData, Schema>` | `BaseStatefulStoreComponent` |
147
+
148
+ Applications normally subclass the two store base classes once with their own schema and use those
149
+ wrappers everywhere (see **Store**). Pick the smallest class that fits: no state where none is
150
+ needed, no store where the component only needs props.
151
+
152
+ Everything is a class field, usually an arrow function:
153
+
154
+ ```tsx
155
+ import { StatefulComponent, BindableInput } from 'tungsten'
156
+
157
+ type Props = { initialName: string }
158
+ type State = { name: string }
159
+
160
+ export class Greeting extends StatefulComponent<Props, State> {
161
+ state: State = { name: this.props.initialName }
162
+
163
+ title = `Hello, ${this.props.initialName}` // sets document title
164
+
165
+ reset = () => { this.state.name = this.props.initialName }
166
+
167
+ content = () => (
168
+ <section>
169
+ <BindableInput name="name" bind={[this.state, 'name']} />
170
+ <p>{this.state.name}</p>
171
+ <button onClick={this.reset}>Reset</button>
172
+ </section>
173
+ )
174
+
175
+ style = Sass`
176
+ section
177
+ padding: 1rem
178
+ `
179
+ }
180
+ ```
181
+
182
+ - **`content` is the render method.** It is called as `content(props, state)` and **may be
183
+ async** — the framework awaits it. (`render` is accepted as a React-compat alternative; if both
184
+ exist, `content` wins.)
185
+ - Use arrow-function class fields for handlers so `this` is bound.
186
+ - `title` sets the document title and may be `(props, state) => string`. **Only set `title` on
187
+ page components** — the last call wins, so a nested component setting it will fight the page.
188
+ - `this.tungsten` holds framework helpers bound to the component (0.7.1+):
189
+ `this.tungsten.getRoutes()` gives the app's routes as this request resolved them (the function
190
+ form called for you), for rendering nav. Name their type to read their fields:
191
+ `getRoutes<typeof routes>()` (unreleased; unchecked beyond being routes, so name the app's own,
192
+ with `import type`). `this.tungsten.fileUrl('/logo.png')` gives a site
193
+ file's URL with its cache-busting version (see **Styling**). `this.tungsten.instance` is this
194
+ component's instance — the same object as `this.__instance`, under a name that is part of the
195
+ API rather than a convention.
196
+
197
+ ### Lifecycle
198
+
199
+ Each hook has a React-style name and a short alias:
200
+
201
+ | Hook | Alias | Notes |
202
+ | --- | --- | --- |
203
+ | `init(props)` / `init(props, state)` | — | On construction, both server and client. May be async. A `TungstenSimpleComponent` is passed props only; the stateful bases pass state too. |
204
+ | `serverInit` / `clientInit` | — | Side-specific initialization. Same arguments as `init`. |
205
+ | `componentDidMount` | `_mounted` | |
206
+ | `componentDidHydrate` | `_hydrated` | Client only, after hydration attaches. |
207
+ | `componentDidUpdate` | `_updated` | |
208
+ | `componentDidRender` | `_rendered` | |
209
+ | `componentWillUnmount` | `_deleting` | |
210
+ | `componentDidUnmount` | `_deleted` | |
211
+
212
+ Put browser-only work (`window`, `location`, `localStorage`) in `clientInit` or a later client
213
+ hook — never unguarded in `init`, route code, or `content`. A browser-only value the *first render*
214
+ needs (a stored theme) goes through `DocInit()` instead — see **Inline scripts and styles**.
215
+
216
+ Other instance members worth knowing: `this.props`, `this.routeParams`, `this.routeData`,
217
+ `this.globalData`, `this.triggerUpdate()` (manual re-render),
218
+ `this.pickProps(...)` / `this.pickState(...)`, and `this.using(disposable)` for something that
219
+ should be disposed on unmount. `this.setTimeout(fn, ms)` / `this.setInterval(fn, ms)` (with
220
+ `this.clearTimeout` / `this.clearInterval`) work like the window timers but are cleared when the
221
+ component is deleted; on the server they do nothing and return `undefined`.
222
+
223
+ ### State is mutable and proxied — this is the biggest difference from React
224
+
225
+ `this.state`, and any plain objects, arrays, `Map`s and `Set`s inside it, are wrapped in proxies
226
+ on the client (`src/componentProxyHandlers.ts`). Writes are detected and queue a re-render.
227
+
228
+ ```ts
229
+ this.state.count++
230
+ this.state.items.push(item)
231
+ this.state.form.email = value
232
+ delete this.state.items[index]
233
+ ```
234
+
235
+ All of that is correct Tungsten code. Rules that follow from it:
236
+
237
+ - **Do not use `setState`.** It exists only as a React-compat shim and is not needed.
238
+ - **Do not write immutable-update code** — no `{ ...this.state, count: n }` ceremony, no
239
+ reducers. Deep state structures are fine and are not discouraged.
240
+ - **State updates apply immediately; re-renders are batched.** You read your own writes at once,
241
+ but the DOM catches up on the next tick. An `await` is a batching boundary — a queued update can
242
+ run while you are suspended.
243
+ - **Never mutate state inside `content`** or anything it calls. That risks a torn render. Mutate
244
+ in init hooks and event handlers only.
245
+ - An object already owned by another component's state is **adopted by copy** when you store it,
246
+ so the two components' states stay independent. Do not rely on sharing a mutable object between
247
+ components as a communication channel — use the store, or props plus a callback.
248
+ - **An `async content` widens every one of these rules.** Nothing locks a component while it is
249
+ suspended: a state write starts a second, overlapping update, and a parent re-render replaces
250
+ `this.props` under the render in flight — so code before the first `await` and code after it can
251
+ see different props. Prefer a synchronous `content` with the loading done in a lifecycle hook.
252
+
253
+ #### Framework internals: the render baseline is stamped *before* the render
254
+
255
+ `markRendered(element)` records the tick a component last rendered at, and `propsAreEqual()` skips
256
+ a child whose props carry no write newer than it. Both call sites in `integrateUpdateVdom.ts` must
257
+ therefore stamp **before** building content, as `__initialContent` already does at mount. Stamping
258
+ afterwards buries any write that landed while an async content was suspended: its tick is then
259
+ `<=` the baseline, and the child is skipped **for good**, since nothing will stamp that object
260
+ again. Regression test: `src/update/asyncRenderBaseline.dom.sxyt.tsx`.
261
+
262
+ ## Routing and data loading
263
+
264
+ Routes are an object keyed by path, exported from the module named by `routesLocation` — by
265
+ default an export named `routes` from `routes.jsx` in `codeDir`, which is what
266
+ `create-tungsten-app` generates and needs no config:
267
+
268
+ ```tsx
269
+ export const routes = {
270
+ '/': { content: <Home /> },
271
+ '404': { content: <NotFound /> },
272
+ } as const satisfies CustomRoutes<Endpoint<any, any>>
273
+ ```
274
+
275
+ The export may instead be a function of the request, `(reqRes: ReqRes | null) => Routes`, when
276
+ building the routes needs it — below, to create an API client for that request. A different
277
+ export name must be set in `routesLocation`; a missing export throws an error naming the setting.
278
+
279
+ ```tsx
280
+ import { type Params, type Endpoint, type CustomRoutes } from 'tungsten'
281
+
282
+ // tungsten.config.js: routesLocation: ['routes.jsx', 'getRoutes']
283
+ export const getRoutes = (reqRes: ReqResOrNull) => {
284
+ const api = getApiClient(reqRes)
285
+
286
+ return {
287
+ '/': { content: <Home /> },
288
+
289
+ '/things/:id<1+>': {
290
+ data: ({ id }: Params<'id'>) => api.thing.get(Number(id)),
291
+ content: (data, params: Params<'id'>) => <ThingDetail thing={data} />,
292
+ } satisfies Endpoint<Params<'id'>, ThingResponse>,
293
+
294
+ '404': { content: <NotFound /> },
295
+ } as const satisfies CustomRoutes<Endpoint<any, any>>
296
+ }
297
+
298
+ export type AppRoutes = ReturnType<typeof getRoutes>
299
+ ```
300
+
301
+ - `content` is JSX, or `(data, params) => JSX` when the route has a `data` function.
302
+ - `data` is async and runs **before** the content renders — on the server during SSR, over the
303
+ network on client-side navigation. The component then receives resolved data, so there is no
304
+ loading flash on first paint. Route loaders are the right place for a page's initial read.
305
+ - Annotate each entry with `satisfies Endpoint<Params, Data>`. `Data` should be the actual response
306
+ type of the endpoint, not a locally duplicated shape. `satisfies` preserves the literal path key
307
+ while still checking the loader and the content callback.
308
+ - A **`'404'` key** supplies not-found content. Every application needs one. It answers with status
309
+ 404, or with its own **`code`** when it gives one (0.7.1+), e.g. `'404': { content: <Gone />,
310
+ code: 410 }`. An object typed with `CustomRoutes` accepts `code` from unreleased; in 0.7.1 only
311
+ `Routes` and the array form do.
312
+ - Route definitions may carry **arbitrary extra fields** (`name`, `nav`, `requireAuth`, …) by
313
+ extending `Endpoint<Params, Data>` — a navigation component can then read them off the routes
314
+ object.
315
+
316
+ ### The array form (0.7.1+)
317
+
318
+ Routes may instead be an array, each entry naming its path — anywhere the object is accepted, and
319
+ as a routes function's return:
320
+
321
+ ```tsx
322
+ import { route } from 'tungsten'
323
+
324
+ export const getRoutes = (reqRes: ReqResOrNull) => [
325
+ route({ path: '/', content: <Home /> }),
326
+ route({ path: '/things/:id<1+>', content: <Thing /> }),
327
+ route({ path: '404', content: <NotFound /> }),
328
+ ]
329
+ ```
330
+
331
+ - `route()` keeps the path literal, so `RoutesType` and `PathsType` read the array as they read
332
+ the object.
333
+ - A **path given twice** is a type error when the routes are registered through the app builder's
334
+ `.routes()`: the message names the path. It needs the array written out in the call (or in the
335
+ function it returns from); an array built elsewhere is checked when the routes are read instead,
336
+ which throws in dev. Outside dev, the last entry for a path wins, as a repeated object key does.
337
+ - The array cannot carry the object's `[$cacheControl]`; each entry's own `cacheControl` still
338
+ applies.
339
+ - **`routesWithList<Rule>()`** (0.7.1+) requires fields of every path route, leaving `'default'`,
340
+ `'404'` and `'error'` free of them. It returns the array as given, typed as a tuple:
341
+
342
+ ```tsx
343
+ export const routes = routesWithList<{ name: string }>()([
344
+ route({ path: '/', name: 'Home', content: <Home /> }),
345
+ route({ path: '404', content: <NotFound /> }),
346
+ ])
347
+ ```
348
+
349
+ `routesWith<Rule>()` takes the routes as separate arguments and returns them keyed by path; its
350
+ rule applies to every route, `'404'` included.
351
+ - **`makeRouteWith<Rule>()`** (unreleased) returns a `route()` that requires the rule's fields, so
352
+ a route missing one is flagged by itself instead of marking the whole list:
353
+
354
+ ```tsx
355
+ const appRoute = makeRouteWith<{ name: string }>()
356
+ appRoute({ path: '/', name: 'Home', content: <Home /> })
357
+ ```
358
+
359
+ ### Path parameters
360
+
361
+ Express-like `:name` segments. Bare `:name` matches `[^/]+`; a trailing slash is always optional.
362
+ Two constraint syntaxes, both supported (`src/routing/patternToRegex.ts`):
363
+
364
+ - **Raw regex:** `:id(\d+)`.
365
+ - **Named types:** `:id<uint>`. Available: `digits`/`uint`/`unsigned-integer`;
366
+ `int`/`integer`/`sint`/`signed-integer`; `int-ge1`/`1+`; `num`/`number`; `alpha`;
367
+ `alpha-lower`; `alpha-num`/`alpha-numeric`; `alpha-lower-num`/`alpha-lower-numeric`.
368
+
369
+ Note `1+` means **an integer ≥ 1**, not "one or more digits". A route that does not match its
370
+ constraint falls through to the next candidate, so put literal paths before overlapping
371
+ parametric ones — `/things/new` must precede `/things/:id<1+>`.
372
+
373
+ Type params with `Params<'id'>` or `ParamsFromPath<'/things/:id'>`.
374
+
375
+ ### Navigation and redirects
376
+
377
+ - `<Link to="/things/1">` for internal navigation — it keeps routing client-side. Use a plain
378
+ `<a>` only for external URLs or paths deliberately served by something else. Since 0.6.2 a click
379
+ with a modifier key (ctrl, meta, shift, alt) or a non-primary button is left to the browser, so
380
+ open-in-new-tab works.
381
+ - **Typed links (0.7.1+):** `RoutePaths<typeof routes>` is the union of the app's paths,
382
+ parameters as template holes: `'/leads/:id<1+>'` gives `` `/leads/${number}` ``. The routes may be
383
+ an object or a routes function (every table it can return counts). Make a `Link` typed by it in
384
+ an app file:
385
+
386
+ ```ts
387
+ import { makeTypedLink } from 'tungsten'
388
+ import type { routes } from '../routes.jsx'
389
+
390
+ export const { Link } = makeTypedLink('Link')<typeof routes>()
391
+ ```
392
+
393
+ The string names the component for stylesheets (`Link` as a selector), and it is the only key
394
+ returned, so destructuring any other name is a type error. The type argument is the routes
395
+ (object or function), not `RoutePaths`: leaving it out, or passing anything with no paths, fails
396
+ at this call. Import the routes' type with
397
+ `import type`: a value import of the routes file from a component risks an import cycle. A plain
398
+ subclass does the same, its class name being the selector:
399
+ `export class Link extends _Link<RoutePaths<typeof routes>> {}`.
400
+ - `this.__instance.goto(path)` navigates from code; `<GoTo to="/path" />` does it when rendered.
401
+ Since 0.6.2, with `clientSideNav: false` it is a full page load, and during a server render it
402
+ answers the request with a redirect immediately (the first one wins if the render asks twice).
403
+ - Back/Forward keep the query (0.7.1+): a route's `data()` gets the query of the entry moved
404
+ to, and `internalStore.location` is the route path plus query after hydration as on the server.
405
+ Moving back from a same-page `#anchor` no longer re-runs the route or reloads.
406
+ - From a `data` function, **return** `new RoutingRedirect(path)` (in-app) or
407
+ `new WebRedirect(url)` (full browser redirect) instead of data. `RedirectCode` sets the status.
408
+ - As content, render `<RouteRedirectComponent to="/path" />`.
409
+ - Both in-app forms redirect under `siteBasePath` on the server, as `goto()` does (unreleased;
410
+ before, the server sent the bare route path).
411
+ - Global data — classic `globalData` and the pipeline's all-routes data, on either side of a split
412
+ pipeline — may return the same redirects (unreleased). It wins over the route's redirect, and Post
413
+ does not run. It is handed the location (route path plus query) as its last argument, since no
414
+ route has matched yet: check it, or a redirect to `/login` redirects `/login` again.
415
+ - `<MatchedRoute />` renders the active route; it belongs in the root component's `<body>`.
416
+ - **A pipeline recovers to its `'error'` route** (unreleased): the route renders in the root,
417
+ with status 500 and `Cache-Control: no-store`, and the app keeps running. `.routes()` requires
418
+ one, as routing can always fail (a type error, for a returned tuple or object):
419
+
420
+ | Fails | Then |
421
+ | --- | --- |
422
+ | routing or route data | Post, then the `'error'` route |
423
+ | the all-routes data, with a fallback | the fallback is the data, Post, then the `'error'` route |
424
+ | Init; the all-routes data with no fallback; Post; the fallback; the render | the error page |
425
+
426
+ The fallback is the all-routes data function's second argument (also `serverAllRoutesData`,
427
+ `clientAllRoutesData`): a whole value of its type, or a function of the same arguments plus the
428
+ error, which may return a redirect. A static value is shared by every request, so never mutate
429
+ it. A redirect from the all-routes data wins over a route data throw. The route's data is
430
+ `{ error, message }`; in prod `message` is `'server error'`. In prod the page carries the
431
+ message only to the browser, as does a classic `'error'` route's; in dev it carries the error
432
+ too, with its stack. A client navigation recovers in place; past recovery it loads the page
433
+ from the server.
434
+
435
+ ```tsx
436
+ .allRoutesData(loadUser, (reqRes, init, location, error) =>
437
+ isUnauthorized(error) ? new WebRedirect(logInUrl(location)) : guestUser)
438
+ ...
439
+ .routes(() => [
440
+ ...,
441
+ { path: 'error', content: (info: TungstenErrorInfo) => <ErrorPanel message={info.message} /> },
442
+ ])
443
+ ```
444
+ - **A pipeline's error page** (unreleased) is `.errorPage(Page)` before `.routes()`, for what
445
+ recovery cannot reach. `Page` extends the stage's
446
+ `ErrorComponent` and renders the whole document, `<html>` included: no root is around it. When a
447
+ request fails past recovery, after Init, the server sends it with status 500, with props
448
+ `{ error, message }`, Init's context and networked data (Post never ran), and
449
+ `this.tungsten.allRoutesData` that may be `undefined` (it may be what threw). On the prod server
450
+ `message` is `'server error'`, not the error's own; `error` is the thrown value either way,
451
+ server-side only. In prod the page carries only the message to the browser (in dev, the error
452
+ too), which hydrates it the same way, with client navigation off. Optional: without one, or when Init or the page itself throws,
453
+ the framework's error page is sent.
454
+
455
+ ```tsx
456
+ const withData = pipeline.server('express').init(...).allRoutesData(...)
457
+ class ErrorPage extends withData.ErrorComponent {
458
+ content = () => <html><head>…</head><body><p>{this.props.message}</p></body></html>
459
+ }
460
+ export const app = withData.post(...).errorPage(ErrorPage).routes(() => [...])
461
+ ```
462
+
463
+ ### Page caching
464
+
465
+ The prod server sends each page with a `Cache-Control` chosen from named policies (0.7.1+):
466
+
467
+ | Value | Header | Use for |
468
+ | --- | --- | --- |
469
+ | `'no-store'` | `no-store` | pages that must never be kept |
470
+ | `'private-check'` | `private, no-cache` | per-user pages: only the user's browser keeps them, and checks back each time (a cheap 304 when unchanged) |
471
+ | `'public-check'` | `public, no-cache` | pages the same for everyone: CDNs may keep them too, still checking back each time |
472
+ | `{ privacy, maxAge, staleWhileRevalidate? }` | e.g. `public, max-age=300` | reused without checking for `maxAge` seconds; `privacy` is `'private'` or `'public'` |
473
+
474
+ `public` lets a CDN serve one user's copy to another, so never use it on a page that shows
475
+ per-user data. A `maxAge` page can be up to that many seconds out of date, including after a
476
+ deploy.
477
+
478
+ The most specific setting wins:
479
+
480
+ ```ts
481
+ import { $cacheControl } from 'tungsten'
482
+
483
+ export const routes = {
484
+ [$cacheControl]: 'private-check', // every route that sets none
485
+ '/docs': { content: <Docs />, cacheControl: 'public-check' },
486
+ '/feed': {
487
+ content: <Feed />,
488
+ cacheControl: ({ req }) => (req.query.live !== undefined ? 'no-store' : 'public-check'),
489
+ },
490
+ // ...
491
+ }
492
+ ```
493
+
494
+ A route's `cacheControl` (a value, or a function of
495
+ `{ req, res }`) beats the routes object's `[$cacheControl]`, which beats config
496
+ `defaultCacheControl`. With none of them set no header is
497
+ sent, and a `Cache-Control` set by `serverMiddleware` is never overwritten. The error page and
498
+ redirects are not affected. Static sites take their headers from their host.
499
+
500
+ ### The root component
501
+
502
+ The root component replaces `index.html` — it renders `<html>`, `<head>` and `<body>` itself.
503
+
504
+ **`<head>` content is not hydrated.** Event handlers placed there are never attached. The
505
+ framework inserts its own scripts and stylesheets into the head.
506
+
507
+ ## Store and global data
508
+
509
+ `registerStore(SchemaClass)` creates a typed reactive store. The schema is a **class**,
510
+ constructed per app instance with the request context, which is what makes it safe under SSR —
511
+ one store per request on the server, not a module-level singleton.
512
+
513
+ ```ts
514
+ // Store.ts
515
+ export class StoreSchema {
516
+ apiClient: ApiClient
517
+ authed: boolean = false
518
+ constructor(reqRes: ReqRes | null) { this.apiClient = getApiClient(reqRes) }
519
+ }
520
+ export const { getComponentStore } = registerStore(StoreSchema)
521
+
522
+ // StoreComponents.ts — subclass once, use everywhere
523
+ export abstract class SimpleStoreComponent<P, RD>
524
+ extends BaseSimpleStoreComponent<P, RD, StoreSchema> {
525
+ store = getComponentStore(this)
526
+ }
527
+ export abstract class StatefulStoreComponent<P, S, RD = unknown>
528
+ extends BaseStatefulStoreComponent<P, S, RD, StoreSchema> {
529
+ store = getComponentStore(this)
530
+ }
531
+ ```
532
+
533
+ Each store value exposes `.get()`, `.set(v)`, `.subscribe()`, `.unsubscribe()`, `.sync()`, and —
534
+ since 0.6.1 — `.notify(fn)` and `.stopNotify(fn)`.
535
+
536
+ **`sync()` = get + subscribe this component.** Use `sync()` when reading from `content` and the
537
+ component should re-render on change; use `get()` for a one-off read, such as pulling a client out
538
+ to make a call. Subscriptions are cleaned up when the component is deleted.
539
+
540
+ ```tsx
541
+ const client = this.store.apiClient.get() // just need the object
542
+ const authed = this.store.authed.sync() // re-render when this changes
543
+ this.store.authed.set(true)
544
+ ```
545
+
546
+ **`notify(fn)` runs a callback on every write, instead of re-rendering.** Use it for a side effect
547
+ a value should trigger — closing a menu, starting a timer, calling out — where `sync()` would be
548
+ wrong because nothing in the markup depends on the value. The callback receives the new value, and
549
+ `notify` returns the function so it can be kept for `stopNotify(fn)`.
550
+
551
+ ```tsx
552
+ init = () => {
553
+ this.store.authed.notify(authed => { if (!authed) this.closeMenu() })
554
+ }
555
+ ```
556
+
557
+ Callbacks registered from a component are released when that component is deleted, like
558
+ subscriptions — there is no need to call `stopNotify` in a teardown hook. `notify` runs on writes
559
+ only; it does not fire with the current value on registration.
560
+
561
+ The framework's own store is reached through `this.__instance.internalStore`. Its values are not
562
+ bound to a component, so pass it — from a store component, since that is the type they take:
563
+ `.sync(this)`, `.notify(fn, this)`. Two of them are read-only
564
+ (0.6.2+): `navigating` (a client navigation is in progress) and `navigationIndex` (counts
565
+ navigations) have no `.set()` — `goto()` writes them, and a test harness can't supply them.
566
+
567
+ ```tsx
568
+ content = () => this.__instance.internalStore.navigating.sync(this) ? <Spinner /> : null
569
+ ```
570
+
571
+ The store is for genuine cross-component state. Keep form and page state in `this.state`. Do not
572
+ push fetched page records into the store merely to avoid passing props — that is what route data
573
+ and props are for. The store may hold non-serializable services as well as data.
574
+
575
+ For request-scoped values available to every component, `registerGlobalData(async reqRes => ({…}))`
576
+ plus a declaration-merged `interface GlobalData` gives you `this.globalData`. The function runs
577
+ before any route renders: before SSR, with the request, and (0.7.1+) again before each
578
+ client-side navigation, with `reqRes` null, in parallel with the route's data. Its result replaces
579
+ the global data as the new route renders. The server's result is serialized into the page for
580
+ hydration, so it must be serializable.
581
+
582
+ **Context (0.7.1+).** `registerContext` supplies an object made fresh for each server request,
583
+ and once per page on the client (it survives client-side navigation):
584
+
585
+ ```ts
586
+ registerContext({ client: ClientContext, server: ServerContext }) // new ServerContext(reqRes), new ClientContext()
587
+ registerContext(Context) // one class: new Context(reqRes | null)
588
+ ```
589
+
590
+ Register it in code the routes file loads. The context is the routes function's second argument,
591
+ each store schema's fourth constructor argument (after `reqRes, globalData, matchedRouteInfo`), and
592
+ `this.__instance.context`. It is untyped (`unknown`) for now: annotate the parameter with your own
593
+ classes, e.g. `(reqRes, context: ClientContext | ServerContext) => routes`. Test harnesses take a
594
+ `context` option.
595
+
596
+ ## Styling
597
+
598
+ Component styles are a class field set to a tagged template. **`Css`, `Sass` and `Scss` are
599
+ ambient globals** — declared in `tungsten/types/index.d.ts`, so there is no import. (Less is not
600
+ implemented.)
601
+
602
+ ```tsx
603
+ style = Sass`
604
+ .panel
605
+ display: grid
606
+ gap: 0.6rem
607
+ `
608
+ ```
609
+
610
+ Sass `@use` and imports of `.sass`/`.scss` files work inside the tag. For genuinely global
611
+ styles, import a `.sass` file — the import yields an href string — and render it as
612
+ `<Stylesheet>{baseStyles}</Stylesheet>` in the root's `<head>`, which emits a `<link>` and lets
613
+ the browser cache it. An inline `css="…"` attribute is also available on elements.
614
+
615
+ In a production build (0.7.1+) URLs to the site's own files get a `?v=<content hash>` query, and
616
+ those URLs are served with a one-year `immutable` cache. A new deploy changes the hash, so browsers
617
+ fetch the new file. It covers the framework's bundle and component CSS, and every file in `public/`,
618
+ the compiled stylesheets and `assets/`. For these it is automatic: any element's `src`, `href`,
619
+ `poster` or `srcset` naming one of those files exactly is versioned when rendered, so
620
+ `<Stylesheet>{baseStyles}</Stylesheet>` and a hand-written `<img src="/logo.png" />` both get it.
621
+ A URL built in code (a `fetch`, an inline style) gets it through
622
+ `this.tungsten.fileUrl('/logo.png')`, which also adds the site base path. Not covered: URLs that
623
+ already carry a `?` or `#`, and `url(...)` inside CSS. Dev URLs carry no version.
624
+
625
+ ### How scoping works — and the mistake to avoid
626
+
627
+ Every selector in a component's `style` is rewritten to a class private to that component, and
628
+ that class is stamped onto the elements **the component itself renders**.
629
+ `dist/postcssPlugins/TransformCssNames.js` is the authority: a class selector `.panel` becomes
630
+ `Thing_panel`; a bare tag selector `div` becomes `Thing_#_div`.
631
+
632
+ Two things follow.
633
+
634
+ **First, tag selectors become class selectors, so a tag and a class have equal specificity** —
635
+ unlike ordinary CSS. Order and explicitness matter more than you expect.
636
+
637
+ **Second — the common error — a component cannot style markup rendered by a child component.**
638
+ This is deliberate encapsulation. React CSS Modules leak here; Tungsten does not.
639
+
640
+ ```tsx
641
+ <nav className="user-links">
642
+ <Link to={`/users/${user.id}`}>Profile</Link>
643
+ </nav>
644
+ ```
645
+
646
+ renders as `<nav class="user-links User_user-links"><a href="/users/3">Profile</a></nav>`. The
647
+ anchor belongs to `Link` and carries none of this component's classes, so:
648
+
649
+ ```sass
650
+ // ❌ compiles to a selector that can never match — the links stay unstyled
651
+ .user-links
652
+ a
653
+ font-weight: 600
654
+ ```
655
+
656
+ The rule is not an error, produces no warning, and simply does nothing. It is easy to write and
657
+ easy to miss in review, so check it deliberately whenever you style something that turns out to be
658
+ a component: `Link`, `BindableInput`, `BindableSelect`, `BindableTextarea`, and any component of
659
+ your own.
660
+
661
+ **The fix: name the component as the selector.** A capitalised name is transformed the same way a
662
+ tag is; Tungsten generates the scoped class and passes it to that component as `className`
663
+ automatically. There is no prop to write and no class name to invent.
664
+
665
+ ```sass
666
+ // ✅
667
+ .user-links
668
+ Link
669
+ font-weight: 600
670
+ ```
671
+
672
+ Passing a class explicitly — `<Link className="user-link">` — uses the same mechanism by hand.
673
+ Reserve it for cases the component selector cannot express: different styling for different
674
+ instances of the same component, or a child that also needs a global class.
675
+
676
+ Either way, **the child must accept a `className` prop and apply it**. Tungsten's own components
677
+ do. When you write a component, accept `className` and put it on your root element (or merge it
678
+ with `combineClassNames`) — that is what makes it styleable by a parent:
679
+
680
+ ```tsx
681
+ type Props = { className?: string, label: string }
682
+
683
+ export class Badge extends SimpleComponent<Props> {
684
+ content = ({ className, label }: Props) =>
685
+ <span className={combineClassNames(className, 'badge')}>{label}</span>
686
+ }
687
+ ```
688
+
689
+ Parent rules that land this way still beat the child's own: component styles are emitted with
690
+ 4× stacked class selectors (`.C.C.C.C`), so a parent overrides a child's internals. `!important`
691
+ is a last resort.
692
+
693
+ **Escape hatch:** `:i(<selector>)` — or its long form `:ignore(<selector>)` — pierces scoping:
694
+ `button :i(span)` reaches spans inside child components. Reserve it for third-party or legacy components that do not accept a `className`.
695
+ Reaching for it on a component you control means that component should have taken a `className`
696
+ instead.
697
+
698
+ ### Class attribute
699
+
700
+ Both `class` and `className` work in JSX, but **`className` is the canonical internal prop** —
701
+ scoped styling reads and rewrites it, and the renderer converts it to the HTML `class` attribute.
702
+ Prefer `className` consistently, for native elements and components alike, so behaviour does not
703
+ change when an element becomes a component or a prop is forwarded. Build dynamic lists with
704
+ `combineClassNames`.
705
+
706
+ ## Rendering a string of HTML
707
+
708
+ Use **`<ParseHtml>`** (the same component is also exported as `<RawHtml>`; prefer the `ParseHtml`
709
+ name, which says what it does). It parses the markup into an ordinary content tree, so the result
710
+ renders, hydrates and reconciles like anything else:
711
+
712
+ ```tsx
713
+ <div className="tip-text"><ParseHtml html={tip.text} safe /></div>
714
+ ```
715
+
716
+ | Prop | Effect |
717
+ | --- | --- |
718
+ | `html` | the markup. Anything unparseable is kept as text; it never throws |
719
+ | `safe` | applies `safeHtmlAllowList` — formatting, lists, tables, links, images |
720
+ | `allowList` | your own `HtmlAllowList`. Wins over `safe`. Disallowed elements are *unwrapped*, so no text is lost |
721
+ | `sanitize` | defaults to on: drops `<script>`, `javascript:`/`vbscript:` URLs, and `data:` URLs in navigation attributes. `on*` attributes are always dropped |
722
+
723
+ `parseHtml()`, `safeHtmlAllowList` and the `HtmlAllowList` type are exported for use outside a
724
+ component.
725
+
726
+ **The parsed elements are not part of any component's scoped CSS**, because no component rendered
727
+ them. Component styles reach them only through `:i()` / `:ignore()`:
728
+
729
+ ```sass
730
+ .tip-text
731
+ :i(p)
732
+ margin: 0 0 0.5rem
733
+ ```
734
+
735
+ **Choosing a host element matters.** Authored HTML is usually block level — paragraphs, tables —
736
+ and a `<p>` host cannot contain it: the parser closes the host at the first inner block tag,
737
+ leaving it empty. That breaks hydration outright. Use a `div`.
738
+
739
+ `dangerouslySetInnerHTML={{ __html }}` also works, and hands the markup to the browser as the
740
+ element's inner content. Tungsten never reconciles inside it, so reach for it only when the markup
741
+ must not be touched — `<ParseHtml>` is the default choice.
742
+
743
+ ### Markup that will be managed by hand: `<Protected>`
744
+
745
+ For an element whose contents a library or your own code will mutate directly (an editor, a chart,
746
+ a widget that owns its DOM), wrap the markup in **`<Protected>`**. It renders its children once and
747
+ Tungsten never updates them again: a parent re-render skips the subtree, so the reconciler does not
748
+ undo the manual changes. It does not stop the component's own updates, and it is a plain component,
749
+ so the initial markup still renders server-side and hydrates. Its `children` is a `ContentNode`, so
750
+ any JSX goes in without a cast — and markup you hold as a string goes in the same way through
751
+ `<ParseHtml>` or the `parseHtml()` function, which parse an HTML string into a content tree, the
752
+ same structure JSX compiles to:
753
+
754
+ ```tsx
755
+ <Protected><ParseHtml html={widgetMarkup} /></Protected>
756
+ ```
757
+
758
+ Prefer it over the older `<NativeHtml>`, whose children type is `ContentNodeHtml` and therefore
759
+ needs a cast on any JSX child. The name is not final.
760
+
761
+ **Avoid `__noEscape`.** It is an older switch that turns off escaping for an element's children.
762
+ It inherits down the entire subtree, so nested Tungsten text also renders unescaped; it only ever
763
+ worked server-side, so a client render escapes the markup into visible text; and it leaks into the
764
+ markup as a literal `__noescape` attribute.
765
+
766
+ ### Inline scripts and styles
767
+
768
+ The text children of `<script>` and `<style>` are emitted **verbatim** by the server renderer
769
+ (`renderingTreeToHtml.ts`; test `src/render/rawTextElements.sxyt.ts`). So inline code is just a
770
+ child string:
771
+
772
+ ```tsx
773
+ <script>{themeBoot}</script>
774
+ <style>{criticalCss}</style>
775
+ ```
776
+
777
+ The React idiom `<script dangerouslySetInnerHTML={{ __html: code }} />` exists because React
778
+ HTML-escapes script children; Tungsten does not, so the idiom is unnecessary — do not carry it
779
+ over. As with any framework, the string itself must not contain `</script>`.
780
+
781
+ A hand-written boot script that sets an attribute on `<html>` or `<body>` (theme, colour scheme)
782
+ does not survive hydration. **Hydration reconciles attributes to what the component rendered and
783
+ removes any it did not** (`reconcileHydratedAttributes.ts`), so the attribute is stripped the moment
784
+ that element hydrates — reported in dev as a mismatch banner (`data-theme: rendered null, server
785
+ sent …`), silently in prod. Deriving the value in `clientInit` does not help either: the first
786
+ client render then differs from the server's markup. Two ways to make the renders agree:
787
+
788
+ - **The server knows the value** — keep the preference in a cookie or the database, read it
789
+ server-side (`reqRes` / global data) and render the attribute from the root component. No script
790
+ needed.
791
+ - **Only the browser knows it** (`localStorage`, `prefers-color-scheme`) — use
792
+ [`DocInit()`](#docinit--code-that-runs-before-body), which runs the script for you and hands the
793
+ same value to the client render.
794
+
795
+ ### `DocInit()` — code that runs before `<body>`
796
+
797
+ `DocInit` is an ambient global, like `Sass` — no import. Its function is inlined into the document
798
+ head as a synchronous script, so it runs on every full page load before `<body>` exists, before
799
+ first paint and before the app bundle. The call evaluates to that function's return value on the
800
+ client, and to the second argument on the server:
801
+
802
+ ```tsx
803
+ export class Root extends SimpleStoreComponent {
804
+ theme = DocInit(() => {
805
+ const theme = localStorage.getItem('theme') ?? 'light'
806
+ document.documentElement.dataset.theme = theme
807
+ return theme
808
+ }, 'light') // what the server sees; DocInit(() => { … }) alone is the void form
809
+
810
+ content = () =>
811
+ <html data-theme={this.theme}>…</html>
812
+ }
813
+ ```
814
+
815
+ **Render whatever the script changed from the value it returned**, as above. Hydration compares the
816
+ client render with the live DOM, so the attribute the head script set and the attribute the client
817
+ render produces agree, and nothing is stripped. Markup rendered from the server value that the
818
+ script did *not* also change is still a mismatch.
819
+
820
+ The rules, enforced at build by `BabelTransformDocInit` with a code frame:
821
+
822
+ - **The function must be self-contained.** Only browser globals (`document`, `localStorage`, …)
823
+ exist in the head. A module import, an outer variable, `this` from the class, a named function
824
+ passed by reference, parameters, `async` and generators are all build errors. Write helpers
825
+ inline in the function.
826
+ - **Only a direct call of the global is recognised.** An alias (`const D = DocInit`) or a wrapper is
827
+ not rewritten, and reaches a stand-in global that throws naming the cause. A local binding named
828
+ `DocInit` is left alone.
829
+ - **A throw halts the page — there is no fallback** to the server value. The error appears in the
830
+ console where it happened, a read of the value throws, and in dev a red banner names the call
831
+ site. Guard what can fail (`localStorage` throws when site data is blocked) inside the function.
832
+ - **The value is fixed for the page load.** It is not reactive; copy it into state or the store in
833
+ `init` if it can change later, and update the DOM yourself when it does.
834
+ - **An HMR edit to a module using `DocInit` falls back to a full reload**, since the head script
835
+ only runs on a full load.
836
+
837
+ Tests run compiled output without the build transform, so the global is the throwing stand-in.
838
+ Call `installTestDocInit()` from `tungsten/testing/installTestDocInit.js` in the test setup: it runs
839
+ the function where a `document` exists and returns the server value where it does not.
840
+
841
+ ## Form binding
842
+
843
+ The bindable components give two-way binding to any object property:
844
+
845
+ ```tsx
846
+ <BindableInput name="email" bind={[this.state.form, 'email']} />
847
+ <BindableSelect name="role" bind={[this.state.form, 'role']} options={roleOptions} />
848
+ <BindableCheckbox name="active" bindChecked={[this.state.form, 'active']} />
849
+ ```
850
+
851
+ The family is `BindableInput`, `BindableInputTyped`, `BindableCheckbox`, `BindableRadio`,
852
+ `BindableSelect`, `BindableTextarea`. `bind={[object, 'key']}` accepts state, a nested state
853
+ object, or a plain instance property. Binds take an optional `filter` to transform or validate
854
+ incoming values before they reach the property — the usual use is converting an input string to
855
+ the field's real type.
856
+
857
+ `BindableSelect` takes either an `options` array of `{ value, text }` structs or ordinary JSX
858
+ children (`<option>`, `<optgroup>`, conditionals). Prefer `options` when the values form a literal
859
+ union: `value` is how option values reach the type system, and with children they degrade to
860
+ `string`. As with a plain `<select>`, `placeholder` does nothing — supply a leading empty-valued
861
+ option instead. See `src/components/bindable/BindableSelect.md` before changing that component.
862
+
863
+ A common and reasonable application pattern is to hold form values as strings in state and convert
864
+ to the domain type on submit, since browser inputs produce strings.
865
+
866
+ ## Environment
867
+
868
+ Applications register Standard Schema schemas (zod, valibot, arktype…) from the module named by
869
+ `envSchemasLocation`: `registerPrivateEnvSchema(schema)` (server only) and
870
+ `registerPublicEnvSchema(schema)` (shipped to the client), both imported from `tungsten`; either
871
+ may be omitted. Tungsten imports that module for its side effect, loads `.env` files, validates
872
+ them at startup, and injects the public values into the client bundle. The old protocol of two
873
+ named exports, `privateEnvSchema` / `publicEnvSchema`, is no longer read and fails loudly.
874
+
875
+ Access is through **ambient globals**, no import: `tungstenPrivateEnv` and `tungstenPublicEnv`.
876
+ Type them by declaration-merging `TungstenPrivateEnv` / `TungstenPublicEnv` in `declare global`.
877
+
878
+ - Never expose a private value to client code, and never copy one into the public schema or file.
879
+ - Add every new variable to the appropriate schema and to the sample env file.
880
+ - Code that runs outside Tungsten startup (standalone scripts, some test setups) must bootstrap
881
+ the globals itself before importing modules that read them.
882
+
883
+ Tungsten reads four variables of its own, which your schemas must declare like any other:
884
+ `TUNGSTEN_SERVER_PORT` (private) and `FRONTEND_PROTO` / `FRONTEND_HOSTNAME` / `FRONTEND_PORT`
885
+ (public). Both ports are validated as numbers `>= 0`.
886
+
887
+ - `TUNGSTEN_SERVER_PORT` is the port the server binds; unset means 3000. **`0` asks the OS for a
888
+ free port** (0.6.0) and `tungsten dev` reports the one it took. `tungsten start`
889
+ rejects `0` — production needs a fixed address.
890
+ - The `FRONTEND_*` trio describes the address the **browser** uses, which is not the server's own
891
+ whenever a proxy sits in front. `FRONTEND_PORT` unset or `0` means "whatever port the server
892
+ bound", so a dev server on a random port still reports a usable URL. A default port is left out
893
+ of the URL: `https://site.example`, not `https://site.example:443`.
894
+ - **`FRONTEND_HOSTNAME` was `FRONTEND_HOST`** (0.6.0). Rename it in your env files
895
+ and schema — under the old name the public address silently falls back to `localhost`.
896
+
897
+ ## Testing
898
+
899
+ **Write the failing test before the fix, and watch it fail.** Then fix, and watch it pass. A test
900
+ never seen red proves nothing — it may assert something that was already true, or never reach the
901
+ code at all. If you have already written the fix, revert it, run the test, confirm it fails for
902
+ the reason you expect, then restore it.
903
+
904
+ Two things bite here in particular. The runner executes compiled JS, not your source — an app's
905
+ test compile tree (`.tungsten/test` below), this repo's `dist/` — and a watch build may have
906
+ rebuilt your change already: check that the red run really is testing the unfixed code. And put the test at the layer the bug lives at: `createTestApp()` renders on the client
907
+ only, so a server-render or hydration bug can sit underneath a fully green suite.
908
+
909
+ Test APIs live at `tungsten/testing`, not the main entry point. The test project supplies its own
910
+ DOM implementation (happy-dom, jsdom):
911
+
912
+ ```tsx
913
+ import { Window } from 'happy-dom'
914
+ import { createTestApp } from 'tungsten/testing'
915
+
916
+ const window = new Window()
917
+ const testApp = await createTestApp(RootComponent, {
918
+ document: window.document as unknown as Document,
919
+ props: { initialName: 'Robert' },
920
+ location: '/',
921
+ })
922
+
923
+ try {
924
+ const button = testApp.container.querySelector('button')
925
+ button!.dispatchEvent(new window.Event('click') as unknown as Event)
926
+ await testApp.resolved()
927
+ expect(testApp.container.textContent).toContain('Robert')
928
+ } finally {
929
+ await testApp.unmount()
930
+ }
931
+ ```
932
+
933
+ `createTestApp()` completes the initial client render before returning. `resolved()` then waits
934
+ for Tungsten updates, DOM reconciliation, lifecycle-triggered updates, and promises returned by
935
+ registered event handlers — but not unrelated timers or network requests. Casts are only needed
936
+ when the DOM package's types are not structurally compatible with the TypeScript DOM library.
937
+ An automatically created container is appended to the supplied document's body and removed by
938
+ `unmount()`; a caller-supplied container must be empty, and is emptied but kept. Both
939
+ `createTestApp()` and `hydrateTestApp()` are async-disposable (0.6.2+), so
940
+ `await using testApp = await createTestApp(...)` unmounts at the end of the scope instead of a
941
+ `try`/`finally`. Pass `routes` (an object, or a routes function — called with `null`, as on the
942
+ client) to let components `goto()` for real (0.6.2+); without it the app has no routes and a
943
+ navigation goes nowhere. Unlike an app's routes, these need no `'404'` or `'default'` route: a miss
944
+ lands on the built-in "404 page not found", which the test's own assertions will catch. Tests
945
+ containing Tungsten JSX must be compiled through `tungsten compile` so they use Tungsten's JSX runtime and
946
+ transforms.
947
+
948
+ `hydrateTestApp()` and `hydrateTestPipelineApp()` (0.7.1+) throw at once unless `isClient` is
949
+ true: run them in a DOM suite whose `setup` puts happy-dom's `window` on the global before the tests
950
+ are imported, since tungsten reads `isClient` when it loads.
951
+
952
+ An app built with `pipeline()` or `splitPipeline()` (0.7.1+) has its own pair, imported from
953
+ `tungsten/testing/pipeline` rather than `tungsten/testing`, taking the app (the routes module's `.routes()`
954
+ export, or a smaller set built off the same stage) first:
955
+ `createTestPipelineApp(app, Root, options)` runs the app's client stages and routes `location`
956
+ against its routes; `hydrateTestPipelineApp(app, Root, options)` runs the server stages (with a
957
+ stand-in request unless `reqRes` is given), renders, carries the all-routes and networked data as the
958
+ page does, then runs the client stages and hydrates. A component whose store or markup comes from
959
+ the pipeline's context needs these: `createTestApp()` and `hydrateTestApp()` run no pipeline, so its
960
+ context is empty.
961
+
962
+ `routesOf(app, reqRes | null)` (unreleased, same import) gives a pipeline app's routes as `host()`'s
963
+ `routes` option takes them, for a component that reads the route table (a nav): it runs the app's
964
+ Init for the side `isServer` says this is - the server's needs a request, and throws on `null` -
965
+ and calls the routes function with its result. `routesOf(app, initResult)` skips Init and uses the
966
+ result given, typed as the routes function's `init` parameter:
967
+ `host(Nav, {}, { location: '/', routes: routesOf(app, { context }) })`.
968
+
969
+ Stores are created independently per test app; initialize one with `testStore()` before the root
970
+ component starts. Component tests that need the application's env globals opt in by calling
971
+ `loadEnv({ buildLocation })` once from the test runner `setup` hook, where `buildLocation` is the
972
+ test compile's output (`tungsten compile --output .tungsten/test` → `'.tungsten/test'`): the env
973
+ schemas module is imported from that compiled tree, not the dev build's. `loadEnv()` loads env once
974
+ per process and a missing/invalid env schema module is a hard error. `TUNGSTEN_TEST_ENV` (the
975
+ variable name is exported as `testEnvVariableName`) only chooses which files: set it to prefer
976
+ `.env.test*` over the base ones. The harness itself only waits for a load `setup` started
977
+ (`waitForEnvIfLoading`), so a package that never calls `loadEnv()` loads nothing.
978
+
979
+ ### `host()` — a component without a DOM
980
+
981
+ `createTestApp()` is the harness for anything that needs a document. When the question is only
982
+ "what does this component render, and what do its handlers do", `host()` is the smaller tool: it
983
+ constructs the component with a mock construct package, awaits `init`, runs the mount lifecycles,
984
+ and hands back a wrapper.
985
+
986
+ ```ts
987
+ import { host } from 'tungsten/testing'
988
+
989
+ const hosted = await host(DataTable, { head, rows: [], columns: 2, emptyText: 'Nothing found' })
990
+
991
+ hosted.content() // content(props) or content(props, state)
992
+ await hosted.updateProps({ ...props, rows }) // re-renders, runs the update lifecycles
993
+ await hosted.updateState(state => { state.open = true })
994
+ hosted.toggleRow(3) // the component's own methods, bound
995
+ ```
996
+
997
+ - **`content()` takes no arguments.** It calls the content function with what that component's
998
+ flavour takes — `(props)` for a `TungstenSimpleComponent`, `(props, state)` for the rest — so
999
+ tests stop writing `component.content(component.props, component.state)` and stop casting when a
1000
+ component's signature differs.
1001
+ - **`content()` gives the whole tree, not one component's output** (the default since
1002
+ 0.7.1; before, `resolve: true` asked for it). Every component in the tree is constructed and
1003
+ asked for its content, down to html and text, and `content()`, `updateProps()` and
1004
+ `updateState()` all hand back that tree. Resolution is async, so they are promises whatever the
1005
+ component's own `content` returns — await them — and the wrapper's type is
1006
+ `HostedResolved<Component>`. **`resolve: false`** hands back what the hosted component itself
1007
+ returned, its child components unexpanded (`one.component('UserCard')` is there, the html it
1008
+ renders is not); that `content()` is not awaited — an async `content` returns a promise, a sync
1009
+ one the node, and the type (`Hosted<Component>`) says which:
1010
+
1011
+ ```ts
1012
+ const full = await host(Page, { id: 7 })
1013
+ ensure(await full.content(), [
1014
+ ensure.one.component('UserCard').with.one.prop('name').is('Bob'), // node and props kept
1015
+ ensure.one.html('em'), ensure.one.text('Bob'), // what it rendered
1016
+ ])
1017
+ ```
1018
+
1019
+ A component node stays in the tree as written — its type, key and props — holding what it
1020
+ rendered in place of the children it was passed, so a fact reads it by name, by prop, and by what
1021
+ it put on the page. A component that ignores its children shows none of them. Child components
1022
+ run their real `init` and mount lifecycles against the same store, internal store and recorded
1023
+ navigations — so pass the store the *children* need, even where the hosted component has none.
1024
+ With a partial store, a key a child reads that the options did not supply names itself, as it
1025
+ does for the hosted component, except in the child's own `init`, which has run by then. A
1026
+ component the app renders on the client alone (`render`) resolves to its placeholder, its content
1027
+ never run.
1028
+ - **`contentToString(tree)` shows a tree as JSX** (0.7.1+, from `tungsten/testing`), to read
1029
+ what a component rendered: `console.log(contentToString(await hosted.content()))`. A resolved
1030
+ component's output sits under it, marked `⤵`; the children it was passed show as
1031
+ `children={...}`, in full with `{ children: true }`. One unresolved nests its children as written.
1032
+ A tree that renders nothing shows what it was (`{null}`, `{false}`, `{[]}`); inside a tree such
1033
+ values are left out, as the page leaves them. Text with spaces at an edge is quoted (`{'Save '}`).
1034
+ Fragments are hidden, their text running on as the page and `ensure()` text facts join it;
1035
+ `{ fragments: true }` shows them:
1036
+
1037
+ ```
1038
+ <div id='page'>
1039
+ <Middle name='Bob'> ⤵
1040
+ <p>Hi, Bob.</p>
1041
+ </Middle>
1042
+ </div>
1043
+ ```
1044
+ - **Nothing re-renders on its own.** The construct package is marked `hosted`, so state is not
1045
+ proxied on either side; `updateProps` and `updateState` are the renders. `updateState` takes
1046
+ `(state) => newState | void`, so mutate it or return a replacement.
1047
+ - **No starting state and no app state.** The component inits and renders as it really would.
1048
+ The internal store gets `location` (the option, else `/`) and empty `popMessages`, and a matched
1049
+ route only if the options give one. Reading a key nothing
1050
+ supplied throws, naming the key. If the component needs a real app, it needs `createTestApp()`.
1051
+ - **The side is the process's.** `host()` has no client/server option: `isClient`/`isServer` are
1052
+ what the framework and your components both read, so a plain node run is the server
1053
+ (`serverInit`). To test the client, install a window and DOM (happy-dom, jsdom) in the test
1054
+ runner's setup, before anything imports tungsten.
1055
+ - `hosted.title` and `hosted.navigations` record what the component tried to do to the document
1056
+ title and the router; both are recorded rather than carried out. A lifecycle failure is thrown
1057
+ rather than logged, so a test cannot pass over one.
1058
+ - **Literal props are typed by the component** (0.5.4+, also `createTestApp()`), so
1059
+ `{ type: 'success' }` or `bind: [form, 'value']` needs no `as const`. Before 0.5.4 they widen to
1060
+ `string` and arrays and fail against the component's props — annotate them. For a *generic*
1061
+ component a bare tuple still widens in any version: annotate it
1062
+ (`const bind: TypedBindVariable<Form, 'value'> = [form, 'value']`).
1063
+ - **The third argument is the options** (`HostOptions<Component>`), required for a store
1064
+ component. A component without a store of its own takes the store forms too (0.7.1+) — it
1065
+ may hold children that have one, which resolving constructs against the same instance —
1066
+ but with the schema unchecked, there being no class of its own to check it against. A store
1067
+ component is given its store one of four ways: `store` (a real `makeStore` store, its cells
1068
+ keeping state, so one can be shared between
1069
+ hosts), `storeData` (a value per key, each wrapped in a cell of its own), or the partial opt-ins
1070
+ `partialStore` / `partialStoreData`, where a key left out throws, naming itself, when read.
1071
+ Routing: `location` (a `/path`), `routes`, and either `matchedRoute: { key, params?, data? }`
1072
+ stated by the test, or `routing: true` to have `host()` match `location` against `routes`
1073
+ itself. The location defaults to `/` (0.7.1+; before, it had none). There is no default
1074
+ route: a component that reads one the test did not give throws, naming it. An internal-store component takes those routing options, not a store.
1075
+ `HostOptions`, `HostStoreOptions`, `makeStore` and `TrueStore` are all exported from
1076
+ `tungsten/testing`, so a test file needs no second import for them. For a wrapper that fixes
1077
+ `resolve`, `HostResolveOptions` / `HostDontResolveOptions` (per component) and
1078
+ `HostStoreResolveOptions` / `HostStoreDontResolveOptions` (per store schema) are the same
1079
+ options with `resolve` settled (0.7.1+), so no distributive `Omit` is needed.
1080
+ - **A real store for tests** is `makeStore(schema, new Map())`. The second argument is the
1081
+ subscribed-elements map the store's cells share; a fresh `Map` is right for a test. Cells are
1082
+ branded, so a hand-rolled `{ get, set, … }` object is not a `TrueStore` and will not type-check:
1083
+ make one with `makeStore`, or give `host()` values through `storeData`. Stub what the schema
1084
+ holds before handing it over, an API client above all:
1085
+
1086
+ ```ts
1087
+ const schema = new StoreSchema()
1088
+ schema.apiClient = stubClient // a stub, not a real client
1089
+ const store = makeStore(schema, new Map())
1090
+ ```
1091
+ - **`serverInit` runs under `host()`.** A plain node run is the server, so a store component whose
1092
+ `serverInit` calls the API reaches whatever client its store holds. Stub the client through the
1093
+ store, as above.
1094
+ - **Class components only.** `host()` takes a component class. A function component is a
1095
+ function: call it.
1096
+ - **`hostJsx()` takes the element instead** (0.7.1+), for a test that reads as the page does:
1097
+
1098
+ ```ts
1099
+ const hosted = await hostJsx(<DataTable head={head} rows={rows} columns={2} />)
1100
+ ensure(await hosted.content(), [ensure.one.html('table')])
1101
+ ```
1102
+
1103
+ It is `host()` underneath, with the same options and the same lifecycles, given the class and
1104
+ props off the element. The cost is types: TypeScript types every JSX expression as `JSX.Element`,
1105
+ so the element does not carry the component it names, and the wrapper comes back as the base
1106
+ component — `props` and `state` are `any`, the component's own methods are not on it, and
1107
+ `content()` is `ContentNode | Promise<ContentNode>`, so `await` it. Naming the component in the
1108
+ call restores all of that: `await hostJsx<DataTable>(<DataTable … />)`. Reach for `hostJsx()`
1109
+ when the test asserts the content, and `host()` when it drives the component through the
1110
+ wrapper's api. An element that is not a class component — an html tag, a fragment, a function
1111
+ component — throws, naming what it was given. Also on `host.jsx()` (0.7.1+).
1112
+ - **`host.generic()` for a component class that is generic** (0.7.1+). It takes the class in a
1113
+ call of its own, then the props:
1114
+
1115
+ ```ts
1116
+ const hosted = await host.generic(BoundValue)({ bind: [form, 'value'] })
1117
+ const own = await host.generic(BoundValue, { resolve: false })({ bind: [form, 'value'] })
1118
+ ```
1119
+
1120
+ Plain `host()` cannot infer such a class's type arguments: passed as an argument, its own type
1121
+ parameters are erased to their constraints before the props are looked at, so a tuple prop like
1122
+ `bind: [form, 'value']` widens to an array and the class stops fitting — `Target requires 2
1123
+ element(s) but source may have fewer`. Annotating the prop (`const bind: TypedBindVariable<Form,
1124
+ 'value'> = [form, 'value']`) is the way round it with `host()`; `host.generic()` needs no
1125
+ annotation and checks the props against the component the way JSX does. Options go on the first
1126
+ call, not the second — that is what keeps the inference working.
1127
+ - **A generic helper can wrap it without a cast.** Store components resolve to an
1128
+ overload whose schema is its own type parameter, inferred from the class, so a project helper
1129
+ such as `<C extends TungstenBaseComponent<any, any> & { store: ComponentStore<Schema> }>(Type,
1130
+ props, store) => host(Type, props, { store })` type-checks while `C` is still generic. The
1131
+ store options are checked as before, and a wrong schema or a store-less component is rejected
1132
+ at the `host()` call inside the helper. `HostStoreOptions<Schema>` is the options type for a
1133
+ schema, for a helper that builds on it, say making `store` optional with a mock default. It is
1134
+ a union (the four store forms times the two routing forms), so `Omit` it through a conditional,
1135
+ which distributes; a plain `Omit<HostStoreOptions<S>, 'store'>` merges the routing variants,
1136
+ `routing` widens to `boolean`, and `host()` rejects the result:
1137
+
1138
+ ```ts
1139
+ type OptionalStore<V> = V extends unknown ? Omit<V, 'store'> & { store?: TrueStore<S> } : never
1140
+ type Options = OptionalStore<Extract<HostStoreOptions<S>, { store: unknown }>>
1141
+ ```
1142
+
1143
+ Before this, `host()`'s argument tuple was conditional on the component, which a still-generic
1144
+ component cannot satisfy, so such helpers cast.
1145
+
1146
+ ### `ensure()` — facts about a content tree
1147
+
1148
+ `ensure()` states what a content tree holds, with no DOM and no string of HTML in between
1149
+ (0.7.1+). It takes the tree and a list of facts: a passing call is its own assertion, and a
1150
+ failure throws `EnsureError`, naming the fact and what it saw, with the `actual` / `expected` /
1151
+ `showDiff` fields a runner reads for a diff and a stack that starts at the `ensure()` call.
1152
+
1153
+ ```ts
1154
+ import { ensure } from 'tungsten/testing'
1155
+
1156
+ ensure(hosted.content(), [
1157
+ ensure.one.html('form'),
1158
+ ensure.two.html('input').with.one.prop('name'),
1159
+ ensure.count(2).text('Bob'),
1160
+ ensure.no.html('video'),
1161
+ ])
1162
+ ```
1163
+
1164
+ **The model is sightings, one flat list, a kind each.** The tree is flattened in document order into
1165
+ sightings: text, html elements by tag, components by the name stylesheets match, fragments, an
1166
+ element's classes one at a time, its id, and every prop but `children`. A fact meets only sightings
1167
+ of its own kind, and its quantifier counts the ones that *match* — so
1168
+ `no.html('a').with.one.prop('href')` says "no `a` with an href", not "no `a`". Depth does not
1169
+ matter: the walk goes through html elements, fragments and a component's children as written, so a
1170
+ fact at the top finds an element at any level.
1171
+ Text is joined as the page shows it — `Hi, {name}.` is one sighting, a number is text, a fragment
1172
+ does not break a run, an element either side of one does.
1173
+
1174
+ **Two things the walk does not enter.** A prop other than `children`: an element in
1175
+ `rows={[<tr/>]}` is a `prop:rows` sighting and nothing more until a fact opts in with `.content()`.
1176
+ And a component's rendered output where the tree does not hold it — the tree is the one given, so
1177
+ in a tree as written a component is read by name and by prop, not by what it renders. `host()`'s
1178
+ `content()` resolves by default, holding both (with `{ resolve: false }`, the tree as written); the
1179
+ facts are the same either way.
1180
+
1181
+ **Quantifiers**: `no` / `none`, `one` (`a` and `an` read the same), `two`, `three`, `count(n)`,
1182
+ `some` (one or more), `all` (every sighting of the kind matches, and there is at least one — all
1183
+ of none proves nothing). Each is on `ensure`, as `ensure.one`; the bare forms, for facts written
1184
+ inside a scope, come from the deep import:
1185
+ `import { one, two, children } from 'tungsten/testing/ensure.js'`.
1186
+
1187
+ **Ends** — what a sighting has to be:
1188
+
1189
+ - `text('Bob')`, `text.contains('ob')`, `text.matches(/^B/)`, and `textCi` for the same three
1190
+ ignoring case. `g` and `y` flags are dropped, so one regex is safe across sightings.
1191
+ - `interruptedText('BobAlice')` — an element's whole text with the markup between the words
1192
+ ignored, as `textContent` reads it; `.contains` and `.matches` too.
1193
+ - `html('button')`, `component('Badge')`, `fragment()`.
1194
+ - `select('nav > a.active')` — the elements a CSS selector matches (0.7.1+), counted by any
1195
+ quantifier and scoped like `html()`: `all.select('.bar').with.one.prop('data-t')`. Names are
1196
+ case-sensitive, and a capitalised one is a component, by the name `component()` matches, and it
1197
+ is the parent of what it holds: `select('Link > a')`, not `select('nav > a')`. Attributes are
1198
+ the props: `class` reads `className`, `for` reads `htmlFor`, `true` is present, `false`, `null`
1199
+ and `undefined` absent; a component's `className` and `id` are no class or id. `:has()`,
1200
+ `:not()` and the rest work. A scope is a tree of its own, so inside `.with.children` a selector
1201
+ sees no ancestor outside it. `select` is not taken by `with`: a match's own tag, classes and
1202
+ attributes go in its selector (`select('nav.main:has(a)')`).
1203
+ - `className('card')`, `id('page')` — one class at a time; with no argument, that it has one.
1204
+ - `prop('href')` — the prop is there, whatever its value, `undefined` included. Then `.is(value)`
1205
+ (`===`, so a handler or ref matches by reference), `.contains(text)`, `.matches(regex)`,
1206
+ `.exact(value)` (deep equal), `.subset(shape)` (extra keys and array elements pass, each shape
1207
+ element matching some element in any order), `.duck(shape)` (extra keys pass, but an array is a
1208
+ tuple: same length, in place), and `.content()` (the value is content; given facts, its tree).
1209
+
1210
+ **Scopes tie facts to one element.** Two facts in the list are independent —
1211
+ `one.html('button').with.one.prop('disabled')` and
1212
+ `one.html('button').with.children.one.text('Save')` can be met by two different buttons. To say one
1213
+ button is both, put both facts in the same scope:
1214
+
1215
+ - `.with([…])`, or chained as `.with.one.prop('name')` — properties of the match itself: `prop`,
1216
+ `className`, `id`, `interruptedText`, and `children` facts. `html`, `component`, `select`,
1217
+ `fragment`, `text` and `textCi` are not properties, so `with` does not take them (a type error;
1218
+ 0.7.1+) — what the element holds is `.with.children`.
1219
+ `.with(props => boolean)` is the escape hatch for what facts cannot say, and the function's name
1220
+ is what the failure shows.
1221
+ - `.with.children([…])`, or `.with.children.one.text('Save')` — facts on the content it holds.
1222
+ - `children([…])` and `children.one.html('li')` — the same children facts, written for a `with`
1223
+ list, so they mix with the element's own facts and all of them apply to that one element:
1224
+
1225
+ ```ts
1226
+ ensure(tree, [
1227
+ ensure.one.html('button').with([
1228
+ one.prop('disabled').is(true),
1229
+ children.one.text('Save'),
1230
+ ]),
1231
+ ])
1232
+ ```
1233
+
1234
+ A failure states the fact as prose, with the fact as written on a `rule:` line, and lists the
1235
+ sightings of its kind with the reason each one missed, down through the scopes. A reason names
1236
+ every inner fact the sighting missed, then those it met (`met: …`), and the nearest misses are
1237
+ listed first, ahead of the cap of 10. Where stdout has colour, sightings are white, misses red and
1238
+ facts met green; `{ color: false }` turns it off (0.7.1+):
1239
+
1240
+ ```
1241
+ ensure: expected one <a> with one href="/y", saw 0
1242
+ rule: one.html('a').with.one.prop('href').is('/y')
1243
+ ·
1244
+ <a> seen:
1245
+ <a href='/x'> (one href="/y": saw 0)
1246
+ ```
1247
+
1248
+ `ensure(tree, facts, { readable: false })` states it only as the fact was written:
1249
+
1250
+ ```
1251
+ ensure: expected one.html('a').with.one.prop('href').is('/y'), saw 0
1252
+ html:a seen:
1253
+ <a href='/x'> (one.prop('href').is('/y'): saw 0)
1254
+ ```
1255
+
1256
+ ### `tungsten compile` — preparing code for tests
1257
+
1258
+ A one-shot dev compilation without a server. By default it compiles JavaScript (JSX and the Babel
1259
+ transforms), stylesheets, client support files, assets and public files into `.tungsten/dev`,
1260
+ cleaning each selected target's existing output first (`--no-clean` keeps it). `--output <root>`
1261
+ selects an independent output root with the same layout (`code`, `.client`, `.static`, `.assets`,
1262
+ `.public`, `.componentCss`, `.packages`); cleaning and the package cache are scoped to it. Limit
1263
+ the work with `--js`, `--css`, `--client`, `--assets`, `--public` (`--all` is the explicit
1264
+ default). `--watch` keeps the js, css, asset and public compilers running; client support files
1265
+ are generated once. For orchestration, `--ready-file <file>` writes a small JSON file only after
1266
+ the initial compilation succeeds (removed by a failed watch cycle, recreated by the next success),
1267
+ and `--quiet` drops per-file messages but keeps errors and cycle status:
1268
+
1269
+ ```sh
1270
+ tungsten compile --watch --output .tungsten/test --ready-file .tungsten/test.ready --quiet
1271
+ ```
1272
+
1273
+ Test files are left out of every compile unless `--tests` is passed: mark them in config with
1274
+ `testDirs` / `testPatterns` (the same two shapes as `ignoreDirs` / `ignorePatterns`, which drop
1275
+ files from every pipeline; `--ignore-dirs` / `--ignore-patterns` override those two from the
1276
+ command line). **On upgrade, add `--tests` to the test compile**, or it emits no test files and
1277
+ the runner finds nothing to run. Whether that fails CI is the runner's call: sxy-test-runner 2.4.12
1278
+ exits 3 for "no test files", earlier versions used other codes, and a runner that treats it as a
1279
+ pass goes green having run nothing, so check for the "no tests" case rather than assume. `--packages` also compiles imported packages into the build's `.packages` tree for
1280
+ the dev server to serve; it is off by default, and a use for it outside the dev server has not
1281
+ come up, since compiled code left to node's own resolution needs none of it. Which sources each
1282
+ pipeline compiles is set by `clientDirs` / `clientPatterns` (compiled for the browser with every
1283
+ plugin, into `.tungsten/<mode>/code`) and `rawDirs` / `rawPatterns` (compiled for node with types
1284
+ stripped and imports untouched, into `.tungsten/<mode>-raw`, for server middleware and the like).
1285
+ Each pipeline compiles **its selection and not the ignores**: client and not ignore, raw and not
1286
+ ignore. Unset, the client selection is everything and the raw selection is nothing; a file may be
1287
+ in both. Because the ignores win, ignoring server code also removes it from the raw pipeline: that
1288
+ is fine when the app's own build emits the server into `codeDir` (e.g. `ignoreDirs: ['server']`),
1289
+ but to have Tungsten compile it, narrow `clientDirs` and put it in `rawDirs` instead (e.g.
1290
+ `clientDirs: ['client', 'common'], rawDirs: ['server', 'common']`). Keep node-only modules out
1291
+ of the client set: the client pipeline does not tolerate imports of node built-ins when it
1292
+ compiles packages, which the dev server does. `--fresh` ignores the packages and styles caches.
1293
+ `sourceMaps: true` in `tungsten.config.js` appends an inline source map to each
1294
+ compiled app file in both pipelines, for `tungsten compile` and the dev server alike, chained
1295
+ through any map the source already references (e.g. tsc's `.js.map`), so debuggers (and node run
1296
+ with `--enable-source-maps`) point at the original source. Packages in `.packages` and the
1297
+ production bundle are not mapped. `tungsten compile --source-maps` / `--no-source-maps` override
1298
+ the config entry for one compile.
1299
+
1300
+ `skipPackageCompilation` in `tungsten.config.js` (one glob or an array, matched against the
1301
+ JavaScript files Tungsten receives, extensions untranslated) names files to transform and emit
1302
+ without traversing or copying their package dependencies; bare package imports in them are left as
1303
+ they are. Example: `'**/*.domTest.js'`.
1304
+
1305
+ ## Dev server behaviour
1306
+
1307
+ Things that look like application bugs but are not:
1308
+
1309
+ - **HMR is on by default.** A source edit hot-swaps the changed component in place, keeping its
1310
+ position, props and state, and swaps CSS without a reload; anything it cannot handle falls back
1311
+ to a full page reload. The `hmr` config option picks the branch: `true` (default), `'reload'` for
1312
+ a plain full reload on every change, `false` for no live reload at all. Design and limits are in
1313
+ `docs/hmr.md`.
1314
+ - **Server modules are re-imported per request.** The dev server busts Node's ESM cache with an
1315
+ incrementing query string so server changes are picked up without a restart. Two consequences:
1316
+ - **Module-scope singletons are not singletons.** A database client or connection pool created
1317
+ at module scope in your server code is rebuilt on nearly every request, and old pools are not
1318
+ released — under load this exhausts the pool. The framework-sanctioned fix is the
1319
+ **`._cached_` filename convention**: the loader (`dist/moduleReloader.js`) exempts any module
1320
+ matching `*._cached_.{js,ts,jsx,tsx,…}` **and its dependency graph** from reloading. Put the
1321
+ client construction in e.g. `server/db/client._cached_.ts` and re-export it.
1322
+ - **A flat per-request latency** before any endpoint code runs, which grows with the number of
1323
+ first-party server modules, because the entry module's whole import graph is re-imported. It
1324
+ is the same for a database-free endpoint and for a 404. Do not chase it in application code;
1325
+ it does not exist in a production build.
1326
+ - Tungsten's own env globals *do* reload per page request, but a plain static import inside a
1327
+ middleware module resolves to the cached instance — so app-level env read at module scope by
1328
+ your own middleware still needs a restart.
1329
+ - **Startup fails loudly if the port is not fully yours** (0.6.0). Both servers
1330
+ reject on a bind error, and after binding fetch their own boot id from `/__tungsten_boot_probe__`
1331
+ over `127.0.0.1` and `::1`; if another process answers on either, or accepts and never answers,
1332
+ `tungsten dev`/`start` exits non-zero naming the address and the reason, instead of printing
1333
+ "ready" while a stale server takes the traffic. Stop the other server and start again.
1334
+ - **`TUNGSTEN_SERVER_PORT=0` starts dev on a free port** (0.6.0). The ready line
1335
+ names the port taken, and the browser opens on it. Pairing a random port with a fixed
1336
+ `FRONTEND_PORT` warns at startup: a proxy cannot be pointed at a port that changes every boot.
1337
+ - **The origin-mismatch warning compares hosts, not whole origins** (0.6.0). It
1338
+ fires when a request carries an `Origin` matching your configured frontend but arrives at a
1339
+ different host — the case where cookies silently do not travel. The scheme is ignored on purpose:
1340
+ Tungsten always serves http, so behind a TLS-terminating proxy every request would otherwise look
1341
+ like a mismatch, which is what earlier versions reported. `suppressOriginMismatchWarning: true`
1342
+ turns it off; the production server repeats it at most once a day per host.
1343
+
1344
+ ## Everyday workflow
1345
+
1346
+ 1. Add or adjust the API endpoint and its tests.
1347
+ 2. Add the route and its `data` loader for the page's initial read.
1348
+ 3. Build the page as a typed class component; use the store wrapper only if it needs shared state.
1349
+ 4. Bind ordinary form fields; call the API from event handlers for mutations.
1350
+ 5. Handle every result status the endpoint can return, then refresh local or route data.
1351
+ 6. Type-check, then run the test suite.
1352
+
1353
+ ## Things to avoid
1354
+
1355
+ The principle behind most of these: **do not deviate between the server render and the client
1356
+ render.** In the normal flow the two are identical, and hydration depends on it. The only sanctioned
1357
+ deviations are updates after the first render, `DocInit()` mutations made before hydration, and
1358
+ client-only rendering — `csr: true` in config (the body ships empty and the client mounts fresh),
1359
+ `serverSideRouting: false` (the head's children too, and the client fetches the data), or a
1360
+ component's `static render = 'client'` / `static render = { location: 'client', placeholder }`
1361
+ (the server emits the placeholder, the client renders the component). Anything else that makes
1362
+ the first client render differ from the server's markup is a bug, not a technique.
1363
+
1364
+ - Do not use `setState`, immutable state updates, or React hooks. Mutate state directly.
1365
+ - Do not mutate state inside `content` or anything it calls.
1366
+ - Do not write a descendant selector for markup a **child component** renders — name the
1367
+ component as the selector instead. Check this every time you style what turns out to be a
1368
+ component.
1369
+ - Do not rely on tag-vs-class specificity in scoped styles; they are equal.
1370
+ - Do not fetch a page's initial data only in `clientInit` — it loses SSR and the first render.
1371
+ - Do not touch browser globals in `init`, route code, or `content` without a guard; use
1372
+ `clientInit`.
1373
+ - Do not produce environment-dependent output during render — it breaks hydration.
1374
+ - Do not bypass `<Link>` for a path that should stay client-side.
1375
+ - Do not put page-local state, or fetched records, in the global store to avoid passing props.
1376
+ - Do not set `title` on anything but a page component.
1377
+ - Do not create module-scope connections or caches in server code without the `._cached_`
1378
+ convention.
1379
+ - Do not put event handlers in `<head>` — it is not hydrated.
1380
+ - Do not use `dangerouslySetInnerHTML` for inline `<script>`/`<style>` code — their children are
1381
+ not escaped; write `<script>{code}</script>`. And do not expect an attribute a boot script sets on
1382
+ `<html>`/`<body>` to survive hydration unless the root component renders it too.
1383
+ - Do not "correct" `.jsx`/`.js` import extensions in `.tsx` source.
1384
+ - Do not treat the published documentation's names and examples as definitive over the installed
1385
+ declarations.