fix: resolve TypeScript errors in frontend build
This commit is contained in:
111
node_modules/@tiptap/extension-blockquote/dist/index.cjs
generated
vendored
Normal file
111
node_modules/@tiptap/extension-blockquote/dist/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
"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, {
|
||||
Blockquote: () => Blockquote,
|
||||
default: () => index_default,
|
||||
inputRegex: () => inputRegex
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/blockquote.tsx
|
||||
var import_core = require("@tiptap/core");
|
||||
var import_jsx_runtime = require("@tiptap/core/jsx-runtime");
|
||||
var inputRegex = /^\s*>\s$/;
|
||||
var Blockquote = import_core.Node.create({
|
||||
name: "blockquote",
|
||||
addOptions() {
|
||||
return {
|
||||
HTMLAttributes: {}
|
||||
};
|
||||
},
|
||||
content: "block+",
|
||||
group: "block",
|
||||
defining: true,
|
||||
parseHTML() {
|
||||
return [{ tag: "blockquote" }];
|
||||
},
|
||||
renderHTML({ HTMLAttributes }) {
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("blockquote", { ...(0, import_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("slot", {}) });
|
||||
},
|
||||
parseMarkdown: (token, helpers) => {
|
||||
var _a;
|
||||
const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren;
|
||||
return helpers.createNode("blockquote", void 0, parseBlockChildren(token.tokens || []));
|
||||
},
|
||||
renderMarkdown: (node, h) => {
|
||||
if (!node.content) {
|
||||
return "";
|
||||
}
|
||||
const prefix = ">";
|
||||
const result = [];
|
||||
node.content.forEach((child, index) => {
|
||||
var _a, _b;
|
||||
const childContent = (_b = (_a = h.renderChild) == null ? void 0 : _a.call(h, child, index)) != null ? _b : h.renderChildren([child]);
|
||||
const lines = childContent.split("\n");
|
||||
const linesWithPrefix = lines.map((line) => {
|
||||
if (line.trim() === "") {
|
||||
return prefix;
|
||||
}
|
||||
return `${prefix} ${line}`;
|
||||
});
|
||||
result.push(linesWithPrefix.join("\n"));
|
||||
});
|
||||
return result.join(`
|
||||
${prefix}
|
||||
`);
|
||||
},
|
||||
addCommands() {
|
||||
return {
|
||||
setBlockquote: () => ({ commands }) => {
|
||||
return commands.wrapIn(this.name);
|
||||
},
|
||||
toggleBlockquote: () => ({ commands }) => {
|
||||
return commands.toggleWrap(this.name);
|
||||
},
|
||||
unsetBlockquote: () => ({ commands }) => {
|
||||
return commands.lift(this.name);
|
||||
}
|
||||
};
|
||||
},
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
"Mod-Shift-b": () => this.editor.commands.toggleBlockquote()
|
||||
};
|
||||
},
|
||||
addInputRules() {
|
||||
return [
|
||||
(0, import_core.wrappingInputRule)({
|
||||
find: inputRegex,
|
||||
type: this.type
|
||||
})
|
||||
];
|
||||
}
|
||||
});
|
||||
|
||||
// src/index.ts
|
||||
var index_default = Blockquote;
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
Blockquote,
|
||||
inputRegex
|
||||
});
|
||||
//# sourceMappingURL=index.cjs.map
|
||||
1
node_modules/@tiptap/extension-blockquote/dist/index.cjs.map
generated
vendored
Normal file
1
node_modules/@tiptap/extension-blockquote/dist/index.cjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
41
node_modules/@tiptap/extension-blockquote/dist/index.d.cts
generated
vendored
Normal file
41
node_modules/@tiptap/extension-blockquote/dist/index.d.cts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
import { Node } from '@tiptap/core';
|
||||
|
||||
/** @jsxImportSource @tiptap/core */
|
||||
|
||||
interface BlockquoteOptions {
|
||||
/**
|
||||
* HTML attributes to add to the blockquote element
|
||||
* @default {}
|
||||
* @example { class: 'foo' }
|
||||
*/
|
||||
HTMLAttributes: Record<string, any>;
|
||||
}
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
blockQuote: {
|
||||
/**
|
||||
* Set a blockquote node
|
||||
*/
|
||||
setBlockquote: () => ReturnType;
|
||||
/**
|
||||
* Toggle a blockquote node
|
||||
*/
|
||||
toggleBlockquote: () => ReturnType;
|
||||
/**
|
||||
* Unset a blockquote node
|
||||
*/
|
||||
unsetBlockquote: () => ReturnType;
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Matches a blockquote to a `>` as input.
|
||||
*/
|
||||
declare const inputRegex: RegExp;
|
||||
/**
|
||||
* This extension allows you to create blockquotes.
|
||||
* @see https://tiptap.dev/api/nodes/blockquote
|
||||
*/
|
||||
declare const Blockquote: Node<BlockquoteOptions, any>;
|
||||
|
||||
export { Blockquote, type BlockquoteOptions, Blockquote as default, inputRegex };
|
||||
41
node_modules/@tiptap/extension-blockquote/dist/index.d.ts
generated
vendored
Normal file
41
node_modules/@tiptap/extension-blockquote/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
import { Node } from '@tiptap/core';
|
||||
|
||||
/** @jsxImportSource @tiptap/core */
|
||||
|
||||
interface BlockquoteOptions {
|
||||
/**
|
||||
* HTML attributes to add to the blockquote element
|
||||
* @default {}
|
||||
* @example { class: 'foo' }
|
||||
*/
|
||||
HTMLAttributes: Record<string, any>;
|
||||
}
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
blockQuote: {
|
||||
/**
|
||||
* Set a blockquote node
|
||||
*/
|
||||
setBlockquote: () => ReturnType;
|
||||
/**
|
||||
* Toggle a blockquote node
|
||||
*/
|
||||
toggleBlockquote: () => ReturnType;
|
||||
/**
|
||||
* Unset a blockquote node
|
||||
*/
|
||||
unsetBlockquote: () => ReturnType;
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Matches a blockquote to a `>` as input.
|
||||
*/
|
||||
declare const inputRegex: RegExp;
|
||||
/**
|
||||
* This extension allows you to create blockquotes.
|
||||
* @see https://tiptap.dev/api/nodes/blockquote
|
||||
*/
|
||||
declare const Blockquote: Node<BlockquoteOptions, any>;
|
||||
|
||||
export { Blockquote, type BlockquoteOptions, Blockquote as default, inputRegex };
|
||||
83
node_modules/@tiptap/extension-blockquote/dist/index.js
generated
vendored
Normal file
83
node_modules/@tiptap/extension-blockquote/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
// src/blockquote.tsx
|
||||
import { mergeAttributes, Node, wrappingInputRule } from "@tiptap/core";
|
||||
import { jsx } from "@tiptap/core/jsx-runtime";
|
||||
var inputRegex = /^\s*>\s$/;
|
||||
var Blockquote = Node.create({
|
||||
name: "blockquote",
|
||||
addOptions() {
|
||||
return {
|
||||
HTMLAttributes: {}
|
||||
};
|
||||
},
|
||||
content: "block+",
|
||||
group: "block",
|
||||
defining: true,
|
||||
parseHTML() {
|
||||
return [{ tag: "blockquote" }];
|
||||
},
|
||||
renderHTML({ HTMLAttributes }) {
|
||||
return /* @__PURE__ */ jsx("blockquote", { ...mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ jsx("slot", {}) });
|
||||
},
|
||||
parseMarkdown: (token, helpers) => {
|
||||
var _a;
|
||||
const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren;
|
||||
return helpers.createNode("blockquote", void 0, parseBlockChildren(token.tokens || []));
|
||||
},
|
||||
renderMarkdown: (node, h) => {
|
||||
if (!node.content) {
|
||||
return "";
|
||||
}
|
||||
const prefix = ">";
|
||||
const result = [];
|
||||
node.content.forEach((child, index) => {
|
||||
var _a, _b;
|
||||
const childContent = (_b = (_a = h.renderChild) == null ? void 0 : _a.call(h, child, index)) != null ? _b : h.renderChildren([child]);
|
||||
const lines = childContent.split("\n");
|
||||
const linesWithPrefix = lines.map((line) => {
|
||||
if (line.trim() === "") {
|
||||
return prefix;
|
||||
}
|
||||
return `${prefix} ${line}`;
|
||||
});
|
||||
result.push(linesWithPrefix.join("\n"));
|
||||
});
|
||||
return result.join(`
|
||||
${prefix}
|
||||
`);
|
||||
},
|
||||
addCommands() {
|
||||
return {
|
||||
setBlockquote: () => ({ commands }) => {
|
||||
return commands.wrapIn(this.name);
|
||||
},
|
||||
toggleBlockquote: () => ({ commands }) => {
|
||||
return commands.toggleWrap(this.name);
|
||||
},
|
||||
unsetBlockquote: () => ({ commands }) => {
|
||||
return commands.lift(this.name);
|
||||
}
|
||||
};
|
||||
},
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
"Mod-Shift-b": () => this.editor.commands.toggleBlockquote()
|
||||
};
|
||||
},
|
||||
addInputRules() {
|
||||
return [
|
||||
wrappingInputRule({
|
||||
find: inputRegex,
|
||||
type: this.type
|
||||
})
|
||||
];
|
||||
}
|
||||
});
|
||||
|
||||
// src/index.ts
|
||||
var index_default = Blockquote;
|
||||
export {
|
||||
Blockquote,
|
||||
index_default as default,
|
||||
inputRegex
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@tiptap/extension-blockquote/dist/index.js.map
generated
vendored
Normal file
1
node_modules/@tiptap/extension-blockquote/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