tungsten 0.4.11 → 0.4.12

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 (293) hide show
  1. package/dist/.build-complete +1 -1
  2. package/dist/AnyComponent.js +1 -1
  3. package/dist/Components.d.ts.map +1 -1
  4. package/dist/Components.js +15 -16
  5. package/dist/ContentNode.js +2 -2
  6. package/dist/DomRegion.js +1 -1
  7. package/dist/Framework.d.ts +2 -1
  8. package/dist/Framework.d.ts.map +1 -1
  9. package/dist/Framework.js +43 -34
  10. package/dist/FrameworkConfig.d.ts +16 -0
  11. package/dist/FrameworkConfig.d.ts.map +1 -1
  12. package/dist/FunctionComponentStandIn.js +8 -8
  13. package/dist/Instance/Instance.js +11 -11
  14. package/dist/RenderedContentNode.js +2 -2
  15. package/dist/RenderingNode.js +2 -2
  16. package/dist/Script.js +1 -1
  17. package/dist/Servers/DevServer.d.ts.map +1 -1
  18. package/dist/Servers/DevServer.js +29 -29
  19. package/dist/Servers/ProdServer.js +14 -14
  20. package/dist/Servers/StaticSiteServer.js +3 -3
  21. package/dist/Servers/TungstenServer.js +5 -5
  22. package/dist/Servers/devErrorPageAutoRetry.js +1 -1
  23. package/dist/Servers/hono/TungstenServerHono.js +5 -5
  24. package/dist/Servers/initStores.js +3 -3
  25. package/dist/Servers/loadEnvsDev.js +6 -6
  26. package/dist/Servers/routing.js +3 -3
  27. package/dist/Store/createStores.js +2 -2
  28. package/dist/Store/makeStore.js +2 -2
  29. package/dist/Store/registerStore.js +2 -2
  30. package/dist/TungstenApp.js +3 -3
  31. package/dist/TungstenStyleObject.js +1 -1
  32. package/dist/__deproxy.js +2 -2
  33. package/dist/_client/client.js +3 -3
  34. package/dist/alive.js +1 -1
  35. package/dist/api/getApiRoutes.js +3 -3
  36. package/dist/api/getApiRoutesHono.js +3 -3
  37. package/dist/api/getExport.js +4 -4
  38. package/dist/api/getExportDev.js +1 -1
  39. package/dist/appOutput.js +1 -1
  40. package/dist/auth/index.js +2 -2
  41. package/dist/babelPlugins/BabelAddDevCacheBust.d.ts.map +1 -1
  42. package/dist/babelPlugins/BabelAddDevCacheBust.js +4 -2
  43. package/dist/babelPlugins/BabelTransformBindDirect.js +2 -2
  44. package/dist/babelPlugins/BabelTransformBindVar.js +3 -3
  45. package/dist/babelPlugins/BabelTransformCjsToEsm.js +1 -1
  46. package/dist/babelPlugins/BabelTransformComponentState.js +2 -2
  47. package/dist/babelPlugins/BabelTransformComponentStyles.d.ts +2 -0
  48. package/dist/babelPlugins/BabelTransformComponentStyles.d.ts.map +1 -1
  49. package/dist/babelPlugins/BabelTransformComponentStyles.js +27 -11
  50. package/dist/babelPlugins/BabelTransformCssImports.js +1 -1
  51. package/dist/babelPlugins/BabelTransformDeproxyState.js +1 -1
  52. package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.d.ts.map +1 -1
  53. package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.js +6 -2
  54. package/dist/babelPlugins/BabelTransformPackageImports.d.ts.map +1 -1
  55. package/dist/babelPlugins/BabelTransformPackageImports.js +66 -49
  56. package/dist/babelPlugins/BabelTransformReactive.js +1 -1
  57. package/dist/babelPlugins/BabelTransformReactiveSvelteStyle.js +1 -1
  58. package/dist/babelPlugins/BabelTransformSxyFrameworkImports.js +1 -1
  59. package/dist/babelPlugins/BabelTransformUniqueComponents.js +1 -1
  60. package/dist/babelPlugins/fixImportsInSassErrorMessage.js +1 -1
  61. package/dist/babelPlugins/test.js +1 -1
  62. package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.js +3 -3
  63. package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.js +1 -1
  64. package/dist/babelPlugins/transformPackageImports/getWebLocationOfPackageFile.js +2 -2
  65. package/dist/bin/args.js +1 -1
  66. package/dist/bin/commands/build.js +5 -5
  67. package/dist/bin/commands/buildHelp.js +1 -1
  68. package/dist/bin/commands/clean.js +4 -4
  69. package/dist/bin/commands/compile.d.ts.map +1 -1
  70. package/dist/bin/commands/compile.js +24 -17
  71. package/dist/bin/commands/compileSimplePackage.js +2 -2
  72. package/dist/bin/commands/dev.d.ts.map +1 -1
  73. package/dist/bin/commands/dev.js +16 -9
  74. package/dist/bin/commands/devmon.js +4 -4
  75. package/dist/bin/commands/help.js +2 -2
  76. package/dist/bin/commands/start.js +2 -2
  77. package/dist/bin/commands/static.js +3 -3
  78. package/dist/bin/index.js +13 -13
  79. package/dist/bin/moduleLoadAnalysis.js +2 -2
  80. package/dist/browserStorage.js +2 -2
  81. package/dist/build/babel.user.common.config.d.ts +7 -2
  82. package/dist/build/babel.user.common.config.d.ts.map +1 -1
  83. package/dist/build/babel.user.common.config.js +14 -15
  84. package/dist/build/bundle.d.ts +1 -1
  85. package/dist/build/bundle.d.ts.map +1 -1
  86. package/dist/build/bundle.js +15 -7
  87. package/dist/build/bundleBabelOptions.d.ts +6 -0
  88. package/dist/build/bundleBabelOptions.d.ts.map +1 -0
  89. package/dist/build/bundleBabelOptions.js +23 -0
  90. package/dist/build/combineComponentCss.js +2 -2
  91. package/dist/build/compileJavascript.d.ts +4 -0
  92. package/dist/build/compileJavascript.d.ts.map +1 -1
  93. package/dist/build/compileJavascript.js +148 -90
  94. package/dist/build/compileStyles.js +4 -4
  95. package/dist/build/compileUserApp.d.ts +1 -1
  96. package/dist/build/compileUserApp.d.ts.map +1 -1
  97. package/dist/build/compileUserApp.js +15 -12
  98. package/dist/build/componentStylesCache.d.ts +10 -0
  99. package/dist/build/componentStylesCache.d.ts.map +1 -0
  100. package/dist/build/componentStylesCache.js +54 -0
  101. package/dist/build/copyAssets.js +1 -1
  102. package/dist/build/copyPackageModulesToPackagesFolder.js +4 -4
  103. package/dist/build/copyPublicFiles.js +1 -1
  104. package/dist/build/createClientFiles.js +3 -3
  105. package/dist/build/createInstanceConfigFile.js +2 -2
  106. package/dist/build/createPackageVirtualFileSystems.js +1 -1
  107. package/dist/build/devBundle.js +5 -5
  108. package/dist/build/devBundle.rollup.config.d.ts.map +1 -1
  109. package/dist/build/devBundle.rollup.config.js +0 -1
  110. package/dist/build/frameworkDestLocation.d.ts +1 -0
  111. package/dist/build/frameworkDestLocation.d.ts.map +1 -1
  112. package/dist/build/frameworkDestLocation.js +8 -4
  113. package/dist/build/frameworkStylesheets.js +1 -1
  114. package/dist/build/getAllSxyClientModules.js +2 -2
  115. package/dist/build/getPackageDirForFile.js +1 -1
  116. package/dist/build/getSxyClientPackageAliases.d.ts.map +1 -1
  117. package/dist/build/getSxyClientPackageAliases.js +4 -2
  118. package/dist/build/getTempDirForAppCompilation.js +1 -1
  119. package/dist/build/makeBabelRawConfig.d.ts +3 -0
  120. package/dist/build/makeBabelRawConfig.d.ts.map +1 -0
  121. package/dist/build/makeBabelRawConfig.js +12 -0
  122. package/dist/build/makeBabelUserDevConfig.d.ts +1 -1
  123. package/dist/build/makeBabelUserDevConfig.d.ts.map +1 -1
  124. package/dist/build/makeBabelUserDevConfig.js +11 -8
  125. package/dist/build/makeBabelUserProdConfig.d.ts +1 -1
  126. package/dist/build/makeBabelUserProdConfig.d.ts.map +1 -1
  127. package/dist/build/makeBabelUserProdConfig.js +10 -5
  128. package/dist/build/processPackage.js +3 -3
  129. package/dist/build/rollup.user.prod.config.d.ts.map +1 -1
  130. package/dist/build/rollup.user.prod.config.js +13 -11
  131. package/dist/build/rollupExtractComponentStylesheets.js +2 -2
  132. package/dist/build/sassImportParser.js +2 -2
  133. package/dist/build/tallyBabelPlugins.d.ts.map +1 -1
  134. package/dist/build/tallyBabelPlugins.js +2 -7
  135. package/dist/calculateImportedStaticFileLocations.js +2 -2
  136. package/dist/calledFrom.js +2 -2
  137. package/dist/compat/forwardRef.js +1 -1
  138. package/dist/compat/index.js +1 -1
  139. package/dist/componentProxyHandlers.js +3 -3
  140. package/dist/components/Link.js +2 -2
  141. package/dist/components/PopMessages.js +3 -3
  142. package/dist/components/RawHtml.js +2 -2
  143. package/dist/components/Stylesheet.js +3 -3
  144. package/dist/components/bindable/BindableCheckbox.js +1 -1
  145. package/dist/components/bindable/BindableInput.js +1 -1
  146. package/dist/components/bindable/BindableInputNonString.js +1 -1
  147. package/dist/components/bindable/BindableInputString.js +1 -1
  148. package/dist/components/bindable/BindableInputTyped.js +1 -1
  149. package/dist/components/bindable/BindableInputTypedLegacy.js +1 -1
  150. package/dist/components/bindable/BindableRadio.js +1 -1
  151. package/dist/components/bindable/BindableSelect.js +1 -1
  152. package/dist/components/bindable/BindableTextarea.js +1 -1
  153. package/dist/components/library/RichTextEditor/RichTextEditor.js +8 -8
  154. package/dist/components/library/RichTextEditor/contentTree.js +4 -4
  155. package/dist/components/library/RichTextEditor/sanitizeAuthoredHtml.js +2 -2
  156. package/dist/components/library/__StatefulMessage/StatefulMessage.js +2 -2
  157. package/dist/components/library/index.js +2 -2
  158. package/dist/createElement.js +1 -1
  159. package/dist/defaultConfig.d.ts +0 -1
  160. package/dist/defaultConfig.d.ts.map +1 -1
  161. package/dist/defaultConfig.js +2 -2
  162. package/dist/deleteDirs.js +1 -1
  163. package/dist/env/addToEnv.js +1 -1
  164. package/dist/env/funcs.js +4 -4
  165. package/dist/env/getEnvSchemas.d.ts.map +1 -1
  166. package/dist/env/getEnvSchemas.js +10 -6
  167. package/dist/env/privateEnv.js +2 -2
  168. package/dist/env/privateEnvOrThrow.js +1 -1
  169. package/dist/env/publicEnv.js +1 -1
  170. package/dist/env/publicEnvOrThrow.js +1 -1
  171. package/dist/filePathFromUrl.js +1 -1
  172. package/dist/findProjectDir.js +1 -1
  173. package/dist/findUserConfig.js +5 -5
  174. package/dist/fixExtension.d.ts.map +1 -1
  175. package/dist/fixExtension.js +5 -3
  176. package/dist/frameworkConfigSchema.d.ts +16 -0
  177. package/dist/frameworkConfigSchema.d.ts.map +1 -1
  178. package/dist/frameworkConfigSchema.js +12 -0
  179. package/dist/getComponent.js +5 -5
  180. package/dist/getComponentDev.js +1 -1
  181. package/dist/getFrameworkDir.js +1 -1
  182. package/dist/getRoutes.js +5 -5
  183. package/dist/getRoutesDevs.js +1 -1
  184. package/dist/getUserConfig.js +7 -7
  185. package/dist/hasValidKey.js +1 -1
  186. package/dist/helpers/index.js +2 -2
  187. package/dist/hmr/applyHmrModule.js +5 -5
  188. package/dist/hmr/componentIdentity.js +2 -2
  189. package/dist/hooks/clearCurrentComponent.js +1 -1
  190. package/dist/hooks/getCurrentComponent.js +3 -3
  191. package/dist/hooks/index.js +5 -5
  192. package/dist/hooks/setCurrentComponent.js +1 -1
  193. package/dist/hooks/useCallback.js +2 -2
  194. package/dist/hooks/useEffect.js +2 -2
  195. package/dist/hooks/useInstance.js +1 -1
  196. package/dist/hooks/useMemo.js +2 -2
  197. package/dist/hooks/useState.js +3 -3
  198. package/dist/hydrate/hydrate.js +31 -31
  199. package/dist/hydrate/reconcileHydratedAttributes.js +3 -3
  200. package/dist/index.js +2 -2
  201. package/dist/indexInner.d.ts +1 -1
  202. package/dist/indexInner.d.ts.map +1 -1
  203. package/dist/indexInner.js +45 -45
  204. package/dist/innerHtmlFromProps.js +1 -1
  205. package/dist/isBrowser.js +1 -1
  206. package/dist/isDev.js +1 -1
  207. package/dist/isProd.js +1 -1
  208. package/dist/isServer.js +1 -1
  209. package/dist/jsx-runtime.js +1 -1
  210. package/dist/jsxRuntime.d.ts.map +1 -1
  211. package/dist/jsxRuntime.js +12 -7
  212. package/dist/jsxRuntimeSignals.d.ts.map +1 -1
  213. package/dist/jsxRuntimeSignals.js +15 -8
  214. package/dist/makeFinalConfig.js +1 -1
  215. package/dist/makeInstanceConfigFromFrameworkConfig.js +1 -1
  216. package/dist/makeServerRpc.js +3 -3
  217. package/dist/markOptionSelected.js +1 -1
  218. package/dist/nbsp.js +1 -1
  219. package/dist/output.js +1 -1
  220. package/dist/pop.js +2 -2
  221. package/dist/postcssPlugins/TransformCssNames.js +6 -6
  222. package/dist/postcssPlugins/parseSelectors.js +1 -1
  223. package/dist/postcssPlugins/parseSelectorsRich.js +1 -1
  224. package/dist/postcssPlugins/scopeAnimationValue.js +2 -2
  225. package/dist/propsAreEqual.js +3 -3
  226. package/dist/rawHtml/filterContentNode.js +4 -4
  227. package/dist/rawHtml/parseHtml.js +4 -4
  228. package/dist/rawHtml/sanitizeHtml.js +3 -3
  229. package/dist/rawHtml/tokenizeHtml.js +2 -2
  230. package/dist/render/addImportMap.js +2 -2
  231. package/dist/render/classComponentNodeToRenderingTree.js +4 -4
  232. package/dist/render/componentNodeToRenderingTree.js +7 -7
  233. package/dist/render/contentNodeToHtml.js +11 -11
  234. package/dist/render/contentToHtml.js +4 -4
  235. package/dist/render/contentToHtmlDev.js +1 -1
  236. package/dist/render/contentTreeToRenderingTree.js +7 -7
  237. package/dist/render/functionComponentNodeToRenderingTree.js +4 -4
  238. package/dist/render/getFunctionBodyAsString.js +1 -1
  239. package/dist/render/instantiateClassComponent.js +2 -2
  240. package/dist/render/instantiateComponent.js +3 -3
  241. package/dist/render/instantiateFunctionComponent.js +2 -2
  242. package/dist/render/printComponentNameInSource.js +1 -1
  243. package/dist/render/processHead.js +5 -5
  244. package/dist/render/processHtmlNode.js +1 -1
  245. package/dist/render/processProps.js +2 -2
  246. package/dist/render/processRenderingNodeHtml.js +6 -6
  247. package/dist/render/renderingTreeToHtml.js +16 -16
  248. package/dist/render/rootToHtml.js +2 -2
  249. package/dist/render/rootToHtmlDev.js +1 -1
  250. package/dist/requests/fetch/delete.js +2 -2
  251. package/dist/requests/fetch/get.js +3 -3
  252. package/dist/requests/fetch/patch.js +2 -2
  253. package/dist/requests/fetch/post.js +2 -2
  254. package/dist/requests/fetch/put.js +2 -2
  255. package/dist/requests/index.js +5 -5
  256. package/dist/routing/MatchedRoute.js +2 -2
  257. package/dist/routing/getPathPriority.js +1 -1
  258. package/dist/routing/matchPath.js +3 -3
  259. package/dist/routing/patternToRegex.js +1 -1
  260. package/dist/server.js +3 -3
  261. package/dist/serverModuleLocation.d.ts +3 -0
  262. package/dist/serverModuleLocation.d.ts.map +1 -0
  263. package/dist/serverModuleLocation.js +12 -0
  264. package/dist/settings.d.ts +4 -0
  265. package/dist/settings.d.ts.map +1 -1
  266. package/dist/settings.js +9 -0
  267. package/dist/standardSchema.js +1 -1
  268. package/dist/staticGen/getAppRoutes.js +3 -3
  269. package/dist/staticGen/staticGen.js +7 -7
  270. package/dist/style/jssToCss.js +3 -3
  271. package/dist/style/styleContent.js +1 -1
  272. package/dist/style/styleContentSxy.js +8 -8
  273. package/dist/style/unusedStyles.js +1 -1
  274. package/dist/sync/index.js +1 -1
  275. package/dist/syncServer/preload.js +1 -1
  276. package/dist/testing/host.js +1 -1
  277. package/dist/testing/hydrateTestApp.js +9 -9
  278. package/dist/testing/index.js +11 -11
  279. package/dist/testing/installTestStyleProcessors.js +1 -1
  280. package/dist/testing/loadEnv.js +3 -3
  281. package/dist/testing/loadEnvSetup.js +1 -1
  282. package/dist/testing/temp/componentPackageMock.js +2 -2
  283. package/dist/testing/temp/contentHtmlElements.js +2 -2
  284. package/dist/throwError.js +2 -2
  285. package/dist/timeProfiler.d.ts +1 -1
  286. package/dist/timeProfiler.d.ts.map +1 -1
  287. package/dist/timeProfiler.js +61 -25
  288. package/dist/update/integrateUpdateVdom.js +28 -28
  289. package/dist/validChildren.js +2 -2
  290. package/dist/warnOnFrameworkChange.js +2 -2
  291. package/dist/zones/react.js +3 -3
  292. package/package.json +18 -11
  293. package/types/modules.d.ts +2 -0
