@powerlines/plugin-tamagui 0.1.421 → 0.1.422

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-tamagui",
3
- "version": "0.1.421",
3
+ "version": "0.1.422",
4
4
  "private": false,
5
5
  "description": "A package containing the Tamagui plugin for Powerlines.",
6
6
  "keywords": ["tamagui", "powerlines", "storm-software", "powerlines-plugin"],
@@ -90,21 +90,21 @@
90
90
  "typings": "dist/index.d.mts",
91
91
  "files": ["dist/**/*"],
92
92
  "dependencies": {
93
- "@powerlines/plugin-vite": "^0.14.425",
93
+ "@powerlines/plugin-vite": "^0.14.426",
94
94
  "@stryke/fs": "^0.33.67",
95
95
  "@stryke/hash": "^0.13.20",
96
96
  "@stryke/path": "^0.27.5",
97
97
  "@tamagui/static-worker": "^1.144.4",
98
98
  "@tamagui/types": "^1.144.4",
99
99
  "defu": "^6.1.7",
100
- "powerlines": "^0.43.27",
100
+ "powerlines": "^0.43.28",
101
101
  "typescript": "^6.0.3",
102
102
  "vite": "^8.0.10"
103
103
  },
104
104
  "devDependencies": {
105
- "@powerlines/plugin-plugin": "^0.12.382",
105
+ "@powerlines/plugin-plugin": "^0.12.383",
106
106
  "@types/node": "^25.6.0"
107
107
  },
108
108
  "publishConfig": { "access": "public" },
109
- "gitHead": "ad851a239011b884c15b0444db518d74927fd13f"
109
+ "gitHead": "efeaec793549f37c700f2e876bf6097c37375c46"
110
110
  }
