tungsten 0.4.10 → 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 (294) 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 +71 -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/componentCss/tungsten.css +2 -2
  140. package/dist/componentProxyHandlers.js +3 -3
  141. package/dist/components/Link.js +2 -2
  142. package/dist/components/PopMessages.js +3 -3
  143. package/dist/components/RawHtml.js +2 -2
  144. package/dist/components/Stylesheet.js +3 -3
  145. package/dist/components/bindable/BindableCheckbox.js +1 -1
  146. package/dist/components/bindable/BindableInput.js +1 -1
  147. package/dist/components/bindable/BindableInputNonString.js +1 -1
  148. package/dist/components/bindable/BindableInputString.js +1 -1
  149. package/dist/components/bindable/BindableInputTyped.js +1 -1
  150. package/dist/components/bindable/BindableInputTypedLegacy.js +1 -1
  151. package/dist/components/bindable/BindableRadio.js +1 -1
  152. package/dist/components/bindable/BindableSelect.js +1 -1
  153. package/dist/components/bindable/BindableTextarea.js +1 -1
  154. package/dist/components/library/RichTextEditor/RichTextEditor.js +8 -8
  155. package/dist/components/library/RichTextEditor/contentTree.js +4 -4
  156. package/dist/components/library/RichTextEditor/sanitizeAuthoredHtml.js +2 -2
  157. package/dist/components/library/__StatefulMessage/StatefulMessage.js +2 -2
  158. package/dist/components/library/index.js +2 -2
  159. package/dist/createElement.js +1 -1
  160. package/dist/defaultConfig.d.ts +0 -1
  161. package/dist/defaultConfig.d.ts.map +1 -1
  162. package/dist/defaultConfig.js +2 -2
  163. package/dist/deleteDirs.js +1 -1
  164. package/dist/env/addToEnv.js +1 -1
  165. package/dist/env/funcs.js +4 -4
  166. package/dist/env/getEnvSchemas.d.ts.map +1 -1
  167. package/dist/env/getEnvSchemas.js +10 -6
  168. package/dist/env/privateEnv.js +2 -2
  169. package/dist/env/privateEnvOrThrow.js +1 -1
  170. package/dist/env/publicEnv.js +1 -1
  171. package/dist/env/publicEnvOrThrow.js +1 -1
  172. package/dist/filePathFromUrl.js +1 -1
  173. package/dist/findProjectDir.js +1 -1
  174. package/dist/findUserConfig.js +5 -5
  175. package/dist/fixExtension.d.ts.map +1 -1
  176. package/dist/fixExtension.js +5 -3
  177. package/dist/frameworkConfigSchema.d.ts +16 -0
  178. package/dist/frameworkConfigSchema.d.ts.map +1 -1
  179. package/dist/frameworkConfigSchema.js +12 -0
  180. package/dist/getComponent.js +5 -5
  181. package/dist/getComponentDev.js +1 -1
  182. package/dist/getFrameworkDir.js +1 -1
  183. package/dist/getRoutes.js +5 -5
  184. package/dist/getRoutesDevs.js +1 -1
  185. package/dist/getUserConfig.js +7 -7
  186. package/dist/hasValidKey.js +1 -1
  187. package/dist/helpers/index.js +2 -2
  188. package/dist/hmr/applyHmrModule.js +5 -5
  189. package/dist/hmr/componentIdentity.js +2 -2
  190. package/dist/hooks/clearCurrentComponent.js +1 -1
  191. package/dist/hooks/getCurrentComponent.js +3 -3
  192. package/dist/hooks/index.js +5 -5
  193. package/dist/hooks/setCurrentComponent.js +1 -1
  194. package/dist/hooks/useCallback.js +2 -2
  195. package/dist/hooks/useEffect.js +2 -2
  196. package/dist/hooks/useInstance.js +1 -1
  197. package/dist/hooks/useMemo.js +2 -2
  198. package/dist/hooks/useState.js +3 -3
  199. package/dist/hydrate/hydrate.js +31 -31
  200. package/dist/hydrate/reconcileHydratedAttributes.js +3 -3
  201. package/dist/index.js +2 -2
  202. package/dist/indexInner.d.ts +1 -1
  203. package/dist/indexInner.d.ts.map +1 -1
  204. package/dist/indexInner.js +45 -45
  205. package/dist/innerHtmlFromProps.js +1 -1
  206. package/dist/isBrowser.js +1 -1
  207. package/dist/isDev.js +1 -1
  208. package/dist/isProd.js +1 -1
  209. package/dist/isServer.js +1 -1
  210. package/dist/jsx-runtime.js +1 -1
  211. package/dist/jsxRuntime.d.ts.map +1 -1
  212. package/dist/jsxRuntime.js +12 -7
  213. package/dist/jsxRuntimeSignals.d.ts.map +1 -1
  214. package/dist/jsxRuntimeSignals.js +15 -8
  215. package/dist/makeFinalConfig.js +1 -1
  216. package/dist/makeInstanceConfigFromFrameworkConfig.js +1 -1
  217. package/dist/makeServerRpc.js +3 -3
  218. package/dist/markOptionSelected.js +1 -1
  219. package/dist/nbsp.js +1 -1
  220. package/dist/output.js +1 -1
  221. package/dist/pop.js +2 -2
  222. package/dist/postcssPlugins/TransformCssNames.js +6 -6
  223. package/dist/postcssPlugins/parseSelectors.js +1 -1
  224. package/dist/postcssPlugins/parseSelectorsRich.js +1 -1
  225. package/dist/postcssPlugins/scopeAnimationValue.js +2 -2
  226. package/dist/propsAreEqual.js +3 -3
  227. package/dist/rawHtml/filterContentNode.js +4 -4
  228. package/dist/rawHtml/parseHtml.js +4 -4
  229. package/dist/rawHtml/sanitizeHtml.js +3 -3
  230. package/dist/rawHtml/tokenizeHtml.js +2 -2
  231. package/dist/render/addImportMap.js +2 -2
  232. package/dist/render/classComponentNodeToRenderingTree.js +4 -4
  233. package/dist/render/componentNodeToRenderingTree.js +7 -7
  234. package/dist/render/contentNodeToHtml.js +11 -11
  235. package/dist/render/contentToHtml.js +4 -4
  236. package/dist/render/contentToHtmlDev.js +1 -1
  237. package/dist/render/contentTreeToRenderingTree.js +7 -7
  238. package/dist/render/functionComponentNodeToRenderingTree.js +4 -4
  239. package/dist/render/getFunctionBodyAsString.js +1 -1
  240. package/dist/render/instantiateClassComponent.js +2 -2
  241. package/dist/render/instantiateComponent.js +3 -3
  242. package/dist/render/instantiateFunctionComponent.js +2 -2
  243. package/dist/render/printComponentNameInSource.js +1 -1
  244. package/dist/render/processHead.js +5 -5
  245. package/dist/render/processHtmlNode.js +1 -1
  246. package/dist/render/processProps.js +2 -2
  247. package/dist/render/processRenderingNodeHtml.js +6 -6
  248. package/dist/render/renderingTreeToHtml.js +16 -16
  249. package/dist/render/rootToHtml.js +2 -2
  250. package/dist/render/rootToHtmlDev.js +1 -1
  251. package/dist/requests/fetch/delete.js +2 -2
  252. package/dist/requests/fetch/get.js +3 -3
  253. package/dist/requests/fetch/patch.js +2 -2
  254. package/dist/requests/fetch/post.js +2 -2
  255. package/dist/requests/fetch/put.js +2 -2
  256. package/dist/requests/index.js +5 -5
  257. package/dist/routing/MatchedRoute.js +2 -2
  258. package/dist/routing/getPathPriority.js +1 -1
  259. package/dist/routing/matchPath.js +3 -3
  260. package/dist/routing/patternToRegex.js +1 -1
  261. package/dist/server.js +3 -3
  262. package/dist/serverModuleLocation.d.ts +3 -0
  263. package/dist/serverModuleLocation.d.ts.map +1 -0
  264. package/dist/serverModuleLocation.js +12 -0
  265. package/dist/settings.d.ts +4 -0
  266. package/dist/settings.d.ts.map +1 -1
  267. package/dist/settings.js +9 -0
  268. package/dist/standardSchema.js +1 -1
  269. package/dist/staticGen/getAppRoutes.js +3 -3
  270. package/dist/staticGen/staticGen.js +7 -7
  271. package/dist/style/jssToCss.js +3 -3
  272. package/dist/style/styleContent.js +1 -1
  273. package/dist/style/styleContentSxy.js +8 -8
  274. package/dist/style/unusedStyles.js +1 -1
  275. package/dist/sync/index.js +1 -1
  276. package/dist/syncServer/preload.js +1 -1
  277. package/dist/testing/host.js +1 -1
  278. package/dist/testing/hydrateTestApp.js +9 -9
  279. package/dist/testing/index.js +11 -11
  280. package/dist/testing/installTestStyleProcessors.js +1 -1
  281. package/dist/testing/loadEnv.js +3 -3
  282. package/dist/testing/loadEnvSetup.js +1 -1
  283. package/dist/testing/temp/componentPackageMock.js +2 -2
  284. package/dist/testing/temp/contentHtmlElements.js +2 -2
  285. package/dist/throwError.js +2 -2
  286. package/dist/timeProfiler.d.ts +1 -1
  287. package/dist/timeProfiler.d.ts.map +1 -1
  288. package/dist/timeProfiler.js +62 -26
  289. package/dist/update/integrateUpdateVdom.js +28 -28
  290. package/dist/validChildren.js +2 -2
  291. package/dist/warnOnFrameworkChange.js +2 -2
  292. package/dist/zones/react.js +3 -3
  293. package/package.json +18 -11
  294. package/types/modules.d.ts +2 -0
