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.
- package/dist/.build-complete +1 -1
- package/dist/AnyComponent.js +1 -1
- package/dist/Components.d.ts.map +1 -1
- package/dist/Components.js +15 -16
- package/dist/ContentNode.js +2 -2
- package/dist/DomRegion.js +1 -1
- package/dist/Framework.d.ts +2 -1
- package/dist/Framework.d.ts.map +1 -1
- package/dist/Framework.js +43 -34
- package/dist/FrameworkConfig.d.ts +16 -0
- package/dist/FrameworkConfig.d.ts.map +1 -1
- package/dist/FunctionComponentStandIn.js +8 -8
- package/dist/Instance/Instance.js +11 -11
- package/dist/RenderedContentNode.js +2 -2
- package/dist/RenderingNode.js +2 -2
- package/dist/Script.js +1 -1
- package/dist/Servers/DevServer.d.ts.map +1 -1
- package/dist/Servers/DevServer.js +29 -29
- package/dist/Servers/ProdServer.js +14 -14
- package/dist/Servers/StaticSiteServer.js +3 -3
- package/dist/Servers/TungstenServer.js +5 -5
- package/dist/Servers/devErrorPageAutoRetry.js +1 -1
- package/dist/Servers/hono/TungstenServerHono.js +5 -5
- package/dist/Servers/initStores.js +3 -3
- package/dist/Servers/loadEnvsDev.js +6 -6
- package/dist/Servers/routing.js +3 -3
- package/dist/Store/createStores.js +2 -2
- package/dist/Store/makeStore.js +2 -2
- package/dist/Store/registerStore.js +2 -2
- package/dist/TungstenApp.js +3 -3
- package/dist/TungstenStyleObject.js +1 -1
- package/dist/__deproxy.js +2 -2
- package/dist/_client/client.js +3 -3
- package/dist/alive.js +1 -1
- package/dist/api/getApiRoutes.js +3 -3
- package/dist/api/getApiRoutesHono.js +3 -3
- package/dist/api/getExport.js +4 -4
- package/dist/api/getExportDev.js +1 -1
- package/dist/appOutput.js +1 -1
- package/dist/auth/index.js +2 -2
- package/dist/babelPlugins/BabelAddDevCacheBust.d.ts.map +1 -1
- package/dist/babelPlugins/BabelAddDevCacheBust.js +4 -2
- package/dist/babelPlugins/BabelTransformBindDirect.js +2 -2
- package/dist/babelPlugins/BabelTransformBindVar.js +3 -3
- package/dist/babelPlugins/BabelTransformCjsToEsm.js +1 -1
- package/dist/babelPlugins/BabelTransformComponentState.js +2 -2
- package/dist/babelPlugins/BabelTransformComponentStyles.d.ts +2 -0
- package/dist/babelPlugins/BabelTransformComponentStyles.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformComponentStyles.js +27 -11
- package/dist/babelPlugins/BabelTransformCssImports.js +1 -1
- package/dist/babelPlugins/BabelTransformDeproxyState.js +1 -1
- package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.js +6 -2
- package/dist/babelPlugins/BabelTransformPackageImports.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformPackageImports.js +66 -49
- package/dist/babelPlugins/BabelTransformReactive.js +1 -1
- package/dist/babelPlugins/BabelTransformReactiveSvelteStyle.js +1 -1
- package/dist/babelPlugins/BabelTransformSxyFrameworkImports.js +1 -1
- package/dist/babelPlugins/BabelTransformUniqueComponents.js +1 -1
- package/dist/babelPlugins/fixImportsInSassErrorMessage.js +1 -1
- package/dist/babelPlugins/test.js +1 -1
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.js +3 -3
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.js +1 -1
- package/dist/babelPlugins/transformPackageImports/getWebLocationOfPackageFile.js +2 -2
- package/dist/bin/args.js +1 -1
- package/dist/bin/commands/build.js +5 -5
- package/dist/bin/commands/buildHelp.js +1 -1
- package/dist/bin/commands/clean.js +4 -4
- package/dist/bin/commands/compile.d.ts.map +1 -1
- package/dist/bin/commands/compile.js +24 -17
- package/dist/bin/commands/compileSimplePackage.js +2 -2
- package/dist/bin/commands/dev.d.ts.map +1 -1
- package/dist/bin/commands/dev.js +16 -9
- package/dist/bin/commands/devmon.js +4 -4
- package/dist/bin/commands/help.js +2 -2
- package/dist/bin/commands/start.js +2 -2
- package/dist/bin/commands/static.js +3 -3
- package/dist/bin/index.js +13 -13
- package/dist/bin/moduleLoadAnalysis.js +2 -2
- package/dist/browserStorage.js +2 -2
- package/dist/build/babel.user.common.config.d.ts +7 -2
- package/dist/build/babel.user.common.config.d.ts.map +1 -1
- package/dist/build/babel.user.common.config.js +14 -15
- package/dist/build/bundle.d.ts +1 -1
- package/dist/build/bundle.d.ts.map +1 -1
- package/dist/build/bundle.js +15 -7
- package/dist/build/bundleBabelOptions.d.ts +6 -0
- package/dist/build/bundleBabelOptions.d.ts.map +1 -0
- package/dist/build/bundleBabelOptions.js +23 -0
- package/dist/build/combineComponentCss.js +2 -2
- package/dist/build/compileJavascript.d.ts +4 -0
- package/dist/build/compileJavascript.d.ts.map +1 -1
- package/dist/build/compileJavascript.js +148 -90
- package/dist/build/compileStyles.js +4 -4
- package/dist/build/compileUserApp.d.ts +1 -1
- package/dist/build/compileUserApp.d.ts.map +1 -1
- package/dist/build/compileUserApp.js +15 -12
- package/dist/build/componentStylesCache.d.ts +10 -0
- package/dist/build/componentStylesCache.d.ts.map +1 -0
- package/dist/build/componentStylesCache.js +54 -0
- package/dist/build/copyAssets.js +1 -1
- package/dist/build/copyPackageModulesToPackagesFolder.js +4 -4
- package/dist/build/copyPublicFiles.js +1 -1
- package/dist/build/createClientFiles.js +3 -3
- package/dist/build/createInstanceConfigFile.js +2 -2
- package/dist/build/createPackageVirtualFileSystems.js +1 -1
- package/dist/build/devBundle.js +5 -5
- package/dist/build/devBundle.rollup.config.d.ts.map +1 -1
- package/dist/build/devBundle.rollup.config.js +0 -1
- package/dist/build/frameworkDestLocation.d.ts +1 -0
- package/dist/build/frameworkDestLocation.d.ts.map +1 -1
- package/dist/build/frameworkDestLocation.js +8 -4
- package/dist/build/frameworkStylesheets.js +1 -1
- package/dist/build/getAllSxyClientModules.js +2 -2
- package/dist/build/getPackageDirForFile.js +1 -1
- package/dist/build/getSxyClientPackageAliases.d.ts.map +1 -1
- package/dist/build/getSxyClientPackageAliases.js +4 -2
- package/dist/build/getTempDirForAppCompilation.js +1 -1
- package/dist/build/makeBabelRawConfig.d.ts +3 -0
- package/dist/build/makeBabelRawConfig.d.ts.map +1 -0
- package/dist/build/makeBabelRawConfig.js +12 -0
- package/dist/build/makeBabelUserDevConfig.d.ts +1 -1
- package/dist/build/makeBabelUserDevConfig.d.ts.map +1 -1
- package/dist/build/makeBabelUserDevConfig.js +11 -8
- package/dist/build/makeBabelUserProdConfig.d.ts +1 -1
- package/dist/build/makeBabelUserProdConfig.d.ts.map +1 -1
- package/dist/build/makeBabelUserProdConfig.js +10 -5
- package/dist/build/processPackage.js +3 -3
- package/dist/build/rollup.user.prod.config.d.ts.map +1 -1
- package/dist/build/rollup.user.prod.config.js +13 -11
- package/dist/build/rollupExtractComponentStylesheets.js +2 -2
- package/dist/build/sassImportParser.js +2 -2
- package/dist/build/tallyBabelPlugins.d.ts.map +1 -1
- package/dist/build/tallyBabelPlugins.js +2 -7
- package/dist/calculateImportedStaticFileLocations.js +2 -2
- package/dist/calledFrom.js +2 -2
- package/dist/compat/forwardRef.js +1 -1
- package/dist/compat/index.js +1 -1
- package/dist/componentProxyHandlers.js +3 -3
- package/dist/components/Link.js +2 -2
- package/dist/components/PopMessages.js +3 -3
- package/dist/components/RawHtml.js +2 -2
- package/dist/components/Stylesheet.js +3 -3
- package/dist/components/bindable/BindableCheckbox.js +1 -1
- package/dist/components/bindable/BindableInput.js +1 -1
- package/dist/components/bindable/BindableInputNonString.js +1 -1
- package/dist/components/bindable/BindableInputString.js +1 -1
- package/dist/components/bindable/BindableInputTyped.js +1 -1
- package/dist/components/bindable/BindableInputTypedLegacy.js +1 -1
- package/dist/components/bindable/BindableRadio.js +1 -1
- package/dist/components/bindable/BindableSelect.js +1 -1
- package/dist/components/bindable/BindableTextarea.js +1 -1
- package/dist/components/library/RichTextEditor/RichTextEditor.js +8 -8
- package/dist/components/library/RichTextEditor/contentTree.js +4 -4
- package/dist/components/library/RichTextEditor/sanitizeAuthoredHtml.js +2 -2
- package/dist/components/library/__StatefulMessage/StatefulMessage.js +2 -2
- package/dist/components/library/index.js +2 -2
- package/dist/createElement.js +1 -1
- package/dist/defaultConfig.d.ts +0 -1
- package/dist/defaultConfig.d.ts.map +1 -1
- package/dist/defaultConfig.js +2 -2
- package/dist/deleteDirs.js +1 -1
- package/dist/env/addToEnv.js +1 -1
- package/dist/env/funcs.js +4 -4
- package/dist/env/getEnvSchemas.d.ts.map +1 -1
- package/dist/env/getEnvSchemas.js +10 -6
- package/dist/env/privateEnv.js +2 -2
- package/dist/env/privateEnvOrThrow.js +1 -1
- package/dist/env/publicEnv.js +1 -1
- package/dist/env/publicEnvOrThrow.js +1 -1
- package/dist/filePathFromUrl.js +1 -1
- package/dist/findProjectDir.js +1 -1
- package/dist/findUserConfig.js +5 -5
- package/dist/fixExtension.d.ts.map +1 -1
- package/dist/fixExtension.js +5 -3
- package/dist/frameworkConfigSchema.d.ts +16 -0
- package/dist/frameworkConfigSchema.d.ts.map +1 -1
- package/dist/frameworkConfigSchema.js +12 -0
- package/dist/getComponent.js +5 -5
- package/dist/getComponentDev.js +1 -1
- package/dist/getFrameworkDir.js +1 -1
- package/dist/getRoutes.js +5 -5
- package/dist/getRoutesDevs.js +1 -1
- package/dist/getUserConfig.js +7 -7
- package/dist/hasValidKey.js +1 -1
- package/dist/helpers/index.js +2 -2
- package/dist/hmr/applyHmrModule.js +5 -5
- package/dist/hmr/componentIdentity.js +2 -2
- package/dist/hooks/clearCurrentComponent.js +1 -1
- package/dist/hooks/getCurrentComponent.js +3 -3
- package/dist/hooks/index.js +5 -5
- package/dist/hooks/setCurrentComponent.js +1 -1
- package/dist/hooks/useCallback.js +2 -2
- package/dist/hooks/useEffect.js +2 -2
- package/dist/hooks/useInstance.js +1 -1
- package/dist/hooks/useMemo.js +2 -2
- package/dist/hooks/useState.js +3 -3
- package/dist/hydrate/hydrate.js +31 -31
- package/dist/hydrate/reconcileHydratedAttributes.js +3 -3
- package/dist/index.js +2 -2
- package/dist/indexInner.d.ts +1 -1
- package/dist/indexInner.d.ts.map +1 -1
- package/dist/indexInner.js +45 -45
- package/dist/innerHtmlFromProps.js +1 -1
- package/dist/isBrowser.js +1 -1
- package/dist/isDev.js +1 -1
- package/dist/isProd.js +1 -1
- package/dist/isServer.js +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/jsxRuntime.d.ts.map +1 -1
- package/dist/jsxRuntime.js +12 -7
- package/dist/jsxRuntimeSignals.d.ts.map +1 -1
- package/dist/jsxRuntimeSignals.js +15 -8
- package/dist/makeFinalConfig.js +1 -1
- package/dist/makeInstanceConfigFromFrameworkConfig.js +1 -1
- package/dist/makeServerRpc.js +3 -3
- package/dist/markOptionSelected.js +1 -1
- package/dist/nbsp.js +1 -1
- package/dist/output.js +1 -1
- package/dist/pop.js +2 -2
- package/dist/postcssPlugins/TransformCssNames.js +6 -6
- package/dist/postcssPlugins/parseSelectors.js +1 -1
- package/dist/postcssPlugins/parseSelectorsRich.js +1 -1
- package/dist/postcssPlugins/scopeAnimationValue.js +2 -2
- package/dist/propsAreEqual.js +3 -3
- package/dist/rawHtml/filterContentNode.js +4 -4
- package/dist/rawHtml/parseHtml.js +4 -4
- package/dist/rawHtml/sanitizeHtml.js +3 -3
- package/dist/rawHtml/tokenizeHtml.js +2 -2
- package/dist/render/addImportMap.js +2 -2
- package/dist/render/classComponentNodeToRenderingTree.js +4 -4
- package/dist/render/componentNodeToRenderingTree.js +7 -7
- package/dist/render/contentNodeToHtml.js +11 -11
- package/dist/render/contentToHtml.js +4 -4
- package/dist/render/contentToHtmlDev.js +1 -1
- package/dist/render/contentTreeToRenderingTree.js +7 -7
- package/dist/render/functionComponentNodeToRenderingTree.js +4 -4
- package/dist/render/getFunctionBodyAsString.js +1 -1
- package/dist/render/instantiateClassComponent.js +2 -2
- package/dist/render/instantiateComponent.js +3 -3
- package/dist/render/instantiateFunctionComponent.js +2 -2
- package/dist/render/printComponentNameInSource.js +1 -1
- package/dist/render/processHead.js +5 -5
- package/dist/render/processHtmlNode.js +1 -1
- package/dist/render/processProps.js +2 -2
- package/dist/render/processRenderingNodeHtml.js +6 -6
- package/dist/render/renderingTreeToHtml.js +16 -16
- package/dist/render/rootToHtml.js +2 -2
- package/dist/render/rootToHtmlDev.js +1 -1
- package/dist/requests/fetch/delete.js +2 -2
- package/dist/requests/fetch/get.js +3 -3
- package/dist/requests/fetch/patch.js +2 -2
- package/dist/requests/fetch/post.js +2 -2
- package/dist/requests/fetch/put.js +2 -2
- package/dist/requests/index.js +5 -5
- package/dist/routing/MatchedRoute.js +2 -2
- package/dist/routing/getPathPriority.js +1 -1
- package/dist/routing/matchPath.js +3 -3
- package/dist/routing/patternToRegex.js +1 -1
- package/dist/server.js +3 -3
- package/dist/serverModuleLocation.d.ts +3 -0
- package/dist/serverModuleLocation.d.ts.map +1 -0
- package/dist/serverModuleLocation.js +12 -0
- package/dist/settings.d.ts +4 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +9 -0
- package/dist/standardSchema.js +1 -1
- package/dist/staticGen/getAppRoutes.js +3 -3
- package/dist/staticGen/staticGen.js +7 -7
- package/dist/style/jssToCss.js +3 -3
- package/dist/style/styleContent.js +1 -1
- package/dist/style/styleContentSxy.js +8 -8
- package/dist/style/unusedStyles.js +1 -1
- package/dist/sync/index.js +1 -1
- package/dist/syncServer/preload.js +1 -1
- package/dist/testing/host.js +1 -1
- package/dist/testing/hydrateTestApp.js +9 -9
- package/dist/testing/index.js +11 -11
- package/dist/testing/installTestStyleProcessors.js +1 -1
- package/dist/testing/loadEnv.js +3 -3
- package/dist/testing/loadEnvSetup.js +1 -1
- package/dist/testing/temp/componentPackageMock.js +2 -2
- package/dist/testing/temp/contentHtmlElements.js +2 -2
- package/dist/throwError.js +2 -2
- package/dist/timeProfiler.d.ts +1 -1
- package/dist/timeProfiler.d.ts.map +1 -1
- package/dist/timeProfiler.js +61 -25
- package/dist/update/integrateUpdateVdom.js +28 -28
- package/dist/validChildren.js +2 -2
- package/dist/warnOnFrameworkChange.js +2 -2
- package/dist/zones/react.js +3 -3
- package/package.json +18 -11
- package/types/modules.d.ts +2 -0
package/dist/indexInner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// core
|
|
2
|
-
export * from
|
|
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
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
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
|
|
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
|
|
28
|
-
export { safeHtmlAllowList } from
|
|
29
|
-
export { sanitizeHtml } from
|
|
30
|
-
export { filterContentNode } from
|
|
31
|
-
export { contentNodeToHtml } from
|
|
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
|
|
35
|
-
export * from
|
|
36
|
-
export { createElement } from
|
|
37
|
-
export * from
|
|
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
|
|
41
|
-
export * from
|
|
42
|
-
export * from
|
|
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
|
|
44
|
+
export * from './jsxRuntime.js';
|
|
45
45
|
//export { tungstenPrivateEnv, tungstenPublicEnv } from './env/env.js'
|
|
46
46
|
//export * from './env/parseEnv.js'
|
|
47
|
-
export * from
|
|
48
|
-
export { isBrowser } from
|
|
49
|
-
export { isClient } from
|
|
50
|
-
export { isServer } from
|
|
51
|
-
export { isDev } from
|
|
52
|
-
export { isProd } from
|
|
53
|
-
export { logAndReturn } from
|
|
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
|
|
55
|
+
export * from './requests/index.js';
|
|
56
56
|
//export * from './zones/react.jsx'
|
|
57
|
-
export { registerGlobalData } from
|
|
58
|
-
export * from
|
|
59
|
-
export * from
|
|
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
|
|
63
|
-
export * from
|
|
64
|
-
export * from
|
|
65
|
-
export * from
|
|
66
|
-
export * from
|
|
67
|
-
export * from
|
|
68
|
-
export * from
|
|
69
|
-
export * from
|
|
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
|
|
72
|
-
export * from
|
|
73
|
-
export { $original } from
|
|
74
|
-
export * from
|
|
75
|
-
export { StringIsPath, RouteKeyIsPath } from
|
|
76
|
-
export { makeTungstenErrorInfo } from
|
|
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';
|
package/dist/isBrowser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { isClient as isBrowser } from
|
|
1
|
+
export { isClient as isBrowser } from './isClient.js';
|
package/dist/isDev.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TungstenError } from
|
|
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
|
|
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
|
|
1
|
+
import { isBrowser } from './isBrowser.js';
|
|
2
2
|
export const isServer = !isBrowser;
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { jsx, jsxs, Fragment } from
|
|
1
|
+
export { jsx, jsxs, Fragment } from './jsxRuntime.js';
|
package/dist/jsxRuntime.d.ts.map
CHANGED
|
@@ -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,
|
|
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"}
|
package/dist/jsxRuntime.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TungstenBaseComponent } from "./Components.js";
|
|
2
|
-
import { TungstenError } from
|
|
3
|
-
import { $key, $props, $type } from
|
|
4
|
-
import { packageNameCapitalized } from
|
|
5
|
-
import { throwError } from
|
|
6
|
-
export * from
|
|
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 (
|
|
81
|
-
return
|
|
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":"
|
|
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
|
|
2
|
-
import { packageNameCapitalized } from
|
|
3
|
-
import { throwError } from
|
|
4
|
-
export * from
|
|
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')
|
|
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 (
|
|
56
|
-
return
|
|
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
|
|
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
|
package/dist/makeFinalConfig.js
CHANGED
package/dist/makeServerRpc.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TungstenError } from
|
|
2
|
-
import { isServer } from
|
|
3
|
-
import { post } from
|
|
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
|
|
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
package/dist/output.js
CHANGED
package/dist/pop.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isServer } from
|
|
2
|
-
import { log, warn } from
|
|
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
|
|
13
|
-
import { scopeAnimationValue } from
|
|
14
|
-
import { unwrapIgnoreMarker } from
|
|
15
|
-
import { componentBumpClass } from
|
|
16
|
-
import { throwError, warnMessage } from
|
|
17
|
-
import { warn } from
|
|
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
|
|
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
|
|
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
|
|
2
|
-
import { unwrapIgnoreMarker } from
|
|
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',
|
package/dist/propsAreEqual.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { objectTypesToProxy } from
|
|
2
|
-
import { changedAt } from
|
|
3
|
-
import { $key, $props, $type } from
|
|
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
|
|
2
|
-
import { $props, $type } from
|
|
3
|
-
import { StringIsHtmlEvent } from
|
|
4
|
-
import { blockedUrl, makeAllowCheck, removalFor, urlAttributes } from
|
|
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
|
|
2
|
-
import { htmlVoidTags } from
|
|
3
|
-
import { tokenizeHtml } from
|
|
4
|
-
import { htmlRawTextTags, htmlTableStructureTags, impliedEndTag } from
|
|
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
|
|
2
|
-
import { parseHtml } from
|
|
3
|
-
import { safeHtmlAllowList } from
|
|
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
|
|
2
|
-
import { htmlRawTextTags } from
|
|
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
|
|
4
|
-
import { $props, $type } from
|
|
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
|
|
2
|
-
import { debug } from
|
|
3
|
-
import { makeRenderingNodeClassComponentFromContentNodeClassComponent } from
|
|
4
|
-
import { instantiateClassComponent } from
|
|
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
|
|
2
|
-
import { ContentNodeComponentIsClassComponent } from
|
|
3
|
-
import { classComponentNodeToRenderingTree } from
|
|
4
|
-
import { functionComponentNodeToRenderingTree } from
|
|
5
|
-
import { TungstenError } from
|
|
6
|
-
import { $type } from
|
|
7
|
-
import { contentTreeToRenderingTree } from
|
|
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
|
|
2
|
-
import { booleanAttributeValue } from
|
|
3
|
-
import { $props, $type } from
|
|
4
|
-
import { htmlEntities } from
|
|
5
|
-
import { innerHtmlFromProps } from
|
|
6
|
-
import { throwError } from
|
|
7
|
-
import { validChildren } from
|
|
8
|
-
import { htmlMonoTags } from
|
|
9
|
-
import { htmlSelfClosableTags } from
|
|
10
|
-
import { htmlVoidTags } from
|
|
11
|
-
import { processProps } from
|
|
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
|
|
2
|
-
import { TungstenError } from
|
|
3
|
-
import { RenderingNodeIsElement } from
|
|
4
|
-
import { contentTreeToRenderingTree } from
|
|
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
|
|
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
|
|
2
|
-
import { validChildren } from
|
|
3
|
-
import { debug } from
|
|
4
|
-
import { throwError } from
|
|
5
|
-
import { $key, $props, $type } from
|
|
6
|
-
import { processHtmlNode } from
|
|
7
|
-
import { componentNodeToRenderingTree } from
|
|
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
|
|
2
|
-
import { getStyledContentFromFunctionComponent } from
|
|
3
|
-
import { contentTreeToRenderingTree } from
|
|
4
|
-
import { instantiateFunctionComponent } from
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { $props, $routeData, $routeParams, $type } from
|
|
2
|
-
import { markRendered } from
|
|
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
|
|
2
|
-
import { instantiateClassComponent } from
|
|
3
|
-
import { instantiateFunctionComponent } from
|
|
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
|
|
2
|
-
import { $props, $routeData, $routeParams, $type } from
|
|
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
|
|
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
|
|
3
|
-
import { addImportMap } from
|
|
4
|
-
import { $props, $type } from
|
|
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
|
|
7
|
-
import { devErrorPageClearRetryScript } from
|
|
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
|