@powerlines/plugin-tamagui 0.1.36 → 0.1.38

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/README.md CHANGED
@@ -3,7 +3,13 @@
3
3
  <!-- markdownlint-disable -->
4
4
 
5
5
 
6
- <div align="center"><img src="https://public.storm-cdn.com/storm-banner.gif" width="100%" alt="Powerlines" /></div>
6
+ <div align="center">
7
+ <picture>
8
+ <source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-dark-optimized.gif">
9
+ <source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-light-optimized.gif">
10
+ <img src="https://public.storm-cdn.com/powerlines/banner-1280x640-dark-optimized.gif" width="100%" alt="Powerlines" />
11
+ </picture>
12
+ </div>
7
13
  <br />
8
14
 
9
15
  <div align="center">
@@ -16,7 +22,7 @@
16
22
  </div>
17
23
 
18
24
  <br />
19
- This package is part of the ⚡<b>Powerlines</b> monorepo. Powerlines packages include CLI utility applications, tools, and various libraries used to create modern, scalable web applications.
25
+ This package is part of the 🔌 <b>Powerlines</b> monorepo. Powerlines packages include CLI utility applications, tools, and various libraries used to create modern, scalable web applications.
20
26
  <br />
21
27
 
22
28
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
package/dist/index.cjs CHANGED
@@ -1,13 +1 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var resolve=require('@stryke/fs/resolve'),neutral=require('@stryke/hash/neutral'),join=require('@stryke/path/join'),R=require('@tamagui/static-worker'),I=require('defu'),getConfigPath=require('powerlines/plugin-utils/get-config-path'),paths=require('powerlines/plugin-utils/paths'),vite=require('vite'),types=require('./types');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var R__namespace=/*#__PURE__*/_interopNamespace(R);var I__default=/*#__PURE__*/_interopDefault(I);/*****************************************
2
- *
3
- * ⚡ Built by Storm Software
4
- *
5
- *****************************************/
6
-
7
- var C=Object.defineProperty;var v=(g,s)=>C(g,"name",{value:s,configurable:true});const D=v((g={})=>{let s={},f=0;const T=v(()=>{s={},f=0;},"clearCompilerCache"),c=new Map;let l=null;return {name:"tamagui",async config(){const e=getConfigPath.getConfigPath(this,"tamagui"),t=await R.loadTamaguiBuildConfig(I__default.default({...g,components:[join.joinPaths("{projectRoot}","src/components")]},{config:e,disableExtraction:false,platform:"web",logTimings:this.config.logLevel==="debug"||this.config.logLevel==="trace",prefixLogs:"Powerlines"})),i=[];if(t.platform!=="native"&&(i.push({find:"react-native/Libraries/Renderer/shims/ReactFabric",replacement:await resolve.resolvePackage("@tamagui/proxy-worm")||"@tamagui/proxy-worm"}),i.push({find:"react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry",replacement:await resolve.resolvePackage("@tamagui/proxy-worm")||"@tamagui/proxy-worm"}),i.push({find:"react-native-svg",replacement:await resolve.resolvePackage("react-native-svg")||"react-native-svg"}),t?.useReactNativeWebLite)){i.push({find:"react-native",replacement:await resolve.resolvePackage("react-native-web-lite")||"react-native-web-lite"});const n=await resolve.resolvePackage(t?.useReactNativeWebLite==="without-animated"?"@tamagui/react-native-web-lite/without-animated":"@tamagui/react-native-web-lite")||t?.useReactNativeWebLite==="without-animated"?"@tamagui/react-native-web-lite/without-animated":"@tamagui/react-native-web-lite";i.push({find:/^react-native$/,replacement:n}),i.push({find:/^react-native\/(.+)$/,replacement:`${n}/$1`}),i.push({find:/^react-native-web$/,replacement:n}),i.push({find:/^react-native-web\/(.+)$/,replacement:`${n}/$1`}),i.push({find:/react-native.*\/dist\/exports\/StyleSheet\/compiler\/createReactDOMStyle/,replacement:await resolve.resolvePackage("@tamagui/react-native-web-lite/dist/exports/StyleSheet/compiler/createReactDOMStyle")||"@tamagui/react-native-web-lite/dist/exports/StyleSheet/compiler/createReactDOMStyle"});}return {tamagui:t,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:false,__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(false),...this.config.mode==="production"&&{"process.env.TAMAGUI_OPTIMIZE_THEMES":JSON.stringify(true)}},alias:i}}},configEnvironment(e,t){return t.consumer==="client"||e==="client"?{build:{define:{"process.env.TAMAGUI_IS_CLIENT":JSON.stringify(true),"process.env.TAMAGUI_ENVIRONMENT":'"client"'}}}:null},configResolved(){if(!this.config.tamagui.components||this.config.tamagui.components.length===0)throw new 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=>paths.replacePathTokens(this,e)).filter(Boolean),this.config.build.variant==="vite"&&(this.config.build.optimizeDeps??={},this.config.build.optimizeDeps.include??=[],this.config.build.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;const[t,i]=e.split("?");if(!t?.endsWith(".tamagui.css"))return;let n=e;return e.startsWith(this.config.projectRoot)||(n=join.joinPaths(this.config.projectRoot,t)),c.has(n)?n+(i?`?${i}`:""):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;const[t]=e.split("?");return t?c.get(t):null},transform:{order:"pre",async handler(e,t){if(t.includes("expo-linear-gradient"))return vite.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;const[i]=t.split("?");if(!i?.endsWith(".tsx"))return;const n=e.indexOf("// "),{shouldDisable:w,shouldPrintDebug:x}=await R.getPragmaOptions({source:n>=0?e.slice(n):"",path:i});if(x&&this.trace(`Current file: ${t} in environment: ${this.environment?.name}, shouldDisable: ${w}
8
-
9
- Original source:
10
- ${e}
11
-
12
- `),w)return;const S=neutral.murmurhash({cacheEnv:this.environment.name==="client"||this.environment.name==="ssr"?"web":this.environment.name,code:e,id:t}),y=s[S];if(y)return y;let a;try{a=await R__namespace.extractToClassNames({source:e,sourcePath:i,options:this.config.tamagui,shouldPrintDebug:x});}catch(r){this.error(r instanceof Error?r.message:String(r));return}if(!a)return;const m=`${i}.tamagui.css`;let u=m;u.startsWith(this.config.projectRoot)||(u=join.joinPaths(this.config.projectRoot,m));let p=a.js;if(a.styles){if(this.addWatchFile(m),l&&c.has(u)&&l){const{moduleGraph:r}=l,E=r.getModulesByFile(m);if(E)for(const d of E)r.invalidateModule(d),d.lastHMRTimestamp=d.lastInvalidationTimestamp||Date.now();}p=`${p.toString()}
13
- import "${m}";`,c.set(u,a.styles);}const h={code:p.toString(),map:a.map};return f+=h.code.length,f>26214400&&T(),s[S]=h,h}},async finalize(){await R__namespace?.destroyPool();},vite:{configureServer(e){l=e;}}}},"plugin");var ie=D;exports.default=ie;exports.plugin=D;Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
1
+ Object.defineProperty(exports,`__esModule`,{value:!0});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));require(`./plugin-DHXHjv16.cjs`),require(`./types-DHkg7xmX.cjs`);let c=require(`@stryke/fs/resolve`),l=require(`@stryke/hash/neutral`),u=require(`@stryke/path/join`),d=require(`@tamagui/static-worker`);d=s(d);let f=require(`defu`);f=s(f);let p=require(`node:fs`),m=require(`@stryke/path/replace`),h=require(`vite`);function g(e,t){if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.yml`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.yml`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.yaml`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.yaml`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.json`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.json`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.jsonc`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.jsonc`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.ts`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.ts`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.cts`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.cts`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.mts`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.mts`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.js`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.js`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.cjs`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.cjs`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.mjs`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.mjs`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.ts`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.ts`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.cts`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.cts`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.mts`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.mts`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.js`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.js`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.cjs`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.cjs`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.mjs`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.mjs`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.yml`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.yml`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.yaml`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.yaml`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.json`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.json`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.jsonc`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.jsonc`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.ts`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.ts`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.cts`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.cts`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.mts`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.mts`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.js`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.js`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.cjs`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.cjs`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.mjs`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.mjs`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.config.ts`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.config.ts`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.config.cts`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.config.cts`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.config.mts`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.config.mts`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.config.js`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.config.js`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.config.cjs`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.config.cjs`);if((0,p.existsSync)((0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.config.mjs`)))return(0,u.joinPaths)(e.workspaceConfig.workspaceRoot,`${t}.config.mjs`)}function _(e,t){return t&&t.replaceAll(`{workspaceRoot}`,e.workspaceConfig.workspaceRoot).replaceAll(`{root}`,e.config.projectRoot).replaceAll(`{projectRoot}`,e.config.projectRoot).replaceAll(`{sourceRoot}`,e.config.sourceRoot).replaceAll(`{powerlinesPath}`,e.powerlinesPath).replaceAll(`{cachePath}`,e.cachePath).replaceAll(`{dataPath}`,e.dataPath).replaceAll(`{logPath}`,e.envPaths.log).replaceAll(`{tempPath}`,e.envPaths.temp).replaceAll(`{configPath}`,e.envPaths.config).replaceAll(`{outputPath}`,e.config.output.outputPath).replaceAll(`{buildPath}`,e.config.output.buildPath).replaceAll(`{artifactsPath}`,(0,m.replacePath)(e.artifactsPath,e.workspaceConfig.workspaceRoot)).replaceAll(`{builtinPath}`,(0,m.replacePath)(e.builtinsPath,e.workspaceConfig.workspaceRoot)).replaceAll(`{entryPath}`,(0,m.replacePath)(e.entryPath,e.workspaceConfig.workspaceRoot))}const v=(e={})=>{let t={},n=0,r=()=>{t={},n=0},i=new Map,a=null;return{name:`tamagui`,async config(){let t=g(this,`tamagui`),n=await(0,d.loadTamaguiBuildConfig)((0,f.default)({...e,components:[(0,u.joinPaths)(`{projectRoot}`,`src/components`)]},{config:t,disableExtraction:!1,platform:`web`,logTimings:this.config.logLevel===`debug`||this.config.logLevel===`trace`,prefixLogs:`Powerlines`})),r=[];if(n.platform!==`native`&&(r.push({find:`react-native/Libraries/Renderer/shims/ReactFabric`,replacement:await(0,c.resolvePackage)(`@tamagui/proxy-worm`)||`@tamagui/proxy-worm`}),r.push({find:`react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry`,replacement:await(0,c.resolvePackage)(`@tamagui/proxy-worm`)||`@tamagui/proxy-worm`}),r.push({find:`react-native-svg`,replacement:await(0,c.resolvePackage)(`react-native-svg`)||`react-native-svg`}),n?.useReactNativeWebLite)){r.push({find:`react-native`,replacement:await(0,c.resolvePackage)(`react-native-web-lite`)||`react-native-web-lite`});let e=await(0,c.resolvePackage)(n?.useReactNativeWebLite===`without-animated`?`@tamagui/react-native-web-lite/without-animated`:`@tamagui/react-native-web-lite`)||n?.useReactNativeWebLite===`without-animated`?`@tamagui/react-native-web-lite/without-animated`:`@tamagui/react-native-web-lite`;r.push({find:/^react-native$/,replacement:e}),r.push({find:/^react-native\/(.+)$/,replacement:`${e}/$1`}),r.push({find:/^react-native-web$/,replacement:e}),r.push({find:/^react-native-web\/(.+)$/,replacement:`${e}/$1`}),r.push({find:/react-native.*\/dist\/exports\/StyleSheet\/compiler\/createReactDOMStyle/,replacement:await(0,c.resolvePackage)(`@tamagui/react-native-web-lite/dist/exports/StyleSheet/compiler/createReactDOMStyle`)||`@tamagui/react-native-web-lite/dist/exports/StyleSheet/compiler/createReactDOMStyle`})}return{tamagui:n,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:r}}},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=>_(this,e)).filter(Boolean),this.config.build.variant===`vite`&&(this.config.build.optimizeDeps??={},this.config.build.optimizeDeps.include??=[],this.config.build.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 r=e;return e.startsWith(this.config.projectRoot)||(r=(0,u.joinPaths)(this.config.projectRoot,t)),i.has(r)?r+(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?i.get(t):null},transform:{order:`pre`,async handler(e,o){if(o.includes(`expo-linear-gradient`))return(0,h.transformWithEsbuild)(e,o,{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[s]=o.split(`?`);if(!s?.endsWith(`.tsx`))return;let c=e.indexOf(`// `),{shouldDisable:f,shouldPrintDebug:p}=await(0,d.getPragmaOptions)({source:c>=0?e.slice(c):``,path:s});if(p&&this.trace(`Current file: ${o} in environment: ${this.environment?.name}, shouldDisable: ${f}\n\nOriginal source:\n${e}\n\n`),f)return;let m=(0,l.murmurhash)({cacheEnv:this.environment.name===`client`||this.environment.name===`ssr`?`web`:this.environment.name,code:e,id:o}),g=t[m];if(g)return g;let _;try{_=await d.extractToClassNames({source:e,sourcePath:s,options:this.config.tamagui,shouldPrintDebug:p})}catch(e){this.error(e instanceof Error?e.message:String(e));return}if(!_)return;let v=`${s}.tamagui.css`,y=v;y.startsWith(this.config.projectRoot)||(y=(0,u.joinPaths)(this.config.projectRoot,v));let b=_.js;if(_.styles){if(this.addWatchFile(v),a&&i.has(y)&&a){let{moduleGraph:e}=a,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}";`,i.set(y,_.styles)}let x={code:b.toString(),map:_.map};return n+=x.code.length,n>26214400&&r(),t[m]=x,x}},async finalize(){await d?.destroyPool()},vite:{configureServer(e){a=e}}}};var y=v;exports.default=y,exports.plugin=v;
package/dist/index.d.cts CHANGED
@@ -1,27 +1,7 @@
1
- import { T as TamaguiPluginContext, a as TamaguiPluginOptions, P as Plugin } from './index-DxQmf6y9.cjs';
2
- export { c as TamaguiPluginResolvedConfig, b as TamaguiPluginUserConfig, f as __ΩTamaguiPluginContext, _ as __ΩTamaguiPluginOptions, e as __ΩTamaguiPluginResolvedConfig, d as __ΩTamaguiPluginUserConfig } from './index-DxQmf6y9.cjs';
3
- import '@tamagui/types';
4
- import '@storm-software/build-tools/types';
5
- import '@storm-software/config-tools/types';
6
- import '@storm-software/config/types';
7
- import '@stryke/types/base';
8
- import '@stryke/types/configuration';
9
- import '@stryke/types/file';
10
- import 'vite';
11
- import '@stryke/env/get-env-paths';
12
- import '@stryke/http/fetch';
13
- import '@stryke/types/package-json';
14
- import 'jiti';
15
- import 'magic-string';
16
- import 'oxc-parser';
17
- import 'semver';
18
- import 'ts-morph';
19
- import 'undici';
20
- import 'unplugin';
21
- import '@stryke/fs/resolve';
22
- import '@stryke/types/tsconfig';
23
- import 'typescript';
24
- import '@stryke/types/array';
1
+ import { a as __ΩTamaguiPluginContext, c as __ΩTamaguiPluginUserConfig, i as TamaguiPluginUserConfig, l as Plugin, n as TamaguiPluginOptions, o as __ΩTamaguiPluginOptions, r as TamaguiPluginResolvedConfig, s as __ΩTamaguiPluginResolvedConfig, t as TamaguiPluginContext } from "./plugin-C-7BeKsm.cjs";
2
+ import "./index-CEgs-Dz2.cjs";
3
+
4
+ //#region src/index.d.ts
25
5
 
26
6
  /**
27
7
  * Tamagui plugin for Powerlines.
@@ -30,5 +10,6 @@ import '@stryke/types/array';
30
10
  * @returns A Powerlines plugin that integrates Tamagui into an existing Powerlines project.
31
11
  */
32
12
  declare const plugin: <TContext extends TamaguiPluginContext = TamaguiPluginContext>(options?: TamaguiPluginOptions) => Plugin<TContext>;
33
-
34
- export { TamaguiPluginContext, TamaguiPluginOptions, plugin as default, plugin };
13
+ //#endregion
14
+ export { TamaguiPluginContext, TamaguiPluginOptions, TamaguiPluginResolvedConfig, TamaguiPluginUserConfig, __ΩTamaguiPluginContext, __ΩTamaguiPluginOptions, __ΩTamaguiPluginResolvedConfig, __ΩTamaguiPluginUserConfig, plugin as default, plugin };
15
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;AA+CA;;;;;AAIG,cAJU,MAIV,EAAA,CAAA,iBAHgB,oBAGhB,GAHuC,oBAGvC,CAAA,CAAA,OAAA,CAAA,EADQ,oBACR,EAAA,GAAA,MAAA,CAAO,QAAP,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { a as __ΩTamaguiPluginContext, c as __ΩTamaguiPluginUserConfig, i as TamaguiPluginUserConfig, l as Plugin, n as TamaguiPluginOptions, o as __ΩTamaguiPluginOptions, r as TamaguiPluginResolvedConfig, s as __ΩTamaguiPluginResolvedConfig, t as TamaguiPluginContext } from "./plugin-B8Hy3g93.mjs";
2
+ import "./index-BgAdqTbb.mjs";
3
+
4
+ //#region src/index.d.ts
5
+
6
+ /**
7
+ * Tamagui plugin for Powerlines.
8
+ *
9
+ * @param options - The Tamagui plugin user configuration options.
10
+ * @returns A Powerlines plugin that integrates Tamagui into an existing Powerlines project.
11
+ */
12
+ declare const plugin: <TContext extends TamaguiPluginContext = TamaguiPluginContext>(options?: TamaguiPluginOptions) => Plugin<TContext>;
13
+ //#endregion
14
+ export { TamaguiPluginContext, TamaguiPluginOptions, TamaguiPluginResolvedConfig, TamaguiPluginUserConfig, __ΩTamaguiPluginContext, __ΩTamaguiPluginOptions, __ΩTamaguiPluginResolvedConfig, __ΩTamaguiPluginUserConfig, plugin as default, plugin };
15
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;AA+CA;;;;;AAIG,cAJU,MAIV,EAAA,CAAA,iBAHgB,oBAGhB,GAHuC,oBAGvC,CAAA,CAAA,OAAA,CAAA,EADQ,oBACR,EAAA,GAAA,MAAA,CAAO,QAAP,CAAA"}
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import"./plugin-Bvn-he2n.mjs";import"./types-B7VYa_Pp.mjs";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{existsSync as s}from"node:fs";import{replacePath as c}from"@stryke/path/replace";import{transformWithEsbuild as l}from"vite";function u(e,t){if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.yml`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.yml`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.yaml`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.yaml`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.json`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.json`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.jsonc`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.jsonc`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.ts`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.ts`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.cts`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.cts`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.mts`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.mts`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.js`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.js`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.cjs`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.cjs`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.mjs`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.mjs`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.ts`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.ts`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.cts`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.cts`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.mts`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.mts`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.js`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.js`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.cjs`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.cjs`);if(s(n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.mjs`)))return n(e.workspaceConfig.workspaceRoot,e.config.projectRoot,`${t}.config.mjs`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.yml`)))return n(e.workspaceConfig.workspaceRoot,`${t}.yml`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.yaml`)))return n(e.workspaceConfig.workspaceRoot,`${t}.yaml`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.json`)))return n(e.workspaceConfig.workspaceRoot,`${t}.json`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.jsonc`)))return n(e.workspaceConfig.workspaceRoot,`${t}.jsonc`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.ts`)))return n(e.workspaceConfig.workspaceRoot,`${t}.ts`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.cts`)))return n(e.workspaceConfig.workspaceRoot,`${t}.cts`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.mts`)))return n(e.workspaceConfig.workspaceRoot,`${t}.mts`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.js`)))return n(e.workspaceConfig.workspaceRoot,`${t}.js`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.cjs`)))return n(e.workspaceConfig.workspaceRoot,`${t}.cjs`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.mjs`)))return n(e.workspaceConfig.workspaceRoot,`${t}.mjs`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.config.ts`)))return n(e.workspaceConfig.workspaceRoot,`${t}.config.ts`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.config.cts`)))return n(e.workspaceConfig.workspaceRoot,`${t}.config.cts`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.config.mts`)))return n(e.workspaceConfig.workspaceRoot,`${t}.config.mts`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.config.js`)))return n(e.workspaceConfig.workspaceRoot,`${t}.config.js`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.config.cjs`)))return n(e.workspaceConfig.workspaceRoot,`${t}.config.cjs`);if(s(n(e.workspaceConfig.workspaceRoot,`${t}.config.mjs`)))return n(e.workspaceConfig.workspaceRoot,`${t}.config.mjs`)}function d(e,t){return t&&t.replaceAll(`{workspaceRoot}`,e.workspaceConfig.workspaceRoot).replaceAll(`{root}`,e.config.projectRoot).replaceAll(`{projectRoot}`,e.config.projectRoot).replaceAll(`{sourceRoot}`,e.config.sourceRoot).replaceAll(`{powerlinesPath}`,e.powerlinesPath).replaceAll(`{cachePath}`,e.cachePath).replaceAll(`{dataPath}`,e.dataPath).replaceAll(`{logPath}`,e.envPaths.log).replaceAll(`{tempPath}`,e.envPaths.temp).replaceAll(`{configPath}`,e.envPaths.config).replaceAll(`{outputPath}`,e.config.output.outputPath).replaceAll(`{buildPath}`,e.config.output.buildPath).replaceAll(`{artifactsPath}`,c(e.artifactsPath,e.workspaceConfig.workspaceRoot)).replaceAll(`{builtinPath}`,c(e.builtinsPath,e.workspaceConfig.workspaceRoot)).replaceAll(`{entryPath}`,c(e.entryPath,e.workspaceConfig.workspaceRoot))}const f=(s={})=>{let c={},f=0,p=()=>{c={},f=0},m=new Map,h=null;return{name:`tamagui`,async config(){let t=u(this,`tamagui`),r=await a(o({...s,components:[n(`{projectRoot}`,`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=>d(this,e)).filter(Boolean),this.config.build.variant===`vite`&&(this.config.build.optimizeDeps??={},this.config.build.optimizeDeps.include??=[],this.config.build.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.projectRoot)||(i=n(this.config.projectRoot,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:u,shouldPrintDebug:d}=await i({source:s>=0?e.slice(s):``,path:o});if(d&&this.trace(`Current file: ${a} in environment: ${this.environment?.name}, shouldDisable: ${u}\n\nOriginal source:\n${e}\n\n`),u)return;let g=t({cacheEnv:this.environment.name===`client`||this.environment.name===`ssr`?`web`:this.environment.name,code:e,id:a}),_=c[g];if(_)return _;let v;try{v=await r.extractToClassNames({source:e,sourcePath:o,options:this.config.tamagui,shouldPrintDebug:d})}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.projectRoot)||(b=n(this.config.projectRoot,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(),c[g]=S,S}},async finalize(){await r?.destroyPool()},vite:{configureServer(e){h=e}}}};var p=f;export{p as default,f as plugin};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["server: ViteDevServer | null","alias: BuildResolvedConfig[\"alias\"]","extracted: ExtractedResponse | null"],"sources":["../../powerlines/src/plugin-utils/get-config-path.ts","../../powerlines/src/plugin-utils/paths.ts","../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path/join\";\nimport { existsSync } from \"node:fs\";\nimport { UnresolvedContext } from \"../types/context\";\n\n/**\n * Get the configuration file path for a given name.\n *\n * @param context - The Powerlines context.\n * @param name - The name of the configuration file (without extension).\n * @returns The absolute path to the configuration file, or undefined if not found.\n */\nexport function getConfigPath(\n context: UnresolvedContext,\n name: string\n): string | undefined {\n if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.yml`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.yml`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.yaml`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.yaml`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.json`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.json`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.jsonc`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.jsonc`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.ts`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.ts`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.cts`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.cts`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.mts`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.mts`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.js`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.js`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.cjs`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.cjs`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.mjs`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.mjs`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.config.ts`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.config.ts`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.config.cts`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.config.cts`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.config.mts`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.config.mts`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.config.js`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.config.js`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.config.cjs`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.config.cjs`\n );\n } else if (\n existsSync(\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.config.mjs`\n )\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n `${name}.config.mjs`\n );\n } else if (\n existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.yml`))\n ) {\n return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.yml`);\n } else if (\n existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.yaml`))\n ) {\n return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.yaml`);\n } else if (\n existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.json`))\n ) {\n return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.json`);\n } else if (\n existsSync(\n joinPaths(context.workspaceConfig.workspaceRoot, `${name}.jsonc`)\n )\n ) {\n return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.jsonc`);\n } else if (\n existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.ts`))\n ) {\n return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.ts`);\n } else if (\n existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.cts`))\n ) {\n return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.cts`);\n } else if (\n existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.mts`))\n ) {\n return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.mts`);\n } else if (\n existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.js`))\n ) {\n return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.js`);\n } else if (\n existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.cjs`))\n ) {\n return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.cjs`);\n } else if (\n existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.mjs`))\n ) {\n return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.mjs`);\n } else if (\n existsSync(\n joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.ts`)\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n `${name}.config.ts`\n );\n } else if (\n existsSync(\n joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.cts`)\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n `${name}.config.cts`\n );\n } else if (\n existsSync(\n joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.mts`)\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n `${name}.config.mts`\n );\n } else if (\n existsSync(\n joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.js`)\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n `${name}.config.js`\n );\n } else if (\n existsSync(\n joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.cjs`)\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n `${name}.config.cjs`\n );\n } else if (\n existsSync(\n joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.mjs`)\n )\n ) {\n return joinPaths(\n context.workspaceConfig.workspaceRoot,\n `${name}.config.mjs`\n );\n }\n\n return undefined;\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { replacePath } from \"@stryke/path/replace\";\nimport { IsUndefined } from \"@stryke/types/base\";\nimport { UnresolvedContext } from \"../types/context\";\n\n/**\n * Replaces tokens in the given path string with their corresponding values from the context.\n *\n * @remarks\n * The following tokens are supported:\n * - `{workspaceRoot}` - The root directory of the workspace.\n * - `{root}` - The root directory of the project (same as `{projectRoot}`).\n * - `{projectRoot}` - The root directory of the project (same as `{root}`).\n * - `{sourceRoot}` - The source root directory of the project (usually `./src`).\n * - `{powerlinesPath}` - The directory where Powerlines is installed.\n * - `{cachePath}` - The environment's directory for cached files.\n * - `{dataPath}` - The environment's directory for data files.\n * - `{logPath}` - The environment's directory for log files.\n * - `{tempPath}` - The environment's directory for temporary files.\n * - `{configPath}` - The environment's directory for configuration files.\n * - `{outputPath}` - The configured output directory for the project.\n * - `{buildPath}` - The configured distribution directory for the project.\n * - `{artifactsPath}` - The configured directory for build artifacts.\n * - `{builtinPath}` - The configured directory for generated built-in plugins.\n * - `{entryPath}` - The configured directory for generated entry files.\n *\n * @param context - The context containing the values for the path tokens.\n * @param path - The path string with tokens to replace.\n * @returns The path string with tokens replaced by their corresponding values from the context.\n */\nexport function replacePathTokens(\n context: UnresolvedContext,\n path?: string\n): IsUndefined<typeof path> extends true ? undefined : string {\n if (!path) {\n return path as IsUndefined<typeof path> extends true ? undefined : string;\n }\n\n return path\n .replaceAll(\"{workspaceRoot}\", context.workspaceConfig.workspaceRoot)\n .replaceAll(\"{root}\", context.config.projectRoot)\n .replaceAll(\"{projectRoot}\", context.config.projectRoot)\n .replaceAll(\"{sourceRoot}\", context.config.sourceRoot)\n .replaceAll(\"{powerlinesPath}\", context.powerlinesPath)\n .replaceAll(\"{cachePath}\", context.cachePath)\n .replaceAll(\"{dataPath}\", context.dataPath)\n .replaceAll(\"{logPath}\", context.envPaths.log)\n .replaceAll(\"{tempPath}\", context.envPaths.temp)\n .replaceAll(\"{configPath}\", context.envPaths.config)\n .replaceAll(\"{outputPath}\", context.config.output.outputPath)\n .replaceAll(\"{buildPath}\", context.config.output.buildPath)\n .replaceAll(\n \"{artifactsPath}\",\n replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)\n )\n .replaceAll(\n \"{builtinPath}\",\n replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)\n )\n .replaceAll(\n \"{entryPath}\",\n replacePath(context.entryPath, context.workspaceConfig.workspaceRoot)\n );\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { resolvePackage } from \"@stryke/fs/resolve\";\nimport { murmurhash } from \"@stryke/hash/neutral\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport type { ExtractedResponse, TamaguiOptions } from \"@tamagui/static-worker\";\nimport * as Static from \"@tamagui/static-worker\";\nimport {\n getPragmaOptions,\n loadTamaguiBuildConfig\n} from \"@tamagui/static-worker\";\nimport defu from \"defu\";\nimport { getConfigPath } from \"powerlines/plugin-utils/get-config-path\";\nimport { replacePathTokens } from \"powerlines/plugin-utils/paths\";\nimport {\n BuildResolvedConfig,\n ViteResolvedBuildConfig\n} from \"powerlines/types/build\";\nimport { EnvironmentConfig } from \"powerlines/types/config\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { transformWithEsbuild, ViteDevServer } from \"vite\";\nimport { TamaguiPluginContext, TamaguiPluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * Tamagui plugin for Powerlines.\n *\n * @param options - The Tamagui plugin user configuration options.\n * @returns A Powerlines plugin that integrates Tamagui into an existing Powerlines project.\n */\nexport const plugin = <\n TContext extends TamaguiPluginContext = TamaguiPluginContext\n>(\n options: TamaguiPluginOptions = {}\n): Plugin<TContext> => {\n let memoryCache = {} as Record<string, { code: string; map?: any }>;\n let cacheSize = 0;\n\n const clearCompilerCache = () => {\n memoryCache = {};\n cacheSize = 0;\n };\n\n const cssMap = new Map<string, string>();\n let server: ViteDevServer | null = null;\n\n return {\n name: \"tamagui\",\n async config() {\n const configPath = getConfigPath(this, \"tamagui\");\n\n const tamaguiOptions = await loadTamaguiBuildConfig(\n defu(\n {\n ...options,\n components: [joinPaths(\"{projectRoot}\", \"src/components\")]\n },\n {\n config: configPath,\n disableExtraction: false,\n platform: \"web\" as const,\n logTimings:\n this.config.logLevel === \"debug\" ||\n this.config.logLevel === \"trace\",\n prefixLogs: \"Powerlines\"\n } as Partial<TamaguiOptions>\n )\n );\n\n const alias: BuildResolvedConfig[\"alias\"] = [];\n if (tamaguiOptions.platform !== \"native\") {\n alias.push({\n find: \"react-native/Libraries/Renderer/shims/ReactFabric\",\n replacement:\n (await resolvePackage(\"@tamagui/proxy-worm\")) ||\n \"@tamagui/proxy-worm\"\n });\n\n alias.push({\n find: \"react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry\",\n replacement:\n (await resolvePackage(\"@tamagui/proxy-worm\")) ||\n \"@tamagui/proxy-worm\"\n });\n alias.push({\n find: \"react-native-svg\",\n replacement:\n (await resolvePackage(\"react-native-svg\")) || \"react-native-svg\"\n });\n\n if (tamaguiOptions?.useReactNativeWebLite) {\n alias.push({\n find: \"react-native\",\n replacement:\n (await resolvePackage(\"react-native-web-lite\")) ||\n \"react-native-web-lite\"\n });\n\n const reactNativeWebLite =\n (await resolvePackage(\n tamaguiOptions?.useReactNativeWebLite === \"without-animated\"\n ? \"@tamagui/react-native-web-lite/without-animated\"\n : \"@tamagui/react-native-web-lite\"\n )) || tamaguiOptions?.useReactNativeWebLite === \"without-animated\"\n ? \"@tamagui/react-native-web-lite/without-animated\"\n : \"@tamagui/react-native-web-lite\";\n alias.push({\n find: /^react-native$/,\n replacement: reactNativeWebLite\n });\n\n alias.push({\n find: /^react-native\\/(.+)$/,\n replacement: `${reactNativeWebLite}/$1`\n });\n alias.push({\n find: /^react-native-web$/,\n replacement: reactNativeWebLite\n });\n alias.push({\n find: /^react-native-web\\/(.+)$/,\n replacement: `${reactNativeWebLite}/$1`\n });\n\n alias.push({\n find: /react-native.*\\/dist\\/exports\\/StyleSheet\\/compiler\\/createReactDOMStyle/,\n replacement:\n (await resolvePackage(\n \"@tamagui/react-native-web-lite/dist/exports/StyleSheet/compiler/createReactDOMStyle\"\n )) ||\n \"@tamagui/react-native-web-lite/dist/exports/StyleSheet/compiler/createReactDOMStyle\"\n });\n }\n }\n\n return {\n tamagui: tamaguiOptions,\n build: {\n platform: \"browser\",\n extensions: [\n `.web.mjs`,\n `.web.js`,\n `.web.jsx`,\n `.web.ts`,\n `.web.tsx`,\n \".mjs\",\n \".js\",\n \".mts\",\n \".ts\",\n \".jsx\",\n \".tsx\",\n \".json\"\n ],\n define: {\n _frameTimestamp: undefined,\n _WORKLET: false,\n __DEV__: `${this.config.mode === \"development\"}`,\n \"process.env.NODE_ENV\": JSON.stringify(\n process.env.NODE_ENV || this.config.mode\n ),\n \"process.env.ENABLE_RSC\": JSON.stringify(\n process.env.ENABLE_RSC || \"\"\n ),\n \"process.env.ENABLE_STEPS\": JSON.stringify(\n process.env.ENABLE_STEPS || \"\"\n ),\n \"process.env.IS_STATIC\": JSON.stringify(false),\n ...(this.config.mode === \"production\" && {\n \"process.env.TAMAGUI_OPTIMIZE_THEMES\": JSON.stringify(true)\n })\n },\n alias\n }\n };\n },\n configEnvironment(name: string, environment: EnvironmentConfig) {\n if (environment.consumer === \"client\" || name === \"client\") {\n return {\n build: {\n define: {\n \"process.env.TAMAGUI_IS_CLIENT\": JSON.stringify(true),\n \"process.env.TAMAGUI_ENVIRONMENT\": '\"client\"'\n }\n }\n };\n }\n\n return null;\n },\n configResolved() {\n if (\n !this.config.tamagui.components ||\n this.config.tamagui.components.length === 0\n ) {\n throw new Error(\n `Tamagui Plugin: No components paths defined in Tamagui configuration. Please ensure that the 'components' option is set correctly.`\n );\n }\n\n this.config.tamagui.components = this.config.tamagui.components\n .map(path => replacePathTokens(this, path))\n .filter(Boolean);\n\n if (this.config.build.variant === \"vite\") {\n (this.config.build as ViteResolvedBuildConfig).optimizeDeps ??= {};\n (this.config.build as ViteResolvedBuildConfig).optimizeDeps!.include ??=\n [];\n (\n this.config.build as ViteResolvedBuildConfig\n ).optimizeDeps!.include!.push(\"@tamagui/core/inject-styles\");\n }\n },\n async resolveId(id: string) {\n if (\n this.environment?.name &&\n (this.environment.name === \"ios\" || this.environment.name === \"android\")\n ) {\n return;\n }\n\n if (\n this.config?.tamagui?.disableServerOptimization &&\n this.environment?.name &&\n this.environment.name !== \"client\"\n ) {\n // only optimize on client - server should produce identical styles anyway!\n return;\n }\n\n const [validId, query] = id.split(\"?\");\n if (!validId?.endsWith(\".tamagui.css\")) {\n return;\n }\n\n // Absolute paths seem to occur often in monorepos, where files are\n // imported from outside the config root.\n let absoluteId = id;\n if (!id.startsWith(this.config.projectRoot)) {\n absoluteId = joinPaths(this.config.projectRoot, validId);\n }\n\n // There should always be an entry in the `cssMap` here.\n // The only valid scenario for a missing one is if someone had written\n // a file in their app using the .tamagui.js/.tamagui.css extension\n if (cssMap.has(absoluteId)) {\n // Keep the original query string for HMR.\n return absoluteId + (query ? `?${query}` : \"\");\n }\n\n return null;\n },\n async load(id) {\n if (this.config?.tamagui?.disableExtraction) {\n // only optimize on client - server should produce identical styles anyway!\n return;\n }\n\n if (\n this.environment?.name &&\n (this.environment.name === \"ios\" || this.environment.name === \"android\")\n ) {\n return;\n }\n\n if (\n this.config?.tamagui?.disableServerOptimization &&\n this.environment?.name &&\n this.environment.name !== \"client\"\n ) {\n return;\n }\n\n const [validId] = id.split(\"?\");\n\n return validId ? cssMap.get(validId) : null;\n },\n transform: {\n order: \"pre\",\n async handler(code, id) {\n if (id.includes(\"expo-linear-gradient\")) {\n return transformWithEsbuild(code, id, {\n loader: \"jsx\",\n jsx: \"automatic\"\n });\n }\n\n if (this.config?.tamagui?.disableExtraction) {\n // only optimize on client - server should produce identical styles anyway!\n return;\n }\n\n if (\n this.environment?.name &&\n (this.environment.name === \"ios\" ||\n this.environment.name === \"android\")\n ) {\n return;\n }\n\n if (\n this.config?.tamagui?.disableServerOptimization &&\n this.environment?.name &&\n this.environment.name !== \"client\"\n ) {\n return;\n }\n\n const [validId] = id.split(\"?\");\n if (!validId?.endsWith(\".tsx\")) {\n return;\n }\n\n const firstCommentIndex = code.indexOf(\"// \");\n const { shouldDisable, shouldPrintDebug } = await getPragmaOptions({\n source: firstCommentIndex >= 0 ? code.slice(firstCommentIndex) : \"\",\n path: validId\n });\n\n if (shouldPrintDebug) {\n this.trace(\n `Current file: ${id} in environment: ${this.environment?.name}, shouldDisable: ${shouldDisable}\\n\\nOriginal source:\\n${code}\\n\\n`\n );\n }\n\n if (shouldDisable) {\n return;\n }\n\n const cacheKey = murmurhash({\n cacheEnv:\n this.environment.name === \"client\" ||\n this.environment.name === \"ssr\"\n ? // same cache key for ssr and web since they are the same\n \"web\"\n : this.environment.name,\n code,\n id\n });\n\n const cached = memoryCache[cacheKey];\n if (cached) {\n return cached;\n }\n\n let extracted: ExtractedResponse | null;\n try {\n extracted = await Static.extractToClassNames({\n source: code,\n sourcePath: validId,\n options: this.config.tamagui,\n shouldPrintDebug\n });\n } catch (err) {\n // Log the error but don't fail the build - just skip optimization\n this.error(err instanceof Error ? err.message : String(err));\n return;\n }\n\n if (!extracted) {\n return;\n }\n\n const rootRelativeId = `${validId}.tamagui.css`;\n\n let absoluteId = rootRelativeId;\n if (!absoluteId.startsWith(this.config.projectRoot)) {\n absoluteId = joinPaths(this.config.projectRoot, rootRelativeId);\n }\n\n let source = extracted.js;\n if (extracted.styles) {\n this.addWatchFile(rootRelativeId);\n\n if (server && cssMap.has(absoluteId)) {\n if (server) {\n const { moduleGraph } = server;\n const modules = moduleGraph.getModulesByFile(rootRelativeId);\n\n if (modules) {\n for (const module of modules) {\n moduleGraph.invalidateModule(module);\n\n // Vite uses this timestamp to add `?t=` query string automatically for HMR.\n module.lastHMRTimestamp =\n module.lastInvalidationTimestamp || Date.now();\n }\n }\n }\n }\n\n source = `${source.toString()}\\nimport \"${rootRelativeId}\";`;\n cssMap.set(absoluteId, extracted.styles);\n }\n\n const result = {\n code: source.toString(),\n map: extracted.map\n };\n\n cacheSize += result.code.length;\n // ~50Mb cache for recently compiler files\n if (cacheSize > 26214400) {\n clearCompilerCache();\n }\n\n memoryCache[cacheKey] = result;\n\n return result;\n }\n },\n async finalize() {\n // Only destroy the pool at the very end of the entire build\n await Static?.destroyPool();\n },\n vite: {\n configureServer(_server) {\n server = _server;\n }\n }\n } as Plugin<TContext>;\n};\n\nexport default plugin;\n"],"mappings":"seA6BA,SAAgB,EACd,EACA,EACoB,CACpB,GACE,EACE,EACE,EAAQ,gBAAgB,cACxB,EAAQ,OAAO,YACf,GAAG,EAAK,MACT,CACF,CAED,OAAO,EACL,EAAQ,gBAAgB,cACxB,EAAQ,OAAO,YACf,GAAG,EAAK,MACT,IAED,EACE,EACE,EAAQ,gBAAgB,cACxB,EAAQ,OAAO,YACf,GAAG,EAAK,OACT,CACF,CAED,OAAO,EACL,EAAQ,gBAAgB,cACxB,EAAQ,OAAO,YACf,GAAG,EAAK,OACT,IAED,EACE,EACE,EAAQ,gBAAgB,cACxB,EAAQ,OAAO,YACf,GAAG,EAAK,OACT,CACF,CAED,OAAO,EACL,EAAQ,gBAAgB,cACxB,EAAQ,OAAO,YACf,GAAG,EAAK,OACT,IAED,EACE,EACE,EAAQ,gBAAgB,cACxB,EAAQ,OAAO,YACf,GAAG,EAAK,QACT,CACF,CAED,OAAO,EACL,EAAQ,gBAAgB,cACxB,EAAQ,OAAO,YACf,GAAG,EAAK,QACT,IAED,EACE,EACE,EAAQ,gBAAgB,cACxB,EAAQ,OAAO,YACf,GAAG,EAAK,KACT,C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