@@ -1,10 +1,14 @@
1
1
  import { getPackageJson } from 'sxy-package-investigator';
2
- import { TungstenError } from "../TungstenError.js";
3
- import { getFrameworkDir } from "../getFrameworkDir.js";
4
- import { frameworkDistFolder, packageName } from "../settings.js";
2
+ import { TungstenError } from '../TungstenError.js';
3
+ import { getFrameworkDir } from '../getFrameworkDir.js';
4
+ import { frameworkDistFolder, packageName } from '../settings.js';
5
5
  const packageJsonResult = getPackageJson(getFrameworkDir());
6
6
  const packageJson = packageJsonResult.value;
7
7
  if (packageJson === undefined) {
8
8
  throw new TungstenError(`getSxyClientPackageAliases() error: framework package.json not found`);
9
9
  }
10
- export const frameworkDestLocation = `/.packages/${packageName}@${packageJson.version}/${frameworkDistFolder}`;
10
+ if (packageJson.version === undefined) {
11
+ throw new TungstenError(`frameworkDestLocation error: framework package.json has no version`);
12
+ }
13
+ export const frameworkVersion = packageJson.version;
14
+ export const frameworkDestLocation = `/.packages/${packageName}@${frameworkVersion}/${frameworkDistFolder}`;
@@ -1,7 +1,7 @@
1
1
  import { existsSync, promises as fsPromises } from 'fs';
2
2
  import { dirname, join } from 'path';
3
3
  import slash from 'slash';
4
- import { frameworkCssFile, frameworkCssFolder, frameworkDistFolder } from "../settings.js";
4
+ import { frameworkCssFile, frameworkCssFolder, frameworkDistFolder } from '../settings.js';
5
5
  // Component stylesheets named by a `$stylesheet` static on a package component, collected while
6
6
  // the package import tree is walked so only components the app actually imports contribute.
