diff --git a/apps/oxfmt/package.json b/apps/oxfmt/package.json index e560cd91ec2a9..ad0f2393b35c4 100644 --- a/apps/oxfmt/package.json +++ b/apps/oxfmt/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "prettier": "3.8.1", - "prettier-plugin-tailwindcss": "0.7.2", + "prettier-plugin-tailwindcss": "0.0.0-insiders.2ac6e70", "tinypool": "2.1.0" }, "devDependencies": { diff --git a/apps/oxfmt/src-js/libs/apis.ts b/apps/oxfmt/src-js/libs/apis.ts index a00af4a30fde3..aa0fc1a2aae9f 100644 --- a/apps/oxfmt/src-js/libs/apis.ts +++ b/apps/oxfmt/src-js/libs/apis.ts @@ -119,7 +119,6 @@ export async function formatFile({ // --- // Import types only to avoid runtime error if plugin is not installed -import type { TransformerEnv } from "prettier-plugin-tailwindcss"; // Shared cache for prettier-plugin-tailwindcss let tailwindPluginCache: typeof import("prettier-plugin-tailwindcss"); @@ -153,7 +152,12 @@ async function setupTailwindPlugin(options: Options): Promise { export interface SortTailwindClassesArgs { filepath: string; classes: string[]; - options?: Record; + options?: { + tailwindStylesheet?: string; + tailwindConfig?: string; + tailwindPreserveWhitespace?: boolean; + tailwindPreserveDuplicates?: boolean; + } & Options; } /** @@ -166,27 +170,17 @@ export async function sortTailwindClasses({ classes, options = {}, }: SortTailwindClassesArgs): Promise { - const tailwindPlugin = await loadTailwindPlugin(); - - // SAFETY: `options` is created in Rust side, so it's safe to mutate here - options.filepath = filepath; - - // Load Tailwind context - const context = await tailwindPlugin.getTailwindConfig(options); - if (!context) return classes; - - // Create transformer env with options - const env: TransformerEnv = { context, options }; - - // Sort all classes - return classes.map((classStr) => { - try { - return tailwindPlugin.sortClasses(classStr, { env }); - } catch { - // Failed to sort, return original - return classStr; - } + const { createSorter } = await import("prettier-plugin-tailwindcss/sorter"); + + const sorter = await createSorter({ + filepath, + stylesheetPath: options.tailwindStylesheet, + configPath: options.tailwindConfig, + preserveWhitespace: options.tailwindPreserveWhitespace, + preserveDuplicates: options.tailwindPreserveDuplicates, }); + + return sorter.sortClassAttributes(classes); } // --- diff --git a/apps/oxfmt/src/core/config.rs b/apps/oxfmt/src/core/config.rs index f8f56305fc8b7..2dfaf69b252ab 100644 --- a/apps/oxfmt/src/core/config.rs +++ b/apps/oxfmt/src/core/config.rs @@ -1,4 +1,7 @@ -use std::path::{Path, PathBuf}; +use std::{ + env::current_dir, + path::{Path, PathBuf}, +}; use editorconfig_parser::{ EditorConfig, EditorConfigProperties, EditorConfigProperty, EndOfLine, IndentStyle, @@ -62,9 +65,15 @@ pub fn resolve_options_from_value( let oxfmt_options = format_config .into_oxfmt_options() .map_err(|err| format!("Failed to parse configuration.\n{err}"))?; - sync_external_options(&mut external_options, &oxfmt_options.format_options); - Ok(ResolvedOptions::from_oxfmt_options(oxfmt_options, external_options, strategy)) + sync_external_options(&oxfmt_options.format_options, &mut external_options); + + Ok(ResolvedOptions::from_oxfmt_options( + current_dir().ok().as_ref(), + oxfmt_options, + external_options, + strategy, + )) } // --- @@ -99,12 +108,13 @@ impl ResolvedOptions { /// /// This also applies plugin-specific options (Tailwind, oxfmt plugin flags) based on strategy. fn from_oxfmt_options( + config_dir: Option<&PathBuf>, oxfmt_options: OxfmtOptions, mut external_options: Value, strategy: &FormatFileStrategy, ) -> Self { // Apply plugin-specific options based on strategy - finalize_external_options(&mut external_options, strategy); + finalize_external_options(config_dir, &mut external_options, strategy); #[cfg(feature = "napi")] let OxfmtOptions { format_options, toml_options, sort_package_json, insert_final_newline } = @@ -265,7 +275,7 @@ impl ConfigResolver { // Apply common Prettier mappings for caching. // Plugin options will be added later in `resolve()` via `finalize_external_options()`. // If we finalize here, every per-file options contain plugin options even if not needed. - sync_external_options(&mut external_options, &oxfmt_options.format_options); + sync_external_options(&oxfmt_options.format_options, &mut external_options); // Save cache for fast path: no per-file overrides self.cached_options = Some((oxfmt_options, external_options)); @@ -278,7 +288,12 @@ impl ConfigResolver { #[instrument(level = "debug", name = "oxfmt::config::resolve", skip_all, fields(path = %strategy.path().display()))] pub fn resolve(&self, strategy: &FormatFileStrategy) -> ResolvedOptions { let (oxfmt_options, external_options) = self.resolve_options(strategy.path()); - ResolvedOptions::from_oxfmt_options(oxfmt_options, external_options, strategy) + ResolvedOptions::from_oxfmt_options( + self.config_dir.as_ref(), + oxfmt_options, + external_options, + strategy, + ) } /// Resolve options for a specific file path. @@ -323,7 +338,8 @@ impl ConfigResolver { let oxfmt_options = format_config .into_oxfmt_options() .expect("If this fails, there is an issue with override values"); - sync_external_options(&mut external_options, &oxfmt_options.format_options); + + sync_external_options(&oxfmt_options.format_options, &mut external_options); (oxfmt_options, external_options) } diff --git a/apps/oxfmt/src/core/oxfmtrc.rs b/apps/oxfmt/src/core/oxfmtrc.rs index 2b2e785f50519..833a99d57f85a 100644 --- a/apps/oxfmt/src/core/oxfmtrc.rs +++ b/apps/oxfmt/src/core/oxfmtrc.rs @@ -1,3 +1,5 @@ +use std::path::{Path, PathBuf}; + use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use serde_json::Value; @@ -814,7 +816,7 @@ pub struct OxfmtOptions { /// /// This function should be called once during config caching. /// For strategy-specific options (plugin flags), use [`finalize_external_options()`] separately. -pub fn sync_external_options(config: &mut Value, options: &FormatOptions) { +pub fn sync_external_options(options: &FormatOptions, config: &mut Value) { let Some(obj) = config.as_object_mut() else { return; }; @@ -877,7 +879,11 @@ static OXFMT_PARSERS: phf::Set<&'static str> = phf::phf_set! { /// - `_oxfmtPluginOptionsJson`: Bundled options for `prettier-plugin-oxfmt` /// /// Also removes Prettier-unaware options to minimize payload size. -pub fn finalize_external_options(config: &mut Value, strategy: &FormatFileStrategy) { +pub fn finalize_external_options( + config_dir: Option<&PathBuf>, + config: &mut Value, + strategy: &FormatFileStrategy, +) { let Some(obj) = config.as_object_mut() else { return; }; @@ -907,8 +913,25 @@ pub fn finalize_external_options(config: &mut Value, strategy: &FormatFileStrate ("preserveWhitespace", "tailwindPreserveWhitespace"), ("preserveDuplicates", "tailwindPreserveDuplicates"), ] { - if let Some(v) = tailwind.get(src) { - obj.insert(dst.to_string(), v.clone()); + if let Some(value) = tailwind.get(src).cloned() { + if matches!(src, "config" | "stylesheet") + && let Some(path_str) = value.as_str() + && let Some(config_dir) = config_dir + { + let path = Path::new(path_str); + if path.is_relative() { + // Resolve relative paths to absolute paths, which can avoid `prettier-plugin-tailwindcss` + // from resolving the Prettier configuration file. + // + let config_path = config_dir.join(path); + let canonical_path = config_path.canonicalize().unwrap_or(config_path); + let normalized_path = canonical_path.to_string_lossy().to_string(); + obj.insert(dst.to_string(), Value::from(normalized_path)); + continue; + } + } + + obj.insert(dst.to_string(), value); } } } @@ -1178,7 +1201,7 @@ mod tests_sync_external_options { let config: FormatConfig = serde_json::from_str(json_string).unwrap(); let oxfmt_options = config.into_oxfmt_options().unwrap(); - sync_external_options(&mut raw_config, &oxfmt_options.format_options); + sync_external_options(&oxfmt_options.format_options, &mut raw_config); let obj = raw_config.as_object().unwrap(); assert_eq!(obj.get("printWidth").unwrap(), 100); @@ -1195,7 +1218,7 @@ mod tests_sync_external_options { let config: FormatConfig = serde_json::from_str(json_string).unwrap(); let oxfmt_options = config.into_oxfmt_options().unwrap(); - sync_external_options(&mut raw_config, &oxfmt_options.format_options); + sync_external_options(&oxfmt_options.format_options, &mut raw_config); let obj = raw_config.as_object().unwrap(); // User-specified value is preserved via FormatOptions @@ -1252,7 +1275,7 @@ mod tests_sync_external_options { let oxfmtrc: Oxfmtrc = serde_json::from_str(json_string).unwrap(); let oxfmt_options = oxfmtrc.format_config.into_oxfmt_options().unwrap(); - sync_external_options(&mut raw_config, &oxfmt_options.format_options); + sync_external_options(&oxfmt_options.format_options, &mut raw_config); let obj = raw_config.as_object().unwrap(); // Overrides are preserved (for caching) @@ -1280,7 +1303,7 @@ mod tests_sync_external_options { path: PathBuf::from("test.js"), source_type: SourceType::mjs(), }; - finalize_external_options(&mut raw_config, &strategy); + finalize_external_options(None, &mut raw_config, &strategy); let obj = raw_config.as_object().unwrap(); // oxfmt extensions are removed by finalize_external_options diff --git a/apps/oxfmt/test/api/sort_tailwindcss.test.ts b/apps/oxfmt/test/api/sort_tailwindcss.test.ts index 548e18cfa1166..9fdf2a4f519ad 100644 --- a/apps/oxfmt/test/api/sort_tailwindcss.test.ts +++ b/apps/oxfmt/test/api/sort_tailwindcss.test.ts @@ -1,3 +1,6 @@ +import { mkdtemp, rm, writeFile } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join, relative } from "node:path"; import { describe, expect, it } from "vitest"; import { format } from "../../dist/index.js"; @@ -17,6 +20,30 @@ describe("Tailwind CSS Sorting", () => { expect(result.errors).toStrictEqual([]); }); + it("should resolve relative tailwindConfig paths", async () => { + const cwd = process.cwd(); + const dir = await mkdtemp(join(tmpdir(), "oxfmt-tailwind-")); + + try { + await writeFile( + join(dir, "tailwind.config.js"), + "module.exports = { content: [], theme: { extend: {} }, plugins: [] };", + ); + + const input = `const A =
Hello
;`; + const result = await format("src/test.tsx", input, { + experimentalTailwindcss: { + config: join(relative(cwd, dir), "tailwind.config.js"), + }, + }); + + expect(result.code).toContain('className="flex p-4"'); + expect(result.errors).toStrictEqual([]); + } finally { + await rm(dir, { recursive: true, force: true }); + } + }); + it("should NOT sort Tailwind classes when experimentalTailwindcss is disabled (default)", async () => { const input = `const A =
Hello
;`; diff --git a/apps/oxfmt/tsdown.config.ts b/apps/oxfmt/tsdown.config.ts index 5b17862e9876e..9104bf1e1b28a 100644 --- a/apps/oxfmt/tsdown.config.ts +++ b/apps/oxfmt/tsdown.config.ts @@ -19,6 +19,7 @@ export default defineConfig({ // We are using patched version, so we must bundle it // Also, it internally loads plugins dynamically, so they also must be bundled "prettier-plugin-tailwindcss", + "prettier-plugin-tailwindcss/sorter", /^prettier\/plugins\//, // Cannot bundle: `cli-worker.js` runs in separate thread and can't resolve bundled chunks diff --git a/patches/prettier-plugin-tailwindcss@0.7.2.patch b/patches/prettier-plugin-tailwindcss@0.7.2.patch deleted file mode 100644 index fb1b9551466cb..0000000000000 --- a/patches/prettier-plugin-tailwindcss@0.7.2.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/dist/index.d.ts b/dist/index.d.ts -index 859b660d46c4050b5c5a976c90dbe5b2501a4e43..1fdc1623c782cda89cabbc46bd0801b33bbb19cb 100644 ---- a/dist/index.d.ts -+++ b/dist/index.d.ts -@@ -37,4 +37,45 @@ interface PluginOptions { - tailwindPreserveDuplicates?: boolean; - } - --export { type PluginOptions, options, parsers, printers }; -+/** -+ * Context returned by getTailwindConfig, containing the class ordering function. -+ */ -+interface TailwindContext { -+ getClassOrder(classes: string[]): [string, bigint | null][]; -+} -+ -+/** -+ * Environment object passed to sortClasses. -+ */ -+interface TransformerEnv { -+ context: TailwindContext; -+ options: Partial; -+} -+ -+/** -+ * Options for sortClasses function. -+ */ -+interface SortClassesOptions { -+ env: TransformerEnv; -+ ignoreFirst?: boolean; -+ ignoreLast?: boolean; -+ removeDuplicates?: boolean; -+ collapseWhitespace?: boolean | { start?: boolean; end?: boolean }; -+} -+ -+/** -+ * Load Tailwind configuration and return a context for sorting classes. -+ * @param options - Parser options including filepath and tailwind config paths -+ * @returns Promise resolving to a TailwindContext -+ */ -+declare function getTailwindConfig(options: Partial): Promise; -+ -+/** -+ * Sort Tailwind CSS classes in a string. -+ * @param classString - The class string to sort -+ * @param options - Options including the transformer environment -+ * @returns Sorted class string -+ */ -+declare function sortClasses(classString: string, options: SortClassesOptions): string; -+ -+export { type PluginOptions, type TailwindContext, type TransformerEnv, type SortClassesOptions, options, parsers, printers, getTailwindConfig, sortClasses }; -diff --git a/dist/index.mjs b/dist/index.mjs -index 572bed53535a5743e619787b5251e86b1ce8db65..2c2e081f55f48dbeb3c0d28f5dfd4ccf3a859b1f 100644 ---- a/dist/index.mjs -+++ b/dist/index.mjs -@@ -3509,7 +3509,7 @@ input:where([type='button'], [type='reset'], [type='submit']), - --max-width-prose: 65ch; - } - `;var Sw=`@tailwind utilities; --`;var Bb={tailwindcss:Mb,"tailwindcss/index":Mb,"tailwindcss/index.css":Mb,"tailwindcss/preflight":Tw,"tailwindcss/preflight.css":Tw,"tailwindcss/theme":Ew,"tailwindcss/theme.css":Ew,"tailwindcss/utilities":Sw,"tailwindcss/utilities.css":Sw};async function oB(t,r){let s=!1;(!t||!t.__unstable__loadDesignSystem)&&(t=xw,s=!0);let a=RR(import.meta.url,{moduleCache:!1,fsCache:!1}),u,e;r?(u=await _w.readFile(r,"utf-8"),e=Ip.dirname(r)):(e=process.cwd(),r=Ip.join(e,"fake.css"),u=Bb["tailwindcss/theme.css"]);let l=await t.__unstable__loadDesignSystem(u,{base:e,loadModule:ww({legacy:!1,jiti:a,filepath:r,onError:(n,c,p)=>{if(console.error(`Unable to load ${p}: ${n}`,c),p==="config")return{};if(p==="plugin")return()=>{}}}),loadStylesheet:async(n,c)=>{try{let p=vD(c,n);return{base:Ip.dirname(p),content:await _w.readFile(p,"utf-8")}}catch(p){if(s&&n in Bb)return{base:c,content:Bb[n]};throw p}},loadPlugin:ww({legacy:!0,jiti:a,filepath:r,onError(n,c){return console.error(`Unable to load plugin: ${n}`,c),()=>{}}}),loadConfig:ww({legacy:!0,jiti:a,filepath:r,onError(n,c){return console.error(`Unable to load config: ${n}`,c),{}}})});return{getClassOrder:n=>l.getClassOrder(n)}}function ww({legacy:t,jiti:r,filepath:s,onError:a}){let u=`${+Date.now()}`;async function e(l,n,c){try{let p=Vc(n,l),i=Doe(p);return i.searchParams.append("t",u),await r.import(i.href,{default:!0})}catch(p){return a(l,p,c)}}if(t){let l=Ip.dirname(s);return n=>e(n,l,"module")}return async(l,n,c)=>({base:n,module:await e(l,n,c)})}var Aw=Fc(1e4);async function uB(t){let r=process.cwd(),s=t.filepath?Ll.dirname(t.filepath):r,[a,u]=await Foe(t.filepath),[e,l]=await Loe(t,s),n=Boe(t,a,u),c=Roe(t,a);if(!n&&!(e!=null&&e.__unstable__loadDesignSystem)&&(c=c??Moe(s)),c){if(!n)return Aw.remember(`${l}:${c}`,()=>qS(l,c));Wl("explicit-stylesheet-and-config-together",u??"","You have specified a Tailwind CSS stylesheet and a Tailwind CSS config at the same time. Use tailwindStylesheet unless you are using v3. Preferring the stylesheet.")}if(e&&!e.__unstable__loadDesignSystem){if(!n)return Aw.remember(`${l}:${c}`,()=>qS(l,c));e=null,Wl("stylesheet-unsupported",u??"","You have specified a Tailwind CSS stylesheet but your installed version of Tailwind CSS does not support this feature.")}return e&&e.__unstable__loadDesignSystem&&l&&(n??(n=`${l}/theme.css`)),Aw.remember(`${l}:${n}`,()=>oB(e,n))}var Noe=Fc(1e4);async function Foe(t){let r=await Noe.remember(t,async()=>{try{return await Ooe.resolveConfigFile(t)}catch(s){return Wl("prettier-config-not-found","Failed to resolve Prettier Config"),Wl("prettier-config-not-found-err",s),null}});return r?[Ll.dirname(r),r]:[process.cwd(),null]}var joe=Fc(1e4);async function Loe(t,r){let s=t.tailwindPackageName??"tailwindcss";return await joe.remember(`${s}:${r}`,async()=>{let a=null,u=null;try{let e=Vc(r,s);u=await import(Ioe(e).toString());let l=Vc(r,`${s}/package.json`);a=Ll.dirname(l)}catch{}return[u,a]})}function Roe(t,r){return!t.tailwindConfig||t.tailwindConfig.endsWith(".css")?null:Ll.resolve(r,t.tailwindConfig)}var lB=new Map;function Moe(t){let r=lB.get(t);if(r===void 0){try{r=mP(t,(a,u)=>{if(u.includes("tailwind.config.js"))return"tailwind.config.js";if(u.includes("tailwind.config.cjs"))return"tailwind.config.cjs";if(u.includes("tailwind.config.mjs"))return"tailwind.config.mjs";if(u.includes("tailwind.config.ts"))return"tailwind.config.ts"})??null}catch{}r??(r=null),lB.set(t,r)}return r}function Boe(t,r,s){return t.tailwindStylesheet?(t.tailwindStylesheet.endsWith(".js")||t.tailwindStylesheet.endsWith(".mjs")||t.tailwindStylesheet.endsWith(".cjs")||t.tailwindStylesheet.endsWith(".ts")||t.tailwindStylesheet.endsWith(".mts")||t.tailwindStylesheet.endsWith(".cts")?Wl("stylesheet-is-js-file",s??"","Your `tailwindStylesheet` option points to a JS/TS config file. You must point to your project's `.css` file for v4 projects."):t.tailwindStylesheet.endsWith(".sass")||t.tailwindStylesheet.endsWith(".scss")||t.tailwindStylesheet.endsWith(".less")||t.tailwindStylesheet.endsWith(".styl")?Wl("stylesheet-is-preprocessor-file",s??"","Your `tailwindStylesheet` option points to a preprocessor file. This is unsupported and you may get unexpected results."):t.tailwindStylesheet.endsWith(".css")||Wl("stylesheet-is-not-css-file",s??"","Your `tailwindStylesheet` option does not point to a CSS file. This is unsupported and you may get unexpected results."),Ll.resolve(r,t.tailwindStylesheet)):t.tailwindEntryPoint?(o0("entrypoint-is-deprecated",s??"","Deprecated: Use the `tailwindStylesheet` option for v4 projects instead of `tailwindEntryPoint`."),Ll.resolve(r,t.tailwindEntryPoint)):t.tailwindConfig&&t.tailwindConfig.endsWith(".css")?(o0("config-as-css-is-deprecated",s??"","Deprecated: Use the `tailwindStylesheet` option for v4 projects instead of `tailwindConfig`."),Ll.resolve(r,t.tailwindConfig)):null}var Uoe={tailwindConfig:{type:"string",category:"Tailwind CSS",description:"Path to Tailwind configuration file"},tailwindEntryPoint:{type:"string",category:"Tailwind CSS",description:"Path to the CSS entrypoint in your Tailwind project (v4+)"},tailwindStylesheet:{type:"string",category:"Tailwind CSS",description:"Path to the CSS stylesheet in your Tailwind project (v4+)"},tailwindAttributes:{type:"string",array:!0,default:[{value:[]}],category:"Tailwind CSS",description:"List of attributes/props that contain sortable Tailwind classes"},tailwindFunctions:{type:"string",array:!0,default:[{value:[]}],category:"Tailwind CSS",description:"List of functions and tagged templates that contain sortable Tailwind classes"},tailwindPreserveWhitespace:{type:"boolean",default:!1,category:"Tailwind CSS",description:"Preserve whitespace around Tailwind classes when sorting"},tailwindPreserveDuplicates:{type:"boolean",default:!1,category:"Tailwind CSS",description:"Preserve duplicate classes inside a class list when sorting"},tailwindPackageName:{type:"string",default:"tailwindcss",category:"Tailwind CSS",description:"The package name to use when loading Tailwind CSS"}};function dB(t,r,s){let a=new Set(s.staticAttrs),u=new Set(s.dynamicAttrs),e=new Set(s.functions),l=[...s.staticAttrsRegex],n=[...s.functionsRegex];for(let c of t.tailwindAttributes??[]){let p=pB(c);p?l.push(p):r==="vue"&&c.startsWith(":")?a.add(c.slice(1)):r==="vue"&&c.startsWith("v-bind:")?a.add(c.slice(7)):r==="vue"&&c.startsWith("v-")?u.add(c):r==="angular"&&c.startsWith("[")&&c.endsWith("]")?a.add(c.slice(1,-1)):a.add(c)}for(let c of a)r==="vue"?(u.add(`:${c}`),u.add(`v-bind:${c}`)):r==="angular"&&u.add(`[${c}]`);for(let c of t.tailwindFunctions??[]){let p=pB(c);p?n.push(p):e.add(c)}return{hasStaticAttr:c=>cB(c,r)?!1:Ub(c,a,l),hasDynamicAttr:c=>{if(Ub(c,u,[]))return!0;let p=cB(c,r);return p?Ub(p,a,l):!1},hasFunction:c=>Ub(c,e,n)}}function cB(t,r){return r==="vue"?t.startsWith(":")?t.slice(1):t.startsWith("v-bind:")?t.slice(7):t.startsWith("v-")?t:null:r==="angular"&&t.startsWith("[")&&t.endsWith("]")?t.slice(1,-1):null}function Ub(t,r,s){if(r.has(t))return!0;for(let a of s)if(a.test(t))return!0;return!1}function pB(t){if(!t.startsWith("/"))return null;let r=t.lastIndexOf("/");if(r<=0)return null;try{let s=t.slice(1,r),a=t.slice(r+1);return new RegExp(s,a)}catch{return null}}import*as hB from"prettier/plugins/acorn";import*as Gh from"prettier/plugins/babel";import*as fB from"prettier/plugins/flow";import*as mB from"prettier/plugins/glimmer";import*as Jh from"prettier/plugins/html";import*as yB from"prettier/plugins/meriyah";import*as $b from"prettier/plugins/postcss";import*as bB from"prettier/plugins/typescript";async function Rl(t){let r=await gD(t);return r??(r={parsers:{},printers:{}}),r}async function gB(){let t=await $oe(),r=await Voe(),s=await qoe(),a={...t.parsers,...r.parsers},u={...t.printers,...r.printers};function e(l,n,c){let p=X0(n);for(let i of l.plugins){if(i instanceof URL){if(i.protocol!=="file:"||i.hostname!=="")continue;i=i.pathname}if(typeof i=="string"){if(i===n||i===p)return c;continue}if(i.name===n||i.name===p||i.parsers&&c.parsers&&i.parsers==c.parsers)return c}return null}return{parsers:a,printers:u,originalParser(l,n){if(!n.plugins)return a[l];let c={...a[l]};for(let{name:p,mod:i}of s){let o=e(n,p,i);o&&Object.assign(c,o.parsers[l])}return c}}}async function $oe(){return{parsers:{html:Jh.parsers.html,glimmer:mB.parsers.glimmer,lwc:Jh.parsers.lwc,angular:Jh.parsers.angular,vue:Jh.parsers.vue,css:$b.parsers.css,scss:$b.parsers.scss,less:$b.parsers.less,babel:Gh.parsers.babel,"babel-flow":Gh.parsers["babel-flow"],flow:fB.parsers.flow,typescript:bB.parsers.typescript,"babel-ts":Gh.parsers["babel-ts"],acorn:hB.parsers.acorn,meriyah:yB.parsers.meriyah,__js_expression:Gh.parsers.__js_expression},printers:{}}}async function Voe(){let t=await Rl("prettier-plugin-astro"),r=await Rl("@shopify/prettier-plugin-liquid"),s=await Rl("prettier-plugin-marko"),a=await Rl("@zackad/prettier-plugin-twig"),u=await Rl("@prettier/plugin-hermes"),e=await Rl("@prettier/plugin-oxc"),l=await Rl("@prettier/plugin-pug"),n=await Rl("prettier-plugin-svelte");return{parsers:{...t.parsers,...r.parsers,...s.parsers,...a.parsers,...u.parsers,...e.parsers,...l.parsers,...n.parsers},printers:{...u.printers,...e.printers,...n.printers}}}async function qoe(){let t=["prettier-plugin-css-order","prettier-plugin-organize-attributes","prettier-plugin-multiline-arrays","@ianvs/prettier-plugin-sort-imports","@trivago/prettier-plugin-sort-imports","prettier-plugin-organize-imports","prettier-plugin-sort-imports","prettier-plugin-jsdoc"],r=[];for(let s of t)r.push({name:s,mod:await Rl(s)});return r}function Woe(t,{env:r}){return r.context.getClassOrder(t).sort(([a,u],[e,l])=>a==="..."||a==="\u2026"?1:e==="..."||e==="\u2026"?-1:u===l?0:u===null?-1:l===null?1:fb(u-l))}function Ws(t,{env:r,ignoreFirst:s=!1,ignoreLast:a=!1,removeDuplicates:u=!0,collapseWhitespace:e={start:!0,end:!0}}){if(typeof t!="string"||t===""||t.includes("{{"))return t;if(r.options.tailwindPreserveWhitespace&&(e=!1),/^[\t\r\f\n ]+$/.test(t)&&e)return" ";let l="",n=t.split(/([\t\r\f\n ]+)/),c=n.filter((f,b)=>b%2===0),p=n.filter((f,b)=>b%2!==0);c[c.length-1]===""&&c.pop(),e&&(p=p.map(()=>" "));let i="";s&&(i=`${c.shift()??""}${p.shift()??""}`);let o="";a&&(o=`${p.pop()??""}${c.pop()??""}`);let{classList:h,removedIndices:d}=Pw(c,{env:r,removeDuplicates:u});p=p.filter((f,b)=>!d.has(b+1));for(let f=0;fe.has(l)?(u.add(c),!1):(n!==null&&e.add(l),!0))}return{classList:a.map(([e])=>e),removedIndices:u}}var Ga=await gB(),Koe=/\\(['"\\nrtbfv0-7xuU])/g;function is(t,r,s={}){let a={staticAttrs:new Set(s.staticAttrs??[]),dynamicAttrs:new Set(s.dynamicAttrs??[]),functions:new Set(s.functions??[]),staticAttrsRegex:[],dynamicAttrsRegex:[],functionsRegex:[]};return{...Ga.parsers[t],preprocess(u,e){let l=Ga.originalParser(t,e);return l.preprocess?l.preprocess(u,e):u},async parse(u,e){let l=await uB(e),c=await Ga.originalParser(t,e).parse(u,e,e),p=dB(e,t,a),i=[];return r(c,{env:{context:l,matcher:p,parsers:{},options:e},changes:i}),t==="svelte"&&(c.changes=i),c}}}function zoe(t,r){let s=[EB.parsers.__ng_directive,{parse:r.parsers.__js_expression}],a=[];for(let u of s)try{return u.parse(t,r.parsers,r.options)}catch(e){a.push(e)}console.warn("prettier-plugin-tailwindcss: Unable to parse angular directive"),a.forEach(u=>console.warn(u))}function Hoe(t,r){let s=zoe(t.value,r);if(!s)return;let a=[];Ol(s,{StringLiteral(u,e){if(!u.value)return;let l=Wb(e);a.push({start:u.start+1,end:u.end-1,before:u.value,after:Ws(u.value,{env:r,collapseWhitespace:l})})},TemplateLiteral(u,e){if(!u.quasis.length)return;let l=Wb(e);for(let n=0;n0&&!/^\s/.test(c.value.raw),ignoreLast:n=u.expressions.length}})})}}}),t.value=hb(t.value,a)}function wB(t,r){let{matcher:s}=r,a=Kb.parse(`let __prettier_temp__ = ${t.value}`,{parser:SB.parsers["babel-ts"]});function*u(l){for(yield l;l.parentPath;)l=l.parentPath,yield l}let e=!1;vB.visit(a,{visitLiteral(l){let c=Array.from(u(l)).find(p=>p.parent&&p.parent.value&&p.parent.value.type==="BinaryExpression"&&p.parent.value.operator==="+");if(qb(l.node)&&Vb(l.node,{env:r,collapseWhitespace:{start:(c==null?void 0:c.name)!=="right",end:(c==null?void 0:c.name)!=="left"}})){e=!0;let i=l.node.extra.raw[0],o=(0,xB.default)(l.node.value,{quotes:i==="'"?"single":"double"});l.node.value=new String(i+o+i)}this.traverse(l)},visitTemplateLiteral(l){let c=Array.from(u(l)).find(i=>i.parent&&i.parent.value&&i.parent.value.type==="BinaryExpression"&&i.parent.value.operator==="+");Op(l.node,{env:r,collapseWhitespace:{start:(c==null?void 0:c.name)!=="right",end:(c==null?void 0:c.name)!=="left"}})&&(e=!0),this.traverse(l)},visitTaggedTemplateExpression(l){let c=Array.from(u(l)).find(p=>p.parent&&p.parent.value&&p.parent.value.type==="BinaryExpression"&&p.parent.value.operator==="+");kw(l.node,s)&&Op(l.node.quasi,{env:r,collapseWhitespace:{start:(c==null?void 0:c.name)!=="right",end:(c==null?void 0:c.name)!=="left"}})&&(e=!0),this.traverse(l)}}),e&&(t.value=Kb.print(a.program.body[0].declarations[0].init).code)}function Xh(t,{env:r,changes:s}){let{matcher:a}=r,{parser:u}=r.options;for(let e of t.attrs??[])if(a.hasStaticAttr(e.name))e.value=Ws(e.value,{env:r});else if(a.hasDynamicAttr(e.name)){if(!/[`'"]/.test(e.value))continue;u==="angular"?Hoe(e,r):wB(e,r)}for(let e of t.children??[])Xh(e,{env:r,changes:s})}function Goe(t,{env:r}){let{matcher:s}=r;Ol(t,{AttrNode(a,u,e){s.hasStaticAttr(a.name)&&a.value&&(e.sortTextNodes=!0)},TextNode(a,u,e){if(!e.sortTextNodes)return;let l=u.find(c=>c.parent&&c.parent.type==="ConcatStatement"),n={prev:l==null?void 0:l.parent.parts[l.index-1],next:l==null?void 0:l.parent.parts[l.index+1]};a.chars=Ws(a.chars,{env:r,ignoreFirst:n.prev&&!/^\s/.test(a.chars),ignoreLast:n.next&&!/\s$/.test(a.chars),collapseWhitespace:{start:!n.prev,end:!n.next}})},StringLiteral(a,u,e){if(!e.sortTextNodes)return;let l=u.find(n=>n.parent&&n.parent.type==="SubExpression"&&n.parent.path.original==="concat");a.value=Ws(a.value,{env:r,ignoreLast:!!l&&!/[^\S\r\n]$/.test(a.value),collapseWhitespace:{start:!1,end:!l}})}})}function Joe(t,{env:r}){let{matcher:s}=r;function a(c){return Array.isArray(c.name)?c.name.every(p=>p.type==="TextNode"&&s.hasStaticAttr(p.value)):s.hasStaticAttr(c.name)}function u(c){let p=c[0],i=c[c.length-1];return p===i&&(p==='"'||p==="'"||p==="`")}let e=[],l=[];function n(c){for(let p=0;p0&&!/^\s/.test(i.value),ignoreLast:p0&&!/^\s/.test(l.value.raw),ignoreLast:e=t.expressions.length}}),l.value.cooked=n?l.value.raw:Ws(l.value.cooked,{env:r,ignoreFirst:e>0&&!/^\s/.test(l.value.cooked),ignoreLast:e=t.expressions.length}}),(l.value.raw!==c||l.value.cooked!==p)&&(u=!0)}return u}function kw(t,r){return _B(t.tag,r)}function Xoe(t,r){var s;return(s=t.arguments)!=null&&s.length?_B(t.callee,r):!1}function _B(t,r){for(;t.type==="CallExpression"||t.type==="MemberExpression";)t.type==="CallExpression"?t=t.callee:t.type==="MemberExpression"&&(t=t.object);return t.type==="Identifier"?r.hasFunction(t.name):!1}function Wb(t){let r=!0,s=!0;for(let a of t)if(a.parent&&(a.parent.type==="BinaryExpression"&&a.parent.operator==="+"&&(r&&(r=a.key!=="right"),s&&(s=a.key!=="left")),a.parent.type==="TemplateLiteral")){let u=a.node.start??null,e=a.node.end??null;for(let l of a.parent.quasis){let n=l.end??null,c=l.end??null;u!==null&&c!==null&&u-c<=2&&r&&(r=/^\s/.test(l.value.raw)),e!==null&&n!==null&&e-n<=2&&s&&(s=/\s$/.test(l.value.raw))}}return{start:r,end:s}}function po(t,{env:r}){let{matcher:s}=r;function a(u){Ol(u,(e,l)=>{let n=Wb(l);qb(e)?Vb(e,{env:r,collapseWhitespace:n}):e.type==="TemplateLiteral"?Op(e,{env:r,collapseWhitespace:n}):e.type==="TaggedTemplateExpression"&&kw(e,s)&&Op(e.quasi,{env:r,collapseWhitespace:n})})}Ol(t,{JSXAttribute(u){u=u,u.value&&typeof u.name.name=="string"&&s.hasStaticAttr(u.name.name)&&(qb(u.value)?Vb(u.value,{env:r}):u.value.type==="JSXExpressionContainer"&&a(u.value))},CallExpression(u){u=u,Xoe(u,s)&&u.arguments.forEach(e=>a(e))},TaggedTemplateExpression(u,e){if(u=u,!kw(u,s))return;let l=Wb(e);Op(u.quasi,{env:r,collapseWhitespace:l})}})}function Cw(t,{env:r}){function s(a,u){if(typeof u!="string")return u;try{return Ga.parsers.css.parse(`@import ${u};`,{...r.options}).nodes[0].params}catch(e){console.warn("[prettier-plugin-tailwindcss] Unable to parse at rule"),console.warn({name:a,params:u}),console.warn(e)}return u}t.walk(a=>{if((a.name==="plugin"||a.name==="config"||a.name==="source")&&(a.params=s(a.name,a.params)),a.type==="css-atrule"&&a.name==="apply"){let u=/\s+(?:!important|#{(['"]*)!important\1})\s*$/.test(a.params),e=a.params,l="",n="";e.startsWith('~"')&&e.endsWith('"')?(l='~"',n='"',e=e.slice(2,-1),u=!1):e.startsWith("~'")&&e.endsWith("'")&&(l="~'",n="'",e=e.slice(2,-1),u=!1),e=Ws(e,{env:r,ignoreLast:u,collapseWhitespace:{start:!1,end:!u}}),a.params=`${l}${e}${n}`}})}function AB(t,{env:r,changes:s}){let{matcher:a}=r;if(t.type==="element"||t.type==="custom-element"||t.type==="component")for(let u of t.attributes??[])a.hasStaticAttr(u.name)&&u.type==="attribute"&&u.kind==="quoted"?u.value=Ws(u.value,{env:r}):a.hasDynamicAttr(u.name)&&u.type==="attribute"&&u.kind==="expression"&&typeof u.value=="string"&&wB(u,r);for(let u of t.children??[])AB(u,{env:r,changes:s})}function Yoe(t,{env:r}){let{matcher:s}=r,a=[t];for(;a.length>0;){let u=a.pop();switch(u.type){case"File":a.push(u.program);break;case"Program":a.push(...u.body);break;case"MarkoTag":a.push(...u.attributes),a.push(u.body);break;case"MarkoTagBody":a.push(...u.body);break;case"MarkoAttribute":if(!s.hasStaticAttr(u.name))break;switch(u.value.type){case"ArrayExpression":let e=u.value.elements;for(let l of e)l.type==="StringLiteral"&&(l.value=Ws(l.value,{env:r}));break;case"StringLiteral":u.value.value=Ws(u.value.value,{env:r});break}break}}}function PB(t,{env:r,changes:s}){let{matcher:a}=r;for(let u of t.expressions??[])PB(u,{env:r,changes:s});Ol(t,{Attribute(u,e,l){a.hasStaticAttr(u.name.name)&&(l.sortTextNodes=!0)},CallExpression(u,e,l){for(;u.type==="CallExpression"||u.type==="MemberExpression";)u.type==="CallExpression"?u=u.callee:u.type==="MemberExpression"&&(u=u.property);u.type==="Identifier"&&!a.hasFunction(u.name)||(l.sortTextNodes=!0)},StringLiteral(u,e,l){if(!l.sortTextNodes)return;let n=e.find(c=>c.parent&&(c.parent.type==="BinaryConcatExpression"||c.parent.type==="BinaryAddExpression"));u.value=Ws(u.value,{env:r,ignoreFirst:(n==null?void 0:n.key)==="right"&&!/^[^\S\r\n]/.test(u.value),ignoreLast:(n==null?void 0:n.key)==="left"&&!/[^\S\r\n]$/.test(u.value),collapseWhitespace:{start:(n==null?void 0:n.key)!=="right",end:(n==null?void 0:n.key)!=="left"}})}})}function Qoe(t,{env:r}){let{matcher:s}=r;for(let l of t.tokens)l.type==="attribute"&&s.hasStaticAttr(l.name)&&(l.val=[l.val.slice(0,1),Ws(l.val.slice(1,-1),{env:r}),l.val.slice(-1)].join(""));let a=-1,u=-1,e=[];for(let l=0;li.val),{classList:p}=Pw(c,{env:r,removeDuplicates:!1});for(let i=l;i<=n;i++)t.tokens[i].val=p[i-l]}}function Yh(t,{env:r,changes:s}){var u;let{matcher:a}=r;for(let e of t.attributes??[])if(!(!a.hasStaticAttr(e.name)||e.type!=="Attribute"))for(let l=0;l0&&!/^\s/.test(n.raw),ignoreLast:l0&&!/^\s/.test(n.data),ignoreLast:lo.value.raw);if(Op(c,{env:r,removeDuplicates:!1,collapseWhitespace:!1}))for(let[o,h]of c.quasis.entries())s.push({before:p[o],after:h.value.raw,start:h.loc.start,end:h.loc.end})}})}for(let e of t.children??[])Yh(e,{env:r,changes:s});if(t.type==="IfBlock")for(let e of((u=t.else)==null?void 0:u.children)??[])Yh(e,{env:r,changes:s});if(t.type==="AwaitBlock"){let e=[t.pending,t.then,t.catch];for(let l of e)Yh(l,{env:r,changes:s})}t.html&&Yh(t.html,{env:r,changes:s})}var _ye=(function(){let t={};if(Ga.printers["svelte-ast"]){let s=function(e,l){if(l.__mutatedOriginalText)return;l.__mutatedOriginalText=!0;let n=e.stack[0].changes;if(n!=null&&n.length){let c=(0,TB.default)(l.originalText);n=n.map(p=>({...p,start:c.toIndex(p.start.line,p.start.column+1),end:c.toIndex(p.end.line,p.end.column+1)})),l.originalText=hb(l.originalText,n)}};var r=s;let a=Ga.printers["svelte-ast"],u={...a};u.print=new Proxy(a.print,{apply(e,l,n){let[c,p]=n;return s(c,p),Reflect.apply(e,l,n)}}),a.embed&&(u.embed=new Proxy(a.embed,{apply(e,l,n){let[c,p]=n;return s(c,p),Reflect.apply(e,l,n)}})),t["svelte-ast"]=u}return t})(),Aye={html:is("html",Xh,{staticAttrs:["class"]}),glimmer:is("glimmer",Goe,{staticAttrs:["class"]}),lwc:is("lwc",Xh,{staticAttrs:["class"]}),angular:is("angular",Xh,{staticAttrs:["class"],dynamicAttrs:["[ngClass]"]}),vue:is("vue",Xh,{staticAttrs:["class"],dynamicAttrs:[":class","v-bind:class"]}),css:is("css",Cw),scss:is("scss",Cw),less:is("less",Cw),babel:is("babel",po,{staticAttrs:["class","className"]}),"babel-flow":is("babel-flow",po,{staticAttrs:["class","className"]}),flow:is("flow",po,{staticAttrs:["class","className"]}),hermes:is("hermes",po,{staticAttrs:["class","className"]}),typescript:is("typescript",po,{staticAttrs:["class","className"]}),"babel-ts":is("babel-ts",po,{staticAttrs:["class","className"]}),oxc:is("oxc",po,{staticAttrs:["class","className"]}),"oxc-ts":is("oxc-ts",po,{staticAttrs:["class","className"]}),acorn:is("acorn",po,{staticAttrs:["class","className"]}),meriyah:is("meriyah",po,{staticAttrs:["class","className"]}),__js_expression:is("__js_expression",po,{staticAttrs:["class","className"]}),...Ga.parsers.svelte?{svelte:is("svelte",Yh,{staticAttrs:["class"]})}:{},...Ga.parsers.astro?{astro:is("astro",AB,{staticAttrs:["class","className"],dynamicAttrs:["class:list","className"]})}:{},...Ga.parsers.astroExpressionParser?{astroExpressionParser:is("astroExpressionParser",po,{staticAttrs:["class"],dynamicAttrs:["class:list"]})}:{},...Ga.parsers.marko?{marko:is("marko",Yoe,{staticAttrs:["class"]})}:{},...Ga.parsers.twig?{twig:is("twig",PB,{staticAttrs:["class"]})}:{},...Ga.parsers.pug?{pug:is("pug",Qoe,{staticAttrs:["class"]})}:{},...Ga.parsers["liquid-html"]?{"liquid-html":is("liquid-html",Joe,{staticAttrs:["class"]})}:{}};export{Uoe as options,Aye as parsers,_ye as printers}; -+`;var Bb={tailwindcss:Mb,"tailwindcss/index":Mb,"tailwindcss/index.css":Mb,"tailwindcss/preflight":Tw,"tailwindcss/preflight.css":Tw,"tailwindcss/theme":Ew,"tailwindcss/theme.css":Ew,"tailwindcss/utilities":Sw,"tailwindcss/utilities.css":Sw};async function oB(t,r){let s=!1;(!t||!t.__unstable__loadDesignSystem)&&(t=xw,s=!0);let a=RR(import.meta.url,{moduleCache:!1,fsCache:!1}),u,e;r?(u=await _w.readFile(r,"utf-8"),e=Ip.dirname(r)):(e=process.cwd(),r=Ip.join(e,"fake.css"),u=Bb["tailwindcss/theme.css"]);let l=await t.__unstable__loadDesignSystem(u,{base:e,loadModule:ww({legacy:!1,jiti:a,filepath:r,onError:(n,c,p)=>{if(console.error(`Unable to load ${p}: ${n}`,c),p==="config")return{};if(p==="plugin")return()=>{}}}),loadStylesheet:async(n,c)=>{try{let p=vD(c,n);return{base:Ip.dirname(p),content:await _w.readFile(p,"utf-8")}}catch(p){if(s&&n in Bb)return{base:c,content:Bb[n]};throw p}},loadPlugin:ww({legacy:!0,jiti:a,filepath:r,onError(n,c){return console.error(`Unable to load plugin: ${n}`,c),()=>{}}}),loadConfig:ww({legacy:!0,jiti:a,filepath:r,onError(n,c){return console.error(`Unable to load config: ${n}`,c),{}}})});return{getClassOrder:n=>l.getClassOrder(n)}}function ww({legacy:t,jiti:r,filepath:s,onError:a}){let u=`${+Date.now()}`;async function e(l,n,c){try{let p=Vc(n,l),i=Doe(p);return i.searchParams.append("t",u),await r.import(i.href,{default:!0})}catch(p){return a(l,p,c)}}if(t){let l=Ip.dirname(s);return n=>e(n,l,"module")}return async(l,n,c)=>({base:n,module:await e(l,n,c)})}var Aw=Fc(1e4);async function uB(t){let r=process.cwd(),s=t.filepath?Ll.dirname(t.filepath):r,[a,u]=await Foe(t.filepath),[e,l]=await Loe(t,s),n=Boe(t,a,u),c=Roe(t,a);if(!n&&!(e!=null&&e.__unstable__loadDesignSystem)&&(c=c??Moe(s)),c){if(!n)return Aw.remember(`${l}:${c}`,()=>qS(l,c));Wl("explicit-stylesheet-and-config-together",u??"","You have specified a Tailwind CSS stylesheet and a Tailwind CSS config at the same time. Use tailwindStylesheet unless you are using v3. Preferring the stylesheet.")}if(e&&!e.__unstable__loadDesignSystem){if(!n)return Aw.remember(`${l}:${c}`,()=>qS(l,c));e=null,Wl("stylesheet-unsupported",u??"","You have specified a Tailwind CSS stylesheet but your installed version of Tailwind CSS does not support this feature.")}return e&&e.__unstable__loadDesignSystem&&l&&(n??(n=`${l}/theme.css`)),Aw.remember(`${l}:${n}`,()=>oB(e,n))}var Noe=Fc(1e4);async function Foe(t){let r=await Noe.remember(t,async()=>{try{return await Ooe.resolveConfigFile(t)}catch(s){return Wl("prettier-config-not-found","Failed to resolve Prettier Config"),Wl("prettier-config-not-found-err",s),null}});return r?[Ll.dirname(r),r]:[process.cwd(),null]}var joe=Fc(1e4);async function Loe(t,r){let s=t.tailwindPackageName??"tailwindcss";return await joe.remember(`${s}:${r}`,async()=>{let a=null,u=null;try{let e=Vc(r,s);u=await import(Ioe(e).toString());let l=Vc(r,`${s}/package.json`);a=Ll.dirname(l)}catch{}return[u,a]})}function Roe(t,r){return!t.tailwindConfig||t.tailwindConfig.endsWith(".css")?null:Ll.resolve(r,t.tailwindConfig)}var lB=new Map;function Moe(t){let r=lB.get(t);if(r===void 0){try{r=mP(t,(a,u)=>{if(u.includes("tailwind.config.js"))return"tailwind.config.js";if(u.includes("tailwind.config.cjs"))return"tailwind.config.cjs";if(u.includes("tailwind.config.mjs"))return"tailwind.config.mjs";if(u.includes("tailwind.config.ts"))return"tailwind.config.ts"})??null}catch{}r??(r=null),lB.set(t,r)}return r}function Boe(t,r,s){return t.tailwindStylesheet?(t.tailwindStylesheet.endsWith(".js")||t.tailwindStylesheet.endsWith(".mjs")||t.tailwindStylesheet.endsWith(".cjs")||t.tailwindStylesheet.endsWith(".ts")||t.tailwindStylesheet.endsWith(".mts")||t.tailwindStylesheet.endsWith(".cts")?Wl("stylesheet-is-js-file",s??"","Your `tailwindStylesheet` option points to a JS/TS config file. You must point to your project's `.css` file for v4 projects."):t.tailwindStylesheet.endsWith(".sass")||t.tailwindStylesheet.endsWith(".scss")||t.tailwindStylesheet.endsWith(".less")||t.tailwindStylesheet.endsWith(".styl")?Wl("stylesheet-is-preprocessor-file",s??"","Your `tailwindStylesheet` option points to a preprocessor file. This is unsupported and you may get unexpected results."):t.tailwindStylesheet.endsWith(".css")||Wl("stylesheet-is-not-css-file",s??"","Your `tailwindStylesheet` option does not point to a CSS file. This is unsupported and you may get unexpected results."),Ll.resolve(r,t.tailwindStylesheet)):t.tailwindEntryPoint?(o0("entrypoint-is-deprecated",s??"","Deprecated: Use the `tailwindStylesheet` option for v4 projects instead of `tailwindEntryPoint`."),Ll.resolve(r,t.tailwindEntryPoint)):t.tailwindConfig&&t.tailwindConfig.endsWith(".css")?(o0("config-as-css-is-deprecated",s??"","Deprecated: Use the `tailwindStylesheet` option for v4 projects instead of `tailwindConfig`."),Ll.resolve(r,t.tailwindConfig)):null}var Uoe={tailwindConfig:{type:"string",category:"Tailwind CSS",description:"Path to Tailwind configuration file"},tailwindEntryPoint:{type:"string",category:"Tailwind CSS",description:"Path to the CSS entrypoint in your Tailwind project (v4+)"},tailwindStylesheet:{type:"string",category:"Tailwind CSS",description:"Path to the CSS stylesheet in your Tailwind project (v4+)"},tailwindAttributes:{type:"string",array:!0,default:[{value:[]}],category:"Tailwind CSS",description:"List of attributes/props that contain sortable Tailwind classes"},tailwindFunctions:{type:"string",array:!0,default:[{value:[]}],category:"Tailwind CSS",description:"List of functions and tagged templates that contain sortable Tailwind classes"},tailwindPreserveWhitespace:{type:"boolean",default:!1,category:"Tailwind CSS",description:"Preserve whitespace around Tailwind classes when sorting"},tailwindPreserveDuplicates:{type:"boolean",default:!1,category:"Tailwind CSS",description:"Preserve duplicate classes inside a class list when sorting"},tailwindPackageName:{type:"string",default:"tailwindcss",category:"Tailwind CSS",description:"The package name to use when loading Tailwind CSS"}};function dB(t,r,s){let a=new Set(s.staticAttrs),u=new Set(s.dynamicAttrs),e=new Set(s.functions),l=[...s.staticAttrsRegex],n=[...s.functionsRegex];for(let c of t.tailwindAttributes??[]){let p=pB(c);p?l.push(p):r==="vue"&&c.startsWith(":")?a.add(c.slice(1)):r==="vue"&&c.startsWith("v-bind:")?a.add(c.slice(7)):r==="vue"&&c.startsWith("v-")?u.add(c):r==="angular"&&c.startsWith("[")&&c.endsWith("]")?a.add(c.slice(1,-1)):a.add(c)}for(let c of a)r==="vue"?(u.add(`:${c}`),u.add(`v-bind:${c}`)):r==="angular"&&u.add(`[${c}]`);for(let c of t.tailwindFunctions??[]){let p=pB(c);p?n.push(p):e.add(c)}return{hasStaticAttr:c=>cB(c,r)?!1:Ub(c,a,l),hasDynamicAttr:c=>{if(Ub(c,u,[]))return!0;let p=cB(c,r);return p?Ub(p,a,l):!1},hasFunction:c=>Ub(c,e,n)}}function cB(t,r){return r==="vue"?t.startsWith(":")?t.slice(1):t.startsWith("v-bind:")?t.slice(7):t.startsWith("v-")?t:null:r==="angular"&&t.startsWith("[")&&t.endsWith("]")?t.slice(1,-1):null}function Ub(t,r,s){if(r.has(t))return!0;for(let a of s)if(a.test(t))return!0;return!1}function pB(t){if(!t.startsWith("/"))return null;let r=t.lastIndexOf("/");if(r<=0)return null;try{let s=t.slice(1,r),a=t.slice(r+1);return new RegExp(s,a)}catch{return null}}import*as hB from"prettier/plugins/acorn";import*as Gh from"prettier/plugins/babel";import*as fB from"prettier/plugins/flow";import*as mB from"prettier/plugins/glimmer";import*as Jh from"prettier/plugins/html";import*as yB from"prettier/plugins/meriyah";import*as $b from"prettier/plugins/postcss";import*as bB from"prettier/plugins/typescript";async function Rl(t){let r=await gD(t);return r??(r={parsers:{},printers:{}}),r}async function gB(){let t=await $oe(),r=await Voe(),s=await qoe(),a={...t.parsers,...r.parsers},u={...t.printers,...r.printers};function e(l,n,c){let p=X0(n);for(let i of l.plugins){if(i instanceof URL){if(i.protocol!=="file:"||i.hostname!=="")continue;i=i.pathname}if(typeof i=="string"){if(i===n||i===p)return c;continue}if(i.name===n||i.name===p||i.parsers&&c.parsers&&i.parsers==c.parsers)return c}return null}return{parsers:a,printers:u,originalParser(l,n){if(!n.plugins)return a[l];let c={...a[l]};for(let{name:p,mod:i}of s){let o=e(n,p,i);o&&Object.assign(c,o.parsers[l])}return c}}}async function $oe(){return{parsers:{html:Jh.parsers.html,glimmer:mB.parsers.glimmer,lwc:Jh.parsers.lwc,angular:Jh.parsers.angular,vue:Jh.parsers.vue,css:$b.parsers.css,scss:$b.parsers.scss,less:$b.parsers.less,babel:Gh.parsers.babel,"babel-flow":Gh.parsers["babel-flow"],flow:fB.parsers.flow,typescript:bB.parsers.typescript,"babel-ts":Gh.parsers["babel-ts"],acorn:hB.parsers.acorn,meriyah:yB.parsers.meriyah,__js_expression:Gh.parsers.__js_expression},printers:{}}}async function Voe(){let t=await Rl("prettier-plugin-astro"),r=await Rl("@shopify/prettier-plugin-liquid"),s=await Rl("prettier-plugin-marko"),a=await Rl("@zackad/prettier-plugin-twig"),u=await Rl("@prettier/plugin-hermes"),e=await Rl("@prettier/plugin-oxc"),l=await Rl("@prettier/plugin-pug"),n=await Rl("prettier-plugin-svelte");return{parsers:{...t.parsers,...r.parsers,...s.parsers,...a.parsers,...u.parsers,...e.parsers,...l.parsers,...n.parsers},printers:{...u.printers,...e.printers,...n.printers}}}async function qoe(){let t=["prettier-plugin-css-order","prettier-plugin-organize-attributes","prettier-plugin-multiline-arrays","@ianvs/prettier-plugin-sort-imports","@trivago/prettier-plugin-sort-imports","prettier-plugin-organize-imports","prettier-plugin-sort-imports","prettier-plugin-jsdoc"],r=[];for(let s of t)r.push({name:s,mod:await Rl(s)});return r}function Woe(t,{env:r}){return r.context.getClassOrder(t).sort(([a,u],[e,l])=>a==="..."||a==="\u2026"?1:e==="..."||e==="\u2026"?-1:u===l?0:u===null?-1:l===null?1:fb(u-l))}function Ws(t,{env:r,ignoreFirst:s=!1,ignoreLast:a=!1,removeDuplicates:u=!0,collapseWhitespace:e={start:!0,end:!0}}){if(typeof t!="string"||t===""||t.includes("{{"))return t;if(r.options.tailwindPreserveWhitespace&&(e=!1),/^[\t\r\f\n ]+$/.test(t)&&e)return" ";let l="",n=t.split(/([\t\r\f\n ]+)/),c=n.filter((f,b)=>b%2===0),p=n.filter((f,b)=>b%2!==0);c[c.length-1]===""&&c.pop(),e&&(p=p.map(()=>" "));let i="";s&&(i=`${c.shift()??""}${p.shift()??""}`);let o="";a&&(o=`${p.pop()??""}${c.pop()??""}`);let{classList:h,removedIndices:d}=Pw(c,{env:r,removeDuplicates:u});p=p.filter((f,b)=>!d.has(b+1));for(let f=0;fe.has(l)?(u.add(c),!1):(n!==null&&e.add(l),!0))}return{classList:a.map(([e])=>e),removedIndices:u}}var Ga=await gB(),Koe=/\\(['"\\nrtbfv0-7xuU])/g;function is(t,r,s={}){let a={staticAttrs:new Set(s.staticAttrs??[]),dynamicAttrs:new Set(s.dynamicAttrs??[]),functions:new Set(s.functions??[]),staticAttrsRegex:[],dynamicAttrsRegex:[],functionsRegex:[]};return{...Ga.parsers[t],preprocess(u,e){let l=Ga.originalParser(t,e);return l.preprocess?l.preprocess(u,e):u},async parse(u,e){let l=await uB(e),c=await Ga.originalParser(t,e).parse(u,e,e),p=dB(e,t,a),i=[];return r(c,{env:{context:l,matcher:p,parsers:{},options:e},changes:i}),t==="svelte"&&(c.changes=i),c}}}function zoe(t,r){let s=[EB.parsers.__ng_directive,{parse:r.parsers.__js_expression}],a=[];for(let u of s)try{return u.parse(t,r.parsers,r.options)}catch(e){a.push(e)}console.warn("prettier-plugin-tailwindcss: Unable to parse angular directive"),a.forEach(u=>console.warn(u))}function Hoe(t,r){let s=zoe(t.value,r);if(!s)return;let a=[];Ol(s,{StringLiteral(u,e){if(!u.value)return;let l=Wb(e);a.push({start:u.start+1,end:u.end-1,before:u.value,after:Ws(u.value,{env:r,collapseWhitespace:l})})},TemplateLiteral(u,e){if(!u.quasis.length)return;let l=Wb(e);for(let n=0;n0&&!/^\s/.test(c.value.raw),ignoreLast:n=u.expressions.length}})})}}}),t.value=hb(t.value,a)}function wB(t,r){let{matcher:s}=r,a=Kb.parse(`let __prettier_temp__ = ${t.value}`,{parser:SB.parsers["babel-ts"]});function*u(l){for(yield l;l.parentPath;)l=l.parentPath,yield l}let e=!1;vB.visit(a,{visitLiteral(l){let c=Array.from(u(l)).find(p=>p.parent&&p.parent.value&&p.parent.value.type==="BinaryExpression"&&p.parent.value.operator==="+");if(qb(l.node)&&Vb(l.node,{env:r,collapseWhitespace:{start:(c==null?void 0:c.name)!=="right",end:(c==null?void 0:c.name)!=="left"}})){e=!0;let i=l.node.extra.raw[0],o=(0,xB.default)(l.node.value,{quotes:i==="'"?"single":"double"});l.node.value=new String(i+o+i)}this.traverse(l)},visitTemplateLiteral(l){let c=Array.from(u(l)).find(i=>i.parent&&i.parent.value&&i.parent.value.type==="BinaryExpression"&&i.parent.value.operator==="+");Op(l.node,{env:r,collapseWhitespace:{start:(c==null?void 0:c.name)!=="right",end:(c==null?void 0:c.name)!=="left"}})&&(e=!0),this.traverse(l)},visitTaggedTemplateExpression(l){let c=Array.from(u(l)).find(p=>p.parent&&p.parent.value&&p.parent.value.type==="BinaryExpression"&&p.parent.value.operator==="+");kw(l.node,s)&&Op(l.node.quasi,{env:r,collapseWhitespace:{start:(c==null?void 0:c.name)!=="right",end:(c==null?void 0:c.name)!=="left"}})&&(e=!0),this.traverse(l)}}),e&&(t.value=Kb.print(a.program.body[0].declarations[0].init).code)}function Xh(t,{env:r,changes:s}){let{matcher:a}=r,{parser:u}=r.options;for(let e of t.attrs??[])if(a.hasStaticAttr(e.name))e.value=Ws(e.value,{env:r});else if(a.hasDynamicAttr(e.name)){if(!/[`'"]/.test(e.value))continue;u==="angular"?Hoe(e,r):wB(e,r)}for(let e of t.children??[])Xh(e,{env:r,changes:s})}function Goe(t,{env:r}){let{matcher:s}=r;Ol(t,{AttrNode(a,u,e){s.hasStaticAttr(a.name)&&a.value&&(e.sortTextNodes=!0)},TextNode(a,u,e){if(!e.sortTextNodes)return;let l=u.find(c=>c.parent&&c.parent.type==="ConcatStatement"),n={prev:l==null?void 0:l.parent.parts[l.index-1],next:l==null?void 0:l.parent.parts[l.index+1]};a.chars=Ws(a.chars,{env:r,ignoreFirst:n.prev&&!/^\s/.test(a.chars),ignoreLast:n.next&&!/\s$/.test(a.chars),collapseWhitespace:{start:!n.prev,end:!n.next}})},StringLiteral(a,u,e){if(!e.sortTextNodes)return;let l=u.find(n=>n.parent&&n.parent.type==="SubExpression"&&n.parent.path.original==="concat");a.value=Ws(a.value,{env:r,ignoreLast:!!l&&!/[^\S\r\n]$/.test(a.value),collapseWhitespace:{start:!1,end:!l}})}})}function Joe(t,{env:r}){let{matcher:s}=r;function a(c){return Array.isArray(c.name)?c.name.every(p=>p.type==="TextNode"&&s.hasStaticAttr(p.value)):s.hasStaticAttr(c.name)}function u(c){let p=c[0],i=c[c.length-1];return p===i&&(p==='"'||p==="'"||p==="`")}let e=[],l=[];function n(c){for(let p=0;p0&&!/^\s/.test(i.value),ignoreLast:p0&&!/^\s/.test(l.value.raw),ignoreLast:e=t.expressions.length}}),l.value.cooked=n?l.value.raw:Ws(l.value.cooked,{env:r,ignoreFirst:e>0&&!/^\s/.test(l.value.cooked),ignoreLast:e=t.expressions.length}}),(l.value.raw!==c||l.value.cooked!==p)&&(u=!0)}return u}function kw(t,r){return _B(t.tag,r)}function Xoe(t,r){var s;return(s=t.arguments)!=null&&s.length?_B(t.callee,r):!1}function _B(t,r){for(;t.type==="CallExpression"||t.type==="MemberExpression";)t.type==="CallExpression"?t=t.callee:t.type==="MemberExpression"&&(t=t.object);return t.type==="Identifier"?r.hasFunction(t.name):!1}function Wb(t){let r=!0,s=!0;for(let a of t)if(a.parent&&(a.parent.type==="BinaryExpression"&&a.parent.operator==="+"&&(r&&(r=a.key!=="right"),s&&(s=a.key!=="left")),a.parent.type==="TemplateLiteral")){let u=a.node.start??null,e=a.node.end??null;for(let l of a.parent.quasis){let n=l.end??null,c=l.end??null;u!==null&&c!==null&&u-c<=2&&r&&(r=/^\s/.test(l.value.raw)),e!==null&&n!==null&&e-n<=2&&s&&(s=/\s$/.test(l.value.raw))}}return{start:r,end:s}}function po(t,{env:r}){let{matcher:s}=r;function a(u){Ol(u,(e,l)=>{let n=Wb(l);qb(e)?Vb(e,{env:r,collapseWhitespace:n}):e.type==="TemplateLiteral"?Op(e,{env:r,collapseWhitespace:n}):e.type==="TaggedTemplateExpression"&&kw(e,s)&&Op(e.quasi,{env:r,collapseWhitespace:n})})}Ol(t,{JSXAttribute(u){u=u,u.value&&typeof u.name.name=="string"&&s.hasStaticAttr(u.name.name)&&(qb(u.value)?Vb(u.value,{env:r}):u.value.type==="JSXExpressionContainer"&&a(u.value))},CallExpression(u){u=u,Xoe(u,s)&&u.arguments.forEach(e=>a(e))},TaggedTemplateExpression(u,e){if(u=u,!kw(u,s))return;let l=Wb(e);Op(u.quasi,{env:r,collapseWhitespace:l})}})}function Cw(t,{env:r}){function s(a,u){if(typeof u!="string")return u;try{return Ga.parsers.css.parse(`@import ${u};`,{...r.options}).nodes[0].params}catch(e){console.warn("[prettier-plugin-tailwindcss] Unable to parse at rule"),console.warn({name:a,params:u}),console.warn(e)}return u}t.walk(a=>{if((a.name==="plugin"||a.name==="config"||a.name==="source")&&(a.params=s(a.name,a.params)),a.type==="css-atrule"&&a.name==="apply"){let u=/\s+(?:!important|#{(['"]*)!important\1})\s*$/.test(a.params),e=a.params,l="",n="";e.startsWith('~"')&&e.endsWith('"')?(l='~"',n='"',e=e.slice(2,-1),u=!1):e.startsWith("~'")&&e.endsWith("'")&&(l="~'",n="'",e=e.slice(2,-1),u=!1),e=Ws(e,{env:r,ignoreLast:u,collapseWhitespace:{start:!1,end:!u}}),a.params=`${l}${e}${n}`}})}function AB(t,{env:r,changes:s}){let{matcher:a}=r;if(t.type==="element"||t.type==="custom-element"||t.type==="component")for(let u of t.attributes??[])a.hasStaticAttr(u.name)&&u.type==="attribute"&&u.kind==="quoted"?u.value=Ws(u.value,{env:r}):a.hasDynamicAttr(u.name)&&u.type==="attribute"&&u.kind==="expression"&&typeof u.value=="string"&&wB(u,r);for(let u of t.children??[])AB(u,{env:r,changes:s})}function Yoe(t,{env:r}){let{matcher:s}=r,a=[t];for(;a.length>0;){let u=a.pop();switch(u.type){case"File":a.push(u.program);break;case"Program":a.push(...u.body);break;case"MarkoTag":a.push(...u.attributes),a.push(u.body);break;case"MarkoTagBody":a.push(...u.body);break;case"MarkoAttribute":if(!s.hasStaticAttr(u.name))break;switch(u.value.type){case"ArrayExpression":let e=u.value.elements;for(let l of e)l.type==="StringLiteral"&&(l.value=Ws(l.value,{env:r}));break;case"StringLiteral":u.value.value=Ws(u.value.value,{env:r});break}break}}}function PB(t,{env:r,changes:s}){let{matcher:a}=r;for(let u of t.expressions??[])PB(u,{env:r,changes:s});Ol(t,{Attribute(u,e,l){a.hasStaticAttr(u.name.name)&&(l.sortTextNodes=!0)},CallExpression(u,e,l){for(;u.type==="CallExpression"||u.type==="MemberExpression";)u.type==="CallExpression"?u=u.callee:u.type==="MemberExpression"&&(u=u.property);u.type==="Identifier"&&!a.hasFunction(u.name)||(l.sortTextNodes=!0)},StringLiteral(u,e,l){if(!l.sortTextNodes)return;let n=e.find(c=>c.parent&&(c.parent.type==="BinaryConcatExpression"||c.parent.type==="BinaryAddExpression"));u.value=Ws(u.value,{env:r,ignoreFirst:(n==null?void 0:n.key)==="right"&&!/^[^\S\r\n]/.test(u.value),ignoreLast:(n==null?void 0:n.key)==="left"&&!/[^\S\r\n]$/.test(u.value),collapseWhitespace:{start:(n==null?void 0:n.key)!=="right",end:(n==null?void 0:n.key)!=="left"}})}})}function Qoe(t,{env:r}){let{matcher:s}=r;for(let l of t.tokens)l.type==="attribute"&&s.hasStaticAttr(l.name)&&(l.val=[l.val.slice(0,1),Ws(l.val.slice(1,-1),{env:r}),l.val.slice(-1)].join(""));let a=-1,u=-1,e=[];for(let l=0;li.val),{classList:p}=Pw(c,{env:r,removeDuplicates:!1});for(let i=l;i<=n;i++)t.tokens[i].val=p[i-l]}}function Yh(t,{env:r,changes:s}){var u;let{matcher:a}=r;for(let e of t.attributes??[])if(!(!a.hasStaticAttr(e.name)||e.type!=="Attribute"))for(let l=0;l0&&!/^\s/.test(n.raw),ignoreLast:l0&&!/^\s/.test(n.data),ignoreLast:lo.value.raw);if(Op(c,{env:r,removeDuplicates:!1,collapseWhitespace:!1}))for(let[o,h]of c.quasis.entries())s.push({before:p[o],after:h.value.raw,start:h.loc.start,end:h.loc.end})}})}for(let e of t.children??[])Yh(e,{env:r,changes:s});if(t.type==="IfBlock")for(let e of((u=t.else)==null?void 0:u.children)??[])Yh(e,{env:r,changes:s});if(t.type==="AwaitBlock"){let e=[t.pending,t.then,t.catch];for(let l of e)Yh(l,{env:r,changes:s})}t.html&&Yh(t.html,{env:r,changes:s})}var _ye=(function(){let t={};if(Ga.printers["svelte-ast"]){let s=function(e,l){if(l.__mutatedOriginalText)return;l.__mutatedOriginalText=!0;let n=e.stack[0].changes;if(n!=null&&n.length){let c=(0,TB.default)(l.originalText);n=n.map(p=>({...p,start:c.toIndex(p.start.line,p.start.column+1),end:c.toIndex(p.end.line,p.end.column+1)})),l.originalText=hb(l.originalText,n)}};var r=s;let a=Ga.printers["svelte-ast"],u={...a};u.print=new Proxy(a.print,{apply(e,l,n){let[c,p]=n;return s(c,p),Reflect.apply(e,l,n)}}),a.embed&&(u.embed=new Proxy(a.embed,{apply(e,l,n){let[c,p]=n;return s(c,p),Reflect.apply(e,l,n)}})),t["svelte-ast"]=u}return t})(),Aye={html:is("html",Xh,{staticAttrs:["class"]}),glimmer:is("glimmer",Goe,{staticAttrs:["class"]}),lwc:is("lwc",Xh,{staticAttrs:["class"]}),angular:is("angular",Xh,{staticAttrs:["class"],dynamicAttrs:["[ngClass]"]}),vue:is("vue",Xh,{staticAttrs:["class"],dynamicAttrs:[":class","v-bind:class"]}),css:is("css",Cw),scss:is("scss",Cw),less:is("less",Cw),babel:is("babel",po,{staticAttrs:["class","className"]}),"babel-flow":is("babel-flow",po,{staticAttrs:["class","className"]}),flow:is("flow",po,{staticAttrs:["class","className"]}),hermes:is("hermes",po,{staticAttrs:["class","className"]}),typescript:is("typescript",po,{staticAttrs:["class","className"]}),"babel-ts":is("babel-ts",po,{staticAttrs:["class","className"]}),oxc:is("oxc",po,{staticAttrs:["class","className"]}),"oxc-ts":is("oxc-ts",po,{staticAttrs:["class","className"]}),acorn:is("acorn",po,{staticAttrs:["class","className"]}),meriyah:is("meriyah",po,{staticAttrs:["class","className"]}),__js_expression:is("__js_expression",po,{staticAttrs:["class","className"]}),...Ga.parsers.svelte?{svelte:is("svelte",Yh,{staticAttrs:["class"]})}:{},...Ga.parsers.astro?{astro:is("astro",AB,{staticAttrs:["class","className"],dynamicAttrs:["class:list","className"]})}:{},...Ga.parsers.astroExpressionParser?{astroExpressionParser:is("astroExpressionParser",po,{staticAttrs:["class"],dynamicAttrs:["class:list"]})}:{},...Ga.parsers.marko?{marko:is("marko",Yoe,{staticAttrs:["class"]})}:{},...Ga.parsers.twig?{twig:is("twig",PB,{staticAttrs:["class"]})}:{},...Ga.parsers.pug?{pug:is("pug",Qoe,{staticAttrs:["class"]})}:{},...Ga.parsers["liquid-html"]?{"liquid-html":is("liquid-html",Joe,{staticAttrs:["class"]})}:{}};export{Uoe as options,Aye as parsers,_ye as printers,uB as getTailwindConfig,Ws as sortClasses}; - /*! Bundled license information: - - isobject/index.js: diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 682ddb7e5ec03..88520aeea0f86 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -40,11 +40,6 @@ catalogs: specifier: 4.0.18 version: 4.0.18 -patchedDependencies: - prettier-plugin-tailwindcss@0.7.2: - hash: 85d2396832ac55f5f0187f4ba0a7b8bf22d7d117e33f75c1290670eb9a8c55af - path: patches/prettier-plugin-tailwindcss@0.7.2.patch - importers: .: @@ -68,8 +63,8 @@ importers: specifier: 3.8.1 version: 3.8.1 prettier-plugin-tailwindcss: - specifier: 0.7.2 - version: 0.7.2(patch_hash=85d2396832ac55f5f0187f4ba0a7b8bf22d7d117e33f75c1290670eb9a8c55af)(prettier@3.8.1) + specifier: 0.0.0-insiders.2ac6e70 + version: 0.0.0-insiders.2ac6e70(prettier@3.8.1) tinypool: specifier: 2.1.0 version: 2.1.0 @@ -3753,8 +3748,8 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier-plugin-tailwindcss@0.7.2: - resolution: {integrity: sha512-LkphyK3Fw+q2HdMOoiEHWf93fNtYJwfamoKPl7UwtjFQdei/iIBoX11G6j706FzN3ymX9mPVi97qIY8328vdnA==} + prettier-plugin-tailwindcss@0.0.0-insiders.2ac6e70: + resolution: {integrity: sha512-BHWDfSnPiaCkGau1GXirxp8ROUxiQQLlHM71FWTb8OeHS7CNi5wXUpWmDTtor/C+HhgByjGPwfszikQjrx9p8g==} engines: {node: '>=20.19'} peerDependencies: '@ianvs/prettier-plugin-sort-imports': '*' @@ -7761,7 +7756,7 @@ snapshots: prelude-ls@1.2.1: {} - prettier-plugin-tailwindcss@0.7.2(patch_hash=85d2396832ac55f5f0187f4ba0a7b8bf22d7d117e33f75c1290670eb9a8c55af)(prettier@3.8.1): + prettier-plugin-tailwindcss@0.0.0-insiders.2ac6e70(prettier@3.8.1): dependencies: prettier: 3.8.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 021d6d8e5866a..382d85ea9fc24 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -26,7 +26,4 @@ onlyBuiltDependencies: - "@vscode/vsce-sign@2.0.8" - esbuild@0.25.11 -patchedDependencies: - prettier-plugin-tailwindcss@0.7.2: patches/prettier-plugin-tailwindcss@0.7.2.patch - verifyDepsBeforeRun: install