@tamagui/static 3.0.0-beta.655.1 → 3.0.0-beta.669.1

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.
@@ -39,4 +39,5 @@ __reExport(exports_exports, require("./registerRequire.cjs"), module.exports);
39
39
  var import_detectModuleFormat = require("./extractor/detectModuleFormat.cjs");
40
40
  var import_bundle = require("./extractor/bundle.cjs");
41
41
  __reExport(exports_exports, require("./getPragmaOptions.cjs"), module.exports);
42
+ __reExport(exports_exports, require("./runtimeFeatures.cjs"), module.exports);
42
43
  __reExport(exports_exports, require("./zero/index.cjs"), module.exports);
@@ -0,0 +1,44 @@
1
+
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
20
+ };
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
+ var runtimeFeatures_exports = {};
23
+ __export(runtimeFeatures_exports, {
24
+ getWebRuntimeFeatureDefines: () => getWebRuntimeFeatureDefines,
25
+ resolveWebRuntimeFeatureLiterals: () => resolveWebRuntimeFeatureLiterals
26
+ });
27
+ module.exports = __toCommonJS(runtimeFeatures_exports);
28
+ const featureLiteral = (value) => value === false ? "disabled" : "enabled";
29
+ function resolveWebRuntimeFeatureLiterals(options) {
30
+ const features = options.experimental?.webRuntimeFeatures;
31
+ return {
32
+ inlineThemeValues: featureLiteral(features?.inlineThemeValues),
33
+ styleValueGrammar: featureLiteral(features?.styleValueGrammar),
34
+ safeArea: featureLiteral(features?.safeArea)
35
+ };
36
+ }
37
+ function getWebRuntimeFeatureDefines(options) {
38
+ const features = resolveWebRuntimeFeatureLiterals(options);
39
+ return {
40
+ "process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES": JSON.stringify(features.inlineThemeValues),
41
+ "process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR": JSON.stringify(features.styleValueGrammar),
42
+ "process.env.TAMAGUI_RUNTIME_SAFE_AREA": JSON.stringify(features.safeArea)
43
+ };
44
+ }
@@ -21,6 +21,8 @@ export * from "./registerRequire.mjs"
21
21
 
22
22
  export * from "./getPragmaOptions.mjs"
23
23
 
24
+ export * from "./runtimeFeatures.mjs"
25
+
24
26
  export * from "./zero/index.mjs"
25
27
 
26
28
  export { clearFormatCache, detectModuleFormat, esbundleTamaguiConfig };
@@ -0,0 +1,20 @@
1
+ const featureLiteral = (value) => value === false ? "disabled" : "enabled";
2
+ function resolveWebRuntimeFeatureLiterals(options) {
3
+ const features = options.experimental?.webRuntimeFeatures;
4
+ return {
5
+ inlineThemeValues: featureLiteral(features?.inlineThemeValues),
6
+ styleValueGrammar: featureLiteral(features?.styleValueGrammar),
7
+ safeArea: featureLiteral(features?.safeArea)
8
+ };
9
+ }
10
+ function getWebRuntimeFeatureDefines(options) {
11
+ const features = resolveWebRuntimeFeatureLiterals(options);
12
+ return {
13
+ "process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES": JSON.stringify(features.inlineThemeValues),
14
+ "process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR": JSON.stringify(features.styleValueGrammar),
15
+ "process.env.TAMAGUI_RUNTIME_SAFE_AREA": JSON.stringify(features.safeArea)
16
+ };
17
+ }
18
+
19
+ export { getWebRuntimeFeatureDefines, resolveWebRuntimeFeatureLiterals };
20
+ //# sourceMappingURL=runtimeFeatures.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeFeatures.js","names":[],"sources":["esm/runtimeFeatures.js"],"sourcesContent":["const featureLiteral = (value) => value === false ? \"disabled\" : \"enabled\";\nfunction resolveWebRuntimeFeatureLiterals(options) {\n const features = options.experimental?.webRuntimeFeatures;\n return {\n inlineThemeValues: featureLiteral(features?.inlineThemeValues),\n styleValueGrammar: featureLiteral(features?.styleValueGrammar),\n safeArea: featureLiteral(features?.safeArea)\n };\n}\nfunction getWebRuntimeFeatureDefines(options) {\n const features = resolveWebRuntimeFeatureLiterals(options);\n return {\n \"process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES\": JSON.stringify(\n features.inlineThemeValues\n ),\n \"process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR\": JSON.stringify(\n features.styleValueGrammar\n ),\n \"process.env.TAMAGUI_RUNTIME_SAFE_AREA\": JSON.stringify(features.safeArea)\n };\n}\nexport {\n getWebRuntimeFeatureDefines,\n resolveWebRuntimeFeatureLiterals\n};\n//# sourceMappingURL=runtimeFeatures.js.map\n"],"mappings":";AAAA,MAAM,kBAAkB,UAAU,UAAU,QAAQ,aAAa;AACjE,SAAS,iCAAiC,SAAS;CACjD,MAAM,WAAW,QAAQ,cAAc;CACvC,OAAO;EACL,mBAAmB,eAAe,UAAU,iBAAiB;EAC7D,mBAAmB,eAAe,UAAU,iBAAiB;EAC7D,UAAU,eAAe,UAAU,QAAQ;CAC7C;AACF;AACA,SAAS,4BAA4B,SAAS;CAC5C,MAAM,WAAW,iCAAiC,OAAO;CACzD,OAAO;EACL,mDAAmD,KAAK,UACtD,SAAS,iBACX;EACA,mDAAmD,KAAK,UACtD,SAAS,iBACX;EACA,yCAAyC,KAAK,UAAU,SAAS,QAAQ;CAC3E;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/static",
3
- "version": "3.0.0-beta.655.1",
3
+ "version": "3.0.0-beta.669.1",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "license": "MIT",
6
6
  "source": "src/index.ts",
