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
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { getPackageJson } from 'sxy-package-investigator';
|
|
2
|
-
import { TungstenError } from
|
|
3
|
-
import { getFrameworkDir } from
|
|
4
|
-
import { frameworkDistFolder, packageName } from
|
|
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
|
-
|
|
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
|
|
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
|
|
4
|
-
import { frameworkDistFolder } from
|
|
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
|
|
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,
|
|
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
|
|
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
|
-
'
|
|
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
|
|
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 @@
|
|
|
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,
|
|
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
|
|
5
|
-
import { MakeBabelTransformPackageImports } from
|
|
6
|
-
import { componentCssFolder, componentCssFile } from
|
|
7
|
-
import userCommonConfig from
|
|
8
|
-
import { MakeBabelTransformCssImports } from
|
|
9
|
-
import { MakeBabelAddDevCacheBust } from
|
|
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,
|
|
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
|
|
5
|
-
import { prodBuildFolder, componentCssFolder, componentCssFile } from
|
|
6
|
-
import userCommonConfig from
|
|
7
|
-
import { MakeBabelTransformCssImports } from
|
|
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
|
|
5
|
-
import { removeRecursive } from
|
|
6
|
-
import { cliLog } from
|
|
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":"
|
|
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 {
|
|
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:
|
|
12
|
+
name: "tungsten-production-node-env",
|
|
14
13
|
transform(code) {
|
|
15
|
-
if (!code.includes(
|
|
14
|
+
if (!code.includes("process.env.NODE_ENV")) return null;
|
|
16
15
|
return {
|
|
17
|
-
code: code.replaceAll(
|
|
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,
|
|
28
|
-
rollupExtractComponentStylesheets(),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
|
3
|
-
import { getPackageDirForFile } from
|
|
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
|
|
3
|
-
import { throwError } from
|
|
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;
|
|
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 {
|
|
1
|
+
import { tallied } from '../timeProfiler.js';
|
|
2
2
|
function wrapHandler(name, handler) {
|
|
3
3
|
return function (...args) {
|
|
4
|
-
|
|
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
|
|
9
|
-
import { devBuildOuterFolder, packageNameCapitalized, staticFolder } from
|
|
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);
|
package/dist/calledFrom.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cliWarn } from
|
|
2
|
-
import { filePathFromUrl } from
|
|
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/
|
|
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?
|
package/dist/compat/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { forwardRef } from
|
|
1
|
+
export { forwardRef } from './forwardRef.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { KeyIsArrayMutatingFunction, KeyIsMapMutatingFunction, KeyIsSetMutatingFunction } from
|
|
2
|
-
import { objectTypesToProxy } from
|
|
3
|
-
import { markChanged } from
|
|
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 => ({
|
package/dist/components/Link.js
CHANGED
|
@@ -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
|
|
6
|
-
import { jsx as _jsx } from "tungsten/
|
|
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
|
|
4
|
+
import { combineClassNames } from '../helpers/combineClassNames.js';
|
|
5
5
|
import { TungstenSimpleInternalStoreComponent } from "../Components.js";
|
|
6
|
-
import { dismissPop, registerPopInstance } from
|
|
7
|
-
import { jsx as _jsx } from "tungsten/
|
|
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
|
|
6
|
-
import { safeHtmlAllowList } from
|
|
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
|
|
4
|
+
import { errorOut } from '../output.js';
|
|
5
5
|
import { TungstenSimpleComponent } from "../Components.js";
|
|
6
|
-
import { isDev } from
|
|
7
|
-
import { jsx as _jsx } from "tungsten/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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
|
|
25
|
-
import { combineClassNames } from
|
|
26
|
-
import { parseHtml } from
|
|
27
|
-
import { safeHtmlAllowList } from
|
|
28
|
-
import { activeFormatsAt } from
|
|
29
|
-
import { serializeContentTree } from
|
|
30
|
-
import { sanitizeAuthoredHtml } from
|
|
31
|
-
import { jsx as _jsx, jsxs as _jsxs } from "tungsten/
|
|
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
|
|
2
|
-
import { ContentNodeIsArray, ContentNodeIsHtml, ContentNodeIsLiteral, ContentNodeIsNonRendered } from
|
|
3
|
-
import { filterContentNode } from
|
|
4
|
-
import { safeHtmlAllowList } from
|
|
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
|
|
2
|
-
import { safeHtmlAllowList } from
|
|
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
|
|
25
|
-
import { jsx as _jsx } from "tungsten/
|
|
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
|
|
7
|
-
export { sanitizeAuthoredHtml } from
|
|
6
|
+
export { serializeContentTree, deserializeContentTree } from './RichTextEditor/contentTree.js';
|
|
7
|
+
export { sanitizeAuthoredHtml } from './RichTextEditor/sanitizeAuthoredHtml.js';
|
package/dist/createElement.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { jsx as createElement } from
|
|
1
|
+
export { jsx as createElement } from './jsxRuntime.js';
|
package/dist/defaultConfig.d.ts
CHANGED