@@ -1,5 +1,5 @@
1
1
  // core
2
- export * from "./TungstenAppOld.js";
2
+ export * from './TungstenAppOld.js';
3
3
  export { TungstenSimpleComponent, TungstenSimpleComponent as SimpleComponent,
4
4
  // static component
5
5
  TungstenStatefulComponent, TungstenStatefulComponent as StatefulComponent,
@@ -7,11 +7,11 @@ TungstenStatefulComponent, TungstenStatefulComponent as StatefulComponent,
7
7
  //TungstenBaseStoreComponent as TungstenBaseStoreComponent, TungstenBaseStoreComponent as BaseStoreComponent,
8
8
  TungstenBaseSimpleStoreComponent, TungstenBaseSimpleStoreComponent as BaseSimpleStoreComponent, TungstenBaseStatefulStoreComponent, TungstenBaseStatefulStoreComponent as BaseStatefulStoreComponent } from "./Components.js";
9
9
  // other
10
- export * from "./alive.js";
11
- export * from "./appOutput.js";
12
- export * from "./AssignedStyle.js"; // assigned style symbol and assigned style type
13
- export * from "./clone.js";
14
- export * from "./components/Await.js";
10
+ export * from './alive.js';
11
+ export * from './appOutput.js';
12
+ export * from './AssignedStyle.js'; // assigned style symbol and assigned style type
13
+ export * from './clone.js';
14
+ export * from './components/Await.js';
15
15
  export * from "./components/bindable/BindableCheckbox.js";
