fix: resolve TypeScript errors in frontend build
This commit is contained in:
134
node_modules/@tiptap/extension-italic/dist/index.cjs
generated
vendored
Normal file
134
node_modules/@tiptap/extension-italic/dist/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
"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, {
|
||||
Italic: () => Italic,
|
||||
default: () => index_default,
|
||||
starInputRegex: () => starInputRegex,
|
||||
starPasteRegex: () => starPasteRegex,
|
||||
underscoreInputRegex: () => underscoreInputRegex,
|
||||
underscorePasteRegex: () => underscorePasteRegex
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/italic.ts
|
||||
var import_core = require("@tiptap/core");
|
||||
var starInputRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/;
|
||||
var starPasteRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g;
|
||||
var underscoreInputRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/;
|
||||
var underscorePasteRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g;
|
||||
var Italic = import_core.Mark.create({
|
||||
name: "italic",
|
||||
addOptions() {
|
||||
return {
|
||||
HTMLAttributes: {}
|
||||
};
|
||||
},
|
||||
parseHTML() {
|
||||
return [
|
||||
{
|
||||
tag: "em"
|
||||
},
|
||||
{
|
||||
tag: "i",
|
||||
getAttrs: (node) => node.style.fontStyle !== "normal" && null
|
||||
},
|
||||
{
|
||||
style: "font-style=normal",
|
||||
clearMark: (mark) => mark.type.name === this.name
|
||||
},
|
||||
{
|
||||
style: "font-style=italic"
|
||||
}
|
||||
];
|
||||
},
|
||||
renderHTML({ HTMLAttributes }) {
|
||||
return ["em", (0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), 0];
|
||||
},
|
||||
addCommands() {
|
||||
return {
|
||||
setItalic: () => ({ commands }) => {
|
||||
return commands.setMark(this.name);
|
||||
},
|
||||
toggleItalic: () => ({ commands }) => {
|
||||
return commands.toggleMark(this.name);
|
||||
},
|
||||
unsetItalic: () => ({ commands }) => {
|
||||
return commands.unsetMark(this.name);
|
||||
}
|
||||
};
|
||||
},
|
||||
markdownTokenName: "em",
|
||||
parseMarkdown: (token, helpers) => {
|
||||
return helpers.applyMark("italic", helpers.parseInline(token.tokens || []));
|
||||
},
|
||||
markdownOptions: {
|
||||
htmlReopen: {
|
||||
open: "<em>",
|
||||
close: "</em>"
|
||||
}
|
||||
},
|
||||
renderMarkdown: (node, h) => {
|
||||
return `*${h.renderChildren(node)}*`;
|
||||
},
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
"Mod-i": () => this.editor.commands.toggleItalic(),
|
||||
"Mod-I": () => this.editor.commands.toggleItalic()
|
||||
};
|
||||
},
|
||||
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 = Italic;
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
Italic,
|
||||
starInputRegex,
|
||||
starPasteRegex,
|
||||
underscoreInputRegex,
|
||||
underscorePasteRegex
|
||||
});
|
||||
//# sourceMappingURL=index.cjs.map
|
||||
1
node_modules/@tiptap/extension-italic/dist/index.cjs.map
generated
vendored
Normal file
1
node_modules/@tiptap/extension-italic/dist/index.cjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
54
node_modules/@tiptap/extension-italic/dist/index.d.cts
generated
vendored
Normal file
54
node_modules/@tiptap/extension-italic/dist/index.d.cts
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
import { Mark } from '@tiptap/core';
|
||||
|
||||
interface ItalicOptions {
|
||||
/**
|
||||
* HTML attributes to add to the italic element.
|
||||
* @default {}
|
||||
* @example { class: 'foo' }
|
||||
*/
|
||||
HTMLAttributes: Record<string, any>;
|
||||
}
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
italic: {
|
||||
/**
|
||||
* Set an italic mark
|
||||
* @example editor.commands.setItalic()
|
||||
*/
|
||||
setItalic: () => ReturnType;
|
||||
/**
|
||||
* Toggle an italic mark
|
||||
* @example editor.commands.toggleItalic()
|
||||
*/
|
||||
toggleItalic: () => ReturnType;
|
||||
/**
|
||||
* Unset an italic mark
|
||||
* @example editor.commands.unsetItalic()
|
||||
*/
|
||||
unsetItalic: () => ReturnType;
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Matches an italic to a *italic* on input.
|
||||
*/
|
||||
declare const starInputRegex: RegExp;
|
||||
/**
|
||||
* Matches an italic to a *italic* on paste.
|
||||
*/
|
||||
declare const starPasteRegex: RegExp;
|
||||
/**
|
||||
* Matches an italic to a _italic_ on input.
|
||||
*/
|
||||
declare const underscoreInputRegex: RegExp;
|
||||
/**
|
||||
* Matches an italic to a _italic_ on paste.
|
||||
*/
|
||||
declare const underscorePasteRegex: RegExp;
|
||||
/**
|
||||
* This extension allows you to create italic text.
|
||||
* @see https://www.tiptap.dev/api/marks/italic
|
||||
*/
|
||||
declare const Italic: Mark<ItalicOptions, any>;
|
||||
|
||||
export { Italic, type ItalicOptions, Italic as default, starInputRegex, starPasteRegex, underscoreInputRegex, underscorePasteRegex };
|
||||
54
node_modules/@tiptap/extension-italic/dist/index.d.ts
generated
vendored
Normal file
54
node_modules/@tiptap/extension-italic/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
import { Mark } from '@tiptap/core';
|
||||
|
||||
interface ItalicOptions {
|
||||
/**
|
||||
* HTML attributes to add to the italic element.
|
||||
* @default {}
|
||||
* @example { class: 'foo' }
|
||||
*/
|
||||
HTMLAttributes: Record<string, any>;
|
||||
}
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
italic: {
|
||||
/**
|
||||
* Set an italic mark
|
||||
* @example editor.commands.setItalic()
|
||||
*/
|
||||
setItalic: () => ReturnType;
|
||||
/**
|
||||
* Toggle an italic mark
|
||||
* @example editor.commands.toggleItalic()
|
||||
*/
|
||||
toggleItalic: () => ReturnType;
|
||||
/**
|
||||
* Unset an italic mark
|
||||
* @example editor.commands.unsetItalic()
|
||||
*/
|
||||
unsetItalic: () => ReturnType;
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Matches an italic to a *italic* on input.
|
||||
*/
|
||||
declare const starInputRegex: RegExp;
|
||||
/**
|
||||
* Matches an italic to a *italic* on paste.
|
||||
*/
|
||||
declare const starPasteRegex: RegExp;
|
||||
/**
|
||||
* Matches an italic to a _italic_ on input.
|
||||
*/
|
||||
declare const underscoreInputRegex: RegExp;
|
||||
/**
|
||||
* Matches an italic to a _italic_ on paste.
|
||||
*/
|
||||
declare const underscorePasteRegex: RegExp;
|
||||
/**
|
||||
* This extension allows you to create italic text.
|
||||
* @see https://www.tiptap.dev/api/marks/italic
|
||||
*/
|
||||
declare const Italic: Mark<ItalicOptions, any>;
|
||||
|
||||
export { Italic, type ItalicOptions, Italic as default, starInputRegex, starPasteRegex, underscoreInputRegex, underscorePasteRegex };
|
||||
103
node_modules/@tiptap/extension-italic/dist/index.js
generated
vendored
Normal file
103
node_modules/@tiptap/extension-italic/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
// src/italic.ts
|
||||
import { Mark, markInputRule, markPasteRule, mergeAttributes } from "@tiptap/core";
|
||||
var starInputRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/;
|
||||
var starPasteRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g;
|
||||
var underscoreInputRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/;
|
||||
var underscorePasteRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g;
|
||||
var Italic = Mark.create({
|
||||
name: "italic",
|
||||
addOptions() {
|
||||
return {
|
||||
HTMLAttributes: {}
|
||||
};
|
||||
},
|
||||
parseHTML() {
|
||||
return [
|
||||
{
|
||||
tag: "em"
|
||||
},
|
||||
{
|
||||
tag: "i",
|
||||
getAttrs: (node) => node.style.fontStyle !== "normal" && null
|
||||
},
|
||||
{
|
||||
style: "font-style=normal",
|
||||
clearMark: (mark) => mark.type.name === this.name
|
||||
},
|
||||
{
|
||||
style: "font-style=italic"
|
||||
}
|
||||
];
|
||||
},
|
||||
renderHTML({ HTMLAttributes }) {
|
||||
return ["em", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
||||
},
|
||||
addCommands() {
|
||||
return {
|
||||
setItalic: () => ({ commands }) => {
|
||||
return commands.setMark(this.name);
|
||||
},
|
||||
toggleItalic: () => ({ commands }) => {
|
||||
return commands.toggleMark(this.name);
|
||||
},
|
||||
unsetItalic: () => ({ commands }) => {
|
||||
return commands.unsetMark(this.name);
|
||||
}
|
||||
};
|
||||
},
|
||||
markdownTokenName: "em",
|
||||
parseMarkdown: (token, helpers) => {
|
||||
return helpers.applyMark("italic", helpers.parseInline(token.tokens || []));
|
||||
},
|
||||
markdownOptions: {
|
||||
htmlReopen: {
|
||||
open: "<em>",
|
||||
close: "</em>"
|
||||
}
|
||||
},
|
||||
renderMarkdown: (node, h) => {
|
||||
return `*${h.renderChildren(node)}*`;
|
||||
},
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
"Mod-i": () => this.editor.commands.toggleItalic(),
|
||||
"Mod-I": () => this.editor.commands.toggleItalic()
|
||||
};
|
||||
},
|
||||
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 = Italic;
|
||||
export {
|
||||
Italic,
|
||||
index_default as default,
|
||||
starInputRegex,
|
||||
starPasteRegex,
|
||||
underscoreInputRegex,
|
||||
underscorePasteRegex
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@tiptap/extension-italic/dist/index.js.map
generated
vendored
Normal file
1
node_modules/@tiptap/extension-italic/dist/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user