fix: resolve TypeScript errors in frontend build

This commit is contained in:
Hiro
2026-03-30 23:16:07 +00:00
parent b733306773
commit 24925e1acb
2941 changed files with 418042 additions and 49 deletions

21
node_modules/@tiptap/extension-bold/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025, Tiptap GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

18
node_modules/@tiptap/extension-bold/README.md generated vendored Normal file
View File

@@ -0,0 +1,18 @@
# @tiptap/extension-bold
[![Version](https://img.shields.io/npm/v/@tiptap/extension-bold.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-bold)
[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-bold.svg)](https://npmcharts.com/compare/tiptap?minimal=true)
[![License](https://img.shields.io/npm/l/@tiptap/extension-bold.svg)](https://www.npmjs.com/package/@tiptap/extension-bold)
[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis)
## Introduction
Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_.
## Official Documentation
Documentation can be found on the [Tiptap website](https://tiptap.dev).
## License
Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md).

136
node_modules/@tiptap/extension-bold/dist/index.cjs generated vendored Normal file
View File

@@ -0,0 +1,136 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
Bold: () => Bold,
default: () => index_default,
starInputRegex: () => starInputRegex,
starPasteRegex: () => starPasteRegex,
underscoreInputRegex: () => underscoreInputRegex,
underscorePasteRegex: () => underscorePasteRegex
});
module.exports = __toCommonJS(index_exports);
// src/bold.tsx
var import_core = require("@tiptap/core");
var import_jsx_runtime = require("@tiptap/core/jsx-runtime");
var starInputRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/;
var starPasteRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g;
var underscoreInputRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/;
var underscorePasteRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g;
var Bold = import_core.Mark.create({
name: "bold",
addOptions() {
return {
HTMLAttributes: {}
};
},
parseHTML() {
return [
{
tag: "strong"
},
{
tag: "b",
getAttrs: (node) => node.style.fontWeight !== "normal" && null
},
{
style: "font-weight=400",
clearMark: (mark) => mark.type.name === this.name
},
{
style: "font-weight",
getAttrs: (value) => /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null
}
];
},
renderHTML({ HTMLAttributes }) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { ...(0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("slot", {}) });
},
markdownTokenName: "strong",
parseMarkdown: (token, helpers) => {
return helpers.applyMark("bold", helpers.parseInline(token.tokens || []));
},
markdownOptions: {
htmlReopen: {
open: "<strong>",
close: "</strong>"
}
},
renderMarkdown: (node, h) => {
return `**${h.renderChildren(node)}**`;
},
addCommands() {
return {
setBold: () => ({ commands }) => {
return commands.setMark(this.name);
},
toggleBold: () => ({ commands }) => {
return commands.toggleMark(this.name);
},
unsetBold: () => ({ commands }) => {
return commands.unsetMark(this.name);
}
};
},
addKeyboardShortcuts() {
return {
"Mod-b": () => this.editor.commands.toggleBold(),
"Mod-B": () => this.editor.commands.toggleBold()
};
},
addInputRules() {
return [
(0, import_core.markInputRule)({
find: starInputRegex,
type: this.type
}),
(0, import_core.markInputRule)({
find: underscoreInputRegex,
type: this.type
})
];
},
addPasteRules() {
return [
(0, import_core.markPasteRule)({
find: starPasteRegex,
type: this.type
}),
(0, import_core.markPasteRule)({
find: underscorePasteRegex,
type: this.type
})
];
}
});
// src/index.ts
var index_default = Bold;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Bold,
starInputRegex,
starPasteRegex,
underscoreInputRegex,
underscorePasteRegex
});
//# sourceMappingURL=index.cjs.map

File diff suppressed because one or more lines are too long

53
node_modules/@tiptap/extension-bold/dist/index.d.cts generated vendored Normal file
View File

