@tamagui/static 1.5.16 → 1.5.17

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.
@@ -49,7 +49,7 @@ function registerRequire() {
49
49
  !path.startsWith("react-native-web/dist/cjs/exports".replace(/\//g, import_path.sep))) {
50
50
  return rnw;
51
51
  }
52
- if (path === "@tamagui/core") {
52
+ if (path === "@tamagui/core" || path === "@tamagui/web") {
53
53
  return core;
54
54
  }
55
55
  try {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/require.ts"],
4
- "sourcesContent": ["import { relative, sep } from 'path'\n\nimport { SHOULD_DEBUG } from './constants.js'\n\nconst nameToPaths = {}\nconst Module = require('module')\nconst og = Module.prototype.require\nglobalThis['ogRequire'] = og\n\nexport const getNameToPaths = () => nameToPaths\n\nexport function registerRequire() {\n if (Module.prototype.require !== globalThis['ogRequire']) {\n // eslint-disable-next-line no-console\n console.warn('didnt unregister before re-registering')\n process.exit(1)\n }\n\n const proxyWorm = require('@tamagui/proxy-worm')\n // TODO can swap with react-native-web-lite\n const rnw = require('react-native-web')\n const core = require('@tamagui/core-node')\n\n Module.prototype.require = function (path: string) {\n if (/\\.(gif|jpe?g|png|svg|ttf|otf|woff2?|bmp|webp)$/.test(path)) {\n return {}\n }\n if (\n path === '@gorhom/bottom-sheet' ||\n path.startsWith('react-native-reanimated') ||\n path === 'expo-linear-gradient' ||\n path === '@expo/vector-icons'\n ) {\n return proxyWorm\n }\n if (\n path.startsWith('react-native') &&\n // allow our rnw.tsx imports through\n !path.startsWith('react-native-web/dist/cjs/exports'.replace(/\\//g, sep))\n ) {\n return rnw\n }\n if (path === '@tamagui/core') {\n return core\n }\n try {\n const out = og.apply(this, arguments)\n // only for studio disable for now\n // if (!nameToPaths[path]) {\n // if (out && typeof out === 'object') {\n // for (const key in out) {\n // try {\n // const conf = out[key]?.staticConfig as StaticConfig\n // if (conf) {\n // if (conf.componentName) {\n // nameToPaths[conf.componentName] ??= new Set()\n // const fullName = path.startsWith('.')\n // ? join(`${this.path.replace(/dist(\\/cjs)?/, 'src')}`, path)\n // : path\n // nameToPaths[conf.componentName].add(fullName)\n // } else {\n // // console.log('no name component', path)\n // }\n // }\n // } catch {\n // // ok\n // }\n // }\n // }\n // }\n return out\n } catch (err: any) {\n /**\n * Allow errors to happen, we're just reading config and components but sometimes external modules cause problems\n * We can't fix every problem, so just swap them out with proxyWorm which is a sort of generic object that can be read.\n */\n\n if (process.env.DEBUG?.startsWith('tamagui')) {\n // eslint-disable-next-line no-console\n console.error(\n `Tamagui failed loading the pre-built tamagui.config.ts\n \n ${err.message}\n ${err.stack}\n \n You can see if it loads in the node repl:\n \n require(\"./${relative(process.cwd(), path)}\").default\n \n `\n )\n }\n\n return proxyWorm\n }\n }\n\n return Module.prototype.require\n}\n\nexport function unregisterRequire() {\n Module.prototype.require = og\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA8B;AAI9B,MAAM,cAAc,CAAC;AACrB,MAAM,SAAS,QAAQ,QAAQ;AAC/B,MAAM,KAAK,OAAO,UAAU;AAC5B,WAAW,WAAW,IAAI;AAEnB,MAAM,iBAAiB,MAAM;AAE7B,SAAS,kBAAkB;AAChC,MAAI,OAAO,UAAU,YAAY,WAAW,WAAW,GAAG;AAExD,YAAQ,KAAK,wCAAwC;AACrD,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,QAAM,YAAY,QAAQ,qBAAqB;AAE/C,QAAM,MAAM,QAAQ,kBAAkB;AACtC,QAAM,OAAO,QAAQ,oBAAoB;AAEzC,SAAO,UAAU,UAAU,SAAU,MAAc;AAvBrD;AAwBI,QAAI,iDAAiD,KAAK,IAAI,GAAG;AAC/D,aAAO,CAAC;AAAA,IACV;AACA,QACE,SAAS,0BACT,KAAK,WAAW,yBAAyB,KACzC,SAAS,0BACT,SAAS,sBACT;AACA,aAAO;AAAA,IACT;AACA,QACE,KAAK,WAAW,cAAc;AAAA,IAE9B,CAAC,KAAK,WAAW,oCAAoC,QAAQ,OAAO,eAAG,CAAC,GACxE;AACA,aAAO;AAAA,IACT;AACA,QAAI,SAAS,iBAAiB;AAC5B,aAAO;AAAA,IACT;AACA,QAAI;AACF,YAAM,MAAM,GAAG,MAAM,MAAM,SAAS;AAwBpC,aAAO;AAAA,IACT,SAAS,KAAP;AAMA,WAAI,aAAQ,IAAI,UAAZ,mBAAmB,WAAW,YAAY;AAE5C,gBAAQ;AAAA,UACN;AAAA;AAAA,IAEN,IAAI;AAAA,IACJ,IAAI;AAAA;AAAA;AAAA;AAAA,qBAIS,sBAAS,QAAQ,IAAI,GAAG,IAAI;AAAA;AAAA;AAAA,QAGrC;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO,OAAO,UAAU;AAC1B;AAEO,SAAS,oBAAoB;AAClC,SAAO,UAAU,UAAU;AAC7B;",
4
+ "sourcesContent": ["import { relative, sep } from 'path'\n\nimport { SHOULD_DEBUG } from './constants.js'\n\nconst nameToPaths = {}\nconst Module = require('module')\nconst og = Module.prototype.require\nglobalThis['ogRequire'] = og\n\nexport const getNameToPaths = () => nameToPaths\n\nexport function registerRequire() {\n if (Module.prototype.require !== globalThis['ogRequire']) {\n // eslint-disable-next-line no-console\n console.warn('didnt unregister before re-registering')\n process.exit(1)\n }\n\n const proxyWorm = require('@tamagui/proxy-worm')\n // TODO can swap with react-native-web-lite\n const rnw = require('react-native-web')\n const core = require('@tamagui/core-node')\n\n Module.prototype.require = function (path: string) {\n if (/\\.(gif|jpe?g|png|svg|ttf|otf|woff2?|bmp|webp)$/.test(path)) {\n return {}\n }\n if (\n path === '@gorhom/bottom-sheet' ||\n path.startsWith('react-native-reanimated') ||\n path === 'expo-linear-gradient' ||\n path === '@expo/vector-icons'\n ) {\n return proxyWorm\n }\n if (\n path.startsWith('react-native') &&\n // allow our rnw.tsx imports through\n !path.startsWith('react-native-web/dist/cjs/exports'.replace(/\\//g, sep))\n ) {\n return rnw\n }\n if (path === '@tamagui/core' || path === '@tamagui/web') {\n return core\n }\n try {\n const out = og.apply(this, arguments)\n // only for studio disable for now\n // if (!nameToPaths[path]) {\n // if (out && typeof out === 'object') {\n // for (const key in out) {\n // try {\n // const conf = out[key]?.staticConfig as StaticConfig\n // if (conf) {\n // if (conf.componentName) {\n // nameToPaths[conf.componentName] ??= new Set()\n // const fullName = path.startsWith('.')\n // ? join(`${this.path.replace(/dist(\\/cjs)?/, 'src')}`, path)\n // : path\n // nameToPaths[conf.componentName].add(fullName)\n // } else {\n // // console.log('no name component', path)\n // }\n // }\n // } catch {\n // // ok\n // }\n // }\n // }\n // }\n return out\n } catch (err: any) {\n /**\n * Allow errors to happen, we're just reading config and components but sometimes external modules cause problems\n * We can't fix every problem, so just swap them out with proxyWorm which is a sort of generic object that can be read.\n */\n\n if (process.env.DEBUG?.startsWith('tamagui')) {\n // eslint-disable-next-line no-console\n console.error(\n `Tamagui failed loading the pre-built tamagui.config.ts\n \n ${err.message}\n ${err.stack}\n \n You can see if it loads in the node repl:\n \n require(\"./${relative(process.cwd(), path)}\").default\n \n `\n )\n }\n\n return proxyWorm\n }\n }\n\n return Module.prototype.require\n}\n\nexport function unregisterRequire() {\n Module.prototype.require = og\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA8B;AAI9B,MAAM,cAAc,CAAC;AACrB,MAAM,SAAS,QAAQ,QAAQ;AAC/B,MAAM,KAAK,OAAO,UAAU;AAC5B,WAAW,WAAW,IAAI;AAEnB,MAAM,iBAAiB,MAAM;AAE7B,SAAS,kBAAkB;AAChC,MAAI,OAAO,UAAU,YAAY,WAAW,WAAW,GAAG;AAExD,YAAQ,KAAK,wCAAwC;AACrD,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,QAAM,YAAY,QAAQ,qBAAqB;AAE/C,QAAM,MAAM,QAAQ,kBAAkB;AACtC,QAAM,OAAO,QAAQ,oBAAoB;AAEzC,SAAO,UAAU,UAAU,SAAU,MAAc;AAvBrD;AAwBI,QAAI,iDAAiD,KAAK,IAAI,GAAG;AAC/D,aAAO,CAAC;AAAA,IACV;AACA,QACE,SAAS,0BACT,KAAK,WAAW,yBAAyB,KACzC,SAAS,0BACT,SAAS,sBACT;AACA,aAAO;AAAA,IACT;AACA,QACE,KAAK,WAAW,cAAc;AAAA,IAE9B,CAAC,KAAK,WAAW,oCAAoC,QAAQ,OAAO,eAAG,CAAC,GACxE;AACA,aAAO;AAAA,IACT;AACA,QAAI,SAAS,mBAAmB,SAAS,gBAAgB;AACvD,aAAO;AAAA,IACT;AACA,QAAI;AACF,YAAM,MAAM,GAAG,MAAM,MAAM,SAAS;AAwBpC,aAAO;AAAA,IACT,SAAS,KAAP;AAMA,WAAI,aAAQ,IAAI,UAAZ,mBAAmB,WAAW,YAAY;AAE5C,gBAAQ;AAAA,UACN;AAAA;AAAA,IAEN,IAAI;AAAA,IACJ,IAAI;AAAA;AAAA;AAAA;AAAA,qBAIS,sBAAS,QAAQ,IAAI,GAAG,IAAI;AAAA;AAAA;AAAA,QAGrC;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO,OAAO,UAAU;AAC1B;AAEO,SAAS,oBAAoB;AAClC,SAAO,UAAU,UAAU;AAC7B;",
6
6
  "names": []
7
7
  }
@@ -24,7 +24,7 @@ function registerRequire() {
24
24
  !path.startsWith("react-native-web/dist/cjs/exports".replace(/\//g, sep))) {
25
25
  return rnw;
26
26
  }
27
- if (path === "@tamagui/core") {
27
+ if (path === "@tamagui/core" || path === "@tamagui/web") {
28
28
  return core;
29
29
  }
30
30
  try {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/require.ts"],
4
- "sourcesContent": ["import { relative, sep } from 'path'\n\nimport { SHOULD_DEBUG } from './constants.js'\n\nconst nameToPaths = {}\nconst Module = require('module')\nconst og = Module.prototype.require\nglobalThis['ogRequire'] = og\n\nexport const getNameToPaths = () => nameToPaths\n\nexport function registerRequire() {\n if (Module.prototype.require !== globalThis['ogRequire']) {\n // eslint-disable-next-line no-console\n console.warn('didnt unregister before re-registering')\n process.exit(1)\n }\n\n const proxyWorm = require('@tamagui/proxy-worm')\n // TODO can swap with react-native-web-lite\n const rnw = require('react-native-web')\n const core = require('@tamagui/core-node')\n\n Module.prototype.require = function (path: string) {\n if (/\\.(gif|jpe?g|png|svg|ttf|otf|woff2?|bmp|webp)$/.test(path)) {\n return {}\n }\n if (\n path === '@gorhom/bottom-sheet' ||\n path.startsWith('react-native-reanimated') ||\n path === 'expo-linear-gradient' ||\n path === '@expo/vector-icons'\n ) {\n return proxyWorm\n }\n if (\n path.startsWith('react-native') &&\n // allow our rnw.tsx imports through\n !path.startsWith('react-native-web/dist/cjs/exports'.replace(/\\//g, sep))\n ) {\n return rnw\n }\n if (path === '@tamagui/core') {\n return core\n }\n try {\n const out = og.apply(this, arguments)\n // only for studio disable for now\n // if (!nameToPaths[path]) {\n // if (out && typeof out === 'object') {\n // for (const key in out) {\n // try {\n // const conf = out[key]?.staticConfig as StaticConfig\n // if (conf) {\n // if (conf.componentName) {\n // nameToPaths[conf.componentName] ??= new Set()\n // const fullName = path.startsWith('.')\n // ? join(`${this.path.replace(/dist(\\/cjs)?/, 'src')}`, path)\n // : path\n // nameToPaths[conf.componentName].add(fullName)\n // } else {\n // // console.log('no name component', path)\n // }\n // }\n // } catch {\n // // ok\n // }\n // }\n // }\n // }\n return out\n } catch (err: any) {\n /**\n * Allow errors to happen, we're just reading config and components but sometimes external modules cause problems\n * We can't fix every problem, so just swap them out with proxyWorm which is a sort of generic object that can be read.\n */\n\n if (process.env.DEBUG?.startsWith('tamagui')) {\n // eslint-disable-next-line no-console\n console.error(\n `Tamagui failed loading the pre-built tamagui.config.ts\n \n ${err.message}\n ${err.stack}\n \n You can see if it loads in the node repl:\n \n require(\"./${relative(process.cwd(), path)}\").default\n \n `\n )\n }\n\n return proxyWorm\n }\n }\n\n return Module.prototype.require\n}\n\nexport function unregisterRequire() {\n Module.prototype.require = og\n}\n"],
5
- "mappings": "AAAA,SAAS,UAAU,WAAW;AAI9B,MAAM,cAAc,CAAC;AACrB,MAAM,SAAS,QAAQ,QAAQ;AAC/B,MAAM,KAAK,OAAO,UAAU;AAC5B,WAAW,WAAW,IAAI;AAEnB,MAAM,iBAAiB,MAAM;AAE7B,SAAS,kBAAkB;AAChC,MAAI,OAAO,UAAU,YAAY,WAAW,WAAW,GAAG;AAExD,YAAQ,KAAK,wCAAwC;AACrD,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,QAAM,YAAY,QAAQ,qBAAqB;AAE/C,QAAM,MAAM,QAAQ,kBAAkB;AACtC,QAAM,OAAO,QAAQ,oBAAoB;AAEzC,SAAO,UAAU,UAAU,SAAU,MAAc;AAvBrD;AAwBI,QAAI,iDAAiD,KAAK,IAAI,GAAG;AAC/D,aAAO,CAAC;AAAA,IACV;AACA,QACE,SAAS,0BACT,KAAK,WAAW,yBAAyB,KACzC,SAAS,0BACT,SAAS,sBACT;AACA,aAAO;AAAA,IACT;AACA,QACE,KAAK,WAAW,cAAc;AAAA,IAE9B,CAAC,KAAK,WAAW,oCAAoC,QAAQ,OAAO,GAAG,CAAC,GACxE;AACA,aAAO;AAAA,IACT;AACA,QAAI,SAAS,iBAAiB;AAC5B,aAAO;AAAA,IACT;AACA,QAAI;AACF,YAAM,MAAM,GAAG,MAAM,MAAM,SAAS;AAwBpC,aAAO;AAAA,IACT,SAAS,KAAP;AAMA,WAAI,aAAQ,IAAI,UAAZ,mBAAmB,WAAW,YAAY;AAE5C,gBAAQ;AAAA,UACN;AAAA;AAAA,IAEN,IAAI;AAAA,IACJ,IAAI;AAAA;AAAA;AAAA;AAAA,iBAIS,SAAS,QAAQ,IAAI,GAAG,IAAI;AAAA;AAAA;AAAA,QAGrC;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO,OAAO,UAAU;AAC1B;AAEO,SAAS,oBAAoB;AAClC,SAAO,UAAU,UAAU;AAC7B;",
4
+ "sourcesContent": ["import { relative, sep } from 'path'\n\nimport { SHOULD_DEBUG } from './constants.js'\n\nconst nameToPaths = {}\nconst Module = require('module')\nconst og = Module.prototype.require\nglobalThis['ogRequire'] = og\n\nexport const getNameToPaths = () => nameToPaths\n\nexport function registerRequire() {\n if (Module.prototype.require !== globalThis['ogRequire']) {\n // eslint-disable-next-line no-console\n console.warn('didnt unregister before re-registering')\n process.exit(1)\n }\n\n const proxyWorm = require('@tamagui/proxy-worm')\n // TODO can swap with react-native-web-lite\n const rnw = require('react-native-web')\n const core = require('@tamagui/core-node')\n\n Module.prototype.require = function (path: string) {\n if (/\\.(gif|jpe?g|png|svg|ttf|otf|woff2?|bmp|webp)$/.test(path)) {\n return {}\n }\n if (\n path === '@gorhom/bottom-sheet' ||\n path.startsWith('react-native-reanimated') ||\n path === 'expo-linear-gradient' ||\n path === '@expo/vector-icons'\n ) {\n return proxyWorm\n }\n if (\n path.startsWith('react-native') &&\n // allow our rnw.tsx imports through\n !path.startsWith('react-native-web/dist/cjs/exports'.replace(/\\//g, sep))\n ) {\n return rnw\n }\n if (path === '@tamagui/core' || path === '@tamagui/web') {\n return core\n }\n try {\n const out = og.apply(this, arguments)\n // only for studio disable for now\n // if (!nameToPaths[path]) {\n // if (out && typeof out === 'object') {\n // for (const key in out) {\n // try {\n // const conf = out[key]?.staticConfig as StaticConfig\n // if (conf) {\n // if (conf.componentName) {\n // nameToPaths[conf.componentName] ??= new Set()\n // const fullName = path.startsWith('.')\n // ? join(`${this.path.replace(/dist(\\/cjs)?/, 'src')}`, path)\n // : path\n // nameToPaths[conf.componentName].add(fullName)\n // } else {\n // // console.log('no name component', path)\n // }\n // }\n // } catch {\n // // ok\n // }\n // }\n // }\n // }\n return out\n } catch (err: any) {\n /**\n * Allow errors to happen, we're just reading config and components but sometimes external modules cause problems\n * We can't fix every problem, so just swap them out with proxyWorm which is a sort of generic object that can be read.\n */\n\n if (process.env.DEBUG?.startsWith('tamagui')) {\n // eslint-disable-next-line no-console\n console.error(\n `Tamagui failed loading the pre-built tamagui.config.ts\n \n ${err.message}\n ${err.stack}\n \n You can see if it loads in the node repl:\n \n require(\"./${relative(process.cwd(), path)}\").default\n \n `\n )\n }\n\n return proxyWorm\n }\n }\n\n return Module.prototype.require\n}\n\nexport function unregisterRequire() {\n Module.prototype.require = og\n}\n"],
5
+ "mappings": "AAAA,SAAS,UAAU,WAAW;AAI9B,MAAM,cAAc,CAAC;AACrB,MAAM,SAAS,QAAQ,QAAQ;AAC/B,MAAM,KAAK,OAAO,UAAU;AAC5B,WAAW,WAAW,IAAI;AAEnB,MAAM,iBAAiB,MAAM;AAE7B,SAAS,kBAAkB;AAChC,MAAI,OAAO,UAAU,YAAY,WAAW,WAAW,GAAG;AAExD,YAAQ,KAAK,wCAAwC;AACrD,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,QAAM,YAAY,QAAQ,qBAAqB;AAE/C,QAAM,MAAM,QAAQ,kBAAkB;AACtC,QAAM,OAAO,QAAQ,oBAAoB;AAEzC,SAAO,UAAU,UAAU,SAAU,MAAc;AAvBrD;AAwBI,QAAI,iDAAiD,KAAK,IAAI,GAAG;AAC/D,aAAO,CAAC;AAAA,IACV;AACA,QACE,SAAS,0BACT,KAAK,WAAW,yBAAyB,KACzC,SAAS,0BACT,SAAS,sBACT;AACA,aAAO;AAAA,IACT;AACA,QACE,KAAK,WAAW,cAAc;AAAA,IAE9B,CAAC,KAAK,WAAW,oCAAoC,QAAQ,OAAO,GAAG,CAAC,GACxE;AACA,aAAO;AAAA,IACT;AACA,QAAI,SAAS,mBAAmB,SAAS,gBAAgB;AACvD,aAAO;AAAA,IACT;AACA,QAAI;AACF,YAAM,MAAM,GAAG,MAAM,MAAM,SAAS;AAwBpC,aAAO;AAAA,IACT,SAAS,KAAP;AAMA,WAAI,aAAQ,IAAI,UAAZ,mBAAmB,WAAW,YAAY;AAE5C,gBAAQ;AAAA,UACN;AAAA;AAAA,IAEN,IAAI;AAAA,IACJ,IAAI;AAAA;AAAA;AAAA;AAAA,iBAIS,SAAS,QAAQ,IAAI,GAAG,IAAI;AAAA;AAAA;AAAA,QAGrC;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO,OAAO,UAAU;AAC1B;AAEO,SAAS,oBAAoB;AAClC,SAAO,UAAU,UAAU;AAC7B;",
6
6
  "names": []
7
7
  }
@@ -24,7 +24,7 @@ function registerRequire() {
24
24
  !path.startsWith("react-native-web/dist/cjs/exports".replace(/\//g, sep))) {
25
25
  return rnw;
26
26
  }
27
- if (path === "@tamagui/core") {
27
+ if (path === "@tamagui/core" || path === "@tamagui/web") {
28
28
  return core;
29
29
  }
30
30
  try {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/require.ts"],
4
- "sourcesContent": ["import { relative, sep } from 'path'\n\nimport { SHOULD_DEBUG } from './constants.js'\n\nconst nameToPaths = {}\nconst Module = require('module')\nconst og = Module.prototype.require\nglobalThis['ogRequire'] = og\n\nexport const getNameToPaths = () => nameToPaths\n\nexport function registerRequire() {\n if (Module.prototype.require !== globalThis['ogRequire']) {\n // eslint-disable-next-line no-console\n console.warn('didnt unregister before re-registering')\n process.exit(1)\n }\n\n const proxyWorm = require('@tamagui/proxy-worm')\n // TODO can swap with react-native-web-lite\n const rnw = require('react-native-web')\n const core = require('@tamagui/core-node')\n\n Module.prototype.require = function (path: string) {\n if (/\\.(gif|jpe?g|png|svg|ttf|otf|woff2?|bmp|webp)$/.test(path)) {\n return {}\n }\n if (\n path === '@gorhom/bottom-sheet' ||\n path.startsWith('react-native-reanimated') ||\n path === 'expo-linear-gradient' ||\n path === '@expo/vector-icons'\n ) {\n return proxyWorm\n }\n if (\n path.startsWith('react-native') &&\n // allow our rnw.tsx imports through\n !path.startsWith('react-native-web/dist/cjs/exports'.replace(/\\//g, sep))\n ) {\n return rnw\n }\n if (path === '@tamagui/core') {\n return core\n }\n try {\n const out = og.apply(this, arguments)\n // only for studio disable for now\n // if (!nameToPaths[path]) {\n // if (out && typeof out === 'object') {\n // for (const key in out) {\n // try {\n // const conf = out[key]?.staticConfig as StaticConfig\n // if (conf) {\n // if (conf.componentName) {\n // nameToPaths[conf.componentName] ??= new Set()\n // const fullName = path.startsWith('.')\n // ? join(`${this.path.replace(/dist(\\/cjs)?/, 'src')}`, path)\n // : path\n // nameToPaths[conf.componentName].add(fullName)\n // } else {\n // // console.log('no name component', path)\n // }\n // }\n // } catch {\n // // ok\n // }\n // }\n // }\n // }\n return out\n } catch (err: any) {\n /**\n * Allow errors to happen, we're just reading config and components but sometimes external modules cause problems\n * We can't fix every problem, so just swap them out with proxyWorm which is a sort of generic object that can be read.\n */\n\n if (process.env.DEBUG?.startsWith('tamagui')) {\n // eslint-disable-next-line no-console\n console.error(\n `Tamagui failed loading the pre-built tamagui.config.ts\n \n ${err.message}\n ${err.stack}\n \n You can see if it loads in the node repl:\n \n require(\"./${relative(process.cwd(), path)}\").default\n \n `\n )\n }\n\n return proxyWorm\n }\n }\n\n return Module.prototype.require\n}\n\nexport function unregisterRequire() {\n Module.prototype.require = og\n}\n"],
5
- "mappings": "AAAA,SAAS,UAAU,WAAW;AAI9B,MAAM,cAAc,CAAC;AACrB,MAAM,SAAS,QAAQ,QAAQ;AAC/B,MAAM,KAAK,OAAO,UAAU;AAC5B,WAAW,WAAW,IAAI;AAEnB,MAAM,iBAAiB,MAAM;AAE7B,SAAS,kBAAkB;AAChC,MAAI,OAAO,UAAU,YAAY,WAAW,WAAW,GAAG;AAExD,YAAQ,KAAK,wCAAwC;AACrD,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,QAAM,YAAY,QAAQ,qBAAqB;AAE/C,QAAM,MAAM,QAAQ,kBAAkB;AACtC,QAAM,OAAO,QAAQ,oBAAoB;AAEzC,SAAO,UAAU,UAAU,SAAU,MAAc;AAvBrD;AAwBI,QAAI,iDAAiD,KAAK,IAAI,GAAG;AAC/D,aAAO,CAAC;AAAA,IACV;AACA,QACE,SAAS,0BACT,KAAK,WAAW,yBAAyB,KACzC,SAAS,0BACT,SAAS,sBACT;AACA,aAAO;AAAA,IACT;AACA,QACE,KAAK,WAAW,cAAc;AAAA,IAE9B,CAAC,KAAK,WAAW,oCAAoC,QAAQ,OAAO,GAAG,CAAC,GACxE;AACA,aAAO;AAAA,IACT;AACA,QAAI,SAAS,iBAAiB;AAC5B,aAAO;AAAA,IACT;AACA,QAAI;AACF,YAAM,MAAM,GAAG,MAAM,MAAM,SAAS;AAwBpC,aAAO;AAAA,IACT,SAAS,KAAP;AAMA,WAAI,aAAQ,IAAI,UAAZ,mBAAmB,WAAW,YAAY;AAE5C,gBAAQ;AAAA,UACN;AAAA;AAAA,IAEN,IAAI;AAAA,IACJ,IAAI;AAAA;AAAA;AAAA;AAAA,iBAIS,SAAS,QAAQ,IAAI,GAAG,IAAI;AAAA;AAAA;AAAA,QAGrC;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO,OAAO,UAAU;AAC1B;AAEO,SAAS,oBAAoB;AAClC,SAAO,UAAU,UAAU;AAC7B;",
4
+ "sourcesContent": ["import { relative, sep } from 'path'\n\nimport { SHOULD_DEBUG } from './constants.js'\n\nconst nameToPaths = {}\nconst Module = require('module')\nconst og = Module.prototype.require\nglobalThis['ogRequire'] = og\n\nexport const getNameToPaths = () => nameToPaths\n\nexport function registerRequire() {\n if (Module.prototype.require !== globalThis['ogRequire']) {\n // eslint-disable-next-line no-console\n console.warn('didnt unregister before re-registering')\n process.exit(1)\n }\n\n const proxyWorm = require('@tamagui/proxy-worm')\n // TODO can swap with react-native-web-lite\n const rnw = require('react-native-web')\n const core = require('@tamagui/core-node')\n\n Module.prototype.require = function (path: string) {\n if (/\\.(gif|jpe?g|png|svg|ttf|otf|woff2?|bmp|webp)$/.test(path)) {\n return {}\n }\n if (\n path === '@gorhom/bottom-sheet' ||\n path.startsWith('react-native-reanimated') ||\n path === 'expo-linear-gradient' ||\n path === '@expo/vector-icons'\n ) {\n return proxyWorm\n }\n if (\n path.startsWith('react-native') &&\n // allow our rnw.tsx imports through\n !path.startsWith('react-native-web/dist/cjs/exports'.replace(/\\//g, sep))\n ) {\n return rnw\n }\n if (path === '@tamagui/core' || path === '@tamagui/web') {\n return core\n }\n try {\n const out = og.apply(this, arguments)\n // only for studio disable for now\n // if (!nameToPaths[path]) {\n // if (out && typeof out === 'object') {\n // for (const key in out) {\n // try {\n // const conf = out[key]?.staticConfig as StaticConfig\n // if (conf) {\n // if (conf.componentName) {\n // nameToPaths[conf.componentName] ??= new Set()\n // const fullName = path.startsWith('.')\n // ? join(`${this.path.replace(/dist(\\/cjs)?/, 'src')}`, path)\n // : path\n // nameToPaths[conf.componentName].add(fullName)\n // } else {\n // // console.log('no name component', path)\n // }\n // }\n // } catch {\n // // ok\n // }\n // }\n // }\n // }\n return out\n } catch (err: any) {\n /**\n * Allow errors to happen, we're just reading config and components but sometimes external modules cause problems\n * We can't fix every problem, so just swap them out with proxyWorm which is a sort of generic object that can be read.\n */\n\n if (process.env.DEBUG?.startsWith('tamagui')) {\n // eslint-disable-next-line no-console\n console.error(\n `Tamagui failed loading the pre-built tamagui.config.ts\n \n ${err.message}\n ${err.stack}\n \n You can see if it loads in the node repl:\n \n require(\"./${relative(process.cwd(), path)}\").default\n \n `\n )\n }\n\n return proxyWorm\n }\n }\n\n return Module.prototype.require\n}\n\nexport function unregisterRequire() {\n Module.prototype.require = og\n}\n"],
5
+ "mappings": "AAAA,SAAS,UAAU,WAAW;AAI9B,MAAM,cAAc,CAAC;AACrB,MAAM,SAAS,QAAQ,QAAQ;AAC/B,MAAM,KAAK,OAAO,UAAU;AAC5B,WAAW,WAAW,IAAI;AAEnB,MAAM,iBAAiB,MAAM;AAE7B,SAAS,kBAAkB;AAChC,MAAI,OAAO,UAAU,YAAY,WAAW,WAAW,GAAG;AAExD,YAAQ,KAAK,wCAAwC;AACrD,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,QAAM,YAAY,QAAQ,qBAAqB;AAE/C,QAAM,MAAM,QAAQ,kBAAkB;AACtC,QAAM,OAAO,QAAQ,oBAAoB;AAEzC,SAAO,UAAU,UAAU,SAAU,MAAc;AAvBrD;AAwBI,QAAI,iDAAiD,KAAK,IAAI,GAAG;AAC/D,aAAO,CAAC;AAAA,IACV;AACA,QACE,SAAS,0BACT,KAAK,WAAW,yBAAyB,KACzC,SAAS,0BACT,SAAS,sBACT;AACA,aAAO;AAAA,IACT;AACA,QACE,KAAK,WAAW,cAAc;AAAA,IAE9B,CAAC,KAAK,WAAW,oCAAoC,QAAQ,OAAO,GAAG,CAAC,GACxE;AACA,aAAO;AAAA,IACT;AACA,QAAI,SAAS,mBAAmB,SAAS,gBAAgB;AACvD,aAAO;AAAA,IACT;AACA,QAAI;AACF,YAAM,MAAM,GAAG,MAAM,MAAM,SAAS;AAwBpC,aAAO;AAAA,IACT,SAAS,KAAP;AAMA,WAAI,aAAQ,IAAI,UAAZ,mBAAmB,WAAW,YAAY;AAE5C,gBAAQ;AAAA,UACN;AAAA;AAAA,IAEN,IAAI;AAAA,IACJ,IAAI;AAAA;AAAA;AAAA;AAAA,iBAIS,SAAS,QAAQ,IAAI,GAAG,IAAI;AAAA;AAAA;AAAA,QAGrC;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO,OAAO,UAAU;AAC1B;AAEO,SAAS,oBAAoB;AAClC,SAAO,UAAU,UAAU;AAC7B;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/static",
3
- "version": "1.5.16",
3
+ "version": "1.5.17",
4
4
  "source": "src/index.ts",
5
5
  "types": "./types/index.d.ts",
6
6
  "main": "dist/cjs/index.js",
@@ -35,16 +35,16 @@
35
35
  "@babel/runtime": "^7.19.4",
36
36
  "@babel/traverse": "^7.19.6",
37
37
  "@expo/match-media": "^0.3.0",
38
- "@tamagui/build": "^1.5.16",
39
- "@tamagui/cli-color": "^1.5.16",
40
- "@tamagui/config-default-node": "^1.5.16",
41
- "@tamagui/core-node": "^1.5.16",
42
- "@tamagui/fake-react-native": "^1.5.16",
43
- "@tamagui/helpers": "^1.5.16",
44
- "@tamagui/helpers-node": "^1.5.16",
45
- "@tamagui/proxy-worm": "^1.5.16",
46
- "@tamagui/shorthands": "^1.5.16",
47
- "@tamagui/types": "^1.5.16",
38
+ "@tamagui/build": "^1.5.17",
39
+ "@tamagui/cli-color": "^1.5.17",
40
+ "@tamagui/config-default-node": "^1.5.17",
41
+ "@tamagui/core-node": "^1.5.17",
42
+ "@tamagui/fake-react-native": "^1.5.17",
43
+ "@tamagui/helpers": "^1.5.17",
44
+ "@tamagui/helpers-node": "^1.5.17",
45
+ "@tamagui/proxy-worm": "^1.5.17",
46
+ "@tamagui/shorthands": "^1.5.17",
47
+ "@tamagui/types": "^1.5.17",
48
48
  "babel-literal-to-ast": "^2.1.0",
49
49
  "esbuild": "^0.17.5",
50
50
  "esbuild-register": "^3.4.2",
@@ -53,14 +53,14 @@
53
53
  "fs-extra": "^11.1.0",
54
54
  "invariant": "^2.2.4",
55
55
  "lodash": "^4.17.21",
56
- "react-native-web-internals": "^1.5.16",
57
- "react-native-web-lite": "^1.5.16"
56
+ "react-native-web-internals": "^1.5.17",
57
+ "react-native-web-lite": "^1.5.17"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@babel/plugin-syntax-typescript": "^7.18.6",
61
61
  "@babel/types": "^7.19.4",
62
62
  "@dish/babel-preset": "^0.0.6",
63
- "@tamagui/test-design-system": "^1.5.16",
63
+ "@tamagui/test-design-system": "^1.5.17",
64
64
  "@testing-library/react": "^13.4.0",
65
65
  "@types/babel__generator": "^7.6.4",
66
66
  "@types/babel__traverse": "^7.18.2",
package/src/require.ts CHANGED
@@ -40,7 +40,7 @@ export function registerRequire() {
40
40
  ) {
41
41
  return rnw
42
42
  }
43
- if (path === '@tamagui/core') {
43
+ if (path === '@tamagui/core' || path === '@tamagui/web') {
44
44
  return core
45
45
  }
46
46
  try {