16
16
  export * from "./components/bindable/BindableInput.js";
17
17
  export * from "./components/bindable/BindableInputTyped.js";
@@ -19,58 +19,58 @@ export * from "./components/bindable/BindableRadio.js";
19
19
  export * from "./components/bindable/BindableSelect.js";
20
20
  export * from "./components/bindable/BindableTextarea.js";
21
21
  export * from "./components/GoToComponent.js";
22
- export * from "./components/Lazy.js";
22
+ export * from './components/Lazy.js';
23
23
  export * from "./components/Link.js";
24
24
  export * from "./components/PopMessages.js";
25
25
  export * from "./components/RawHtml.js";
26
26
  export * from "./components/RouteRedirectComponent.js";
27
- export { parseHtml } from "./rawHtml/parseHtml.js";
28
- export { safeHtmlAllowList } from "./rawHtml/safeHtmlAllowList.js";
29
- export { sanitizeHtml } from "./rawHtml/sanitizeHtml.js";
30
- export { filterContentNode } from "./rawHtml/filterContentNode.js";
31
- export { contentNodeToHtml } from "./render/contentNodeToHtml.js";
27
+ export { parseHtml } from './rawHtml/parseHtml.js';
28
+ export { safeHtmlAllowList } from './rawHtml/safeHtmlAllowList.js';
29
+ export { sanitizeHtml } from './rawHtml/sanitizeHtml.js';
30
+ export { filterContentNode } from './rawHtml/filterContentNode.js';
31
+ export { contentNodeToHtml } from './render/contentNodeToHtml.js';
32
32
  export * from "./components/WebRedirectComponent.js";