@@ -0,0 +1,53 @@
import { Mark } from '@tiptap/core';
/** @jsxImportSource @tiptap/core */
interface BoldOptions {
/**
* HTML attributes to add to the bold element.
* @default {}
* @example { class: 'foo' }
*/
HTMLAttributes: Record<string, any>;
}
declare module '@tiptap/core' {
interface Commands<ReturnType> {
bold: {
/**
* Set a bold mark
*/
setBold: () => ReturnType;
/**
* Toggle a bold mark
*/
toggleBold: () => ReturnType;
/**
* Unset a bold mark
*/
unsetBold: () => ReturnType;
};
}
}
/**
* Matches bold text via `**` as input.
*/
declare const starInputRegex: RegExp;
/**
* Matches bold text via `**` while pasting.
*/
declare const starPasteRegex: RegExp;
/**
* Matches bold text via `__` as input.
*/
declare const underscoreInputRegex: RegExp;
/**
* Matches bold text via `__` while pasting.
*/
declare const underscorePasteRegex: RegExp;
/**
* This extension allows you to mark text as bold.
* @see https://tiptap.dev/api/marks/bold
*/
declare const Bold: Mark<BoldOptions, any>;
export { Bold, type BoldOptions, Bold as default, starInputRegex, starPasteRegex, underscoreInputRegex, underscorePasteRegex };

53
node_modules/@tiptap/extension-bold/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,53 @@
import { Mark } from '@tiptap/core';
/** @jsxImportSource @tiptap/core */
interface BoldOptions {
/**
* HTML attributes to add to the bold element.
* @default {}
* @example { class: 'foo' }
*/
HTMLAttributes: Record<string, any>;
}
declare module '@tiptap/core' {
interface Commands<ReturnType> {
bold: {
/**
* Set a bold mark
*/
setBold: () => ReturnType;
/**
* Toggle a bold mark
*/
toggleBold: () => ReturnType;
/**
* Unset a bold mark
*/
unsetBold: () => ReturnType;
};
}
}
/**
* Matches bold text via `**` as input.
*/
declare const starInputRegex: RegExp;
/**
* Matches bold text via `**` while pasting.
*/
declare const starPasteRegex: RegExp;
/**
* Matches bold text via `__` as input.
*/
declare const underscoreInputRegex: RegExp;
/**
* Matches bold text via `__` while pasting.
*/
declare const underscorePasteRegex: RegExp;
/**
* This extension allows you to mark text as bold.
* @see https://tiptap.dev/api/marks/bold
*/
declare const Bold: Mark<BoldOptions, any>;
export { Bold, type BoldOptions, Bold as default, starInputRegex, starPasteRegex, underscoreInputRegex, underscorePasteRegex };

105
node_modules/@tiptap/extension-bold/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,105 @@
// src/bold.tsx
import { Mark, markInputRule, markPasteRule, mergeAttributes } from "@tiptap/core";
import { jsx } from "@tiptap/core/jsx-runtime";
var starInputRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/;
var starPasteRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g;
var underscoreInputRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/;
var underscorePasteRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g;
var Bold = Mark.create({
name: "bold",
addOptions() {
return {
HTMLAttributes: {}
};
},
parseHTML() {
return [
{
tag: "strong"
},
{
tag: "b",
getAttrs: (node) => node.style.fontWeight !== "normal" && null
},
{
style: "font-weight=400",
clearMark: (mark) => mark.type.name === this.name
},
{
style: "font-weight",
getAttrs: (value) => /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null
}
];
},
renderHTML({ HTMLAttributes }) {
return /* @__PURE__ */ jsx("strong", { ...mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ jsx("slot", {}) });
},
markdownTokenName: "strong",
parseMarkdown: (token, helpers) => {
return helpers.applyMark("bold", helpers.parseInline(token.tokens || []));
},
markdownOptions: {
htmlReopen: {
open: "<strong>",
close: "</strong>"
}
},
renderMarkdown: (node, h) => {
return `**${h.renderChildren(node)}**`;
},
addCommands() {
return {
setBold: () => ({ commands }) => {
return commands.setMark(this.name);
},
toggleBold: () => ({ commands }) => {
return commands.toggleMark(this.name);
},
unsetBold: () => ({ commands }) => {
return commands.unsetMark(this.name);
}
};
},
addKeyboardShortcuts() {
return {
"Mod-b": () => this.editor.commands.toggleBold(),
"Mod-B": () => this.editor.commands.toggleBold()
};
},
addInputRules() {
return [
markInputRule({
find: starInputRegex,
type: this.type
}),
markInputRule({
find: underscoreInputRegex,
type: this.type
})
];
},
addPasteRules() {
return [
markPasteRule({
find: starPasteRegex,
type: this.type
}),
markPasteRule({
find: underscorePasteRegex,
type: this.type
})
];
}
});
// src/index.ts
var index_default = Bold;
export {
Bold,
index_default as default,
starInputRegex,
starPasteRegex,
underscoreInputRegex,
underscorePasteRegex
};
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