7
7
  // Held on globalThis because moduleReloader busts the ES module cache in dev, so the collector
@@ -1,7 +1,7 @@
1
1
  import dependencyTree from 'sxy-dependency-tree';
2
2
  import { join } from 'path';
3
- import { findProjectDir } from "../findProjectDir.js";
4
- import { frameworkDistFolder } from "../settings.js";
3
+ import { findProjectDir } from '../findProjectDir.js';
4
+ import { frameworkDistFolder } from '../settings.js';
5
5
  export function getAllTungstenClientModules() {
6
6
  const frameworkLocation = findProjectDir(import.meta.url);
7
7
  const tungstenModules = [];
@@ -1,5 +1,5 @@
1
1
  import { dirname } from 'path';
2
- import { findProjectDir } from "../findProjectDir.js";
2
+ import { findProjectDir } from '../findProjectDir.js';
3
3
  const cache = {};
4
4
  // Package boundary for a file. Nameless package.json files are not boundaries — see findProjectDir.
5
5
  export function getPackageDirForFile(file) {
@@ -1 +1 @@
1
- {"version":3,"file":"getSxyClientPackageAliases.d.ts","sourceRoot":"","sources":["../../src/build/getSxyClientPackageAliases.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAQvD,wBAAgB,+BAA+B,IAAI,aAAa,CAgC/D"}
1
+ {"version":3,"file":"getSxyClientPackageAliases.d.ts","sourceRoot":"","sources":["../../src/build/getSxyClientPackageAliases.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAQvD,wBAAgB,+BAA+B,IAAI,aAAa,CAkC/D"}
@@ -1,4 +1,4 @@
1
- import { frameworkDestLocation } from "./frameworkDestLocation.js";
1
+ import { frameworkDestLocation } from './frameworkDestLocation.js';
2
2
  // I think these are only used in dev
3
3
  export function getTungstenClientPackageAliases() {
4
4
  // const packageJsonResult = getPackageJson(getFrameworkDir())
@@ -10,7 +10,9 @@ export function getTungstenClientPackageAliases() {
10
10
  // I think these are only used in dev
11
11
  const importAliases = {
12
12
  'tungsten': `${frameworkDestLocation}/index.js`,
13
- 'tungsten/jsxRuntime.js': `${frameworkDestLocation}/jsxRuntime.js`
13
+ // what preset-react emits, in app code and the framework's own dist alike; the exports
14
+ // map answers it for node and rollup
15
+ 'tungsten/jsx-runtime': `${frameworkDestLocation}/jsx-runtime.js`
14
16
  // The component library, mirroring the `./library` subpath in exports.
15
17
  //'tungsten/library': `${frameworkDestLocation}/components/library/index.js`,
16
18
  //'tungsten': `${frameworkDestLocation}/indexBundle.js`,
@@ -1,5 +1,5 @@
1
1
  import { join } from 'path';
2
- import { devBuildFolder, prodBuildCodeFolder } from "../settings.js";
2
+ import { devBuildFolder, prodBuildCodeFolder } from '../settings.js';
3
3
  //import { tmpdir } from 'os'
4
4
  export function getTempDirForAppCompilation(projectDir, mode) {
5
5
  // const location = join(
@@ -0,0 +1,3 @@
1
+ import type { TransformOptions } from '@babel/core';
2
+ export declare function makeBabelRawConfig(typescript: boolean): TransformOptions;
3
+ //# sourceMappingURL=makeBabelRawConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeBabelRawConfig.d.ts","sourceRoot":"","sources":["../../src/build/makeBabelRawConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AASnD,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,OAAO,GAAG,gBAAgB,CAKxE"}
@@ -0,0 +1,12 @@
1
+ import { objectCopy } from 'sxy-lib-object-copy';
2
+ import userCommonConfig, { typescriptPreset } from './babel.user.common.config.js';
3
+ import { MakeBabelTransformJsxExtensionsToJs } from '../babelPlugins/BabelTransformJsxExtensionsToJs.js';
4
+ // The raw pipeline: sources compiled for node rather than the browser (config rawDirs/rawPatterns).
5
+ // The common presets - jsx, and types stripped when the app is typescript - with only the
6
+ // extension rewrite; none of the client plugins, so imports are left for node to resolve.
7
+ export function makeBabelRawConfig(typescript) {
8
+ const rawConfig = objectCopy(userCommonConfig);
9
+ if (typescript) rawConfig.presets.push(typescriptPreset()); // eslint-disable-line @typescript-eslint/no-non-null-assertion
10
+ rawConfig.plugins = [MakeBabelTransformJsxExtensionsToJs()];
11
+ return rawConfig;
12
+ }
@@ -1,5 +1,5 @@
1
1
  import type { TransformOptions } from '@babel/core';
2
2
  import type { ImportAliases } from './ImportAliases.js';
3
3
  import { DependencyGraph } from '../babelPlugins/BabelTransformPackageImports.js';
4
- export declare function makeBabelUserDevConfig(projectDir: string, absCodeDir: string, absSourceDir: string, absStyleImportBase: string, buildLocation: string, buildCodeLocation: string, packagesCacheLocation: string, skipPackageCompilationFiles: ReadonlySet<string>, oldDependencyGraph: DependencyGraph, dependencyGraph: DependencyGraph, importAliases: ImportAliases, promises: Promise<any>[], watchStyles?: boolean, hmr?: boolean, packages?: boolean): TransformOptions;
4
+ export declare function makeBabelUserDevConfig(projectDir: string, absCodeDir: string, absSourceDir: string, typescript: boolean, absStyleImportBase: string, buildLocation: string, buildCodeLocation: string, packagesCacheLocation: string, stylesCacheLocation: string | undefined, fresh: boolean, skipPackageCompilationFiles: ReadonlySet<string>, oldDependencyGraph: DependencyGraph, dependencyGraph: DependencyGraph, importAliases: ImportAliases, promises: Promise<any>[], watchStyles?: boolean, hmr?: boolean, packages?: boolean): TransformOptions;
5
5
  //# sourceMappingURL=makeBabelUserDevConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"makeBabelUserDevConfig.d.ts","sourceRoot":"","sources":["../../src/build/makeBabelUserDevConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAKnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,OAAO,EAAoC,eAAe,EAAE,MAAM,iDAAiD,CAAA;AAOnH,wBAAgB,sBAAsB,CAClC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,MAAM,EACrB,iBAAiB,EAAE,MAAM,EACzB,qBAAqB,EAAE,MAAM,EAC7B,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAAC,EAChD,kBAAkB,EAAE,eAAe,EACnC,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,EACxB,WAAW,UAAO,EAClB,GAAG,UAAQ,EACX,QAAQ,UAAO,GAChB,gBAAgB,CAyClB"}
1
+ {"version":3,"file":"makeBabelUserDevConfig.d.ts","sourceRoot":"","sources":["../../src/build/makeBabelUserDevConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAKnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,OAAO,EAAoC,eAAe,EAAE,MAAM,iDAAiD,CAAA;AAOnH,wBAAgB,sBAAsB,CAClC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,OAAO,EACnB,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,MAAM,EACrB,iBAAiB,EAAE,MAAM,EACzB,qBAAqB,EAAE,MAAM,EAC7B,mBAAmB,EAAE,MAAM,GAAG,SAAS,EACvC,KAAK,EAAE,OAAO,EACd,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAAC,EAChD,kBAAkB,EAAE,eAAe,EACnC,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,EACxB,WAAW,UAAO,EAClB,GAAG,UAAQ,EACX,QAAQ,UAAO,GAChB,gBAAgB,CA4ClB"}
@@ -1,14 +1,15 @@
1
1
  // may retire this
2
2
  import { objectCopy } from 'sxy-lib-object-copy';
3
3
  import { join } from 'path';
4
- import { MakeBabelTransformComponentStyles } from "../babelPlugins/BabelTransformComponentStyles.js";
5
- import { MakeBabelTransformPackageImports } from "../babelPlugins/BabelTransformPackageImports.js";
6
- import { componentCssFolder, componentCssFile } from "../settings.js";
7
- import userCommonConfig from "./babel.user.common.config.js";
8
- import { MakeBabelTransformCssImports } from "../babelPlugins/BabelTransformCssImports.js";
9
- import { MakeBabelAddDevCacheBust } from "../babelPlugins/BabelAddDevCacheBust.js";
10
- export function makeBabelUserDevConfig(projectDir, absCodeDir, absSourceDir, absStyleImportBase, buildLocation, buildCodeLocation, packagesCacheLocation, skipPackageCompilationFiles, oldDependencyGraph, dependencyGraph, importAliases, promises, watchStyles = true, hmr = false, packages = true) {
4
+ import { MakeBabelTransformComponentStyles } from '../babelPlugins/BabelTransformComponentStyles.js';
5
+ import { MakeBabelTransformPackageImports } from '../babelPlugins/BabelTransformPackageImports.js';
6
+ import { componentCssFolder, componentCssFile } from '../settings.js';
7
+ import userCommonConfig, { typescriptPreset } from './babel.user.common.config.js';
8
+ import { MakeBabelTransformCssImports } from '../babelPlugins/BabelTransformCssImports.js';
9
+ import { MakeBabelAddDevCacheBust } from '../babelPlugins/BabelAddDevCacheBust.js';
10
+ export function makeBabelUserDevConfig(projectDir, absCodeDir, absSourceDir, typescript, absStyleImportBase, buildLocation, buildCodeLocation, packagesCacheLocation, stylesCacheLocation, fresh, skipPackageCompilationFiles, oldDependencyGraph, dependencyGraph, importAliases, promises, watchStyles = true, hmr = false, packages = true) {
11
11
  const userDevConfig = objectCopy(userCommonConfig);
12
+ if (typescript) userDevConfig.presets.push(typescriptPreset());
12
13
  // pushed first so the plugin order is the same either way
13
14
  // its only products - the /.packages tree and the importmap aliases - are consumed by the
14
15
  // dev server, so a build that will not be served can skip the walk entirely
@@ -34,7 +35,9 @@ export function makeBabelUserDevConfig(projectDir, absCodeDir, absSourceDir, abs
34
35
  projectAbsStyleImportDir: absStyleImportBase,
35
36
  classNameFormat: '[folder]-[name]_[local]',
36
37
  cssOutputFile: join(buildLocation, componentCssFolder, componentCssFile),
37
- watch: watchStyles
38
+ watch: watchStyles,
39
+ cacheDir: stylesCacheLocation,
40
+ freshCache: fresh
38
41
  }));
39
42
  if (hmr) userDevConfig.plugins.push(
40
43
  // Dev-only: keeps every relative import's browser-cached URL in sync with the
@@ -1,3 +1,3 @@
1
1
  import type { TransformOptions } from '@babel/core';
2
- export declare function makeBabelUserProdConfig(projectDir: string, absCodeDir: string, absSourceDir: string, absStyleImportBase: string, watchStyles?: boolean): TransformOptions;
2
+ export declare function makeBabelUserProdConfig(projectDir: string, absCodeDir: string, absSourceDir: string, typescript: boolean, absStyleImportBase: string, watchStyles?: boolean): TransformOptions;
3
3
  //# sourceMappingURL=makeBabelUserProdConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"makeBabelUserProdConfig.d.ts","sourceRoot":"","sources":["../../src/build/makeBabelUserProdConfig.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAMnD,wBAAgB,uBAAuB,CACnC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,kBAAkB,EAAE,MAAM,EAC1B,WAAW,UAAO,GACnB,gBAAgB,CAgBlB"}
1
+ {"version":3,"file":"makeBabelUserProdConfig.d.ts","sourceRoot":"","sources":["../../src/build/makeBabelUserProdConfig.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAMnD,wBAAgB,uBAAuB,CACnC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,OAAO,EACnB,kBAAkB,EAAE,MAAM,EAC1B,WAAW,UAAO,GACnB,gBAAgB,CAqBlB"}
@@ -1,12 +1,17 @@
1
1
  // may retire this
2
2
  import { objectCopy } from 'sxy-lib-object-copy';
3
3
  import { join } from 'path';
4
- import { MakeBabelTransformComponentStyles } from "../babelPlugins/BabelTransformComponentStyles.js";
5
- import { prodBuildFolder, componentCssFolder, componentCssFile } from "../settings.js";
6
- import userCommonConfig from "./babel.user.common.config.js";
7
- import { MakeBabelTransformCssImports } from "../babelPlugins/BabelTransformCssImports.js";
8
- export function makeBabelUserProdConfig(projectDir, absCodeDir, absSourceDir, absStyleImportBase, watchStyles = true) {
4
+ import { MakeBabelTransformComponentStyles } from '../babelPlugins/BabelTransformComponentStyles.js';
5
+ import { prodBuildFolder, componentCssFolder, componentCssFile } from '../settings.js';
6
+ import userCommonConfig, { typescriptPreset } from './babel.user.common.config.js';
7
+ import { MakeBabelTransformCssImports } from '../babelPlugins/BabelTransformCssImports.js';
8
+ export function makeBabelUserProdConfig(projectDir, absCodeDir, absSourceDir, typescript, absStyleImportBase, watchStyles = true) {
9
9
  const userProdConfig = objectCopy(userCommonConfig);
10
+ if (typescript) userProdConfig.presets.push(typescriptPreset()); // eslint-disable-line @typescript-eslint/no-non-null-assertion
11
+ // no syntax lowering here either: the bundle step (rollup.user.prod.config.ts) owns the browser floor.
12
+ // If stripping React `propTypes` from pre-19 React components in react-zones ever matters for
13
+ // bundle size, babel-plugin-transform-react-remove-prop-types goes here (it used to sit in an
14
+ // env.production block nothing switched on, uninstalled) - tungsten itself never reads propTypes
10
15
  userProdConfig.plugins.push(
11
16
  // eslint-disable-line @typescript-eslint/no-non-null-assertion
12
17
  MakeBabelTransformCssImports({
@@ -1,9 +1,9 @@
1
1
  import { transform } from 'cjstoesm';
2
2
  import { promises as fsPromises } from 'fs';
3
3
  import fsExtra from 'fs-extra';
4
- import { packagesCacheFolder, packagesFolder } from "../settings.js";
5
- import { removeRecursive } from "../removeRecursive.js";
6
- import { cliLog } from "../cliOutput.js";
4
+ import { packagesCacheFolder, packagesFolder } from '../settings.js';
5
+ import { removeRecursive } from '../removeRecursive.js';
6
+ import { cliLog } from '../cliOutput.js';
7
7
  //import { getFrameworkDir } from '../getFrameworkDir.js'
8
8
  //// Don't think we are using this
9
9
  function getEntry(packageJson) {
@@ -1 +1 @@
1
- {"version":3,"file":"rollup.user.prod.config.d.ts","sourceRoot":"","sources":["../../src/build/rollup.user.prod.config.ts"],"names":[],"mappings":"AAcA,KAAK,YAAY,GAAG;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACrB,CAAA;AAeD,QAAA,MAAM,YAAY,EAAE,YAoBnB,CAAA;AAED,eAAe,YAAY,CAAA"}
1
+ {"version":3,"file":"rollup.user.prod.config.d.ts","sourceRoot":"","sources":["../../src/build/rollup.user.prod.config.ts"],"names":[],"mappings":"AAaA,KAAK,YAAY,GAAG;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACrB,CAAA;AAmBD,QAAA,MAAM,YAAY,EAAE,YAmBnB,CAAA;AAED,eAAe,YAAY,CAAA"}
@@ -4,31 +4,34 @@ import { babel } from "@rollup/plugin-babel";
4
4
  import terser from "@rollup/plugin-terser";
5
5
  //import gzip from "rollup-plugin-gzip"
6
6
  import jsonModule from "@rollup/plugin-json";
7
- import { MakeBabelTransformRemoveServerBlocks } from "../babelPlugins/BabelTransformRemoveServerBlocks.js";
8
- import { MakeBabelTransformRemoveDevBlocks } from "../babelPlugins/BabelTransformRemoveDevBlocks.js";
7
+ import { bundleBabelOptions } from "./bundleBabelOptions.js";
9
8
  import { rollupExtractComponentStylesheets } from "./rollupExtractComponentStylesheets.js";
10
9
  const json = typeof jsonModule === "function" ? jsonModule : jsonModule.default;
11
10
  function replaceProductionNodeEnv() {
12
11
  return {
13
- name: 'tungsten-production-node-env',
12
+ name: "tungsten-production-node-env",
14
13
  transform(code) {
15
- if (!code.includes('process.env.NODE_ENV')) return null;
14
+ if (!code.includes("process.env.NODE_ENV")) return null;
16
15
  return {
17
- code: code.replaceAll('process.env.NODE_ENV', JSON.stringify('production')),
16
+ code: code.replaceAll("process.env.NODE_ENV", JSON.stringify("production")),
18
17
  map: null
19
18
  };
20
19
  }
21
20
  };
22
21
  }
22
+ // the app config's `targets`, handed over by bundle.ts; unset means the framework default
23
+ const targetsEnv = process.env.TUNGSTEN_TARGETS;
24
+ const targets = targetsEnv === undefined ? undefined : JSON.parse(targetsEnv);
23
25
  const rollupConfig = {
24
26
  plugins: [json(), nodeResolve(), commonjs(),
25
27
  // must be before babel
26
28
  replaceProductionNodeEnv(),
27
- // before babel, which excludes node_modules and so never sees framework components
28
- rollupExtractComponentStylesheets(), babel({
29
- babelHelpers: 'bundled',
30
- exclude: '**/node_modules/**',
31
- plugins: [MakeBabelTransformRemoveServerBlocks(), MakeBabelTransformRemoveDevBlocks()]
29
+ // before babel, so it sees component stylesheets as written
30
+ rollupExtractComponentStylesheets(),
31
+ // no node_modules exclude: the floor applies to the framework and packages in the bundle too
32
+ babel({
33
+ babelHelpers: "bundled",
34
+ ...bundleBabelOptions(targets)
32
35
  }),
33
36
  // must be after commonjs
34
37
  terser({
@@ -37,6 +40,5 @@ const rollupConfig = {
37
40
  })
38
41
  ////gzip(),
39
42
  ]
40
- //strictDeprecations: true // help prep for upgrade to rollup 3 -- this complains about the inlineDynamicImports CLI arg
41
43
  };
42
44
  export default rollupConfig;
@@ -1,6 +1,6 @@
1
1
  import { dirname } from 'path';
2
- import { recordFrameworkStylesheet, writeFrameworkCss } from "./frameworkStylesheets.js";
3
- import { getPackageDirForFile } from "./getPackageDirForFile.js";
2
+ import { recordFrameworkStylesheet, writeFrameworkCss } from './frameworkStylesheets.js';
3
+ import { getPackageDirForFile } from './getPackageDirForFile.js';
4
4
  // `static $stylesheet = "i/….css"` as emitted by BabelTransformComponentStyles.
5
5
  const markerPattern = /static\s+\$stylesheet\s*=\s*(["'])([^"']+)\1\s*;?/g;
6
6
  // Prod bundles rather than walking packages, so the package-walk extraction never runs. This is
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable no-inner-declarations */
2
- import { cliLog } from "../cliOutput.js";
3
- import { throwError } from "../throwError.js";
2
+ import { cliLog } from '../cliOutput.js';
3
+ import { throwError } from '../throwError.js';
4
4
  function debug(...texts) {
5
5
  //console.log(...texts)
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tallyBabelPlugins.d.ts","sourceRoot":"","sources":["../../src/build/tallyBabelPlugins.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,aAAa,CAAA;AA+DxD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,EAAE,CAUxF"}
1
+ {"version":3,"file":"tallyBabelPlugins.d.ts","sourceRoot":"","sources":["../../src/build/tallyBabelPlugins.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,aAAa,CAAA;AA0DxD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,EAAE,CAUxF"}
@@ -1,12 +1,7 @@
1
- import { tally } from "../timeProfiler.js";
1
+ import { tallied } from '../timeProfiler.js';
2
2
  function wrapHandler(name, handler) {
3
3
  return function (...args) {
4
- const start = performance.now();
5
- try {
6
- return handler.apply(this, args);
7
- } finally {
8
- tally(name, performance.now() - start);
9
- }
4
+ return tallied(name, () => handler.apply(this, args));
10
5
  };
11
6
  }
12
7
  function wrapVisitor(name, visitor) {
@@ -5,8 +5,8 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
5
5
  //// UNUSED
6
6
  /////////////////////////////////////////////////
7
7
  import { dirname, join } from 'path';
8
- import { TungstenError } from "./TungstenError.js";
9
- import { devBuildOuterFolder, packageNameCapitalized, staticFolder } from "./settings.js";
8
+ import { TungstenError } from './TungstenError.js';
9
+ import { devBuildOuterFolder, packageNameCapitalized, staticFolder } from './settings.js';
10
10
  export class TungstenFileNotInBaseError extends TungstenError {
11
11
  constructor(...args) {
12
12
  super(...args);
@@ -1,5 +1,5 @@
1
- import { cliWarn } from "./cliOutput.js";
2
- import { filePathFromUrl } from "./filePathFromUrl.js";
1
+ import { cliWarn } from './cliOutput.js';
2
+ import { filePathFromUrl } from './filePathFromUrl.js';
3
3
  export function calledFrom(_opts = {}) {
4
4
  const opts = {
5
5
  excludeFunctions: 'excludeFunctions' in _opts ? Array.isArray(_opts.excludeFunctions) ? _opts.excludeFunctions : [_opts.excludeFunctions] : [],
@@ -1,5 +1,5 @@
1
1
  export const $forwardRef = Symbol('forwardRef');
2
- // eslint-disable-next-line @typescript-eslint/ban-types
2
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
3
3
  export function forwardRef(render) {
4
4
  // we might need a special ContetNode - ForwardRefNode
5
5
  // that maps the ref somehow?
@@ -1 +1 @@
1
- export { forwardRef } from "./forwardRef.js";
1
+ export { forwardRef } from './forwardRef.js';
@@ -1,2 +1,2 @@
1
- @import "i/T-components-library-__StatefulMessage-StatefulMessage.css";
2
- @import "i/T-components-library-RichTextEditor-RichTextEditor.css";
1
+ @import "i/T-components-library-RichTextEditor-RichTextEditor.css";
2
+ @import "i/T-components-library-__StatefulMessage-StatefulMessage.css";
@@ -1,6 +1,6 @@
1
- import { KeyIsArrayMutatingFunction, KeyIsMapMutatingFunction, KeyIsSetMutatingFunction } from "./mutatingFunctions.js";
2
- import { objectTypesToProxy } from "./objectTypesToProxy.js";
3
- import { markChanged } from "./stateTracking.js";
1
+ import { KeyIsArrayMutatingFunction, KeyIsMapMutatingFunction, KeyIsSetMutatingFunction } from './mutatingFunctions.js';
2
+ import { objectTypesToProxy } from './objectTypesToProxy.js';
3
+ import { markChanged } from './stateTracking.js';
4
4
  export const $original = Symbol('original');
5
5
  export const $ownerName = Symbol('ownerName');
6
6
  export const getStateProxyHandler = element => ({
@@ -2,8 +2,8 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { TungstenSimpleComponent } from "../Components.js";
5
- import { isProd } from "../isProd.js";
6
- import { jsx as _jsx } from "tungsten/jsxRuntime.js";
5
+ import { isProd } from '../isProd.js';
6
+ import { jsx as _jsx } from "tungsten/jsx-runtime";
7
7
  export class Link extends TungstenSimpleComponent {
8
8
  constructor(...args) {
9
9
  super(...args);
@@ -1,10 +1,10 @@
1
1
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
- import { combineClassNames } from "../helpers/combineClassNames.js";
4
+ import { combineClassNames } from '../helpers/combineClassNames.js';
5
5
  import { TungstenSimpleInternalStoreComponent } from "../Components.js";
6
- import { dismissPop, registerPopInstance } from "../pop.js";
7
- import { jsx as _jsx } from "tungsten/jsxRuntime.js";
6
+ import { dismissPop, registerPopInstance } from '../pop.js';
7
+ import { jsx as _jsx } from "tungsten/jsx-runtime";
8
8
  const messageCss = 'padding: 0.3rem 0.75rem; font-size: 0.85rem; max-height: 3rem; background: #1f3a5f;' + ' color: #eaf2ff; border-bottom: 1px solid #16283f; text-align: center; cursor: pointer; overflow: hidden;' + ' transition: max-height 0.2s ease, padding 0.2s ease;';
9
9
  const leavingCss = 'max-height: 0; padding-top: 0; padding-bottom: 0; border-bottom-width: 0;';
10
10
  // An app mounts this once in its Root, above <MatchedRoute />, so it can push
@@ -2,8 +2,8 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { TungstenSimpleComponent } from "../Components.js";
5
- import { parseHtml } from "../rawHtml/parseHtml.js";
6
- import { safeHtmlAllowList } from "../rawHtml/safeHtmlAllowList.js";
5
+ import { parseHtml } from '../rawHtml/parseHtml.js';
6
+ import { safeHtmlAllowList } from '../rawHtml/safeHtmlAllowList.js';
7
7
  /**
8
8
  * Renders a string of HTML as real content.
9
9
  *
@@ -1,10 +1,10 @@
1
1
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
- import { errorOut } from "../output.js";
4
+ import { errorOut } from '../output.js';
5
5
  import { TungstenSimpleComponent } from "../Components.js";
6
- import { isDev } from "../isDev.js";
7
- import { jsx as _jsx } from "tungsten/jsxRuntime.js";
6
+ import { isDev } from '../isDev.js';
7
+ import { jsx as _jsx } from "tungsten/jsx-runtime";
8
8
  export class Stylesheet extends TungstenSimpleComponent {
9
9
  constructor(...args) {
10
10
  super(...args);
@@ -2,7 +2,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { TungstenSimpleComponent } from "../../Components.js";
5
- import { jsx as _jsx } from "tungsten/jsxRuntime.js";
5
+ import { jsx as _jsx } from "tungsten/jsx-runtime";
6
6
  export class BindableCheckbox extends TungstenSimpleComponent {
7
7
  constructor(...args) {
8
8
  super(...args);
@@ -2,7 +2,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { TungstenSimpleComponent } from "../../Components.js";
5
- import { jsx as _jsx } from "tungsten/jsxRuntime.js";
5
+ import { jsx as _jsx } from "tungsten/jsx-runtime";
6
6
  export class BindableInput extends TungstenSimpleComponent {
7
7
  constructor(...args) {
8
8
  super(...args);
@@ -2,7 +2,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { TungstenSimpleComponent } from "../../Components.js";
5
- import { jsx as _jsx } from "tungsten/jsxRuntime.js";
5
+ import { jsx as _jsx } from "tungsten/jsx-runtime";
6
6
  export class BindableInput extends TungstenSimpleComponent {
7
7
  constructor(...args) {
8
8
  super(...args);
@@ -2,7 +2,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { TungstenSimpleComponent } from "../../Components.js";
5
- import { jsx as _jsx } from "tungsten/jsxRuntime.js";
5
+ import { jsx as _jsx } from "tungsten/jsx-runtime";
6
6
  export class BindableInput extends TungstenSimpleComponent {
7
7
  constructor(...args) {
8
8
  super(...args);
@@ -2,7 +2,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { TungstenSimpleComponent } from "../../Components.js";
5
- import { jsx as _jsx } from "tungsten/jsxRuntime.js";
5
+ import { jsx as _jsx } from "tungsten/jsx-runtime";
6
6
  export class BindableInputTyped extends TungstenSimpleComponent {
7
7
  constructor(...args) {
8
8
  super(...args);
@@ -2,7 +2,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { TungstenSimpleComponent } from "../../Components.js";
5
- import { jsx as _jsx } from "tungsten/jsxRuntime.js";
5
+ import { jsx as _jsx } from "tungsten/jsx-runtime";
6
6
  export class BindableInputTypedLegacy extends TungstenSimpleComponent {
7
7
  constructor(...args) {
8
8
  super(...args);
@@ -6,7 +6,7 @@ import { TungstenSimpleComponent } from "../../Components.js";
6
6
  // ? { filter?: FilterCheckedFunc<InputKeyboardEvent, O[K]> | undefined }
7
7
  // : { filter: FilterCheckedFunc<InputKeyboardEvent, O[K]> }
8
8
  // )
9
- import { jsx as _jsx } from "tungsten/jsxRuntime.js";
9
+ import { jsx as _jsx } from "tungsten/jsx-runtime";
10
10
  export class BindableRadio extends TungstenSimpleComponent {
11
11
  constructor(...args) {
12
12
  super(...args);
@@ -2,7 +2,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { TungstenSimpleComponent } from "../../Components.js";
5
- import { jsx as _jsx, jsxs as _jsxs } from "tungsten/jsxRuntime.js";
5
+ import { jsx as _jsx, jsxs as _jsxs } from "tungsten/jsx-runtime";
6
6
  export class BindableSelect extends TungstenSimpleComponent {
7
7
  constructor(...args) {
8
8
  super(...args);
@@ -2,7 +2,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { TungstenSimpleComponent } from "../../Components.js";
5
- import { jsx as _jsx } from "tungsten/jsxRuntime.js";
5
+ import { jsx as _jsx } from "tungsten/jsx-runtime";
6
6
  export class BindableTextarea extends TungstenSimpleComponent {
7
7
  constructor(...args) {
8
8
  super(...args);
@@ -21,14 +21,14 @@ function _toPrimitive(t, r) {
21
21
  return ("string" === r ? String : Number)(t);
22
22
  }
23
23
  import { TungstenStatefulComponent } from "../../../Components.js";
24
- import { createElementRef } from "../../../createRef.js";
25
- import { combineClassNames } from "../../../helpers/combineClassNames.js";
26
- import { parseHtml } from "../../../rawHtml/parseHtml.js";
27
- import { safeHtmlAllowList } from "../../../rawHtml/safeHtmlAllowList.js";
28
- import { activeFormatsAt } from "./activeFormats.js";
29
- import { serializeContentTree } from "./contentTree.js";
30
- import { sanitizeAuthoredHtml } from "./sanitizeAuthoredHtml.js";
31
- import { jsx as _jsx, jsxs as _jsxs } from "tungsten/jsxRuntime.js";
24
+ import { createElementRef } from '../../../createRef.js';
25
+ import { combineClassNames } from '../../../helpers/combineClassNames.js';
26
+ import { parseHtml } from '../../../rawHtml/parseHtml.js';
27
+ import { safeHtmlAllowList } from '../../../rawHtml/safeHtmlAllowList.js';
28
+ import { activeFormatsAt } from './activeFormats.js';
29
+ import { serializeContentTree } from './contentTree.js';
30
+ import { sanitizeAuthoredHtml } from './sanitizeAuthoredHtml.js';
31
+ import { jsx as _jsx, jsxs as _jsxs } from "tungsten/jsx-runtime";
32
32
  const formatBlockOptions = [
33
33
  // Applying this produces a <p> which the sanitizer then flattens back to
34
34
  // inline content — the way out of a heading or quote, and the state plain
@@ -1,7 +1,7 @@
1
- import { $props, $type } from "../../../contentNodeSymbols.js";
2
- import { ContentNodeIsArray, ContentNodeIsHtml, ContentNodeIsLiteral, ContentNodeIsNonRendered } from "../../../ContentNode.js";
3
- import { filterContentNode } from "../../../rawHtml/filterContentNode.js";
4
- import { safeHtmlAllowList } from "../../../rawHtml/safeHtmlAllowList.js";
1
+ import { $props, $type } from '../../../contentNodeSymbols.js';
2
+ import { ContentNodeIsArray, ContentNodeIsHtml, ContentNodeIsLiteral, ContentNodeIsNonRendered } from '../../../ContentNode.js';
3
+ import { filterContentNode } from '../../../rawHtml/filterContentNode.js';
4
+ import { safeHtmlAllowList } from '../../../rawHtml/safeHtmlAllowList.js';
5
5
  /**
6
6
  * Converts a Tungsten content tree into the JSON-safe StoredContentNode shape
7
7
  * for persistence/transport. Only host HTML nodes are supported — the shape
@@ -1,5 +1,5 @@
1
- import { sanitizeHtml } from "../../../rawHtml/sanitizeHtml.js";
2
- import { safeHtmlAllowList } from "../../../rawHtml/safeHtmlAllowList.js";
1
+ import { sanitizeHtml } from '../../../rawHtml/sanitizeHtml.js';
2
+ import { safeHtmlAllowList } from '../../../rawHtml/safeHtmlAllowList.js';
3
3
  // Generic block containers. The editor never creates these — Enter inserts a
4
4
  // <br> — so any that appear came from a paste or legacy content, and are
5
5
  // flattened to <br>-separated inline content. Browsers disagree about which of
@@ -21,8 +21,8 @@ function _toPrimitive(t, r) {
21
21
  return ("string" === r ? String : Number)(t);
22
22
  }
23
23
  import { TungstenStatefulComponent } from "../../../Components.js";
24
- import { combineClassNames } from "../../../helpers/combineClassNames.js";
25
- import { jsx as _jsx } from "tungsten/jsxRuntime.js";
24
+ import { combineClassNames } from '../../../helpers/combineClassNames.js';
25
+ import { jsx as _jsx } from "tungsten/jsx-runtime";
26
26
  const BLANK_MS = 70;
27
27
  // Inline page feedback which owns its own flash. A page sets a message stamped
28
28
  // with the time it was produced; a repeat of the same result therefore arrives
@@ -3,5 +3,5 @@
3
3
  export { RichTextEditor } from "./RichTextEditor/RichTextEditor.js";
4
4
  // Storing the editor's tree output means reading it back, so the conversion is
5
5
  // part of the component's public surface rather than an internal.
6
- export { serializeContentTree, deserializeContentTree } from "./RichTextEditor/contentTree.js";
7
- export { sanitizeAuthoredHtml } from "./RichTextEditor/sanitizeAuthoredHtml.js";
6
+ export { serializeContentTree, deserializeContentTree } from './RichTextEditor/contentTree.js';
7
+ export { sanitizeAuthoredHtml } from './RichTextEditor/sanitizeAuthoredHtml.js';
@@ -1 +1 @@
1
- export { jsx as createElement } from "./jsxRuntime.js";
1
+ export { jsx as createElement } from './jsxRuntime.js';