diff --git a/.eslintrc.json b/.eslintrc.json index 910542b8ae..d84d62f01f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -14,21 +14,12 @@ } }, "ignorePatterns": ["website/**/*", "*.js"], - "rules": { - "arrow-parens": ["error", "as-needed"], - "no-use-before-define": ["error", { "functions": false, "classes": false }], - "prettier/prettier": "error" - }, "overrides": [ - { - "files": ["test/helpers/**/*.js", "test/unit/**/*.js"], - "plugins": ["prettier"] - }, { "files": ["**/*.ts"], "extends": ["plugin:@typescript-eslint/recommended"], "excludedFiles": "*.d.ts", - "plugins": ["prettier", "@typescript-eslint"], + "plugins": ["@typescript-eslint"], "rules": { "@typescript-eslint/consistent-type-imports": "error", "@typescript-eslint/ban-ts-comment": "off", diff --git a/blots/block.ts b/blots/block.ts index c95248a778..a1901a3c2b 100644 --- a/blots/block.ts +++ b/blots/block.ts @@ -165,13 +165,13 @@ class BlockEmbed extends EmbedBlot { } const lines = value.split('\n'); const text = lines.pop(); - const blocks = lines.map(line => { + const blocks = lines.map((line) => { const block = this.scroll.create(Block.blotName); block.insertAt(0, line); return block; }); const ref = this.split(index); - blocks.forEach(block => { + blocks.forEach((block) => { // @ts-expect-error Fix me later this.parent.insertBefore(block, ref); }); diff --git a/blots/cursor.ts b/blots/cursor.ts index 0f0e332286..e4eec1f008 100644 --- a/blots/cursor.ts +++ b/blots/cursor.ts @@ -152,7 +152,7 @@ class Cursor extends EmbedBlot { update(mutations: MutationRecord[], context: Record) { if ( - mutations.some(mutation => { + mutations.some((mutation) => { return ( mutation.type === 'characterData' && mutation.target === this.textNode ); diff --git a/blots/embed.ts b/blots/embed.ts index 9404249194..a624982b07 100644 --- a/blots/embed.ts +++ b/blots/embed.ts @@ -20,7 +20,7 @@ class Embed extends EmbedBlot { super(scroll, node); this.contentNode = document.createElement('span'); this.contentNode.setAttribute('contenteditable', 'false'); - Array.from(this.domNode.childNodes).forEach(childNode => { + Array.from(this.domNode.childNodes).forEach((childNode) => { this.contentNode.appendChild(childNode); }); this.leftGuard = document.createTextNode(GUARD_TEXT); @@ -78,7 +78,7 @@ class Embed extends EmbedBlot { } update(mutations: MutationRecord[], context: Record) { - mutations.forEach(mutation => { + mutations.forEach((mutation) => { if ( mutation.type === 'characterData' && (mutation.target === this.leftGuard || diff --git a/blots/scroll.ts b/blots/scroll.ts index 4df0045794..a84dadd093 100644 --- a/blots/scroll.ts +++ b/blots/scroll.ts @@ -49,7 +49,7 @@ class Scroll extends ScrollBlot { this.batch = false; this.optimize(); this.enable(); - this.domNode.addEventListener('dragstart', e => this.handleDragStart(e)); + this.domNode.addEventListener('dragstart', (e) => this.handleDragStart(e)); } batchStart() { @@ -165,7 +165,7 @@ class Scroll extends ScrollBlot { const formats = bubbleFormats(this.line(index)[0]); const attributes = AttributeMap.diff(formats, first.attributes) || {}; - Object.keys(attributes).forEach(name => { + Object.keys(attributes).forEach((name) => { this.formatAt(lineEndIndex - 1, 1, name, attributes[name]); }); @@ -179,7 +179,7 @@ class Scroll extends ScrollBlot { refBlotOffset = 0; } - renderBlocks.forEach(renderBlock => { + renderBlocks.forEach((renderBlock) => { if (renderBlock.type === 'block') { const block = this.createBlock( renderBlock.attributes, @@ -192,7 +192,7 @@ class Scroll extends ScrollBlot { renderBlock.value, ) as EmbedBlot; this.insertBefore(blockEmbed, refBlot || undefined); - Object.keys(renderBlock.attributes).forEach(name => { + Object.keys(renderBlock.attributes).forEach((name) => { blockEmbed.format(name, renderBlock.attributes[name]); }); } @@ -324,12 +324,12 @@ class Scroll extends ScrollBlot { const renderBlocks: RenderBlock[] = []; let currentBlockDelta = new Delta(); - delta.forEach(op => { + delta.forEach((op) => { const insert = op?.insert; if (!insert) return; if (typeof insert === 'string') { const splitted = insert.split('\n'); - splitted.slice(0, -1).forEach(text => { + splitted.slice(0, -1).forEach((text) => { currentBlockDelta.insert(text, op.attributes); renderBlocks.push({ type: 'block', @@ -433,7 +433,7 @@ function insertInlineContents( } } } - Object.keys(attributes).forEach(key => { + Object.keys(attributes).forEach((key) => { parent.formatAt(index, length, key, attributes[key]); }); return index + length; diff --git a/blots/text.ts b/blots/text.ts index 00ef385e9c..e00fd16ade 100644 --- a/blots/text.ts +++ b/blots/text.ts @@ -3,7 +3,7 @@ import { TextBlot } from 'parchment'; class Text extends TextBlot {} function escapeText(text: string) { - return text.replace(/[&<>"']/g, s => { + return text.replace(/[&<>"']/g, (s) => { // https://lodash.com/docs#escape const entityMap: Record = { '&': '&', diff --git a/core/composition.ts b/core/composition.ts index ff8f16b5df..73c9904455 100644 --- a/core/composition.ts +++ b/core/composition.ts @@ -5,18 +5,21 @@ import Emitter from './emitter'; class Composition { isComposing = false; - constructor(private scroll: Scroll, private emitter: Emitter) { + constructor( + private scroll: Scroll, + private emitter: Emitter, + ) { this.setupListeners(); } private setupListeners() { - this.scroll.domNode.addEventListener('compositionstart', event => { + this.scroll.domNode.addEventListener('compositionstart', (event) => { if (!this.isComposing) { this.handleCompositionStart(event); } }); - this.scroll.domNode.addEventListener('compositionend', event => { + this.scroll.domNode.addEventListener('compositionend', (event) => { if (this.isComposing) { this.handleCompositionEnd(event); } diff --git a/core/editor.ts b/core/editor.ts index 3cfa8d3473..20ffb9f3d2 100644 --- a/core/editor.ts +++ b/core/editor.ts @@ -102,7 +102,7 @@ class Editor { this.scroll.updateEmbedAt(index, key, op.retain[key]); } } - Object.keys(attributes).forEach(name => { + Object.keys(attributes).forEach((name) => { this.scroll.formatAt(index, length, name, attributes[name]); }); const prependedLength = isImplicitNewlinePrepended ? 1 : 0; @@ -135,8 +135,8 @@ class Editor { formats: Record = {}, ): Delta { this.scroll.update(); - Object.keys(formats).forEach(format => { - this.scroll.lines(index, Math.max(length, 1)).forEach(line => { + Object.keys(formats).forEach((format) => { + this.scroll.lines(index, Math.max(length, 1)).forEach((line) => { line.format(format, formats[format]); }); }); @@ -150,7 +150,7 @@ class Editor { length: number, formats: Record = {}, ): Delta { - Object.keys(formats).forEach(format => { + Object.keys(formats).forEach((format) => { this.scroll.formatAt(index, length, format, formats[format]); }); const delta = new Delta().retain(index).retain(length, cloneDeep(formats)); @@ -171,7 +171,7 @@ class Editor { let lines: (Block | BlockEmbed)[] = []; let leaves: LeafBlot[] = []; if (length === 0) { - this.scroll.path(index).forEach(path => { + this.scroll.path(index).forEach((path) => { const [blot] = path; if (blot instanceof Block) { lines.push(blot); @@ -183,7 +183,7 @@ class Editor { lines = this.scroll.lines(index, length); leaves = this.scroll.descendants(LeafBlot, index, length); } - const [lineFormats, leafFormats] = [lines, leaves].map(blots => { + const [lineFormats, leafFormats] = [lines, leaves].map((blots) => { const blot = blots.shift(); if (blot == null) return {}; let formats = bubbleFormats(blot); @@ -212,8 +212,8 @@ class Editor { getText(index: number, length: number): string { return this.getContents(index, length) - .filter(op => typeof op.insert === 'string') - .map(op => op.insert) + .filter((op) => typeof op.insert === 'string') + .map((op) => op.insert) .join(''); } @@ -236,7 +236,7 @@ class Editor { ): Delta { text = text.replace(/\r\n/g, '\n').replace(/\r/g, '\n'); this.scroll.insertAt(index, text); - Object.keys(formats).forEach(format => { + Object.keys(formats).forEach((format) => { this.scroll.formatAt(index, text.length, format, formats[format]); }); return this.update( @@ -415,23 +415,26 @@ function combineFormats( formats: Record, combined: Record, ): Record { - return Object.keys(combined).reduce((merged, name) => { - if (formats[name] == null) return merged; - const combinedValue = combined[name]; - if (combinedValue === formats[name]) { - merged[name] = combinedValue; - } else if (Array.isArray(combinedValue)) { - if (combinedValue.indexOf(formats[name]) < 0) { - merged[name] = combinedValue.concat([formats[name]]); - } else { - // If style already exists, don't add to an array, but don't lose other styles + return Object.keys(combined).reduce( + (merged, name) => { + if (formats[name] == null) return merged; + const combinedValue = combined[name]; + if (combinedValue === formats[name]) { merged[name] = combinedValue; + } else if (Array.isArray(combinedValue)) { + if (combinedValue.indexOf(formats[name]) < 0) { + merged[name] = combinedValue.concat([formats[name]]); + } else { + // If style already exists, don't add to an array, but don't lose other styles + merged[name] = combinedValue; + } + } else { + merged[name] = [combinedValue, formats[name]]; } - } else { - merged[name] = [combinedValue, formats[name]]; - } - return merged; - }, {} as Record); + return merged; + }, + {} as Record, + ); } function getListType(type: string | undefined) { @@ -462,7 +465,7 @@ function shiftRange({ index, length }: Range, amount: number) { function splitOpLines(ops: Op[]) { const split: Op[] = []; - ops.forEach(op => { + ops.forEach((op) => { if (typeof op.insert === 'string') { const lines = op.insert.split('\n'); lines.forEach((line, index) => { diff --git a/core/emitter.ts b/core/emitter.ts index a0e650e24f..80cb1b9d34 100644 --- a/core/emitter.ts +++ b/core/emitter.ts @@ -5,9 +5,9 @@ import logger from './logger'; const debug = logger('quill:events'); const EVENTS = ['selectionchange', 'mousedown', 'mouseup', 'click']; -EVENTS.forEach(eventName => { +EVENTS.forEach((eventName) => { document.addEventListener(eventName, (...args) => { - Array.from(document.querySelectorAll('.ql-container')).forEach(node => { + Array.from(document.querySelectorAll('.ql-container')).forEach((node) => { const quill = instances.get(node); if (quill && quill.emitter) { quill.emitter.handleDOM(...args); @@ -71,6 +71,6 @@ class Emitter extends EventEmitter { } export type EmitterSource = - typeof Emitter.sources[keyof typeof Emitter.sources]; + (typeof Emitter.sources)[keyof typeof Emitter.sources]; export default Emitter; diff --git a/core/logger.ts b/core/logger.ts index 09dbf8ea4c..8140dca83e 100644 --- a/core/logger.ts +++ b/core/logger.ts @@ -1,5 +1,5 @@ const levels = ['error', 'warn', 'log', 'info'] as const; -export type DebugLevel = typeof levels[number]; +export type DebugLevel = (typeof levels)[number]; let level: DebugLevel | false = 'warn'; function debug(method: DebugLevel, ...args: unknown[]) { @@ -13,10 +13,13 @@ function debug(method: DebugLevel, ...args: unknown[]) { function namespace( ns: string, ): Record void> { - return levels.reduce((logger, method) => { - logger[method] = debug.bind(console, method, ns); - return logger; - }, {} as Record void>); + return levels.reduce( + (logger, method) => { + logger[method] = debug.bind(console, method, ns); + return logger; + }, + {} as Record void>, + ); } namespace.level = (newLevel: DebugLevel | false) => { diff --git a/core/module.ts b/core/module.ts index f853efda16..3dcfce54e0 100644 --- a/core/module.ts +++ b/core/module.ts @@ -3,7 +3,10 @@ import type Quill from './quill'; abstract class Module { static DEFAULTS = {}; - constructor(protected quill: Quill, protected options: Partial = {}) {} + constructor( + protected quill: Quill, + protected options: Partial = {}, + ) {} } export default Module; diff --git a/core/quill.ts b/core/quill.ts index 84cdf0597e..089cfd8135 100644 --- a/core/quill.ts +++ b/core/quill.ts @@ -111,7 +111,7 @@ class Quill { // @ts-expect-error this.register(`formats/${name}`, path, target); } else { - Object.keys(path).forEach(key => { + Object.keys(path).forEach((key) => { // @ts-expect-error this.register(key, path[key], target); }); @@ -187,7 +187,7 @@ class Quill { this.uploader = this.theme.addModule('uploader'); this.theme.addModule('input'); this.theme.init(); - this.emitter.on(Emitter.events.EDITOR_CHANGE, type => { + this.emitter.on(Emitter.events.EDITOR_CHANGE, (type) => { if (type === Emitter.events.TEXT_CHANGE) { this.root.classList.toggle('ql-blank', this.editor.isBlank()); } @@ -578,26 +578,31 @@ class Quill { return this.scroll.isEnabled(); } - off(...args: Parameters) { + off(...args: Parameters<(typeof Emitter)['prototype']['off']>) { return this.emitter.off(...args); } on( - event: typeof Emitter['events']['TEXT_CHANGE'], + event: (typeof Emitter)['events']['TEXT_CHANGE'], handler: (delta: Delta, oldContent: Delta, source: EmitterSource) => void, ): Emitter; on( - event: typeof Emitter['events']['SELECTION_CHANGE'], + event: (typeof Emitter)['events']['SELECTION_CHANGE'], handler: (range: Range, oldRange: Range, source: EmitterSource) => void, ): Emitter; // @ts-expect-error on( - event: typeof Emitter['events']['EDITOR_CHANGE'], + event: (typeof Emitter)['events']['EDITOR_CHANGE'], handler: ( ...args: - | [typeof Emitter['events']['TEXT_CHANGE'], Delta, Delta, EmitterSource] | [ - typeof Emitter['events']['SELECTION_CHANGE'], + (typeof Emitter)['events']['TEXT_CHANGE'], + Delta, + Delta, + EmitterSource, + ] + | [ + (typeof Emitter)['events']['SELECTION_CHANGE'], Range, Range, EmitterSource, @@ -605,11 +610,11 @@ class Quill { ) => void, ): Emitter; on(event: string, ...args: unknown[]): Emitter; - on(...args: Parameters): Emitter { + on(...args: Parameters<(typeof Emitter)['prototype']['on']>): Emitter { return this.emitter.on(...args); } - once(...args: Parameters) { + once(...args: Parameters<(typeof Emitter)['prototype']['once']>) { return this.emitter.once(...args); } @@ -751,9 +756,9 @@ function expandConfig( } // @ts-expect-error -- TODO fix this later const themeConfig = cloneDeep(expandedConfig.theme.DEFAULTS); - [themeConfig, expandedConfig].forEach(config => { + [themeConfig, expandedConfig].forEach((config) => { config.modules = config.modules || {}; - Object.keys(config.modules).forEach(module => { + Object.keys(config.modules).forEach((module) => { if (config.modules[module] === true) { config.modules[module] = {}; } @@ -791,7 +796,7 @@ function expandConfig( themeConfig, expandedConfig, ); - (['bounds', 'container'] as const).forEach(key => { + (['bounds', 'container'] as const).forEach((key) => { const selector = expandedConfig[key]; if (typeof selector === 'string') { // @ts-expect-error Handle null case @@ -959,12 +964,12 @@ function shiftRange( let end; // @ts-expect-error -- TODO: add a better type guard around `index` if (index && typeof index.transformPosition === 'function') { - [start, end] = [range.index, range.index + range.length].map(pos => + [start, end] = [range.index, range.index + range.length].map((pos) => // @ts-expect-error -- TODO: add a better type guard around `index` index.transformPosition(pos, source !== Emitter.sources.USER), ); } else { - [start, end] = [range.index, range.index + range.length].map(pos => { + [start, end] = [range.index, range.index + range.length].map((pos) => { // @ts-expect-error -- TODO: add a better type guard around `index` if (pos < index || (pos === index && source === Emitter.sources.USER)) return pos; diff --git a/core/selection.ts b/core/selection.ts index 9bcef6162f..9d37ee9425 100644 --- a/core/selection.ts +++ b/core/selection.ts @@ -30,7 +30,10 @@ export interface Bounds { } class Range { - constructor(public index: number, public length = 0) {} + constructor( + public index: number, + public length = 0, + ) {} } class Selection { @@ -85,7 +88,7 @@ class Selection { ); } const triggeredByTyping = mutations.some( - mutation => + (mutation) => mutation.type === 'characterData' || mutation.type === 'childList' || (mutation.type === 'attributes' && @@ -264,7 +267,7 @@ class Selection { if (!range.native.collapsed) { positions.push([range.end.node, range.end.offset]); } - const indexes = positions.map(position => { + const indexes = positions.map((position) => { const [node, offset] = position; const blot = this.scroll.find(node, true); // @ts-expect-error Fix me later @@ -298,7 +301,7 @@ class Selection { end: { node: nativeRange.endContainer, offset: nativeRange.endOffset }, native: nativeRange, }; - [range.start, range.end].forEach(position => { + [range.start, range.end].forEach((position) => { let { node, offset } = position; while (!(node instanceof Text) && node.childNodes.length > 0) { if (node.childNodes.length > offset) { diff --git a/core/theme.ts b/core/theme.ts index 7a758cd730..0e1d17ed5c 100644 --- a/core/theme.ts +++ b/core/theme.ts @@ -22,10 +22,13 @@ class Theme { modules: ThemeOptions['modules'] = {}; - constructor(protected quill: Quill, protected options: ThemeOptions) {} + constructor( + protected quill: Quill, + protected options: ThemeOptions, + ) {} init() { - Object.keys(this.options.modules).forEach(name => { + Object.keys(this.options.modules).forEach((name) => { if (this.modules[name] == null) { this.addModule(name); } diff --git a/e2e/history.spec.ts b/e2e/history.spec.ts index 04992024d0..5832e55ffe 100644 --- a/e2e/history.spec.ts +++ b/e2e/history.spec.ts @@ -8,7 +8,7 @@ const redo = (page: Page) => page.keyboard.press(`${SHORTKEY}+Shift+z`); const setUserOnly = (page: Page, value: boolean) => page.evaluate( - value => { + (value) => { // @ts-expect-error window.quill.history.options.userOnly = value; }, diff --git a/e2e/pageobjects/EditorPage.ts b/e2e/pageobjects/EditorPage.ts index 02a03d56f2..2f1d5a9721 100644 --- a/e2e/pageobjects/EditorPage.ts +++ b/e2e/pageobjects/EditorPage.ts @@ -66,7 +66,7 @@ export default class EditorPage { } async html(content: string, title = '') { - await this.page.evaluate(html => { + await this.page.evaluate((html) => { // @ts-expect-error const contents = window.quill.clipboard.convert({ html, text: '\n' }); // @ts-expect-error @@ -99,7 +99,7 @@ export default class EditorPage { } async setContents(delta: Op[]) { - await this.page.evaluate(delta => { + await this.page.evaluate((delta) => { // @ts-expect-error window.quill.setContents(delta); }, delta); diff --git a/formats/code.ts b/formats/code.ts index 49946b9242..1131995745 100644 --- a/formats/code.ts +++ b/formats/code.ts @@ -17,7 +17,7 @@ class CodeBlockContainer extends Container { return ( this.children // @ts-expect-error - .map(child => (child.length() <= 1 ? '' : child.domNode.innerText)) + .map((child) => (child.length() <= 1 ? '' : child.domNode.innerText)) .join('\n') .slice(index, index + length) ); diff --git a/formats/color.ts b/formats/color.ts index d9588b39ca..3ee44a1bcf 100644 --- a/formats/color.ts +++ b/formats/color.ts @@ -7,7 +7,7 @@ class ColorAttributor extends StyleAttributor { value = value.replace(/^[^\d]+/, '').replace(/[^\d]+$/, ''); const hex = value .split(',') - .map(component => `00${parseInt(component, 10).toString(16)}`.slice(-2)) + .map((component) => `00${parseInt(component, 10).toString(16)}`.slice(-2)) .join(''); return `#${hex}`; } diff --git a/formats/table.ts b/formats/table.ts index 8422b3d64e..b6a04717bd 100644 --- a/formats/table.ts +++ b/formats/table.ts @@ -86,7 +86,7 @@ class TableRow extends Container { optimize(context: { [key: string]: any }) { super.optimize(context); - this.children.forEach(child => { + this.children.forEach((child) => { if (child.next == null) return; const childFormats = child.formats(); const nextFormats = child.next.formats(); @@ -135,7 +135,7 @@ class TableContainer extends Container { const maxColumns = rows.reduce((max, row) => { return Math.max(row.children.length, max); }, 0); - rows.forEach(row => { + rows.forEach((row) => { new Array(maxColumns - row.children.length).fill(0).forEach(() => { let value; if (row.children.head != null) { @@ -150,14 +150,14 @@ class TableContainer extends Container { } cells(column: number) { - return this.rows().map(row => row.children.at(column)); + return this.rows().map((row) => row.children.at(column)); } deleteColumn(index: number) { // @ts-expect-error const [body] = this.descendant(TableBody) as TableBody[]; if (body == null || body.children.head == null) return; - body.children.forEach(row => { + body.children.forEach((row) => { const cell = row.children.at(index); if (cell != null) { cell.remove(); @@ -169,7 +169,7 @@ class TableContainer extends Container { // @ts-expect-error const [body] = this.descendant(TableBody) as TableBody[]; if (body == null || body.children.head == null) return; - body.children.forEach(row => { + body.children.forEach((row) => { const ref = row.children.at(index); // @ts-expect-error const value = TableCell.formats(row.children.head.domNode); @@ -195,7 +195,7 @@ class TableContainer extends Container { rows() { const body = this.children.head; if (body == null) return []; - return body.children.map(row => row); + return body.children.map((row) => row); } } diff --git a/modules/clipboard.ts b/modules/clipboard.ts index b8e480f440..0698be6acd 100644 --- a/modules/clipboard.ts +++ b/modules/clipboard.ts @@ -77,8 +77,10 @@ class Clipboard extends Module { constructor(quill: Quill, options: Partial) { super(quill, options); - this.quill.root.addEventListener('copy', e => this.onCaptureCopy(e, false)); - this.quill.root.addEventListener('cut', e => this.onCaptureCopy(e, true)); + this.quill.root.addEventListener('copy', (e) => + this.onCaptureCopy(e, false), + ); + this.quill.root.addEventListener('cut', (e) => this.onCaptureCopy(e, true)); this.quill.root.addEventListener('paste', this.onCapturePaste.bind(this)); this.matchers = []; // @ts-expect-error Fix me later @@ -224,7 +226,7 @@ class Clipboard extends Module { prepareMatching(container: Element, nodeMatches: WeakMap) { const elementMatchers: Matcher[] = []; const textMatchers: Matcher[] = []; - this.matchers.forEach(pair => { + this.matchers.forEach((pair) => { const [selector, matcher] = pair; switch (selector) { case Node.TEXT_NODE: @@ -234,7 +236,7 @@ class Clipboard extends Module { elementMatchers.push(matcher); break; default: - Array.from(container.querySelectorAll(selector)).forEach(node => { + Array.from(container.querySelectorAll(selector)).forEach((node) => { if (nodeMatches.has(node)) { const matches = nodeMatches.get(node); matches?.push(matcher); @@ -393,7 +395,7 @@ function matchAttributor(node: HTMLElement, delta: Delta, scroll: ScrollBlot) { attributes .concat(classes) .concat(styles) - .forEach(name => { + .forEach((name) => { let attr = scroll.query(name, Scope.ATTRIBUTE) as Attributor; if (attr != null) { formats[attr.attrName] = attr.value(node); diff --git a/modules/history.ts b/modules/history.ts index a6ff519347..c53ee88599 100644 --- a/modules/history.ts +++ b/modules/history.ts @@ -67,7 +67,7 @@ class History extends Module { ); } - this.quill.root.addEventListener('beforeinput', event => { + this.quill.root.addEventListener('beforeinput', (event) => { if (event.inputType === 'historyUndo') { this.undo(); event.preventDefault(); @@ -181,7 +181,7 @@ function endsWithNewlineChange(scroll: Scroll, delta: Delta) { return typeof lastOp.insert === 'string' && lastOp.insert.endsWith('\n'); } if (lastOp.attributes != null) { - return Object.keys(lastOp.attributes).some(attr => { + return Object.keys(lastOp.attributes).some((attr) => { return scroll.query(attr, Scope.BLOCK) != null; }); } diff --git a/modules/input.ts b/modules/input.ts index e350b1be20..9b521d8282 100644 --- a/modules/input.ts +++ b/modules/input.ts @@ -10,7 +10,7 @@ class Input extends Module { constructor(quill: Quill, options: Record) { super(quill, options); - quill.root.addEventListener('beforeinput', event => { + quill.root.addEventListener('beforeinput', (event) => { this.handleBeforeInput(event); }); diff --git a/modules/keyboard.ts b/modules/keyboard.ts index 04f642178e..d238e49b06 100644 --- a/modules/keyboard.ts +++ b/modules/keyboard.ts @@ -63,7 +63,7 @@ class Keyboard extends Module { static match(evt: KeyboardEvent, binding: BindingObject) { if ( - (['altKey', 'ctrlKey', 'metaKey', 'shiftKey'] as const).some(key => { + (['altKey', 'ctrlKey', 'metaKey', 'shiftKey'] as const).some((key) => { return !!binding[key] !== evt[key] && binding[key] !== null; }) ) { @@ -78,7 +78,7 @@ class Keyboard extends Module { super(quill, options); this.bindings = {}; // @ts-expect-error Fix me later - Object.keys(this.options.bindings).forEach(name => { + Object.keys(this.options.bindings).forEach((name) => { // @ts-expect-error Fix me later if (this.options.bindings[name]) { // @ts-expect-error Fix me later @@ -159,7 +159,7 @@ class Keyboard extends Module { handler = { handler }; } const keys = Array.isArray(binding.key) ? binding.key : [binding.key]; - keys.forEach(key => { + keys.forEach((key) => { const singleBinding = { ...binding, key, @@ -172,12 +172,14 @@ class Keyboard extends Module { } listen() { - this.quill.root.addEventListener('keydown', evt => { + this.quill.root.addEventListener('keydown', (evt) => { if (evt.defaultPrevented || evt.isComposing) return; const bindings = (this.bindings[evt.key] || []).concat( this.bindings[evt.which] || [], ); - const matches = bindings.filter(binding => Keyboard.match(evt, binding)); + const matches = bindings.filter((binding) => + Keyboard.match(evt, binding), + ); if (matches.length === 0) return; // @ts-expect-error const blot = Quill.find(evt.target, true); @@ -207,7 +209,7 @@ class Keyboard extends Module { suffix: suffixText, event: evt, }; - const prevented = matches.some(binding => { + const prevented = matches.some((binding) => { if ( binding.collapsed != null && binding.collapsed !== curContext.collapsed @@ -222,13 +224,13 @@ class Keyboard extends Module { } if (Array.isArray(binding.format)) { // any format is present - if (binding.format.every(name => curContext.format[name] == null)) { + if (binding.format.every((name) => curContext.format[name] == null)) { return false; } } else if (typeof binding.format === 'object') { // all formats must match if ( - !Object.keys(binding.format).every(name => { + !Object.keys(binding.format).every((name) => { // @ts-expect-error Fix me later if (binding.format[name] === true) return curContext.format[name] != null; diff --git a/modules/syntax.ts b/modules/syntax.ts index 95a3c39c29..ff0f88c08a 100644 --- a/modules/syntax.ts +++ b/modules/syntax.ts @@ -103,7 +103,7 @@ class SyntaxCodeBlockContainer extends CodeBlockContainer { format(name: string, value: unknown) { if (name === SyntaxCodeBlock.blotName) { this.forceNext = true; - this.children.forEach(child => { + this.children.forEach((child) => { // @ts-expect-error child.format(name, value); }); @@ -123,9 +123,9 @@ class SyntaxCodeBlockContainer extends CodeBlockContainer { ) { if (this.children.head == null) return; const nodes = Array.from(this.domNode.childNodes).filter( - node => node !== this.uiNode, + (node) => node !== this.uiNode, ); - const text = `${nodes.map(node => node.textContent).join('\n')}\n`; + const text = `${nodes.map((node) => node.textContent).join('\n')}\n`; const language = SyntaxCodeBlock.formats(this.children.head.domNode); if (forced || this.forceNext || this.cachedText !== text) { if (text.trim().length > 0 || this.cachedText == null) { @@ -138,7 +138,7 @@ class SyntaxCodeBlockContainer extends CodeBlockContainer { // Should be all retains if (!retain) return index; if (attributes) { - Object.keys(attributes).forEach(format => { + Object.keys(attributes).forEach((format) => { if ( [SyntaxCodeBlock.blotName, CodeToken.blotName].includes(format) ) { @@ -272,7 +272,7 @@ class Syntax extends Module { blot == null ? this.quill.scroll.descendants(SyntaxCodeBlockContainer) : [blot]; - blots.forEach(container => { + blots.forEach((container) => { container.highlight(this.highlightBlot, force); }); this.quill.update(Quill.sources.SILENT); diff --git a/modules/table.ts b/modules/table.ts index 005031023a..c315ce0858 100644 --- a/modules/table.ts +++ b/modules/table.ts @@ -23,7 +23,7 @@ class Table extends Module { } balanceTables() { - this.quill.scroll.descendants(TableContainer).forEach(table => { + this.quill.scroll.descendants(TableContainer).forEach((table) => { table.balanceCells(); }); } @@ -125,7 +125,7 @@ class Table extends Module { insertTable(rows: number, columns: number) { const range = this.quill.getSelection(); if (range == null) return; - const delta = new Array(rows).fill(0).reduce(memo => { + const delta = new Array(rows).fill(0).reduce((memo) => { const text = new Array(columns).fill('\n').join(''); return memo.insert(text, { table: tableId() }); }, new Delta().retain(range.index)); @@ -138,7 +138,7 @@ class Table extends Module { this.quill.on( Quill.events.SCROLL_OPTIMIZE, (mutations: MutationRecord[]) => { - mutations.some(mutation => { + mutations.some((mutation) => { if ( ['TD', 'TR', 'TBODY', 'TABLE'].includes( (mutation.target as HTMLElement).tagName, diff --git a/modules/tableEmbed.ts b/modules/tableEmbed.ts index 783e1a16a8..eb2f7aa1f3 100644 --- a/modules/tableEmbed.ts +++ b/modules/tableEmbed.ts @@ -99,7 +99,7 @@ const reindexCellIdentities = ( { rows, columns }: { rows: Delta; columns: Delta }, ) => { const reindexedCells: Record = {}; - Object.keys(cells).forEach(identity => { + Object.keys(cells).forEach((identity) => { let [row, column] = parseCellIdentity(identity); // @ts-expect-error Fix me later @@ -127,7 +127,7 @@ export const tableHandler = { columns: new Delta(b.columns || []), }); - Object.keys(b.cells || {}).forEach(identity => { + Object.keys(b.cells || {}).forEach((identity) => { const aCell = cells[identity] || {}; // @ts-expect-error Fix me later const bCell = b.cells[identity]; @@ -171,7 +171,7 @@ export const tableHandler = { columns: bDeltas.columns.transform(aDeltas.columns, !priority), }); - Object.keys(a.cells || {}).forEach(identity => { + Object.keys(a.cells || {}).forEach((identity) => { let [row, column] = parseCellIdentity(identity); // @ts-expect-error Fix me later row = composePosition(rows, row); @@ -219,7 +219,7 @@ export const tableHandler = { rows, columns, }); - Object.keys(cells).forEach(identity => { + Object.keys(cells).forEach((identity) => { const changeCell = cells[identity] || {}; const baseCell = (base.cells || {})[identity] || {}; const content = new Delta(changeCell.content || []).invert( @@ -239,7 +239,7 @@ export const tableHandler = { // Cells may be removed when their row or column is removed // by row/column deltas. We should add them back. - Object.keys(base.cells || {}).forEach(identity => { + Object.keys(base.cells || {}).forEach((identity) => { const [row, column] = parseCellIdentity(identity); if ( composePosition(new Delta(change.rows || []), row) === null || diff --git a/modules/toolbar.ts b/modules/toolbar.ts index 4c6627d8bc..eb7f848392 100644 --- a/modules/toolbar.ts +++ b/modules/toolbar.ts @@ -47,7 +47,7 @@ class Toolbar extends Module { this.controls = []; this.handlers = {}; if (this.options.handlers) { - Object.keys(this.options.handlers).forEach(format => { + Object.keys(this.options.handlers).forEach((format) => { const handler = this.options.handlers?.[format]; if (handler) { this.addHandler(format, handler); @@ -55,7 +55,7 @@ class Toolbar extends Module { }); } Array.from(this.container.querySelectorAll('button, select')).forEach( - input => { + (input) => { // @ts-expect-error this.attach(input); }, @@ -76,7 +76,7 @@ class Toolbar extends Module { } attach(input: HTMLElement) { - let format = Array.from(input.classList).find(className => { + let format = Array.from(input.classList).find((className) => { return className.indexOf('ql-') === 0; }); if (!format) return; @@ -92,7 +92,7 @@ class Toolbar extends Module { return; } const eventName = input.tagName === 'SELECT' ? 'change' : 'click'; - input.addEventListener(eventName, e => { + input.addEventListener(eventName, (e) => { let value; if (input.tagName === 'SELECT') { // @ts-expect-error @@ -146,7 +146,7 @@ class Toolbar extends Module { update(range: Range | null) { const formats = range == null ? {} : this.quill.getFormat(range); - this.controls.forEach(pair => { + this.controls.forEach((pair) => { const [format, input] = pair; if (input.tagName === 'SELECT') { let option: HTMLOptionElement | null = null; @@ -241,7 +241,7 @@ function addSelect( ) { const input = document.createElement('select'); input.classList.add(`ql-${format}`); - values.forEach(value => { + values.forEach((value) => { const option = document.createElement('option'); if (value !== false) { option.setAttribute('value', String(value)); @@ -261,7 +261,7 @@ Toolbar.DEFAULTS = { if (range == null) return; if (range.length === 0) { const formats = this.quill.getFormat(); - Object.keys(formats).forEach(name => { + Object.keys(formats).forEach((name) => { // Clean functionality in existing apps only clean inline formats if (this.quill.scroll.query(name, Scope.INLINE) != null) { this.quill.format(name, false, Quill.sources.USER); diff --git a/modules/uploader.ts b/modules/uploader.ts index 3494010139..e2399cb97d 100644 --- a/modules/uploader.ts +++ b/modules/uploader.ts @@ -14,7 +14,7 @@ class Uploader extends Module { constructor(quill: Quill, options: Partial) { super(quill, options); - quill.root.addEventListener('drop', e => { + quill.root.addEventListener('drop', (e) => { e.preventDefault(); let native: ReturnType | null = null; if (document.caretRangeFromPoint) { @@ -40,7 +40,7 @@ class Uploader extends Module { upload(range: Range, files: FileList | File[]) { const uploads: File[] = []; - Array.from(files).forEach(file => { + Array.from(files).forEach((file) => { if (file && this.options.mimetypes?.includes(file.type)) { uploads.push(file); } @@ -55,17 +55,17 @@ class Uploader extends Module { Uploader.DEFAULTS = { mimetypes: ['image/png', 'image/jpeg'], handler(range: Range, files: File[]) { - const promises = files.map(file => { - return new Promise(resolve => { + const promises = files.map((file) => { + return new Promise((resolve) => { const reader = new FileReader(); - reader.onload = e => { + reader.onload = (e) => { // @ts-expect-error Fix me later resolve(e.target.result); }; reader.readAsDataURL(file); }); }); - Promise.all(promises).then(images => { + Promise.all(promises).then((images) => { const update = images.reduce((delta: Delta, image) => { return delta.insert({ image }); }, new Delta().retain(range.index).delete(range.length)) as Delta; diff --git a/package-lock.json b/package-lock.json index 7e06d65c31..0837ec0afd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,12 +34,12 @@ "babel-loader": "^9.1.2", "babel-plugin-istanbul": "^6.1.1", "css-loader": "^6.8.1", - "eslint": "^8.42.0", - "eslint-config-prettier": "^8.8.0", + "eslint": "^8.47.0", + "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-webpack": "^0.13.2", "eslint-plugin-import": "^2.27.5", "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-prettier": "^5.0.0", "highlight.js": "^9.18.1", "html-loader": "^4.2.0", "http-proxy": "^1.18.0", @@ -48,7 +48,7 @@ "mini-css-extract-plugin": "^2.7.6", "npm-run-all": "^4.1.5", "playwright": "^1.36.0", - "prettier": "^2.7.1", + "prettier": "^3.0.1", "style-loader": "^3.3.3", "stylus": "^0.59.0", "stylus-loader": "^7.1.2", @@ -64,6 +64,14 @@ "npm": ">=8.2.3" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@adobe/css-tools": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.0.1.tgz", @@ -2509,21 +2517,21 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", - "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", - "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.2", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -2544,9 +2552,9 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", "dependencies": { "type-fest": "^0.20.2" }, @@ -2569,9 +2577,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.42.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.42.0.tgz", - "integrity": "sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", + "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -4182,6 +4190,62 @@ "@parcel/core": "^2.6.2" } }, + "node_modules/@pkgr/utils": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.0", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.6.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@pkgr/utils/node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@pkgr/utils/node_modules/open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "dependencies": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@pkgr/utils/node_modules/tslib": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", + "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", + "dev": true + }, "node_modules/@playwright/test": { "version": "1.34.3", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.34.3.tgz", @@ -4596,9 +4660,9 @@ "integrity": "sha512-orGL5LXERPYsLov6CWs3Fh6203+dXzJkR7OnddIr2514Hsecwc8xRpzCapshBbKFImCsvS/mk6+FWiN5LyZJAQ==" }, "node_modules/@types/eslint": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.29.0.tgz", - "integrity": "sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng==", + "version": "8.44.2", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.2.tgz", + "integrity": "sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg==", "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -6908,6 +6972,15 @@ "node": ">8.0.0" } }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, "node_modules/big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -7115,6 +7188,18 @@ "node": ">=8" } }, + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -7213,6 +7298,21 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, + "node_modules/bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/busboy": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", @@ -8869,6 +8969,150 @@ "node": ">=0.10.0" } }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/default-browser/node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/default-browser/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/default-gateway": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", @@ -10115,26 +10359,26 @@ } }, "node_modules/eslint": { - "version": "8.42.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.42.0.tgz", - "integrity": "sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", + "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.42.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "^8.47.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.5.2", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -10144,7 +10388,6 @@ "globals": "^13.19.0", "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", @@ -10154,9 +10397,8 @@ "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "bin": { @@ -10170,9 +10412,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", - "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", + "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -10344,21 +10586,29 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz", + "integrity": "sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==", "dev": true, "dependencies": { - "prettier-linter-helpers": "^1.0.0" + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.5" }, "engines": { - "node": ">=12.0.0" + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/prettier" }, "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "prettier": ">=3.0.0" }, "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, "eslint-config-prettier": { "optional": true } @@ -10475,9 +10725,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -10509,6 +10759,15 @@ "webpack": "^4.0.0 || ^5.0.0" } }, + "node_modules/eslint-webpack-plugin/node_modules/@types/eslint": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.29.0.tgz", + "integrity": "sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng==", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, "node_modules/eslint-webpack-plugin/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -10623,9 +10882,9 @@ } }, "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", - "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -10733,11 +10992,11 @@ } }, "node_modules/espree": { - "version": "9.5.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", - "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dependencies": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.4.1" }, @@ -11196,9 +11455,9 @@ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==" }, "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -15104,6 +15363,39 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-installed-globally": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", @@ -18185,16 +18477,16 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -19555,15 +19847,15 @@ } }, "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.1.tgz", + "integrity": "sha512-fcOWSnnpCrovBsmFZIGIy9UqK2FaI7Hqax+DIO0A9UxeVoY4iweyaFjS5TavZN97Hfehph0nhsZnjlVKzEQSrQ==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -21050,6 +21342,21 @@ "node": ">= 0.6" } }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -22573,6 +22880,28 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, + "node_modules/synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dev": true, + "dependencies": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/synckit/node_modules/tslib": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", + "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", + "dev": true + }, "node_modules/table": { "version": "6.8.0", "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", @@ -22853,6 +23182,18 @@ "tslib": "^2.0.3" } }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -23609,6 +23950,15 @@ "node": ">= 0.8" } }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/update-browserslist-db": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", @@ -24925,14 +25275,6 @@ "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -25338,6 +25680,11 @@ } }, "dependencies": { + "@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==" + }, "@adobe/css-tools": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.0.1.tgz", @@ -26912,18 +27259,18 @@ } }, "@eslint-community/regexpp": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", - "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==" + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==" }, "@eslint/eslintrc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", - "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.2", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -26938,9 +27285,9 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", "requires": { "type-fest": "^0.20.2" } @@ -26956,9 +27303,9 @@ } }, "@eslint/js": { - "version": "8.42.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.42.0.tgz", - "integrity": "sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==" + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", + "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==" }, "@gatsbyjs/parcel-namer-relative-to-cwd": { "version": "1.10.0", @@ -28055,6 +28402,46 @@ "nullthrows": "^1.1.1" } }, + "@pkgr/utils": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.0", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.6.0" + }, + "dependencies": { + "define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true + }, + "open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "requires": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + } + }, + "tslib": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", + "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", + "dev": true + } + } + }, "@playwright/test": { "version": "1.34.3", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.34.3.tgz", @@ -28370,9 +28757,9 @@ "integrity": "sha512-orGL5LXERPYsLov6CWs3Fh6203+dXzJkR7OnddIr2514Hsecwc8xRpzCapshBbKFImCsvS/mk6+FWiN5LyZJAQ==" }, "@types/eslint": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.29.0.tgz", - "integrity": "sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng==", + "version": "8.44.2", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.2.tgz", + "integrity": "sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg==", "requires": { "@types/estree": "*", "@types/json-schema": "*" @@ -30144,6 +30531,12 @@ "open": "^7.0.3" } }, + "big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true + }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -30310,6 +30703,15 @@ } } }, + "bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "requires": { + "big-integer": "^1.6.44" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -30368,6 +30770,15 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, + "bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "requires": { + "run-applescript": "^5.0.0" + } + }, "busboy": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", @@ -31627,6 +32038,95 @@ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" }, + "default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "requires": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "dependencies": { + "execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + } + }, + "human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true + }, + "is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true + }, + "mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true + }, + "npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "requires": { + "path-key": "^4.0.0" + } + }, + "onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "requires": { + "mimic-fn": "^4.0.0" + } + }, + "path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true + }, + "strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true + } + } + }, + "default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "requires": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + } + }, "default-gateway": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", @@ -32470,26 +32970,26 @@ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" }, "eslint": { - "version": "8.42.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.42.0.tgz", - "integrity": "sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", + "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", "requires": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.42.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "^8.47.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.5.2", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -32499,7 +32999,6 @@ "globals": "^13.19.0", "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", @@ -32509,9 +33008,8 @@ "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "dependencies": { @@ -32556,9 +33054,9 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" }, "eslint-scope": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", - "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "requires": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -32626,9 +33124,9 @@ } }, "eslint-config-prettier": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", - "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", + "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", "dev": true, "requires": {} }, @@ -32770,12 +33268,13 @@ } }, "eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz", + "integrity": "sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==", "dev": true, "requires": { - "prettier-linter-helpers": "^1.0.0" + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.5" } }, "eslint-plugin-react": { @@ -32855,9 +33354,9 @@ } }, "eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==" + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" }, "eslint-webpack-plugin": { "version": "2.7.0", @@ -32872,6 +33371,15 @@ "schema-utils": "^3.1.1" }, "dependencies": { + "@types/eslint": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.29.0.tgz", + "integrity": "sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng==", + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -32908,11 +33416,11 @@ } }, "espree": { - "version": "9.5.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", - "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "requires": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.4.1" } @@ -33271,9 +33779,9 @@ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==" }, "fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -36035,6 +36543,23 @@ "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", "dev": true }, + "is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "requires": { + "is-docker": "^3.0.0" + }, + "dependencies": { + "is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true + } + } + }, "is-installed-globally": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", @@ -38283,16 +38808,16 @@ "integrity": "sha512-vz9iS7MJ5+Bp1URw8Khvdyw1H/hGvzHWlKQ7eRrQojSCDL1/SrWfrY9QebLw97n2deyRtzHRC3MkQfVNUCo91Q==" }, "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "requires": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" } }, "ordered-binary": { @@ -39234,9 +39759,9 @@ "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==" }, "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.1.tgz", + "integrity": "sha512-fcOWSnnpCrovBsmFZIGIy9UqK2FaI7Hqax+DIO0A9UxeVoY4iweyaFjS5TavZN97Hfehph0nhsZnjlVKzEQSrQ==", "dev": true }, "prettier-linter-helpers": { @@ -40403,6 +40928,15 @@ } } }, + "run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "requires": { + "execa": "^5.0.0" + } + }, "run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -41561,6 +42095,24 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, + "synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dev": true, + "requires": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + }, + "dependencies": { + "tslib": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", + "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", + "dev": true + } + } + }, "table": { "version": "6.8.0", "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", @@ -41772,6 +42324,12 @@ "tslib": "^2.0.3" } }, + "titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true + }, "tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -42306,6 +42864,12 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" }, + "untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true + }, "update-browserslist-db": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", @@ -43196,11 +43760,6 @@ "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" - }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", diff --git a/package.json b/package.json index 438481bae4..bc0b8bc8ef 100644 --- a/package.json +++ b/package.json @@ -38,12 +38,12 @@ "babel-loader": "^9.1.2", "babel-plugin-istanbul": "^6.1.1", "css-loader": "^6.8.1", - "eslint": "^8.42.0", - "eslint-config-prettier": "^8.8.0", + "eslint": "^8.47.0", + "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-webpack": "^0.13.2", "eslint-plugin-import": "^2.27.5", "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-prettier": "^5.0.0", "highlight.js": "^9.18.1", "html-loader": "^4.2.0", "http-proxy": "^1.18.0", @@ -52,7 +52,7 @@ "mini-css-extract-plugin": "^2.7.6", "npm-run-all": "^4.1.5", "playwright": "^1.36.0", - "prettier": "^2.7.1", + "prettier": "^3.0.1", "style-loader": "^3.3.3", "stylus": "^0.59.0", "stylus-loader": "^7.1.2", @@ -73,9 +73,7 @@ "url": "https://github.com/quilljs/quill/issues" }, "prettier": { - "singleQuote": true, - "trailingComma": "all", - "arrowParens": "avoid" + "singleQuote": true }, "browserslist": [ "defaults" diff --git a/test/fuzz/tableEmbed.spec.ts b/test/fuzz/tableEmbed.spec.ts index 391477d636..fbfc4c25f0 100644 --- a/test/fuzz/tableEmbed.spec.ts +++ b/test/fuzz/tableEmbed.spec.ts @@ -64,7 +64,7 @@ const getRandomChange = (base: Delta) => { (base.ops[0].insert as any)['table-embed'].columns || [], ).length(), }; - (['rows', 'columns'] as const).forEach(field => { + (['rows', 'columns'] as const).forEach((field) => { const baseLength = dimension[field]; const action = choose(['insert', 'delete', 'retain']); const delta = new Delta(); diff --git a/test/unit/__helpers__/expect.ts b/test/unit/__helpers__/expect.ts index 1578461cc6..2262db1e19 100644 --- a/test/unit/__helpers__/expect.ts +++ b/test/unit/__helpers__/expect.ts @@ -15,7 +15,7 @@ const sortAttributes = (element: HTMLElement) => { element.setAttribute(attr.name, attr.value); } - element.childNodes.forEach(child => { + element.childNodes.forEach((child) => { if (child instanceof HTMLElement) { sortAttributes(child); } @@ -34,13 +34,13 @@ expect.extend({ const doms = [receivedDOM, expectedDOM]; - doms.forEach(dom => { - Array.from(dom.querySelectorAll('.ql-ui')).forEach(node => { + doms.forEach((dom) => { + Array.from(dom.querySelectorAll('.ql-ui')).forEach((node) => { node.remove(); }); - ignoreAttrs.forEach(attr => { - Array.from(dom.querySelectorAll(`[${attr}]`)).forEach(node => { + ignoreAttrs.forEach((attr) => { + Array.from(dom.querySelectorAll(`[${attr}]`)).forEach((node) => { node.removeAttribute(attr); }); }); diff --git a/test/unit/__helpers__/factory.ts b/test/unit/__helpers__/factory.ts index 3f74707105..7bdd966196 100644 --- a/test/unit/__helpers__/factory.ts +++ b/test/unit/__helpers__/factory.ts @@ -13,7 +13,7 @@ import { normalizeHTML } from './utils'; export const createRegistry = (formats: unknown[] = []) => { const registry = new Registry(); - formats.forEach(format => { + formats.forEach((format) => { registry.register(format); }); registry.register(Block); diff --git a/test/unit/__helpers__/utils.ts b/test/unit/__helpers__/utils.ts index 6e21717b68..1e96fe859e 100644 --- a/test/unit/__helpers__/utils.ts +++ b/test/unit/__helpers__/utils.ts @@ -1,5 +1,5 @@ export const sleep = (ms: number) => - new Promise(r => { + new Promise((r) => { setTimeout(() => { r(); }, ms); diff --git a/test/unit/core/editor.spec.ts b/test/unit/core/editor.spec.ts index f194400a48..400c57c474 100644 --- a/test/unit/core/editor.spec.ts +++ b/test/unit/core/editor.spec.ts @@ -1081,8 +1081,8 @@ describe('Editor', () => { .insert('\n', { header: 1, list: 'bullet' }); expect( - getEditorDelta(editor => editor.insertContents(0, change)), - ).toEqual(getEditorDelta(editor => editor.applyDelta(change))); + getEditorDelta((editor) => editor.insertContents(0, change)), + ).toEqual(getEditorDelta((editor) => editor.applyDelta(change))); }); test('block embeds with line formats', () => { @@ -1093,8 +1093,8 @@ describe('Editor', () => { .insert('\n', { header: 1 }); expect( - getEditorDelta(editor => editor.insertContents(0, change)), - ).toEqual(getEditorDelta(editor => editor.applyDelta(change))); + getEditorDelta((editor) => editor.insertContents(0, change)), + ).toEqual(getEditorDelta((editor) => editor.applyDelta(change))); }); test('missing \\n before block embeds', () => { @@ -1104,8 +1104,8 @@ describe('Editor', () => { .insert('b\n'); expect( - getEditorDelta(editor => editor.insertContents(0, change)), - ).toEqual(getEditorDelta(editor => editor.applyDelta(change))); + getEditorDelta((editor) => editor.insertContents(0, change)), + ).toEqual(getEditorDelta((editor) => editor.applyDelta(change))); }); }); }); diff --git a/test/unit/core/quill.spec.ts b/test/unit/core/quill.spec.ts index ce1cbb9aa9..ea38e9f2ad 100644 --- a/test/unit/core/quill.spec.ts +++ b/test/unit/core/quill.spec.ts @@ -19,7 +19,7 @@ const createContainer = (html: string | { html: string } = '') => { describe('Quill', () => { test('imports', () => { - Object.keys(Quill.imports).forEach(path => { + Object.keys(Quill.imports).forEach((path) => { expect(Quill.import(path)).toBeTruthy(); }); }); @@ -272,7 +272,7 @@ describe('Quill', () => { (quill.root.firstChild?.firstChild as Text).data = '01!23'; const delta = new Delta().retain(2).insert('!'); - await new Promise(r => setTimeout(r, 1)); + await new Promise((r) => setTimeout(r, 1)); expect(quill.emitter.emit).toHaveBeenCalledWith( Emitter.events.TEXT_CHANGE, delta, @@ -307,7 +307,7 @@ describe('Quill', () => { newSelection.index + newSelection.length, ); } - await new Promise(r => setTimeout(r, 1)); + await new Promise((r) => setTimeout(r, 1)); const calls = ( quill.emitter.emit as MockedFunction ).mock.calls; @@ -998,8 +998,8 @@ describe('Quill', () => { .join(separator); const viewportRatio = (element: Element): Promise => { - return new Promise(resolve => { - const observer = new IntersectionObserver(entries => { + return new Promise((resolve) => { + const observer = new IntersectionObserver((entries) => { resolve(entries[0].intersectionRatio); observer.disconnect(); }); diff --git a/test/unit/core/selection.spec.ts b/test/unit/core/selection.spec.ts index 2b9fb5cdee..fecbe36ab2 100644 --- a/test/unit/core/selection.spec.ts +++ b/test/unit/core/selection.spec.ts @@ -327,7 +327,7 @@ describe('Selection', () => { selection.format('bold', false); selection.setRange(new Range(8)); - await new Promise(resolve => { + await new Promise((resolve) => { selection.emitter.once(Emitter.events.SCROLL_OPTIMIZE, () => { resolve(); }); diff --git a/test/unit/modules/clipboard.spec.ts b/test/unit/modules/clipboard.spec.ts index ef542ba9f7..7a2df8c175 100644 --- a/test/unit/modules/clipboard.spec.ts +++ b/test/unit/modules/clipboard.spec.ts @@ -77,7 +77,7 @@ describe('Clipboard', () => { quill.clipboard.onCapturePaste({ ...clipboardEvent, clipboardData: { - getData: type => + getData: (type) => type === 'text/html' ? `` : '|', diff --git a/test/unit/modules/history.spec.ts b/test/unit/modules/history.spec.ts index 4e491b1131..2771d0b0b8 100644 --- a/test/unit/modules/history.spec.ts +++ b/test/unit/modules/history.spec.ts @@ -87,7 +87,7 @@ describe('History', () => { test('limits undo stack size', () => { const { quill } = setup({ delay: 0, maxStack: 2 }); - ['A', 'B', 'C'].forEach(text => { + ['A', 'B', 'C'].forEach((text) => { // @ts-expect-error quill.insertText(0, text); }); diff --git a/themes/base.ts b/themes/base.ts index 2bc1268ac4..d7609a5990 100644 --- a/themes/base.ts +++ b/themes/base.ts @@ -82,7 +82,7 @@ class BaseTheme extends Theme { this.tooltip.hide(); } if (this.pickers != null) { - this.pickers.forEach(picker => { + this.pickers.forEach((picker) => { // @ts-expect-error if (!picker.container.contains(e.target)) { picker.close(); @@ -112,9 +112,9 @@ class BaseTheme extends Theme { buttons: NodeListOf, icons: Record>, ) { - Array.from(buttons).forEach(button => { + Array.from(buttons).forEach((button) => { const className = button.getAttribute('class') || ''; - className.split(/\s+/).forEach(name => { + className.split(/\s+/).forEach((name) => { if (!name.startsWith('ql-')) return; name = name.slice('ql-'.length); if (icons[name] == null) return; @@ -138,7 +138,7 @@ class BaseTheme extends Theme { selects: NodeListOf, icons: Record>, ) { - this.pickers = Array.from(selects).map(select => { + this.pickers = Array.from(selects).map((select) => { if (select.classList.contains('ql-align')) { if (select.querySelector('option') == null) { fillSelect(select, ALIGNS); @@ -175,7 +175,7 @@ class BaseTheme extends Theme { return new Picker(select); }); const update = () => { - this.pickers.forEach(picker => { + this.pickers.forEach((picker) => { picker.update(); }); }; @@ -230,7 +230,7 @@ class BaseTooltip extends Tooltip { listen() { // @ts-expect-error Fix me later - this.textbox.addEventListener('keydown', event => { + this.textbox.addEventListener('keydown', (event) => { if (event.key === 'Enter') { this.save(); event.preventDefault(); @@ -346,7 +346,7 @@ function fillSelect( values: Array, defaultValue: unknown = false, ) { - values.forEach(value => { + values.forEach((value) => { const option = document.createElement('option'); if (value === defaultValue) { option.setAttribute('selected', 'selected'); diff --git a/themes/snow.ts b/themes/snow.ts index 43b2556fb9..f80eedb63f 100644 --- a/themes/snow.ts +++ b/themes/snow.ts @@ -30,26 +30,30 @@ class SnowTooltip extends BaseTooltip { listen() { super.listen(); // @ts-expect-error Fix me later - this.root.querySelector('a.ql-action').addEventListener('click', event => { - if (this.root.classList.contains('ql-editing')) { - this.save(); - } else { - // @ts-expect-error Fix me later - this.edit('link', this.preview.textContent); - } - event.preventDefault(); - }); + this.root + .querySelector('a.ql-action') + .addEventListener('click', (event) => { + if (this.root.classList.contains('ql-editing')) { + this.save(); + } else { + // @ts-expect-error Fix me later + this.edit('link', this.preview.textContent); + } + event.preventDefault(); + }); // @ts-expect-error Fix me later - this.root.querySelector('a.ql-remove').addEventListener('click', event => { - if (this.linkRange != null) { - const range = this.linkRange; - this.restoreFocus(); - this.quill.formatText(range, 'link', false, Emitter.sources.USER); - delete this.linkRange; - } - event.preventDefault(); - this.hide(); - }); + this.root + .querySelector('a.ql-remove') + .addEventListener('click', (event) => { + if (this.linkRange != null) { + const range = this.linkRange; + this.restoreFocus(); + this.quill.formatText(range, 'link', false, Emitter.sources.USER); + delete this.linkRange; + } + event.preventDefault(); + this.hide(); + }); this.quill.on( Emitter.events.SELECTION_CHANGE, (range, oldRange, source) => { diff --git a/ui/color-picker.ts b/ui/color-picker.ts index 132017e581..70af5d6502 100644 --- a/ui/color-picker.ts +++ b/ui/color-picker.ts @@ -7,7 +7,7 @@ class ColorPicker extends Picker { this.container.classList.add('ql-color-picker'); Array.from(this.container.querySelectorAll('.ql-picker-item')) .slice(0, 7) - .forEach(item => { + .forEach((item) => { item.classList.add('ql-primary'); }); } diff --git a/ui/icon-picker.ts b/ui/icon-picker.ts index 0f2324703e..6e4e70371c 100644 --- a/ui/icon-picker.ts +++ b/ui/icon-picker.ts @@ -7,7 +7,7 @@ class IconPicker extends Picker { super(select); this.container.classList.add('ql-icon-picker'); Array.from(this.container.querySelectorAll('.ql-picker-item')).forEach( - item => { + (item) => { item.innerHTML = icons[item.getAttribute('data-value') || '']; }, ); diff --git a/ui/picker.ts b/ui/picker.ts index a7f2cb72e1..cfefb4bc7e 100644 --- a/ui/picker.ts +++ b/ui/picker.ts @@ -25,7 +25,7 @@ class Picker { this.label.addEventListener('mousedown', () => { this.togglePicker(); }); - this.label.addEventListener('keydown', event => { + this.label.addEventListener('keydown', (event) => { switch (event.key) { case 'Enter': this.togglePicker(); @@ -64,7 +64,7 @@ class Picker { item.addEventListener('click', () => { this.selectItem(item, true); }); - item.addEventListener('keydown', event => { + item.addEventListener('keydown', (event) => { switch (event.key) { case 'Enter': this.selectItem(item, true); @@ -110,7 +110,7 @@ class Picker { // @ts-expect-error this.options = options; - Array.from(this.select.options).forEach(option => { + Array.from(this.select.options).forEach((option) => { const item = this.buildItem(option); options.appendChild(item); if (option.selected === true) { @@ -121,7 +121,7 @@ class Picker { } buildPicker() { - Array.from(this.select.attributes).forEach(item => { + Array.from(this.select.attributes).forEach((item) => { this.container.setAttribute(item.name, item.value); }); this.container.classList.add('ql-picker');