48
node_modules/@tiptap/extension-bold/package.json generated vendored Normal file
View File

@@ -0,0 +1,48 @@
{
"name": "@tiptap/extension-bold",
"description": "bold extension for tiptap",
"version": "3.21.0",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
"tiptap extension"
],
"license": "MIT",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/ueberdosis"
},
"type": "module",
"exports": {
".": {
"types": {
"import": "./dist/index.d.ts",
"require": "./dist/index.d.cts"
},
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"src",
"dist"
],
"devDependencies": {
"@tiptap/core": "^3.21.0"
},
"peerDependencies": {
"@tiptap/core": "^3.21.0"
},
"repository": {
"type": "git",
"url": "https://github.com/ueberdosis/tiptap",
"directory": "packages/extension-bold"
},
"scripts": {
"build": "tsup",
"lint": "prettier ./src/ --check && eslint --cache --quiet --no-error-on-unmatched-pattern ./src/"
}
}

163
node_modules/@tiptap/extension-bold/src/bold.tsx generated vendored Normal file
View File

@@ -0,0 +1,163 @@
/** @jsxImportSource @tiptap/core */
import { Mark, markInputRule, markPasteRule, mergeAttributes } from '@tiptap/core'
export interface BoldOptions {
/**
* HTML attributes to add to the bold element.
* @default {}
* @example { class: 'foo' }
*/
HTMLAttributes: Record<string, any>
}
declare module '@tiptap/core' {
interface Commands<ReturnType> {
bold: {
/**
* Set a bold mark
*/
setBold: () => ReturnType
/**
* Toggle a bold mark
*/
toggleBold: () => ReturnType
/**
* Unset a bold mark
*/
unsetBold: () => ReturnType
}
}
}
/**
* Matches bold text via `**` as input.
*/
export const starInputRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/
/**
* Matches bold text via `**` while pasting.
*/
export const starPasteRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g
/**
* Matches bold text via `__` as input.
*/
export const underscoreInputRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/
/**
* Matches bold text via `__` while pasting.
*/
export const underscorePasteRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g
/**
* This extension allows you to mark text as bold.
* @see https://tiptap.dev/api/marks/bold
*/
export const Bold = Mark.create<BoldOptions>({
name: 'bold',
addOptions() {
return {
HTMLAttributes: {},
}
},
parseHTML() {
return [
{
tag: 'strong',
},
{
tag: 'b',
getAttrs: node => (node as HTMLElement).style.fontWeight !== 'normal' && null,
},
{
style: 'font-weight=400',
clearMark: mark => mark.type.name === this.name,
},
{
style: 'font-weight',
getAttrs: value => /^(bold(er)?|[5-9]\d{2,})$/.test(value as string) && null,
},
]
},
renderHTML({ HTMLAttributes }) {
return (
<strong {...mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)}>
<slot />
</strong>
)
},
markdownTokenName: 'strong',
parseMarkdown: (token, helpers) => {
// Convert 'strong' token to bold mark
return helpers.applyMark('bold', helpers.parseInline(token.tokens || []))
},
markdownOptions: {
htmlReopen: {
open: '<strong>',
close: '</strong>',
},
},
renderMarkdown: (node, h) => {
return `**${h.renderChildren(node)}**`
},
addCommands() {
return {
setBold:
() =>
({ commands }) => {
return commands.setMark(this.name)
},
toggleBold:
() =>
({ commands }) => {
return commands.toggleMark(this.name)
},
unsetBold:
() =>
({ commands }) => {
return commands.unsetMark(this.name)
},
}
},
addKeyboardShortcuts() {
return {
'Mod-b': () => this.editor.commands.toggleBold(),
'Mod-B': () => this.editor.commands.toggleBold(),
}
},
addInputRules() {
return [
markInputRule({
find: starInputRegex,
type: this.type,
}),
markInputRule({
find: underscoreInputRegex,
type: this.type,
}),
]
},
addPasteRules() {
return [
markPasteRule({
find: starPasteRegex,
type: this.type,
}),
markPasteRule({
find: underscorePasteRegex,
type: this.type,
}),
]
},
})

5
node_modules/@tiptap/extension-bold/src/index.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import { Bold } from './bold.jsx'
export * from './bold.jsx'
export default Bold