33
33
  export * from "./nbsp.js";
34
- export { pop, dismissPop } from "./pop.js";
35
- export * from "./browserStorage.js";
36
- export { createElement } from "./createElement.js";
37
- export * from "./createRef.js";
34
+ export { pop, dismissPop } from './pop.js';
35
+ export * from './browserStorage.js';
36
+ export { createElement } from './createElement.js';
37
+ export * from './createRef.js';
38
38
  //export * from './env/funcs.js'
39
39
  //export * from './env/index.js'
40
- export { foreach } from "./foreach.js";
41
- export * from "./helpers/index.js";
42
- export * from "./hooks/index.js";
40
+ export { foreach } from './foreach.js';
41
+ export * from './helpers/index.js';
42
+ export * from './hooks/index.js';
43
43
  export * from "./hydrate/hydrate.js";
44
- export * from "./jsxRuntime.js";
44
+ export * from './jsxRuntime.js';
45
45
  //export { tungstenPrivateEnv, tungstenPublicEnv } from './env/env.js'
46
46
  //export * from './env/parseEnv.js'
47
- export * from "./makeServerRpc.js";
48
- export { isBrowser } from "./isBrowser.js";
49
- export { isClient } from "./isClient.js";
50
- export { isServer } from "./isServer.js";
51
- export { isDev } from "./isDev.js";
52
- export { isProd } from "./isProd.js";
53
- export { logAndReturn } from "./logAndReturn.js";
47
+ export * from './makeServerRpc.js';
48
+ export { isBrowser } from './isBrowser.js';
49
+ export { isClient } from './isClient.js';
50
+ export { isServer } from './isServer.js';
51
+ export { isDev } from './isDev.js';
52
+ export { isProd } from './isProd.js';
53
+ export { logAndReturn } from './logAndReturn.js';
54
54
  //export * from './RenderRoutes.js' // maybe we won't use render routes, instead Router and Route
55
- export * from "./requests/index.js";
55
+ export * from './requests/index.js';
56
56
  //export * from './zones/react.jsx'
57
- export { registerGlobalData } from "./routing/registerGlobalData.js";
58
- export * from "./routing/MatchedRoute.js";
59
- export * from "./routing/RedirectCode.js";
57
+ export { registerGlobalData } from './routing/registerGlobalData.js';
58
+ export * from './routing/MatchedRoute.js';
59
+ export * from './routing/RedirectCode.js';
60
60
  export * from "./routing/Route.js";
61
61
  export * from "./routing/Router.js";
62
- export * from "./routing/RouteContentFunction.js";
63
- export * from "./routing/RoutingRedirect.js";
64
- export * from "./routing/WebRedirect.js";
65
- export * from "./when.js";
66
- export * from "./serverRpc.js";
67
- export * from "./settings.js";
68
- export * from "./Store/getStore.js";
69
- export * from "./Store/registerStore.js";
62
+ export * from './routing/RouteContentFunction.js';
63
+ export * from './routing/RoutingRedirect.js';
64
+ export * from './routing/WebRedirect.js';
65
+ export * from './when.js';
66
+ export * from './serverRpc.js';
67
+ export * from './settings.js';
68
+ export * from './Store/getStore.js';
69
+ export * from './Store/registerStore.js';
70
70
  export * from "./components/Stylesheet.js";