@@ -1 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
package/dist/index.cjs DELETED
@@ -1 +0,0 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./_virtual/_rolldown/runtime.cjs`);let t=require(`@stryke/fs/resolve`),n=require(`@stryke/hash/neutral`),r=require(`@stryke/path/join`),i=require(`@tamagui/static-worker`);i=e.__toESM(i,1);let a=require(`defu`);a=e.__toESM(a,1);let o=require(`powerlines/plugin-utils`),s=require(`vite`);const c=(e={})=>{let c={},l=0,u=()=>{c={},l=0},d=new Map,f=null;return{name:`tamagui`,async config(){let n=(0,o.getConfigPath)(this,`tamagui`),s=await(0,i.loadTamaguiBuildConfig)((0,a.default)({...e,components:[(0,r.joinPaths)(`{root}`,`src/components`)]},{config:n,disableExtraction:!1,platform:`web`,logTimings:this.config.logLevel===`debug`||this.config.logLevel===`trace`,prefixLogs:`Powerlines`})),c=[];if(s.platform!==`native`&&(c.push({find:`react-native/Libraries/Renderer/shims/ReactFabric`,replacement:await(0,t.resolvePackage)(`@tamagui/proxy-worm`)||`@tamagui/proxy-worm`}),c.push({find:`react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry`,replacement:await(0,t.resolvePackage)(`@tamagui/proxy-worm`)||`@tamagui/proxy-worm`}),c.push({find:`react-native-svg`,replacement:await(0,t.resolvePackage)(`react-native-svg`)||`react-native-svg`}),s?.useReactNativeWebLite)){c.push({find:`react-native`,replacement:await(0,t.resolvePackage)(`react-native-web-lite`)||`react-native-web-lite`});let e=await(0,t.resolvePackage)(s?.useReactNativeWebLite===`without-animated`?`@tamagui/react-native-web-lite/without-animated`:`@tamagui/react-native-web-lite`)||s?.useReactNativeWebLite===`without-animated`?`@tamagui/react-native-web-lite/without-animated`:`@tamagui/react-native-web-lite`;c.push({find:/^react-native$/,replacement:e}),c.push({find:/^react-native\/(.+)$/,replacement:`${e}/$1`}),c.push({find:/^react-native-web$/,replacement:e}),c.push({find:/^react-native-web\/(.+)$/,replacement:`${e}/$1`}),c.push({find:/react-native.*\/dist\/exports\/StyleSheet\/compiler\/createReactDOMStyle/,replacement:await(0,t.resolvePackage)(`@tamagui/react-native-web-lite/dist/exports/StyleSheet/compiler/createReactDOMStyle`)||`@tamagui/react-native-web-lite/dist/exports/StyleSheet/compiler/createReactDOMStyle`})}return{tamagui:s,build:{platform:`browser`,extensions:[`.web.mjs`,`.web.js`,`.web.jsx`,`.web.ts`,`.web.tsx`,`.mjs`,`.js`,`.mts`,`.ts`,`.jsx`,`.tsx`,`.json`],define:{_frameTimestamp:void 0,_WORKLET:!1,__DEV__:`${this.config.mode===`development`}`,"process.env.NODE_ENV":JSON.stringify(process.env.NODE_ENV||this.config.mode),"process.env.ENABLE_RSC":JSON.stringify(process.env.ENABLE_RSC||``),"process.env.ENABLE_STEPS":JSON.stringify(process.env.ENABLE_STEPS||``),"process.env.IS_STATIC":JSON.stringify(!1),...this.config.mode===`production`&&{"process.env.TAMAGUI_OPTIMIZE_THEMES":JSON.stringify(!0)}},alias:c}}},configEnvironment(e,t){return t.consumer===`client`||e===`client`?{build:{define:{"process.env.TAMAGUI_IS_CLIENT":JSON.stringify(!0),"process.env.TAMAGUI_ENVIRONMENT":`"client"`}}}:null},configResolved(){if(!this.config.tamagui.components||this.config.tamagui.components.length===0)throw Error(`Tamagui Plugin: No components paths defined in Tamagui configuration. Please ensure that the 'components' option is set correctly.`);this.config.tamagui.components=this.config.tamagui.components.map(e=>(0,o.replacePathTokens)(this,e)).filter(Boolean),this.config.vite&&(this.config.vite.optimizeDeps??={},this.config.vite.optimizeDeps.include??=[],this.config.vite.optimizeDeps.include.push(`@tamagui/core/inject-styles`))},async resolveId(e){if(this.environment?.name&&(this.environment.name===`ios`||this.environment.name===`android`)||this.config?.tamagui?.disableServerOptimization&&this.environment?.name&&this.environment.name!==`client`)return;let[t,n]=e.split(`?`);if(!t?.endsWith(`.tamagui.css`))return;let i=e;return e.startsWith(this.config.root)||(i=(0,r.joinPaths)(this.config.root,t)),d.has(i)?i+(n?`?${n}`:``):null},async load(e){if(this.config?.tamagui?.disableExtraction||this.environment?.name&&(this.environment.name===`ios`||this.environment.name===`android`)||this.config?.tamagui?.disableServerOptimization&&this.environment?.name&&this.environment.name!==`client`)return;let[t]=e.split(`?`);return t?d.get(t):null},transform:{order:`pre`,async handler(e,t){if(t.includes(`expo-linear-gradient`))return(0,s.transformWithEsbuild)(e,t,{loader:`jsx`,jsx:`automatic`});if(this.config?.tamagui?.disableExtraction||this.environment?.name&&(this.environment.name===`ios`||this.environment.name===`android`)||this.config?.tamagui?.disableServerOptimization&&this.environment?.name&&this.environment.name!==`client`)return;let[a]=t.split(`?`);if(!a?.endsWith(`.tsx`))return;let o=e.indexOf(`// `),{shouldDisable:p,shouldPrintDebug:m}=await(0,i.getPragmaOptions)({source:o>=0?e.slice(o):``,path:a});if(m&&this.trace(`Current file: ${t} in environment: ${this.environment?.name}, shouldDisable: ${p}\n\nOriginal source:\n${e}\n\n`),p)return;let h=(0,n.murmurhash)({cacheEnv:this.environment.name===`client`||this.environment.name===`ssr`?`web`:this.environment.name,code:e,id:t}),g=c[h];if(g)return g;let _;try{_=await i.extractToClassNames({source:e,sourcePath:a,options:this.config.tamagui,shouldPrintDebug:m})}catch(e){this.error(e instanceof Error?e.message:String(e));return}if(!_)return;let v=`${a}.tamagui.css`,y=v;y.startsWith(this.config.root)||(y=(0,r.joinPaths)(this.config.root,v));let b=_.js;if(_.styles){if(this.addWatchFile(v),f&&d.has(y)&&f){let{moduleGraph:e}=f,t=e.getModulesByFile(v);if(t)for(let n of t)e.invalidateModule(n),n.lastHMRTimestamp=n.lastInvalidationTimestamp||Date.now()}b=`${b.toString()}\nimport "${v}";`,d.set(y,_.styles)}let x={code:b.toString(),map:_.map};return l+=x.code.length,l>26214400&&u(),c[h]=x,x}},async finalize(){await i?.destroyPool()},vite:{configureServer(e){f=e}}}};exports.default=c,exports.plugin=c;
package/dist/index.mjs DELETED
@@ -1 +0,0 @@
1
- import{resolvePackage as e}from"@stryke/fs/resolve";import{murmurhash as t}from"@stryke/hash/neutral";import{joinPaths as n}from"@stryke/path/join";import*as r from"@tamagui/static-worker";import{getPragmaOptions as i,loadTamaguiBuildConfig as a}from"@tamagui/static-worker";import o from"defu";import{getConfigPath as s,replacePathTokens as c}from"powerlines/plugin-utils";import{transformWithEsbuild as l}from"vite";const u=(u={})=>{let d={},f=0,p=()=>{d={},f=0},m=new Map,h=null;return{name:`tamagui`,async config(){let t=s(this,`tamagui`),r=await a(o({...u,components:[n(`{root}`,`src/components`)]},{config:t,disableExtraction:!1,platform:`web`,logTimings:this.config.logLevel===`debug`||this.config.logLevel===`trace`,prefixLogs:`Powerlines`})),i=[];if(r.platform!==`native`&&(i.push({find:`react-native/Libraries/Renderer/shims/ReactFabric`,replacement:await e(`@tamagui/proxy-worm`)||`@tamagui/proxy-worm`}),i.push({find:`react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry`,replacement:await e(`@tamagui/proxy-worm`)||`@tamagui/proxy-worm`}),i.push({find:`react-native-svg`,replacement:await e(`react-native-svg`)||`react-native-svg`}),r?.useReactNativeWebLite)){i.push({find:`react-native`,replacement:await e(`react-native-web-lite`)||`react-native-web-lite`});let t=await e(r?.useReactNativeWebLite===`without-animated`?`@tamagui/react-native-web-lite/without-animated`:`@tamagui/react-native-web-lite`)||r?.useReactNativeWebLite===`without-animated`?`@tamagui/react-native-web-lite/without-animated`:`@tamagui/react-native-web-lite`;i.push({find:/^react-native$/,replacement:t}),i.push({find:/^react-native\/(.+)$/,replacement:`${t}/$1`}),i.push({find:/^react-native-web$/,replacement:t}),i.push({find:/^react-native-web\/(.+)$/,replacement:`${t}/$1`}),i.push({find:/react-native.*\/dist\/exports\/StyleSheet\/compiler\/createReactDOMStyle/,replacement:await e(`@tamagui/react-native-web-lite/dist/exports/StyleSheet/compiler/createReactDOMStyle`)||`@tamagui/react-native-web-lite/dist/exports/StyleSheet/compiler/createReactDOMStyle`})}return{tamagui:r,build:{platform:`browser`,extensions:[`.web.mjs`,`.web.js`,`.web.jsx`,`.web.ts`,`.web.tsx`,`.mjs`,`.js`,`.mts`,`.ts`,`.jsx`,`.tsx`,`.json`],define:{_frameTimestamp:void 0,_WORKLET:!1,__DEV__:`${this.config.mode===`development`}`,"process.env.NODE_ENV":JSON.stringify(process.env.NODE_ENV||this.config.mode),"process.env.ENABLE_RSC":JSON.stringify(process.env.ENABLE_RSC||``),"process.env.ENABLE_STEPS":JSON.stringify(process.env.ENABLE_STEPS||``),"process.env.IS_STATIC":JSON.stringify(!1),...this.config.mode===`production`&&{"process.env.TAMAGUI_OPTIMIZE_THEMES":JSON.stringify(!0)}},alias:i}}},configEnvironment(e,t){return t.consumer===`client`||e===`client`?{build:{define:{"process.env.TAMAGUI_IS_CLIENT":JSON.stringify(!0),"process.env.TAMAGUI_ENVIRONMENT":`"client"`}}}:null},configResolved(){if(!this.config.tamagui.components||this.config.tamagui.components.length===0)throw Error(`Tamagui Plugin: No components paths defined in Tamagui configuration. Please ensure that the 'components' option is set correctly.`);this.config.tamagui.components=this.config.tamagui.components.map(e=>c(this,e)).filter(Boolean),this.config.vite&&(this.config.vite.optimizeDeps??={},this.config.vite.optimizeDeps.include??=[],this.config.vite.optimizeDeps.include.push(`@tamagui/core/inject-styles`))},async resolveId(e){if(this.environment?.name&&(this.environment.name===`ios`||this.environment.name===`android`)||this.config?.tamagui?.disableServerOptimization&&this.environment?.name&&this.environment.name!==`client`)return;let[t,r]=e.split(`?`);if(!t?.endsWith(`.tamagui.css`))return;let i=e;return e.startsWith(this.config.root)||(i=n(this.config.root,t)),m.has(i)?i+(r?`?${r}`:``):null},async load(e){if(this.config?.tamagui?.disableExtraction||this.environment?.name&&(this.environment.name===`ios`||this.environment.name===`android`)||this.config?.tamagui?.disableServerOptimization&&this.environment?.name&&this.environment.name!==`client`)return;let[t]=e.split(`?`);return t?m.get(t):null},transform:{order:`pre`,async handler(e,a){if(a.includes(`expo-linear-gradient`))return l(e,a,{loader:`jsx`,jsx:`automatic`});if(this.config?.tamagui?.disableExtraction||this.environment?.name&&(this.environment.name===`ios`||this.environment.name===`android`)||this.config?.tamagui?.disableServerOptimization&&this.environment?.name&&this.environment.name!==`client`)return;let[o]=a.split(`?`);if(!o?.endsWith(`.tsx`))return;let s=e.indexOf(`// `),{shouldDisable:c,shouldPrintDebug:u}=await i({source:s>=0?e.slice(s):``,path:o});if(u&&this.trace(`Current file: ${a} in environment: ${this.environment?.name}, shouldDisable: ${c}\n\nOriginal source:\n${e}\n\n`),c)return;let g=t({cacheEnv:this.environment.name===`client`||this.environment.name===`ssr`?`web`:this.environment.name,code:e,id:a}),_=d[g];if(_)return _;let v;try{v=await r.extractToClassNames({source:e,sourcePath:o,options:this.config.tamagui,shouldPrintDebug:u})}catch(e){this.error(e instanceof Error?e.message:String(e));return}if(!v)return;let y=`${o}.tamagui.css`,b=y;b.startsWith(this.config.root)||(b=n(this.config.root,y));let x=v.js;if(v.styles){if(this.addWatchFile(y),h&&m.has(b)&&h){let{moduleGraph:e}=h,t=e.getModulesByFile(y);if(t)for(let n of t)e.invalidateModule(n),n.lastHMRTimestamp=n.lastInvalidationTimestamp||Date.now()}x=`${x.toString()}\nimport "${y}";`,m.set(b,v.styles)}let S={code:x.toString(),map:v.map};return f+=S.code.length,f>26214400&&p(),d[g]=S,S}},async finalize(){await r?.destroyPool()},vite:{configureServer(e){h=e}}}};export{u as default,u as plugin};
File without changes
@@ -1 +0,0 @@
1
- export{};
File without changes
@@ -1 +0,0 @@
1
- export{};