@@ -45,21 +45,21 @@
45
45
  "clean:build": "tamagui-build clean:build"
46
46
  },
47
47
  "dependencies": {
48
- "@tamagui/cli-color": "3.0.0-beta.655.1",
49
- "@tamagui/compiler-core": "3.0.0-beta.655.1",
50
- "@tamagui/config-default": "3.0.0-beta.655.1",
51
- "@tamagui/core": "3.0.0-beta.655.1",
52
- "@tamagui/dom": "3.0.0-beta.655.1",
53
- "@tamagui/fake-react-native": "3.0.0-beta.655.1",
54
- "@tamagui/generate-themes": "3.0.0-beta.655.1",
55
- "@tamagui/helpers": "3.0.0-beta.655.1",
56
- "@tamagui/helpers-node": "3.0.0-beta.655.1",
57
- "@tamagui/react-native-web-internals": "3.0.0-beta.655.1",
58
- "@tamagui/react-native-web-lite": "3.0.0-beta.655.1",
59
- "@tamagui/shorthands": "3.0.0-beta.655.1",
60
- "@tamagui/style-grammar": "3.0.0-beta.655.1",
61
- "@tamagui/types": "3.0.0-beta.655.1",
62
- "@tamagui/web": "3.0.0-beta.655.1",
48
+ "@tamagui/cli-color": "3.0.0-beta.669.1",
49
+ "@tamagui/compiler-core": "3.0.0-beta.669.1",
50
+ "@tamagui/config-default": "3.0.0-beta.669.1",
51
+ "@tamagui/core": "3.0.0-beta.669.1",
52
+ "@tamagui/dom": "3.0.0-beta.669.1",
53
+ "@tamagui/fake-react-native": "3.0.0-beta.669.1",
54
+ "@tamagui/generate-themes": "3.0.0-beta.669.1",
55
+ "@tamagui/helpers": "3.0.0-beta.669.1",
56
+ "@tamagui/helpers-node": "3.0.0-beta.669.1",
57
+ "@tamagui/react-native-web-internals": "3.0.0-beta.669.1",
58
+ "@tamagui/react-native-web-lite": "3.0.0-beta.669.1",
59
+ "@tamagui/shorthands": "3.0.0-beta.669.1",
60
+ "@tamagui/style-grammar": "3.0.0-beta.669.1",
61
+ "@tamagui/types": "3.0.0-beta.669.1",
62
+ "@tamagui/web": "3.0.0-beta.669.1",
63
63
  "browserslist": "^4.28.1",
64
64
  "check-dependency-version-consistency": "^4.1.0",
65
65
  "esbuild": "0.28.1",
@@ -71,7 +71,7 @@
71
71
  "react-native-web": "^0.21.0"
72
72
  },
