@docen/export-docx 0.0.13 → 0.0.14
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.
- package/dist/index.d.mts +28 -4
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -2166,7 +2166,7 @@ can be lifted. Will not go across
|
|
|
2166
2166
|
[isolating](https://prosemirror.net/docs/ref/#model.NodeSpec.isolating) parent nodes.
|
|
2167
2167
|
*/
|
|
2168
2168
|
//#endregion
|
|
2169
|
-
//#region ../../node_modules/.pnpm/prosemirror-view@1.41.
|
|
2169
|
+
//#region ../../node_modules/.pnpm/prosemirror-view@1.41.7/node_modules/prosemirror-view/dist/index.d.ts
|
|
2170
2170
|
type DOMNode = InstanceType<typeof window.Node>;
|
|
2171
2171
|
type WidgetConstructor = ((view: EditorView, getPos: () => number | undefined) => DOMNode) | DOMNode;
|
|
2172
2172
|
/**
|
|
@@ -3672,7 +3672,7 @@ point into textblock nodes. It can be empty (a regular cursor
|
|
|
3672
3672
|
position).
|
|
3673
3673
|
*/
|
|
3674
3674
|
//#endregion
|
|
3675
|
-
//#region ../../node_modules/.pnpm/@tiptap+core@3.20.
|
|
3675
|
+
//#region ../../node_modules/.pnpm/@tiptap+core@3.20.4_@tiptap+pm@3.20.4/node_modules/@tiptap/core/dist/index.d.ts
|
|
3676
3676
|
type StringKeyOf<T> = Extract<keyof T, string>;
|
|
3677
3677
|
type CallbackType<T extends Record<string, any>, EventName extends StringKeyOf<T>> = T[EventName] extends any[] ? T[EventName] : [T[EventName]];
|
|
3678
3678
|
type CallbackFunction<T extends Record<string, any>, EventName extends StringKeyOf<T>> = (...props: CallbackType<T, EventName>) => any;
|
|
@@ -4436,6 +4436,27 @@ interface ExtendableConfig<Options = any, Storage = any, Config extends Extensio
|
|
|
4436
4436
|
* Defines if this markdown element should indent it's child elements
|
|
4437
4437
|
*/
|
|
4438
4438
|
indentsContent?: boolean;
|
|
4439
|
+
/**
|
|
4440
|
+
* Lets a mark tell the Markdown serializer which inline HTML tags it can
|
|
4441
|
+
* safely use when plain markdown delimiters would become ambiguous.
|
|
4442
|
+
*
|
|
4443
|
+
* This is mainly useful for overlapping marks. For example, bold followed
|
|
4444
|
+
* by bold+italic followed by italic cannot always be written back with only
|
|
4445
|
+
* `*` and `**` in a way that still parses correctly. In that case, the
|
|
4446
|
+
* serializer can close the overlapping section with markdown and reopen the
|
|
4447
|
+
* remaining tail with HTML instead.
|
|
4448
|
+
*
|
|
4449
|
+
* Example:
|
|
4450
|
+
* - desired formatting: `**123` + `*456*` + `789 italic`
|
|
4451
|
+
* - serialized result: `**123*456***<em>789</em>`
|
|
4452
|
+
*
|
|
4453
|
+
* If your extension defines custom mark names, set `htmlReopen` on that
|
|
4454
|
+
* extension so the serializer can reuse its HTML form for overlap cases.
|
|
4455
|
+
*/
|
|
4456
|
+
htmlReopen?: {
|
|
4457
|
+
open: string;
|
|
4458
|
+
close: string;
|
|
4459
|
+
};
|
|
4439
4460
|
};
|
|
4440
4461
|
/**
|
|
4441
4462
|
* This function extends the schema of the node.
|
|
@@ -5279,7 +5300,8 @@ type MarkdownToken = {
|
|
|
5279
5300
|
*/
|
|
5280
5301
|
type MarkdownParseHelpers = {
|
|
5281
5302
|
/** Parse an array of inline tokens into text nodes with marks */parseInline: (tokens: MarkdownToken[]) => JSONContent[]; /** Parse an array of block-level tokens */
|
|
5282
|
-
parseChildren: (tokens: MarkdownToken[]) => JSONContent[]; /**
|
|
5303
|
+
parseChildren: (tokens: MarkdownToken[]) => JSONContent[]; /** Parse block-level tokens while preserving implicit empty paragraphs from blank lines */
|
|
5304
|
+
parseBlockChildren?: (tokens: MarkdownToken[]) => JSONContent[]; /** Create a text node with optional marks */
|
|
5283
5305
|
createTextNode: (text: string, marks?: Array<{
|
|
5284
5306
|
type: string;
|
|
5285
5307
|
attrs?: any;
|
|
@@ -5312,6 +5334,7 @@ type RenderContext = {
|
|
|
5312
5334
|
level: number;
|
|
5313
5335
|
meta?: Record<string, any>;
|
|
5314
5336
|
parentType?: string | null;
|
|
5337
|
+
previousNode?: JSONContent | null;
|
|
5315
5338
|
};
|
|
5316
5339
|
/** Extension contract for markdown parsing/serialization. */
|
|
5317
5340
|
/**
|
|
@@ -5345,7 +5368,8 @@ type MarkdownRendererHelpers = {
|
|
|
5345
5368
|
* @param separator An optional separator string (legacy) or RenderContext
|
|
5346
5369
|
* @returns The rendered markdown string
|
|
5347
5370
|
*/
|
|
5348
|
-
renderChildren: (nodes: JSONContent | JSONContent[], separator?: string) => string;
|
|
5371
|
+
renderChildren: (nodes: JSONContent | JSONContent[], separator?: string) => string; /** Render a single child node with its sibling index preserved */
|
|
5372
|
+
renderChild?: (node: JSONContent, index: number) => string;
|
|
5349
5373
|
/**
|
|
5350
5374
|
* Render a text token to a markdown string
|
|
5351
5375
|
* @param prefix The prefix to add before the content
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docen/export-docx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "A powerful TipTap/ProseMirror extension that converts editor content to Microsoft Word DOCX format",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"converter",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"ofetch": "1.5.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@tiptap/core": "3.20.
|
|
58
|
-
"@docen/extensions": "0.0.
|
|
59
|
-
"@docen/utils": "0.0.
|
|
57
|
+
"@tiptap/core": "3.20.4",
|
|
58
|
+
"@docen/extensions": "0.0.14",
|
|
59
|
+
"@docen/utils": "0.0.14"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"dev": "basis build --stub",
|