@tamagui/static 1.135.3 → 1.135.4-1761749240853
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/check-dep-versions.mjs +268 -0
- package/dist/check-dep-versions.mjs.map +1 -0
- package/dist/checkDeps.mjs +33 -0
- package/dist/checkDeps.mjs.map +1 -0
- package/dist/constants.mjs +50 -0
- package/dist/constants.mjs.map +1 -0
- package/dist/exports.mjs +42 -0
- package/dist/exports.mjs.map +1 -0
- package/dist/extractor/accessSafe.mjs +47 -0
- package/dist/extractor/accessSafe.mjs.map +1 -0
- package/dist/extractor/babelParse.mjs +55 -0
- package/dist/extractor/babelParse.mjs.map +1 -0
- package/dist/extractor/bundle.mjs +149 -0
- package/dist/extractor/bundle.mjs.map +1 -0
- package/dist/extractor/bundleConfig.mjs +331 -0
- package/dist/extractor/bundleConfig.mjs.map +1 -0
- package/dist/extractor/concatClassName.mjs +79 -0
- package/dist/extractor/concatClassName.mjs.map +1 -0
- package/dist/extractor/createEvaluator.mjs +76 -0
- package/dist/extractor/createEvaluator.mjs.map +1 -0
- package/dist/extractor/createExtractor.mjs +976 -0
- package/dist/extractor/createExtractor.mjs.map +1 -0
- package/dist/extractor/createLogger.mjs +46 -0
- package/dist/extractor/createLogger.mjs.map +1 -0
- package/dist/extractor/errors.mjs +27 -0
- package/dist/extractor/errors.mjs.map +1 -0
- package/dist/extractor/esbuildAliasPlugin.mjs +45 -0
- package/dist/extractor/esbuildAliasPlugin.mjs.map +1 -0
- package/dist/extractor/esbuildTsconfigPaths.mjs +85 -0
- package/dist/extractor/esbuildTsconfigPaths.mjs.map +1 -0
- package/dist/extractor/evaluateAstNode.mjs +84 -0
- package/dist/extractor/evaluateAstNode.mjs.map +1 -0
- package/dist/extractor/extractHelpers.mjs +121 -0
- package/dist/extractor/extractHelpers.mjs.map +1 -0
- package/dist/extractor/extractMediaStyle.mjs +129 -0
- package/dist/extractor/extractMediaStyle.mjs.map +1 -0
- package/dist/extractor/extractToClassNames.mjs +304 -0
- package/dist/extractor/extractToClassNames.mjs.map +1 -0
- package/dist/extractor/extractToNative.mjs +262 -0
- package/dist/extractor/extractToNative.mjs.map +1 -0
- package/dist/extractor/findTopmostFunction.mjs +35 -0
- package/dist/extractor/findTopmostFunction.mjs.map +1 -0
- package/dist/extractor/{generatedUid.native.js → generatedUid.mjs} +26 -23
- package/dist/extractor/generatedUid.mjs.map +1 -0
- package/dist/extractor/getPrefixLogs.mjs +30 -0
- package/dist/extractor/getPrefixLogs.mjs.map +1 -0
- package/dist/extractor/getPropValueFromAttributes.mjs +68 -0
- package/dist/extractor/getPropValueFromAttributes.mjs.map +1 -0
- package/dist/extractor/getSourceModule.mjs +65 -0
- package/dist/extractor/getSourceModule.mjs.map +1 -0
- package/dist/extractor/getStaticBindingsForScope.mjs +149 -0
- package/dist/extractor/getStaticBindingsForScope.mjs.map +1 -0
- package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.mjs +36 -0
- package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.mjs.map +1 -0
- package/dist/extractor/literalToAst.mjs +85 -0
- package/dist/extractor/literalToAst.mjs.map +1 -0
- package/dist/extractor/loadFile.mjs +12 -0
- package/dist/extractor/loadFile.mjs.map +1 -0
- package/dist/extractor/loadTamagui.mjs +296 -0
- package/dist/extractor/loadTamagui.mjs.map +1 -0
- package/dist/extractor/logLines.mjs +36 -0
- package/dist/extractor/logLines.mjs.map +1 -0
- package/dist/extractor/{normalizeTernaries.native.js → normalizeTernaries.mjs} +45 -31
- package/dist/extractor/normalizeTernaries.mjs.map +1 -0
- package/dist/extractor/propsToFontFamilyCache.mjs +39 -0
- package/dist/extractor/propsToFontFamilyCache.mjs.map +1 -0
- package/dist/extractor/regenerateConfig.mjs +145 -0
- package/dist/extractor/regenerateConfig.mjs.map +1 -0
- package/dist/extractor/removeUnusedHooks.mjs +77 -0
- package/dist/extractor/removeUnusedHooks.mjs.map +1 -0
- package/dist/extractor/timer.mjs +44 -0
- package/dist/extractor/timer.mjs.map +1 -0
- package/dist/extractor/{validHTMLAttributes.native.js → validHTMLAttributes.mjs} +17 -16
- package/dist/extractor/validHTMLAttributes.mjs.map +1 -0
- package/dist/extractor/watchTamaguiConfig.mjs +59 -0
- package/dist/extractor/watchTamaguiConfig.mjs.map +1 -0
- package/dist/getPragmaOptions.mjs +55 -0
- package/dist/getPragmaOptions.mjs.map +1 -0
- package/dist/helpers/memoize.mjs +38 -0
- package/dist/helpers/memoize.mjs.map +1 -0
- package/dist/helpers/requireTamaguiCore.mjs +34 -0
- package/dist/helpers/requireTamaguiCore.mjs.map +1 -0
- package/dist/index.mjs +41 -0
- package/dist/index.mjs.map +1 -0
- package/dist/registerRequire.mjs +107 -0
- package/dist/registerRequire.mjs.map +1 -0
- package/dist/server.mjs +76 -0
- package/dist/server.mjs.map +1 -0
- package/dist/setup.mjs +2 -0
- package/dist/setup.mjs.map +1 -0
- package/dist/{types.native.js → types.mjs} +8 -6
- package/dist/types.mjs.map +1 -0
- package/package.json +19 -21
- package/dist/check-dep-versions.native.js +0 -602
- package/dist/check-dep-versions.native.js.map +0 -6
- package/dist/checkDeps.native.js +0 -34
- package/dist/checkDeps.native.js.map +0 -6
- package/dist/constants.native.js +0 -45
- package/dist/constants.native.js.map +0 -6
- package/dist/exports.native.js +0 -52
- package/dist/exports.native.js.map +0 -6
- package/dist/extractor/accessSafe.native.js +0 -48
- package/dist/extractor/accessSafe.native.js.map +0 -6
- package/dist/extractor/babelParse.native.js +0 -62
- package/dist/extractor/babelParse.native.js.map +0 -6
- package/dist/extractor/bundle.native.js +0 -168
- package/dist/extractor/bundle.native.js.map +0 -6
- package/dist/extractor/bundleConfig.native.js +0 -394
- package/dist/extractor/bundleConfig.native.js.map +0 -6
- package/dist/extractor/concatClassName.native.js +0 -69
- package/dist/extractor/concatClassName.native.js.map +0 -6
- package/dist/extractor/createEvaluator.native.js +0 -63
- package/dist/extractor/createEvaluator.native.js.map +0 -6
- package/dist/extractor/createExtractor.native.js +0 -1229
- package/dist/extractor/createExtractor.native.js.map +0 -6
- package/dist/extractor/createLogger.native.js +0 -35
- package/dist/extractor/createLogger.native.js.map +0 -6
- package/dist/extractor/errors.native.js +0 -119
- package/dist/extractor/errors.native.js.map +0 -6
- package/dist/extractor/esbuildAliasPlugin.native.js +0 -52
- package/dist/extractor/esbuildAliasPlugin.native.js.map +0 -6
- package/dist/extractor/esbuildTsconfigPaths.native.js +0 -79
- package/dist/extractor/esbuildTsconfigPaths.native.js.map +0 -6
- package/dist/extractor/evaluateAstNode.native.js +0 -98
- package/dist/extractor/evaluateAstNode.native.js.map +0 -6
- package/dist/extractor/extractHelpers.native.js +0 -183
- package/dist/extractor/extractHelpers.native.js.map +0 -6
- package/dist/extractor/extractMediaStyle.native.js +0 -138
- package/dist/extractor/extractMediaStyle.native.js.map +0 -6
- package/dist/extractor/extractToClassNames.native.js +0 -332
- package/dist/extractor/extractToClassNames.native.js.map +0 -6
- package/dist/extractor/extractToNative.native.js +0 -276
- package/dist/extractor/extractToNative.native.js.map +0 -6
- package/dist/extractor/findTopmostFunction.native.js +0 -37
- package/dist/extractor/findTopmostFunction.native.js.map +0 -6
- package/dist/extractor/generatedUid.native.js.map +0 -6
- package/dist/extractor/getPrefixLogs.native.js +0 -30
- package/dist/extractor/getPrefixLogs.native.js.map +0 -6
- package/dist/extractor/getPropValueFromAttributes.native.js +0 -68
- package/dist/extractor/getPropValueFromAttributes.native.js.map +0 -6
- package/dist/extractor/getSourceModule.native.js +0 -80
- package/dist/extractor/getSourceModule.native.js.map +0 -6
- package/dist/extractor/getStaticBindingsForScope.native.js +0 -183
- package/dist/extractor/getStaticBindingsForScope.native.js.map +0 -6
- package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.native.js +0 -37
- package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +0 -6
- package/dist/extractor/literalToAst.native.js +0 -106
- package/dist/extractor/literalToAst.native.js.map +0 -6
- package/dist/extractor/loadFile.native.js +0 -21
- package/dist/extractor/loadFile.native.js.map +0 -6
- package/dist/extractor/loadTamagui.native.js +0 -314
- package/dist/extractor/loadTamagui.native.js.map +0 -6
- package/dist/extractor/logLines.native.js +0 -53
- package/dist/extractor/logLines.native.js.map +0 -6
- package/dist/extractor/normalizeTernaries.native.js.map +0 -6
- package/dist/extractor/propsToFontFamilyCache.native.js +0 -40
- package/dist/extractor/propsToFontFamilyCache.native.js.map +0 -6
- package/dist/extractor/regenerateConfig.native.js +0 -148
- package/dist/extractor/regenerateConfig.native.js.map +0 -6
- package/dist/extractor/removeUnusedHooks.native.js +0 -111
- package/dist/extractor/removeUnusedHooks.native.js.map +0 -6
- package/dist/extractor/timer.native.js +0 -44
- package/dist/extractor/timer.native.js.map +0 -6
- package/dist/extractor/validHTMLAttributes.native.js.map +0 -6
- package/dist/extractor/watchTamaguiConfig.native.js +0 -60
- package/dist/extractor/watchTamaguiConfig.native.js.map +0 -6
- package/dist/getPragmaOptions.native.js +0 -62
- package/dist/getPragmaOptions.native.js.map +0 -6
- package/dist/helpers/memoize.native.js +0 -40
- package/dist/helpers/memoize.native.js.map +0 -6
- package/dist/helpers/requireTamaguiCore.native.js +0 -34
- package/dist/helpers/requireTamaguiCore.native.js.map +0 -6
- package/dist/index.native.js +0 -35
- package/dist/index.native.js.map +0 -6
- package/dist/registerRequire.native.js +0 -124
- package/dist/registerRequire.native.js.map +0 -6
- package/dist/server.native.js +0 -70
- package/dist/server.native.js.map +0 -6
- package/dist/setup.native.js +0 -2
- package/dist/setup.native.js.map +0 -6
- package/dist/types.native.js.map +0 -6
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
6
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: !0
|
|
28
|
+
}) : target, mod)),
|
|
29
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
+
value: !0
|
|
31
|
+
}), mod);
|
|
32
|
+
var createEvaluator_exports = {};
|
|
33
|
+
__export(createEvaluator_exports, {
|
|
34
|
+
createEvaluator: () => createEvaluator,
|
|
35
|
+
createSafeEvaluator: () => createSafeEvaluator
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(createEvaluator_exports);
|
|
38
|
+
var import_node_vm = __toESM(require("node:vm")),
|
|
39
|
+
import_generator = __toESM(require("@babel/generator")),
|
|
40
|
+
t = __toESM(require("@babel/types")),
|
|
41
|
+
import_esbuild = __toESM(require("esbuild")),
|
|
42
|
+
import_constants = require("../constants.mjs"),
|
|
43
|
+
import_evaluateAstNode = require("./evaluateAstNode.mjs");
|
|
44
|
+
function createEvaluator({
|
|
45
|
+
props,
|
|
46
|
+
staticNamespace,
|
|
47
|
+
sourcePath,
|
|
48
|
+
traversePath,
|
|
49
|
+
shouldPrintDebug
|
|
50
|
+
}) {
|
|
51
|
+
const evalFn = n => {
|
|
52
|
+
if (t.isIdentifier(n) && typeof staticNamespace[n.name] < "u") return staticNamespace[n.name];
|
|
53
|
+
const evalContext = import_node_vm.default.createContext(staticNamespace),
|
|
54
|
+
codeWithTypescriptAnnotations = `(${(0, import_generator.default)(n).code})`,
|
|
55
|
+
code = import_esbuild.default.transformSync(codeWithTypescriptAnnotations, {
|
|
56
|
+
loader: "tsx"
|
|
57
|
+
}).code.replace(/;\n$/, "");
|
|
58
|
+
shouldPrintDebug && console.info("evaluating", code);
|
|
59
|
+
const result1 = import_node_vm.default.runInContext(code, evalContext),
|
|
60
|
+
result2 = import_node_vm.default.runInContext(code, evalContext);
|
|
61
|
+
if (!(Object.is(result1, result2) || typeof result1 == "object" && typeof result2 == "object" && JSON.stringify(result1) === JSON.stringify(result2))) throw shouldPrintDebug && console.info("Bailing on non-deterministic expression:", code, `
|
|
62
|
+
First result:`, result1, "Second result:", result2), new Error("Non-deterministic value, bailing");
|
|
63
|
+
return result1;
|
|
64
|
+
};
|
|
65
|
+
return n => (0, import_evaluateAstNode.evaluateAstNode)(n, evalFn);
|
|
66
|
+
}
|
|
67
|
+
function createSafeEvaluator(attemptEval) {
|
|
68
|
+
return n => {
|
|
69
|
+
try {
|
|
70
|
+
return attemptEval(n);
|
|
71
|
+
} catch {
|
|
72
|
+
return import_constants.FAILED_EVAL;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=createEvaluator.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createEvaluator_exports","__export","createEvaluator","createSafeEvaluator","module","exports","__toCommonJS","import_node_vm","__toESM","require","import_generator","t","import_esbuild","import_constants","import_evaluateAstNode","props","staticNamespace","sourcePath","traversePath","shouldPrintDebug","evalFn","n","isIdentifier","name","evalContext","default","createContext","codeWithTypescriptAnnotations","code","transformSync","loader","replace","console","info","result1","runInContext","result2","Object","is","JSON","stringify","Error","evaluateAstNode","attemptEval","FAILED_EVAL"],"sources":["../../src/extractor/createEvaluator.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,uBAAA;AAAAC,QAAA,CAAAD,uBAAA;EAAAE,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,mBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAN,uBAAA;AAAA,IAAAO,cAAA,GAAeC,OAAA,CAAAC,OAAA;EAEfC,gBAAA,GAAqBF,OAAA,CAAAC,OAAA;EAErBE,CAAA,GAAmBH,OAAA,CAAAC,OAAA;EACnBG,cAAA,GAAoBJ,OAAA,CAAAC,OAAA;EAEpBI,gBAAA,GAA4BJ,OAAA;EAE5BK,sBAAA,GAAgCL,OAAA;AAEzB,SAASP,gBAAgB;EAC9Ba,KAAA;EACAC,eAAA;EACAC,UAAA;EACAC,YAAA;EACAC;AACF,GAMG;EAED,MAAMC,MAAA,GAAUC,CAAA,IAAc;IAE5B,IAAIV,CAAA,CAAEW,YAAA,CAAaD,CAAC,KAAK,OAAOL,eAAA,CAAgBK,CAAA,CAAEE,IAAI,IAAM,KAC1D,OAAOP,eAAA,CAAgBK,CAAA,CAAEE,IAAI;IAG/B,MAAMC,WAAA,GAAcjB,cAAA,CAAAkB,OAAA,CAAGC,aAAA,CAAcV,eAAe;MAE9CW,6BAAA,GAAgC,QAAIjB,gBAAA,CAAAe,OAAA,EAASJ,CAAQ,EAAEO,IAAI;MAC3DA,IAAA,GAAOhB,cAAA,CAAAa,OAAA,CACVI,aAAA,CAAcF,6BAAA,EAA+B;QAAEG,MAAA,EAAQ;MAAM,CAAC,EAC9DF,IAAA,CAAKG,OAAA,CAAQ,QAAQ,EAAE;IAEtBZ,gBAAA,IACFa,OAAA,CAAQC,IAAA,CAAK,cAAcL,IAAI;IAGjC,MAAMM,OAAA,GAAU3B,cAAA,CAAAkB,OAAA,CAAGU,YAAA,CAAaP,IAAA,EAAMJ,WAAW;MAC3CY,OAAA,GAAU7B,cAAA,CAAAkB,OAAA,CAAGU,YAAA,CAAaP,IAAA,EAAMJ,WAAW;IAQjD,IAAI,EALFa,MAAA,CAAOC,EAAA,CAAGJ,OAAA,EAASE,OAAO,KACzB,OAAOF,OAAA,IAAY,YAClB,OAAOE,OAAA,IAAY,YACnBG,IAAA,CAAKC,SAAA,CAAUN,OAAO,MAAMK,IAAA,CAAKC,SAAA,CAAUJ,OAAO,IAGpD,MAAIjB,gBAAA,IACFa,OAAA,CAAQC,IAAA,CACN,4CACAL,IAAA,EACA;AAAA,gBACAM,OAAA,EACA,kBACAE,OACF,GAEI,IAAIK,KAAA,CAAM,kCAAkC;IAGpD,OAAOP,OAAA;EACT;EAEA,OAAQb,CAAA,QACCP,sBAAA,CAAA4B,eAAA,EAAgBrB,CAAA,EAAGD,MAAM;AAEpC;AAEO,SAASjB,oBAAoBwC,WAAA,EAAiC;EACnE,OAAQtB,CAAA,IAAc;IACpB,IAAI;MACF,OAAOsB,WAAA,CAAYtB,CAAC;IACtB,QAAc;MACZ,OAAOR,gBAAA,CAAA+B,WAAA;IACT;EACF;AACF","ignoreList":[]}
|