docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run

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,377 @@
'use strict'
let { dirname, relative, resolve, sep } = require('path')
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
let { pathToFileURL } = require('url')
let Input = require('./input')
let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)
let pathAvailable = Boolean(dirname && resolve && relative && sep)
class MapGenerator {
constructor(stringify, root, opts, cssString) {
this.stringify = stringify
this.mapOpts = opts.map || {}
this.root = root
this.opts = opts
this.css = cssString
this.originalCSS = cssString
this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute
this.memoizedFileURLs = new Map()
this.memoizedPaths = new Map()
this.memoizedURLs = new Map()
}
addAnnotation() {
let content
if (this.isInline()) {
content =
'data:application/json;base64,' + this.toBase64(this.map.toString())
} else if (typeof this.mapOpts.annotation === 'string') {
content = this.mapOpts.annotation
} else if (typeof this.mapOpts.annotation === 'function') {
content = this.mapOpts.annotation(this.opts.to, this.root)
} else {
content = this.outputFile() + '.map'
}
let eol = '\n'
if (this.css.includes('\r\n')) eol = '\r\n'
this.css += eol + '/*# sourceMappingURL=' + content + ' */'
}
applyPrevMaps() {
for (let prev of this.previous()) {
let from = this.toUrl(this.path(prev.file))
let root = prev.root || dirname(prev.file)
let map
if (this.mapOpts.sourcesContent === false) {
map = new SourceMapConsumer(prev.text)
if (map.sourcesContent) {
map.sourcesContent = null
}
} else {
map = prev.consumer()
}
this.map.applySourceMap(map, from, this.toUrl(this.path(root)))
}
}
clearAnnotation() {
if (this.mapOpts.annotation === false) return
if (this.root) {
let node
for (let i = this.root.nodes.length - 1; i >= 0; i--) {
node = this.root.nodes[i]
if (node.type !== 'comment') continue
if (node.text.startsWith('# sourceMappingURL=')) {
this.root.removeChild(i)
}
}
} else if (this.css) {
let annotation = '/*# sourceMappingURL='
let startIndex
while ((startIndex = this.css.lastIndexOf(annotation)) !== -1) {
let endIndex = this.css.indexOf('*/', startIndex + annotation.length)
if (endIndex === -1) break
while (startIndex > 0 && this.css[startIndex - 1] === '\n') {
startIndex--
}
this.css = this.css.slice(0, startIndex) + this.css.slice(endIndex + 2)
}
}
}
generate() {
this.clearAnnotation()
if (pathAvailable && sourceMapAvailable && this.isMap()) {
return this.generateMap()
} else {
let result = ''
this.stringify(this.root, i => {
result += i
})
return [result]
}
}
generateMap() {
if (this.root) {
this.generateString()
} else if (this.previous().length === 1) {
let prev = this.previous()[0].consumer()
prev.file = this.outputFile()
this.map = SourceMapGenerator.fromSourceMap(prev, {
ignoreInvalidMapping: true
})
} else {
this.map = new SourceMapGenerator({
file: this.outputFile(),
ignoreInvalidMapping: true
})
this.map.addMapping({
generated: { column: 0, line: 1 },
original: { column: 0, line: 1 },
source: this.opts.from
? this.toUrl(this.path(this.opts.from))
: '<no source>'
})
}
if (this.isSourcesContent()) this.setSourcesContent()
if (this.root && this.previous().length > 0) this.applyPrevMaps()
if (this.isAnnotation()) this.addAnnotation()
if (this.isInline()) {
return [this.css]
} else {
return [this.css, this.map]
}
}
generateString() {
this.css = ''
this.map = new SourceMapGenerator({
file: this.outputFile(),
ignoreInvalidMapping: true
})
let line = 1
let column = 1
let noSource = '<no source>'
let mapping = {
generated: { column: 0, line: 0 },
original: { column: 0, line: 0 },
source: ''
}
let last, lines
this.stringify(this.root, (str, node, type) => {
this.css += str
if (node && type !== 'end') {
mapping.generated.line = line
mapping.generated.column = column - 1
if (node.source && node.source.start) {
mapping.source = this.sourcePath(node)
mapping.original.line = node.source.start.line
mapping.original.column = node.source.start.column - 1
this.map.addMapping(mapping)
} else {
mapping.source = noSource
mapping.original.line = 1
mapping.original.column = 0
this.map.addMapping(mapping)
}
}
lines = str.match(/\n/g)
if (lines) {
line += lines.length
last = str.lastIndexOf('\n')
column = str.length - last
} else {
column += str.length
}
if (node && type !== 'start') {
let p = node.parent || { raws: {} }
let childless =
node.type === 'decl' || (node.type === 'atrule' && !node.nodes)
if (!childless || node !== p.last || p.raws.semicolon) {
if (node.source && node.source.end) {
mapping.source = this.sourcePath(node)
mapping.original.line = node.source.end.line
mapping.original.column = node.source.end.column - 1
mapping.generated.line = line
mapping.generated.column = column - 2
this.map.addMapping(mapping)
} else {
mapping.source = noSource
mapping.original.line = 1
mapping.original.column = 0
mapping.generated.line = line
mapping.generated.column = column - 1
this.map.addMapping(mapping)
}
}
}
})
}
isAnnotation() {
if (this.isInline()) {
return true
}
if (typeof this.mapOpts.annotation !== 'undefined') {
return this.mapOpts.annotation
}
if (this.previous().length) {
return this.previous().some(i => i.annotation)
}
return true
}
isInline() {
if (typeof this.mapOpts.inline !== 'undefined') {
return this.mapOpts.inline
}
let annotation = this.mapOpts.annotation
if (typeof annotation !== 'undefined' && annotation !== true) {
return false
}
if (this.previous().length) {
return this.previous().some(i => i.inline)
}
return true
}
isMap() {
if (typeof this.opts.map !== 'undefined') {
return !!this.opts.map
}
return this.previous().length > 0
}
isSourcesContent() {
if (typeof this.mapOpts.sourcesContent !== 'undefined') {
return this.mapOpts.sourcesContent
}
if (this.previous().length) {
return this.previous().some(i => i.withContent())
}
return true
}
outputFile() {
if (this.opts.to) {
return this.path(this.opts.to)
} else if (this.opts.from) {
return this.path(this.opts.from)
} else {
return 'to.css'
}
}
path(file) {
if (this.mapOpts.absolute) return file
if (file.charCodeAt(0) === 60 /* `<` */) return file
if (/^\w+:\/\//.test(file)) return file
let cached = this.memoizedPaths.get(file)
if (cached) return cached
let from = this.opts.to ? dirname(this.opts.to) : '.'
if (typeof this.mapOpts.annotation === 'string') {
from = dirname(resolve(from, this.mapOpts.annotation))
}
let path = relative(from, file)
this.memoizedPaths.set(file, path)
return path
}
previous() {
if (!this.previousMaps) {
this.previousMaps = []
if (this.root) {
this.root.walk(node => {
if (node.source && node.source.input.map) {
let map = node.source.input.map
if (!this.previousMaps.includes(map)) {
this.previousMaps.push(map)
}
}
})
} else {
let input = new Input(this.originalCSS, this.opts)
if (input.map) this.previousMaps.push(input.map)
}
}
return this.previousMaps
}
setSourcesContent() {
let already = {}
if (this.root) {
this.root.walk(node => {
if (node.source) {
let from = node.source.input.from
if (from && !already[from]) {
already[from] = true
let fromUrl = this.usesFileUrls
? this.toFileUrl(from)
: this.toUrl(this.path(from))
this.map.setSourceContent(fromUrl, node.source.input.css)
}
}
})
} else if (this.css) {
let from = this.opts.from
? this.toUrl(this.path(this.opts.from))
: '<no source>'
this.map.setSourceContent(from, this.css)
}
}
sourcePath(node) {
if (this.mapOpts.from) {
return this.toUrl(this.mapOpts.from)
} else if (this.usesFileUrls) {
return this.toFileUrl(node.source.input.from)
} else {
return this.toUrl(this.path(node.source.input.from))
}
}
toBase64(str) {
if (Buffer) {
return Buffer.from(str).toString('base64')
} else {
return window.btoa(unescape(encodeURIComponent(str)))
}
}
toFileUrl(path) {
let cached = this.memoizedFileURLs.get(path)
if (cached) return cached
if (pathToFileURL) {
let fileURL = pathToFileURL(path).toString()
this.memoizedFileURLs.set(path, fileURL)
return fileURL
} else {
throw new Error(
'`map.absolute` option is not available in this PostCSS build'
)
}
}
toUrl(path) {
let cached = this.memoizedURLs.get(path)
if (cached) return cached
if (sep === '\\') {
path = path.replace(/\\/g, '/')
}
let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent)
this.memoizedURLs.set(path, url)
return url
}
}
module.exports = MapGenerator
@@ -0,0 +1 @@
{"version":3,"file":"map-pin-plus-inside.js","sources":["../../../src/icons/map-pin-plus-inside.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MapPinPlusInside\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgMTBjMCA0Ljk5My01LjUzOSAxMC4xOTMtNy4zOTkgMTEuNzk5YTEgMSAwIDAgMS0xLjIwMiAwQzkuNTM5IDIwLjE5MyA0IDE0Ljk5MyA0IDEwYTggOCAwIDAgMSAxNiAwIiAvPgogIDxwYXRoIGQ9Ik0xMiA3djYiIC8+CiAgPHBhdGggZD0iTTkgMTBoNiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/map-pin-plus-inside\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 MapPinPlusInside = createLucideIcon('MapPinPlusInside', [\n [\n 'path',\n {\n d: 'M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0',\n key: '1r0f0z',\n },\n ],\n ['path', { d: 'M12 7v6', key: 'lw1j43' }],\n ['path', { d: 'M9 10h6', key: '9gxzsh' }],\n]);\n\nexport default MapPinPlusInside;\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,CAAmB,iBAAiB,kBAAoB,CAAA,CAAA,CAAA;AAAA,CAC5D,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AA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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,504 @@
var feature = require('caniuse-lite/dist/unpacker/feature').default
var region = require('caniuse-lite/dist/unpacker/region').default
var fs = require('fs')
var path = require('path')
var BrowserslistError = require('./error')
var IS_SECTION = /^\s*\[(.+)]\s*$/
var CONFIG_PATTERN = /^browserslist-config-/
var SCOPED_CONFIG__PATTERN =
/^@[^/]+(?:\/[^/]+)?\/browserslist-config(?:-|$|\/)/
var FORMAT =
'Browserslist config should be a string or an array ' +
'of strings with browser queries'
var PATHTYPE_UNKNOWN = 'unknown'
var PATHTYPE_DIR = 'directory'
var PATHTYPE_FILE = 'file'
var dataTimeChecked = false
var statCache = {}
var configPathCache = {}
var parseConfigCache = {}
function checkExtend(name) {
var use = ' Use `dangerousExtend` option to disable.'
if (!CONFIG_PATTERN.test(name) && !SCOPED_CONFIG__PATTERN.test(name)) {
throw new BrowserslistError(
'Browserslist config needs `browserslist-config-` prefix. ' + use
)
}
if (name.replace(/^@[^/]+\//, '').indexOf('.') !== -1) {
throw new BrowserslistError(
'`.` not allowed in Browserslist config name. ' + use
)
}
if (name.indexOf('node_modules') !== -1) {
throw new BrowserslistError(
'`node_modules` not allowed in Browserslist config.' + use
)
}
}
function getPathType(filepath) {
var stats
try {
stats = fs.existsSync(filepath) && fs.statSync(filepath)
} catch (err) {
/* c8 ignore start */
if (
err.code !== 'ENOENT' &&
err.code !== 'EACCES' &&
err.code !== 'ERR_ACCESS_DENIED'
) {
throw err
}
/* c8 ignore end */
}
if (stats && stats.isDirectory()) return PATHTYPE_DIR
if (stats && stats.isFile()) return PATHTYPE_FILE
return PATHTYPE_UNKNOWN
}
function isFile(file) {
return getPathType(file) === PATHTYPE_FILE
}
function isDirectory(dir) {
return getPathType(dir) === PATHTYPE_DIR
}
function eachParent(file, callback, cache) {
var loc = path.resolve(file)
var pathsForCacheResult = []
var result
do {
if (!pathInRoot(loc)) {
break
}
if (cache && loc in cache) {
result = cache[loc]
break
}
pathsForCacheResult.push(loc)
if (!isDirectory(loc)) {
continue
}
var locResult = callback(loc)
if (typeof locResult !== 'undefined') {
result = locResult
break
}
} while (loc !== (loc = path.dirname(loc)))
if (cache && !process.env.BROWSERSLIST_DISABLE_CACHE) {
pathsForCacheResult.forEach(function (cachePath) {
cache[cachePath] = result
})
}
return result
}
function pathInRoot(p) {
if (!process.env.BROWSERSLIST_ROOT_PATH) return true
var rootPath = path.resolve(process.env.BROWSERSLIST_ROOT_PATH)
if (path.relative(rootPath, p).substring(0, 2) === '..') {
return false
}
return true
}
function check(section) {
if (Array.isArray(section)) {
for (var i = 0; i < section.length; i++) {
if (typeof section[i] !== 'string') {
throw new BrowserslistError(FORMAT)
}
}
} else if (typeof section !== 'string') {
throw new BrowserslistError(FORMAT)
}
}
function pickEnv(config, opts) {
if (typeof config !== 'object') return config
var name
if (typeof opts.env === 'string') {
name = opts.env
} else if (process.env.BROWSERSLIST_ENV) {
name = process.env.BROWSERSLIST_ENV
} else if (process.env.NODE_ENV) {
name = process.env.NODE_ENV
} else {
name = 'production'
}
if (opts.throwOnMissing) {
if (name && name !== 'defaults' && !config[name]) {
throw new BrowserslistError(
'Missing config for Browserslist environment `' + name + '`'
)
}
}
return config[name] || config.defaults
}
function parsePackage(file) {
var text = fs
.readFileSync(file)
.toString()
.replace(/^\uFEFF/m, '')
var list
if (text.indexOf('"browserslist"') >= 0) {
list = JSON.parse(text).browserslist
} else if (text.indexOf('"browserlist"') >= 0) {
var config = JSON.parse(text)
if (config.browserlist && !config.browserslist) {
throw new BrowserslistError(
'`browserlist` key instead of `browserslist` in ' + file
)
}
}
if (Array.isArray(list) || typeof list === 'string') {
list = { defaults: list }
}
for (var i in list) {
check(list[i])
}
return list
}
function parsePackageOrReadConfig(file) {
if (file in parseConfigCache) {
return parseConfigCache[file]
}
var isPackage = path.basename(file) === 'package.json'
var result = isPackage ? parsePackage(file) : module.exports.readConfig(file)
if (!process.env.BROWSERSLIST_DISABLE_CACHE) {
parseConfigCache[file] = result
}
return result
}
function latestReleaseTime(agents) {
var latest = 0
for (var name in agents) {
var dates = agents[name].releaseDate || {}
for (var key in dates) {
if (latest < dates[key]) {
latest = dates[key]
}
}
}
return latest * 1000
}
function getMonthsPassed(date) {
var now = new Date()
var past = new Date(date)
var years = now.getFullYear() - past.getFullYear()
var months = now.getMonth() - past.getMonth()
return years * 12 + months
}
function normalizeStats(data, stats) {
if (!data) {
data = {}
}
if (stats && 'dataByBrowser' in stats) {
stats = stats.dataByBrowser
}
if (typeof stats !== 'object') return undefined
var normalized = Object.create(null)
for (var i in stats) {
var versions = Object.keys(stats[i])
var known = Object.prototype.hasOwnProperty.call(data, i) && data[i]
if (versions.length === 1 && known && known.versions.length === 1) {
var normal = known.versions[0]
normalized[i] = Object.create(null)
normalized[i][normal] = stats[i][versions[0]]
} else {
normalized[i] = stats[i]
}
}
return normalized
}
function normalizeUsageData(usageData, data) {
for (var browser in usageData) {
var browserUsage = usageData[browser]
// https://github.com/browserslist/browserslist/issues/431#issuecomment-565230615
// caniuse-db returns { 0: "percentage" } for `and_*` regional stats
if ('0' in browserUsage) {
var versions = data[browser].versions
browserUsage[versions[versions.length - 1]] = browserUsage[0]
delete browserUsage[0]
}
}
}
module.exports = {
loadQueries: function loadQueries(ctx, name) {
if (!ctx.dangerousExtend && !process.env.BROWSERSLIST_DANGEROUS_EXTEND) {
checkExtend(name)
}
var queries = require(require.resolve(name, { paths: ['.', ctx.path] }))
if (typeof queries === 'object' && queries !== null && queries.__esModule) {
queries = queries.default
}
if (queries) {
if (Array.isArray(queries)) {
return queries
} else if (typeof queries === 'object') {
if (!queries.defaults) queries.defaults = []
return pickEnv(queries, ctx, name)
}
}
throw new BrowserslistError(
'`' +
name +
'` config exports not an array of queries' +
' or an object of envs'
)
},
loadStat: function loadStat(ctx, name, data) {
if (!ctx.dangerousExtend && !process.env.BROWSERSLIST_DANGEROUS_EXTEND) {
checkExtend(name)
}
var stats = require(
// Use forward slashes for module paths, also on Windows.
require.resolve(path.posix.join(name, 'browserslist-stats.json'), {
paths: ['.']
})
)
return normalizeStats(data, stats)
},
getStat: function getStat(opts, data) {
var stats
if (opts.stats) {
stats = opts.stats
} else if (process.env.BROWSERSLIST_STATS) {
stats = process.env.BROWSERSLIST_STATS
} else if (opts.path && path.resolve && fs.existsSync) {
stats = eachParent(
opts.path,
function (dir) {
var file = path.join(dir, 'browserslist-stats.json')
return isFile(file) ? file : undefined
},
statCache
)
}
if (typeof stats === 'string') {
try {
stats = JSON.parse(fs.readFileSync(stats))
} catch (e) {
throw new BrowserslistError("Can't read " + stats)
}
}
return normalizeStats(data, stats)
},
loadConfig: function loadConfig(opts) {
if (process.env.BROWSERSLIST) {
return process.env.BROWSERSLIST
} else if (opts.config || process.env.BROWSERSLIST_CONFIG) {
var file = opts.config || process.env.BROWSERSLIST_CONFIG
return pickEnv(parsePackageOrReadConfig(file), opts)
} else if (opts.path) {
return pickEnv(module.exports.findConfig(opts.path), opts)
} else {
return undefined
}
},
loadCountry: function loadCountry(usage, country, data) {
var code = country.replace(/[^\w-]/g, '')
if (!usage[code]) {
var compressed
try {
compressed = require('caniuse-lite/data/regions/' + code + '.js')
} catch (e) {
throw new BrowserslistError('Unknown region name `' + code + '`.')
}
var usageData = region(compressed)
normalizeUsageData(usageData, data)
usage[country] = Object.create(null)
for (var i in usageData) {
for (var j in usageData[i]) {
usage[country][i + ' ' + j] = usageData[i][j]
}
}
}
},
loadFeature: function loadFeature(features, name) {
name = name.replace(/[^\w-]/g, '')
if (features[name]) return
var compressed
try {
compressed = require('caniuse-lite/data/features/' + name + '.js')
} catch (e) {
throw new BrowserslistError('Unknown feature name `' + name + '`.')
}
var stats = feature(compressed).stats
features[name] = {}
for (var i in stats) {
features[name][i] = {}
for (var j in stats[i]) {
features[name][i][j] = stats[i][j]
}
}
},
parseConfig: function parseConfig(string) {
var result = { defaults: [] }
var sections = ['defaults']
string
.toString()
.replace(/#[^\n]*/g, '')
.split(/\n|,/)
.map(function (line) {
return line.trim()
})
.filter(function (line) {
return line !== ''
})
.forEach(function (line) {
if (IS_SECTION.test(line)) {
sections = line.match(IS_SECTION)[1].trim().split(' ')
sections.forEach(function (section) {
if (result[section]) {
throw new BrowserslistError(
'Duplicate section ' + section + ' in Browserslist config'
)
}
result[section] = []
})
} else {
sections.forEach(function (section) {
result[section].push(line)
})
}
})
return result
},
readConfig: function readConfig(file) {
if (!isFile(file)) {
throw new BrowserslistError("Can't read " + file + ' config')
}
return module.exports.parseConfig(fs.readFileSync(file))
},
findConfigFile: function findConfigFile(from) {
return eachParent(
from,
function (dir) {
var config = path.join(dir, 'browserslist')
var pkg = path.join(dir, 'package.json')
var rc = path.join(dir, '.browserslistrc')
var pkgBrowserslist
if (isFile(pkg)) {
try {
pkgBrowserslist = parsePackage(pkg)
} catch (e) {
if (e.name === 'BrowserslistError') throw e
console.warn(
'[Browserslist] Could not parse ' + pkg + '. Ignoring it.'
)
}
}
if (isFile(config) && pkgBrowserslist) {
throw new BrowserslistError(
dir + ' contains both browserslist and package.json with browsers'
)
} else if (isFile(rc) && pkgBrowserslist) {
throw new BrowserslistError(
dir +
' contains both .browserslistrc and package.json with browsers'
)
} else if (isFile(config) && isFile(rc)) {
throw new BrowserslistError(
dir + ' contains both .browserslistrc and browserslist'
)
} else if (isFile(config)) {
return config
} else if (isFile(rc)) {
return rc
} else if (pkgBrowserslist) {
return pkg
}
},
configPathCache
)
},
findConfig: function findConfig(from) {
var configFile = this.findConfigFile(from)
return configFile ? parsePackageOrReadConfig(configFile) : undefined
},
clearCaches: function clearCaches() {
dataTimeChecked = false
statCache = {}
configPathCache = {}
parseConfigCache = {}
this.cache = {}
},
oldDataWarning: function oldDataWarning(agentsObj) {
if (dataTimeChecked) return
dataTimeChecked = true
if (process.env.BROWSERSLIST_IGNORE_OLD_DATA) return
var latest = latestReleaseTime(agentsObj)
var monthsPassed = getMonthsPassed(latest)
if (latest !== 0 && monthsPassed >= 6) {
if (process.env.BROWSERSLIST_TRACE_WARNING) {
console.info('Last browser release in DB: ' + String(new Date(latest)))
console.trace()
}
var months = monthsPassed + ' ' + (monthsPassed > 1 ? 'months' : 'month')
console.warn(
'Browserslist: browsers data (caniuse-lite) is ' +
months +
' old. Please run:\n' +
' npx update-browserslist-db@latest\n' +
' Why you should do it regularly: ' +
'https://github.com/browserslist/update-db#readme'
)
}
},
currentNode: function currentNode() {
return 'node ' + process.versions.node
},
env: process.env
}
@@ -0,0 +1 @@
{"version":3,"file":"WillChangeMotionValue.mjs","sources":["../../../../src/value/use-will-change/WillChangeMotionValue.ts"],"sourcesContent":["import {\n acceleratedValues,\n MotionValue,\n transformProps,\n type WillChange,\n} from \"motion-dom\"\n\nexport class WillChangeMotionValue\n extends MotionValue<string>\n implements WillChange\n{\n private isEnabled = false\n\n add(name: string) {\n if (transformProps.has(name) || acceleratedValues.has(name)) {\n this.isEnabled = true\n this.update()\n }\n }\n\n private update() {\n this.set(this.isEnabled ? \"transform\" : \"auto\")\n }\n}\n"],"names":[],"mappings":";;AAOM,MAAO,qBACT,SAAQ,WAAmB,CAAA;AAD/B,IAAA,WAAA,GAAA;;QAIY,IAAA,CAAA,SAAS,GAAG,KAAK;IAY7B;AAVI,IAAA,GAAG,CAAC,IAAY,EAAA;AACZ,QAAA,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;AACzD,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI;YACrB,IAAI,CAAC,MAAM,EAAE;QACjB;IACJ;IAEQ,MAAM,GAAA;AACV,QAAA,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;IACnD;AACH;;;;"}
@@ -0,0 +1,932 @@
"use strict";
// the PEND/UNPEND stuff tracks whether we're ready to emit end/close yet.
// but the path reservations are required to avoid race conditions where
// parallelized unpack ops may mess with one another, due to dependencies
// (like a Link depending on its target) or destructive operations (like
// clobbering an fs object to create one of a different type.)
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;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnpackSync = exports.Unpack = void 0;
const fsm = __importStar(require("@isaacs/fs-minipass"));
const node_assert_1 = __importDefault(require("node:assert"));
const node_crypto_1 = require("node:crypto");
const node_fs_1 = __importDefault(require("node:fs"));
const node_path_1 = __importDefault(require("node:path"));
const get_write_flag_js_1 = require("./get-write-flag.js");
const mkdir_js_1 = require("./mkdir.js");
const normalize_windows_path_js_1 = require("./normalize-windows-path.js");
const parse_js_1 = require("./parse.js");
const strip_absolute_path_js_1 = require("./strip-absolute-path.js");
const wc = __importStar(require("./winchars.js"));
const path_reservations_js_1 = require("./path-reservations.js");
const symlink_error_js_1 = require("./symlink-error.js");
const process_umask_js_1 = require("./process-umask.js");
const ONENTRY = Symbol('onEntry');
const CHECKFS = Symbol('checkFs');
const CHECKFS2 = Symbol('checkFs2');
const ISREUSABLE = Symbol('isReusable');
const MAKEFS = Symbol('makeFs');
const FILE = Symbol('file');
const DIRECTORY = Symbol('directory');
const LINK = Symbol('link');
const SYMLINK = Symbol('symlink');
const HARDLINK = Symbol('hardlink');
const ENSURE_NO_SYMLINK = Symbol('ensureNoSymlink');
const UNSUPPORTED = Symbol('unsupported');
const CHECKPATH = Symbol('checkPath');
const STRIPABSOLUTEPATH = Symbol('stripAbsolutePath');
const MKDIR = Symbol('mkdir');
const ONERROR = Symbol('onError');
const PENDING = Symbol('pending');
const PEND = Symbol('pend');
const UNPEND = Symbol('unpend');
const ENDED = Symbol('ended');
const MAYBECLOSE = Symbol('maybeClose');
const SKIP = Symbol('skip');
const DOCHOWN = Symbol('doChown');
const UID = Symbol('uid');
const GID = Symbol('gid');
const CHECKED_CWD = Symbol('checkedCwd');
const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
const isWindows = platform === 'win32';
const DEFAULT_MAX_DEPTH = 1024;
// Unlinks on Windows are not atomic.
//
// This means that if you have a file entry, followed by another
// file entry with an identical name, and you cannot re-use the file
// (because it's a hardlink, or because unlink:true is set, or it's
// Windows, which does not have useful nlink values), then the unlink
// will be committed to the disk AFTER the new file has been written
// over the old one, deleting the new file.
//
// To work around this, on Windows systems, we rename the file and then
// delete the renamed file. It's a sloppy kludge, but frankly, I do not
// know of a better way to do this, given windows' non-atomic unlink
// semantics.
//
// See: https://github.com/npm/node-tar/issues/183
/* c8 ignore start */
const unlinkFile = (path, cb) => {
if (!isWindows) {
return node_fs_1.default.unlink(path, cb);
}
const name = path + '.DELETE.' + (0, node_crypto_1.randomBytes)(16).toString('hex');
node_fs_1.default.rename(path, name, er => {
if (er) {
return cb(er);
}
node_fs_1.default.unlink(name, cb);
});
};
/* c8 ignore stop */
/* c8 ignore start */
const unlinkFileSync = (path) => {
if (!isWindows) {
return node_fs_1.default.unlinkSync(path);
}
const name = path + '.DELETE.' + (0, node_crypto_1.randomBytes)(16).toString('hex');
node_fs_1.default.renameSync(path, name);
node_fs_1.default.unlinkSync(name);
};
/* c8 ignore stop */
// this.gid, entry.gid, this.processUid
const uint32 = (a, b, c) => a !== undefined && a === a >>> 0 ? a
: b !== undefined && b === b >>> 0 ? b
: c;
class Unpack extends parse_js_1.Parser {
[ENDED] = false;
[CHECKED_CWD] = false;
[PENDING] = 0;
reservations = new path_reservations_js_1.PathReservations();
transform;
writable = true;
readable = false;
uid;
gid;
setOwner;
preserveOwner;
processGid;
processUid;
maxDepth;
forceChown;
win32;
newer;
keep;
noMtime;
preservePaths;
unlink;
cwd;
strip;
processUmask;
umask;
dmode;
fmode;
chmod;
constructor(opt = {}) {
opt.ondone = () => {
this[ENDED] = true;
this[MAYBECLOSE]();
};
super(opt);
this.transform = opt.transform;
this.chmod = !!opt.chmod;
if (typeof opt.uid === 'number' || typeof opt.gid === 'number') {
// need both or neither
if (typeof opt.uid !== 'number' || typeof opt.gid !== 'number') {
throw new TypeError('cannot set owner without number uid and gid');
}
if (opt.preserveOwner) {
throw new TypeError('cannot preserve owner in archive and also set owner explicitly');
}
this.uid = opt.uid;
this.gid = opt.gid;
this.setOwner = true;
}
else {
this.uid = undefined;
this.gid = undefined;
this.setOwner = false;
}
// default true for root
this.preserveOwner =
opt.preserveOwner === undefined && typeof opt.uid !== 'number' ?
!!(process.getuid?.() === 0)
: !!opt.preserveOwner;
this.processUid =
(this.preserveOwner || this.setOwner) && process.getuid ?
process.getuid()
: undefined;
this.processGid =
(this.preserveOwner || this.setOwner) && process.getgid ?
process.getgid()
: undefined;
// prevent excessively deep nesting of subfolders
// set to `Infinity` to remove this restriction
this.maxDepth =
typeof opt.maxDepth === 'number' ? opt.maxDepth : DEFAULT_MAX_DEPTH;
// mostly just for testing, but useful in some cases.
// Forcibly trigger a chown on every entry, no matter what
this.forceChown = opt.forceChown === true;
// turn ><?| in filenames into 0xf000-higher encoded forms
this.win32 = !!opt.win32 || isWindows;
// do not unpack over files that are newer than what's in the archive
this.newer = !!opt.newer;
// do not unpack over ANY files
this.keep = !!opt.keep;
// do not set mtime/atime of extracted entries
this.noMtime = !!opt.noMtime;
// allow .., absolute path entries, and unpacking through symlinks
// without this, warn and skip .., relativize absolutes, and error
// on symlinks in extraction path
this.preservePaths = !!opt.preservePaths;
// unlink files and links before writing. This breaks existing hard
// links, and removes symlink directories rather than erroring
this.unlink = !!opt.unlink;
this.cwd = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(opt.cwd || process.cwd()));
this.strip = Number(opt.strip) || 0;
// if we're not chmodding, then we don't need the process umask
this.processUmask =
!this.chmod ? 0
: typeof opt.processUmask === 'number' ? opt.processUmask
: (0, process_umask_js_1.umask)();
this.umask =
typeof opt.umask === 'number' ? opt.umask : this.processUmask;
// default mode for dirs created as parents
this.dmode = opt.dmode || 0o0777 & ~this.umask;
this.fmode = opt.fmode || 0o0666 & ~this.umask;
this.on('entry', entry => this[ONENTRY](entry));
}
// a bad or damaged archive is a warning for Parser, but an error
// when extracting. Mark those errors as unrecoverable, because
// the Unpack contract cannot be met.
warn(code, msg, data = {}) {
if (code === 'TAR_BAD_ARCHIVE' || code === 'TAR_ABORT') {
data.recoverable = false;
}
return super.warn(code, msg, data);
}
[MAYBECLOSE]() {
if (this[ENDED] && this[PENDING] === 0) {
this.emit('prefinish');
this.emit('finish');
this.emit('end');
}
}
// return false if we need to skip this file
// return true if the field was successfully sanitized
[STRIPABSOLUTEPATH](entry, field) {
const p = entry[field];
const { type } = entry;
if (!p || this.preservePaths)
return true;
// strip off the root
const [root, stripped] = (0, strip_absolute_path_js_1.stripAbsolutePath)(p);
const parts = stripped.replaceAll(/\\/g, '/').split('/');
if (parts.includes('..') ||
/* c8 ignore next */
(isWindows && /^[a-z]:\.\.$/i.test(parts[0] ?? ''))) {
// For linkpath, check if the resolved path escapes cwd rather than
// just rejecting any path with '..' - relative symlinks like
// '../sibling/file' are valid if they resolve within the cwd.
// For paths, they just simply may not ever use .. at all.
if (field === 'path' || type === 'Link') {
this.warn('TAR_ENTRY_ERROR', `${field} contains '..'`, {
entry,
[field]: p,
});
// not ok!
return false;
}
// Resolve linkpath relative to the entry's directory.
// `path.posix` is safe to use because we're operating on
// tar paths, not a filesystem.
const entryDir = node_path_1.default.posix.dirname(entry.path);
const resolved = node_path_1.default.posix.normalize(node_path_1.default.posix.join(entryDir, parts.join('/')));
// If the resolved path escapes (starts with ..), reject it
if (resolved.startsWith('../') || resolved === '..') {
this.warn('TAR_ENTRY_ERROR', `${field} escapes extraction directory`, {
entry,
[field]: p,
});
return false;
}
}
if (root) {
// ok, but triggers warning about stripping root
entry[field] = String(stripped);
this.warn('TAR_ENTRY_INFO', `stripping ${root} from absolute ${field}`, {
entry,
[field]: p,
});
}
return true;
}
// no IO, just string checking for absolute indicators
[CHECKPATH](entry) {
const p = (0, normalize_windows_path_js_1.normalizeWindowsPath)(entry.path);
const parts = p.split('/');
if (this.strip) {
if (parts.length < this.strip) {
return false;
}
if (entry.type === 'Link') {
const linkparts = (0, normalize_windows_path_js_1.normalizeWindowsPath)(String(entry.linkpath)).split('/');
if (linkparts.length >= this.strip) {
entry.linkpath = linkparts.slice(this.strip).join('/');
}
else {
return false;
}
}
parts.splice(0, this.strip);
entry.path = parts.join('/');
}
if (isFinite(this.maxDepth) && parts.length > this.maxDepth) {
this.warn('TAR_ENTRY_ERROR', 'path excessively deep', {
entry,
path: p,
depth: parts.length,
maxDepth: this.maxDepth,
});
return false;
}
if (!this[STRIPABSOLUTEPATH](entry, 'path') ||
!this[STRIPABSOLUTEPATH](entry, 'linkpath')) {
return false;
}
entry.absolute =
node_path_1.default.isAbsolute(entry.path) ?
(0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(entry.path))
: (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(this.cwd, entry.path));
// if we somehow ended up with a path that escapes the cwd, and we are
// not in preservePaths mode, then something is fishy! This should have
// been prevented above, so ignore this for coverage.
/* c8 ignore start - defense in depth */
if (!this.preservePaths &&
typeof entry.absolute === 'string' &&
entry.absolute.indexOf(this.cwd + '/') !== 0 &&
entry.absolute !== this.cwd) {
this.warn('TAR_ENTRY_ERROR', 'path escaped extraction target', {
entry,
path: (0, normalize_windows_path_js_1.normalizeWindowsPath)(entry.path),
resolvedPath: entry.absolute,
cwd: this.cwd,
});
return false;
}
/* c8 ignore stop */
// an archive can set properties on the extraction directory, but it
// may not replace the cwd with a different kind of thing entirely.
if (entry.absolute === this.cwd &&
entry.type !== 'Directory' &&
entry.type !== 'GNUDumpDir') {
return false;
}
// only encode : chars that aren't drive letter indicators
if (this.win32) {
const { root: aRoot } = node_path_1.default.win32.parse(String(entry.absolute));
entry.absolute =
aRoot + wc.encode(String(entry.absolute).slice(aRoot.length));
const { root: pRoot } = node_path_1.default.win32.parse(entry.path);
entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length));
}
return true;
}
[ONENTRY](entry) {
if (!this[CHECKPATH](entry)) {
return entry.resume();
}
node_assert_1.default.equal(typeof entry.absolute, 'string');
switch (entry.type) {
case 'Directory':
case 'GNUDumpDir':
if (entry.mode) {
entry.mode = entry.mode | 0o700;
}
// eslint-disable-next-line no-fallthrough
case 'File':
case 'OldFile':
case 'ContiguousFile':
case 'Link':
case 'SymbolicLink':
return this[CHECKFS](entry);
case 'CharacterDevice':
case 'BlockDevice':
case 'FIFO':
default:
return this[UNSUPPORTED](entry);
}
}
[ONERROR](er, entry) {
// Cwd has to exist, or else nothing works. That's serious.
// Other errors are warnings, which raise the error in strict
// mode, but otherwise continue on.
if (er.name === 'CwdError') {
this.emit('error', er);
}
else {
this.warn('TAR_ENTRY_ERROR', er, { entry });
this[UNPEND]();
entry.resume();
}
}
[MKDIR](dir, mode, cb) {
void (0, mkdir_js_1.mkdir)((0, normalize_windows_path_js_1.normalizeWindowsPath)(dir), {
uid: this.uid,
gid: this.gid,
processUid: this.processUid,
processGid: this.processGid,
umask: this.processUmask,
preserve: this.preservePaths,
unlink: this.unlink,
cwd: this.cwd,
mode: mode,
}, cb);
}
[DOCHOWN](entry) {
// in preserve owner mode, chown if the entry doesn't match process
// in set owner mode, chown if setting doesn't match process
return (this.forceChown ||
(this.preserveOwner &&
((typeof entry.uid === 'number' &&
entry.uid !== this.processUid) ||
(typeof entry.gid === 'number' &&
entry.gid !== this.processGid))) ||
(typeof this.uid === 'number' && this.uid !== this.processUid) ||
(typeof this.gid === 'number' && this.gid !== this.processGid));
}
[UID](entry) {
return uint32(this.uid, entry.uid, this.processUid);
}
[GID](entry) {
return uint32(this.gid, entry.gid, this.processGid);
}
[FILE](entry, fullyDone) {
const mode = typeof entry.mode === 'number' ? entry.mode & 0o7777 : this.fmode;
const stream = new fsm.WriteStream(String(entry.absolute), {
// slight lie, but it can be numeric flags
flags: (0, get_write_flag_js_1.getWriteFlag)(entry.size),
mode: mode,
autoClose: false,
});
stream.on('error', (er) => {
if (stream.fd) {
node_fs_1.default.close(stream.fd, () => { });
}
// flush all the data out so that we aren't left hanging
// if the error wasn't actually fatal. otherwise the parse
// is blocked, and we never proceed.
stream.write = () => true;
this[ONERROR](er, entry);
fullyDone();
});
let actions = 1;
const done = (er) => {
if (er) {
/* c8 ignore start - we should always have a fd by now */
if (stream.fd) {
node_fs_1.default.close(stream.fd, () => { });
}
/* c8 ignore stop */
this[ONERROR](er, entry);
fullyDone();
return;
}
if (--actions === 0) {
if (stream.fd !== undefined) {
node_fs_1.default.close(stream.fd, er => {
if (er) {
this[ONERROR](er, entry);
}
else {
this[UNPEND]();
}
fullyDone();
});
}
}
};
stream.on('finish', () => {
// if futimes fails, try utimes
// if utimes fails, fail with the original error
// same for fchown/chown
const abs = String(entry.absolute);
const fd = stream.fd;
if (typeof fd === 'number' && entry.mtime && !this.noMtime) {
actions++;
const atime = entry.atime || new Date();
const mtime = entry.mtime;
node_fs_1.default.futimes(fd, atime, mtime, er => er ?
node_fs_1.default.utimes(abs, atime, mtime, er2 => done(er2 && er))
: done());
}
if (typeof fd === 'number' && this[DOCHOWN](entry)) {
actions++;
const uid = this[UID](entry);
const gid = this[GID](entry);
if (typeof uid === 'number' && typeof gid === 'number') {
node_fs_1.default.fchown(fd, uid, gid, er => er ? node_fs_1.default.chown(abs, uid, gid, er2 => done(er2 && er)) : done());
}
}
done();
});
const tx = this.transform ? this.transform(entry) || entry : entry;
if (tx !== entry) {
tx.on('error', er => {
this[ONERROR](er, entry);
fullyDone();
});
entry.pipe(tx);
}
tx.pipe(stream);
}
[DIRECTORY](entry, fullyDone) {
const mode = typeof entry.mode === 'number' ? entry.mode & 0o7777 : this.dmode;
this[MKDIR](String(entry.absolute), mode, er => {
if (er) {
this[ONERROR](er, entry);
fullyDone();
return;
}
let actions = 1;
const done = () => {
if (--actions === 0) {
fullyDone();
this[UNPEND]();
entry.resume();
}
};
if (entry.mtime && !this.noMtime) {
actions++;
node_fs_1.default.utimes(String(entry.absolute), entry.atime || new Date(), entry.mtime, done);
}
if (this[DOCHOWN](entry)) {
actions++;
node_fs_1.default.chown(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry)), done);
}
done();
});
}
[UNSUPPORTED](entry) {
entry.unsupported = true;
this.warn('TAR_ENTRY_UNSUPPORTED', `unsupported entry type: ${entry.type}`, { entry });
entry.resume();
}
[SYMLINK](entry, done) {
const parts = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.relative(this.cwd, node_path_1.default.resolve(node_path_1.default.dirname(String(entry.absolute)), String(entry.linkpath)))).split('/');
this[ENSURE_NO_SYMLINK](entry, this.cwd, parts, () => this[LINK](entry, String(entry.linkpath), 'symlink', done), er => {
this[ONERROR](er, entry);
done();
});
}
[HARDLINK](entry, done) {
const linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(this.cwd, String(entry.linkpath)));
const parts = (0, normalize_windows_path_js_1.normalizeWindowsPath)(String(entry.linkpath)).split('/');
this[ENSURE_NO_SYMLINK](entry, this.cwd, parts, () => this[LINK](entry, linkpath, 'link', done), er => {
this[ONERROR](er, entry);
done();
});
}
[ENSURE_NO_SYMLINK](entry, cwd, parts, done, onError) {
const p = parts.shift();
if (this.preservePaths || p === undefined)
return done();
const t = node_path_1.default.resolve(cwd, p);
node_fs_1.default.lstat(t, (er, st) => {
if (er)
return done();
if (st?.isSymbolicLink()) {
return onError(new symlink_error_js_1.SymlinkError(t, node_path_1.default.resolve(t, parts.join('/'))));
}
this[ENSURE_NO_SYMLINK](entry, t, parts, done, onError);
});
}
[PEND]() {
this[PENDING]++;
}
[UNPEND]() {
this[PENDING]--;
this[MAYBECLOSE]();
}
[SKIP](entry) {
this[UNPEND]();
entry.resume();
}
// Check if we can reuse an existing filesystem entry safely and
// overwrite it, rather than unlinking and recreating
// Windows doesn't report a useful nlink, so we just never reuse entries
[ISREUSABLE](entry, st) {
return (entry.type === 'File' &&
!this.unlink &&
st.isFile() &&
st.nlink <= 1 &&
!isWindows);
}
// check if a thing is there, and if so, try to clobber it
[CHECKFS](entry) {
this[PEND]();
const paths = [entry.path];
if (entry.linkpath) {
paths.push(entry.linkpath);
}
this.reservations.reserve(paths, done => this[CHECKFS2](entry, done));
}
[CHECKFS2](entry, fullyDone) {
const done = (er) => {
fullyDone(er);
};
const checkCwd = () => {
this[MKDIR](this.cwd, this.dmode, er => {
if (er) {
this[ONERROR](er, entry);
done();
return;
}
this[CHECKED_CWD] = true;
start();
});
};
const start = () => {
if (entry.absolute !== this.cwd) {
const parent = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.dirname(String(entry.absolute)));
if (parent !== this.cwd) {
return this[MKDIR](parent, this.dmode, er => {
if (er) {
this[ONERROR](er, entry);
done();
return;
}
afterMakeParent();
});
}
}
afterMakeParent();
};
const afterMakeParent = () => {
node_fs_1.default.lstat(String(entry.absolute), (lstatEr, st) => {
if (st &&
(this.keep ||
/* c8 ignore next */
(this.newer && st.mtime > (entry.mtime ?? st.mtime)))) {
this[SKIP](entry);
done();
return;
}
if (lstatEr || this[ISREUSABLE](entry, st)) {
return this[MAKEFS](null, entry, done);
}
if (st.isDirectory()) {
if (entry.type === 'Directory') {
const needChmod = this.chmod && entry.mode && (st.mode & 0o7777) !== entry.mode;
const afterChmod = (er) => this[MAKEFS](er ?? null, entry, done);
if (!needChmod) {
return afterChmod();
}
return node_fs_1.default.chmod(String(entry.absolute), Number(entry.mode), afterChmod);
}
// Not a dir entry, have to remove it.
// NB: the only way to end up with an entry that is the cwd
// itself, in such a way that == does not detect, is a
// tricky windows absolute path with UNC or 8.3 parts (and
// preservePaths:true, or else it will have been stripped).
// In that case, the user has opted out of path protections
// explicitly, so if they blow away the cwd, c'est la vie.
if (entry.absolute !== this.cwd) {
return node_fs_1.default.rmdir(String(entry.absolute), (er) => this[MAKEFS](er ?? null, entry, done));
}
}
// not a dir, and not reusable
// don't remove if the cwd, we want that error
if (entry.absolute === this.cwd) {
return this[MAKEFS](null, entry, done);
}
unlinkFile(String(entry.absolute), er => this[MAKEFS](er ?? null, entry, done));
});
};
if (this[CHECKED_CWD]) {
start();
}
else {
checkCwd();
}
}
[MAKEFS](er, entry, done) {
if (er) {
this[ONERROR](er, entry);
done();
return;
}
switch (entry.type) {
case 'File':
case 'OldFile':
case 'ContiguousFile':
return this[FILE](entry, done);
case 'Link':
return this[HARDLINK](entry, done);
case 'SymbolicLink':
return this[SYMLINK](entry, done);
case 'Directory':
case 'GNUDumpDir':
return this[DIRECTORY](entry, done);
}
}
[LINK](entry, linkpath, link, done) {
node_fs_1.default[link](linkpath, String(entry.absolute), er => {
if (er) {
this[ONERROR](er, entry);
}
else {
this[UNPEND]();
entry.resume();
}
done();
});
}
}
exports.Unpack = Unpack;
const callSync = (fn) => {
try {
return [null, fn()];
}
catch (er) {
return [er, null];
}
};
class UnpackSync extends Unpack {
sync = true;
[MAKEFS](er, entry) {
return super[MAKEFS](er, entry, () => { });
}
[CHECKFS](entry) {
if (!this[CHECKED_CWD]) {
const er = this[MKDIR](this.cwd, this.dmode);
if (er) {
return this[ONERROR](er, entry);
}
this[CHECKED_CWD] = true;
}
// don't bother to make the parent if the current entry is the cwd,
// we've already checked it.
if (entry.absolute !== this.cwd) {
const parent = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.dirname(String(entry.absolute)));
if (parent !== this.cwd) {
const mkParent = this[MKDIR](parent, this.dmode);
if (mkParent) {
return this[ONERROR](mkParent, entry);
}
}
}
const [lstatEr, st] = callSync(() => node_fs_1.default.lstatSync(String(entry.absolute)));
if (st &&
(this.keep ||
/* c8 ignore next */
(this.newer && st.mtime > (entry.mtime ?? st.mtime)))) {
return this[SKIP](entry);
}
if (lstatEr || this[ISREUSABLE](entry, st)) {
return this[MAKEFS](null, entry);
}
if (st.isDirectory()) {
if (entry.type === 'Directory') {
const needChmod = this.chmod && entry.mode && (st.mode & 0o7777) !== entry.mode;
const [er] = needChmod ?
callSync(() => {
node_fs_1.default.chmodSync(String(entry.absolute), Number(entry.mode));
})
: [];
return this[MAKEFS](er, entry);
}
// not a dir entry, have to remove it
const [er] = callSync(() => node_fs_1.default.rmdirSync(String(entry.absolute)));
this[MAKEFS](er, entry);
}
// not a dir, and not reusable.
// don't remove if it's the cwd, since we want that error.
const [er] = entry.absolute === this.cwd ?
[]
: callSync(() => unlinkFileSync(String(entry.absolute)));
this[MAKEFS](er, entry);
}
[FILE](entry, done) {
const mode = typeof entry.mode === 'number' ? entry.mode & 0o7777 : this.fmode;
const oner = (er) => {
let closeError;
try {
node_fs_1.default.closeSync(fd);
}
catch (e) {
closeError = e;
}
if (er || closeError) {
this[ONERROR](er || closeError, entry);
}
done();
};
let fd;
try {
fd = node_fs_1.default.openSync(String(entry.absolute), (0, get_write_flag_js_1.getWriteFlag)(entry.size), mode);
/* c8 ignore start - This is only a problem if the file was successfully
* statted, BUT failed to open. Testing this is annoying, and we
* already have ample testint for other uses of oner() methods.
*/
}
catch (er) {
return oner(er);
}
/* c8 ignore stop */
const tx = this.transform ? this.transform(entry) || entry : entry;
if (tx !== entry) {
tx.on('error', er => this[ONERROR](er, entry));
entry.pipe(tx);
}
tx.on('data', (chunk) => {
try {
node_fs_1.default.writeSync(fd, chunk, 0, chunk.length);
}
catch (er) {
oner(er);
}
});
tx.on('end', () => {
let er = null;
// try both, falling futimes back to utimes
// if either fails, handle the first error
if (entry.mtime && !this.noMtime) {
const atime = entry.atime || new Date();
const mtime = entry.mtime;
try {
node_fs_1.default.futimesSync(fd, atime, mtime);
}
catch (futimeser) {
try {
node_fs_1.default.utimesSync(String(entry.absolute), atime, mtime);
}
catch {
er = futimeser;
}
}
}
if (this[DOCHOWN](entry)) {
const uid = this[UID](entry);
const gid = this[GID](entry);
try {
node_fs_1.default.fchownSync(fd, Number(uid), Number(gid));
}
catch (fchowner) {
try {
node_fs_1.default.chownSync(String(entry.absolute), Number(uid), Number(gid));
}
catch {
er = er || fchowner;
}
}
}
oner(er);
});
}
[DIRECTORY](entry, done) {
const mode = typeof entry.mode === 'number' ? entry.mode & 0o7777 : this.dmode;
const er = this[MKDIR](String(entry.absolute), mode);
if (er) {
this[ONERROR](er, entry);
done();
return;
}
if (entry.mtime && !this.noMtime) {
try {
node_fs_1.default.utimesSync(String(entry.absolute), entry.atime || new Date(), entry.mtime);
/* c8 ignore next */
}
catch { }
}
if (this[DOCHOWN](entry)) {
try {
node_fs_1.default.chownSync(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry)));
}
catch { }
}
done();
entry.resume();
}
[MKDIR](dir, mode) {
try {
return (0, mkdir_js_1.mkdirSync)((0, normalize_windows_path_js_1.normalizeWindowsPath)(dir), {
uid: this.uid,
gid: this.gid,
processUid: this.processUid,
processGid: this.processGid,
umask: this.processUmask,
preserve: this.preservePaths,
unlink: this.unlink,
cwd: this.cwd,
mode: mode,
});
}
catch (er) {
return er;
}
}
[ENSURE_NO_SYMLINK](_entry, cwd, parts, done, onError) {
if (this.preservePaths || parts.length === 0)
return done();
let t = cwd;
for (const p of parts) {
t = node_path_1.default.resolve(t, p);
const [er, st] = callSync(() => node_fs_1.default.lstatSync(t));
if (er)
return done();
if (st.isSymbolicLink()) {
return onError(new symlink_error_js_1.SymlinkError(t, node_path_1.default.resolve(cwd, parts.join('/'))));
}
}
done();
}
[LINK](entry, linkpath, link, done) {
const linkSync = `${link}Sync`;
try {
node_fs_1.default[linkSync](linkpath, String(entry.absolute));
done();
entry.resume();
}
catch (er) {
return this[ONERROR](er, entry);
}
}
}
exports.UnpackSync = UnpackSync;
//# sourceMappingURL=unpack.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"132":"_E"},B:{"1":"_K","132":"_I"},C:{"1":"_LF","33":"_pN _9O","132":"_PK","292":"_oD _BC"},D:{"1":"_5F","132":"_6N","548":"_pN _4N"},E:{"132":"_UB","548":"_PB"},F:{"132":"_c"},G:{"132":"_3","548":"_s"},H:{"16":"1D"},I:{"1":"I","16":"_G"},J:{"16":"_B"},K:{"1":"H","16":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"132":"_A"},O:{"1":"bC"},P:{"1":"_U","16":"J"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","33":"LE"}},B:4,C:"CSS unicode-bidi property",D:false};
@@ -0,0 +1,153 @@
<div align="center">
<h1>React-remove-📜</h1>
<br/>
dont even scroll
<br/>
<a href="https://www.npmjs.com/package/react-remove-scroll">
<img src="https://img.shields.io/npm/v/react-remove-scroll.svg?style=flat-square" />
</a>
<a href="https://travis-ci.org/theKashey/react-remove-scroll">
<img src="https://img.shields.io/travis/theKashey/react-remove-scroll.svg?style=flat-square" alt="Build status">
</a>
<a href="https://www.npmjs.com/package/react-remove-scroll">
<img src="https://img.shields.io/npm/dm/react-remove-scroll.svg" alt="npm downloads">
</a>
<a href="https://bundlephobia.com/result?p=react-remove-scroll">
<img src="https://img.shields.io/bundlephobia/minzip/react-remove-scroll.svg" alt="bundle size">
</a>
<br/>
</div>
react-remove-scroll
====
[![NPM version](https://img.shields.io/npm/v/react-remove-scroll.svg)](https://www.npmjs.com/package/react-remove-scroll)
Disables scroll outside of `children` node.
- 🖱 mouse and touch devices friendly
- 📈 vertical and horizontal
- 📜 removes document scroll bar maintaining it space
- ✅ support nested scrollable elements
- 🕳 supports react-portals (uses React Event system)
- ☠️ it could block literally any scroll anywhere
# Usage
Just wrap content, which should be scrollable, and everything else would not.
```js
import {RemoveScroll} from 'react-remove-scroll';
<RemoveScroll>
Only this content would be scrollable
</RemoveScroll>
```
`RemoveScroll` accept following props
- `children`
- `[enabled]` - activate or deactivate component behaviour without removing it.
- `[allowPinchZoom=false]` - enabled "pinch-n-zoom" behavior. By default it might be prevented. However - pinch and zoom might break "scroll isolation", and __disabled by default__.
- `[noRelative=false]` - prevents setting `position: relative` on the body.
- `[noIsolation=false]` - disables outer event capturing. Event capturing is React friendly and unlikely be a problem.
But if you are using _shadowbox_ of some sort - you dont need it.
- `[inert=false]` - ☠️(be careful) disables events the rest of page completely using `pointer-events` except the Lock(+shards).
React portals not friendly, might lead to production issues. Enable only for __rare__ cases, when you have to disable scrollbars somewhere on the page(except body, Lock and shards).
- `[forwardProps]` - will forward all props to the `children`
- `[className]` - className for an internal div
- `[removeScrollBar]` - to control scroll bar removal. Set to false, if you prefer to keep it (wheel and touch scroll is still disabled).
# Size
- (🧩 full) 1.7kb after compression (excluding tslib).
---
- (👁 UI) __400b__, visual elements only
- (🚗 sidecar) 1.5kb, side effects
```js
import {sidecar} from "react-remove-scroll";
import {RemoveScroll} from 'react-remove-scroll/UI';
const sidecar = sidecar(() => import('react-remove-scroll/sidecar'));
<RemoveScroll sideCar={sidecar}>
Will load logic from a sidecar when needed
</RemoveScroll>
```
> Consider setting `-webkit-overflow-scrolling: touch;` on a document level for a proper mobile experience.
## Internal div
By default RemoveScroll will create a div to handle and capture events.
You may specify `className` for it, if you need, or __remove it__.
The following code samples will produce the same output
```js
<RemoveScroll className="scroll">
Only this content would be scrollable
</RemoveScroll>
```
```js
<RemoveScroll forwardProps>
<div className="scroll"> //RemoveScroll will inject props to this div
Only this content would be scrollable
</div>
</RemoveScroll>
```
Pick the first one if you don't need a second.
## Position:fixed elements
To properly size these elements please add a special className to them.
```jsx
import {RemoveScroll} from 'react-remove-scroll';
// to make "width: 100%"
<div className={cx(classWithPositionFixed, RemoveScroll.classNames.fullWidth)} />
// to make "right:0"
<div className={cx(classWithPositionFixed, RemoveScroll.classNames.zeroRight)} />
```
See [react-remove-scroll-bar](https://github.com/theKashey/react-remove-scroll-bar) documentation for details.
## More than one lock
When stacked more is active (default) only one (last) component would be active.
## Over isolation
That could happen -
you disable scroll on the body,
you are suppressing all scroll and wheel events,
and you are ghosting the rest of the page by the `inert` prop.
Only something inside Lock does exists for the browser, and that might be less than you expected.
Dont forget about `shard`, dont forget - `inert` is not portals friendly, dont forget - you dont need over isolation in most of the cases.
> just be careful!
# Performance
To do the job this library setup _non_ passive event listener. Chrome dev tools would complain about it, as a
performance no-op.
We have to use synchronous scroll/touch handler, and it may affect scrolling performance.
Consider using `noIsolation` mode, if you have large scrollable areas.
# Supported React versions
- v1 supports React 15/16
- v2 requires 16.8.0+ (hooks)
# Scroll-Locky
This is a refactoring of another library - [react-scroll-locky](https://github.com/theKashey/react-scroll-locky) -
to make package smaller and more react-portals friendly.
## See also
- [react-focus-on](https://github.com/theKashey/react-focus-on) - Finite Modal creator (uses Scroll-Locky) underneath.
- [react-locky](https://github.com/theKashey/react-locky) - React event canceler
- [react-scrolllock](https://github.com/jossmac/react-scrolllock) - React scroll lock
- [scroll-lock](https://github.com/FL3NKEY/scroll-lock) - DOM scroll lock
- [body-scroll-lock](https://github.com/willmcpo/body-scroll-lock) - DOM scroll lock
> This package is relative smaller(1), more react friendly(2), works with non zero body margins(3), and has a better "overscroll" management.
# License
MIT
@@ -0,0 +1,94 @@
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*
* Based on the Base 64 VLQ implementation in Closure Compiler:
* https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
*
* Copyright 2011 The Closure Compiler Authors. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
const base64 = require("./base64");
// A single base 64 digit can contain 6 bits of data. For the base 64 variable
// length quantities we use in the source map spec, the first bit is the sign,
// the next four bits are the actual value, and the 6th bit is the
// continuation bit. The continuation bit tells us whether there are more
// digits in this value following this digit.
//
// Continuation
// | Sign
// | |
// V V
// 101011
const VLQ_BASE_SHIFT = 5;
// binary: 100000
const VLQ_BASE = 1 << VLQ_BASE_SHIFT;
// binary: 011111
const VLQ_BASE_MASK = VLQ_BASE - 1;
// binary: 100000
const VLQ_CONTINUATION_BIT = VLQ_BASE;
/**
* Converts from a two-complement value to a value where the sign bit is
* placed in the least significant bit. For example, as decimals:
* 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
* 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
*/
function toVLQSigned(aValue) {
return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
}
/**
* Returns the base 64 VLQ encoded value.
*/
exports.encode = function base64VLQ_encode(aValue) {
let encoded = "";
let digit;
let vlq = toVLQSigned(aValue);
do {
digit = vlq & VLQ_BASE_MASK;
vlq >>>= VLQ_BASE_SHIFT;
if (vlq > 0) {
// There are still more digits in this value, so we must make sure the
// continuation bit is marked.
digit |= VLQ_CONTINUATION_BIT;
}
encoded += base64.encode(digit);
} while (vlq > 0);
return encoded;
};
@@ -0,0 +1,102 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getBindingIdentifiers;
var _index = require("../validators/generated/index.js");
function getBindingIdentifiers(node, duplicates, outerOnly, newBindingsOnly) {
const search = [].concat(node);
const ids = Object.create(null);
while (search.length) {
const id = search.shift();
if (!id) continue;
if (newBindingsOnly && ((0, _index.isAssignmentExpression)(id) || (0, _index.isUnaryExpression)(id) || (0, _index.isUpdateExpression)(id))) {
continue;
}
if ((0, _index.isIdentifier)(id)) {
if (duplicates) {
const _ids = ids[id.name] = ids[id.name] || [];
_ids.push(id);
} else {
ids[id.name] = id;
}
continue;
}
if ((0, _index.isExportDeclaration)(id) && !(0, _index.isExportAllDeclaration)(id)) {
if ((0, _index.isDeclaration)(id.declaration)) {
search.push(id.declaration);
}
continue;
}
if (outerOnly) {
if ((0, _index.isFunctionDeclaration)(id)) {
search.push(id.id);
continue;
}
if ((0, _index.isFunctionExpression)(id)) {
continue;
}
}
const keys = getBindingIdentifiers.keys[id.type];
if (keys) {
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
const nodes = id[key];
if (nodes) {
if (Array.isArray(nodes)) {
search.push(...nodes);
} else {
search.push(nodes);
}
}
}
}
}
return ids;
}
const keys = {
DeclareClass: ["id"],
DeclareFunction: ["id"],
DeclareModule: ["id"],
DeclareVariable: ["id"],
DeclareInterface: ["id"],
DeclareTypeAlias: ["id"],
DeclareOpaqueType: ["id"],
InterfaceDeclaration: ["id"],
TypeAlias: ["id"],
OpaqueType: ["id"],
CatchClause: ["param"],
LabeledStatement: ["label"],
UnaryExpression: ["argument"],
AssignmentExpression: ["left"],
ImportSpecifier: ["local"],
ImportNamespaceSpecifier: ["local"],
ImportDefaultSpecifier: ["local"],
ImportDeclaration: ["specifiers"],
TSImportEqualsDeclaration: ["id"],
ExportSpecifier: ["exported"],
ExportNamespaceSpecifier: ["exported"],
ExportDefaultSpecifier: ["exported"],
FunctionDeclaration: ["id", "params"],
FunctionExpression: ["id", "params"],
ArrowFunctionExpression: ["params"],
ObjectMethod: ["params"],
ClassMethod: ["params"],
ClassPrivateMethod: ["params"],
ForInStatement: ["left"],
ForOfStatement: ["left"],
ClassDeclaration: ["id"],
ClassExpression: ["id"],
RestElement: ["argument"],
UpdateExpression: ["argument"],
ObjectProperty: ["value"],
AssignmentPattern: ["left"],
ArrayPattern: ["elements"],
ObjectPattern: ["properties"],
VariableDeclaration: ["declarations"],
VariableDeclarator: ["id"]
};
getBindingIdentifiers.keys = keys;
//# sourceMappingURL=getBindingIdentifiers.js.map
@@ -0,0 +1 @@
module.exports={C:{"47":0.00281,"48":0.0014,"56":0.0014,"57":0.0014,"112":0.0014,"115":0.05054,"120":0.00562,"121":0.00842,"140":0.00562,"146":0.0014,"147":0.0014,"149":0.0014,"150":0.0014,"151":0.0014,"152":0.0014,"153":0.00562,"154":0.04352,"155":0.10249,"156":0.06178,"157":0.00281,_:"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 49 50 51 52 53 54 55 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 113 114 116 117 118 119 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 141 142 143 144 145 148 158 159 160 3.5 3.6"},D:{"49":0.0014,"54":0.0014,"56":0.0014,"59":0.0014,"60":0.0014,"62":0.00421,"63":0.00421,"64":0.00281,"66":0.0014,"67":0.0014,"68":0.00281,"69":0.0014,"70":0.00281,"71":0.00281,"72":0.00281,"73":0.0014,"74":0.0014,"77":0.00281,"78":0.01685,"79":0.04774,"80":0.00842,"81":0.00421,"83":0.0014,"84":0.0014,"86":0.00562,"87":0.00281,"89":0.00421,"90":0.0014,"92":0.00281,"95":0.00702,"96":0.00562,"97":0.0014,"98":0.0014,"99":0.0014,"100":0.0014,"101":0.01544,"102":0.00281,"103":0.00421,"104":0.02106,"105":0.00562,"106":0.01123,"107":0.00983,"108":0.01123,"109":0.58126,"110":0.00281,"111":0.01685,"112":0.00281,"114":0.00842,"115":0.00702,"116":0.00562,"117":0.05195,"118":0.01966,"119":0.01544,"120":0.03791,"121":0.0014,"122":0.00983,"123":0.00281,"124":0.00281,"125":0.00562,"126":0.01544,"127":0.01544,"128":0.00562,"129":0.0014,"130":0.01264,"131":0.02246,"132":0.00702,"133":0.01404,"134":0.00562,"135":0.02246,"136":0.01544,"137":0.00983,"138":0.05756,"139":0.01544,"140":0.01404,"141":0.00983,"142":0.01966,"143":0.02246,"144":0.01685,"145":0.01123,"146":0.01264,"147":0.01544,"148":0.02808,"149":0.12074,"150":0.18533,"151":0.36083,"152":2.54545,"153":1.92348,"154":0.43945,"155":0.00983,"156":0.00421,_:"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 50 51 52 53 55 57 58 61 65 75 76 85 88 91 93 94 113 157"},F:{"37":0.0014,"79":0.0014,"95":0.01404,"100":0.00281,"101":0.00281,"102":0.00421,"126":0.0014,"132":0.0014,"133":0.0014,"134":0.01123,"135":0.1741,_:"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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 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 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"14":0.0014,"15":0.0014,"16":0.01123,"18":0.01404,"84":0.00281,"88":0.0014,"89":0.0014,"90":0.00562,"92":0.07862,"100":0.01544,"109":0.01966,"112":0.0014,"114":0.00281,"119":0.00421,"120":0.00421,"122":0.01264,"131":0.0014,"136":0.0014,"137":0.00281,"140":0.00421,"141":0.00281,"142":0.00421,"143":0.00281,"144":0.00281,"145":0.00281,"146":0.00421,"147":0.00281,"148":0.03089,"149":0.00702,"150":0.02106,"151":0.03791,"152":0.25412,"153":0.29905,"154":0.11092,_:"12 13 17 79 80 81 83 85 86 87 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 113 115 116 117 118 121 123 124 125 126 127 128 129 130 132 133 134 135 138 139"},E:{"27":0.03791,_:"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.2-15.3 15.4 16.0 17.0 27.1 TP","15.1":0.0014,"15.5":0.0014,"15.6":0.06599,"16.1":0.0014,"16.2":0.0014,"16.3":0.00562,"16.4":0.00281,"16.5":0.00421,"16.6":0.02808,"17.1":0.07301,"17.2":0.0014,"17.3":0.00281,"17.4":0.00421,"17.5":0.00842,"17.6":0.03791,"18.0":0.0014,"18.1":0.0014,"18.2":0.0014,"18.3":0.0014,"18.4":0.0014,"18.5-18.7":0.00421,"26.0":0.00281,"26.1":0.0014,"26.2":0.00562,"26.3":0.01264,"26.4":0.00983,"26.5":0.0365,"26.6":0.23868,"27.2":0.0014},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00087,"5.0-5.1":0.00087,"6.0-6.1":0,"7.0-7.1":0.00174,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00871,"11.0-11.2":0.00087,"11.3-11.4":0.00174,"12.0-12.1":0,"12.2-12.5":0.02264,"13.0-13.1":0,"13.2":0.00435,"13.3":0,"13.4-13.7":0.00087,"14.0-14.4":0.00348,"14.5-14.8":0.00522,"15.0-15.1":0.00522,"15.2-15.3":0.00348,"15.4":0.00435,"15.5":0.00522,"15.6-15.8":0.1132,"16.0":0.00871,"16.1":0.01567,"16.2":0.00871,"16.3":0.01916,"16.4":0.00435,"16.5":0.00697,"16.6-16.7":0.15761,"17.0":0.0061,"17.1":0.00871,"17.2":0.00871,"17.3":0.01306,"17.4":0.01829,"17.5":0.0357,"17.6-17.7":0.0923,"18.0":0.01916,"18.1":0.03831,"18.2":0.05225,"18.3":0.09056,"18.4":0.0566,"18.5-18.7":1.16945,"26.0":0.0566,"26.1":0.05747,"26.2":0.14977,"26.3":0.16196,"26.4":0.11843,"26.5":0.79328,"26.6":4.89463,"27.0":0.3753,"27.1":0,"27.2":0.00958},P:{"20":0.00907,"21":0.05442,"22":0.01814,"23":0.02721,"24":0.0907,"25":0.05442,"26":0.26302,"27":0.13605,"28":0.16326,"29":0.31744,"30":1.66884,_:"4 12.0","5.0-5.4":0.03628,"6.2-6.4":0.02721,"7.2-7.4":0.23581,"8.2":0.00907,"Line truncated
@@ -0,0 +1,9 @@
import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util';
import { getESLintCoreRule } from '../util/getESLintCoreRule';
declare const baseRule: ReturnType<typeof getESLintCoreRule>;
export type Options = InferOptionsTypeFromRule<NonNullable<typeof baseRule>>;
export type MessageIds = InferMessageIdsTypeFromRule<NonNullable<typeof baseRule>>;
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noLossOfPrecision", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"castle.js","sources":["../../../src/icons/castle.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Castle\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjIgMjB2LTlIMnY5YTIgMiAwIDAgMCAyIDJoMTZhMiAyIDAgMCAwIDItMloiIC8+CiAgPHBhdGggZD0iTTE4IDExVjRINnY3IiAvPgogIDxwYXRoIGQ9Ik0xNSAyMnYtNGEzIDMgMCAwIDAtMy0zYTMgMyAwIDAgMC0zIDN2NCIgLz4KICA8cGF0aCBkPSJNMjIgMTFWOSIgLz4KICA8cGF0aCBkPSJNMiAxMVY5IiAvPgogIDxwYXRoIGQ9Ik02IDRWMiIgLz4KICA8cGF0aCBkPSJNMTggNFYyIiAvPgogIDxwYXRoIGQ9Ik0xMCA0VjIiIC8+CiAgPHBhdGggZD0iTTE0IDRWMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/castle\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 Castle = createLucideIcon('Castle', [\n ['path', { d: 'M22 20v-9H2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2Z', key: '109fe4' }],\n ['path', { d: 'M18 11V4H6v7', key: 'mon5oj' }],\n ['path', { d: 'M15 22v-4a3 3 0 0 0-3-3a3 3 0 0 0-3 3v4', key: '1k4jtn' }],\n ['path', { d: 'M22 11V9', key: '3zbp94' }],\n ['path', { d: 'M2 11V9', key: '1x5rnq' }],\n ['path', { d: 'M6 4V2', key: '1rsq15' }],\n ['path', { d: 'M18 4V2', key: '1jsdo1' }],\n ['path', { d: 'M10 4V2', key: '75d9ly' }],\n ['path', { d: 'M14 4V2', key: '8nj3z6' }],\n]);\n\nexport default Castle;\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,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiD,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,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA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AAA,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,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:{"121":0.17777,"156":0.34941,_:"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 115 116 117 118 119 120 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 157 158 159 160 3.5 3.6"},D:{"103":0.17777,"104":0.17777,"105":0.17777,"106":0.34941,"107":0.17777,"108":0.17777,"111":0.17777,"117":0.17777,"118":0.17777,"119":0.17777,"131":0.52718,"133":0.17777,"136":0.17777,"149":0.34941,"150":0.17777,"151":4.02741,"152":2.97918,"153":2.97918,"154":0.17777,_:"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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 109 110 112 113 114 115 116 120 121 122 123 124 125 126 127 128 129 130 132 134 135 137 138 139 140 141 142 143 144 145 146 147 148 155 156 157"},F:{_:"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 51 52 53 54 55 56 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 95 96 97 98 99 100 101 102 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 134 135 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.17777,"152":1.226,"153":39.40977,"154":0.87659,_:"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 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151"},E:{_:"4 5 6 7 8 9 10 11 12 13 14 15 27 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 15.6 16.0 16.1 16.2 16.3 16.4 16.5 16.6 17.0 17.1 17.2 17.3 17.4 17.5 17.6 18.0 18.1 18.2 18.3 18.4 18.5-18.7 26.0 26.1 26.2 26.3 26.4 26.5 27.1 27.2 TP","26.6":2.62977},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00045,"5.0-5.1":0.00045,"6.0-6.1":0,"7.0-7.1":0.00089,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00446,"11.0-11.2":0.00045,"11.3-11.4":0.00089,"12.0-12.1":0,"12.2-12.5":0.01159,"13.0-13.1":0,"13.2":0.00223,"13.3":0,"13.4-13.7":0.00045,"14.0-14.4":0.00178,"14.5-14.8":0.00267,"15.0-15.1":0.00267,"15.2-15.3":0.00178,"15.4":0.00223,"15.5":0.00267,"15.6-15.8":0.05796,"16.0":0.00446,"16.1":0.00802,"16.2":0.00446,"16.3":0.00981,"16.4":0.00223,"16.5":0.00357,"16.6-16.7":0.08069,"17.0":0.00312,"17.1":0.00446,"17.2":0.00446,"17.3":0.00669,"17.4":0.00936,"17.5":0.01828,"17.6-17.7":0.04726,"18.0":0.00981,"18.1":0.01962,"18.2":0.02675,"18.3":0.04637,"18.4":0.02898,"18.5-18.7":0.59874,"26.0":0.02898,"26.1":0.02942,"26.2":0.07668,"26.3":0.08292,"26.4":0.06063,"26.5":0.40615,"26.6":2.50598,"27.0":0.19215,"27.1":0,"27.2":0.0049},P:{"30":0.35604,_:"4 20 21 22 23 24 25 26 27 28 29 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 16.0 17.0 18.0 19.0"},I:{"0":0,"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.53406,_:"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":36.33084},R:{_:"0"},M:{_:"0"},Q:{_:"14.9"},O:{_:"0"},H:{all:0}};
@@ -0,0 +1 @@
{"version":3,"file":"flag-triangle-right.js","sources":["../../../src/icons/flag-triangle-right.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FlagTriangleRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNyAyMlYybDEwIDUtMTAgNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/flag-triangle-right\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 FlagTriangleRight = createLucideIcon('FlagTriangleRight', [\n ['path', { d: 'M7 22V2l10 5-10 5', key: '17n18y' }],\n]);\n\nexport default FlagTriangleRight;\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,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;AACpD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,34 @@
{
"name": "tinyrainbow",
"version": "3.1.0",
"packageManager": "pnpm@9.15.1",
"description": "A small library to print colourful messages.",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"browser": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"files": [
"dist/**"
],
"repository": {
"type": "git",
"url": "git+https://github.com/tinylibs/tinyrainbow.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/tinylibs/tinyrainbow/issues"
},
"homepage": "https://github.com/tinylibs/tinyrainbow#readme",
"keywords": [
"colors",
"tty"
],
"engines": {
"node": ">=14.0.0"
}
}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSModuleNameDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class TSModuleNameDefinition extends DefinitionBase_1.DefinitionBase {
isTypeDefinition = true;
isVariableDefinition = true;
constructor(name, node) {
super(DefinitionType_1.DefinitionType.TSModuleName, name, node, null);
}
}
exports.TSModuleNameDefinition = TSModuleNameDefinition;
@@ -0,0 +1,15 @@
import { n as normalizeUnit } from "./normalizeUnit-bp5SODxw.mjs";
import endOf from "./endOf.mjs";
import parse from "./parse.mjs";
import startOf from "./startOf.mjs";
function isSame(date, input, unit) {
unit = normalizeUnit(unit);
const inputMs = +parse(input);
if (!unit) {
return +date === inputMs;
}
return +startOf(new Date(date), unit) <= inputMs && inputMs <= +endOf(new Date(date), unit);
}
export {
isSame as default
};
@@ -0,0 +1 @@
{"version":3,"file":"grid-2-x-2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"function-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,7 @@
declare global {
interface Object {
should: Chai.Assertion;
}
}
export {};
@@ -0,0 +1,450 @@
# Testing
NOTE: this document is outdated and needs to be updated. Read with your own discretion.
## Introduction
This document describes the GYP testing infrastructure,
as provided by the `TestGyp.py` module.
These tests emphasize testing the _behavior_ of the
various GYP-generated build configurations:
Visual Studio, Xcode, SCons, Make, etc.
The goal is _not_ to test the output of the GYP generators by,
for example, comparing a GYP-generated Makefile
against a set of known "golden" Makefiles
(although the testing infrastructure could
be used to write those kinds of tests).
The idea is that the generated build configuration files
could be completely written to add a feature or fix a bug
so long as they continue to support the functional behaviors
defined by the tests: building programs, shared libraries, etc.
## "Hello, world!" GYP test configuration
Here is an actual test configuration,
a simple build of a C program to print `"Hello, world!"`.
```
$ ls -l test/hello
total 20
-rw-r--r-- 1 knight knight 312 Jul 30 20:22 gyptest-all.py
-rw-r--r-- 1 knight knight 307 Jul 30 20:22 gyptest-default.py
-rwxr-xr-x 1 knight knight 326 Jul 30 20:22 gyptest-target.py
-rw-r--r-- 1 knight knight 98 Jul 30 20:22 hello.c
-rw-r--r-- 1 knight knight 142 Jul 30 20:22 hello.gyp
$
```
The `gyptest-*.py` files are three separate tests (test scripts)
that use this configuration. The first one, `gyptest-all.py`,
looks like this:
```
#!/usr/bin/env python
"""
Verifies simplest-possible build of a "Hello, world!" program
using an explicit build target of 'all'.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('hello.gyp')
test.build_all('hello.gyp')
test.run_built_executable('hello', stdout="Hello, world!\n")
test.pass_test()
```
The test script above runs GYP against the specified input file
(`hello.gyp`) to generate a build configuration.
It then tries to build the `'all'` target
(or its equivalent) using the generated build configuration.
Last, it verifies that the build worked as expected
by running the executable program (`hello`)
that was just presumably built by the generated configuration,
and verifies that the output from the program
matches the expected `stdout` string (`"Hello, world!\n"`).
Which configuration is generated
(i.e., which build tool to test)
is specified when the test is run;
see the next section.
Surrounding the functional parts of the test
described above are the header,
which should be basically the same for each test
(modulo a different description in the docstring):
```
#!/usr/bin/env python
"""
Verifies simplest-possible build of a "Hello, world!" program
using an explicit build target of 'all'.
"""
import TestGyp
test = TestGyp.TestGyp()
```
Similarly, the footer should be the same in every test:
```
test.pass_test()
```
## Running tests
Test scripts are run by the `gyptest.py` script.
You can specify (an) explicit test script(s) to run:
```
$ python gyptest.py test/hello/gyptest-all.py
PYTHONPATH=/home/knight/src/gyp/trunk/test/lib
TESTGYP_FORMAT=scons
/usr/bin/python test/hello/gyptest-all.py
PASSED
$
```
If you specify a directory, all test scripts
(scripts prefixed with `gyptest-`) underneath
the directory will be run:
```
$ python gyptest.py test/hello
PYTHONPATH=/home/knight/src/gyp/trunk/test/lib
TESTGYP_FORMAT=scons
/usr/bin/python test/hello/gyptest-all.py
PASSED
/usr/bin/python test/hello/gyptest-default.py
PASSED
/usr/bin/python test/hello/gyptest-target.py
PASSED
$
```
Or you can specify the `-a` option to run all scripts
in the tree:
```
$ python gyptest.py -a
PYTHONPATH=/home/knight/src/gyp/trunk/test/lib
TESTGYP_FORMAT=scons
/usr/bin/python test/configurations/gyptest-configurations.py
PASSED
/usr/bin/python test/defines/gyptest-defines.py
PASSED
.
.
.
.
/usr/bin/python test/variables/gyptest-commands.py
PASSED
$
```
If any tests fail during the run,
the `gyptest.py` script will report them in a
summary at the end.
## Debugging tests
Tests that create intermediate output do so under the gyp/out/testworkarea
directory. On test completion, intermediate output is cleaned up. To preserve
this output, set the environment variable PRESERVE=1. This can be handy to
inspect intermediate data when debugging a test.
You can also set PRESERVE\_PASS=1, PRESERVE\_FAIL=1 or PRESERVE\_NO\_RESULT=1
to preserve output for tests that fall into one of those categories.
# Specifying the format (build tool) to use
By default, the `gyptest.py` script will generate configurations for
the "primary" supported build tool for the platform you're on:
Visual Studio on Windows,
Xcode on Mac,
and (currently) SCons on Linux.
An alternate format (build tool) may be specified
using the `-f` option:
```
$ python gyptest.py -f make test/hello/gyptest-all.py
PYTHONPATH=/home/knight/src/gyp/trunk/test/lib
TESTGYP_FORMAT=make
/usr/bin/python test/hello/gyptest-all.py
PASSED
$
```
Multiple tools may be specified in a single pass as
a comma-separated list:
```
$ python gyptest.py -f make,scons test/hello/gyptest-all.py
PYTHONPATH=/home/knight/src/gyp/trunk/test/lib
TESTGYP_FORMAT=make
/usr/bin/python test/hello/gyptest-all.py
PASSED
TESTGYP_FORMAT=scons
/usr/bin/python test/hello/gyptest-all.py
PASSED
$
```
## Test script functions and methods
The `TestGyp` class contains a lot of functionality
intended to make it easy to write tests.
This section describes the most useful pieces for GYP testing.
(The `TestGyp` class is actually a subclass of more generic
`TestCommon` and `TestCmd` base classes
that contain even more functionality than is
described here.)
### Initialization
The standard initialization formula is:
```
import TestGyp
test = TestGyp.TestGyp()
```
This copies the contents of the directory tree in which
the test script lives to a temporary directory for execution,
and arranges for the temporary directory's removal on exit.
By default, any comparisons of output or file contents
must be exact matches for the test to pass.
If you need to use regular expressions for matches,
a useful alternative initialization is:
```
import TestGyp
test = TestGyp.TestGyp(match = TestGyp.match_re,
diff = TestGyp.diff_re)`
```
### Running GYP
The canonical invocation is to simply specify the `.gyp` file to be executed:
```
test.run_gyp('file.gyp')
```
Additional GYP arguments may be specified:
```
test.run_gyp('file.gyp', arguments=['arg1', 'arg2', ...])
```
To execute GYP from a subdirectory (where, presumably, the specified file
lives):
```
test.run_gyp('file.gyp', chdir='subdir')
```
### Running the build tool
Running the build tool requires passing in a `.gyp` file, which may be used to
calculate the name of a specific build configuration file (such as a MSVS
solution file corresponding to the `.gyp` file).
There are several different `.build_*()` methods for invoking different types
of builds.
To invoke a build tool with an explicit `all` target (or equivalent):
```
test.build_all('file.gyp')
```
To invoke a build tool with its default behavior (for example, executing `make`
with no targets specified):
```
test.build_default('file.gyp')
```
To invoke a build tool with an explicit specified target:
```
test.build_target('file.gyp', 'target')
```
### Running executables
The most useful method executes a program built by the GYP-generated
configuration:
```
test.run_built_executable('program')
```
The `.run_built_executable()` method will account for the actual built target
output location for the build tool being tested, as well as tack on any
necessary executable file suffix for the platform (for example `.exe` on
Windows).
`stdout=` and `stderr=` keyword arguments specify expected standard output and
error output, respectively. Failure to match these (if specified) will cause
the test to fail. An explicit `None` value will suppress that verification:
```
test.run_built_executable('program',
stdout="expect this output\n",
stderr=None)
```
Note that the default values are `stdout=None` and `stderr=''` (that is, no
check for standard output, and error output must be empty).
Arbitrary executables (not necessarily those built by GYP) can be executed with
the lower-level `.run()` method:
```
test.run('program')
```
The program must be in the local directory (that is, the temporary directory
for test execution) or be an absolute path name.
### Fetching command output
```
test.stdout()
```
Returns the standard output from the most recent executed command (including
`.run_gyp()`, `.build_*()`, or `.run*()` methods).
```
test.stderr()
```
Returns the error output from the most recent executed command (including
`.run_gyp()`, `.build_*()`, or `.run*()` methods).
### Verifying existence or non-existence of files or directories
```
test.must_exist('file_or_dir')
```
Verifies that the specified file or directory exists, and fails the test if it
doesn't.
```
test.must_not_exist('file_or_dir')
```
Verifies that the specified file or directory does not exist, and fails the
test if it does.
### Verifying file contents
```
test.must_match('file', 'expected content\n')
```
Verifies that the content of the specified file match the expected string, and
fails the test if it does not. By default, the match must be exact, but
line-by-line regular expressions may be used if the `TestGyp` object was
initialized with `TestGyp.match_re`.
```
test.must_not_match('file', 'expected content\n')
```
Verifies that the content of the specified file does _not_ match the expected
string, and fails the test if it does. By default, the match must be exact,
but line-by-line regular expressions may be used if the `TestGyp` object was
initialized with `TestGyp.match_re`.
```
test.must_contain('file', 'substring')
```
Verifies that the specified file contains the specified substring, and fails
the test if it does not.
```
test.must_not_contain('file', 'substring')
```
Verifies that the specified file does not contain the specified substring, and
fails the test if it does.
```
test.must_contain_all_lines(output, lines)
```
Verifies that the output string contains all of the "lines" in the specified
list of lines. In practice, the lines can be any substring and need not be
`\n`-terminated lines per se. If any line is missing, the test fails.
```
test.must_not_contain_any_lines(output, lines)
```
Verifies that the output string does _not_ contain any of the "lines" in the
specified list of lines. In practice, the lines can be any substring and need
not be `\n`-terminated lines per se. If any line exists in the output string,
the test fails.
```
test.must_contain_any_line(output, lines)
```
Verifies that the output string contains at least one of the "lines" in the
specified list of lines. In practice, the lines can be any substring and need
not be `\n`-terminated lines per se. If none of the specified lines is present,
the test fails.
### Reading file contents
```
test.read('file')
```
Returns the contents of the specified file. Directory elements contained in a
list will be joined:
```
test.read(['subdir', 'file'])
```
### Test success or failure
```
test.fail_test()
```
Fails the test, reporting `FAILED` on standard output and exiting with an exit
status of `1`.
```
test.pass_test()
```
Passes the test, reporting `PASSED` on standard output and exiting with an exit
status of `0`.
```
test.no_result()
```
Indicates the test had no valid result (i.e., the conditions could not be
tested because of an external factor like a full file system). Reports `NO
RESULT` on standard output and exits with a status of `2`.
@@ -0,0 +1 @@
{"version":3,"file":"lasso.js","sources":["../../../src/icons/lasso.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Lasso\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNyAyMmE1IDUgMCAwIDEtMi00IiAvPgogIDxwYXRoIGQ9Ik0zLjMgMTRBNi44IDYuOCAwIDAgMSAyIDEwYzAtNC40IDQuNS04IDEwLThzMTAgMy42IDEwIDgtNC41IDgtMTAgOGExMiAxMiAwIDAgMS01LTEiIC8+CiAgPHBhdGggZD0iTTUgMThhMiAyIDAgMSAwIDAtNCAyIDIgMCAwIDAgMCA0eiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/lasso\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 Lasso = createLucideIcon('Lasso', [\n ['path', { d: 'M7 22a5 5 0 0 1-2-4', key: 'umushi' }],\n [\n 'path',\n {\n d: 'M3.3 14A6.8 6.8 0 0 1 2 10c0-4.4 4.5-8 10-8s10 3.6 10 8-4.5 8-10 8a12 12 0 0 1-5-1',\n key: '146dds',\n },\n ],\n ['path', { d: 'M5 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z', key: 'bq3ynw' }],\n]);\n\nexport default Lasso;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuB,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,CACpD,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,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;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsC,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;AACrE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,25 @@
/**
* @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 Building = createLucideIcon("Building", [
["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2", key: "76otgf" }],
["path", { d: "M9 22v-4h6v4", key: "r93iot" }],
["path", { d: "M8 6h.01", key: "1dz90k" }],
["path", { d: "M16 6h.01", key: "1x0f13" }],
["path", { d: "M12 6h.01", key: "1vi96p" }],
["path", { d: "M12 10h.01", key: "1nrarc" }],
["path", { d: "M12 14h.01", key: "1etili" }],
["path", { d: "M16 10h.01", key: "1m94wz" }],
["path", { d: "M16 14h.01", key: "1gbofw" }],
["path", { d: "M8 10h.01", key: "19clt8" }],
["path", { d: "M8 14h.01", key: "6423bh" }]
]);
export { Building as default };
//# sourceMappingURL=building.js.map
@@ -0,0 +1,77 @@
import { Env, Input, MiddlewareHandler } from "../../types.js";
import { Context, PropsForRenderer } from "../../context.js";
import { PropsWithChildren } from "../../jsx/types.js";
import { Context as Context$1 } from "../../jsx/context.js";
import { FC } from "../../jsx/base.js";
//#region src/middleware/jsx-renderer/index.d.ts
export declare const RequestContext: Context$1<Context<any, any, {}> | null>;
type RendererOptions = {
docType?: boolean | string;
stream?: boolean | Record<string, string>;
};
type ComponentResult = Exclude<ReturnType<FC>, null>;
type ComponentWithChildren = (props: PropsWithChildren<PropsForRenderer & {
Layout: FC;
}>, c: Context) => ComponentResult;
/**
* JSX Renderer Middleware for hono.
*
* @see {@link https://hono.dev/docs/middleware/builtin/jsx-renderer}
*
* @param {ComponentWithChildren} [component] - The component to render, which can accept children and props.
* @param {RendererOptions} [options] - The options for the JSX renderer middleware.
* @param {boolean | string} [options.docType=true] - The DOCTYPE to be added at the beginning of the HTML. If set to false, no DOCTYPE will be added.
* @param {boolean | Record<string, string>} [options.stream=false] - If set to true, enables streaming response with default headers. If a record is provided, custom headers will be used.
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* const app = new Hono()
*
* app.get(
* '/page/*',
* jsxRenderer(({ children }) => {
* return (
* <html>
* <body>
* <header>Menu</header>
* <div>{children}</div>
* </body>
* </html>
* )
* })
* )
*
* app.get('/page/about', (c) => {
* return c.render(<h1>About me!</h1>)
* })
* ```
*/
export declare const jsxRenderer: <E extends Env = Env>(component?: ComponentWithChildren, options?: RendererOptions | ((c: Context<E>) => RendererOptions)) => MiddlewareHandler;
/**
* useRequestContext for Hono.
*
* @template E - The environment type.
* @template P - The parameter type.
* @template I - The input type.
* @returns {Context<E, P, I>} An instance of Context.
*
* @example
* ```ts
* const RequestUrlBadge: FC = () => {
* const c = useRequestContext()
* return <b>{c.req.url}</b>
* }
*
* app.get('/page/info', (c) => {
* return c.render(
* <div>
* You are accessing: <RequestUrlBadge />
* </div>
* )
* })
* ```
*/
export declare const useRequestContext: <E extends Env = any, P extends string = any, I extends Input = {}>() => Context<E, P, I>;
//#endregion
export {};
@@ -0,0 +1,63 @@
{
"name": "flat-cache",
"version": "4.0.1",
"description": "A stupidly simple key/value storage using files to persist some data",
"repository": "jaredwray/flat-cache",
"license": "MIT",
"author": {
"name": "Jared Wray",
"url": "https://jaredwray.com"
},
"main": "src/cache.js",
"files": [
"src/cache.js",
"src/del.js",
"src/utils.js"
],
"engines": {
"node": ">=16"
},
"precommit": [
"npm run verify --silent"
],
"prepush": [
"npm run verify --silent"
],
"scripts": {
"eslint": "eslint --cache --cache-location=node_modules/.cache/ ./src/**/*.js ./test/**/*.js",
"clean": "rimraf ./node_modules ./package-lock.json ./yarn.lock ./coverage",
"eslint-fix": "npm run eslint -- --fix",
"autofix": "npm run eslint-fix",
"check": "npm run eslint",
"verify": "npm run eslint && npm run test:cache",
"test:cache": "c8 mocha -R spec test/specs",
"test:ci:cache": "c8 --reporter=lcov mocha -R spec test/specs",
"test": "npm run verify --silent",
"format": "prettier --write ."
},
"keywords": [
"json cache",
"simple cache",
"file cache",
"key par",
"key value",
"cache"
],
"devDependencies": {
"c8": "^9.1.0",
"chai": "^4.3.10",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-mocha": "^10.2.0",
"glob-expand": "^0.2.1",
"mocha": "^10.3.0",
"prettier": "^3.2.4",
"rimraf": "^5.0.5",
"sinon": "^17.0.1",
"write": "^2.0.0"
},
"dependencies": {
"flatted": "^3.2.9",
"keyv": "^4.5.4"
}
}
@@ -0,0 +1,18 @@
import { StructuralSharingOption, ValidateSelected } from './structuralSharing.cjs';
import { AnyRouter, RegisteredRouter, RouterState } from '@tanstack/router-core';
export interface UseLocationBaseOptions<TRouter extends AnyRouter, TSelected, TStructuralSharing extends boolean = boolean> {
select?: (state: RouterState<TRouter['routeTree']>['location']) => ValidateSelected<TRouter, TSelected, TStructuralSharing>;
}
export type UseLocationResult<TRouter extends AnyRouter, TSelected> = unknown extends TSelected ? RouterState<TRouter['routeTree']>['location'] : TSelected;
/**
* Read the current location from the router state with optional selection.
* Useful for subscribing to just the pieces of location you care about.
*
* Options:
* - `select`: Project the `location` object to a derived value
* - `structuralSharing`: Enable structural sharing for stable references
*
* @returns The current location (or selected value).
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLocationHook
*/
export declare function useLocation<TRouter extends AnyRouter = RegisteredRouter, TSelected = unknown, TStructuralSharing extends boolean = boolean>(opts?: UseLocationBaseOptions<TRouter, TSelected, TStructuralSharing> & StructuralSharingOption<TRouter, TSelected, TStructuralSharing>): UseLocationResult<TRouter, TSelected>;
@@ -0,0 +1,20 @@
/**
* @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 Bot = createLucideIcon("Bot", [
["path", { d: "M12 8V4H8", key: "hb8ula" }],
["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
["path", { d: "M2 14h2", key: "vft8re" }],
["path", { d: "M20 14h2", key: "4cs60a" }],
["path", { d: "M15 13v2", key: "1xurst" }],
["path", { d: "M9 13v2", key: "rq6x2g" }]
]);
export { Bot as default };
//# sourceMappingURL=bot.js.map
@@ -0,0 +1,8 @@
// Generated using scripts/write-decode-map.ts
export const htmlDecodeTree: Uint16Array = /* #__PURE__ */ new Uint16Array(
// prettier-ignore
/* #__PURE__ */ "\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\uLine truncated
.split("")
.map((c) => c.charCodeAt(0)),
);
@@ -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 ALargeSmall = createLucideIcon("ALargeSmall", [
["path", { d: "M21 14h-5", key: "1vh23k" }],
["path", { d: "M16 16v-3.5a2.5 2.5 0 0 1 5 0V16", key: "1wh10o" }],
["path", { d: "M4.5 13h6", key: "dfilno" }],
["path", { d: "m3 16 4.5-9 4.5 9", key: "2dxa0e" }]
]);
export { ALargeSmall as default };
//# sourceMappingURL=a-large-small.js.map
@@ -0,0 +1 @@
{"version":3,"file":"zod-json-schema-compat.js","sourceRoot":"","sources":["../../../src/server/zod-json-schema-compat.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,uDAAuD;AACvD,2DAA2D;AAC3D,+DAA+D;AAC/D,uDAAuD;AAKvD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAA8B,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACrH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAWrD,SAAS,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AiB,EAAE,IAAa;IAC5D,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,MAAM,CAAC,KAAK,CAAC;IACvB,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC;AACvB,CAAC"}
@@ -0,0 +1,5 @@
'use strict'
const SemVer = require('../classes/semver')
const minor = (a, loose) => new SemVer(a, loose).minor
module.exports = minor
@@ -0,0 +1,21 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed 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
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
if (typeof module !== "undefined" && module.exports) {
module.exports = require("./typescript.js");
}
else {
throw new Error("tsserverlibrary requires CommonJS; use typescript.js instead");
}
@@ -0,0 +1,28 @@
import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_} from "../../compile/codegen"
import {useFunc} from "../../compile/util"
import equal from "../../runtime/equal"
export type ConstError = ErrorObject<"const", {allowedValue: any}>
const error: KeywordErrorDefinition = {
message: "must be equal to constant",
params: ({schemaCode}) => _`{allowedValue: ${schemaCode}}`,
}
const def: CodeKeywordDefinition = {
keyword: "const",
$data: true,
error,
code(cxt: KeywordCxt) {
const {gen, data, $data, schemaCode, schema} = cxt
if ($data || (schema && typeof schema == "object")) {
cxt.fail$data(_`!${useFunc(gen, equal)}(${data}, ${schemaCode})`)
} else {
cxt.fail(_`${schema} !== ${data}`)
}
},
}
export default def
@@ -0,0 +1 @@
{"version":3,"names":["_semver","require","_utils","pluginsCompatData","targetsSupported","target","support","targetEnvironments","Object","keys","length","unsupportedEnvironments","filter","environment","lowestImplementedVersion","getLowestImplementedVersion","lowestTargetedVersion","isUnreleasedVersion","semver","valid","toString","Error","gt","semverify","isRequired","name","targets","compatData","includes","excludes","has","filterItems","list","defaultIncludes","defaultExcludes","pluginSyntaxMap","result","Set","options","item","add","shippedProposalsSyntax","get","forEach","delete"],"sources":["../src/filter-items.ts"],"sourcesContent":["import semver from \"semver\";\n\nimport pluginsCompatData from \"@babel/compat-data/plugins\" with { type: \"json\" };\n\nimport type { Targets } from \"./types.ts\";\nimport {\n getLowestImplementedVersion,\n isUnreleasedVersion,\n semverify,\n} from \"./utils.ts\";\n\nexport function targetsSupported(target: Targets, support: Targets) {\n const targetEnvironments = Object.keys(target) as (keyof Targets)[];\n\n if (targetEnvironments.length === 0) {\n return false;\n }\n\n const unsupportedEnvironments = targetEnvironments.filter(environment => {\n const lowestImplementedVersion = getLowestImplementedVersion(\n support,\n environment,\n );\n\n // Feature is not implemented in that environment\n if (!lowestImplementedVersion) {\n return true;\n }\n\n const lowestTargetedVersion = target[environment];\n\n // If targets has unreleased value as a lowest version, then don't require a plugin.\n if (isUnreleasedVersion(lowestTargetedVersion, environment)) {\n return false;\n }\n\n // Include plugin if it is supported in the unreleased environment, which wasn't specified in targets\n if (isUnreleasedVersion(lowestImplementedVersion, environment)) {\n return true;\n }\n\n if (!semver.valid(lowestTargetedVersion.toString())) {\n throw new Error(\n `Invalid version passed for target \"${environment}\": \"${lowestTargetedVersion}\". ` +\n \"Versions must be in semver format (major.minor.patch)\",\n );\n }\n\n return semver.gt(\n semverify(lowestImplementedVersion),\n lowestTargetedVersion.toString(),\n );\n });\n\n return unsupportedEnvironments.length === 0;\n}\n\nexport function isRequired(\n name: string,\n targets: Targets,\n {\n compatData = pluginsCompatData,\n includes,\n excludes,\n }: {\n compatData?: Record<string, Targets>;\n includes?: Set<string>;\n excludes?: Set<string>;\n } = {},\n) {\n if (excludes?.has(name)) return false;\n if (includes?.has(name)) return true;\n return !targetsSupported(targets, compatData[name]);\n}\n\nexport default function filterItems(\n list: Record<string, Targets>,\n includes: Set<string>,\n excludes: Set<string>,\n targets: Targets,\n defaultIncludes: string[] | null,\n defaultExcludes?: string[] | null,\n pluginSyntaxMap?: Map<string, string | null>,\n) {\n const result = new Set<string>();\n const options = { compatData: list, includes, excludes };\n\n for (const item in list) {\n if (isRequired(item, targets, options)) {\n result.add(item);\n } else if (pluginSyntaxMap) {\n const shippedProposalsSyntax = pluginSyntaxMap.get(item);\n\n if (shippedProposalsSyntax) {\n result.add(shippedProposalsSyntax);\n }\n }\n }\n\n defaultIncludes?.forEach(item => !excludes.has(item) && result.add(item));\n defaultExcludes?.forEach(item => !includes.has(item) && result.delete(item));\n\n return result;\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AAIoB,MAPbE,iBAAiB,GAAAF,OAAA,CAAM,4BAA4B;AASnD,SAASG,gBAAgBA,CAACC,MAAe,EAAEC,OAAgB,EAAE;EAClE,MAAMC,kBAAkB,GAAGC,MAAM,CAACC,IAAI,CAACJ,MAAM,CAAsB;EAEnE,IAAIE,kBAAkB,CAACG,MAAM,KAAK,CAAC,EAAE;IACnC,OAAO,KAAK;EACd;EAEA,MAAMC,uBAAuB,GAAGJ,kBAAkB,CAACK,MAAM,CAACC,WAAW,IAAI;IACvE,MAAMC,wBAAwB,GAAG,IAAAC,kCAA2B,EAC1DT,OAAO,EACPO,WACF,CAAC;IAGD,IAAI,CAACC,wBAAwB,EAAE;MAC7B,OAAO,IAAI;IACb;IAEA,MAAME,qBAAqB,GAAGX,MAAM,CAACQ,WAAW,CAAC;IAGjD,IAAI,IAAAI,0BAAmB,EAACD,qBAAqB,EAAEH,WAAW,CAAC,EAAE;MAC3D,OAAO,KAAK;IACd;IAGA,IAAI,IAAAI,0BAAmB,EAACH,wBAAwB,EAAED,WAAW,CAAC,EAAE;MAC9D,OAAO,IAAI;IACb;IAEA,IAAI,CAACK,OAAM,CAACC,KAAK,CAACH,qBAAqB,CAACI,QAAQ,CAAC,CAAC,CAAC,EAAE;MACnD,MAAM,IAAIC,KAAK,CACb,sCAAsCR,WAAW,OAAOG,qBAAqB,KAAK,GAChF,uDACJ,CAAC;IACH;IAEA,OAAOE,OAAM,CAACI,EAAE,CACd,IAAAC,gBAAS,EAACT,wBAAwB,CAAC,EACnCE,qBAAqB,CAACI,QAAQ,CAAC,CACjC,CAAC;EACH,CAAC,CAAC;EAEF,OAAOT,uBAAuB,CAACD,MAAM,KAAK,CAAC;AAC7C;AAEO,SAASc,UAAUA,CACxBC,IAAY,EACZC,OAAgB,EAChB;EACEC,UAAU,GAAGxB,iBAAiB;EAC9ByB,QAAQ;EACRC;AAKF,CAAC,GAAG,CAAC,CAAC,EACN;EACA,IAAIA,QAAQ,YAARA,QAAQ,CAAEC,GAAG,CAACL,IAAI,CAAC,EAAE,OAAO,KAAK;EACrC,IAAIG,QAAQ,YAARA,QAAQ,CAAEE,GAAG,CAACL,IAAI,CAAC,EAAE,OAAO,IAAI;EACpC,OAAO,CAACrB,gBAAgB,CAACsB,OAAO,EAAEC,UAAU,CAACF,IAAI,CAAC,CAAC;AACrD;AAEe,SAASM,WAAWA,CACjCC,IAA6B,EAC7BJ,QAAqB,EACrBC,QAALine truncated
@@ -0,0 +1,7 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/isServer/client.ts
const isServer = false;
//#endregion
exports.isServer = isServer;
//# sourceMappingURL=client.cjs.map
@@ -0,0 +1 @@
{"version":3,"names":["parens","require","_t","_nodes","VISITOR_KEYS","TokenContext","exports","normal","expressionStatement","arrowBody","exportDefault","arrowFlowReturnType","forInitHead","forInHead","forOfHead","forInOrInitHeadAccumulate","forInOrInitHeadAccumulatePassThroughMask","type","Object","keys","func","generatorInfosMap","has","get","isOrHasCallExpression","node","object","parentNeedsParens","parent","parentId","callee","isDecoratorMemberExpression","computed","property","isLastChild","child","visitorKeys","i","length","val","Array","isArray","j"],"sources":["../../src/node/index.ts"],"sourcesContent":["import * as parens from \"./parentheses.ts\";\nimport { VISITOR_KEYS } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nimport { generatorInfosMap } from \"../nodes.ts\";\n\nexport const enum TokenContext {\n normal = 0,\n expressionStatement = 1 << 0,\n arrowBody = 1 << 1,\n exportDefault = 1 << 2,\n arrowFlowReturnType = 1 << 3,\n forInitHead = 1 << 4,\n forInHead = 1 << 5,\n forOfHead = 1 << 6,\n // This flag lives across the token boundary, and will\n // be reset after forIn or forInit head is printed\n forInOrInitHeadAccumulate = 1 << 7,\n forInOrInitHeadAccumulatePassThroughMask = 0b10000000,\n}\n\nexport type NodeHandler<R> = (\n node: t.Node,\n // todo:\n // node: K extends keyof typeof t\n // ? Extract<typeof t[K], { type: \"string\" }>\n // : t.Node,\n parent: t.Node,\n parentId: number,\n tokenContext?: number,\n getRawIdentifier?: (node: t.Identifier) => string,\n) => R | undefined;\n\nfor (const type of Object.keys(parens) as (keyof typeof parens)[]) {\n const func = parens[type];\n if (generatorInfosMap.has(type)) {\n generatorInfosMap.get(type)![2] = func;\n }\n}\n\nfunction isOrHasCallExpression(node: t.Node): boolean {\n switch (node.type) {\n case \"CallExpression\":\n return true;\n case \"MemberExpression\":\n return isOrHasCallExpression(node.object);\n }\n return false;\n}\n\nexport function parentNeedsParens(\n node: t.Node,\n parent: any,\n parentId: number,\n): boolean {\n switch (parentId) {\n case __node(\"NewExpression\"):\n if (parent.callee === node) {\n if (isOrHasCallExpression(node)) return true;\n }\n break;\n case __node(\"Decorator\"):\n return (\n !isDecoratorMemberExpression(node) &&\n !(\n node.type === \"CallExpression\" &&\n isDecoratorMemberExpression(node.callee)\n ) &&\n node.type !== \"ParenthesizedExpression\"\n );\n }\n return false;\n}\n\nfunction isDecoratorMemberExpression(node: t.Node): boolean {\n switch (node.type) {\n case \"Identifier\":\n return true;\n case \"MemberExpression\":\n return (\n !node.computed &&\n node.property.type === \"Identifier\" &&\n isDecoratorMemberExpression(node.object)\n );\n default:\n return false;\n }\n}\n\nexport function isLastChild(parent: t.Node, child: t.Node) {\n const visitorKeys = VISITOR_KEYS[parent.type];\n for (let i = visitorKeys.length - 1; i >= 0; i--) {\n const val = (parent as any)[visitorKeys[i]] as t.Node | t.Node[] | null;\n if (val === child) {\n return true;\n } else if (Array.isArray(val)) {\n let j = val.length - 1;\n while (j >= 0 && val[j] === null) j--;\n return j >= 0 && val[j] === child;\n } else if (val) {\n return false;\n }\n }\n return false;\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,EAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAAgD;EAHvCG;AAAY,IAAAF,EAAA;AAAA,MAKHG,YAAY,GAAAC,OAAA,CAAAD,YAAA;EAAAE,MAAA;EAAAC,mBAAA;EAAAC,SAAA;EAAAC,aAAA;EAAAC,mBAAA;EAAAC,WAAA;EAAAC,SAAA;EAAAC,SAAA;EAAAC,yBAAA;EAAAC,wCAAA;AAAA;AA2B9B,KAAK,MAAMC,IAAI,IAAIC,MAAM,CAACC,IAAI,CAACnB,MAAM,CAAC,EAA6B;EACjE,MAAMoB,IAAI,GAAGpB,MAAM,CAACiB,IAAI,CAAC;EACzB,IAAII,wBAAiB,CAACC,GAAG,CAACL,IAAI,CAAC,EAAE;IAC/BI,wBAAiB,CAACE,GAAG,CAACN,IAAI,CAAC,CAAE,CAAC,CAAC,GAAGG,IAAI;EACxC;AACF;AAEA,SAASI,qBAAqBA,CAACC,IAAY,EAAW;EACpD,QAAQA,IAAI,CAACR,IAAI;IACf,KAAK,gBAAgB;MACnB,OAAO,IAAI;IACb,KAAK,kBAAkB;MACrB,OAAOO,qBAAqB,CAACC,IAAI,CAACC,MAAM,CAAC;EAC7C;EACA,OAAO,KAAK;AACd;AAEO,SAASC,iBAAiBA,CAC/BF,IAAY,EACZG,MAAW,EACXC,QAAgB,EACP;EACT,QAAQA,QAAQ;IACd;MACE,IAAID,MAAM,CAACE,MAAM,KAAKL,IAAI,EAAE;QAC1B,IAAID,qBAAqB,CAACC,IAAI,CAAC,EAAE,OAAO,IAAI;MAC9C;MACA;IACF;MACE,OACE,CAACM,2BAA2B,CAACN,IAAI,CAAC,IAClC,EACEA,IAAI,CAACR,IAAI,KAAK,gBAAgB,IAC9Bc,2BAA2B,CAACN,IAAI,CAACK,MAAM,CAAC,CACzC,IACDL,IAAI,CAACR,IAAI,KAAK,yBAAyB;EAE7C;EACA,OAAO,KAAK;AACd;AAEA,SAASc,2BAA2BA,CAACN,IAAY,EAAW;EAC1D,QAAQA,IAAI,CAACR,IAAI;IACf,KAAK,YAAY;MACf,OAAO,IAAI;IACb,KAAK,kBAAkB;MACrB,OACE,CAACQ,IAAI,CAACO,QAAQ,IACdP,IAAI,CAACQ,QAAQ,CAAChB,IAAI,KAAK,YAAY,IACnCc,2BAA2B,CAACN,IAAI,CAACC,MAAM,CAAC;IAE5C;MACE,OAAO,KAAK;EAChB;AACF;AAEO,SAASQ,WAAWA,CAACN,MAAc,EAAEO,KAAa,EAAE;EACzD,MAAMC,WAAW,GAAGhC,YAAY,CAACwB,MAAM,CAACX,IAAI,CAAC;EAC7C,KAAK,IAAIoB,CAAC,GAAGD,WAAW,CAACE,MAAM,GAAG,CAAC,EALine truncated
@@ -0,0 +1,24 @@
/**
* Check if the value is a valid date
*
* 校验是否是一个有效的日期
*
* @example
* ```js
* import { isValidDate } from 'is-what-type';
*
* isValidDate(new Date()); // true
* isValidDate(new Date('2023-10-01')); // true
* isValidDate(new Date(NaN)); // false
* isValidDate('2023-10-01'); // false
* isValidDate(123456789); // false
* isValidDate(null); // false
* isValidDate(undefined); // false
* isValidDate({}); // false
* isValidDate(new Date('invalid-date')); // false
* ```
*
* @param value - The value to check
* @returns `true` if the value is a valid date, else `false`
*/
export declare function isValidDate(value: unknown): value is Date;
@@ -0,0 +1,825 @@
export default `flf2a$ 8 7 20 -1 7
DIAMOND by Ron Fritz 8/94
Figlet Release 2.0
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
/\\\\@
/\\\\@
/\\\\@
/\\ @
/\\ @
@
/\\\\@
@@
/\\ /\\@
/\\ /\\@
@
@
@
@
@
@@
@
/\\\\ /\\\\ @
/\\\\\\\\\\\\ /\\\\\\\\@
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\\\\\\\\\ /\\\\\\\\@
/\\\\ /\\\\ @
@@
/\\\\ @
/\\ /\\\\ @
/\\\\ @
/\\\\ @
/\\\\@
/\\\\ /\\\\ @
/\\\\ @
@@
@
/\\\\ /\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ /\\\\ @
@@
/\\ @
/\\\\ /\\\\@
/\\\\ @
/\\\\\\ @
/\\\\ @
/\\\\ /\\\\@
/\\ @
@@
/\\\\@
/\\@
@
@
@
@
@
@@
/\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\@
@@
/\\\\ @
/\\\\ @
/\\\\@
/\\\\@
/\\\\@
/\\\\ @
/\\\\ @
@@
/\\\\ @
/\\\\ /\\\\ /\\\\@
/\\ /\\ /\\\\ @
/\\\\\\\\ /\\\\\\\\\\\\\\@
/\\ /\\ /\\\\ @
/\\\\ /\\\\ /\\\\@
/\\\\ @
@@
@
/\\\\ @
/\\\\ @
/\\\\\\ /\\\\\\\\\\@
/\\\\ @
/\\\\ @
@
@@
@
@
@
@
@
@
/\\\\@
/\\@@
@
@
@
/\\\\\\\\\\@
@
@
@
@@
@
@
@
@
@
@
/\\\\@
@@
/\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @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\\\ @
@@
@
@
/\\\\ /\\\\\\@
/\\\\ \\ /\\\\@
/\\\\ /\\ /\\\\@
/\\ /\\ /\\/\\\\@
/\\\\\\ /\\\\\\@
@@
@
@
/\\\\ /\\\\@
/\\ /\\\\ @
/\\ @
/\\ /\\\\ @
/\\\\ /\\\\@
@@
@
@
/\\\\ /\\\\@
/\\\\ /\\\\ @
/\\\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @@
@
@
/\\\\\\\\ /\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\\\\\\\\\\\\\@
@@
/\\\\@
/\\\\ @
/\\\\ @
/\\\\\\ @
/\\\\ @
/\\\\ @
/\\\\@
@@
/\\@
/\\@
/\\@
@
/\\@
/\\@
/\\@
@@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
@@
/\\\\ /\\ @
/\\ /\\\\@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
`
@@ -0,0 +1 @@
{"version":3,"file":"arrow-right-from-line.js","sources":["../../../src/icons/arrow-right-from-line.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ArrowRightFromLine\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA1djE0IiAvPgogIDxwYXRoIGQ9Ik0yMSAxMkg3IiAvPgogIDxwYXRoIGQ9Im0xNSAxOCA2LTYtNi02IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/arrow-right-from-line\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 ArrowRightFromLine = createLucideIcon('ArrowRightFromLine', [\n ['path', { d: 'M3 5v14', key: '1nt18q' }],\n ['path', { d: 'M21 12H7', key: '13ipq5' }],\n ['path', { d: 'm15 18 6-6-6-6', key: '6tx3qv' }],\n]);\n\nexport default ArrowRightFromLine;\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,CAAA,CAAqB,iBAAiB,oBAAsB,CAAA,CAAA,CAAA;AAAA,CAAA,CAChE,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,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_is","require","_deprecationWarning","assert","type","node","opts","is","Error","JSON","stringify","assertArrayExpression","assertAssignmentExpression","assertBinaryExpression","assertInterpreterDirective","assertDirective","assertDirectiveLiteral","assertBlockStatement","assertBreakStatement","assertCallExpression","assertCatchClause","assertConditionalExpression","assertContinueStatement","assertDebuggerStatement","assertDoWhileStatement","assertEmptyStatement","assertExpressionStatement","assertFile","assertForInStatement","assertForStatement","assertFunctionDeclaration","assertFunctionExpression","assertIdentifier","assertIfStatement","assertLabeledStatement","assertStringLiteral","assertNumericLiteral","assertNullLiteral","assertBooleanLiteral","assertRegExpLiteral","assertLogicalExpression","assertMemberExpression","assertNewExpression","assertProgram","assertObjectExpression","assertObjectMethod","assertObjectProperty","assertRestElement","assertReturnStatement","assertSequenceExpression","assertParenthesizedExpression","assertSwitchCase","assertSwitchStatement","assertThisExpression","assertThrowStatement","assertTryStatement","assertUnaryExpression","assertUpdateExpression","assertVariableDeclaration","assertVariableDeclarator","assertWhileStatement","assertWithStatement","assertAssignmentPattern","assertArrayPattern","assertArrowFunctionExpression","assertClassBody","assertClassExpression","assertClassDeclaration","assertExportAllDeclaration","assertExportDefaultDeclaration","assertExportNamedDeclaration","assertExportSpecifier","assertForOfStatement","assertImportDeclaration","assertImportDefaultSpecifier","assertImportNamespaceSpecifier","assertImportSpecifier","assertImportExpression","assertMetaProperty","assertClassMethod","assertObjectPattern","assertSpreadElement","assertSuper","assertTaggedTemplateExpression","assertTemplateElement","assertTemplateLiteral","assertYieldExpression","assertAwaitExpression","assertImport","assertBigIntLiteral","assertExportNamespaceSpecifier","assertOptionalMemberExpression","assertOptionalCallExpression","assertClassProperty","assertClassAccessorProperty","assertClassPrivateProperty","assertClassPrivateMethod","assertPrivateName","assertStaticBlock","assertImportAttribute","assertAnyTypeAnnotation","assertArrayTypeAnnotation","assertBooleanTypeAnnotation","assertBooleanLiteralTypeAnnotation","assertNullLiteralTypeAnnotation","assertClassImplements","assertDeclareClass","assertDeclareFunction","assertDeclareInterface","assertDeclareModule","assertDeclareModuleExports","assertDeclareTypeAlias","assertDeclareOpaqueType","assertDeclareVariable","assertDeclareExportDeclaration","assertDeclareExportAllDeclaration","assertDeclaredPredicate","assertExistsTypeAnnotation","assertFunctionTypeAnnotation","assertFunctionTypeParam","assertGenericTypeAnnotation","assertInferredPredicate","assertInterfaceExtends","assertInterfaceDeclaration","assertInterfaceTypeAnnotation","assertIntersectionTypeAnnotation","assertMixedTypeAnnotation","assertEmptyTypeAnnotation","assertNullableTypeAnnotation","assertNumberLiteralTypeAnnotation","assertNumberTypeAnnotation","assertObjectTypeAnnotation","assertObjectTypeInternalSlot","assertObjectTypeCallProperty","assertObjectTypeIndexer","assertObjectTypeProperty","assertObjectTypeSpreadProperty","assertOpaqueType","assertQualifiedTypeIdentifier","assertStringLiteralTypeAnnotation","assertStringTypeAnnotation","assertSymbolTypeAnnotation","assertThisTypeAnnotation","assertTupleTypeAnnotation","assertTypeofTypeAnnotation","assertTypeAlias","assertTypeAnnotation","assertTypeCastExpression","assertTypeParameter","assertTypeParameterDeclaration","assertTypeParameterInstantiation","assertUnionTypeAnnotation","assertVariance","assertVoidTypeAnnotation","assertEnumDeclaration","assertEnumBooleanBody","assertEnumNumberBody","assertEnumStringBody","assertEnumSymbolBody","assertEnumBooleanMember","assertEnumNumberMember","assertEnumStringMember","assertEnumDefaultedMember","assertIndexedAccessType","assertOptionalIndexedAccessType","assertJSXAttribute","assertJSXClosingElement","assertJSXElement","assertJSXEmptyExpression","assertJSXExpressionContainer","assertJSXSpreadChild","assertJSXIdentifier","assertJSXMemberExpression","assertJSXNamespacedName","assertJSXOpeningElement","assertJSXSpreadAttribute","assertJSXText","assertJSXFragment","assertJSXOpeningFragment","assertJSXClosingFragment","assertNoop","assertPlaceholder","assertV8IntrinsicIdentifier","assertArgumentPlaceholder","assertBindExpression","assertDecorator","assertDoExpression","assertExportDefaultSpecifier","assertRecordExpression","assertTupleExpression","assertDecimalLiteral","assertModuleExpression","assertTopicReference","assertPipelineTopicExpression","assertPipelineBareFunction","assertPipelinePrimaryTopicReference","assertVoidPattern","assertTSParameterProperty","assertTSDeclareFunction","assertTSDeclareMethod","assertTSQualifiedName","assertTSCallSignatureLine truncated
@@ -0,0 +1,473 @@
import { OAuthClientMetadata, OAuthClientInformationMixed, OAuthTokens, OAuthMetadata, OAuthClientInformationFull, OAuthProtectedResourceMetadata, AuthorizationServerMetadata } from '../shared/auth.js';
import { OAuthError } from '../server/auth/errors.js';
import { FetchLike } from '../shared/transport.js';
/**
* Function type for adding client authentication to token requests.
*/
export type AddClientAuthentication = (headers: Headers, params: URLSearchParams, url: string | URL, metadata?: AuthorizationServerMetadata) => void | Promise<void>;
/**
* Implements an end-to-end OAuth client to be used with one MCP server.
*
* This client relies upon a concept of an authorized "session," the exact
* meaning of which is application-defined. Tokens, authorization codes, and
* code verifiers should not cross different sessions.
*/
export interface OAuthClientProvider {
/**
* The URL to redirect the user agent to after authorization.
* Return undefined for non-interactive flows that don't require user interaction
* (e.g., client_credentials, jwt-bearer).
*/
get redirectUrl(): string | URL | undefined;
/**
* External URL the server should use to fetch client metadata document
*/
clientMetadataUrl?: string;
/**
* Metadata about this OAuth client.
*/
get clientMetadata(): OAuthClientMetadata;
/**
* Returns a OAuth2 state parameter.
*/
state?(): string | Promise<string>;
/**
* Loads information about this OAuth client, as registered already with the
* server, or returns `undefined` if the client is not registered with the
* server.
*
* A provider that returns pre-registered credentials should include `issuer`, the URL of
* the authorization server they were registered with; {@linkcode auth} then does not
* present them to any other.
*/
clientInformation(): OAuthClientInformationMixed | undefined | Promise<OAuthClientInformationMixed | undefined>;
/**
* If implemented, this permits the OAuth client to dynamically register with
* the server. Client information saved this way should later be read via
* `clientInformation()`.
*
* This method is not required to be implemented if client information is
* statically known (e.g., pre-registered).
*
* The object carries `issuer`, the authorization server it was obtained from. Store it
* unchanged so that {@linkcode auth} does not reuse the registration with a different one.
* Client information stored without `issuer` is passed here, with it, after its first successful use.
*/
saveClientInformation?(clientInformation: OAuthClientInformationMixed): void | Promise<void>;
/**
* Loads any existing OAuth tokens for the current session, or returns
* `undefined` if there are no saved tokens.
*/
tokens(): OAuthTokens | undefined | Promise<OAuthTokens | undefined>;
/**
* Stores new OAuth tokens for the current session, after a successful
* authorization.
*
* The object carries `issuer`, the authorization server that issued the tokens. Store it
* unchanged so that {@linkcode auth} does not present the refresh token to a different one.
*/
saveTokens(tokens: OAuthTokens): void | Promise<void>;
/**
* Invoked to redirect the user agent to the given URL to begin the authorization flow.
*/
redirectToAuthorization(authorizationUrl: URL): void | Promise<void>;
/**
* Saves a PKCE code verifier for the current session, before redirecting to
* the authorization flow.
*/
saveCodeVerifier(codeVerifier: string): void | Promise<void>;
/**
* Loads the PKCE code verifier for the current session, necessary to validate
* the authorization result.
*/
codeVerifier(): string | Promise<string>;
/**
* Adds custom client authentication to OAuth token requests.
*
* This optional method allows implementations to customize how client credentials
* are included in token exchange and refresh requests. When provided, this method
* is called instead of the default authentication logic, giving full control over
* the authentication mechanism.
*
* Common use cases include:
* - Supporting authentication methods beyond the standard OAuth 2.0 methods
* - Adding custom headers for proprietary authentication schemes
* - Implementing client assertion-based authentication (e.g., JWT bearer tokens)
*
* @param headers - The request headers (can be modified to add authentication)
* @param params - The request body parameters (can be modified to add credentials)
* @param url - The token endpoint URL being called
* @param metadata - Optional OAuth metadata for the server, which may include supported authentication methods
*/
addClientAuthentication?: AddClientAuthentication;
/**
* If defined, overrides the selection and validation of the
* RFC 8707 Resource Indicator. If left undefined, default
* validation behavior will be used.
*
* Implementations must verify the returned resource matches the MCP server.
*/
validateResourceURL?(serverUrl: string | URL, resource?: string): Promise<URL | undefined>;
/**
* If implemented, provides a way for the client to invalidate (e.g. delete) the specified
* credentials, in the case where the server has indicated that they are no longer valid.
* This avoids requiring the user to intervene manually.
*/
invalidateCredentials?(scope: 'all' | 'client' | 'tokens' | 'verifier' | 'discovery'): void | Promise<void>;
/**
* Prepares grant-specific parameters for a token request.
*
* This optional method allows providers to customize the token request based on
* the grant type they support. When implemented, it returns the grant type and
* any grant-specific parameters needed for the token exchange.
*
* If not implemented, the default behavior depends on the flow:
* - For authorization code flow: uses code, code_verifier, and redirect_uri
* - For client_credentials: detected via grant_types in clientMetadata
*
* @param scope - Optional scope to request
* @returns Grant type and parameters, or undefined to use default behavior
*
* @example
* // For client_credentials grant:
* prepareTokenRequest(scope) {
* return {
* grantType: 'client_credentials',
* params: scope ? { scope } : {}
* };
* }
*
* @example
* // For authorization_code grant (default behavior):
* async prepareTokenRequest() {
* return {
* grantType: 'authorization_code',
* params: {
* code: this.authorizationCode,
* code_verifier: await this.codeVerifier(),
* redirect_uri: String(this.redirectUrl)
* }
* };
* }
*/
prepareTokenRequest?(scope?: string): URLSearchParams | Promise<URLSearchParams | undefined> | undefined;
/**
* Saves the OAuth discovery state after RFC 9728 and authorization server metadata
* discovery. Providers can persist this state to avoid redundant discovery requests
* on subsequent {@linkcode auth} calls.
*
* This state can also be provided out-of-band (e.g., from a previous session or
* external configuration) to bootstrap the OAuth flow without discovery.
*
* Called by {@linkcode auth} after successful discovery.
*/
saveDiscoveryState?(state: OAuthDiscoveryState): void | Promise<void>;
/**
* Returns previously saved discovery state, or `undefined` if none is cached.
*
* When available, {@linkcode auth} restores the discovery state (authorization server
* URL, resource metadata, etc.) instead of performing RFC 9728 discovery, reducing
* latency on subsequent calls.
*
* Providers should clear cached discovery state on repeated authentication failures
* (via {@linkcode invalidateCredentials} with scope `'discovery'` or `'all'`) to allow
* re-discovery in case the authorization server has changed.
*/
discoveryState?(): OAuthDiscoveryState | undefined | Promise<OAuthDiscoveryState | undefined>;
}
/**
* Discovery state that can be persisted across sessions by an {@linkcode OAuthClientProvider}.
*
* Contains the results of RFC 9728 protected resource metadata discovery and
* authorization server metadata discovery. Persisting this state avoids
* redundant discovery HTTP requests on subsequent {@linkcode auth} calls.
*/
export interface OAuthDiscoveryState extends OAuthServerInfo {
/** The URL at which the protected resource metadata was found, if available. */
resourceMetadataUrl?: string;
}
export type AuthResult = 'AUTHORIZED' | 'REDIRECT';
export declare class UnauthorizedError extends Error {
constructor(message?: string);
}
type ClientAuthMethod = 'client_secret_basic' | 'client_secret_post' | 'none';
/**
* Determines the best client authentication method to use based on server support and client configuration.
*
* Priority order (highest to lowest):
* 1. client_secret_basic (if client secret is available)
* 2. client_secret_post (if client secret is available)
* 3. none (for public clients)
*
* @param clientInformation - OAuth client information containing credentials
* @param supportedMethods - Authentication methods supported by the authorization server
* @returns The selected authentication method
*/
export declare function selectClientAuthMethod(clientInformation: OAuthClientInformationMixed, supportedMethods: string[]): ClientAuthMethod;
/**
* Parses an OAuth error response from a string or Response object.
*
* If the input is a standard OAuth2.0 error response, it will be parsed according to the spec
* and an instance of the appropriate OAuthError subclass will be returned.
* If parsing fails, it falls back to a generic ServerError that includes
* the response status (if available) and original content.
*
* @param input - A Response object or string containing the error response
* @returns A Promise that resolves to an OAuthError instance
*/
export declare function parseErrorResponse(input: Response | string): Promise<OAuthError>;
/**
* Orchestrates the full auth flow with a server.
*
* This can be used as a single entry point for all authorization functionality,
* instead of linking together the other lower-level functions in this module.
*/
export declare function auth(provider: OAuthClientProvider, options: {
serverUrl: string | URL;
authorizationCode?: string;
scope?: string;
resourceMetadataUrl?: URL;
fetchFn?: FetchLike;
}): Promise<AuthResult>;
/**
* SEP-991: URL-based Client IDs
* Validate that the client_id is a valid URL with https scheme
*/
export declare function isHttpsUrl(value?: string): boolean;
/**
* Selects the RFC 8707 resource indicator for an MCP server: the provider's
* {@linkcode OAuthClientProvider.validateResourceURL | validateResourceURL} result when
* implemented, otherwise the protected resource metadata's `resource` (checked against the
* server URL with `checkResourceAllowed`), or `undefined` when there is no metadata.
*
* The result is a parsed `URL`, so a pathless indicator such as `https://example.com` has
* the `href` `https://example.com/`. {@linkcode auth} therefore sends the metadata string
* verbatim instead of this URL's `href` (#1968); callers that emit the `resource`
* parameter themselves should do the same.
*/
export declare function selectResourceURL(serverUrl: string | URL, provider: OAuthClientProvider, resourceMetadata?: OAuthProtectedResourceMetadata): Promise<URL | undefined>;
/**
* Extract resource_metadata, scope, and error from WWW-Authenticate header.
*/
export declare function extractWWWAuthenticateParams(res: Response): {
resourceMetadataUrl?: URL;
scope?: string;
error?: string;
};
/**
* Extract resource_metadata from response header.
* @deprecated Use `extractWWWAuthenticateParams` instead.
*/
export declare function extractResourceMetadataUrl(res: Response): URL | undefined;
/**
* Looks up RFC 9728 OAuth 2.0 Protected Resource Metadata.
*
* If the server returns a 404 for the well-known endpoint, this function will
* return `undefined`. Any other errors will be thrown as exceptions.
*/
export declare function discoverOAuthProtectedResourceMetadata(serverUrl: string | URL, opts?: {
protocolVersion?: string;
resourceMetadataUrl?: string | URL;
}, fetchFn?: FetchLike): Promise<OAuthProtectedResourceMetadata>;
/**
* Looks up RFC 8414 OAuth 2.0 Authorization Server Metadata.
*
* If the server returns a 404 for the well-known endpoint, this function will
* return `undefined`. Any other errors will be thrown as exceptions.
*
* @deprecated This function is deprecated in favor of `discoverAuthorizationServerMetadata`.
*/
export declare function discoverOAuthMetadata(issuer: string | URL, { authorizationServerUrl, protocolVersion }?: {
authorizationServerUrl?: string | URL;
protocolVersion?: string;
}, fetchFn?: FetchLike): Promise<OAuthMetadata | undefined>;
/**
* Builds a list of discovery URLs to try for authorization server metadata.
* URLs are returned in priority order:
* 1. OAuth metadata at the given URL
* 2. OIDC metadata endpoints at the given URL
*/
export declare function buildDiscoveryUrls(authorizationServerUrl: string | URL): {
url: URL;
type: 'oauth' | 'oidc';
}[];
/**
* Discovers authorization server metadata with support for RFC 8414 OAuth 2.0 Authorization Server Metadata
* and OpenID Connect Discovery 1.0 specifications.
*
* This function implements a fallback strategy for authorization server discovery:
* 1. Attempts RFC 8414 OAuth metadata discovery first
* 2. If OAuth discovery fails, falls back to OpenID Connect Discovery
*
* @param authorizationServerUrl - The authorization server URL obtained from the MCP Server's
* protected resource metadata, or the MCP server's URL if the
* metadata was not found.
* @param options - Configuration options
* @param options.fetchFn - Optional fetch function for making HTTP requests, defaults to global fetch
* @param options.protocolVersion - MCP protocol version to use, defaults to LATEST_PROTOCOL_VERSION
* @returns Promise resolving to authorization server metadata, or undefined if discovery fails
*/
export declare function discoverAuthorizationServerMetadata(authorizationServerUrl: string | URL, { fetchFn, protocolVersion }?: {
fetchFn?: FetchLike;
protocolVersion?: string;
}): Promise<AuthorizationServerMetadata | undefined>;
/**
* Result of {@linkcode discoverOAuthServerInfo}.
*/
export interface OAuthServerInfo {
/**
* The authorization server URL, either discovered via RFC 9728
* or derived from the MCP server URL as a fallback.
*/
authorizationServerUrl: string;
/**
* The authorization server metadata (endpoints, capabilities),
* or `undefined` if metadata discovery failed.
*/
authorizationServerMetadata?: AuthorizationServerMetadata;
/**
* The OAuth 2.0 Protected Resource Metadata from RFC 9728,
* or `undefined` if the server does not support it.
*/
resourceMetadata?: OAuthProtectedResourceMetadata;
}
/**
* Discovers the authorization server for an MCP server following
* {@link https://datatracker.ietf.org/doc/html/rfc9728 | RFC 9728} (OAuth 2.0 Protected
* Resource Metadata), with fallback to treating the server URL as the
* authorization server.
*
* This function combines two discovery steps into one call:
* 1. Probes `/.well-known/oauth-protected-resource` on the MCP server to find the
* authorization server URL (RFC 9728).
* 2. Fetches authorization server metadata from that URL (RFC 8414 / OpenID Connect Discovery).
*
* Use this when you need the authorization server metadata for operations outside the
* {@linkcode auth} orchestrator, such as token refresh or token revocation.
*
* @param serverUrl - The MCP resource server URL
* @param opts - Optional configuration
* @param opts.resourceMetadataUrl - Override URL for the protected resource metadata endpoint
* @param opts.fetchFn - Custom fetch function for HTTP requests
* @returns Authorization server URL, metadata, and resource metadata (if available)
*/
export declare function discoverOAuthServerInfo(serverUrl: string | URL, opts?: {
resourceMetadataUrl?: URL;
fetchFn?: FetchLike;
}): Promise<OAuthServerInfo>;
/**
* Begins the authorization flow with the given server, by generating a PKCE challenge and constructing the authorization URL.
*/
export declare function startAuthorization(authorizationServerUrl: string | URL, { metadata, clientInformation, redirectUrl, scope, state, resource }: {
metadata?: AuthorizationServerMetadata;
clientInformation: OAuthClientInformationMixed;
redirectUrl: string | URL;
scope?: string;
state?: string;
resource?: string | URL;
}): Promise<{
authorizationUrl: URL;
codeVerifier: string;
}>;
/**
* Prepares token request parameters for an authorization code exchange.
*
* This is the default implementation used by fetchToken when the provider
* doesn't implement prepareTokenRequest.
*
* @param authorizationCode - The authorization code received from the authorization endpoint
* @param codeVerifier - The PKCE code verifier
* @param redirectUri - The redirect URI used in the authorization request
* @returns URLSearchParams for the authorization_code grant
*/
export declare function prepareAuthorizationCodeRequest(authorizationCode: string, codeVerifier: string, redirectUri: string | URL): URLSearchParams;
/**
* Exchanges an authorization code for an access token with the given server.
*
* Supports multiple client authentication methods as specified in OAuth 2.1:
* - Automatically selects the best authentication method based on server support
* - Falls back to appropriate defaults when server metadata is unavailable
*
* @param authorizationServerUrl - The authorization server's base URL
* @param options - Configuration object containing client info, auth code, etc.
* @returns Promise resolving to OAuth tokens
* @throws {Error} When token exchange fails or authentication is invalid
*/
export declare function exchangeAuthorization(authorizationServerUrl: string | URL, { metadata, clientInformation, authorizationCode, codeVerifier, redirectUri, resource, addClientAuthentication, fetchFn }: {
metadata?: AuthorizationServerMetadata;
clientInformation: OAuthClientInformationMixed;
authorizationCode: string;
codeVerifier: string;
redirectUri: string | URL;
resource?: string | URL;
addClientAuthentication?: OAuthClientProvider['addClientAuthentication'];
fetchFn?: FetchLike;
}): Promise<OAuthTokens>;
/**
* Exchange a refresh token for an updated access token.
*
* Supports multiple client authentication methods as specified in OAuth 2.1:
* - Automatically selects the best authentication method based on server support
* - Preserves the original refresh token if a new one is not returned
*
* @param authorizationServerUrl - The authorization server's base URL
* @param options - Configuration object containing client info, refresh token, etc.
* @returns Promise resolving to OAuth tokens (preserves original refresh_token if not replaced)
* @throws {Error} When token refresh fails or authentication is invalid
*/
export declare function refreshAuthorization(authorizationServerUrl: string | URL, { metadata, clientInformation, refreshToken, resource, addClientAuthentication, fetchFn }: {
metadata?: AuthorizationServerMetadata;
clientInformation: OAuthClientInformationMixed;
refreshToken: string;
resource?: string | URL;
addClientAuthentication?: OAuthClientProvider['addClientAuthentication'];
fetchFn?: FetchLike;
}): Promise<OAuthTokens>;
/**
* Unified token fetching that works with any grant type via provider.prepareTokenRequest().
*
* This function provides a single entry point for obtaining tokens regardless of the
* OAuth grant type. The provider's prepareTokenRequest() method determines which grant
* to use and supplies the grant-specific parameters.
*
* @param provider - OAuth client provider that implements prepareTokenRequest()
* @param authorizationServerUrl - The authorization server's base URL
* @param options - Configuration for the token request
* @returns Promise resolving to OAuth tokens
* @throws {Error} When provider doesn't implement prepareTokenRequest or token fetch fails
*
* @example
* // Provider for client_credentials:
* class MyProvider implements OAuthClientProvider {
* prepareTokenRequest(scope) {
* const params = new URLSearchParams({ grant_type: 'client_credentials' });
* if (scope) params.set('scope', scope);
* return params;
* }
* // ... other methods
* }
*
* const tokens = await fetchToken(provider, authServerUrl, { metadata });
*/
export declare function fetchToken(provider: OAuthClientProvider, authorizationServerUrl: string | URL, { metadata, resource, authorizationCode, fetchFn }?: {
metadata?: AuthorizationServerMetadata;
resource?: string | URL;
/** Authorization code for the default authorization_code grant flow */
authorizationCode?: string;
fetchFn?: FetchLike;
}): Promise<OAuthTokens>;
/**
* Performs OAuth 2.0 Dynamic Client Registration according to RFC 7591.
*
* If `scope` is provided, it overrides `clientMetadata.scope` in the registration
* request body. This allows callers to apply the Scope Selection Strategy (SEP-835)
* consistently across both DCR and the subsequent authorization request.
*/
export declare function registerClient(authorizationServerUrl: string | URL, { metadata, clientMetadata, scope, fetchFn }: {
metadata?: AuthorizationServerMetadata;
clientMetadata: OAuthClientMetadata;
scope?: string;
fetchFn?: FetchLike;
}): Promise<OAuthClientInformationFull>;
export {};
//# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@theme inline{--animation-delay-0: 0s; --animation-delay-75: 75ms; --animation-delay-100: .1s; --animation-delay-150: .15s; --animation-delay-200: .2s; --animation-delay-300: .3s; --animation-delay-500: .5s; --animation-delay-700: .7s; --animation-delay-1000: 1s; --animation-repeat-0: 0; --animation-repeat-1: 1; --animation-repeat-infinite: infinite; --animation-direction-normal: normal; --animation-direction-reverse: reverse; --animation-direction-alternate: alternate; --animation-direction-alternate-reverse: alternate-reverse; --animation-fill-mode-none: none; --animation-fill-mode-forwards: forwards; --animation-fill-mode-backwards: backwards; --animation-fill-mode-both: both; --percentage-0: 0; --percentage-5: .05; --percentage-10: .1; --percentage-15: .15; --percentage-20: .2; --percentage-25: .25; --percentage-30: .3; --percentage-35: .35; --percentage-40: .4; --percentage-45: .45; --percentage-50: .5; --percentage-55: .55; --percentage-60: .6; --percentage-65: .65; --percentage-70: .7; --percentage-75: .75; --percentage-80: .8; --percentage-85: .85; --percentage-90: .9; --percentage-95: .95; --percentage-100: 1; --percentage-translate-full: 1; --animate-in: enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-out: exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); @keyframes enter { from { opacity: var(--tw-enter-opacity,1); transform: translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0)); filter: blur(var(--tw-enter-blur,0)); }}@keyframes exit { to { opacity: var(--tw-exit-opacity,1); transform: translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0)); filter: blur(var(--tw-exit-blur,0)); }}--animate-accordion-down: accordion-down var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-accordion-up: accordion-up var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-collapsible-down: collapsible-down var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-collapsible-up: collapsible-up var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); @keyframes accordion-down { from { height: 0; }to { height: var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto))))); }}@keyframes accordion-up { from { height: var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto))))); }to { height: 0; }}@keyframes collapsible-down { from { height: 0Line truncated
@@ -0,0 +1,5 @@
export * from './lib/types';
export * from './lib/base-widget';
export * from './lib/gridstack-item.component';
export * from './lib/gridstack.component';
export * from './lib/gridstack.module';
@@ -0,0 +1,291 @@
var path = require('path');
var crypto = require('crypto');
module.exports = {
createFromFile: function (filePath, useChecksum) {
var fname = path.basename(filePath);
var dir = path.dirname(filePath);
return this.create(fname, dir, useChecksum);
},
create: function (cacheId, _path, useChecksum) {
var fs = require('fs');
var flatCache = require('flat-cache');
var cache = flatCache.load(cacheId, _path);
var normalizedEntries = {};
var removeNotFoundFiles = function removeNotFoundFiles() {
const cachedEntries = cache.keys();
// remove not found entries
cachedEntries.forEach(function remover(fPath) {
try {
fs.statSync(fPath);
} catch (err) {
if (err.code === 'ENOENT') {
cache.removeKey(fPath);
}
}
});
};
removeNotFoundFiles();
return {
/**
* the flat cache storage used to persist the metadata of the `files
* @type {Object}
*/
cache: cache,
/**
* Given a buffer, calculate md5 hash of its content.
* @method getHash
* @param {Buffer} buffer buffer to calculate hash on
* @return {String} content hash digest
*/
getHash: function (buffer) {
return crypto.createHash('md5').update(buffer).digest('hex');
},
/**
* Return whether or not a file has changed since last time reconcile was called.
* @method hasFileChanged
* @param {String} file the filepath to check
* @return {Boolean} wheter or not the file has changed
*/
hasFileChanged: function (file) {
return this.getFileDescriptor(file).changed;
},
/**
* given an array of file paths it return and object with three arrays:
* - changedFiles: Files that changed since previous run
* - notChangedFiles: Files that haven't change
* - notFoundFiles: Files that were not found, probably deleted
*
* @param {Array} files the files to analyze and compare to the previous seen files
* @return {[type]} [description]
*/
analyzeFiles: function (files) {
var me = this;
files = files || [];
var res = {
changedFiles: [],
notFoundFiles: [],
notChangedFiles: [],
};
me.normalizeEntries(files).forEach(function (entry) {
if (entry.changed) {
res.changedFiles.push(entry.key);
return;
}
if (entry.notFound) {
res.notFoundFiles.push(entry.key);
return;
}
res.notChangedFiles.push(entry.key);
});
return res;
},
getFileDescriptor: function (file) {
var fstat;
try {
fstat = fs.statSync(file);
} catch (ex) {
this.removeEntry(file);
return { key: file, notFound: true, err: ex };
}
if (useChecksum) {
return this._getFileDescriptorUsingChecksum(file);
}
return this._getFileDescriptorUsingMtimeAndSize(file, fstat);
},
_getFileDescriptorUsingMtimeAndSize: function (file, fstat) {
var meta = cache.getKey(file);
var cacheExists = !!meta;
var cSize = fstat.size;
var cTime = fstat.mtime.getTime();
var isDifferentDate;
var isDifferentSize;
if (!meta) {
meta = { size: cSize, mtime: cTime };
} else {
isDifferentDate = cTime !== meta.mtime;
isDifferentSize = cSize !== meta.size;
}
var nEntry = (normalizedEntries[file] = {
key: file,
changed: !cacheExists || isDifferentDate || isDifferentSize,
meta: meta,
});
return nEntry;
},
_getFileDescriptorUsingChecksum: function (file) {
var meta = cache.getKey(file);
var cacheExists = !!meta;
var contentBuffer;
try {
contentBuffer = fs.readFileSync(file);
} catch (ex) {
contentBuffer = '';
}
var isDifferent = true;
var hash = this.getHash(contentBuffer);
if (!meta) {
meta = { hash: hash };
} else {
isDifferent = hash !== meta.hash;
}
var nEntry = (normalizedEntries[file] = {
key: file,
changed: !cacheExists || isDifferent,
meta: meta,
});
return nEntry;
},
/**
* Return the list o the files that changed compared
* against the ones stored in the cache
*
* @method getUpdated
* @param files {Array} the array of files to compare against the ones in the cache
* @returns {Array}
*/
getUpdatedFiles: function (files) {
var me = this;
files = files || [];
return me
.normalizeEntries(files)
.filter(function (entry) {
return entry.changed;
})
.map(function (entry) {
return entry.key;
});
},
/**
* return the list of files
* @method normalizeEntries
* @param files
* @returns {*}
*/
normalizeEntries: function (files) {
files = files || [];
var me = this;
var nEntries = files.map(function (file) {
return me.getFileDescriptor(file);
});
//normalizeEntries = nEntries;
return nEntries;
},
/**
* Remove an entry from the file-entry-cache. Useful to force the file to still be considered
* modified the next time the process is run
*
* @method removeEntry
* @param entryName
*/
removeEntry: function (entryName) {
delete normalizedEntries[entryName];
cache.removeKey(entryName);
},
/**
* Delete the cache file from the disk
* @method deleteCacheFile
*/
deleteCacheFile: function () {
cache.removeCacheFile();
},
/**
* remove the cache from the file and clear the memory cache
*/
destroy: function () {
normalizedEntries = {};
cache.destroy();
},
_getMetaForFileUsingCheckSum: function (cacheEntry) {
var contentBuffer = fs.readFileSync(cacheEntry.key);
var hash = this.getHash(contentBuffer);
var meta = Object.assign(cacheEntry.meta, { hash: hash });
delete meta.size;
delete meta.mtime;
return meta;
},
_getMetaForFileUsingMtimeAndSize: function (cacheEntry) {
var stat = fs.statSync(cacheEntry.key);
var meta = Object.assign(cacheEntry.meta, {
size: stat.size,
mtime: stat.mtime.getTime(),
});
delete meta.hash;
return meta;
},
/**
* Sync the files and persist them to the cache
* @method reconcile
*/
reconcile: function (noPrune) {
removeNotFoundFiles();
noPrune = typeof noPrune === 'undefined' ? true : noPrune;
var entries = normalizedEntries;
var keys = Object.keys(entries);
if (keys.length === 0) {
return;
}
var me = this;
keys.forEach(function (entryName) {
var cacheEntry = entries[entryName];
try {
var meta = useChecksum
? me._getMetaForFileUsingCheckSum(cacheEntry)
: me._getMetaForFileUsingMtimeAndSize(cacheEntry);
cache.setKey(entryName, meta);
} catch (err) {
// if the file does not exists we don't save it
// other errors are just thrown
if (err.code !== 'ENOENT') {
throw err;
}
}
});
cache.save(noPrune);
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"file":"scrypt.d.ts","sourceRoot":"","sources":["src/scrypt.ts"],"names":[],"mappings":"AAOA,OAAO,EAML,KAAK,QAAQ,EACb,KAAK,IAAI,EACT,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAkFpB;;;;;;;;;GASG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,0DAA0D;IAC1D,CAAC,EAAE,MAAM,CAAC;IACV,4BAA4B;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,8BAA8B;IAC9B,CAAC,EAAE,MAAM,CAAC;IACV,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAiFF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EACxB,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,EACpB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,GACrB,IAAI,CAAC,UAAU,CAAC,CAgClB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EACxB,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,EACpB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,GACrB,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAiC3B"}
@@ -0,0 +1,527 @@
"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 });
exports.Parser = void 0;
const Tokenizer_js_1 = __importStar(require("./Tokenizer.js"));
const decode_1 = require("entities/decode");
const formTags = new Set([
"input",
"option",
"optgroup",
"select",
"button",
"datalist",
"textarea",
]);
const pTag = new Set(["p"]);
const tableSectionTags = new Set(["thead", "tbody"]);
const ddtTags = new Set(["dd", "dt"]);
const rtpTags = new Set(["rt", "rp"]);
const openImpliesClose = new Map([
["tr", new Set(["tr", "th", "td"])],
["th", new Set(["th"])],
["td", new Set(["thead", "th", "td"])],
["body", new Set(["head", "link", "script"])],
["li", new Set(["li"])],
["p", pTag],
["h1", pTag],
["h2", pTag],
["h3", pTag],
["h4", pTag],
["h5", pTag],
["h6", pTag],
["select", formTags],
["input", formTags],
["output", formTags],
["button", formTags],
["datalist", formTags],
["textarea", formTags],
["option", new Set(["option"])],
["optgroup", new Set(["optgroup", "option"])],
["dd", ddtTags],
["dt", ddtTags],
["address", pTag],
["article", pTag],
["aside", pTag],
["blockquote", pTag],
["details", pTag],
["div", pTag],
["dl", pTag],
["fieldset", pTag],
["figcaption", pTag],
["figure", pTag],
["footer", pTag],
["form", pTag],
["header", pTag],
["hr", pTag],
["main", pTag],
["nav", pTag],
["ol", pTag],
["pre", pTag],
["section", pTag],
["table", pTag],
["ul", pTag],
["rt", rtpTags],
["rp", rtpTags],
["tbody", tableSectionTags],
["tfoot", tableSectionTags],
]);
const voidElements = new Set([
"area",
"base",
"basefont",
"br",
"col",
"command",
"embed",
"frame",
"hr",
"img",
"input",
"isindex",
"keygen",
"link",
"meta",
"param",
"source",
"track",
"wbr",
]);
const foreignContextElements = new Set(["math", "svg"]);
const htmlIntegrationElements = new Set([
"mi",
"mo",
"mn",
"ms",
"mtext",
"annotation-xml",
"foreignobject",
"desc",
"title",
]);
const reNameEnd = /\s|\//;
class Parser {
constructor(cbs, options = {}) {
var _a, _b, _c, _d, _e, _f;
this.options = options;
/** The start index of the last event. */
this.startIndex = 0;
/** The end index of the last event. */
this.endIndex = 0;
/**
* Store the start index of the current open tag,
* so we can update the start index for attributes.
*/
this.openTagStart = 0;
this.tagname = "";
this.attribname = "";
this.attribvalue = "";
this.attribs = null;
this.stack = [];
this.buffers = [];
this.bufferOffset = 0;
/** The index of the last written buffer. Used when resuming after a `pause()`. */
this.writeIndex = 0;
/** Indicates whether the parser has finished running / `.end` has been called. */
this.ended = false;
this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};
this.htmlMode = !this.options.xmlMode;
this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : this.htmlMode;
this.lowerCaseAttributeNames =
(_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : this.htmlMode;
this.recognizeSelfClosing =
(_c = options.recognizeSelfClosing) !== null && _c !== void 0 ? _c : !this.htmlMode;
this.tokenizer = new ((_d = options.Tokenizer) !== null && _d !== void 0 ? _d : Tokenizer_js_1.default)(this.options, this);
this.foreignContext = [!this.htmlMode];
(_f = (_e = this.cbs).onparserinit) === null || _f === void 0 ? void 0 : _f.call(_e, this);
}
// Tokenizer event handlers
/** @internal */
ontext(start, endIndex) {
var _a, _b;
const data = this.getSlice(start, endIndex);
this.endIndex = endIndex - 1;
(_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data);
this.startIndex = endIndex;
}
/** @internal */
ontextentity(cp, endIndex) {
var _a, _b;
this.endIndex = endIndex - 1;
(_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, (0, decode_1.fromCodePoint)(cp));
this.startIndex = endIndex;
}
/**
* Checks if the current tag is a void element. Override this if you want
* to specify your own additional void elements.
*/
isVoidElement(name) {
return this.htmlMode && voidElements.has(name);
}
/** @internal */
onopentagname(start, endIndex) {
this.endIndex = endIndex;
let name = this.getSlice(start, endIndex);
if (this.lowerCaseTagNames) {
name = name.toLowerCase();
}
this.emitOpenTag(name);
}
emitOpenTag(name) {
var _a, _b, _c, _d;
this.openTagStart = this.startIndex;
this.tagname = name;
const impliesClose = this.htmlMode && openImpliesClose.get(name);
if (impliesClose) {
while (this.stack.length > 0 && impliesClose.has(this.stack[0])) {
const element = this.stack.shift();
(_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, true);
}
}
if (!this.isVoidElement(name)) {
this.stack.unshift(name);
if (this.htmlMode) {
if (foreignContextElements.has(name)) {
this.foreignContext.unshift(true);
}
else if (htmlIntegrationElements.has(name)) {
this.foreignContext.unshift(false);
}
}
}
(_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, name);
if (this.cbs.onopentag)
this.attribs = {};
}
endOpenTag(isImplied) {
var _a, _b;
this.startIndex = this.openTagStart;
if (this.attribs) {
(_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs, isImplied);
this.attribs = null;
}
if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) {
this.cbs.onclosetag(this.tagname, true);
}
this.tagname = "";
}
/** @internal */
onopentagend(endIndex) {
this.endIndex = endIndex;
this.endOpenTag(false);
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
onclosetag(start, endIndex) {
var _a, _b, _c, _d, _e, _f, _g, _h;
this.endIndex = endIndex;
let name = this.getSlice(start, endIndex);
if (this.lowerCaseTagNames) {
name = name.toLowerCase();
}
if (this.htmlMode &&
(foreignContextElements.has(name) ||
htmlIntegrationElements.has(name))) {
this.foreignContext.shift();
}
if (!this.isVoidElement(name)) {
const pos = this.stack.indexOf(name);
if (pos !== -1) {
for (let index = 0; index <= pos; index++) {
const element = this.stack.shift();
// We know the stack has sufficient elements.
(_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, index !== pos);
}
}
else if (this.htmlMode && name === "p") {
// Implicit open before close
this.emitOpenTag("p");
this.closeCurrentTag(true);
}
}
else if (this.htmlMode && name === "br") {
// We can't use `emitOpenTag` for implicit open, as `br` would be implicitly closed.
(_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, "br");
(_f = (_e = this.cbs).onopentag) === null || _f === void 0 ? void 0 : _f.call(_e, "br", {}, true);
(_h = (_g = this.cbs).onclosetag) === null || _h === void 0 ? void 0 : _h.call(_g, "br", false);
}
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
onselfclosingtag(endIndex) {
this.endIndex = endIndex;
if (this.recognizeSelfClosing || this.foreignContext[0]) {
this.closeCurrentTag(false);
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
else {
// Ignore the fact that the tag is self-closing.
this.onopentagend(endIndex);
}
}
closeCurrentTag(isOpenImplied) {
var _a, _b;
const name = this.tagname;
this.endOpenTag(isOpenImplied);
// Self-closing tags will be on the top of the stack
if (this.stack[0] === name) {
// If the opening tag isn't implied, the closing tag has to be implied.
(_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name, !isOpenImplied);
this.stack.shift();
}
}
/** @internal */
onattribname(start, endIndex) {
this.startIndex = start;
const name = this.getSlice(start, endIndex);
this.attribname = this.lowerCaseAttributeNames
? name.toLowerCase()
: name;
}
/** @internal */
onattribdata(start, endIndex) {
this.attribvalue += this.getSlice(start, endIndex);
}
/** @internal */
onattribentity(cp) {
this.attribvalue += (0, decode_1.fromCodePoint)(cp);
}
/** @internal */
onattribend(quote, endIndex) {
var _a, _b;
this.endIndex = endIndex;
(_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote === Tokenizer_js_1.QuoteType.Double
? '"'
: quote === Tokenizer_js_1.QuoteType.Single
? "'"
: quote === Tokenizer_js_1.QuoteType.NoValue
? undefined
: null);
if (this.attribs &&
!Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {
this.attribs[this.attribname] = this.attribvalue;
}
this.attribvalue = "";
}
getInstructionName(value) {
const index = value.search(reNameEnd);
let name = index < 0 ? value : value.substr(0, index);
if (this.lowerCaseTagNames) {
name = name.toLowerCase();
}
return name;
}
/** @internal */
ondeclaration(start, endIndex) {
this.endIndex = endIndex;
const value = this.getSlice(start, endIndex);
if (this.cbs.onprocessinginstruction) {
const name = this.getInstructionName(value);
this.cbs.onprocessinginstruction(`!${name}`, `!${value}`);
}
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
onprocessinginstruction(start, endIndex) {
this.endIndex = endIndex;
const value = this.getSlice(start, endIndex);
if (this.cbs.onprocessinginstruction) {
const name = this.getInstructionName(value);
this.cbs.onprocessinginstruction(`?${name}`, `?${value}`);
}
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
oncomment(start, endIndex, offset) {
var _a, _b, _c, _d;
this.endIndex = endIndex;
(_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, this.getSlice(start, endIndex - offset));
(_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
oncdata(start, endIndex, offset) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
this.endIndex = endIndex;
const value = this.getSlice(start, endIndex - offset);
if (!this.htmlMode || this.options.recognizeCDATA) {
(_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);
(_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);
(_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);
}
else {
(_h = (_g = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g, `[CDATA[${value}]]`);
(_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j);
}
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
onend() {
var _a, _b;
if (this.cbs.onclosetag) {
// Set the end index for all remaining tags
this.endIndex = this.startIndex;
for (let index = 0; index < this.stack.length; index++) {
this.cbs.onclosetag(this.stack[index], true);
}
}
(_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a);
}
/**
* Resets the parser to a blank state, ready to parse a new HTML document
*/
reset() {
var _a, _b, _c, _d;
(_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a);
this.tokenizer.reset();
this.tagname = "";
this.attribname = "";
this.attribs = null;
this.stack.length = 0;
this.startIndex = 0;
this.endIndex = 0;
(_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this);
this.buffers.length = 0;
this.foreignContext.length = 0;
this.foreignContext.unshift(!this.htmlMode);
this.bufferOffset = 0;
this.writeIndex = 0;
this.ended = false;
}
/**
* Resets the parser, then parses a complete document and
* pushes it to the handler.
*
* @param data Document to parse.
*/
parseComplete(data) {
this.reset();
this.end(data);
}
getSlice(start, end) {
while (start - this.bufferOffset >= this.buffers[0].length) {
this.shiftBuffer();
}
let slice = this.buffers[0].slice(start - this.bufferOffset, end - this.bufferOffset);
while (end - this.bufferOffset > this.buffers[0].length) {
this.shiftBuffer();
slice += this.buffers[0].slice(0, end - this.bufferOffset);
}
return slice;
}
shiftBuffer() {
this.bufferOffset += this.buffers[0].length;
this.writeIndex--;
this.buffers.shift();
}
/**
* Parses a chunk of data and calls the corresponding callbacks.
*
* @param chunk Chunk to parse.
*/
write(chunk) {
var _a, _b;
if (this.ended) {
(_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".write() after done!"));
return;
}
this.buffers.push(chunk);
if (this.tokenizer.running) {
this.tokenizer.write(chunk);
this.writeIndex++;
}
}
/**
* Parses the end of the buffer and clears the stack, calls onend.
*
* @param chunk Optional final chunk to parse.
*/
end(chunk) {
var _a, _b;
if (this.ended) {
(_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".end() after done!"));
return;
}
if (chunk)
this.write(chunk);
this.ended = true;
this.tokenizer.end();
}
/**
* Pauses parsing. The parser won't emit events until `resume` is called.
*/
pause() {
this.tokenizer.pause();
}
/**
* Resumes parsing after `pause` was called.
*/
resume() {
this.tokenizer.resume();
while (this.tokenizer.running &&
this.writeIndex < this.buffers.length) {
this.tokenizer.write(this.buffers[this.writeIndex++]);
}
if (this.ended)
this.tokenizer.end();
}
/**
* Alias of `write`, for backwards compatibility.
*
* @param chunk Chunk to parse.
* @deprecated
*/
parseChunk(chunk) {
this.write(chunk);
}
/**
* Alias of `end`, for backwards compatibility.
*
* @param chunk Optional final chunk to parse.
* @deprecated
*/
done(chunk) {
this.end(chunk);
}
}
exports.Parser = Parser;
//# sourceMappingURL=Parser.js.map
@@ -0,0 +1,412 @@
export default `flf2a$ 4 4 20 1 2
serifcap by Bruce M. Binder
$$@
$$@
$$@
$$@@
_ @
/ \\@
\\_/@
(_)@@
_ _ @
(_(_)@
@
@@
@
@
@
@@
@
@
@
@@
_ _ @
(_)/ ) @
/ /_ @
(_/(_)@@
___ @
( __) @
/ _) )@
\\___/ @@
_ @
/_)@
@
@@
_ @
/ )@
( ( @
\\_)@@
_ @
( \\ @
) )@
(_/ @@
@
@
@
@@
_ @
_( )_ @
(_ _)@
(_) @@
@
@
_ @
/_)@@
@
___ @
(___)@
@@
@
@
_ @
(_)@@
_ @
/ )@
/ / @
(_/ @@
__ @
/ \\ @
( () )@
\\__/ @@
__ @
( )@
)( @
(__)@@
___ @
(__ \\@
/ __/@
\\___)@@
___ @
(__ )@
(_ \\@
(___/@@
__ @
/ ,) @
(_ _)@
(_) @@
___ @
/ __)@
\\__ \\@
(___/@@
_ @
/ ) @
/ , \\@
\\___/@@
___ @
(__ )@
/ / @
(_/ @@
___ @
( , )@
/ , \\@
\\___/@@
___ @
/ , \\@
\\ /@
(_/ @@
_ @
(_)@
_ @
(_)@@
_ @
(_)@
_ @
/_)@@
_ @
/ )@
( ( @
\\_)@@
___ @
(___)@
___ @
(___)@@
_ @
( \\ @
) )@
(_/ @@
___ @
(__ )@
(_/ @
(_) @@
@
@
@
@@
__ @
( ) @
/__\\ @
(_)(_)@@
___ @
( ,)@
) ,\\@
(___/@@
__ @
/ _)@
( (_ @
\\__)@@
___ @
( \\ @
) ) )@
(___/ @@
___ @
( _)@
) _)@
(___)@@
___ @
( _)@
) _)@
(_) @@
__ @
/ _)@
( (/\\@
\\__/@@
_ _ @
( )( )@
)__( @
(_)(_)@@
__ @
( )@
)( @
(__)@@
__ @
( )@
__)( @
(___/ @@
_ _ @
( ) ) @
) \\ @
(_)\\_)@@
__ @
( ) @
)(__ @
(____)@@
__ __ @
( \\/ )@
) ( @
(_/\\/\\_)@@
_ _ @
( \\( )@
) ( @
(_)\\_)@@
__ @
/ \\ @
( () )@
\\__/ @@
___ @
( ,\\@
) _/@
(_) @@
__ @
/ \\ @
( () )@
\\___\\@@
___ @
( ,) @
) \\ @
(_)\\_)@@
___ @
/ __)@
\\__ \\@
(___/@@
____ @
(_ _)@
)( @
(__) @@
_ _ @
( )( )@
)()( @
\\__/ @@
_ _ @
( )( )@
\\\\// @
(__) @@
_ _ @
( \\/\\/ )@
\\ / @
\\/\\/ @@
_ _ @
( \\/ )@
) ( @
(_/\\_)@@
_ _ @
( \\/ )@
\\ / @
(__/ @@
___ @
(_ )@
/ / @
(___)@@
@
@
@
@@
_ @
( \\ @
\\ \\ @
\\_)@@
@
@
@
@@
__ @
/ \\ @
(_/\\_)@
@@
@
@
___ @
(___)@@
_ @
(_\\@
@
@@
__ @
( ) @
/__\\ @
(_)(_)@@
___ @
( ,)@
) ,\\@
(___/@@
__ @
/ _)@
( (_ @
\\__)@@
___ @
( \\ @
) ) )@
(___/ @@
___ @
( _)@
) _)@
(___)@@
___ @
( _)@
) _)@
(_) @@
__ @
/ _)@
( (/\\@
\\__/@@
_ _ @
( )( )@
)__( @
(_)(_)@@
__ @
( )@
)( @
(__)@@
__ @
( )@
__)( @
(___/ @@
_ _ @
( ) ) @
) \\ @
(_)\\_)@@
__ @
( ) @
)(__ @
(____)@@
__ __ @
( \\/ )@
) ( @
(_/\\/\\_)@@
_ _ @
( \\( )@
) ( @
(_)\\_)@@
__ @
/ \\ @
( () )@
\\__/ @@
___ @
( ,\\@
) _/@
(_) @@
__ @
/ \\ @
( () )@
\\___\\@@
___ @
( ,) @
) \\ @
(_)\\_)@@
___ @
/ __)@
\\__ \\@
(___/@@
____ @
(_ _)@
)( @
(__) @@
_ _ @
( )( )@
)()( @
\\__/ @@
_ _ @
( )( )@
\\\\// @
(__) @@
_ _ @
( \\/\\/ )@
\\ / @
\\/\\/ @@
_ _ @
( \\/ )@
) ( @
(_/\\_)@@
_ _ @
( \\/ )@
\\ / @
(__/ @@
___ @
(_ )@
/ / @
(___)@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
`
@@ -0,0 +1,65 @@
/**
* Metadata key for associating a UI resource URI with a tool.
*
* MCP servers include this key in tool definition metadata (via `tools/list`)
* to indicate which UI resource should be displayed when the tool is called.
* When hosts see a tool with this metadata, they fetch and render the
* corresponding {@link app!App `App`}.
*
* **Note**: This constant is provided for reference and backwards compatibility.
* Server developers should use {@link server-helpers!registerAppTool `registerAppTool`}
* with the `_meta.ui.resourceUri` format instead. Host developers must check both
* formats for compatibility.
*
* @example Modern format (server-side, not in Apps)
* ```ts source="./app.examples.ts#RESOURCE_URI_META_KEY_modernFormat"
* // Preferred: Use registerAppTool with nested ui.resourceUri
* registerAppTool(
* server,
* "weather",
* {
* description: "Get weather forecast",
* _meta: {
* ui: { resourceUri: "ui://weather/forecast" },
* },
* },
* handler,
* );
* ```
*
* @example Legacy format (deprecated, for backwards compatibility)
* ```ts source="./app.examples.ts#RESOURCE_URI_META_KEY_legacyFormat"
* // Deprecated: Direct use of RESOURCE_URI_META_KEY
* server.registerTool(
* "weather",
* {
* description: "Get weather forecast",
* _meta: {
* [RESOURCE_URI_META_KEY]: "ui://weather/forecast",
* },
* },
* handler,
* );
* ```
*
* @example How hosts check for this metadata (must support both formats)
* ```ts source="./app.examples.ts#RESOURCE_URI_META_KEY_hostSide"
* // Hosts should check both modern and legacy formats
* const meta = tool._meta;
* const uiMeta = meta?.ui as McpUiToolMeta | undefined;
* const legacyUri = meta?.[RESOURCE_URI_META_KEY] as string | undefined;
* const uiUri = uiMeta?.resourceUri ?? legacyUri;
* if (typeof uiUri === "string" && uiUri.startsWith("ui://")) {
* // Fetch the resource and display the UI
* }
* ```
*/
export declare const RESOURCE_URI_META_KEY = "ui/resourceUri";
/**
* MIME type for MCP UI resources.
*
* Identifies HTML content as an MCP App UI resource.
*
* Used by {@link server-helpers!registerAppResource `registerAppResource`} as the default MIME type for app resources.
*/
export declare const RESOURCE_MIME_TYPE = "text/html;profile=mcp-app";
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAyCxD,sDAAsD;AACtD,MAAM,KAAK,GAAS,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,EAAE,CAAA;AAEzC,MAAM,QAAQ,GAAG,OAAO,CAAA;AAExB,MAAM,GAAG,GAAG,CAAC,EAAU,EA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AAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;QACnC,CAAC;aAAM,IAAI,GAAG,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC;YAC3B,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;QACpB,CAAC;aAAM,IAAI,GAAG,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC;YAC7B,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;QACpB,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACf,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,oEAAoE;AACpE,oEAAoE;AACpE,kEAAkE;AAClE,yDAAyD;AACzD,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,IAAU,EAAU,EAAE;IACtD,MAAM,GAAG,GAAW,EAAE,CAAA;IACtB,IAAI,GAAG,GAAG,EAAE,CAAA;IACZ,MAALine truncated
@@ -0,0 +1,8 @@
//#region src/invariant.ts
function invariant() {
throw new Error("Invariant failed");
}
//#endregion
exports.invariant = invariant;
//# sourceMappingURL=invariant.cjs.map
@@ -0,0 +1 @@
{"version":3,"file":"file-axis-3-d.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./lib/picomatch');
@@ -0,0 +1 @@
{"version":3,"file":"waapi.mjs","sources":["../../../../../src/animation/waapi/supports/waapi.ts"],"sourcesContent":["import { memo } from \"motion-utils\"\nimport {\n AnyResolvedKeyframe,\n ValueAnimationOptionsWithRenderContext,\n} from \"../../types\"\nimport { acceleratedValues } from \"../utils/accelerated-values\"\nimport { hasBrowserOnlyColors } from \"../utils/is-browser-color\"\n\nconst colorProperties = new Set([\n \"color\",\n \"backgroundColor\",\n \"outlineColor\",\n \"fill\",\n \"stroke\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderRightColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n])\n\nconst supportsWaapi = /*@__PURE__*/ memo(() =>\n Object.hasOwnProperty.call(Element.prototype, \"animate\")\n)\n\nexport function supportsBrowserAnimation<T extends AnyResolvedKeyframe>(\n options: ValueAnimationOptionsWithRenderContext<T>\n) {\n const {\n motionValue,\n name,\n repeatDelay,\n repeatType,\n damping,\n type,\n keyframes,\n } = options\n\n const subject = motionValue?.owner?.current\n\n /**\n * We use this check instead of isHTMLElement() because we explicitly\n * **don't** want elements in different timing contexts (i.e. popups)\n * to be accelerated, as it's not possible to sync these animations\n * properly with those driven from the main window frameloop.\n */\n if (!(subject instanceof HTMLElement)) {\n return false\n }\n\n const { onUpdate, transformTemplate } = motionValue!.owner!.getProps()\n\n return (\n supportsWaapi() &&\n name &&\n /**\n * Force WAAPI for color properties with browser-only color formats\n * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.\n */\n (acceleratedValues.has(name) ||\n (colorProperties.has(name) &&\n hasBrowserOnlyColors(keyframes))) &&\n (name !== \"transform\" || !transformTemplate) &&\n /**\n * If we're outputting values to onUpdate then we can't use WAAPI as there's\n * no way to read the value from WAAPI every frame.\n */\n !onUpdate &&\n !repeatDelay &&\n repeatType !== \"mirror\" &&\n damping !== 0 &&\n type !== \"inertia\"\n )\n}\n"],"names":[],"mappings":";;;;AAQA,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC5B,OAAO;IACP,iBAAiB;IACjB,cAAc;IACd,MAAM;IACN,QAAQ;IACR,aAAa;IACb,gBAAgB;IAChB,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;AACpB,CAAA,CAAC;AAEF,MAAM,aAAa,iBAAiB,IAAI,CAAC,MACrC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAC3D;AAEK,SAAU,wBAAwB,CACpC,OAAkD,EAAA;AAElD,IAAA,MAAM,EACF,WAAW,EACX,IAAI,EACJ,WAAW,EACX,UAAU,EACV,OAAO,EACP,IAAI,EACJ,SAAS,GACZ,GAAG,OAAO;AAEX,IAAA,MAAM,OAAO,GAAG,WAAW,EAAE,KAAK,EAAE,OAAO;AAE3C;;;;;AAKG;AACH,IAAA,IAAI,EAAE,OAAO,YAAY,WAAW,CAAC,EAAE;AACnC,QAAA,OAAO,KAAK;IAChB;AAEA,IAAA,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GAAG,WAAY,CAAC,KAAM,CAAC,QAAQ,EAAE;IAEtE,QACI,aAAa,EAAE;QACf,IAAI;AACJ;;;AAGG;AACH,SAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC;AACxB,aAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC;AACtB,gBAAA,oBAAoB,CAAC,SAAS,CAAC,CAAC,CAAC;AACzC,SAAC,IAAI,KAAK,WAAW,IAAI,CAAC,iBAAiB,CAAC;AAC5C;;;AAGG;AACH,QAAA,CAAC,QAAQ;AACT,QAAA,CAAC,WAAW;AACZ,QAAA,UAAU,KAAK,QAAQ;AACvB,QAAA,OAAO,KAAK,CAAC;QACb,IAAI,KAAK,SAAS;AAE1B;;;;"}
@@ -0,0 +1,7 @@
import type { TSESLint } from '@typescript-eslint/utils';
export type Options = [];
export type MessageIds = 'useTopLevelQualifier';
declare const _default: TSESLint.RuleModule<"useTopLevelQualifier", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"creative-commons.js","sources":["../../../src/icons/creative-commons.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CreativeCommons\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNMTAgOS4zYTIuOCAyLjggMCAwIDAtMy41IDEgMy4xIDMuMSAwIDAgMCAwIDMuNCAyLjcgMi43IDAgMCAwIDMuNSAxIiAvPgogIDxwYXRoIGQ9Ik0xNyA5LjNhMi44IDIuOCAwIDAgMC0zLjUgMSAzLjEgMy4xIDAgMCAwIDAgMy40IDIuNyAyLjcgMCAwIDAgMy41IDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/creative-commons\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 CreativeCommons = createLucideIcon('CreativeCommons', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n [\n 'path',\n { d: 'M10 9.3a2.8 2.8 0 0 0-3.5 1 3.1 3.1 0 0 0 0 3.4 2.7 2.7 0 0 0 3.5 1', key: '1ss3eq' },\n ],\n [\n 'path',\n { d: 'M17 9.3a2.8 2.8 0 0 0-3.5 1 3.1 3.1 0 0 0 0 3.4 2.7 2.7 0 0 0 3.5 1', key: '1od56t' },\n ],\n]);\n\nexport default CreativeCommons;\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,CAAkB,iBAAiB,i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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,CAAuE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC5F,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,157 @@
# eventsource-parser
[![npm version](https://img.shields.io/npm/v/eventsource-parser.svg?style=flat-square)](https://www.npmjs.com/package/eventsource-parser)[![npm bundle size](https://img.shields.io/bundlephobia/minzip/eventsource-parser?style=flat-square)](https://bundlephobia.com/result?p=eventsource-parser)[![npm weekly downloads](https://img.shields.io/npm/dw/eventsource-parser.svg?style=flat-square)](https://www.npmjs.com/package/eventsource-parser)
A streaming parser for [server-sent events/eventsource](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events), without any assumptions about how the actual stream of data is retrieved. It is intended to be a building block for [clients](https://github.com/rexxars/eventsource-client) and polyfills in javascript environments such as browsers, node.js and deno.
If you are looking for a modern client implementation, see [eventsource-client](https://github.com/rexxars/eventsource-client).
You create an instance of the parser, and _feed_ it chunks of data - partial or complete, and the parse emits parsed messages once it receives a complete message. A [TransformStream variant](#stream-usage) is also available for environments that support it (modern browsers, Node 18 and higher).
Other modules in the EventSource family:
- [eventsource-client](https://github.com/rexxars/eventsource-client): modern, feature rich eventsource client for browsers, node.js, bun, deno and other modern JavaScript environments.
- [eventsource-encoder](https://github.com/rexxars/eventsource-encoder): encodes messages in the EventSource/Server-Sent Events format.
- [eventsource](https://github.com/eventsource/eventsource): Node.js polyfill for the WhatWG EventSource API.
> [!NOTE]
> Migrating from eventsource-parser 1.x/2.x? See the [migration guide](./MIGRATE-v3.md).
## Installation
```bash
npm install --save eventsource-parser
```
## Usage
```ts
import {createParser, type EventSourceMessage} from 'eventsource-parser'
function onEvent(event: EventSourceMessage) {
console.log('Received event!')
console.log('id: %s', event.id || '<none>')
console.log('event: %s', event.event || '<none>')
console.log('data: %s', event.data)
}
const parser = createParser({onEvent})
const sseStream = getSomeReadableStream()
for await (const chunk of sseStream) {
parser.feed(chunk)
}
// If you want to re-use the parser for a new stream of events, make sure to reset it!
parser.reset()
console.log('Done!')
```
### Retry intervals
If the server sends a `retry` field in the event stream, the parser will call any `onRetry` callback specified to the `createParser` function:
```ts
const parser = createParser({
onRetry(retryInterval) {
console.log('Server requested retry interval of %dms', retryInterval)
},
onEvent(event) {
// …
},
})
```
### Parse errors
If the parser encounters an error while parsing, it will call any `onError` callback provided to the `createParser` function:
```ts
import {type ParseError} from 'eventsource-parser'
const parser = createParser({
onError(error: ParseError) {
console.error('Error parsing event:', error)
if (error.type === 'invalid-field') {
console.error('Field name:', error.field)
console.error('Field value:', error.value)
console.error('Line:', error.line)
} else if (error.type === 'invalid-retry') {
console.error('Invalid retry interval:', error.value)
}
},
onEvent(event) {
// …
},
})
```
Note that `invalid-field` errors will usually be called for any invalid data - not only data shaped as `field: value`. This is because the EventSource specification says to treat anything prior to a `:` as the field name. Use the `error.line` property to get the full line that caused the error.
> [!NOTE]
> When encountering the end of a stream, calling `.reset({consume: true})` on the parser to flush any remaining data and reset the parser state. This will trigger the `onError` callback if the pending data is not a valid event.
### Comments
The parser will ignore comments (lines starting with `:`) by default. If you want to handle comments, you can provide an `onComment` callback to the `createParser` function:
```ts
const parser = createParser({
onComment(comment) {
console.log('Received comment:', comment)
},
onEvent(event) {
// …
},
})
```
> [!NOTE]
> Leading whitespace is not stripped from comments, eg `: comment` will give ` comment` as the comment value, not `comment` (note the leading space).
### Limiting buffered memory (`maxBufferSize`)
By default the parser buffers data indefinitely until a server completes an event. A server (or proxy) that never terminates a line, or that keeps appending `data:` lines without ever sending a blank line to dispatch the event, can therefore grow the parser's buffers without bound.
Pass a `maxBufferSize` (in characters) to `createParser` to cap this. If the combined size of the pending line buffer and the in-progress event's data buffer exceeds the limit, the parser emits a `ParseError` with `type: 'max-buffer-size-exceeded'` and becomes terminated: subsequent calls to `feed()` will throw until `reset()` is called.
```ts
const parser = createParser({
maxBufferSize: 1024 * 1024, // 1 MB
onEvent(event) {
// …
},
onError(error) {
if (error.type === 'max-buffer-size-exceeded') {
// Stream peer is misbehaving — typically you'd close the connection.
}
},
})
```
The same option is available on the [stream variant](#stream-usage); the stream is always errored when this limit is exceeded, regardless of the `onError` setting (since the underlying parser is unrecoverable without a `reset()`).
## Stream usage
```ts
import {EventSourceParserStream} from 'eventsource-parser/stream'
const eventStream = response.body
.pipeThrough(new TextDecoderStream())
.pipeThrough(new EventSourceParserStream())
```
The stream constructor accepts a subset of the `createParser` options (`onComment`, `onRetry`, `maxBufferSize`) plus an `onError` that can either be a function or set to `'terminate'` to error the stream on parse errors. Events are delivered through the stream itself rather than via an `onEvent` callback:
```ts
new EventSourceParserStream({
maxBufferSize: 1024 * 1024,
onError: 'terminate',
})
```
Note that the TransformStream is exposed under a separate export (`eventsource-parser/stream`), in order to maximize compatibility with environments that do not have the `TransformStream` constructor available.
## License
MIT © [Espen Hovlandsdal](https://espen.codes/)
@@ -0,0 +1,27 @@
// src/use-effect-event.tsx
import { useLayoutEffect } from "@radix-ui/react-use-layout-effect";
import * as React from "react";
var useReactEffectEvent = React[" useEffectEvent ".trim().toString()];
var useReactInsertionEffect = React[" useInsertionEffect ".trim().toString()];
function useEffectEvent(callback) {
if (typeof useReactEffectEvent === "function") {
return useReactEffectEvent(callback);
}
const ref = React.useRef(() => {
throw new Error("Cannot call an event handler while rendering.");
});
if (typeof useReactInsertionEffect === "function") {
useReactInsertionEffect(() => {
ref.current = callback;
});
} else {
useLayoutEffect(() => {
ref.current = callback;
});
}
return React.useMemo(() => ((...args) => ref.current?.(...args)), []);
}
export {
useEffectEvent
};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,90 @@
'use strict'
const test = require('tape')
const fastURI = require('..')
test('RFC 3986', (t) => {
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/foo', secure: true }),
'http://example.com/foo', 'http://example.com/foo')
// A. If the input buffer begins with a prefix of "../" or "./",
// then remove that prefix from the input buffer; otherwise,
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '../', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: './', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '../../', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '././', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: './../', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '.././', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '../foo', secure: true }),
'http://example.com/foo', 'http://example.com/foo')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: './foo', secure: true }),
'http://example.com/foo', 'http://example.com/foo')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '../../foo', secure: true }),
'http://example.com/foo', 'http://example.com/foo')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '././foo', secure: true }),
'http://example.com/foo', 'http://example.com/foo')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: './../foo', secure: true }),
'http://example.com/foo', 'http://example.com/foo')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '.././foo', secure: true }),
'http://example.com/foo', 'http://example.com/foo')
// B. if the input buffer begins with a prefix of "/./" or "/.",
// where "." is a complete path segment, then replace that
// prefix with "/" in the input buffer; otherwise,
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/./', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/.', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/./foo', secure: true }),
'http://example.com/foo', 'http://example.com/foo')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/.././foo', secure: true }),
'http://example.com/foo', 'http://example.com/foo')
// C. if the input buffer begins with a prefix of "/../" or "/..",
// where ".." is a complete path segment, then replace that
// prefix with "/" in the input buffer and remove the last
// segment and its preceding "/" (if any) from the output
// buffer; otherwise,
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/../', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/..', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/../foo', secure: true }),
'http://example.com/foo', 'http://example.com/foo')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/foo/..', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/foo/bar/..', secure: true }),
'http://example.com/foo/', 'http://example.com/foo/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/foo/../bar/..', secure: true }),
'http://example.com/', 'http://example.com/')
// D. if the input buffer consists only of "." or "..", then remove
// that from the input buffer; otherwise,
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/.', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '/..', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '.', secure: true }),
'http://example.com/', 'http://example.com/')
t.strictEqual(fastURI.serialize({ scheme: 'http', host: 'example.com', path: '..', secure: true }),
'http://example.com/', 'http://example.com/')
t.end()
})
@@ -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 MailPlus = createLucideIcon("MailPlus", [
["path", { d: "M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8", key: "12jkf8" }],
["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }],
["path", { d: "M19 16v6", key: "tddt3s" }],
["path", { d: "M16 19h6", key: "xwg31i" }]
]);
export { MailPlus as default };
//# sourceMappingURL=mail-plus.js.map
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2024_regexp = void 0;
const base_config_1 = require("./base-config");
exports.es2024_regexp = {
libs: [],
variables: [['RegExp', base_config_1.TYPE]],
};
@@ -0,0 +1,314 @@
flf2a$ 3 3 7 0 7 0 64 0
Font Author: ?
More info on font here:
https://web.archive.org/web/20120819044459/http://www.roysac.com/thedrawfonts-tdf.asp
FIGFont created with: http://patorjk.com/figfont-editor
$$@
$$@
$$@@
┬@
│@
o@@
@
@
@@
─┼─┼─@
─┼─┼─@
@@
┌┼┐@
└┼┐@
└┼┘@@
O┬@
┌┘@
┴O@@
┬ @
┌┼─@
└┘ @@
@
@
@@
@
@
@@
@
@
@@
\│/@
─ ─@
/│\@@
@
@
@@
@
@
┘@@
@
───@
@@
@
@
o@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
┌─┐@
┌┘@
o @@
┌─┐@
│└┘@
└──@@
╔═╗@
╠═╣@
╩ ╩@@
╔╗ @
╠╩╗@
╚═╝@@
╔═╗@
║ @
╚═╝@@
╔╦╗@
║║@
═╩╝@@
╔═╗@
║╣ @
╚═╝@@
╔═╗@
╠╣ @
╚ @@
╔═╗@
║ ╦@
╚═╝@@
╦ ╦@
╠═╣@
╩ ╩@@
╦@
║@
╩@@
╦@
║@
╚╝@@
╦╔═@
╠╩╗@
╩ ╩@@
╦ @
║ @
╩═╝@@
╔╦╗@
║║║@
╩ ╩@@
╔╗╔@
║║║@
╝╚╝@@
╔═╗@
║ ║@
╚═╝@@
╔═╗@
╠═╝@
╩ @@
╔═╗ @
║═╬╗@
╚═╝╚@@
╦═╗@
╠╦╝@
╩╚═@@
╔═╗@
╚═╗@
╚═╝@@
╔╦╗@
║ @
╩ @@
╦ ╦@
║ ║@
╚═╝@@
╦ ╦@
╚╗╔╝@
╚╝ @@
╦ ╦@
║║║@
╚╩╝@@
═╗ ╦@
╔╩╦╝@
╩ ╚═@@
╦ ╦@
╚╦╝@
╩ @@
╔═╗@
╔═╝@
╚═╝@@
┌─@
│ @
└─@@
@
@
@@
─┐@
│@
─┘@@
/\@
@
@@
@
@
────@@
@
@
@@
┌─┐@
├─┤@
┴ ┴@@
┌┐ @
├┴┐@
└─┘@@
┌─┐@
│ @
└─┘@@
┌┬┐@
││@
─┴┘@@
┌─┐@
├┤ @
└─┘@@
┌─┐@
├┤ @
└ @@
┌─┐@
│ ┬@
└─┘@@
┬ ┬@
├─┤@
┴ ┴@@
┬@
│@
┴@@
┬@
│@
└┘@@
┬┌─@
├┴┐@
┴ ┴@@
┬ @
│ @
┴─┘@@
┌┬┐@
│││@
┴ ┴@@
┌┐┌@
│││@
┘└┘@@
┌─┐@
│ │@
└─┘@@
┌─┐@
├─┘@
┴ @@
┌─┐ @
│─┼┐@
└─┘└@@
┬─┐@
├┬┘@
┴└─@@
┌─┐@
└─┐@
└─┘@@
┌┬┐@
│ @
┴ @@
┬ ┬@
│ │@
└─┘@@
┬ ┬@
└┐┌┘@
└┘ @@
┬ ┬@
│││@
└┴┘@@
─┐ ┬@
┌┴┬┘@
┴ └─@@
┬ ┬@
└┬┘@
┴ @@
┌─┐@
┌─┘@
└─┘@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@
@
@@
@@ -0,0 +1,7 @@
"use client";
import { createContext } from 'react';
const LazyContext = createContext({ strict: false });
export { LazyContext };
//# sourceMappingURL=LazyContext.mjs.map
@@ -0,0 +1,631 @@
flf2a$ 6 5 23 -1 18
Slider font by LESTER
=======================
-> Conversion to FigLet font by MEPH. (Part of ASCII Editor Service Pack I)
(http://studenten.freepage.de/meph/ascii/ascii/editor/_index.htm)
-> Defined: ASCII code alphabet
-> Uppercase characters only.
.-~~-.
(_^..^_)
Lester||||AMC - Anthony Cucchiara
*Mythos Online : Internet Magazine of Lovecraftian Horror - Dead Alice*
http://www.fortunecity.com/victorian/redlion/157/deadal.htm
*Visit my web page ANSI/ASCII/Fonts*
http://members.aol.com/lester5374/
$@
$@
$@
$@
$@
$@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
.'. @
.''```. @
.' `. @
.' `. @
@@
____ @
| ~. @
|____.'_ @
| ~. @
|_______.' @
@@
______ @
.~ ~. @
| @
| @
`.______.' @
@@
@
|``````. @
| | @
| | @
|......' @
@@
____ @
| @
|______ @
| @
|___________ @
@@
___________ @
| @
|______ @
| @
| @
@@
_____ @
.-~ ~. @
: @
: _____ @
`-._____.'| @
@@
@
| | @
|_________| @
| | @
| | @
@@
@
| @
| @
| @
| @
@@
@
| @
| @
. | @
`..____..' @
@@
@
| ..'' @
|..'' @
|``.. @
| ``.. @
@@
@
| @
| @
| @
|_______ @
@@
@
.'. .`. @
.' ` `. @
.' `. @
.' `. @
@@
@
|.. | @
| ``.. | @
| ``.. | @
| ``| @
@@
______ @
.~ ~. @
| | @
| | @
`.______.' @
@@
@
|`````````, @
|''''''''' @
| @
| @
@@
______ @
.~ ~. @
| | @
| ._ | @
`.______~-_ @
@@
@
|`````````, @
|'''|''''' @
| `. @
| `. @
@@
@
..'''' @
.'' @
..' @
....'' @
@@
@
`````|````` @
| @
| @
| @
@@
@
| | @
| | @
| | @
`._______.' @
@@
@
`. .' @
`. .' @
`. .' @
`.' @
@@
@
`. .' @
`. .' @
`. . .' @
`.' `.' @
@@
@
``.. ..'' @
``..'' @
..'`.. @
..'' ``.. @
@@
@
``.. ..'' @
``.'' @
| @
| @
@@
@
`````````:' @
..' @
..'' @
.:,,,,,,,,, @
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
.'. @
.''```. @
.' `. @
.' `. @
@@
____ @
| ~. @
|____.'_ @
| ~. @
|_______.' @
@@
______ @
.~ ~. @
| @
| @
`.______.' @
@@
@
|``````. @
| | @
| | @
|......' @
@@
____ @
| @
|______ @
| @
|___________ @
@@
___________ @
| @
|______ @
| @
| @
@@
_____ @
.-~ ~. @
: @
: _____ @
`-._____.'| @
@@
@
| | @
|_________| @
| | @
| | @
@@
@
| @
| @
| @
| @
@@
@
| @
| @
. | @
`..____..' @
@@
@
| ..'' @
|..'' @
|``.. @
| ``.. @
@@
@
| @
| @
| @
|_______ @
@@
@
.'. .`. @
.' ` `. @
.' `. @
.' `. @
@@
@
|.. | @
| ``.. | @
| ``.. | @
| ``| @
@@
______ @
.~ ~. @
| | @
| | @
`.______.' @
@@
@
|`````````, @
|''''''''' @
| @
| @
@@
______ @
.~ ~. @
| | @
| ._ | @
`.______~-_ @
@@
@
|`````````, @
|'''|''''' @
| `. @
| `. @
@@
@
..'''' @
.'' @
..' @
....'' @
@@
@
`````|````` @
| @
| @
| @
@@
@
| | @
| | @
| | @
`._______.' @
@@
@
`. .' @
`. .' @
`. .' @
`.' @
@@
@
`. .' @
`. .' @
`. . .' @
`.' `.' @
@@
@
``.. ..'' @
``..'' @
..'`.. @
..'' ``.. @
@@
@
``.. ..'' @
``.'' @
| @
| @
@@
@
`````````:' @
..' @
..'' @
.:,,,,,,,,, @
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@@ -0,0 +1,47 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `pnpm run generate-configs`
module.exports = {
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
rules: {
'@typescript-eslint/ban-ts-comment': [
'error',
{ minimumDescriptionLength: 10 },
],
'no-array-constructor': 'off',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-dynamic-delete': 'error',
'@typescript-eslint/no-empty-object-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-invalid-void-type': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-unsafe-function-type': 'error',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-wrapper-object-types': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/prefer-literal-enum-member': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
'@typescript-eslint/unified-signatures': 'error',
},
};
@@ -0,0 +1,70 @@
{
"name": "iconv-lite",
"description": "Convert character encodings in pure javascript.",
"version": "0.7.2",
"license": "MIT",
"keywords": [
"iconv",
"convert",
"charset",
"icu"
],
"author": "Alexander Shtuchkin <ashtuchkin@gmail.com>",
"main": "./lib/index.js",
"typings": "./lib/index.d.ts",
"homepage": "https://github.com/pillarjs/iconv-lite",
"bugs": "https://github.com/pillarjs/iconv-lite/issues",
"files": [
"lib/",
"encodings/",
"types/"
],
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
},
"repository": {
"type": "git",
"url": "https://github.com/pillarjs/iconv-lite.git"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"lint": "eslint",
"lint:fix": "eslint --fix",
"test": "mocha --reporter spec --check-leaks --grep .",
"test:ci": "nyc --exclude test --reporter=lcovonly --reporter=text npm test",
"test:cov": "nyc --exclude test --reporter=html --reporter=text npm test",
"test:performance": "node --allow-natives-syntax performance/index.js",
"test:tap": "mocha --reporter tap --check-leaks --grep .",
"test:typescript": "tsc && attw --pack",
"test:webpack": "npm pack && mv iconv-lite-*.tgz test/webpack/iconv-lite.tgz && cd test/webpack && npm install && npm run test && rm iconv-lite.tgz",
"typegen": "node generation/gen-typings.js"
},
"browser": {
"stream": false
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"@stylistic/eslint-plugin": "^5.1.0",
"@stylistic/eslint-plugin-js": "^4.1.0",
"@types/node": "^24.0.12",
"async": "^3.2.0",
"bench-node": "^0.10.0",
"eslint": "^9.0.0",
"errto": "^0.2.1",
"expect-type": "^1.2.0",
"iconv": "^2.3.5",
"mocha": "^6.2.2",
"neostandard": "^0.12.0",
"nyc": "^14.1.1",
"request": "^2.88.2",
"semver": "^6.3.0",
"typescript": "~5.9.2",
"unorm": "^1.6.0"
},
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
}
}