tailwindcss/packages/@tailwindcss-node/package.json

46 lines
1.1 KiB
JSON
Raw Normal View History

{
"name": "@tailwindcss/node",
"version": "4.1.4",
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/tailwindlabs/tailwindcss.git",
"directory": "packages/@tailwindcss-node"
},
"bugs": "https://github.com/tailwindlabs/tailwindcss/issues",
"homepage": "https://tailwindcss.com",
"scripts": {
"build": "tsup-node",
"dev": "pnpm run build -- --watch"
},
"files": [
"dist/"
],
"publishConfig": {
"provenance": true,
"access": "public"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./require-cache": {
"types": "./dist/require-cache.d.ts",
"default": "./dist/require-cache.js"
},
"./esm-cache-loader": {
"types": "./dist/esm-cache.loader.d.mts",
"default": "./dist/esm-cache.loader.mjs"
}
},
"dependencies": {
"enhanced-resolve": "^5.18.1",
Update jiti 2.4.0 → 2.4.2 (patch) (#15491) Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request. ### What changed? #### ✳️ jiti (2.4.0 → 2.4.2) · [Repo](https://github.com/unjs/jiti) · [Changelog](https://github.com/unjs/jiti/blob/main/CHANGELOG.md) <details> <summary>Release Notes</summary> <h4><a href="https://github.com/unjs/jiti/releases/tag/v2.4.2">2.4.2</a></h4> <blockquote><p dir="auto"><a href="https://bounce.depfu.com/github.com/unjs/jiti/compare/v2.4.1...v2.4.2">compare changes</a> (📦 bundled dependencies updated)</p> <h3 dir="auto">🩹 Fixes</h3> <ul dir="auto"> <li> <strong>cache:</strong> Add <code class="notranslate">+map</code> suffix to fs entries when <code class="notranslate">sourceMaps</code> enabled (<a href="https://bounce.depfu.com/github.com/unjs/jiti/pull/352">#352</a>)</li> <li>Use native require cache of loaded entries only for Node.js 22.12.+ compatibility (<a href="https://bounce.depfu.com/github.com/unjs/jiti/pull/348">#348</a>)</li> </ul></blockquote> <h4><a href="https://github.com/unjs/jiti/releases/tag/v2.4.1">2.4.1</a></h4> <blockquote><p dir="auto"><a href="https://bounce.depfu.com/github.com/unjs/jiti/compare/v2.4.0...v2.4.1">compare changes</a></p> <h3 dir="auto">🩹 Fixes</h3> <ul dir="auto"> <li>Interop modules with primitive default export (<a href="https://bounce.depfu.com/github.com/unjs/jiti/pull/343">#343</a>)</li> </ul></blockquote> <p><em>Does any of this look wrong? <a href="https://depfu.com/packages/npm/jiti/feedback">Please let us know.</a></em></p> </details> <details> <summary>Commits</summary> <p><a href="https://github.com/unjs/jiti/compare/2f9c2376e70d951cdfbc06eb8ed046331deb177a...340e2a733c35df66c85667ef254eab672f5de210">See the full diff on Github</a>. The new version differs by 9 commits:</p> <ul> <li><a href="https://github.com/unjs/jiti/commit/340e2a733c35df66c85667ef254eab672f5de210"><code>chore(release): v2.4.2</code></a></li> <li><a href="https://github.com/unjs/jiti/commit/cf952e45739b8d420dfbf61ec719aa1ee6b3779d"><code>fix: use native require cache of loaded entries only (#348)</code></a></li> <li><a href="https://github.com/unjs/jiti/commit/4dacbf1a7c1d2c5ca3b9d6be15a7d37b37e1e351"><code>fix(cache): add `+map` suffix to fs entries when `sourceMaps` enabled (#352)</code></a></li> <li><a href="https://github.com/unjs/jiti/commit/0c2c0d0d5cf44c77196649a574300426bb0ec489"><code>test: simplify snapshot tests (#351)</code></a></li> <li><a href="https://github.com/unjs/jiti/commit/7b7ffefdde44964acf93f31c6d38c0f32a093853"><code>chore: update deps</code></a></li> <li><a href="https://github.com/unjs/jiti/commit/36d52d59c96dd1906529895c91985d05973fe338"><code>chore(deps): update all non-major dependencies (#344)</code></a></li> <li><a href="https://github.com/unjs/jiti/commit/ad6191f04624badf2112651217bc17008a9bde50"><code>chore(release): v2.4.1</code></a></li> <li><a href="https://github.com/unjs/jiti/commit/cca319bbcd11c9a786148b61136719732ba38dee"><code>fix: interop modules with primitive default export (#343)</code></a></li> <li><a href="https://github.com/unjs/jiti/commit/58d3f5f8b8b6f8fe462145bdd3a00e055c9077ac"><code>chore: update deps</code></a></li> </ul> </details> --- ![Depfu Status](https://depfu.com/badges/edd6acd35d74c8d41cbb540c30442adf/stats.svg) [Depfu](https://depfu.com) will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with `@depfu rebase`. <details><summary>All Depfu comment commands</summary> <blockquote><dl> <dt>@​depfu rebase</dt><dd>Rebases against your default branch and redoes this update</dd> <dt>@​depfu recreate</dt><dd>Recreates this PR, overwriting any edits that you've made to it</dd> <dt>@​depfu merge</dt><dd>Merges this PR once your tests are passing and conflicts are resolved</dd> <dt>@​depfu cancel merge</dt><dd>Cancels automatic merging of this PR</dd> <dt>@​depfu close</dt><dd>Closes this PR and deletes the branch</dd> <dt>@​depfu reopen</dt><dd>Restores the branch and reopens this PR (if it's closed)</dd> <dt>@​depfu pause</dt><dd>Ignores all future updates for this dependency and closes this PR</dd> <dt>@​depfu pause [minor|major]</dt><dd>Ignores all future minor/major updates for this dependency and closes this PR</dd> <dt>@​depfu resume</dt><dd>Future versions of this dependency will create PRs again (leaves this PR as is)</dd> </dl></blockquote> </details> Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2025-01-06 11:42:53 +01:00
"jiti": "^2.4.2",
Improve compatibility with Safari 15 (#17435) This PR improves the compatibility with Tailwind CSS v4 with unsupported browsers with the goal to greatly improve compatibility with Safari 15. To make this work, this PR makes the following changes to all code - Change `oklab(…)` default theme values to use a percentage in the first place (so instead of `--color-red-500: oklch(0.637 0.237 25.331);` we now define it as `--color-red-500: oklch(63.7% 0.237 25.331);` since this syntax has much broader support on Safari). - Polyfill `@property` with a `@supports` query targeting older versions of Safari and Firefox * - Create fallbacks for the `color-mix(…)` function that use _inlined color values from your theme_ so that they can be computed a compile time by `lightningcss`. These fallbacks will convert to srgb to increase compatibility. - Create fallbacks for the _relative color_ feature used in the new shadow utilities and using `color-mix(…)` in case _relative color_ is applied on `currentcolor` (due to limited browser support) - Create fallbacks for gradient interpolation methods (e.g. to support `bg-linear-to-r/oklab`) - Polyfill `@media` queries range syntax. ## A simplified example Given this example CSS input: ```css @import 'tailwindcss'; @source inline('from-cyan-500/50 bg-linear-45'); ``` Here's the updated output CSS including the newly added polyfills and updated `oklab` values: ```css .bg-linear-45 { --tw-gradient-position: 45deg; background-image: linear-gradient(var(--tw-gradient-stops)); } @supports (background-image: linear-gradient(in lab, red, red)) { .bg-linear-45 { --tw-gradient-position: 45deg in oklab; } } .from-cyan-500\\/50 { --tw-gradient-from: oklab(71.5% -.11682 -.08247 / .5); --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); } @supports (color: color-mix(in lab, red, red)) { .from-cyan-500\\/50 { --tw-gradient-from: color-mix(in oklab, var(--color-cyan-500) 50%, transparent); } } :root, :host { --color-cyan-500: oklch(71.5% .143 215.221); } @supports (((-webkit-hyphens: none)) and (not (margin-trim: 1lh))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) { @layer base { *, :before, :after, ::backdrop { --tw-gradient-position: initial; --tw-gradient-from: #0000; --tw-gradient-via: #0000; --tw-gradient-to: #0000; --tw-gradient-stops: initial; --tw-gradient-via-stops: initial; --tw-gradient-from-position: 0%; --tw-gradient-via-position: 50%; --tw-gradient-to-position: 100%; } } } @property --tw-gradient-position { syntax: "*"; inherits: false } @property --tw-gradient-from { syntax: "<color>"; inherits: false; initial-value: #0000; } @property --tw-gradient-via { syntax: "<color>"; inherits: false; initial-value: #0000; } @property --tw-gradient-to { syntax: "<color>"; inherits: false; initial-value: #0000; } @property --tw-gradient-stops { syntax: "*"; inherits: false } @property --tw-gradient-via-stops { syntax: "*"; inherits: false } @property --tw-gradient-from-position { syntax: "<length-percentage>"; inherits: false; initial-value: 0%; } @property --tw-gradient-via-position { syntax: "<length-percentage>"; inherits: false; initial-value: 50%; } @property --tw-gradient-to-position { syntax: "<length-percentage>"; inherits: false; initial-value: 100%; } ``` ## \* A note on `@property` polyfills and CSS modules On Next.js, CSS module files are required to be _pure_, meaning that all selectors must either be scoped to a class or an ID. Fortunatnyl for us, this does not apply to `@property` rules which we've been using before to initialize CSS variables. However, since we're now bringing back the `@property` polyfills, that would cause unexpected rules to be exported from the CSS file as this: ```css @reference "tailwindcss"; .skew { @apply skew-7; } ``` Would turn to the following file: ```css .skew { /* … */ } @supports (/*…*/) { @layer base { *, :before, :after, ::backdrop { --tw-gradient-position: initial; } } } @property /* … */ ``` Notice that this adds a `*` selector which is not considered pure. Unfortunately there is no way for us to silence this warning or work around it, as the dependency causing this errors ([`postcss-modules-local-by-default`](https://github.com/css-modules/postcss-modules-local-by-default)) is bundled into Next.js. To work around crashes, these polyfills will not apply to CSS modules processed by the PostCSS extension for now. ## Testing on tailwindcss.com To see the changes in effect, take a look at this screencast that compares tailwindcss.com on iOS 15.5 with a version that has the patches of this PR applied: https://github.com/user-attachments/assets/1279d6f5-3c63-4f30-839c-198a789f4292 ## Test plan - Tested on tailwindcss.com via a preview build: https://tailwindcss-com-git-legacy-browsers-tailwindlabs.vercel.app/ - Updated tests - Ensure we also test on Chrome 111, Safari 16.4, Firefox 128 to make sure we have no regressions. Also tested on Safari 16.4, 15.5, 18.0
2025-04-01 13:33:22 +02:00
"tailwindcss": "workspace:*",
"lightningcss": "catalog:"
}
}