71
- export { TungstenError } from "./TungstenError.js";
72
- export * from "./__deproxy.js";
73
- export { $original } from "./componentProxyHandlers.js";
74
- export * from "./ContentNode.js"; // types and type guards
75
- export { StringIsPath, RouteKeyIsPath } from "./routing/RouteTypes.js";
76
- export { makeTungstenErrorInfo } from "./routing/TungstenErrorInfo.js";
71
+ export { TungstenError } from './TungstenError.js';
72
+ export * from './__deproxy.js';
73
+ export { $original } from './componentProxyHandlers.js';
74
+ export * from './ContentNode.js'; // types and type guards
75
+ export { StringIsPath, RouteKeyIsPath } from './routing/RouteTypes.js';
76
+ export { makeTungstenErrorInfo } from './routing/TungstenErrorInfo.js';
@@ -1,4 +1,4 @@
1
- import { throwError } from "./throwError.js";
1
+ import { throwError } from './throwError.js';
2
2
  /**
3
3
  * Reads React's `dangerouslySetInnerHTML` prop, returning the raw markup, or
4
4
  * `null` when the element does not use it.
package/dist/isBrowser.js CHANGED
@@ -1 +1 @@
1
- export { isClient as isBrowser } from "./isClient.js";
1
+ export { isClient as isBrowser } from './isClient.js';
package/dist/isDev.js CHANGED
@@ -1,4 +1,4 @@
1
- import { TungstenError } from "./TungstenError.js";
1
+ import { TungstenError } from './TungstenError.js';
2
2
  let isDev = false;
3
3
  // Neither global alone identifies the environment:
4
4
  // - `process` exists in the browser in dev, because cjsHelpers.js installs a shim so that
package/dist/isProd.js CHANGED
@@ -1,2 +1,2 @@
1
- import { isDev } from "./isDev.js";
1
+ import { isDev } from './isDev.js';
2
2
  export const isProd = !isDev;
package/dist/isServer.js CHANGED
@@ -1,2 +1,2 @@
1
- import { isBrowser } from "./isBrowser.js";
1
+ import { isBrowser } from './isBrowser.js';
2
2
  export const isServer = !isBrowser;
@@ -1 +1 @@
1
- export { jsx, jsxs, Fragment } from "./jsxRuntime.js";
1
+ export { jsx, jsxs, Fragment } from './jsxRuntime.js';
@@ -1 +1 @@
1
- {"version":3,"file":"jsxRuntime.d.ts","sourceRoot":"","sources":["../src/jsxRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,KAAK,6BAA6B,EAAoD,MAAM,kBAAkB,CAAA;AACvH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAM9C,cAAc,yBAAyB,CAAA;AAGvC,eAAO,MAAM,QAAQ,EAAG,KAAe,CAAA;AAGvC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,gBAAgB,GAAG,OAAO,QAAQ,CAAA;AAkBrE,wBAAgB,GAAG,CACf,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,EAChE,KAAK,EAAE,6BAA6B,EACpC,GAAG,EAAE,OAAO,GACb,WAAW,CAyEb;AAID,eAAO,MAAM,IAAI,GAAY,GAAG,MAAM,UAAU,CAAC,OAAO,GAAG,CAAC,gBAG3D,CAAA"}
1
+ {"version":3,"file":"jsxRuntime.d.ts","sourceRoot":"","sources":["../src/jsxRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,KAAK,6BAA6B,EAAoD,MAAM,kBAAkB,CAAA;AACvH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAM9C,cAAc,yBAAyB,CAAA;AAGvC,eAAO,MAAM,QAAQ,EAAG,KAAe,CAAA;AAGvC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,gBAAgB,GAAG,OAAO,QAAQ,CAAA;AAkBrE,wBAAgB,GAAG,CACf,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,EAChE,KAAK,EAAE,6BAA6B,EACpC,GAAG,EAAE,OAAO,GACb,WAAW,CAiFb;AAID,eAAO,MAAM,IAAI,GAAY,GAAG,MAAM,UAAU,CAAC,OAAO,GAAG,CAAC,gBAG3D,CAAA"}
@@ -1,9 +1,9 @@
1
1
  import { TungstenBaseComponent } from "./Components.js";
2
- import { TungstenError } from "./TungstenError.js";
3
- import { $key, $props, $type } from "./contentNodeSymbols.js";
4
- import { packageNameCapitalized } from "./settings.js";
5
- import { throwError } from "./throwError.js";
6
- export * from "./contentNodeSymbols.js";
2
+ import { TungstenError } from './TungstenError.js';
3
+ import { $key, $props, $type } from './contentNodeSymbols.js';
4
+ import { packageNameCapitalized } from './settings.js';
5
+ import { throwError } from './throwError.js';
6
+ export * from './contentNodeSymbols.js';
7
7
  //import { inspect } from 'util'
8
8
  export const Fragment = 0xeacb; // code taken from react for fragments
9
9
  // (?outdated?) this doesn't seem to handle string/number/undefined correctly
@@ -77,8 +77,13 @@ export function jsx(type, props, key) {
77
77
  [$key]: key
78
78
  };
79
79
  }
80
- if (typeof type === undefined || type === null) {
81
- return type;
80
+ if (type === null) {
81
+ return null;
82
+ }
83
+ // an import that resolved to nothing - a removed or misspelled export, or one caught
84
+ // mid-edit by HMR, which relies on this throw to fall back to a full reload
85
+ if (type === undefined) {
86
+ throw new TungstenError(`${packageNameCapitalized} JSX Runtime error: element type is undefined` + ` - does the import it came from still export it?`);
82
87
  }
83
88
  if (typeof type === 'number') {
84
89
  return String(type);
@@ -1 +1 @@
1
- {"version":3,"file":"jsxRuntimeSignals.d.ts","sourceRoot":"","sources":["../src/jsxRuntimeSignals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAI3C,cAAc,yBAAyB,CAAA;AAEvC,eAAO,MAAM,QAAQ,EAAG,KAAe,CAAA;AAEvC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,gBAAgB,GAAG,OAAO,QAAQ,CAAA;AAGrE,eAAO,MAAM,UAAU,eAAiB,CAAA;AAcxC,wBAAgB,GAAG,CACf,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,EAChE,KAAK,EAAE,6BAA6B,EACpC,GAAG,EAAE,OAAO;;;;;;;;qBA+Cf;AAID,eAAO,MAAM,IAAI,YAAM,CAAA"}
1
+ {"version":3,"file":"jsxRuntimeSignals.d.ts","sourceRoot":"","sources":["../src/jsxRuntimeSignals.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAI3C,cAAc,yBAAyB,CAAA;AAEvC,eAAO,MAAM,QAAQ,EAAG,KAAe,CAAA;AAEvC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,gBAAgB,GAAG,OAAO,QAAQ,CAAA;AAGrE,eAAO,MAAM,UAAU,eAAiB,CAAA;AAcxC,wBAAgB,GAAG,CACf,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,EAChE,KAAK,EAAE,6BAA6B,EACpC,GAAG,EAAE,OAAO;;;;;;;;qBA+Df;AAID,eAAO,MAAM,IAAI,YAAM,CAAA"}
@@ -1,7 +1,7 @@
1
- import { TungstenError } from "./TungstenError.js";
2
- import { packageNameCapitalized } from "./settings.js";
3
- import { throwError } from "./throwError.js";
4
- export * from "./contentNodeSymbols.js";
1
+ import { TungstenError } from './TungstenError.js';
2
+ import { packageNameCapitalized } from './settings.js';
3
+ import { throwError } from './throwError.js';
4
+ export * from './contentNodeSymbols.js';
5
5
  export const Fragment = 0xeacb; // code taken from react for fragments
6
6
  //// TODO use this symbol for type
7
7
  export const TypeSymbol = Symbol('type');
@@ -22,7 +22,9 @@ export function jsx(type, props, key) {
22
22
  if (Array.isArray(props.class) || typeof props.class === 'string') {
23
23
  const classString = Array.isArray(props.class) ? classNameArrayToString(props.class) : props.class;
24
24
  if (props.className !== undefined) {
25
- if (typeof props.className !== 'string') throwError('jsxRuntime', `expected className prop to be string, instead got ${typeof props.className}`);
25
+ if (typeof props.className !== 'string') {
26
+ throwError('jsxRuntime', `expected className prop to be string, instead got ${typeof props.className}`);
27
+ }
26
28
  props.className = props.className + ' ' + classString;
27
29
  } else {
28
30
  props.className = classString;
@@ -52,13 +54,18 @@ export function jsx(type, props, key) {
52
54
  key
53
55
  };
54
56
  }
55
- if (typeof type === undefined || type === null) {
56
- return type;
57
+ if (type === null) {
58
+ return null;
59
+ }
60
+ // an import that resolved to nothing - a removed or misspelled export, or one caught
61
+ // mid-edit by HMR, which relies on this throw to fall back to a full reload
62
+ if (type === undefined) {
63
+ throw new TungstenError(`${packageNameCapitalized} JSX Runtime error: element type is undefined` + ` - does the import it came from still export it?`);
57
64
  }
58
65
  if (typeof type === 'number') {
59
66
  return String(type);
60
67
  }
61
- throw new TungstenError(`${packageNameCapitalized} JSX Runtime error: did not recognize element, expected a string, function, class (type function), or fragment. Received type ${typeof type}: ${type}`);
68
+ throw new TungstenError(`${packageNameCapitalized} JSX Runtime error: did not recognize element` + `, expected a string, function, class (type function), or fragment.` + ` Received type ${typeof type}: ${type}`);
62
69
  }
63
70
  // jsx func for static elements
64
71
  // not sure exactly what this is, just use the same func for now
@@ -1,4 +1,4 @@
1
- import { defaultConfig } from "./defaultConfig.js";
1
+ import { defaultConfig } from './defaultConfig.js';
2
2
  export function makeFinalConfig(userConfig, overrides = null) {
3
3
  const finalConfig = structuredClone(defaultConfig);
4
4
  for (const key in userConfig) {
@@ -1,4 +1,4 @@
1
- import { isProd } from "./isProd.js";
1
+ import { isProd } from './isProd.js';
2
2
  export function makeInstanceConfigFromFrameworkConfig(frameworkConfig, dev = false) {
3
3
  const c = {
4
4
  prod: isProd,
@@ -1,6 +1,6 @@
1
- import { TungstenError } from "./TungstenError.js";
2
- import { isServer } from "./isServer.js";
3
- import { post } from "./requests/index.js";
1
+ import { TungstenError } from './TungstenError.js';
2
+ import { isServer } from './isServer.js';
3
+ import { post } from './requests/index.js';
4
4
  // maybe come back to this later
5
5
  const config = {
6
6
  httpLocation: 'http://localhost:3000'
@@ -1,4 +1,4 @@
1
- import { $props, $type } from "./contentNodeSymbols.js";
1
+ import { $props, $type } from './contentNodeSymbols.js';
2
2
  // An option with no value attribute is identified by its label text, so gather it the way the
3
3
  // browser does: script content and raw HTML are not label text, anything else contributes.
4
4
  function collectOptionText(node) {
package/dist/nbsp.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Fragment as _Fragment, jsx as _jsx } from "tungsten/jsxRuntime.js";
1
+ import { Fragment as _Fragment, jsx as _jsx } from "tungsten/jsx-runtime";
2
2
  //export function Space() { return ' ' }
3
3
  export const nbsp = _jsx(_Fragment, {
4
4
  children: "\xA0"
package/dist/output.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isClient } from "./isClient.js";
1
+ import { isClient } from './isClient.js';
2
2
  /* eslint-disable no-console */