73
73
  "devDependencies": {
74
- "@tamagui/build": "3.0.0-beta.655.1",
74
+ "@tamagui/build": "3.0.0-beta.669.1",
75
75
  "@types/find-root": "^1.1.2",
76
76
  "@types/node": "^22.1.0",
77
77
  "@types/webpack": "^4.41.26",
package/src/exports.ts CHANGED
@@ -10,4 +10,5 @@ export * from './registerRequire'
10
10
  export { detectModuleFormat, clearFormatCache } from './extractor/detectModuleFormat'
11
11
  export { esbundleTamaguiConfig } from './extractor/bundle'
12
12
  export * from './getPragmaOptions'
13
+ export * from './runtimeFeatures'
13
14
  export * from './zero'
@@ -0,0 +1,39 @@
1
+ import type { TamaguiOptions } from '@tamagui/types'
2
+
3
+ export type WebRuntimeFeatureLiteral = 'enabled' | 'disabled'
4
+
5
+ export type WebRuntimeFeatureLiterals = {
6
+ inlineThemeValues: WebRuntimeFeatureLiteral
7
+ styleValueGrammar: WebRuntimeFeatureLiteral
8
+ safeArea: WebRuntimeFeatureLiteral
9
+ }
10
+
11
+ const featureLiteral = (value: boolean | undefined): WebRuntimeFeatureLiteral =>
12
+ value === false ? 'disabled' : 'enabled'
13
+
14
+ /** Integration-owned literals. An absent option preserves the complete runtime. */
15
+ export function resolveWebRuntimeFeatureLiterals(
16
+ options: Pick<TamaguiOptions, 'experimental'>
17
+ ): WebRuntimeFeatureLiterals {
18
+ const features = options.experimental?.webRuntimeFeatures
19
+ return {
20
+ inlineThemeValues: featureLiteral(features?.inlineThemeValues),
21
+ styleValueGrammar: featureLiteral(features?.styleValueGrammar),
22
+ safeArea: featureLiteral(features?.safeArea),
23
+ }
24
+ }
25
+
26
+ export function getWebRuntimeFeatureDefines(
27
+ options: Pick<TamaguiOptions, 'experimental'>
28
+ ): Record<string, string> {
29
+ const features = resolveWebRuntimeFeatureLiterals(options)
30
+ return {
31
+ 'process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES': JSON.stringify(
32
+ features.inlineThemeValues
33
+ ),
34
+ 'process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR': JSON.stringify(
35
+ features.styleValueGrammar
36
+ ),
37
+ 'process.env.TAMAGUI_RUNTIME_SAFE_AREA': JSON.stringify(features.safeArea),
38
+ }
39
+ }
@@ -10,5 +10,6 @@ export * from './registerRequire';
10
10
  export { detectModuleFormat, clearFormatCache } from './extractor/detectModuleFormat';
11
11
  export { esbundleTamaguiConfig } from './extractor/bundle';
12
12
  export * from './getPragmaOptions';
13
+ export * from './runtimeFeatures';
13
14
  export * from './zero';
14
15
  //# sourceMappingURL=exports.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,mBAAmB,CAAA;AACjC,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,cAAc,oBAAoB,CAAA;AAClC,cAAc,QAAQ,CAAA"}
1
+ {"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,mBAAmB,CAAA;AACjC,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,QAAQ,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { TamaguiOptions } from '@tamagui/types';
2
+ export type WebRuntimeFeatureLiteral = 'enabled' | 'disabled';
3
+ export type WebRuntimeFeatureLiterals = {
4
+ inlineThemeValues: WebRuntimeFeatureLiteral;
5
+ styleValueGrammar: WebRuntimeFeatureLiteral;
6
+ safeArea: WebRuntimeFeatureLiteral;
7
+ };
8
+ /** Integration-owned literals. An absent option preserves the complete runtime. */
9
+ export declare function resolveWebRuntimeFeatureLiterals(options: Pick<TamaguiOptions, 'experimental'>): WebRuntimeFeatureLiterals;
10
+ export declare function getWebRuntimeFeatureDefines(options: Pick<TamaguiOptions, 'experimental'>): Record<string, string>;
11
+ //# sourceMappingURL=runtimeFeatures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeFeatures.d.ts","sourceRoot":"","sources":["../src/runtimeFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEpD,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,UAAU,CAAA;AAE7D,MAAM,MAAM,yBAAyB,GAAG;IACtC,iBAAiB,EAAE,wBAAwB,CAAA;IAC3C,iBAAiB,EAAE,wBAAwB,CAAA;IAC3C,QAAQ,EAAE,wBAAwB,CAAA;CACnC,CAAA;AAKD,mFAAmF;AACnF,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,GAC5C,yBAAyB,CAO3B;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,GAC5C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWxB"}