update
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"matchContext.cjs","sources":["../../src/matchContext.tsx"],"sourcesContent":["import * as React from 'react'\n\nexport const matchContext = React.createContext<string | undefined>(undefined)\n\n// N.B. this only exists so we can conditionally call useContext on it when we are not interested in the nearest match\nexport const dummyMatchContext = React.createContext<string | undefined>(\n undefined,\n)\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;AAEa,MAAA,eAAeA,iBAAM,cAAkC,MAAS;AAGtE,MAAM,oBAAoBA,iBAAM;AAAA,EACrC;AACF;;;"}
|
||||
Binary file not shown.
@@ -0,0 +1,341 @@
|
||||
let { execSync } = require('child_process')
|
||||
let escalade = require('escalade/sync')
|
||||
let { existsSync, readFileSync, writeFileSync } = require('fs')
|
||||
let { join } = require('path')
|
||||
let pico = require('picocolors')
|
||||
|
||||
const { detectEOL, detectIndent } = require('./utils')
|
||||
|
||||
function BrowserslistUpdateError(message) {
|
||||
this.name = 'BrowserslistUpdateError'
|
||||
this.message = message
|
||||
this.browserslist = true
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, BrowserslistUpdateError)
|
||||
}
|
||||
}
|
||||
|
||||
BrowserslistUpdateError.prototype = Error.prototype
|
||||
|
||||
// Check if HADOOP_HOME is set to determine if this is running in a Hadoop environment
|
||||
const IsHadoopExists = !!process.env.HADOOP_HOME
|
||||
const yarnCommand = IsHadoopExists ? 'yarnpkg' : 'yarn'
|
||||
|
||||
/* c8 ignore next 3 */
|
||||
function defaultPrint(str) {
|
||||
process.stdout.write(str)
|
||||
}
|
||||
|
||||
function detectLockfile() {
|
||||
let packageDir = escalade('.', (dir, names) => {
|
||||
return names.indexOf('package.json') !== -1 ? dir : ''
|
||||
})
|
||||
|
||||
if (!packageDir) {
|
||||
throw new BrowserslistUpdateError(
|
||||
'Cannot find package.json. ' +
|
||||
'Is this the right directory to run `npx update-browserslist-db` in?'
|
||||
)
|
||||
}
|
||||
|
||||
let lockfileNpm = join(packageDir, 'package-lock.json')
|
||||
let lockfileShrinkwrap = join(packageDir, 'npm-shrinkwrap.json')
|
||||
let lockfileYarn = join(packageDir, 'yarn.lock')
|
||||
let lockfilePnpm = join(packageDir, 'pnpm-lock.yaml')
|
||||
let lockfileBun = join(packageDir, 'bun.lock')
|
||||
let lockfileBunBinary = join(packageDir, 'bun.lockb')
|
||||
|
||||
if (existsSync(lockfilePnpm)) {
|
||||
return { file: lockfilePnpm, mode: 'pnpm' }
|
||||
} else if (existsSync(lockfileBun) || existsSync(lockfileBunBinary)) {
|
||||
return { file: lockfileBun, mode: 'bun' }
|
||||
} else if (existsSync(lockfileNpm)) {
|
||||
return { file: lockfileNpm, mode: 'npm' }
|
||||
} else if (existsSync(lockfileYarn)) {
|
||||
let lock = { file: lockfileYarn, mode: 'yarn' }
|
||||
lock.content = readFileSync(lock.file).toString()
|
||||
lock.version = /# yarn lockfile v1/.test(lock.content) ? 1 : 2
|
||||
return lock
|
||||
} else if (existsSync(lockfileShrinkwrap)) {
|
||||
return { file: lockfileShrinkwrap, mode: 'npm' }
|
||||
}
|
||||
throw new BrowserslistUpdateError(
|
||||
'No lockfile found. Run "npm install", "yarn install" or "pnpm install"'
|
||||
)
|
||||
}
|
||||
|
||||
function getLatestInfo(lock) {
|
||||
if (lock.mode === 'yarn') {
|
||||
if (lock.version === 1) {
|
||||
return JSON.parse(
|
||||
execSync(yarnCommand + ' info caniuse-lite --json').toString()
|
||||
).data
|
||||
} else {
|
||||
return JSON.parse(
|
||||
execSync(yarnCommand + ' npm info caniuse-lite --json').toString()
|
||||
)
|
||||
}
|
||||
}
|
||||
if (lock.mode === 'pnpm') {
|
||||
return JSON.parse(execSync('pnpm info caniuse-lite --json').toString())
|
||||
}
|
||||
if (lock.mode === 'bun') {
|
||||
// TO-DO: No 'bun info' yet. Created issue: https://github.com/oven-sh/bun/issues/12280
|
||||
return JSON.parse(execSync(' npm info caniuse-lite --json').toString())
|
||||
}
|
||||
|
||||
return JSON.parse(execSync('npm show caniuse-lite --json').toString())
|
||||
}
|
||||
|
||||
function getBrowsers() {
|
||||
let browserslist = require('browserslist')
|
||||
return browserslist().reduce((result, entry) => {
|
||||
if (!result[entry[0]]) {
|
||||
result[entry[0]] = []
|
||||
}
|
||||
result[entry[0]].push(entry[1])
|
||||
return result
|
||||
}, {})
|
||||
}
|
||||
|
||||
function diffBrowsers(old, current) {
|
||||
let browsers = Object.keys(old).concat(
|
||||
Object.keys(current).filter(browser => old[browser] === undefined)
|
||||
)
|
||||
return browsers
|
||||
.map(browser => {
|
||||
let oldVersions = old[browser] || []
|
||||
let currentVersions = current[browser] || []
|
||||
let common = oldVersions.filter(v => currentVersions.includes(v))
|
||||
let added = currentVersions.filter(v => !common.includes(v))
|
||||
let removed = oldVersions.filter(v => !common.includes(v))
|
||||
return removed
|
||||
.map(v => pico.red('- ' + browser + ' ' + v))
|
||||
.concat(added.map(v => pico.green('+ ' + browser + ' ' + v)))
|
||||
})
|
||||
.reduce((result, array) => result.concat(array), [])
|
||||
.join('\n')
|
||||
}
|
||||
|
||||
function updateNpmLockfile(lock, latest) {
|
||||
let metadata = { latest, versions: [] }
|
||||
let content = deletePackage(JSON.parse(lock.content), metadata)
|
||||
metadata.content = JSON.stringify(content, null, detectIndent(lock.content))
|
||||
return metadata
|
||||
}
|
||||
|
||||
function deletePackage(node, metadata) {
|
||||
if (node.dependencies) {
|
||||
if (node.dependencies['caniuse-lite']) {
|
||||
let version = node.dependencies['caniuse-lite'].version
|
||||
metadata.versions[version] = true
|
||||
delete node.dependencies['caniuse-lite']
|
||||
}
|
||||
for (let i in node.dependencies) {
|
||||
node.dependencies[i] = deletePackage(node.dependencies[i], metadata)
|
||||
}
|
||||
}
|
||||
if (node.packages) {
|
||||
for (let path in node.packages) {
|
||||
if (path.endsWith('/caniuse-lite')) {
|
||||
metadata.versions[node.packages[path].version] = true
|
||||
delete node.packages[path]
|
||||
}
|
||||
}
|
||||
}
|
||||
return node
|
||||
}
|
||||
|
||||
let yarnVersionRe = /version "(.*?)"/
|
||||
|
||||
function updateYarnLockfile(lock, latest) {
|
||||
let blocks = lock.content.split(/(\n{2,})/).map(block => {
|
||||
return block.split('\n')
|
||||
})
|
||||
let versions = {}
|
||||
blocks.forEach(lines => {
|
||||
if (lines[0].indexOf('caniuse-lite@') !== -1) {
|
||||
let match = yarnVersionRe.exec(lines[1])
|
||||
versions[match[1]] = true
|
||||
if (match[1] !== latest.version) {
|
||||
lines[1] = lines[1].replace(
|
||||
/version "[^"]+"/,
|
||||
'version "' + latest.version + '"'
|
||||
)
|
||||
lines[2] = lines[2].replace(
|
||||
/resolved "[^"]+"/,
|
||||
'resolved "' + latest.dist.tarball + '"'
|
||||
)
|
||||
if (lines.length === 4) {
|
||||
lines[3] = latest.dist.integrity
|
||||
? lines[3].replace(
|
||||
/integrity .+/,
|
||||
'integrity ' + latest.dist.integrity
|
||||
)
|
||||
: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
let content = blocks.map(lines => lines.join('\n')).join('')
|
||||
return { content, versions }
|
||||
}
|
||||
|
||||
function updateLockfile(lock, latest) {
|
||||
if (!lock.content) lock.content = readFileSync(lock.file).toString()
|
||||
|
||||
let updatedLockFile
|
||||
if (lock.mode === 'yarn') {
|
||||
updatedLockFile = updateYarnLockfile(lock, latest)
|
||||
} else {
|
||||
updatedLockFile = updateNpmLockfile(lock, latest)
|
||||
}
|
||||
updatedLockFile.content = updatedLockFile.content.replace(
|
||||
/\n/g,
|
||||
detectEOL(lock.content)
|
||||
)
|
||||
return updatedLockFile
|
||||
}
|
||||
|
||||
function updatePackageManually(print, lock, latest) {
|
||||
let lockfileData = updateLockfile(lock, latest)
|
||||
let caniuseVersions = Object.keys(lockfileData.versions).sort()
|
||||
if (caniuseVersions.length === 1 && caniuseVersions[0] === latest.version) {
|
||||
print(
|
||||
'Installed version: ' +
|
||||
pico.bold(pico.green(caniuseVersions[0])) +
|
||||
'\n' +
|
||||
pico.bold(pico.green('caniuse-lite is up to date')) +
|
||||
'\n'
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
if (caniuseVersions.length === 0) {
|
||||
caniuseVersions[0] = 'none'
|
||||
}
|
||||
print(
|
||||
'Installed version' +
|
||||
(caniuseVersions.length === 1 ? ': ' : 's: ') +
|
||||
pico.bold(pico.red(caniuseVersions.join(', '))) +
|
||||
'\n' +
|
||||
'Removing old caniuse-lite from lock file\n'
|
||||
)
|
||||
writeFileSync(lock.file, lockfileData.content)
|
||||
|
||||
let install =
|
||||
lock.mode === 'yarn' ? yarnCommand + ' add -W' : lock.mode + ' install'
|
||||
print(
|
||||
'Installing new caniuse-lite version\n' +
|
||||
pico.yellow('$ ' + install + ' caniuse-lite') +
|
||||
'\n'
|
||||
)
|
||||
try {
|
||||
execSync(install + ' caniuse-lite')
|
||||
} catch (e) /* c8 ignore start */ {
|
||||
print(
|
||||
pico.red(
|
||||
'\n' +
|
||||
e.stack +
|
||||
'\n\n' +
|
||||
'Problem with `' +
|
||||
install +
|
||||
' caniuse-lite` call. ' +
|
||||
'Run it manually.\n'
|
||||
)
|
||||
)
|
||||
process.exit(1)
|
||||
} /* c8 ignore end */
|
||||
|
||||
let del =
|
||||
lock.mode === 'yarn' ? yarnCommand + ' remove -W' : lock.mode + ' uninstall'
|
||||
print(
|
||||
'Cleaning package.json dependencies from caniuse-lite\n' +
|
||||
pico.yellow('$ ' + del + ' caniuse-lite') +
|
||||
'\n'
|
||||
)
|
||||
execSync(del + ' caniuse-lite')
|
||||
}
|
||||
|
||||
function updateWith(print, cmd) {
|
||||
print('Updating caniuse-lite version\n' + pico.yellow('$ ' + cmd) + '\n')
|
||||
try {
|
||||
execSync(cmd)
|
||||
} catch (e) /* c8 ignore start */ {
|
||||
print(pico.red(e.stdout.toString()))
|
||||
print(
|
||||
pico.red(
|
||||
'\n' +
|
||||
e.stack +
|
||||
'\n\n' +
|
||||
'Problem with `' +
|
||||
cmd +
|
||||
'` call. ' +
|
||||
'Run it manually.\n'
|
||||
)
|
||||
)
|
||||
process.exit(1)
|
||||
} /* c8 ignore end */
|
||||
}
|
||||
|
||||
module.exports = function updateDB(print = defaultPrint) {
|
||||
let lock = detectLockfile()
|
||||
let latest = getLatestInfo(lock)
|
||||
|
||||
let listError
|
||||
let oldList
|
||||
try {
|
||||
oldList = getBrowsers()
|
||||
} catch (e) {
|
||||
listError = e
|
||||
}
|
||||
|
||||
print('Latest version: ' + pico.bold(pico.green(latest.version)) + '\n')
|
||||
|
||||
if (lock.mode === 'yarn' && lock.version !== 1) {
|
||||
updateWith(print, yarnCommand + ' up -R caniuse-lite')
|
||||
} else if (lock.mode === 'pnpm') {
|
||||
updateWith(print, 'pnpm up caniuse-lite')
|
||||
} else if (lock.mode === 'bun') {
|
||||
updateWith(print, 'bun update caniuse-lite')
|
||||
} else {
|
||||
updatePackageManually(print, lock, latest)
|
||||
}
|
||||
|
||||
print('caniuse-lite has been successfully updated\n')
|
||||
|
||||
let newList
|
||||
if (!listError) {
|
||||
try {
|
||||
newList = getBrowsers()
|
||||
} catch (e) /* c8 ignore start */ {
|
||||
listError = e
|
||||
} /* c8 ignore end */
|
||||
}
|
||||
|
||||
if (listError) {
|
||||
if (listError.message.includes("Cannot find module 'browserslist'")) {
|
||||
print(
|
||||
pico.gray(
|
||||
'Install `browserslist` to your direct dependencies ' +
|
||||
'to see target browser changes\n'
|
||||
)
|
||||
)
|
||||
} else {
|
||||
print(
|
||||
pico.gray(
|
||||
'Problem with browser list retrieval.\n' +
|
||||
'Target browser changes won’t be shown.\n'
|
||||
)
|
||||
)
|
||||
}
|
||||
} else {
|
||||
let changes = diffBrowsers(oldList, newList)
|
||||
if (changes) {
|
||||
print('\nTarget browser changes:\n')
|
||||
print(changes + '\n')
|
||||
} else {
|
||||
print('\n' + pico.green('No target browser changes') + '\n')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "eslint-plugin-react-hooks",
|
||||
"description": "ESLint rules for React Hooks",
|
||||
"version": "5.2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facebook/react.git",
|
||||
"directory": "packages/eslint-plugin-react-hooks"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"cjs",
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"eslint",
|
||||
"eslint-plugin",
|
||||
"eslintplugin",
|
||||
"react"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/facebook/react/issues"
|
||||
},
|
||||
"main": "./index.js",
|
||||
"types": "./index.d.ts",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"homepage": "https://react.dev/",
|
||||
"peerDependencies": {
|
||||
"eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/eslint-parser": "^7.11.4",
|
||||
"@babel/preset-typescript": "^7.26.0",
|
||||
"@tsconfig/strictest": "^2.0.5",
|
||||
"@typescript-eslint/parser-v2": "npm:@typescript-eslint/parser@^2.26.0",
|
||||
"@typescript-eslint/parser-v3": "npm:@typescript-eslint/parser@^3.10.0",
|
||||
"@typescript-eslint/parser-v4": "npm:@typescript-eslint/parser@^4.1.0",
|
||||
"@typescript-eslint/parser-v5": "npm:@typescript-eslint/parser@^5.62.0",
|
||||
"@types/eslint": "^8.56.12",
|
||||
"@types/estree": "^1.0.6",
|
||||
"@types/estree-jsx": "^1.0.5",
|
||||
"@types/node": "^20.2.5",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"eslint-v7": "npm:eslint@^7.7.0",
|
||||
"eslint-v9": "npm:eslint@^9.0.0",
|
||||
"jest": "^29.5.0",
|
||||
"typescript": "^5.4.3"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-06/schema#",
|
||||
"$id": "http://json-schema.org/draft-06/schema#",
|
||||
"title": "Core schema meta-schema",
|
||||
"definitions": {
|
||||
"schemaArray": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": { "$ref": "#" }
|
||||
},
|
||||
"nonNegativeInteger": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"nonNegativeIntegerDefault0": {
|
||||
"allOf": [
|
||||
{ "$ref": "#/definitions/nonNegativeInteger" },
|
||||
{ "default": 0 }
|
||||
]
|
||||
},
|
||||
"simpleTypes": {
|
||||
"enum": [
|
||||
"array",
|
||||
"boolean",
|
||||
"integer",
|
||||
"null",
|
||||
"number",
|
||||
"object",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
"stringArray": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"uniqueItems": true,
|
||||
"default": []
|
||||
}
|
||||
},
|
||||
"type": ["object", "boolean"],
|
||||
"properties": {
|
||||
"$id": {
|
||||
"type": "string",
|
||||
"format": "uri-reference"
|
||||
},
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"$ref": {
|
||||
"type": "string",
|
||||
"format": "uri-reference"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": {},
|
||||
"examples": {
|
||||
"type": "array",
|
||||
"items": {}
|
||||
},
|
||||
"multipleOf": {
|
||||
"type": "number",
|
||||
"exclusiveMinimum": 0
|
||||
},
|
||||
"maximum": {
|
||||
"type": "number"
|
||||
},
|
||||
"exclusiveMaximum": {
|
||||
"type": "number"
|
||||
},
|
||||
"minimum": {
|
||||
"type": "number"
|
||||
},
|
||||
"exclusiveMinimum": {
|
||||
"type": "number"
|
||||
},
|
||||
"maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
|
||||
"minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
||||
"pattern": {
|
||||
"type": "string",
|
||||
"format": "regex"
|
||||
},
|
||||
"additionalItems": { "$ref": "#" },
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{ "$ref": "#" },
|
||||
{ "$ref": "#/definitions/schemaArray" }
|
||||
],
|
||||
"default": {}
|
||||
},
|
||||
"maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
|
||||
"minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
||||
"uniqueItems": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"contains": { "$ref": "#" },
|
||||
"maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
|
||||
"minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
||||
"required": { "$ref": "#/definitions/stringArray" },
|
||||
"additionalProperties": { "$ref": "#" },
|
||||
"definitions": {
|
||||
"type": "object",
|
||||
"additionalProperties": { "$ref": "#" },
|
||||
"default": {}
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"additionalProperties": { "$ref": "#" },
|
||||
"default": {}
|
||||
},
|
||||
"patternProperties": {
|
||||
"type": "object",
|
||||
"additionalProperties": { "$ref": "#" },
|
||||
"default": {}
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"anyOf": [
|
||||
{ "$ref": "#" },
|
||||
{ "$ref": "#/definitions/stringArray" }
|
||||
]
|
||||
}
|
||||
},
|
||||
"propertyNames": { "$ref": "#" },
|
||||
"const": {},
|
||||
"enum": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true
|
||||
},
|
||||
"type": {
|
||||
"anyOf": [
|
||||
{ "$ref": "#/definitions/simpleTypes" },
|
||||
{
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/definitions/simpleTypes" },
|
||||
"minItems": 1,
|
||||
"uniqueItems": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"format": { "type": "string" },
|
||||
"allOf": { "$ref": "#/definitions/schemaArray" },
|
||||
"anyOf": { "$ref": "#/definitions/schemaArray" },
|
||||
"oneOf": { "$ref": "#/definitions/schemaArray" },
|
||||
"not": { "$ref": "#" }
|
||||
},
|
||||
"default": {}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,73 @@
|
||||
export function getShadingPattern(IR: any): RadialAxialShadingPattern | MeshShadingPattern | DummyShadingPattern;
|
||||
export namespace PathType {
|
||||
let FILL: string;
|
||||
let STROKE: string;
|
||||
let SHADING: string;
|
||||
}
|
||||
export class TilingPattern {
|
||||
static MAX_PATTERN_SIZE: number;
|
||||
constructor(IR: any, color: any, ctx: any, canvasGraphicsFactory: any, baseTransform: any);
|
||||
operatorList: any;
|
||||
matrix: any;
|
||||
bbox: any;
|
||||
xstep: any;
|
||||
ystep: any;
|
||||
paintType: any;
|
||||
tilingType: any;
|
||||
color: any;
|
||||
ctx: any;
|
||||
canvasGraphicsFactory: any;
|
||||
baseTransform: any;
|
||||
createPatternCanvas(owner: any): {
|
||||
canvas: any;
|
||||
scaleX: any;
|
||||
scaleY: any;
|
||||
offsetX: any;
|
||||
offsetY: any;
|
||||
};
|
||||
getSizeAndScale(step: any, realOutputSize: any, scale: any): {
|
||||
scale: any;
|
||||
size: number;
|
||||
};
|
||||
clipBbox(graphics: any, x0: any, y0: any, x1: any, y1: any): void;
|
||||
setFillAndStrokeStyleToContext(graphics: any, paintType: any, color: any): void;
|
||||
getPattern(ctx: any, owner: any, inverse: any, pathType: any): any;
|
||||
}
|
||||
declare class RadialAxialShadingPattern extends BaseShadingPattern {
|
||||
constructor(IR: any);
|
||||
_type: any;
|
||||
_bbox: any;
|
||||
_colorStops: any;
|
||||
_p0: any;
|
||||
_p1: any;
|
||||
_r0: any;
|
||||
_r1: any;
|
||||
matrix: any;
|
||||
_createGradient(ctx: any): any;
|
||||
getPattern(ctx: any, owner: any, inverse: any, pathType: any): any;
|
||||
}
|
||||
declare class MeshShadingPattern extends BaseShadingPattern {
|
||||
constructor(IR: any);
|
||||
_coords: any;
|
||||
_colors: any;
|
||||
_figures: any;
|
||||
_bounds: any;
|
||||
_bbox: any;
|
||||
_background: any;
|
||||
matrix: any;
|
||||
_createMeshCanvas(combinedScale: any, backgroundColor: any, cachedCanvases: any): {
|
||||
canvas: any;
|
||||
offsetX: number;
|
||||
offsetY: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
};
|
||||
getPattern(ctx: any, owner: any, inverse: any, pathType: any): any;
|
||||
}
|
||||
declare class DummyShadingPattern extends BaseShadingPattern {
|
||||
getPattern(): string;
|
||||
}
|
||||
declare class BaseShadingPattern {
|
||||
getPattern(): void;
|
||||
}
|
||||
export {};
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "picocolors",
|
||||
"version": "1.1.1",
|
||||
"main": "./picocolors.js",
|
||||
"types": "./picocolors.d.ts",
|
||||
"browser": {
|
||||
"./picocolors.js": "./picocolors.browser.js"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"description": "The tiniest and the fastest library for terminal output formatting with ANSI colors",
|
||||
"files": [
|
||||
"picocolors.*",
|
||||
"types.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"terminal",
|
||||
"colors",
|
||||
"formatting",
|
||||
"cli",
|
||||
"console"
|
||||
],
|
||||
"author": "Alexey Raspopov",
|
||||
"repository": "alexeyraspopov/picocolors",
|
||||
"license": "ISC"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
# @babel/plugin-transform-react-jsx-self
|
||||
|
||||
> Add a __self prop to all JSX Elements
|
||||
|
||||
See our website [@babel/plugin-transform-react-jsx-self](https://babeljs.io/docs/babel-plugin-transform-react-jsx-self) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/plugin-transform-react-jsx-self
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/plugin-transform-react-jsx-self --dev
|
||||
```
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,113 @@
|
||||
{{# def.definitions }}
|
||||
{{# def.errors }}
|
||||
{{# def.setupKeyword }}
|
||||
{{# def.$data }}
|
||||
|
||||
{{## def.setExclusiveLimit:
|
||||
$exclusive = true;
|
||||
$errorKeyword = $exclusiveKeyword;
|
||||
$errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
|
||||
#}}
|
||||
|
||||
{{
|
||||
var $isMax = $keyword == 'maximum'
|
||||
, $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum'
|
||||
, $schemaExcl = it.schema[$exclusiveKeyword]
|
||||
, $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data
|
||||
, $op = $isMax ? '<' : '>'
|
||||
, $notOp = $isMax ? '>' : '<'
|
||||
, $errorKeyword = undefined;
|
||||
|
||||
if (!($isData || typeof $schema == 'number' || $schema === undefined)) {
|
||||
throw new Error($keyword + ' must be number');
|
||||
}
|
||||
if (!($isDataExcl || $schemaExcl === undefined
|
||||
|| typeof $schemaExcl == 'number'
|
||||
|| typeof $schemaExcl == 'boolean')) {
|
||||
throw new Error($exclusiveKeyword + ' must be number or boolean');
|
||||
}
|
||||
}}
|
||||
|
||||
{{? $isDataExcl }}
|
||||
{{
|
||||
var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
|
||||
, $exclusive = 'exclusive' + $lvl
|
||||
, $exclType = 'exclType' + $lvl
|
||||
, $exclIsNumber = 'exclIsNumber' + $lvl
|
||||
, $opExpr = 'op' + $lvl
|
||||
, $opStr = '\' + ' + $opExpr + ' + \'';
|
||||
}}
|
||||
var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
|
||||
{{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
|
||||
|
||||
var {{=$exclusive}};
|
||||
var {{=$exclType}} = typeof {{=$schemaValueExcl}};
|
||||
if ({{=$exclType}} != 'boolean' && {{=$exclType}} != 'undefined' && {{=$exclType}} != 'number') {
|
||||
{{ var $errorKeyword = $exclusiveKeyword; }}
|
||||
{{# def.error:'_exclusiveLimit' }}
|
||||
} else if ({{# def.$dataNotType:'number' }}
|
||||
{{=$exclType}} == 'number'
|
||||
? (
|
||||
({{=$exclusive}} = {{=$schemaValue}} === undefined || {{=$schemaValueExcl}} {{=$op}}= {{=$schemaValue}})
|
||||
? {{=$data}} {{=$notOp}}= {{=$schemaValueExcl}}
|
||||
: {{=$data}} {{=$notOp}} {{=$schemaValue}}
|
||||
)
|
||||
: (
|
||||
({{=$exclusive}} = {{=$schemaValueExcl}} === true)
|
||||
? {{=$data}} {{=$notOp}}= {{=$schemaValue}}
|
||||
: {{=$data}} {{=$notOp}} {{=$schemaValue}}
|
||||
)
|
||||
|| {{=$data}} !== {{=$data}}) {
|
||||
var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}=';
|
||||
{{
|
||||
if ($schema === undefined) {
|
||||
$errorKeyword = $exclusiveKeyword;
|
||||
$errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
|
||||
$schemaValue = $schemaValueExcl;
|
||||
$isData = $isDataExcl;
|
||||
}
|
||||
}}
|
||||
{{??}}
|
||||
{{
|
||||
var $exclIsNumber = typeof $schemaExcl == 'number'
|
||||
, $opStr = $op; /*used in error*/
|
||||
}}
|
||||
|
||||
{{? $exclIsNumber && $isData }}
|
||||
{{ var $opExpr = '\'' + $opStr + '\''; /*used in error*/ }}
|
||||
if ({{# def.$dataNotType:'number' }}
|
||||
( {{=$schemaValue}} === undefined
|
||||
|| {{=$schemaExcl}} {{=$op}}= {{=$schemaValue}}
|
||||
? {{=$data}} {{=$notOp}}= {{=$schemaExcl}}
|
||||
: {{=$data}} {{=$notOp}} {{=$schemaValue}} )
|
||||
|| {{=$data}} !== {{=$data}}) {
|
||||
{{??}}
|
||||
{{
|
||||
if ($exclIsNumber && $schema === undefined) {
|
||||
{{# def.setExclusiveLimit }}
|
||||
$schemaValue = $schemaExcl;
|
||||
$notOp += '=';
|
||||
} else {
|
||||
if ($exclIsNumber)
|
||||
$schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
|
||||
|
||||
if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
|
||||
{{# def.setExclusiveLimit }}
|
||||
$notOp += '=';
|
||||
} else {
|
||||
$exclusive = false;
|
||||
$opStr += '=';
|
||||
}
|
||||
}
|
||||
|
||||
var $opExpr = '\'' + $opStr + '\''; /*used in error*/
|
||||
}}
|
||||
|
||||
if ({{# def.$dataNotType:'number' }}
|
||||
{{=$data}} {{=$notOp}} {{=$schemaValue}}
|
||||
|| {{=$data}} !== {{=$data}}) {
|
||||
{{?}}
|
||||
{{?}}
|
||||
{{ $errorKeyword = $errorKeyword || $keyword; }}
|
||||
{{# def.error:'_limit' }}
|
||||
} {{? $breakOnError }} else { {{?}}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"K D E F A B mC"},B:{"1":"0 9 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I","2":"C L M G N O P"},C:{"1":"0 9 bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC oC pC","2":"1 2 3 4 5 6 7 8 nC LC J PB K D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB ZB aB qC rC"},D:{"1":"0 9 lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC","2":"1 2 3 4 5 6 7 8 J PB K D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB","194":"fB gB hB iB jB kB"},E:{"1":"B C L M G TC FC GC xC yC zC UC VC HC 0C IC WC XC YC ZC aC 1C JC bC cC dC eC fC 2C KC gC hC iC jC 3C","2":"J PB K D E F A sC SC tC uC vC wC"},F:{"1":"0 YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"1 2 3 4 5 6 7 8 F B C G N O P QB RB 4C 5C 6C 7C FC kC 8C GC","194":"SB TB UB VB WB XB"},G:{"1":"HD ID JD KD LD MD ND OD PD QD RD SD UC VC HC TD IC WC XC YC ZC aC UD JC bC cC dC eC fC VD KC gC hC iC jC","2":"E SC 9C lC AD BD CD DD ED FD GD"},H:{"2":"WD"},I:{"2":"LC J I XD YD ZD aD lC bD cD"},J:{"2":"D A"},K:{"2":"A B C H FC kC GC"},L:{"194":"I"},M:{"1":"EC"},N:{"2":"A B"},O:{"2":"HC"},P:{"2":"J","194":"1 2 3 4 5 6 7 8 dD eD fD gD hD TC iD jD kD lD mD IC JC KC nD"},Q:{"2":"oD"},R:{"194":"pD"},S:{"1":"qD rD"}},B:5,C:"KeyboardEvent.code",D:true};
|
||||
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = filterItems;
|
||||
exports.isRequired = isRequired;
|
||||
exports.targetsSupported = targetsSupported;
|
||||
var _semver = require("semver");
|
||||
var _plugins = require("@babel/compat-data/plugins");
|
||||
var _utils = require("./utils.js");
|
||||
function targetsSupported(target, support) {
|
||||
const targetEnvironments = Object.keys(target);
|
||||
if (targetEnvironments.length === 0) {
|
||||
return false;
|
||||
}
|
||||
const unsupportedEnvironments = targetEnvironments.filter(environment => {
|
||||
const lowestImplementedVersion = (0, _utils.getLowestImplementedVersion)(support, environment);
|
||||
if (!lowestImplementedVersion) {
|
||||
return true;
|
||||
}
|
||||
const lowestTargetedVersion = target[environment];
|
||||
if ((0, _utils.isUnreleasedVersion)(lowestTargetedVersion, environment)) {
|
||||
return false;
|
||||
}
|
||||
if ((0, _utils.isUnreleasedVersion)(lowestImplementedVersion, environment)) {
|
||||
return true;
|
||||
}
|
||||
if (!_semver.valid(lowestTargetedVersion.toString())) {
|
||||
throw new Error(`Invalid version passed for target "${environment}": "${lowestTargetedVersion}". ` + "Versions must be in semver format (major.minor.patch)");
|
||||
}
|
||||
return _semver.gt((0, _utils.semverify)(lowestImplementedVersion), lowestTargetedVersion.toString());
|
||||
});
|
||||
return unsupportedEnvironments.length === 0;
|
||||
}
|
||||
function isRequired(name, targets, {
|
||||
compatData = _plugins,
|
||||
includes,
|
||||
excludes
|
||||
} = {}) {
|
||||
if (excludes != null && excludes.has(name)) return false;
|
||||
if (includes != null && includes.has(name)) return true;
|
||||
return !targetsSupported(targets, compatData[name]);
|
||||
}
|
||||
function filterItems(list, includes, excludes, targets, defaultIncludes, defaultExcludes, pluginSyntaxMap) {
|
||||
const result = new Set();
|
||||
const options = {
|
||||
compatData: list,
|
||||
includes,
|
||||
excludes
|
||||
};
|
||||
for (const item in list) {
|
||||
if (isRequired(item, targets, options)) {
|
||||
result.add(item);
|
||||
} else if (pluginSyntaxMap) {
|
||||
const shippedProposalsSyntax = pluginSyntaxMap.get(item);
|
||||
if (shippedProposalsSyntax) {
|
||||
result.add(shippedProposalsSyntax);
|
||||
}
|
||||
}
|
||||
}
|
||||
defaultIncludes == null || defaultIncludes.forEach(item => !excludes.has(item) && result.add(item));
|
||||
defaultExcludes == null || defaultExcludes.forEach(item => !includes.has(item) && result.delete(item));
|
||||
return result;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=filter-items.js.map
|
||||
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* @fileoverview Applies default rule options
|
||||
* @author JoshuaKGoldberg
|
||||
*/
|
||||
|
||||
/**
|
||||
* Check if the variable contains an object strictly rejecting arrays
|
||||
* @param {unknown} value an object
|
||||
* @returns {boolean} Whether value is an object
|
||||
*/
|
||||
function isObjectNotArray(value) {
|
||||
return typeof value === "object" && value !== null && !Array.isArray(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deeply merges second on top of first, creating a new {} object if needed.
|
||||
* @param {T} first Base, default value.
|
||||
* @param {U} second User-specified value.
|
||||
* @returns {T | U | (T & U)} Merged equivalent of second on top of first.
|
||||
*/
|
||||
function deepMergeObjects(first, second) {
|
||||
if (second === void 0) {
|
||||
return first;
|
||||
}
|
||||
|
||||
if (!isObjectNotArray(first) || !isObjectNotArray(second)) {
|
||||
return second;
|
||||
}
|
||||
|
||||
const result = { ...first, ...second };
|
||||
|
||||
for (const key of Object.keys(second)) {
|
||||
if (Object.prototype.propertyIsEnumerable.call(first, key)) {
|
||||
result[key] = deepMergeObjects(first[key], second[key]);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deeply merges second on top of first, creating a new [] array if needed.
|
||||
* @param {T[] | undefined} first Base, default values.
|
||||
* @param {U[] | undefined} second User-specified values.
|
||||
* @returns {(T | U | (T & U))[]} Merged equivalent of second on top of first.
|
||||
*/
|
||||
function deepMergeArrays(first, second) {
|
||||
if (!first || !second) {
|
||||
return second || first || [];
|
||||
}
|
||||
|
||||
return [
|
||||
...first.map((value, i) => deepMergeObjects(value, second[i])),
|
||||
...second.slice(first.length)
|
||||
];
|
||||
}
|
||||
|
||||
export { deepMergeArrays };
|
||||
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = _defineEnumerableProperties;
|
||||
function _defineEnumerableProperties(obj, descs) {
|
||||
for (var key in descs) {
|
||||
var desc = descs[key];
|
||||
desc.configurable = desc.enumerable = true;
|
||||
if ("value" in desc) desc.writable = true;
|
||||
Object.defineProperty(obj, key, desc);
|
||||
}
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var objectSymbols = Object.getOwnPropertySymbols(descs);
|
||||
for (var i = 0; i < objectSymbols.length; i++) {
|
||||
var sym = objectSymbols[i];
|
||||
desc = descs[sym];
|
||||
desc.configurable = desc.enumerable = true;
|
||||
if ("value" in desc) desc.writable = true;
|
||||
Object.defineProperty(obj, sym, desc);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=defineEnumerableProperties.js.map
|
||||
@@ -0,0 +1,24 @@
|
||||
import { Derived } from "./derived.js";
|
||||
class Effect {
|
||||
constructor(opts) {
|
||||
const { eager, fn, ...derivedProps } = opts;
|
||||
this._derived = new Derived({
|
||||
...derivedProps,
|
||||
fn: () => {
|
||||
},
|
||||
onUpdate() {
|
||||
fn();
|
||||
}
|
||||
});
|
||||
if (eager) {
|
||||
fn();
|
||||
}
|
||||
}
|
||||
mount() {
|
||||
return this._derived.mount();
|
||||
}
|
||||
}
|
||||
export {
|
||||
Effect
|
||||
};
|
||||
//# sourceMappingURL=effect.js.map
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "@types/json-schema",
|
||||
"version": "7.0.15",
|
||||
"description": "TypeScript definitions for json-schema",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Boris Cherny",
|
||||
"githubUsername": "bcherny",
|
||||
"url": "https://github.com/bcherny"
|
||||
},
|
||||
{
|
||||
"name": "Lucian Buzzo",
|
||||
"githubUsername": "lucianbuzzo",
|
||||
"url": "https://github.com/lucianbuzzo"
|
||||
},
|
||||
{
|
||||
"name": "Roland Groza",
|
||||
"githubUsername": "rolandjitsu",
|
||||
"url": "https://github.com/rolandjitsu"
|
||||
},
|
||||
{
|
||||
"name": "Jason Kwok",
|
||||
"githubUsername": "JasonHK",
|
||||
"url": "https://github.com/JasonHK"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/json-schema"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "79984fd70cd25c3f7d72b84368778c763c89728ea0073832d745d4691b705257",
|
||||
"typeScriptVersion": "4.5"
|
||||
}
|
||||
Reference in New Issue
Block a user