3
3
  export function out(...inputs) {
4
4
  console.log(...inputs);
package/dist/pop.js CHANGED
@@ -1,5 +1,5 @@
1
- import { isServer } from "./isServer.js";
2
- import { log, warn } from "./appOutput.js";
1
+ import { isServer } from './isServer.js';
2
+ import { log, warn } from './appOutput.js';
3
3
  // Set once by PopMessages.clientInit, from this.__instance - one Instance per app, shared
4
4
  // across the whole client lifetime, so no per-component proxy/subscription is needed here.
5
5
  let instance = null;
@@ -9,12 +9,12 @@ extract classes -> localise
9
9
  .navItem -> NavItem_navItemf
10
10
  .span -> NavItem_span
11
11
  */
12
- import { parseSelectorsRich } from "./parseSelectorsRich.js";
13
- import { scopeAnimationValue } from "./scopeAnimationValue.js";
14
- import { unwrapIgnoreMarker } from "./unwrapIgnoreMarker.js";
15
- import { componentBumpClass } from "../componentClassName.js";
16
- import { throwError, warnMessage } from "../throwError.js";
17
- import { warn } from "../output.js";
12
+ import { parseSelectorsRich } from './parseSelectorsRich.js';
13
+ import { scopeAnimationValue } from './scopeAnimationValue.js';
14
+ import { unwrapIgnoreMarker } from './unwrapIgnoreMarker.js';
15
+ import { componentBumpClass } from '../componentClassName.js';
16
+ import { throwError, warnMessage } from '../throwError.js';
17
+ import { warn } from '../output.js';
18
18
  function debug(...texts) {
19
19
  //console.log(...texts)
20
20
  }
@@ -1,4 +1,4 @@
1
- import { throwError } from "../throwError.js";
1
+ import { throwError } from '../throwError.js';
2
2
  // | 'attribute-name-search' | 'attribute-name' | 'attribute-equals-search' | 'attribute-equals'
3
3
  // | 'attribute-value-search' | 'attribute-value' | 'attribute-end-search'
4
4
  export function parseSelectors(selectorGroup) {
@@ -1,4 +1,4 @@
1
- import { throwError } from "../throwError.js";
1
+ import { throwError } from '../throwError.js';
2
2
  // | 'attribute-name-search' | 'attribute-name' | 'attribute-equals-search' | 'attribute-equals'
3
3
  // | 'attribute-value-search' | 'attribute-value' | 'attribute-end-search'
4
4
  export function parseSelectorsRich(selectorGroup) {
@@ -1,5 +1,5 @@
1
- import { splitCssValue } from "./splitCssValue.js";
2
- import { unwrapIgnoreMarker } from "./unwrapIgnoreMarker.js";
1
+ import { splitCssValue } from './splitCssValue.js';
2
+ import { unwrapIgnoreMarker } from './unwrapIgnoreMarker.js';
3
3
  // every keyword the animation shorthand accepts. A word that is none of these, and does not
4
4
  // read as a time, a number or a function, is the animation name
5
5
  const animationKeywords = new Set(['none', 'forwards', 'backwards', 'both',
@@ -1,6 +1,6 @@
1
- import { objectTypesToProxy } from "./objectTypesToProxy.js";
2
- import { changedAt } from "./stateTracking.js";
3
- import { $key, $props, $type } from "./contentNodeSymbols.js";
1
+ import { objectTypesToProxy } from './objectTypesToProxy.js';
2
+ import { changedAt } from './stateTracking.js';
3
+ import { $key, $props, $type } from './contentNodeSymbols.js';
4
4
  /**
5
5
  * Structural comparison of component props, used to skip updating a child whose
6
6
  * props have not changed.
@@ -1,7 +1,7 @@
1
- import { ContentNodeIsComponent } from "../ContentNode.js";
2
- import { $props, $type } from "../contentNodeSymbols.js";
3
- import { StringIsHtmlEvent } from "../htmlEvents.js";
4
- import { blockedUrl, makeAllowCheck, removalFor, urlAttributes } from "./parseHtml.js";
1
+ import { ContentNodeIsComponent } from '../ContentNode.js';
2
+ import { $props, $type } from '../contentNodeSymbols.js';
3
+ import { StringIsHtmlEvent } from '../htmlEvents.js';
4
+ import { blockedUrl, makeAllowCheck, removalFor, urlAttributes } from './parseHtml.js';
5
5
  // The NodeProps equivalent of parseHtml's class->className, style->css
6
6
  // rename: the allow list is written in terms of the HTML attribute name, but
7
7
  // a content tree already carries Tungsten's prop names for these two.
@@ -1,7 +1,7 @@
1
- import { $props, $type } from "../contentNodeSymbols.js";
2
- import { htmlVoidTags } from "../render/htmlVoidTags.js";
3
- import { tokenizeHtml } from "./tokenizeHtml.js";
4
- import { htmlRawTextTags, htmlTableStructureTags, impliedEndTag } from "./htmlParsingTags.js";
1
+ import { $props, $type } from '../contentNodeSymbols.js';
2
+ import { htmlVoidTags } from '../render/htmlVoidTags.js';
3
+ import { tokenizeHtml } from './tokenizeHtml.js';
4
+ import { htmlRawTextTags, htmlTableStructureTags, impliedEndTag } from './htmlParsingTags.js';
5
5
  const allowEverything = {
6
6
  tag: () => true,
7
7
  attribute: () => true
@@ -1,6 +1,6 @@
1
- import { contentNodeToHtml } from "../render/contentNodeToHtml.js";
2
- import { parseHtml } from "./parseHtml.js";
3
- import { safeHtmlAllowList } from "./safeHtmlAllowList.js";
1
+ import { contentNodeToHtml } from '../render/contentNodeToHtml.js';
2
+ import { parseHtml } from './parseHtml.js';
3
+ import { safeHtmlAllowList } from './safeHtmlAllowList.js';
4
4
  /**
5
5
  * Cleans untrusted HTML and returns it as a string, synchronously.
6
6
  *
@@ -1,5 +1,5 @@
1
- import { decodeHtmlEntities } from "./decodeHtmlEntities.js";
2
- import { htmlRawTextTags } from "./htmlParsingTags.js";
1
+ import { decodeHtmlEntities } from './decodeHtmlEntities.js';
2
+ import { htmlRawTextTags } from './htmlParsingTags.js';
3
3
  // REGEX: < then optional / then a letter -- the only thing that starts a tag.
4
4
  // Anything else after a < is literal text, which is how browsers treat it too.
5
5
  const tagStart = /<\/?[a-zA-Z]/;
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable indent */
2
2
  //import { packageName, frameworkDistFolder } from '../settings.js'
3
- import { isDev } from "../isDev.js";
4
- import { $props, $type } from "../contentNodeSymbols.js";
3
+ import { isDev } from '../isDev.js';
4
+ import { $props, $type } from '../contentNodeSymbols.js';
5
5
  //import { clientModulesAliases } from '../build/clientModuleAliases.js'
6
6
  //const nodeModulesLength = `node_modules/`.length
7
7
  export function addImportMap(head, importAliases, clientImportAliases) {
@@ -1,7 +1,7 @@
1
- import { contentTreeToRenderingTree } from "./contentTreeToRenderingTree.js";
2
- import { debug } from "./debug.js";
3
- import { makeRenderingNodeClassComponentFromContentNodeClassComponent } from "../RenderingNode.js";
4
- import { instantiateClassComponent } from "./instantiateClassComponent.js";
1
+ import { contentTreeToRenderingTree } from './contentTreeToRenderingTree.js';
2
+ import { debug } from './debug.js';
3
+ import { makeRenderingNodeClassComponentFromContentNodeClassComponent } from '../RenderingNode.js';
4
+ import { instantiateClassComponent } from './instantiateClassComponent.js';
5
5
  export async function classComponentNodeToRenderingTree(node, parentComponent, instance, noEscape) {
6
6
  const component = await instantiateClassComponent(node, parentComponent, instance);
7
7
  //const component = instantiateComponent(node, parentComponent, instance)
@@ -1,10 +1,10 @@
1
- import { makeRenderingNodeClassComponentFromContentNodeClassComponent, makeRenderingNodeFunctionComponentFromContentNodeFunctionComponent } from "../RenderingNode.js";
2
- import { ContentNodeComponentIsClassComponent } from "../ContentNode.js";
3
- import { classComponentNodeToRenderingTree } from "./classComponentNodeToRenderingTree.js";
4
- import { functionComponentNodeToRenderingTree } from "./functionComponentNodeToRenderingTree.js";
5
- import { TungstenError } from "../TungstenError.js";
6
- import { $type } from "../contentNodeSymbols.js";
7
- import { contentTreeToRenderingTree } from "./contentTreeToRenderingTree.js";
1
+ import { makeRenderingNodeClassComponentFromContentNodeClassComponent, makeRenderingNodeFunctionComponentFromContentNodeFunctionComponent } from '../RenderingNode.js';
2
+ import { ContentNodeComponentIsClassComponent } from '../ContentNode.js';
3
+ import { classComponentNodeToRenderingTree } from './classComponentNodeToRenderingTree.js';
4
+ import { functionComponentNodeToRenderingTree } from './functionComponentNodeToRenderingTree.js';
5
+ import { TungstenError } from '../TungstenError.js';
6
+ import { $type } from '../contentNodeSymbols.js';
7
+ import { contentTreeToRenderingTree } from './contentTreeToRenderingTree.js';
8
8
  export async function componentNodeToRenderingTree(componentNode, parentComponent, instance, noEscape) {
9
9
  //console.log('type', componentNode[$type])
10
10
  const render = componentNode[$type].render;
@@ -1,14 +1,14 @@
1
- import { ContentNodeIsComponent } from "../ContentNode.js";
2
- import { booleanAttributeValue } from "../booleanAttributeValue.js";
3
- import { $props, $type } from "../contentNodeSymbols.js";
4
- import { htmlEntities } from "../htmlEntities.js";
5
- import { innerHtmlFromProps } from "../innerHtmlFromProps.js";
6
- import { throwError } from "../throwError.js";
7
- import { validChildren } from "../validChildren.js";
8
- import { htmlMonoTags } from "./htmlMonoTags.js";
9
- import { htmlSelfClosableTags } from "./htmlSelfClosableTags.js";
10
- import { htmlVoidTags } from "./htmlVoidTags.js";
11
- import { processProps } from "./processProps.js";
1
+ import { ContentNodeIsComponent } from '../ContentNode.js';
2
+ import { booleanAttributeValue } from '../booleanAttributeValue.js';
3
+ import { $props, $type } from '../contentNodeSymbols.js';
4
+ import { htmlEntities } from '../htmlEntities.js';
5
+ import { innerHtmlFromProps } from '../innerHtmlFromProps.js';
6
+ import { throwError } from '../throwError.js';
7
+ import { validChildren } from '../validChildren.js';
8
+ import { htmlMonoTags } from './htmlMonoTags.js';
9
+ import { htmlSelfClosableTags } from './htmlSelfClosableTags.js';
10
+ import { htmlVoidTags } from './htmlVoidTags.js';
11
+ import { processProps } from './processProps.js';
12
12
  /**
13
13
  * Serialises a content tree to HTML, synchronously.
14
14
  *
@@ -1,7 +1,7 @@
1
- import { renderingNodeToHtml } from "./renderingTreeToHtml.js";
2
- import { TungstenError } from "../TungstenError.js";
3
- import { RenderingNodeIsElement } from "../RenderingNode.js";
4
- import { contentTreeToRenderingTree } from "./contentTreeToRenderingTree.js";
1
+ import { renderingNodeToHtml } from './renderingTreeToHtml.js';
2
+ import { TungstenError } from '../TungstenError.js';
3
+ import { RenderingNodeIsElement } from '../RenderingNode.js';
4
+ import { contentTreeToRenderingTree } from './contentTreeToRenderingTree.js';
5
5
  import { cliWarn } from 'tungsten/cliOutput.js';
6
6
  export async function contentToHtml(compilationInfo, clientImportAliases, content, instance, config, siteBasePathOverride, tungstenPublicEnv = undefined, dev = false) {
7
7
  // const rootNode = { // eslint-disable-line no-type-assertion/no-type-assertion
@@ -1,4 +1,4 @@
1
- import { contentToHtml } from "./contentToHtml.js";
1
+ import { contentToHtml } from './contentToHtml.js';
2
2
  export async function contentToHtmlDev(compilationInfo, clientImportAliases, content, instance, config, tungstenPrivateEnv, siteBasePathOverride) {
3
3
  return await contentToHtml(compilationInfo, clientImportAliases, content, instance, config, siteBasePathOverride, tungstenPrivateEnv, true);
4
4
  }
@@ -1,10 +1,10 @@
1
- import { ContentNodeIsLiteral, ContentNodeElementIsComponent, ContentNodeElementIsHtml } from "../ContentNode.js";
2
- import { validChildren } from "../validChildren.js";
3
- import { debug } from "./debug.js";
4
- import { throwError } from "../throwError.js";
5
- import { $key, $props, $type } from "../contentNodeSymbols.js";
6
- import { processHtmlNode } from "./processHtmlNode.js";
7
- import { componentNodeToRenderingTree } from "./componentNodeToRenderingTree.js";
1
+ import { ContentNodeIsLiteral, ContentNodeElementIsComponent, ContentNodeElementIsHtml } from '../ContentNode.js';
2
+ import { validChildren } from '../validChildren.js';
3
+ import { debug } from './debug.js';
4
+ import { throwError } from '../throwError.js';
5
+ import { $key, $props, $type } from '../contentNodeSymbols.js';
6
+ import { processHtmlNode } from './processHtmlNode.js';
7
+ import { componentNodeToRenderingTree } from './componentNodeToRenderingTree.js';
8
8
  export async function contentTreeToRenderingTree(node, parentComponent, instance, noEscape) {
9
9
  //console.log('completeTree node', node)
10
10
  debug('completeTree node', node);
@@ -1,7 +1,7 @@
1
- import { makeRenderingNodeFunctionComponentFromContentNodeFunctionComponent } from "../RenderingNode.js";
2
- import { getStyledContentFromFunctionComponent } from "../getStyledContentFromFunctionComponent.js";
3
- import { contentTreeToRenderingTree } from "./contentTreeToRenderingTree.js";
4
- import { instantiateFunctionComponent } from "./instantiateFunctionComponent.js";
1
+ import { makeRenderingNodeFunctionComponentFromContentNodeFunctionComponent } from '../RenderingNode.js';
2
+ import { getStyledContentFromFunctionComponent } from '../getStyledContentFromFunctionComponent.js';
3
+ import { contentTreeToRenderingTree } from './contentTreeToRenderingTree.js';
4
+ import { instantiateFunctionComponent } from './instantiateFunctionComponent.js';
5
5
  import { setCurrentComponent } from 'tungsten/hooks/setCurrentComponent.js';
6
6
  import { clearCurrentComponent } from 'tungsten/hooks/clearCurrentComponent.js';
7
7
  export async function functionComponentNodeToRenderingTree(contentNode, parentComponent, instance, noEscape) {
@@ -1,4 +1,4 @@
1
- import { throwError } from "../throwError.js";
1
+ import { throwError } from '../throwError.js';
2
2
  export function getFunctionBodyAsString(func) {
3
3
  const functionString = func.toString();
4
4
  // if the function is a standard function
@@ -1,5 +1,5 @@
1
- import { $props, $routeData, $routeParams, $type } from "../contentNodeSymbols.js";
2
- import { markRendered } from "../stateTracking.js";
1
+ import { $props, $routeData, $routeParams, $type } from '../contentNodeSymbols.js';
2
+ import { markRendered } from '../stateTracking.js';
3
3
  //import type { TungstenComponent, TungstenComponentProps } from '../TungstenComponent.jsx'
4
4
  export async function instantiateClassComponent(node, parentComponent = null, instance) {
5
5
  const Component = node[$type];
@@ -1,6 +1,6 @@
1
- import { ContentNodeComponentIsClassComponent } from "../ContentNode.js";
2
- import { instantiateClassComponent } from "./instantiateClassComponent.js";
3
- import { instantiateFunctionComponent } from "./instantiateFunctionComponent.js";
1
+ import { ContentNodeComponentIsClassComponent } from '../ContentNode.js';
2
+ import { instantiateClassComponent } from './instantiateClassComponent.js';
3
+ import { instantiateFunctionComponent } from './instantiateFunctionComponent.js';
4
4
  export function instantiateComponent(node, parentComponent, instance) {
5
5
  if (ContentNodeComponentIsClassComponent(node)) {
6
6
  const component = instantiateClassComponent(node, parentComponent, instance);
@@ -1,5 +1,5 @@
1
- import { FunctionElement } from "../FunctionComponentStandIn.js";
2
- import { $props, $routeData, $routeParams, $type } from "../contentNodeSymbols.js";
1
+ import { FunctionElement } from '../FunctionComponentStandIn.js';
2
+ import { $props, $routeData, $routeParams, $type } from '../contentNodeSymbols.js';
3
3
  export function instantiateFunctionComponent(node, parentComponent, instance) {
4
4
  const componentStandIn = new FunctionElement(node[$type], node[$props], node[$routeParams], node[$routeData], instance, parentComponent);
5
5
  if (parentComponent !== null) parentComponent.childComponents.push(componentStandIn);
@@ -1,2 +1,2 @@
1
- import { isDev } from "../isDev.js";
1
+ import { isDev } from '../isDev.js';
2
2
  export const printComponentNamesInSource = isDev;
@@ -1,10 +1,10 @@
1
1
  import serializeJavascript from 'serialize-javascript';
2
- import { clientFolder, componentCssFolder, componentCssFile } from "../settings.js";
3
- import { addImportMap } from "./addImportMap.js";
4
- import { $props, $type } from "../contentNodeSymbols.js";
2
+ import { clientFolder, componentCssFolder, componentCssFile } from '../settings.js';
3
+ import { addImportMap } from './addImportMap.js';
4
+ import { $props, $type } from '../contentNodeSymbols.js';
5
5
  import { windowGlobalEnvStatement } from 'tungsten/env/windowGlobalEnvStatement.js';
6
- import { frameworkDestLocation } from "../build/frameworkDestLocation.js";
7
- import { devErrorPageClearRetryScript } from "../Servers/devErrorPageAutoRetry.js";
6
+ import { frameworkDestLocation } from '../build/frameworkDestLocation.js';
7
+ import { devErrorPageClearRetryScript } from '../Servers/devErrorPageAutoRetry.js';
8
8
  // process the tree returned by the root component
9
9
  // doing things like ensuring there is are html and head elements,
10
10
  // and adding necessary style and script tags