diff --git a/patches/tailwindcss.patch b/patches/tailwindcss.patch new file mode 100644 index 0000000..264464c --- /dev/null +++ b/patches/tailwindcss.patch @@ -0,0 +1,76 @@ +diff --git a/dist/plugin.d.mts b/dist/plugin.d.mts +index 5c32fa73db5d471048e566b1c676a4225805d39a..77b8cbfe7d79bce396eb77537baa657be31af32d 100644 +--- a/dist/plugin.d.mts ++++ b/dist/plugin.d.mts +@@ -1,6 +1,6 @@ +-export { P as PluginUtils } from './resolve-config-QUZ9b-Gn.mjs'; ++export type { P as PluginUtils, N as NamedUtilityValue } from './resolve-config-QUZ9b-Gn.mjs'; + import { a as PluginFn, C as Config, b as PluginWithConfig, c as PluginWithOptions } from './types-CJYAW1ql.mjs'; +-export { d as PluginAPI, P as PluginsConfig, T as ThemeConfig } from './types-CJYAW1ql.mjs'; ++export type { d as PluginAPI, P as PluginsConfig, T as ThemeConfig, MatchOptions, BareValueResolver, MatchFn } from './types-CJYAW1ql.mjs'; + import './colors.mjs'; + + declare function createPlugin(handler: PluginFn, config?: Partial): PluginWithConfig; +@@ -8,4 +8,4 @@ declare namespace createPlugin { + var withOptions: (pluginFunction: (options?: T) => PluginFn, configFunction?: (options?: T) => Partial) => PluginWithOptions; + } + +-export { Config, PluginFn as PluginCreator, createPlugin as default }; ++export { type Config, type PluginFn, createPlugin as default }; +diff --git a/dist/types-CJYAW1ql.d.mts b/dist/types-CJYAW1ql.d.mts +index 6d5ca4a855759cbd60007c69d072bdd7b8710e77..2505e2accb9e9b01de53c9dbb0b27c14abb252e1 100644 +--- a/dist/types-CJYAW1ql.d.mts ++++ b/dist/types-CJYAW1ql.d.mts +@@ -56,31 +56,26 @@ type PluginAPI = { + }): number; + }): void; + addUtilities(utilities: Record | Record[], options?: {}): void; +- matchUtilities(utilities: Record CssInJs | CssInJs[]>, options?: Partial<{ +- type: string | string[]; +- supportsNegativeValues: boolean; +- values: Record & { +- __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; +- }; +- modifiers: 'any' | Record; +- }>): void; ++ matchUtilities(utilities: Record, options?: MatchOptions): void; + addComponents(utilities: Record | Record[], options?: {}): void; +- matchComponents(utilities: Record CssInJs>, options?: Partial<{ +- type: string | string[]; +- supportsNegativeValues: boolean; +- values: Record & { +- __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; +- }; +- modifiers: 'any' | Record; +- }>): void; ++ matchComponents(utilities: Record, options?: MatchOptions): void; + theme(path: string, defaultValue?: any): any; + config(path?: string, defaultValue?: any): any; + prefix(className: string): string; + }; ++ ++type MatchFn = (value: string, extra: { modifier: string | null; }) => CssInJs | CssInJs[] ++ ++type MatchOptions = Partial<{ ++ type: string | string[]; ++ supportsNegativeValues: boolean; ++ values: Record & { ++ __BARE_VALUE__?: BareValueResolver; ++ }; ++ modifiers: 'any' | Record; ++}> ++type BareValueResolver = (value: NamedUtilityValue) => string | undefined ++ + type CssInJs = { + [key: string]: string | string[] | CssInJs | CssInJs[]; + }; +@@ -125,4 +120,4 @@ interface UserConfig { + experimental?: 'all' | Record; + } + +-export type { Config as C, Plugin as P, SourceLocation as S, ThemeConfig as T, UserConfig as U, PluginFn as a, PluginWithConfig as b, PluginWithOptions as c, PluginAPI as d }; ++export type { Config as C, Plugin as P, SourceLocation as S, ThemeConfig as T, UserConfig as U, PluginFn as a, PluginWithConfig as b, PluginWithOptions as c, PluginAPI as d, MatchOptions, BareValueResolver, MatchFn }; diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..eaa5333 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +patchedDependencies: + tailwindcss: patches/tailwindcss.patch