docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped

This commit is contained in:
TanTan committed 2026-11-13 09:27:07 +08:00
1 parent fa9c73363d
commit 2a69b23b47
18210 files changed
+5101211 -16

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"dessert.js","sources":["../../../src/icons/dessert.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Dessert\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjQiIHI9IjIiIC8+CiAgPHBhdGggZD0iTTEwLjIgMy4yQzUuNSA0IDIgOC4xIDIgMTNhMiAyIDAgMCAwIDQgMHYtMWEyIDIgMCAwIDEgNCAwdjRhMiAyIDAgMCAwIDQgMHYtNGEyIDIgMCAwIDEgNCAwdjFhMiAyIDAgMCAwIDQgMGMwLTQuOS0zLjUtOS04LjItOS44IiAvPgogIDxwYXRoIGQ9Ik0zLjIgMTQuOGE5IDkgMCAwIDAgMTcuNiAwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/dessert\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Dessert = createLucideIcon('Dessert', [\n ['circle', { cx: '12', cy: '4', r: '2', key: 'muu5ef' }],\n [\n 'path',\n {\n d: 'M10.2 3.2C5.5 4 2 8.1 2 13a2 2 0 0 0 4 0v-1a2 2 0 0 1 4 0v4a2 2 0 0 0 4 0v-4a2 2 0 0 1 4 0v1a2 2 0 0 0 4 0c0-4.9-3.5-9-8.2-9.8',\n key: 'lfo06j',\n },\n ],\n ['path', { d: 'M3.2 14.8a9 9 0 0 0 17.6 0', key: '12xarc' }],\n]);\n\nexport default Dessert;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACvD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,C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,
AnySchema,
} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_, str, Name} from "../../compile/codegen"
import {alwaysValidSchema, checkStrictMode, Type} from "../../compile/util"
export type ContainsError = ErrorObject<
"contains",
{minContains: number; maxContains?: number},
AnySchema
>
const error: KeywordErrorDefinition = {
message: ({params: {min, max}}) =>
max === undefined
? str`must contain at least ${min} valid item(s)`
: str`must contain at least ${min} and no more than ${max} valid item(s)`,
params: ({params: {min, max}}) =>
max === undefined ? _`{minContains: ${min}}` : _`{minContains: ${min}, maxContains: ${max}}`,
}
const def: CodeKeywordDefinition = {
keyword: "contains",
type: "array",
schemaType: ["object", "boolean"],
before: "uniqueItems",
trackErrors: true,
error,
code(cxt: KeywordCxt) {
const {gen, schema, parentSchema, data, it} = cxt
let min: number
let max: number | undefined
const {minContains, maxContains} = parentSchema
if (it.opts.next) {
min = minContains === undefined ? 1 : minContains
max = maxContains
} else {
min = 1
}
const len = gen.const("len", _`${data}.length`)
cxt.setParams({min, max})
if (max === undefined && min === 0) {
checkStrictMode(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`)
return
}
if (max !== undefined && min > max) {
checkStrictMode(it, `"minContains" > "maxContains" is always invalid`)
cxt.fail()
return
}
if (alwaysValidSchema(it, schema)) {
let cond = _`${len} >= ${min}`
if (max !== undefined) cond = _`${cond} && ${len} <= ${max}`
cxt.pass(cond)
return
}
it.items = true
const valid = gen.name("valid")
if (max === undefined && min === 1) {
validateItems(valid, () => gen.if(valid, () => gen.break()))
} else if (min === 0) {
gen.let(valid, true)
if (max !== undefined) gen.if(_`${data}.length > 0`, validateItemsWithCount)
} else {
gen.let(valid, false)
validateItemsWithCount()
}
cxt.result(valid, () => cxt.reset())
function validateItemsWithCount(): void {
const schValid = gen.name("_valid")
const count = gen.let("count", 0)
validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)))
}
function validateItems(_valid: Name, block: () => void): void {
gen.forRange("i", 0, len, (i) => {
cxt.subschema(
{
keyword: "contains",
dataProp: i,
dataPropType: Type.Num,
compositeRule: true,
},
_valid
)
block()
})
}
function checkLimits(count: Name): void {
gen.code(_`${count}++`)
if (max === undefined) {
gen.if(_`${count} >= ${min}`, () => gen.assign(valid, true).break())
} else {
gen.if(_`${count} > ${max}`, () => gen.assign(valid, false).break())
if (min === 1) gen.assign(valid, true)
else gen.if(_`${count} >= ${min}`, () => gen.assign(valid, true))
}
}
},
}
export default def
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Laugh = createLucideIcon("Laugh", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "M18 13a6 6 0 0 1-6 5 6 6 0 0 1-6-5h12Z", key: "b2q4dd" }],
["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
]);
export { Laugh as default };
//# sourceMappingURL=laugh.js.map
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './laptop-minimal.js';
//# sourceMappingURL=laptop-2.js.map
@@ -0,0 +1,50 @@
import { ReactiveNode } from './alien.js';
export type Selection<TSelected> = Readable<TSelected>;
export interface InteropSubscribable<T> {
subscribe: (observer: Observer<T>) => Subscription;
}
export type Observer<T> = {
next?: (value: T) => void;
error?: (err: unknown) => void;
complete?: () => void;
};
export interface Subscription {
unsubscribe: () => void;
}
export interface Subscribable<T> extends InteropSubscribable<T> {
subscribe: ((observer: Observer<T>) => Subscription) & ((next: (value: T) => void, error?: (error: any) => void, complete?: () => void) => Subscription);
}
export interface Readable<T> extends Subscribable<T> {
get: () => T;
}
export interface BaseAtom<T> extends Subscribable<T>, Readable<T> {
}
export interface InternalBaseAtom<T> extends Subscribable<T>, Readable<T> {
/** @internal */
_snapshot: T;
/** @internal */
_update: (getValue?: T | ((snapshot: T) => T)) => boolean;
}
export interface Atom<T> extends BaseAtom<T> {
/** Sets the value of the atom using a function. */
set: ((fn: (prevVal: T) => T) => void) & ((value: T) => void);
}
export interface AtomOptions<T> {
compare?: (prev: T, next: T) => boolean;
}
export type AnyAtom = BaseAtom<any>;
export interface InternalReadonlyAtom<T> extends InternalBaseAtom<T>, ReactiveNode {
}
/**
* An atom that is read-only and cannot be set.
*
* @example
*
* ```ts
* const atom = createAtom(() => 42);
* // @ts-expect-error - Cannot set a readonly atom
* atom.set(43);
* ```
*/
export interface ReadonlyAtom<T> extends BaseAtom<T> {
}
@@ -0,0 +1,13 @@
# `@humanfs/types`
by [Nicholas C. Zakas](https://humanwhocodes.com)
If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate) or [nominate me](https://stars.github.com/nominate/) for a GitHub Star.
## Description
Additional type definitions for humanfs. These are used primarily to share type definitions across packages because there is no easy way to export imported type definitions using JavaScript and JSDoc.
## License
Apache 2.0
@@ -0,0 +1,92 @@
{
"name": "@typescript-eslint/typescript-estree",
"version": "8.58.2",
"description": "A parser that converts TypeScript source code into an ESTree compatible form",
"files": [
"dist",
"!**/*.tsbuildinfo",
"README.md",
"LICENSE"
],
"type": "commonjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json",
"./use-at-your-own-risk": {
"types": "./dist/use-at-your-own-risk.d.ts",
"default": "./dist/use-at-your-own-risk.js"
}
},
"types": "./dist/index.d.ts",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/typescript-eslint/typescript-eslint.git",
"directory": "packages/typescript-estree"
},
"bugs": {
"url": "https://github.com/typescript-eslint/typescript-eslint/issues"
},
"homepage": "https://typescript-eslint.io/packages/typescript-estree",
"license": "MIT",
"keywords": [
"ast",
"estree",
"ecmascript",
"javascript",
"typescript",
"parser",
"syntax"
],
"dependencies": {
"debug": "^4.4.3",
"minimatch": "^10.2.2",
"semver": "^7.7.3",
"tinyglobby": "^0.2.15",
"ts-api-utils": "^2.5.0",
"@typescript-eslint/tsconfig-utils": "8.58.2",
"@typescript-eslint/types": "8.58.2",
"@typescript-eslint/project-service": "8.58.2",
"@typescript-eslint/visitor-keys": "8.58.2"
},
"devDependencies": {
"@vitest/coverage-v8": "^4.0.18",
"eslint": "^10.0.0",
"glob": "^11.1.0",
"rimraf": "^5.0.10",
"typescript": ">=4.8.4 <6.1.0",
"vitest": "^4.0.18",
"yaml": "^2.8.2"
},
"peerDependencies": {
"typescript": ">=4.8.4 <6.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"nx": {
"name": "typescript-estree",
"includedScripts": [
"clean"
],
"targets": {
"lint": {
"command": "eslint"
}
}
},
"scripts": {
"build": "pnpm exec nx build",
"clean": "rimraf dist/ coverage/",
"format": "pnpm -w run format",
"lint": "pnpm -w exec nx lint",
"test": "pnpm -w exec nx test",
"typecheck": "pnpm -w exec nx typecheck"
}
}
@@ -0,0 +1,6 @@
"use strict";
const daysOfYear = require("./daysOfYear-Bif7I3Cq.js");
function daysInMonth(date) {
return daysOfYear.daysOfYear(date.getFullYear())[date.getMonth()];
}
module.exports = daysInMonth;
@@ -0,0 +1 @@
{"version":3,"file":"scaling.js","sources":["../../../src/icons/scaling.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Scaling\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgM0g1YTIgMiAwIDAgMC0yIDJ2MTRhMiAyIDAgMCAwIDIgMmgxNGEyIDIgMCAwIDAgMi0ydi03IiAvPgogIDxwYXRoIGQ9Ik0xNCAxNUg5di01IiAvPgogIDxwYXRoIGQ9Ik0xNiAzaDV2NSIgLz4KICA8cGF0aCBkPSJNMjEgMyA5IDE1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/scaling\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Scaling = createLucideIcon('Scaling', [\n ['path', { d: 'M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7', key: '1m0v6g' }],\n ['path', { d: 'M14 15H9v-5', key: 'pi4jk9' }],\n ['path', { d: 'M16 3h5v5', key: '1806ms' }],\n ['path', { d: 'M21 3 9 15', key: '15kdhq' }],\n]);\n\nexport default Scaling;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,536 @@
<img width="945" alt="2017-07-26 9 27 05" src="https://user-images.githubusercontent.com/8784712/28623641-373450f4-7249-11e7-854d-1b076dab274d.png">
[![NPM version](https://img.shields.io/npm/v/cac.svg?style=flat)](https://npmjs.com/package/cac) [![NPM downloads](https://img.shields.io/npm/dm/cac.svg?style=flat)](https://npmjs.com/package/cac) [![CircleCI](https://circleci.com/gh/cacjs/cac/tree/master.svg?style=shield)](https://circleci.com/gh/cacjs/cac/tree/master) [![Codecov](https://badgen.net/codecov/c/github/cacjs/cac/master)](https://codecov.io/gh/cacjs/cac) [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/egoist/donate) [![chat](https://img.shields.io/badge/chat-on%20discord-7289DA.svg?style=flat)](https://chat.egoist.moe) [![install size](https://badgen.net/packagephobia/install/cac)](https://packagephobia.now.sh/result?p=cac)
## Introduction
**C**ommand **A**nd **C**onquer is a JavaScript library for building CLI apps.
## Features
- **Super light-weight**: No dependency, just a single file.
- **Easy to learn**. There're only 4 APIs you need to learn for building simple CLIs: `cli.option` `cli.version` `cli.help` `cli.parse`.
- **Yet so powerful**. Enable features like default command, git-like subcommands, validation for required arguments and options, variadic arguments, dot-nested options, automated help message generation and so on.
- **Developer friendly**. Written in TypeScript.
## Table of Contents
<!-- toc -->
- [Install](#install)
- [Usage](#usage)
- [Simple Parsing](#simple-parsing)
- [Display Help Message and Version](#display-help-message-and-version)
- [Command-specific Options](#command-specific-options)
- [Dash in option names](#dash-in-option-names)
- [Brackets](#brackets)
- [Negated Options](#negated-options)
- [Variadic Arguments](#variadic-arguments)
- [Dot-nested Options](#dot-nested-options)
- [Default Command](#default-command)
- [Supply an array as option value](#supply-an-array-as-option-value)
- [Error Handling](#error-handling)
- [With TypeScript](#with-typescript)
- [With Deno](#with-deno)
- [Projects Using CAC](#projects-using-cac)
- [References](#references)
- [CLI Instance](#cli-instance)
- [cac(name?)](#cacname)
- [cli.command(name, description, config?)](#clicommandname-description-config)
- [cli.option(name, description, config?)](#clioptionname-description-config)
- [cli.parse(argv?)](#cliparseargv)
- [cli.version(version, customFlags?)](#cliversionversion-customflags)
- [cli.help(callback?)](#clihelpcallback)
- [cli.outputHelp()](#clioutputhelp)
- [cli.usage(text)](#cliusagetext)
- [Command Instance](#command-instance)
- [command.option()](#commandoption)
- [command.action(callback)](#commandactioncallback)
- [command.alias(name)](#commandaliasname)
- [command.allowUnknownOptions()](#commandallowunknownoptions)
- [command.example(example)](#commandexampleexample)
- [command.usage(text)](#commandusagetext)
- [Events](#events)
- [FAQ](#faq)
- [How is the name written and pronounced?](#how-is-the-name-written-and-pronounced)
- [Why not use Commander.js?](#why-not-use-commanderjs)
- [Project Stats](#project-stats)
- [Contributing](#contributing)
- [Author](#author)
<!-- tocstop -->
## Install
```bash
yarn add cac
```
## Usage
### Simple Parsing
Use CAC as simple argument parser:
```js
// examples/basic-usage.js
const cli = require('cac')()
cli.option('--type <type>', 'Choose a project type', {
default: 'node',
})
const parsed = cli.parse()
console.log(JSON.stringify(parsed, null, 2))
```
<img width="500" alt="2018-11-26 12 28 03" src="https://user-images.githubusercontent.com/8784712/48981576-2a871000-f112-11e8-8151-80f61e9b9908.png">
### Display Help Message and Version
```js
// examples/help.js
const cli = require('cac')()
cli.option('--type [type]', 'Choose a project type', {
default: 'node',
})
cli.option('--name <name>', 'Provide your name')
cli.command('lint [...files]', 'Lint files').action((files, options) => {
console.log(files, options)
})
// Display help message when `-h` or `--help` appears
cli.help()
// Display version number when `-v` or `--version` appears
// It's also used in help message
cli.version('0.0.0')
cli.parse()
```
<img width="500" alt="2018-11-25 8 21 14" src="https://user-images.githubusercontent.com/8784712/48979012-acb20d00-f0ef-11e8-9cc6-8ffca00ab78a.png">
### Command-specific Options
You can attach options to a command.
```js
const cli = require('cac')()
cli
.command('rm <dir>', 'Remove a dir')
.option('-r, --recursive', 'Remove recursively')
.action((dir, options) => {
console.log('remove ' + dir + (options.recursive ? ' recursively' : ''))
})
cli.help()
cli.parse()
```
A command's options are validated when the command is used. Any unknown options will be reported as an error. However, if an action-based command does not define an action, then the options are not validated. If you really want to use unknown options, use [`command.allowUnknownOptions`](#commandallowunknownoptions).
<img alt="command options" width="500" src="https://user-images.githubusercontent.com/8784712/49065552-49dc8500-f259-11e8-9c7b-a7c32d70920e.png">
### Dash in option names
Options in kebab-case should be referenced in camelCase in your code:
```js
cli
.command('dev', 'Start dev server')
.option('--clear-screen', 'Clear screen')
.action((options) => {
console.log(options.clearScreen)
})
```
In fact `--clear-screen` and `--clearScreen` are both mapped to `options.clearScreen`.
### Brackets
When using brackets in command name, angled brackets indicate required command arguments, while square bracket indicate optional arguments.
When using brackets in option name, angled brackets indicate that a string / number value is required, while square bracket indicate that the value can also be `true`.
```js
const cli = require('cac')()
cli
.command('deploy <folder>', 'Deploy a folder to AWS')
.option('--scale [level]', 'Scaling level')
.action((folder, options) => {
// ...
})
cli
.command('build [project]', 'Build a project')
.option('--out <dir>', 'Output directory')
.action((folder, options) => {
// ...
})
cli.parse()
```
### Negated Options
To allow an option whose value is `false`, you need to manually specify a negated option:
```js
cli
.command('build [project]', 'Build a project')
.option('--no-config', 'Disable config file')
.option('--config <path>', 'Use a custom config file')
```
This will let CAC set the default value of `config` to true, and you can use `--no-config` flag to set it to `false`.
### Variadic Arguments
The last argument of a command can be variadic, and only the last argument. To make an argument variadic you have to add `...` to the start of argument name, just like the rest operator in JavaScript. Here is an example:
```js
const cli = require('cac')()
cli
.command('build <entry> [...otherFiles]', 'Build your app')
.option('--foo', 'Foo option')
.action((entry, otherFiles, options) => {
console.log(entry)
console.log(otherFiles)
console.log(options)
})
cli.help()
cli.parse()
```
<img width="500" alt="2018-11-25 8 25 30" src="https://user-images.githubusercontent.com/8784712/48979056-47125080-f0f0-11e8-9d8f-3219e0beb0ed.png">
### Dot-nested Options
Dot-nested options will be merged into a single option.
```js
const cli = require('cac')()
cli
.command('build', 'desc')
.option('--env <env>', 'Set envs')
.example('--env.API_SECRET xxx')
.action((options) => {
console.log(options)
})
cli.help()
cli.parse()
```
<img width="500" alt="2018-11-25 9 37 53" src="https://user-images.githubusercontent.com/8784712/48979771-6ada9400-f0fa-11e8-8192-e541b2cfd9da.png">
### Default Command
Register a command that will be used when no other command is matched.
```js
const cli = require('cac')()
cli
// Simply omit the command name, just brackets
.command('[...files]', 'Build files')
.option('--minimize', 'Minimize output')
.action((files, options) => {
console.log(files)
console.log(options.minimize)
})
cli.parse()
```
### Supply an array as option value
```bash
node cli.js --include project-a
# The parsed options will be:
# { include: 'project-a' }
node cli.js --include project-a --include project-b
# The parsed options will be:
# { include: ['project-a', 'project-b'] }
```
### Error Handling
To handle command errors globally:
```js
try {
// Parse CLI args without running the command
cli.parse(process.argv, { run: false })
// Run the command yourself
// You only need `await` when your command action returns a Promise
await cli.runMatchedCommand()
} catch (error) {
// Handle error here..
// e.g.
// console.error(error.stack)
// process.exit(1)
}
```
### With TypeScript
First you need `@types/node` to be installed as a dev dependency in your project:
```bash
yarn add @types/node --dev
```
Then everything just works out of the box:
```js
const { cac } = require('cac')
// OR ES modules
import { cac } from 'cac'
```
### With Deno
```ts
import { cac } from 'https://unpkg.com/cac/mod.ts'
const cli = cac('my-program')
```
## Projects Using CAC
Projects that use **CAC**:
- [VuePress](https://github.com/vuejs/vuepress): :memo: Minimalistic Vue-powered static site generator.
- [SAO](https://github.com/egoist/sao): ⚔️ Futuristic scaffolding tool.
- [DocPad](https://github.com/docpad/docpad): 🏹 Powerful Static Site Generator.
- [Poi](https://github.com/egoist/poi): ⚡️ Delightful web development.
- [bili](https://github.com/egoist/bili): 🥂 Schweizer Armeemesser for bundling JavaScript libraries.
- [Lad](https://github.com/ladjs/lad): 👦 Lad scaffolds a Koa webapp and API framework for Node.js.
- [Lass](https://github.com/lassjs/lass): 💁🏻 Scaffold a modern package boilerplate for Node.js.
- [Foy](https://github.com/zaaack/foy): 🏗 A lightweight and modern task runner and build tool for general purpose.
- [Vuese](https://github.com/vuese/vuese): 🤗 One-stop solution for vue component documentation.
- [NUT](https://github.com/nut-project/nut): 🌰 A framework born for microfrontends
- Feel free to add yours here...
## References
**💁 Check out [the generated docs](https://cac-api-doc.egoist.sh/classes/_cac_.cac.html) from source code if you want a more in-depth API references.**
Below is a brief overview.
### CLI Instance
CLI instance is created by invoking the `cac` function:
```js
const cac = require('cac')
const cli = cac()
```
#### cac(name?)
Create a CLI instance, optionally specify the program name which will be used to display in help and version message. When not set we use the basename of `argv[1]`.
#### cli.command(name, description, config?)
- Type: `(name: string, description: string) => Command`
Create a command instance.
The option also accepts a third argument `config` for additional command config:
- `config.allowUnknownOptions`: `boolean` Allow unknown options in this command.
- `config.ignoreOptionDefaultValue`: `boolean` Don't use the options's default value in parsed options, only display them in help message.
#### cli.option(name, description, config?)
- Type: `(name: string, description: string, config?: OptionConfig) => CLI`
Add a global option.
The option also accepts a third argument `config` for additional option config:
- `config.default`: Default value for the option.
- `config.type`: `any[]` When set to `[]`, the option value returns an array type. You can also use a conversion function such as `[String]`, which will invoke the option value with `String`.
#### cli.parse(argv?)
- Type: `(argv = process.argv) => ParsedArgv`
```ts
interface ParsedArgv {
args: string[]
options: {
[k: string]: any
}
}
```
When this method is called, `cli.rawArgs` `cli.args` `cli.options` `cli.matchedCommand` will also be available.
#### cli.version(version, customFlags?)
- Type: `(version: string, customFlags = '-v, --version') => CLI`
Output version number when `-v, --version` flag appears.
#### cli.help(callback?)
- Type: `(callback?: HelpCallback) => CLI`
Output help message when `-h, --help` flag appears.
Optional `callback` allows post-processing of help text before it is displayed:
```ts
type HelpCallback = (sections: HelpSection[]) => void
interface HelpSection {
title?: string
body: string
}
```
#### cli.outputHelp()
- Type: `() => CLI`
Output help message.
#### cli.usage(text)
- Type: `(text: string) => CLI`
Add a global usage text. This is not used by sub-commands.
### Command Instance
Command instance is created by invoking the `cli.command` method:
```js
const command = cli.command('build [...files]', 'Build given files')
```
#### command.option()
Basically the same as `cli.option` but this adds the option to specific command.
#### command.action(callback)
- Type: `(callback: ActionCallback) => Command`
Use a callback function as the command action when the command matches user inputs.
```ts
type ActionCallback = (
// Parsed CLI args
// The last arg will be an array if it's a variadic argument
...args: string | string[] | number | number[]
// Parsed CLI options
options: Options
) => any
interface Options {
[k: string]: any
}
```
#### command.alias(name)
- Type: `(name: string) => Command`
Add an alias name to this command, the `name` here can't contain brackets.
#### command.allowUnknownOptions()
- Type: `() => Command`
Allow unknown options in this command, by default CAC will log an error when unknown options are used.
#### command.example(example)
- Type: `(example: CommandExample) => Command`
Add an example which will be displayed at the end of help message.
```ts
type CommandExample = ((name: string) => string) | string
```
#### command.usage(text)
- Type: `(text: string) => Command`
Add a usage text for this command.
### Events
Listen to commands:
```js
// Listen to the `foo` command
cli.on('command:foo', () => {
// Do something
})
// Listen to the default command
cli.on('command:!', () => {
// Do something
})
// Listen to unknown commands
cli.on('command:*', () => {
console.error('Invalid command: %s', cli.args.join(' '))
process.exit(1)
})
```
## FAQ
### How is the name written and pronounced?
CAC, or cac, pronounced `C-A-C`.
This project is dedicated to our lovely C.C. sama. Maybe CAC stands for C&C as well :P
<img src="http://i.giphy.com/v3FeH4swox9mg.gif" width="400"/>
### Why not use Commander.js?
CAC is very similar to Commander.js, while the latter does not support dot nested options, i.e. something like `--env.API_SECRET foo`. Besides, you can't use unknown options in Commander.js either.
_And maybe more..._
Basically I made CAC to fulfill my own needs for building CLI apps like [Poi](https://poi.js.org), [SAO](https://sao.vercel.app) and all my CLI apps. It's small, simple but powerful :P
## Project Stats
![Alt](https://repobeats.axiom.co/api/embed/58caf6203631bcdb9bbe22f0728a0af1683dc0bb.svg 'Repobeats analytics image')
## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
## Author
**CAC** © [EGOIST](https://github.com/egoist), Released under the [MIT](./LICENSE) License.<br>
Authored and maintained by egoist with help from contributors ([list](https://github.com/cacjs/cac/contributors)).
> [Website](https://egoist.sh) · GitHub [@egoist](https://github.com/egoist) · Twitter [@\_egoistlily](https://twitter.com/_egoistlily)
@@ -0,0 +1 @@
{"version":3,"file":"accelerated-values.mjs","sources":["../../../../../src/animation/waapi/utils/accelerated-values.ts"],"sourcesContent":["/**\n * A list of values that can be hardware-accelerated.\n */\nexport const acceleratedValues = new Set<string>([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\",\n // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved\n // or until we implement support for linear() easing.\n // \"background-color\"\n])\n"],"names":[],"mappings":"AAAA;;AAEG;AACI,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAS;IAC7C,SAAS;IACT,UAAU;IACV,QAAQ;IACR,WAAW;;;;AAId,CAAA;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"helping-hand.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_readOnlyError","name","TypeError"],"sources":["../../src/helpers/readOnlyError.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nexport default function _readOnlyError(name: string) {\n throw new TypeError('\"' + name + '\" is read-only');\n}\n"],"mappings":";;;;;;AAEe,SAASA,cAAcA,CAACC,IAAY,EAAE;EACnD,MAAM,IAAIC,SAAS,CAAC,GAAG,GAAGD,IAAI,GAAG,gBAAgB,CAAC;AACpD","ignoreList":[]}
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _objectWithoutPropertiesLoose;
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
if (excluded.indexOf(key) !== -1) continue;
target[key] = source[key];
}
}
return target;
}
//# sourceMappingURL=objectWithoutPropertiesLoose.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_b","257":"_V"},B:{"1":"_XH _lH _i","513":"_FB _6F"},C:{"1":"_YO","2":"_MP"},D:{"1":"_4H _l","2":"_7 _rD","513":"_iI _SF _6F"},E:{"1":"_zP _EE _7E _hM _AO","2":"_qB","129":"_6 M ZC _DE","1026":"_gM"},F:{"1":"_pQ _h","2":"_cF _EI _O","513":"FC _HG _1J"},G:{"1":"_vI _aG _hM _NM","2":"_XB","1026":"_gM"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"16":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"16":"_A"},O:{"1":"bC"},P:{"1":"_DF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OAAO,CAAC,iBAAiB;IAwCzB,OAAO,CAAC,kBAAkB;IAe1B;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAkBrB;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAwB1B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,kBAAkB;IA6B1B,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,yBAAyB;IAYjC,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,wBAAwB;IAOhC,OAAO,CAAC,wBAAwB;IAiBhC,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,uBAAuB;IAc/B,OAAO,CAAC,yBAAyB;IAajC,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,iCAAiC;IAGzC,OAAO,CAAC,iCAAiC;IAGzC,OAAO,CAAC,6BAA6B;IAWrC,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,4BAA4B;IAOpC,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,mBAAmB;IAyB3B,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,aAAa;IAmBrB;;OAEG;IACH,OAAO,CAAC,OAAO;IAoBf,OAAO,CAAC,cAAc;IAItB;;;;OAIG;IACH,OAAO,CAAC,KAAK;IAkHb,OAAO,CAAC,MAAM;IAWd,gCAAgC;IAChC,OAAO,CAAC,kBAAkB;IAkC1B,OAAO,CAAC,aAAa;CAsBxB"}
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ArrowUpAZ = createLucideIcon("ArrowUpAZ", [
["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
["path", { d: "M7 4v16", key: "1glfcx" }],
["path", { d: "M20 8h-5", key: "1vsyxs" }],
["path", { d: "M15 10V6.5a2.5 2.5 0 0 1 5 0V10", key: "ag13bf" }],
["path", { d: "M15 14h5l-5 6h5", key: "ur5jdg" }]
]);
export { ArrowUpAZ as default };
//# sourceMappingURL=arrow-up-a-z.js.map
@@ -0,0 +1,353 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-unnecessary-type-assertion',
meta: {
type: 'suggestion',
docs: {
description: 'Disallow type assertions that do not change the type of an expression',
recommended: 'recommended',
requiresTypeChecking: true,
},
fixable: 'code',
messages: {
contextuallyUnnecessary: 'This assertion is unnecessary since the receiver accepts the original type of the expression.',
unnecessaryAssertion: 'This assertion is unnecessary since it does not change the type of the expression.',
},
schema: [
{
type: 'object',
additionalProperties: false,
properties: {
checkLiteralConstAssertions: {
type: 'boolean',
description: 'Whether to check literal const assertions.',
},
typesToIgnore: {
type: 'array',
description: 'A list of type names to ignore.',
items: {
type: 'string',
},
},
},
},
],
},
defaultOptions: [{}],
create(context, [options]) {
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
const compilerOptions = services.program.getCompilerOptions();
/**
* Returns true if there's a chance the variable has been used before a value has been assigned to it
*/
function isPossiblyUsedBeforeAssigned(node) {
const declaration = (0, util_1.getDeclaration)(services, node);
if (!declaration) {
// don't know what the declaration is for some reason, so just assume the worst
return true;
}
if (
// non-strict mode doesn't care about used before assigned errors
tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'strictNullChecks') &&
// ignore class properties as they are compile time guarded
// also ignore function arguments as they can't be used before defined
ts.isVariableDeclaration(declaration)) {
// For var declarations, we need to check whether the node
// is actually in a descendant of its declaration or not. If not,
// it may be used before defined.
// eg
// if (Math.random() < 0.5) {
// var x: number = 2;
// } else {
// x!.toFixed();
// }
if (ts.isVariableDeclarationList(declaration.parent) &&
// var
declaration.parent.flags === ts.NodeFlags.None &&
// If they are not in the same file it will not exist.
// This situation must not occur using before defined.
services.tsNodeToESTreeNodeMap.has(declaration)) {
const declaratorNode = services.tsNodeToESTreeNodeMap.get(declaration);
const scope = context.sourceCode.getScope(node);
const declaratorScope = context.sourceCode.getScope(declaratorNode);
let parentScope = declaratorScope;
while ((parentScope = parentScope.upper)) {
if (parentScope === scope) {
return true;
}
}
}
if (
// is it `const x!: number`
declaration.initializer == null &&
declaration.exclamationToken == null &&
declaration.type != null) {
// check if the defined variable type has changed since assignment
const declarationType = checker.getTypeFromTypeNode(declaration.type);
const type = (0, util_1.getConstrainedTypeAtLocation)(services, node);
if (declarationType === type &&
// `declare`s are never narrowed, so never skip them
!(ts.isVariableDeclarationList(declaration.parent) &&
ts.isVariableStatement(declaration.parent.parent) &&
tsutils.includesModifier((0, util_1.getModifiers)(declaration.parent.parent), ts.SyntaxKind.DeclareKeyword))) {
// possibly used before assigned, so just skip it
// better to false negative and skip it, than false positive and fix to compile erroring code
//
// no better way to figure this out right now
// https://github.com/Microsoft/TypeScript/issues/31124
return true;
}
}
}
return false;
}
function isConstAssertion(node) {
return (node.type === utils_1.AST_NODE_TYPES.TSTypeReference &&
node.typeName.type === utils_1.AST_NODE_TYPES.Identifier &&
node.typeName.name === 'const');
}
function isTemplateLiteralWithExpressions(expression) {
return (expression.type === utils_1.AST_NODE_TYPES.TemplateLiteral &&
expression.expressions.length !== 0);
}
function isImplicitlyNarrowedLiteralDeclaration({ expression, parent, }) {
/**
* Even on `const` variable declarations, template literals with expressions can sometimes be widened without a type assertion.
* @see https://github.com/typescript-eslint/typescript-eslint/issues/8737
*/
if (isTemplateLiteralWithExpressions(expression)) {
return false;
}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const maybeDeclarationNode = parent.parent;
return ((maybeDeclarationNode.type === utils_1.AST_NODE_TYPES.VariableDeclaration &&
maybeDeclarationNode.kind === 'const') ||
(parent.type === utils_1.AST_NODE_TYPES.PropertyDefinition && parent.readonly));
}
function isTypeUnchanged(uncast, cast) {
if (uncast === cast) {
return true;
}
if ((0, util_1.isTypeFlagSet)(uncast, ts.TypeFlags.Undefined) &&
(0, util_1.isTypeFlagSet)(cast, ts.TypeFlags.Undefined) &&
tsutils.isCompilerOptionEnabled(compilerOptions, 'exactOptionalPropertyTypes')) {
const uncastParts = tsutils
.unionConstituents(uncast)
.filter(part => !(0, util_1.isTypeFlagSet)(part, ts.TypeFlags.Undefined));
const castParts = tsutils
.unionConstituents(cast)
.filter(part => !(0, util_1.isTypeFlagSet)(part, ts.TypeFlags.Undefined));
if (uncastParts.length !== castParts.length) {
return false;
}
const uncastPartsSet = new Set(uncastParts);
return castParts.every(part => uncastPartsSet.has(part));
}
return false;
}
function isTypeLiteral(type) {
return type.isLiteral() || tsutils.isBooleanLiteralType(type);
}
function isIIFE(expression) {
return (expression.type === utils_1.AST_NODE_TYPES.CallExpression &&
(expression.callee.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression ||
expression.callee.type === utils_1.AST_NODE_TYPES.FunctionExpression));
}
function getUncastType(node) {
// Special handling for IIFE: extract the function's return type
if (isIIFE(node.expression)) {
const callee = node.expression.callee;
const functionType = services.getTypeAtLocation(callee);
const signatures = functionType.getCallSignatures();
if (signatures.length > 0) {
const returnType = checker.getReturnTypeOfSignature(signatures[0]);
// If the function has no explicit return type annotation and returns undefined,
// treat it as void (TypeScript infers () => {} as () => undefined, but it should be void)
if (callee.returnType == null &&
(0, util_1.isTypeFlagSet)(returnType, ts.TypeFlags.Undefined)) {
return checker.getVoidType();
}
return returnType;
}
}
return services.getTypeAtLocation(node.expression);
}
return {
'TSAsExpression, TSTypeAssertion'(node) {
if (options.typesToIgnore?.includes(context.sourceCode.getText(node.typeAnnotation))) {
return;
}
const castType = services.getTypeAtLocation(node);
const castTypeIsLiteral = isTypeLiteral(castType);
const typeAnnotationIsConstAssertion = isConstAssertion(node.typeAnnotation);
if (!options.checkLiteralConstAssertions &&
castTypeIsLiteral &&
typeAnnotationIsConstAssertion) {
return;
}
const uncastType = getUncastType(node);
const typeIsUnchanged = isTypeUnchanged(uncastType, castType);
const wouldSameTypeBeInferred = castTypeIsLiteral
? isImplicitlyNarrowedLiteralDeclaration(node)
: !typeAnnotationIsConstAssertion;
if (typeIsUnchanged && wouldSameTypeBeInferred) {
context.report({
node,
messageId: 'unnecessaryAssertion',
fix(fixer) {
if (node.type === utils_1.AST_NODE_TYPES.TSTypeAssertion) {
const openingAngleBracket = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(node.typeAnnotation, token => token.type === utils_1.AST_TOKEN_TYPES.Punctuator &&
token.value === '<'), util_1.NullThrowsReasons.MissingToken('<', 'type annotation'));
const closingAngleBracket = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.typeAnnotation, token => token.type === utils_1.AST_TOKEN_TYPES.Punctuator &&
token.value === '>'), util_1.NullThrowsReasons.MissingToken('>', 'type annotation'));
// < ( number ) > ( 3 + 5 )
// ^---remove---^
return fixer.removeRange([
openingAngleBracket.range[0],
closingAngleBracket.range[1],
]);
}
// `as` is always present in TSAsExpression
const asToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.expression, token => token.type === utils_1.AST_TOKEN_TYPES.Identifier &&
token.value === 'as'), util_1.NullThrowsReasons.MissingToken('>', 'type annotation'));
const tokenBeforeAs = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(asToken, {
includeComments: true,
}), util_1.NullThrowsReasons.MissingToken('comment', 'as'));
// ( 3 + 5 ) as number
// ^--remove--^
return fixer.removeRange([tokenBeforeAs.range[1], node.range[1]]);
},
});
}
// TODO - add contextually unnecessary check for this
},
TSNonNullExpression(node) {
const removeExclamationFix = fixer => {
const exclamationToken = (0, util_1.nullThrows)(context.sourceCode.getLastToken(node, token => token.value === '!'), util_1.NullThrowsReasons.MissingToken('exclamation mark', 'non-null assertion'));
return fixer.removeRange(exclamationToken.range);
};
if (node.parent.type === utils_1.AST_NODE_TYPES.AssignmentExpression &&
node.parent.operator === '=') {
if (node.parent.left === node) {
context.report({
node,
messageId: 'contextuallyUnnecessary',
fix: removeExclamationFix,
});
}
// for all other = assignments we ignore non-null checks
// this is because non-null assertions can change the type-flow of the code
// so whilst they might be unnecessary for the assignment - they are necessary
// for following code
return;
}
const originalNode = services.esTreeNodeToTSNodeMap.get(node);
const constrainedType = (0, util_1.getConstrainedTypeAtLocation)(services, node.expression);
const actualType = services.getTypeAtLocation(node.expression);
// Check both the constrained type and the actual type.
// If either is nullable, we should not report the assertion as unnecessary.
// This handles cases like generic constraints with `any` where the
// constrained type is `any` (nullable) but the actual type might be
// a type parameter that TypeScript treats nominally.
// See: https://github.com/typescript-eslint/typescript-eslint/issues/11559
const constrainedTypeIsNullable = (0, util_1.isNullableType)(constrainedType);
const actualTypeIsNullable = (0, util_1.isNullableType)(actualType);
if (!constrainedTypeIsNullable && !actualTypeIsNullable) {
if (node.expression.type === utils_1.AST_NODE_TYPES.Identifier &&
isPossiblyUsedBeforeAssigned(node.expression)) {
return;
}
context.report({
node,
messageId: 'unnecessaryAssertion',
fix: removeExclamationFix,
});
}
else {
// we know it's a nullable type
// so figure out if the variable is used in a place that accepts nullable types
// If the constrained type differs from the actual type (e.g., when dealing
// with unresolved generic type parameters), we should not report the assertion
// as contextually unnecessary. TypeScript may still require the assertion
// even if the constraint is nullable (like `any`).
// See: https://github.com/typescript-eslint/typescript-eslint/issues/11559
if (constrainedType !== actualType) {
return;
}
const contextualType = (0, util_1.getContextualType)(checker, originalNode);
if (contextualType) {
if ((0, util_1.isTypeFlagSet)(constrainedType, ts.TypeFlags.Unknown) &&
!(0, util_1.isTypeFlagSet)(contextualType, ts.TypeFlags.Unknown)) {
return;
}
// in strict mode you can't assign null to undefined, so we have to make sure that
// the two types share a nullable type
const typeIncludesUndefined = (0, util_1.isTypeFlagSet)(constrainedType, ts.TypeFlags.Undefined);
const typeIncludesNull = (0, util_1.isTypeFlagSet)(constrainedType, ts.TypeFlags.Null);
const typeIncludesVoid = (0, util_1.isTypeFlagSet)(constrainedType, ts.TypeFlags.Void);
const contextualTypeIncludesUndefined = (0, util_1.isTypeFlagSet)(contextualType, ts.TypeFlags.Undefined);
const contextualTypeIncludesNull = (0, util_1.isTypeFlagSet)(contextualType, ts.TypeFlags.Null);
const contextualTypeIncludesVoid = (0, util_1.isTypeFlagSet)(contextualType, ts.TypeFlags.Void);
// make sure that the parent accepts the same types
// i.e. assigning `string | null | undefined` to `string | undefined` is invalid
const isValidUndefined = typeIncludesUndefined
? contextualTypeIncludesUndefined
: true;
const isValidNull = typeIncludesNull
? contextualTypeIncludesNull
: true;
const isValidVoid = typeIncludesVoid
? contextualTypeIncludesVoid
: true;
if (isValidUndefined && isValidNull && isValidVoid) {
context.report({
node,
messageId: 'contextuallyUnnecessary',
fix: removeExclamationFix,
});
}
}
}
},
};
},
});
@@ -0,0 +1,326 @@
export default `tlf2a 3 3 8 -1 18 0 0 0
===============================================================================
This is emboss.tlf, or “Emboss”, by Sam Hocevar <sam@hocevar.net>. It was
created on September 30th, 2006.
This font is free software. It comes without any warranty, to the extent
permitted by applicable law. You can redistribute it and/or modify it under
the terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
details.
Missing characters: # $ % , ; < >
To create emboss2.tlf, use the following command:
$ sed '/@@/,$y/━┃┏┓┗┛/═║╔╗╚╝/' < emboss.tlf > emboss2.tlf
This font is part of TOIlet’s official distribution. More information
on the TOIlet website at http://caca.zoy.org/wiki/toilet
===============================================================================
@
@
@@
┃!
┛!
┛!!
┛┛"
"
""
@
@
#@@
@
@
$@@
@
@
%@@
┏┛┃ &
┃━┏┛&
━━┛ &&
┛'
'
''
┛(
┃ (
┛((
━ )
┃)
━ ))
┛ ┛*
━┏┛*
┛ ┛**
┃ +
━┏┛+
┛ ++
@
@
,@@
-
━┛-
--
.
.
┛..
┛/
┛ /
┛ //
┏━┃0
┃┛┃0
━━┛00
━┃ 1
┃ 1
━━┛11
━━┃2
┏━┛2
━━┛22
━━┃3
━━┃3
━━┛33
┃ ┃4
━━┃4
┛44
┏━┛5
━━┃5
━━┛55
┏━┛6
┏━┃6
━━┛66
┏━┃7
┃7
┛77
┏━┃8
┏━┃8
━━┛88
┏━┃9
━━┃9
━━┛99
:
┛:
┛::
@
@
;@@
@
@
<@@
=
━━┛=
━━┛==
@
@
>@@
┏━┃?
┛?
┛ ??
┏━┃@
┃┛┛@
━━┛@@
┏━┃A
┏━┃A
┛ ┛AA
┏━ B
┏━┃B
━━ BB
┏━┛C
┃ C
━━┛CC
┏━ D
┃ ┃D
━━ DD
┏━┛E
┏━┛E
━━┛EE
┏━┛F
┏━┛F
┛ FF
┏━┛G
┃ ┃G
━━┛GG
┃ ┃H
┏━┃H
┛ ┛HH
┛I
┃I
┛II
┛J
┃J
━┛JJ
┃ ┃K
┏┛ K
┛ ┛KK
┃ L
┃ L
━━┛LL
┏┏ M
┃┃┃M
┛┛┛MM
┏━ N
┃ ┃N
┛ ┛NN
┏━┃O
┃ ┃O
━━┛OO
┏━┃p
┏━┛P
┛ PP
┏━┃ Q
┃ ┃ Q
━━━┛QQ
┏━┃R
┏┏┛R
┛ ┛RR
┏━┛S
━━┃S
━━┛SS
━┏┛T
┃ T
┛ TT
┃ ┃U
┃ ┃U
━━┛UU
┃ ┃V
┃ ┃V
┛ VV
┃┃┃W
┃┃┃W
━━┛WW
┃ ┃X
┛ X
┛ ┛XX
┃ ┃Y
━┏┛Y
┛ YY
━━┃Z
┏┛ Z
━━┛ZZ
┏┛[
┃ [
━┛[[
┛ \\
┛ \\
┛\\\\
━┃]
┃]
━┛]]
┛ ^
┛ ┛^
^^
_
_
━━┛__
┛ \`
┛\`
\`\`
┏━┃a
┏━┃a
┛ ┛aa
┏━ b
┏━┃b
━━ bb
┏━┛c
┃ c
━━┛cc
┏━ d
┃ ┃d
━━ dd
┏━┛e
┏━┛e
━━┛ee
┏━┛f
┏━┛f
┛ ff
┏━┛g
┃ ┃g
━━┛gg
┃ ┃h
┏━┃h
┛ ┛hh
┛i
┃i
┛ii
┛j
┃j
━┛jj
┃ ┃k
┏┛ k
┛ ┛kk
┃ l
┃ l
━━┛ll
┏┏ m
┃┃┃m
┛┛┛mm
┏━ n
┃ ┃n
┛ ┛nn
┏━┃o
┃ ┃o
━━┛oo
┏━┃p
┏━┛p
┛ pp
┏━┃ q
┃ ┃ q
━━━┛qq
┏━┃r
┏┏┛r
┛ ┛rr
┏━┛s
━━┃s
━━┛ss
━┏┛t
┃ t
┛ tt
┃ ┃u
┃ ┃u
━━┛uu
┃ ┃v
┃ ┃v
┛ vv
┃┃┃w
┃┃┃w
━━┛ww
┃ ┃x
┛ x
┛ ┛xx
┃ ┃y
━┏┛y
┛ yy
━━┃z
┏┛ z
━━┛zz
┏┛{
━┃ {
━┛{{
┃|
┃|
┛||
━┃ }
┏┛}
━┛ }}
┛ ┛~
┛ ┛ ~
~~
┏━┃┏━┛Ä
┏━┃┏━┛Ä
┛ ┛━━┛ÄÄ
┏━┃┏━┛Ö
┃ ┃┏━┛Ö
━━┛━━┛ÖÖ
┃ ┃┏━┛Ü
┃ ┃┏━┛Ü
━━┛━━┛ÜÜ
┏━┃┏━┛ä
┏━┃┏━┛ä
┛ ┛━━┛ää
┏━┃┏━┛ö
┃ ┃┏━┛ö
━━┛━━┛öö
┃ ┃┏━┛ü
┃ ┃┏━┛ü
━━┛━━┛üü
┏━┛┏━┛ß
━━┃━━┃ß
━━┛━━┛ßß
`
@@ -0,0 +1 @@
{"version":3,"file":"gem.js","sources":["../../../src/icons/gem.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Gem\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAzaDEybDQgNi0xMCAxM0wyIDlaIiAvPgogIDxwYXRoIGQ9Ik0xMSAzIDggOWw0IDEzIDQtMTMtMy02IiAvPgogIDxwYXRoIGQ9Ik0yIDloMjAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/gem\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Gem = createLucideIcon('Gem', [\n ['path', { d: 'M6 3h12l4 6-10 13L2 9Z', key: '1pcd5k' }],\n ['path', { d: 'M11 3 8 9l4 13 4-13-3-6', key: '1fcu3u' }],\n ['path', { d: 'M2 9h20', key: '16fsjt' }],\n]);\n\nexport default Gem;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAiB,KAAO,CAAA,CAAA,CAAA;AAAA,CAAA,CAClC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
module.exports={C:{"115":0.8402,"120":0.12533,"121":0.2321,"127":0.00464,"128":0.00464,"130":0.12069,"135":0.00464,"140":0.20425,"149":0.00928,"151":0.01857,"152":0.01857,"153":0.05106,"154":0.33887,"155":1.1605,"156":1.37867,"157":0.00928,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 123 124 125 126 129 131 132 133 134 136 137 138 139 141 142 143 144 145 146 147 148 150 158 159 160 3.5 3.6"},D:{"55":0.00464,"67":0.00928,"75":0.00464,"88":0.01393,"92":0.01857,"103":0.21817,"104":0.04642,"105":0.04642,"106":0.04178,"107":0.0557,"108":0.04642,"109":0.1764,"110":0.0557,"111":0.04642,"112":0.04178,"116":0.1439,"117":0.06499,"118":1.05373,"119":0.2878,"120":0.29709,"121":0.00464,"122":0.03249,"123":0.00464,"124":0.05106,"126":0.01393,"127":0.03714,"128":0.01393,"131":0.09284,"132":0.02785,"133":0.27852,"134":0.1439,"135":0.1764,"136":0.1764,"137":0.20425,"138":0.18104,"139":0.17175,"140":0.34351,"141":0.22282,"142":0.71487,"143":0.4085,"144":0.12533,"145":0.13926,"146":0.09748,"148":0.11605,"149":0.22282,"150":0.27852,"151":4.59094,"152":5.88606,"153":5.57968,"154":1.2487,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63 64 65 66 68 69 70 71 72 73 74 76 77 78 79 80 81 83 84 85 86 87 89 90 91 93 94 95 96 97 98 99 100 101 102 113 114 115 125 129 130 147 155 156 157"},F:{"36":0.00464,"46":0.00928,"67":0.00464,"95":0.03714,"101":0.02785,"126":0.02785,"133":0.09748,"134":0.12533,"135":1.96821,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 100 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00464,"119":0.09748,"120":0.11605,"127":0.00464,"133":0.00464,"134":0.09748,"135":0.01857,"137":0.00464,"142":0.01393,"143":0.01393,"144":0.00464,"145":0.00928,"147":0.00928,"148":0.04642,"149":0.03249,"150":0.08356,"151":0.96554,"152":2.91053,"153":3.54649,"154":0.58025,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 121 122 123 124 125 126 128 129 130 131 132 136 138 139 140 141 146"},E:{"27":0.35743,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.4 16.5 17.0 17.2 17.3 17.4 18.0 18.4 26.0 26.1 27.1 27.2 TP","15.6":0.09284,"16.3":0.00928,"16.6":0.16247,"17.1":0.03249,"17.5":0.03714,"17.6":1.05373,"18.1":0.00464,"18.2":0.0882,"18.3":0.01857,"18.5-18.7":0.03249,"26.2":0.01393,"26.3":0.02785,"26.4":0.14854,"26.5":0.12069,"26.6":1.03052},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00168,"5.0-5.1":0.00168,"6.0-6.1":0,"7.0-7.1":0.00336,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01682,"11.0-11.2":0.00168,"11.3-11.4":0.00336,"12.0-12.1":0,"12.2-12.5":0.04373,"13.0-13.1":0,"13.2":0.00841,"13.3":0,"13.4-13.7":0.00168,"14.0-14.4":0.00673,"14.5-14.8":0.01009,"15.0-15.1":0.01009,"15.2-15.3":0.00673,"15.4":0.00841,"15.5":0.01009,"15.6-15.8":0.21864,"16.0":0.01682,"16.1":0.03027,"16.2":0.01682,"16.3":0.037,"16.4":0.00841,"16.5":0.01346,"16.6-16.7":0.30442,"17.0":0.01177,"17.1":0.01682,"17.2":0.01682,"17.3":0.02523,"17.4":0.03532,"17.5":0.06896,"17.6-17.7":0.17828,"18.0":0.037,"18.1":0.074,"18.2":0.10091,"18.3":0.17492,"18.4":0.10932,"18.5-18.7":2.25876,"26.0":0.10932,"26.1":0.111,"26.2":0.28928,"26.3":0.31283,"26.4":0.22874,"26.5":1.53219,"26.6":9.45383,"27.0":0.72489,"27.1":0,"27.2":0.0185},P:{"22":0.02384,"24":0.03178,"25":0.03178,"26":0.00795,"27":0.06357,"28":0.03973,"29":0.12714,"30":2.47126,_:"4 20 21 23 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 17.0 18.0 19.0","16.0":0.01589},I:{"0":0.00535,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0.55723,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":33.3345},R:{_:"0"},M:{"0":0.64296},Q:{_:"14.9"},O:{"0":0.00536},H:{all:0}};
@@ -0,0 +1,742 @@
flf2a$ 7 7 15 0 19 0 24447 0
Author : myflix
Date : 2004/6/9 7:40:40
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
---
Font modified June 17, 2007 by patorjk
- Widened the space character.
Font modified May 26, 2012 by patorjk
- Added the 0xCA0 character.
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $##
,---. #
| | #
| .' #
| | #
`--' #
.--. #
'--' ##
#
,--. ,--. #
| | | | #
`-' `-' #
#
#
##
,--. ,--. #
,-| |-| |-.#
'-| |-| |-'#
,-| |-| |-.#
'-| |-| |-'#
`--' `--' #
##
,--. #
,-| |-. #
| | |-' #
'-| |`\ #
.--| | / #
`--| |' #
`--' ##
,--. #
.-. / / #
'-'/ / #
/ / #
/ /.-. #
/ / '-' #
`--' ##
#
,---. #
| o ,-. #
.' /_ #
| o .__) #
`---' #
##
#
,--. #
| | #
`-' #
#
#
##
#
,-. #
/ .' #
| | #
| | #
\ '. #
`-' ##
#
,-. #
'. \ #
| | #
| | #
.' / #
`-' ##
,--. #
.-,| |,-. #
_\ ' ' /_ #
(__ __) #
/ . . \ #
`-'| |`-' #
`--' ##
,--. #
| | #
,---| |---. #
'---| |---' #
| | #
`--' #
##
#
#
#
#
,--. #
'-,/ #
##
#
#
,-----. #
'-----' #
#
#
##
#
#
#
#
.--. #
'--' #
##
,--. #
/ / #
/ / #
/ / #
/ / #
/ / #
`--' ##
#
,--. #
/ \ #
| () | #
\ / #
`--' #
##
#
,--. #
/ | #
`| | #
| | #
`--' #
##
#
,---. #
'.-. \ #
.-' .' #
/ '-. #
'-----' #
##
#
,----. #
'.-. | #
.' < #
/'-' | #
`----' #
##
#
,---. #
/ | #
/ ' | #
'--| | #
`--' #
##
#
,-----. #
| .--' #
'--. `\ #
.--' / #
`----' #
##
#
,--. #
/ .' #
| .-. #
\ o | #
`---' #
##
#
,-----. #
'--, / #
.' / #
/ / #
`--' #
##
#
,---. #
| o | #
.' '. #
| o | #
`---' #
##
#
,---. #
| o \ #
`..' | #
.' / #
`--' #
##
#
#
.--. #
'--' #
.--. #
'--' #
##
#
#
.--. #
'--' #
.--. #
'-,/ #
##
#
,-. #
/ / #
/ / #
\ \ #
\ \ #
`-' ##
#
#
,---. #
'---' #
,---. #
'---' #
##
#
,-. #
\ \ #
\ \ #
/ / #
/ / #
`-' ##
,------. #
' .--. ' #
'--' _| | #
.--' __' #
`---' #
.---. #
'---' ##
#
,----. #
' , | #
| | / #
' '--'| #
`----' #
##
#
,---. #
/ O \ #
| .-. | #
| | | | #
`--' `--' #
##
#
,-----. #
| |) /_ #
| .-. \ #
| '--' / #
`------' #
##
#
,-----. #
' .--./ #
| | #
' '--'\ #
`-----' #
##
#
,------. #
| .-. \ #
| | \ : #
| '--' / #
`-------' #
##
#
,------. #
| .---' #
| `--, #
| `---. #
`------' #
##
#
,------. #
| .---' #
| `--, #
| |` #
`--' #
##
#
,----. #
' .-./ #
| | .---. #
' '--' | #
`------' #
##
#
,--. ,--. #
| '--' | #
| .--. | #
| | | | #
`--' `--' #
##
#
,--. #
| | #
| | #
| | #
`--' #
##
#
,--. #
| | #
,--. | | #
| '-' / #
`-----' #
##
#
,--. ,--. #
| .' / #
| . ' #
| |\ \ #
`--' '--' #
##
#
,--. #
| | #
| | #
| '--. #
`-----' #
##
#
,--. ,--. #
| `.' | #
| |'.'| | #
| | | | #
`--' `--' #
##
#
,--. ,--. #
| ,'.| | #
| |' ' | #
| | ` | #
`--' `--' #
##
#
,-----. #
' .-. ' #
| | | | #
' '-' ' #
`-----' #
##
#
,------. #
| .--. ' #
| '--' | #
| | --' #
`--' #
##
#
,-----. #
' .-. ' #
| | | | #
' '-' '-. #
`-----'--' #
##
#
,------. #
| .--. ' #
| '--'.' #
| |\ \ #
`--' '--' #
##
#
,---. #
' .-' #
`. `-. #
.-' | #
`-----' #
##
#
,--------. #
'--. .--' #
| | #
| | #
`--' #
##
#
,--. ,--. #
| | | | #
| | | | #
' '-' ' #
`-----' #
##
#
,--. ,--. #
\ `.' / #
\ / #
\ / #
`-' #
##
#
,--. ,--. #
| | | | #
| |.'.| | #
| ,'. | #
'--' '--' #
##
#
,--. ,--. #
\ `.' / #
.' \ #
/ .'. \ #
'--' '--' #
##
#
,--. ,--. #
\ `.' / #
'. / #
| | #
`--' #
##
#
,-------. #
`--. / #
/ / #
/ `--. #
`-------' #
##
#
,----. #
| .-' #
| | #
| | #
| '-. #
`----' ##
,--. #
\ \ #
\ \ #
\ \ #
\ \ #
\ \ #
`--' ##
#
,----. #
`-. | #
| | #
| | #
.-' | #
`----' ##
#
,---. #
/ \ \ #
`--' `--' #
#
#
##
#
#
#
#
,----. #
'----' #
##
#
,--. #
'. \ #
`--' #
#
#
##
#
#
,--,--. #
' ,-. | #
\ '-' | #
`--`--' #
##
#
,--. #
| |-. #
| .-. ' #
| `-' | #
`---' #
##
#
#
,---. #
| .--' #
\ `--. #
`---' #
##
#
,--. #
,-| | #
' .-. | #
\ `-' | #
`---' #
##
#
#
,---. #
| .-. : #
\ --. #
`----' #
##
#
,---. #
/ .-' #
| `-, #
| .-' #
`--' #
##
#
#
,---. #
| .-. | #
' '-' ' #
.`- / #
`---' ##
#
,--. #
| ,---. #
| .-. | #
| | | | #
`--' `--' #
##
#
,--. #
`--' #
,--. #
| | #
`--' #
##
#
,--. #
`--' #
,--. #
| | #
.-' / #
'---' ##
#
,--. #
| |,-. #
| / #
| \ \ #
`--'`--' #
##
#
,--. #
| | #
| | #
| | #
`--' #
##
#
#
,--,--,--. #
| | #
| | | | #
`--`--`--' #
##
#
#
,--,--, #
| \ #
| || | #
`--''--' #
##
#
#
,---. #
| .-. | #
' '-' ' #
`---' #
##
#
#
,---. #
| .-. | #
| '-' ' #
| |-' #
`--' ##
#
#
,---. #
| .-. | #
' '-' | #
`-| | #
`--' ##
#
#
,--.--. #
| .--' #
| | #
`--' #
##
#
#
,---. #
( .-' #
.-' `) #
`----' #
##
#
,--. #
,-' '-. #
'-. .-' #
| | #
`--' #
##
#
#
,--.,--. #
| || | #
' '' ' #
`----' #
##
#
#
,--. ,--. #
\ `' / #
\ / #
`--' #
##
#
#
,--. ,--. #
| |.'.| | #
| .'. | #
'--' '--' #
##
#
#
,--. ,--. #
\ `' / #
/ /. \ #
'--' '--' #
##
#
#
,--. ,--. #
\ ' / #
\ ' #
.-' / #
`---' ##
#
#
,-----. #
`-. / #
/ `-. #
`-----' #
##
#
,--. #
| .' #
.' / #
'. \ #
| '. #
`--' ##
,--. #
| | #
| | #
| | #
| | #
| | #
`--' ##
#
,--. #
'. | #
\ `. #
/ .' #
.' | #
'--' ##
#
.--, #
.--' / #
/ ---` #
`--' #
#
##
#
,---. #
/ O \ #
| .-. | #
| | | | #
`--' `--' #
##
#
,-----. #
' .-. ' #
| | | | #
' '-' ' #
`-----' #
##
#
,--. ,--. #
| | | | #
| | | | #
' '-' ' #
`-----' #
##
#
#
,--,--. #
' ,-. | #
\ '-' | #
`--`--' #
##
#
#
,---. #
| .-. | #
' '-' ' #
`---' #
##
#
#
,--.,--. #
| || | #
' '' ' #
`----' #
##
ß#
#
#
#
#
#
##
0xCA0 KANNADA LETTER TTHA
_____)#
|____/ #
,---. #
' .-. ' #
' '-' ' #
`---' #
##
@@ -0,0 +1,7 @@
import { AnyRouter } from './router.js';
/**
* @private
* Handles hash-based scrolling after navigation completes.
* To be used in framework-specific <Transitioner> components during the onResolved event.
*/
export declare function handleHashScroll(router: AnyRouter): void;
@@ -0,0 +1,120 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "karakter", verb: "memiliki" },
file: { unit: "byte", verb: "memiliki" },
array: { unit: "item", verb: "memiliki" },
set: { unit: "item", verb: "memiliki" },
map: { unit: "item", verb: "memiliki" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const FormatDictionary: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "input",
email: "alamat email",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "tanggal dan waktu format ISO",
date: "tanggal format ISO",
time: "jam format ISO",
duration: "durasi format ISO",
ipv4: "alamat IPv4",
ipv6: "alamat IPv6",
mac: "alamat MAC",
cidrv4: "rentang alamat IPv4",
cidrv6: "rentang alamat IPv6",
base64: "string dengan enkode base64",
base64url: "string dengan enkode base64url",
json_string: "string JSON",
e164: "angka E.164",
credit_card: "nomor kartu kredit",
currency_code: "kode mata uang",
iban: "IBAN",
jwt: "JWT",
template_literal: "input",
};
const TypeDictionary: {
[k in errors.$ZodInvalidTypeExpected | (string & {})]?: string;
} = {
nan: "NaN",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Input tidak valid: diharapkan instanceof ${issue.expected}, diterima ${received}`;
}
return `Input tidak valid: diharapkan ${expected}, diterima ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Input tidak valid: diharapkan ${util.stringifyPrimitive(issue.values[0])}`;
return `Pilihan tidak valid: diharapkan salah satu dari ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Terlalu besar: diharapkan ${issue.origin ?? "value"} memiliki ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elemen"}`;
return `Terlalu besar: diharapkan ${issue.origin ?? "value"} menjadi ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Terlalu kecil: diharapkan ${issue.origin} memiliki ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Terlalu kecil: diharapkan ${issue.origin} menjadi ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`;
if (_issue.format === "ends_with") return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`;
if (_issue.format === "includes") return `String tidak valid: harus menyertakan "${_issue.includes}"`;
if (_issue.format === "regex") return `String tidak valid: harus sesuai pola ${_issue.pattern}`;
return `${FormatDictionary[_issue.format] ?? issue.format} tidak valid`;
}
case "not_multiple_of":
return `Angka tidak valid: harus kelipatan dari ${issue.divisor}`;
case "unrecognized_keys":
return `Kunci tidak dikenali ${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Kunci tidak valid di ${issue.origin}`;
case "invalid_union":
return "Input tidak valid";
case "invalid_element":
return `Nilai tidak valid di ${issue.origin}`;
default:
return `Input tidak valid`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,74 @@
import LinesAndColumns from "lines-and-columns";
import {formatTokenType} from "../parser/tokenizer/types";
export default function formatTokens(code, tokens) {
if (tokens.length === 0) {
return "";
}
const tokenKeys = Object.keys(tokens[0]).filter(
(k) => k !== "type" && k !== "value" && k !== "start" && k !== "end" && k !== "loc",
);
const typeKeys = Object.keys(tokens[0].type).filter((k) => k !== "label" && k !== "keyword");
const headings = ["Location", "Label", "Raw", ...tokenKeys, ...typeKeys];
const lines = new LinesAndColumns(code);
const rows = [headings, ...tokens.map(getTokenComponents)];
const padding = headings.map(() => 0);
for (const components of rows) {
for (let i = 0; i < components.length; i++) {
padding[i] = Math.max(padding[i], components[i].length);
}
}
return rows
.map((components) => components.map((component, i) => component.padEnd(padding[i])).join(" "))
.join("\n");
function getTokenComponents(token) {
const raw = code.slice(token.start, token.end);
return [
formatRange(token.start, token.end),
formatTokenType(token.type),
truncate(String(raw), 14),
// @ts-ignore: Intentional dynamic access by key.
...tokenKeys.map((key) => formatValue(token[key], key)),
// @ts-ignore: Intentional dynamic access by key.
...typeKeys.map((key) => formatValue(token.type[key], key)),
];
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function formatValue(value, key) {
if (value === true) {
return key;
} else if (value === false || value === null) {
return "";
} else {
return String(value);
}
}
function formatRange(start, end) {
return `${formatPos(start)}-${formatPos(end)}`;
}
function formatPos(pos) {
const location = lines.locationForIndex(pos);
if (!location) {
return "Unknown";
} else {
return `${location.line + 1}:${location.column + 1}`;
}
}
}
function truncate(s, length) {
if (s.length > length) {
return `${s.slice(0, length - 3)}...`;
} else {
return s;
}
}
@@ -0,0 +1,718 @@
flf2a$ 7 7 20 -1 3
banner3 by Merlin Greywolf merlin@brahms.udel.edu
August 9, 1994
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@@
####$@
####$@
####$@
## $@
$@
####$@
####$@@
#### ####$@
#### ####$@
## ## $@
$ $@
$ $@
$@
$@@
## ## $@
## ## $@
#########$@
## ## $@
#########$@
## ## $@
## ## $@@
######## $@
## ## ##$@
## ## $@
######## $@
## ##$@
## ## ##$@
######## $@@
##### ## $@
## ## ## $@
##### ## $@
## $@
## #####$@
## ## ##$@
## #####$@@
#### $@
## ## $@
#### $@
#### $@
## ## ##$@
## ## $@
#### ##$@@
####$@
####$@
## $@
## $@
$@
$@
$@@
###$@
## $@
## $@
## $@
## $@
## $@
###$@@
### $@
## $@
##$@
##$@
##$@
## $@
### $@@
$@
## ## $@
## ## $@
#########$@
## ## $@
## ## $@
$@@
$@
## $@
## $@
######$@
## $@
## $@
$@@
$@
$@
$@
####$@
####$@
## $@
## $@@
$@
$@
$@
#######$@
$@
$@
$@@
$@
$@
$@
$@
$@
###$@
###$@@
##$@
## $@
## $@
## $@
## $@
## $@
## $@@
##### $@
## ## $@
## ##$@
## ##$@
## ##$@
## ## $@
##### $@@
## $@
#### $@
## $@
## $@
## $@
## $@
######$@@
####### $@
## ##$@
##$@
####### $@
## $@
## $@
#########$@@
####### $@
## ##$@
##$@
####### $@
##$@
## ##$@
####### $@@
## $@
## ## $@
## ## $@
## ## $@
#########$@
## $@
## $@@
########$@
## $@
## $@
####### $@
##$@
## ##$@
###### $@@
####### $@
## ##$@
## $@
######## $@
## ##$@
## ##$@
####### $@@
########$@
## ##$@
## $@
## $@
## $@
## $@
## $@@
####### $@
## ##$@
## ##$@
####### $@
## ##$@
## ##$@
####### $@@
####### $@
## ##$@
## ##$@
########$@
##$@
## ##$@
####### $@@
## $@
####$@
## $@
$@
## $@
####$@
## $@@
####$@
####$@
$@
####$@
####$@
## $@
## $@@
##$@
## $@
## $@
## $@
## $@
## $@
##$@@
$@
$@
#####$@
$@
#####$@
$@
$@@
## $@
## $@
## $@
##$@
## $@
## $@
## $@@
####### $@
## ##$@
## $@
### $@
## $@
$@
## $@@
####### $@
## ##$@
## ### ##$@
## ### ##$@
## ##### $@
## $@
####### $@@
### $@
## ## $@
## ## $@
## ##$@
#########$@
## ##$@
## ##$@@
######## $@
## ##$@
## ##$@
######## $@
## ##$@
## ##$@
######## $@@
###### $@
## ##$@
## $@
## $@
## $@
## ##$@
###### $@@
######## $@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
######## $@@
########$@
## $@
## $@
###### $@
## $@
## $@
########$@@
########$@
## $@
## $@
###### $@
## $@
## $@
## $@@
###### $@
## ## $@
## $@
## ####$@
## ## $@
## ## $@
###### $@@
## ##$@
## ##$@
## ##$@
#########$@
## ##$@
## ##$@
## ##$@@
####$@
## $@
## $@
## $@
## $@
## $@
####$@@
##$@
##$@
##$@
##$@
## ##$@
## ##$@
###### $@@
## ##$@
## ## $@
## ## $@
##### $@
## ## $@
## ## $@
## ##$@@
## $@
## $@
## $@
## $@
## $@
## $@
########$@@
## ##$@
### ###$@
#### ####$@
## ### ##$@
## ##$@
## ##$@
## ##$@@
## ##$@
### ##$@
#### ##$@
## ## ##$@
## ####$@
## ###$@
## ##$@@
####### $@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
####### $@@
######## $@
## ##$@
## ##$@
######## $@
## $@
## $@
## $@@
####### $@
## ##$@
## ##$@
## ##$@
## ## ##$@
## ## $@
##### ##$@@
######## $@
## ##$@
## ##$@
######## $@
## ## $@
## ## $@
## ##$@@
###### $@
## ##$@
## $@
###### $@
##$@
## ##$@
###### $@@
########$@
## $@
## $@
## $@
## $@
## $@
## $@@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
####### $@@
## ##$@
## ##$@
## ##$@
## ##$@
## ## $@
## ## $@
### $@@
## ##$@
## ## ##$@
## ## ##$@
## ## ##$@
## ## ##$@
## ## ##$@
### ### $@@
## ##$@
## ## $@
## ## $@
### $@
## ## $@
## ## $@
## ##$@@
## ##$@
## ## $@
#### $@
## $@
## $@
## $@
## $@@
########$@
## $@
## $@
## $@
## $@
## $@
########$@@
######$@
## $@
## $@
## $@
## $@
## $@
######$@@
## $@
## $@
## $@
## $@
## $@
## $@
##$@@
######$@
##$@
##$@
##$@
##$@
##$@
######$@@
### $@
## ## $@
## ##$@
$@
$@
$@
$@@
$@
$@
$@
$@
$@
$@
#######$@@
####$@
####$@
## $@
##$@
$@
$@
$@@
### $@
## ## $@
## ## $@
## ##$@
#########$@
## ##$@
## ##$@@
######## $@
## ##$@
## ##$@
######## $@
## ##$@
## ##$@
######## $@@
###### $@
## ##$@
## $@
## $@
## $@
## ##$@
###### $@@
######## $@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
######## $@@
########$@
## $@
## $@
###### $@
## $@
## $@
########$@@
########$@
## $@
## $@
###### $@
## $@
## $@
## $@@
###### $@
## ## $@
## $@
## ####$@
## ## $@
## ## $@
###### $@@
## ##$@
## ##$@
## ##$@
#########$@
## ##$@
## ##$@
## ##$@@
####$@
## $@
## $@
## $@
## $@
## $@
####$@@
##$@
##$@
##$@
##$@
## ##$@
## ##$@
###### $@@
## ##$@
## ## $@
## ## $@
##### $@
## ## $@
## ## $@
## ##$@@
## $@
## $@
## $@
## $@
## $@
## $@
########$@@
## ##$@
### ###$@
#### ####$@
## ### ##$@
## ##$@
## ##$@
## ##$@@
## ##$@
### ##$@
#### ##$@
## ## ##$@
## ####$@
## ###$@
## ##$@@
####### $@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
####### $@@
######## $@
## ##$@
## ##$@
######## $@
## $@
## $@
## $@@
####### $@
## ##$@
## ##$@
## ##$@
## ## ##$@
## ## $@
##### ##$@@
######## $@
## ##$@
## ##$@
######## $@
## ## $@
## ## $@
## ##$@@
###### $@
## ##$@
## $@
###### $@
##$@
## ##$@
###### $@@
########$@
## $@
## $@
## $@
## $@
## $@
## $@@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
## ##$@
####### $@@
## ##$@
## ##$@
## ##$@
## ##$@
## ## $@
## ## $@
### $@@
## ##$@
## ## ##$@
## ## ##$@
## ## ##$@
## ## ##$@
## ## ##$@
### ### $@@
## ##$@
## ## $@
## ## $@
### $@
## ## $@
## ## $@
## ##$@@
## ##$@
## ## $@
#### $@
## $@
## $@
## $@
## $@@
########$@
## $@
## $@
## $@
## $@
## $@
########$@@
####$@
## $@
## $@
### $@
## $@
## $@
####$@@
##$@
##$@
##$@
$@
##$@
##$@
##$@@
#### $@
## $@
## $@
###$@
## $@
## $@
#### $@@
#### $@
## ## ##$@
#### $@
$@
$@
$@
$@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Code = createLucideIcon("Code", [
["polyline", { points: "16 18 22 12 16 6", key: "z7tu5w" }],
["polyline", { points: "8 6 2 12 8 18", key: "1eg1df" }]
]);
export { Code as default };
//# sourceMappingURL=code.js.map
@@ -0,0 +1 @@
{"version":3,"file":"test-tubes.js","sources":["../../../src/icons/test-tubes.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TestTubes\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOSAydjE3LjVBMi41IDIuNSAwIDAgMSA2LjUgMjJBMi41IDIuNSAwIDAgMSA0IDE5LjVWMiIgLz4KICA8cGF0aCBkPSJNMjAgMnYxNy41YTIuNSAyLjUgMCAwIDEtMi41IDIuNWEyLjUgMi41IDAgMCAxLTIuNS0yLjVWMiIgLz4KICA8cGF0aCBkPSJNMyAyaDciIC8+CiAgPHBhdGggZD0iTTE0IDJoNyIgLz4KICA8cGF0aCBkPSJNOSAxNkg0IiAvPgogIDxwYXRoIGQ9Ik0yMCAxNmgtNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/test-tubes\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst TestTubes = createLucideIcon('TestTubes', [\n ['path', { d: 'M9 2v17.5A2.5 2.5 0 0 1 6.5 22A2.5 2.5 0 0 1 4 19.5V2', key: '1hjrqt' }],\n ['path', { d: 'M20 2v17.5a2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A,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClassNameDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class ClassNameDefinition extends DefinitionBase_1.DefinitionBase {
isTypeDefinition = true;
isVariableDefinition = true;
constructor(name, node) {
super(DefinitionType_1.DefinitionType.ClassName, name, node, null);
}
}
exports.ClassNameDefinition = ClassNameDefinition;
@@ -0,0 +1,49 @@
// TODO: this is all copy pasted from Vite - can they expose a module that exports only constants?
const KNOWN_ASSET_TYPES = [
"apng",
"bmp",
"png",
"jpe?g",
"jfif",
"pjpeg",
"pjp",
"gif",
"svg",
"ico",
"webp",
"avif",
"mp4",
"webm",
"ogg",
"mp3",
"wav",
"flac",
"aac",
"woff2?",
"eot",
"ttf",
"otf",
"webmanifest",
"pdf",
"txt"
];
const KNOWN_ASSET_RE = new RegExp(`\\.(${KNOWN_ASSET_TYPES.join("|")})$`);
const CSS_LANGS_RE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;
/**
* Prefix for resolved Ids that are not valid browser import specifiers
*/
const VALID_ID_PREFIX = `/@id/`;
/**
* Plugins that use 'virtual modules' (e.g. for helper functions), prefix the
* module ID with `\0`, a convention from the rollup ecosystem.
* This prevents other plugins from trying to process the id (like node resolution),
* and core features like sourcemaps can use this info to differentiate between
* virtual modules and regular files.
* `\0` is not a permitted char in import URLs so we have to replace them during
* import analysis. The id will be decoded back before entering the plugins pipeline.
* These encoded virtual ids are also prefixed by the VALID_ID_PREFIX, so virtual
* modules in the browser end up encoded as `/@id/__x00__{id}`
*/
const NULL_BYTE_PLACEHOLDER = `__x00__`;
export { CSS_LANGS_RE, KNOWN_ASSET_RE, KNOWN_ASSET_TYPES, NULL_BYTE_PLACEHOLDER, VALID_ID_PREFIX };
@@ -0,0 +1,34 @@
import type NameManager from "../NameManager";
import type TokenProcessor from "../TokenProcessor";
import type RootTransformer from "../transformers/RootTransformer";
export interface ClassHeaderInfo {
isExpression: boolean;
className: string | null;
hasSuperclass: boolean;
}
export interface TokenRange {
start: number;
end: number;
}
export interface FieldInfo extends TokenRange {
equalsIndex: number;
initializerName: string;
}
/**
* Information about a class returned to inform the implementation of class fields and constructor
* initializers.
*/
export interface ClassInfo {
headerInfo: ClassHeaderInfo;
constructorInitializerStatements: Array<string>;
instanceInitializerNames: Array<string>;
staticInitializerNames: Array<string>;
constructorInsertPos: number | null;
fields: Array<FieldInfo>;
rangesToRemove: Array<TokenRange>;
}
/**
* Get information about the class fields for this class, given a token processor pointing to the
* open-brace at the start of the class.
*/
export default function getClassInfo(rootTransformer: RootTransformer, tokens: TokenProcessor, nameManager: NameManager, disableESTransforms: boolean): ClassInfo;
@@ -0,0 +1,47 @@
/**
* Module dependencies.
*/
var crypto = require('crypto');
/**
* Sign the given `val` with `secret`.
*
* @param {String} val
* @param {String|NodeJS.ArrayBufferView|crypto.KeyObject} secret
* @return {String}
* @api private
*/
exports.sign = function(val, secret){
if ('string' != typeof val) throw new TypeError("Cookie value must be provided as a string.");
if (null == secret) throw new TypeError("Secret key must be provided.");
return val + '.' + crypto
.createHmac('sha256', secret)
.update(val)
.digest('base64')
.replace(/\=+$/, '');
};
/**
* Unsign and decode the given `input` with `secret`,
* returning `false` if the signature is invalid.
*
* @param {String} input
* @param {String|NodeJS.ArrayBufferView|crypto.KeyObject} secret
* @return {String|Boolean}
* @api private
*/
exports.unsign = function(input, secret){
if ('string' != typeof input) throw new TypeError("Signed cookie string must be provided.");
if (null == secret) throw new TypeError("Secret key must be provided.");
var tentativeValue = input.slice(0, input.lastIndexOf('.')),
expectedInput = exports.sign(tentativeValue, secret),
expectedBuffer = Buffer.from(expectedInput),
inputBuffer = Buffer.from(input);
return (
expectedBuffer.length === inputBuffer.length &&
crypto.timingSafeEqual(expectedBuffer, inputBuffer)
) ? tentativeValue : false;
};
@@ -0,0 +1 @@
{"version":3,"file":"heading-2.js","sources":["../../../src/icons/heading-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Heading2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxMmg4IiAvPgogIDxwYXRoIGQ9Ik00IDE4VjYiIC8+CiAgPHBhdGggZD0iTTEyIDE4VjYiIC8+CiAgPHBhdGggZD0iTTIxIDE4aC00YzAtNCA0LTMgNC02IDAtMS41LTItMi41LTQtMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/heading-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Heading2 = createLucideIcon('Heading2', [\n ['path', { d: 'M4 12h8', key: '17cfdx' }],\n ['path', { d: 'M4 18V6', key: '1rz3zl' }],\n ['path', { d: 'M12 18V6', key: 'zqpxq5' }],\n ['path', { d: 'M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1', key: '9jr5yi' }],\n]);\n\nexport default Heading2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACxE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Disc = createLucideIcon("Disc", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }]
]);
export { Disc as default };
//# sourceMappingURL=disc.js.map
@@ -0,0 +1,608 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'consistent-type-imports',
meta: {
type: 'suggestion',
docs: {
description: 'Enforce consistent usage of type imports',
},
fixable: 'code',
messages: {
avoidImportType: 'Use an `import` instead of an `import type`.',
noImportTypeAnnotations: '`import()` type annotations are forbidden.',
someImportsAreOnlyTypes: 'Imports {{typeImports}} are only used as type.',
typeOverValue: 'All imports in the declaration are only used as types. Use `import type`.',
},
schema: [
{
type: 'object',
additionalProperties: false,
properties: {
disallowTypeAnnotations: {
type: 'boolean',
description: 'Whether to disallow type imports in type annotations (`import()`).',
},
fixStyle: {
type: 'string',
description: 'The expected type modifier to be added when an import is detected as used only in the type position.',
enum: ['separate-type-imports', 'inline-type-imports'],
},
prefer: {
type: 'string',
description: 'The expected import kind for type-only imports.',
enum: ['type-imports', 'no-type-imports'],
},
},
},
],
},
defaultOptions: [
{
disallowTypeAnnotations: true,
fixStyle: 'separate-type-imports',
prefer: 'type-imports',
},
],
create(context, [option]) {
const prefer = option.prefer ?? 'type-imports';
const disallowTypeAnnotations = option.disallowTypeAnnotations !== false;
const selectors = {};
if (disallowTypeAnnotations) {
selectors.TSImportType = (node) => {
context.report({
node,
messageId: 'noImportTypeAnnotations',
});
};
}
if (prefer === 'no-type-imports') {
return {
...selectors,
'ImportDeclaration[importKind = "type"]'(node) {
context.report({
node,
messageId: 'avoidImportType',
fix(fixer) {
return fixRemoveTypeSpecifierFromImportDeclaration(fixer, node);
},
});
},
'ImportSpecifier[importKind = "type"]'(node) {
context.report({
node,
messageId: 'avoidImportType',
fix(fixer) {
return fixRemoveTypeSpecifierFromImportSpecifier(fixer, node);
},
});
},
};
}
// prefer type imports
const fixStyle = option.fixStyle ?? 'separate-type-imports';
let hasDecoratorMetadata = false;
const sourceImportsMap = {};
const emitDecoratorMetadata = (0, util_1.getParserServices)(context, true).emitDecoratorMetadata ?? false;
const experimentalDecorators = (0, util_1.getParserServices)(context, true).experimentalDecorators ?? false;
if (experimentalDecorators && emitDecoratorMetadata) {
selectors.Decorator = () => {
hasDecoratorMetadata = true;
};
}
return {
...selectors,
ImportDeclaration(node) {
const source = node.source.value;
// sourceImports is the object containing all the specifics for a particular import source, type or value
sourceImportsMap[source] ??= {
reportValueImports: [], // if there is a mismatch where type importKind but value specifiers
source,
typeOnlyNamedImport: null, // if only type imports
valueImport: null, // if only value imports
valueOnlyNamedImport: null, // if only value imports with named specifiers
};
const sourceImports = sourceImportsMap[source];
if (node.importKind === 'type') {
if (!sourceImports.typeOnlyNamedImport &&
node.specifiers.every(specifier => specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier)) {
// definitely import type { TypeX }
sourceImports.typeOnlyNamedImport = node;
}
}
else if (!sourceImports.valueOnlyNamedImport &&
node.specifiers.length &&
node.specifiers.every(specifier => specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier)) {
sourceImports.valueOnlyNamedImport = node;
sourceImports.valueImport = node;
}
else if (!sourceImports.valueImport &&
node.specifiers.some(specifier => specifier.type === utils_1.AST_NODE_TYPES.ImportDefaultSpecifier)) {
sourceImports.valueImport = node;
}
const typeSpecifiers = [];
const inlineTypeSpecifiers = [];
const valueSpecifiers = [];
const unusedSpecifiers = [];
for (const specifier of node.specifiers) {
if (specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier &&
specifier.importKind === 'type') {
inlineTypeSpecifiers.push(specifier);
continue;
}
const [variable] = context.sourceCode.getDeclaredVariables(specifier);
if (variable.references.length === 0) {
unusedSpecifiers.push(specifier);
}
else {
const onlyHasTypeReferences = variable.references.every(ref => {
/**
* keep origin import kind when export
* export { Type }
* export default Type;
* export = Type;
*/
if ((ref.identifier.parent.type ===
utils_1.AST_NODE_TYPES.ExportSpecifier ||
ref.identifier.parent.type ===
utils_1.AST_NODE_TYPES.ExportDefaultDeclaration ||
ref.identifier.parent.type ===
utils_1.AST_NODE_TYPES.TSExportAssignment) &&
ref.isValueReference &&
ref.isTypeReference) {
return node.importKind === 'type';
}
if (ref.isValueReference) {
let parent = ref.identifier.parent;
let child = ref.identifier;
while (parent) {
switch (parent.type) {
// CASE 1:
// `type T = typeof foo` will create a value reference because "foo" must be a value type
// however this value reference is safe to use with type-only imports
case utils_1.AST_NODE_TYPES.TSTypeQuery:
return true;
case utils_1.AST_NODE_TYPES.TSQualifiedName:
// TSTypeQuery must have a TSESTree.EntityName as its child, so we can filter here and break early
if (parent.left !== child) {
return false;
}
child = parent;
parent = parent.parent;
continue;
// END CASE 1
//////////////
// CASE 2:
// `type T = { [foo]: string }` will create a value reference because "foo" must be a value type
// however this value reference is safe to use with type-only imports.
// Also this is represented as a non-type AST - hence it uses MemberExpression
case utils_1.AST_NODE_TYPES.TSPropertySignature:
return parent.key === child;
case utils_1.AST_NODE_TYPES.MemberExpression:
if (parent.object !== child) {
return false;
}
child = parent;
parent = parent.parent;
continue;
// END CASE 2
default:
return false;
}
}
}
return ref.isTypeReference;
});
if (onlyHasTypeReferences) {
typeSpecifiers.push(specifier);
}
else {
valueSpecifiers.push(specifier);
}
}
}
if (node.importKind === 'value' && typeSpecifiers.length) {
sourceImports.reportValueImports.push({
node,
inlineTypeSpecifiers,
typeSpecifiers,
unusedSpecifiers,
valueSpecifiers,
});
}
},
'Program:exit'() {
if (hasDecoratorMetadata) {
// Experimental decorator metadata is bowl of poop that cannot be
// supported based on pure syntactic analysis.
//
// So we can do one of two things:
// 1) add type-information to the rule in a breaking change and
// prevent users from using it so that we can fully support this
// case.
// 2) make the rule ignore all imports that are used in a file that
// might have decorator metadata.
//
// (1) is has huge impact and prevents the rule from being used by 99%
// of users Frankly - it's a straight-up bad option. So instead we
// choose with option (2) and just avoid reporting on any imports in a
// file with both emitDecoratorMetadata AND decorators
//
// For more context see the discussion in this issue and its linked
// issues:
// https://github.com/typescript-eslint/typescript-eslint/issues/5468
//
//
// NOTE - in TS 5.0 `experimentalDecorators` became the legacy option,
// replaced with un-flagged, stable decorators and thus the type-aware
// emitDecoratorMetadata implementation also became legacy. in TS 5.2
// support for the new, stable decorator metadata proposal was added -
// however this proposal does not include type information
//
//
// PHEW. So TL;DR what does all this mean?
// - if you use experimentalDecorators:true,
// emitDecoratorMetadata:true, and have a decorator in the file -
// the rule will do nothing in the file out of an abundance of
// caution.
// - else the rule will work as normal.
return;
}
for (const sourceImports of Object.values(sourceImportsMap)) {
if (sourceImports.reportValueImports.length === 0) {
// nothing to fix. value specifiers and type specifiers are correctly written
continue;
}
for (const report of sourceImports.reportValueImports) {
if (report.valueSpecifiers.length === 0 &&
report.unusedSpecifiers.length === 0 &&
report.node.importKind !== 'type') {
/**
* checks if import has type assertions
* @example
* ```ts
* import * as type from 'mod' assert \{ type: 'json' \};
* ```
* https://github.com/typescript-eslint/typescript-eslint/issues/7527
*/
if (report.node.attributes.length === 0) {
context.report({
node: report.node,
messageId: 'typeOverValue',
*fix(fixer) {
yield* fixToTypeImportDeclaration(fixer, report, sourceImports);
},
});
}
}
else {
// we have a mixed type/value import or just value imports, so we need to split them out into multiple imports if separate-type-imports is configured
const importNames = report.typeSpecifiers.map(specifier => `"${specifier.local.name}"`);
const message = (() => {
const typeImports = (0, util_1.formatWordList)(importNames);
if (importNames.length === 1) {
return {
messageId: 'someImportsAreOnlyTypes',
data: {
typeImports,
},
};
}
return {
messageId: 'someImportsAreOnlyTypes',
data: {
typeImports,
},
};
})();
context.report({
node: report.node,
...message,
*fix(fixer) {
// take all the typeSpecifiers and put them on a new line
yield* fixToTypeImportDeclaration(fixer, report, sourceImports);
},
});
}
}
}
},
};
function classifySpecifier(node) {
const defaultSpecifier = node.specifiers[0].type === utils_1.AST_NODE_TYPES.ImportDefaultSpecifier
? node.specifiers[0]
: null;
const namespaceSpecifier = node.specifiers.find((specifier) => specifier.type === utils_1.AST_NODE_TYPES.ImportNamespaceSpecifier) ?? null;
const namedSpecifiers = node.specifiers.filter((specifier) => specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier);
return {
defaultSpecifier,
namedSpecifiers,
namespaceSpecifier,
};
}
/**
* Returns information for fixing named specifiers, type or value
*/
function getFixesNamedSpecifiers(fixer, node, subsetNamedSpecifiers, allNamedSpecifiers) {
if (allNamedSpecifiers.length === 0) {
return {
removeTypeNamedSpecifiers: [],
typeNamedSpecifiersText: '',
};
}
const typeNamedSpecifiersTexts = [];
const removeTypeNamedSpecifiers = [];
if (subsetNamedSpecifiers.length === allNamedSpecifiers.length) {
// import Foo, {Type1, Type2} from 'foo'
// import DefType, {Type1, Type2} from 'foo'
const openingBraceToken = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(subsetNamedSpecifiers[0], util_1.isOpeningBraceToken), util_1.NullThrowsReasons.MissingToken('{', node.type));
const commaToken = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(openingBraceToken, util_1.isCommaToken), util_1.NullThrowsReasons.MissingToken(',', node.type));
const closingBraceToken = (0, util_1.nullThrows)(context.sourceCode.getFirstTokenBetween(openingBraceToken, node.source, util_1.isClosingBraceToken), util_1.NullThrowsReasons.MissingToken('}', node.type));
// import DefType, {...} from 'foo'
// ^^^^^^^ remove
removeTypeNamedSpecifiers.push(fixer.removeRange([commaToken.range[0], closingBraceToken.range[1]]));
typeNamedSpecifiersTexts.push(context.sourceCode.text.slice(openingBraceToken.range[1], closingBraceToken.range[0]));
}
else {
const namedSpecifierGroups = [];
let group = [];
for (const namedSpecifier of allNamedSpecifiers) {
if (subsetNamedSpecifiers.includes(namedSpecifier)) {
group.push(namedSpecifier);
}
else if (group.length) {
namedSpecifierGroups.push(group);
group = [];
}
}
if (group.length) {
namedSpecifierGroups.push(group);
}
for (const namedSpecifiers of namedSpecifierGroups) {
const { removeRange, textRange } = getNamedSpecifierRanges(namedSpecifiers, allNamedSpecifiers);
removeTypeNamedSpecifiers.push(fixer.removeRange(removeRange));
typeNamedSpecifiersTexts.push(context.sourceCode.text.slice(...textRange));
}
}
return {
removeTypeNamedSpecifiers,
typeNamedSpecifiersText: typeNamedSpecifiersTexts.join(','),
};
}
/**
* Returns ranges for fixing named specifier.
*/
function getNamedSpecifierRanges(namedSpecifierGroup, allNamedSpecifiers) {
const first = namedSpecifierGroup[0];
const last = namedSpecifierGroup[namedSpecifierGroup.length - 1];
const removeRange = [first.range[0], last.range[1]];
const textRange = [...removeRange];
const before = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(first), util_1.NullThrowsReasons.MissingToken('token', 'first specifier'));
textRange[0] = before.range[1];
if ((0, util_1.isCommaToken)(before)) {
removeRange[0] = before.range[0];
}
else {
removeRange[0] = before.range[1];
}
const isFirst = allNamedSpecifiers[0] === first;
const isLast = allNamedSpecifiers[allNamedSpecifiers.length - 1] === last;
const after = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(last), util_1.NullThrowsReasons.MissingToken('token', 'last specifier'));
textRange[1] = after.range[0];
if ((isFirst || isLast) && (0, util_1.isCommaToken)(after)) {
removeRange[1] = after.range[1];
}
return {
removeRange,
textRange,
};
}
/**
* insert specifiers to named import node.
* e.g.
* import type { Already, Type1, Type2 } from 'foo'
* ^^^^^^^^^^^^^ insert
*/
function fixInsertNamedSpecifiersInNamedSpecifierList(fixer, target, insertText) {
const closingBraceToken = (0, util_1.nullThrows)(context.sourceCode.getFirstTokenBetween((0, util_1.nullThrows)(context.sourceCode.getFirstToken(target), util_1.NullThrowsReasons.MissingToken('token before', 'import')), target.source, util_1.isClosingBraceToken), util_1.NullThrowsReasons.MissingToken('}', target.type));
const before = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(closingBraceToken), util_1.NullThrowsReasons.MissingToken('token before', 'closing brace'));
if (!(0, util_1.isCommaToken)(before) && !(0, util_1.isOpeningBraceToken)(before)) {
insertText = `,${insertText}`;
}
return fixer.insertTextBefore(closingBraceToken, insertText);
}
/**
* insert type keyword to named import node.
* e.g.
* import ADefault, { Already, type Type1, type Type2 } from 'foo'
* ^^^^ insert
*/
function* fixInsertTypeKeywordInNamedSpecifierList(fixer, typeSpecifiers) {
for (const spec of typeSpecifiers) {
const insertText = context.sourceCode.text.slice(...spec.range);
yield fixer.replaceTextRange(spec.range, `type ${insertText}`);
}
}
function* fixInlineTypeImportDeclaration(fixer, report, sourceImports) {
const { node } = report;
// For a value import, will only add an inline type to named specifiers
const { namedSpecifiers } = classifySpecifier(node);
const typeNamedSpecifiers = namedSpecifiers.filter(specifier => report.typeSpecifiers.includes(specifier));
if (sourceImports.valueImport) {
// add import named type specifiers to its value import
// import ValueA, { type A }
// ^^^^ insert
const { namedSpecifiers: valueImportNamedSpecifiers } = classifySpecifier(sourceImports.valueImport);
if (sourceImports.valueOnlyNamedImport ||
valueImportNamedSpecifiers.length) {
yield* fixInsertTypeKeywordInNamedSpecifierList(fixer, typeNamedSpecifiers);
}
}
}
function* fixToTypeImportDeclaration(fixer, report, sourceImports) {
const { node } = report;
const { defaultSpecifier, namedSpecifiers, namespaceSpecifier } = classifySpecifier(node);
if (namespaceSpecifier && !defaultSpecifier) {
// import * as types from 'foo'
// checks for presence of import assertions
if (node.attributes.length === 0) {
yield* fixInsertTypeSpecifierForImportDeclaration(fixer, node, false);
}
return;
}
if (defaultSpecifier) {
if (report.typeSpecifiers.includes(defaultSpecifier) &&
namedSpecifiers.length === 0 &&
!namespaceSpecifier) {
// import Type from 'foo'
yield* fixInsertTypeSpecifierForImportDeclaration(fixer, node, true);
return;
}
if (fixStyle === 'inline-type-imports' &&
!report.typeSpecifiers.includes(defaultSpecifier) &&
namedSpecifiers.length > 0 &&
!namespaceSpecifier) {
// if there is a default specifier but it isn't a type specifier, then just add the inline type modifier to the named specifiers
// import AValue, {BValue, Type1, Type2} from 'foo'
yield* fixInlineTypeImportDeclaration(fixer, report, sourceImports);
return;
}
}
else if (!namespaceSpecifier) {
if (fixStyle === 'inline-type-imports' &&
namedSpecifiers.some(specifier => report.typeSpecifiers.includes(specifier))) {
// import {AValue, Type1, Type2} from 'foo'
yield* fixInlineTypeImportDeclaration(fixer, report, sourceImports);
return;
}
if (namedSpecifiers.every(specifier => report.typeSpecifiers.includes(specifier))) {
// import {Type1, Type2} from 'foo'
yield* fixInsertTypeSpecifierForImportDeclaration(fixer, node, false);
return;
}
}
const typeNamedSpecifiers = namedSpecifiers.filter(specifier => report.typeSpecifiers.includes(specifier));
const fixesNamedSpecifiers = getFixesNamedSpecifiers(fixer, node, typeNamedSpecifiers, namedSpecifiers);
const afterFixes = [];
if (typeNamedSpecifiers.length) {
if (sourceImports.typeOnlyNamedImport) {
const insertTypeNamedSpecifiers = fixInsertNamedSpecifiersInNamedSpecifierList(fixer, sourceImports.typeOnlyNamedImport, fixesNamedSpecifiers.typeNamedSpecifiersText);
if (sourceImports.typeOnlyNamedImport.range[1] <= node.range[0]) {
yield insertTypeNamedSpecifiers;
}
else {
afterFixes.push(insertTypeNamedSpecifiers);
}
}
else {
// The import is both default and named. Insert named on new line because can't mix default type import and named type imports
// eslint-disable-next-line no-lonely-if
if (fixStyle === 'inline-type-imports') {
yield fixer.insertTextBefore(node, `import {${typeNamedSpecifiers
.map(spec => {
const insertText = context.sourceCode.text.slice(...spec.range);
return `type ${insertText}`;
})
.join(', ')}} from ${context.sourceCode.getText(node.source)};\n`);
}
else {
yield fixer.insertTextBefore(node, `import type {${fixesNamedSpecifiers.typeNamedSpecifiersText}} from ${context.sourceCode.getText(node.source)};\n`);
}
}
}
const fixesRemoveTypeNamespaceSpecifier = [];
if (namespaceSpecifier &&
report.typeSpecifiers.includes(namespaceSpecifier)) {
// import Foo, * as Type from 'foo'
// import DefType, * as Type from 'foo'
// import DefType, * as Type from 'foo'
const commaToken = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(namespaceSpecifier, util_1.isCommaToken), util_1.NullThrowsReasons.MissingToken(',', node.type));
// import Def, * as Ns from 'foo'
// ^^^^^^^^^ remove
fixesRemoveTypeNamespaceSpecifier.push(fixer.removeRange([commaToken.range[0], namespaceSpecifier.range[1]]));
// import type * as Ns from 'foo'
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ insert
yield fixer.insertTextBefore(node, `import type ${context.sourceCode.getText(namespaceSpecifier)} from ${context.sourceCode.getText(node.source)};\n`);
}
if (defaultSpecifier &&
report.typeSpecifiers.includes(defaultSpecifier)) {
if (report.typeSpecifiers.length === node.specifiers.length) {
const importToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isImportKeyword), util_1.NullThrowsReasons.MissingToken('import', node.type));
// import type Type from 'foo'
// ^^^^ insert
yield fixer.insertTextAfter(importToken, ' type');
}
else {
const commaToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(defaultSpecifier, util_1.isCommaToken), util_1.NullThrowsReasons.MissingToken(',', defaultSpecifier.type));
// import Type , {...} from 'foo'
// ^^^^^ pick
const defaultText = context.sourceCode.text
.slice(defaultSpecifier.range[0], commaToken.range[0])
.trim();
yield fixer.insertTextBefore(node, `import type ${defaultText} from ${context.sourceCode.getText(node.source)};\n`);
const afterToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(commaToken, {
includeComments: true,
}), util_1.NullThrowsReasons.MissingToken('any token', node.type));
// import Type , {...} from 'foo'
// ^^^^^^^ remove
yield fixer.removeRange([
defaultSpecifier.range[0],
afterToken.range[0],
]);
}
}
yield* fixesNamedSpecifiers.removeTypeNamedSpecifiers;
yield* fixesRemoveTypeNamespaceSpecifier;
yield* afterFixes;
}
function* fixInsertTypeSpecifierForImportDeclaration(fixer, node, isDefaultImport) {
// import type Foo from 'foo'
// ^^^^^ insert
const importToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isImportKeyword), util_1.NullThrowsReasons.MissingToken('import', node.type));
yield fixer.insertTextAfter(importToken, ' type');
if (isDefaultImport) {
// Has default import
const openingBraceToken = context.sourceCode.getFirstTokenBetween(importToken, node.source, util_1.isOpeningBraceToken);
if (openingBraceToken) {
// Only braces. e.g. import Foo, {} from 'foo'
const commaToken = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(openingBraceToken, util_1.isCommaToken), util_1.NullThrowsReasons.MissingToken(',', node.type));
const closingBraceToken = (0, util_1.nullThrows)(context.sourceCode.getFirstTokenBetween(openingBraceToken, node.source, util_1.isClosingBraceToken), util_1.NullThrowsReasons.MissingToken('}', node.type));
// import type Foo, {} from 'foo'
// ^^ remove
yield fixer.removeRange([
commaToken.range[0],
closingBraceToken.range[1],
]);
const specifiersText = context.sourceCode.text.slice(commaToken.range[1], closingBraceToken.range[1]);
if (node.specifiers.length > 1) {
yield fixer.insertTextAfter(node, `\nimport type${specifiersText} from ${context.sourceCode.getText(node.source)};`);
}
}
}
// make sure we don't do anything like `import type {type T} from 'foo';`
for (const specifier of node.specifiers) {
if (specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier &&
specifier.importKind === 'type') {
yield* fixRemoveTypeSpecifierFromImportSpecifier(fixer, specifier);
}
}
}
function* fixRemoveTypeSpecifierFromImportDeclaration(fixer, node) {
// import type Foo from 'foo'
// ^^^^ remove
const importToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isImportKeyword), util_1.NullThrowsReasons.MissingToken('import', node.type));
const typeToken = (0, util_1.nullThrows)(context.sourceCode.getFirstTokenBetween(importToken, node.specifiers[0]?.local ?? node.source, util_1.isTypeKeyword), util_1.NullThrowsReasons.MissingToken('type', node.type));
const afterToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(typeToken, { includeComments: true }), util_1.NullThrowsReasons.MissingToken('any token', node.type));
yield fixer.removeRange([typeToken.range[0], afterToken.range[0]]);
}
function* fixRemoveTypeSpecifierFromImportSpecifier(fixer, node) {
// import { type Foo } from 'foo'
// ^^^^ remove
const typeToken = (0, util_1.nullThrows)(context.sourceCode.getFirstToken(node, util_1.isTypeKeyword), util_1.NullThrowsReasons.MissingToken('type', node.type));
const afterToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(typeToken, { includeComments: true }), util_1.NullThrowsReasons.MissingToken('any token', node.type));
yield fixer.removeRange([typeToken.range[0], afterToken.range[0]]);
}
},
});
@@ -0,0 +1,7 @@
import isAfter from "./isAfter.mjs";
function isSameOrBefore(date, input, unit) {
return !isAfter(date, input, unit);
}
export {
isSameOrBefore as default
};
@@ -0,0 +1 @@
{"version":3,"file":"mouse-pointer-click.js","sources":["../../../src/icons/mouse-pointer-click.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MousePointerClick\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTQgNC4xIDEyIDYiIC8+CiAgPHBhdGggZD0ibTUuMSA4LTIuOS0uOCIgLz4KICA8cGF0aCBkPSJtNiAxMi0xLjkgMiIgLz4KICA8cGF0aCBkPSJNNy4yIDIuMiA4IDUuMSIgLz4KICA8cGF0aCBkPSJNOS4wMzcgOS42OWEuNDk4LjQ5OCAwIDAgMSAuNjUzLS42NTNsMTEgNC41YS41LjUgMCAwIDEtLjA3NC45NDlsLTQuMzQ5IDEuMDQxYTEgMSAwIDAgMC0uNzQuNzM5bC0xLjA0IDQuMzVhLjUuNSAwIDAgMS0uOTUuMDc0eiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/mouse-pointer-click\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst MousePointerClick = createLucideIcon('MousePointerClick', [\n ['path', { d: 'M14 4.1 12 6', key: 'ita8i4' }],\n ['path', { d: 'm5.1 8-2.9-.8', key: '1go3kf' }],\n ['path', { d: 'm6 12-1.9 2', key: 'mnht97' }],\n ['path', { d: 'M7.2 2.2 8 5.1', key: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CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,35 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var decompress_exports = {};
__export(decompress_exports, {
default: () => decompress
});
module.exports = __toCommonJS(decompress_exports);
function decompress(encodedString) {
const decompressedArray = encodedString.split(/([A-Z])/g);
const decompressedData = [];
let last = "";
let i;
for (i = 1; i < decompressedArray.length; i += 2) {
last = last.slice(0, decompressedArray[i].charCodeAt(0) - 65) + decompressedArray[i + 1];
decompressedData.push(last);
}
return decompressedData;
}
//# sourceMappingURL=decompress.cjs.map
@@ -0,0 +1,114 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "stafi", verb: "að hafa" },
file: { unit: "bæti", verb: "að hafa" },
array: { unit: "hluti", verb: "að hafa" },
set: { unit: "hluti", verb: "að hafa" },
map: { unit: "hluti", verb: "að hafa" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "gildi",
email: "netfang",
url: "vefslóð",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO dagsetning og tími",
date: "ISO dagsetning",
time: "ISO tími",
duration: "ISO tímalengd",
ipv4: "IPv4 address",
ipv6: "IPv6 address",
mac: "MAC address",
cidrv4: "IPv4 range",
cidrv6: "IPv6 range",
base64: "base64-encoded strengur",
base64url: "base64url-encoded strengur",
json_string: "JSON strengur",
e164: "E.164 tölugildi",
credit_card: "kreditkortanúmer",
currency_code: "gjaldmiðilskóði",
iban: "IBAN",
jwt: "JWT",
template_literal: "gildi",
};
const TypeDictionary = {
nan: "NaN",
number: "númer",
array: "fylki",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Rangt gildi: Þú slóst inn ${received} þar sem á að vera instanceof ${issue.expected}`;
}
return `Rangt gildi: Þú slóst inn ${received} þar sem á að vera ${expected}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Rangt gildi: gert ráð fyrir ${util.stringifyPrimitive(issue.values[0])}`;
return `Ógilt val: má vera eitt af eftirfarandi ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Of stórt: gert er ráð fyrir að ${issue.origin ?? "gildi"} hafi ${adj}${issue.maximum.toString()} ${sizing.unit ?? "hluti"}`;
return `Of stórt: gert er ráð fyrir að ${issue.origin ?? "gildi"} sé ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Of lítið: gert er ráð fyrir að ${issue.origin} hafi ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Of lítið: gert er ráð fyrir að ${issue.origin} sé ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `Ógildur strengur: verður að byrja á "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `Ógildur strengur: verður að enda á "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Ógildur strengur: verður að innihalda "${_issue.includes}"`;
if (_issue.format === "regex")
return `Ógildur strengur: verður að fylgja mynstri ${_issue.pattern}`;
return `Rangt ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Röng tala: verður að vera margfeldi af ${issue.divisor}`;
case "unrecognized_keys":
return `Óþekkt ${issue.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Rangur lykill í ${issue.origin}`;
case "invalid_union":
return "Rangt gildi";
case "invalid_element":
return `Rangt gildi í ${issue.origin}`;
default:
return `Rangt gildi`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1 @@
{"version":3,"file":"argon2.js","sourceRoot":"","sources":["src/argon2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC3F,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EACL,OAAO,EACP,KAAK,EACL,eAAe,EACf,QAAQ,EACR,UAAU,EACV,SAAS,EACT,GAAG,EACH,EAAE,GAIH,MAAM,YAAY,CAAC;AAEpB,6FAA6F;AAC7F,6DAA6D;AAC7D,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAW,CAAC;AAG7D,oGAAoG;AACpG,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,6DAA6D;AAC7D,2CAA2C;AAC3C,MAAM,YAAY,GAAG,CAAC,GAAoB,EAAE,UAAU,GAAG,EAAE,EAAoB,EAAE;IAC/E,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,UAAU,CAAC,E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AAC;IACjD,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACjD,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAALine truncated
@@ -0,0 +1,369 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var featureBundle = require('./feature-bundle-BieBX2Jn.js');
require('motion-dom');
require('react');
require('react/jsx-runtime');
require('motion-utils');
function createMotionComponentWithFeatures(Component, options) {
return featureBundle.createMotionComponent(Component, options, featureBundle.featureBundle, featureBundle.createDomVisualElement);
}
/**
* HTML components
*/
const MotionA = /*@__PURE__*/ createMotionComponentWithFeatures("a");
const MotionAbbr = /*@__PURE__*/ createMotionComponentWithFeatures("abbr");
const MotionAddress = /*@__PURE__*/ createMotionComponentWithFeatures("address");
const MotionArea = /*@__PURE__*/ createMotionComponentWithFeatures("area");
const MotionArticle = /*@__PURE__*/ createMotionComponentWithFeatures("article");
const MotionAside = /*@__PURE__*/ createMotionComponentWithFeatures("aside");
const MotionAudio = /*@__PURE__*/ createMotionComponentWithFeatures("audio");
const MotionB = /*@__PURE__*/ createMotionComponentWithFeatures("b");
const MotionBase = /*@__PURE__*/ createMotionComponentWithFeatures("base");
const MotionBdi = /*@__PURE__*/ createMotionComponentWithFeatures("bdi");
const MotionBdo = /*@__PURE__*/ createMotionComponentWithFeatures("bdo");
const MotionBig = /*@__PURE__*/ createMotionComponentWithFeatures("big");
const MotionBlockquote =
/*@__PURE__*/ createMotionComponentWithFeatures("blockquote");
const MotionBody = /*@__PURE__*/ createMotionComponentWithFeatures("body");
const MotionButton = /*@__PURE__*/ createMotionComponentWithFeatures("button");
const MotionCanvas = /*@__PURE__*/ createMotionComponentWithFeatures("canvas");
const MotionCaption = /*@__PURE__*/ createMotionComponentWithFeatures("caption");
const MotionCite = /*@__PURE__*/ createMotionComponentWithFeatures("cite");
const MotionCode = /*@__PURE__*/ createMotionComponentWithFeatures("code");
const MotionCol = /*@__PURE__*/ createMotionComponentWithFeatures("col");
const MotionColgroup = /*@__PURE__*/ createMotionComponentWithFeatures("colgroup");
const MotionData = /*@__PURE__*/ createMotionComponentWithFeatures("data");
const MotionDatalist = /*@__PURE__*/ createMotionComponentWithFeatures("datalist");
const MotionDd = /*@__PURE__*/ createMotionComponentWithFeatures("dd");
const MotionDel = /*@__PURE__*/ createMotionComponentWithFeatures("del");
const MotionDetails = /*@__PURE__*/ createMotionComponentWithFeatures("details");
const MotionDfn = /*@__PURE__*/ createMotionComponentWithFeatures("dfn");
const MotionDialog = /*@__PURE__*/ createMotionComponentWithFeatures("dialog");
const MotionDiv = /*@__PURE__*/ createMotionComponentWithFeatures("div");
const MotionDl = /*@__PURE__*/ createMotionComponentWithFeatures("dl");
const MotionDt = /*@__PURE__*/ createMotionComponentWithFeatures("dt");
const MotionEm = /*@__PURE__*/ createMotionComponentWithFeatures("em");
const MotionEmbed = /*@__PURE__*/ createMotionComponentWithFeatures("embed");
const MotionFieldset = /*@__PURE__*/ createMotionComponentWithFeatures("fieldset");
const MotionFigcaption =
/*@__PURE__*/ createMotionComponentWithFeatures("figcaption");
const MotionFigure = /*@__PURE__*/ createMotionComponentWithFeatures("figure");
const MotionFooter = /*@__PURE__*/ createMotionComponentWithFeatures("footer");
const MotionForm = /*@__PURE__*/ createMotionComponentWithFeatures("form");
const MotionH1 = /*@__PURE__*/ createMotionComponentWithFeatures("h1");
const MotionH2 = /*@__PURE__*/ createMotionComponentWithFeatures("h2");
const MotionH3 = /*@__PURE__*/ createMotionComponentWithFeatures("h3");
const MotionH4 = /*@__PURE__*/ createMotionComponentWithFeatures("h4");
const MotionH5 = /*@__PURE__*/ createMotionComponentWithFeatures("h5");
const MotionH6 = /*@__PURE__*/ createMotionComponentWithFeatures("h6");
const MotionHead = /*@__PURE__*/ createMotionComponentWithFeatures("head");
const MotionHeader = /*@__PURE__*/ createMotionComponentWithFeatures("header");
const MotionHgroup = /*@__PURE__*/ createMotionComponentWithFeatures("hgroup");
const MotionHr = /*@__PURE__*/ createMotionComponentWithFeatures("hr");
const MotionHtml = /*@__PURE__*/ createMotionComponentWithFeatures("html");
const MotionI = /*@__PURE__*/ createMotionComponentWithFeatures("i");
const MotionIframe = /*@__PURE__*/ createMotionComponentWithFeatures("iframe");
const MotionImg = /*@__PURE__*/ createMotionComponentWithFeatures("img");
const MotionInput = /*@__PURE__*/ createMotionComponentWithFeatures("input");
const MotionIns = /*@__PURE__*/ createMotionComponentWithFeatures("ins");
const MotionKbd = /*@__PURE__*/ createMotionComponentWithFeatures("kbd");
const MotionKeygen = /*@__PURE__*/ createMotionComponentWithFeatures("keygen");
const MotionLabel = /*@__PURE__*/ createMotionComponentWithFeatures("label");
const MotionLegend = /*@__PURE__*/ createMotionComponentWithFeatures("legend");
const MotionLi = /*@__PURE__*/ createMotionComponentWithFeatures("li");
const MotionLink = /*@__PURE__*/ createMotionComponentWithFeatures("link");
const MotionMain = /*@__PURE__*/ createMotionComponentWithFeatures("main");
const MotionMap = /*@__PURE__*/ createMotionComponentWithFeatures("map");
const MotionMark = /*@__PURE__*/ createMotionComponentWithFeatures("mark");
const MotionMenu = /*@__PURE__*/ createMotionComponentWithFeatures("menu");
const MotionMenuitem = /*@__PURE__*/ createMotionComponentWithFeatures("menuitem");
const MotionMeter = /*@__PURE__*/ createMotionComponentWithFeatures("meter");
const MotionNav = /*@__PURE__*/ createMotionComponentWithFeatures("nav");
const MotionObject = /*@__PURE__*/ createMotionComponentWithFeatures("object");
const MotionOl = /*@__PURE__*/ createMotionComponentWithFeatures("ol");
const MotionOptgroup = /*@__PURE__*/ createMotionComponentWithFeatures("optgroup");
const MotionOption = /*@__PURE__*/ createMotionComponentWithFeatures("option");
const MotionOutput = /*@__PURE__*/ createMotionComponentWithFeatures("output");
const MotionP = /*@__PURE__*/ createMotionComponentWithFeatures("p");
const MotionParam = /*@__PURE__*/ createMotionComponentWithFeatures("param");
const MotionPicture = /*@__PURE__*/ createMotionComponentWithFeatures("picture");
const MotionPre = /*@__PURE__*/ createMotionComponentWithFeatures("pre");
const MotionProgress = /*@__PURE__*/ createMotionComponentWithFeatures("progress");
const MotionQ = /*@__PURE__*/ createMotionComponentWithFeatures("q");
const MotionRp = /*@__PURE__*/ createMotionComponentWithFeatures("rp");
const MotionRt = /*@__PURE__*/ createMotionComponentWithFeatures("rt");
const MotionRuby = /*@__PURE__*/ createMotionComponentWithFeatures("ruby");
const MotionS = /*@__PURE__*/ createMotionComponentWithFeatures("s");
const MotionSamp = /*@__PURE__*/ createMotionComponentWithFeatures("samp");
const MotionScript = /*@__PURE__*/ createMotionComponentWithFeatures("script");
const MotionSection = /*@__PURE__*/ createMotionComponentWithFeatures("section");
const MotionSelect = /*@__PURE__*/ createMotionComponentWithFeatures("select");
const MotionSmall = /*@__PURE__*/ createMotionComponentWithFeatures("small");
const MotionSource = /*@__PURE__*/ createMotionComponentWithFeatures("source");
const MotionSpan = /*@__PURE__*/ createMotionComponentWithFeatures("span");
const MotionStrong = /*@__PURE__*/ createMotionComponentWithFeatures("strong");
const MotionStyle = /*@__PURE__*/ createMotionComponentWithFeatures("style");
const MotionSub = /*@__PURE__*/ createMotionComponentWithFeatures("sub");
const MotionSummary = /*@__PURE__*/ createMotionComponentWithFeatures("summary");
const MotionSup = /*@__PURE__*/ createMotionComponentWithFeatures("sup");
const MotionTable = /*@__PURE__*/ createMotionComponentWithFeatures("table");
const MotionTbody = /*@__PURE__*/ createMotionComponentWithFeatures("tbody");
const MotionTd = /*@__PURE__*/ createMotionComponentWithFeatures("td");
const MotionTextarea = /*@__PURE__*/ createMotionComponentWithFeatures("textarea");
const MotionTfoot = /*@__PURE__*/ createMotionComponentWithFeatures("tfoot");
const MotionTh = /*@__PURE__*/ createMotionComponentWithFeatures("th");
const MotionThead = /*@__PURE__*/ createMotionComponentWithFeatures("thead");
const MotionTime = /*@__PURE__*/ createMotionComponentWithFeatures("time");
const MotionTitle = /*@__PURE__*/ createMotionComponentWithFeatures("title");
const MotionTr = /*@__PURE__*/ createMotionComponentWithFeatures("tr");
const MotionTrack = /*@__PURE__*/ createMotionComponentWithFeatures("track");
const MotionU = /*@__PURE__*/ createMotionComponentWithFeatures("u");
const MotionUl = /*@__PURE__*/ createMotionComponentWithFeatures("ul");
const MotionVideo = /*@__PURE__*/ createMotionComponentWithFeatures("video");
const MotionWbr = /*@__PURE__*/ createMotionComponentWithFeatures("wbr");
const MotionWebview = /*@__PURE__*/ createMotionComponentWithFeatures("webview");
/**
* SVG components
*/
const MotionAnimate = /*@__PURE__*/ createMotionComponentWithFeatures("animate");
const MotionCircle = /*@__PURE__*/ createMotionComponentWithFeatures("circle");
const MotionDefs = /*@__PURE__*/ createMotionComponentWithFeatures("defs");
const MotionDesc = /*@__PURE__*/ createMotionComponentWithFeatures("desc");
const MotionEllipse = /*@__PURE__*/ createMotionComponentWithFeatures("ellipse");
const MotionG = /*@__PURE__*/ createMotionComponentWithFeatures("g");
const MotionImage = /*@__PURE__*/ createMotionComponentWithFeatures("image");
const MotionLine = /*@__PURE__*/ createMotionComponentWithFeatures("line");
const MotionFilter = /*@__PURE__*/ createMotionComponentWithFeatures("filter");
const MotionMarker = /*@__PURE__*/ createMotionComponentWithFeatures("marker");
const MotionMask = /*@__PURE__*/ createMotionComponentWithFeatures("mask");
const MotionMetadata = /*@__PURE__*/ createMotionComponentWithFeatures("metadata");
const MotionPath = /*@__PURE__*/ createMotionComponentWithFeatures("path");
const MotionPattern = /*@__PURE__*/ createMotionComponentWithFeatures("pattern");
const MotionPolygon = /*@__PURE__*/ createMotionComponentWithFeatures("polygon");
const MotionPolyline = /*@__PURE__*/ createMotionComponentWithFeatures("polyline");
const MotionRect = /*@__PURE__*/ createMotionComponentWithFeatures("rect");
const MotionStop = /*@__PURE__*/ createMotionComponentWithFeatures("stop");
const MotionSvg = /*@__PURE__*/ createMotionComponentWithFeatures("svg");
const MotionSymbol = /*@__PURE__*/ createMotionComponentWithFeatures("symbol");
const MotionText = /*@__PURE__*/ createMotionComponentWithFeatures("text");
const MotionTspan = /*@__PURE__*/ createMotionComponentWithFeatures("tspan");
const MotionUse = /*@__PURE__*/ createMotionComponentWithFeatures("use");
const MotionView = /*@__PURE__*/ createMotionComponentWithFeatures("view");
const MotionClipPath = /*@__PURE__*/ createMotionComponentWithFeatures("clipPath");
const MotionFeBlend = /*@__PURE__*/ createMotionComponentWithFeatures("feBlend");
const MotionFeColorMatrix =
/*@__PURE__*/ createMotionComponentWithFeatures("feColorMatrix");
const MotionFeComponentTransfer = /*@__PURE__*/ createMotionComponentWithFeatures("feComponentTransfer");
const MotionFeComposite =
/*@__PURE__*/ createMotionComponentWithFeatures("feComposite");
const MotionFeConvolveMatrix =
/*@__PURE__*/ createMotionComponentWithFeatures("feConvolveMatrix");
const MotionFeDiffuseLighting =
/*@__PURE__*/ createMotionComponentWithFeatures("feDiffuseLighting");
const MotionFeDisplacementMap =
/*@__PURE__*/ createMotionComponentWithFeatures("feDisplacementMap");
const MotionFeDistantLight =
/*@__PURE__*/ createMotionComponentWithFeatures("feDistantLight");
const MotionFeDropShadow =
/*@__PURE__*/ createMotionComponentWithFeatures("feDropShadow");
const MotionFeFlood = /*@__PURE__*/ createMotionComponentWithFeatures("feFlood");
const MotionFeFuncA = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncA");
const MotionFeFuncB = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncB");
const MotionFeFuncG = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncG");
const MotionFeFuncR = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncR");
const MotionFeGaussianBlur =
/*@__PURE__*/ createMotionComponentWithFeatures("feGaussianBlur");
const MotionFeImage = /*@__PURE__*/ createMotionComponentWithFeatures("feImage");
const MotionFeMerge = /*@__PURE__*/ createMotionComponentWithFeatures("feMerge");
const MotionFeMergeNode =
/*@__PURE__*/ createMotionComponentWithFeatures("feMergeNode");
const MotionFeMorphology =
/*@__PURE__*/ createMotionComponentWithFeatures("feMorphology");
const MotionFeOffset = /*@__PURE__*/ createMotionComponentWithFeatures("feOffset");
const MotionFePointLight =
/*@__PURE__*/ createMotionComponentWithFeatures("fePointLight");
const MotionFeSpecularLighting =
/*@__PURE__*/ createMotionComponentWithFeatures("feSpecularLighting");
const MotionFeSpotLight =
/*@__PURE__*/ createMotionComponentWithFeatures("feSpotLight");
const MotionFeTile = /*@__PURE__*/ createMotionComponentWithFeatures("feTile");
const MotionFeTurbulence =
/*@__PURE__*/ createMotionComponentWithFeatures("feTurbulence");
const MotionForeignObject =
/*@__PURE__*/ createMotionComponentWithFeatures("foreignObject");
const MotionLinearGradient =
/*@__PURE__*/ createMotionComponentWithFeatures("linearGradient");
const MotionRadialGradient =
/*@__PURE__*/ createMotionComponentWithFeatures("radialGradient");
const MotionTextPath = /*@__PURE__*/ createMotionComponentWithFeatures("textPath");
exports.a = MotionA;
exports.abbr = MotionAbbr;
exports.address = MotionAddress;
exports.animate = MotionAnimate;
exports.area = MotionArea;
exports.article = MotionArticle;
exports.aside = MotionAside;
exports.audio = MotionAudio;
exports.b = MotionB;
exports.base = MotionBase;
exports.bdi = MotionBdi;
exports.bdo = MotionBdo;
exports.big = MotionBig;
exports.blockquote = MotionBlockquote;
exports.body = MotionBody;
exports.button = MotionButton;
exports.canvas = MotionCanvas;
exports.caption = MotionCaption;
exports.circle = MotionCircle;
exports.cite = MotionCite;
exports.clipPath = MotionClipPath;
exports.code = MotionCode;
exports.col = MotionCol;
exports.colgroup = MotionColgroup;
exports.data = MotionData;
exports.datalist = MotionDatalist;
exports.dd = MotionDd;
exports.defs = MotionDefs;
exports.del = MotionDel;
exports.desc = MotionDesc;
exports.details = MotionDetails;
exports.dfn = MotionDfn;
exports.dialog = MotionDialog;
exports.div = MotionDiv;
exports.dl = MotionDl;
exports.dt = MotionDt;
exports.ellipse = MotionEllipse;
exports.em = MotionEm;
exports.embed = MotionEmbed;
exports.feBlend = MotionFeBlend;
exports.feColorMatrix = MotionFeColorMatrix;
exports.feComponentTransfer = MotionFeComponentTransfer;
exports.feComposite = MotionFeComposite;
exports.feConvolveMatrix = MotionFeConvolveMatrix;
exports.feDiffuseLighting = MotionFeDiffuseLighting;
exports.feDisplacementMap = MotionFeDisplacementMap;
exports.feDistantLight = MotionFeDistantLight;
exports.feDropShadow = MotionFeDropShadow;
exports.feFlood = MotionFeFlood;
exports.feFuncA = MotionFeFuncA;
exports.feFuncB = MotionFeFuncB;
exports.feFuncG = MotionFeFuncG;
exports.feFuncR = MotionFeFuncR;
exports.feGaussianBlur = MotionFeGaussianBlur;
exports.feImage = MotionFeImage;
exports.feMerge = MotionFeMerge;
exports.feMergeNode = MotionFeMergeNode;
exports.feMorphology = MotionFeMorphology;
exports.feOffset = MotionFeOffset;
exports.fePointLight = MotionFePointLight;
exports.feSpecularLighting = MotionFeSpecularLighting;
exports.feSpotLight = MotionFeSpotLight;
exports.feTile = MotionFeTile;
exports.feTurbulence = MotionFeTurbulence;
exports.fieldset = MotionFieldset;
exports.figcaption = MotionFigcaption;
exports.figure = MotionFigure;
exports.filter = MotionFilter;
exports.footer = MotionFooter;
exports.foreignObject = MotionForeignObject;
exports.form = MotionForm;
exports.g = MotionG;
exports.h1 = MotionH1;
exports.h2 = MotionH2;
exports.h3 = MotionH3;
exports.h4 = MotionH4;
exports.h5 = MotionH5;
exports.h6 = MotionH6;
exports.head = MotionHead;
exports.header = MotionHeader;
exports.hgroup = MotionHgroup;
exports.hr = MotionHr;
exports.html = MotionHtml;
exports.i = MotionI;
exports.iframe = MotionIframe;
exports.image = MotionImage;
exports.img = MotionImg;
exports.input = MotionInput;
exports.ins = MotionIns;
exports.kbd = MotionKbd;
exports.keygen = MotionKeygen;
exports.label = MotionLabel;
exports.legend = MotionLegend;
exports.li = MotionLi;
exports.line = MotionLine;
exports.linearGradient = MotionLinearGradient;
exports.link = MotionLink;
exports.main = MotionMain;
exports.map = MotionMap;
exports.mark = MotionMark;
exports.marker = MotionMarker;
exports.mask = MotionMask;
exports.menu = MotionMenu;
exports.menuitem = MotionMenuitem;
exports.metadata = MotionMetadata;
exports.meter = MotionMeter;
exports.nav = MotionNav;
exports.object = MotionObject;
exports.ol = MotionOl;
exports.optgroup = MotionOptgroup;
exports.option = MotionOption;
exports.output = MotionOutput;
exports.p = MotionP;
exports.param = MotionParam;
exports.path = MotionPath;
exports.pattern = MotionPattern;
exports.picture = MotionPicture;
exports.polygon = MotionPolygon;
exports.polyline = MotionPolyline;
exports.pre = MotionPre;
exports.progress = MotionProgress;
exports.q = MotionQ;
exports.radialGradient = MotionRadialGradient;
exports.rect = MotionRect;
exports.rp = MotionRp;
exports.rt = MotionRt;
exports.ruby = MotionRuby;
exports.s = MotionS;
exports.samp = MotionSamp;
exports.script = MotionScript;
exports.section = MotionSection;
exports.select = MotionSelect;
exports.small = MotionSmall;
exports.source = MotionSource;
exports.span = MotionSpan;
exports.stop = MotionStop;
exports.strong = MotionStrong;
exports.style = MotionStyle;
exports.sub = MotionSub;
exports.summary = MotionSummary;
exports.sup = MotionSup;
exports.svg = MotionSvg;
exports.symbol = MotionSymbol;
exports.table = MotionTable;
exports.tbody = MotionTbody;
exports.td = MotionTd;
exports.text = MotionText;
exports.textPath = MotionTextPath;
exports.textarea = MotionTextarea;
exports.tfoot = MotionTfoot;
exports.th = MotionTh;
exports.thead = MotionThead;
exports.time = MotionTime;
exports.title = MotionTitle;
exports.tr = MotionTr;
exports.track = MotionTrack;
exports.tspan = MotionTspan;
exports.u = MotionU;
exports.ul = MotionUl;
exports.use = MotionUse;
exports.video = MotionVideo;
exports.view = MotionView;
exports.wbr = MotionWbr;
exports.webview = MotionWebview;
//# sourceMappingURL=client.js.map
@@ -0,0 +1,227 @@
/**
* @fileoverview Rule to flag updates of imported bindings.
* @author Toru Nagashima <https://github.com/mysticatea>
*/
"use strict";
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const { findVariable } = require("@eslint-community/eslint-utils");
const astUtils = require("./utils/ast-utils");
const WellKnownMutationFunctions = {
Object: /^(?:assign|definePropert(?:y|ies)|freeze|setPrototypeOf)$/u,
Reflect: /^(?:(?:define|delete)Property|set(?:PrototypeOf)?)$/u,
};
/**
* Check if a given node is LHS of an assignment node.
* @param {ASTNode} node The node to check.
* @returns {boolean} `true` if the node is LHS.
*/
function isAssignmentLeft(node) {
const { parent } = node;
return (
(parent.type === "AssignmentExpression" && parent.left === node) ||
// Destructuring assignments
parent.type === "ArrayPattern" ||
(parent.type === "Property" &&
parent.value === node &&
parent.parent.type === "ObjectPattern") ||
parent.type === "RestElement" ||
(parent.type === "AssignmentPattern" && parent.left === node)
);
}
/**
* Check if a given node is the operand of mutation unary operator.
* @param {ASTNode} node The node to check.
* @returns {boolean} `true` if the node is the operand of mutation unary operator.
*/
function isOperandOfMutationUnaryOperator(node) {
const argumentNode =
node.parent.type === "ChainExpression" ? node.parent : node;
const { parent } = argumentNode;
return (
(parent.type === "UpdateExpression" &&
parent.argument === argumentNode) ||
(parent.type === "UnaryExpression" &&
parent.operator === "delete" &&
parent.argument === argumentNode)
);
}
/**
* Check if a given node is the iteration variable of `for-in`/`for-of` syntax.
* @param {ASTNode} node The node to check.
* @returns {boolean} `true` if the node is the iteration variable.
*/
function isIterationVariable(node) {
const { parent } = node;
return (
(parent.type === "ForInStatement" && parent.left === node) ||
(parent.type === "ForOfStatement" && parent.left === node)
);
}
/**
* Check if a given node is at the first argument of a well-known mutation function.
* - `Object.assign`
* - `Object.defineProperty`
* - `Object.defineProperties`
* - `Object.freeze`
* - `Object.setPrototypeOf`
* - `Reflect.defineProperty`
* - `Reflect.deleteProperty`
* - `Reflect.set`
* - `Reflect.setPrototypeOf`
* @param {ASTNode} node The node to check.
* @param {Scope} scope A `escope.Scope` object to find variable (whichever).
* @returns {boolean} `true` if the node is at the first argument of a well-known mutation function.
*/
function isArgumentOfWellKnownMutationFunction(node, scope) {
const { parent } = node;
if (parent.type !== "CallExpression" || parent.arguments[0] !== node) {
return false;
}
const callee = astUtils.skipChainExpression(parent.callee);
if (
!astUtils.isSpecificMemberAccess(
callee,
"Object",
WellKnownMutationFunctions.Object,
) &&
!astUtils.isSpecificMemberAccess(
callee,
"Reflect",
WellKnownMutationFunctions.Reflect,
)
) {
return false;
}
const variable = findVariable(scope, callee.object);
return variable !== null && variable.scope.type === "global";
}
/**
* Check if the identifier node is placed at to update members.
* @param {ASTNode} id The Identifier node to check.
* @param {Scope} scope A `escope.Scope` object to find variable (whichever).
* @returns {boolean} `true` if the member of `id` was updated.
*/
function isMemberWrite(id, scope) {
const { parent } = id;
return (
(parent.type === "MemberExpression" &&
parent.object === id &&
(isAssignmentLeft(parent) ||
isOperandOfMutationUnaryOperator(parent) ||
isIterationVariable(parent))) ||
isArgumentOfWellKnownMutationFunction(id, scope)
);
}
/**
* Get the mutation node.
* @param {ASTNode} id The Identifier node to get.
* @returns {ASTNode} The mutation node.
*/
function getWriteNode(id) {
let node = id.parent;
while (
node &&
node.type !== "AssignmentExpression" &&
node.type !== "UpdateExpression" &&
node.type !== "UnaryExpression" &&
node.type !== "CallExpression" &&
node.type !== "ForInStatement" &&
node.type !== "ForOfStatement"
) {
node = node.parent;
}
return node || id;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
docs: {
description: "Disallow assigning to imported bindings",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-import-assign",
},
schema: [],
messages: {
readonly: "'{{name}}' is read-only.",
readonlyMember: "The members of '{{name}}' are read-only.",
},
},
create(context) {
const sourceCode = context.sourceCode;
return {
ImportDeclaration(node) {
const scope = sourceCode.getScope(node);
for (const variable of sourceCode.getDeclaredVariables(node)) {
const shouldCheckMembers = variable.defs.some(
d => d.node.type === "ImportNamespaceSpecifier",
);
let prevIdNode = null;
for (const reference of variable.references) {
const idNode = reference.identifier;
/*
* AssignmentPattern (e.g. `[a = 0] = b`) makes two write
* references for the same identifier. This should skip
* the one of the two in order to prevent redundant reports.
*/
if (idNode === prevIdNode) {
continue;
}
prevIdNode = idNode;
if (reference.isWrite()) {
context.report({
node: getWriteNode(idNode),
messageId: "readonly",
data: { name: idNode.name },
});
} else if (
shouldCheckMembers &&
isMemberWrite(idNode, scope)
) {
context.report({
node: getWriteNode(idNode),
messageId: "readonlyMember",
data: { name: idNode.name },
});
}
}
}
},
};
},
};
@@ -0,0 +1,12 @@
var test = require('tape');
var inspect = require('../');
var obj = { a: 1, b: [3, 4, undefined, null], c: undefined, d: null };
test('undef and null', function (t) {
t.plan(1);
t.equal(
inspect(obj),
'{ a: 1, b: [ 3, 4, undefined, null ], c: undefined, d: null }'
);
});
@@ -0,0 +1 @@
{"version":3,"file":"speech.js","sources":["../../../src/icons/speech.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Speech\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOC44IDIwdi00LjFsMS45LjJhMi4zIDIuMyAwIDAgMCAyLjE2NC0yLjFWOC4zQTUuMzcgNS4zNyAwIDAgMCAyIDguMjVjMCAyLjguNjU2IDMuMDU0IDEgNC41NWE1Ljc3IDUuNzcgMCAwIDEgLjAyOSAyLjc1OEwyIDIwIiAvPgogIDxwYXRoIGQ9Ik0xOS44IDE3LjhhNy41IDcuNSAwIDAgMCAuMDAzLTEwLjYwMyIgLz4KICA8cGF0aCBkPSJNMTcgMTVhMy41IDMuNSAwIDAgMC0uMDI1LTQuOTc1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/speech\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Speech = createLucideIcon('Speech', [\n [\n 'path',\n {\n d: 'M8.8 20v-4.1l1.9.2a2.3 2.3 0 0 0 2.164-2.1V8.3A5.37 5.37 0 0 0 2 8.25c0 2.8.656 3.054 1 4.55a5.77 5.77 0 0 1 .029 2.758L2 20',\n key: '11atix',\n },\n ],\n ['path', { d: 'M19.8 17.8a7.5 7.5 0 0 0 .003-10.603', key: 'yol142' }],\n ['path', { d: 'M17 15a3.5 3.5 0 0 0-.025-4.975', key: 'ssbmkc' }],\n]);\n\nexport default Speech;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = stringTemplate;
var _options = require("./options.js");
var _parse = require("./parse.js");
var _populate = require("./populate.js");
function stringTemplate(formatter, code, opts) {
code = formatter.code(code);
let metadata;
return arg => {
const replacements = (0, _options.normalizeReplacements)(arg);
if (!metadata) metadata = (0, _parse.default)(formatter, code, opts);
return formatter.unwrap((0, _populate.default)(metadata, replacements));
};
}
//# sourceMappingURL=string.js.map
@@ -0,0 +1 @@
{"version":3,"file":"signpost-big.js","sources":["../../../src/icons/signpost-big.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SignpostBig\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgOUg0TDIgN2wyLTJoNiIgLz4KICA8cGF0aCBkPSJNMTQgNWg2bDIgMi0yIDJoLTYiIC8+CiAgPHBhdGggZD0iTTEwIDIyVjRhMiAyIDAgMSAxIDQgMHYxOCIgLz4KICA8cGF0aCBkPSJNOCAyMmg4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/signpost-big\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst SignpostBig = createLucideIcon('SignpostBig', [\n ['path', { d: 'M10 9H4L2 7l2-2h6', key: '1hq7x2' }],\n ['path', { d: 'M14 5h6l2 2-2 2h-6', key: 'bv62ej' }],\n ['path', { d: 'M10 22V4a2 2 0 1 1 4 0v18', key: 'eqpcf2' }],\n ['path', { d: 'M8 22h8', key: 'rmew8v' }],\n]);\n\nexport default SignpostBig;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACnD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,29 @@
'use strict';
var inspect = require('../');
var test = require('tape');
var hasToStringTag = require('has-tostringtag/shams')();
var forEach = require('for-each');
test('fakes', { skip: !hasToStringTag }, function (t) {
forEach([
'Array',
'Boolean',
'Date',
'Error',
'Number',
'RegExp',
'String'
], function (expected) {
var faker = {};
faker[Symbol.toStringTag] = expected;
t.equal(
inspect(faker),
'{ [Symbol(Symbol.toStringTag)]: \'' + expected + '\' }',
'faker masquerading as ' + expected + ' is not shown as one'
);
});
t.end();
});
@@ -0,0 +1,13 @@
const generateLinearEasing = (easing, duration, // as milliseconds
resolution = 10 // as milliseconds
) => {
let points = "";
const numPoints = Math.max(Math.round(duration / resolution), 2);
for (let i = 0; i < numPoints; i++) {
points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + ", ";
}
return `linear(${points.substring(0, points.length - 2)})`;
};
export { generateLinearEasing };
//# sourceMappingURL=linear.mjs.map
@@ -0,0 +1,8 @@
export { g as getBenchFn, a as getBenchOptions } from './chunks/benchmark.CX_oY03V.js';
export { createTaskCollector, getCurrentSuite, getCurrentTest, getFn, getHooks, setFn, setHooks } from '@vitest/runner';
export { createChainable } from '@vitest/runner/utils';
import '@vitest/utils/helpers';
import './chunks/utils.BX5Fg8C4.js';
import '@vitest/utils/timers';
console.warn("Importing from \"vitest/suite\" is deprecated since Vitest 4.1. Please use static methods of \"TestRunner\" from the \"vitest\" entry point instead: e.g., `TestRunner.getCurrentTest()`.");
@@ -0,0 +1,79 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const code_1 = require("../code");
const codegen_1 = require("../../compile/codegen");
const util_1 = require("../../compile/util");
const error = {
message: ({ params: { missingProperty } }) => (0, codegen_1.str) `must have required property '${missingProperty}'`,
params: ({ params: { missingProperty } }) => (0, codegen_1._) `{missingProperty: ${missingProperty}}`,
};
const def = {
keyword: "required",
type: "object",
schemaType: "array",
$data: true,
error,
code(cxt) {
const { gen, schema, schemaCode, data, $data, it } = cxt;
const { opts } = it;
if (!$data && schema.length === 0)
return;
const useLoop = schema.length >= opts.loopRequired;
if (it.allErrors)
allErrorsMode();
else
exitOnErrorMode();
if (opts.strictRequired) {
const props = cxt.parentSchema.properties;
const { definedProperties } = cxt.it;
for (const requiredKey of schema) {
if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === undefined && !definedProperties.has(requiredKey)) {
const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`;
(0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);
}
}
}
function allErrorsMode() {
if (useLoop || $data) {
cxt.block$data(codegen_1.nil, loopAllRequired);
}
else {
for (const prop of schema) {
(0, code_1.checkReportMissingProp)(cxt, prop);
}
}
}
function exitOnErrorMode() {
const missing = gen.let("missing");
if (useLoop || $data) {
const valid = gen.let("valid", true);
cxt.block$data(valid, () => loopUntilMissing(missing, valid));
cxt.ok(valid);
}
else {
gen.if((0, code_1.checkMissingProp)(cxt, schema, missing));
(0, code_1.reportMissingProp)(cxt, missing);
gen.else();
}
}
function loopAllRequired() {
gen.forOf("prop", schemaCode, (prop) => {
cxt.setParams({ missingProperty: prop });
gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error());
});
}
function loopUntilMissing(missing, valid) {
cxt.setParams({ missingProperty: missing });
gen.forOf(missing, schemaCode, () => {
gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties));
gen.if((0, codegen_1.not)(valid), () => {
cxt.error();
gen.break();
});
}, codegen_1.nil);
}
},
};
exports.default = def;
//# sourceMappingURL=required.js.map
@@ -0,0 +1,716 @@
// Generated by LiveScript 1.6.0
var each, map, compact, filter, reject, remove, partition, find, head, first, tail, last, initial, empty, reverse, unique, uniqueBy, fold, foldl, fold1, foldl1, foldr, foldr1, unfoldr, concat, concatMap, flatten, difference, intersection, union, countBy, groupBy, andList, orList, any, all, sort, sortWith, sortBy, sum, product, mean, average, maximum, minimum, maximumBy, minimumBy, scan, scanl, scan1, scanl1, scanr, scanr1, slice, take, drop, splitAt, takeWhile, dropWhile, span, breakList, zip, zipWith, zipAll, zipAllWith, at, elemIndex, elemIndices, findIndex, findIndices, toString$ = {}.toString;
each = curry$(function(f, xs){
var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
f(x);
}
return xs;
});
map = curry$(function(f, xs){
var i$, len$, x, results$ = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
results$.push(f(x));
}
return results$;
});
compact = function(xs){
var i$, len$, x, results$ = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
if (x) {
results$.push(x);
}
}
return results$;
};
filter = curry$(function(f, xs){
var i$, len$, x, results$ = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
if (f(x)) {
results$.push(x);
}
}
return results$;
});
reject = curry$(function(f, xs){
var i$, len$, x, results$ = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
if (!f(x)) {
results$.push(x);
}
}
return results$;
});
remove = curry$(function(el, xs){
var i, x$;
i = elemIndex(el, xs);
x$ = xs.slice();
if (i != null) {
x$.splice(i, 1);
}
return x$;
});
partition = curry$(function(f, xs){
var passed, failed, i$, len$, x;
passed = [];
failed = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
(f(x) ? passed : failed).push(x);
}
return [passed, failed];
});
find = curry$(function(f, xs){
var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
if (f(x)) {
return x;
}
}
});
head = first = function(xs){
return xs[0];
};
tail = function(xs){
if (!xs.length) {
return;
}
return xs.slice(1);
};
last = function(xs){
return xs[xs.length - 1];
};
initial = function(xs){
if (!xs.length) {
return;
}
return xs.slice(0, -1);
};
empty = function(xs){
return !xs.length;
};
reverse = function(xs){
return xs.concat().reverse();
};
unique = function(xs){
var result, i$, len$, x;
result = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
if (!in$(x, result)) {
result.push(x);
}
}
return result;
};
uniqueBy = curry$(function(f, xs){
var seen, i$, len$, x, val, results$ = [];
seen = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
val = f(x);
if (in$(val, seen)) {
continue;
}
seen.push(val);
results$.push(x);
}
return results$;
});
fold = foldl = curry$(function(f, memo, xs){
var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
memo = f(memo, x);
}
return memo;
});
fold1 = foldl1 = curry$(function(f, xs){
return fold(f, xs[0], xs.slice(1));
});
foldr = curry$(function(f, memo, xs){
var i$, x;
for (i$ = xs.length - 1; i$ >= 0; --i$) {
x = xs[i$];
memo = f(x, memo);
}
return memo;
});
foldr1 = curry$(function(f, xs){
return foldr(f, xs[xs.length - 1], xs.slice(0, -1));
});
unfoldr = curry$(function(f, b){
var result, x, that;
result = [];
x = b;
while ((that = f(x)) != null) {
result.push(that[0]);
x = that[1];
}
return result;
});
concat = function(xss){
return [].concat.apply([], xss);
};
concatMap = curry$(function(f, xs){
var x;
return [].concat.apply([], (function(){
var i$, ref$, len$, results$ = [];
for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
x = ref$[i$];
results$.push(f(x));
}
return results$;
}()));
});
flatten = function(xs){
var x;
return [].concat.apply([], (function(){
var i$, ref$, len$, results$ = [];
for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
x = ref$[i$];
if (toString$.call(x).slice(8, -1) === 'Array') {
results$.push(flatten(x));
} else {
results$.push(x);
}
}
return results$;
}()));
};
difference = function(xs){
var yss, res$, i$, to$, results, len$, x, j$, len1$, ys;
res$ = [];
for (i$ = 1, to$ = arguments.length; i$ < to$; ++i$) {
res$.push(arguments[i$]);
}
yss = res$;
results = [];
outer: for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
for (j$ = 0, len1$ = yss.length; j$ < len1$; ++j$) {
ys = yss[j$];
if (in$(x, ys)) {
continue outer;
}
}
results.push(x);
}
return results;
};
intersection = function(xs){
var yss, res$, i$, to$, results, len$, x, j$, len1$, ys;
res$ = [];
for (i$ = 1, to$ = arguments.length; i$ < to$; ++i$) {
res$.push(arguments[i$]);
}
yss = res$;
results = [];
outer: for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
for (j$ = 0, len1$ = yss.length; j$ < len1$; ++j$) {
ys = yss[j$];
if (!in$(x, ys)) {
continue outer;
}
}
results.push(x);
}
return results;
};
union = function(){
var xss, res$, i$, to$, results, len$, xs, j$, len1$, x;
res$ = [];
for (i$ = 0, to$ = arguments.length; i$ < to$; ++i$) {
res$.push(arguments[i$]);
}
xss = res$;
results = [];
for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
xs = xss[i$];
for (j$ = 0, len1$ = xs.length; j$ < len1$; ++j$) {
x = xs[j$];
if (!in$(x, results)) {
results.push(x);
}
}
}
return results;
};
countBy = curry$(function(f, xs){
var results, i$, len$, x, key;
results = {};
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
key = f(x);
if (key in results) {
results[key] += 1;
} else {
results[key] = 1;
}
}
return results;
});
groupBy = curry$(function(f, xs){
var results, i$, len$, x, key;
results = {};
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
key = f(x);
if (key in results) {
results[key].push(x);
} else {
results[key] = [x];
}
}
return results;
});
andList = function(xs){
var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
if (!x) {
return false;
}
}
return true;
};
orList = function(xs){
var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
if (x) {
return true;
}
}
return false;
};
any = curry$(function(f, xs){
var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
if (f(x)) {
return true;
}
}
return false;
});
all = curry$(function(f, xs){
var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
if (!f(x)) {
return false;
}
}
return true;
});
sort = function(xs){
return xs.concat().sort(function(x, y){
if (x > y) {
return 1;
} else if (x < y) {
return -1;
} else {
return 0;
}
});
};
sortWith = curry$(function(f, xs){
return xs.concat().sort(f);
});
sortBy = curry$(function(f, xs){
return xs.concat().sort(function(x, y){
if (f(x) > f(y)) {
return 1;
} else if (f(x) < f(y)) {
return -1;
} else {
return 0;
}
});
});
sum = function(xs){
var result, i$, len$, x;
result = 0;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
result += x;
}
return result;
};
product = function(xs){
var result, i$, len$, x;
result = 1;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
result *= x;
}
return result;
};
mean = average = function(xs){
var sum, i$, len$, x;
sum = 0;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
x = xs[i$];
sum += x;
}
return sum / xs.length;
};
maximum = function(xs){
var max, i$, ref$, len$, x;
max = xs[0];
for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
x = ref$[i$];
if (x > max) {
max = x;
}
}
return max;
};
minimum = function(xs){
var min, i$, ref$, len$, x;
min = xs[0];
for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
x = ref$[i$];
if (x < min) {
min = x;
}
}
return min;
};
maximumBy = curry$(function(f, xs){
var max, i$, ref$, len$, x;
max = xs[0];
for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
x = ref$[i$];
if (f(x) > f(max)) {
max = x;
}
}
return max;
});
minimumBy = curry$(function(f, xs){
var min, i$, ref$, len$, x;
min = xs[0];
for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
x = ref$[i$];
if (f(x) < f(min)) {
min = x;
}
}
return min;
});
scan = scanl = curry$(function(f, memo, xs){
var last, x;
last = memo;
return [memo].concat((function(){
var i$, ref$, len$, results$ = [];
for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
x = ref$[i$];
results$.push(last = f(last, x));
}
return results$;
}()));
});
scan1 = scanl1 = curry$(function(f, xs){
if (!xs.length) {
return;
}
return scan(f, xs[0], xs.slice(1));
});
scanr = curry$(function(f, memo, xs){
xs = xs.concat().reverse();
return scan(f, memo, xs).reverse();
});
scanr1 = curry$(function(f, xs){
if (!xs.length) {
return;
}
xs = xs.concat().reverse();
return scan(f, xs[0], xs.slice(1)).reverse();
});
slice = curry$(function(x, y, xs){
return xs.slice(x, y);
});
take = curry$(function(n, xs){
if (n <= 0) {
return xs.slice(0, 0);
} else {
return xs.slice(0, n);
}
});
drop = curry$(function(n, xs){
if (n <= 0) {
return xs;
} else {
return xs.slice(n);
}
});
splitAt = curry$(function(n, xs){
return [take(n, xs), drop(n, xs)];
});
takeWhile = curry$(function(p, xs){
var len, i;
len = xs.length;
if (!len) {
return xs;
}
i = 0;
while (i < len && p(xs[i])) {
i += 1;
}
return xs.slice(0, i);
});
dropWhile = curry$(function(p, xs){
var len, i;
len = xs.length;
if (!len) {
return xs;
}
i = 0;
while (i < len && p(xs[i])) {
i += 1;
}
return xs.slice(i);
});
span = curry$(function(p, xs){
return [takeWhile(p, xs), dropWhile(p, xs)];
});
breakList = curry$(function(p, xs){
return span(compose$(p, not$), xs);
});
zip = curry$(function(xs, ys){
var result, len, i$, len$, i, x;
result = [];
len = ys.length;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
i = i$;
x = xs[i$];
if (i === len) {
break;
}
result.push([x, ys[i]]);
}
return result;
});
zipWith = curry$(function(f, xs, ys){
var result, len, i$, len$, i, x;
result = [];
len = ys.length;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
i = i$;
x = xs[i$];
if (i === len) {
break;
}
result.push(f(x, ys[i]));
}
return result;
});
zipAll = function(){
var xss, res$, i$, to$, minLength, len$, xs, ref$, i, lresult$, j$, results$ = [];
res$ = [];
for (i$ = 0, to$ = arguments.length; i$ < to$; ++i$) {
res$.push(arguments[i$]);
}
xss = res$;
minLength = undefined;
for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
xs = xss[i$];
minLength <= (ref$ = xs.length) || (minLength = ref$);
}
for (i$ = 0; i$ < minLength; ++i$) {
i = i$;
lresult$ = [];
for (j$ = 0, len$ = xss.length; j$ < len$; ++j$) {
xs = xss[j$];
lresult$.push(xs[i]);
}
results$.push(lresult$);
}
return results$;
};
zipAllWith = function(f){
var xss, res$, i$, to$, minLength, len$, xs, ref$, i, results$ = [];
res$ = [];
for (i$ = 1, to$ = arguments.length; i$ < to$; ++i$) {
res$.push(arguments[i$]);
}
xss = res$;
minLength = undefined;
for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
xs = xss[i$];
minLength <= (ref$ = xs.length) || (minLength = ref$);
}
for (i$ = 0; i$ < minLength; ++i$) {
i = i$;
results$.push(f.apply(null, (fn$())));
}
return results$;
function fn$(){
var i$, ref$, len$, results$ = [];
for (i$ = 0, len$ = (ref$ = xss).length; i$ < len$; ++i$) {
xs = ref$[i$];
results$.push(xs[i]);
}
return results$;
}
};
at = curry$(function(n, xs){
if (n < 0) {
return xs[xs.length + n];
} else {
return xs[n];
}
});
elemIndex = curry$(function(el, xs){
var i$, len$, i, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
i = i$;
x = xs[i$];
if (x === el) {
return i;
}
}
});
elemIndices = curry$(function(el, xs){
var i$, len$, i, x, results$ = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
i = i$;
x = xs[i$];
if (x === el) {
results$.push(i);
}
}
return results$;
});
findIndex = curry$(function(f, xs){
var i$, len$, i, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
i = i$;
x = xs[i$];
if (f(x)) {
return i;
}
}
});
findIndices = curry$(function(f, xs){
var i$, len$, i, x, results$ = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
i = i$;
x = xs[i$];
if (f(x)) {
results$.push(i);
}
}
return results$;
});
module.exports = {
each: each,
map: map,
filter: filter,
compact: compact,
reject: reject,
remove: remove,
partition: partition,
find: find,
head: head,
first: first,
tail: tail,
last: last,
initial: initial,
empty: empty,
reverse: reverse,
difference: difference,
intersection: intersection,
union: union,
countBy: countBy,
groupBy: groupBy,
fold: fold,
fold1: fold1,
foldl: foldl,
foldl1: foldl1,
foldr: foldr,
foldr1: foldr1,
unfoldr: unfoldr,
andList: andList,
orList: orList,
any: any,
all: all,
unique: unique,
uniqueBy: uniqueBy,
sort: sort,
sortWith: sortWith,
sortBy: sortBy,
sum: sum,
product: product,
mean: mean,
average: average,
concat: concat,
concatMap: concatMap,
flatten: flatten,
maximum: maximum,
minimum: minimum,
maximumBy: maximumBy,
minimumBy: minimumBy,
scan: scan,
scan1: scan1,
scanl: scanl,
scanl1: scanl1,
scanr: scanr,
scanr1: scanr1,
slice: slice,
take: take,
drop: drop,
splitAt: splitAt,
takeWhile: takeWhile,
dropWhile: dropWhile,
span: span,
breakList: breakList,
zip: zip,
zipWith: zipWith,
zipAll: zipAll,
zipAllWith: zipAllWith,
at: at,
elemIndex: elemIndex,
elemIndices: elemIndices,
findIndex: findIndex,
findIndices: findIndices
};
function curry$(f, bound){
var context,
_curry = function(args) {
return f.length > 1 ? function(){
var params = args ? args.concat() : [];
context = bound ? context || this : this;
return params.push.apply(params, arguments) <
f.length && arguments.length ?
_curry.call(context, params) : f.apply(context, params);
} : f;
};
return _curry();
}
function in$(x, xs){
var i = -1, l = xs.length >>> 0;
while (++i < l) if (x === xs[i]) return true;
return false;
}
function compose$() {
var functions = arguments;
return function() {
var i, result;
result = functions[0].apply(this, arguments);
for (i = 1; i < functions.length; ++i) {
result = functions[i](result);
}
return result;
};
}
function not$(x){ return !x; }
@@ -0,0 +1,13 @@
var Level = /* @__PURE__ */ ((Level2) => {
Level2[Level2["TRACE"] = 6] = "TRACE";
Level2[Level2["DEBUG"] = 5] = "DEBUG";
Level2[Level2["INFO"] = 4] = "INFO";
Level2[Level2["WARN"] = 3] = "WARN";
Level2[Level2["ERROR"] = 2] = "ERROR";
Level2[Level2["FATAL"] = 1] = "FATAL";
Level2[Level2["OFF"] = 0] = "OFF";
return Level2;
})(Level || {});
export {
Level as default
};
@@ -0,0 +1,19 @@
import {TokenType as tt} from "../parser/tokenizer/types";
import Transformer from "./Transformer";
export default class OptionalCatchBindingTransformer extends Transformer {
constructor( tokens, nameManager) {
super();this.tokens = tokens;this.nameManager = nameManager;;
}
process() {
if (this.tokens.matches2(tt._catch, tt.braceL)) {
this.tokens.copyToken();
this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`);
return true;
}
return false;
}
}
@@ -0,0 +1,74 @@
/**
* Copyright 2022 Joe Bell. All rights reserved.
*
* This file is licensed to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
cva: function() {
return cva;
},
cx: function() {
return cx;
}
});
const _clsx = require("clsx");
const falsyToString = (value)=>typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
const cx = _clsx.clsx;
const cva = (base, config)=>(props)=>{
var _config_compoundVariants;
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
const { variants, defaultVariants } = config;
const getVariantClassNames = Object.keys(variants).map((variant)=>{
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
if (variantProp === null) return null;
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
return variants[variant][variantKey];
});
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
let [key, value] = param;
if (value === undefined) {
return acc;
}
acc[key] = value;
return acc;
}, {});
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{
let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
return Object.entries(compoundVariantOptions).every((param)=>{
let [key, value] = param;
return Array.isArray(value) ? value.includes({
...defaultVariants,
...propsWithoutUndefined
}[key]) : ({
...defaultVariants,
...propsWithoutUndefined
})[key] === value;
}) ? [
...acc,
cvClass,
cvClassName
] : acc;
}, []);
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
};
@@ -0,0 +1 @@
module.exports={C:{"66":0.00485,"115":0.02427,"120":1.01428,"121":2.08194,"123":0.01456,"140":0.00485,"150":0.01456,"151":0.00485,"152":0.00971,"153":0.01456,"154":0.05338,"155":0.20868,"156":0.20868,"157":0.00971,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 141 142 143 144 145 146 147 148 149 158 159 160 3.5 3.6"},D:{"62":0.00485,"63":0.00485,"64":0.00485,"65":0.00971,"66":0.00485,"68":0.00485,"69":0.00485,"70":0.00485,"73":0.01456,"75":0.00971,"76":0.00485,"79":0.00485,"81":0.00971,"83":0.00485,"87":0.00485,"88":0.00485,"90":0.00485,"91":0.00485,"92":0.00485,"93":0.04853,"98":0.04368,"101":0.03882,"102":0.00485,"103":0.47559,"104":0.27177,"105":0.27177,"106":0.27662,"107":0.26692,"108":0.26692,"109":0.5581,"110":0.27662,"111":0.27662,"112":0.26692,"113":0.00485,"114":0.07765,"116":0.55324,"117":0.27177,"118":1.51899,"119":2.02855,"120":2.37312,"121":0.01941,"122":0.03882,"123":0.01456,"124":0.27662,"126":0.05824,"127":0.00485,"128":0.01456,"129":0.00971,"130":0.01456,"131":0.54839,"132":0.01941,"133":0.57265,"134":0.04853,"135":0.05824,"136":0.15044,"137":0.0825,"138":0.24265,"139":0.05824,"140":0.09706,"141":0.11162,"142":0.17471,"143":0.01456,"144":0.0728,"145":0.06794,"146":0.4853,"147":0.02912,"148":0.14074,"149":0.36398,"150":0.36883,"151":2.0237,"152":9.01202,"153":7.0417,"154":1.8587,"155":0.02427,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 67 71 72 74 77 78 80 84 85 86 89 94 95 96 97 99 100 115 125 156 157"},F:{"51":0.00485,"53":0.00485,"54":0.00485,"55":0.00485,"56":0.00485,"95":0.00485,"101":0.00971,"102":0.00485,"134":0.02427,"135":0.21353,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 52 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 100 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 131 132 133 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00971,"109":0.00971,"119":1.00457,"120":1.00942,"122":0.00485,"138":0.00971,"140":0.00485,"141":0.00485,"142":0.00971,"143":0.00485,"144":0.00971,"145":0.02427,"146":0.01456,"147":0.01456,"148":0.01456,"149":0.02427,"150":0.04368,"151":0.10191,"152":1.49472,"153":2.10135,"154":0.66971,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 121 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 139"},E:{"27":0.05338,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.4 16.0 16.1 16.2 16.3 16.4 16.5 17.2 17.3 18.0 18.2 18.4 27.1 27.2 TP","13.1":0.00971,"14.1":0.00485,"15.5":0.00485,"15.6":0.02427,"16.6":0.02427,"17.0":0.01456,"17.1":0.02427,"17.4":0.00485,"17.5":0.00485,"17.6":0.02427,"18.1":0.00485,"18.3":0.00485,"18.5-18.7":0.00485,"26.0":0.00971,"26.1":0.00485,"26.2":0.01941,"26.3":0.01941,"26.4":0.01941,"26.5":0.09706,"26.6":0.40765},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00125,"5.0-5.1":0.00125,"6.0-6.1":0,"7.0-7.1":0.0025,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01252,"11.0-11.2":0.00125,"11.3-11.4":0.0025,"12.0-12.1":0,"12.2-12.5":0.03255,"13.0-13.1":0,"13.2":0.00626,"13.3":0,"13.4-13.7":0.00125,"14.0-14.4":0.00501,"14.5-14.8":0.00751,"15.0-15.1":0.00751,"15.2-15.3":0.00501,"15.4":0.00626,"15.5":0.00751,"15.6-15.8":0.16273,"16.0":0.01252,"16.1":0.02253,"16.2":0.01252,"16.3":0.02754,"16.4":0.00626,"16.5":0.01001,"16.6-16.7":0.22657,"17.0":0.00876,"17.1":0.01252,"17.2":0.01252,"17.3":0.01878,"17.4":0.02629,"17.5":0.05132,"17.6-17.7":0.13269,"18.0":0.02754,"18.1":0.05508,"18.2":0.07511,"18.3":0.13018,"18.4":0.08136,"18.5-18.7":1.6811,"26.0":0.08136,"26.1":0.08262,"26.2":0.2153,"26.3":0.23283,"26.4":0.17024,"26.5":1.14034,"26.6":7.03609,"27.0":0.5395,"27.1":0,"27.2":0.01377},P:{"4":0.02668,"22":0.01779,"23":0.00889,"25":0.01779,"26":0.03557,"27":0.01779,"28":0.07114,"29":0.15118,"30":1.28944,_:"20 21 24 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 15.0 16.0 18.0 19.0","7.2-7.4":0.02668,"13.0":0.00889,"14.0":0.00889,"17.0":0.01779},I:{"0":0.03086,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.41176,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":38.00108},R:{_:"0"},M:{"0":0.12868},Q:{_:"14.9"},O:{"0":0.50441},H:{all:0}};
@@ -0,0 +1,6 @@
function isObject(value) {
return typeof value === "object" && value !== null;
}
export { isObject };
//# sourceMappingURL=is-object.mjs.map
@@ -0,0 +1,25 @@
/** Default upper bound, in bytes, on a request body read by the HTTP entry points (4 MiB). */
export declare const DEFAULT_MAX_REQUEST_BODY_SIZE: number;
/** Upper bound on the number of messages accepted in one JSON-RPC batch array. */
export declare const MAX_BATCH_SIZE = 100;
/** The message answered with 413 for a request body over `maxBytes`. */
export declare function requestBodyTooLargeMessage(maxBytes: number): string;
/**
* Resolves a `maxRequestBodySize` option to the bound to apply: the default when
* omitted, otherwise the value itself, which must be a positive finite number of
* bytes (a `RangeError` is thrown at configuration time for anything else).
*/
export declare function resolveMaxRequestBodySize(value: number | undefined): number;
/**
* Reads a request body as text, up to `maxBytes` (default
* {@linkcode DEFAULT_MAX_REQUEST_BODY_SIZE}). A declared `Content-Length` over the
* limit is refused without reading anything; otherwise the read stops as soon as
* more than the limit has arrived. Stream failures propagate.
*/
export declare function readRequestBody(request: Request, maxBytes?: number): Promise<{
tooLarge: true;
} | {
tooLarge: false;
text: string;
}>;
//# sourceMappingURL=requestBody.d.ts.map
@@ -0,0 +1,26 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ImageOff = createLucideIcon("ImageOff", [
["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }],
["path", { d: "M10.41 10.41a2 2 0 1 1-2.83-2.83", key: "1bzlo9" }],
["line", { x1: "13.5", x2: "6", y1: "13.5", y2: "21", key: "1q0aeu" }],
["line", { x1: "18", x2: "21", y1: "12", y2: "15", key: "5mozeu" }],
[
"path",
{
d: "M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",
key: "mmje98"
}
],
["path", { d: "M21 15V5a2 2 0 0 0-2-2H9", key: "43el77" }]
]);
export { ImageOff as default };
//# sourceMappingURL=image-off.js.map
@@ -0,0 +1,6 @@
export { Modifiers } from './enums';
export type { PredefinedFormatsString } from './enums';
export { parseOptions } from './parse-options';
export { SCHEMA } from './schema';
export { selectorTypeToMessageString } from './shared';
export type { Context, Selector, ValidatorFunction } from './types';
@@ -0,0 +1,16 @@
import commander from './index.js';
// wrapper to provide named exports for ESM.
export const {
program,
createCommand,
createArgument,
createOption,
CommanderError,
InvalidArgumentError,
InvalidOptionArgumentError, // deprecated old name
Command,
Argument,
Option,
Help,
} = commander;
@@ -0,0 +1,133 @@
export default `tlf2a 1 1 3 -1 15 0 0 0
===============================================================================
This is wideterm.tlf, or “WideTerm”, by Sam Hocevar <sam@hocevar.net>. It was
created on August 2nd, 2007.
This font is free software. It comes without any warranty, to the extent
permitted by applicable law. You can redistribute it and/or modify it under
the terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
details.
Missing: Ä Ö Ü ä ö ü ß
This font is part of TOIlet’s official distribution. More information
on the TOIlet website at http://caca.zoy.org/wiki/toilet
===============================================================================
@
!!
""
##
$$
%%
&&
''
((
))
**
++
,,
--
..
//
00
11
22
33
44
55
66
77
88
99
::
;;
<<
==
>>
??
@@
AA
BB
CC
DD
EE
FF
GG
HH
II
JJ
KK
LL
MM
NN
OO
PP
QQ
RR
SS
TT
UU
VV
WW
XX
YY
ZZ
[[
\\\
]]
^^
__
`\`
aa
bb
cc
dd
ee
ff
gg
hh
ii
jj
kk
ll
mm
nn
oo
pp
qq
rr
ss
tt
uu
vv
ww
xx
yy
zz
{{
||
}}
~~
Ä@
Ö@
Ü@
ä@
ö@
ü@
ß@
0x00a2 ¢ CENT SIGN
¢@
0x00a3 £ POUND SIGN
£@
0x00ac ¬ NOT SIGN
¬@
0x00af ¯ MACRON
 ̄@
0x00a6 ¦ BROKEN BAR
¦@
0x00a5 ¥ YEN SIGN
¥@
0x20a9 ₩ WON SIGN
₩@
`
@@ -0,0 +1,9 @@
'use strict';
var separatorMatcher = () => {
// no suggestions
return null;
};
module.exports = separatorMatcher;
//# sourceMappingURL=feedback.cjs.map
@@ -0,0 +1 @@
{"version":3,"file":"git-commit-vertical.js","sources":["../../../src/icons/git-commit-vertical.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name GitCommitVertical\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgM3Y2IiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjMiIC8+CiAgPHBhdGggZD0iTTEyIDE1djYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/git-commit-vertical\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst GitCommitVertical = createLucideIcon('GitCommitVertical', [\n ['path', { d: 'M12 3v6', key: '1holv5' }],\n ['circle', { cx: '12', cy: '12', r: '3', key: '1v7zrd' }],\n ['path', { d: 'M12 15v6', key: 'a9ows0' }],\n]);\n\nexport default GitCommitVertical;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}