tamagui-loader 1.0.1-beta.133 → 1.0.1-beta.136

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/cjs/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,7 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
18
21
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
22
  var src_exports = {};
20
23
  __export(src_exports, {
@@ -22,16 +25,20 @@ __export(src_exports, {
22
25
  shouldExclude: () => shouldExclude
23
26
  });
24
27
  module.exports = __toCommonJS(src_exports);
28
+ var import_path = __toESM(require("path"));
25
29
  process.env.TAMAGUI_TARGET = process.env.TAMAGUI_TARGET || "web";
26
30
  process.env.TAMAGUI_COMPILE_PROCESS = "1";
27
31
  process.env.IS_STATIC = "is_static";
28
32
  var src_default = require("./loader").loader;
29
- const shouldExclude = (path, projectRoot) => {
30
- if (path.includes("react-native-web") || path.includes("react-native-reanimated") || path.includes("react-native-gesture-handler") || path.includes("@gorhom/portal") || path.includes(projectRoot) || path.includes("/dist/jsx/")) {
33
+ const shouldExclude = (filePath, projectRoot) => {
34
+ if (filePath.includes("react-native-web") || filePath.includes("react-native-reanimated") || filePath.includes("react-native-gesture-handler") || filePath.includes("@gorhom/portal") || filePath.includes(projectRoot) || isTamaguiDistJSX(filePath)) {
31
35
  return false;
32
36
  }
33
37
  return true;
34
38
  };
39
+ function isTamaguiDistJSX(filePath) {
40
+ return filePath.includes("/dist/jsx/".replace(/\//g, import_path.default.sep));
41
+ }
35
42
  // Annotate the CommonJS export names for ESM import in node:
36
43
  0 && (module.exports = {
37
44
  shouldExclude
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["process.env.TAMAGUI_TARGET = process.env.TAMAGUI_TARGET || 'web'\nprocess.env.TAMAGUI_COMPILE_PROCESS = '1'\nprocess.env.IS_STATIC = 'is_static'\n\nexport default require('./loader').loader\n\n// helper for webpack exclude specific to tamagui\n\nexport const shouldExclude = (path: string, projectRoot: string) => {\n if (\n path.includes('react-native-web') ||\n path.includes('react-native-reanimated') ||\n path.includes('react-native-gesture-handler') ||\n path.includes('@gorhom/portal') ||\n path.includes(projectRoot) ||\n path.includes('/dist/jsx/')\n ) {\n return false\n }\n return true\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAAQ,IAAI,iBAAiB,QAAQ,IAAI,kBAAkB;AAC3D,QAAQ,IAAI,0BAA0B;AACtC,QAAQ,IAAI,YAAY;AAExB,IAAO,cAAQ,QAAQ,UAAU,EAAE;AAI5B,MAAM,gBAAgB,CAAC,MAAc,gBAAwB;AAClE,MACE,KAAK,SAAS,kBAAkB,KAChC,KAAK,SAAS,yBAAyB,KACvC,KAAK,SAAS,8BAA8B,KAC5C,KAAK,SAAS,gBAAgB,KAC9B,KAAK,SAAS,WAAW,KACzB,KAAK,SAAS,YAAY,GAC1B;AACA,WAAO;AAAA,EACT;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["import path from 'path'\n\nprocess.env.TAMAGUI_TARGET = process.env.TAMAGUI_TARGET || 'web'\nprocess.env.TAMAGUI_COMPILE_PROCESS = '1'\nprocess.env.IS_STATIC = 'is_static'\n\nexport default require('./loader').loader\n\n// helper for webpack exclude specific to tamagui\n\nexport const shouldExclude = (filePath: string, projectRoot: string) => {\n if (\n filePath.includes('react-native-web') ||\n filePath.includes('react-native-reanimated') ||\n filePath.includes('react-native-gesture-handler') ||\n filePath.includes('@gorhom/portal') ||\n filePath.includes(projectRoot) ||\n isTamaguiDistJSX(filePath)\n ) {\n return false\n }\n return true\n}\n\nfunction isTamaguiDistJSX(filePath: string) {\n return filePath.includes('/dist/jsx/'.replace(/\\//g, path.sep))\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,QAAQ,IAAI,iBAAiB,QAAQ,IAAI,kBAAkB;AAC3D,QAAQ,IAAI,0BAA0B;AACtC,QAAQ,IAAI,YAAY;AAExB,IAAO,cAAQ,QAAQ,UAAU,EAAE;AAI5B,MAAM,gBAAgB,CAAC,UAAkB,gBAAwB;AACtE,MACE,SAAS,SAAS,kBAAkB,KACpC,SAAS,SAAS,yBAAyB,KAC3C,SAAS,SAAS,8BAA8B,KAChD,SAAS,SAAS,gBAAgB,KAClC,SAAS,SAAS,WAAW,KAC7B,iBAAiB,QAAQ,GACzB;AACA,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEA,0BAA0B,UAAkB;AAC1C,SAAO,SAAS,SAAS,aAAa,QAAQ,OAAO,oBAAK,GAAG,CAAC;AAChE;",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -1,13 +1,17 @@
1
+ import path from "path";
1
2
  process.env.TAMAGUI_TARGET = process.env.TAMAGUI_TARGET || "web";
2
3
  process.env.TAMAGUI_COMPILE_PROCESS = "1";
3
4
  process.env.IS_STATIC = "is_static";
4
5
  var src_default = require("./loader").loader;
5
- const shouldExclude = (path, projectRoot) => {
6
- if (path.includes("react-native-web") || path.includes("react-native-reanimated") || path.includes("react-native-gesture-handler") || path.includes("@gorhom/portal") || path.includes(projectRoot) || path.includes("/dist/jsx/")) {
6
+ const shouldExclude = (filePath, projectRoot) => {
7
+ if (filePath.includes("react-native-web") || filePath.includes("react-native-reanimated") || filePath.includes("react-native-gesture-handler") || filePath.includes("@gorhom/portal") || filePath.includes(projectRoot) || isTamaguiDistJSX(filePath)) {
7
8
  return false;
8
9
  }
9
10
  return true;
10
11
  };
12
+ function isTamaguiDistJSX(filePath) {
13
+ return filePath.includes("/dist/jsx/".replace(/\//g, path.sep));
14
+ }
11
15
  export {
12
16
  src_default as default,
13
17
  shouldExclude
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["process.env.TAMAGUI_TARGET = process.env.TAMAGUI_TARGET || 'web'\nprocess.env.TAMAGUI_COMPILE_PROCESS = '1'\nprocess.env.IS_STATIC = 'is_static'\n\nexport default require('./loader').loader\n\n// helper for webpack exclude specific to tamagui\n\nexport const shouldExclude = (path: string, projectRoot: string) => {\n if (\n path.includes('react-native-web') ||\n path.includes('react-native-reanimated') ||\n path.includes('react-native-gesture-handler') ||\n path.includes('@gorhom/portal') ||\n path.includes(projectRoot) ||\n path.includes('/dist/jsx/')\n ) {\n return false\n }\n return true\n}\n"],
5
- "mappings": "AAAA,QAAQ,IAAI,iBAAiB,QAAQ,IAAI,kBAAkB;AAC3D,QAAQ,IAAI,0BAA0B;AACtC,QAAQ,IAAI,YAAY;AAExB,IAAO,cAAQ,QAAQ,UAAU,EAAE;AAI5B,MAAM,gBAAgB,CAAC,MAAc,gBAAwB;AAClE,MACE,KAAK,SAAS,kBAAkB,KAChC,KAAK,SAAS,yBAAyB,KACvC,KAAK,SAAS,8BAA8B,KAC5C,KAAK,SAAS,gBAAgB,KAC9B,KAAK,SAAS,WAAW,KACzB,KAAK,SAAS,YAAY,GAC1B;AACA,WAAO;AAAA,EACT;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["import path from 'path'\n\nprocess.env.TAMAGUI_TARGET = process.env.TAMAGUI_TARGET || 'web'\nprocess.env.TAMAGUI_COMPILE_PROCESS = '1'\nprocess.env.IS_STATIC = 'is_static'\n\nexport default require('./loader').loader\n\n// helper for webpack exclude specific to tamagui\n\nexport const shouldExclude = (filePath: string, projectRoot: string) => {\n if (\n filePath.includes('react-native-web') ||\n filePath.includes('react-native-reanimated') ||\n filePath.includes('react-native-gesture-handler') ||\n filePath.includes('@gorhom/portal') ||\n filePath.includes(projectRoot) ||\n isTamaguiDistJSX(filePath)\n ) {\n return false\n }\n return true\n}\n\nfunction isTamaguiDistJSX(filePath: string) {\n return filePath.includes('/dist/jsx/'.replace(/\\//g, path.sep))\n}\n"],
5
+ "mappings": "AAAA;AAEA,QAAQ,IAAI,iBAAiB,QAAQ,IAAI,kBAAkB;AAC3D,QAAQ,IAAI,0BAA0B;AACtC,QAAQ,IAAI,YAAY;AAExB,IAAO,cAAQ,QAAQ,UAAU,EAAE;AAI5B,MAAM,gBAAgB,CAAC,UAAkB,gBAAwB;AACtE,MACE,SAAS,SAAS,kBAAkB,KACpC,SAAS,SAAS,yBAAyB,KAC3C,SAAS,SAAS,8BAA8B,KAChD,SAAS,SAAS,gBAAgB,KAClC,SAAS,SAAS,WAAW,KAC7B,iBAAiB,QAAQ,GACzB;AACA,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEA,0BAA0B,UAAkB;AAC1C,SAAO,SAAS,SAAS,aAAa,QAAQ,OAAO,KAAK,GAAG,CAAC;AAChE;",
6
6
  "names": []
7
7
  }
package/dist/jsx/index.js CHANGED
@@ -1,13 +1,17 @@
1
+ import path from "path";
1
2
  process.env.TAMAGUI_TARGET = process.env.TAMAGUI_TARGET || "web";
2
3
  process.env.TAMAGUI_COMPILE_PROCESS = "1";
3
4
  process.env.IS_STATIC = "is_static";
4
5
  var src_default = require("./loader").loader;
5
- const shouldExclude = (path, projectRoot) => {
6
- if (path.includes("react-native-web") || path.includes("react-native-reanimated") || path.includes("react-native-gesture-handler") || path.includes("@gorhom/portal") || path.includes(projectRoot) || path.includes("/dist/jsx/")) {
6
+ const shouldExclude = (filePath, projectRoot) => {
7
+ if (filePath.includes("react-native-web") || filePath.includes("react-native-reanimated") || filePath.includes("react-native-gesture-handler") || filePath.includes("@gorhom/portal") || filePath.includes(projectRoot) || isTamaguiDistJSX(filePath)) {
7
8
  return false;
8
9
  }
9
10
  return true;
10
11
  };
12
+ function isTamaguiDistJSX(filePath) {
13
+ return filePath.includes("/dist/jsx/".replace(/\//g, path.sep));
14
+ }
11
15
  export {
12
16
  src_default as default,
13
17
  shouldExclude
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["process.env.TAMAGUI_TARGET = process.env.TAMAGUI_TARGET || 'web'\nprocess.env.TAMAGUI_COMPILE_PROCESS = '1'\nprocess.env.IS_STATIC = 'is_static'\n\nexport default require('./loader').loader\n\n// helper for webpack exclude specific to tamagui\n\nexport const shouldExclude = (path: string, projectRoot: string) => {\n if (\n path.includes('react-native-web') ||\n path.includes('react-native-reanimated') ||\n path.includes('react-native-gesture-handler') ||\n path.includes('@gorhom/portal') ||\n path.includes(projectRoot) ||\n path.includes('/dist/jsx/')\n ) {\n return false\n }\n return true\n}\n"],
5
- "mappings": "AAAA,QAAQ,IAAI,iBAAiB,QAAQ,IAAI,kBAAkB;AAC3D,QAAQ,IAAI,0BAA0B;AACtC,QAAQ,IAAI,YAAY;AAExB,IAAO,cAAQ,QAAQ,UAAU,EAAE;AAI5B,MAAM,gBAAgB,CAAC,MAAc,gBAAwB;AAClE,MACE,KAAK,SAAS,kBAAkB,KAChC,KAAK,SAAS,yBAAyB,KACvC,KAAK,SAAS,8BAA8B,KAC5C,KAAK,SAAS,gBAAgB,KAC9B,KAAK,SAAS,WAAW,KACzB,KAAK,SAAS,YAAY,GAC1B;AACA,WAAO;AAAA,EACT;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["import path from 'path'\n\nprocess.env.TAMAGUI_TARGET = process.env.TAMAGUI_TARGET || 'web'\nprocess.env.TAMAGUI_COMPILE_PROCESS = '1'\nprocess.env.IS_STATIC = 'is_static'\n\nexport default require('./loader').loader\n\n// helper for webpack exclude specific to tamagui\n\nexport const shouldExclude = (filePath: string, projectRoot: string) => {\n if (\n filePath.includes('react-native-web') ||\n filePath.includes('react-native-reanimated') ||\n filePath.includes('react-native-gesture-handler') ||\n filePath.includes('@gorhom/portal') ||\n filePath.includes(projectRoot) ||\n isTamaguiDistJSX(filePath)\n ) {\n return false\n }\n return true\n}\n\nfunction isTamaguiDistJSX(filePath: string) {\n return filePath.includes('/dist/jsx/'.replace(/\\//g, path.sep))\n}\n"],
5
+ "mappings": "AAAA;AAEA,QAAQ,IAAI,iBAAiB,QAAQ,IAAI,kBAAkB;AAC3D,QAAQ,IAAI,0BAA0B;AACtC,QAAQ,IAAI,YAAY;AAExB,IAAO,cAAQ,QAAQ,UAAU,EAAE;AAI5B,MAAM,gBAAgB,CAAC,UAAkB,gBAAwB;AACtE,MACE,SAAS,SAAS,kBAAkB,KACpC,SAAS,SAAS,yBAAyB,KAC3C,SAAS,SAAS,8BAA8B,KAChD,SAAS,SAAS,gBAAgB,KAClC,SAAS,SAAS,WAAW,KAC7B,iBAAiB,QAAQ,GACzB;AACA,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEA,0BAA0B,UAAkB;AAC1C,SAAO,SAAS,SAAS,aAAa,QAAQ,OAAO,KAAK,GAAG,CAAC;AAChE;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamagui-loader",
3
- "version": "1.0.1-beta.133",
3
+ "version": "1.0.1-beta.136",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -17,12 +17,12 @@
17
17
  "clean:build": "tamagui-build clean:build"
18
18
  },
19
19
  "dependencies": {
20
- "@tamagui/static": "^1.0.1-beta.133",
20
+ "@tamagui/static": "^1.0.1-beta.136",
21
21
  "fs-extra": "^10.1.0",
22
22
  "lodash": "^4.17.21"
23
23
  },
24
24
  "devDependencies": {
25
- "@tamagui/build": "^1.0.1-beta.133"
25
+ "@tamagui/build": "^1.0.1-beta.136"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public"
package/src/index.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import path from 'path'
2
+
1
3
  process.env.TAMAGUI_TARGET = process.env.TAMAGUI_TARGET || 'web'
2
4
  process.env.TAMAGUI_COMPILE_PROCESS = '1'
3
5
  process.env.IS_STATIC = 'is_static'
@@ -6,16 +8,20 @@ export default require('./loader').loader
6
8
 
7
9
  // helper for webpack exclude specific to tamagui
8
10
 
9
- export const shouldExclude = (path: string, projectRoot: string) => {
11
+ export const shouldExclude = (filePath: string, projectRoot: string) => {
10
12
  if (
11
- path.includes('react-native-web') ||
12
- path.includes('react-native-reanimated') ||
13
- path.includes('react-native-gesture-handler') ||
14
- path.includes('@gorhom/portal') ||
15
- path.includes(projectRoot) ||
16
- path.includes('/dist/jsx/')
13
+ filePath.includes('react-native-web') ||
14
+ filePath.includes('react-native-reanimated') ||
15
+ filePath.includes('react-native-gesture-handler') ||
16
+ filePath.includes('@gorhom/portal') ||
17
+ filePath.includes(projectRoot) ||
18
+ isTamaguiDistJSX(filePath)
17
19
  ) {
18
20
  return false
19
21
  }
20
22
  return true
21
23
  }
24
+
25
+ function isTamaguiDistJSX(filePath: string) {
26
+ return filePath.includes('/dist/jsx/'.replace(/\//g, path.sep))
27
+ }
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  declare const _default: any;
2
2
  export default _default;
3
- export declare const shouldExclude: (path: string, projectRoot: string) => boolean;
3
+ export declare const shouldExclude: (filePath: string, projectRoot: string) => boolean;
4
4
  //# sourceMappingURL=index.d.ts.map