fjffk简å�•的咖啡店科开å�‘2方法2 环æ»�皆山也。其西å�—诸峰,林壑尤美,望之蔚然而深秀者,ç�…ç�Šä¹Ÿã€‚山行六七里,æ¸�闻水声潺潺,而泻出于两峰之间者,酿泉也 ??????????????????????????????? ??????????????/????????????????? ............/................... .........................../... ??????????????????????????????? >>>>>>>>>>>>>/>>>>>>>>>>>>>>>>> ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  Â¥2" ÿÄ     ÿÄ J    ! 1AQ"aqÂ�2‘#BR‚¡Ã�Ñ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3Â�±ð#b¡ÿÚ   ? ¼QxJQaÃ�uò¸Zö Úü8,Ã�Úú "SSn<rçù–´âE—^ªBÖ9À\†¸Â�ÔÂ�Ã�T­ÃÛ5 ëd´³Ã�#Ã�;Þ38ϔÂ� ¶H£M:wÃŽ3…³…âpÔF&‚FK¸9„â4àGEõªfÂ�ÿ ‘ñ(ßw­pŽF|È¥ù®häðÃ�Ѷ¹‘[Ã’inÙW¶ùñYËœQ{›K"išÒ[Ú8žë\F¹@-?v"ÔUâ€�,ìöžkÿ {I‡£šÃ�?e rÂ�íV ?> ......................................... ............................................................................. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>/>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> dsdfPKêW]{�Rss4tailwind-merge-laravel/src/Facades/TailwindMerge.phpnu„[µü¤app->singleton(TailwindMergeContract::class, static fn (): TailwindMerge => TailwindMerge::factory() ->withConfiguration(config('tailwind-merge', [])) ->withCache(app('cache')->store()) // @phpstan-ignore-line ->make()); $this->app->alias(TailwindMergeContract::class, 'tailwind-merge'); $this->app->alias(TailwindMergeContract::class, TailwindMerge::class); } public function boot(): void { if ($this->app->runningInConsole()) { $this->publishes([ __DIR__ . '/../config/tailwind-merge.php' => config_path('tailwind-merge.php'), ]); } $this->registerBladeDirectives(); $this->registerAttributesBagMacros(); } protected function registerBladeDirectives(): void { $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler): void { $name = config('tailwind-merge.blade_directive', 'twMerge'); if ($name === null) { return; } $bladeCompiler->directive($name, fn (?string $expression): string => ""); }); } protected function registerAttributesBagMacros(): void { ComponentAttributeBag::macro('twMerge', function (...$args): ComponentAttributeBag { /** @var ComponentAttributeBag $this */ $this->offsetSet('class', resolve(TailwindMergeContract::class)->merge($args, ($this->get('class', '')))); return $this; }); ComponentAttributeBag::macro('twMergeFor', function (string $for, ...$args): ComponentAttributeBag { /** @var ComponentAttributeBag $this */ /** @var TailwindMergeContract $instance */ $instance = resolve(TailwindMergeContract::class); $attribute = 'class' . ($for !== '' ? ':' . $for : ''); /** @var string $classes */ $classes = $this->get($attribute, ''); $this->offsetSet('class', $instance->merge($args, $classes)); return $this->only('class'); }); ComponentAttributeBag::macro('withoutTwMergeClasses', function (): ComponentAttributeBag { /** @var ComponentAttributeBag $this */ return $this->whereDoesntStartWith('class:'); }); } /** * @return array>|string[] */ public function provides(): array { return [ TailwindMerge::class, TailwindMergeContract::class, 'tailwind-merge', ]; } } PKêW]BoÖ®  &tailwind-merge-laravel/src/helpers.phpnu„[µü¤> ...$args */ function twMerge(...$args): string { return app('tailwind-merge')->merge(...$args); } } PKêW]r«×刈$tailwind-merge-laravel/composer.jsonnu„[µü¤{ "name": "gehrisandro/tailwind-merge-laravel", "description": "TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them", "keywords": [ "laravel", "php", "tailwindcss", "merge", "classes" ], "license": "MIT", "authors": [ { "name": "Sandro Gehri", "email": "sandrogehri@gmail.com" } ], "require": { "php": "^8.1.0", "guzzlehttp/guzzle": "^7.5.1", "laravel/framework": "^10.9.0|^11.0|^12.0", "gehrisandro/tailwind-merge-php": "^v1.1.0" }, "require-dev": { "laravel/pint": "^1.13.8", "orchestra/testbench": "^8.0|^9.0|^10.0", "pestphp/pest": "^v2.30.0|^3.7", "pestphp/pest-plugin-arch": "^2.6|^3.0", "pestphp/pest-plugin-type-coverage": "^2.8|^3.3", "phpstan/phpstan": "^1.10.55|^2.1", "rector/rector": "^0.19|^2.0", "symfony/var-dumper": "^6.4.2|^7.0" }, "autoload": { "psr-4": { "TailwindMerge\\Laravel\\": "src/" }, "files": [ "src/helpers.php" ] }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "minimum-stability": "dev", "prefer-stable": true, "config": { "sort-packages": true, "preferred-install": "dist", "allow-plugins": { "pestphp/pest-plugin": true } }, "extra": { "laravel": { "providers": [ "TailwindMerge\\Laravel\\TailwindMergeServiceProvider" ] } }, "scripts": { "refactor:lint": "pint -v", "refactor:rector": "rector", "test:lint": "pint --test -v", "test:refactor": "rector --dry-run", "test:types": "phpstan analyse --ansi", "test:type-coverage": "pest --type-coverage --min=100", "test:pest": "pest --colors=always", "test": [ "@test:lint", "@test:refactor", "@test:types", "@test:type-coverage", "@test:pest" ] } } PKêW]X(<@@!tailwind-merge-laravel/LICENSE.mdnu„[µü¤MIT License Copyright (c) Sandro Gehri Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PKêW]:¹sš550tailwind-merge-laravel/config/tailwind-merge.phpnu„[µü¤ env('TAILWIND_MERGE_PREFIX', null), /* |-------------------------------------------------------------------------- | Class groups |-------------------------------------------------------------------------- | | If TailwindMerge is not able to merge your changes properly you can | modify the merge process by modifying existing class groups or adding | new class groups. | | For example, if you want to add a custom font size of 'very-large': | 'classGroups' => [ | 'font-size' => [ | ['text' => ['very-large']] | ], | ], */ 'classGroups' => [], /* |-------------------------------------------------------------------------- | Blade directive |-------------------------------------------------------------------------- | | Here you may specify the name of the blade directive that will be used. | Set it to null to entirely disable the blade directive. */ 'blade_directive' => 'twMerge', ]; PKêW]T½QI``3tailwind-merge-php/src/ValueObjects/ThemeGetter.phpnu„[µü¤> $theme * @return array */ public function get(array $theme): array { return $theme[$this->key] ?? []; } } PKêW]TЛß7tailwind-merge-php/src/ValueObjects/ClassPartObject.phpnu„[µü¤ $nextPart * @param array $validators */ public function __construct( public array $nextPart = [], public array $validators = [], public ?string $classGroupId = null, ) { } } PKêW]£ó²ÒÒ<tailwind-merge-php/src/ValueObjects/ClassValidatorObject.phpnu„[µü¤ $modifiers */ public function __construct( public array $modifiers, public bool $hasImportantModifier, public bool $hasPostfixModifier, public string $modifierId, public string $classGroupId, public string $baseClassName, public string $originalClassName, ) { // } } PKêW]m Ü…ÁÁ"tailwind-merge-php/src/Factory.phpnu„[µü¤ */ private array $additionalConfiguration = []; private ?CacheInterface $cache = null; /** * Override the default configuration. * * @param array $configuration */ public function withConfiguration(array $configuration): self { $this->additionalConfiguration = $configuration; return $this; } public function withCache(CacheInterface $cache): self { $this->cache = $cache; return $this; } /** * Creates a new TailwindMerge instance. */ public function make(): TailwindMerge { Config::setAdditionalConfig($this->additionalConfiguration); $config = Config::getMergedConfig(); return new TailwindMerge($config, $this->cache); } } PKêW]¿ð°p! ! (tailwind-merge-php/src/TailwindMerge.phpnu„[µü¤make(); } /** * Creates a new factory instance */ public static function factory(): Factory { return new Factory(); } /** * @param array $configuration */ public function __construct( private readonly array $configuration, private readonly ?CacheInterface $cache = null, ) { } /** * @param string|array> ...$args */ public function merge(...$args): string { $input = Collection::make($args)->flatten()->join(' '); return $this->withCache($input, function (string $input): string { $conflictingClassGroups = []; $parser = new TailwindClassParser($this->configuration); return Str::of($input) ->trim() ->split('/\s+/') ->map(fn (string $class): ParsedClass => $parser->parse($class)) // @phpstan-ignore-line ->reverse() ->map(function (ParsedClass $class) use (&$conflictingClassGroups): ?string { $classId = $class->modifierId.$class->classGroupId; if (array_key_exists($classId, $conflictingClassGroups)) { return null; } $conflictingClassGroups[$classId] = true; foreach ($this->getConflictingClassGroupIds($class->classGroupId, $class->hasPostfixModifier) as $group) { $conflictingClassGroups[$class->modifierId.$group] = true; } return $class->originalClassName; }) ->reverse() ->filter() ->join(' '); }); } /** * @return array */ private function getConflictingClassGroupIds(string $classGroupId, bool $hasPostfixModifier): array { $conflicts = Config::getMergedConfig()['conflictingClassGroups'][$classGroupId] ?? []; if ($hasPostfixModifier && isset(Config::getMergedConfig()['conflictingClassGroupModifiers'][$classGroupId])) { return [...$conflicts, ...Config::getMergedConfig()['conflictingClassGroupModifiers'][$classGroupId]]; } return $conflicts; } private function withCache(string $input, \Closure $callback): string { if (! $this->cache instanceof CacheInterface) { return $callback($input); } $key = hash('xxh3', 'tailwind-merge-'.$input); if ($this->cache->has($key)) { $cachedValue = $this->cache->get($key); if (is_string($cachedValue)) { return $cachedValue; } } $mergedClasses = $callback($input); $this->cache->set($key, $mergedClasses); return $mergedClasses; } } PKêW]‹[¢¸íí7tailwind-merge-php/src/Validators/AnyValueValidator.phpnu„[µü¤ false); } } PKêW]ô «z¾¾=tailwind-merge-php/src/Validators/ArbitraryImageValidator.phpnu„[µü¤contains($value)) { return true; } return Str::hasMatch(self::FRACTION_REGEX, $value); } /** * @return Collection */ private static function stringLengths(): Collection { return Collection::make(['px', 'full', 'screen']); } } PKêW]gè–‹��9tailwind-merge-php/src/Validators/TshirtSizeValidator.phpnu„[µü¤tailwind-merge-php/src/Validators/ArbitraryLengthValidator.phpnu„[µü¤©©<tailwind-merge-php/src/Validators/ArbitrarySizeValidator.phpnu„[µü¤ false); } } PKêW]‡«$­­Ftailwind-merge-php/src/Validators/Concerns/ValidatesArbitraryValue.phpnu„[µü¤ $labels */ protected static function getIsArbitraryValue(string $value, string|array $labels, callable $isLengthOnly): bool { $labels = is_string($labels) ? [$labels] : $labels; preg_match('/^\[(?:([a-z-]+):)?(.+)\]$/i', $value, $result); if ($result !== []) { if ($result[1] !== '' && $result[1] !== '0') { return in_array($result[1], $labels); } return $isLengthOnly($result[2] ?? null); } return false; } } PKêW]3‚&ââ6tailwind-merge-php/src/Validators/IntegerValidator.phpnu„[µü¤substr(0, -1)->toString()); } } PKêW]tailwind-merge-php/src/Validators/ArbitraryShadowValidator.phpnu„[µü¤tailwind-merge-php/src/Validators/ArbitraryNumberValidator.phpnu„[µü¤value, $characters)); } /** * @return Collection */ public function split(string $pattern, int $limit = -1, int $flags = 0): Collection { $segments = preg_split($pattern, $this->value, $limit, $flags); return $segments === [] || $segments === false ? Collection::make() : Collection::make($segments); } public function substr(int $start, ?int $length = null, string $encoding = 'UTF-8'): self { return new self(Str::substr($this->value, $start, $length, $encoding)); } public function toString(): string { return $this->value; } } PKêW]Ë • < < &tailwind-merge-php/src/Support/Arr.phpnu„[µü¤ $array * @return array */ public static function flatten(array $array, int $depth = PHP_INT_MAX): array { $result = []; foreach ($array as $item) { $item = $item instanceof Collection ? $item->all() : $item; if (! is_array($item)) { $result[] = $item; } else { $values = $depth === 1 ? array_values($item) : static::flatten($item, $depth - 1); foreach ($values as $value) { $result[] = $value; } } } return $result; } /** * @template TKey * @template TValue * @template TMapWithKeysKey of array-key * @template TMapWithKeysValue * * @param array $array * @param callable(TValue, TKey): array $callback * @return array */ public static function mapWithKeys(array $array, callable $callback): array { $result = []; foreach ($array as $key => $value) { $assoc = $callback($value, $key); foreach ($assoc as $mapKey => $mapValue) { $result[$mapKey] = $mapValue; } } return $result; } /** * @template TKey * @template TValue * @template TMapValue * * @param array $array * @param callable(TValue, TKey): TMapValue $callback * @return array */ public static function map(array $array, callable $callback): array { $keys = array_keys($array); $items = array_map($callback, $array, $keys); return array_combine($keys, $items); } /** * @template TKey * @template TValue * * @param array $array * @param callable(TValue, TKey): bool $callback * @return ?TValue */ public static function first(array $array, callable $callback): mixed { foreach ($array as $key => $value) { if ($callback($value, $key)) { return $value; } } return null; } } PKêW]r¡”ÐóYóY)tailwind-merge-php/src/Support/Config.phpnu„[µü¤ */ private static array $additionalConfig = []; /** * @return array */ public static function getMergedConfig(): array { $config = self::getDefaultConfig(); foreach (self::$additionalConfig as $key => $additionalConfig) { $config[$key] = self::mergePropertyRecursively($config, $key, $additionalConfig); } return $config; } private static function mergePropertyRecursively(array $baseConfig, string $mergeKey, array|bool|float|int|string|null $mergeValue): array|bool|float|int|string|null { if (! array_key_exists($mergeKey, $baseConfig)) { return $mergeValue; } if (is_string($mergeValue)) { return $mergeValue; } if (is_numeric($mergeValue)) { return $mergeValue; } if (is_bool($mergeValue)) { return $mergeValue; } if ($mergeValue === null) { return $mergeValue; } if (is_array($mergeValue) && array_is_list($mergeValue) && is_array($baseConfig[$mergeKey]) && array_is_list($baseConfig[$mergeKey])) { return [...$baseConfig[$mergeKey], ...$mergeValue]; } if (is_array($mergeValue) && ! array_is_list($mergeValue) /* && is_array($baseConfig[$mergeKey]) && array_is_list($baseConfig[$mergeKey]) */) { if ($baseConfig[$mergeKey] === null) { return $mergeValue; } foreach ($mergeValue as $key => $value) { $baseConfig[$mergeKey][$key] = self::mergePropertyRecursively($baseConfig[$mergeKey], $key, $value); } } return $baseConfig[$mergeKey]; } /** * @param array $config */ public static function setAdditionalConfig(array $config): void { self::$additionalConfig = $config; } /** * @return array{cacheSize: int, prefix: ?string, theme: array, classGroups: array,conflictingClassGroups: array>, conflictingClassGroupModifiers: array>} */ public static function getDefaultConfig(): array { $colors = self::fromTheme('colors'); $spacing = self::fromTheme('spacing'); $blur = self::fromTheme('blur'); $brightness = self::fromTheme('brightness'); $borderColor = self::fromTheme('borderColor'); $borderRadius = self::fromTheme('borderRadius'); $borderSpacing = self::fromTheme('borderSpacing'); $borderWidth = self::fromTheme('borderWidth'); $contrast = self::fromTheme('contrast'); $grayscale = self::fromTheme('grayscale'); $hueRotate = self::fromTheme('hueRotate'); $invert = self::fromTheme('invert'); $gap = self::fromTheme('gap'); $gradientColorStops = self::fromTheme('gradientColorStops'); $gradientColorStopPositions = self::fromTheme('gradientColorStopPositions'); $inset = self::fromTheme('inset'); $margin = self::fromTheme('margin'); $opacity = self::fromTheme('opacity'); $padding = self::fromTheme('padding'); $saturate = self::fromTheme('saturate'); $scale = self::fromTheme('scale'); $sepia = self::fromTheme('sepia'); $skew = self::fromTheme('skew'); $space = self::fromTheme('space'); $translate = self::fromTheme('translate'); return [ 'cacheSize' => 500, 'prefix' => null, 'theme' => [ 'colors' => [AnyValueValidator::validate(...)], 'spacing' => [LengthValidator::validate(...), ArbitraryLengthValidator::validate(...)], 'blur' => ['none', '', TshirtSizeValidator::validate(...), ArbitraryValueValidator::validate(...)], 'brightness' => self::getNumber(), 'borderColor' => [$colors], 'borderRadius' => ['none', '', 'full', TshirtSizeValidator::validate(...), ArbitraryValueValidator::validate(...)], 'borderSpacing' => self::getSpacingWithArbitrary($spacing), 'borderWidth' => self::getLengthWithEmptyAndArbitrary(), 'contrast' => self::getNumber(), 'grayscale' => self::getZeroAndEmpty(), 'hueRotate' => self::getNumberAndArbitrary(), 'invert' => self::getZeroAndEmpty(), 'gap' => self::getSpacingWithArbitrary($spacing), 'gradientColorStops' => [$colors], 'gradientColorStopPositions' => [PercentValidator::validate(...), ArbitraryLengthValidator::validate(...)], 'inset' => self::getSpacingWithAutoAndArbitrary($spacing), 'margin' => self::getSpacingWithAutoAndArbitrary($spacing), 'opacity' => self::getNumber(), 'padding' => self::getSpacingWithArbitrary($spacing), 'saturate' => self::getNumber(), 'scale' => self::getNumber(), 'sepia' => self::getZeroAndEmpty(), 'skew' => self::getNumberAndArbitrary(), 'space' => self::getSpacingWithArbitrary($spacing), 'translate' => self::getSpacingWithArbitrary($spacing), ], 'classGroups' => [ // Layout /** * Aspect Ratio * * @see https://tailwindcss.com/docs/aspect-ratio */ 'aspect' => [['aspect' => ['auto', 'square', 'video', ArbitraryValueValidator::validate(...)]]], /** * Container * * @see https://tailwindcss.com/docs/container */ 'container' => ['container'], /** * Columns * * @see https://tailwindcss.com/docs/columns */ 'columns' => [['columns' => [TshirtSizeValidator::validate(...)]]], /** * Break After * * @see https://tailwindcss.com/docs/break-after */ 'break-after' => [['break-after' => self::getBreaks()]], /** * Break Before * * @see https://tailwindcss.com/docs/break-before */ 'break-before' => [['break-before' => self::getBreaks()]], /** * Break Inside * * @see https://tailwindcss.com/docs/break-inside */ 'break-inside' => [['break-inside' => ['auto', 'avoid', 'avoid-page', 'avoid-column']]], /** * Box Decoration Break * * @see https://tailwindcss.com/docs/box-decoration-break */ 'box-decoration' => [['box-decoration' => ['slice', 'clone']]], /** * Box Sizing * * @see https://tailwindcss.com/docs/box-sizing */ 'box' => [['box' => ['border', 'content']]], /** * Display * * @see https://tailwindcss.com/docs/display */ 'display' => [ 'block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden', ], /** * Floats * * @see https://tailwindcss.com/docs/float */ 'float' => [['float' => ['right', 'left', 'none', 'start', 'end']]], /** * Clear * * @see https://tailwindcss.com/docs/clear */ 'clear' => [['clear' => ['left', 'right', 'both', 'none', 'start', 'end']]], /** * Isolation * * @see https://tailwindcss.com/docs/isolation */ 'isolation' => ['isolate', 'isolation-auto'], /** * Object Fit * * @see https://tailwindcss.com/docs/object-fit */ 'object-fit' => [['object' => ['contain', 'cover', 'fill', 'none', 'scale-down']]], /** * Object Position * * @see https://tailwindcss.com/docs/object-position */ 'object-position' => [['object' => [...self::getPositions(), ArbitraryValueValidator::validate(...)]]], /** * Overflow * * @see https://tailwindcss.com/docs/overflow */ 'overflow' => [['overflow' => self::getOverflow()]], /** * Overflow X * * @see https://tailwindcss.com/docs/overflow */ 'overflow-x' => [['overflow-x' => self::getOverflow()]], /** * Overflow Y * * @see https://tailwindcss.com/docs/overflow */ 'overflow-y' => [['overflow-y' => self::getOverflow()]], /** * Overscroll Behavior * * @see https://tailwindcss.com/docs/overscroll-behavior */ 'overscroll' => [['overscroll' => self::getOverscroll()]], /** * Overscroll Behavior X * * @see https://tailwindcss.com/docs/overscroll-behavior */ 'overscroll-x' => [['overscroll-x' => self::getOverscroll()]], /** * Overscroll Behavior Y * * @see https://tailwindcss.com/docs/overscroll-behavior */ 'overscroll-y' => [['overscroll-y' => self::getOverscroll()]], /** * Position * * @see https://tailwindcss.com/docs/position */ 'position' => ['static', 'fixed', 'absolute', 'relative', 'sticky'], /** * Top / Right / Bottom / Left * * @see https://tailwindcss.com/docs/top-right-bottom-left */ 'inset' => [['inset' => [$inset]]], /** * Right / Left * * @see https://tailwindcss.com/docs/top-right-bottom-left */ 'inset-x' => [['inset-x' => [$inset]]], /** * Top / Bottom * * @see https://tailwindcss.com/docs/top-right-bottom-left */ 'inset-y' => [['inset-y' => [$inset]]], /** * Start * * @see https://tailwindcss.com/docs/top-right-bottom-left */ 'start' => [['start' => [$inset]]], /** * End * * @see https://tailwindcss.com/docs/top-right-bottom-left */ 'end' => [['end' => [$inset]]], /** * Top * * @see https://tailwindcss.com/docs/top-right-bottom-left */ 'top' => [['top' => [$inset]]], /** * Right * * @see https://tailwindcss.com/docs/top-right-bottom-left */ 'right' => [['right' => [$inset]]], /** * Bottom * * @see https://tailwindcss.com/docs/top-right-bottom-left */ 'bottom' => [['bottom' => [$inset]]], /** * Left * * @see https://tailwindcss.com/docs/top-right-bottom-left */ 'left' => [['left' => [$inset]]], /** * Visibility * * @see https://tailwindcss.com/docs/visibility */ 'visibility' => ['visible', 'invisible', 'collapse'], /** * Z-Index * * @see https://tailwindcss.com/docs/z-index */ 'z' => [['z' => ['auto', IntegerValidator::validate(...), ArbitraryValueValidator::validate(...)]]], // Flexbox and Grid /** * Flex Basis * * @see https://tailwindcss.com/docs/flex-basis */ 'basis' => [['basis' => self::getSpacingWithAutoAndArbitrary($space)]], /** * Flex Direction * * @see https://tailwindcss.com/docs/flex-direction */ 'flex-direction' => [['flex' => ['row', 'row-reverse', 'col', 'col-reverse']]], /** * Flex Wrap * * @see https://tailwindcss.com/docs/flex-wrap */ 'flex-wrap' => [['flex' => ['wrap', 'wrap-reverse', 'nowrap']]], /** * Flex * * @see https://tailwindcss.com/docs/flex */ 'flex' => [['flex' => ['1', 'auto', 'initial', 'none', ArbitraryValueValidator::validate(...)]]], /** * Flex Grow * * @see https://tailwindcss.com/docs/flex-grow */ 'grow' => [['grow' => self::getZeroAndEmpty()]], /** * Flex Shrink * * @see https://tailwindcss.com/docs/flex-shrink */ 'shrink' => [['shrink' => self::getZeroAndEmpty()]], /** * Order * * @see https://tailwindcss.com/docs/order */ 'order' => [['order' => ['first', 'last', 'none', IntegerValidator::validate(...), ArbitraryValueValidator::validate(...)]]], /** * Grid Template Columns * * @see https://tailwindcss.com/docs/grid-template-columns */ 'grid-cols' => [['grid-cols' => [AnyValueValidator::validate(...)]]], /** * Grid Column Start / End * * @see https://tailwindcss.com/docs/grid-column */ 'col-start-end' => [['col' => ['auto', ['span' => ['full', IntegerValidator::validate(...), ArbitraryValueValidator::validate(...)]], ArbitraryValueValidator::validate(...)]]], /** * Grid Column Start * * @see https://tailwindcss.com/docs/grid-column */ 'col-start' => [['col-start' => self::getNumberWithAutoAndArbitrary()]], /** * Grid Column End * * @see https://tailwindcss.com/docs/grid-column */ 'col-end' => [['col-end' => self::getNumberWithAutoAndArbitrary()]], /** * Grid Template Rows * * @see https://tailwindcss.com/docs/grid-template-rows */ 'grid-rows' => [['grid-rows' => [AnyValueValidator::validate(...)]]], /** * Grid Row Start / End * * @see https://tailwindcss.com/docs/grid-row */ 'row-start-end' => [['row' => ['auto', ['span' => [IntegerValidator::validate(...), ArbitraryValueValidator::validate(...)]], ArbitraryValueValidator::validate(...)]]], /** * Grid Row Start * * @see https://tailwindcss.com/docs/grid-row */ 'row-start' => [['row-start' => self::getNumberWithAutoAndArbitrary()]], /** * Grid Row End * * @see https://tailwindcss.com/docs/grid-row */ 'row-end' => [['row-end' => self::getNumberWithAutoAndArbitrary()]], /** * Grid Auto Flow * * @see https://tailwindcss.com/docs/grid-auto-flow */ 'grid-flow' => [['grid-flow' => ['row', 'col', 'dense', 'row-dense', 'col-dense']]], /** * Grid Auto Columns * * @see https://tailwindcss.com/docs/grid-auto-columns */ 'auto-cols' => [['auto-cols' => ['auto', 'min', 'max', 'fr', ArbitraryValueValidator::validate(...)]]], /** * Grid Auto Rows * * @see https://tailwindcss.com/docs/grid-auto-rows */ 'auto-rows' => [['auto-rows' => ['auto', 'min', 'max', 'fr', ArbitraryValueValidator::validate(...)]]], /** * Gap * * @see https://tailwindcss.com/docs/gap */ 'gap' => [['gap' => [$gap]]], /** * Gap X * * @see https://tailwindcss.com/docs/gap */ 'gap-x' => [['gap-x' => [$gap]]], /** * Gap Y * * @see https://tailwindcss.com/docs/gap */ 'gap-y' => [['gap-y' => [$gap]]], /** * Justify Content * * @see https://tailwindcss.com/docs/justify-content */ 'justify-content' => [['justify' => ['normal', ...self::getAlign()]]], /** * Justify Items * * @see https://tailwindcss.com/docs/justify-items */ 'justify-items' => [['justify-items' => ['start', 'end', 'center', 'stretch']]], /** * Justify Self * * @see https://tailwindcss.com/docs/justify-self */ 'justify-self' => [['justify-self' => ['auto', 'start', 'end', 'center', 'stretch']]], /** * Align Content * * @see https://tailwindcss.com/docs/align-content */ 'align-content' => [['content' => ['normal', ...self::getAlign(), 'baseline']]], /** * Align Items * * @see https://tailwindcss.com/docs/align-items */ 'align-items' => [['items' => ['start', 'end', 'center', 'baseline', 'stretch']]], /** * Align Self * * @see https://tailwindcss.com/docs/align-self */ 'align-self' => [['self' => ['auto', 'start', 'end', 'center', 'stretch', 'baseline']]], /** * Place Content * * @see https://tailwindcss.com/docs/place-content */ 'place-content' => [['place-content' => [...self::getAlign(), 'baseline']]], /** * Place Items * * @see https://tailwindcss.com/docs/place-items */ 'place-items' => [['place-items' => ['start', 'end', 'center', 'baseline', 'stretch']]], /** * Place Self * * @see https://tailwindcss.com/docs/place-self */ 'place-self' => [['place-self' => ['auto', 'start', 'end', 'center', 'stretch']]], // Spacing /** * Padding * * @see https://tailwindcss.com/docs/padding */ 'p' => [['p' => [$padding]]], /** * Padding X * * @see https://tailwindcss.com/docs/padding */ 'px' => [['px' => [$padding]]], /** * Padding Y * * @see https://tailwindcss.com/docs/padding */ 'py' => [['py' => [$padding]]], /** * Padding Start * * @see https://tailwindcss.com/docs/padding */ 'ps' => [['ps' => [$padding]]], /** * Padding End * * @see https://tailwindcss.com/docs/padding */ 'pe' => [['pe' => [$padding]]], /** * Padding Top * * @see https://tailwindcss.com/docs/padding */ 'pt' => [['pt' => [$padding]]], /** * Padding Right * * @see https://tailwindcss.com/docs/padding */ 'pr' => [['pr' => [$padding]]], /** * Padding Bottom * * @see https://tailwindcss.com/docs/padding */ 'pb' => [['pb' => [$padding]]], /** * Padding Left * * @see https://tailwindcss.com/docs/padding */ 'pl' => [['pl' => [$padding]]], /** * Margin * * @see https://tailwindcss.com/docs/margin */ 'm' => [['m' => [$margin]]], /** * Margin X * * @see https://tailwindcss.com/docs/margin */ 'mx' => [['mx' => [$margin]]], /** * Margin Y * * @see https://tailwindcss.com/docs/margin */ 'my' => [['my' => [$margin]]], /** * Margin Start * * @see https://tailwindcss.com/docs/margin */ 'ms' => [['ms' => [$margin]]], /** * Margin End * * @see https://tailwindcss.com/docs/margin */ 'me' => [['me' => [$margin]]], /** * Margin Top * * @see https://tailwindcss.com/docs/margin */ 'mt' => [['mt' => [$margin]]], /** * Margin Right * * @see https://tailwindcss.com/docs/margin */ 'mr' => [['mr' => [$margin]]], /** * Margin Bottom * * @see https://tailwindcss.com/docs/margin */ 'mb' => [['mb' => [$margin]]], /** * Margin Left * * @see https://tailwindcss.com/docs/margin */ 'ml' => [['ml' => [$margin]]], /** * Space Between X * * @see https://tailwindcss.com/docs/space */ 'space-x' => [['space-x' => [$space]]], /** * Space Between X Reverse * * @see https://tailwindcss.com/docs/space */ 'space-x-reverse' => ['space-x-reverse'], /** * Space Between Y * * @see https://tailwindcss.com/docs/space */ 'space-y' => [['space-y' => [$space]]], /** * Space Between Y Reverse * * @see https://tailwindcss.com/docs/space */ 'space-y-reverse' => ['space-y-reverse'], // Sizing /** * Width * * @see https://tailwindcss.com/docs/width */ 'w' => [ [ 'w' => [ 'auto', 'min', 'max', 'fit', 'svw', 'lvw', 'dvw', ArbitraryValueValidator::validate(...), $spacing, ], ], ], /** * Min-Width * * @see https://tailwindcss.com/docs/min-width */ 'min-w' => [['min-w' => ['min', 'max', 'fit', ArbitraryValueValidator::validate(...), LengthValidator::validate(...)]]], /** * Max-Width * * @see https://tailwindcss.com/docs/max-width */ 'max-w' => [ [ 'max-w' => [ ArbitraryValueValidator::validate(...), $spacing, 'none', 'full', 'min', 'max', 'fit', 'prose', ['screen' => [TshirtSizeValidator::validate(...)]], TshirtSizeValidator::validate(...), ], ], ], /** * Height * * @see https://tailwindcss.com/docs/height */ 'h' => [ [ 'h' => [ ArbitraryValueValidator::validate(...), $spacing, 'auto', 'min', 'max', 'fit', 'svh', 'lvh', 'dvh', ], ], ], /** * Min-Height * * @see https://tailwindcss.com/docs/min-height */ 'min-h' => [ ['min-h' => [ArbitraryValueValidator::validate(...), $spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']], ], /** * Max-Height * * @see https://tailwindcss.com/docs/max-height */ 'max-h' => [ ['max-h' => [ArbitraryValueValidator::validate(...), $spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh']], ], /** * Size * * @see https://tailwindcss.com/docs/size */ 'size' => [['size' => [ArbitraryValueValidator::validate(...), $spacing, 'auto', 'min', 'max', 'fit']]], // Typography /** * Font Size * * @see https://tailwindcss.com/docs/font-size */ 'font-size' => [['text' => ['base', TshirtSizeValidator::validate(...), ArbitraryLengthValidator::validate(...)]]], /** * Font Smoothing * * @see https://tailwindcss.com/docs/font-smoothing */ 'font-smoothing' => ['antialiased', 'subpixel-antialiased'], /** * Font Style * * @see https://tailwindcss.com/docs/font-style */ 'font-style' => ['italic', 'not-italic'], /** * Font Weight * * @see https://tailwindcss.com/docs/font-weight */ 'font-weight' => [ [ 'font' => [ 'thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black', ArbitraryNumberValidator::validate(...), ], ], ], /** * Font Family * * @see https://tailwindcss.com/docs/font-family */ 'font-family' => [['font' => [AnyValueValidator::validate(...)]]], /** * Font Variant Numeric * * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-normal' => ['normal-nums'], /** * Font Variant Numeric * * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-ordinal' => ['ordinal'], /** * Font Variant Numeric * * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-slashed-zero' => ['slashed-zero'], /** * Font Variant Numeric * * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-figure' => ['lining-nums', 'oldstyle-nums'], /** * Font Variant Numeric * * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-spacing' => ['proportional-nums', 'tabular-nums'], /** * Font Variant Numeric * * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-fraction' => ['diagonal-fractions', 'stacked-fractons'], /** * Letter Spacing * * @see https://tailwindcss.com/docs/letter-spacing */ 'tracking' => [ [ 'tracking' => [ 'tighter', 'tight', 'normal', 'wide', 'wider', 'widest', ArbitraryValueValidator::validate(...), ], ], ], /** * Line Clamp * * @see https://tailwindcss.com/docs/line-clamp */ 'line-clamp' => [['line-clamp' => ['none', NumberValidator::validate(...), ArbitraryNumberValidator::validate(...)]]], /** * Line Height * * @see https://tailwindcss.com/docs/line-height */ 'leading' => [ ['leading' => [ 'none', 'tight', 'snug', 'normal', 'relaxed', 'loose', LengthValidator::validate(...), ArbitraryValueValidator::validate(...), ]], ], /** * List Style Image * * @see https://tailwindcss.com/docs/list-style-image */ 'list-image' => [['list-image' => ['none', ArbitraryValueValidator::validate(...)]]], /** * List Style Type * * @see https://tailwindcss.com/docs/list-style-type */ 'list-style-type' => [['list' => ['none', 'disc', 'decimal', ArbitraryValueValidator::validate(...)]]], /** * List Style Position * * @see https://tailwindcss.com/docs/list-style-position */ 'list-style-position' => [['list' => ['inside', 'outside']]], /** * Placeholder Color * * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/placeholder-color */ 'placeholder-color' => [['placeholder' => [$colors]]], /** * Placeholder Opacity * * @see https://tailwindcss.com/docs/placeholder-opacity */ 'placeholder-opacity' => [['placeholder-opacity' => [$opacity]]], /** * Text Alignment * * @see https://tailwindcss.com/docs/text-align */ 'text-alignment' => [['text' => ['left', 'center', 'right', 'justify', 'start', 'end']]], /** * Text Color * * @see https://tailwindcss.com/docs/text-color */ 'text-color' => [['text' => [$colors]]], /** * Text Opacity * * @see https://tailwindcss.com/docs/text-opacity */ 'text-opacity' => [['text-opacity' => [$opacity]]], /** * Text Decoration * * @see https://tailwindcss.com/docs/text-decoration */ 'text-decoration' => ['underline', 'overline', 'line-through', 'no-underline'], /** * Text Decoration Style * * @see https://tailwindcss.com/docs/text-decoration-style */ 'text-decoration-style' => [['decoration' => [...self::getLineStyles(), 'wavy']]], /** * Text Decoration Thickness * * @see https://tailwindcss.com/docs/text-decoration-thickness */ 'text-decoration-thickness' => [['decoration' => ['auto', 'from-font', LengthValidator::validate(...), ArbitraryLengthValidator::validate(...)]]], /** * Text Underline Offset * * @see https://tailwindcss.com/docs/text-underline-offset */ 'underline-offset' => [['underline-offset' => ['auto', LengthValidator::validate(...), ArbitraryValueValidator::validate(...)]]], /** * Text Decoration Color * * @see https://tailwindcss.com/docs/text-decoration-color */ 'text-decoration-color' => [['decoration' => [$colors]]], /** * Text Transform * * @see https://tailwindcss.com/docs/text-transform */ 'text-transform' => ['uppercase', 'lowercase', 'capitalize', 'normal-case'], /** * Text Overflow * * @see https://tailwindcss.com/docs/text-overflow */ 'text-overflow' => ['truncate', 'text-ellipsis', 'text-clip'], /** * Text Wrap * * @see https://tailwindcss.com/docs/text-wrap */ 'text-wrap' => [['text' => ['wrap', 'nowrap', 'balance', 'pretty']]], /** * Text Indent * * @see https://tailwindcss.com/docs/text-indent */ 'indent' => [['indent' => self::getSpacingWithArbitrary($spacing)]], /** * Vertical Alignment * * @see https://tailwindcss.com/docs/vertical-align */ 'vertical-align' => [ [ 'align' => [ 'baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', ArbitraryValueValidator::validate(...), ], ], ], /** * Whitespace * * @see https://tailwindcss.com/docs/whitespace */ 'whitespace' => [ ['whitespace' => ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']], ], /** * Word Break * * @see https://tailwindcss.com/docs/word-break */ 'break' => [['break' => ['normal', 'words', 'all', 'keep']]], /** * Hyphens * * @see https://tailwindcss.com/docs/hyphens */ 'hyphens' => [['hyphens' => ['none', 'manual', 'auto']]], /** * Content * * @see https://tailwindcss.com/docs/content */ 'content' => [['content' => ['none', ArbitraryValueValidator::validate(...)]]], // Backgrounds /** * Background Attachment * * @see https://tailwindcss.com/docs/background-attachment */ 'bg-attachment' => [['bg' => ['fixed', 'local', 'scroll']]], /** * Background Clip * * @see https://tailwindcss.com/docs/background-clip */ 'bg-clip' => [['bg-clip' => ['border', 'padding', 'content', 'text']]], /** * Background Opacity * * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/background-opacity */ 'bg-opacity' => [['bg-opacity' => [$opacity]]], /** * Background Origin * * @see https://tailwindcss.com/docs/background-origin */ 'bg-origin' => [['bg-origin' => ['border', 'padding', 'content']]], /** * Background Position * * @see https://tailwindcss.com/docs/background-position */ 'bg-position' => [['bg' => [...self::getPositions(), ArbitraryPositionValidator::validate(...)]]], /** * Background Repeat * * @see https://tailwindcss.com/docs/background-repeat */ 'bg-repeat' => [['bg' => ['no-repeat', ['repeat' => ['', 'x', 'y', 'round', 'space']]]]], /** * Background Size * * @see https://tailwindcss.com/docs/background-size */ 'bg-size' => [['bg' => ['auto', 'cover', 'contain', ArbitrarySizeValidator::validate(...)]]], /** * Background Image * * @see https://tailwindcss.com/docs/background-image */ 'bg-image' => [ [ 'bg' => [ 'none', ['gradient-to' => ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']], ArbitraryImageValidator::validate(...), ], ], ], /** * Background Color * * @see https://tailwindcss.com/docs/background-color */ 'bg-color' => [['bg' => [$colors]]], /** * Gradient Color Stops From Position * * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-from-pos' => [['from' => [$gradientColorStopPositions]]], /** * Gradient Color Stops Via Position * * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-via-pos' => [['via' => [$gradientColorStopPositions]]], /** * Gradient Color Stops To Position * * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-to-pos' => [['to' => [$gradientColorStopPositions]]], /** * Gradient Color Stops From * * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-from' => [['from' => [$gradientColorStops]]], /** * Gradient Color Stops Via * * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-via' => [['via' => [$gradientColorStops]]], /** * Gradient Color Stops To * * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-to' => [['to' => [$gradientColorStops]]], // Borders /** * Border Radius * * @see https://tailwindcss.com/docs/border-radius */ 'rounded' => [['rounded' => [$borderRadius]]], /** * Border Radius Start * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-s' => [['rounded-s' => [$borderRadius]]], /** * Border Radius End * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-e' => [['rounded-e' => [$borderRadius]]], /** * Border Radius Top * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-t' => [['rounded-t' => [$borderRadius]]], /** * Border Radius Right * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-r' => [['rounded-r' => [$borderRadius]]], /** * Border Radius Bottom * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-b' => [['rounded-b' => [$borderRadius]]], /** * Border Radius Left * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-l' => [['rounded-l' => [$borderRadius]]], /** * Border Radius Start Start * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-ss' => [['rounded-ss' => [$borderRadius]]], /** * Border Radius Start End * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-se' => [['rounded-se' => [$borderRadius]]], /** * Border Radius End End * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-ee' => [['rounded-ee' => [$borderRadius]]], /** * Border Radius End Start * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-es' => [['rounded-es' => [$borderRadius]]], /** * Border Radius Top Left * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-tl' => [['rounded-tl' => [$borderRadius]]], /** * Border Radius Top Right * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-tr' => [['rounded-tr' => [$borderRadius]]], /** * Border Radius Bottom Right * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-br' => [['rounded-br' => [$borderRadius]]], /** * Border Radius Bottom Left * * @see https://tailwindcss.com/docs/border-radius */ 'rounded-bl' => [['rounded-bl' => [$borderRadius]]], /** * Border Width * * @see https://tailwindcss.com/docs/border-width */ 'border-w' => [['border' => [$borderWidth]]], /** * Border Width X * * @see https://tailwindcss.com/docs/border-width */ 'border-w-x' => [['border-x' => [$borderWidth]]], /** * Border Width Y * * @see https://tailwindcss.com/docs/border-width */ 'border-w-y' => [['border-y' => [$borderWidth]]], /** * Border Width Start * * @see https://tailwindcss.com/docs/border-width */ 'border-w-s' => [['border-s' => [$borderWidth]]], /** * Border Width End * * @see https://tailwindcss.com/docs/border-width */ 'border-w-e' => [['border-e' => [$borderWidth]]], /** * Border Width Top * * @see https://tailwindcss.com/docs/border-width */ 'border-w-t' => [['border-t' => [$borderWidth]]], /** * Border Width Right * * @see https://tailwindcss.com/docs/border-width */ 'border-w-r' => [['border-r' => [$borderWidth]]], /** * Border Width Bottom * * @see https://tailwindcss.com/docs/border-width */ 'border-w-b' => [['border-b' => [$borderWidth]]], /** * Border Width Left * * @see https://tailwindcss.com/docs/border-width */ 'border-w-l' => [['border-l' => [$borderWidth]]], /** * Border Opacity * * @see https://tailwindcss.com/docs/border-opacity */ 'border-opacity' => [['border-opacity' => [$opacity]]], /** * Border Style * * @see https://tailwindcss.com/docs/border-style */ 'border-style' => [['border' => [...self::getLineStyles(), 'hidden']]], /** * Divide Width X * * @see https://tailwindcss.com/docs/divide-width */ 'divide-x' => [['divide-x' => [$borderWidth]]], /** * Divide Width X Reverse * * @see https://tailwindcss.com/docs/divide-width */ 'divide-x-reverse' => ['divide-x-reverse'], /** * Divide Width Y * * @see https://tailwindcss.com/docs/divide-width */ 'divide-y' => [['divide-y' => [$borderWidth]]], /** * Divide Width Y Reverse * * @see https://tailwindcss.com/docs/divide-width */ 'divide-y-reverse' => ['divide-y-reverse'], /** * Divide Opacity * * @see https://tailwindcss.com/docs/divide-opacity */ 'divide-opacity' => [['divide-opacity' => [$opacity]]], /** * Divide Style * * @see https://tailwindcss.com/docs/divide-style */ 'divide-style' => [['divide' => self::getLineStyles()]], /** * Border Color * * @see https://tailwindcss.com/docs/border-color */ 'border-color' => [['border' => [$borderColor]]], /** * Border Color X * * @see https://tailwindcss.com/docs/border-color */ 'border-color-x' => [['border-x' => [$borderColor]]], /** * Border Color Y * * @see https://tailwindcss.com/docs/border-color */ 'border-color-y' => [['border-y' => [$borderColor]]], /** * Border Color Top * * @see https://tailwindcss.com/docs/border-color */ 'border-color-t' => [['border-t' => [$borderColor]]], /** * Border Color Right * * @see https://tailwindcss.com/docs/border-color */ 'border-color-r' => [['border-r' => [$borderColor]]], /** * Border Color Bottom * * @see https://tailwindcss.com/docs/border-color */ 'border-color-b' => [['border-b' => [$borderColor]]], /** * Border Color Left * * @see https://tailwindcss.com/docs/border-color */ 'border-color-l' => [['border-l' => [$borderColor]]], /** * Divide Color * * @see https://tailwindcss.com/docs/divide-color */ 'divide-color' => [['divide' => [$borderColor]]], /** * Outline Style * * @see https://tailwindcss.com/docs/outline-style */ 'outline-style' => [['outline' => ['', ...self::getLineStyles()]]], /** * Outline Offset * * @see https://tailwindcss.com/docs/outline-offset */ 'outline-offset' => [['outline-offset' => [LengthValidator::validate(...), ArbitraryValueValidator::validate(...)]]], /** * Outline Width * * @see https://tailwindcss.com/docs/outline-width */ 'outline-w' => [['outline' => [LengthValidator::validate(...), ArbitraryLengthValidator::validate(...)]]], /** * Outline Color * * @see https://tailwindcss.com/docs/outline-color */ 'outline-color' => [['outline' => [$colors]]], /** * Ring Width * * @see https://tailwindcss.com/docs/ring-width */ 'ring-w' => [['ring' => self::getLengthWithEmptyAndArbitrary()]], /** * Ring Width Inset * * @see https://tailwindcss.com/docs/ring-width */ 'ring-w-inset' => ['ring-inset'], /** * Ring Color * * @see https://tailwindcss.com/docs/ring-color */ 'ring-color' => [['ring' => [$colors]]], /** * Ring Opacity * * @see https://tailwindcss.com/docs/ring-opacity */ 'ring-opacity' => [['ring-opacity' => [$opacity]]], /** * Ring Offset Width * * @see https://tailwindcss.com/docs/ring-offset-width */ 'ring-offset-w' => [['ring-offset' => [LengthValidator::validate(...), ArbitraryLengthValidator::validate(...)]]], /** * Ring Offset Color * * @see https://tailwindcss.com/docs/ring-offset-color */ 'ring-offset-color' => [['ring-offset' => [$colors]]], // Effects /** * Box Shadow * * @see https://tailwindcss.com/docs/box-shadow */ 'shadow' => [['shadow' => ['', 'inner', 'none', TshirtSizeValidator::validate(...), ArbitraryShadowValidator::validate(...)]]], /** * Box Shadow Color * * @see https://tailwindcss.com/docs/box-shadow-color */ 'shadow-color' => [['shadow' => [AnyValueValidator::validate(...)]]], /** * Opacity * * @see https://tailwindcss.com/docs/opacity */ 'opacity' => [['opacity' => [$opacity]]], /** * Mix Blend Mode * * @see https://tailwindcss.com/docs/mix-blend-mode */ 'mix-blend' => [['mix-blend' => self::getBlendModes()]], /** * Background Blend Mode * * @see https://tailwindcss.com/docs/background-blend-mode */ 'bg-blend' => [['bg-blend' => self::getBlendModes()]], // Filters /** * Filter * * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/filter */ 'filter' => [['filter' => ['', 'none']]], /** * Blur * * @see https://tailwindcss.com/docs/blur */ 'blur' => [['blur' => [$blur]]], /** * Brightness * * @see https://tailwindcss.com/docs/brightness */ 'brightness' => [['brightness' => [$brightness]]], /** * Contrast * * @see https://tailwindcss.com/docs/contrast */ 'contrast' => [['contrast' => [$contrast]]], /** * Drop Shadow * * @see https://tailwindcss.com/docs/drop-shadow */ 'drop-shadow' => [['drop-shadow' => ['', 'none', TshirtSizeValidator::validate(...), ArbitraryValueValidator::validate(...)]]], /** * Grayscale * * @see https://tailwindcss.com/docs/grayscale */ 'grayscale' => [['grayscale' => [$grayscale]]], /** * Hue Rotate * * @see https://tailwindcss.com/docs/hue-rotate */ 'hue-rotate' => [['hue-rotate' => [$hueRotate]]], /** * Invert * * @see https://tailwindcss.com/docs/invert */ 'invert' => [['invert' => [$invert]]], /** * Saturate * * @see https://tailwindcss.com/docs/saturate */ 'saturate' => [['saturate' => [$saturate]]], /** * Sepia * * @see https://tailwindcss.com/docs/sepia */ 'sepia' => [['sepia' => [$sepia]]], /** * Backdrop Filter * * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/backdrop-filter */ 'backdrop-filter' => [['backdrop-filter' => ['', 'none']]], /** * Backdrop Blur * * @see https://tailwindcss.com/docs/backdrop-blur */ 'backdrop-blur' => [['backdrop-blur' => [$blur]]], /** * Backdrop Brightness * * @see https://tailwindcss.com/docs/backdrop-brightness */ 'backdrop-brightness' => [['backdrop-brightness' => [$brightness]]], /** * Backdrop Contrast * * @see https://tailwindcss.com/docs/backdrop-contrast */ 'backdrop-contrast' => [['backdrop-contrast' => [$contrast]]], /** * Backdrop Grayscale * * @see https://tailwindcss.com/docs/backdrop-grayscale */ 'backdrop-grayscale' => [['backdrop-grayscale' => [$grayscale]]], /** * Backdrop Hue Rotate * * @see https://tailwindcss.com/docs/backdrop-hue-rotate */ 'backdrop-hue-rotate' => [['backdrop-hue-rotate' => [$hueRotate]]], /** * Backdrop Invert * * @see https://tailwindcss.com/docs/backdrop-invert */ 'backdrop-invert' => [['backdrop-invert' => [$invert]]], /** * Backdrop Opacity * * @see https://tailwindcss.com/docs/backdrop-opacity */ 'backdrop-opacity' => [['backdrop-opacity' => [$opacity]]], /** * Backdrop Saturate * * @see https://tailwindcss.com/docs/backdrop-saturate */ 'backdrop-saturate' => [['backdrop-saturate' => [$saturate]]], /** * Backdrop Sepia * * @see https://tailwindcss.com/docs/backdrop-sepia */ 'backdrop-sepia' => [['backdrop-sepia' => [$sepia]]], // Tables /** * Border Collapse * * @see https://tailwindcss.com/docs/border-collapse */ 'border-collapse' => [['border' => ['collapse', 'separate']]], /** * Border Spacing * * @see https://tailwindcss.com/docs/border-spacing */ 'border-spacing' => [['border-spacing' => [$borderSpacing]]], /** * Border Spacing X * * @see https://tailwindcss.com/docs/border-spacing */ 'border-spacing-x' => [['border-spacing-x' => [$borderSpacing]]], /** * Border Spacing Y * * @see https://tailwindcss.com/docs/border-spacing */ 'border-spacing-y' => [['border-spacing-y' => [$borderSpacing]]], /** * Table Layout * * @see https://tailwindcss.com/docs/table-layout */ 'table-layout' => [['table' => ['auto', 'fixed']]], /** * Caption Side * * @see https://tailwindcss.com/docs/caption-side */ 'caption' => [['caption' => ['top', 'bottom']]], // Transitions and Animation /** * Tranisition Property * * @see https://tailwindcss.com/docs/transition-property */ 'transition' => [ [ 'transition' => [ 'none', 'all', '', 'colors', 'opacity', 'shadow', 'transform', ArbitraryValueValidator::validate(...), ], ], ], /** * Transition Duration * * @see https://tailwindcss.com/docs/transition-duration */ 'duration' => [['duration' => self::getNumberAndArbitrary()]], /** * Transition Timing Function * * @see https://tailwindcss.com/docs/transition-timing-function */ 'ease' => [['ease' => ['linear', 'in', 'out', 'in-out', ArbitraryValueValidator::validate(...)]]], /** * Transition Delay * * @see https://tailwindcss.com/docs/transition-delay */ 'delay' => [['delay' => self::getNumberAndArbitrary()]], /** * Animation * * @see https://tailwindcss.com/docs/animation */ 'animate' => [['animate' => ['none', 'spin', 'ping', 'pulse', 'bounce', ArbitraryValueValidator::validate(...)]]], // Transforms /** * Transform * * @see https://tailwindcss.com/docs/transform */ 'transform' => [['transform' => ['', 'gpu', 'none']]], /** * Scale * * @see https://tailwindcss.com/docs/scale */ 'scale' => [['scale' => [$scale]]], /** * Scale X * * @see https://tailwindcss.com/docs/scale */ 'scale-x' => [['scale-x' => [$scale]]], /** * Scale Y * * @see https://tailwindcss.com/docs/scale */ 'scale-y' => [['scale-y' => [$scale]]], /** * Rotate * * @see https://tailwindcss.com/docs/rotate */ 'rotate' => [['rotate' => [IntegerValidator::validate(...), ArbitraryValueValidator::validate(...)]]], /** * Translate X * * @see https://tailwindcss.com/docs/translate */ 'translate-x' => [['translate-x' => [$translate]]], /** * Translate Y * * @see https://tailwindcss.com/docs/translate */ 'translate-y' => [['translate-y' => [$translate]]], /** * Skew X * * @see https://tailwindcss.com/docs/skew */ 'skew-x' => [['skew-x' => [$skew]]], /** * Skew Y * * @see https://tailwindcss.com/docs/skew */ 'skew-y' => [['skew-y' => [$skew]]], /** * Transform Origin * * @see https://tailwindcss.com/docs/transform-origin */ 'transform-origin' => [ [ 'origin' => [ 'center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', ArbitraryValueValidator::validate(...), ], ], ], // Interactivity /** * Accent Color * * @see https://tailwindcss.com/docs/accent-color */ 'accent' => [['accent' => ['auto', $colors]]], /** * Appearance * * @see https://tailwindcss.com/docs/appearance */ 'appearance' => [['appearance' => ['none', 'auto']]], /** * Cursor * * @see https://tailwindcss.com/docs/cursor */ 'cursor' => [ [ 'cursor' => [ 'auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', ArbitraryValueValidator::validate(...), ], ], ], /** * Caret Color * * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities */ 'caret-color' => [['caret' => [$colors]]], /** * Pointer Events * * @see https://tailwindcss.com/docs/pointer-events */ 'pointer-events' => [['pointer-events' => ['none', 'auto']]], /** * Resize * * @see https://tailwindcss.com/docs/resize */ 'resize' => [['resize' => ['none', 'y', 'x', '']]], /** * Scroll Behavior * * @see https://tailwindcss.com/docs/scroll-behavior */ 'scroll-behavior' => [['scroll' => ['auto', 'smooth']]], /** * Scroll Margin * * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-m' => [['scroll-m' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Margin X * * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-mx' => [['scroll-mx' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Margin Y * * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-my' => [['scroll-my' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Margin Start * * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-ms' => [['scroll-ms' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Margin End * * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-me' => [['scroll-me' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Margin Top * * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-mt' => [['scroll-mt' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Margin Right * * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-mr' => [['scroll-mr' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Margin Bottom * * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-mb' => [['scroll-mb' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Margin Left * * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-ml' => [['scroll-ml' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Padding * * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-p' => [['scroll-p' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Padding X * * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-px' => [['scroll-px' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Padding Y * * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-py' => [['scroll-py' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Padding Start * * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-ps' => [['scroll-ps' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Padding End * * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pe' => [['scroll-pe' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Padding Top * * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pt' => [['scroll-pt' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Padding Right * * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pr' => [['scroll-pr' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Padding Bottom * * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pb' => [['scroll-pb' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Padding Left * * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pl' => [['scroll-pl' => self::getSpacingWithArbitrary($spacing)]], /** * Scroll Snap Align * * @see https://tailwindcss.com/docs/scroll-snap-align */ 'snap-align' => [['snap' => ['start', 'end', 'center', 'align-none']]], /** * Scroll Snap Stop * * @see https://tailwindcss.com/docs/scroll-snap-stop */ 'snap-stop' => [['snap' => ['normal', 'always']]], /** * Scroll Snap Type * * @see https://tailwindcss.com/docs/scroll-snap-type */ 'snap-type' => [['snap' => ['none', 'x', 'y', 'both']]], /** * Scroll Snap Type Strictness * * @see https://tailwindcss.com/docs/scroll-snap-type */ 'snap-strictness' => [['snap' => ['mandatory', 'proximity']]], /** * Touch Action * * @see https://tailwindcss.com/docs/touch-action */ 'touch' => [ [ 'touch' => [ 'auto', 'none', 'manipulation', ], ], ], /** * Touch Action X * * @see https://tailwindcss.com/docs/touch-action */ 'touch-x' => [ [ 'touch-pan' => ['x', 'left', 'right'], ], ], /** * Touch Action Y * * @see https://tailwindcss.com/docs/touch-action */ 'touch-y' => [ [ 'touch-pan' => ['y', 'up', 'down'], ], ], /** * Touch Action Pinch Zoom * * @see https://tailwindcss.com/docs/touch-action */ 'touch-pz' => ['touch-pinch-zoom'], /** * User Select * * @see https://tailwindcss.com/docs/user-select */ 'select' => [['select' => ['none', 'text', 'all', 'auto']]], /** * Will Change * * @see https://tailwindcss.com/docs/will-change */ 'will-change' => [ ['will-change' => ['auto', 'scroll', 'contents', 'transform', ArbitraryValueValidator::validate(...)]], ], // SVG /** * Fill * * @see https://tailwindcss.com/docs/fill */ 'fill' => [['fill' => [$colors, 'none']]], /** * Stroke Width * * @see https://tailwindcss.com/docs/stroke-width */ 'stroke-w' => [['stroke' => [LengthValidator::validate(...), ArbitraryLengthValidator::validate(...), ArbitraryNumberValidator::validate(...)]]], /** * Stroke * * @see https://tailwindcss.com/docs/stroke */ 'stroke' => [['stroke' => [$colors, 'none']]], // Accessibility /** * Screen Readers * * @see https://tailwindcss.com/docs/screen-readers */ 'sr' => ['sr-only', 'not-sr-only'], /** * Forced Color Adjust * * @see https://tailwindcss.com/docs/forced-color-adjust */ 'forced-color-adjust' => [['forced-color-adjust' => ['auto', 'none']]], ], 'conflictingClassGroups' => [ 'overflow' => ['overflow-x', 'overflow-y'], 'overscroll' => ['overscroll-x', 'overscroll-y'], 'inset' => ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'], 'inset-x' => ['right', 'left'], 'inset-y' => ['top', 'bottom'], 'flex' => ['basis', 'grow', 'shrink'], 'gap' => ['gap-x', 'gap-y'], 'p' => ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'], 'px' => ['pr', 'pl'], 'py' => ['pt', 'pb'], 'm' => ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'], 'mx' => ['mr', 'ml'], 'my' => ['mt', 'mb'], 'size' => ['w', 'h'], 'font-size' => ['leading'], 'fvn-normal' => [ 'fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction', ], 'fvn-ordinal' => ['fvn-normal'], 'fvn-slashed-zero' => ['fvn-normal'], 'fvn-figure' => ['fvn-normal'], 'fvn-spacing' => ['fvn-normal'], 'fvn-fraction' => ['fvn-normal'], 'line-clamp' => ['display', 'overflow'], 'rounded' => [ 'rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl', ], 'rounded-s' => ['rounded-ss', 'rounded-es'], 'rounded-e' => ['rounded-se', 'rounded-ee'], 'rounded-t' => ['rounded-tl', 'rounded-tr'], 'rounded-r' => ['rounded-tr', 'rounded-br'], 'rounded-b' => ['rounded-br', 'rounded-bl'], 'rounded-l' => ['rounded-tl', 'rounded-bl'], 'border-spacing' => ['border-spacing-x', 'border-spacing-y'], 'border-w' => [ 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l', ], 'border-w-x' => ['border-w-r', 'border-w-l'], 'border-w-y' => ['border-w-t', 'border-w-b'], 'border-color' => [ 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l', ], 'border-color-x' => ['border-color-r', 'border-color-l'], 'border-color-y' => ['border-color-t', 'border-color-b'], 'scroll-m' => [ 'scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml', ], 'scroll-mx' => ['scroll-mr', 'scroll-ml'], 'scroll-my' => ['scroll-mt', 'scroll-mb'], 'scroll-p' => [ 'scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl', ], 'scroll-px' => ['scroll-pr', 'scroll-pl'], 'scroll-py' => ['scroll-pt', 'scroll-pb'], 'touch' => ['touch-x', 'touch-y', 'touch-pz'], 'touch-x' => ['touch'], 'touch-y' => ['touch'], 'touch-pz' => ['touch'], ], 'conflictingClassGroupModifiers' => [ 'font-size' => ['leading'], ], ]; } public static function fromTheme(string $key): ThemeGetter { return new ThemeGetter($key); } /** * @return array */ private static function getNumber(): array { return [ NumberValidator::validate(...), ArbitraryNumberValidator::validate(...), ]; } /** * @return array */ private static function getLengthWithEmptyAndArbitrary(): array { return [ '', LengthValidator::validate(...), ArbitraryLengthValidator::validate(...), ]; } /** * @return array */ private static function getZeroAndEmpty(): array { return [ '', '0', ArbitraryValueValidator::validate(...), ]; } /** * @return array */ private static function getNumberAndArbitrary(): array { return [NumberValidator::validate(...), ArbitraryValueValidator::validate(...)]; } /** * @return array */ private static function getSpacingWithAutoAndArbitrary(ThemeGetter $spacing): array { return [ 'auto', ArbitraryValueValidator::validate(...), $spacing, ]; } /** * @return array */ private static function getSpacingWithArbitrary(ThemeGetter $spacing): array { return [ ArbitraryValueValidator::validate(...), $spacing, ]; } /** * @return array */ private static function getBreaks(): array { return [ 'auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column', ]; } /** * @return array */ private static function getPositions(): array { return [ 'bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top', ]; } /** * @return array */ private static function getOverflow(): array { return [ 'auto', 'hidden', 'clip', 'visible', 'scroll', ]; } /** * @return array */ private static function getOverscroll(): array { return [ 'auto', 'contain', 'none', ]; } /** * @return array */ private static function getNumberWithAutoAndArbitrary(): array { return [ 'auto', NumberValidator::validate(...), ArbitraryValueValidator::validate(...), ]; } /** * @return array */ private static function getAlign(): array { return [ 'start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', ]; } /** * @return array */ private static function getLineStyles(): array { return [ 'solid', 'dashed', 'dotted', 'double', 'none', ]; } /** * @return array */ private static function getBlendModes(): array { return [ 'normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity', 'plus-lighter', ]; } } PKêW]¹ŽžÏÏ-tailwind-merge-php/src/Support/Collection.phpnu„[µü¤ */ protected array $items = []; /** * @param self|array $items * @return void */ public function __construct(self|array $items = []) { if ($items instanceof self) { $items = $items->all(); } $this->items = $items; } /** * @template TMakeKey of array-key * @template TMakeValue * * @param array $items * @return self */ public static function make(array $items = []): self { return new self($items); } public function contains(string $key): bool { return in_array($key, $this->items); } /** * @return self */ public function flatten(int $depth = PHP_INT_MAX): self { return new self(Arr::flatten($this->items, $depth)); } public function join(string $glue): string { return implode($glue, $this->items); } /** * @template TMapWithKeysKey of array-key * @template TMapWithKeysValue * * @param callable(TValue, TKey): array $callback * @return self */ public function mapWithKeys(callable $callback): self { return new self(Arr::mapWithKeys($this->items, $callback)); // @phpstan-ignore-line } /** * @return self */ public function sort(): self { $items = $this->items; asort($items); return new self($items); } /** * @return self */ public function values(): self { return new self(array_values($this->items)); } /** * @return array */ public function toArray(): array { return $this->map(fn (mixed $value): mixed => $value instanceof Collection ? $value->toArray() : $value)->all(); } /** * @template TMapValue * * @param callable(TValue, TKey): TMapValue $callback * @return self */ public function map(callable $callback): self { return new self(Arr::map($this->items, $callback)); // @phpstan-ignore-line } /** * @return array */ public function all(): array { return $this->items; } /** * @param TValue $item * @return $this */ public function add(mixed $item): self { $this->items[] = $item; return $this; } /** * @param (callable(TValue, TKey): bool)|null $callback * @return ?TValue */ public function first(?callable $callback = null): mixed { return Arr::first($this->items, $callback); // @phpstan-ignore-line } /** * @param array|self $source * @return self */ public function concat(array|self $source): self { $result = new self($this); if ($source instanceof self) { $source = $source->all(); } foreach ($source as $item) { $result->push($item); } return $result; } /** * @param TValue ...$values * @return $this */ public function push(...$values): self { foreach ($values as $value) { $this->items[] = $value; } return $this; } /** * @return self */ public function reverse(): self { return new self(array_reverse($this->items, true)); } /** * @return self */ public function filter(): self { return new self(array_filter($this->items)); } public function dd(): void { dd($this->items); } } PKêW]ƒC×éé+tailwind-merge-php/src/Support/ClassMap.phpnu„[µü¤, classGroups: array,conflictingClassGroups: array>, conflictingClassGroupModifiers: array>} $config */ public static function create(array $config): ClassPartObject { $theme = $config['theme']; $prefix = $config['prefix']; $classMap = new ClassPartObject(); $prefixedClassGroupEntries = self::getPrefixedClassGroupEntries( $config['classGroups'], $prefix, ); foreach ($prefixedClassGroupEntries as $classGroupId => $classGroup) { self::processClassesRecursively($classGroup, $classMap, $classGroupId, $theme); } return $classMap; } /** * @param array $classGroupEntries * @return array */ private static function getPrefixedClassGroupEntries(array $classGroupEntries, ?string $prefix): array { if (! $prefix) { return $classGroupEntries; } // @phpstan-ignore-next-line return Collection::make($classGroupEntries)->mapWithKeys(function (array $classGroup, string $classGroupId) use ($prefix): array { $prefixedClassGroup = Collection::make($classGroup)->map(function (string|array $classDefinition) use ($prefix): string|array { if (is_string($classDefinition)) { return $prefix.$classDefinition; } if (is_array($classDefinition)) { return Collection::make($classDefinition)->mapWithKeys(fn (array $value, string $key): array => [$prefix.$key => $value])->all(); } // return $classDefinition; })->all(); return [$classGroupId => $prefixedClassGroup]; })->all(); } public static function processClassesRecursively(array $classGroup, ClassPartObject $classPartObject, string $classGroupId, array $theme): void { foreach ($classGroup as $classDefinition) { if (is_string($classDefinition)) { $classPartObjectToEdit = $classDefinition === '' ? $classPartObject : self::getPart($classPartObject, $classDefinition); $classPartObjectToEdit->classGroupId = $classGroupId; continue; } if (self::isThemeGetter($classDefinition)) { self::processClassesRecursively( $classDefinition->get($theme), $classPartObject, $classGroupId, $theme, ); continue; } if (is_callable($classDefinition)) { $classPartObject->validators[] = new ClassValidatorObject( classGroupId: $classGroupId, validator: $classDefinition, ); continue; } foreach ($classDefinition as $key => $classGroup) { self::processClassesRecursively( $classGroup, self::getPart($classPartObject, $key), $classGroupId, $theme, ); } } } private static function isThemeGetter(ThemeGetter|array|callable $classDefinition): bool { return $classDefinition instanceof ThemeGetter; } private static function getPart(ClassPartObject $classPartObject, string $path): ClassPartObject { $currentClassPartObject = $classPartObject; foreach (explode(self::CLASS_PART_SEPARATOR, $path) as $pathPart) { if (! isset($currentClassPartObject->nextPart[$pathPart])) { $currentClassPartObject->nextPart[$pathPart] = new ClassPartObject(); } $currentClassPartObject = $currentClassPartObject->nextPart[$pathPart]; } return $currentClassPartObject; } } PKêW]תäH!H!6tailwind-merge-php/src/Support/TailwindClassParser.phpnu„[µü¤, classGroups: array,conflictingClassGroups: array>, conflictingClassGroupModifiers: array>} $config */ public function __construct(array $configuration) { $this->classMap = ClassMap::create($configuration); } /** * @param array $classParts */ private static function getGroupRecursive(array $classParts, ClassPartObject $classPartObject): ?string { if ($classParts === []) { return $classPartObject->classGroupId; } $currentClassPart = $classParts[0] ?? null; $nextClassPartObject = $classPartObject->nextPart[$currentClassPart] ?? null; $classGroupFromNextClassPart = $nextClassPartObject !== null ? self::getGroupRecursive(array_slice($classParts, 1), $nextClassPartObject) : null; if ($classGroupFromNextClassPart) { return $classGroupFromNextClassPart; } if ($classPartObject->validators === []) { return null; } $classRest = implode(self::CLASS_PART_SEPARATOR, $classParts); return Collection::make($classPartObject->validators)->first(fn (ClassValidatorObject $validator) => ($validator->validator)($classRest))?->classGroupId; } public function parse(string $class): ParsedClass { [ 'modifiers' => $modifiers, 'hasImportantModifier' => $hasImportantModifier, 'baseClassName' => $baseClassName, 'maybePostfixModifierPosition' => $maybePostfixModifierPosition ] = $this->splitModifiers($class); $classGroupId = $this->getClassGroupId($maybePostfixModifierPosition ? Str::substr($baseClassName, 0, $maybePostfixModifierPosition) : $baseClassName); $hasPostfixModifier = $maybePostfixModifierPosition !== null; // TODO // if (!classGroupId) { // if (!maybePostfixModifierPosition) { // return { // isTailwindClass: false as const, // originalClassName, // } // } // // classGroupId = getClassGroupId(baseClassName) // // if (!classGroupId) { // return { // isTailwindClass: false as const, // originalClassName, // } // } // // hasPostfixModifier = false // } $variantModifier = implode(':', $this->sortModifiers($modifiers)); $modifierId = $hasImportantModifier ? $variantModifier.self::IMPORTANT_MODIFIER : $variantModifier; return new ParsedClass( modifiers: $modifiers, hasImportantModifier: $hasImportantModifier, hasPostfixModifier: $hasPostfixModifier, modifierId: $modifierId, classGroupId: $classGroupId, baseClassName: $baseClassName, originalClassName: $class, ); } private function getClassGroupId(string $class): string { $classParts = explode(self::CLASS_PART_SEPARATOR, $class); // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts. if ($classParts[0] === '' && count($classParts) !== 1) { array_shift($classParts); } return self::getGroupRecursive($classParts, $this->classMap) ?: $this->getGroupIdForArbitraryProperty($class); } private function getGroupIdForArbitraryProperty(string $className): string { if (Str::match(self::ARBITRARY_PROPERTY_REGEX, $className) !== '' && Str::match(self::ARBITRARY_PROPERTY_REGEX, $className) !== '0') { $arbitraryPropertyClassName = Str::match(self::ARBITRARY_PROPERTY_REGEX, $className); $property = Str::before($arbitraryPropertyClassName, ':'); if ($property !== '' && $property !== '0') { // I use two dots here because one dot is used as prefix for class groups in plugins return 'arbitrary..'.$property; } } // TODO: not sure here return $className; } /** * @return array{modifiers: array, hasImportantModifier: bool, baseClassName: string, maybePostfixModifierPosition: int|null} */ private function splitModifiers(string $className): array { $separator = isset(Config::getMergedConfig()['separator']) && is_string(Config::getMergedConfig()['separator']) ? Config::getMergedConfig()['separator'] : ':'; $isSeparatorSingleCharacter = strlen($separator) === 1; $firstSeparatorCharacter = $separator[0]; $separatorLength = strlen($separator); $modifiers = []; $bracketDepth = 0; $modifierStart = 0; $postfixModifierPosition = null; for ($index = 0; $index < strlen($className); $index++) { $currentCharacter = $className[$index]; if ($bracketDepth === 0) { if ( $currentCharacter === $firstSeparatorCharacter && ($isSeparatorSingleCharacter || Str::substr($className, $index, $separatorLength) === $separator) ) { $modifiers[] = Str::substr($className, $modifierStart, $index - $modifierStart); $modifierStart = $index + $separatorLength; continue; } if ($currentCharacter === '/') { $postfixModifierPosition = $index; continue; } } if ($currentCharacter === '[') { $bracketDepth++; } elseif ($currentCharacter === ']') { $bracketDepth--; } } $baseClassNameWithImportantModifier = $modifiers === [] ? $className : Str::substr($className, $modifierStart); $hasImportantModifier = Str::startsWith($baseClassNameWithImportantModifier, self::IMPORTANT_MODIFIER); $baseClassName = $hasImportantModifier ? Str::substr($baseClassNameWithImportantModifier, 1) : $baseClassNameWithImportantModifier; $maybePostfixModifierPosition = $postfixModifierPosition && $postfixModifierPosition > $modifierStart ? $postfixModifierPosition - $modifierStart : null; return [ 'modifiers' => $modifiers, 'hasImportantModifier' => $hasImportantModifier, 'baseClassName' => $baseClassName, 'maybePostfixModifierPosition' => $maybePostfixModifierPosition, ]; } /** * @param array $modifiers * @return array */ private function sortModifiers(array $modifiers): array { if (count($modifiers) <= 1) { return $modifiers; } /** * @var Collection $sortedModifiers */ $sortedModifiers = Collection::make(); $unsortedModifiers = Collection::make(); foreach ($modifiers as $modifier) { $isArbitraryVariant = $modifier[0] === '['; if ($isArbitraryVariant) { $sortedModifiers = $sortedModifiers->concat([...$unsortedModifiers->sort()->all(), $modifier]); $unsortedModifiers = Collection::make(); } else { $unsortedModifiers->add($modifier); } } $sortedModifiers = $sortedModifiers->concat($unsortedModifiers->sort()); return $sortedModifiers->all(); } } PKêW]Ùܦ'šš6tailwind-merge-php/src/Contracts/ValidatorContract.phpnu„[µü¤> ...$args */ public function merge(...$args): string; } PKêW]Ds´;; tailwind-merge-php/composer.jsonnu„[µü¤{ "name": "gehrisandro/tailwind-merge-php", "description": "TailwindMerge for PHP merges multiple Tailwind CSS classes by automatically resolving conflicts between them", "keywords": ["php", "tailwindcss", "merge", "classes"], "license": "MIT", "authors": [ { "name": "Sandro Gehri", "email": "sandrogehri@gmail.com" } ], "require": { "php": "^8.1.0", "psr/simple-cache": "^3.0" }, "require-dev": { "laravel/pint": "^1.13.8", "nunomaduro/collision": "^7.10", "pestphp/pest": "^v2.24.0", "pestphp/pest-plugin-arch": "^2.6", "pestphp/pest-plugin-mock": "^2.0.0", "pestphp/pest-plugin-type-coverage": "^2.8", "phpstan/phpstan": "^1.10.55", "rector/rector": "^1.0.5", "symfony/var-dumper": "^6.4.2" }, "autoload": { "psr-4": { "TailwindMerge\\": "src/" }, "files": [ "src/TailwindMerge.php" ] }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "minimum-stability": "dev", "prefer-stable": true, "config": { "sort-packages": true, "preferred-install": "dist", "allow-plugins": { "pestphp/pest-plugin": true } }, "scripts": { "refactor:lint": "pint -v", "refactor:rector": "rector", "test:lint": "pint --test -v", "test:refactor": "rector --dry-run", "test:types": "phpstan analyse --ansi", "test:type-coverage": "pest --type-coverage --min=100", "test:pest": "pest --colors=always", "test": [ "@test:lint", "@test:refactor", "@test:types", "@test:type-coverage", "@test:pest" ] } } PKêW]X(<@@tailwind-merge-php/LICENSE.mdnu„[µü¤MIT License Copyright (c) Sandro Gehri Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PKêW]{�Rss4tailwind-merge-laravel/src/Facades/TailwindMerge.phpnu„[µü¤PKêW];®  ;×tailwind-merge-laravel/src/TailwindMergeServiceProvider.phpnu„[µü¤PKêW]BoÖ®  &Utailwind-merge-laravel/src/helpers.phpnu„[µü¤PKêW]r«×刈$¶tailwind-merge-laravel/composer.jsonnu„[µü¤PKêW]X(<@@!’tailwind-merge-laravel/LICENSE.mdnu„[µü¤PKêW]:¹sš550#tailwind-merge-laravel/config/tailwind-merge.phpnu„[µü¤PKêW]T½QI``3¸"tailwind-merge-php/src/ValueObjects/ThemeGetter.phpnu„[µü¤PKêW]TЛß7{$tailwind-merge-php/src/ValueObjects/ClassPartObject.phpnu„[µü¤PKêW]£ó²ÒÒ<a&tailwind-merge-php/src/ValueObjects/ClassValidatorObject.phpnu„[µü¤PKêW]ËaÔVÏÏ3Ÿ'tailwind-merge-php/src/ValueObjects/ParsedClass.phpnu„[µü¤PKêW]m Ü…ÁÁ"Ñ)tailwind-merge-php/src/Factory.phpnu„[µü¤PKêW]¿ð°p! ! (ä-tailwind-merge-php/src/TailwindMerge.phpnu„[µü¤PKêW]‹[¢¸íí7];tailwind-merge-php/src/Validators/AnyValueValidator.phpnu„[µü¤PKêW]�q¥ð‘‘=±<tailwind-merge-php/src/Validators/ArbitraryValueValidator.phpnu„[µü¤PKêW]•’³š——@¯>tailwind-merge-php/src/Validators/ArbitraryPositionValidator.phpnu„[µü¤PKêW]ô «z¾¾=¶@tailwind-merge-php/src/Validators/ArbitraryImageValidator.phpnu„[µü¤PKêW] äð÷÷5áCtailwind-merge-php/src/Validators/LengthValidator.phpnu„[µü¤PKêW]gè–‹��9=Gtailwind-merge-php/src/Validators/TshirtSizeValidator.phpnu„[µü¤PKêW]híõüùù53Itailwind-merge-php/src/Validators/NumberValidator.phpnu„[µü¤PKêW]m²xêê>‘Jtailwind-merge-php/src/Validators/ArbitraryLengthValidator.phpnu„[µü¤PKêW]žµ)>©©<éMtailwind-merge-php/src/Validators/ArbitrarySizeValidator.phpnu„[µü¤PKêW]‡«$­­FþOtailwind-merge-php/src/Validators/Concerns/ValidatesArbitraryValue.phpnu„[µü¤PKêW]3‚&ââ6!Stailwind-merge-php/src/Validators/IntegerValidator.phpnu„[µü¤PKêW]I�Åžž6iUtailwind-merge-php/src/Validators/PercentValidator.phpnu„[µü¤PKêW]mWtailwind-merge-php/src/Validators/ArbitraryShadowValidator.phpnu„[µü¤PKêW]‘×��>sZtailwind-merge-php/src/Validators/ArbitraryNumberValidator.phpnu„[µü¤PKêW]Ë<¢Û  &~\tailwind-merge-php/src/Support/Str.phpnu„[µü¤PKêW]lKû|__-àatailwind-merge-php/src/Support/Stringable.phpnu„[µü¤PKêW]Ë • < < &œetailwind-merge-php/src/Support/Arr.phpnu„[µü¤PKêW]r¡”ÐóYóY).otailwind-merge-php/src/Support/Config.phpnu„[µü¤PKêW]¹ŽžÏÏ-zÉtailwind-merge-php/src/Support/Collection.phpnu„[µü¤PKêW]ƒC×éé+¦Ùtailwind-merge-php/src/Support/ClassMap.phpnu„[µü¤PKêW]תäH!H!6êêtailwind-merge-php/src/Support/TailwindClassParser.phpnu„[µü¤PKêW]Ùܦ'šš6˜ tailwind-merge-php/src/Contracts/ValidatorContract.phpnu„[µü¤PKêW]‹¢ÂzÞÞ:˜ tailwind-merge-php/src/Contracts/TailwindMergeContract.phpnu„[µü¤PKêW]Ds´;; àtailwind-merge-php/composer.jsonnu„[µü¤PKêW]X(<@@ktailwind-merge-php/LICENSE.mdnu„[µü¤PK%%†ø