@docen/extensions 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,7 +5,7 @@ import { Readable } from "node:stream";
|
|
|
5
5
|
type DataType = ArrayBufferLike | Base64 | Blob | DataView | Readable | number[] | ReadableStream | Response | string | Uint8Array;
|
|
6
6
|
type Base64 = string;
|
|
7
7
|
//#endregion
|
|
8
|
-
//#region ../../node_modules/.pnpm/docx-plus@0.1.
|
|
8
|
+
//#region ../../node_modules/.pnpm/docx-plus@0.1.4/node_modules/docx-plus/dist/index.d.mts
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/file/drawing/doc-properties/doc-properties.d.ts
|
|
11
11
|
interface HyperlinkOptions {
|
|
@@ -453,6 +453,7 @@ declare const TextWrappingType: {
|
|
|
453
453
|
readonly SQUARE: 1;
|
|
454
454
|
readonly TIGHT: 2;
|
|
455
455
|
readonly TOP_AND_BOTTOM: 3;
|
|
456
|
+
readonly THROUGH: 4;
|
|
456
457
|
};
|
|
457
458
|
declare const TextWrappingSide: {
|
|
458
459
|
readonly BOTH_SIDES: "bothSides";
|
|
@@ -744,6 +745,7 @@ interface ParagraphNode extends JSONContent {
|
|
|
744
745
|
indentLeft?: string;
|
|
745
746
|
indentRight?: string;
|
|
746
747
|
indentFirstLine?: string;
|
|
748
|
+
indentFirstLineChars?: number;
|
|
747
749
|
spacingBefore?: string;
|
|
748
750
|
spacingAfter?: string;
|
|
749
751
|
shading?: Shading;
|
|
@@ -761,6 +763,7 @@ interface HeadingNode extends JSONContent {
|
|
|
761
763
|
indentLeft?: string;
|
|
762
764
|
indentRight?: string;
|
|
763
765
|
indentFirstLine?: string;
|
|
766
|
+
indentFirstLineChars?: number;
|
|
764
767
|
spacingBefore?: string;
|
|
765
768
|
spacingAfter?: string;
|
|
766
769
|
textAlign?: "left" | "right" | "center" | "justify";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as Subscript, C as ListItem, D as OrderedList, E as Mention, G as UndoRedo, H as Dropcursor, I as TaskItem, L as TaskList, R as Text, S as Link, T as Mathematics, U as Gapcursor, V as Underline, W as TrailingNode, _ as Highlight, a as Code, b as Italic, c as Details, d as Document, f as Emoji, h as HardBreak, i as BulletList, j as Superscript, l as DetailsContent, m as FontSize, n as Blockquote, o as CodeBlockLowlight, p as FontFamily, r as Bold, s as Color, t as BackgroundColor, u as DetailsSummary, v as HorizontalRule, w as ListKeymap, x as LineHeight } from "./_chunks/tiptap-DCQh2d2R.mjs";
|
|
2
|
-
import { r as Border } from "./_chunks/types-
|
|
2
|
+
import { r as Border } from "./_chunks/types-BjQb3EQ3.mjs";
|
|
3
3
|
import * as _$_tiptap_extension_paragraph0 from "@tiptap/extension-paragraph";
|
|
4
4
|
import * as _$_tiptap_extension_heading0 from "@tiptap/extension-heading";
|
|
5
5
|
import * as _$_tiptap_extension_table0 from "@tiptap/extension-table";
|
package/dist/index.mjs
CHANGED
|
@@ -61,6 +61,14 @@ const Heading = Heading$1.extend({ addAttributes() {
|
|
|
61
61
|
parseHTML: (element) => element.style.textIndent || null,
|
|
62
62
|
renderHTML: (attributes) => attributes.indentFirstLine ? { style: `text-indent: ${attributes.indentFirstLine}` } : {}
|
|
63
63
|
},
|
|
64
|
+
indentFirstLineChars: {
|
|
65
|
+
default: null,
|
|
66
|
+
parseHTML: () => null,
|
|
67
|
+
renderHTML: (attributes) => {
|
|
68
|
+
if (attributes.indentFirstLineChars == null) return {};
|
|
69
|
+
return { style: `text-indent: ${attributes.indentFirstLineChars / 100}em` };
|
|
70
|
+
}
|
|
71
|
+
},
|
|
64
72
|
spacingBefore: {
|
|
65
73
|
default: null,
|
|
66
74
|
parseHTML: (element) => element.style.marginTop || null,
|
|
@@ -275,6 +283,14 @@ const Paragraph = Paragraph$1.extend({ addAttributes() {
|
|
|
275
283
|
parseHTML: (element) => element.style.textIndent || null,
|
|
276
284
|
renderHTML: (attributes) => attributes.indentFirstLine ? { style: `text-indent: ${attributes.indentFirstLine}` } : {}
|
|
277
285
|
},
|
|
286
|
+
indentFirstLineChars: {
|
|
287
|
+
default: null,
|
|
288
|
+
parseHTML: () => null,
|
|
289
|
+
renderHTML: (attributes) => {
|
|
290
|
+
if (attributes.indentFirstLineChars == null) return {};
|
|
291
|
+
return { style: `text-indent: ${attributes.indentFirstLineChars / 100}em` };
|
|
292
|
+
}
|
|
293
|
+
},
|
|
278
294
|
spacingBefore: {
|
|
279
295
|
default: null,
|
|
280
296
|
parseHTML: (element) => element.style.marginTop || null,
|
package/dist/types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as TextNode, C as TableCellNode, D as TaskItemNode, E as TableRowNode, O as TaskListNode, S as SourceRectangleOptions, T as TableNode, _ as ListItemNode, a as CodeBlockNode, b as ParagraphNode, c as DetailsSummaryNode, d as HeadingNode, f as HorizontalRuleNode, g as JSONContent, h as ImageOutlineOptions, i as BulletListNode, k as TextContent, l as DocumentNode, m as ImageNode, n as BlockquoteNode, o as DetailsContentNode, p as ImageFloatingOptions, r as Border, s as DetailsNode, t as BlockNode, u as HardBreakNode, v as Mark, w as TableHeaderNode, x as Shading, y as OrderedListNode } from "./_chunks/types-
|
|
1
|
+
import { A as TextNode, C as TableCellNode, D as TaskItemNode, E as TableRowNode, O as TaskListNode, S as SourceRectangleOptions, T as TableNode, _ as ListItemNode, a as CodeBlockNode, b as ParagraphNode, c as DetailsSummaryNode, d as HeadingNode, f as HorizontalRuleNode, g as JSONContent, h as ImageOutlineOptions, i as BulletListNode, k as TextContent, l as DocumentNode, m as ImageNode, n as BlockquoteNode, o as DetailsContentNode, p as ImageFloatingOptions, r as Border, s as DetailsNode, t as BlockNode, u as HardBreakNode, v as Mark, w as TableHeaderNode, x as Shading, y as OrderedListNode } from "./_chunks/types-BjQb3EQ3.mjs";
|
|
2
2
|
export { BlockNode, BlockquoteNode, Border, BulletListNode, CodeBlockNode, DetailsContentNode, DetailsNode, DetailsSummaryNode, DocumentNode, HardBreakNode, HeadingNode, HorizontalRuleNode, ImageFloatingOptions, ImageNode, ImageOutlineOptions, JSONContent, ListItemNode, Mark, OrderedListNode, ParagraphNode, Shading, SourceRectangleOptions, TableCellNode, TableHeaderNode, TableNode, TableRowNode, TaskItemNode, TaskListNode, TextContent, TextNode };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docen/extensions",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "Collection of TipTap extensions with TypeScript type definitions for Docen",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docen",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@tiptap/suggestion": "3.22.4"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"docx-plus": "0.1.
|
|
86
|
+
"docx-plus": "0.1.4"
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|
|
89
89
|
"dev": "basis build --stub",
|