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-heading/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-heading/README.md generated vendored Normal file
View File

@@ -0,0 +1,18 @@
# @tiptap/extension-heading
[![Version](https://img.shields.io/npm/v/@tiptap/extension-heading.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-heading)
[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-heading.svg)](https://npmcharts.com/compare/tiptap?minimal=true)
[![License](https://img.shields.io/npm/l/@tiptap/extension-heading.svg)](https://www.npmjs.com/package/@tiptap/extension-heading)
[![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).

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

@@ -0,0 +1,118 @@
"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, {
Heading: () => Heading,
default: () => index_default
});
module.exports = __toCommonJS(index_exports);
// src/heading.ts
var import_core = require("@tiptap/core");
var Heading = import_core.Node.create({
name: "heading",
addOptions() {
return {
levels: [1, 2, 3, 4, 5, 6],
HTMLAttributes: {}
};
},
content: "inline*",
group: "block",
defining: true,
addAttributes() {
return {
level: {
default: 1,
rendered: false
}
};
},
parseHTML() {
return this.options.levels.map((level) => ({
tag: `h${level}`,
attrs: { level }
}));
},
renderHTML({ node, HTMLAttributes }) {
const hasLevel = this.options.levels.includes(node.attrs.level);
const level = hasLevel ? node.attrs.level : this.options.levels[0];
return [`h${level}`, (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0];
},
parseMarkdown: (token, helpers) => {
return helpers.createNode("heading", { level: token.depth || 1 }, helpers.parseInline(token.tokens || []));
},
renderMarkdown: (node, h) => {
var _a;
const level = ((_a = node.attrs) == null ? void 0 : _a.level) ? parseInt(node.attrs.level, 10) : 1;
const headingChars = "#".repeat(level);
if (!node.content) {
return "";
}
return `${headingChars} ${h.renderChildren(node.content)}`;
},
addCommands() {
return {
setHeading: (attributes) => ({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {
return false;
}
return commands.setNode(this.name, attributes);
},
toggleHeading: (attributes) => ({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {
return false;
}
return commands.toggleNode(this.name, "paragraph", attributes);
}
};
},
addKeyboardShortcuts() {
return this.options.levels.reduce(
(items, level) => ({
...items,
...{
[`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level })
}
}),
{}
);
},
addInputRules() {
return this.options.levels.map((level) => {
return (0, import_core.textblockTypeInputRule)({
find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\s$`),
type: this.type,
getAttributes: {
level
}
});
});
}
});
// src/index.ts
var index_default = Heading;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Heading
});
//# sourceMappingURL=index.cjs.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,49 @@
import { Node } from '@tiptap/core';
/**
* The heading level options.
*/
type Level = 1 | 2 | 3 | 4 | 5 | 6;
interface HeadingOptions {
/**
* The available heading levels.
* @default [1, 2, 3, 4, 5, 6]
* @example [1, 2, 3]
*/
levels: Level[];
/**
* The HTML attributes for a heading node.
* @default {}
* @example { class: 'foo' }
*/
HTMLAttributes: Record<string, any>;
}
declare module '@tiptap/core' {
interface Commands<ReturnType> {
heading: {
/**
* Set a heading node
* @param attributes The heading attributes
* @example editor.commands.setHeading({ level: 1 })
*/
setHeading: (attributes: {
level: Level;
}) => ReturnType;
/**
* Toggle a heading node
* @param attributes The heading attributes
* @example editor.commands.toggleHeading({ level: 1 })
*/
toggleHeading: (attributes: {
level: Level;
}) => ReturnType;
};
}
}
/**
* This extension allows you to create headings.
* @see https://www.tiptap.dev/api/nodes/heading
*/
declare const Heading: Node<HeadingOptions, any>;
export { Heading, type HeadingOptions, type Level, Heading as default };

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

@@ -0,0 +1,49 @@
import { Node } from '@tiptap/core';
/**
* The heading level options.
*/
type Level = 1 | 2 | 3 | 4 | 5 | 6;
interface HeadingOptions {
/**
* The available heading levels.
* @default [1, 2, 3, 4, 5, 6]
* @example [1, 2, 3]
*/
levels: Level[];
/**
* The HTML attributes for a heading node.
* @default {}
* @example { class: 'foo' }
*/
HTMLAttributes: Record<string, any>;
}
declare module '@tiptap/core' {
interface Commands<ReturnType> {
heading: {
/**
* Set a heading node
* @param attributes The heading attributes
* @example editor.commands.setHeading({ level: 1 })
*/
setHeading: (attributes: {
level: Level;
}) => ReturnType;
/**
* Toggle a heading node
* @param attributes The heading attributes
* @example editor.commands.toggleHeading({ level: 1 })
*/
toggleHeading: (attributes: {
level: Level;
}) => ReturnType;
};
}
}
/**
* This extension allows you to create headings.
* @see https://www.tiptap.dev/api/nodes/heading
*/
declare const Heading: Node<HeadingOptions, any>;
export { Heading, type HeadingOptions, type Level, Heading as default };

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

@@ -0,0 +1,91 @@
// src/heading.ts
import { mergeAttributes, Node, textblockTypeInputRule } from "@tiptap/core";
var Heading = Node.create({
name: "heading",
addOptions() {
return {
levels: [1, 2, 3, 4, 5, 6],
HTMLAttributes: {}
};
},
content: "inline*",
group: "block",
defining: true,
addAttributes() {
return {
level: {
default: 1,
rendered: false
}
};
},
parseHTML() {
return this.options.levels.map((level) => ({
tag: `h${level}`,
attrs: { level }
}));
},
renderHTML({ node, HTMLAttributes }) {
const hasLevel = this.options.levels.includes(node.attrs.level);
const level = hasLevel ? node.attrs.level : this.options.levels[0];
return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
},
parseMarkdown: (token, helpers) => {
return helpers.createNode("heading", { level: token.depth || 1 }, helpers.parseInline(token.tokens || []));
},
renderMarkdown: (node, h) => {
var _a;
const level = ((_a = node.attrs) == null ? void 0 : _a.level) ? parseInt(node.attrs.level, 10) : 1;
const headingChars = "#".repeat(level);
if (!node.content) {
return "";
}
return `${headingChars} ${h.renderChildren(node.content)}`;
},
addCommands() {
return {
setHeading: (attributes) => ({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {
return false;
}
return commands.setNode(this.name, attributes);
},
toggleHeading: (attributes) => ({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {
return false;
}
return commands.toggleNode(this.name, "paragraph", attributes);
}
};
},
addKeyboardShortcuts() {
return this.options.levels.reduce(
(items, level) => ({
...items,
...{
[`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level })
}
}),
{}
);
},
addInputRules() {
return this.options.levels.map((level) => {
return textblockTypeInputRule({
find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\s$`),
type: this.type,
getAttributes: {
level
}
});
});
}
});
// src/index.ts
var index_default = Heading;
export {
Heading,
index_default as default
};
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

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

@@ -0,0 +1,48 @@
{
"name": "@tiptap/extension-heading",
"description": "heading 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-heading"
},
"scripts": {
"build": "tsup",
"lint": "prettier ./src/ --check && eslint --cache --quiet --no-error-on-unmatched-pattern ./src/"
}
}

150
node_modules/@tiptap/extension-heading/src/heading.ts generated vendored Normal file
View File

@@ -0,0 +1,150 @@
import { mergeAttributes, Node, textblockTypeInputRule } from '@tiptap/core'
/**
* The heading level options.
*/
export type Level = 1 | 2 | 3 | 4 | 5 | 6
export interface HeadingOptions {
/**
* The available heading levels.
* @default [1, 2, 3, 4, 5, 6]
* @example [1, 2, 3]
*/
levels: Level[]
/**
* The HTML attributes for a heading node.
* @default {}
* @example { class: 'foo' }
*/
HTMLAttributes: Record<string, any>
}
declare module '@tiptap/core' {
interface Commands<ReturnType> {
heading: {
/**
* Set a heading node
* @param attributes The heading attributes
* @example editor.commands.setHeading({ level: 1 })
*/
setHeading: (attributes: { level: Level }) => ReturnType
/**
* Toggle a heading node
* @param attributes The heading attributes
* @example editor.commands.toggleHeading({ level: 1 })
*/
toggleHeading: (attributes: { level: Level }) => ReturnType
}
}
}
/**
* This extension allows you to create headings.
* @see https://www.tiptap.dev/api/nodes/heading
*/
export const Heading = Node.create<HeadingOptions>({
name: 'heading',
addOptions() {
return {
levels: [1, 2, 3, 4, 5, 6],
HTMLAttributes: {},
}
},
content: 'inline*',
group: 'block',
defining: true,
addAttributes() {
return {
level: {
default: 1,
rendered: false,
},
}
},
parseHTML() {
return this.options.levels.map((level: Level) => ({
tag: `h${level}`,
attrs: { level },
}))
},
renderHTML({ node, HTMLAttributes }) {
const hasLevel = this.options.levels.includes(node.attrs.level)
const level = hasLevel ? node.attrs.level : this.options.levels[0]
return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]
},
parseMarkdown: (token, helpers) => {
// Convert 'heading' token to heading node
// marked provides 'depth' property (1-6) for heading level
return helpers.createNode('heading', { level: token.depth || 1 }, helpers.parseInline(token.tokens || []))
},
renderMarkdown: (node, h) => {
const level = node.attrs?.level ? parseInt(node.attrs.level as string, 10) : 1
const headingChars = '#'.repeat(level)
if (!node.content) {
return ''
}
// Use current context for proper joining/spacing
return `${headingChars} ${h.renderChildren(node.content)}`
},
addCommands() {
return {
setHeading:
attributes =>
({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {
return false
}
return commands.setNode(this.name, attributes)
},
toggleHeading:
attributes =>
({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {
return false
}
return commands.toggleNode(this.name, 'paragraph', attributes)
},
}
},
addKeyboardShortcuts() {
return this.options.levels.reduce(
(items, level) => ({
...items,
...{
[`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level }),
},
}),
{},
)
},
addInputRules() {
return this.options.levels.map(level => {
return textblockTypeInputRule({
find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\s$`),
type: this.type,
getAttributes: {
level,
},
})
})
},
})

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

@@ -0,0 +1,5 @@
import { Heading } from './heading.js'
export * from './heading.js'
export default Heading