intial
This commit is contained in:
38
node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/1.bug_report.yml
generated
vendored
Normal file
38
node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/1.bug_report.yml
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Bug Report
|
||||
description: Create a bug report for @tailwindcss/forms.
|
||||
labels: []
|
||||
body:
|
||||
- type: input
|
||||
attributes:
|
||||
label: What version of @tailwindcss/forms are you using?
|
||||
description: 'For example: v0.1.4'
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: What version of Node.js are you using?
|
||||
description: 'For example: v12.0.0'
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: What browser are you using?
|
||||
description: 'For example: Chrome, Safari, or N/A'
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: What operating system are you using?
|
||||
description: 'For example: macOS, Windows'
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Reproduction repository
|
||||
description: A public GitHub repo that includes a minimal reproduction of the bug. Unfortunately we can't provide support without a reproduction, and your issue will be closed and locked with no comment if this is not provided.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe your issue
|
||||
description: Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead
|
||||
11
node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/config.yml
generated
vendored
Normal file
11
node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/config.yml
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Feature Request
|
||||
url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=ideas
|
||||
about: 'Suggest any ideas you have using our discussion forums.'
|
||||
- name: Help
|
||||
url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=help
|
||||
about: 'If you have a question or need help, ask a question on the discussion forums.'
|
||||
- name: Kind Words
|
||||
url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=kind-words
|
||||
about: "Have something nice to say about @tailwindcss/forms or Tailwind CSS in general? We'd love to hear it!"
|
||||
56
node_modules/@tailwindcss/forms/.github/workflows/prepare-release.yml
generated
vendored
Normal file
56
node_modules/@tailwindcss/forms/.github/workflows/prepare-release.yml
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
name: Prepare Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
permissions:
|
||||
contents: write # for softprops/action-gh-release to create GitHub release
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [22]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Test
|
||||
run: npm test
|
||||
|
||||
- name: Resolve version
|
||||
id: vars
|
||||
run: |
|
||||
echo "TAG_NAME=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
|
||||
- name: Get release notes
|
||||
run: |
|
||||
RELEASE_NOTES=$(npm run release-notes --silent)
|
||||
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
|
||||
echo "$RELEASE_NOTES" >> $GITHUB_ENV
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
draft: true
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
body: ${{ env.RELEASE_NOTES }}
|
||||
42
node_modules/@tailwindcss/forms/.github/workflows/release-insiders.yml
generated
vendored
Normal file
42
node_modules/@tailwindcss/forms/.github/workflows/release-insiders.yml
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Release Insiders
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [22]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Resolve version
|
||||
id: vars
|
||||
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||
|
||||
- name: 'Version based on commit: 0.0.0-insiders.${{ steps.vars.outputs.sha_short }}'
|
||||
run: npm version 0.0.0-insiders.${{ steps.vars.outputs.sha_short }} --force --no-git-tag-version
|
||||
|
||||
- name: Publish
|
||||
run: npm publish --provenance --tag insiders
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
42
node_modules/@tailwindcss/forms/.github/workflows/release.yml
generated
vendored
Normal file
42
node_modules/@tailwindcss/forms/.github/workflows/release.yml
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [22]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Test
|
||||
run: npm test
|
||||
|
||||
- name: Calculate environment variables
|
||||
run: |
|
||||
echo "RELEASE_CHANNEL=$(npm run release-channel --silent)" >> $GITHUB_ENV
|
||||
|
||||
- name: Publish
|
||||
run: npm publish --provenance --tag ${{ env.RELEASE_CHANNEL }}
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
201
node_modules/@tailwindcss/forms/CHANGELOG.md
generated
vendored
Normal file
201
node_modules/@tailwindcss/forms/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Nothing yet!
|
||||
|
||||
## [0.5.11] - 2025-12-17
|
||||
|
||||
### Fixed
|
||||
|
||||
- Limit attribute rules to input and select elements ([#159](https://github.com/tailwindlabs/tailwindcss-forms/pull/159))
|
||||
|
||||
## [0.5.10] - 2025-01-07
|
||||
|
||||
### Fixed
|
||||
|
||||
- Support installing with beta versions of Tailwind CSS v4 ([#163](https://github.com/tailwindlabs/tailwindcss-forms/pull/163))
|
||||
|
||||
## [0.5.9] - 2024-09-05
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fallback to static chevron color if theme is using variables ([#167](https://github.com/tailwindlabs/tailwindcss-forms/pull/167))
|
||||
|
||||
## [0.5.8] - 2024-08-28
|
||||
|
||||
### Fixed
|
||||
|
||||
- Support installing with alpha versions of Tailwind CSS v4 ([#163](https://github.com/tailwindlabs/tailwindcss-forms/pull/163))
|
||||
|
||||
## [0.5.7] - 2023-11-10
|
||||
|
||||
### Fixed
|
||||
|
||||
- Use normal `checkbox` and `radio` appearance in `forced-colors` mode ([#152](https://github.com/tailwindlabs/tailwindcss-forms/pull/152))
|
||||
|
||||
## [0.5.6] - 2023-08-28
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix date time bottom spacing on MacOS Safari ([#146](https://github.com/tailwindlabs/tailwindcss-forms/pull/146))
|
||||
|
||||
## [0.5.5] - 2023-08-22
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix text alignment on date and time inputs on iOS ([#144](https://github.com/tailwindlabs/tailwindcss-forms/pull/144))
|
||||
|
||||
## [0.5.4] - 2023-07-13
|
||||
|
||||
### Fixed
|
||||
|
||||
- Remove chevron for selects with a non-default size ([#137](https://github.com/tailwindlabs/tailwindcss-forms/pull/137))
|
||||
- Allow for <input> without `type` ([#141](https://github.com/tailwindlabs/tailwindcss-forms/pull/141))
|
||||
|
||||
## [0.5.3] - 2022-09-02
|
||||
|
||||
### Fixed
|
||||
|
||||
- Update TypeScript types ([#126](https://github.com/tailwindlabs/tailwindcss-forms/pull/126))
|
||||
|
||||
## [0.5.2] - 2022-05-18
|
||||
|
||||
### Added
|
||||
|
||||
- Add TypeScript type declarations ([#118](https://github.com/tailwindlabs/tailwindcss-forms/pull/118))
|
||||
|
||||
## [0.5.1] - 2022-05-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- Remove duplicate `outline` property ([#116](https://github.com/tailwindlabs/tailwindcss-forms/pull/116))
|
||||
- Fix autoprefixer warning about `color-adjust` ([#115](https://github.com/tailwindlabs/tailwindcss-forms/pull/115))
|
||||
|
||||
## [0.5.0] - 2022-03-02
|
||||
|
||||
### Changed
|
||||
|
||||
- Generate both global styles and classes by default ([#71](https://github.com/tailwindlabs/tailwindcss-forms/pull/71))
|
||||
|
||||
## [0.4.1] - 2022-03-02
|
||||
|
||||
### Added
|
||||
|
||||
- Remove `dist` folder and related dependencies ([#96](https://github.com/tailwindlabs/tailwindcss-forms/pull/96))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Use `addComponents` for class strategy ([#91](https://github.com/tailwindlabs/tailwindcss-forms/pull/91))
|
||||
- Fix extra height on Safari date/time inputs ([#109](https://github.com/tailwindlabs/tailwindcss-forms/pull/109))
|
||||
|
||||
## [0.4.0] - 2021-12-09
|
||||
|
||||
### Changed
|
||||
|
||||
- Update color palette references for v3 ([#83](https://github.com/tailwindlabs/tailwindcss-forms/pull/83))
|
||||
- Don't read outline.none value from config ([#89](https://github.com/tailwindlabs/tailwindcss-forms/pull/89))
|
||||
|
||||
## [0.3.4] - 2021-09-28
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix compatibility with `optimizeUniversalDefaults` experimental feature in Tailwind CSS v2.2 ([#81](https://github.com/tailwindlabs/tailwindcss-forms/pull/81))
|
||||
|
||||
## [0.3.3] - 2021-06-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix typo in selector when using `class` strategy that breaks background colors on checkboxes and radio buttons ([#72](https://github.com/tailwindlabs/tailwindcss-forms/pull/72))
|
||||
|
||||
## [0.3.2] - 2021-03-26
|
||||
|
||||
### Fixed
|
||||
|
||||
- Filter `null` rules for JIT compatibility ([b4c4e03](https://github.com/tailwindlabs/tailwindcss-forms/commit/b4c4e039337c3a5599f5b6d9eabbcc8ab9e8c8d9))
|
||||
|
||||
## [0.3.1] - 2021-03-26
|
||||
|
||||
### Fixed
|
||||
|
||||
- Use `base` as default strategy, not `class` ([#61](https://github.com/tailwindlabs/tailwindcss-forms/pull/61))
|
||||
|
||||
## [0.3.0] - 2021-03-25
|
||||
|
||||
### Added
|
||||
|
||||
- Add `class` strategy for you babies and your custom select and date picker libraries ;) ([#39](https://github.com/tailwindlabs/tailwindcss-forms/pull/39))
|
||||
|
||||
## [0.2.1] - 2020-11-17
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix issue where default checkbox/radio border color took precedence over user border color on focus ([d0b9fd9](https://github.com/tailwindlabs/tailwindcss-forms/commit/d0b9fd9))
|
||||
|
||||
## [0.2.0] - 2020-11-16
|
||||
|
||||
### Changed
|
||||
|
||||
- Update form styles to be less opinionated and encourage custom styling ([3288709](https://github.com/tailwindlabs/tailwindcss-forms/commit/3288709b59f4101511ec19f30cb2dafe7738251e))
|
||||
- Update custom property names to match namespaced variables in Tailwind CSS v2.0 ([adb9807](https://github.com/tailwindlabs/tailwindcss-forms/commit/adb98078fc830d0416cb5ea2c895e997d5f0a5ec), [bbd8510](https://github.com/tailwindlabs/tailwindcss-forms/commit/bbd85102ef4a402b3c39d997c025208a33694cc4))
|
||||
|
||||
## [0.1.4] - 2020-11-12
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix SVG background images not rendering properly in all browsers ([#5](https://github.com/tailwindlabs/tailwindcss-forms/pull/5))
|
||||
|
||||
## [0.1.3] - 2020-11-12
|
||||
|
||||
### Changed
|
||||
|
||||
- Update focus styles to account for changes to `ring` API in latest Tailwind CSS 2.0 alpha ([5c16689](https://github.com/tailwindlabs/tailwindcss-forms/commit/5c166896b06475832bd8364f9f3ef5c4baec585f))
|
||||
|
||||
## [0.1.2] - 2020-11-11
|
||||
|
||||
### Fixed
|
||||
|
||||
- Work around iOS Safari bug that causes date inputs to render with no height when empty ([b98365b](https://github.com/tailwindlabs/tailwindcss-forms/commit/b98365b903b586bfbe7a6ae745ba64b5d87e23e3))
|
||||
|
||||
## [0.1.1] - 2020-11-11
|
||||
|
||||
### Changed
|
||||
|
||||
- Move `tailwindcss` to dependencies, hoping to get it working with Tailwind Play ([d625ea1](https://github.com/tailwindlabs/tailwindcss-forms/commit/d625ea11bd111a4d8cde937e36f3d229ecdf7c6a))
|
||||
|
||||
## [0.1.0] - 2020-11-11
|
||||
|
||||
Initial release!
|
||||
|
||||
[unreleased]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.11...HEAD
|
||||
[0.5.11]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.10...v0.5.11
|
||||
[0.5.10]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.9...v0.5.10
|
||||
[0.5.9]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.8...v0.5.9
|
||||
[0.5.8]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.7...v0.5.8
|
||||
[0.5.7]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.6...v0.5.7
|
||||
[0.5.6]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.5...v0.5.6
|
||||
[0.5.5]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.4...v0.5.5
|
||||
[0.5.4]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.3...v0.5.4
|
||||
[0.5.3]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.2...v0.5.3
|
||||
[0.5.2]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.1...v0.5.2
|
||||
[0.5.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.0...v0.5.1
|
||||
[0.5.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.4.1...v0.5.0
|
||||
[0.4.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.4.0...v0.4.1
|
||||
[0.4.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.3...v0.4.0
|
||||
[0.3.4]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.3...v0.3.4
|
||||
[0.3.3]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.2...v0.3.3
|
||||
[0.3.2]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.1...v0.3.2
|
||||
[0.3.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.0...v0.3.1
|
||||
[0.3.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.2.1...v0.3.0
|
||||
[0.2.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.2.0...v0.2.1
|
||||
[0.2.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.4...v0.2.0
|
||||
[0.1.4]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.3...v0.1.4
|
||||
[0.1.3]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.2...v0.1.3
|
||||
[0.1.2]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.1...v0.1.2
|
||||
[0.1.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.0...v0.1.1
|
||||
[0.1.0]: https://github.com/tailwindlabs/tailwindcss-forms/releases/tag/v0.1.0
|
||||
21
node_modules/@tailwindcss/forms/LICENSE
generated
vendored
Normal file
21
node_modules/@tailwindcss/forms/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Tailwind Labs, Inc.
|
||||
|
||||
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.
|
||||
142
node_modules/@tailwindcss/forms/README.md
generated
vendored
Normal file
142
node_modules/@tailwindcss/forms/README.md
generated
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
# @tailwindcss/forms
|
||||
|
||||
A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities.
|
||||
|
||||
## Installation
|
||||
|
||||
Install the plugin from npm:
|
||||
|
||||
```sh
|
||||
npm install -D @tailwindcss/forms
|
||||
```
|
||||
|
||||
Then, when using Tailwind CSS v4, add the plugin to your main stylesheet:
|
||||
|
||||
```css
|
||||
/* app.css */
|
||||
@import "tailwindcss";
|
||||
@plugin "@tailwindcss/forms";
|
||||
```
|
||||
|
||||
If you are still using **Tailwind CSS v3**, add the plugin to your `tailwind.config.js` file:
|
||||
|
||||
```js
|
||||
// tailwind.config.js
|
||||
module.exports = {
|
||||
theme: {
|
||||
// ...
|
||||
},
|
||||
plugins: [
|
||||
require('@tailwindcss/forms'),
|
||||
// ...
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
## Basic usage
|
||||
|
||||
[**View the live demo**](https://tailwindcss-forms.vercel.app/)
|
||||
|
||||
All of the basic form elements you use will now have some simple default styles that are easy to override with utilities.
|
||||
|
||||
Currently we add basic utility-friendly form styles for the following form element types:
|
||||
|
||||
- `input[type='text']`
|
||||
- `input[type='password']`
|
||||
- `input[type='email']`
|
||||
- `input[type='number']`
|
||||
- `input[type='url']`
|
||||
- `input[type='date']`
|
||||
- `input[type='datetime-local']`
|
||||
- `input[type='month']`
|
||||
- `input[type='week']`
|
||||
- `input[type='time']`
|
||||
- `input[type='search']`
|
||||
- `input[type='tel']`
|
||||
- `input[type='checkbox']`
|
||||
- `input[type='radio']`
|
||||
- `select`
|
||||
- `select[multiple]`
|
||||
- `textarea`
|
||||
|
||||
Every element has been normalized/reset to a simple visually consistent style that is easy to customize with utilities, even elements like `<select>` or `<input type="checkbox">` that normally need to be reset with `appearance: none` and customized using custom CSS:
|
||||
|
||||
```html
|
||||
<!-- You can actually customize padding on a select element now: -->
|
||||
<select class="rounded-full px-4 py-3">
|
||||
<!-- ... -->
|
||||
</select>
|
||||
|
||||
<!-- Or change a checkbox color using text color utilities: -->
|
||||
<input type="checkbox" class="rounded text-pink-500" />
|
||||
```
|
||||
|
||||
More customization examples and best practices coming soon.
|
||||
|
||||
### Using classes to style
|
||||
|
||||
In addition to the global styles, we also generate a set of corresponding classes which can be used to explicitly apply the form styles to an element. This can be useful in situations where you need to make a non-form element, such as a `<div>`, look like a form element.
|
||||
|
||||
```html
|
||||
<input type="email" class="form-input rounded-full px-4 py-3" />
|
||||
|
||||
<select class="form-select rounded-full px-4 py-3">
|
||||
<!-- ... -->
|
||||
</select>
|
||||
|
||||
<input type="checkbox" class="form-checkbox rounded text-pink-500" />
|
||||
```
|
||||
|
||||
Here is a complete table of the provided `form-*` classes for reference:
|
||||
|
||||
| Base | Class |
|
||||
| ------------------------- | ------------------ |
|
||||
| `[type='text']` | `form-input` |
|
||||
| `[type='email']` | `form-input` |
|
||||
| `[type='url']` | `form-input` |
|
||||
| `[type='password']` | `form-input` |
|
||||
| `[type='number']` | `form-input` |
|
||||
| `[type='date']` | `form-input` |
|
||||
| `[type='datetime-local']` | `form-input` |
|
||||
| `[type='month']` | `form-input` |
|
||||
| `[type='search']` | `form-input` |
|
||||
| `[type='tel']` | `form-input` |
|
||||
| `[type='time']` | `form-input` |
|
||||
| `[type='week']` | `form-input` |
|
||||
| `textarea` | `form-textarea` |
|
||||
| `select` | `form-select` |
|
||||
| `select[multiple]` | `form-multiselect` |
|
||||
| `[type='checkbox']` | `form-checkbox` |
|
||||
| `[type='radio']` | `form-radio` |
|
||||
|
||||
### Using only global styles or only classes
|
||||
|
||||
Although we recommend thinking of this plugin as a "form reset" rather than a collection of form component styles, in some cases our default approach may be too heavy-handed, especially when integrating this plugin into existing projects.
|
||||
|
||||
If generating both the global (base) styles and classes doesn't work well with your project, you can use the `strategy` option to limit the plugin to just one of these approaches.
|
||||
|
||||
When using Tailwind CSS v4, configure the plugin in your main stylesheet:
|
||||
|
||||
```css
|
||||
/* app.css */
|
||||
@plugin "@tailwindcss/forms" {
|
||||
strategy: "base"; /* only generate global styles; or */
|
||||
strategy: "class"; /* only generate classes */
|
||||
}
|
||||
```
|
||||
|
||||
If you are still using **Tailwind CSS v3**, configure the plugin in your `tailwind.config.js` file:
|
||||
|
||||
```js
|
||||
// tailwind.config.js
|
||||
plugins: [
|
||||
require("@tailwindcss/forms")({
|
||||
strategy: 'base', // only generate global styles
|
||||
strategy: 'class', // only generate classes
|
||||
}),
|
||||
],
|
||||
```
|
||||
|
||||
When using the `base` strategy, form elements are styled globally, and no `form-{name}` classes are generated.
|
||||
|
||||
When using the `class` strategy, form elements are not styled globally, and instead must be styled using the generated `form-{name}` classes.
|
||||
255
node_modules/@tailwindcss/forms/index.html
generated
vendored
Normal file
255
node_modules/@tailwindcss/forms/index.html
generated
vendored
Normal file
@@ -0,0 +1,255 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@tailwindcss/forms examples</title>
|
||||
<link rel="stylesheet" href="/dist/tailwind.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="px-6 text-gray-900 antialiased">
|
||||
<div class="mx-auto max-w-xl divide-y py-12 md:max-w-4xl">
|
||||
<div class="py-8">
|
||||
<h1 class="text-4xl font-bold">@tailwindcss/forms examples</h1>
|
||||
<p class="mt-2 text-lg text-gray-600">
|
||||
An opinionated form reset designed to make form elements easy to style with utility
|
||||
classes.
|
||||
</p>
|
||||
<div class="mt-4 flex space-x-4">
|
||||
<a class="text-lg underline" href="https://github.com/tailwindlabs/tailwindcss-forms"
|
||||
>Documentation</a
|
||||
>
|
||||
<a class="text-lg underline" href="/kitchen-sink.html">Kitchen Sink</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="py-12">
|
||||
<h2 class="text-2xl font-bold">Unstyled</h2>
|
||||
<p class="mt-2 text-lg text-gray-600">This is how form elements look out of the box.</p>
|
||||
<div class="mt-8 max-w-md">
|
||||
<div class="grid grid-cols-1 gap-6">
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Full name</span>
|
||||
<input type="text" class="mt-1 block w-full" placeholder="" />
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Email address</span>
|
||||
<input type="email" class="mt-1 block w-full" placeholder="john@example.com" />
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">When is your event?</span>
|
||||
<input type="date" class="mt-1 block w-full" />
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">What type of event is it?</span>
|
||||
<select class="mt-1 block w-full">
|
||||
<option>Corporate event</option>
|
||||
<option>Wedding</option>
|
||||
<option>Birthday</option>
|
||||
<option>Other</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Additional details</span>
|
||||
<textarea class="mt-1 block w-full" rows="3"></textarea>
|
||||
</label>
|
||||
<div class="block">
|
||||
<div class="mt-2">
|
||||
<div>
|
||||
<label class="inline-flex items-center">
|
||||
<input type="checkbox" checked />
|
||||
<span class="ml-2">Email me news and special offers</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="py-12">
|
||||
<h2 class="text-2xl font-bold">Simple</h2>
|
||||
<div class="mt-8 max-w-md">
|
||||
<div class="grid grid-cols-1 gap-6">
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Full name</span>
|
||||
<input
|
||||
type="text"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
||||
placeholder=""
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Email address</span>
|
||||
<input
|
||||
type="email"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
||||
placeholder="john@example.com"
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">When is your event?</span>
|
||||
<input
|
||||
type="date"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">What type of event is it?</span>
|
||||
<select
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
||||
>
|
||||
<option>Corporate event</option>
|
||||
<option>Wedding</option>
|
||||
<option>Birthday</option>
|
||||
<option>Other</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Additional details</span>
|
||||
<textarea
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
||||
rows="3"
|
||||
></textarea>
|
||||
</label>
|
||||
<div class="block">
|
||||
<div class="mt-2">
|
||||
<div>
|
||||
<label class="inline-flex items-center">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="rounded border-gray-300 text-indigo-600 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 focus:ring-offset-0"
|
||||
checked
|
||||
/>
|
||||
<span class="ml-2">Email me news and special offers</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="py-12">
|
||||
<h2 class="text-2xl font-bold">Underline</h2>
|
||||
<div class="mt-8 max-w-md">
|
||||
<div class="grid grid-cols-1 gap-6">
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Full name</span>
|
||||
<input
|
||||
type="text"
|
||||
class="mt-0 block w-full border-0 border-b-2 border-gray-200 px-0.5 focus:border-black focus:ring-0"
|
||||
placeholder=""
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Email address</span>
|
||||
<input
|
||||
type="email"
|
||||
class="mt-0 block w-full border-0 border-b-2 border-gray-200 px-0.5 focus:border-black focus:ring-0"
|
||||
placeholder="john@example.com"
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">When is your event?</span>
|
||||
<input
|
||||
type="date"
|
||||
class="mt-0 block w-full border-0 border-b-2 border-gray-200 px-0.5 focus:border-black focus:ring-0"
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">What type of event is it?</span>
|
||||
<select
|
||||
class="mt-0 block w-full border-0 border-b-2 border-gray-200 pl-0.5 pr-10 focus:border-black focus:ring-0"
|
||||
>
|
||||
<option>Corporate event</option>
|
||||
<option>Wedding</option>
|
||||
<option>Birthday</option>
|
||||
<option>Other</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Additional details</span>
|
||||
<textarea
|
||||
class="mt-0 block w-full border-0 border-b-2 border-gray-200 px-0.5 focus:border-black focus:ring-0"
|
||||
rows="2"
|
||||
></textarea>
|
||||
</label>
|
||||
<div class="block">
|
||||
<div class="mt-2">
|
||||
<div>
|
||||
<label class="inline-flex items-center">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="border-2 border-gray-300 text-black focus:border-gray-300 focus:ring-black"
|
||||
/>
|
||||
<span class="ml-2">Email me news and special offers</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="py-12">
|
||||
<h2 class="text-2xl font-bold">Solid</h2>
|
||||
<div class="mt-8 max-w-md">
|
||||
<div class="grid grid-cols-1 gap-6">
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Full name</span>
|
||||
<input
|
||||
type="text"
|
||||
class="mt-1 block w-full rounded-md border-transparent bg-gray-100 focus:border-gray-500 focus:bg-white focus:ring-0"
|
||||
placeholder=""
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Email address</span>
|
||||
<input
|
||||
type="email"
|
||||
class="mt-1 block w-full rounded-md border-transparent bg-gray-100 focus:border-gray-500 focus:bg-white focus:ring-0"
|
||||
placeholder="john@example.com"
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">When is your event?</span>
|
||||
<input
|
||||
type="date"
|
||||
class="mt-1 block w-full rounded-md border-transparent bg-gray-100 focus:border-gray-500 focus:bg-white focus:ring-0"
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">What type of event is it?</span>
|
||||
<select
|
||||
class="mt-1 block w-full rounded-md border-transparent bg-gray-100 focus:border-gray-500 focus:bg-white focus:ring-0"
|
||||
>
|
||||
<option>Corporate event</option>
|
||||
<option>Wedding</option>
|
||||
<option>Birthday</option>
|
||||
<option>Other</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Additional details</span>
|
||||
<textarea
|
||||
class="mt-1 block w-full rounded-md border-transparent bg-gray-100 focus:border-gray-500 focus:bg-white focus:ring-0"
|
||||
rows="3"
|
||||
></textarea>
|
||||
</label>
|
||||
<div class="block">
|
||||
<div class="mt-2">
|
||||
<div>
|
||||
<label class="inline-flex items-center">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="rounded border-transparent bg-gray-200 text-gray-700 focus:border-transparent focus:bg-gray-200 focus:ring-1 focus:ring-gray-500 focus:ring-offset-2"
|
||||
/>
|
||||
<span class="ml-2">Email me news and special offers</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
222
node_modules/@tailwindcss/forms/kitchen-sink.html
generated
vendored
Normal file
222
node_modules/@tailwindcss/forms/kitchen-sink.html
generated
vendored
Normal file
@@ -0,0 +1,222 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@tailwindcss/forms Kitchen Sink</title>
|
||||
<link rel="stylesheet" href="/dist/tailwind.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="px-6 text-gray-900 antialiased">
|
||||
<div class="mx-auto max-w-xl py-12 md:max-w-4xl">
|
||||
<h2 class="text-2xl font-bold">Reset styles</h2>
|
||||
<p class="mt-2 text-lg text-gray-500">
|
||||
These are form elements this plugin styles by default.
|
||||
</p>
|
||||
<div class="mt-8 grid grid-cols-1 items-start gap-6 md:grid-cols-2">
|
||||
<div class="grid grid-cols-1 gap-6">
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (text)</span>
|
||||
<input
|
||||
type="text"
|
||||
class="form-input mt-1 block w-full"
|
||||
placeholder="john@example.com"
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (email)</span>
|
||||
<input
|
||||
type="email"
|
||||
class="form-input mt-1 block w-full"
|
||||
placeholder="john@example.com"
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (email, multiple)</span>
|
||||
<input
|
||||
type="email"
|
||||
multiple
|
||||
class="form-input mt-1 block w-full"
|
||||
placeholder="john@example.com"
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (password)</span>
|
||||
<input
|
||||
type="password"
|
||||
class="form-input mt-1 block w-full"
|
||||
placeholder="john@example.com"
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (date)</span>
|
||||
<input type="date" class="form-input mt-1 block w-full" />
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (datetime-local)</span>
|
||||
<input type="datetime-local" class="form-input mt-1 block w-full" />
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (month)</span>
|
||||
<input type="month" class="form-input mt-1 block w-full" />
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (number)</span>
|
||||
<input type="number" class="form-input mt-1 block w-full" />
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (search)</span>
|
||||
<input type="search" class="form-input mt-1 block w-full" />
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (time)</span>
|
||||
<input type="time" class="form-input mt-1 block w-full" />
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (week)</span>
|
||||
<input type="week" class="form-input mt-1 block w-full" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 gap-6">
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (tel)</span>
|
||||
<input
|
||||
type="tel"
|
||||
multiple
|
||||
class="form-input mt-1 block w-full"
|
||||
placeholder="john@example.com"
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (url)</span>
|
||||
<input
|
||||
type="url"
|
||||
multiple
|
||||
class="form-input mt-1 block w-full"
|
||||
placeholder="john@example.com"
|
||||
/>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Select</span>
|
||||
<select class="form-select mt-1 block w-full">
|
||||
<option>Option 1</option>
|
||||
<option>Option 2</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Select (single, with size)</span>
|
||||
<select class="form-select mt-1 block w-full" size="3">
|
||||
<option>Option 1</option>
|
||||
<option>Option 2</option>
|
||||
<option>Option 3</option>
|
||||
<option>Option 4</option>
|
||||
<option>Option 5</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Select (multiple)</span>
|
||||
<select class="form-multiselect mt-1 block w-full" multiple>
|
||||
<option>Option 1</option>
|
||||
<option>Option 2</option>
|
||||
<option>Option 3</option>
|
||||
<option>Option 4</option>
|
||||
<option>Option 5</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Select (multiple, with size)</span>
|
||||
<select class="form-multiselect mt-1 block w-full" multiple size="3">
|
||||
<option>Option 1</option>
|
||||
<option>Option 2</option>
|
||||
<option>Option 3</option>
|
||||
<option>Option 4</option>
|
||||
<option>Option 5</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Textarea</span>
|
||||
<textarea
|
||||
class="form-textarea mt-1 block h-24 w-full"
|
||||
rows="3"
|
||||
placeholder="Enter some long form content."
|
||||
></textarea>
|
||||
</label>
|
||||
<fieldset class="block">
|
||||
<legend class="text-gray-700">Checkboxes</legend>
|
||||
<div class="mt-2">
|
||||
<div>
|
||||
<label class="inline-flex items-center">
|
||||
<input class="form-checkbox" type="checkbox" checked />
|
||||
<span class="ml-2">Option 1</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label class="inline-flex items-center">
|
||||
<input class="form-checkbox" type="checkbox" />
|
||||
<span class="ml-2">Option 2</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label class="inline-flex items-center">
|
||||
<input class="form-checkbox" type="checkbox" />
|
||||
<span class="ml-2">Option 3</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="block">
|
||||
<legend class="text-gray-700">Radio Buttons</legend>
|
||||
<div class="mt-2">
|
||||
<div>
|
||||
<label class="inline-flex items-center">
|
||||
<input class="form-radio" type="radio" checked name="radio-direct" value="1" />
|
||||
<span class="ml-2">Option 1</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label class="inline-flex items-center">
|
||||
<input class="form-radio" type="radio" name="radio-direct" value="2" />
|
||||
<span class="ml-2">Option 2</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label class="inline-flex items-center">
|
||||
<input class="form-radio" type="radio" name="radio-direct" value="3" />
|
||||
<span class="ml-2">Option 3</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mx-auto max-w-4xl py-12">
|
||||
<h2 class="text-2xl font-bold">Untouched</h2>
|
||||
<p class="mt-2 text-lg text-gray-500">
|
||||
These are form elements we don't handle (yet?), but we use this to make sure we haven't
|
||||
accidentally styled them by mistake.
|
||||
</p>
|
||||
<div class="mt-8 grid grid-cols-2 items-start gap-6">
|
||||
<div class="grid grid-cols-1 gap-6">
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (range)</span>
|
||||
<input type="range" class="mt-1 block w-full" />
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (color)</span>
|
||||
<input type="color" class="mt-1 block w-full" />
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (file)</span>
|
||||
<input type="file" class="mt-1 block w-full" />
|
||||
</label>
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Input (file, multiple)</span>
|
||||
<input type="file" multiple class="mt-1 block w-full" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
45
node_modules/@tailwindcss/forms/package.json
generated
vendored
Normal file
45
node_modules/@tailwindcss/forms/package.json
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "@tailwindcss/forms",
|
||||
"version": "0.5.11",
|
||||
"main": "src/index.js",
|
||||
"types": "src/index.d.ts",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/tailwindlabs/tailwindcss-forms",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 100,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5",
|
||||
"plugins": [
|
||||
"prettier-plugin-tailwindcss"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "concurrently \"npm run serve\" \"npm run watch\"",
|
||||
"serve": "live-server .",
|
||||
"watch": "npm run build -- -w",
|
||||
"build": "tailwindcss -o dist/tailwind.css",
|
||||
"test": "exit 0",
|
||||
"release-channel": "node ./scripts/release-channel.js",
|
||||
"release-notes": "node ./scripts/release-notes.js",
|
||||
"format": "prettier . --write"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.4.6",
|
||||
"concurrently": "^5.3.0",
|
||||
"live-server": "^1.2.2",
|
||||
"postcss": "^8.4.13",
|
||||
"prettier": "^3.3.3",
|
||||
"prettier-plugin-tailwindcss": "^0.6.8",
|
||||
"tailwindcss": "^3.0.24"
|
||||
},
|
||||
"dependencies": {
|
||||
"mini-svg-data-uri": "^1.2.3"
|
||||
}
|
||||
}
|
||||
18
node_modules/@tailwindcss/forms/scripts/release-channel.js
generated
vendored
Normal file
18
node_modules/@tailwindcss/forms/scripts/release-channel.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
// Given a version, figure out what the release channel is so that we can publish to the correct
|
||||
// channel on npm.
|
||||
//
|
||||
// E.g.:
|
||||
//
|
||||
// 1.2.3 -> latest (default)
|
||||
// 0.0.0-insiders.ffaa88 -> insiders
|
||||
// 4.1.0-alpha.4 -> alpha
|
||||
|
||||
let version =
|
||||
process.argv[2] || process.env.npm_package_version || require('../package.json').version
|
||||
|
||||
let match = /\d+\.\d+\.\d+-(.*)\.\d+/g.exec(version)
|
||||
if (match) {
|
||||
console.log(match[1])
|
||||
} else {
|
||||
console.log('latest')
|
||||
}
|
||||
21
node_modules/@tailwindcss/forms/scripts/release-notes.js
generated
vendored
Normal file
21
node_modules/@tailwindcss/forms/scripts/release-notes.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// Given a version, figure out what the release notes are so that we can use this to pre-fill the
|
||||
// relase notes on a GitHub release for the current version.
|
||||
|
||||
let path = require('path')
|
||||
let fs = require('fs')
|
||||
|
||||
let version =
|
||||
process.argv[2] || process.env.npm_package_version || require('../package.json').version
|
||||
|
||||
let changelog = fs.readFileSync(path.resolve(__dirname, '..', 'CHANGELOG.md'), 'utf8')
|
||||
let match = new RegExp(
|
||||
`## \\[${version}\\] - (.*)\\n\\n([\\s\\S]*?)\\n(?:(?:##\\s)|(?:\\[))`,
|
||||
'g'
|
||||
).exec(changelog)
|
||||
|
||||
if (match) {
|
||||
let [, date, notes] = match
|
||||
console.log(notes.trim())
|
||||
} else {
|
||||
console.log(`Placeholder release notes for version: v${version}`)
|
||||
}
|
||||
9
node_modules/@tailwindcss/forms/src/index.d.ts
generated
vendored
Normal file
9
node_modules/@tailwindcss/forms/src/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
declare function plugin(options?: Partial<{ strategy: 'base' | 'class' }>): {
|
||||
handler: () => void
|
||||
}
|
||||
|
||||
declare namespace plugin {
|
||||
const __isOptionsFunction: true
|
||||
}
|
||||
|
||||
export = plugin
|
||||
368
node_modules/@tailwindcss/forms/src/index.js
generated
vendored
Normal file
368
node_modules/@tailwindcss/forms/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,368 @@
|
||||
const svgToDataUri = require('mini-svg-data-uri')
|
||||
const plugin = require('tailwindcss/plugin')
|
||||
const defaultTheme = require('tailwindcss/defaultTheme')
|
||||
const colors = require('tailwindcss/colors')
|
||||
const [baseFontSize, { lineHeight: baseLineHeight }] = defaultTheme.fontSize.base
|
||||
const { spacing, borderWidth, borderRadius } = defaultTheme
|
||||
|
||||
function resolveColor(color, opacityVariableName) {
|
||||
return color.replace('<alpha-value>', `var(${opacityVariableName}, 1)`)
|
||||
}
|
||||
|
||||
const forms = plugin.withOptions(function (options = { strategy: undefined }) {
|
||||
return function ({ addBase, addComponents, theme }) {
|
||||
function resolveChevronColor(color, fallback) {
|
||||
let resolved = theme(color)
|
||||
|
||||
if (!resolved || resolved.includes('var(')) {
|
||||
return fallback
|
||||
}
|
||||
|
||||
return resolved.replace('<alpha-value>', '1')
|
||||
}
|
||||
|
||||
const strategy = options.strategy === undefined ? ['base', 'class'] : [options.strategy]
|
||||
|
||||
const rules = [
|
||||
{
|
||||
base: [
|
||||
"input:where([type='text'])",
|
||||
'input:where(:not([type]))',
|
||||
"input:where([type='email'])",
|
||||
"input:where([type='url'])",
|
||||
"input:where([type='password'])",
|
||||
"input:where([type='number'])",
|
||||
"input:where([type='date'])",
|
||||
"input:where([type='datetime-local'])",
|
||||
"input:where([type='month'])",
|
||||
"input:where([type='search'])",
|
||||
"input:where([type='tel'])",
|
||||
"input:where([type='time'])",
|
||||
"input:where([type='week'])",
|
||||
'select:where([multiple])',
|
||||
'textarea',
|
||||
'select',
|
||||
],
|
||||
class: ['.form-input', '.form-textarea', '.form-select', '.form-multiselect'],
|
||||
styles: {
|
||||
appearance: 'none',
|
||||
'background-color': '#fff',
|
||||
'border-color': resolveColor(
|
||||
theme('colors.gray.500', colors.gray[500]),
|
||||
'--tw-border-opacity'
|
||||
),
|
||||
'border-width': borderWidth['DEFAULT'],
|
||||
'border-radius': borderRadius.none,
|
||||
'padding-top': spacing[2],
|
||||
'padding-right': spacing[3],
|
||||
'padding-bottom': spacing[2],
|
||||
'padding-left': spacing[3],
|
||||
'font-size': baseFontSize,
|
||||
'line-height': baseLineHeight,
|
||||
'--tw-shadow': '0 0 #0000',
|
||||
'&:focus': {
|
||||
outline: '2px solid transparent',
|
||||
'outline-offset': '2px',
|
||||
'--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
|
||||
'--tw-ring-offset-width': '0px',
|
||||
'--tw-ring-offset-color': '#fff',
|
||||
'--tw-ring-color': resolveColor(
|
||||
theme('colors.blue.600', colors.blue[600]),
|
||||
'--tw-ring-opacity'
|
||||
),
|
||||
'--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`,
|
||||
'--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)`,
|
||||
'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`,
|
||||
'border-color': resolveColor(
|
||||
theme('colors.blue.600', colors.blue[600]),
|
||||
'--tw-border-opacity'
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
base: ['input::placeholder', 'textarea::placeholder'],
|
||||
class: ['.form-input::placeholder', '.form-textarea::placeholder'],
|
||||
styles: {
|
||||
color: resolveColor(theme('colors.gray.500', colors.gray[500]), '--tw-text-opacity'),
|
||||
opacity: '1',
|
||||
},
|
||||
},
|
||||
{
|
||||
base: ['::-webkit-datetime-edit-fields-wrapper'],
|
||||
class: ['.form-input::-webkit-datetime-edit-fields-wrapper'],
|
||||
styles: {
|
||||
padding: '0',
|
||||
},
|
||||
},
|
||||
{
|
||||
// Unfortunate hack until https://bugs.webkit.org/show_bug.cgi?id=198959 is fixed.
|
||||
// This sucks because users can't change line-height with a utility on date inputs now.
|
||||
// Reference: https://github.com/twbs/bootstrap/pull/31993
|
||||
base: ['::-webkit-date-and-time-value'],
|
||||
class: ['.form-input::-webkit-date-and-time-value'],
|
||||
styles: {
|
||||
'min-height': '1.5em',
|
||||
},
|
||||
},
|
||||
{
|
||||
// In Safari on iOS date and time inputs are centered instead of left-aligned and can't be
|
||||
// changed with `text-align` utilities on the input by default. Resetting this to `inherit`
|
||||
// makes them left-aligned by default and makes it possible to override the alignment with
|
||||
// utility classes without using an arbitrary variant to target the pseudo-elements.
|
||||
base: ['::-webkit-date-and-time-value'],
|
||||
class: ['.form-input::-webkit-date-and-time-value'],
|
||||
styles: {
|
||||
'text-align': 'inherit',
|
||||
},
|
||||
},
|
||||
{
|
||||
// In Safari on macOS date time inputs that are set to `display: block` have unexpected
|
||||
// extra bottom spacing. This can be corrected by setting the `::-webkit-datetime-edit`
|
||||
// pseudo-element to `display: inline-flex`, instead of the browser default of
|
||||
// `display: inline-block`.
|
||||
base: ['::-webkit-datetime-edit'],
|
||||
class: ['.form-input::-webkit-datetime-edit'],
|
||||
styles: {
|
||||
display: 'inline-flex',
|
||||
},
|
||||
},
|
||||
{
|
||||
// In Safari on macOS date time inputs are 4px taller than normal inputs
|
||||
// This is because there is extra padding on the datetime-edit and datetime-edit-{part}-field pseudo elements
|
||||
// See https://github.com/tailwindlabs/tailwindcss-forms/issues/95
|
||||
base: [
|
||||
'::-webkit-datetime-edit',
|
||||
'::-webkit-datetime-edit-year-field',
|
||||
'::-webkit-datetime-edit-month-field',
|
||||
'::-webkit-datetime-edit-day-field',
|
||||
'::-webkit-datetime-edit-hour-field',
|
||||
'::-webkit-datetime-edit-minute-field',
|
||||
'::-webkit-datetime-edit-second-field',
|
||||
'::-webkit-datetime-edit-millisecond-field',
|
||||
'::-webkit-datetime-edit-meridiem-field',
|
||||
],
|
||||
class: [
|
||||
'.form-input::-webkit-datetime-edit',
|
||||
'.form-input::-webkit-datetime-edit-year-field',
|
||||
'.form-input::-webkit-datetime-edit-month-field',
|
||||
'.form-input::-webkit-datetime-edit-day-field',
|
||||
'.form-input::-webkit-datetime-edit-hour-field',
|
||||
'.form-input::-webkit-datetime-edit-minute-field',
|
||||
'.form-input::-webkit-datetime-edit-second-field',
|
||||
'.form-input::-webkit-datetime-edit-millisecond-field',
|
||||
'.form-input::-webkit-datetime-edit-meridiem-field',
|
||||
],
|
||||
styles: {
|
||||
'padding-top': 0,
|
||||
'padding-bottom': 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
base: ['select'],
|
||||
class: ['.form-select'],
|
||||
styles: {
|
||||
'background-image': `url("${svgToDataUri(
|
||||
`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="${resolveChevronColor(
|
||||
'colors.gray.500',
|
||||
colors.gray[500]
|
||||
)}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/></svg>`
|
||||
)}")`,
|
||||
'background-position': `right ${spacing[2]} center`,
|
||||
'background-repeat': `no-repeat`,
|
||||
'background-size': `1.5em 1.5em`,
|
||||
'padding-right': spacing[10],
|
||||
'print-color-adjust': `exact`,
|
||||
},
|
||||
},
|
||||
{
|
||||
base: ['select:where([multiple])', 'select:where([size]:not([size="1"]))'],
|
||||
class: ['.form-select:where([size]:not([size="1"]))'],
|
||||
styles: {
|
||||
'background-image': 'initial',
|
||||
'background-position': 'initial',
|
||||
'background-repeat': 'unset',
|
||||
'background-size': 'initial',
|
||||
'padding-right': spacing[3],
|
||||
'print-color-adjust': 'unset',
|
||||
},
|
||||
},
|
||||
{
|
||||
base: [`input:where([type='checkbox'])`, `input:where([type='radio'])`],
|
||||
class: ['.form-checkbox', '.form-radio'],
|
||||
styles: {
|
||||
appearance: 'none',
|
||||
padding: '0',
|
||||
'print-color-adjust': 'exact',
|
||||
display: 'inline-block',
|
||||
'vertical-align': 'middle',
|
||||
'background-origin': 'border-box',
|
||||
'user-select': 'none',
|
||||
'flex-shrink': '0',
|
||||
height: spacing[4],
|
||||
width: spacing[4],
|
||||
color: resolveColor(theme('colors.blue.600', colors.blue[600]), '--tw-text-opacity'),
|
||||
'background-color': '#fff',
|
||||
'border-color': resolveColor(
|
||||
theme('colors.gray.500', colors.gray[500]),
|
||||
'--tw-border-opacity'
|
||||
),
|
||||
'border-width': borderWidth['DEFAULT'],
|
||||
'--tw-shadow': '0 0 #0000',
|
||||
},
|
||||
},
|
||||
{
|
||||
base: [`input:where([type='checkbox'])`],
|
||||
class: ['.form-checkbox'],
|
||||
styles: {
|
||||
'border-radius': borderRadius['none'],
|
||||
},
|
||||
},
|
||||
{
|
||||
base: [`input:where([type='radio'])`],
|
||||
class: ['.form-radio'],
|
||||
styles: {
|
||||
'border-radius': '100%',
|
||||
},
|
||||
},
|
||||
{
|
||||
base: [`input:where([type='checkbox']):focus`, `input:where([type='radio']):focus`],
|
||||
class: ['.form-checkbox:focus', '.form-radio:focus'],
|
||||
styles: {
|
||||
outline: '2px solid transparent',
|
||||
'outline-offset': '2px',
|
||||
'--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
|
||||
'--tw-ring-offset-width': '2px',
|
||||
'--tw-ring-offset-color': '#fff',
|
||||
'--tw-ring-color': resolveColor(
|
||||
theme('colors.blue.600', colors.blue[600]),
|
||||
'--tw-ring-opacity'
|
||||
),
|
||||
'--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`,
|
||||
'--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)`,
|
||||
'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`,
|
||||
},
|
||||
},
|
||||
{
|
||||
base: [`input:where([type='checkbox']):checked`, `input:where([type='radio']):checked`],
|
||||
class: ['.form-checkbox:checked', '.form-radio:checked'],
|
||||
styles: {
|
||||
'border-color': `transparent`,
|
||||
'background-color': `currentColor`,
|
||||
'background-size': `100% 100%`,
|
||||
'background-position': `center`,
|
||||
'background-repeat': `no-repeat`,
|
||||
},
|
||||
},
|
||||
{
|
||||
base: [`input:where([type='checkbox']):checked`],
|
||||
class: ['.form-checkbox:checked'],
|
||||
styles: {
|
||||
'background-image': `url("${svgToDataUri(
|
||||
`<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>`
|
||||
)}")`,
|
||||
|
||||
'@media (forced-colors: active) ': {
|
||||
appearance: 'auto',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
base: [`input:where([type='radio']):checked`],
|
||||
class: ['.form-radio:checked'],
|
||||
styles: {
|
||||
'background-image': `url("${svgToDataUri(
|
||||
`<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>`
|
||||
)}")`,
|
||||
|
||||
'@media (forced-colors: active) ': {
|
||||
appearance: 'auto',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
base: [
|
||||
`input:where([type='checkbox']):checked:hover`,
|
||||
`input:where([type='checkbox']):checked:focus`,
|
||||
`input:where([type='radio']):checked:hover`,
|
||||
`input:where([type='radio']):checked:focus`,
|
||||
],
|
||||
class: [
|
||||
'.form-checkbox:checked:hover',
|
||||
'.form-checkbox:checked:focus',
|
||||
'.form-radio:checked:hover',
|
||||
'.form-radio:checked:focus',
|
||||
],
|
||||
styles: {
|
||||
'border-color': 'transparent',
|
||||
'background-color': 'currentColor',
|
||||
},
|
||||
},
|
||||
{
|
||||
base: [`input:where([type='checkbox']):indeterminate`],
|
||||
class: ['.form-checkbox:indeterminate'],
|
||||
styles: {
|
||||
'background-image': `url("${svgToDataUri(
|
||||
`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8h8"/></svg>`
|
||||
)}")`,
|
||||
'border-color': `transparent`,
|
||||
'background-color': `currentColor`,
|
||||
'background-size': `100% 100%`,
|
||||
'background-position': `center`,
|
||||
'background-repeat': `no-repeat`,
|
||||
|
||||
'@media (forced-colors: active) ': {
|
||||
appearance: 'auto',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
base: [`input:where([type='checkbox']):indeterminate:hover`, `input:where([type='checkbox']):indeterminate:focus`],
|
||||
class: ['.form-checkbox:indeterminate:hover', '.form-checkbox:indeterminate:focus'],
|
||||
styles: {
|
||||
'border-color': 'transparent',
|
||||
'background-color': 'currentColor',
|
||||
},
|
||||
},
|
||||
{
|
||||
base: [`input:where([type='file'])`],
|
||||
class: null,
|
||||
styles: {
|
||||
background: 'unset',
|
||||
'border-color': 'inherit',
|
||||
'border-width': '0',
|
||||
'border-radius': '0',
|
||||
padding: '0',
|
||||
'font-size': 'unset',
|
||||
'line-height': 'inherit',
|
||||
},
|
||||
},
|
||||
{
|
||||
base: [`input:where([type='file']):focus`],
|
||||
class: null,
|
||||
styles: {
|
||||
outline: [`1px solid ButtonText`, `1px auto -webkit-focus-ring-color`],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
const getStrategyRules = (strategy) =>
|
||||
rules
|
||||
.map((rule) => {
|
||||
if (rule[strategy] === null) return null
|
||||
|
||||
return { [rule[strategy]]: rule.styles }
|
||||
})
|
||||
.filter(Boolean)
|
||||
|
||||
if (strategy.includes('base')) {
|
||||
addBase(getStrategyRules('base'))
|
||||
}
|
||||
|
||||
if (strategy.includes('class')) {
|
||||
addComponents(getStrategyRules('class'))
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = forms
|
||||
9
node_modules/@tailwindcss/forms/tailwind.config.js
generated
vendored
Normal file
9
node_modules/@tailwindcss/forms/tailwind.config.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
module.exports = {
|
||||
content: ['./index.html', './kitchen-sink.html'],
|
||||
theme: {
|
||||
extend: {
|
||||
//
|
||||
},
|
||||
},
|
||||
plugins: [require('./src')],
|
||||
}
|
||||
21
node_modules/@tailwindcss/node/LICENSE
generated
vendored
Normal file
21
node_modules/@tailwindcss/node/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Tailwind Labs, Inc.
|
||||
|
||||
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.
|
||||
36
node_modules/@tailwindcss/node/README.md
generated
vendored
Normal file
36
node_modules/@tailwindcss/node/README.md
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<p align="center">
|
||||
<a href="https://tailwindcss.com" target="_blank">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-dark.svg">
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg">
|
||||
<img alt="Tailwind CSS" src="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg" width="350" height="70" style="max-width: 100%;">
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
A utility-first CSS framework for rapidly building custom user interfaces.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/tailwindlabs/tailwindcss/actions"><img src="https://img.shields.io/github/actions/workflow/status/tailwindlabs/tailwindcss/ci.yml?branch=main" alt="Build Status"></a>
|
||||
<a href="https://www.npmjs.com/package/tailwindcss"><img src="https://img.shields.io/npm/dt/tailwindcss.svg" alt="Total Downloads"></a>
|
||||
<a href="https://github.com/tailwindlabs/tailwindcss/releases"><img src="https://img.shields.io/npm/v/tailwindcss.svg" alt="Latest Release"></a>
|
||||
<a href="https://github.com/tailwindlabs/tailwindcss/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/tailwindcss.svg" alt="License"></a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## Documentation
|
||||
|
||||
For full documentation, visit [tailwindcss.com](https://tailwindcss.com).
|
||||
|
||||
## Community
|
||||
|
||||
For help, discussion about best practices, or feature ideas:
|
||||
|
||||
[Discuss Tailwind CSS on GitHub](https://github.com/tailwindlabs/tailwindcss/discussions)
|
||||
|
||||
## Contributing
|
||||
|
||||
If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindlabs/tailwindcss/blob/main/.github/CONTRIBUTING.md) **before submitting a pull request**.
|
||||
6
node_modules/@tailwindcss/node/dist/esm-cache.loader.d.mts
generated
vendored
Normal file
6
node_modules/@tailwindcss/node/dist/esm-cache.loader.d.mts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { ResolveHook, ResolveHookSync } from 'node:module';
|
||||
|
||||
declare let resolve: ResolveHook;
|
||||
declare let resolveSync: ResolveHookSync;
|
||||
|
||||
export { resolve, resolveSync };
|
||||
1
node_modules/@tailwindcss/node/dist/esm-cache.loader.mjs
generated
vendored
Normal file
1
node_modules/@tailwindcss/node/dist/esm-cache.loader.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{isBuiltin as a}from"module";var u=async(r,e,o)=>{let t=await o(r,e);return l(e,t)},i=(r,e,o)=>{let t=o(r,e);return l(e,t)};function l(r,e){try{if(e.url===import.meta.url||a(e.url)||!r.parentURL)return e;let t=new URL(r.parentURL).searchParams.get("id");if(t===null)return e;let n=new URL(e.url);return n.searchParams.set("id",t),{...e,url:`${n}`}}catch{return e}}export{u as resolve,i as resolveSync};
|
||||
262
node_modules/@tailwindcss/node/dist/index.d.mts
generated
vendored
Normal file
262
node_modules/@tailwindcss/node/dist/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,262 @@
|
||||
import { AstNode as AstNode$1 } from './ast';
|
||||
import { Candidate, Variant } from './candidate';
|
||||
import { compileAstNodes } from './compile';
|
||||
import { ClassEntry, VariantEntry, CanonicalizeOptions } from './intellisense';
|
||||
import { Theme } from './theme';
|
||||
import { Utilities } from './utilities';
|
||||
import { Variants } from './variants';
|
||||
import * as tailwindcss from 'tailwindcss';
|
||||
import { Polyfills, Features } from 'tailwindcss';
|
||||
export { Features, Polyfills } from 'tailwindcss';
|
||||
|
||||
declare const DEBUG: boolean;
|
||||
|
||||
declare const env_DEBUG: typeof DEBUG;
|
||||
declare namespace env {
|
||||
export { env_DEBUG as DEBUG };
|
||||
}
|
||||
|
||||
declare const enum CompileAstFlags {
|
||||
None = 0,
|
||||
RespectImportant = 1
|
||||
}
|
||||
type DesignSystem = {
|
||||
theme: Theme;
|
||||
utilities: Utilities;
|
||||
variants: Variants;
|
||||
invalidCandidates: Set<string>;
|
||||
important: boolean;
|
||||
getClassOrder(classes: string[]): [string, bigint | null][];
|
||||
getClassList(): ClassEntry[];
|
||||
getVariants(): VariantEntry[];
|
||||
parseCandidate(candidate: string): Readonly<Candidate>[];
|
||||
parseVariant(variant: string): Readonly<Variant> | null;
|
||||
compileAstNodes(candidate: Candidate, flags?: CompileAstFlags): ReturnType<typeof compileAstNodes>;
|
||||
printCandidate(candidate: Candidate): string;
|
||||
printVariant(variant: Variant): string;
|
||||
getVariantOrder(): Map<Variant, number>;
|
||||
resolveThemeValue(path: string, forceInline?: boolean): string | undefined;
|
||||
trackUsedVariables(raw: string): void;
|
||||
canonicalizeCandidates(candidates: string[], options?: CanonicalizeOptions): string[];
|
||||
candidatesToCss(classes: string[]): (string | null)[];
|
||||
candidatesToAst(classes: string[]): AstNode$1[][];
|
||||
storage: Record<symbol, unknown>;
|
||||
};
|
||||
|
||||
/**
|
||||
* The source code for one or more nodes in the AST
|
||||
*
|
||||
* This generally corresponds to a stylesheet
|
||||
*/
|
||||
interface Source {
|
||||
/**
|
||||
* The path to the file that contains the referenced source code
|
||||
*
|
||||
* If this references the *output* source code, this is `null`.
|
||||
*/
|
||||
file: string | null;
|
||||
/**
|
||||
* The referenced source code
|
||||
*/
|
||||
code: string;
|
||||
}
|
||||
/**
|
||||
* The file and offsets within it that this node covers
|
||||
*
|
||||
* This can represent either:
|
||||
* - A location in the original CSS which caused this node to be created
|
||||
* - A location in the output CSS where this node resides
|
||||
*/
|
||||
type SourceLocation = [source: Source, start: number, end: number];
|
||||
|
||||
/**
|
||||
* Line offset tables are the key to generating our source maps. They allow us
|
||||
* to store indexes with our AST nodes and later convert them into positions as
|
||||
* when given the source that the indexes refer to.
|
||||
*/
|
||||
/**
|
||||
* A position in source code
|
||||
*
|
||||
* https://tc39.es/ecma426/#sec-position-record-type
|
||||
*/
|
||||
interface Position {
|
||||
/** The line number, one-based */
|
||||
line: number;
|
||||
/** The column/character number, one-based */
|
||||
column: number;
|
||||
}
|
||||
|
||||
interface OriginalPosition extends Position {
|
||||
source: DecodedSource;
|
||||
}
|
||||
/**
|
||||
* A "decoded" sourcemap
|
||||
*
|
||||
* @see https://tc39.es/ecma426/#decoded-source-map-record
|
||||
*/
|
||||
interface DecodedSourceMap {
|
||||
file: string | null;
|
||||
sources: DecodedSource[];
|
||||
mappings: DecodedMapping[];
|
||||
}
|
||||
/**
|
||||
* A "decoded" source
|
||||
*
|
||||
* @see https://tc39.es/ecma426/#decoded-source-record
|
||||
*/
|
||||
interface DecodedSource {
|
||||
url: string | null;
|
||||
content: string | null;
|
||||
ignore: boolean;
|
||||
}
|
||||
/**
|
||||
* A "decoded" mapping
|
||||
*
|
||||
* @see https://tc39.es/ecma426/#decoded-mapping-record
|
||||
*/
|
||||
interface DecodedMapping {
|
||||
originalPosition: OriginalPosition | null;
|
||||
generatedPosition: Position;
|
||||
name: string | null;
|
||||
}
|
||||
|
||||
type StyleRule = {
|
||||
kind: 'rule';
|
||||
selector: string;
|
||||
nodes: AstNode[];
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type AtRule = {
|
||||
kind: 'at-rule';
|
||||
name: string;
|
||||
params: string;
|
||||
nodes: AstNode[];
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type Declaration = {
|
||||
kind: 'declaration';
|
||||
property: string;
|
||||
value: string | undefined;
|
||||
important: boolean;
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type Comment = {
|
||||
kind: 'comment';
|
||||
value: string;
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type Context = {
|
||||
kind: 'context';
|
||||
context: Record<string, string | boolean>;
|
||||
nodes: AstNode[];
|
||||
src?: undefined;
|
||||
dst?: undefined;
|
||||
};
|
||||
type AtRoot = {
|
||||
kind: 'at-root';
|
||||
nodes: AstNode[];
|
||||
src?: undefined;
|
||||
dst?: undefined;
|
||||
};
|
||||
type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot;
|
||||
|
||||
type Resolver = (id: string, base: string) => Promise<string | false | undefined>;
|
||||
interface CompileOptions {
|
||||
base: string;
|
||||
from?: string;
|
||||
onDependency: (path: string) => void;
|
||||
shouldRewriteUrls?: boolean;
|
||||
polyfills?: Polyfills;
|
||||
customCssResolver?: Resolver;
|
||||
customJsResolver?: Resolver;
|
||||
}
|
||||
declare function compileAst(ast: AstNode[], options: CompileOptions): Promise<{
|
||||
sources: {
|
||||
base: string;
|
||||
pattern: string;
|
||||
negated: boolean;
|
||||
}[];
|
||||
root: "none" | {
|
||||
base: string;
|
||||
pattern: string;
|
||||
} | null;
|
||||
features: Features;
|
||||
build(candidates: string[]): AstNode[];
|
||||
}>;
|
||||
declare function compile(css: string, options: CompileOptions): Promise<{
|
||||
sources: {
|
||||
base: string;
|
||||
pattern: string;
|
||||
negated: boolean;
|
||||
}[];
|
||||
root: "none" | {
|
||||
base: string;
|
||||
pattern: string;
|
||||
} | null;
|
||||
features: Features;
|
||||
build(candidates: string[]): string;
|
||||
buildSourceMap(): tailwindcss.DecodedSourceMap;
|
||||
}>;
|
||||
declare function __unstable__loadDesignSystem(css: string, { base }: {
|
||||
base: string;
|
||||
}): Promise<DesignSystem>;
|
||||
declare function loadModule(id: string, base: string, onDependency: (path: string) => void, customJsResolver?: Resolver): Promise<{
|
||||
path: string;
|
||||
base: string;
|
||||
module: any;
|
||||
}>;
|
||||
|
||||
declare class Instrumentation implements Disposable {
|
||||
#private;
|
||||
private shouldReport;
|
||||
private defaultFlush;
|
||||
constructor(shouldReport?: boolean, defaultFlush?: (message: string) => undefined);
|
||||
hit(label: string): void;
|
||||
start(label: string): void;
|
||||
end(label: string): void;
|
||||
track(label: string): {
|
||||
[Symbol.dispose]: () => void;
|
||||
[Symbol.asyncDispose]: () => void;
|
||||
};
|
||||
span<T>(label: string, fn: () => T): T;
|
||||
reset(): void;
|
||||
report(flush?: (message: string) => undefined): void;
|
||||
[Symbol.dispose](): void;
|
||||
}
|
||||
|
||||
declare function normalizePath(originalPath: string): string;
|
||||
|
||||
interface OptimizeOptions {
|
||||
/**
|
||||
* The file being transformed
|
||||
*/
|
||||
file?: string;
|
||||
/**
|
||||
* Enabled minified output
|
||||
*/
|
||||
minify?: boolean;
|
||||
/**
|
||||
* The output source map before optimization
|
||||
*
|
||||
* If omitted a resulting source map will not be available
|
||||
*/
|
||||
map?: string;
|
||||
}
|
||||
interface TransformResult {
|
||||
code: string;
|
||||
map: string | undefined;
|
||||
}
|
||||
declare function optimize(input: string, { file, minify, map }?: OptimizeOptions): TransformResult;
|
||||
|
||||
interface SourceMap {
|
||||
readonly raw: string;
|
||||
readonly inline: string;
|
||||
comment(url: string): string;
|
||||
}
|
||||
declare function toSourceMap(map: DecodedSourceMap | string): SourceMap;
|
||||
|
||||
export { type CompileOptions, type DecodedSource, type DecodedSourceMap, Instrumentation, type OptimizeOptions, type Resolver, type SourceMap, type TransformResult, __unstable__loadDesignSystem, compile, compileAst, env, loadModule, normalizePath, optimize, toSourceMap };
|
||||
262
node_modules/@tailwindcss/node/dist/index.d.ts
generated
vendored
Normal file
262
node_modules/@tailwindcss/node/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,262 @@
|
||||
import { AstNode as AstNode$1 } from './ast';
|
||||
import { Candidate, Variant } from './candidate';
|
||||
import { compileAstNodes } from './compile';
|
||||
import { ClassEntry, VariantEntry, CanonicalizeOptions } from './intellisense';
|
||||
import { Theme } from './theme';
|
||||
import { Utilities } from './utilities';
|
||||
import { Variants } from './variants';
|
||||
import * as tailwindcss from 'tailwindcss';
|
||||
import { Polyfills, Features } from 'tailwindcss';
|
||||
export { Features, Polyfills } from 'tailwindcss';
|
||||
|
||||
declare const DEBUG: boolean;
|
||||
|
||||
declare const env_DEBUG: typeof DEBUG;
|
||||
declare namespace env {
|
||||
export { env_DEBUG as DEBUG };
|
||||
}
|
||||
|
||||
declare const enum CompileAstFlags {
|
||||
None = 0,
|
||||
RespectImportant = 1
|
||||
}
|
||||
type DesignSystem = {
|
||||
theme: Theme;
|
||||
utilities: Utilities;
|
||||
variants: Variants;
|
||||
invalidCandidates: Set<string>;
|
||||
important: boolean;
|
||||
getClassOrder(classes: string[]): [string, bigint | null][];
|
||||
getClassList(): ClassEntry[];
|
||||
getVariants(): VariantEntry[];
|
||||
parseCandidate(candidate: string): Readonly<Candidate>[];
|
||||
parseVariant(variant: string): Readonly<Variant> | null;
|
||||
compileAstNodes(candidate: Candidate, flags?: CompileAstFlags): ReturnType<typeof compileAstNodes>;
|
||||
printCandidate(candidate: Candidate): string;
|
||||
printVariant(variant: Variant): string;
|
||||
getVariantOrder(): Map<Variant, number>;
|
||||
resolveThemeValue(path: string, forceInline?: boolean): string | undefined;
|
||||
trackUsedVariables(raw: string): void;
|
||||
canonicalizeCandidates(candidates: string[], options?: CanonicalizeOptions): string[];
|
||||
candidatesToCss(classes: string[]): (string | null)[];
|
||||
candidatesToAst(classes: string[]): AstNode$1[][];
|
||||
storage: Record<symbol, unknown>;
|
||||
};
|
||||
|
||||
/**
|
||||
* The source code for one or more nodes in the AST
|
||||
*
|
||||
* This generally corresponds to a stylesheet
|
||||
*/
|
||||
interface Source {
|
||||
/**
|
||||
* The path to the file that contains the referenced source code
|
||||
*
|
||||
* If this references the *output* source code, this is `null`.
|
||||
*/
|
||||
file: string | null;
|
||||
/**
|
||||
* The referenced source code
|
||||
*/
|
||||
code: string;
|
||||
}
|
||||
/**
|
||||
* The file and offsets within it that this node covers
|
||||
*
|
||||
* This can represent either:
|
||||
* - A location in the original CSS which caused this node to be created
|
||||
* - A location in the output CSS where this node resides
|
||||
*/
|
||||
type SourceLocation = [source: Source, start: number, end: number];
|
||||
|
||||
/**
|
||||
* Line offset tables are the key to generating our source maps. They allow us
|
||||
* to store indexes with our AST nodes and later convert them into positions as
|
||||
* when given the source that the indexes refer to.
|
||||
*/
|
||||
/**
|
||||
* A position in source code
|
||||
*
|
||||
* https://tc39.es/ecma426/#sec-position-record-type
|
||||
*/
|
||||
interface Position {
|
||||
/** The line number, one-based */
|
||||
line: number;
|
||||
/** The column/character number, one-based */
|
||||
column: number;
|
||||
}
|
||||
|
||||
interface OriginalPosition extends Position {
|
||||
source: DecodedSource;
|
||||
}
|
||||
/**
|
||||
* A "decoded" sourcemap
|
||||
*
|
||||
* @see https://tc39.es/ecma426/#decoded-source-map-record
|
||||
*/
|
||||
interface DecodedSourceMap {
|
||||
file: string | null;
|
||||
sources: DecodedSource[];
|
||||
mappings: DecodedMapping[];
|
||||
}
|
||||
/**
|
||||
* A "decoded" source
|
||||
*
|
||||
* @see https://tc39.es/ecma426/#decoded-source-record
|
||||
*/
|
||||
interface DecodedSource {
|
||||
url: string | null;
|
||||
content: string | null;
|
||||
ignore: boolean;
|
||||
}
|
||||
/**
|
||||
* A "decoded" mapping
|
||||
*
|
||||
* @see https://tc39.es/ecma426/#decoded-mapping-record
|
||||
*/
|
||||
interface DecodedMapping {
|
||||
originalPosition: OriginalPosition | null;
|
||||
generatedPosition: Position;
|
||||
name: string | null;
|
||||
}
|
||||
|
||||
type StyleRule = {
|
||||
kind: 'rule';
|
||||
selector: string;
|
||||
nodes: AstNode[];
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type AtRule = {
|
||||
kind: 'at-rule';
|
||||
name: string;
|
||||
params: string;
|
||||
nodes: AstNode[];
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type Declaration = {
|
||||
kind: 'declaration';
|
||||
property: string;
|
||||
value: string | undefined;
|
||||
important: boolean;
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type Comment = {
|
||||
kind: 'comment';
|
||||
value: string;
|
||||
src?: SourceLocation;
|
||||
dst?: SourceLocation;
|
||||
};
|
||||
type Context = {
|
||||
kind: 'context';
|
||||
context: Record<string, string | boolean>;
|
||||
nodes: AstNode[];
|
||||
src?: undefined;
|
||||
dst?: undefined;
|
||||
};
|
||||
type AtRoot = {
|
||||
kind: 'at-root';
|
||||
nodes: AstNode[];
|
||||
src?: undefined;
|
||||
dst?: undefined;
|
||||
};
|
||||
type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot;
|
||||
|
||||
type Resolver = (id: string, base: string) => Promise<string | false | undefined>;
|
||||
interface CompileOptions {
|
||||
base: string;
|
||||
from?: string;
|
||||
onDependency: (path: string) => void;
|
||||
shouldRewriteUrls?: boolean;
|
||||
polyfills?: Polyfills;
|
||||
customCssResolver?: Resolver;
|
||||
customJsResolver?: Resolver;
|
||||
}
|
||||
declare function compileAst(ast: AstNode[], options: CompileOptions): Promise<{
|
||||
sources: {
|
||||
base: string;
|
||||
pattern: string;
|
||||
negated: boolean;
|
||||
}[];
|
||||
root: "none" | {
|
||||
base: string;
|
||||
pattern: string;
|
||||
} | null;
|
||||
features: Features;
|
||||
build(candidates: string[]): AstNode[];
|
||||
}>;
|
||||
declare function compile(css: string, options: CompileOptions): Promise<{
|
||||
sources: {
|
||||
base: string;
|
||||
pattern: string;
|
||||
negated: boolean;
|
||||
}[];
|
||||
root: "none" | {
|
||||
base: string;
|
||||
pattern: string;
|
||||
} | null;
|
||||
features: Features;
|
||||
build(candidates: string[]): string;
|
||||
buildSourceMap(): tailwindcss.DecodedSourceMap;
|
||||
}>;
|
||||
declare function __unstable__loadDesignSystem(css: string, { base }: {
|
||||
base: string;
|
||||
}): Promise<DesignSystem>;
|
||||
declare function loadModule(id: string, base: string, onDependency: (path: string) => void, customJsResolver?: Resolver): Promise<{
|
||||
path: string;
|
||||
base: string;
|
||||
module: any;
|
||||
}>;
|
||||
|
||||
declare class Instrumentation implements Disposable {
|
||||
#private;
|
||||
private shouldReport;
|
||||
private defaultFlush;
|
||||
constructor(shouldReport?: boolean, defaultFlush?: (message: string) => undefined);
|
||||
hit(label: string): void;
|
||||
start(label: string): void;
|
||||
end(label: string): void;
|
||||
track(label: string): {
|
||||
[Symbol.dispose]: () => void;
|
||||
[Symbol.asyncDispose]: () => void;
|
||||
};
|
||||
span<T>(label: string, fn: () => T): T;
|
||||
reset(): void;
|
||||
report(flush?: (message: string) => undefined): void;
|
||||
[Symbol.dispose](): void;
|
||||
}
|
||||
|
||||
declare function normalizePath(originalPath: string): string;
|
||||
|
||||
interface OptimizeOptions {
|
||||
/**
|
||||
* The file being transformed
|
||||
*/
|
||||
file?: string;
|
||||
/**
|
||||
* Enabled minified output
|
||||
*/
|
||||
minify?: boolean;
|
||||
/**
|
||||
* The output source map before optimization
|
||||
*
|
||||
* If omitted a resulting source map will not be available
|
||||
*/
|
||||
map?: string;
|
||||
}
|
||||
interface TransformResult {
|
||||
code: string;
|
||||
map: string | undefined;
|
||||
}
|
||||
declare function optimize(input: string, { file, minify, map }?: OptimizeOptions): TransformResult;
|
||||
|
||||
interface SourceMap {
|
||||
readonly raw: string;
|
||||
readonly inline: string;
|
||||
comment(url: string): string;
|
||||
}
|
||||
declare function toSourceMap(map: DecodedSourceMap | string): SourceMap;
|
||||
|
||||
export { type CompileOptions, type DecodedSource, type DecodedSourceMap, Instrumentation, type OptimizeOptions, type Resolver, type SourceMap, type TransformResult, __unstable__loadDesignSystem, compile, compileAst, env, loadModule, normalizePath, optimize, toSourceMap };
|
||||
18
node_modules/@tailwindcss/node/dist/index.js
generated
vendored
Normal file
18
node_modules/@tailwindcss/node/dist/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
18
node_modules/@tailwindcss/node/dist/index.mjs
generated
vendored
Normal file
18
node_modules/@tailwindcss/node/dist/index.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/@tailwindcss/node/dist/require-cache.d.ts
generated
vendored
Normal file
3
node_modules/@tailwindcss/node/dist/require-cache.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare function clearRequireCache(files: string[]): void;
|
||||
|
||||
export { clearRequireCache };
|
||||
1
node_modules/@tailwindcss/node/dist/require-cache.js
generated
vendored
Normal file
1
node_modules/@tailwindcss/node/dist/require-cache.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var n=(r,e)=>{for(var t in e)i(r,t,{get:e[t],enumerable:!0})},u=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of f(e))!l.call(r,c)&&c!==t&&i(r,c,{get:()=>e[c],enumerable:!(o=a(e,c))||o.enumerable});return r};var h=r=>u(i({},"__esModule",{value:!0}),r);var d={};n(d,{clearRequireCache:()=>q});module.exports=h(d);function q(r){for(let e of r)delete require.cache[e]}0&&(module.exports={clearRequireCache});
|
||||
373
node_modules/@tailwindcss/node/node_modules/lightningcss/LICENSE
generated
vendored
Normal file
373
node_modules/@tailwindcss/node/node_modules/lightningcss/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,373 @@
|
||||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
||||
105
node_modules/@tailwindcss/node/node_modules/lightningcss/README.md
generated
vendored
Normal file
105
node_modules/@tailwindcss/node/node_modules/lightningcss/README.md
generated
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
# ⚡️ Lightning CSS
|
||||
|
||||
An extremely fast CSS parser, transformer, and minifier written in Rust. Use it with [Parcel](https://parceljs.org), as a standalone library or CLI, or via a plugin with any other tool.
|
||||
|
||||
<img width="680" alt="performance and build size charts" src="https://user-images.githubusercontent.com/19409/189022599-28246659-f94a-46a4-9de0-b6d17adb0e22.png#gh-light-mode-only">
|
||||
<img width="680" alt="performance and build size charts" src="https://user-images.githubusercontent.com/19409/189022693-6956b044-422b-4f56-9628-d59c6f791095.png#gh-dark-mode-only">
|
||||
|
||||
## Features
|
||||
|
||||
- **Extremely fast** – Parsing and minifying large files is completed in milliseconds, often with significantly smaller output than other tools. See [benchmarks](#benchmarks) below.
|
||||
- **Typed property values** – many other CSS parsers treat property values as an untyped series of tokens. This means that each transformer that wants to do something with these values must interpret them itself, leading to duplicate work and inconsistencies. Lightning CSS parses all values using the grammar from the CSS specification, and exposes a specific value type for each property.
|
||||
- **Browser-grade parser** – Lightning CSS is built on the [cssparser](https://github.com/servo/rust-cssparser) and [selectors](https://github.com/servo/stylo/tree/main/selectors) crates created by Mozilla and used by Firefox and Servo. These provide a solid general purpose CSS-parsing foundation on top of which Lightning CSS implements support for all specific CSS rules and properties.
|
||||
- **Minification** – One of the main purposes of Lightning CSS is to minify CSS to make it smaller. This includes many optimizations including:
|
||||
- Combining longhand properties into shorthands where possible.
|
||||
- Merging adjacent rules with the same selectors or declarations when it is safe to do so.
|
||||
- Combining CSS transforms into a single matrix or vice versa when smaller.
|
||||
- Removing vendor prefixes that are not needed, based on the provided browser targets.
|
||||
- Reducing `calc()` expressions where possible.
|
||||
- Converting colors to shorter hex notation where possible.
|
||||
- Minifying gradients.
|
||||
- Minifying CSS grid templates.
|
||||
- Normalizing property value order.
|
||||
- Removing default property sub-values which will be inferred by browsers.
|
||||
- Many micro-optimizations, e.g. converting to shorter units, removing unnecessary quotation marks, etc.
|
||||
- **Vendor prefixing** – Lightning CSS accepts a list of browser targets, and automatically adds (and removes) vendor prefixes.
|
||||
- **Browserslist configuration** – Lightning CSS supports opt-in browserslist configuration discovery to resolve browser targets and integrate with your existing tools and config setup.
|
||||
- **Syntax lowering** – Lightning CSS parses modern CSS syntax, and generates more compatible output where needed, based on browser targets.
|
||||
- CSS Nesting
|
||||
- Custom media queries (draft spec)
|
||||
- Logical properties
|
||||
* [Color Level 5](https://drafts.csswg.org/css-color-5/)
|
||||
- `color-mix()` function
|
||||
- Relative color syntax, e.g. `lab(from purple calc(l * .8) a b)`
|
||||
- [Color Level 4](https://drafts.csswg.org/css-color-4/)
|
||||
- `lab()`, `lch()`, `oklab()`, and `oklch()` colors
|
||||
- `color()` function supporting predefined color spaces such as `display-p3` and `xyz`
|
||||
- Space separated components in `rgb` and `hsl` functions
|
||||
- Hex with alpha syntax
|
||||
- `hwb()` color syntax
|
||||
- Percent syntax for opacity
|
||||
- `#rgba` and `#rrggbbaa` hex colors
|
||||
- Selectors
|
||||
- `:not` with multiple arguments
|
||||
- `:lang` with multiple arguments
|
||||
- `:dir`
|
||||
- `:is`
|
||||
- Double position gradient stops (e.g. `red 40% 80%`)
|
||||
- `clamp()`, `round()`, `rem()`, and `mod()` math functions
|
||||
- Alignment shorthands (e.g. `place-items`)
|
||||
- Two-value `overflow` shorthand
|
||||
- Media query range syntax (e.g. `@media (width <= 100px)` or `@media (100px < width < 500px)`)
|
||||
- Multi-value `display` property (e.g. `inline flex`)
|
||||
- `system-ui` font family fallbacks
|
||||
- **CSS modules** – Lightning CSS supports compiling a subset of [CSS modules](https://github.com/css-modules/css-modules) features.
|
||||
- Locally scoped class and id selectors
|
||||
- Locally scoped custom identifiers, e.g. `@keyframes` names, grid lines/areas, `@counter-style` names, etc.
|
||||
- Opt-in support for locally scoped CSS variables and other dashed identifiers.
|
||||
- `:local()` and `:global()` selectors
|
||||
- The `composes` property
|
||||
- **Custom transforms** – The Lightning CSS visitor API can be used to implement custom transform plugins.
|
||||
|
||||
## Documentation
|
||||
|
||||
Lightning CSS can be used from [Parcel](https://parceljs.org), as a standalone library from JavaScript or Rust, using a standalone CLI, or wrapped as a plugin within any other tool. See the [Lightning CSS website](https://lightningcss.dev/docs.html) for documentation.
|
||||
|
||||
## Benchmarks
|
||||
|
||||
<img width="680" alt="performance and build size charts" src="https://user-images.githubusercontent.com/19409/189022599-28246659-f94a-46a4-9de0-b6d17adb0e22.png#gh-light-mode-only">
|
||||
<img width="680" alt="performance and build size charts" src="https://user-images.githubusercontent.com/19409/189022693-6956b044-422b-4f56-9628-d59c6f791095.png#gh-dark-mode-only">
|
||||
|
||||
```
|
||||
$ node bench.js bootstrap-4.css
|
||||
cssnano: 544.809ms
|
||||
159636 bytes
|
||||
|
||||
esbuild: 17.199ms
|
||||
160332 bytes
|
||||
|
||||
lightningcss: 4.16ms
|
||||
143091 bytes
|
||||
|
||||
|
||||
$ node bench.js animate.css
|
||||
cssnano: 283.105ms
|
||||
71723 bytes
|
||||
|
||||
esbuild: 11.858ms
|
||||
72183 bytes
|
||||
|
||||
lightningcss: 1.973ms
|
||||
23666 bytes
|
||||
|
||||
|
||||
$ node bench.js tailwind.css
|
||||
cssnano: 2.198s
|
||||
1925626 bytes
|
||||
|
||||
esbuild: 107.668ms
|
||||
1961642 bytes
|
||||
|
||||
lightningcss: 43.368ms
|
||||
1824130 bytes
|
||||
```
|
||||
|
||||
For more benchmarks comparing more tools and input, see [here](http://goalsmashers.github.io/css-minification-benchmark/). Note that some of the tools shown perform unsafe optimizations that may change the behavior of the original CSS in favor of smaller file size. Lightning CSS does not do this – the output CSS should always behave identically to the input. Keep this in mind when comparing file sizes between tools.
|
||||
9892
node_modules/@tailwindcss/node/node_modules/lightningcss/node/ast.d.ts
generated
vendored
Normal file
9892
node_modules/@tailwindcss/node/node_modules/lightningcss/node/ast.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10539
node_modules/@tailwindcss/node/node_modules/lightningcss/node/ast.js.flow
generated
vendored
Normal file
10539
node_modules/@tailwindcss/node/node_modules/lightningcss/node/ast.js.flow
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
48
node_modules/@tailwindcss/node/node_modules/lightningcss/node/browserslistToTargets.js
generated
vendored
Normal file
48
node_modules/@tailwindcss/node/node_modules/lightningcss/node/browserslistToTargets.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
const BROWSER_MAPPING = {
|
||||
and_chr: 'chrome',
|
||||
and_ff: 'firefox',
|
||||
ie_mob: 'ie',
|
||||
op_mob: 'opera',
|
||||
and_qq: null,
|
||||
and_uc: null,
|
||||
baidu: null,
|
||||
bb: null,
|
||||
kaios: null,
|
||||
op_mini: null,
|
||||
};
|
||||
|
||||
function browserslistToTargets(browserslist) {
|
||||
let targets = {};
|
||||
for (let browser of browserslist) {
|
||||
let [name, v] = browser.split(' ');
|
||||
if (BROWSER_MAPPING[name] === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let version = parseVersion(v);
|
||||
if (version == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (targets[name] == null || version < targets[name]) {
|
||||
targets[name] = version;
|
||||
}
|
||||
}
|
||||
|
||||
return targets;
|
||||
}
|
||||
|
||||
function parseVersion(version) {
|
||||
let [major, minor = 0, patch = 0] = version
|
||||
.split('-')[0]
|
||||
.split('.')
|
||||
.map(v => parseInt(v, 10));
|
||||
|
||||
if (isNaN(major) || isNaN(minor) || isNaN(patch)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (major << 16) | (minor << 8) | patch;
|
||||
}
|
||||
|
||||
module.exports = browserslistToTargets;
|
||||
450
node_modules/@tailwindcss/node/node_modules/lightningcss/node/composeVisitors.js
generated
vendored
Normal file
450
node_modules/@tailwindcss/node/node_modules/lightningcss/node/composeVisitors.js
generated
vendored
Normal file
@@ -0,0 +1,450 @@
|
||||
// @ts-check
|
||||
/** @typedef {import('./index').Visitor} Visitor */
|
||||
/** @typedef {import('./index').VisitorFunction} VisitorFunction */
|
||||
|
||||
/**
|
||||
* Composes multiple visitor objects into a single one.
|
||||
* @param {(Visitor | VisitorFunction)[]} visitors
|
||||
* @return {Visitor | VisitorFunction}
|
||||
*/
|
||||
function composeVisitors(visitors) {
|
||||
if (visitors.length === 1) {
|
||||
return visitors[0];
|
||||
}
|
||||
|
||||
if (visitors.some(v => typeof v === 'function')) {
|
||||
return (opts) => {
|
||||
let v = visitors.map(v => typeof v === 'function' ? v(opts) : v);
|
||||
return composeVisitors(v);
|
||||
};
|
||||
}
|
||||
|
||||
/** @type Visitor */
|
||||
let res = {};
|
||||
composeSimpleVisitors(res, visitors, 'StyleSheet');
|
||||
composeSimpleVisitors(res, visitors, 'StyleSheetExit');
|
||||
composeObjectVisitors(res, visitors, 'Rule', ruleVisitor, wrapCustomAndUnknownAtRule);
|
||||
composeObjectVisitors(res, visitors, 'RuleExit', ruleVisitor, wrapCustomAndUnknownAtRule);
|
||||
composeObjectVisitors(res, visitors, 'Declaration', declarationVisitor, wrapCustomProperty);
|
||||
composeObjectVisitors(res, visitors, 'DeclarationExit', declarationVisitor, wrapCustomProperty);
|
||||
composeSimpleVisitors(res, visitors, 'Url');
|
||||
composeSimpleVisitors(res, visitors, 'Color');
|
||||
composeSimpleVisitors(res, visitors, 'Image');
|
||||
composeSimpleVisitors(res, visitors, 'ImageExit');
|
||||
composeSimpleVisitors(res, visitors, 'Length');
|
||||
composeSimpleVisitors(res, visitors, 'Angle');
|
||||
composeSimpleVisitors(res, visitors, 'Ratio');
|
||||
composeSimpleVisitors(res, visitors, 'Resolution');
|
||||
composeSimpleVisitors(res, visitors, 'Time');
|
||||
composeSimpleVisitors(res, visitors, 'CustomIdent');
|
||||
composeSimpleVisitors(res, visitors, 'DashedIdent');
|
||||
composeArrayFunctions(res, visitors, 'MediaQuery');
|
||||
composeArrayFunctions(res, visitors, 'MediaQueryExit');
|
||||
composeSimpleVisitors(res, visitors, 'SupportsCondition');
|
||||
composeSimpleVisitors(res, visitors, 'SupportsConditionExit');
|
||||
composeArrayFunctions(res, visitors, 'Selector');
|
||||
composeTokenVisitors(res, visitors, 'Token', 'token', false);
|
||||
composeTokenVisitors(res, visitors, 'Function', 'function', false);
|
||||
composeTokenVisitors(res, visitors, 'FunctionExit', 'function', true);
|
||||
composeTokenVisitors(res, visitors, 'Variable', 'var', false);
|
||||
composeTokenVisitors(res, visitors, 'VariableExit', 'var', true);
|
||||
composeTokenVisitors(res, visitors, 'EnvironmentVariable', 'env', false);
|
||||
composeTokenVisitors(res, visitors, 'EnvironmentVariableExit', 'env', true);
|
||||
return res;
|
||||
}
|
||||
|
||||
module.exports = composeVisitors;
|
||||
|
||||
function wrapCustomAndUnknownAtRule(k, f) {
|
||||
if (k === 'unknown') {
|
||||
return (value => f({ type: 'unknown', value }));
|
||||
}
|
||||
if (k === 'custom') {
|
||||
return (value => f({ type: 'custom', value }));
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
||||
function wrapCustomProperty(k, f) {
|
||||
return k === 'custom' ? (value => f({ property: 'custom', value })) : f;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('./index').Visitor['Rule']} f
|
||||
* @param {import('./ast').Rule} item
|
||||
*/
|
||||
function ruleVisitor(f, item) {
|
||||
if (typeof f === 'object') {
|
||||
if (item.type === 'unknown') {
|
||||
let v = f.unknown;
|
||||
if (typeof v === 'object') {
|
||||
v = v[item.value.name];
|
||||
}
|
||||
return v?.(item.value);
|
||||
}
|
||||
if (item.type === 'custom') {
|
||||
let v = f.custom;
|
||||
if (typeof v === 'object') {
|
||||
v = v[item.value.name];
|
||||
}
|
||||
return v?.(item.value);
|
||||
}
|
||||
return f[item.type]?.(item);
|
||||
}
|
||||
return f?.(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('./index').Visitor['Declaration']} f
|
||||
* @param {import('./ast').Declaration} item
|
||||
*/
|
||||
function declarationVisitor(f, item) {
|
||||
if (typeof f === 'object') {
|
||||
/** @type {string} */
|
||||
let name = item.property;
|
||||
if (item.property === 'unparsed') {
|
||||
name = item.value.propertyId.property;
|
||||
} else if (item.property === 'custom') {
|
||||
let v = f.custom;
|
||||
if (typeof v === 'object') {
|
||||
v = v[item.value.name];
|
||||
}
|
||||
return v?.(item.value);
|
||||
}
|
||||
return f[name]?.(item);
|
||||
}
|
||||
return f?.(item);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Visitor[]} visitors
|
||||
* @param {string} key
|
||||
* @returns {[any[], boolean, Set<string>]}
|
||||
*/
|
||||
function extractObjectsOrFunctions(visitors, key) {
|
||||
let values = [];
|
||||
let hasFunction = false;
|
||||
let allKeys = new Set();
|
||||
for (let visitor of visitors) {
|
||||
let v = visitor[key];
|
||||
if (v) {
|
||||
if (typeof v === 'function') {
|
||||
hasFunction = true;
|
||||
} else {
|
||||
for (let key in v) {
|
||||
allKeys.add(key);
|
||||
}
|
||||
}
|
||||
values.push(v);
|
||||
}
|
||||
}
|
||||
return [values, hasFunction, allKeys];
|
||||
}
|
||||
|
||||
/**
|
||||
* @template {keyof Visitor} K
|
||||
* @param {Visitor} res
|
||||
* @param {Visitor[]} visitors
|
||||
* @param {K} key
|
||||
* @param {(visitor: Visitor[K], item: any) => any | any[] | void} apply
|
||||
* @param {(k: string, f: any) => any} wrapKey
|
||||
*/
|
||||
function composeObjectVisitors(res, visitors, key, apply, wrapKey) {
|
||||
let [values, hasFunction, allKeys] = extractObjectsOrFunctions(visitors, key);
|
||||
if (values.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (values.length === 1) {
|
||||
res[key] = values[0];
|
||||
return;
|
||||
}
|
||||
|
||||
let f = createArrayVisitor(visitors, (visitor, item) => apply(visitor[key], item));
|
||||
if (hasFunction) {
|
||||
res[key] = f;
|
||||
} else {
|
||||
/** @type {any} */
|
||||
let v = {};
|
||||
for (let k of allKeys) {
|
||||
v[k] = wrapKey(k, f);
|
||||
}
|
||||
res[key] = v;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Visitor} res
|
||||
* @param {Visitor[]} visitors
|
||||
* @param {string} key
|
||||
* @param {import('./ast').TokenOrValue['type']} type
|
||||
* @param {boolean} isExit
|
||||
*/
|
||||
function composeTokenVisitors(res, visitors, key, type, isExit) {
|
||||
let [values, hasFunction, allKeys] = extractObjectsOrFunctions(visitors, key);
|
||||
if (values.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (values.length === 1) {
|
||||
res[key] = values[0];
|
||||
return;
|
||||
}
|
||||
|
||||
let f = createTokenVisitor(visitors, type, isExit);
|
||||
if (hasFunction) {
|
||||
res[key] = f;
|
||||
} else {
|
||||
let v = {};
|
||||
for (let key of allKeys) {
|
||||
v[key] = f;
|
||||
}
|
||||
res[key] = v;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Visitor[]} visitors
|
||||
* @param {import('./ast').TokenOrValue['type']} type
|
||||
*/
|
||||
function createTokenVisitor(visitors, type, isExit) {
|
||||
let v = createArrayVisitor(visitors, (visitor, /** @type {import('./ast').TokenOrValue} */ item) => {
|
||||
let f;
|
||||
switch (item.type) {
|
||||
case 'token':
|
||||
f = visitor.Token;
|
||||
if (typeof f === 'object') {
|
||||
f = f[item.value.type];
|
||||
}
|
||||
break;
|
||||
case 'function':
|
||||
f = isExit ? visitor.FunctionExit : visitor.Function;
|
||||
if (typeof f === 'object') {
|
||||
f = f[item.value.name];
|
||||
}
|
||||
break;
|
||||
case 'var':
|
||||
f = isExit ? visitor.VariableExit : visitor.Variable;
|
||||
break;
|
||||
case 'env':
|
||||
f = isExit ? visitor.EnvironmentVariableExit : visitor.EnvironmentVariable;
|
||||
if (typeof f === 'object') {
|
||||
let name;
|
||||
switch (item.value.name.type) {
|
||||
case 'ua':
|
||||
case 'unknown':
|
||||
name = item.value.name.value;
|
||||
break;
|
||||
case 'custom':
|
||||
name = item.value.name.ident;
|
||||
break;
|
||||
}
|
||||
f = f[name];
|
||||
}
|
||||
break;
|
||||
case 'color':
|
||||
f = visitor.Color;
|
||||
break;
|
||||
case 'url':
|
||||
f = visitor.Url;
|
||||
break;
|
||||
case 'length':
|
||||
f = visitor.Length;
|
||||
break;
|
||||
case 'angle':
|
||||
f = visitor.Angle;
|
||||
break;
|
||||
case 'time':
|
||||
f = visitor.Time;
|
||||
break;
|
||||
case 'resolution':
|
||||
f = visitor.Resolution;
|
||||
break;
|
||||
case 'dashed-ident':
|
||||
f = visitor.DashedIdent;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!f) {
|
||||
return;
|
||||
}
|
||||
|
||||
let res = f(item.value);
|
||||
switch (item.type) {
|
||||
case 'color':
|
||||
case 'url':
|
||||
case 'length':
|
||||
case 'angle':
|
||||
case 'time':
|
||||
case 'resolution':
|
||||
case 'dashed-ident':
|
||||
if (Array.isArray(res)) {
|
||||
res = res.map(value => ({ type: item.type, value }))
|
||||
} else if (res) {
|
||||
res = { type: item.type, value: res };
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
});
|
||||
|
||||
return value => v({ type, value });
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Visitor[]} visitors
|
||||
* @param {string} key
|
||||
*/
|
||||
function extractFunctions(visitors, key) {
|
||||
let functions = [];
|
||||
for (let visitor of visitors) {
|
||||
let f = visitor[key];
|
||||
if (f) {
|
||||
functions.push(f);
|
||||
}
|
||||
}
|
||||
return functions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Visitor} res
|
||||
* @param {Visitor[]} visitors
|
||||
* @param {string} key
|
||||
*/
|
||||
function composeSimpleVisitors(res, visitors, key) {
|
||||
let functions = extractFunctions(visitors, key);
|
||||
if (functions.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (functions.length === 1) {
|
||||
res[key] = functions[0];
|
||||
return;
|
||||
}
|
||||
|
||||
res[key] = arg => {
|
||||
let mutated = false;
|
||||
for (let f of functions) {
|
||||
let res = f(arg);
|
||||
if (res) {
|
||||
arg = res;
|
||||
mutated = true;
|
||||
}
|
||||
}
|
||||
|
||||
return mutated ? arg : undefined;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Visitor} res
|
||||
* @param {Visitor[]} visitors
|
||||
* @param {string} key
|
||||
*/
|
||||
function composeArrayFunctions(res, visitors, key) {
|
||||
let functions = extractFunctions(visitors, key);
|
||||
if (functions.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (functions.length === 1) {
|
||||
res[key] = functions[0];
|
||||
return;
|
||||
}
|
||||
|
||||
res[key] = createArrayVisitor(functions, (f, item) => f(item));
|
||||
}
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @template V
|
||||
* @param {T[]} visitors
|
||||
* @param {(visitor: T, item: V) => V | V[] | void} apply
|
||||
* @returns {(item: V) => V | V[] | void}
|
||||
*/
|
||||
function createArrayVisitor(visitors, apply) {
|
||||
let seen = new Bitset(visitors.length);
|
||||
return arg => {
|
||||
let arr = [arg];
|
||||
let mutated = false;
|
||||
seen.clear();
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
// For each value, call all visitors. If a visitor returns a new value,
|
||||
// we start over, but skip the visitor that generated the value or saw
|
||||
// it before (to avoid cycles). This way, visitors can be composed in any order.
|
||||
for (let v = 0; v < visitors.length && i < arr.length;) {
|
||||
if (seen.get(v)) {
|
||||
v++;
|
||||
continue;
|
||||
}
|
||||
|
||||
let item = arr[i];
|
||||
let visitor = visitors[v];
|
||||
let res = apply(visitor, item);
|
||||
if (Array.isArray(res)) {
|
||||
if (res.length === 0) {
|
||||
arr.splice(i, 1);
|
||||
} else if (res.length === 1) {
|
||||
arr[i] = res[0];
|
||||
} else {
|
||||
arr.splice(i, 1, ...res);
|
||||
}
|
||||
mutated = true;
|
||||
seen.set(v);
|
||||
v = 0;
|
||||
} else if (res) {
|
||||
arr[i] = res;
|
||||
mutated = true;
|
||||
seen.set(v);
|
||||
v = 0;
|
||||
} else {
|
||||
v++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!mutated) {
|
||||
return;
|
||||
}
|
||||
|
||||
return arr.length === 1 ? arr[0] : arr;
|
||||
};
|
||||
}
|
||||
|
||||
class Bitset {
|
||||
constructor(maxBits = 32) {
|
||||
this.bits = 0;
|
||||
this.more = maxBits > 32 ? new Uint32Array(Math.ceil((maxBits - 32) / 32)) : null;
|
||||
}
|
||||
|
||||
/** @param {number} bit */
|
||||
get(bit) {
|
||||
if (bit >= 32 && this.more) {
|
||||
let i = Math.floor((bit - 32) / 32);
|
||||
let b = bit % 32;
|
||||
return Boolean(this.more[i] & (1 << b));
|
||||
} else {
|
||||
return Boolean(this.bits & (1 << bit));
|
||||
}
|
||||
}
|
||||
|
||||
/** @param {number} bit */
|
||||
set(bit) {
|
||||
if (bit >= 32 && this.more) {
|
||||
let i = Math.floor((bit - 32) / 32);
|
||||
let b = bit % 32;
|
||||
this.more[i] |= 1 << b;
|
||||
} else {
|
||||
this.bits |= 1 << bit;
|
||||
}
|
||||
}
|
||||
|
||||
clear() {
|
||||
this.bits = 0;
|
||||
if (this.more) {
|
||||
this.more.fill(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
28
node_modules/@tailwindcss/node/node_modules/lightningcss/node/flags.js
generated
vendored
Normal file
28
node_modules/@tailwindcss/node/node_modules/lightningcss/node/flags.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// This file is autogenerated by build-prefixes.js. DO NOT EDIT!
|
||||
|
||||
exports.Features = {
|
||||
Nesting: 1,
|
||||
NotSelectorList: 2,
|
||||
DirSelector: 4,
|
||||
LangSelectorList: 8,
|
||||
IsSelector: 16,
|
||||
TextDecorationThicknessPercent: 32,
|
||||
MediaIntervalSyntax: 64,
|
||||
MediaRangeSyntax: 128,
|
||||
CustomMediaQueries: 256,
|
||||
ClampFunction: 512,
|
||||
ColorFunction: 1024,
|
||||
OklabColors: 2048,
|
||||
LabColors: 4096,
|
||||
P3Colors: 8192,
|
||||
HexAlphaColors: 16384,
|
||||
SpaceSeparatedColorNotation: 32768,
|
||||
FontFamilySystemUi: 65536,
|
||||
DoublePositionGradients: 131072,
|
||||
VendorPrefixes: 262144,
|
||||
LogicalProperties: 524288,
|
||||
LightDark: 1048576,
|
||||
Selectors: 31,
|
||||
MediaQueries: 448,
|
||||
Colors: 1113088,
|
||||
};
|
||||
494
node_modules/@tailwindcss/node/node_modules/lightningcss/node/index.d.ts
generated
vendored
Normal file
494
node_modules/@tailwindcss/node/node_modules/lightningcss/node/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,494 @@
|
||||
import type { Angle, CssColor, Rule, CustomProperty, EnvironmentVariable, Function, Image, LengthValue, MediaQuery, Declaration, Ratio, Resolution, Selector, SupportsCondition, Time, Token, TokenOrValue, UnknownAtRule, Url, Variable, StyleRule, DeclarationBlock, ParsedComponent, Multiplier, StyleSheet, Location2 } from './ast';
|
||||
import { Targets, Features } from './targets';
|
||||
|
||||
export * from './ast';
|
||||
|
||||
export { Targets, Features };
|
||||
|
||||
export interface TransformOptions<C extends CustomAtRules> {
|
||||
/** The filename being transformed. Used for error messages and source maps. */
|
||||
filename: string,
|
||||
/** The source code to transform. */
|
||||
code: Uint8Array,
|
||||
/** Whether to enable minification. */
|
||||
minify?: boolean,
|
||||
/** Whether to output a source map. */
|
||||
sourceMap?: boolean,
|
||||
/** An input source map to extend. */
|
||||
inputSourceMap?: string,
|
||||
/**
|
||||
* An optional project root path, used as the source root in the output source map.
|
||||
* Also used to generate relative paths for sources used in CSS module hashes.
|
||||
*/
|
||||
projectRoot?: string,
|
||||
/** The browser targets for the generated code. */
|
||||
targets?: Targets,
|
||||
/** Features that should always be compiled, even when supported by targets. */
|
||||
include?: number,
|
||||
/** Features that should never be compiled, even when unsupported by targets. */
|
||||
exclude?: number,
|
||||
/** Whether to enable parsing various draft syntax. */
|
||||
drafts?: Drafts,
|
||||
/** Whether to enable various non-standard syntax. */
|
||||
nonStandard?: NonStandard,
|
||||
/** Whether to compile this file as a CSS module. */
|
||||
cssModules?: boolean | CSSModulesConfig,
|
||||
/**
|
||||
* Whether to analyze dependencies (e.g. `@import` and `url()`).
|
||||
* When enabled, `@import` rules are removed, and `url()` dependencies
|
||||
* are replaced with hashed placeholders that can be replaced with the final
|
||||
* urls later (after bundling). Dependencies are returned as part of the result.
|
||||
*/
|
||||
analyzeDependencies?: boolean | DependencyOptions,
|
||||
/**
|
||||
* Replaces user action pseudo classes with class names that can be applied from JavaScript.
|
||||
* This is useful for polyfills, for example.
|
||||
*/
|
||||
pseudoClasses?: PseudoClasses,
|
||||
/**
|
||||
* A list of class names, ids, and custom identifiers (e.g. @keyframes) that are known
|
||||
* to be unused. These will be removed during minification. Note that these are not
|
||||
* selectors but individual names (without any . or # prefixes).
|
||||
*/
|
||||
unusedSymbols?: string[],
|
||||
/**
|
||||
* Whether to ignore invalid rules and declarations rather than erroring.
|
||||
* When enabled, warnings are returned, and the invalid rule or declaration is
|
||||
* omitted from the output code.
|
||||
*/
|
||||
errorRecovery?: boolean,
|
||||
/**
|
||||
* An AST visitor object. This allows custom transforms or analysis to be implemented in JavaScript.
|
||||
* Multiple visitors can be composed into one using the `composeVisitors` function.
|
||||
* For optimal performance, visitors should be as specific as possible about what types of values
|
||||
* they care about so that JavaScript has to be called as little as possible.
|
||||
*/
|
||||
visitor?: Visitor<C> | VisitorFunction<C>,
|
||||
/**
|
||||
* Defines how to parse custom CSS at-rules. Each at-rule can have a prelude, defined using a CSS
|
||||
* [syntax string](https://drafts.css-houdini.org/css-properties-values-api/#syntax-strings), and
|
||||
* a block body. The body can be a declaration list, rule list, or style block as defined in the
|
||||
* [css spec](https://drafts.csswg.org/css-syntax/#declaration-rule-list).
|
||||
*/
|
||||
customAtRules?: C
|
||||
}
|
||||
|
||||
// This is a hack to make TS still provide autocomplete for `property` vs. just making it `string`.
|
||||
type PropertyStart = '-' | '_' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';
|
||||
export type ReturnedDeclaration = Declaration | {
|
||||
/** The property name. */
|
||||
property: `${PropertyStart}${string}`,
|
||||
/** The raw string value for the declaration. */
|
||||
raw: string
|
||||
};
|
||||
|
||||
export type ReturnedMediaQuery = MediaQuery | {
|
||||
/** The raw string value for the media query. */
|
||||
raw: string
|
||||
};
|
||||
|
||||
type FindByType<Union, Name> = Union extends { type: Name } ? Union : never;
|
||||
export type ReturnedRule = Rule<ReturnedDeclaration, ReturnedMediaQuery>;
|
||||
type RequiredValue<Rule> = Rule extends { value: object }
|
||||
? Rule['value'] extends StyleRule
|
||||
? Rule & { value: Required<StyleRule> & { declarations: Required<DeclarationBlock> } }
|
||||
: Rule & { value: Required<Rule['value']> }
|
||||
: Rule;
|
||||
type RuleVisitor<R = RequiredValue<Rule>> = ((rule: R) => ReturnedRule | ReturnedRule[] | void);
|
||||
type MappedRuleVisitors = {
|
||||
[Name in Exclude<Rule['type'], 'unknown' | 'custom'>]?: RuleVisitor<RequiredValue<FindByType<Rule, Name>>>;
|
||||
}
|
||||
|
||||
type UnknownVisitors<T> = {
|
||||
[name: string]: RuleVisitor<T>
|
||||
}
|
||||
|
||||
type CustomVisitors<T extends CustomAtRules> = {
|
||||
[Name in keyof T]?: RuleVisitor<CustomAtRule<Name, T[Name]>>
|
||||
};
|
||||
|
||||
type AnyCustomAtRule<C extends CustomAtRules> = {
|
||||
[Key in keyof C]: CustomAtRule<Key, C[Key]>
|
||||
}[keyof C];
|
||||
|
||||
type RuleVisitors<C extends CustomAtRules> = MappedRuleVisitors & {
|
||||
unknown?: UnknownVisitors<UnknownAtRule> | Omit<RuleVisitor<UnknownAtRule>, keyof CallableFunction>,
|
||||
custom?: CustomVisitors<C> | Omit<RuleVisitor<AnyCustomAtRule<C>>, keyof CallableFunction>
|
||||
};
|
||||
|
||||
type PreludeTypes = Exclude<ParsedComponent['type'], 'literal' | 'repeated' | 'token'>;
|
||||
type SyntaxString = `<${PreludeTypes}>` | `<${PreludeTypes}>+` | `<${PreludeTypes}>#` | (string & {});
|
||||
type ComponentTypes = {
|
||||
[Key in PreludeTypes as `<${Key}>`]: FindByType<ParsedComponent, Key>
|
||||
};
|
||||
|
||||
type Repetitions = {
|
||||
[Key in PreludeTypes as `<${Key}>+` | `<${Key}>#`]: {
|
||||
type: "repeated",
|
||||
value: {
|
||||
components: FindByType<ParsedComponent, Key>[],
|
||||
multiplier: Multiplier
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
type MappedPrelude = ComponentTypes & Repetitions;
|
||||
type MappedBody<P extends CustomAtRuleDefinition['body']> = P extends 'style-block' ? 'rule-list' : P;
|
||||
interface CustomAtRule<N, R extends CustomAtRuleDefinition> {
|
||||
name: N,
|
||||
prelude: R['prelude'] extends keyof MappedPrelude ? MappedPrelude[R['prelude']] : ParsedComponent,
|
||||
body: FindByType<CustomAtRuleBody, MappedBody<R['body']>>,
|
||||
loc: Location2
|
||||
}
|
||||
|
||||
type CustomAtRuleBody = {
|
||||
type: 'declaration-list',
|
||||
value: Required<DeclarationBlock>
|
||||
} | {
|
||||
type: 'rule-list',
|
||||
value: RequiredValue<Rule>[]
|
||||
};
|
||||
|
||||
type FindProperty<Union, Name> = Union extends { property: Name } ? Union : never;
|
||||
type DeclarationVisitor<P = Declaration> = ((property: P) => ReturnedDeclaration | ReturnedDeclaration[] | void);
|
||||
type MappedDeclarationVisitors = {
|
||||
[Name in Exclude<Declaration['property'], 'unparsed' | 'custom'>]?: DeclarationVisitor<FindProperty<Declaration, Name> | FindProperty<Declaration, 'unparsed'>>;
|
||||
}
|
||||
|
||||
type CustomPropertyVisitors = {
|
||||
[name: string]: DeclarationVisitor<CustomProperty>
|
||||
}
|
||||
|
||||
type DeclarationVisitors = MappedDeclarationVisitors & {
|
||||
custom?: CustomPropertyVisitors | DeclarationVisitor<CustomProperty>
|
||||
}
|
||||
|
||||
interface RawValue {
|
||||
/** A raw string value which will be parsed like CSS. */
|
||||
raw: string
|
||||
}
|
||||
|
||||
type TokenReturnValue = TokenOrValue | TokenOrValue[] | RawValue | void;
|
||||
type TokenVisitor = (token: Token) => TokenReturnValue;
|
||||
type VisitableTokenTypes = 'ident' | 'at-keyword' | 'hash' | 'id-hash' | 'string' | 'number' | 'percentage' | 'dimension';
|
||||
type TokenVisitors = {
|
||||
[Name in VisitableTokenTypes]?: (token: FindByType<Token, Name>) => TokenReturnValue;
|
||||
}
|
||||
|
||||
type FunctionVisitor = (fn: Function) => TokenReturnValue;
|
||||
type EnvironmentVariableVisitor = (env: EnvironmentVariable) => TokenReturnValue;
|
||||
type EnvironmentVariableVisitors = {
|
||||
[name: string]: EnvironmentVariableVisitor
|
||||
};
|
||||
|
||||
export interface Visitor<C extends CustomAtRules> {
|
||||
StyleSheet?(stylesheet: StyleSheet): StyleSheet<ReturnedDeclaration, ReturnedMediaQuery> | void;
|
||||
StyleSheetExit?(stylesheet: StyleSheet): StyleSheet<ReturnedDeclaration, ReturnedMediaQuery> | void;
|
||||
Rule?: RuleVisitor | RuleVisitors<C>;
|
||||
RuleExit?: RuleVisitor | RuleVisitors<C>;
|
||||
Declaration?: DeclarationVisitor | DeclarationVisitors;
|
||||
DeclarationExit?: DeclarationVisitor | DeclarationVisitors;
|
||||
Url?(url: Url): Url | void;
|
||||
Color?(color: CssColor): CssColor | void;
|
||||
Image?(image: Image): Image | void;
|
||||
ImageExit?(image: Image): Image | void;
|
||||
Length?(length: LengthValue): LengthValue | void;
|
||||
Angle?(angle: Angle): Angle | void;
|
||||
Ratio?(ratio: Ratio): Ratio | void;
|
||||
Resolution?(resolution: Resolution): Resolution | void;
|
||||
Time?(time: Time): Time | void;
|
||||
CustomIdent?(ident: string): string | void;
|
||||
DashedIdent?(ident: string): string | void;
|
||||
MediaQuery?(query: MediaQuery): ReturnedMediaQuery | ReturnedMediaQuery[] | void;
|
||||
MediaQueryExit?(query: MediaQuery): ReturnedMediaQuery | ReturnedMediaQuery[] | void;
|
||||
SupportsCondition?(condition: SupportsCondition): SupportsCondition;
|
||||
SupportsConditionExit?(condition: SupportsCondition): SupportsCondition;
|
||||
Selector?(selector: Selector): Selector | Selector[] | void;
|
||||
Token?: TokenVisitor | TokenVisitors;
|
||||
Function?: FunctionVisitor | { [name: string]: FunctionVisitor };
|
||||
FunctionExit?: FunctionVisitor | { [name: string]: FunctionVisitor };
|
||||
Variable?(variable: Variable): TokenReturnValue;
|
||||
VariableExit?(variable: Variable): TokenReturnValue;
|
||||
EnvironmentVariable?: EnvironmentVariableVisitor | EnvironmentVariableVisitors;
|
||||
EnvironmentVariableExit?: EnvironmentVariableVisitor | EnvironmentVariableVisitors;
|
||||
}
|
||||
|
||||
export type VisitorDependency = FileDependency | GlobDependency;
|
||||
export interface VisitorOptions {
|
||||
addDependency: (dep: VisitorDependency) => void
|
||||
}
|
||||
|
||||
export type VisitorFunction<C extends CustomAtRules> = (options: VisitorOptions) => Visitor<C>;
|
||||
|
||||
export interface CustomAtRules {
|
||||
[name: string]: CustomAtRuleDefinition
|
||||
}
|
||||
|
||||
export interface CustomAtRuleDefinition {
|
||||
/**
|
||||
* Defines the syntax for a custom at-rule prelude. The value should be a
|
||||
* CSS [syntax string](https://drafts.css-houdini.org/css-properties-values-api/#syntax-strings)
|
||||
* representing the types of values that are accepted. This property may be omitted or
|
||||
* set to null to indicate that no prelude is accepted.
|
||||
*/
|
||||
prelude?: SyntaxString | null,
|
||||
/**
|
||||
* Defines the type of body contained within the at-rule block.
|
||||
* - declaration-list: A CSS declaration list, as in a style rule.
|
||||
* - rule-list: A list of CSS rules, as supported within a non-nested
|
||||
* at-rule such as `@media` or `@supports`.
|
||||
* - style-block: Both a declaration list and rule list, as accepted within
|
||||
* a nested at-rule within a style rule (e.g. `@media` inside a style rule
|
||||
* with directly nested declarations).
|
||||
*/
|
||||
body?: 'declaration-list' | 'rule-list' | 'style-block' | null
|
||||
}
|
||||
|
||||
export interface DependencyOptions {
|
||||
/** Whether to preserve `@import` rules rather than removing them. */
|
||||
preserveImports?: boolean
|
||||
}
|
||||
|
||||
export type BundleOptions<C extends CustomAtRules> = Omit<TransformOptions<C>, 'code'>;
|
||||
|
||||
export interface BundleAsyncOptions<C extends CustomAtRules> extends BundleOptions<C> {
|
||||
resolver?: Resolver;
|
||||
}
|
||||
|
||||
/** Custom resolver to use when loading CSS files. */
|
||||
export interface Resolver {
|
||||
/** Read the given file and return its contents as a string. */
|
||||
read?: (file: string) => string | Promise<string>;
|
||||
|
||||
/**
|
||||
* Resolve the given CSS import specifier from the provided originating file to a
|
||||
* path which gets passed to `read()`.
|
||||
*/
|
||||
resolve?: (specifier: string, originatingFile: string) => string | Promise<string>;
|
||||
}
|
||||
|
||||
export interface Drafts {
|
||||
/** Whether to enable @custom-media rules. */
|
||||
customMedia?: boolean
|
||||
}
|
||||
|
||||
export interface NonStandard {
|
||||
/** Whether to enable the non-standard >>> and /deep/ selector combinators used by Angular and Vue. */
|
||||
deepSelectorCombinator?: boolean
|
||||
}
|
||||
|
||||
export interface PseudoClasses {
|
||||
hover?: string,
|
||||
active?: string,
|
||||
focus?: string,
|
||||
focusVisible?: string,
|
||||
focusWithin?: string
|
||||
}
|
||||
|
||||
export interface TransformResult {
|
||||
/** The transformed code. */
|
||||
code: Uint8Array,
|
||||
/** The generated source map, if enabled. */
|
||||
map: Uint8Array | void,
|
||||
/** CSS module exports, if enabled. */
|
||||
exports: CSSModuleExports | void,
|
||||
/** CSS module references, if `dashedIdents` is enabled. */
|
||||
references: CSSModuleReferences,
|
||||
/** `@import` and `url()` dependencies, if enabled. */
|
||||
dependencies: Dependency[] | void,
|
||||
/** Warnings that occurred during compilation. */
|
||||
warnings: Warning[]
|
||||
}
|
||||
|
||||
export interface Warning {
|
||||
message: string,
|
||||
type: string,
|
||||
value?: any,
|
||||
loc: ErrorLocation
|
||||
}
|
||||
|
||||
export interface CSSModulesConfig {
|
||||
/** The pattern to use when renaming class names and other identifiers. Default is `[hash]_[local]`. */
|
||||
pattern?: string,
|
||||
/** Whether to rename dashed identifiers, e.g. custom properties. */
|
||||
dashedIdents?: boolean,
|
||||
/** Whether to enable hashing for `@keyframes`. */
|
||||
animation?: boolean,
|
||||
/** Whether to enable hashing for CSS grid identifiers. */
|
||||
grid?: boolean,
|
||||
/** Whether to enable hashing for `@container` names. */
|
||||
container?: boolean,
|
||||
/** Whether to enable hashing for custom identifiers. */
|
||||
customIdents?: boolean,
|
||||
/** Whether to require at least one class or id selector in each rule. */
|
||||
pure?: boolean
|
||||
}
|
||||
|
||||
export type CSSModuleExports = {
|
||||
/** Maps exported (i.e. original) names to local names. */
|
||||
[name: string]: CSSModuleExport
|
||||
};
|
||||
|
||||
export interface CSSModuleExport {
|
||||
/** The local (compiled) name for this export. */
|
||||
name: string,
|
||||
/** Whether the export is referenced in this file. */
|
||||
isReferenced: boolean,
|
||||
/** Other names that are composed by this export. */
|
||||
composes: CSSModuleReference[]
|
||||
}
|
||||
|
||||
export type CSSModuleReferences = {
|
||||
/** Maps placeholder names to references. */
|
||||
[name: string]: DependencyCSSModuleReference,
|
||||
};
|
||||
|
||||
export type CSSModuleReference = LocalCSSModuleReference | GlobalCSSModuleReference | DependencyCSSModuleReference;
|
||||
|
||||
export interface LocalCSSModuleReference {
|
||||
type: 'local',
|
||||
/** The local (compiled) name for the reference. */
|
||||
name: string,
|
||||
}
|
||||
|
||||
export interface GlobalCSSModuleReference {
|
||||
type: 'global',
|
||||
/** The referenced global name. */
|
||||
name: string,
|
||||
}
|
||||
|
||||
export interface DependencyCSSModuleReference {
|
||||
type: 'dependency',
|
||||
/** The name to reference within the dependency. */
|
||||
name: string,
|
||||
/** The dependency specifier for the referenced file. */
|
||||
specifier: string
|
||||
}
|
||||
|
||||
export type Dependency = ImportDependency | UrlDependency | FileDependency | GlobDependency;
|
||||
|
||||
export interface ImportDependency {
|
||||
type: 'import',
|
||||
/** The url of the `@import` dependency. */
|
||||
url: string,
|
||||
/** The media query for the `@import` rule. */
|
||||
media: string | null,
|
||||
/** The `supports()` query for the `@import` rule. */
|
||||
supports: string | null,
|
||||
/** The source location where the `@import` rule was found. */
|
||||
loc: SourceLocation,
|
||||
/** The placeholder that the import was replaced with. */
|
||||
placeholder: string
|
||||
}
|
||||
|
||||
export interface UrlDependency {
|
||||
type: 'url',
|
||||
/** The url of the dependency. */
|
||||
url: string,
|
||||
/** The source location where the `url()` was found. */
|
||||
loc: SourceLocation,
|
||||
/** The placeholder that the url was replaced with. */
|
||||
placeholder: string
|
||||
}
|
||||
|
||||
export interface FileDependency {
|
||||
type: 'file',
|
||||
filePath: string
|
||||
}
|
||||
|
||||
export interface GlobDependency {
|
||||
type: 'glob',
|
||||
glob: string
|
||||
}
|
||||
|
||||
export interface SourceLocation {
|
||||
/** The file path in which the dependency exists. */
|
||||
filePath: string,
|
||||
/** The start location of the dependency. */
|
||||
start: Location,
|
||||
/** The end location (inclusive) of the dependency. */
|
||||
end: Location
|
||||
}
|
||||
|
||||
export interface Location {
|
||||
/** The line number (1-based). */
|
||||
line: number,
|
||||
/** The column number (0-based). */
|
||||
column: number
|
||||
}
|
||||
|
||||
export interface ErrorLocation extends Location {
|
||||
filename: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Compiles a CSS file, including optionally minifying and lowering syntax to the given
|
||||
* targets. A source map may also be generated, but this is not enabled by default.
|
||||
*/
|
||||
export declare function transform<C extends CustomAtRules>(options: TransformOptions<C>): TransformResult;
|
||||
|
||||
export interface TransformAttributeOptions {
|
||||
/** The filename in which the style attribute appeared. Used for error messages and dependencies. */
|
||||
filename?: string,
|
||||
/** The source code to transform. */
|
||||
code: Uint8Array,
|
||||
/** Whether to enable minification. */
|
||||
minify?: boolean,
|
||||
/** The browser targets for the generated code. */
|
||||
targets?: Targets,
|
||||
/**
|
||||
* Whether to analyze `url()` dependencies.
|
||||
* When enabled, `url()` dependencies are replaced with hashed placeholders
|
||||
* that can be replaced with the final urls later (after bundling).
|
||||
* Dependencies are returned as part of the result.
|
||||
*/
|
||||
analyzeDependencies?: boolean,
|
||||
/**
|
||||
* Whether to ignore invalid rules and declarations rather than erroring.
|
||||
* When enabled, warnings are returned, and the invalid rule or declaration is
|
||||
* omitted from the output code.
|
||||
*/
|
||||
errorRecovery?: boolean,
|
||||
/**
|
||||
* An AST visitor object. This allows custom transforms or analysis to be implemented in JavaScript.
|
||||
* Multiple visitors can be composed into one using the `composeVisitors` function.
|
||||
* For optimal performance, visitors should be as specific as possible about what types of values
|
||||
* they care about so that JavaScript has to be called as little as possible.
|
||||
*/
|
||||
visitor?: Visitor<never> | VisitorFunction<never>
|
||||
}
|
||||
|
||||
export interface TransformAttributeResult {
|
||||
/** The transformed code. */
|
||||
code: Uint8Array,
|
||||
/** `@import` and `url()` dependencies, if enabled. */
|
||||
dependencies: Dependency[] | void,
|
||||
/** Warnings that occurred during compilation. */
|
||||
warnings: Warning[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Compiles a single CSS declaration list, such as an inline style attribute in HTML.
|
||||
*/
|
||||
export declare function transformStyleAttribute(options: TransformAttributeOptions): TransformAttributeResult;
|
||||
|
||||
/**
|
||||
* Converts a browserslist result into targets that can be passed to lightningcss.
|
||||
* @param browserslist the result of calling `browserslist`
|
||||
*/
|
||||
export declare function browserslistToTargets(browserslist: string[]): Targets;
|
||||
|
||||
/**
|
||||
* Bundles a CSS file and its dependencies, inlining @import rules.
|
||||
*/
|
||||
export declare function bundle<C extends CustomAtRules>(options: BundleOptions<C>): TransformResult;
|
||||
|
||||
/**
|
||||
* Bundles a CSS file and its dependencies asynchronously, inlining @import rules.
|
||||
*/
|
||||
export declare function bundleAsync<C extends CustomAtRules>(options: BundleAsyncOptions<C>): Promise<TransformResult>;
|
||||
|
||||
/**
|
||||
* Composes multiple visitor objects into a single one.
|
||||
*/
|
||||
export declare function composeVisitors<C extends CustomAtRules>(visitors: (Visitor<C> | VisitorFunction<C>)[]): Visitor<C> | VisitorFunction<C>;
|
||||
59
node_modules/@tailwindcss/node/node_modules/lightningcss/node/index.js
generated
vendored
Normal file
59
node_modules/@tailwindcss/node/node_modules/lightningcss/node/index.js
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
let parts = [process.platform, process.arch];
|
||||
if (process.platform === 'linux') {
|
||||
const { MUSL, familySync } = require('detect-libc');
|
||||
const family = familySync();
|
||||
if (family === MUSL) {
|
||||
parts.push('musl');
|
||||
} else if (process.arch === 'arm') {
|
||||
parts.push('gnueabihf');
|
||||
} else {
|
||||
parts.push('gnu');
|
||||
}
|
||||
} else if (process.platform === 'win32') {
|
||||
parts.push('msvc');
|
||||
}
|
||||
|
||||
let native;
|
||||
try {
|
||||
native = require(`lightningcss-${parts.join('-')}`);
|
||||
} catch (err) {
|
||||
native = require(`../lightningcss.${parts.join('-')}.node`);
|
||||
}
|
||||
|
||||
module.exports.transform = wrap(native.transform);
|
||||
module.exports.transformStyleAttribute = wrap(native.transformStyleAttribute);
|
||||
module.exports.bundle = wrap(native.bundle);
|
||||
module.exports.bundleAsync = wrap(native.bundleAsync);
|
||||
module.exports.browserslistToTargets = require('./browserslistToTargets');
|
||||
module.exports.composeVisitors = require('./composeVisitors');
|
||||
module.exports.Features = require('./flags').Features;
|
||||
|
||||
function wrap(call) {
|
||||
return (options) => {
|
||||
if (typeof options.visitor === 'function') {
|
||||
let deps = [];
|
||||
options.visitor = options.visitor({
|
||||
addDependency(dep) {
|
||||
deps.push(dep);
|
||||
}
|
||||
});
|
||||
|
||||
let result = call(options);
|
||||
if (result instanceof Promise) {
|
||||
result = result.then(res => {
|
||||
if (deps.length) {
|
||||
res.dependencies ??= [];
|
||||
res.dependencies.push(...deps);
|
||||
}
|
||||
return res;
|
||||
});
|
||||
} else if (deps.length) {
|
||||
result.dependencies ??= [];
|
||||
result.dependencies.push(...deps);
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
return call(options);
|
||||
}
|
||||
};
|
||||
}
|
||||
843
node_modules/@tailwindcss/node/node_modules/lightningcss/node/index.js.flow
generated
vendored
Normal file
843
node_modules/@tailwindcss/node/node_modules/lightningcss/node/index.js.flow
generated
vendored
Normal file
@@ -0,0 +1,843 @@
|
||||
// @flow
|
||||
|
||||
type Exclude<A, B> = A;
|
||||
// see https://gist.github.com/thecotne/6e5969f4aaf8f253985ed36b30ac9fe0
|
||||
type $FlowGen$If<X: boolean, Then, Else = empty> = $Call<
|
||||
((true, Then, Else) => Then) & ((false, Then, Else) => Else),
|
||||
X,
|
||||
Then,
|
||||
Else
|
||||
>;
|
||||
|
||||
type $FlowGen$Assignable<A, B> = $Call<
|
||||
((...r: [B]) => true) & ((...r: [A]) => false),
|
||||
A
|
||||
>;
|
||||
|
||||
import type {
|
||||
Angle,
|
||||
CssColor,
|
||||
Rule,
|
||||
CustomProperty,
|
||||
EnvironmentVariable,
|
||||
Function,
|
||||
Image,
|
||||
LengthValue,
|
||||
MediaQuery,
|
||||
Declaration,
|
||||
Ratio,
|
||||
Resolution,
|
||||
Selector,
|
||||
SupportsCondition,
|
||||
Time,
|
||||
Token,
|
||||
TokenOrValue,
|
||||
UnknownAtRule,
|
||||
Url,
|
||||
Variable,
|
||||
StyleRule,
|
||||
DeclarationBlock,
|
||||
ParsedComponent,
|
||||
Multiplier,
|
||||
StyleSheet,
|
||||
Location2,
|
||||
} from "./ast.js.flow";
|
||||
import { Targets, Features } from "./targets.js.flow";
|
||||
declare export * from "./ast.js.flow";
|
||||
declare export { Targets, Features };
|
||||
export type TransformOptions<C: CustomAtRules> = {|
|
||||
/**
|
||||
* The filename being transformed. Used for error messages and source maps.
|
||||
*/
|
||||
filename: string,
|
||||
|
||||
/**
|
||||
* The source code to transform.
|
||||
*/
|
||||
code: Uint8Array,
|
||||
|
||||
/**
|
||||
* Whether to enable minification.
|
||||
*/
|
||||
minify?: boolean,
|
||||
|
||||
/**
|
||||
* Whether to output a source map.
|
||||
*/
|
||||
sourceMap?: boolean,
|
||||
|
||||
/**
|
||||
* An input source map to extend.
|
||||
*/
|
||||
inputSourceMap?: string,
|
||||
|
||||
/**
|
||||
* An optional project root path, used as the source root in the output source map.
|
||||
* Also used to generate relative paths for sources used in CSS module hashes.
|
||||
*/
|
||||
projectRoot?: string,
|
||||
|
||||
/**
|
||||
* The browser targets for the generated code.
|
||||
*/
|
||||
targets?: Targets,
|
||||
|
||||
/**
|
||||
* Features that should always be compiled, even when supported by targets.
|
||||
*/
|
||||
include?: number,
|
||||
|
||||
/**
|
||||
* Features that should never be compiled, even when unsupported by targets.
|
||||
*/
|
||||
exclude?: number,
|
||||
|
||||
/**
|
||||
* Whether to enable parsing various draft syntax.
|
||||
*/
|
||||
drafts?: Drafts,
|
||||
|
||||
/**
|
||||
* Whether to enable various non-standard syntax.
|
||||
*/
|
||||
nonStandard?: NonStandard,
|
||||
|
||||
/**
|
||||
* Whether to compile this file as a CSS module.
|
||||
*/
|
||||
cssModules?: boolean | CSSModulesConfig,
|
||||
|
||||
/**
|
||||
* Whether to analyze dependencies (e.g. string).
|
||||
* When enabled, string dependencies
|
||||
* are replaced with hashed placeholders that can be replaced with the final
|
||||
* urls later (after bundling). Dependencies are returned as part of the result.
|
||||
*/
|
||||
analyzeDependencies?: boolean | DependencyOptions,
|
||||
|
||||
/**
|
||||
* Replaces user action pseudo classes with class names that can be applied from JavaScript.
|
||||
* This is useful for polyfills, for example.
|
||||
*/
|
||||
pseudoClasses?: PseudoClasses,
|
||||
|
||||
/**
|
||||
* A list of class names, ids, and custom identifiers (e.g. @keyframes) that are known
|
||||
* to be unused. These will be removed during minification. Note that these are not
|
||||
* selectors but individual names (without any . or # prefixes).
|
||||
*/
|
||||
unusedSymbols?: string[],
|
||||
|
||||
/**
|
||||
* Whether to ignore invalid rules and declarations rather than erroring.
|
||||
* When enabled, warnings are returned, and the invalid rule or declaration is
|
||||
* omitted from the output code.
|
||||
*/
|
||||
errorRecovery?: boolean,
|
||||
|
||||
/**
|
||||
* An AST visitor object. This allows custom transforms or analysis to be implemented in JavaScript.
|
||||
* Multiple visitors can be composed into one using the string function.
|
||||
* For optimal performance, visitors should be as specific as possible about what types of values
|
||||
* they care about so that JavaScript has to be called as little as possible.
|
||||
*/
|
||||
visitor?: Visitor<C> | VisitorFunction<C>,
|
||||
|
||||
/**
|
||||
* Defines how to parse custom CSS at-rules. Each at-rule can have a prelude, defined using a CSS
|
||||
* [syntax string](https://drafts.css-houdini.org/css-properties-values-api/#syntax-strings), and
|
||||
* a block body. The body can be a declaration list, rule list, or style block as defined in the
|
||||
* [css spec](https://drafts.csswg.org/css-syntax/#declaration-rule-list).
|
||||
*/
|
||||
customAtRules?: C,
|
||||
|};
|
||||
declare type PropertyStart =
|
||||
| "-"
|
||||
| "_"
|
||||
| "a"
|
||||
| "b"
|
||||
| "c"
|
||||
| "d"
|
||||
| "e"
|
||||
| "f"
|
||||
| "g"
|
||||
| "h"
|
||||
| "i"
|
||||
| "j"
|
||||
| "k"
|
||||
| "l"
|
||||
| "m"
|
||||
| "n"
|
||||
| "o"
|
||||
| "p"
|
||||
| "q"
|
||||
| "r"
|
||||
| "s"
|
||||
| "t"
|
||||
| "u"
|
||||
| "v"
|
||||
| "w"
|
||||
| "x"
|
||||
| "y"
|
||||
| "z";
|
||||
export type ReturnedDeclaration =
|
||||
| Declaration
|
||||
| {|
|
||||
/**
|
||||
* The property name.
|
||||
*/
|
||||
property: string,
|
||||
|
||||
/**
|
||||
* The raw string value for the declaration.
|
||||
*/
|
||||
raw: string,
|
||||
|};
|
||||
export type ReturnedMediaQuery =
|
||||
| MediaQuery
|
||||
| {|
|
||||
/**
|
||||
* The raw string value for the media query.
|
||||
*/
|
||||
raw: string,
|
||||
|};
|
||||
declare type FindByType<Union, Name> = $FlowGen$If<
|
||||
$FlowGen$Assignable<
|
||||
Union,
|
||||
{|
|
||||
type: Name,
|
||||
|}
|
||||
>,
|
||||
Union,
|
||||
empty
|
||||
>;
|
||||
export type ReturnedRule = Rule<ReturnedDeclaration, ReturnedMediaQuery>;
|
||||
declare type RequiredValue<Rule> = $FlowGen$If<
|
||||
$FlowGen$Assignable<
|
||||
Rule,
|
||||
{|
|
||||
value: { [key: string]: any },
|
||||
|}
|
||||
>,
|
||||
$FlowGen$If<
|
||||
$FlowGen$Assignable<$PropertyType<Rule, "value">, StyleRule>,
|
||||
{|
|
||||
...Rule,
|
||||
...{|
|
||||
value: {|
|
||||
...Required<StyleRule>,
|
||||
...{|
|
||||
declarations: Required<DeclarationBlock>,
|
||||
|},
|
||||
|},
|
||||
|},
|
||||
|},
|
||||
{|
|
||||
...Rule,
|
||||
...{|
|
||||
value: Required<$PropertyType<Rule, "value">>,
|
||||
|},
|
||||
|}
|
||||
>,
|
||||
Rule
|
||||
>;
|
||||
declare type RuleVisitor<R = RequiredValue<Rule>> = (
|
||||
rule: R
|
||||
) => ReturnedRule | ReturnedRule[] | void;
|
||||
declare type MappedRuleVisitors = $ObjMapi<
|
||||
{ [k: Exclude<$PropertyType<Rule, "type">, "unknown" | "custom">]: any },
|
||||
<Name>(Name) => RuleVisitor<RequiredValue<FindByType<Rule, Name>>>
|
||||
>;
|
||||
declare type UnknownVisitors<T> = {
|
||||
[name: string]: RuleVisitor<T>,
|
||||
};
|
||||
declare type CustomVisitors<T: CustomAtRules> = $ObjMapi<
|
||||
T,
|
||||
<Name>(Name) => RuleVisitor<CustomAtRule<Name, $ElementType<T, Name>>>
|
||||
>;
|
||||
declare type AnyCustomAtRule<C: CustomAtRules> = $ElementType<
|
||||
$ObjMapi<C, <Key>(Key) => CustomAtRule<Key, $ElementType<C, Key>>>,
|
||||
$Keys<C>
|
||||
>;
|
||||
declare type RuleVisitors<C: CustomAtRules> = {|
|
||||
...MappedRuleVisitors,
|
||||
...{|
|
||||
unknown?:
|
||||
| UnknownVisitors<UnknownAtRule>
|
||||
| $Diff<
|
||||
RuleVisitor<UnknownAtRule>,
|
||||
{ [key: $Keys<CallableFunction>]: any }
|
||||
>,
|
||||
custom?:
|
||||
| CustomVisitors<C>
|
||||
| $Diff<
|
||||
RuleVisitor<AnyCustomAtRule<C>>,
|
||||
{ [key: $Keys<CallableFunction>]: any }
|
||||
>,
|
||||
|},
|
||||
|};
|
||||
declare type PreludeTypes = Exclude<
|
||||
$PropertyType<ParsedComponent, "type">,
|
||||
"literal" | "repeated" | "token"
|
||||
>;
|
||||
declare type SyntaxString = string | string;
|
||||
declare type ComponentTypes = $ObjMapi<
|
||||
{ [k: PreludeTypes]: any },
|
||||
<Key>(Key) => FindByType<ParsedComponent, Key>
|
||||
>;
|
||||
declare type Repetitions = $ObjMapi<
|
||||
{ [k: PreludeTypes]: any },
|
||||
<Key>(Key) => {|
|
||||
type: "repeated",
|
||||
value: {|
|
||||
components: FindByType<ParsedComponent, Key>[],
|
||||
multiplier: Multiplier,
|
||||
|},
|
||||
|}
|
||||
>;
|
||||
declare type MappedPrelude = {| ...ComponentTypes, ...Repetitions |};
|
||||
declare type MappedBody<P: $PropertyType<CustomAtRuleDefinition, "body">> =
|
||||
$FlowGen$If<$FlowGen$Assignable<P, "style-block">, "rule-list", P>;
|
||||
declare type CustomAtRule<N, R: CustomAtRuleDefinition> = {|
|
||||
name: N,
|
||||
prelude: $FlowGen$If<
|
||||
$FlowGen$Assignable<$PropertyType<R, "prelude">, $Keys<MappedPrelude>>,
|
||||
$ElementType<MappedPrelude, $PropertyType<R, "prelude">>,
|
||||
ParsedComponent
|
||||
>,
|
||||
body: FindByType<CustomAtRuleBody, MappedBody<$PropertyType<R, "body">>>,
|
||||
loc: Location2,
|
||||
|};
|
||||
declare type CustomAtRuleBody =
|
||||
| {|
|
||||
type: "declaration-list",
|
||||
value: Required<DeclarationBlock>,
|
||||
|}
|
||||
| {|
|
||||
type: "rule-list",
|
||||
value: RequiredValue<Rule>[],
|
||||
|};
|
||||
declare type FindProperty<Union, Name> = $FlowGen$If<
|
||||
$FlowGen$Assignable<
|
||||
Union,
|
||||
{|
|
||||
property: Name,
|
||||
|}
|
||||
>,
|
||||
Union,
|
||||
empty
|
||||
>;
|
||||
declare type DeclarationVisitor<P = Declaration> = (
|
||||
property: P
|
||||
) => ReturnedDeclaration | ReturnedDeclaration[] | void;
|
||||
declare type MappedDeclarationVisitors = $ObjMapi<
|
||||
{
|
||||
[k: Exclude<
|
||||
$PropertyType<Declaration, "property">,
|
||||
"unparsed" | "custom"
|
||||
>]: any,
|
||||
},
|
||||
<Name>(
|
||||
Name
|
||||
) => DeclarationVisitor<
|
||||
FindProperty<Declaration, Name> | FindProperty<Declaration, "unparsed">
|
||||
>
|
||||
>;
|
||||
declare type CustomPropertyVisitors = {
|
||||
[name: string]: DeclarationVisitor<CustomProperty>,
|
||||
};
|
||||
declare type DeclarationVisitors = {|
|
||||
...MappedDeclarationVisitors,
|
||||
...{|
|
||||
custom?: CustomPropertyVisitors | DeclarationVisitor<CustomProperty>,
|
||||
|},
|
||||
|};
|
||||
declare type RawValue = {|
|
||||
/**
|
||||
* A raw string value which will be parsed like CSS.
|
||||
*/
|
||||
raw: string,
|
||||
|};
|
||||
declare type TokenReturnValue = TokenOrValue | TokenOrValue[] | RawValue | void;
|
||||
declare type TokenVisitor = (token: Token) => TokenReturnValue;
|
||||
declare type VisitableTokenTypes =
|
||||
| "ident"
|
||||
| "at-keyword"
|
||||
| "hash"
|
||||
| "id-hash"
|
||||
| "string"
|
||||
| "number"
|
||||
| "percentage"
|
||||
| "dimension";
|
||||
declare type TokenVisitors = $ObjMapi<
|
||||
{ [k: VisitableTokenTypes]: any },
|
||||
<Name>(Name) => (token: FindByType<Token, Name>) => TokenReturnValue
|
||||
>;
|
||||
declare type FunctionVisitor = (fn: Function) => TokenReturnValue;
|
||||
declare type EnvironmentVariableVisitor = (
|
||||
env: EnvironmentVariable
|
||||
) => TokenReturnValue;
|
||||
declare type EnvironmentVariableVisitors = {
|
||||
[name: string]: EnvironmentVariableVisitor,
|
||||
};
|
||||
export type Visitor<C: CustomAtRules> = {|
|
||||
StyleSheet?: (
|
||||
stylesheet: StyleSheet
|
||||
) => StyleSheet<ReturnedDeclaration, ReturnedMediaQuery> | void,
|
||||
StyleSheetExit?: (
|
||||
stylesheet: StyleSheet
|
||||
) => StyleSheet<ReturnedDeclaration, ReturnedMediaQuery> | void,
|
||||
Rule?: RuleVisitor<> | RuleVisitors<C>,
|
||||
RuleExit?: RuleVisitor<> | RuleVisitors<C>,
|
||||
Declaration?: DeclarationVisitor<> | DeclarationVisitors,
|
||||
DeclarationExit?: DeclarationVisitor<> | DeclarationVisitors,
|
||||
Url?: (url: Url) => Url | void,
|
||||
Color?: (color: CssColor) => CssColor | void,
|
||||
Image?: (image: Image) => Image | void,
|
||||
ImageExit?: (image: Image) => Image | void,
|
||||
Length?: (length: LengthValue) => LengthValue | void,
|
||||
Angle?: (angle: Angle) => Angle | void,
|
||||
Ratio?: (ratio: Ratio) => Ratio | void,
|
||||
Resolution?: (resolution: Resolution) => Resolution | void,
|
||||
Time?: (time: Time) => Time | void,
|
||||
CustomIdent?: (ident: string) => string | void,
|
||||
DashedIdent?: (ident: string) => string | void,
|
||||
MediaQuery?: (
|
||||
query: MediaQuery
|
||||
) => ReturnedMediaQuery | ReturnedMediaQuery[] | void,
|
||||
MediaQueryExit?: (
|
||||
query: MediaQuery
|
||||
) => ReturnedMediaQuery | ReturnedMediaQuery[] | void,
|
||||
SupportsCondition?: (condition: SupportsCondition) => SupportsCondition,
|
||||
SupportsConditionExit?: (condition: SupportsCondition) => SupportsCondition,
|
||||
Selector?: (selector: Selector) => Selector | Selector[] | void,
|
||||
Token?: TokenVisitor | TokenVisitors,
|
||||
Function?:
|
||||
| FunctionVisitor
|
||||
| {
|
||||
[name: string]: FunctionVisitor,
|
||||
},
|
||||
FunctionExit?:
|
||||
| FunctionVisitor
|
||||
| {
|
||||
[name: string]: FunctionVisitor,
|
||||
},
|
||||
Variable?: (variable: Variable) => TokenReturnValue,
|
||||
VariableExit?: (variable: Variable) => TokenReturnValue,
|
||||
EnvironmentVariable?:
|
||||
| EnvironmentVariableVisitor
|
||||
| EnvironmentVariableVisitors,
|
||||
EnvironmentVariableExit?:
|
||||
| EnvironmentVariableVisitor
|
||||
| EnvironmentVariableVisitors,
|
||||
|};
|
||||
export type VisitorDependency = FileDependency | GlobDependency;
|
||||
export type VisitorOptions = {|
|
||||
addDependency: (dep: VisitorDependency) => void,
|
||||
|};
|
||||
export type VisitorFunction<C: CustomAtRules> = (
|
||||
options: VisitorOptions
|
||||
) => Visitor<C>;
|
||||
export type CustomAtRules = {|
|
||||
[name: string]: CustomAtRuleDefinition,
|
||||
|};
|
||||
export type CustomAtRuleDefinition = {|
|
||||
/**
|
||||
* Defines the syntax for a custom at-rule prelude. The value should be a
|
||||
* CSS [syntax string](https://drafts.css-houdini.org/css-properties-values-api/#syntax-strings)
|
||||
* representing the types of values that are accepted. This property may be omitted or
|
||||
* set to null to indicate that no prelude is accepted.
|
||||
*/
|
||||
prelude?: SyntaxString | null,
|
||||
|
||||
/**
|
||||
* Defines the type of body contained within the at-rule block.
|
||||
* - declaration-list: A CSS declaration list, as in a style rule.
|
||||
* - rule-list: A list of CSS rules, as supported within a non-nested
|
||||
* at-rule such as string.
|
||||
* - style-block: Both a declaration list and rule list, as accepted within
|
||||
* a nested at-rule within a style rule (e.g. string inside a style rule
|
||||
* with directly nested declarations).
|
||||
*/
|
||||
body?: "declaration-list" | "rule-list" | "style-block" | null,
|
||||
|};
|
||||
export type DependencyOptions = {|
|
||||
/**
|
||||
* Whether to preserve string rules rather than removing them.
|
||||
*/
|
||||
preserveImports?: boolean,
|
||||
|};
|
||||
export type BundleOptions<C: CustomAtRules> = $Diff<
|
||||
TransformOptions<C>,
|
||||
{| code: any |}
|
||||
>;
|
||||
export type BundleAsyncOptions<C: CustomAtRules> = {|
|
||||
...$Exact<BundleOptions<C>>,
|
||||
|
||||
resolver?: Resolver,
|
||||
|};
|
||||
|
||||
/**
|
||||
* Custom resolver to use when loading CSS files.
|
||||
*/
|
||||
export type Resolver = {|
|
||||
/**
|
||||
* Read the given file and return its contents as a string.
|
||||
*/
|
||||
read?: (file: string) => string | Promise<string>,
|
||||
|
||||
/**
|
||||
* Resolve the given CSS import specifier from the provided originating file to a
|
||||
* path which gets passed to string.
|
||||
*/
|
||||
resolve?: (
|
||||
specifier: string,
|
||||
originatingFile: string
|
||||
) => string | Promise<string>,
|
||||
|};
|
||||
export type Drafts = {|
|
||||
/**
|
||||
* Whether to enable @custom-media rules.
|
||||
*/
|
||||
customMedia?: boolean,
|
||||
|};
|
||||
export type NonStandard = {|
|
||||
/**
|
||||
* Whether to enable the non-standard >>> and /deep/ selector combinators used by Angular and Vue.
|
||||
*/
|
||||
deepSelectorCombinator?: boolean,
|
||||
|};
|
||||
export type PseudoClasses = {|
|
||||
hover?: string,
|
||||
active?: string,
|
||||
focus?: string,
|
||||
focusVisible?: string,
|
||||
focusWithin?: string,
|
||||
|};
|
||||
export type TransformResult = {|
|
||||
/**
|
||||
* The transformed code.
|
||||
*/
|
||||
code: Uint8Array,
|
||||
|
||||
/**
|
||||
* The generated source map, if enabled.
|
||||
*/
|
||||
map: Uint8Array | void,
|
||||
|
||||
/**
|
||||
* CSS module exports, if enabled.
|
||||
*/
|
||||
exports: CSSModuleExports | void,
|
||||
|
||||
/**
|
||||
* CSS module references, if string is enabled.
|
||||
*/
|
||||
references: CSSModuleReferences,
|
||||
|
||||
/**
|
||||
* string dependencies, if enabled.
|
||||
*/
|
||||
dependencies: Dependency[] | void,
|
||||
|
||||
/**
|
||||
* Warnings that occurred during compilation.
|
||||
*/
|
||||
warnings: Warning[],
|
||||
|};
|
||||
export type Warning = {|
|
||||
message: string,
|
||||
type: string,
|
||||
value?: any,
|
||||
loc: ErrorLocation,
|
||||
|};
|
||||
export type CSSModulesConfig = {|
|
||||
/**
|
||||
* The pattern to use when renaming class names and other identifiers. Default is string.
|
||||
*/
|
||||
pattern?: string,
|
||||
|
||||
/**
|
||||
* Whether to rename dashed identifiers, e.g. custom properties.
|
||||
*/
|
||||
dashedIdents?: boolean,
|
||||
|
||||
/**
|
||||
* Whether to enable hashing for string.
|
||||
*/
|
||||
animation?: boolean,
|
||||
|
||||
/**
|
||||
* Whether to enable hashing for CSS grid identifiers.
|
||||
*/
|
||||
grid?: boolean,
|
||||
|
||||
/**
|
||||
* Whether to enable hashing for string names.
|
||||
*/
|
||||
container?: boolean,
|
||||
|
||||
/**
|
||||
* Whether to enable hashing for custom identifiers.
|
||||
*/
|
||||
customIdents?: boolean,
|
||||
|
||||
/**
|
||||
* Whether to require at least one class or id selector in each rule.
|
||||
*/
|
||||
pure?: boolean,
|
||||
|};
|
||||
export type CSSModuleExports = {
|
||||
/**
|
||||
* Maps exported (i.e. original) names to local names.
|
||||
*/
|
||||
[name: string]: CSSModuleExport,
|
||||
};
|
||||
export type CSSModuleExport = {|
|
||||
/**
|
||||
* The local (compiled) name for this export.
|
||||
*/
|
||||
name: string,
|
||||
|
||||
/**
|
||||
* Whether the export is referenced in this file.
|
||||
*/
|
||||
isReferenced: boolean,
|
||||
|
||||
/**
|
||||
* Other names that are composed by this export.
|
||||
*/
|
||||
composes: CSSModuleReference[],
|
||||
|};
|
||||
export type CSSModuleReferences = {
|
||||
/**
|
||||
* Maps placeholder names to references.
|
||||
*/
|
||||
[name: string]: DependencyCSSModuleReference,
|
||||
};
|
||||
export type CSSModuleReference =
|
||||
| LocalCSSModuleReference
|
||||
| GlobalCSSModuleReference
|
||||
| DependencyCSSModuleReference;
|
||||
export type LocalCSSModuleReference = {|
|
||||
type: "local",
|
||||
|
||||
/**
|
||||
* The local (compiled) name for the reference.
|
||||
*/
|
||||
name: string,
|
||||
|};
|
||||
export type GlobalCSSModuleReference = {|
|
||||
type: "global",
|
||||
|
||||
/**
|
||||
* The referenced global name.
|
||||
*/
|
||||
name: string,
|
||||
|};
|
||||
export type DependencyCSSModuleReference = {|
|
||||
type: "dependency",
|
||||
|
||||
/**
|
||||
* The name to reference within the dependency.
|
||||
*/
|
||||
name: string,
|
||||
|
||||
/**
|
||||
* The dependency specifier for the referenced file.
|
||||
*/
|
||||
specifier: string,
|
||||
|};
|
||||
export type Dependency =
|
||||
| ImportDependency
|
||||
| UrlDependency
|
||||
| FileDependency
|
||||
| GlobDependency;
|
||||
export type ImportDependency = {|
|
||||
type: "import",
|
||||
|
||||
/**
|
||||
* The url of the string dependency.
|
||||
*/
|
||||
url: string,
|
||||
|
||||
/**
|
||||
* The media query for the string rule.
|
||||
*/
|
||||
media: string | null,
|
||||
|
||||
/**
|
||||
* The string rule.
|
||||
*/
|
||||
supports: string | null,
|
||||
|
||||
/**
|
||||
* The source location where the string rule was found.
|
||||
*/
|
||||
loc: SourceLocation,
|
||||
|
||||
/**
|
||||
* The placeholder that the import was replaced with.
|
||||
*/
|
||||
placeholder: string,
|
||||
|};
|
||||
export type UrlDependency = {|
|
||||
type: "url",
|
||||
|
||||
/**
|
||||
* The url of the dependency.
|
||||
*/
|
||||
url: string,
|
||||
|
||||
/**
|
||||
* The source location where the string was found.
|
||||
*/
|
||||
loc: SourceLocation,
|
||||
|
||||
/**
|
||||
* The placeholder that the url was replaced with.
|
||||
*/
|
||||
placeholder: string,
|
||||
|};
|
||||
export type FileDependency = {|
|
||||
type: "file",
|
||||
filePath: string,
|
||||
|};
|
||||
export type GlobDependency = {|
|
||||
type: "glob",
|
||||
glob: string,
|
||||
|};
|
||||
export type SourceLocation = {|
|
||||
/**
|
||||
* The file path in which the dependency exists.
|
||||
*/
|
||||
filePath: string,
|
||||
|
||||
/**
|
||||
* The start location of the dependency.
|
||||
*/
|
||||
start: Location,
|
||||
|
||||
/**
|
||||
* The end location (inclusive) of the dependency.
|
||||
*/
|
||||
end: Location,
|
||||
|};
|
||||
export type Location = {|
|
||||
/**
|
||||
* The line number (1-based).
|
||||
*/
|
||||
line: number,
|
||||
|
||||
/**
|
||||
* The column number (0-based).
|
||||
*/
|
||||
column: number,
|
||||
|};
|
||||
export type ErrorLocation = {|
|
||||
...$Exact<Location>,
|
||||
|
||||
filename: string,
|
||||
|};
|
||||
|
||||
/**
|
||||
* Compiles a CSS file, including optionally minifying and lowering syntax to the given
|
||||
* targets. A source map may also be generated, but this is not enabled by default.
|
||||
*/
|
||||
declare export function transform<C: CustomAtRules>(
|
||||
options: TransformOptions<C>
|
||||
): TransformResult;
|
||||
export type TransformAttributeOptions = {|
|
||||
/**
|
||||
* The filename in which the style attribute appeared. Used for error messages and dependencies.
|
||||
*/
|
||||
filename?: string,
|
||||
|
||||
/**
|
||||
* The source code to transform.
|
||||
*/
|
||||
code: Uint8Array,
|
||||
|
||||
/**
|
||||
* Whether to enable minification.
|
||||
*/
|
||||
minify?: boolean,
|
||||
|
||||
/**
|
||||
* The browser targets for the generated code.
|
||||
*/
|
||||
targets?: Targets,
|
||||
|
||||
/**
|
||||
* Whether to analyze string dependencies.
|
||||
* When enabled, string dependencies are replaced with hashed placeholders
|
||||
* that can be replaced with the final urls later (after bundling).
|
||||
* Dependencies are returned as part of the result.
|
||||
*/
|
||||
analyzeDependencies?: boolean,
|
||||
|
||||
/**
|
||||
* Whether to ignore invalid rules and declarations rather than erroring.
|
||||
* When enabled, warnings are returned, and the invalid rule or declaration is
|
||||
* omitted from the output code.
|
||||
*/
|
||||
errorRecovery?: boolean,
|
||||
|
||||
/**
|
||||
* An AST visitor object. This allows custom transforms or analysis to be implemented in JavaScript.
|
||||
* Multiple visitors can be composed into one using the string function.
|
||||
* For optimal performance, visitors should be as specific as possible about what types of values
|
||||
* they care about so that JavaScript has to be called as little as possible.
|
||||
*/
|
||||
visitor?: Visitor<empty> | VisitorFunction<empty>,
|
||||
|};
|
||||
export type TransformAttributeResult = {|
|
||||
/**
|
||||
* The transformed code.
|
||||
*/
|
||||
code: Uint8Array,
|
||||
|
||||
/**
|
||||
* string dependencies, if enabled.
|
||||
*/
|
||||
dependencies: Dependency[] | void,
|
||||
|
||||
/**
|
||||
* Warnings that occurred during compilation.
|
||||
*/
|
||||
warnings: Warning[],
|
||||
|};
|
||||
|
||||
/**
|
||||
* Compiles a single CSS declaration list, such as an inline style attribute in HTML.
|
||||
*/
|
||||
declare export function transformStyleAttribute(
|
||||
options: TransformAttributeOptions
|
||||
): TransformAttributeResult;
|
||||
|
||||
/**
|
||||
* Converts a browserslist result into targets that can be passed to lightningcss.
|
||||
* @param browserslist the result of calling string
|
||||
*/
|
||||
declare export function browserslistToTargets(browserslist: string[]): Targets;
|
||||
|
||||
/**
|
||||
* Bundles a CSS file and its dependencies, inlining @import rules.
|
||||
*/
|
||||
declare export function bundle<C: CustomAtRules>(
|
||||
options: BundleOptions<C>
|
||||
): TransformResult;
|
||||
|
||||
/**
|
||||
* Bundles a CSS file and its dependencies asynchronously, inlining @import rules.
|
||||
*/
|
||||
declare export function bundleAsync<C: CustomAtRules>(
|
||||
options: BundleAsyncOptions<C>
|
||||
): Promise<TransformResult>;
|
||||
|
||||
/**
|
||||
* Composes multiple visitor objects into a single one.
|
||||
*/
|
||||
declare export function composeVisitors<C: CustomAtRules>(
|
||||
visitors: (Visitor<C> | VisitorFunction<C>)[]
|
||||
): Visitor<C> | VisitorFunction<C>;
|
||||
4
node_modules/@tailwindcss/node/node_modules/lightningcss/node/index.mjs
generated
vendored
Normal file
4
node_modules/@tailwindcss/node/node_modules/lightningcss/node/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import index from './index.js';
|
||||
|
||||
const { transform, transformStyleAttribute, bundle, bundleAsync, browserslistToTargets, composeVisitors, Features } = index;
|
||||
export { transform, transformStyleAttribute, bundle, bundleAsync, browserslistToTargets, composeVisitors, Features };
|
||||
40
node_modules/@tailwindcss/node/node_modules/lightningcss/node/targets.d.ts
generated
vendored
Normal file
40
node_modules/@tailwindcss/node/node_modules/lightningcss/node/targets.d.ts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
// This file is autogenerated by build-prefixes.js. DO NOT EDIT!
|
||||
|
||||
export interface Targets {
|
||||
android?: number,
|
||||
chrome?: number,
|
||||
edge?: number,
|
||||
firefox?: number,
|
||||
ie?: number,
|
||||
ios_saf?: number,
|
||||
opera?: number,
|
||||
safari?: number,
|
||||
samsung?: number
|
||||
}
|
||||
|
||||
export const Features: {
|
||||
Nesting: 1,
|
||||
NotSelectorList: 2,
|
||||
DirSelector: 4,
|
||||
LangSelectorList: 8,
|
||||
IsSelector: 16,
|
||||
TextDecorationThicknessPercent: 32,
|
||||
MediaIntervalSyntax: 64,
|
||||
MediaRangeSyntax: 128,
|
||||
CustomMediaQueries: 256,
|
||||
ClampFunction: 512,
|
||||
ColorFunction: 1024,
|
||||
OklabColors: 2048,
|
||||
LabColors: 4096,
|
||||
P3Colors: 8192,
|
||||
HexAlphaColors: 16384,
|
||||
SpaceSeparatedColorNotation: 32768,
|
||||
FontFamilySystemUi: 65536,
|
||||
DoublePositionGradients: 131072,
|
||||
VendorPrefixes: 262144,
|
||||
LogicalProperties: 524288,
|
||||
LightDark: 1048576,
|
||||
Selectors: 31,
|
||||
MediaQueries: 448,
|
||||
Colors: 1113088,
|
||||
};
|
||||
39
node_modules/@tailwindcss/node/node_modules/lightningcss/node/targets.js.flow
generated
vendored
Normal file
39
node_modules/@tailwindcss/node/node_modules/lightningcss/node/targets.js.flow
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
// @flow
|
||||
|
||||
export interface Targets {
|
||||
android?: number;
|
||||
chrome?: number;
|
||||
edge?: number;
|
||||
firefox?: number;
|
||||
ie?: number;
|
||||
ios_saf?: number;
|
||||
opera?: number;
|
||||
safari?: number;
|
||||
samsung?: number;
|
||||
}
|
||||
declare export var Features: {|
|
||||
Nesting: 1,
|
||||
NotSelectorList: 2,
|
||||
DirSelector: 4,
|
||||
LangSelectorList: 8,
|
||||
IsSelector: 16,
|
||||
TextDecorationThicknessPercent: 32,
|
||||
MediaIntervalSyntax: 64,
|
||||
MediaRangeSyntax: 128,
|
||||
CustomMediaQueries: 256,
|
||||
ClampFunction: 512,
|
||||
ColorFunction: 1024,
|
||||
OklabColors: 2048,
|
||||
LabColors: 4096,
|
||||
P3Colors: 8192,
|
||||
HexAlphaColors: 16384,
|
||||
SpaceSeparatedColorNotation: 32768,
|
||||
FontFamilySystemUi: 65536,
|
||||
DoublePositionGradients: 131072,
|
||||
VendorPrefixes: 262144,
|
||||
LogicalProperties: 524288,
|
||||
LightDark: 1048576,
|
||||
Selectors: 31,
|
||||
MediaQueries: 448,
|
||||
Colors: 1113088,
|
||||
|};
|
||||
373
node_modules/@tailwindcss/node/node_modules/lightningcss/node_modules/lightningcss-linux-x64-gnu/LICENSE
generated
vendored
Normal file
373
node_modules/@tailwindcss/node/node_modules/lightningcss/node_modules/lightningcss-linux-x64-gnu/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,373 @@
|
||||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
||||
1
node_modules/@tailwindcss/node/node_modules/lightningcss/node_modules/lightningcss-linux-x64-gnu/README.md
generated
vendored
Normal file
1
node_modules/@tailwindcss/node/node_modules/lightningcss/node_modules/lightningcss-linux-x64-gnu/README.md
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
This is the x86_64-unknown-linux-gnu build of lightningcss. See https://github.com/parcel-bundler/lightningcss for details.
|
||||
BIN
node_modules/@tailwindcss/node/node_modules/lightningcss/node_modules/lightningcss-linux-x64-gnu/lightningcss.linux-x64-gnu.node
generated
vendored
Normal file
BIN
node_modules/@tailwindcss/node/node_modules/lightningcss/node_modules/lightningcss-linux-x64-gnu/lightningcss.linux-x64-gnu.node
generated
vendored
Normal file
Binary file not shown.
37
node_modules/@tailwindcss/node/node_modules/lightningcss/node_modules/lightningcss-linux-x64-gnu/package.json
generated
vendored
Normal file
37
node_modules/@tailwindcss/node/node_modules/lightningcss/node_modules/lightningcss-linux-x64-gnu/package.json
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "lightningcss-linux-x64-gnu",
|
||||
"version": "1.32.0",
|
||||
"license": "MPL-2.0",
|
||||
"description": "A CSS parser, transformer, and minifier written in Rust",
|
||||
"main": "lightningcss.linux-x64-gnu.node",
|
||||
"browserslist": "last 2 versions, not dead",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/parcel-bundler/lightningcss.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 12.0.0"
|
||||
},
|
||||
"files": [
|
||||
"lightningcss.linux-x64-gnu.node"
|
||||
],
|
||||
"resolutions": {
|
||||
"lightningcss": "link:."
|
||||
},
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"libc": [
|
||||
"glibc"
|
||||
]
|
||||
}
|
||||
110
node_modules/@tailwindcss/node/node_modules/lightningcss/package.json
generated
vendored
Normal file
110
node_modules/@tailwindcss/node/node_modules/lightningcss/package.json
generated
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
{
|
||||
"name": "lightningcss",
|
||||
"version": "1.32.0",
|
||||
"license": "MPL-2.0",
|
||||
"description": "A CSS parser, transformer, and minifier written in Rust",
|
||||
"main": "node/index.js",
|
||||
"types": "node/index.d.ts",
|
||||
"exports": {
|
||||
"types": "./node/index.d.ts",
|
||||
"import": "./node/index.mjs",
|
||||
"require": "./node/index.js"
|
||||
},
|
||||
"browserslist": "last 2 versions, not dead",
|
||||
"targets": {
|
||||
"main": false,
|
||||
"types": false
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/parcel-bundler/lightningcss.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 12.0.0"
|
||||
},
|
||||
"napi": {
|
||||
"name": "lightningcss"
|
||||
},
|
||||
"files": [
|
||||
"node/*.js",
|
||||
"node/*.mjs",
|
||||
"node/*.d.ts",
|
||||
"node/*.flow"
|
||||
],
|
||||
"dependencies": {
|
||||
"detect-libc": "^2.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/parser": "7.21.4",
|
||||
"@babel/traverse": "7.21.4",
|
||||
"@codemirror/lang-css": "^6.0.1",
|
||||
"@codemirror/lang-javascript": "^6.1.2",
|
||||
"@codemirror/lint": "^6.1.0",
|
||||
"@codemirror/theme-one-dark": "^6.1.0",
|
||||
"@mdn/browser-compat-data": "~7.3.6",
|
||||
"@napi-rs/cli": "^2.14.0",
|
||||
"autoprefixer": "^10.4.27",
|
||||
"caniuse-lite": "^1.0.30001777",
|
||||
"codemirror": "^6.0.1",
|
||||
"cssnano": "^7.0.6",
|
||||
"esbuild": "^0.19.8",
|
||||
"flowgen": "^1.21.0",
|
||||
"jest-diff": "^27.4.2",
|
||||
"json-schema-to-typescript": "^11.0.2",
|
||||
"markdown-it-anchor": "^8.6.6",
|
||||
"markdown-it-prism": "^2.3.0",
|
||||
"markdown-it-table-of-contents": "^0.6.0",
|
||||
"napi-wasm": "^1.0.1",
|
||||
"node-fetch": "^3.1.0",
|
||||
"parcel": "^2.8.2",
|
||||
"patch-package": "^6.5.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"postcss": "^8.3.11",
|
||||
"posthtml-include": "^1.7.4",
|
||||
"posthtml-markdownit": "^1.3.1",
|
||||
"posthtml-prism": "^1.0.4",
|
||||
"process": "^0.11.10",
|
||||
"puppeteer": "^12.0.1",
|
||||
"recast": "^0.22.0",
|
||||
"sharp": "^0.33.5",
|
||||
"typescript": "^5.7.2",
|
||||
"util": "^0.12.4",
|
||||
"uvu": "^0.5.6"
|
||||
},
|
||||
"resolutions": {
|
||||
"lightningcss": "link:."
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "patch-package",
|
||||
"build": "node scripts/build.js && node scripts/build-flow.js",
|
||||
"build-release": "node scripts/build.js --release && node scripts/build-flow.js",
|
||||
"prepublishOnly": "node scripts/build-flow.js",
|
||||
"wasm:build": "cargo build --target wasm32-unknown-unknown -p lightningcss_node && wasm-opt target/wasm32-unknown-unknown/debug/lightningcss_node.wasm --asyncify --pass-arg=asyncify-imports@env.await_promise_sync -Oz -o wasm/lightningcss_node.wasm && node scripts/build-wasm.js",
|
||||
"wasm:build-release": "cargo build --target wasm32-unknown-unknown -p lightningcss_node --release && wasm-opt target/wasm32-unknown-unknown/release/lightningcss_node.wasm --asyncify --pass-arg=asyncify-imports@env.await_promise_sync -Oz -o wasm/lightningcss_node.wasm && node scripts/build-wasm.js",
|
||||
"website:start": "parcel 'website/*.html' website/playground/index.html",
|
||||
"website:build": "yarn wasm:build-release && parcel build 'website/*.html' website/playground/index.html",
|
||||
"build-ast": "cargo run --example schema --features jsonschema && node scripts/build-ast.js",
|
||||
"tsc": "tsc -p node/tsconfig.json",
|
||||
"test": "uvu node/test"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"lightningcss-darwin-x64": "1.32.0",
|
||||
"lightningcss-linux-x64-gnu": "1.32.0",
|
||||
"lightningcss-win32-x64-msvc": "1.32.0",
|
||||
"lightningcss-win32-arm64-msvc": "1.32.0",
|
||||
"lightningcss-darwin-arm64": "1.32.0",
|
||||
"lightningcss-linux-arm64-gnu": "1.32.0",
|
||||
"lightningcss-linux-arm-gnueabihf": "1.32.0",
|
||||
"lightningcss-linux-arm64-musl": "1.32.0",
|
||||
"lightningcss-linux-x64-musl": "1.32.0",
|
||||
"lightningcss-freebsd-x64": "1.32.0",
|
||||
"lightningcss-android-arm64": "1.32.0"
|
||||
}
|
||||
}
|
||||
7
node_modules/@tailwindcss/node/node_modules/magic-string/LICENSE
generated
vendored
Normal file
7
node_modules/@tailwindcss/node/node_modules/magic-string/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
Copyright 2018 Rich Harris
|
||||
|
||||
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.
|
||||
325
node_modules/@tailwindcss/node/node_modules/magic-string/README.md
generated
vendored
Normal file
325
node_modules/@tailwindcss/node/node_modules/magic-string/README.md
generated
vendored
Normal file
@@ -0,0 +1,325 @@
|
||||
# magic-string
|
||||
|
||||
<a href="https://github.com/Rich-Harris/magic-string/actions/workflows/test.yml">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/Rich-Harris/magic-string/test.yml"
|
||||
alt="build status">
|
||||
</a>
|
||||
<a href="https://npmjs.org/package/magic-string">
|
||||
<img src="https://img.shields.io/npm/v/magic-string.svg"
|
||||
alt="npm version">
|
||||
</a>
|
||||
<a href="https://github.com/Rich-Harris/magic-string/blob/master/LICENSE.md">
|
||||
<img src="https://img.shields.io/npm/l/magic-string.svg"
|
||||
alt="license">
|
||||
</a>
|
||||
|
||||
Suppose you have some source code. You want to make some light modifications to it - replacing a few characters here and there, wrapping it with a header and footer, etc - and ideally you'd like to generate a [source map](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/) at the end of it. You've thought about using something like [recast](https://github.com/benjamn/recast) (which allows you to generate an AST from some JavaScript, manipulate it, and reprint it with a sourcemap without losing your comments and formatting), but it seems like overkill for your needs (or maybe the source code isn't JavaScript).
|
||||
|
||||
Your requirements are, frankly, rather niche. But they're requirements that I also have, and for which I made magic-string. It's a small, fast utility for manipulating strings and generating sourcemaps.
|
||||
|
||||
## Installation
|
||||
|
||||
magic-string works in both node.js and browser environments. For node, install with npm:
|
||||
|
||||
```bash
|
||||
npm i magic-string
|
||||
```
|
||||
|
||||
To use in browser, grab the [magic-string.umd.js](https://unpkg.com/magic-string/dist/magic-string.umd.js) file and add it to your page:
|
||||
|
||||
```html
|
||||
<script src="magic-string.umd.js"></script>
|
||||
```
|
||||
|
||||
(It also works with various module systems, if you prefer that sort of thing - it has a dependency on [vlq](https://github.com/Rich-Harris/vlq).)
|
||||
|
||||
## Usage
|
||||
|
||||
These examples assume you're in node.js, or something similar:
|
||||
|
||||
```js
|
||||
import MagicString from 'magic-string';
|
||||
import fs from 'fs';
|
||||
|
||||
const s = new MagicString('problems = 99');
|
||||
|
||||
s.update(0, 8, 'answer');
|
||||
s.toString(); // 'answer = 99'
|
||||
|
||||
s.update(11, 13, '42'); // character indices always refer to the original string
|
||||
s.toString(); // 'answer = 42'
|
||||
|
||||
s.prepend('var ').append(';'); // most methods are chainable
|
||||
s.toString(); // 'var answer = 42;'
|
||||
|
||||
const map = s.generateMap({
|
||||
source: 'source.js',
|
||||
file: 'converted.js.map',
|
||||
includeContent: true,
|
||||
}); // generates a v3 sourcemap
|
||||
|
||||
fs.writeFileSync('converted.js', s.toString());
|
||||
fs.writeFileSync('converted.js.map', map.toString());
|
||||
```
|
||||
|
||||
You can pass an options argument:
|
||||
|
||||
```js
|
||||
const s = new MagicString(someCode, {
|
||||
// these options will be used if you later call `bundle.addSource( s )` - see below
|
||||
filename: 'foo.js',
|
||||
indentExclusionRanges: [
|
||||
/*...*/
|
||||
],
|
||||
// mark source as ignore in DevTools, see below #Bundling
|
||||
ignoreList: false,
|
||||
// adjust the incoming position - see below
|
||||
offset: 0,
|
||||
});
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
### s.offset
|
||||
|
||||
Sets the offset property to adjust the incoming position for the following APIs: `slice`, `update`, `overwrite`, `appendLeft`, `prependLeft`, `appendRight`, `prependRight`, `move`, `reset`, and `remove`.
|
||||
|
||||
Example usage:
|
||||
|
||||
```ts
|
||||
const s = new MagicString('hello world', { offset: 0 });
|
||||
s.offset = 6;
|
||||
s.slice() === 'world';
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
### s.addSourcemapLocation( index )
|
||||
|
||||
Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is `false` (see below).
|
||||
|
||||
### s.append( content )
|
||||
|
||||
Appends the specified content to the end of the string. Returns `this`.
|
||||
|
||||
### s.appendLeft( index, content )
|
||||
|
||||
Appends the specified `content` at the `index` in the original string. If a range _ending_ with `index` is subsequently moved, the insert will be moved with it. Returns `this`. See also `s.prependLeft(...)`.
|
||||
|
||||
### s.appendRight( index, content )
|
||||
|
||||
Appends the specified `content` at the `index` in the original string. If a range _starting_ with `index` is subsequently moved, the insert will be moved with it. Returns `this`. See also `s.prependRight(...)`.
|
||||
|
||||
### s.clone()
|
||||
|
||||
Does what you'd expect.
|
||||
|
||||
### s.generateDecodedMap( options )
|
||||
|
||||
Generates a sourcemap object with raw mappings in array form, rather than encoded as a string. See `generateMap` documentation below for options details. Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
|
||||
|
||||
### s.generateMap( options )
|
||||
|
||||
Generates a [version 3 sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). All options are, well, optional:
|
||||
|
||||
- `file` - the filename where you plan to write the sourcemap
|
||||
- `source` - the filename of the file containing the original source
|
||||
- `includeContent` - whether to include the original content in the map's `sourcesContent` array
|
||||
- `hires` - whether the mapping should be high-resolution. Hi-res mappings map every single character, meaning (for example) your devtools will always be able to pinpoint the exact location of function calls and so on. With lo-res mappings, devtools may only be able to identify the correct line - but they're quicker to generate and less bulky. You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary instead of per character, suitable for string semantics that are separated by words. If sourcemap locations have been specified with `s.addSourcemapLocation()`, they will be used here.
|
||||
|
||||
The returned sourcemap has two (non-enumerable) methods attached for convenience:
|
||||
|
||||
- `toString` - returns the equivalent of `JSON.stringify(map)`
|
||||
- `toUrl` - returns a DataURI containing the sourcemap. Useful for doing this sort of thing:
|
||||
|
||||
```js
|
||||
code += '\n//# sourceMappingURL=' + map.toUrl();
|
||||
```
|
||||
|
||||
### s.hasChanged()
|
||||
|
||||
Indicates if the string has been changed.
|
||||
|
||||
### s.indent( prefix[, options] )
|
||||
|
||||
Prefixes each line of the string with `prefix`. If `prefix` is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. Returns `this`.
|
||||
|
||||
The `options` argument can have an `exclude` property, which is an array of `[start, end]` character ranges. These ranges will be excluded from the indentation - useful for (e.g.) multiline strings.
|
||||
|
||||
### s.insertLeft( index, content )
|
||||
|
||||
**DEPRECATED** since 0.17 – use `s.appendLeft(...)` instead
|
||||
|
||||
### s.insertRight( index, content )
|
||||
|
||||
**DEPRECATED** since 0.17 – use `s.prependRight(...)` instead
|
||||
|
||||
### s.isEmpty()
|
||||
|
||||
Returns true if the resulting source is empty (disregarding white space).
|
||||
|
||||
### s.locate( index )
|
||||
|
||||
**DEPRECATED** since 0.10 – see [#30](https://github.com/Rich-Harris/magic-string/pull/30)
|
||||
|
||||
### s.locateOrigin( index )
|
||||
|
||||
**DEPRECATED** since 0.10 – see [#30](https://github.com/Rich-Harris/magic-string/pull/30)
|
||||
|
||||
### s.move( start, end, index )
|
||||
|
||||
Moves the characters from `start` and `end` to `index`. Returns `this`.
|
||||
|
||||
### s.overwrite( start, end, content[, options] )
|
||||
|
||||
Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in that range. The same restrictions as `s.remove()` apply. Returns `this`.
|
||||
|
||||
The fourth argument is optional. It can have a `storeName` property — if `true`, the original name will be stored for later inclusion in a sourcemap's `names` array — and a `contentOnly` property which determines whether only the content is overwritten, or anything that was appended/prepended to the range as well.
|
||||
|
||||
It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content.
|
||||
|
||||
### s.prepend( content )
|
||||
|
||||
Prepends the string with the specified content. Returns `this`.
|
||||
|
||||
### s.prependLeft ( index, content )
|
||||
|
||||
Same as `s.appendLeft(...)`, except that the inserted content will go _before_ any previous appends or prepends at `index`
|
||||
|
||||
### s.prependRight ( index, content )
|
||||
|
||||
Same as `s.appendRight(...)`, except that the inserted content will go _before_ any previous appends or prepends at `index`
|
||||
|
||||
### s.replace( regexpOrString, substitution )
|
||||
|
||||
String replacement with RegExp or string. The `substitution` parameter supports strings and functions. Returns `this`.
|
||||
|
||||
```ts
|
||||
import MagicString from 'magic-string';
|
||||
|
||||
const s = new MagicString(source);
|
||||
|
||||
s.replace('foo', 'bar');
|
||||
s.replace('foo', (str, index, s) => str + '-' + index);
|
||||
s.replace(/foo/g, 'bar');
|
||||
s.replace(/(\w)(\d+)/g, (_, $1, $2) => $1.toUpperCase() + $2);
|
||||
```
|
||||
|
||||
The differences from [`String.replace`](<(https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)>):
|
||||
|
||||
- It will always match against the **original string**
|
||||
- It mutates the magic string state (use `.clone()` to be immutable)
|
||||
|
||||
### s.replaceAll( regexpOrString, substitution )
|
||||
|
||||
Same as `s.replace`, but replace all matched strings instead of just one.
|
||||
If `regexpOrString` is a regex, then it must have the global (`g`) flag set, or a `TypeError` is thrown. Matches the behavior of the builtin [`String.property.replaceAll`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll). Returns `this`.
|
||||
|
||||
### s.remove( start, end )
|
||||
|
||||
Removes the characters from `start` to `end` (of the original string, **not** the generated string). Removing the same content twice, or making removals that partially overlap, will cause an error. Returns `this`.
|
||||
|
||||
### s.reset( start, end )
|
||||
|
||||
Resets the characters from `start` to `end` (of the original string, **not** the generated string).
|
||||
It can be used to restore previously removed characters and discard unwanted changes.
|
||||
|
||||
### s.slice( start, end )
|
||||
|
||||
Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string. Throws error if the indices are for characters that were already removed.
|
||||
|
||||
### s.snip( start, end )
|
||||
|
||||
Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed.
|
||||
|
||||
### s.toString()
|
||||
|
||||
Returns the generated string.
|
||||
|
||||
### s.trim([ charType ])
|
||||
|
||||
Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end. Returns `this`.
|
||||
|
||||
### s.trimStart([ charType ])
|
||||
|
||||
Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start. Returns `this`.
|
||||
|
||||
### s.trimEnd([ charType ])
|
||||
|
||||
Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end. Returns `this`.
|
||||
|
||||
### s.trimLines()
|
||||
|
||||
Removes empty lines from the start and end. Returns `this`.
|
||||
|
||||
### s.update( start, end, content[, options] )
|
||||
|
||||
Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. Returns `this`.
|
||||
|
||||
The fourth argument is optional. It can have a `storeName` property — if `true`, the original name will be stored for later inclusion in a sourcemap's `names` array — and an `overwrite` property which defaults to `false` and determines whether anything that was appended/prepended to the range will be overwritten along with the original content.
|
||||
|
||||
`s.update(start, end, content)` is equivalent to `s.overwrite(start, end, content, { contentOnly: true })`.
|
||||
|
||||
## Bundling
|
||||
|
||||
To concatenate several sources, use `MagicString.Bundle`:
|
||||
|
||||
```js
|
||||
const bundle = new MagicString.Bundle();
|
||||
|
||||
bundle.addSource({
|
||||
filename: 'foo.js',
|
||||
content: new MagicString('var answer = 42;'),
|
||||
});
|
||||
|
||||
bundle.addSource({
|
||||
filename: 'bar.js',
|
||||
content: new MagicString('console.log( answer )'),
|
||||
});
|
||||
|
||||
// Sources can be marked as ignore-listed, which provides a hint to debuggers
|
||||
// to not step into this code and also don't show the source files depending
|
||||
// on user preferences.
|
||||
bundle.addSource({
|
||||
filename: 'some-3rdparty-library.js',
|
||||
content: new MagicString('function myLib(){}'),
|
||||
ignoreList: false, // <--
|
||||
});
|
||||
|
||||
// Advanced: a source can include an `indentExclusionRanges` property
|
||||
// alongside `filename` and `content`. This will be passed to `s.indent()`
|
||||
// - see documentation above
|
||||
|
||||
bundle
|
||||
.indent() // optionally, pass an indent string, otherwise it will be guessed
|
||||
.prepend('(function () {\n')
|
||||
.append('}());');
|
||||
|
||||
bundle.toString();
|
||||
// (function () {
|
||||
// var answer = 42;
|
||||
// console.log( answer );
|
||||
// }());
|
||||
|
||||
// options are as per `s.generateMap()` above
|
||||
const map = bundle.generateMap({
|
||||
file: 'bundle.js',
|
||||
includeContent: true,
|
||||
hires: true,
|
||||
});
|
||||
```
|
||||
|
||||
As an alternative syntax, if you a) don't have `filename` or `indentExclusionRanges` options, or b) passed those in when you used `new MagicString(...)`, you can simply pass the `MagicString` instance itself:
|
||||
|
||||
```js
|
||||
const bundle = new MagicString.Bundle();
|
||||
const source = new MagicString(someCode, {
|
||||
filename: 'foo.js',
|
||||
});
|
||||
|
||||
bundle.addSource(source);
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
289
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.cjs.d.ts
generated
vendored
Normal file
289
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.cjs.d.ts
generated
vendored
Normal file
@@ -0,0 +1,289 @@
|
||||
export interface BundleOptions {
|
||||
intro?: string;
|
||||
separator?: string;
|
||||
}
|
||||
|
||||
export interface SourceMapOptions {
|
||||
/**
|
||||
* Whether the mapping should be high-resolution.
|
||||
* Hi-res mappings map every single character, meaning (for example) your devtools will always
|
||||
* be able to pinpoint the exact location of function calls and so on.
|
||||
* With lo-res mappings, devtools may only be able to identify the correct
|
||||
* line - but they're quicker to generate and less bulky.
|
||||
* You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary
|
||||
* instead of per character, suitable for string semantics that are separated by words.
|
||||
* If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here.
|
||||
*/
|
||||
hires?: boolean | 'boundary';
|
||||
/**
|
||||
* The filename where you plan to write the sourcemap.
|
||||
*/
|
||||
file?: string;
|
||||
/**
|
||||
* The filename of the file containing the original source.
|
||||
*/
|
||||
source?: string;
|
||||
/**
|
||||
* Whether to include the original content in the map's sourcesContent array.
|
||||
*/
|
||||
includeContent?: boolean;
|
||||
}
|
||||
|
||||
export type SourceMapSegment =
|
||||
| [number]
|
||||
| [number, number, number, number]
|
||||
| [number, number, number, number, number];
|
||||
|
||||
export interface DecodedSourceMap {
|
||||
file: string;
|
||||
sources: string[];
|
||||
sourcesContent?: string[];
|
||||
names: string[];
|
||||
mappings: SourceMapSegment[][];
|
||||
x_google_ignoreList?: number[];
|
||||
}
|
||||
|
||||
export class SourceMap {
|
||||
constructor(properties: DecodedSourceMap);
|
||||
|
||||
version: number;
|
||||
file: string;
|
||||
sources: string[];
|
||||
sourcesContent?: string[];
|
||||
names: string[];
|
||||
mappings: string;
|
||||
x_google_ignoreList?: number[];
|
||||
debugId?: string;
|
||||
|
||||
/**
|
||||
* Returns the equivalent of `JSON.stringify(map)`
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* Returns a DataURI containing the sourcemap. Useful for doing this sort of thing:
|
||||
* `generateMap(options?: SourceMapOptions): SourceMap;`
|
||||
*/
|
||||
toUrl(): string;
|
||||
}
|
||||
|
||||
export class Bundle {
|
||||
constructor(options?: BundleOptions);
|
||||
/**
|
||||
* Adds the specified source to the bundle, which can either be a `MagicString` object directly,
|
||||
* or an options object that holds a magic string `content` property and optionally provides
|
||||
* a `filename` for the source within the bundle, as well as an optional `ignoreList` hint
|
||||
* (which defaults to `false`). The `filename` is used when constructing the source map for the
|
||||
* bundle, to identify this `source` in the source map's `sources` field. The `ignoreList` hint
|
||||
* is used to populate the `x_google_ignoreList` extension field in the source map, which is a
|
||||
* mechanism for tools to signal to debuggers that certain sources should be ignored by default
|
||||
* (depending on user preferences).
|
||||
*/
|
||||
addSource(
|
||||
source: MagicString | { filename?: string; content: MagicString; ignoreList?: boolean },
|
||||
): this;
|
||||
append(str: string, options?: BundleOptions): this;
|
||||
clone(): this;
|
||||
generateMap(
|
||||
options?: SourceMapOptions,
|
||||
): Omit<SourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> };
|
||||
generateDecodedMap(
|
||||
options?: SourceMapOptions,
|
||||
): Omit<DecodedSourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> };
|
||||
getIndentString(): string;
|
||||
indent(indentStr?: string): this;
|
||||
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
|
||||
prepend(str: string): this;
|
||||
toString(): string;
|
||||
trimLines(): this;
|
||||
trim(charType?: string): this;
|
||||
trimStart(charType?: string): this;
|
||||
trimEnd(charType?: string): this;
|
||||
isEmpty(): boolean;
|
||||
length(): number;
|
||||
}
|
||||
|
||||
export type ExclusionRange = [number, number];
|
||||
|
||||
export interface MagicStringOptions {
|
||||
filename?: string;
|
||||
indentExclusionRanges?: ExclusionRange | Array<ExclusionRange>;
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
export interface IndentOptions {
|
||||
exclude?: ExclusionRange | Array<ExclusionRange>;
|
||||
indentStart?: boolean;
|
||||
}
|
||||
|
||||
export interface OverwriteOptions {
|
||||
storeName?: boolean;
|
||||
contentOnly?: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateOptions {
|
||||
storeName?: boolean;
|
||||
overwrite?: boolean;
|
||||
}
|
||||
|
||||
export default class MagicString {
|
||||
constructor(str: string, options?: MagicStringOptions);
|
||||
/**
|
||||
* Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
|
||||
*/
|
||||
addSourcemapLocation(char: number): void;
|
||||
/**
|
||||
* Appends the specified content to the end of the string.
|
||||
*/
|
||||
append(content: string): this;
|
||||
/**
|
||||
* Appends the specified content at the index in the original string.
|
||||
* If a range *ending* with index is subsequently moved, the insert will be moved with it.
|
||||
* See also `s.prependLeft(...)`.
|
||||
*/
|
||||
appendLeft(index: number, content: string): this;
|
||||
/**
|
||||
* Appends the specified content at the index in the original string.
|
||||
* If a range *starting* with index is subsequently moved, the insert will be moved with it.
|
||||
* See also `s.prependRight(...)`.
|
||||
*/
|
||||
appendRight(index: number, content: string): this;
|
||||
/**
|
||||
* Does what you'd expect.
|
||||
*/
|
||||
clone(): this;
|
||||
/**
|
||||
* Generates a version 3 sourcemap.
|
||||
*/
|
||||
generateMap(options?: SourceMapOptions): SourceMap;
|
||||
/**
|
||||
* Generates a sourcemap object with raw mappings in array form, rather than encoded as a string.
|
||||
* Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
|
||||
*/
|
||||
generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap;
|
||||
getIndentString(): string;
|
||||
|
||||
/**
|
||||
* Prefixes each line of the string with prefix.
|
||||
* If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
|
||||
*/
|
||||
indent(options?: IndentOptions): this;
|
||||
/**
|
||||
* Prefixes each line of the string with prefix.
|
||||
* If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
|
||||
*
|
||||
* The options argument can have an exclude property, which is an array of [start, end] character ranges.
|
||||
* These ranges will be excluded from the indentation - useful for (e.g.) multiline strings.
|
||||
*/
|
||||
indent(indentStr?: string, options?: IndentOptions): this;
|
||||
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
|
||||
|
||||
/**
|
||||
* Moves the characters from `start` and `end` to `index`.
|
||||
*/
|
||||
move(start: number, end: number, index: number): this;
|
||||
/**
|
||||
* Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in
|
||||
* that range. The same restrictions as `s.remove()` apply.
|
||||
*
|
||||
* The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
|
||||
* for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only
|
||||
* the content is overwritten, or anything that was appended/prepended to the range as well.
|
||||
*
|
||||
* It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content.
|
||||
*/
|
||||
overwrite(
|
||||
start: number,
|
||||
end: number,
|
||||
content: string,
|
||||
options?: boolean | OverwriteOptions,
|
||||
): this;
|
||||
/**
|
||||
* Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply.
|
||||
*
|
||||
* The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
|
||||
* for later inclusion in a sourcemap's names array — and an overwrite property which determines whether only
|
||||
* the content is overwritten, or anything that was appended/prepended to the range as well.
|
||||
*/
|
||||
update(start: number, end: number, content: string, options?: boolean | UpdateOptions): this;
|
||||
/**
|
||||
* Prepends the string with the specified content.
|
||||
*/
|
||||
prepend(content: string): this;
|
||||
/**
|
||||
* Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index
|
||||
*/
|
||||
prependLeft(index: number, content: string): this;
|
||||
/**
|
||||
* Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
|
||||
*/
|
||||
prependRight(index: number, content: string): this;
|
||||
/**
|
||||
* Removes the characters from `start` to `end` (of the original string, **not** the generated string).
|
||||
* Removing the same content twice, or making removals that partially overlap, will cause an error.
|
||||
*/
|
||||
remove(start: number, end: number): this;
|
||||
/**
|
||||
* Reset the modified characters from `start` to `end` (of the original string, **not** the generated string).
|
||||
*/
|
||||
reset(start: number, end: number): this;
|
||||
/**
|
||||
* Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string.
|
||||
* Throws error if the indices are for characters that were already removed.
|
||||
*/
|
||||
slice(start: number, end: number): string;
|
||||
/**
|
||||
* Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed.
|
||||
*/
|
||||
snip(start: number, end: number): this;
|
||||
/**
|
||||
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
|
||||
*/
|
||||
trim(charType?: string): this;
|
||||
/**
|
||||
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start.
|
||||
*/
|
||||
trimStart(charType?: string): this;
|
||||
/**
|
||||
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end.
|
||||
*/
|
||||
trimEnd(charType?: string): this;
|
||||
/**
|
||||
* Removes empty lines from the start and end.
|
||||
*/
|
||||
trimLines(): this;
|
||||
/**
|
||||
* String replacement with RegExp or string.
|
||||
*/
|
||||
replace(
|
||||
regex: RegExp | string,
|
||||
replacement: string | ((substring: string, ...args: any[]) => string),
|
||||
): this;
|
||||
/**
|
||||
* Same as `s.replace`, but replace all matched strings instead of just one.
|
||||
*/
|
||||
replaceAll(
|
||||
regex: RegExp | string,
|
||||
replacement: string | ((substring: string, ...args: any[]) => string),
|
||||
): this;
|
||||
|
||||
lastChar(): string;
|
||||
lastLine(): string;
|
||||
/**
|
||||
* Returns true if the resulting source is empty (disregarding white space).
|
||||
*/
|
||||
isEmpty(): boolean;
|
||||
length(): number;
|
||||
|
||||
/**
|
||||
* Indicates if the string has been changed.
|
||||
*/
|
||||
hasChanged(): boolean;
|
||||
|
||||
original: string;
|
||||
/**
|
||||
* Returns the generated string.
|
||||
*/
|
||||
toString(): string;
|
||||
|
||||
offset: number;
|
||||
}
|
||||
1594
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.cjs.js
generated
vendored
Normal file
1594
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.cjs.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.cjs.js.map
generated
vendored
Normal file
1
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.cjs.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
289
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.es.d.mts
generated
vendored
Normal file
289
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.es.d.mts
generated
vendored
Normal file
@@ -0,0 +1,289 @@
|
||||
export interface BundleOptions {
|
||||
intro?: string;
|
||||
separator?: string;
|
||||
}
|
||||
|
||||
export interface SourceMapOptions {
|
||||
/**
|
||||
* Whether the mapping should be high-resolution.
|
||||
* Hi-res mappings map every single character, meaning (for example) your devtools will always
|
||||
* be able to pinpoint the exact location of function calls and so on.
|
||||
* With lo-res mappings, devtools may only be able to identify the correct
|
||||
* line - but they're quicker to generate and less bulky.
|
||||
* You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary
|
||||
* instead of per character, suitable for string semantics that are separated by words.
|
||||
* If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here.
|
||||
*/
|
||||
hires?: boolean | 'boundary';
|
||||
/**
|
||||
* The filename where you plan to write the sourcemap.
|
||||
*/
|
||||
file?: string;
|
||||
/**
|
||||
* The filename of the file containing the original source.
|
||||
*/
|
||||
source?: string;
|
||||
/**
|
||||
* Whether to include the original content in the map's sourcesContent array.
|
||||
*/
|
||||
includeContent?: boolean;
|
||||
}
|
||||
|
||||
export type SourceMapSegment =
|
||||
| [number]
|
||||
| [number, number, number, number]
|
||||
| [number, number, number, number, number];
|
||||
|
||||
export interface DecodedSourceMap {
|
||||
file: string;
|
||||
sources: string[];
|
||||
sourcesContent?: string[];
|
||||
names: string[];
|
||||
mappings: SourceMapSegment[][];
|
||||
x_google_ignoreList?: number[];
|
||||
}
|
||||
|
||||
export class SourceMap {
|
||||
constructor(properties: DecodedSourceMap);
|
||||
|
||||
version: number;
|
||||
file: string;
|
||||
sources: string[];
|
||||
sourcesContent?: string[];
|
||||
names: string[];
|
||||
mappings: string;
|
||||
x_google_ignoreList?: number[];
|
||||
debugId?: string;
|
||||
|
||||
/**
|
||||
* Returns the equivalent of `JSON.stringify(map)`
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* Returns a DataURI containing the sourcemap. Useful for doing this sort of thing:
|
||||
* `generateMap(options?: SourceMapOptions): SourceMap;`
|
||||
*/
|
||||
toUrl(): string;
|
||||
}
|
||||
|
||||
export class Bundle {
|
||||
constructor(options?: BundleOptions);
|
||||
/**
|
||||
* Adds the specified source to the bundle, which can either be a `MagicString` object directly,
|
||||
* or an options object that holds a magic string `content` property and optionally provides
|
||||
* a `filename` for the source within the bundle, as well as an optional `ignoreList` hint
|
||||
* (which defaults to `false`). The `filename` is used when constructing the source map for the
|
||||
* bundle, to identify this `source` in the source map's `sources` field. The `ignoreList` hint
|
||||
* is used to populate the `x_google_ignoreList` extension field in the source map, which is a
|
||||
* mechanism for tools to signal to debuggers that certain sources should be ignored by default
|
||||
* (depending on user preferences).
|
||||
*/
|
||||
addSource(
|
||||
source: MagicString | { filename?: string; content: MagicString; ignoreList?: boolean },
|
||||
): this;
|
||||
append(str: string, options?: BundleOptions): this;
|
||||
clone(): this;
|
||||
generateMap(
|
||||
options?: SourceMapOptions,
|
||||
): Omit<SourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> };
|
||||
generateDecodedMap(
|
||||
options?: SourceMapOptions,
|
||||
): Omit<DecodedSourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> };
|
||||
getIndentString(): string;
|
||||
indent(indentStr?: string): this;
|
||||
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
|
||||
prepend(str: string): this;
|
||||
toString(): string;
|
||||
trimLines(): this;
|
||||
trim(charType?: string): this;
|
||||
trimStart(charType?: string): this;
|
||||
trimEnd(charType?: string): this;
|
||||
isEmpty(): boolean;
|
||||
length(): number;
|
||||
}
|
||||
|
||||
export type ExclusionRange = [number, number];
|
||||
|
||||
export interface MagicStringOptions {
|
||||
filename?: string;
|
||||
indentExclusionRanges?: ExclusionRange | Array<ExclusionRange>;
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
export interface IndentOptions {
|
||||
exclude?: ExclusionRange | Array<ExclusionRange>;
|
||||
indentStart?: boolean;
|
||||
}
|
||||
|
||||
export interface OverwriteOptions {
|
||||
storeName?: boolean;
|
||||
contentOnly?: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateOptions {
|
||||
storeName?: boolean;
|
||||
overwrite?: boolean;
|
||||
}
|
||||
|
||||
export default class MagicString {
|
||||
constructor(str: string, options?: MagicStringOptions);
|
||||
/**
|
||||
* Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
|
||||
*/
|
||||
addSourcemapLocation(char: number): void;
|
||||
/**
|
||||
* Appends the specified content to the end of the string.
|
||||
*/
|
||||
append(content: string): this;
|
||||
/**
|
||||
* Appends the specified content at the index in the original string.
|
||||
* If a range *ending* with index is subsequently moved, the insert will be moved with it.
|
||||
* See also `s.prependLeft(...)`.
|
||||
*/
|
||||
appendLeft(index: number, content: string): this;
|
||||
/**
|
||||
* Appends the specified content at the index in the original string.
|
||||
* If a range *starting* with index is subsequently moved, the insert will be moved with it.
|
||||
* See also `s.prependRight(...)`.
|
||||
*/
|
||||
appendRight(index: number, content: string): this;
|
||||
/**
|
||||
* Does what you'd expect.
|
||||
*/
|
||||
clone(): this;
|
||||
/**
|
||||
* Generates a version 3 sourcemap.
|
||||
*/
|
||||
generateMap(options?: SourceMapOptions): SourceMap;
|
||||
/**
|
||||
* Generates a sourcemap object with raw mappings in array form, rather than encoded as a string.
|
||||
* Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
|
||||
*/
|
||||
generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap;
|
||||
getIndentString(): string;
|
||||
|
||||
/**
|
||||
* Prefixes each line of the string with prefix.
|
||||
* If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
|
||||
*/
|
||||
indent(options?: IndentOptions): this;
|
||||
/**
|
||||
* Prefixes each line of the string with prefix.
|
||||
* If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
|
||||
*
|
||||
* The options argument can have an exclude property, which is an array of [start, end] character ranges.
|
||||
* These ranges will be excluded from the indentation - useful for (e.g.) multiline strings.
|
||||
*/
|
||||
indent(indentStr?: string, options?: IndentOptions): this;
|
||||
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
|
||||
|
||||
/**
|
||||
* Moves the characters from `start` and `end` to `index`.
|
||||
*/
|
||||
move(start: number, end: number, index: number): this;
|
||||
/**
|
||||
* Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in
|
||||
* that range. The same restrictions as `s.remove()` apply.
|
||||
*
|
||||
* The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
|
||||
* for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only
|
||||
* the content is overwritten, or anything that was appended/prepended to the range as well.
|
||||
*
|
||||
* It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content.
|
||||
*/
|
||||
overwrite(
|
||||
start: number,
|
||||
end: number,
|
||||
content: string,
|
||||
options?: boolean | OverwriteOptions,
|
||||
): this;
|
||||
/**
|
||||
* Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply.
|
||||
*
|
||||
* The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
|
||||
* for later inclusion in a sourcemap's names array — and an overwrite property which determines whether only
|
||||
* the content is overwritten, or anything that was appended/prepended to the range as well.
|
||||
*/
|
||||
update(start: number, end: number, content: string, options?: boolean | UpdateOptions): this;
|
||||
/**
|
||||
* Prepends the string with the specified content.
|
||||
*/
|
||||
prepend(content: string): this;
|
||||
/**
|
||||
* Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index
|
||||
*/
|
||||
prependLeft(index: number, content: string): this;
|
||||
/**
|
||||
* Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
|
||||
*/
|
||||
prependRight(index: number, content: string): this;
|
||||
/**
|
||||
* Removes the characters from `start` to `end` (of the original string, **not** the generated string).
|
||||
* Removing the same content twice, or making removals that partially overlap, will cause an error.
|
||||
*/
|
||||
remove(start: number, end: number): this;
|
||||
/**
|
||||
* Reset the modified characters from `start` to `end` (of the original string, **not** the generated string).
|
||||
*/
|
||||
reset(start: number, end: number): this;
|
||||
/**
|
||||
* Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string.
|
||||
* Throws error if the indices are for characters that were already removed.
|
||||
*/
|
||||
slice(start: number, end: number): string;
|
||||
/**
|
||||
* Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed.
|
||||
*/
|
||||
snip(start: number, end: number): this;
|
||||
/**
|
||||
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
|
||||
*/
|
||||
trim(charType?: string): this;
|
||||
/**
|
||||
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start.
|
||||
*/
|
||||
trimStart(charType?: string): this;
|
||||
/**
|
||||
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end.
|
||||
*/
|
||||
trimEnd(charType?: string): this;
|
||||
/**
|
||||
* Removes empty lines from the start and end.
|
||||
*/
|
||||
trimLines(): this;
|
||||
/**
|
||||
* String replacement with RegExp or string.
|
||||
*/
|
||||
replace(
|
||||
regex: RegExp | string,
|
||||
replacement: string | ((substring: string, ...args: any[]) => string),
|
||||
): this;
|
||||
/**
|
||||
* Same as `s.replace`, but replace all matched strings instead of just one.
|
||||
*/
|
||||
replaceAll(
|
||||
regex: RegExp | string,
|
||||
replacement: string | ((substring: string, ...args: any[]) => string),
|
||||
): this;
|
||||
|
||||
lastChar(): string;
|
||||
lastLine(): string;
|
||||
/**
|
||||
* Returns true if the resulting source is empty (disregarding white space).
|
||||
*/
|
||||
isEmpty(): boolean;
|
||||
length(): number;
|
||||
|
||||
/**
|
||||
* Indicates if the string has been changed.
|
||||
*/
|
||||
hasChanged(): boolean;
|
||||
|
||||
original: string;
|
||||
/**
|
||||
* Returns the generated string.
|
||||
*/
|
||||
toString(): string;
|
||||
|
||||
offset: number;
|
||||
}
|
||||
1588
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.es.mjs
generated
vendored
Normal file
1588
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.es.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.es.mjs.map
generated
vendored
Normal file
1
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.es.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1682
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.umd.js
generated
vendored
Normal file
1682
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.umd.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.umd.js.map
generated
vendored
Normal file
1
node_modules/@tailwindcss/node/node_modules/magic-string/dist/magic-string.umd.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
67
node_modules/@tailwindcss/node/node_modules/magic-string/package.json
generated
vendored
Normal file
67
node_modules/@tailwindcss/node/node_modules/magic-string/package.json
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"name": "magic-string",
|
||||
"version": "0.30.21",
|
||||
"type": "commonjs",
|
||||
"description": "Modify strings, generate sourcemaps",
|
||||
"keywords": [
|
||||
"string",
|
||||
"string manipulation",
|
||||
"sourcemap",
|
||||
"templating",
|
||||
"transpilation"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Rich-Harris/magic-string.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Rich Harris",
|
||||
"main": "./dist/magic-string.cjs.js",
|
||||
"module": "./dist/magic-string.es.mjs",
|
||||
"sideEffects": false,
|
||||
"jsnext:main": "./dist/magic-string.es.mjs",
|
||||
"types": "./dist/magic-string.cjs.d.ts",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"import": "./dist/magic-string.es.mjs",
|
||||
"require": "./dist/magic-string.cjs.js"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist/*",
|
||||
"index.d.ts",
|
||||
"README.md"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.38.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.3",
|
||||
"@rollup/plugin-replace": "^6.0.2",
|
||||
"benchmark": "^2.1.4",
|
||||
"bumpp": "^10.3.1",
|
||||
"conventional-changelog-cli": "^5.0.0",
|
||||
"eslint": "^9.38.0",
|
||||
"prettier": "^3.6.2",
|
||||
"publint": "^0.3.15",
|
||||
"rollup": "^4.52.5",
|
||||
"source-map-js": "^1.2.1",
|
||||
"source-map-support": "^0.5.21",
|
||||
"vitest": "^4.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jridgewell/sourcemap-codec": "^1.5.5"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
||||
"format": "prettier --single-quote --print-width 100 --use-tabs --write .",
|
||||
"lint": "eslint src test && publint",
|
||||
"lint:fix": "eslint src test --fix",
|
||||
"release": "bumpp -x \"pnpm run changelog\" --all",
|
||||
"pretest": "pnpm run build",
|
||||
"test": "vitest run",
|
||||
"test:dev": "vitest",
|
||||
"bench": "pnpm run build && node benchmark/index.mjs",
|
||||
"watch": "rollup -cw"
|
||||
}
|
||||
}
|
||||
48
node_modules/@tailwindcss/node/package.json
generated
vendored
Normal file
48
node_modules/@tailwindcss/node/package.json
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "@tailwindcss/node",
|
||||
"version": "4.3.3",
|
||||
"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",
|
||||
"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": {
|
||||
"@jridgewell/remapping": "^2.3.5",
|
||||
"enhanced-resolve": "^5.24.1",
|
||||
"jiti": "^2.7.0",
|
||||
"lightningcss": "1.32.0",
|
||||
"magic-string": "^0.30.21",
|
||||
"source-map-js": "^1.2.1",
|
||||
"tailwindcss": "4.3.3"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsup-node",
|
||||
"dev": "pnpm run build -- --watch"
|
||||
}
|
||||
}
|
||||
21
node_modules/@tailwindcss/oxide-linux-x64-gnu/LICENSE
generated
vendored
Normal file
21
node_modules/@tailwindcss/oxide-linux-x64-gnu/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Tailwind Labs, Inc.
|
||||
|
||||
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.
|
||||
3
node_modules/@tailwindcss/oxide-linux-x64-gnu/README.md
generated
vendored
Normal file
3
node_modules/@tailwindcss/oxide-linux-x64-gnu/README.md
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# `@tailwindcss/oxide-linux-x64-gnu`
|
||||
|
||||
This is the **x86_64-unknown-linux-gnu** binary for `@tailwindcss/oxide`
|
||||
30
node_modules/@tailwindcss/oxide-linux-x64-gnu/package.json
generated
vendored
Normal file
30
node_modules/@tailwindcss/oxide-linux-x64-gnu/package.json
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "@tailwindcss/oxide-linux-x64-gnu",
|
||||
"version": "4.3.3",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",
|
||||
"directory": "crates/node/npm/linux-x64-gnu"
|
||||
},
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"main": "tailwindcss-oxide.linux-x64-gnu.node",
|
||||
"files": [
|
||||
"tailwindcss-oxide.linux-x64-gnu.node"
|
||||
],
|
||||
"publishConfig": {
|
||||
"provenance": true,
|
||||
"access": "public"
|
||||
},
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 20"
|
||||
},
|
||||
"libc": [
|
||||
"glibc"
|
||||
]
|
||||
}
|
||||
BIN
node_modules/@tailwindcss/oxide-linux-x64-gnu/tailwindcss-oxide.linux-x64-gnu.node
generated
vendored
Normal file
BIN
node_modules/@tailwindcss/oxide-linux-x64-gnu/tailwindcss-oxide.linux-x64-gnu.node
generated
vendored
Normal file
Binary file not shown.
21
node_modules/@tailwindcss/oxide/LICENSE
generated
vendored
Normal file
21
node_modules/@tailwindcss/oxide/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Tailwind Labs, Inc.
|
||||
|
||||
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.
|
||||
49
node_modules/@tailwindcss/oxide/index.d.ts
generated
vendored
Normal file
49
node_modules/@tailwindcss/oxide/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
/* auto-generated by NAPI-RS */
|
||||
/* eslint-disable */
|
||||
export declare class Scanner {
|
||||
constructor(opts: ScannerOptions)
|
||||
scan(): Array<string>
|
||||
scanFiles(input: Array<ChangedContent>): Array<string>
|
||||
getCandidatesWithPositions(input: ChangedContent): Array<CandidateWithPosition>
|
||||
get files(): Array<string>
|
||||
get scannedFiles(): Array<string>
|
||||
get globs(): Array<GlobEntry>
|
||||
get normalizedSources(): Array<GlobEntry>
|
||||
}
|
||||
|
||||
export interface CandidateWithPosition {
|
||||
/** The candidate string */
|
||||
candidate: string
|
||||
/** The position of the candidate inside the content file */
|
||||
position: number
|
||||
}
|
||||
|
||||
export interface ChangedContent {
|
||||
/** File path to the changed file */
|
||||
file?: string
|
||||
/** Contents of the changed file */
|
||||
content?: string
|
||||
/** File extension */
|
||||
extension: string
|
||||
}
|
||||
|
||||
export interface GlobEntry {
|
||||
/** Base path of the glob */
|
||||
base: string
|
||||
/** Glob pattern */
|
||||
pattern: string
|
||||
}
|
||||
|
||||
export interface ScannerOptions {
|
||||
/** Glob sources */
|
||||
sources?: Array<SourceEntry>
|
||||
}
|
||||
|
||||
export interface SourceEntry {
|
||||
/** Base path of the glob */
|
||||
base: string
|
||||
/** Glob pattern */
|
||||
pattern: string
|
||||
/** Negated flag */
|
||||
negated: boolean
|
||||
}
|
||||
589
node_modules/@tailwindcss/oxide/index.js
generated
vendored
Normal file
589
node_modules/@tailwindcss/oxide/index.js
generated
vendored
Normal file
@@ -0,0 +1,589 @@
|
||||
// prettier-ignore
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
/* auto-generated by NAPI-RS */
|
||||
|
||||
const { readFileSync } = require('node:fs')
|
||||
let nativeBinding = null
|
||||
const loadErrors = []
|
||||
|
||||
const isMusl = () => {
|
||||
let musl = false
|
||||
if (process.platform === 'linux') {
|
||||
musl = isMuslFromFilesystem()
|
||||
if (musl === null) {
|
||||
musl = isMuslFromReport()
|
||||
}
|
||||
if (musl === null) {
|
||||
musl = isMuslFromChildProcess()
|
||||
}
|
||||
}
|
||||
return musl
|
||||
}
|
||||
|
||||
const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
|
||||
|
||||
const isMuslFromFilesystem = () => {
|
||||
try {
|
||||
return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
const isMuslFromReport = () => {
|
||||
let report = null
|
||||
if (typeof process.report?.getReport === 'function') {
|
||||
process.report.excludeNetwork = true
|
||||
report = process.report.getReport()
|
||||
}
|
||||
if (!report) {
|
||||
return null
|
||||
}
|
||||
if (report.header && report.header.glibcVersionRuntime) {
|
||||
return false
|
||||
}
|
||||
if (Array.isArray(report.sharedObjects)) {
|
||||
if (report.sharedObjects.some(isFileMusl)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const isMuslFromChildProcess = () => {
|
||||
try {
|
||||
return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
|
||||
} catch (e) {
|
||||
// If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
function requireNative() {
|
||||
if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
|
||||
try {
|
||||
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
|
||||
} catch (err) {
|
||||
loadErrors.push(err)
|
||||
}
|
||||
} else if (process.platform === 'android') {
|
||||
if (process.arch === 'arm64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.android-arm64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-android-arm64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-android-arm64/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 'arm') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.android-arm-eabi.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-android-arm-eabi')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-android-arm-eabi/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
|
||||
}
|
||||
} else if (process.platform === 'win32') {
|
||||
if (process.arch === 'x64') {
|
||||
if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.win32-x64-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-win32-x64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.win32-x64-msvc.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-win32-x64-msvc')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-msvc/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
}
|
||||
} else if (process.arch === 'ia32') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.win32-ia32-msvc.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-win32-ia32-msvc')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-win32-ia32-msvc/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 'arm64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.win32-arm64-msvc.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-win32-arm64-msvc')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-win32-arm64-msvc/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
|
||||
}
|
||||
} else if (process.platform === 'darwin') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.darwin-universal.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-darwin-universal')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-darwin-universal/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
if (process.arch === 'x64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.darwin-x64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-darwin-x64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-darwin-x64/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 'arm64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.darwin-arm64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-darwin-arm64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-darwin-arm64/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
|
||||
}
|
||||
} else if (process.platform === 'freebsd') {
|
||||
if (process.arch === 'x64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.freebsd-x64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-freebsd-x64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-x64/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 'arm64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.freebsd-arm64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-freebsd-arm64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-arm64/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
|
||||
}
|
||||
} else if (process.platform === 'linux') {
|
||||
if (process.arch === 'x64') {
|
||||
if (isMusl()) {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-x64-musl.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-x64-musl')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-musl/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-x64-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-x64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
}
|
||||
} else if (process.arch === 'arm64') {
|
||||
if (isMusl()) {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-arm64-musl.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-arm64-musl')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-musl/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-arm64-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-arm64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
}
|
||||
} else if (process.arch === 'arm') {
|
||||
if (isMusl()) {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-arm-musleabihf.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-arm-musleabihf')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-musleabihf/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-arm-gnueabihf.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-arm-gnueabihf')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-gnueabihf/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
}
|
||||
} else if (process.arch === 'loong64') {
|
||||
if (isMusl()) {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-loong64-musl.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-loong64-musl')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-musl/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-loong64-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-loong64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
}
|
||||
} else if (process.arch === 'riscv64') {
|
||||
if (isMusl()) {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-riscv64-musl.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-riscv64-musl')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-musl/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-riscv64-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-riscv64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
}
|
||||
} else if (process.arch === 'ppc64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-ppc64-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-ppc64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-ppc64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 's390x') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.linux-s390x-gnu.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-s390x-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-s390x-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
|
||||
}
|
||||
} else if (process.platform === 'openharmony') {
|
||||
if (process.arch === 'arm64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.openharmony-arm64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-openharmony-arm64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm64/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 'x64') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.openharmony-x64.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-openharmony-x64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-x64/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else if (process.arch === 'arm') {
|
||||
try {
|
||||
return require('./tailwindcss-oxide.openharmony-arm.node')
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
try {
|
||||
const binding = require('@tailwindcss/oxide-openharmony-arm')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm/package.json').version
|
||||
if (bindingPackageVersion !== '4.3.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.3.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
loadErrors.push(e)
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`))
|
||||
}
|
||||
} else {
|
||||
loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
|
||||
}
|
||||
}
|
||||
|
||||
nativeBinding = requireNative()
|
||||
|
||||
// NAPI_RS_FORCE_WASI is a tri-state flag:
|
||||
// unset / any other value → native binding preferred, WASI is only a fallback
|
||||
// 'true' → force WASI fallback even if native loaded
|
||||
// 'error' → force WASI and throw if no WASI binding is found
|
||||
// Treating any non-empty string as truthy (the historical behavior) meant
|
||||
// NAPI_RS_FORCE_WASI=false, NAPI_RS_FORCE_WASI=0, etc. inadvertently triggered
|
||||
// the WASI path, causing ENOENT for packages shipped without a .wasi.cjs file.
|
||||
const forceWasi =
|
||||
process.env.NAPI_RS_FORCE_WASI === 'true' || process.env.NAPI_RS_FORCE_WASI === 'error'
|
||||
|
||||
if (!nativeBinding || forceWasi) {
|
||||
let wasiBinding = null
|
||||
let wasiBindingError = null
|
||||
try {
|
||||
wasiBinding = require('./tailwindcss-oxide.wasi.cjs')
|
||||
nativeBinding = wasiBinding
|
||||
} catch (err) {
|
||||
if (forceWasi) {
|
||||
wasiBindingError = err
|
||||
}
|
||||
}
|
||||
if (!nativeBinding || forceWasi) {
|
||||
try {
|
||||
wasiBinding = require('@tailwindcss/oxide-wasm32-wasi')
|
||||
nativeBinding = wasiBinding
|
||||
} catch (err) {
|
||||
if (forceWasi) {
|
||||
if (!wasiBindingError) {
|
||||
wasiBindingError = err
|
||||
} else {
|
||||
wasiBindingError.cause = err
|
||||
}
|
||||
loadErrors.push(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) {
|
||||
const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error')
|
||||
error.cause = wasiBindingError
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
if (!nativeBinding) {
|
||||
if (loadErrors.length > 0) {
|
||||
throw new Error(
|
||||
`Cannot find native binding. ` +
|
||||
`npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
|
||||
'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
|
||||
{
|
||||
cause: loadErrors.reduce((err, cur) => {
|
||||
cur.cause = err
|
||||
return cur
|
||||
}),
|
||||
},
|
||||
)
|
||||
}
|
||||
throw new Error(`Failed to load native binding`)
|
||||
}
|
||||
|
||||
module.exports = nativeBinding
|
||||
module.exports.Scanner = nativeBinding.Scanner
|
||||
75
node_modules/@tailwindcss/oxide/package.json
generated
vendored
Normal file
75
node_modules/@tailwindcss/oxide/package.json
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"name": "@tailwindcss/oxide",
|
||||
"version": "4.3.3",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",
|
||||
"directory": "crates/node"
|
||||
},
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"napi": {
|
||||
"binaryName": "tailwindcss-oxide",
|
||||
"packageName": "@tailwindcss/oxide",
|
||||
"targets": [
|
||||
"armv7-linux-androideabi",
|
||||
"aarch64-linux-android",
|
||||
"aarch64-apple-darwin",
|
||||
"aarch64-unknown-linux-gnu",
|
||||
"aarch64-unknown-linux-musl",
|
||||
"armv7-unknown-linux-gnueabihf",
|
||||
"x86_64-unknown-linux-musl",
|
||||
"x86_64-unknown-freebsd",
|
||||
"i686-pc-windows-msvc",
|
||||
"aarch64-pc-windows-msvc",
|
||||
"wasm32-wasip1-threads"
|
||||
],
|
||||
"wasm": {
|
||||
"initialMemory": 16384,
|
||||
"browser": {
|
||||
"fs": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "3.7.0",
|
||||
"@napi-rs/wasm-runtime": "^1.1.5",
|
||||
"emnapi": "1.11.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 20"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"publishConfig": {
|
||||
"provenance": true,
|
||||
"access": "public"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@tailwindcss/oxide-darwin-arm64": "4.3.3",
|
||||
"@tailwindcss/oxide-linux-arm64-musl": "4.3.3",
|
||||
"@tailwindcss/oxide-linux-arm64-gnu": "4.3.3",
|
||||
"@tailwindcss/oxide-linux-x64-musl": "4.3.3",
|
||||
"@tailwindcss/oxide-linux-x64-gnu": "4.3.3",
|
||||
"@tailwindcss/oxide-wasm32-wasi": "4.3.3",
|
||||
"@tailwindcss/oxide-freebsd-x64": "4.3.3",
|
||||
"@tailwindcss/oxide-win32-arm64-msvc": "4.3.3",
|
||||
"@tailwindcss/oxide-win32-x64-msvc": "4.3.3",
|
||||
"@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3",
|
||||
"@tailwindcss/oxide-darwin-x64": "4.3.3",
|
||||
"@tailwindcss/oxide-android-arm64": "4.3.3"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "pnpm run build:platform && pnpm run build:wasm",
|
||||
"build:platform": "napi build --platform --release",
|
||||
"postbuild:platform": "node ./scripts/move-artifacts.mjs",
|
||||
"build:wasm": "napi build --release --target wasm32-wasip1-threads",
|
||||
"postbuild:wasm": "node ./scripts/move-artifacts.mjs",
|
||||
"dev": "cargo watch --quiet --shell 'npm run build'",
|
||||
"build:debug": "napi build --platform",
|
||||
"version": "napi version"
|
||||
}
|
||||
}
|
||||
21
node_modules/@tailwindcss/typography/LICENSE
generated
vendored
Normal file
21
node_modules/@tailwindcss/typography/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Tailwind Labs, Inc.
|
||||
|
||||
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.
|
||||
443
node_modules/@tailwindcss/typography/README.md
generated
vendored
Normal file
443
node_modules/@tailwindcss/typography/README.md
generated
vendored
Normal file
@@ -0,0 +1,443 @@
|
||||
<p>
|
||||
<a href="https://tailwindcss.com/docs/typography-plugin" target="_blank">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss-typography/HEAD/.github/logo-dark.svg">
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss-typography/HEAD/.github/logo-light.svg">
|
||||
<img alt="Tailwind CSS Typography" src="https://raw.githubusercontent.com/tailwindlabs/tailwindcss-typography/HEAD/.github/logo-light.svg" width="450" height="70" style="max-width: 100%;">
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
The official Tailwind CSS Typography plugin provides a set of `prose` classes you can use to add beautiful typographic defaults to any vanilla HTML you don’t control, like HTML rendered from Markdown, or pulled from a CMS.
|
||||
|
||||
```html
|
||||
<article class="prose lg:prose-xl">{{ markdown }}</article>
|
||||
```
|
||||
|
||||
To see what it looks like in action, check out our [live demo](https://play.tailwindcss.com/uj1vGACRJA?layout=preview) on Tailwind Play.
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
Install the plugin from npm:
|
||||
|
||||
```shell
|
||||
npm install -D @tailwindcss/typography
|
||||
```
|
||||
|
||||
Then add the plugin to your main `style.css` file:
|
||||
|
||||
```diff
|
||||
@import "tailwindcss";
|
||||
+ @plugin "@tailwindcss/typography";
|
||||
```
|
||||
|
||||
If you are still using **Tailwind CSS v3**, add the plugin to your `tailwind.config.js` file:
|
||||
|
||||
```js
|
||||
// tailwind.config.js
|
||||
module.exports = {
|
||||
theme: {
|
||||
// ...
|
||||
},
|
||||
plugins: [
|
||||
require('@tailwindcss/typography'),
|
||||
// ...
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Basic usage
|
||||
|
||||
Now you can use the `prose` classes to add sensible typography styles to any vanilla HTML:
|
||||
|
||||
```html
|
||||
<article class="prose lg:prose-xl">
|
||||
<h1>Garlic bread with cheese: What the science tells us</h1>
|
||||
<p>
|
||||
For years parents have espoused the health benefits of eating garlic bread with cheese to their
|
||||
children, with the food earning such an iconic status in our culture that kids will often dress
|
||||
up as warm, cheesy loaf for Halloween.
|
||||
</p>
|
||||
<p>
|
||||
But a recent study shows that the celebrated appetizer may be linked to a series of rabies cases
|
||||
springing up around the country.
|
||||
</p>
|
||||
<!-- ... -->
|
||||
</article>
|
||||
```
|
||||
|
||||
### Choosing a gray scale
|
||||
|
||||
This plugin includes a modifier class for each of the five gray scales Tailwind includes by default so you can easily style your content to match the grays you're using in your project.
|
||||
|
||||
```html
|
||||
<article class="prose prose-slate">{{ markdown }}</article>
|
||||
```
|
||||
|
||||
Here are the classes that are generated using a totally default Tailwind CSS v2.0 build:
|
||||
|
||||
| Class | Gray scale |
|
||||
| ------------------------ | ---------- |
|
||||
| `prose-gray` _(default)_ | Gray |
|
||||
| `prose-slate` | Slate |
|
||||
| `prose-zinc` | Zinc |
|
||||
| `prose-neutral` | Neutral |
|
||||
| `prose-stone` | Stone |
|
||||
|
||||
Modifier classes are designed to be used with the [multi-class modifier pattern](http://nicolasgallagher.com/about-html-semantics-front-end-architecture/#component-modifiers) and must be used in conjunction with the base `prose` class.
|
||||
|
||||
> [!NOTE]
|
||||
> Always include the `prose` class when adding a gray scale modifier
|
||||
|
||||
```html
|
||||
<article class="prose prose-stone">{{ markdown }}</article>
|
||||
```
|
||||
|
||||
To learn about creating your own color themes, read the [adding custom color themes](#adding-custom-color-themes) documentation.
|
||||
|
||||
### Applying a type scale
|
||||
|
||||
Size modifiers allow you to adjust the overall size of your typography for different contexts.
|
||||
|
||||
```html
|
||||
<article class="prose prose-xl">{{ markdown }}</article>
|
||||
```
|
||||
|
||||
Five different typography sizes are included out of the box:
|
||||
|
||||
| Class | Body font size |
|
||||
| ------------------------ | ----------------- |
|
||||
| `prose-sm` | 0.875rem _(14px)_ |
|
||||
| `prose-base` _(default)_ | 1rem _(16px)_ |
|
||||
| `prose-lg` | 1.125rem _(18px)_ |
|
||||
| `prose-xl` | 1.25rem _(20px)_ |
|
||||
| `prose-2xl` | 1.5rem _(24px)_ |
|
||||
|
||||
These can be used in combination with Tailwind's [breakpoint modifiers](https://tailwindcss.com/docs/responsive-design) to change the overall font size of a piece of content at different viewport sizes:
|
||||
|
||||
```html
|
||||
<article class="prose md:prose-lg lg:prose-xl">{{ markdown }}</article>
|
||||
```
|
||||
|
||||
Everything about the provided size modifiers has been hand-tuned by professional designers to look as beautiful as possible, including the relationships between font sizes, heading spacing, code block padding, and more.
|
||||
|
||||
Size modifiers are designed to be used with the [multi-class modifier pattern](http://nicolasgallagher.com/about-html-semantics-front-end-architecture/#component-modifiers) and must be used in conjunction with the base `prose` class.
|
||||
|
||||
> [!NOTE]
|
||||
> Always include the `prose` class when adding a size modifier
|
||||
|
||||
```html
|
||||
<article class="prose prose-lg">{{ markdown }}</article>
|
||||
```
|
||||
|
||||
To learn about customizing the included type scales, read the documentation on [customizing the CSS](#customizing-the-css).
|
||||
|
||||
### Adapting to dark mode
|
||||
|
||||
Each default color theme includes a hand-designed dark mode version that you can trigger by adding the `prose-invert` class:
|
||||
|
||||
```html
|
||||
<article class="prose dark:prose-invert">{{ markdown }}</article>
|
||||
```
|
||||
|
||||
To learn about creating your own color themes, read the [adding custom color themes](#adding-custom-color-themes) documentation.
|
||||
|
||||
### Element modifiers
|
||||
|
||||
Use element modifiers to customize the style of individual elements in your content directly in your HTML:
|
||||
|
||||
```html
|
||||
<article class="prose prose-img:rounded-xl prose-headings:underline prose-a:text-blue-600">
|
||||
{{ markdown }}
|
||||
</article>
|
||||
```
|
||||
|
||||
This makes it easy to do things like style links to match your brand, add a border radius to images, and tons more.
|
||||
|
||||
Here's a complete list of available element modifiers:
|
||||
|
||||
| Modifier | Target |
|
||||
| ---------------------------- | ---------------------------- |
|
||||
| `prose-headings:{utility}` | `h1`, `h2`, `h3`, `h4`, `th` |
|
||||
| `prose-lead:{utility}` | `[class~="lead"]` |
|
||||
| `prose-h1:{utility}` | `h1` |
|
||||
| `prose-h2:{utility}` | `h2` |
|
||||
| `prose-h3:{utility}` | `h3` |
|
||||
| `prose-h4:{utility}` | `h4` |
|
||||
| `prose-p:{utility}` | `p` |
|
||||
| `prose-a:{utility}` | `a` |
|
||||
| `prose-blockquote:{utility}` | `blockquote` |
|
||||
| `prose-figure:{utility}` | `figure` |
|
||||
| `prose-figcaption:{utility}` | `figcaption` |
|
||||
| `prose-strong:{utility}` | `strong` |
|
||||
| `prose-em:{utility}` | `em` |
|
||||
| `prose-kbd:{utility}` | `kbd` |
|
||||
| `prose-code:{utility}` | `code` |
|
||||
| `prose-pre:{utility}` | `pre` |
|
||||
| `prose-ol:{utility}` | `ol` |
|
||||
| `prose-ul:{utility}` | `ul` |
|
||||
| `prose-li:{utility}` | `li` |
|
||||
| `prose-dl:{utility}` | `dl` |
|
||||
| `prose-dt:{utility}` | `dt` |
|
||||
| `prose-dd:{utility}` | `dd` |
|
||||
| `prose-table:{utility}` | `table` |
|
||||
| `prose-thead:{utility}` | `thead` |
|
||||
| `prose-tr:{utility}` | `tr` |
|
||||
| `prose-th:{utility}` | `th` |
|
||||
| `prose-td:{utility}` | `td` |
|
||||
| `prose-img:{utility}` | `img` |
|
||||
| `prose-picture:{utility}` | `picture` |
|
||||
| `prose-video:{utility}` | `video` |
|
||||
| `prose-hr:{utility}` | `hr` |
|
||||
|
||||
When stacking these modifiers with other modifiers like `hover`, you most likely want the other modifier to come last:
|
||||
|
||||
```html
|
||||
<article class="prose prose-a:text-blue-600 prose-a:hover:text-blue-500">{{ markdown }}</article>
|
||||
```
|
||||
|
||||
If you are still using in Tailwind CSS v3, the modifier order is the opposite:
|
||||
|
||||
```html
|
||||
<article class="prose prose-a:text-blue-600 hover:prose-a:text-blue-500">{{ markdown }}</article>
|
||||
```
|
||||
|
||||
Read the Tailwind CSS documentation on [stacked modifiers](https://tailwindcss.com/docs/hover-focus-and-other-states) to learn more.
|
||||
|
||||
### Overriding max-width
|
||||
|
||||
Each size modifier comes with a baked in `max-width` designed to keep the content as readable as possible. This isn't always what you want though, and sometimes you'll want the content to just fill the width of its container.
|
||||
|
||||
In those cases, all you need to do is add `max-w-none` to your content to override the embedded max-width:
|
||||
|
||||
```html
|
||||
<div class="grid grid-cols-4">
|
||||
<div class="col-span-1">
|
||||
<!-- ... -->
|
||||
</div>
|
||||
<div class="col-span-3">
|
||||
<article class="prose max-w-none">{{ markdown }}</article>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Advanced topics
|
||||
|
||||
### Undoing typography styles
|
||||
|
||||
If you have a block of markup embedded in some content that shouldn't inherit the `prose` styles, use the `not-prose` class to sandbox it:
|
||||
|
||||
```html
|
||||
<article class="prose">
|
||||
<h1>My Heading</h1>
|
||||
<p>...</p>
|
||||
|
||||
<div class="not-prose">
|
||||
<!-- Some example or demo that needs to be prose-free -->
|
||||
</div>
|
||||
|
||||
<p>...</p>
|
||||
<!-- ... -->
|
||||
</article>
|
||||
```
|
||||
|
||||
Note that you can't nest new `prose` instances within a `not-prose` block at this time.
|
||||
|
||||
Even when using a prefix for your utilities `not-prose` should not have a prefix.
|
||||
|
||||
### Adding custom color themes
|
||||
|
||||
To customize the color theme beyond simple CSS overrides, add a `@utility` directive to your CSS file:
|
||||
|
||||
```css
|
||||
@utility prose-pink {
|
||||
--tw-prose-body: var(--color-pink-800);
|
||||
--tw-prose-headings: var(--color-pink-900);
|
||||
--tw-prose-lead: var(--color-pink-700);
|
||||
--tw-prose-links: var(--color-pink-900);
|
||||
--tw-prose-bold: var(--color-pink-900);
|
||||
--tw-prose-counters: var(--color-pink-600);
|
||||
--tw-prose-bullets: var(--color-pink-400);
|
||||
--tw-prose-hr: var(--color-pink-300);
|
||||
--tw-prose-quotes: var(--color-pink-900);
|
||||
--tw-prose-quote-borders: var(--color-pink-300);
|
||||
--tw-prose-captions: var(--color-pink-700);
|
||||
--tw-prose-code: var(--color-pink-900);
|
||||
--tw-prose-pre-code: var(--color-pink-100);
|
||||
--tw-prose-pre-bg: var(--color-pink-900);
|
||||
--tw-prose-th-borders: var(--color-pink-300);
|
||||
--tw-prose-td-borders: var(--color-pink-200);
|
||||
--tw-prose-invert-body: var(--color-pink-200);
|
||||
--tw-prose-invert-headings: var(--color-white);
|
||||
--tw-prose-invert-lead: var(--color-pink-300);
|
||||
--tw-prose-invert-links: var(--color-white);
|
||||
--tw-prose-invert-bold: var(--color-white);
|
||||
--tw-prose-invert-counters: var(--color-pink-400);
|
||||
--tw-prose-invert-bullets: var(--color-pink-600);
|
||||
--tw-prose-invert-hr: var(--color-pink-700);
|
||||
--tw-prose-invert-quotes: var(--color-pink-100);
|
||||
--tw-prose-invert-quote-borders: var(--color-pink-700);
|
||||
--tw-prose-invert-captions: var(--color-pink-400);
|
||||
--tw-prose-invert-code: var(--color-white);
|
||||
--tw-prose-invert-pre-code: var(--color-pink-300);
|
||||
--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);
|
||||
--tw-prose-invert-th-borders: var(--color-pink-600);
|
||||
--tw-prose-invert-td-borders: var(--color-pink-700);
|
||||
}
|
||||
```
|
||||
|
||||
For Tailwind v3, update the `typography` section in the JavaScript config file and provide your colors under the `css` key:
|
||||
|
||||
```js {{ filename: 'tailwind.config.js' }}
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
theme: {
|
||||
extend: {
|
||||
typography: () => ({
|
||||
pink: {
|
||||
css: {
|
||||
'--tw-prose-body': 'var(--color-pink-800)',
|
||||
'--tw-prose-headings': 'var(--color-pink-900)',
|
||||
'--tw-prose-lead': 'var(--color-pink-700)',
|
||||
'--tw-prose-links': 'var(--color-pink-900)',
|
||||
'--tw-prose-bold': 'var(--color-pink-900)',
|
||||
'--tw-prose-counters': 'var(--color-pink-600)',
|
||||
'--tw-prose-bullets': 'var(--color-pink-400)',
|
||||
'--tw-prose-hr': 'var(--color-pink-300)',
|
||||
'--tw-prose-quotes': 'var(--color-pink-900)',
|
||||
'--tw-prose-quote-borders': 'var(--color-pink-300)',
|
||||
'--tw-prose-captions': 'var(--color-pink-700)',
|
||||
'--tw-prose-code': 'var(--color-pink-900)',
|
||||
'--tw-prose-pre-code': 'var(--color-pink-100)',
|
||||
'--tw-prose-pre-bg': 'var(--color-pink-900)',
|
||||
'--tw-prose-th-borders': 'var(--color-pink-300)',
|
||||
'--tw-prose-td-borders': 'var(--color-pink-200)',
|
||||
'--tw-prose-invert-body': 'var(--color-pink-200)',
|
||||
'--tw-prose-invert-headings': 'var(--color-white)',
|
||||
'--tw-prose-invert-lead': 'var(--color-pink-300)',
|
||||
'--tw-prose-invert-links': 'var(--color-white)',
|
||||
'--tw-prose-invert-bold': 'var(--color-white)',
|
||||
'--tw-prose-invert-counters': 'var(--color-pink-400)',
|
||||
'--tw-prose-invert-bullets': 'var(--color-pink-600)',
|
||||
'--tw-prose-invert-hr': 'var(--color-pink-700)',
|
||||
'--tw-prose-invert-quotes': 'var(--color-pink-100)',
|
||||
'--tw-prose-invert-quote-borders': 'var(--color-pink-700)',
|
||||
'--tw-prose-invert-captions': 'var(--color-pink-400)',
|
||||
'--tw-prose-invert-code': 'var(--color-white)',
|
||||
'--tw-prose-invert-pre-code': 'var(--color-pink-300)',
|
||||
'--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)',
|
||||
'--tw-prose-invert-th-borders': 'var(--color-pink-600)',
|
||||
'--tw-prose-invert-td-borders': 'var(--color-pink-700)',
|
||||
},
|
||||
},
|
||||
}),
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
See our internal [style definitions](https://github.com/tailwindlabs/tailwindcss-typography/blob/main/src/styles.js) for some more examples.
|
||||
|
||||
### Changing the default class name
|
||||
|
||||
If you need to use a class name other than `prose` for any reason, you can do so using the `className` option when registering the plugin:
|
||||
|
||||
```css
|
||||
@import 'tailwindcss';
|
||||
@plugin "@tailwindcss/typography" {
|
||||
className: wysiwyg;
|
||||
}
|
||||
```
|
||||
|
||||
Now every instance of `prose` in the default class names will be replaced by your custom class name:
|
||||
|
||||
```html
|
||||
<article class="wysiwyg wysiwyg-slate lg:wysiwyg-xl">
|
||||
<h1>My Heading</h1>
|
||||
<p>...</p>
|
||||
|
||||
<div class="not-wysiwyg">
|
||||
<!-- Some example or demo that needs to be prose-free -->
|
||||
</div>
|
||||
|
||||
<p>...</p>
|
||||
<!-- ... -->
|
||||
</article>
|
||||
```
|
||||
|
||||
### Customizing the CSS
|
||||
|
||||
If you want to customize the raw CSS generated by this plugin, you can use the JavaScript based theme API. To do that, use the `@config` directive:
|
||||
|
||||
```diff
|
||||
@import "tailwindcss";
|
||||
@plugin "@tailwindcss/typography";
|
||||
+ @config "./tailwind.config.js";
|
||||
```
|
||||
|
||||
You can then create your own config by adding a new `tailwind.config.js` file with the `typography` section and providing your styles under the `css` key:
|
||||
|
||||
```js {{ filename: 'tailwind.config.js' }}
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
theme: {
|
||||
extend: {
|
||||
typography: {
|
||||
DEFAULT: {
|
||||
css: {
|
||||
color: '#333',
|
||||
a: {
|
||||
color: '#3182ce',
|
||||
'&:hover': {
|
||||
color: '#2c5282',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Like with all theme customizations in Tailwind, you can use CSS variables if you need access to access your theme configuration:
|
||||
|
||||
```js {{ filename: 'tailwind.config.js' }}
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
theme: {
|
||||
extend: {
|
||||
typography: {
|
||||
DEFAULT: {
|
||||
css: {
|
||||
color: 'var(--color-gray-800)',
|
||||
// ...
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Customizations should be applied to a specific modifier like `DEFAULT` or `xl`, and must be added under the `css` property. Customizations are authored in the same [CSS-in-JS syntax](https://v3.tailwindcss.com/docs/plugins#css-in-js-syntax) used to write Tailwind v3 plugins.
|
||||
|
||||
See [the default styles](https://github.com/tailwindlabs/tailwindcss-typography/blob/main/src/styles.js) for this plugin for more in-depth examples of configuring each modifier.
|
||||
|
||||
---
|
||||
|
||||
## Community
|
||||
|
||||
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
|
||||
|
||||
[Discuss the Tailwind CSS Typography plugin on GitHub](https://github.com/tailwindlabs/tailwindcss/discussions)
|
||||
|
||||
For casual chit-chat with others using the framework:
|
||||
|
||||
[Join the Tailwind CSS Discord Server](https://tailwindcss.com/discord)
|
||||
58
node_modules/@tailwindcss/typography/package.json
generated
vendored
Normal file
58
node_modules/@tailwindcss/typography/package.json
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "@tailwindcss/typography",
|
||||
"version": "0.5.20",
|
||||
"description": "A Tailwind CSS plugin for automatically styling plain HTML content with beautiful typographic defaults.",
|
||||
"main": "src/index.js",
|
||||
"types": "src/index.d.ts",
|
||||
"files": [
|
||||
"src/*.js",
|
||||
"src/*.d.ts",
|
||||
"dist/"
|
||||
],
|
||||
"repository": "https://github.com/tailwindlabs/tailwindcss-typography",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 100,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"dev": "next dev demo",
|
||||
"build": "next build demo",
|
||||
"export": "next export demo",
|
||||
"start": "next start demo",
|
||||
"release-channel": "node ./scripts/release-channel.js",
|
||||
"release-notes": "node ./scripts/release-notes.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"tailwindcss": ">=3.0.0 || >=4.0.0 || insiders"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mdx-js/loader": "^1.0.19",
|
||||
"@mdx-js/mdx": "^1.6.6",
|
||||
"@next/mdx": "^8.1.0",
|
||||
"autoprefixer": "^10.2.1",
|
||||
"highlight.js": "^10.4.1",
|
||||
"jest": "^29.7.0",
|
||||
"jest-diff": "^27.3.1",
|
||||
"next": "^12.0.1",
|
||||
"postcss": "^8.2.3",
|
||||
"prettier": "^2.1.2",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"tailwindcss": "^3.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"postcss-selector-parser": "6.0.10"
|
||||
},
|
||||
"jest": {
|
||||
"setupFilesAfterEnv": [
|
||||
"<rootDir>/jest/customMatchers.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
9
node_modules/@tailwindcss/typography/src/index.d.ts
generated
vendored
Normal file
9
node_modules/@tailwindcss/typography/src/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
declare function plugin(options?: Partial<{ className: string; target: 'modern' | 'legacy' }>): {
|
||||
handler: () => void
|
||||
}
|
||||
|
||||
declare namespace plugin {
|
||||
const __isOptionsFunction: true
|
||||
}
|
||||
|
||||
export = plugin
|
||||
138
node_modules/@tailwindcss/typography/src/index.js
generated
vendored
Normal file
138
node_modules/@tailwindcss/typography/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
const plugin = require('tailwindcss/plugin')
|
||||
const styles = require('./styles')
|
||||
const { commonTrailingPseudos, isObject, isPlainObject, merge, castArray } = require('./utils')
|
||||
|
||||
const computed = {
|
||||
// Reserved for future "magic properties", for example:
|
||||
// bulletColor: (color) => ({ 'ul > li::before': { backgroundColor: color } }),
|
||||
}
|
||||
|
||||
function inWhere(selector, { className, modifier, prefix }) {
|
||||
let prefixedNot = prefix(`.not-${className}`).slice(1)
|
||||
let selectorPrefix = selector.startsWith('>')
|
||||
? `${modifier === 'DEFAULT' ? `.${className}` : `.${className}-${modifier}`} `
|
||||
: ''
|
||||
|
||||
// Parse the selector, if every component ends in the same pseudo element(s) then move it to the end
|
||||
let [trailingPseudo, rebuiltSelector] = commonTrailingPseudos(selector)
|
||||
|
||||
if (trailingPseudo) {
|
||||
return `:where(${selectorPrefix}${rebuiltSelector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))${trailingPseudo}`
|
||||
}
|
||||
|
||||
return `:where(${selectorPrefix}${selector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))`
|
||||
}
|
||||
|
||||
function configToCss(config = {}, { target, className, modifier, prefix }) {
|
||||
function updateSelector(k, v) {
|
||||
if (target === 'legacy') {
|
||||
return [k, v]
|
||||
}
|
||||
|
||||
if (Array.isArray(v)) {
|
||||
return [k, v]
|
||||
}
|
||||
|
||||
if (isObject(v)) {
|
||||
let nested = Object.values(v).some(isObject)
|
||||
if (nested) {
|
||||
return [
|
||||
inWhere(k, { className, modifier, prefix }),
|
||||
v,
|
||||
Object.fromEntries(Object.entries(v).map(([k, v]) => updateSelector(k, v))),
|
||||
]
|
||||
}
|
||||
|
||||
return [inWhere(k, { className, modifier, prefix }), v]
|
||||
}
|
||||
|
||||
return [k, v]
|
||||
}
|
||||
|
||||
return Object.fromEntries(
|
||||
Object.entries(
|
||||
merge(
|
||||
{},
|
||||
...Object.keys(config)
|
||||
.filter((key) => computed[key])
|
||||
.map((key) => computed[key](config[key])),
|
||||
...castArray(config.css || {})
|
||||
)
|
||||
).map(([k, v]) => updateSelector(k, v))
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = plugin.withOptions(
|
||||
({ className = 'prose', target = 'modern' } = {}) => {
|
||||
return function ({ addVariant, addComponents, theme, prefix }) {
|
||||
let modifiers = theme('typography')
|
||||
|
||||
let options = { className, prefix }
|
||||
|
||||
for (let [name, ...selectors] of [
|
||||
['headings', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'th'],
|
||||
['h1'],
|
||||
['h2'],
|
||||
['h3'],
|
||||
['h4'],
|
||||
['h5'],
|
||||
['h6'],
|
||||
['p'],
|
||||
['a'],
|
||||
['blockquote'],
|
||||
['figure'],
|
||||
['figcaption'],
|
||||
['strong'],
|
||||
['em'],
|
||||
['kbd'],
|
||||
['code'],
|
||||
['pre'],
|
||||
['ol'],
|
||||
['ul'],
|
||||
['li'],
|
||||
['dl'],
|
||||
['dt'],
|
||||
['dd'],
|
||||
['table'],
|
||||
['thead'],
|
||||
['tr'],
|
||||
['th'],
|
||||
['td'],
|
||||
['img'],
|
||||
['picture'],
|
||||
['video'],
|
||||
['hr'],
|
||||
['lead', '[class~="lead"]'],
|
||||
]) {
|
||||
selectors = selectors.length === 0 ? [name] : selectors
|
||||
|
||||
let selector =
|
||||
target === 'legacy' ? selectors.map((selector) => `& ${selector}`) : selectors.join(', ')
|
||||
|
||||
addVariant(
|
||||
`${className}-${name}`,
|
||||
target === 'legacy' ? selector : `& :is(${inWhere(selector, options)})`
|
||||
)
|
||||
}
|
||||
|
||||
addComponents(
|
||||
Object.keys(modifiers).map((modifier) => ({
|
||||
[modifier === 'DEFAULT' ? `.${className}` : `.${className}-${modifier}`]: configToCss(
|
||||
modifiers[modifier],
|
||||
{
|
||||
target,
|
||||
className,
|
||||
modifier,
|
||||
prefix,
|
||||
}
|
||||
),
|
||||
}))
|
||||
)
|
||||
}
|
||||
},
|
||||
() => {
|
||||
return {
|
||||
theme: { typography: styles },
|
||||
}
|
||||
}
|
||||
)
|
||||
1442
node_modules/@tailwindcss/typography/src/index.test.js
generated
vendored
Normal file
1442
node_modules/@tailwindcss/typography/src/index.test.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1641
node_modules/@tailwindcss/typography/src/styles.js
generated
vendored
Normal file
1641
node_modules/@tailwindcss/typography/src/styles.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
120
node_modules/@tailwindcss/typography/src/utils.js
generated
vendored
Normal file
120
node_modules/@tailwindcss/typography/src/utils.js
generated
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
const parser = require('postcss-selector-parser')
|
||||
const parseSelector = parser()
|
||||
|
||||
function isObject(value) {
|
||||
return typeof value === 'object' && value !== null
|
||||
}
|
||||
|
||||
function isPlainObject(value) {
|
||||
if (typeof value !== 'object' || value === null) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (Object.prototype.toString.call(value) !== '[object Object]') {
|
||||
return false
|
||||
}
|
||||
|
||||
if (Object.getPrototypeOf(value) === null) {
|
||||
return true
|
||||
}
|
||||
|
||||
let proto = value
|
||||
while (Object.getPrototypeOf(proto) !== null) {
|
||||
proto = Object.getPrototypeOf(proto)
|
||||
}
|
||||
|
||||
return Object.getPrototypeOf(value) === proto
|
||||
}
|
||||
|
||||
function merge(target, ...sources) {
|
||||
if (!sources.length) return target
|
||||
const source = sources.shift()
|
||||
|
||||
if (isObject(target) && isObject(source)) {
|
||||
for (const key in source) {
|
||||
if (Array.isArray(source[key])) {
|
||||
if (!target[key]) target[key] = []
|
||||
source[key].forEach((item, index) => {
|
||||
if (isPlainObject(item) && isPlainObject(target[key][index])) {
|
||||
target[key][index] = merge(target[key][index], item)
|
||||
} else {
|
||||
target[key][index] = item
|
||||
}
|
||||
})
|
||||
} else if (isPlainObject(source[key])) {
|
||||
if (!target[key]) target[key] = {}
|
||||
merge(target[key], source[key])
|
||||
} else {
|
||||
target[key] = source[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return merge(target, ...sources)
|
||||
}
|
||||
|
||||
function castArray(value) {
|
||||
return Array.isArray(value) ? value : [value]
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isObject,
|
||||
isPlainObject,
|
||||
merge,
|
||||
castArray,
|
||||
isUsableColor(color, values) {
|
||||
return isPlainObject(values) && color !== 'gray' && values[600]
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {string} selector
|
||||
*/
|
||||
commonTrailingPseudos(selector) {
|
||||
let ast = parseSelector.astSync(selector)
|
||||
|
||||
/** @type {import('postcss-selector-parser').Pseudo[][]} */
|
||||
let matrix = []
|
||||
|
||||
// Put the pseudo elements in reverse order in a sparse, column-major 2D array
|
||||
for (let [i, sel] of ast.nodes.entries()) {
|
||||
for (const [j, child] of [...sel.nodes].reverse().entries()) {
|
||||
// We only care about pseudo elements
|
||||
if (child.type !== 'pseudo' || !child.value.startsWith('::')) {
|
||||
break
|
||||
}
|
||||
|
||||
matrix[j] = matrix[j] || []
|
||||
matrix[j][i] = child
|
||||
}
|
||||
}
|
||||
|
||||
let trailingPseudos = parser.selector()
|
||||
|
||||
// At this point the pseudo elements are in a column-major 2D array
|
||||
// This means each row contains one "column" of pseudo elements from each selector
|
||||
// We can compare all the pseudo elements in a row to see if they are the same
|
||||
for (const pseudos of matrix) {
|
||||
// It's a sparse 2D array so there are going to be holes in the rows
|
||||
// We skip those
|
||||
if (!pseudos) {
|
||||
continue
|
||||
}
|
||||
|
||||
let values = new Set(pseudos.map((p) => p.value))
|
||||
|
||||
// The pseudo elements are not the same
|
||||
if (values.size > 1) {
|
||||
break
|
||||
}
|
||||
|
||||
pseudos.forEach((pseudo) => pseudo.remove())
|
||||
trailingPseudos.prepend(pseudos[0])
|
||||
}
|
||||
|
||||
if (trailingPseudos.nodes.length) {
|
||||
return [trailingPseudos.toString(), ast.toString()]
|
||||
}
|
||||
|
||||
return [null, selector]
|
||||
},
|
||||
}
|
||||
21
node_modules/@tailwindcss/vite/LICENSE
generated
vendored
Normal file
21
node_modules/@tailwindcss/vite/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Tailwind Labs, Inc.
|
||||
|
||||
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.
|
||||
76
node_modules/@tailwindcss/vite/README.md
generated
vendored
Normal file
76
node_modules/@tailwindcss/vite/README.md
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
<p align="center">
|
||||
<a href="https://tailwindcss.com" target="_blank">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-dark.svg">
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg">
|
||||
<img alt="Tailwind CSS" src="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg" width="350" height="70" style="max-width: 100%;">
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
A utility-first CSS framework for rapidly building custom user interfaces.
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/tailwindlabs/tailwindcss/actions"><img src="https://img.shields.io/github/actions/workflow/status/tailwindlabs/tailwindcss/ci.yml?branch=main" alt="Build Status"></a>
|
||||
<a href="https://www.npmjs.com/package/tailwindcss"><img src="https://img.shields.io/npm/dt/tailwindcss.svg" alt="Total Downloads"></a>
|
||||
<a href="https://github.com/tailwindlabs/tailwindcss/releases"><img src="https://img.shields.io/npm/v/tailwindcss.svg" alt="Latest Release"></a>
|
||||
<a href="https://github.com/tailwindlabs/tailwindcss/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/tailwindcss.svg" alt="License"></a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## Documentation
|
||||
|
||||
For full documentation, visit [tailwindcss.com](https://tailwindcss.com).
|
||||
|
||||
## Community
|
||||
|
||||
For help, discussion about best practices, or feature ideas:
|
||||
|
||||
[Discuss Tailwind CSS on GitHub](https://github.com/tailwindlabs/tailwindcss/discussions)
|
||||
|
||||
## Contributing
|
||||
|
||||
If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindlabs/tailwindcss/blob/main/.github/CONTRIBUTING.md) **before submitting a pull request**.
|
||||
|
||||
---
|
||||
|
||||
## `@tailwindcss/vite` plugin API
|
||||
|
||||
### Enabling or disabling Lightning CSS
|
||||
|
||||
By default, this plugin detects whether or not the CSS is being built for production by checking the `NODE_ENV` environment variable. When building for production Lightning CSS will be enabled otherwise it is disabled.
|
||||
|
||||
If you want to always enable or disable Lightning CSS the `optimize` option may be used:
|
||||
|
||||
```js
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
tailwindcss({
|
||||
// Disable Lightning CSS optimization
|
||||
optimize: false,
|
||||
}),
|
||||
],
|
||||
})
|
||||
```
|
||||
|
||||
It's also possible to keep Lightning CSS enabled but disable minification:
|
||||
|
||||
```js
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
tailwindcss({
|
||||
// Enable Lightning CSS but disable minification
|
||||
optimize: { minify: false },
|
||||
}),
|
||||
],
|
||||
})
|
||||
```
|
||||
13
node_modules/@tailwindcss/vite/dist/index.d.mts
generated
vendored
Normal file
13
node_modules/@tailwindcss/vite/dist/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Plugin } from 'vite';
|
||||
|
||||
type PluginOptions = {
|
||||
/**
|
||||
* Optimize and minify the output CSS.
|
||||
*/
|
||||
optimize?: boolean | {
|
||||
minify?: boolean;
|
||||
};
|
||||
};
|
||||
declare function tailwindcss(opts?: PluginOptions): Plugin[];
|
||||
|
||||
export { type PluginOptions, tailwindcss as default };
|
||||
1
node_modules/@tailwindcss/vite/dist/index.mjs
generated
vendored
Normal file
1
node_modules/@tailwindcss/vite/dist/index.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
42
node_modules/@tailwindcss/vite/package.json
generated
vendored
Normal file
42
node_modules/@tailwindcss/vite/package.json
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "@tailwindcss/vite",
|
||||
"version": "4.3.3",
|
||||
"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-vite"
|
||||
},
|
||||
"bugs": "https://github.com/tailwindlabs/tailwindcss/issues",
|
||||
"homepage": "https://tailwindcss.com",
|
||||
"files": [
|
||||
"dist/"
|
||||
],
|
||||
"publishConfig": {
|
||||
"provenance": true,
|
||||
"access": "public"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@tailwindcss/oxide": "4.3.3",
|
||||
"@tailwindcss/node": "4.3.3",
|
||||
"tailwindcss": "4.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "22.19.21",
|
||||
"vite": "^8.1.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vite": "^5.2.0 || ^6 || ^7 || ^8"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsup-node",
|
||||
"dev": "pnpm run build -- --watch"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user