ic
This commit is contained in:
11
dist/Button/Button.d.ts
vendored
Normal file
11
dist/Button/Button.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import React from 'react';
|
||||
export interface ButtonProps {
|
||||
children: React.ReactNode;
|
||||
variant?: 'primary' | 'secondary' | 'success' | 'danger';
|
||||
size?: 'sm' | 'md' | 'lg';
|
||||
disabled?: boolean;
|
||||
onClick?: () => void;
|
||||
className?: string;
|
||||
}
|
||||
export declare const Button: React.FC<ButtonProps>;
|
||||
export default Button;
|
||||
19
dist/Button/Button.js
vendored
Normal file
19
dist/Button/Button.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
|
||||
export const Button = ({ children, variant = 'primary', size = 'md', disabled = false, onClick, className = '' }) => {
|
||||
const baseClasses = 'inline-flex items-center justify-center font-medium rounded-lg transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2';
|
||||
const variants = {
|
||||
primary: 'bg-maya-primary text-white hover:bg-blue-700 focus:ring-blue-500',
|
||||
secondary: 'bg-maya-secondary text-white hover:bg-slate-600 focus:ring-slate-500',
|
||||
success: 'bg-maya-success text-white hover:bg-emerald-700 focus:ring-emerald-500',
|
||||
danger: 'bg-maya-danger text-white hover:bg-red-700 focus:ring-red-500'
|
||||
};
|
||||
const sizes = {
|
||||
sm: 'px-3 py-1.5 text-sm',
|
||||
md: 'px-4 py-2 text-base',
|
||||
lg: 'px-6 py-3 text-lg'
|
||||
};
|
||||
return (_jsx("button", { className: `${baseClasses} ${variants[variant]} ${sizes[size]} ${disabled ? 'opacity-50 cursor-not-allowed' : ''} ${className}`, onClick: onClick, disabled: disabled, children: children }));
|
||||
};
|
||||
|
||||
export default Button;
|
||||
2
dist/Button/index.d.ts
vendored
Normal file
2
dist/Button/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export { default } from './Button';
|
||||
export type { ButtonProps } from './Button';
|
||||
1
dist/Button/index.js
vendored
Normal file
1
dist/Button/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from './Button';
|
||||
8
dist/Card/Card.d.ts
vendored
Normal file
8
dist/Card/Card.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import React from 'react';
|
||||
export interface CardProps {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
padding?: 'none' | 'sm' | 'md' | 'lg';
|
||||
}
|
||||
export declare const Card: React.FC<CardProps>;
|
||||
export default Card;
|
||||
11
dist/Card/Card.js
vendored
Normal file
11
dist/Card/Card.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
export const Card = ({ children, className = '', padding = 'md' }) => {
|
||||
const paddingClasses = {
|
||||
none: '',
|
||||
sm: 'p-3',
|
||||
md: 'p-6',
|
||||
lg: 'p-8'
|
||||
};
|
||||
return (_jsx("div", { className: `bg-white rounded-xl shadow-lg border border-gray-200 ${paddingClasses[padding]} ${className}`, children: children }));
|
||||
};
|
||||
export default Card;
|
||||
2
dist/Card/index.d.ts
vendored
Normal file
2
dist/Card/index.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export { default } from './Card';
|
||||
export type { CardProps } from './Card';
|
||||
1
dist/Card/index.js
vendored
Normal file
1
dist/Card/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from './Card';
|
||||
4
dist/index.d.ts
vendored
Normal file
4
dist/index.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export { default as Button } from './Button';
|
||||
export { default as Card } from './Card';
|
||||
export type { ButtonProps } from './Button';
|
||||
export type { CardProps } from './Card';
|
||||
2
dist/index.js
vendored
Normal file
2
dist/index.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export { default as Button } from './Button';
|
||||
export { default as Card } from './Card';
|
||||
0
docs/components.md
Normal file
0
docs/components.md
Normal file
0
docs/installation.md
Normal file
0
docs/installation.md
Normal file
1
node_modules/.bin/autoprefixer
generated
vendored
Symbolic link
1
node_modules/.bin/autoprefixer
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../autoprefixer/bin/autoprefixer
|
||||
1
node_modules/.bin/baseline-browser-mapping
generated
vendored
Symbolic link
1
node_modules/.bin/baseline-browser-mapping
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../baseline-browser-mapping/dist/cli.js
|
||||
1
node_modules/.bin/browserslist
generated
vendored
Symbolic link
1
node_modules/.bin/browserslist
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../browserslist/cli.js
|
||||
1
node_modules/.bin/nanoid
generated
vendored
Symbolic link
1
node_modules/.bin/nanoid
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../nanoid/bin/nanoid.cjs
|
||||
1
node_modules/.bin/tsc
generated
vendored
Symbolic link
1
node_modules/.bin/tsc
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../typescript/bin/tsc
|
||||
1
node_modules/.bin/tsserver
generated
vendored
Symbolic link
1
node_modules/.bin/tsserver
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../typescript/bin/tsserver
|
||||
1
node_modules/.bin/update-browserslist-db
generated
vendored
Symbolic link
1
node_modules/.bin/update-browserslist-db
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../update-browserslist-db/cli.js
|
||||
290
node_modules/.package-lock.json
generated
vendored
Normal file
290
node_modules/.package-lock.json
generated
vendored
Normal file
@@ -0,0 +1,290 @@
|
||||
{
|
||||
"name": "maya-contigo-ui",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"node_modules/@types/react": {
|
||||
"version": "19.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.2.tgz",
|
||||
"integrity": "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"csstype": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/react-dom": {
|
||||
"version": "19.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.2.tgz",
|
||||
"integrity": "sha512-9KQPoO6mZCi7jcIStSnlOWn2nEF3mNmyr3rIAsGnAbQKYbRLyqmeSc39EVgtxXVia+LMT8j3knZLAZAh+xLmrw==",
|
||||
"dev": true,
|
||||
"peerDependencies": {
|
||||
"@types/react": "^19.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/autoprefixer": {
|
||||
"version": "10.4.21",
|
||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz",
|
||||
"integrity": "sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/autoprefixer"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"browserslist": "^4.24.4",
|
||||
"caniuse-lite": "^1.0.30001702",
|
||||
"fraction.js": "^4.3.7",
|
||||
"normalize-range": "^0.1.2",
|
||||
"picocolors": "^1.1.1",
|
||||
"postcss-value-parser": "^4.2.0"
|
||||
},
|
||||
"bin": {
|
||||
"autoprefixer": "bin/autoprefixer"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": "^8.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/baseline-browser-mapping": {
|
||||
"version": "2.8.19",
|
||||
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.19.tgz",
|
||||
"integrity": "sha512-zoKGUdu6vb2jd3YOq0nnhEDQVbPcHhco3UImJrv5dSkvxTc2pl2WjOPsjZXDwPDSl5eghIMuY3R6J9NDKF3KcQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"baseline-browser-mapping": "dist/cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/browserslist": {
|
||||
"version": "4.26.3",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.3.tgz",
|
||||
"integrity": "sha512-lAUU+02RFBuCKQPj/P6NgjlbCnLBMp4UtgTx7vNHd3XSIJF87s9a5rA3aH2yw3GS9DqZAUbOtZdCCiZeVRqt0w==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/browserslist"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/browserslist"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"baseline-browser-mapping": "^2.8.9",
|
||||
"caniuse-lite": "^1.0.30001746",
|
||||
"electron-to-chromium": "^1.5.227",
|
||||
"node-releases": "^2.0.21",
|
||||
"update-browserslist-db": "^1.1.3"
|
||||
},
|
||||
"bin": {
|
||||
"browserslist": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001751",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001751.tgz",
|
||||
"integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/browserslist"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/csstype": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
|
||||
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.5.237",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.237.tgz",
|
||||
"integrity": "sha512-icUt1NvfhGLar5lSWH3tHNzablaA5js3HVHacQimfP8ViEBOQv+L7DKEuHdbTZ0SKCO1ogTJTIL1Gwk9S6Qvcg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
|
||||
"integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/fraction.js": {
|
||||
"version": "4.3.7",
|
||||
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
|
||||
"integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"type": "patreon",
|
||||
"url": "https://github.com/sponsors/rawify"
|
||||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.11",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
|
||||
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/node-releases": {
|
||||
"version": "2.0.26",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.26.tgz",
|
||||
"integrity": "sha512-S2M9YimhSjBSvYnlr5/+umAnPHE++ODwt5e2Ij6FoX45HA/s4vHdkDx1eax2pAPeAOqu4s9b7ppahsyEFdVqQA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/normalize-range": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
|
||||
"integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/picocolors": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.5.6",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
|
||||
"integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/postcss"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.11",
|
||||
"picocolors": "^1.1.1",
|
||||
"source-map-js": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-value-parser": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
|
||||
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tailwindcss": {
|
||||
"version": "4.1.15",
|
||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.15.tgz",
|
||||
"integrity": "sha512-k2WLnWkYFkdpRv+Oby3EBXIyQC8/s1HOFMBUViwtAh6Z5uAozeUSMQlIsn/c6Q2iJzqG6aJT3wdPaRNj70iYxQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.9.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/update-browserslist-db": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
|
||||
"integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/browserslist"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/browserslist"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"escalade": "^3.2.0",
|
||||
"picocolors": "^1.1.1"
|
||||
},
|
||||
"bin": {
|
||||
"update-browserslist-db": "cli.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"browserslist": ">= 4.21.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
21
node_modules/@types/react-dom/LICENSE
generated
vendored
Normal file
21
node_modules/@types/react-dom/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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
|
||||
16
node_modules/@types/react-dom/README.md
generated
vendored
Normal file
16
node_modules/@types/react-dom/README.md
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# Installation
|
||||
> `npm install --save @types/react-dom`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for react-dom (https://react.dev/).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 13 Oct 2025 14:36:45 GMT
|
||||
* Dependencies: none
|
||||
* Peer dependencies: [@types/react](https://npmjs.com/package/@types/react)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [MartynasZilinskas](https://github.com/MartynasZilinskas), [Josh Rutherford](https://github.com/theruther4d), [Jessica Franco](https://github.com/Jessidhia), and [Sebastian Silbermann](https://github.com/eps1lon).
|
||||
71
node_modules/@types/react-dom/canary.d.ts
generated
vendored
Normal file
71
node_modules/@types/react-dom/canary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
/* eslint-disable @definitelytyped/no-self-import -- self-imports in module augmentations aren't self-imports */
|
||||
/* eslint-disable @definitelytyped/no-declare-current-package -- The module augmentations are optional */
|
||||
/**
|
||||
* These are types for things that are present in the upcoming React 18 release.
|
||||
*
|
||||
* Once React 18 is released they can just be moved to the main index file.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react-dom/canary"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react-dom/canary'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react-dom/canary" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/main/packages/react-dom/index.js to see how the exports are declared,
|
||||
// but confirm with published source code (e.g. https://unpkg.com/react-dom@canary) that these exports end up in the published code
|
||||
|
||||
import React = require("react");
|
||||
import ReactDOM = require(".");
|
||||
|
||||
export {};
|
||||
|
||||
declare module "react" {
|
||||
// @enableViewTransition
|
||||
interface ViewTransitionPseudoElement extends Animatable {
|
||||
getComputedStyle: () => CSSStyleDeclaration;
|
||||
}
|
||||
|
||||
interface ViewTransitionInstance {
|
||||
group: ViewTransitionPseudoElement;
|
||||
imagePair: ViewTransitionPseudoElement;
|
||||
old: ViewTransitionPseudoElement;
|
||||
new: ViewTransitionPseudoElement;
|
||||
}
|
||||
|
||||
// @enableFragmentRefs
|
||||
interface FragmentInstance {
|
||||
blur: () => void;
|
||||
focus: (focusOptions?: FocusOptions | undefined) => void;
|
||||
focusLast: (focusOptions?: FocusOptions | undefined) => void;
|
||||
observeUsing(observer: IntersectionObserver | ResizeObserver): void;
|
||||
unobserveUsing(observer: IntersectionObserver | ResizeObserver): void;
|
||||
getClientRects(): Array<DOMRect>;
|
||||
getRootNode(getRootNodeOptions?: GetRootNodeOptions | undefined): Document | ShadowRoot | FragmentInstance;
|
||||
addEventListener(
|
||||
type: string,
|
||||
listener: EventListener,
|
||||
optionsOrUseCapture?: Parameters<Element["addEventListener"]>[2],
|
||||
): void;
|
||||
removeEventListener(
|
||||
type: string,
|
||||
listener: EventListener,
|
||||
optionsOrUseCapture?: Parameters<Element["removeEventListener"]>[2],
|
||||
): void;
|
||||
dispatchEvent(event: Event): boolean;
|
||||
scrollIntoView(alignToTop?: boolean): void;
|
||||
}
|
||||
}
|
||||
105
node_modules/@types/react-dom/client.d.ts
generated
vendored
Normal file
105
node_modules/@types/react-dom/client.d.ts
generated
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* WARNING: This entrypoint is only available starting with `react-dom@18.0.0-rc.1`
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/main/packages/react-dom/client.js to see how the exports are declared,
|
||||
|
||||
import React = require("react");
|
||||
|
||||
export {};
|
||||
|
||||
declare const REACT_FORM_STATE_SIGIL: unique symbol;
|
||||
export interface ReactFormState {
|
||||
[REACT_FORM_STATE_SIGIL]: never;
|
||||
}
|
||||
|
||||
export interface HydrationOptions {
|
||||
formState?: ReactFormState | null;
|
||||
/**
|
||||
* Prefix for `useId`.
|
||||
*/
|
||||
identifierPrefix?: string;
|
||||
onUncaughtError?:
|
||||
| ((error: unknown, errorInfo: { componentStack?: string | undefined }) => void)
|
||||
| undefined;
|
||||
onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void;
|
||||
onCaughtError?:
|
||||
| ((
|
||||
error: unknown,
|
||||
errorInfo: {
|
||||
componentStack?: string | undefined;
|
||||
errorBoundary?: React.Component<unknown> | undefined;
|
||||
},
|
||||
) => void)
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export interface RootOptions {
|
||||
/**
|
||||
* Prefix for `useId`.
|
||||
*/
|
||||
identifierPrefix?: string;
|
||||
onUncaughtError?:
|
||||
| ((error: unknown, errorInfo: { componentStack?: string | undefined }) => void)
|
||||
| undefined;
|
||||
onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void;
|
||||
onCaughtError?:
|
||||
| ((
|
||||
error: unknown,
|
||||
errorInfo: {
|
||||
componentStack?: string | undefined;
|
||||
errorBoundary?: React.Component<unknown> | undefined;
|
||||
},
|
||||
) => void)
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export interface ErrorInfo {
|
||||
componentStack?: string;
|
||||
}
|
||||
|
||||
export interface Root {
|
||||
render(children: React.ReactNode): void;
|
||||
unmount(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Different release channels declare additional types of ReactNode this particular release channel accepts.
|
||||
* App or library types should never augment this interface.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS {}
|
||||
|
||||
export type Container =
|
||||
| Element
|
||||
| DocumentFragment
|
||||
| Document
|
||||
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS[
|
||||
keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS
|
||||
];
|
||||
|
||||
/**
|
||||
* createRoot lets you create a root to display React components inside a browser DOM node.
|
||||
*
|
||||
* @see {@link https://react.dev/reference/react-dom/client/createRoot API Reference for `createRoot`}
|
||||
*/
|
||||
export function createRoot(container: Container, options?: RootOptions): Root;
|
||||
|
||||
/**
|
||||
* Same as `createRoot()`, but is used to hydrate a container whose HTML contents were rendered by ReactDOMServer.
|
||||
*
|
||||
* React will attempt to attach event listeners to the existing markup.
|
||||
*
|
||||
* **Example Usage**
|
||||
*
|
||||
* ```jsx
|
||||
* hydrateRoot(document.querySelector('#root'), <App />)
|
||||
* ```
|
||||
*
|
||||
* @see https://reactjs.org/docs/react-dom-client.html#hydrateroot
|
||||
*/
|
||||
export function hydrateRoot(
|
||||
container: Element | Document,
|
||||
initialChildren: React.ReactNode,
|
||||
options?: HydrationOptions,
|
||||
): Root;
|
||||
54
node_modules/@types/react-dom/experimental.d.ts
generated
vendored
Normal file
54
node_modules/@types/react-dom/experimental.d.ts
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* These are types for things that are present in the `experimental` builds of React but not yet
|
||||
* on a stable build.
|
||||
*
|
||||
* Once they are promoted to stable they can just be moved to the main index file.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react-dom/experimental"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react-dom/experimental'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react-dom/experimental" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/main/packages/react-dom/index.experimental.js to see how the exports are declared,
|
||||
// but confirm with published source code (e.g. https://unpkg.com/react-dom@experimental) that these exports end up in the published code
|
||||
|
||||
import React = require("react");
|
||||
import ReactDOM = require("./canary");
|
||||
|
||||
export {};
|
||||
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
|
||||
declare module "." {
|
||||
}
|
||||
|
||||
declare module "react" {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface GestureProvider extends AnimationTimeline {}
|
||||
}
|
||||
|
||||
declare module "./client" {
|
||||
type TransitionIndicatorCleanup = () => VoidOrUndefinedOnly;
|
||||
interface RootOptions {
|
||||
onDefaultTransitionIndicator?: (() => void | TransitionIndicatorCleanup) | undefined;
|
||||
}
|
||||
interface HydrationOptions {
|
||||
onDefaultTransitionIndicator?: (() => void | TransitionIndicatorCleanup) | undefined;
|
||||
}
|
||||
}
|
||||
133
node_modules/@types/react-dom/index.d.ts
generated
vendored
Normal file
133
node_modules/@types/react-dom/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
// NOTE: Users of the `experimental` builds of React should add a reference
|
||||
// to 'react-dom/experimental' in their project. See experimental.d.ts's top comment
|
||||
// for reference and documentation on how exactly to do it.
|
||||
|
||||
export as namespace ReactDOM;
|
||||
|
||||
import { Key, ReactNode, ReactPortal } from "react";
|
||||
|
||||
declare module "react" {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface CacheSignal extends AbortSignal {}
|
||||
}
|
||||
|
||||
export function createPortal(
|
||||
children: ReactNode,
|
||||
container: Element | DocumentFragment,
|
||||
key?: Key | null,
|
||||
): ReactPortal;
|
||||
|
||||
export const version: string;
|
||||
|
||||
export function flushSync<R>(fn: () => R): R;
|
||||
|
||||
export function unstable_batchedUpdates<A, R>(callback: (a: A) => R, a: A): R;
|
||||
export function unstable_batchedUpdates<R>(callback: () => R): R;
|
||||
|
||||
export interface FormStatusNotPending {
|
||||
pending: false;
|
||||
data: null;
|
||||
method: null;
|
||||
action: null;
|
||||
}
|
||||
|
||||
export interface FormStatusPending {
|
||||
pending: true;
|
||||
data: FormData;
|
||||
method: string;
|
||||
action: string | ((formData: FormData) => void | Promise<void>);
|
||||
}
|
||||
|
||||
export type FormStatus = FormStatusPending | FormStatusNotPending;
|
||||
|
||||
export function useFormStatus(): FormStatus;
|
||||
|
||||
export function useFormState<State>(
|
||||
action: (state: Awaited<State>) => State | Promise<State>,
|
||||
initialState: Awaited<State>,
|
||||
permalink?: string,
|
||||
): [state: Awaited<State>, dispatch: () => void, isPending: boolean];
|
||||
export function useFormState<State, Payload>(
|
||||
action: (state: Awaited<State>, payload: Payload) => State | Promise<State>,
|
||||
initialState: Awaited<State>,
|
||||
permalink?: string,
|
||||
): [state: Awaited<State>, dispatch: (payload: Payload) => void, isPending: boolean];
|
||||
|
||||
export function prefetchDNS(href: string): void;
|
||||
|
||||
export interface PreconnectOptions {
|
||||
// Don't create a helper type.
|
||||
// It would have to be in module scope to be inlined in TS tooltips.
|
||||
// But then it becomes part of the public API.
|
||||
// TODO: Upstream to microsoft/TypeScript-DOM-lib-generator -> w3c/webref
|
||||
// since the spec has a notion of a dedicated type: https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attribute
|
||||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
|
||||
}
|
||||
export function preconnect(href: string, options?: PreconnectOptions): void;
|
||||
|
||||
export type PreloadAs =
|
||||
| "audio"
|
||||
| "document"
|
||||
| "embed"
|
||||
| "fetch"
|
||||
| "font"
|
||||
| "image"
|
||||
| "object"
|
||||
| "track"
|
||||
| "script"
|
||||
| "style"
|
||||
| "video"
|
||||
| "worker";
|
||||
export interface PreloadOptions {
|
||||
as: PreloadAs;
|
||||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
|
||||
fetchPriority?: "high" | "low" | "auto" | undefined;
|
||||
// TODO: These should only be allowed with `as: 'image'` but it's not trivial to write tests against the full TS support matrix.
|
||||
imageSizes?: string | undefined;
|
||||
imageSrcSet?: string | undefined;
|
||||
integrity?: string | undefined;
|
||||
type?: string | undefined;
|
||||
nonce?: string | undefined;
|
||||
referrerPolicy?: ReferrerPolicy | undefined;
|
||||
media?: string | undefined;
|
||||
}
|
||||
export function preload(href: string, options?: PreloadOptions): void;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/links.html#link-type-modulepreload
|
||||
export type PreloadModuleAs = RequestDestination;
|
||||
export interface PreloadModuleOptions {
|
||||
/**
|
||||
* @default "script"
|
||||
*/
|
||||
as: PreloadModuleAs;
|
||||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
|
||||
integrity?: string | undefined;
|
||||
nonce?: string | undefined;
|
||||
}
|
||||
export function preloadModule(href: string, options?: PreloadModuleOptions): void;
|
||||
|
||||
export type PreinitAs = "script" | "style";
|
||||
export interface PreinitOptions {
|
||||
as: PreinitAs;
|
||||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
|
||||
fetchPriority?: "high" | "low" | "auto" | undefined;
|
||||
precedence?: string | undefined;
|
||||
integrity?: string | undefined;
|
||||
nonce?: string | undefined;
|
||||
}
|
||||
export function preinit(href: string, options?: PreinitOptions): void;
|
||||
|
||||
// Will be expanded to include all of https://github.com/tc39/proposal-import-attributes
|
||||
export type PreinitModuleAs = "script";
|
||||
export interface PreinitModuleOptions {
|
||||
/**
|
||||
* @default "script"
|
||||
*/
|
||||
as?: PreinitModuleAs;
|
||||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
|
||||
integrity?: string | undefined;
|
||||
nonce?: string | undefined;
|
||||
}
|
||||
export function preinitModule(href: string, options?: PreinitModuleOptions): void;
|
||||
|
||||
export function requestFormReset(form: HTMLFormElement): void;
|
||||
128
node_modules/@types/react-dom/package.json
generated
vendored
Normal file
128
node_modules/@types/react-dom/package.json
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
{
|
||||
"name": "@types/react-dom",
|
||||
"version": "19.2.2",
|
||||
"description": "TypeScript definitions for react-dom",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Asana",
|
||||
"url": "https://asana.com"
|
||||
},
|
||||
{
|
||||
"name": "AssureSign",
|
||||
"url": "http://www.assuresign.com"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft",
|
||||
"url": "https://microsoft.com"
|
||||
},
|
||||
{
|
||||
"name": "MartynasZilinskas",
|
||||
"githubUsername": "MartynasZilinskas",
|
||||
"url": "https://github.com/MartynasZilinskas"
|
||||
},
|
||||
{
|
||||
"name": "Josh Rutherford",
|
||||
"githubUsername": "theruther4d",
|
||||
"url": "https://github.com/theruther4d"
|
||||
},
|
||||
{
|
||||
"name": "Jessica Franco",
|
||||
"githubUsername": "Jessidhia",
|
||||
"url": "https://github.com/Jessidhia"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Silbermann",
|
||||
"githubUsername": "eps1lon",
|
||||
"url": "https://github.com/eps1lon"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": {
|
||||
"default": "./index.d.ts"
|
||||
}
|
||||
},
|
||||
"./client": {
|
||||
"types": {
|
||||
"default": "./client.d.ts"
|
||||
}
|
||||
},
|
||||
"./canary": {
|
||||
"types": {
|
||||
"default": "./canary.d.ts"
|
||||
}
|
||||
},
|
||||
"./server": {
|
||||
"types": {
|
||||
"default": "./server.d.ts"
|
||||
}
|
||||
},
|
||||
"./server.browser": {
|
||||
"types": {
|
||||
"default": "./server.browser.d.ts"
|
||||
}
|
||||
},
|
||||
"./server.bun": {
|
||||
"types": {
|
||||
"default": "./server.bun.d.ts"
|
||||
}
|
||||
},
|
||||
"./server.edge": {
|
||||
"types": {
|
||||
"default": "./server.edge.d.ts"
|
||||
}
|
||||
},
|
||||
"./server.node": {
|
||||
"types": {
|
||||
"default": "./server.node.d.ts"
|
||||
}
|
||||
},
|
||||
"./static": {
|
||||
"types": {
|
||||
"default": "./static.d.ts"
|
||||
}
|
||||
},
|
||||
"./static.browser": {
|
||||
"types": {
|
||||
"default": "./static.browser.d.ts"
|
||||
}
|
||||
},
|
||||
"./static.edge": {
|
||||
"types": {
|
||||
"default": "./static.edge.d.ts"
|
||||
}
|
||||
},
|
||||
"./static.node": {
|
||||
"types": {
|
||||
"default": "./static.node.d.ts"
|
||||
}
|
||||
},
|
||||
"./experimental": {
|
||||
"types": {
|
||||
"default": "./experimental.d.ts"
|
||||
}
|
||||
},
|
||||
"./test-utils": {
|
||||
"types": {
|
||||
"default": "./test-utils/index.d.ts"
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/react-dom"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^19.2.0"
|
||||
},
|
||||
"typesPublisherContentHash": "c53ce9136571cc445e6417c69b996c17d5dd25855b71a504b8202c58d92d3d98",
|
||||
"typeScriptVersion": "5.2"
|
||||
}
|
||||
1
node_modules/@types/react-dom/server.browser.d.ts
generated
vendored
Normal file
1
node_modules/@types/react-dom/server.browser.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { renderToReadableStream, renderToStaticMarkup, renderToString } from "./server";
|
||||
1
node_modules/@types/react-dom/server.bun.d.ts
generated
vendored
Normal file
1
node_modules/@types/react-dom/server.bun.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { renderToReadableStream, renderToStaticMarkup, renderToString } from "./server";
|
||||
183
node_modules/@types/react-dom/server.d.ts
generated
vendored
Normal file
183
node_modules/@types/react-dom/server.d.ts
generated
vendored
Normal file
@@ -0,0 +1,183 @@
|
||||
// forward declarations
|
||||
declare global {
|
||||
namespace NodeJS {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface ReadableStream {}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface WritableStream {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub for https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface AbortSignal {}
|
||||
|
||||
/**
|
||||
* Stub for https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface ReadableStream {}
|
||||
}
|
||||
|
||||
import { ReactNode } from "react";
|
||||
import { ErrorInfo, ReactFormState } from "./client";
|
||||
import { PostponedState, ResumeOptions } from "./static";
|
||||
|
||||
export interface BootstrapScriptDescriptor {
|
||||
src: string;
|
||||
integrity?: string | undefined;
|
||||
crossOrigin?: string | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap Import maps}
|
||||
*/
|
||||
// TODO: Ideally TypeScripts standard library would include this type.
|
||||
// Until then we keep the prefixed one for future compatibility.
|
||||
export interface ReactImportMap {
|
||||
/**
|
||||
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#imports `imports` reference}
|
||||
*/
|
||||
imports?: {
|
||||
[specifier: string]: string;
|
||||
} | undefined;
|
||||
/**
|
||||
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#integrity `integrity` reference}
|
||||
*/
|
||||
integrity?: {
|
||||
[moduleURL: string]: string;
|
||||
} | undefined;
|
||||
/**
|
||||
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#scopes `scopes` reference}
|
||||
*/
|
||||
scopes?: {
|
||||
[scope: string]: {
|
||||
[specifier: string]: string;
|
||||
};
|
||||
} | undefined;
|
||||
}
|
||||
|
||||
export interface RenderToPipeableStreamOptions {
|
||||
identifierPrefix?: string;
|
||||
namespaceURI?: string;
|
||||
nonce?: string;
|
||||
bootstrapScriptContent?: string;
|
||||
bootstrapScripts?: Array<string | BootstrapScriptDescriptor>;
|
||||
bootstrapModules?: Array<string | BootstrapScriptDescriptor>;
|
||||
/**
|
||||
* Maximum length of the header content in unicode code units i.e. string.length.
|
||||
* Must be a positive integer if specified.
|
||||
* @default 2000
|
||||
*/
|
||||
headersLengthHint?: number | undefined;
|
||||
importMap?: ReactImportMap | undefined;
|
||||
progressiveChunkSize?: number;
|
||||
onHeaders?: ((headers: Headers) => void) | undefined;
|
||||
onShellReady?: () => void;
|
||||
onShellError?: (error: unknown) => void;
|
||||
onAllReady?: () => void;
|
||||
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
||||
formState?: ReactFormState | null;
|
||||
}
|
||||
|
||||
export interface PipeableStream {
|
||||
abort: (reason?: unknown) => void;
|
||||
pipe: <Writable extends NodeJS.WritableStream>(destination: Writable) => Writable;
|
||||
}
|
||||
|
||||
export interface ServerOptions {
|
||||
identifierPrefix?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Only available in the environments with [Node.js Streams](https://nodejs.dev/learn/nodejs-streams).
|
||||
*
|
||||
* @see [API](https://reactjs.org/docs/react-dom-server.html#rendertopipeablestream)
|
||||
*
|
||||
* @param children
|
||||
* @param options
|
||||
*/
|
||||
export function renderToPipeableStream(children: ReactNode, options?: RenderToPipeableStreamOptions): PipeableStream;
|
||||
|
||||
/**
|
||||
* Render a React element to its initial HTML. This should only be used on the server.
|
||||
* React will return an HTML string. You can use this method to generate HTML on the server
|
||||
* and send the markup down on the initial request for faster page loads and to allow search
|
||||
* engines to crawl your pages for SEO purposes.
|
||||
*
|
||||
* If you call `ReactDOMClient.hydrateRoot()` on a node that already has this server-rendered markup,
|
||||
* React will preserve it and only attach event handlers, allowing you
|
||||
* to have a very performant first-load experience.
|
||||
*/
|
||||
export function renderToString(element: ReactNode, options?: ServerOptions): string;
|
||||
|
||||
/**
|
||||
* Similar to `renderToString`, except this doesn't create extra DOM attributes
|
||||
* such as `data-reactid`, that React uses internally. This is useful if you want
|
||||
* to use React as a simple static page generator, as stripping away the extra
|
||||
* attributes can save lots of bytes.
|
||||
*/
|
||||
export function renderToStaticMarkup(element: ReactNode, options?: ServerOptions): string;
|
||||
|
||||
export interface RenderToReadableStreamOptions {
|
||||
identifierPrefix?: string;
|
||||
importMap?: ReactImportMap | undefined;
|
||||
namespaceURI?: string;
|
||||
nonce?: string;
|
||||
bootstrapScriptContent?: string;
|
||||
bootstrapScripts?: Array<string | BootstrapScriptDescriptor>;
|
||||
bootstrapModules?: Array<string | BootstrapScriptDescriptor>;
|
||||
/**
|
||||
* Maximum length of the header content in unicode code units i.e. string.length.
|
||||
* Must be a positive integer if specified.
|
||||
* @default 2000
|
||||
*/
|
||||
headersLengthHint?: number | undefined;
|
||||
progressiveChunkSize?: number;
|
||||
signal?: AbortSignal;
|
||||
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
||||
onHeaders?: ((headers: Headers) => void) | undefined;
|
||||
formState?: ReactFormState | null;
|
||||
}
|
||||
|
||||
export interface ReactDOMServerReadableStream extends ReadableStream {
|
||||
allReady: Promise<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Only available in the environments with [Web Streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) (this includes browsers, Deno, and some modern edge runtimes).
|
||||
*
|
||||
* @see [API](https://reactjs.org/docs/react-dom-server.html#rendertoreadablestream)
|
||||
*/
|
||||
export function renderToReadableStream(
|
||||
children: ReactNode,
|
||||
options?: RenderToReadableStreamOptions,
|
||||
): Promise<ReactDOMServerReadableStream>;
|
||||
|
||||
export { ResumeOptions };
|
||||
|
||||
/**
|
||||
* @see {@link https://react.dev/reference/react-dom/server/resume `resume`` reference documentation}
|
||||
* @version 19.2
|
||||
*/
|
||||
export function resume(
|
||||
children: React.ReactNode,
|
||||
postponedState: PostponedState,
|
||||
options?: ResumeOptions,
|
||||
): Promise<ReactDOMServerReadableStream>;
|
||||
|
||||
/**
|
||||
* @see {@link https://react.dev/reference/react-dom/server/resumeToPipeableStream `resumeToPipeableStream`` reference documentation}
|
||||
* @version 19.2
|
||||
*/
|
||||
export function resumeToPipeableStream(
|
||||
children: React.ReactNode,
|
||||
postponedState: PostponedState,
|
||||
options?: ResumeOptions,
|
||||
): Promise<PipeableStream>;
|
||||
|
||||
export const version: string;
|
||||
|
||||
export as namespace ReactDOMServer;
|
||||
1
node_modules/@types/react-dom/server.edge.d.ts
generated
vendored
Normal file
1
node_modules/@types/react-dom/server.edge.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { renderToReadableStream, renderToStaticMarkup, renderToString, resume } from "./server";
|
||||
8
node_modules/@types/react-dom/server.node.d.ts
generated
vendored
Normal file
8
node_modules/@types/react-dom/server.node.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export {
|
||||
renderToPipeableStream,
|
||||
renderToReadableStream,
|
||||
renderToStaticMarkup,
|
||||
renderToString,
|
||||
resume,
|
||||
resumeToPipeableStream,
|
||||
} from "./server";
|
||||
1
node_modules/@types/react-dom/static.browser.d.ts
generated
vendored
Normal file
1
node_modules/@types/react-dom/static.browser.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { prerender, version } from "./static";
|
||||
153
node_modules/@types/react-dom/static.d.ts
generated
vendored
Normal file
153
node_modules/@types/react-dom/static.d.ts
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
// forward declarations
|
||||
declare global {
|
||||
namespace NodeJS {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface ReadableStream {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub for https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface AbortSignal {}
|
||||
|
||||
/**
|
||||
* Stub for https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface ReadableStream<R = any> {}
|
||||
|
||||
/**
|
||||
* Stub for https://developer.mozilla.org/en-US/docs/Web/API/Uint8Array
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface Uint8Array {}
|
||||
}
|
||||
|
||||
import { ReactNode } from "react";
|
||||
import { ErrorInfo } from "./client";
|
||||
export {};
|
||||
|
||||
declare const POSTPONED_STATE_SIGIL: unique symbol;
|
||||
|
||||
/**
|
||||
* This is an opaque type i.e. users should not make any assumptions about its structure.
|
||||
* It is JSON-serializeable to be a able to store it and retrvieve later for use with {@link https://react.dev/reference/react-dom/server/resume `resume`}.
|
||||
*/
|
||||
export interface PostponedState {
|
||||
[POSTPONED_STATE_SIGIL]: never;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap Import maps}
|
||||
*/
|
||||
// TODO: Ideally TypeScripts standard library would include this type.
|
||||
// Until then we keep the prefixed one for future compatibility.
|
||||
export interface ReactImportMap {
|
||||
/**
|
||||
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#imports `imports` reference}
|
||||
*/
|
||||
imports?: {
|
||||
[specifier: string]: string;
|
||||
} | undefined;
|
||||
/**
|
||||
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#integrity `integrity` reference}
|
||||
*/
|
||||
integrity?: {
|
||||
[moduleURL: string]: string;
|
||||
} | undefined;
|
||||
/**
|
||||
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#scopes `scopes` reference}
|
||||
*/
|
||||
scopes?: {
|
||||
[scope: string]: {
|
||||
[specifier: string]: string;
|
||||
};
|
||||
} | undefined;
|
||||
}
|
||||
|
||||
export interface BootstrapScriptDescriptor {
|
||||
src: string;
|
||||
integrity?: string | undefined;
|
||||
crossOrigin?: string | undefined;
|
||||
}
|
||||
|
||||
export interface PrerenderOptions {
|
||||
bootstrapScriptContent?: string;
|
||||
bootstrapScripts?: Array<string | BootstrapScriptDescriptor>;
|
||||
bootstrapModules?: Array<string | BootstrapScriptDescriptor>;
|
||||
/**
|
||||
* Maximum length of the header content in unicode code units i.e. string.length.
|
||||
* Must be a positive integer if specified.
|
||||
* @default 2000
|
||||
*/
|
||||
headersLengthHint?: number | undefined;
|
||||
identifierPrefix?: string;
|
||||
importMap?: ReactImportMap | undefined;
|
||||
namespaceURI?: string;
|
||||
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
||||
onHeaders?: (headers: Headers) => void | undefined;
|
||||
progressiveChunkSize?: number;
|
||||
signal?: AbortSignal;
|
||||
}
|
||||
|
||||
export interface PrerenderResult {
|
||||
postponed: null | PostponedState;
|
||||
prelude: ReadableStream<Uint8Array>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Only available in the environments with [Web Streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) (this includes browsers, Deno, and some modern edge runtimes).
|
||||
*
|
||||
* @see [API](https://react.dev/reference/react-dom/static/prerender)
|
||||
*/
|
||||
export function prerender(
|
||||
reactNode: ReactNode,
|
||||
options?: PrerenderOptions,
|
||||
): Promise<PrerenderResult>;
|
||||
|
||||
export interface PrerenderToNodeStreamResult {
|
||||
prelude: NodeJS.ReadableStream;
|
||||
postponed: null | PostponedState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Only available in the environments with [Node.js Streams](https://nodejs.dev/learn/nodejs-streams).
|
||||
*
|
||||
* @see [API](https://react.dev/reference/react-dom/static/prerenderToNodeStream)
|
||||
*
|
||||
* @param children
|
||||
* @param options
|
||||
*/
|
||||
export function prerenderToNodeStream(
|
||||
reactNode: ReactNode,
|
||||
options?: PrerenderOptions,
|
||||
): Promise<PrerenderToNodeStreamResult>;
|
||||
|
||||
export interface ResumeOptions {
|
||||
nonce?: string;
|
||||
signal?: AbortSignal;
|
||||
onError?: (error: unknown) => string | undefined | void;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerender `resumeAndPrerender` reference documentation}
|
||||
* @version 19.2
|
||||
*/
|
||||
export function resumeAndPrerender(
|
||||
children: React.ReactNode,
|
||||
postponedState: null | PostponedState,
|
||||
options?: Omit<ResumeOptions, "nonce">,
|
||||
): Promise<PrerenderResult>;
|
||||
|
||||
/**
|
||||
* @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerenderToNodeStream `resumeAndPrerenderToNodeStream`` reference documentation}
|
||||
* @version 19.2
|
||||
*/
|
||||
export function resumeAndPrerenderToNodeStream(
|
||||
children: React.ReactNode,
|
||||
postponedState: null | PostponedState,
|
||||
options?: Omit<ResumeOptions, "nonce">,
|
||||
): Promise<PrerenderToNodeStreamResult>;
|
||||
|
||||
export const version: string;
|
||||
1
node_modules/@types/react-dom/static.edge.d.ts
generated
vendored
Normal file
1
node_modules/@types/react-dom/static.edge.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { prerender, resumeAndPrerender, version } from "./static";
|
||||
7
node_modules/@types/react-dom/static.node.d.ts
generated
vendored
Normal file
7
node_modules/@types/react-dom/static.node.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export {
|
||||
prerender,
|
||||
prerenderToNodeStream,
|
||||
resumeAndPrerender,
|
||||
resumeAndPrerenderToNodeStream,
|
||||
version,
|
||||
} from "./static";
|
||||
7
node_modules/@types/react-dom/test-utils/index.d.ts
generated
vendored
Normal file
7
node_modules/@types/react-dom/test-utils/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export {};
|
||||
|
||||
export {
|
||||
/**
|
||||
* @deprecated Import `act` from `react` instead.
|
||||
*/ act,
|
||||
} from "react";
|
||||
21
node_modules/@types/react/LICENSE
generated
vendored
Normal file
21
node_modules/@types/react/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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
|
||||
15
node_modules/@types/react/README.md
generated
vendored
Normal file
15
node_modules/@types/react/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/react`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for react (https://react.dev/).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 07 Oct 2025 05:34:23 GMT
|
||||
* Dependencies: [csstype](https://npmjs.com/package/csstype)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [John Reilly](https://github.com/johnnyreilly), [Benoit Benezech](https://github.com/bbenezech), [Patricio Zavolinsky](https://github.com/pzavolinsky), [Eric Anderson](https://github.com/ericanderson), [Dovydas Navickas](https://github.com/DovydasNavickas), [Josh Rutherford](https://github.com/theruther4d), [Guilherme Hübner](https://github.com/guilhermehubner), [Ferdy Budhidharma](https://github.com/ferdaber), [Johann Rakotoharisoa](https://github.com/jrakotoharisoa), [Olivier Pascal](https://github.com/pascaloliv), [Martin Hochel](https://github.com/hotell), [Frank Li](https://github.com/franklixuefei), [Jessica Franco](https://github.com/Jessidhia), [Saransh Kataria](https://github.com/saranshkataria), [Kanitkorn Sujautra](https://github.com/lukyth), [Sebastian Silbermann](https://github.com/eps1lon), [Kyle Scully](https://github.com/zieka), [Cong Zhang](https://github.com/dancerphil), [Dimitri Mitropoulos](https://github.com/dimitropoulos), [JongChan Choi](https://github.com/disjukr), [Victor Magalhães](https://github.com/vhfmag), [Priyanshu Rav](https://github.com/priyanshurav), [Dmitry Semigradsky](https://github.com/Semigradsky), and [Matt Pocock](https://github.com/mattpocock).
|
||||
120
node_modules/@types/react/canary.d.ts
generated
vendored
Normal file
120
node_modules/@types/react/canary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
/**
|
||||
* These are types for things that are present in the React `canary` release channel.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react/canary"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react/canary'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react/canary" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/main/packages/react/src/React.js to see how the exports are declared,
|
||||
|
||||
import React = require(".");
|
||||
|
||||
export {};
|
||||
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
|
||||
declare module "." {
|
||||
export function unstable_useCacheRefresh(): () => void;
|
||||
|
||||
// @enableViewTransition
|
||||
export interface ViewTransitionInstance {
|
||||
/**
|
||||
* The {@link ViewTransitionProps name} that was used in the corresponding {@link ViewTransition} component or `"auto"` if the `name` prop was omitted.
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type ViewTransitionClassPerType = Record<"default" | (string & {}), "none" | "auto" | (string & {})>;
|
||||
export type ViewTransitionClass = ViewTransitionClassPerType | ViewTransitionClassPerType[string];
|
||||
|
||||
export interface ViewTransitionProps {
|
||||
children?: ReactNode | undefined;
|
||||
/**
|
||||
* Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node.
|
||||
*/
|
||||
default?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is mounted and there's no other with the same name being deleted.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
enter?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is unmounted and there's no other with the same name being deleted.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
exit?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* "auto" will automatically assign a view-transition-name to the inner DOM node.
|
||||
* That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
|
||||
*
|
||||
* A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the `<ViewTransition>` component preserves the same name so this example cross-fades between the DOM nodes instead of causing an exit and enter.
|
||||
* @default "auto"
|
||||
*/
|
||||
name?: "auto" | (string & {}) | undefined;
|
||||
/**
|
||||
* The `<ViewTransition>` or its parent Component is mounted and there's no other `<ViewTransition>` with the same name being deleted.
|
||||
*/
|
||||
onEnter?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
/**
|
||||
* The `<ViewTransition>` or its parent Component is unmounted and there's no other `<ViewTransition>` with the same name being deleted.
|
||||
*/
|
||||
onExit?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
/**
|
||||
* This `<ViewTransition>` is being mounted and another `<ViewTransition>` instance with the same name is being unmounted elsewhere.
|
||||
*/
|
||||
onShare?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
/**
|
||||
* The content of `<ViewTransition>` has changed either due to DOM mutations or because an inner child `<ViewTransition>` has resized.
|
||||
*/
|
||||
onUpdate?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
ref?: Ref<ViewTransitionInstance> | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if this `<ViewTransition>` is being mounted and another instance with the same name is being unmounted elsewhere.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
share?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if the content of this `<ViewTransition>` has changed either due to DOM mutations or because an inner child has resized.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
update?: ViewTransitionClass | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opt-in for using {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API View Transitions} in React.
|
||||
* View Transitions only trigger for async updates like {@link startTransition}, {@link useDeferredValue}, Actions or <{@link Suspense}> revealing from fallback to content.
|
||||
* Synchronous updates provide an opt-out but also guarantee that they commit immediately which View Transitions can't.
|
||||
*
|
||||
* @see {@link https://react.dev/reference/react/ViewTransition `<ViewTransition>` reference documentation}
|
||||
*/
|
||||
export const ViewTransition: ExoticComponent<ViewTransitionProps>;
|
||||
|
||||
/**
|
||||
* @see {@link https://react.dev/reference/react/addTransitionType `addTransitionType` reference documentation}
|
||||
*/
|
||||
export function addTransitionType(type: string): void;
|
||||
|
||||
// @enableFragmentRefs
|
||||
export interface FragmentInstance {}
|
||||
|
||||
export interface FragmentProps {
|
||||
ref?: Ref<FragmentInstance> | undefined;
|
||||
}
|
||||
}
|
||||
4
node_modules/@types/react/compiler-runtime.d.ts
generated
vendored
Normal file
4
node_modules/@types/react/compiler-runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
// Not meant to be used directly
|
||||
// Omitting all exports so that they don't appear in IDE autocomplete.
|
||||
|
||||
export {};
|
||||
144
node_modules/@types/react/experimental.d.ts
generated
vendored
Normal file
144
node_modules/@types/react/experimental.d.ts
generated
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
/**
|
||||
* These are types for things that are present in the `experimental` builds of React but not yet
|
||||
* on a stable build.
|
||||
*
|
||||
* Once they are promoted to stable they can just be moved to the main index file.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react/experimental"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react/experimental'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react/experimental" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared,
|
||||
// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are
|
||||
// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`.
|
||||
//
|
||||
// For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js
|
||||
// is a good place to start looking for details; it generally calls prop validation functions or delegates
|
||||
// all tasks done as part of the render phase (the concurrent part of the React update cycle).
|
||||
//
|
||||
// Suspense-related handling can be found in ReactFiberThrow.js.
|
||||
|
||||
import React = require("./canary");
|
||||
|
||||
export {};
|
||||
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
|
||||
declare module "." {
|
||||
export interface SuspenseProps {
|
||||
/**
|
||||
* The presence of this prop indicates that the content is computationally expensive to render.
|
||||
* In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
|
||||
* @see {@link https://github.com/facebook/react/pull/19936}
|
||||
*/
|
||||
unstable_expectedLoadTime?: number | undefined;
|
||||
}
|
||||
|
||||
export type SuspenseListRevealOrder = "forwards" | "backwards" | "together" | "independent";
|
||||
export type SuspenseListTailMode = "collapsed" | "hidden" | "visible";
|
||||
|
||||
export interface SuspenseListCommonProps {
|
||||
}
|
||||
|
||||
interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
|
||||
/**
|
||||
* Note that SuspenseList require more than one child;
|
||||
* it is a runtime warning to provide only a single child.
|
||||
*
|
||||
* It does, however, allow those children to be wrapped inside a single
|
||||
* level of `<React.Fragment>`.
|
||||
*/
|
||||
children: Iterable<ReactElement> | AsyncIterable<ReactElement>;
|
||||
/**
|
||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
||||
*/
|
||||
revealOrder: "forwards" | "backwards" | "unstable_legacy-backwards";
|
||||
/**
|
||||
* Dictates how unloaded items in a SuspenseList is shown.
|
||||
*
|
||||
* - By default, `SuspenseList` will show all fallbacks in the list.
|
||||
* - `collapsed` shows only the next fallback in the list.
|
||||
* - `hidden` doesn't show any unloaded items.
|
||||
* - `visible` shows all fallbacks in the list.
|
||||
*/
|
||||
tail: SuspenseListTailMode;
|
||||
}
|
||||
|
||||
interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
|
||||
children: ReactNode;
|
||||
/**
|
||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
||||
*/
|
||||
revealOrder: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]> | undefined;
|
||||
/**
|
||||
* The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
|
||||
*/
|
||||
tail?: never;
|
||||
}
|
||||
|
||||
export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps;
|
||||
|
||||
/**
|
||||
* `SuspenseList` helps coordinate many components that can suspend by orchestrating the order
|
||||
* in which these components are revealed to the user.
|
||||
*
|
||||
* When multiple components need to fetch data, this data may arrive in an unpredictable order.
|
||||
* However, if you wrap these items in a `SuspenseList`, React will not show an item in the list
|
||||
* until previous items have been displayed (this behavior is adjustable).
|
||||
*
|
||||
* @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist
|
||||
* @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
|
||||
*/
|
||||
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
|
||||
|
||||
type Reference = object;
|
||||
type TaintableUniqueValue = string | bigint | ArrayBufferView;
|
||||
function experimental_taintUniqueValue(
|
||||
message: string | undefined,
|
||||
lifetime: Reference,
|
||||
value: TaintableUniqueValue,
|
||||
): void;
|
||||
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
|
||||
|
||||
// @enableGestureTransition
|
||||
// Implemented by the specific renderer e.g. `react-dom`.
|
||||
// Keep in mind that augmented interfaces merge their JSDoc so if you put
|
||||
// JSDoc here and in the renderer, the IDE will display both.
|
||||
export interface GestureProvider {}
|
||||
export interface GestureOptions {
|
||||
rangeStart?: number | undefined;
|
||||
rangeEnd?: number | undefined;
|
||||
}
|
||||
/** */
|
||||
export function unstable_startGestureTransition(
|
||||
provider: GestureProvider,
|
||||
scope: () => void,
|
||||
options?: GestureOptions,
|
||||
): () => void;
|
||||
|
||||
// @enableSrcObject
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {
|
||||
srcObject: Blob;
|
||||
}
|
||||
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {
|
||||
srcObject: Blob | MediaSource | MediaStream;
|
||||
}
|
||||
}
|
||||
165
node_modules/@types/react/global.d.ts
generated
vendored
Normal file
165
node_modules/@types/react/global.d.ts
generated
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
/*
|
||||
React projects that don't include the DOM library need these interfaces to compile.
|
||||
React Native applications use React, but there is no DOM available. The JavaScript runtime
|
||||
is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`.
|
||||
|
||||
Warning: all of these interfaces are empty. If you want type definitions for various properties
|
||||
(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json).
|
||||
*/
|
||||
|
||||
interface Event {}
|
||||
interface AnimationEvent extends Event {}
|
||||
interface ClipboardEvent extends Event {}
|
||||
interface CompositionEvent extends Event {}
|
||||
interface DragEvent extends Event {}
|
||||
interface FocusEvent extends Event {}
|
||||
interface InputEvent extends Event {}
|
||||
interface KeyboardEvent extends Event {}
|
||||
interface MouseEvent extends Event {}
|
||||
interface TouchEvent extends Event {}
|
||||
interface PointerEvent extends Event {}
|
||||
interface ToggleEvent extends Event {}
|
||||
interface TransitionEvent extends Event {}
|
||||
interface UIEvent extends Event {}
|
||||
interface WheelEvent extends Event {}
|
||||
|
||||
interface EventTarget {}
|
||||
interface Document {}
|
||||
interface DataTransfer {}
|
||||
interface StyleMedia {}
|
||||
|
||||
interface Element {}
|
||||
interface DocumentFragment {}
|
||||
|
||||
interface HTMLElement extends Element {}
|
||||
interface HTMLAnchorElement extends HTMLElement {}
|
||||
interface HTMLAreaElement extends HTMLElement {}
|
||||
interface HTMLAudioElement extends HTMLElement {}
|
||||
interface HTMLBaseElement extends HTMLElement {}
|
||||
interface HTMLBodyElement extends HTMLElement {}
|
||||
interface HTMLBRElement extends HTMLElement {}
|
||||
interface HTMLButtonElement extends HTMLElement {}
|
||||
interface HTMLCanvasElement extends HTMLElement {}
|
||||
interface HTMLDataElement extends HTMLElement {}
|
||||
interface HTMLDataListElement extends HTMLElement {}
|
||||
interface HTMLDetailsElement extends HTMLElement {}
|
||||
interface HTMLDialogElement extends HTMLElement {}
|
||||
interface HTMLDivElement extends HTMLElement {}
|
||||
interface HTMLDListElement extends HTMLElement {}
|
||||
interface HTMLEmbedElement extends HTMLElement {}
|
||||
interface HTMLFieldSetElement extends HTMLElement {}
|
||||
interface HTMLFormElement extends HTMLElement {}
|
||||
interface HTMLHeadingElement extends HTMLElement {}
|
||||
interface HTMLHeadElement extends HTMLElement {}
|
||||
interface HTMLHRElement extends HTMLElement {}
|
||||
interface HTMLHtmlElement extends HTMLElement {}
|
||||
interface HTMLIFrameElement extends HTMLElement {}
|
||||
interface HTMLImageElement extends HTMLElement {}
|
||||
interface HTMLInputElement extends HTMLElement {}
|
||||
interface HTMLModElement extends HTMLElement {}
|
||||
interface HTMLLabelElement extends HTMLElement {}
|
||||
interface HTMLLegendElement extends HTMLElement {}
|
||||
interface HTMLLIElement extends HTMLElement {}
|
||||
interface HTMLLinkElement extends HTMLElement {}
|
||||
interface HTMLMapElement extends HTMLElement {}
|
||||
interface HTMLMetaElement extends HTMLElement {}
|
||||
interface HTMLMeterElement extends HTMLElement {}
|
||||
interface HTMLObjectElement extends HTMLElement {}
|
||||
interface HTMLOListElement extends HTMLElement {}
|
||||
interface HTMLOptGroupElement extends HTMLElement {}
|
||||
interface HTMLOptionElement extends HTMLElement {}
|
||||
interface HTMLOutputElement extends HTMLElement {}
|
||||
interface HTMLParagraphElement extends HTMLElement {}
|
||||
interface HTMLParamElement extends HTMLElement {}
|
||||
interface HTMLPreElement extends HTMLElement {}
|
||||
interface HTMLProgressElement extends HTMLElement {}
|
||||
interface HTMLQuoteElement extends HTMLElement {}
|
||||
interface HTMLSlotElement extends HTMLElement {}
|
||||
interface HTMLScriptElement extends HTMLElement {}
|
||||
interface HTMLSelectElement extends HTMLElement {}
|
||||
interface HTMLSourceElement extends HTMLElement {}
|
||||
interface HTMLSpanElement extends HTMLElement {}
|
||||
interface HTMLStyleElement extends HTMLElement {}
|
||||
interface HTMLTableElement extends HTMLElement {}
|
||||
interface HTMLTableColElement extends HTMLElement {}
|
||||
interface HTMLTableDataCellElement extends HTMLElement {}
|
||||
interface HTMLTableHeaderCellElement extends HTMLElement {}
|
||||
interface HTMLTableRowElement extends HTMLElement {}
|
||||
interface HTMLTableSectionElement extends HTMLElement {}
|
||||
interface HTMLTemplateElement extends HTMLElement {}
|
||||
interface HTMLTextAreaElement extends HTMLElement {}
|
||||
interface HTMLTimeElement extends HTMLElement {}
|
||||
interface HTMLTitleElement extends HTMLElement {}
|
||||
interface HTMLTrackElement extends HTMLElement {}
|
||||
interface HTMLUListElement extends HTMLElement {}
|
||||
interface HTMLVideoElement extends HTMLElement {}
|
||||
interface HTMLWebViewElement extends HTMLElement {}
|
||||
|
||||
interface SVGElement extends Element {}
|
||||
interface SVGSVGElement extends SVGElement {}
|
||||
interface SVGCircleElement extends SVGElement {}
|
||||
interface SVGClipPathElement extends SVGElement {}
|
||||
interface SVGDefsElement extends SVGElement {}
|
||||
interface SVGDescElement extends SVGElement {}
|
||||
interface SVGEllipseElement extends SVGElement {}
|
||||
interface SVGFEBlendElement extends SVGElement {}
|
||||
interface SVGFEColorMatrixElement extends SVGElement {}
|
||||
interface SVGFEComponentTransferElement extends SVGElement {}
|
||||
interface SVGFECompositeElement extends SVGElement {}
|
||||
interface SVGFEConvolveMatrixElement extends SVGElement {}
|
||||
interface SVGFEDiffuseLightingElement extends SVGElement {}
|
||||
interface SVGFEDisplacementMapElement extends SVGElement {}
|
||||
interface SVGFEDistantLightElement extends SVGElement {}
|
||||
interface SVGFEDropShadowElement extends SVGElement {}
|
||||
interface SVGFEFloodElement extends SVGElement {}
|
||||
interface SVGFEFuncAElement extends SVGElement {}
|
||||
interface SVGFEFuncBElement extends SVGElement {}
|
||||
interface SVGFEFuncGElement extends SVGElement {}
|
||||
interface SVGFEFuncRElement extends SVGElement {}
|
||||
interface SVGFEGaussianBlurElement extends SVGElement {}
|
||||
interface SVGFEImageElement extends SVGElement {}
|
||||
interface SVGFEMergeElement extends SVGElement {}
|
||||
interface SVGFEMergeNodeElement extends SVGElement {}
|
||||
interface SVGFEMorphologyElement extends SVGElement {}
|
||||
interface SVGFEOffsetElement extends SVGElement {}
|
||||
interface SVGFEPointLightElement extends SVGElement {}
|
||||
interface SVGFESpecularLightingElement extends SVGElement {}
|
||||
interface SVGFESpotLightElement extends SVGElement {}
|
||||
interface SVGFETileElement extends SVGElement {}
|
||||
interface SVGFETurbulenceElement extends SVGElement {}
|
||||
interface SVGFilterElement extends SVGElement {}
|
||||
interface SVGForeignObjectElement extends SVGElement {}
|
||||
interface SVGGElement extends SVGElement {}
|
||||
interface SVGImageElement extends SVGElement {}
|
||||
interface SVGLineElement extends SVGElement {}
|
||||
interface SVGLinearGradientElement extends SVGElement {}
|
||||
interface SVGMarkerElement extends SVGElement {}
|
||||
interface SVGMaskElement extends SVGElement {}
|
||||
interface SVGMetadataElement extends SVGElement {}
|
||||
interface SVGPathElement extends SVGElement {}
|
||||
interface SVGPatternElement extends SVGElement {}
|
||||
interface SVGPolygonElement extends SVGElement {}
|
||||
interface SVGPolylineElement extends SVGElement {}
|
||||
interface SVGRadialGradientElement extends SVGElement {}
|
||||
interface SVGRectElement extends SVGElement {}
|
||||
interface SVGSetElement extends SVGElement {}
|
||||
interface SVGStopElement extends SVGElement {}
|
||||
interface SVGSwitchElement extends SVGElement {}
|
||||
interface SVGSymbolElement extends SVGElement {}
|
||||
interface SVGTextElement extends SVGElement {}
|
||||
interface SVGTextPathElement extends SVGElement {}
|
||||
interface SVGTSpanElement extends SVGElement {}
|
||||
interface SVGUseElement extends SVGElement {}
|
||||
interface SVGViewElement extends SVGElement {}
|
||||
|
||||
interface FormData {}
|
||||
interface Text {}
|
||||
interface TouchList {}
|
||||
interface WebGLRenderingContext {}
|
||||
interface WebGL2RenderingContext {}
|
||||
|
||||
interface TrustedHTML {}
|
||||
|
||||
interface Blob {}
|
||||
interface MediaStream {}
|
||||
interface MediaSource {}
|
||||
4301
node_modules/@types/react/index.d.ts
generated
vendored
Normal file
4301
node_modules/@types/react/index.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
45
node_modules/@types/react/jsx-dev-runtime.d.ts
generated
vendored
Normal file
45
node_modules/@types/react/jsx-dev-runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
import * as React from "./";
|
||||
export { Fragment } from "./";
|
||||
|
||||
export namespace JSX {
|
||||
type ElementType = React.JSX.ElementType;
|
||||
interface Element extends React.JSX.Element {}
|
||||
interface ElementClass extends React.JSX.ElementClass {}
|
||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
||||
}
|
||||
|
||||
export interface JSXSource {
|
||||
/**
|
||||
* The source file where the element originates from.
|
||||
*/
|
||||
fileName?: string | undefined;
|
||||
|
||||
/**
|
||||
* The line number where the element was created.
|
||||
*/
|
||||
lineNumber?: number | undefined;
|
||||
|
||||
/**
|
||||
* The column number where the element was created.
|
||||
*/
|
||||
columnNumber?: number | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsxDEV(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key: React.Key | undefined,
|
||||
isStatic: boolean,
|
||||
source?: JSXSource,
|
||||
self?: unknown,
|
||||
): React.ReactElement;
|
||||
36
node_modules/@types/react/jsx-runtime.d.ts
generated
vendored
Normal file
36
node_modules/@types/react/jsx-runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import * as React from "./";
|
||||
export { Fragment } from "./";
|
||||
|
||||
export namespace JSX {
|
||||
type ElementType = React.JSX.ElementType;
|
||||
interface Element extends React.JSX.Element {}
|
||||
interface ElementClass extends React.JSX.ElementClass {}
|
||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsx(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key?: React.Key,
|
||||
): React.ReactElement;
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsxs(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key?: React.Key,
|
||||
): React.ReactElement;
|
||||
210
node_modules/@types/react/package.json
generated
vendored
Normal file
210
node_modules/@types/react/package.json
generated
vendored
Normal file
@@ -0,0 +1,210 @@
|
||||
{
|
||||
"name": "@types/react",
|
||||
"version": "19.2.2",
|
||||
"description": "TypeScript definitions for react",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Asana",
|
||||
"url": "https://asana.com"
|
||||
},
|
||||
{
|
||||
"name": "AssureSign",
|
||||
"url": "http://www.assuresign.com"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft",
|
||||
"url": "https://microsoft.com"
|
||||
},
|
||||
{
|
||||
"name": "John Reilly",
|
||||
"githubUsername": "johnnyreilly",
|
||||
"url": "https://github.com/johnnyreilly"
|
||||
},
|
||||
{
|
||||
"name": "Benoit Benezech",
|
||||
"githubUsername": "bbenezech",
|
||||
"url": "https://github.com/bbenezech"
|
||||
},
|
||||
{
|
||||
"name": "Patricio Zavolinsky",
|
||||
"githubUsername": "pzavolinsky",
|
||||
"url": "https://github.com/pzavolinsky"
|
||||
},
|
||||
{
|
||||
"name": "Eric Anderson",
|
||||
"githubUsername": "ericanderson",
|
||||
"url": "https://github.com/ericanderson"
|
||||
},
|
||||
{
|
||||
"name": "Dovydas Navickas",
|
||||
"githubUsername": "DovydasNavickas",
|
||||
"url": "https://github.com/DovydasNavickas"
|
||||
},
|
||||
{
|
||||
"name": "Josh Rutherford",
|
||||
"githubUsername": "theruther4d",
|
||||
"url": "https://github.com/theruther4d"
|
||||
},
|
||||
{
|
||||
"name": "Guilherme Hübner",
|
||||
"githubUsername": "guilhermehubner",
|
||||
"url": "https://github.com/guilhermehubner"
|
||||
},
|
||||
{
|
||||
"name": "Ferdy Budhidharma",
|
||||
"githubUsername": "ferdaber",
|
||||
"url": "https://github.com/ferdaber"
|
||||
},
|
||||
{
|
||||
"name": "Johann Rakotoharisoa",
|
||||
"githubUsername": "jrakotoharisoa",
|
||||
"url": "https://github.com/jrakotoharisoa"
|
||||
},
|
||||
{
|
||||
"name": "Olivier Pascal",
|
||||
"githubUsername": "pascaloliv",
|
||||
"url": "https://github.com/pascaloliv"
|
||||
},
|
||||
{
|
||||
"name": "Martin Hochel",
|
||||
"githubUsername": "hotell",
|
||||
"url": "https://github.com/hotell"
|
||||
},
|
||||
{
|
||||
"name": "Frank Li",
|
||||
"githubUsername": "franklixuefei",
|
||||
"url": "https://github.com/franklixuefei"
|
||||
},
|
||||
{
|
||||
"name": "Jessica Franco",
|
||||
"githubUsername": "Jessidhia",
|
||||
"url": "https://github.com/Jessidhia"
|
||||
},
|
||||
{
|
||||
"name": "Saransh Kataria",
|
||||
"githubUsername": "saranshkataria",
|
||||
"url": "https://github.com/saranshkataria"
|
||||
},
|
||||
{
|
||||
"name": "Kanitkorn Sujautra",
|
||||
"githubUsername": "lukyth",
|
||||
"url": "https://github.com/lukyth"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Silbermann",
|
||||
"githubUsername": "eps1lon",
|
||||
"url": "https://github.com/eps1lon"
|
||||
},
|
||||
{
|
||||
"name": "Kyle Scully",
|
||||
"githubUsername": "zieka",
|
||||
"url": "https://github.com/zieka"
|
||||
},
|
||||
{
|
||||
"name": "Cong Zhang",
|
||||
"githubUsername": "dancerphil",
|
||||
"url": "https://github.com/dancerphil"
|
||||
},
|
||||
{
|
||||
"name": "Dimitri Mitropoulos",
|
||||
"githubUsername": "dimitropoulos",
|
||||
"url": "https://github.com/dimitropoulos"
|
||||
},
|
||||
{
|
||||
"name": "JongChan Choi",
|
||||
"githubUsername": "disjukr",
|
||||
"url": "https://github.com/disjukr"
|
||||
},
|
||||
{
|
||||
"name": "Victor Magalhães",
|
||||
"githubUsername": "vhfmag",
|
||||
"url": "https://github.com/vhfmag"
|
||||
},
|
||||
{
|
||||
"name": "Priyanshu Rav",
|
||||
"githubUsername": "priyanshurav",
|
||||
"url": "https://github.com/priyanshurav"
|
||||
},
|
||||
{
|
||||
"name": "Dmitry Semigradsky",
|
||||
"githubUsername": "Semigradsky",
|
||||
"url": "https://github.com/Semigradsky"
|
||||
},
|
||||
{
|
||||
"name": "Matt Pocock",
|
||||
"githubUsername": "mattpocock",
|
||||
"url": "https://github.com/mattpocock"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"typesVersions": {
|
||||
"<=5.0": {
|
||||
"*": [
|
||||
"ts5.0/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/index.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./index.d.ts"
|
||||
}
|
||||
},
|
||||
"./canary": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/canary.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./canary.d.ts"
|
||||
}
|
||||
},
|
||||
"./compiler-runtime": {
|
||||
"types": {
|
||||
"default": "./compiler-runtime.d.ts"
|
||||
}
|
||||
},
|
||||
"./experimental": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/experimental.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./experimental.d.ts"
|
||||
}
|
||||
},
|
||||
"./jsx-runtime": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/jsx-runtime.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./jsx-runtime.d.ts"
|
||||
}
|
||||
},
|
||||
"./jsx-dev-runtime": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/jsx-dev-runtime.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./jsx-dev-runtime.d.ts"
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/react"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"csstype": "^3.0.2"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "68c52e24d44da5913d4220a0dd3380ca866be4e58a724ee668fa152a7b358e72",
|
||||
"typeScriptVersion": "5.2"
|
||||
}
|
||||
120
node_modules/@types/react/ts5.0/canary.d.ts
generated
vendored
Normal file
120
node_modules/@types/react/ts5.0/canary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
/**
|
||||
* These are types for things that are present in the React `canary` release channel.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react/canary"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react/canary'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react/canary" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/main/packages/react/src/React.js to see how the exports are declared,
|
||||
|
||||
import React = require(".");
|
||||
|
||||
export {};
|
||||
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
|
||||
declare module "." {
|
||||
export function unstable_useCacheRefresh(): () => void;
|
||||
|
||||
// @enableViewTransition
|
||||
export interface ViewTransitionInstance {
|
||||
/**
|
||||
* The {@link ViewTransitionProps name} that was used in the corresponding {@link ViewTransition} component or `"auto"` if the `name` prop was omitted.
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type ViewTransitionClassPerType = Record<"default" | (string & {}), "none" | "auto" | (string & {})>;
|
||||
export type ViewTransitionClass = ViewTransitionClassPerType | ViewTransitionClassPerType[string];
|
||||
|
||||
export interface ViewTransitionProps {
|
||||
children?: ReactNode | undefined;
|
||||
/**
|
||||
* Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node.
|
||||
*/
|
||||
default?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is mounted and there's no other with the same name being deleted.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
enter?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is unmounted and there's no other with the same name being deleted.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
exit?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* "auto" will automatically assign a view-transition-name to the inner DOM node.
|
||||
* That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
|
||||
*
|
||||
* A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the `<ViewTransition>` component preserves the same name so this example cross-fades between the DOM nodes instead of causing an exit and enter.
|
||||
* @default "auto"
|
||||
*/
|
||||
name?: "auto" | (string & {}) | undefined;
|
||||
/**
|
||||
* The `<ViewTransition>` or its parent Component is mounted and there's no other `<ViewTransition>` with the same name being deleted.
|
||||
*/
|
||||
onEnter?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
/**
|
||||
* The `<ViewTransition>` or its parent Component is unmounted and there's no other `<ViewTransition>` with the same name being deleted.
|
||||
*/
|
||||
onExit?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
/**
|
||||
* This `<ViewTransition>` is being mounted and another `<ViewTransition>` instance with the same name is being unmounted elsewhere.
|
||||
*/
|
||||
onShare?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
/**
|
||||
* The content of `<ViewTransition>` has changed either due to DOM mutations or because an inner child `<ViewTransition>` has resized.
|
||||
*/
|
||||
onUpdate?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
ref?: Ref<ViewTransitionInstance> | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if this `<ViewTransition>` is being mounted and another instance with the same name is being unmounted elsewhere.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
share?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if the content of this `<ViewTransition>` has changed either due to DOM mutations or because an inner child has resized.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
update?: ViewTransitionClass | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opt-in for using {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API View Transitions} in React.
|
||||
* View Transitions only trigger for async updates like {@link startTransition}, {@link useDeferredValue}, Actions or <{@link Suspense}> revealing from fallback to content.
|
||||
* Synchronous updates provide an opt-out but also guarantee that they commit immediately which View Transitions can't.
|
||||
*
|
||||
* @see {@link https://react.dev/reference/react/ViewTransition `<ViewTransition>` reference documentation}
|
||||
*/
|
||||
export const ViewTransition: ExoticComponent<ViewTransitionProps>;
|
||||
|
||||
/**
|
||||
* @see {@link https://react.dev/reference/react/addTransitionType `addTransitionType` reference documentation}
|
||||
*/
|
||||
export function addTransitionType(type: string): void;
|
||||
|
||||
// @enableFragmentRefs
|
||||
export interface FragmentInstance {}
|
||||
|
||||
export interface FragmentProps {
|
||||
ref?: Ref<FragmentInstance> | undefined;
|
||||
}
|
||||
}
|
||||
144
node_modules/@types/react/ts5.0/experimental.d.ts
generated
vendored
Normal file
144
node_modules/@types/react/ts5.0/experimental.d.ts
generated
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
/**
|
||||
* These are types for things that are present in the `experimental` builds of React but not yet
|
||||
* on a stable build.
|
||||
*
|
||||
* Once they are promoted to stable they can just be moved to the main index file.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react/experimental"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react/experimental'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react/experimental" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared,
|
||||
// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are
|
||||
// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`.
|
||||
//
|
||||
// For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js
|
||||
// is a good place to start looking for details; it generally calls prop validation functions or delegates
|
||||
// all tasks done as part of the render phase (the concurrent part of the React update cycle).
|
||||
//
|
||||
// Suspense-related handling can be found in ReactFiberThrow.js.
|
||||
|
||||
import React = require("./canary");
|
||||
|
||||
export {};
|
||||
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
|
||||
declare module "." {
|
||||
export interface SuspenseProps {
|
||||
/**
|
||||
* The presence of this prop indicates that the content is computationally expensive to render.
|
||||
* In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
|
||||
* @see {@link https://github.com/facebook/react/pull/19936}
|
||||
*/
|
||||
unstable_expectedLoadTime?: number | undefined;
|
||||
}
|
||||
|
||||
export type SuspenseListRevealOrder = "forwards" | "backwards" | "together" | "independent";
|
||||
export type SuspenseListTailMode = "collapsed" | "hidden" | "visible";
|
||||
|
||||
export interface SuspenseListCommonProps {
|
||||
}
|
||||
|
||||
interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
|
||||
/**
|
||||
* Note that SuspenseList require more than one child;
|
||||
* it is a runtime warning to provide only a single child.
|
||||
*
|
||||
* It does, however, allow those children to be wrapped inside a single
|
||||
* level of `<React.Fragment>`.
|
||||
*/
|
||||
children: Iterable<ReactElement> | AsyncIterable<ReactElement>;
|
||||
/**
|
||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
||||
*/
|
||||
revealOrder: "forwards" | "backwards" | "unstable_legacy-backwards";
|
||||
/**
|
||||
* Dictates how unloaded items in a SuspenseList is shown.
|
||||
*
|
||||
* - By default, `SuspenseList` will show all fallbacks in the list.
|
||||
* - `collapsed` shows only the next fallback in the list.
|
||||
* - `hidden` doesn't show any unloaded items.
|
||||
* - `visible` shows all fallbacks in the list.
|
||||
*/
|
||||
tail: SuspenseListTailMode;
|
||||
}
|
||||
|
||||
interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
|
||||
children: ReactNode;
|
||||
/**
|
||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
||||
*/
|
||||
revealOrder: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]> | undefined;
|
||||
/**
|
||||
* The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
|
||||
*/
|
||||
tail?: never;
|
||||
}
|
||||
|
||||
export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps;
|
||||
|
||||
/**
|
||||
* `SuspenseList` helps coordinate many components that can suspend by orchestrating the order
|
||||
* in which these components are revealed to the user.
|
||||
*
|
||||
* When multiple components need to fetch data, this data may arrive in an unpredictable order.
|
||||
* However, if you wrap these items in a `SuspenseList`, React will not show an item in the list
|
||||
* until previous items have been displayed (this behavior is adjustable).
|
||||
*
|
||||
* @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist
|
||||
* @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
|
||||
*/
|
||||
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
|
||||
|
||||
type Reference = object;
|
||||
type TaintableUniqueValue = string | bigint | ArrayBufferView;
|
||||
function experimental_taintUniqueValue(
|
||||
message: string | undefined,
|
||||
lifetime: Reference,
|
||||
value: TaintableUniqueValue,
|
||||
): void;
|
||||
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
|
||||
|
||||
// @enableGestureTransition
|
||||
// Implemented by the specific renderer e.g. `react-dom`.
|
||||
// Keep in mind that augmented interfaces merge their JSDoc so if you put
|
||||
// JSDoc here and in the renderer, the IDE will display both.
|
||||
export interface GestureProvider {}
|
||||
export interface GestureOptions {
|
||||
rangeStart?: number | undefined;
|
||||
rangeEnd?: number | undefined;
|
||||
}
|
||||
/** */
|
||||
export function unstable_startGestureTransition(
|
||||
provider: GestureProvider,
|
||||
scope: () => void,
|
||||
options?: GestureOptions,
|
||||
): () => void;
|
||||
|
||||
// @enableSrcObject
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {
|
||||
srcObject: Blob;
|
||||
}
|
||||
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {
|
||||
srcObject: Blob | MediaSource | MediaStream;
|
||||
}
|
||||
}
|
||||
165
node_modules/@types/react/ts5.0/global.d.ts
generated
vendored
Normal file
165
node_modules/@types/react/ts5.0/global.d.ts
generated
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
/*
|
||||
React projects that don't include the DOM library need these interfaces to compile.
|
||||
React Native applications use React, but there is no DOM available. The JavaScript runtime
|
||||
is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`.
|
||||
|
||||
Warning: all of these interfaces are empty. If you want type definitions for various properties
|
||||
(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json).
|
||||
*/
|
||||
|
||||
interface Event {}
|
||||
interface AnimationEvent extends Event {}
|
||||
interface ClipboardEvent extends Event {}
|
||||
interface CompositionEvent extends Event {}
|
||||
interface DragEvent extends Event {}
|
||||
interface FocusEvent extends Event {}
|
||||
interface InputEvent extends Event {}
|
||||
interface KeyboardEvent extends Event {}
|
||||
interface MouseEvent extends Event {}
|
||||
interface TouchEvent extends Event {}
|
||||
interface PointerEvent extends Event {}
|
||||
interface ToggleEvent extends Event {}
|
||||
interface TransitionEvent extends Event {}
|
||||
interface UIEvent extends Event {}
|
||||
interface WheelEvent extends Event {}
|
||||
|
||||
interface EventTarget {}
|
||||
interface Document {}
|
||||
interface DataTransfer {}
|
||||
interface StyleMedia {}
|
||||
|
||||
interface Element {}
|
||||
interface DocumentFragment {}
|
||||
|
||||
interface HTMLElement extends Element {}
|
||||
interface HTMLAnchorElement extends HTMLElement {}
|
||||
interface HTMLAreaElement extends HTMLElement {}
|
||||
interface HTMLAudioElement extends HTMLElement {}
|
||||
interface HTMLBaseElement extends HTMLElement {}
|
||||
interface HTMLBodyElement extends HTMLElement {}
|
||||
interface HTMLBRElement extends HTMLElement {}
|
||||
interface HTMLButtonElement extends HTMLElement {}
|
||||
interface HTMLCanvasElement extends HTMLElement {}
|
||||
interface HTMLDataElement extends HTMLElement {}
|
||||
interface HTMLDataListElement extends HTMLElement {}
|
||||
interface HTMLDetailsElement extends HTMLElement {}
|
||||
interface HTMLDialogElement extends HTMLElement {}
|
||||
interface HTMLDivElement extends HTMLElement {}
|
||||
interface HTMLDListElement extends HTMLElement {}
|
||||
interface HTMLEmbedElement extends HTMLElement {}
|
||||
interface HTMLFieldSetElement extends HTMLElement {}
|
||||
interface HTMLFormElement extends HTMLElement {}
|
||||
interface HTMLHeadingElement extends HTMLElement {}
|
||||
interface HTMLHeadElement extends HTMLElement {}
|
||||
interface HTMLHRElement extends HTMLElement {}
|
||||
interface HTMLHtmlElement extends HTMLElement {}
|
||||
interface HTMLIFrameElement extends HTMLElement {}
|
||||
interface HTMLImageElement extends HTMLElement {}
|
||||
interface HTMLInputElement extends HTMLElement {}
|
||||
interface HTMLModElement extends HTMLElement {}
|
||||
interface HTMLLabelElement extends HTMLElement {}
|
||||
interface HTMLLegendElement extends HTMLElement {}
|
||||
interface HTMLLIElement extends HTMLElement {}
|
||||
interface HTMLLinkElement extends HTMLElement {}
|
||||
interface HTMLMapElement extends HTMLElement {}
|
||||
interface HTMLMetaElement extends HTMLElement {}
|
||||
interface HTMLMeterElement extends HTMLElement {}
|
||||
interface HTMLObjectElement extends HTMLElement {}
|
||||
interface HTMLOListElement extends HTMLElement {}
|
||||
interface HTMLOptGroupElement extends HTMLElement {}
|
||||
interface HTMLOptionElement extends HTMLElement {}
|
||||
interface HTMLOutputElement extends HTMLElement {}
|
||||
interface HTMLParagraphElement extends HTMLElement {}
|
||||
interface HTMLParamElement extends HTMLElement {}
|
||||
interface HTMLPreElement extends HTMLElement {}
|
||||
interface HTMLProgressElement extends HTMLElement {}
|
||||
interface HTMLQuoteElement extends HTMLElement {}
|
||||
interface HTMLSlotElement extends HTMLElement {}
|
||||
interface HTMLScriptElement extends HTMLElement {}
|
||||
interface HTMLSelectElement extends HTMLElement {}
|
||||
interface HTMLSourceElement extends HTMLElement {}
|
||||
interface HTMLSpanElement extends HTMLElement {}
|
||||
interface HTMLStyleElement extends HTMLElement {}
|
||||
interface HTMLTableElement extends HTMLElement {}
|
||||
interface HTMLTableColElement extends HTMLElement {}
|
||||
interface HTMLTableDataCellElement extends HTMLElement {}
|
||||
interface HTMLTableHeaderCellElement extends HTMLElement {}
|
||||
interface HTMLTableRowElement extends HTMLElement {}
|
||||
interface HTMLTableSectionElement extends HTMLElement {}
|
||||
interface HTMLTemplateElement extends HTMLElement {}
|
||||
interface HTMLTextAreaElement extends HTMLElement {}
|
||||
interface HTMLTimeElement extends HTMLElement {}
|
||||
interface HTMLTitleElement extends HTMLElement {}
|
||||
interface HTMLTrackElement extends HTMLElement {}
|
||||
interface HTMLUListElement extends HTMLElement {}
|
||||
interface HTMLVideoElement extends HTMLElement {}
|
||||
interface HTMLWebViewElement extends HTMLElement {}
|
||||
|
||||
interface SVGElement extends Element {}
|
||||
interface SVGSVGElement extends SVGElement {}
|
||||
interface SVGCircleElement extends SVGElement {}
|
||||
interface SVGClipPathElement extends SVGElement {}
|
||||
interface SVGDefsElement extends SVGElement {}
|
||||
interface SVGDescElement extends SVGElement {}
|
||||
interface SVGEllipseElement extends SVGElement {}
|
||||
interface SVGFEBlendElement extends SVGElement {}
|
||||
interface SVGFEColorMatrixElement extends SVGElement {}
|
||||
interface SVGFEComponentTransferElement extends SVGElement {}
|
||||
interface SVGFECompositeElement extends SVGElement {}
|
||||
interface SVGFEConvolveMatrixElement extends SVGElement {}
|
||||
interface SVGFEDiffuseLightingElement extends SVGElement {}
|
||||
interface SVGFEDisplacementMapElement extends SVGElement {}
|
||||
interface SVGFEDistantLightElement extends SVGElement {}
|
||||
interface SVGFEDropShadowElement extends SVGElement {}
|
||||
interface SVGFEFloodElement extends SVGElement {}
|
||||
interface SVGFEFuncAElement extends SVGElement {}
|
||||
interface SVGFEFuncBElement extends SVGElement {}
|
||||
interface SVGFEFuncGElement extends SVGElement {}
|
||||
interface SVGFEFuncRElement extends SVGElement {}
|
||||
interface SVGFEGaussianBlurElement extends SVGElement {}
|
||||
interface SVGFEImageElement extends SVGElement {}
|
||||
interface SVGFEMergeElement extends SVGElement {}
|
||||
interface SVGFEMergeNodeElement extends SVGElement {}
|
||||
interface SVGFEMorphologyElement extends SVGElement {}
|
||||
interface SVGFEOffsetElement extends SVGElement {}
|
||||
interface SVGFEPointLightElement extends SVGElement {}
|
||||
interface SVGFESpecularLightingElement extends SVGElement {}
|
||||
interface SVGFESpotLightElement extends SVGElement {}
|
||||
interface SVGFETileElement extends SVGElement {}
|
||||
interface SVGFETurbulenceElement extends SVGElement {}
|
||||
interface SVGFilterElement extends SVGElement {}
|
||||
interface SVGForeignObjectElement extends SVGElement {}
|
||||
interface SVGGElement extends SVGElement {}
|
||||
interface SVGImageElement extends SVGElement {}
|
||||
interface SVGLineElement extends SVGElement {}
|
||||
interface SVGLinearGradientElement extends SVGElement {}
|
||||
interface SVGMarkerElement extends SVGElement {}
|
||||
interface SVGMaskElement extends SVGElement {}
|
||||
interface SVGMetadataElement extends SVGElement {}
|
||||
interface SVGPathElement extends SVGElement {}
|
||||
interface SVGPatternElement extends SVGElement {}
|
||||
interface SVGPolygonElement extends SVGElement {}
|
||||
interface SVGPolylineElement extends SVGElement {}
|
||||
interface SVGRadialGradientElement extends SVGElement {}
|
||||
interface SVGRectElement extends SVGElement {}
|
||||
interface SVGSetElement extends SVGElement {}
|
||||
interface SVGStopElement extends SVGElement {}
|
||||
interface SVGSwitchElement extends SVGElement {}
|
||||
interface SVGSymbolElement extends SVGElement {}
|
||||
interface SVGTextElement extends SVGElement {}
|
||||
interface SVGTextPathElement extends SVGElement {}
|
||||
interface SVGTSpanElement extends SVGElement {}
|
||||
interface SVGUseElement extends SVGElement {}
|
||||
interface SVGViewElement extends SVGElement {}
|
||||
|
||||
interface FormData {}
|
||||
interface Text {}
|
||||
interface TouchList {}
|
||||
interface WebGLRenderingContext {}
|
||||
interface WebGL2RenderingContext {}
|
||||
|
||||
interface TrustedHTML {}
|
||||
|
||||
interface Blob {}
|
||||
interface MediaStream {}
|
||||
interface MediaSource {}
|
||||
4288
node_modules/@types/react/ts5.0/index.d.ts
generated
vendored
Normal file
4288
node_modules/@types/react/ts5.0/index.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
44
node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts
generated
vendored
Normal file
44
node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import * as React from "./";
|
||||
export { Fragment } from "./";
|
||||
|
||||
export namespace JSX {
|
||||
interface Element extends React.JSX.Element {}
|
||||
interface ElementClass extends React.JSX.ElementClass {}
|
||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
||||
}
|
||||
|
||||
export interface JSXSource {
|
||||
/**
|
||||
* The source file where the element originates from.
|
||||
*/
|
||||
fileName?: string | undefined;
|
||||
|
||||
/**
|
||||
* The line number where the element was created.
|
||||
*/
|
||||
lineNumber?: number | undefined;
|
||||
|
||||
/**
|
||||
* The column number where the element was created.
|
||||
*/
|
||||
columnNumber?: number | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsxDEV(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key: React.Key | undefined,
|
||||
isStatic: boolean,
|
||||
source?: JSXSource,
|
||||
self?: unknown,
|
||||
): React.ReactElement;
|
||||
35
node_modules/@types/react/ts5.0/jsx-runtime.d.ts
generated
vendored
Normal file
35
node_modules/@types/react/ts5.0/jsx-runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import * as React from "./";
|
||||
export { Fragment } from "./";
|
||||
|
||||
export namespace JSX {
|
||||
interface Element extends React.JSX.Element {}
|
||||
interface ElementClass extends React.JSX.ElementClass {}
|
||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsx(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key?: React.Key,
|
||||
): React.ReactElement;
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsxs(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key?: React.Key,
|
||||
): React.ReactElement;
|
||||
20
node_modules/autoprefixer/LICENSE
generated
vendored
Normal file
20
node_modules/autoprefixer/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2013 Andrey Sitnik <andrey@sitnik.ru>
|
||||
|
||||
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.
|
||||
66
node_modules/autoprefixer/README.md
generated
vendored
Normal file
66
node_modules/autoprefixer/README.md
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
# Autoprefixer [![Cult Of Martians][cult-img]][cult]
|
||||
|
||||
<img align="right" width="94" height="71"
|
||||
src="https://postcss.github.io/autoprefixer/logo.svg"
|
||||
title="Autoprefixer logo by Anton Lovchikov">
|
||||
|
||||
[PostCSS] plugin to parse CSS and add vendor prefixes to CSS rules using values
|
||||
from [Can I Use]. It is recommended by Google and used in Twitter and Alibaba.
|
||||
|
||||
Write your CSS rules without vendor prefixes (in fact, forget about them
|
||||
entirely):
|
||||
|
||||
```css
|
||||
::placeholder {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.image {
|
||||
background-image: url(image@1x.png);
|
||||
}
|
||||
@media (min-resolution: 2dppx) {
|
||||
.image {
|
||||
background-image: url(image@2x.png);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Autoprefixer will use the data based on current browser popularity and property
|
||||
support to apply prefixes for you. You can try the [interactive demo]
|
||||
of Autoprefixer.
|
||||
|
||||
```css
|
||||
::-moz-placeholder {
|
||||
color: gray;
|
||||
}
|
||||
::placeholder {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.image {
|
||||
background-image: url(image@1x.png);
|
||||
}
|
||||
@media (-webkit-min-device-pixel-ratio: 2),
|
||||
(min-resolution: 2dppx) {
|
||||
.image {
|
||||
background-image: url(image@2x.png);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Twitter account for news and releases: [@autoprefixer].
|
||||
|
||||
<a href="https://evilmartians.com/?utm_source=autoprefixer">
|
||||
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54">
|
||||
</a>
|
||||
|
||||
[interactive demo]: https://autoprefixer.github.io/
|
||||
[@autoprefixer]: https://twitter.com/autoprefixer
|
||||
[Can I Use]: https://caniuse.com/
|
||||
[cult-img]: https://cultofmartians.com/assets/badges/badge.svg
|
||||
[PostCSS]: https://github.com/postcss/postcss
|
||||
[cult]: https://cultofmartians.com/tasks/autoprefixer-grid.html
|
||||
|
||||
|
||||
## Docs
|
||||
Read full docs **[here](https://github.com/postcss/autoprefixer#readme)**.
|
||||
22
node_modules/autoprefixer/bin/autoprefixer
generated
vendored
Executable file
22
node_modules/autoprefixer/bin/autoprefixer
generated
vendored
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
let mode = process.argv[2]
|
||||
if (mode === '--info') {
|
||||
process.stdout.write(require('../')().info() + '\n')
|
||||
} else if (mode === '--version') {
|
||||
process.stdout.write(
|
||||
'autoprefixer ' + require('../package.json').version + '\n'
|
||||
)
|
||||
} else {
|
||||
process.stdout.write(
|
||||
'autoprefix\n' +
|
||||
'\n' +
|
||||
'Options:\n' +
|
||||
' --info Show target browsers and used prefixes\n' +
|
||||
' --version Show version number\n' +
|
||||
' --help Show help\n' +
|
||||
'\n' +
|
||||
'Usage:\n' +
|
||||
' autoprefixer --info\n'
|
||||
)
|
||||
}
|
||||
1136
node_modules/autoprefixer/data/prefixes.js
generated
vendored
Normal file
1136
node_modules/autoprefixer/data/prefixes.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
35
node_modules/autoprefixer/lib/at-rule.js
generated
vendored
Normal file
35
node_modules/autoprefixer/lib/at-rule.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
let Prefixer = require('./prefixer')
|
||||
|
||||
class AtRule extends Prefixer {
|
||||
/**
|
||||
* Clone and add prefixes for at-rule
|
||||
*/
|
||||
add(rule, prefix) {
|
||||
let prefixed = prefix + rule.name
|
||||
|
||||
let already = rule.parent.some(
|
||||
i => i.name === prefixed && i.params === rule.params
|
||||
)
|
||||
if (already) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
let cloned = this.clone(rule, { name: prefixed })
|
||||
return rule.parent.insertBefore(rule, cloned)
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone node with prefixes
|
||||
*/
|
||||
process(node) {
|
||||
let parent = this.parentPrefix(node)
|
||||
|
||||
for (let prefix of this.prefixes) {
|
||||
if (!parent || parent === prefix) {
|
||||
this.add(node, prefix)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AtRule
|
||||
95
node_modules/autoprefixer/lib/autoprefixer.d.ts
generated
vendored
Normal file
95
node_modules/autoprefixer/lib/autoprefixer.d.ts
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
import { Plugin } from 'postcss'
|
||||
import { Stats } from 'browserslist'
|
||||
|
||||
declare function autoprefixer<T extends string[]>(
|
||||
...args: [...T, autoprefixer.Options]
|
||||
): Plugin & autoprefixer.ExportedAPI
|
||||
|
||||
declare function autoprefixer(
|
||||
browsers: string[],
|
||||
options?: autoprefixer.Options
|
||||
): Plugin & autoprefixer.ExportedAPI
|
||||
|
||||
declare function autoprefixer(
|
||||
options?: autoprefixer.Options
|
||||
): Plugin & autoprefixer.ExportedAPI
|
||||
|
||||
declare namespace autoprefixer {
|
||||
type GridValue = 'autoplace' | 'no-autoplace'
|
||||
|
||||
interface Options {
|
||||
/** environment for `Browserslist` */
|
||||
env?: string
|
||||
|
||||
/** should Autoprefixer use Visual Cascade, if CSS is uncompressed */
|
||||
cascade?: boolean
|
||||
|
||||
/** should Autoprefixer add prefixes. */
|
||||
add?: boolean
|
||||
|
||||
/** should Autoprefixer [remove outdated] prefixes */
|
||||
remove?: boolean
|
||||
|
||||
/** should Autoprefixer add prefixes for @supports parameters. */
|
||||
supports?: boolean
|
||||
|
||||
/** should Autoprefixer add prefixes for flexbox properties */
|
||||
flexbox?: boolean | 'no-2009'
|
||||
|
||||
/** should Autoprefixer add IE 10-11 prefixes for Grid Layout properties */
|
||||
grid?: boolean | GridValue
|
||||
|
||||
/** custom usage statistics for > 10% in my stats browsers query */
|
||||
stats?: Stats
|
||||
|
||||
/**
|
||||
* list of queries for target browsers.
|
||||
* Try to not use it.
|
||||
* The best practice is to use `.browserslistrc` config or `browserslist` key in `package.json`
|
||||
* to share target browsers with Babel, ESLint and Stylelint
|
||||
*/
|
||||
overrideBrowserslist?: string | string[]
|
||||
|
||||
/** do not raise error on unknown browser version in `Browserslist` config. */
|
||||
ignoreUnknownVersions?: boolean
|
||||
}
|
||||
|
||||
interface ExportedAPI {
|
||||
/** Autoprefixer data */
|
||||
data: {
|
||||
browsers: { [browser: string]: object | undefined }
|
||||
prefixes: { [prefixName: string]: object | undefined }
|
||||
}
|
||||
|
||||
/** Autoprefixer default browsers */
|
||||
defaults: string[]
|
||||
|
||||
/** Inspect with default Autoprefixer */
|
||||
info(options?: { from?: string }): string
|
||||
|
||||
options: Options
|
||||
|
||||
browsers: string | string[]
|
||||
}
|
||||
|
||||
/** Autoprefixer data */
|
||||
let data: ExportedAPI['data']
|
||||
|
||||
/** Autoprefixer default browsers */
|
||||
let defaults: ExportedAPI['defaults']
|
||||
|
||||
/** Inspect with default Autoprefixer */
|
||||
let info: ExportedAPI['info']
|
||||
|
||||
let postcss: true
|
||||
}
|
||||
|
||||
declare global {
|
||||
namespace NodeJS {
|
||||
interface ProcessEnv {
|
||||
AUTOPREFIXER_GRID?: autoprefixer.GridValue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export = autoprefixer
|
||||
164
node_modules/autoprefixer/lib/autoprefixer.js
generated
vendored
Normal file
164
node_modules/autoprefixer/lib/autoprefixer.js
generated
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
let browserslist = require('browserslist')
|
||||
let { agents } = require('caniuse-lite/dist/unpacker/agents')
|
||||
let pico = require('picocolors')
|
||||
|
||||
let dataPrefixes = require('../data/prefixes')
|
||||
let Browsers = require('./browsers')
|
||||
let getInfo = require('./info')
|
||||
let Prefixes = require('./prefixes')
|
||||
|
||||
let autoprefixerData = { browsers: agents, prefixes: dataPrefixes }
|
||||
|
||||
const WARNING =
|
||||
'\n' +
|
||||
' Replace Autoprefixer `browsers` option to Browserslist config.\n' +
|
||||
' Use `browserslist` key in `package.json` or `.browserslistrc` file.\n' +
|
||||
'\n' +
|
||||
' Using `browsers` option can cause errors. Browserslist config can\n' +
|
||||
' be used for Babel, Autoprefixer, postcss-normalize and other tools.\n' +
|
||||
'\n' +
|
||||
' If you really need to use option, rename it to `overrideBrowserslist`.\n' +
|
||||
'\n' +
|
||||
' Learn more at:\n' +
|
||||
' https://github.com/browserslist/browserslist#readme\n' +
|
||||
' https://twitter.com/browserslist\n' +
|
||||
'\n'
|
||||
|
||||
function isPlainObject(obj) {
|
||||
return Object.prototype.toString.apply(obj) === '[object Object]'
|
||||
}
|
||||
|
||||
let cache = new Map()
|
||||
|
||||
function timeCapsule(result, prefixes) {
|
||||
if (prefixes.browsers.selected.length === 0) {
|
||||
return
|
||||
}
|
||||
if (prefixes.add.selectors.length > 0) {
|
||||
return
|
||||
}
|
||||
if (Object.keys(prefixes.add).length > 2) {
|
||||
return
|
||||
}
|
||||
/* c8 ignore next 11 */
|
||||
result.warn(
|
||||
'Autoprefixer target browsers do not need any prefixes.' +
|
||||
'You do not need Autoprefixer anymore.\n' +
|
||||
'Check your Browserslist config to be sure that your targets ' +
|
||||
'are set up correctly.\n' +
|
||||
'\n' +
|
||||
' Learn more at:\n' +
|
||||
' https://github.com/postcss/autoprefixer#readme\n' +
|
||||
' https://github.com/browserslist/browserslist#readme\n' +
|
||||
'\n'
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = plugin
|
||||
|
||||
function plugin(...reqs) {
|
||||
let options
|
||||
if (reqs.length === 1 && isPlainObject(reqs[0])) {
|
||||
options = reqs[0]
|
||||
reqs = undefined
|
||||
} else if (reqs.length === 0 || (reqs.length === 1 && !reqs[0])) {
|
||||
reqs = undefined
|
||||
} else if (reqs.length <= 2 && (Array.isArray(reqs[0]) || !reqs[0])) {
|
||||
options = reqs[1]
|
||||
reqs = reqs[0]
|
||||
} else if (typeof reqs[reqs.length - 1] === 'object') {
|
||||
options = reqs.pop()
|
||||
}
|
||||
|
||||
if (!options) {
|
||||
options = {}
|
||||
}
|
||||
|
||||
if (options.browser) {
|
||||
throw new Error(
|
||||
'Change `browser` option to `overrideBrowserslist` in Autoprefixer'
|
||||
)
|
||||
} else if (options.browserslist) {
|
||||
throw new Error(
|
||||
'Change `browserslist` option to `overrideBrowserslist` in Autoprefixer'
|
||||
)
|
||||
}
|
||||
|
||||
if (options.overrideBrowserslist) {
|
||||
reqs = options.overrideBrowserslist
|
||||
} else if (options.browsers) {
|
||||
if (typeof console !== 'undefined' && console.warn) {
|
||||
console.warn(
|
||||
pico.red(WARNING.replace(/`[^`]+`/g, i => pico.yellow(i.slice(1, -1))))
|
||||
)
|
||||
}
|
||||
reqs = options.browsers
|
||||
}
|
||||
|
||||
let brwlstOpts = {
|
||||
env: options.env,
|
||||
ignoreUnknownVersions: options.ignoreUnknownVersions,
|
||||
stats: options.stats
|
||||
}
|
||||
|
||||
function loadPrefixes(opts) {
|
||||
let d = autoprefixerData
|
||||
let browsers = new Browsers(d.browsers, reqs, opts, brwlstOpts)
|
||||
let key = browsers.selected.join(', ') + JSON.stringify(options)
|
||||
|
||||
if (!cache.has(key)) {
|
||||
cache.set(key, new Prefixes(d.prefixes, browsers, options))
|
||||
}
|
||||
|
||||
return cache.get(key)
|
||||
}
|
||||
|
||||
return {
|
||||
browsers: reqs,
|
||||
|
||||
info(opts) {
|
||||
opts = opts || {}
|
||||
opts.from = opts.from || process.cwd()
|
||||
return getInfo(loadPrefixes(opts))
|
||||
},
|
||||
|
||||
options,
|
||||
|
||||
postcssPlugin: 'autoprefixer',
|
||||
prepare(result) {
|
||||
let prefixes = loadPrefixes({
|
||||
env: options.env,
|
||||
from: result.opts.from
|
||||
})
|
||||
|
||||
return {
|
||||
OnceExit(root) {
|
||||
timeCapsule(result, prefixes)
|
||||
if (options.remove !== false) {
|
||||
prefixes.processor.remove(root, result)
|
||||
}
|
||||
if (options.add !== false) {
|
||||
prefixes.processor.add(root, result)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
plugin.postcss = true
|
||||
|
||||
/**
|
||||
* Autoprefixer data
|
||||
*/
|
||||
plugin.data = autoprefixerData
|
||||
|
||||
/**
|
||||
* Autoprefixer default browsers
|
||||
*/
|
||||
plugin.defaults = browserslist.defaults
|
||||
|
||||
/**
|
||||
* Inspect with default Autoprefixer
|
||||
*/
|
||||
plugin.info = () => plugin().info()
|
||||
51
node_modules/autoprefixer/lib/brackets.js
generated
vendored
Normal file
51
node_modules/autoprefixer/lib/brackets.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
function last(array) {
|
||||
return array[array.length - 1]
|
||||
}
|
||||
|
||||
let brackets = {
|
||||
/**
|
||||
* Parse string to nodes tree
|
||||
*/
|
||||
parse(str) {
|
||||
let current = ['']
|
||||
let stack = [current]
|
||||
|
||||
for (let sym of str) {
|
||||
if (sym === '(') {
|
||||
current = ['']
|
||||
last(stack).push(current)
|
||||
stack.push(current)
|
||||
continue
|
||||
}
|
||||
|
||||
if (sym === ')') {
|
||||
stack.pop()
|
||||
current = last(stack)
|
||||
current.push('')
|
||||
continue
|
||||
}
|
||||
|
||||
current[current.length - 1] += sym
|
||||
}
|
||||
|
||||
return stack[0]
|
||||
},
|
||||
|
||||
/**
|
||||
* Generate output string by nodes tree
|
||||
*/
|
||||
stringify(ast) {
|
||||
let result = ''
|
||||
for (let i of ast) {
|
||||
if (typeof i === 'object') {
|
||||
result += `(${brackets.stringify(i)})`
|
||||
continue
|
||||
}
|
||||
|
||||
result += i
|
||||
}
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = brackets
|
||||
79
node_modules/autoprefixer/lib/browsers.js
generated
vendored
Normal file
79
node_modules/autoprefixer/lib/browsers.js
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
let browserslist = require('browserslist')
|
||||
let { agents } = require('caniuse-lite/dist/unpacker/agents')
|
||||
|
||||
let utils = require('./utils')
|
||||
|
||||
class Browsers {
|
||||
constructor(data, requirements, options, browserslistOpts) {
|
||||
this.data = data
|
||||
this.options = options || {}
|
||||
this.browserslistOpts = browserslistOpts || {}
|
||||
this.selected = this.parse(requirements)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all prefixes for default browser data
|
||||
*/
|
||||
static prefixes() {
|
||||
if (this.prefixesCache) {
|
||||
return this.prefixesCache
|
||||
}
|
||||
|
||||
this.prefixesCache = []
|
||||
for (let name in agents) {
|
||||
this.prefixesCache.push(`-${agents[name].prefix}-`)
|
||||
}
|
||||
|
||||
this.prefixesCache = utils
|
||||
.uniq(this.prefixesCache)
|
||||
.sort((a, b) => b.length - a.length)
|
||||
|
||||
return this.prefixesCache
|
||||
}
|
||||
|
||||
/**
|
||||
* Check is value contain any possible prefix
|
||||
*/
|
||||
static withPrefix(value) {
|
||||
if (!this.prefixesRegexp) {
|
||||
this.prefixesRegexp = new RegExp(this.prefixes().join('|'))
|
||||
}
|
||||
|
||||
return this.prefixesRegexp.test(value)
|
||||
}
|
||||
|
||||
/**
|
||||
* Is browser is selected by requirements
|
||||
*/
|
||||
isSelected(browser) {
|
||||
return this.selected.includes(browser)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return browsers selected by requirements
|
||||
*/
|
||||
parse(requirements) {
|
||||
let opts = {}
|
||||
for (let i in this.browserslistOpts) {
|
||||
opts[i] = this.browserslistOpts[i]
|
||||
}
|
||||
opts.path = this.options.from
|
||||
return browserslist(requirements, opts)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return prefix for selected browser
|
||||
*/
|
||||
prefix(browser) {
|
||||
let [name, version] = browser.split(' ')
|
||||
let data = this.data[name]
|
||||
|
||||
let prefix = data.prefix_exceptions && data.prefix_exceptions[version]
|
||||
if (!prefix) {
|
||||
prefix = data.prefix
|
||||
}
|
||||
return `-${prefix}-`
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Browsers
|
||||
187
node_modules/autoprefixer/lib/declaration.js
generated
vendored
Normal file
187
node_modules/autoprefixer/lib/declaration.js
generated
vendored
Normal file
@@ -0,0 +1,187 @@
|
||||
let Browsers = require('./browsers')
|
||||
let Prefixer = require('./prefixer')
|
||||
let utils = require('./utils')
|
||||
|
||||
class Declaration extends Prefixer {
|
||||
/**
|
||||
* Clone and add prefixes for declaration
|
||||
*/
|
||||
add(decl, prefix, prefixes, result) {
|
||||
let prefixed = this.prefixed(decl.prop, prefix)
|
||||
if (
|
||||
this.isAlready(decl, prefixed) ||
|
||||
this.otherPrefixes(decl.value, prefix)
|
||||
) {
|
||||
return undefined
|
||||
}
|
||||
return this.insert(decl, prefix, prefixes, result)
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate indentation to create visual cascade
|
||||
*/
|
||||
calcBefore(prefixes, decl, prefix = '') {
|
||||
let max = this.maxPrefixed(prefixes, decl)
|
||||
let diff = max - utils.removeNote(prefix).length
|
||||
|
||||
let before = decl.raw('before')
|
||||
if (diff > 0) {
|
||||
before += Array(diff).fill(' ').join('')
|
||||
}
|
||||
|
||||
return before
|
||||
}
|
||||
|
||||
/**
|
||||
* Always true, because we already get prefixer by property name
|
||||
*/
|
||||
check(/* decl */) {
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone and insert new declaration
|
||||
*/
|
||||
insert(decl, prefix, prefixes) {
|
||||
let cloned = this.set(this.clone(decl), prefix)
|
||||
if (!cloned) return undefined
|
||||
|
||||
let already = decl.parent.some(
|
||||
i => i.prop === cloned.prop && i.value === cloned.value
|
||||
)
|
||||
if (already) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.raws.before = this.calcBefore(prefixes, decl, prefix)
|
||||
}
|
||||
return decl.parent.insertBefore(decl, cloned)
|
||||
}
|
||||
|
||||
/**
|
||||
* Did this declaration has this prefix above
|
||||
*/
|
||||
isAlready(decl, prefixed) {
|
||||
let already = this.all.group(decl).up(i => i.prop === prefixed)
|
||||
if (!already) {
|
||||
already = this.all.group(decl).down(i => i.prop === prefixed)
|
||||
}
|
||||
return already
|
||||
}
|
||||
|
||||
/**
|
||||
* Return maximum length of possible prefixed property
|
||||
*/
|
||||
maxPrefixed(prefixes, decl) {
|
||||
if (decl._autoprefixerMax) {
|
||||
return decl._autoprefixerMax
|
||||
}
|
||||
|
||||
let max = 0
|
||||
for (let prefix of prefixes) {
|
||||
prefix = utils.removeNote(prefix)
|
||||
if (prefix.length > max) {
|
||||
max = prefix.length
|
||||
}
|
||||
}
|
||||
decl._autoprefixerMax = max
|
||||
|
||||
return decl._autoprefixerMax
|
||||
}
|
||||
|
||||
/**
|
||||
* Should we use visual cascade for prefixes
|
||||
*/
|
||||
needCascade(decl) {
|
||||
if (!decl._autoprefixerCascade) {
|
||||
decl._autoprefixerCascade =
|
||||
this.all.options.cascade !== false && decl.raw('before').includes('\n')
|
||||
}
|
||||
return decl._autoprefixerCascade
|
||||
}
|
||||
|
||||
/**
|
||||
* Return unprefixed version of property
|
||||
*/
|
||||
normalize(prop) {
|
||||
return prop
|
||||
}
|
||||
|
||||
/**
|
||||
* Return list of prefixed properties to clean old prefixes
|
||||
*/
|
||||
old(prop, prefix) {
|
||||
return [this.prefixed(prop, prefix)]
|
||||
}
|
||||
|
||||
/**
|
||||
* Check `value`, that it contain other prefixes, rather than `prefix`
|
||||
*/
|
||||
otherPrefixes(value, prefix) {
|
||||
for (let other of Browsers.prefixes()) {
|
||||
if (other === prefix) {
|
||||
continue
|
||||
}
|
||||
if (value.includes(other)) {
|
||||
return value.replace(/var\([^)]+\)/, '').includes(other)
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Return prefixed version of property
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
return prefix + prop
|
||||
}
|
||||
|
||||
/**
|
||||
* Add spaces for visual cascade
|
||||
*/
|
||||
process(decl, result) {
|
||||
if (!this.needCascade(decl)) {
|
||||
super.process(decl, result)
|
||||
return
|
||||
}
|
||||
|
||||
let prefixes = super.process(decl, result)
|
||||
|
||||
if (!prefixes || !prefixes.length) {
|
||||
return
|
||||
}
|
||||
|
||||
this.restoreBefore(decl)
|
||||
decl.raws.before = this.calcBefore(prefixes, decl)
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove visual cascade
|
||||
*/
|
||||
restoreBefore(decl) {
|
||||
let lines = decl.raw('before').split('\n')
|
||||
let min = lines[lines.length - 1]
|
||||
|
||||
this.all.group(decl).up(prefixed => {
|
||||
let array = prefixed.raw('before').split('\n')
|
||||
let last = array[array.length - 1]
|
||||
if (last.length < min.length) {
|
||||
min = last
|
||||
}
|
||||
})
|
||||
|
||||
lines[lines.length - 1] = min
|
||||
decl.raws.before = lines.join('\n')
|
||||
}
|
||||
|
||||
/**
|
||||
* Set prefix to declaration
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
decl.prop = this.prefixed(decl.prop, prefix)
|
||||
return decl
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Declaration
|
||||
49
node_modules/autoprefixer/lib/hacks/align-content.js
generated
vendored
Normal file
49
node_modules/autoprefixer/lib/hacks/align-content.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
let Declaration = require('../declaration')
|
||||
let flexSpec = require('./flex-spec')
|
||||
|
||||
class AlignContent extends Declaration {
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
normalize() {
|
||||
return 'align-content'
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for 2012 spec
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-line-pack'
|
||||
}
|
||||
return super.prefixed(prop, prefix)
|
||||
}
|
||||
|
||||
/**
|
||||
* Change value for 2012 spec and ignore prefix for 2009
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
let spec = flexSpec(prefix)[0]
|
||||
if (spec === 2012) {
|
||||
decl.value = AlignContent.oldValues[decl.value] || decl.value
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
if (spec === 'final') {
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
AlignContent.names = ['align-content', 'flex-line-pack']
|
||||
|
||||
AlignContent.oldValues = {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start',
|
||||
'space-around': 'distribute',
|
||||
'space-between': 'justify'
|
||||
}
|
||||
|
||||
module.exports = AlignContent
|
||||
46
node_modules/autoprefixer/lib/hacks/align-items.js
generated
vendored
Normal file
46
node_modules/autoprefixer/lib/hacks/align-items.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
let Declaration = require('../declaration')
|
||||
let flexSpec = require('./flex-spec')
|
||||
|
||||
class AlignItems extends Declaration {
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
normalize() {
|
||||
return 'align-items'
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for 2009 and 2012 specs
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-align'
|
||||
}
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-align'
|
||||
}
|
||||
return super.prefixed(prop, prefix)
|
||||
}
|
||||
|
||||
/**
|
||||
* Change value for 2009 and 2012 specs
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
let spec = flexSpec(prefix)[0]
|
||||
if (spec === 2009 || spec === 2012) {
|
||||
decl.value = AlignItems.oldValues[decl.value] || decl.value
|
||||
}
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
AlignItems.names = ['align-items', 'flex-align', 'box-align']
|
||||
|
||||
AlignItems.oldValues = {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start'
|
||||
}
|
||||
|
||||
module.exports = AlignItems
|
||||
56
node_modules/autoprefixer/lib/hacks/align-self.js
generated
vendored
Normal file
56
node_modules/autoprefixer/lib/hacks/align-self.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
let Declaration = require('../declaration')
|
||||
let flexSpec = require('./flex-spec')
|
||||
|
||||
class AlignSelf extends Declaration {
|
||||
check(decl) {
|
||||
return (
|
||||
decl.parent &&
|
||||
!decl.parent.some(i => {
|
||||
return i.prop && i.prop.startsWith('grid-')
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
normalize() {
|
||||
return 'align-self'
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for 2012 specs
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-item-align'
|
||||
}
|
||||
return super.prefixed(prop, prefix)
|
||||
}
|
||||
|
||||
/**
|
||||
* Change value for 2012 spec and ignore prefix for 2009
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
let spec = flexSpec(prefix)[0]
|
||||
if (spec === 2012) {
|
||||
decl.value = AlignSelf.oldValues[decl.value] || decl.value
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
if (spec === 'final') {
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
AlignSelf.names = ['align-self', 'flex-item-align']
|
||||
|
||||
AlignSelf.oldValues = {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start'
|
||||
}
|
||||
|
||||
module.exports = AlignSelf
|
||||
17
node_modules/autoprefixer/lib/hacks/animation.js
generated
vendored
Normal file
17
node_modules/autoprefixer/lib/hacks/animation.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class Animation extends Declaration {
|
||||
/**
|
||||
* Don’t add prefixes for modern values.
|
||||
*/
|
||||
check(decl) {
|
||||
return !decl.value.split(/\s+/).some(i => {
|
||||
let lower = i.toLowerCase()
|
||||
return lower === 'reverse' || lower === 'alternate-reverse'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Animation.names = ['animation', 'animation-direction']
|
||||
|
||||
module.exports = Animation
|
||||
23
node_modules/autoprefixer/lib/hacks/appearance.js
generated
vendored
Normal file
23
node_modules/autoprefixer/lib/hacks/appearance.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
let Declaration = require('../declaration')
|
||||
let utils = require('../utils')
|
||||
|
||||
class Appearance extends Declaration {
|
||||
constructor(name, prefixes, all) {
|
||||
super(name, prefixes, all)
|
||||
|
||||
if (this.prefixes) {
|
||||
this.prefixes = utils.uniq(
|
||||
this.prefixes.map(i => {
|
||||
if (i === '-ms-') {
|
||||
return '-webkit-'
|
||||
}
|
||||
return i
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Appearance.names = ['appearance']
|
||||
|
||||
module.exports = Appearance
|
||||
26
node_modules/autoprefixer/lib/hacks/autofill.js
generated
vendored
Normal file
26
node_modules/autoprefixer/lib/hacks/autofill.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
let Selector = require('../selector')
|
||||
let utils = require('../utils')
|
||||
|
||||
class Autofill extends Selector {
|
||||
constructor(name, prefixes, all) {
|
||||
super(name, prefixes, all)
|
||||
|
||||
if (this.prefixes) {
|
||||
this.prefixes = utils.uniq(this.prefixes.map(() => '-webkit-'))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return different selectors depend on prefix
|
||||
*/
|
||||
prefixed(prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return ':-webkit-autofill'
|
||||
}
|
||||
return `:${prefix}autofill`
|
||||
}
|
||||
}
|
||||
|
||||
Autofill.names = [':autofill']
|
||||
|
||||
module.exports = Autofill
|
||||
20
node_modules/autoprefixer/lib/hacks/backdrop-filter.js
generated
vendored
Normal file
20
node_modules/autoprefixer/lib/hacks/backdrop-filter.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
let Declaration = require('../declaration')
|
||||
let utils = require('../utils')
|
||||
|
||||
class BackdropFilter extends Declaration {
|
||||
constructor(name, prefixes, all) {
|
||||
super(name, prefixes, all)
|
||||
|
||||
if (this.prefixes) {
|
||||
this.prefixes = utils.uniq(
|
||||
this.prefixes.map(i => {
|
||||
return i === '-ms-' ? '-webkit-' : i
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BackdropFilter.names = ['backdrop-filter']
|
||||
|
||||
module.exports = BackdropFilter
|
||||
24
node_modules/autoprefixer/lib/hacks/background-clip.js
generated
vendored
Normal file
24
node_modules/autoprefixer/lib/hacks/background-clip.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
let Declaration = require('../declaration')
|
||||
let utils = require('../utils')
|
||||
|
||||
class BackgroundClip extends Declaration {
|
||||
constructor(name, prefixes, all) {
|
||||
super(name, prefixes, all)
|
||||
|
||||
if (this.prefixes) {
|
||||
this.prefixes = utils.uniq(
|
||||
this.prefixes.map(i => {
|
||||
return i === '-ms-' ? '-webkit-' : i
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
check(decl) {
|
||||
return decl.value.toLowerCase() === 'text'
|
||||
}
|
||||
}
|
||||
|
||||
BackgroundClip.names = ['background-clip']
|
||||
|
||||
module.exports = BackgroundClip
|
||||
23
node_modules/autoprefixer/lib/hacks/background-size.js
generated
vendored
Normal file
23
node_modules/autoprefixer/lib/hacks/background-size.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class BackgroundSize extends Declaration {
|
||||
/**
|
||||
* Duplication parameter for -webkit- browsers
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
let value = decl.value.toLowerCase()
|
||||
if (
|
||||
prefix === '-webkit-' &&
|
||||
!value.includes(' ') &&
|
||||
value !== 'contain' &&
|
||||
value !== 'cover'
|
||||
) {
|
||||
decl.value = decl.value + ' ' + decl.value
|
||||
}
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
BackgroundSize.names = ['background-size']
|
||||
|
||||
module.exports = BackgroundSize
|
||||
40
node_modules/autoprefixer/lib/hacks/block-logical.js
generated
vendored
Normal file
40
node_modules/autoprefixer/lib/hacks/block-logical.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class BlockLogical extends Declaration {
|
||||
/**
|
||||
* Return property name by spec
|
||||
*/
|
||||
normalize(prop) {
|
||||
if (prop.includes('-before')) {
|
||||
return prop.replace('-before', '-block-start')
|
||||
}
|
||||
return prop.replace('-after', '-block-end')
|
||||
}
|
||||
|
||||
/**
|
||||
* Use old syntax for -moz- and -webkit-
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
if (prop.includes('-start')) {
|
||||
return prefix + prop.replace('-block-start', '-before')
|
||||
}
|
||||
return prefix + prop.replace('-block-end', '-after')
|
||||
}
|
||||
}
|
||||
|
||||
BlockLogical.names = [
|
||||
'border-block-start',
|
||||
'border-block-end',
|
||||
'margin-block-start',
|
||||
'margin-block-end',
|
||||
'padding-block-start',
|
||||
'padding-block-end',
|
||||
'border-before',
|
||||
'border-after',
|
||||
'margin-before',
|
||||
'margin-after',
|
||||
'padding-before',
|
||||
'padding-after'
|
||||
]
|
||||
|
||||
module.exports = BlockLogical
|
||||
15
node_modules/autoprefixer/lib/hacks/border-image.js
generated
vendored
Normal file
15
node_modules/autoprefixer/lib/hacks/border-image.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class BorderImage extends Declaration {
|
||||
/**
|
||||
* Remove fill parameter for prefixed declarations
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
decl.value = decl.value.replace(/\s+fill(\s)/, '$1')
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
BorderImage.names = ['border-image']
|
||||
|
||||
module.exports = BorderImage
|
||||
40
node_modules/autoprefixer/lib/hacks/border-radius.js
generated
vendored
Normal file
40
node_modules/autoprefixer/lib/hacks/border-radius.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class BorderRadius extends Declaration {
|
||||
/**
|
||||
* Return unprefixed version of property
|
||||
*/
|
||||
normalize(prop) {
|
||||
return BorderRadius.toNormal[prop] || prop
|
||||
}
|
||||
|
||||
/**
|
||||
* Change syntax, when add Mozilla prefix
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
if (prefix === '-moz-') {
|
||||
return prefix + (BorderRadius.toMozilla[prop] || prop)
|
||||
}
|
||||
return super.prefixed(prop, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
BorderRadius.names = ['border-radius']
|
||||
|
||||
BorderRadius.toMozilla = {}
|
||||
BorderRadius.toNormal = {}
|
||||
|
||||
for (let ver of ['top', 'bottom']) {
|
||||
for (let hor of ['left', 'right']) {
|
||||
let normal = `border-${ver}-${hor}-radius`
|
||||
let mozilla = `border-radius-${ver}${hor}`
|
||||
|
||||
BorderRadius.names.push(normal)
|
||||
BorderRadius.names.push(mozilla)
|
||||
|
||||
BorderRadius.toMozilla[normal] = mozilla
|
||||
BorderRadius.toNormal[mozilla] = normal
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = BorderRadius
|
||||
63
node_modules/autoprefixer/lib/hacks/break-props.js
generated
vendored
Normal file
63
node_modules/autoprefixer/lib/hacks/break-props.js
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class BreakProps extends Declaration {
|
||||
/**
|
||||
* Don’t prefix some values
|
||||
*/
|
||||
insert(decl, prefix, prefixes) {
|
||||
if (decl.prop !== 'break-inside') {
|
||||
return super.insert(decl, prefix, prefixes)
|
||||
}
|
||||
if (/region/i.test(decl.value) || /page/i.test(decl.value)) {
|
||||
return undefined
|
||||
}
|
||||
return super.insert(decl, prefix, prefixes)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
normalize(prop) {
|
||||
if (prop.includes('inside')) {
|
||||
return 'break-inside'
|
||||
}
|
||||
if (prop.includes('before')) {
|
||||
return 'break-before'
|
||||
}
|
||||
return 'break-after'
|
||||
}
|
||||
|
||||
/**
|
||||
* Change name for -webkit- and -moz- prefix
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
return `${prefix}column-${prop}`
|
||||
}
|
||||
|
||||
/**
|
||||
* Change prefixed value for avoid-column and avoid-page
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
if (
|
||||
(decl.prop === 'break-inside' && decl.value === 'avoid-column') ||
|
||||
decl.value === 'avoid-page'
|
||||
) {
|
||||
decl.value = 'avoid'
|
||||
}
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
BreakProps.names = [
|
||||
'break-inside',
|
||||
'page-break-inside',
|
||||
'column-break-inside',
|
||||
'break-before',
|
||||
'page-break-before',
|
||||
'column-break-before',
|
||||
'break-after',
|
||||
'page-break-after',
|
||||
'column-break-after'
|
||||
]
|
||||
|
||||
module.exports = BreakProps
|
||||
35
node_modules/autoprefixer/lib/hacks/cross-fade.js
generated
vendored
Normal file
35
node_modules/autoprefixer/lib/hacks/cross-fade.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
let list = require('postcss').list
|
||||
|
||||
let Value = require('../value')
|
||||
|
||||
class CrossFade extends Value {
|
||||
replace(string, prefix) {
|
||||
return list
|
||||
.space(string)
|
||||
.map(value => {
|
||||
if (value.slice(0, +this.name.length + 1) !== this.name + '(') {
|
||||
return value
|
||||
}
|
||||
|
||||
let close = value.lastIndexOf(')')
|
||||
let after = value.slice(close + 1)
|
||||
let args = value.slice(this.name.length + 1, close)
|
||||
|
||||
if (prefix === '-webkit-') {
|
||||
let match = args.match(/\d*.?\d+%?/)
|
||||
if (match) {
|
||||
args = args.slice(match[0].length).trim()
|
||||
args += `, ${match[0]}`
|
||||
} else {
|
||||
args += ', 0.5'
|
||||
}
|
||||
}
|
||||
return prefix + this.name + '(' + args + ')' + after
|
||||
})
|
||||
.join(' ')
|
||||
}
|
||||
}
|
||||
|
||||
CrossFade.names = ['cross-fade']
|
||||
|
||||
module.exports = CrossFade
|
||||
65
node_modules/autoprefixer/lib/hacks/display-flex.js
generated
vendored
Normal file
65
node_modules/autoprefixer/lib/hacks/display-flex.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
let OldValue = require('../old-value')
|
||||
let Value = require('../value')
|
||||
let flexSpec = require('./flex-spec')
|
||||
|
||||
class DisplayFlex extends Value {
|
||||
constructor(name, prefixes) {
|
||||
super(name, prefixes)
|
||||
if (name === 'display-flex') {
|
||||
this.name = 'flex'
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Faster check for flex value
|
||||
*/
|
||||
check(decl) {
|
||||
return decl.prop === 'display' && decl.value === this.name
|
||||
}
|
||||
|
||||
/**
|
||||
* Change value for old specs
|
||||
*/
|
||||
old(prefix) {
|
||||
let prefixed = this.prefixed(prefix)
|
||||
if (!prefixed) return undefined
|
||||
return new OldValue(this.name, prefixed)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return value by spec
|
||||
*/
|
||||
prefixed(prefix) {
|
||||
let spec, value
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
|
||||
if (spec === 2009) {
|
||||
if (this.name === 'flex') {
|
||||
value = 'box'
|
||||
} else {
|
||||
value = 'inline-box'
|
||||
}
|
||||
} else if (spec === 2012) {
|
||||
if (this.name === 'flex') {
|
||||
value = 'flexbox'
|
||||
} else {
|
||||
value = 'inline-flexbox'
|
||||
}
|
||||
} else if (spec === 'final') {
|
||||
value = this.name
|
||||
}
|
||||
|
||||
return prefix + value
|
||||
}
|
||||
|
||||
/**
|
||||
* Add prefix to value depend on flebox spec version
|
||||
*/
|
||||
replace(string, prefix) {
|
||||
return this.prefixed(prefix)
|
||||
}
|
||||
}
|
||||
|
||||
DisplayFlex.names = ['display-flex', 'inline-flex']
|
||||
|
||||
module.exports = DisplayFlex
|
||||
21
node_modules/autoprefixer/lib/hacks/display-grid.js
generated
vendored
Normal file
21
node_modules/autoprefixer/lib/hacks/display-grid.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
let Value = require('../value')
|
||||
|
||||
class DisplayGrid extends Value {
|
||||
constructor(name, prefixes) {
|
||||
super(name, prefixes)
|
||||
if (name === 'display-grid') {
|
||||
this.name = 'grid'
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Faster check for flex value
|
||||
*/
|
||||
check(decl) {
|
||||
return decl.prop === 'display' && decl.value === this.name
|
||||
}
|
||||
}
|
||||
|
||||
DisplayGrid.names = ['display-grid', 'inline-grid']
|
||||
|
||||
module.exports = DisplayGrid
|
||||
26
node_modules/autoprefixer/lib/hacks/file-selector-button.js
generated
vendored
Normal file
26
node_modules/autoprefixer/lib/hacks/file-selector-button.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
let Selector = require('../selector')
|
||||
let utils = require('../utils')
|
||||
|
||||
class FileSelectorButton extends Selector {
|
||||
constructor(name, prefixes, all) {
|
||||
super(name, prefixes, all)
|
||||
|
||||
if (this.prefixes) {
|
||||
this.prefixes = utils.uniq(this.prefixes.map(() => '-webkit-'))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return different selectors depend on prefix
|
||||
*/
|
||||
prefixed(prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return '::-webkit-file-upload-button'
|
||||
}
|
||||
return `::${prefix}file-selector-button`
|
||||
}
|
||||
}
|
||||
|
||||
FileSelectorButton.names = ['::file-selector-button']
|
||||
|
||||
module.exports = FileSelectorButton
|
||||
14
node_modules/autoprefixer/lib/hacks/filter-value.js
generated
vendored
Normal file
14
node_modules/autoprefixer/lib/hacks/filter-value.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
let Value = require('../value')
|
||||
|
||||
class FilterValue extends Value {
|
||||
constructor(name, prefixes) {
|
||||
super(name, prefixes)
|
||||
if (name === 'filter-function') {
|
||||
this.name = 'filter'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FilterValue.names = ['filter', 'filter-function']
|
||||
|
||||
module.exports = FilterValue
|
||||
19
node_modules/autoprefixer/lib/hacks/filter.js
generated
vendored
Normal file
19
node_modules/autoprefixer/lib/hacks/filter.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class Filter extends Declaration {
|
||||
/**
|
||||
* Check is it Internet Explorer filter
|
||||
*/
|
||||
check(decl) {
|
||||
let v = decl.value
|
||||
return (
|
||||
!v.toLowerCase().includes('alpha(') &&
|
||||
!v.includes('DXImageTransform.Microsoft') &&
|
||||
!v.includes('data:image/svg+xml')
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Filter.names = ['filter']
|
||||
|
||||
module.exports = Filter
|
||||
39
node_modules/autoprefixer/lib/hacks/flex-basis.js
generated
vendored
Normal file
39
node_modules/autoprefixer/lib/hacks/flex-basis.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
let Declaration = require('../declaration')
|
||||
let flexSpec = require('./flex-spec')
|
||||
|
||||
class FlexBasis extends Declaration {
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
normalize() {
|
||||
return 'flex-basis'
|
||||
}
|
||||
|
||||
/**
|
||||
* Return flex property for 2012 spec
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-preferred-size'
|
||||
}
|
||||
return super.prefixed(prop, prefix)
|
||||
}
|
||||
|
||||
/**
|
||||
* Ignore 2009 spec and use flex property for 2012
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2012 || spec === 'final') {
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
FlexBasis.names = ['flex-basis', 'flex-preferred-size']
|
||||
|
||||
module.exports = FlexBasis
|
||||
72
node_modules/autoprefixer/lib/hacks/flex-direction.js
generated
vendored
Normal file
72
node_modules/autoprefixer/lib/hacks/flex-direction.js
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
let Declaration = require('../declaration')
|
||||
let flexSpec = require('./flex-spec')
|
||||
|
||||
class FlexDirection extends Declaration {
|
||||
/**
|
||||
* Use two properties for 2009 spec
|
||||
*/
|
||||
insert(decl, prefix, prefixes) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec !== 2009) {
|
||||
return super.insert(decl, prefix, prefixes)
|
||||
}
|
||||
let already = decl.parent.some(
|
||||
i =>
|
||||
i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction'
|
||||
)
|
||||
if (already) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
let v = decl.value
|
||||
let dir, orient
|
||||
if (v === 'inherit' || v === 'initial' || v === 'unset') {
|
||||
orient = v
|
||||
dir = v
|
||||
} else {
|
||||
orient = v.includes('row') ? 'horizontal' : 'vertical'
|
||||
dir = v.includes('reverse') ? 'reverse' : 'normal'
|
||||
}
|
||||
|
||||
let cloned = this.clone(decl)
|
||||
cloned.prop = prefix + 'box-orient'
|
||||
cloned.value = orient
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.raws.before = this.calcBefore(prefixes, decl, prefix)
|
||||
}
|
||||
decl.parent.insertBefore(decl, cloned)
|
||||
|
||||
cloned = this.clone(decl)
|
||||
cloned.prop = prefix + 'box-direction'
|
||||
cloned.value = dir
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.raws.before = this.calcBefore(prefixes, decl, prefix)
|
||||
}
|
||||
return decl.parent.insertBefore(decl, cloned)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
normalize() {
|
||||
return 'flex-direction'
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean two properties for 2009 spec
|
||||
*/
|
||||
old(prop, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2009) {
|
||||
return [prefix + 'box-orient', prefix + 'box-direction']
|
||||
} else {
|
||||
return super.old(prop, prefix)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FlexDirection.names = ['flex-direction', 'box-direction', 'box-orient']
|
||||
|
||||
module.exports = FlexDirection
|
||||
53
node_modules/autoprefixer/lib/hacks/flex-flow.js
generated
vendored
Normal file
53
node_modules/autoprefixer/lib/hacks/flex-flow.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
let Declaration = require('../declaration')
|
||||
let flexSpec = require('./flex-spec')
|
||||
|
||||
class FlexFlow extends Declaration {
|
||||
/**
|
||||
* Use two properties for 2009 spec
|
||||
*/
|
||||
insert(decl, prefix, prefixes) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec !== 2009) {
|
||||
return super.insert(decl, prefix, prefixes)
|
||||
}
|
||||
let values = decl.value
|
||||
.split(/\s+/)
|
||||
.filter(i => i !== 'wrap' && i !== 'nowrap' && 'wrap-reverse')
|
||||
if (values.length === 0) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
let already = decl.parent.some(
|
||||
i =>
|
||||
i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction'
|
||||
)
|
||||
if (already) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
let value = values[0]
|
||||
let orient = value.includes('row') ? 'horizontal' : 'vertical'
|
||||
let dir = value.includes('reverse') ? 'reverse' : 'normal'
|
||||
|
||||
let cloned = this.clone(decl)
|
||||
cloned.prop = prefix + 'box-orient'
|
||||
cloned.value = orient
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.raws.before = this.calcBefore(prefixes, decl, prefix)
|
||||
}
|
||||
decl.parent.insertBefore(decl, cloned)
|
||||
|
||||
cloned = this.clone(decl)
|
||||
cloned.prop = prefix + 'box-direction'
|
||||
cloned.value = dir
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.raws.before = this.calcBefore(prefixes, decl, prefix)
|
||||
}
|
||||
return decl.parent.insertBefore(decl, cloned)
|
||||
}
|
||||
}
|
||||
|
||||
FlexFlow.names = ['flex-flow', 'box-direction', 'box-orient']
|
||||
|
||||
module.exports = FlexFlow
|
||||
30
node_modules/autoprefixer/lib/hacks/flex-grow.js
generated
vendored
Normal file
30
node_modules/autoprefixer/lib/hacks/flex-grow.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
let Declaration = require('../declaration')
|
||||
let flexSpec = require('./flex-spec')
|
||||
|
||||
class Flex extends Declaration {
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
normalize() {
|
||||
return 'flex'
|
||||
}
|
||||
|
||||
/**
|
||||
* Return flex property for 2009 and 2012 specs
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-flex'
|
||||
}
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-positive'
|
||||
}
|
||||
return super.prefixed(prop, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
Flex.names = ['flex-grow', 'flex-positive']
|
||||
|
||||
module.exports = Flex
|
||||
39
node_modules/autoprefixer/lib/hacks/flex-shrink.js
generated
vendored
Normal file
39
node_modules/autoprefixer/lib/hacks/flex-shrink.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
let Declaration = require('../declaration')
|
||||
let flexSpec = require('./flex-spec')
|
||||
|
||||
class FlexShrink extends Declaration {
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
normalize() {
|
||||
return 'flex-shrink'
|
||||
}
|
||||
|
||||
/**
|
||||
* Return flex property for 2012 spec
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-negative'
|
||||
}
|
||||
return super.prefixed(prop, prefix)
|
||||
}
|
||||
|
||||
/**
|
||||
* Ignore 2009 spec and use flex property for 2012
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2012 || spec === 'final') {
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
FlexShrink.names = ['flex-shrink', 'flex-negative']
|
||||
|
||||
module.exports = FlexShrink
|
||||
19
node_modules/autoprefixer/lib/hacks/flex-spec.js
generated
vendored
Normal file
19
node_modules/autoprefixer/lib/hacks/flex-spec.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Return flexbox spec versions by prefix
|
||||
*/
|
||||
module.exports = function (prefix) {
|
||||
let spec
|
||||
if (prefix === '-webkit- 2009' || prefix === '-moz-') {
|
||||
spec = 2009
|
||||
} else if (prefix === '-ms-') {
|
||||
spec = 2012
|
||||
} else if (prefix === '-webkit-') {
|
||||
spec = 'final'
|
||||
}
|
||||
|
||||
if (prefix === '-webkit- 2009') {
|
||||
prefix = '-webkit-'
|
||||
}
|
||||
|
||||
return [spec, prefix]
|
||||
}
|
||||
19
node_modules/autoprefixer/lib/hacks/flex-wrap.js
generated
vendored
Normal file
19
node_modules/autoprefixer/lib/hacks/flex-wrap.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
let Declaration = require('../declaration')
|
||||
let flexSpec = require('./flex-spec')
|
||||
|
||||
class FlexWrap extends Declaration {
|
||||
/**
|
||||
* Don't add prefix for 2009 spec
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
let spec = flexSpec(prefix)[0]
|
||||
if (spec !== 2009) {
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
FlexWrap.names = ['flex-wrap']
|
||||
|
||||
module.exports = FlexWrap
|
||||
54
node_modules/autoprefixer/lib/hacks/flex.js
generated
vendored
Normal file
54
node_modules/autoprefixer/lib/hacks/flex.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
let list = require('postcss').list
|
||||
|
||||
let Declaration = require('../declaration')
|
||||
let flexSpec = require('./flex-spec')
|
||||
|
||||
class Flex extends Declaration {
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
normalize() {
|
||||
return 'flex'
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for 2009 spec
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-flex'
|
||||
}
|
||||
return super.prefixed(prop, prefix)
|
||||
}
|
||||
|
||||
/**
|
||||
* Spec 2009 supports only first argument
|
||||
* Spec 2012 disallows unitless basis
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
let spec = flexSpec(prefix)[0]
|
||||
if (spec === 2009) {
|
||||
decl.value = list.space(decl.value)[0]
|
||||
decl.value = Flex.oldValues[decl.value] || decl.value
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
if (spec === 2012) {
|
||||
let components = list.space(decl.value)
|
||||
if (components.length === 3 && components[2] === '0') {
|
||||
decl.value = components.slice(0, 2).concat('0px').join(' ')
|
||||
}
|
||||
}
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
Flex.names = ['flex', 'box-flex']
|
||||
|
||||
Flex.oldValues = {
|
||||
auto: '1',
|
||||
none: '0'
|
||||
}
|
||||
|
||||
module.exports = Flex
|
||||
20
node_modules/autoprefixer/lib/hacks/fullscreen.js
generated
vendored
Normal file
20
node_modules/autoprefixer/lib/hacks/fullscreen.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
let Selector = require('../selector')
|
||||
|
||||
class Fullscreen extends Selector {
|
||||
/**
|
||||
* Return different selectors depend on prefix
|
||||
*/
|
||||
prefixed(prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return ':-webkit-full-screen'
|
||||
}
|
||||
if (prefix === '-moz-') {
|
||||
return ':-moz-full-screen'
|
||||
}
|
||||
return `:${prefix}fullscreen`
|
||||
}
|
||||
}
|
||||
|
||||
Fullscreen.names = [':fullscreen']
|
||||
|
||||
module.exports = Fullscreen
|
||||
448
node_modules/autoprefixer/lib/hacks/gradient.js
generated
vendored
Normal file
448
node_modules/autoprefixer/lib/hacks/gradient.js
generated
vendored
Normal file
@@ -0,0 +1,448 @@
|
||||
let range = require('normalize-range')
|
||||
let parser = require('postcss-value-parser')
|
||||
|
||||
let OldValue = require('../old-value')
|
||||
let utils = require('../utils')
|
||||
let Value = require('../value')
|
||||
|
||||
let IS_DIRECTION = /top|left|right|bottom/gi
|
||||
|
||||
class Gradient extends Value {
|
||||
/**
|
||||
* Do not add non-webkit prefixes for list-style and object
|
||||
*/
|
||||
add(decl, prefix) {
|
||||
let p = decl.prop
|
||||
if (p.includes('mask')) {
|
||||
if (prefix === '-webkit-' || prefix === '-webkit- old') {
|
||||
return super.add(decl, prefix)
|
||||
}
|
||||
} else if (
|
||||
p === 'list-style' ||
|
||||
p === 'list-style-image' ||
|
||||
p === 'content'
|
||||
) {
|
||||
if (prefix === '-webkit-' || prefix === '-webkit- old') {
|
||||
return super.add(decl, prefix)
|
||||
}
|
||||
} else {
|
||||
return super.add(decl, prefix)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
/**
|
||||
* Get div token from exists parameters
|
||||
*/
|
||||
cloneDiv(params) {
|
||||
for (let i of params) {
|
||||
if (i.type === 'div' && i.value === ',') {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return { after: ' ', type: 'div', value: ',' }
|
||||
}
|
||||
|
||||
/**
|
||||
* Change colors syntax to old webkit
|
||||
*/
|
||||
colorStops(params) {
|
||||
let result = []
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
let pos
|
||||
let param = params[i]
|
||||
let item
|
||||
if (i === 0) {
|
||||
continue
|
||||
}
|
||||
|
||||
let color = parser.stringify(param[0])
|
||||
if (param[1] && param[1].type === 'word') {
|
||||
pos = param[1].value
|
||||
} else if (param[2] && param[2].type === 'word') {
|
||||
pos = param[2].value
|
||||
}
|
||||
|
||||
let stop
|
||||
if (i === 1 && (!pos || pos === '0%')) {
|
||||
stop = `from(${color})`
|
||||
} else if (i === params.length - 1 && (!pos || pos === '100%')) {
|
||||
stop = `to(${color})`
|
||||
} else if (pos) {
|
||||
stop = `color-stop(${pos}, ${color})`
|
||||
} else {
|
||||
stop = `color-stop(${color})`
|
||||
}
|
||||
|
||||
let div = param[param.length - 1]
|
||||
params[i] = [{ type: 'word', value: stop }]
|
||||
if (div.type === 'div' && div.value === ',') {
|
||||
item = params[i].push(div)
|
||||
}
|
||||
result.push(item)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Change new direction to old
|
||||
*/
|
||||
convertDirection(params) {
|
||||
if (params.length > 0) {
|
||||
if (params[0].value === 'to') {
|
||||
this.fixDirection(params)
|
||||
} else if (params[0].value.includes('deg')) {
|
||||
this.fixAngle(params)
|
||||
} else if (this.isRadial(params)) {
|
||||
this.fixRadial(params)
|
||||
}
|
||||
}
|
||||
return params
|
||||
}
|
||||
|
||||
/**
|
||||
* Add 90 degrees
|
||||
*/
|
||||
fixAngle(params) {
|
||||
let first = params[0].value
|
||||
first = parseFloat(first)
|
||||
first = Math.abs(450 - first) % 360
|
||||
first = this.roundFloat(first, 3)
|
||||
params[0].value = `${first}deg`
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace `to top left` to `bottom right`
|
||||
*/
|
||||
fixDirection(params) {
|
||||
params.splice(0, 2)
|
||||
|
||||
for (let param of params) {
|
||||
if (param.type === 'div') {
|
||||
break
|
||||
}
|
||||
if (param.type === 'word') {
|
||||
param.value = this.revertDirection(param.value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix radial direction syntax
|
||||
*/
|
||||
fixRadial(params) {
|
||||
let first = []
|
||||
let second = []
|
||||
let a, b, c, i, next
|
||||
|
||||
for (i = 0; i < params.length - 2; i++) {
|
||||
a = params[i]
|
||||
b = params[i + 1]
|
||||
c = params[i + 2]
|
||||
if (a.type === 'space' && b.value === 'at' && c.type === 'space') {
|
||||
next = i + 3
|
||||
break
|
||||
} else {
|
||||
first.push(a)
|
||||
}
|
||||
}
|
||||
|
||||
let div
|
||||
for (i = next; i < params.length; i++) {
|
||||
if (params[i].type === 'div') {
|
||||
div = params[i]
|
||||
break
|
||||
} else {
|
||||
second.push(params[i])
|
||||
}
|
||||
}
|
||||
|
||||
params.splice(0, i, ...second, div, ...first)
|
||||
}
|
||||
|
||||
/**
|
||||
* Look for at word
|
||||
*/
|
||||
isRadial(params) {
|
||||
let state = 'before'
|
||||
for (let param of params) {
|
||||
if (state === 'before' && param.type === 'space') {
|
||||
state = 'at'
|
||||
} else if (state === 'at' && param.value === 'at') {
|
||||
state = 'after'
|
||||
} else if (state === 'after' && param.type === 'space') {
|
||||
return true
|
||||
} else if (param.type === 'div') {
|
||||
break
|
||||
} else {
|
||||
state = 'before'
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace old direction to new
|
||||
*/
|
||||
newDirection(params) {
|
||||
if (params[0].value === 'to') {
|
||||
return params
|
||||
}
|
||||
IS_DIRECTION.lastIndex = 0 // reset search index of global regexp
|
||||
if (!IS_DIRECTION.test(params[0].value)) {
|
||||
return params
|
||||
}
|
||||
|
||||
params.unshift(
|
||||
{
|
||||
type: 'word',
|
||||
value: 'to'
|
||||
},
|
||||
{
|
||||
type: 'space',
|
||||
value: ' '
|
||||
}
|
||||
)
|
||||
|
||||
for (let i = 2; i < params.length; i++) {
|
||||
if (params[i].type === 'div') {
|
||||
break
|
||||
}
|
||||
if (params[i].type === 'word') {
|
||||
params[i].value = this.revertDirection(params[i].value)
|
||||
}
|
||||
}
|
||||
|
||||
return params
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize angle
|
||||
*/
|
||||
normalize(nodes, gradientName) {
|
||||
if (!nodes[0]) return nodes
|
||||
|
||||
if (/-?\d+(.\d+)?grad/.test(nodes[0].value)) {
|
||||
nodes[0].value = this.normalizeUnit(nodes[0].value, 400)
|
||||
} else if (/-?\d+(.\d+)?rad/.test(nodes[0].value)) {
|
||||
nodes[0].value = this.normalizeUnit(nodes[0].value, 2 * Math.PI)
|
||||
} else if (/-?\d+(.\d+)?turn/.test(nodes[0].value)) {
|
||||
nodes[0].value = this.normalizeUnit(nodes[0].value, 1)
|
||||
} else if (nodes[0].value.includes('deg')) {
|
||||
let num = parseFloat(nodes[0].value)
|
||||
num = range.wrap(0, 360, num)
|
||||
nodes[0].value = `${num}deg`
|
||||
}
|
||||
|
||||
if (
|
||||
gradientName === 'linear-gradient' ||
|
||||
gradientName === 'repeating-linear-gradient'
|
||||
) {
|
||||
let direction = nodes[0].value
|
||||
|
||||
// Unitless zero for `<angle>` values are allowed in CSS gradients and transforms.
|
||||
// Spec: https://github.com/w3c/csswg-drafts/commit/602789171429b2231223ab1e5acf8f7f11652eb3
|
||||
if (direction === '0deg' || direction === '0') {
|
||||
nodes = this.replaceFirst(nodes, 'to', ' ', 'top')
|
||||
} else if (direction === '90deg') {
|
||||
nodes = this.replaceFirst(nodes, 'to', ' ', 'right')
|
||||
} else if (direction === '180deg') {
|
||||
nodes = this.replaceFirst(nodes, 'to', ' ', 'bottom') // default value
|
||||
} else if (direction === '270deg') {
|
||||
nodes = this.replaceFirst(nodes, 'to', ' ', 'left')
|
||||
}
|
||||
}
|
||||
|
||||
return nodes
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert angle unit to deg
|
||||
*/
|
||||
normalizeUnit(str, full) {
|
||||
let num = parseFloat(str)
|
||||
let deg = (num / full) * 360
|
||||
return `${deg}deg`
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove old WebKit gradient too
|
||||
*/
|
||||
old(prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
let type
|
||||
if (this.name === 'linear-gradient') {
|
||||
type = 'linear'
|
||||
} else if (this.name === 'repeating-linear-gradient') {
|
||||
type = 'repeating-linear'
|
||||
} else if (this.name === 'repeating-radial-gradient') {
|
||||
type = 'repeating-radial'
|
||||
} else {
|
||||
type = 'radial'
|
||||
}
|
||||
let string = '-gradient'
|
||||
let regexp = utils.regexp(
|
||||
`-webkit-(${type}-gradient|gradient\\(\\s*${type})`,
|
||||
false
|
||||
)
|
||||
|
||||
return new OldValue(this.name, prefix + this.name, string, regexp)
|
||||
} else {
|
||||
return super.old(prefix)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Change direction syntax to old webkit
|
||||
*/
|
||||
oldDirection(params) {
|
||||
let div = this.cloneDiv(params[0])
|
||||
|
||||
if (params[0][0].value !== 'to') {
|
||||
return params.unshift([
|
||||
{ type: 'word', value: Gradient.oldDirections.bottom },
|
||||
div
|
||||
])
|
||||
} else {
|
||||
let words = []
|
||||
for (let node of params[0].slice(2)) {
|
||||
if (node.type === 'word') {
|
||||
words.push(node.value.toLowerCase())
|
||||
}
|
||||
}
|
||||
|
||||
words = words.join(' ')
|
||||
let old = Gradient.oldDirections[words] || words
|
||||
|
||||
params[0] = [{ type: 'word', value: old }, div]
|
||||
return params[0]
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert to old webkit syntax
|
||||
*/
|
||||
oldWebkit(node) {
|
||||
let { nodes } = node
|
||||
let string = parser.stringify(node.nodes)
|
||||
|
||||
if (this.name !== 'linear-gradient') {
|
||||
return false
|
||||
}
|
||||
if (nodes[0] && nodes[0].value.includes('deg')) {
|
||||
return false
|
||||
}
|
||||
if (
|
||||
string.includes('px') ||
|
||||
string.includes('-corner') ||
|
||||
string.includes('-side')
|
||||
) {
|
||||
return false
|
||||
}
|
||||
|
||||
let params = [[]]
|
||||
for (let i of nodes) {
|
||||
params[params.length - 1].push(i)
|
||||
if (i.type === 'div' && i.value === ',') {
|
||||
params.push([])
|
||||
}
|
||||
}
|
||||
|
||||
this.oldDirection(params)
|
||||
this.colorStops(params)
|
||||
|
||||
node.nodes = []
|
||||
for (let param of params) {
|
||||
node.nodes = node.nodes.concat(param)
|
||||
}
|
||||
|
||||
node.nodes.unshift(
|
||||
{ type: 'word', value: 'linear' },
|
||||
this.cloneDiv(node.nodes)
|
||||
)
|
||||
node.value = '-webkit-gradient'
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* Change degrees for webkit prefix
|
||||
*/
|
||||
replace(string, prefix) {
|
||||
let ast = parser(string)
|
||||
for (let node of ast.nodes) {
|
||||
let gradientName = this.name // gradient name
|
||||
if (node.type === 'function' && node.value === gradientName) {
|
||||
node.nodes = this.newDirection(node.nodes)
|
||||
node.nodes = this.normalize(node.nodes, gradientName)
|
||||
if (prefix === '-webkit- old') {
|
||||
let changes = this.oldWebkit(node)
|
||||
if (!changes) {
|
||||
return false
|
||||
}
|
||||
} else {
|
||||
node.nodes = this.convertDirection(node.nodes)
|
||||
node.value = prefix + node.value
|
||||
}
|
||||
}
|
||||
}
|
||||
return ast.toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace first token
|
||||
*/
|
||||
replaceFirst(params, ...words) {
|
||||
let prefix = words.map(i => {
|
||||
if (i === ' ') {
|
||||
return { type: 'space', value: i }
|
||||
}
|
||||
return { type: 'word', value: i }
|
||||
})
|
||||
return prefix.concat(params.slice(1))
|
||||
}
|
||||
|
||||
revertDirection(word) {
|
||||
return Gradient.directions[word.toLowerCase()] || word
|
||||
}
|
||||
|
||||
/**
|
||||
* Round float and save digits under dot
|
||||
*/
|
||||
roundFloat(float, digits) {
|
||||
return parseFloat(float.toFixed(digits))
|
||||
}
|
||||
}
|
||||
|
||||
Gradient.names = [
|
||||
'linear-gradient',
|
||||
'repeating-linear-gradient',
|
||||
'radial-gradient',
|
||||
'repeating-radial-gradient'
|
||||
]
|
||||
|
||||
Gradient.directions = {
|
||||
bottom: 'top',
|
||||
left: 'right',
|
||||
right: 'left',
|
||||
top: 'bottom' // default value
|
||||
}
|
||||
|
||||
// Direction to replace
|
||||
Gradient.oldDirections = {
|
||||
'bottom': 'left top, left bottom',
|
||||
'bottom left': 'right top, left bottom',
|
||||
'bottom right': 'left top, right bottom',
|
||||
'left': 'right top, left top',
|
||||
|
||||
'left bottom': 'right top, left bottom',
|
||||
'left top': 'right bottom, left top',
|
||||
'right': 'left top, right top',
|
||||
'right bottom': 'left top, right bottom',
|
||||
'right top': 'left bottom, right top',
|
||||
'top': 'left bottom, left top',
|
||||
'top left': 'right bottom, left top',
|
||||
'top right': 'left bottom, right top'
|
||||
}
|
||||
|
||||
module.exports = Gradient
|
||||
34
node_modules/autoprefixer/lib/hacks/grid-area.js
generated
vendored
Normal file
34
node_modules/autoprefixer/lib/hacks/grid-area.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
let Declaration = require('../declaration')
|
||||
let utils = require('./grid-utils')
|
||||
|
||||
class GridArea extends Declaration {
|
||||
/**
|
||||
* Translate grid-area to separate -ms- prefixed properties
|
||||
*/
|
||||
insert(decl, prefix, prefixes, result) {
|
||||
if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
|
||||
|
||||
let values = utils.parse(decl)
|
||||
|
||||
let [rowStart, rowSpan] = utils.translate(values, 0, 2)
|
||||
let [columnStart, columnSpan] = utils.translate(values, 1, 3)
|
||||
|
||||
;[
|
||||
['grid-row', rowStart],
|
||||
['grid-row-span', rowSpan],
|
||||
['grid-column', columnStart],
|
||||
['grid-column-span', columnSpan]
|
||||
].forEach(([prop, value]) => {
|
||||
utils.insertDecl(decl, prop, value)
|
||||
})
|
||||
|
||||
utils.warnTemplateSelectorNotFound(decl, result)
|
||||
utils.warnIfGridRowColumnExists(decl, result)
|
||||
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
GridArea.names = ['grid-area']
|
||||
|
||||
module.exports = GridArea
|
||||
28
node_modules/autoprefixer/lib/hacks/grid-column-align.js
generated
vendored
Normal file
28
node_modules/autoprefixer/lib/hacks/grid-column-align.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class GridColumnAlign extends Declaration {
|
||||
/**
|
||||
* Do not prefix flexbox values
|
||||
*/
|
||||
check(decl) {
|
||||
return !decl.value.includes('flex-') && decl.value !== 'baseline'
|
||||
}
|
||||
|
||||
/**
|
||||
* Change IE property back
|
||||
*/
|
||||
normalize() {
|
||||
return 'justify-self'
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for IE
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
return prefix + 'grid-column-align'
|
||||
}
|
||||
}
|
||||
|
||||
GridColumnAlign.names = ['grid-column-align']
|
||||
|
||||
module.exports = GridColumnAlign
|
||||
52
node_modules/autoprefixer/lib/hacks/grid-end.js
generated
vendored
Normal file
52
node_modules/autoprefixer/lib/hacks/grid-end.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
let Declaration = require('../declaration')
|
||||
let { isPureNumber } = require('../utils')
|
||||
|
||||
class GridEnd extends Declaration {
|
||||
/**
|
||||
* Change repeating syntax for IE
|
||||
*/
|
||||
insert(decl, prefix, prefixes, result) {
|
||||
if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
|
||||
|
||||
let clonedDecl = this.clone(decl)
|
||||
|
||||
let startProp = decl.prop.replace(/end$/, 'start')
|
||||
let spanProp = prefix + decl.prop.replace(/end$/, 'span')
|
||||
|
||||
if (decl.parent.some(i => i.prop === spanProp)) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
clonedDecl.prop = spanProp
|
||||
|
||||
if (decl.value.includes('span')) {
|
||||
clonedDecl.value = decl.value.replace(/span\s/i, '')
|
||||
} else {
|
||||
let startDecl
|
||||
decl.parent.walkDecls(startProp, d => {
|
||||
startDecl = d
|
||||
})
|
||||
if (startDecl) {
|
||||
if (isPureNumber(startDecl.value)) {
|
||||
let value = Number(decl.value) - Number(startDecl.value) + ''
|
||||
clonedDecl.value = value
|
||||
} else {
|
||||
return undefined
|
||||
}
|
||||
} else {
|
||||
decl.warn(
|
||||
result,
|
||||
`Can not prefix ${decl.prop} (${startProp} is not found)`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
decl.cloneBefore(clonedDecl)
|
||||
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
GridEnd.names = ['grid-row-end', 'grid-column-end']
|
||||
|
||||
module.exports = GridEnd
|
||||
28
node_modules/autoprefixer/lib/hacks/grid-row-align.js
generated
vendored
Normal file
28
node_modules/autoprefixer/lib/hacks/grid-row-align.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class GridRowAlign extends Declaration {
|
||||
/**
|
||||
* Do not prefix flexbox values
|
||||
*/
|
||||
check(decl) {
|
||||
return !decl.value.includes('flex-') && decl.value !== 'baseline'
|
||||
}
|
||||
|
||||
/**
|
||||
* Change IE property back
|
||||
*/
|
||||
normalize() {
|
||||
return 'align-self'
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for IE
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
return prefix + 'grid-row-align'
|
||||
}
|
||||
}
|
||||
|
||||
GridRowAlign.names = ['grid-row-align']
|
||||
|
||||
module.exports = GridRowAlign
|
||||
33
node_modules/autoprefixer/lib/hacks/grid-row-column.js
generated
vendored
Normal file
33
node_modules/autoprefixer/lib/hacks/grid-row-column.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
let Declaration = require('../declaration')
|
||||
let utils = require('./grid-utils')
|
||||
|
||||
class GridRowColumn extends Declaration {
|
||||
/**
|
||||
* Translate grid-row / grid-column to separate -ms- prefixed properties
|
||||
*/
|
||||
insert(decl, prefix, prefixes) {
|
||||
if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
|
||||
|
||||
let values = utils.parse(decl)
|
||||
let [start, span] = utils.translate(values, 0, 1)
|
||||
|
||||
let hasStartValueSpan = values[0] && values[0].includes('span')
|
||||
|
||||
if (hasStartValueSpan) {
|
||||
span = values[0].join('').replace(/\D/g, '')
|
||||
}
|
||||
|
||||
;[
|
||||
[decl.prop, start],
|
||||
[`${decl.prop}-span`, span]
|
||||
].forEach(([prop, value]) => {
|
||||
utils.insertDecl(decl, prop, value)
|
||||
})
|
||||
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
GridRowColumn.names = ['grid-row', 'grid-column']
|
||||
|
||||
module.exports = GridRowColumn
|
||||
125
node_modules/autoprefixer/lib/hacks/grid-rows-columns.js
generated
vendored
Normal file
125
node_modules/autoprefixer/lib/hacks/grid-rows-columns.js
generated
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
let Declaration = require('../declaration')
|
||||
let Processor = require('../processor')
|
||||
let {
|
||||
autoplaceGridItems,
|
||||
getGridGap,
|
||||
inheritGridGap,
|
||||
prefixTrackProp,
|
||||
prefixTrackValue
|
||||
} = require('./grid-utils')
|
||||
|
||||
class GridRowsColumns extends Declaration {
|
||||
insert(decl, prefix, prefixes, result) {
|
||||
if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
|
||||
|
||||
let { parent, prop, value } = decl
|
||||
let isRowProp = prop.includes('rows')
|
||||
let isColumnProp = prop.includes('columns')
|
||||
|
||||
let hasGridTemplate = parent.some(
|
||||
i => i.prop === 'grid-template' || i.prop === 'grid-template-areas'
|
||||
)
|
||||
|
||||
/**
|
||||
* Not to prefix rows declaration if grid-template(-areas) is present
|
||||
*/
|
||||
if (hasGridTemplate && isRowProp) {
|
||||
return false
|
||||
}
|
||||
|
||||
let processor = new Processor({ options: {} })
|
||||
let status = processor.gridStatus(parent, result)
|
||||
let gap = getGridGap(decl)
|
||||
gap = inheritGridGap(decl, gap) || gap
|
||||
|
||||
let gapValue = isRowProp ? gap.row : gap.column
|
||||
|
||||
if ((status === 'no-autoplace' || status === true) && !hasGridTemplate) {
|
||||
gapValue = null
|
||||
}
|
||||
|
||||
let prefixValue = prefixTrackValue({
|
||||
gap: gapValue,
|
||||
value
|
||||
})
|
||||
|
||||
/**
|
||||
* Insert prefixes
|
||||
*/
|
||||
decl.cloneBefore({
|
||||
prop: prefixTrackProp({ prefix, prop }),
|
||||
value: prefixValue
|
||||
})
|
||||
|
||||
let autoflow = parent.nodes.find(i => i.prop === 'grid-auto-flow')
|
||||
let autoflowValue = 'row'
|
||||
|
||||
if (autoflow && !processor.disabled(autoflow, result)) {
|
||||
autoflowValue = autoflow.value.trim()
|
||||
}
|
||||
if (status === 'autoplace') {
|
||||
/**
|
||||
* Show warning if grid-template-rows decl is not found
|
||||
*/
|
||||
let rowDecl = parent.nodes.find(i => i.prop === 'grid-template-rows')
|
||||
|
||||
if (!rowDecl && hasGridTemplate) {
|
||||
return undefined
|
||||
} else if (!rowDecl && !hasGridTemplate) {
|
||||
decl.warn(
|
||||
result,
|
||||
'Autoplacement does not work without grid-template-rows property'
|
||||
)
|
||||
return undefined
|
||||
}
|
||||
|
||||
/**
|
||||
* Show warning if grid-template-columns decl is not found
|
||||
*/
|
||||
let columnDecl = parent.nodes.find(i => {
|
||||
return i.prop === 'grid-template-columns'
|
||||
})
|
||||
if (!columnDecl && !hasGridTemplate) {
|
||||
decl.warn(
|
||||
result,
|
||||
'Autoplacement does not work without grid-template-columns property'
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Autoplace grid items
|
||||
*/
|
||||
if (isColumnProp && !hasGridTemplate) {
|
||||
autoplaceGridItems(decl, result, gap, autoflowValue)
|
||||
}
|
||||
}
|
||||
|
||||
return undefined
|
||||
}
|
||||
|
||||
/**
|
||||
* Change IE property back
|
||||
*/
|
||||
normalize(prop) {
|
||||
return prop.replace(/^grid-(rows|columns)/, 'grid-template-$1')
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for IE
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return prefixTrackProp({ prefix, prop })
|
||||
}
|
||||
return super.prefixed(prop, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
GridRowsColumns.names = [
|
||||
'grid-template-rows',
|
||||
'grid-template-columns',
|
||||
'grid-rows',
|
||||
'grid-columns'
|
||||
]
|
||||
|
||||
module.exports = GridRowsColumns
|
||||
33
node_modules/autoprefixer/lib/hacks/grid-start.js
generated
vendored
Normal file
33
node_modules/autoprefixer/lib/hacks/grid-start.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class GridStart extends Declaration {
|
||||
/**
|
||||
* Do not add prefix for unsupported value in IE
|
||||
*/
|
||||
check(decl) {
|
||||
let value = decl.value
|
||||
return !value.includes('/') && !value.includes('span')
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a final spec property
|
||||
*/
|
||||
normalize(prop) {
|
||||
return prop.replace('-start', '')
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for IE
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
let result = super.prefixed(prop, prefix)
|
||||
if (prefix === '-ms-') {
|
||||
result = result.replace('-start', '')
|
||||
}
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
GridStart.names = ['grid-row-start', 'grid-column-start']
|
||||
|
||||
module.exports = GridStart
|
||||
84
node_modules/autoprefixer/lib/hacks/grid-template-areas.js
generated
vendored
Normal file
84
node_modules/autoprefixer/lib/hacks/grid-template-areas.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
let Declaration = require('../declaration')
|
||||
let {
|
||||
getGridGap,
|
||||
inheritGridGap,
|
||||
parseGridAreas,
|
||||
prefixTrackProp,
|
||||
prefixTrackValue,
|
||||
warnGridGap,
|
||||
warnMissedAreas
|
||||
} = require('./grid-utils')
|
||||
|
||||
function getGridRows(tpl) {
|
||||
return tpl
|
||||
.trim()
|
||||
.slice(1, -1)
|
||||
.split(/["']\s*["']?/g)
|
||||
}
|
||||
|
||||
class GridTemplateAreas extends Declaration {
|
||||
/**
|
||||
* Translate grid-template-areas to separate -ms- prefixed properties
|
||||
*/
|
||||
insert(decl, prefix, prefixes, result) {
|
||||
if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
|
||||
|
||||
let hasColumns = false
|
||||
let hasRows = false
|
||||
let parent = decl.parent
|
||||
let gap = getGridGap(decl)
|
||||
gap = inheritGridGap(decl, gap) || gap
|
||||
|
||||
// remove already prefixed rows
|
||||
// to prevent doubling prefixes
|
||||
parent.walkDecls(/-ms-grid-rows/, i => i.remove())
|
||||
|
||||
// add empty tracks to rows
|
||||
parent.walkDecls(/grid-template-(rows|columns)/, trackDecl => {
|
||||
if (trackDecl.prop === 'grid-template-rows') {
|
||||
hasRows = true
|
||||
let { prop, value } = trackDecl
|
||||
trackDecl.cloneBefore({
|
||||
prop: prefixTrackProp({ prefix, prop }),
|
||||
value: prefixTrackValue({ gap: gap.row, value })
|
||||
})
|
||||
} else {
|
||||
hasColumns = true
|
||||
}
|
||||
})
|
||||
|
||||
let gridRows = getGridRows(decl.value)
|
||||
|
||||
if (hasColumns && !hasRows && gap.row && gridRows.length > 1) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-grid-rows',
|
||||
raws: {},
|
||||
value: prefixTrackValue({
|
||||
gap: gap.row,
|
||||
value: `repeat(${gridRows.length}, auto)`
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// warnings
|
||||
warnGridGap({
|
||||
decl,
|
||||
gap,
|
||||
hasColumns,
|
||||
result
|
||||
})
|
||||
|
||||
let areas = parseGridAreas({
|
||||
gap,
|
||||
rows: gridRows
|
||||
})
|
||||
|
||||
warnMissedAreas(areas, decl, result)
|
||||
|
||||
return decl
|
||||
}
|
||||
}
|
||||
|
||||
GridTemplateAreas.names = ['grid-template-areas']
|
||||
|
||||
module.exports = GridTemplateAreas
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user