@harbour-enterprises/superdoc 1.16.0-next.6 → 1.16.0-next.7
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/chunks/{SuperConverter-Cd9HUqHQ.cjs → SuperConverter-B48kaj_H.cjs} +4 -8
- package/dist/chunks/{SuperConverter-DE2fH-tH.es.js → SuperConverter-CznIudSr.es.js} +4 -8
- package/dist/chunks/{src-Du7efvwq.cjs → src-CewEM46_.cjs} +60 -38
- package/dist/chunks/{src-CcgxJ3vP.es.js → src-DWOYLL40.es.js} +60 -38
- package/dist/super-editor/converter.cjs +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/src/core/commands/insertHeadingAt.d.ts +2 -1
- package/dist/super-editor/src/core/commands/insertHeadingAt.d.ts.map +1 -1
- package/dist/super-editor/src/core/commands/insertParagraphAt.d.ts +2 -1
- package/dist/super-editor/src/core/commands/insertParagraphAt.d.ts.map +1 -1
- package/dist/super-editor/src/core/helpers/generateDocxRandomId.d.ts +2 -2
- package/dist/super-editor/src/core/helpers/generateDocxRandomId.d.ts.map +1 -1
- package/dist/super-editor/src/document-api-adapters/create-adapter.d.ts.map +1 -1
- package/dist/super-editor/src/document-api-adapters/helpers/node-address-resolver.d.ts.map +1 -1
- package/dist/super-editor.cjs +2 -2
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +64 -46
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -7133,14 +7133,11 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
|
|
|
7133
7133
|
return runs;
|
|
7134
7134
|
};
|
|
7135
7135
|
function generateDocxRandomId(length = 8) {
|
|
7136
|
-
return Math.floor(Math.random() * 2147483648).toString(16).padStart(length, "0").slice(0, length);
|
|
7136
|
+
return Math.floor(Math.random() * 2147483648).toString(16).toUpperCase().padStart(length, "0").slice(0, length);
|
|
7137
7137
|
}
|
|
7138
7138
|
function generateRandomSigned32BitIntStrId() {
|
|
7139
7139
|
return Math.floor(Math.random() * 2147483647).toString();
|
|
7140
7140
|
}
|
|
7141
|
-
function generateRandom32BitHex() {
|
|
7142
|
-
return Math.floor(Math.random() * 2147483647).toString(16).toUpperCase().padStart(8, "0");
|
|
7143
|
-
}
|
|
7144
7141
|
var XML_NODE_NAME$24 = "w:hyperlink";
|
|
7145
7142
|
var SD_NODE_NAME$21 = "link";
|
|
7146
7143
|
var _createAttributeHandler = (xmlName, sdName) => ({
|
|
@@ -22343,7 +22340,6 @@ var helpers_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
|
|
|
22343
22340
|
findParentNodeClosestToPos: () => findParentNodeClosestToPos,
|
|
22344
22341
|
generateDocxListAttributes: () => generateDocxListAttributes,
|
|
22345
22342
|
generateDocxRandomId: () => generateDocxRandomId,
|
|
22346
|
-
generateRandom32BitHex: () => generateRandom32BitHex,
|
|
22347
22343
|
generateRandomSigned32BitIntStrId: () => generateRandomSigned32BitIntStrId,
|
|
22348
22344
|
getActiveFormatting: () => getActiveFormatting,
|
|
22349
22345
|
getExtensionConfigField: () => getExtensionConfigField,
|
|
@@ -33029,7 +33025,7 @@ var DocxExporter = class {
|
|
|
33029
33025
|
const prepareCommentParaIds = (comment) => {
|
|
33030
33026
|
return {
|
|
33031
33027
|
...comment,
|
|
33032
|
-
commentParaId:
|
|
33028
|
+
commentParaId: generateDocxRandomId()
|
|
33033
33029
|
};
|
|
33034
33030
|
};
|
|
33035
33031
|
const getCommentDefinition = (comment, commentId, allComments, editor) => {
|
|
@@ -33148,7 +33144,7 @@ const updateCommentsIdsAndExtensible = (comments = [], commentsIds, extensible)
|
|
|
33148
33144
|
if (documentIdsUpdated) documentIdsUpdated.elements[0].elements = [];
|
|
33149
33145
|
if (extensibleUpdated) extensibleUpdated.elements[0].elements = [];
|
|
33150
33146
|
comments.forEach((comment) => {
|
|
33151
|
-
const newDurableId =
|
|
33147
|
+
const newDurableId = generateDocxRandomId();
|
|
33152
33148
|
if (documentIdsUpdated) documentIdsUpdated.elements[0].elements.push({
|
|
33153
33149
|
type: "element",
|
|
33154
33150
|
name: "w16cid:commentId",
|
|
@@ -33830,7 +33826,7 @@ var SuperConverter = class SuperConverter {
|
|
|
33830
33826
|
static getStoredSuperdocVersion(docx) {
|
|
33831
33827
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
33832
33828
|
}
|
|
33833
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.16.0-next.
|
|
33829
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.16.0-next.7") {
|
|
33834
33830
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
33835
33831
|
}
|
|
33836
33832
|
static generateWordTimestamp() {
|
|
@@ -7123,14 +7123,11 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
|
|
|
7123
7123
|
return runs;
|
|
7124
7124
|
};
|
|
7125
7125
|
function generateDocxRandomId(length = 8) {
|
|
7126
|
-
return Math.floor(Math.random() * 2147483648).toString(16).padStart(length, "0").slice(0, length);
|
|
7126
|
+
return Math.floor(Math.random() * 2147483648).toString(16).toUpperCase().padStart(length, "0").slice(0, length);
|
|
7127
7127
|
}
|
|
7128
7128
|
function generateRandomSigned32BitIntStrId() {
|
|
7129
7129
|
return Math.floor(Math.random() * 2147483647).toString();
|
|
7130
7130
|
}
|
|
7131
|
-
function generateRandom32BitHex() {
|
|
7132
|
-
return Math.floor(Math.random() * 2147483647).toString(16).toUpperCase().padStart(8, "0");
|
|
7133
|
-
}
|
|
7134
7131
|
var XML_NODE_NAME$24 = "w:hyperlink";
|
|
7135
7132
|
var SD_NODE_NAME$21 = "link";
|
|
7136
7133
|
var _createAttributeHandler = (xmlName, sdName) => ({
|
|
@@ -22337,7 +22334,6 @@ var helpers_exports = /* @__PURE__ */ __export({
|
|
|
22337
22334
|
findParentNodeClosestToPos: () => findParentNodeClosestToPos,
|
|
22338
22335
|
generateDocxListAttributes: () => generateDocxListAttributes,
|
|
22339
22336
|
generateDocxRandomId: () => generateDocxRandomId,
|
|
22340
|
-
generateRandom32BitHex: () => generateRandom32BitHex,
|
|
22341
22337
|
generateRandomSigned32BitIntStrId: () => generateRandomSigned32BitIntStrId,
|
|
22342
22338
|
getActiveFormatting: () => getActiveFormatting,
|
|
22343
22339
|
getExtensionConfigField: () => getExtensionConfigField,
|
|
@@ -33015,7 +33011,7 @@ var DocxExporter = class {
|
|
|
33015
33011
|
const prepareCommentParaIds = (comment) => {
|
|
33016
33012
|
return {
|
|
33017
33013
|
...comment,
|
|
33018
|
-
commentParaId:
|
|
33014
|
+
commentParaId: generateDocxRandomId()
|
|
33019
33015
|
};
|
|
33020
33016
|
};
|
|
33021
33017
|
const getCommentDefinition = (comment, commentId, allComments, editor) => {
|
|
@@ -33134,7 +33130,7 @@ const updateCommentsIdsAndExtensible = (comments = [], commentsIds, extensible)
|
|
|
33134
33130
|
if (documentIdsUpdated) documentIdsUpdated.elements[0].elements = [];
|
|
33135
33131
|
if (extensibleUpdated) extensibleUpdated.elements[0].elements = [];
|
|
33136
33132
|
comments.forEach((comment) => {
|
|
33137
|
-
const newDurableId =
|
|
33133
|
+
const newDurableId = generateDocxRandomId();
|
|
33138
33134
|
if (documentIdsUpdated) documentIdsUpdated.elements[0].elements.push({
|
|
33139
33135
|
type: "element",
|
|
33140
33136
|
name: "w16cid:commentId",
|
|
@@ -33816,7 +33812,7 @@ var SuperConverter = class SuperConverter {
|
|
|
33816
33812
|
static getStoredSuperdocVersion(docx) {
|
|
33817
33813
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
33818
33814
|
}
|
|
33819
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.16.0-next.
|
|
33815
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.16.0-next.7") {
|
|
33820
33816
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
33821
33817
|
}
|
|
33822
33818
|
static generateWordTimestamp() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-Dp2H1eGw.cjs");
|
|
2
|
-
const require_SuperConverter = require("./SuperConverter-
|
|
2
|
+
const require_SuperConverter = require("./SuperConverter-B48kaj_H.cjs");
|
|
3
3
|
const require_jszip = require("./jszip-DCT9QYaK.cjs");
|
|
4
4
|
const require_uuid = require("./uuid-CHj_rjgt.cjs");
|
|
5
5
|
const require_constants = require("./constants-CpniKo9Z.cjs");
|
|
@@ -261,7 +261,7 @@ var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
|
261
261
|
const COMMUNITY_LICENSE_KEY = "community-and-eval-agplv3";
|
|
262
262
|
function getSuperdocVersion() {
|
|
263
263
|
try {
|
|
264
|
-
return "1.16.0-next.
|
|
264
|
+
return "1.16.0-next.7";
|
|
265
265
|
} catch {
|
|
266
266
|
return "unknown";
|
|
267
267
|
}
|
|
@@ -11144,11 +11144,14 @@ const insertContentAt = (position, value, options) => ({ tr, dispatch, editor })
|
|
|
11144
11144
|
});
|
|
11145
11145
|
return true;
|
|
11146
11146
|
};
|
|
11147
|
-
const insertParagraphAt = ({ pos, text = "", sdBlockId, tracked }) => ({ state, dispatch }) => {
|
|
11147
|
+
const insertParagraphAt = ({ pos, text = "", sdBlockId, paraId, tracked }) => ({ state, dispatch }) => {
|
|
11148
11148
|
const paragraphType = state.schema.nodes.paragraph;
|
|
11149
11149
|
if (!paragraphType) return false;
|
|
11150
11150
|
if (!Number.isInteger(pos) || pos < 0 || pos > state.doc.content.size) return false;
|
|
11151
|
-
const attrs =
|
|
11151
|
+
const attrs = {
|
|
11152
|
+
...sdBlockId ? { sdBlockId } : void 0,
|
|
11153
|
+
...paraId ? { paraId } : void 0
|
|
11154
|
+
};
|
|
11152
11155
|
const normalizedText = typeof text === "string" ? text : "";
|
|
11153
11156
|
const textNode = normalizedText.length > 0 ? state.schema.text(normalizedText) : null;
|
|
11154
11157
|
let paragraphNode;
|
|
@@ -11170,13 +11173,14 @@ const insertParagraphAt = ({ pos, text = "", sdBlockId, tracked }) => ({ state,
|
|
|
11170
11173
|
return false;
|
|
11171
11174
|
}
|
|
11172
11175
|
};
|
|
11173
|
-
const insertHeadingAt = ({ pos, level, text = "", sdBlockId, tracked }) => ({ state, dispatch }) => {
|
|
11176
|
+
const insertHeadingAt = ({ pos, level, text = "", sdBlockId, paraId, tracked }) => ({ state, dispatch }) => {
|
|
11174
11177
|
const paragraphType = state.schema.nodes.paragraph;
|
|
11175
11178
|
if (!paragraphType) return false;
|
|
11176
11179
|
if (!Number.isInteger(pos) || pos < 0 || pos > state.doc.content.size) return false;
|
|
11177
11180
|
if (!Number.isInteger(level) || level < 1 || level > 6) return false;
|
|
11178
11181
|
const attrs = {
|
|
11179
11182
|
...sdBlockId ? { sdBlockId } : void 0,
|
|
11183
|
+
...paraId ? { paraId } : void 0,
|
|
11180
11184
|
paragraphProperties: { styleId: `Heading${level}` }
|
|
11181
11185
|
};
|
|
11182
11186
|
const normalizedText = typeof text === "string" ? text : "";
|
|
@@ -20730,7 +20734,7 @@ const canUseDOM = () => {
|
|
|
20730
20734
|
return false;
|
|
20731
20735
|
}
|
|
20732
20736
|
};
|
|
20733
|
-
var summaryVersion = "1.16.0-next.
|
|
20737
|
+
var summaryVersion = "1.16.0-next.7";
|
|
20734
20738
|
var nodeKeys = [
|
|
20735
20739
|
"group",
|
|
20736
20740
|
"content",
|
|
@@ -23945,8 +23949,13 @@ function toBlockAddress(candidate) {
|
|
|
23945
23949
|
nodeId: candidate.nodeId
|
|
23946
23950
|
};
|
|
23947
23951
|
}
|
|
23948
|
-
|
|
23949
|
-
|
|
23952
|
+
var ALIAS_ELIGIBLE_TYPES = new Set([
|
|
23953
|
+
"paragraph",
|
|
23954
|
+
"heading",
|
|
23955
|
+
"listItem"
|
|
23956
|
+
]);
|
|
23957
|
+
function resolveBlockAliasId(node, nodeType, primaryId) {
|
|
23958
|
+
if (!ALIAS_ELIGIBLE_TYPES.has(nodeType)) return void 0;
|
|
23950
23959
|
const attrs = node.attrs;
|
|
23951
23960
|
const sdBlockId = toId(attrs?.sdBlockId);
|
|
23952
23961
|
if (sdBlockId && sdBlockId !== primaryId) return sdBlockId;
|
|
@@ -23975,7 +23984,7 @@ function buildBlockIndex(editor) {
|
|
|
23975
23984
|
};
|
|
23976
23985
|
candidates.push(candidate);
|
|
23977
23986
|
registerKey(`${nodeType}:${nodeId}`, candidate);
|
|
23978
|
-
const aliasId =
|
|
23987
|
+
const aliasId = resolveBlockAliasId(node, nodeType, nodeId);
|
|
23979
23988
|
if (aliasId) registerKey(`${nodeType}:${aliasId}`, candidate);
|
|
23980
23989
|
});
|
|
23981
23990
|
return {
|
|
@@ -23994,7 +24003,20 @@ function findBlockByNodeIdOnly(index, nodeId) {
|
|
|
23994
24003
|
nodeId,
|
|
23995
24004
|
count: matches.length
|
|
23996
24005
|
});
|
|
23997
|
-
|
|
24006
|
+
const aliasMatches = /* @__PURE__ */ new Map();
|
|
24007
|
+
for (const [key$1, candidate] of index.byId) {
|
|
24008
|
+
if (!key$1.endsWith(`:${nodeId}`)) continue;
|
|
24009
|
+
aliasMatches.set(`${candidate.nodeType}:${candidate.nodeId}`, candidate);
|
|
24010
|
+
}
|
|
24011
|
+
if (aliasMatches.size === 1) return Array.from(aliasMatches.values())[0];
|
|
24012
|
+
if (aliasMatches.size > 1) throw new DocumentApiAdapterError("AMBIGUOUS_TARGET", `Multiple blocks share nodeId "${nodeId}" via aliases.`, {
|
|
24013
|
+
nodeId,
|
|
24014
|
+
count: aliasMatches.size,
|
|
24015
|
+
matches: Array.from(aliasMatches.values()).map((candidate) => ({
|
|
24016
|
+
nodeType: candidate.nodeType,
|
|
24017
|
+
nodeId: candidate.nodeId
|
|
24018
|
+
}))
|
|
24019
|
+
});
|
|
23998
24020
|
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", `Block with nodeId "${nodeId}" was not found.`, { nodeId });
|
|
23999
24021
|
}
|
|
24000
24022
|
function isTextBlockCandidate(candidate) {
|
|
@@ -24988,19 +25010,17 @@ function resolveParagraphInsertPosition(editor, input) {
|
|
|
24988
25010
|
if (!target) throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Create paragraph target block was not found.", { target: hasTarget ? location$1.target : location$1.nodeId });
|
|
24989
25011
|
return location$1.kind === "before" ? target.pos : target.end;
|
|
24990
25012
|
}
|
|
24991
|
-
function resolveCreatedParagraph(editor,
|
|
25013
|
+
function resolveCreatedParagraph(editor, paraId) {
|
|
24992
25014
|
const index = getBlockIndex(editor);
|
|
24993
|
-
const resolved = index.byId.get(`paragraph:${
|
|
25015
|
+
const resolved = index.byId.get(`paragraph:${paraId}`);
|
|
24994
25016
|
if (resolved) return resolved;
|
|
24995
|
-
const
|
|
25017
|
+
const byAttr = index.candidates.find((candidate) => {
|
|
24996
25018
|
if (candidate.nodeType !== "paragraph") return false;
|
|
24997
25019
|
const attrs = candidate.node.attrs;
|
|
24998
|
-
return typeof attrs?.
|
|
25020
|
+
return typeof attrs?.paraId === "string" && attrs.paraId === paraId;
|
|
24999
25021
|
});
|
|
25000
|
-
if (
|
|
25001
|
-
|
|
25002
|
-
if (fallback) return fallback;
|
|
25003
|
-
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Created paragraph could not be resolved after insertion.", { paragraphId });
|
|
25022
|
+
if (byAttr) return byAttr;
|
|
25023
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Created paragraph could not be resolved after insertion.", { paraId });
|
|
25004
25024
|
}
|
|
25005
25025
|
function buildParagraphCreateSuccess(paragraphNodeId, trackedChangeRefs) {
|
|
25006
25026
|
return {
|
|
@@ -25055,11 +25075,13 @@ function createParagraphAdapter(editor, input, options) {
|
|
|
25055
25075
|
}
|
|
25056
25076
|
};
|
|
25057
25077
|
}
|
|
25058
|
-
const
|
|
25078
|
+
const sdBlockId = require_uuid.v4_default();
|
|
25079
|
+
const paraId = require_SuperConverter.generateDocxRandomId();
|
|
25059
25080
|
if (!insertParagraphAt$1({
|
|
25060
25081
|
pos: insertAt,
|
|
25061
25082
|
text: input.text,
|
|
25062
|
-
sdBlockId
|
|
25083
|
+
sdBlockId,
|
|
25084
|
+
paraId,
|
|
25063
25085
|
tracked: mode === "tracked"
|
|
25064
25086
|
})) return {
|
|
25065
25087
|
success: false,
|
|
@@ -25070,10 +25092,10 @@ function createParagraphAdapter(editor, input, options) {
|
|
|
25070
25092
|
};
|
|
25071
25093
|
clearIndexCache(editor);
|
|
25072
25094
|
try {
|
|
25073
|
-
const paragraph = resolveCreatedParagraph(editor,
|
|
25074
|
-
return buildParagraphCreateSuccess(
|
|
25095
|
+
const paragraph = resolveCreatedParagraph(editor, paraId);
|
|
25096
|
+
return buildParagraphCreateSuccess(paraId, mode === "tracked" ? collectTrackInsertRefsInRange(editor, paragraph.pos, paragraph.end) : void 0);
|
|
25075
25097
|
} catch {
|
|
25076
|
-
return buildParagraphCreateSuccess(
|
|
25098
|
+
return buildParagraphCreateSuccess(paraId);
|
|
25077
25099
|
}
|
|
25078
25100
|
}
|
|
25079
25101
|
function resolveHeadingInsertPosition(editor, input) {
|
|
@@ -25086,19 +25108,17 @@ function resolveHeadingInsertPosition(editor, input) {
|
|
|
25086
25108
|
if (!target) throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Create heading target block was not found.", { target: hasTarget ? location$1.target : location$1.nodeId });
|
|
25087
25109
|
return location$1.kind === "before" ? target.pos : target.end;
|
|
25088
25110
|
}
|
|
25089
|
-
function resolveCreatedHeading(editor,
|
|
25111
|
+
function resolveCreatedHeading(editor, paraId) {
|
|
25090
25112
|
const index = getBlockIndex(editor);
|
|
25091
|
-
const resolved = index.byId.get(`heading:${
|
|
25113
|
+
const resolved = index.byId.get(`heading:${paraId}`);
|
|
25092
25114
|
if (resolved) return resolved;
|
|
25093
|
-
const
|
|
25115
|
+
const byAttr = index.candidates.find((candidate) => {
|
|
25094
25116
|
if (candidate.nodeType !== "heading") return false;
|
|
25095
25117
|
const attrs = candidate.node.attrs;
|
|
25096
|
-
return typeof attrs?.
|
|
25118
|
+
return typeof attrs?.paraId === "string" && attrs.paraId === paraId;
|
|
25097
25119
|
});
|
|
25098
|
-
if (
|
|
25099
|
-
|
|
25100
|
-
if (fallback) return fallback;
|
|
25101
|
-
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Created heading could not be resolved after insertion.", { headingId });
|
|
25120
|
+
if (byAttr) return byAttr;
|
|
25121
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Created heading could not be resolved after insertion.", { paraId });
|
|
25102
25122
|
}
|
|
25103
25123
|
function buildHeadingCreateSuccess(headingNodeId, trackedChangeRefs) {
|
|
25104
25124
|
return {
|
|
@@ -25154,12 +25174,14 @@ function createHeadingAdapter(editor, input, options) {
|
|
|
25154
25174
|
}
|
|
25155
25175
|
};
|
|
25156
25176
|
}
|
|
25157
|
-
const
|
|
25177
|
+
const sdBlockId = require_uuid.v4_default();
|
|
25178
|
+
const paraId = require_SuperConverter.generateDocxRandomId();
|
|
25158
25179
|
if (!insertHeadingAt$1({
|
|
25159
25180
|
pos: insertAt,
|
|
25160
25181
|
level: input.level,
|
|
25161
25182
|
text: input.text,
|
|
25162
|
-
sdBlockId
|
|
25183
|
+
sdBlockId,
|
|
25184
|
+
paraId,
|
|
25163
25185
|
tracked: mode === "tracked"
|
|
25164
25186
|
})) return {
|
|
25165
25187
|
success: false,
|
|
@@ -25170,10 +25192,10 @@ function createHeadingAdapter(editor, input, options) {
|
|
|
25170
25192
|
};
|
|
25171
25193
|
clearIndexCache(editor);
|
|
25172
25194
|
try {
|
|
25173
|
-
const heading = resolveCreatedHeading(editor,
|
|
25174
|
-
return buildHeadingCreateSuccess(
|
|
25195
|
+
const heading = resolveCreatedHeading(editor, paraId);
|
|
25196
|
+
return buildHeadingCreateSuccess(paraId, mode === "tracked" ? collectTrackInsertRefsInRange(editor, heading.pos, heading.end) : void 0);
|
|
25175
25197
|
} catch {
|
|
25176
|
-
return buildHeadingCreateSuccess(
|
|
25198
|
+
return buildHeadingCreateSuccess(paraId);
|
|
25177
25199
|
}
|
|
25178
25200
|
}
|
|
25179
25201
|
function resolveMeasurement(value) {
|
|
@@ -25586,7 +25608,7 @@ var KNOWN_INLINE_PM_NODE_TYPES = new Set([
|
|
|
25586
25608
|
]);
|
|
25587
25609
|
function resolveUnknownBlockId(attrs) {
|
|
25588
25610
|
if (!attrs) return void 0;
|
|
25589
|
-
return toId(attrs.
|
|
25611
|
+
return toId(attrs.paraId) ?? toId(attrs.sdBlockId) ?? toId(attrs.blockId) ?? toId(attrs.id) ?? toId(attrs.uuid);
|
|
25590
25612
|
}
|
|
25591
25613
|
function isDualKindType(nodeType) {
|
|
25592
25614
|
return Boolean(nodeType && DUAL_KIND_TYPES.has(nodeType));
|
|
@@ -28158,7 +28180,7 @@ var Editor = class Editor extends EventEmitter$1 {
|
|
|
28158
28180
|
return migrations.length > 0;
|
|
28159
28181
|
}
|
|
28160
28182
|
processCollaborationMigrations() {
|
|
28161
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.16.0-next.
|
|
28183
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.16.0-next.7");
|
|
28162
28184
|
if (!this.options.ydoc) return;
|
|
28163
28185
|
let docVersion = this.options.ydoc.getMap("meta").get("version");
|
|
28164
28186
|
if (!docVersion) docVersion = "initial";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __toCommonJS, n as __esmMin, r as __export, t as __commonJSMin } from "./rolldown-runtime-B2q5OVn9.es.js";
|
|
2
|
-
import { $ as TextSelection$1, A as findMark, At as Mark$1, B as defaultBlockAt$1, C as docxNumberingHelpers, Ct as TrackDeleteMarkName, D as posToDOMRect, Dt as DOMParser$1, E as isInTable, Et as carbonCopy, F as isMarkActive, Ft as getExtensionConfigField, G as createDocument, H as getNodeType, I as getMarkRange, J as NodeSelection, K as AllSelection, L as isTextSelection, M as isActive, Mt as Slice, N as isNodeActive, Nt as minMax, O as findChildren$1, Ot as DOMSerializer, P as getSchemaTypeNameByName, Pt as callOrGet, Q as SelectionRange, R as findParentNode, S as getResolvedParagraphProperties, St as getUnderlineCssString, T as CommandService, Tt as TrackInsertMarkName, U as cleanSchemaItem, V as getMarkType, W as getSchemaTypeByName, X as PluginKey, Y as Plugin, Z as Selection, _ as ListHelpers, _t as encodeMarksFromRPr, a as _getReferencedTableStyles, at as Transform, b as isList, bt as resolveRunProperties, c as processContent, ct as dropPoint, d as createCellBorders, dt as replaceStep$1, et as AddMarkStep, f as InputRule, ft as generateDocxRandomId, g as unflattenListsInHtml, gt as encodeCSSFromRPr, h as inputRulesPlugin, ht as encodeCSSFromPPr, it as ReplaceStep, j as getMarksFromSelection, jt as Schema$1, k as getActiveFormatting, kt as Fragment$1, l as createDocFromMarkdown, lt as joinPoint, m as htmlHandler, mt as decodeRPrFromMarks, n as kebabCase$1, nt as RemoveMarkStep, o as helpers_exports, ot as canJoin, p as handleClipboardPaste, pt as generateRandomSigned32BitIntStrId, q as EditorState, r as insertNewRelationship, rt as ReplaceAroundStep$1, s as updateDOMAttributes, st as canSplit, t as SuperConverter, tt as Mapping, u as createDocFromHTML, ut as liftTarget, v as changeListLevel, vt as resolveDocxFontFamily, w as generateOrderedListIndex, wt as TrackFormatMarkName, x as calculateResolvedParagraphProperties, xt as resolveTableCellProperties, y as updateNumberingProperties, yt as resolveParagraphProperties, z as findParentNodeClosestToPos } from "./SuperConverter-
|
|
2
|
+
import { $ as TextSelection$1, A as findMark, At as Mark$1, B as defaultBlockAt$1, C as docxNumberingHelpers, Ct as TrackDeleteMarkName, D as posToDOMRect, Dt as DOMParser$1, E as isInTable, Et as carbonCopy, F as isMarkActive, Ft as getExtensionConfigField, G as createDocument, H as getNodeType, I as getMarkRange, J as NodeSelection, K as AllSelection, L as isTextSelection, M as isActive, Mt as Slice, N as isNodeActive, Nt as minMax, O as findChildren$1, Ot as DOMSerializer, P as getSchemaTypeNameByName, Pt as callOrGet, Q as SelectionRange, R as findParentNode, S as getResolvedParagraphProperties, St as getUnderlineCssString, T as CommandService, Tt as TrackInsertMarkName, U as cleanSchemaItem, V as getMarkType, W as getSchemaTypeByName, X as PluginKey, Y as Plugin, Z as Selection, _ as ListHelpers, _t as encodeMarksFromRPr, a as _getReferencedTableStyles, at as Transform, b as isList, bt as resolveRunProperties, c as processContent, ct as dropPoint, d as createCellBorders, dt as replaceStep$1, et as AddMarkStep, f as InputRule, ft as generateDocxRandomId, g as unflattenListsInHtml, gt as encodeCSSFromRPr, h as inputRulesPlugin, ht as encodeCSSFromPPr, it as ReplaceStep, j as getMarksFromSelection, jt as Schema$1, k as getActiveFormatting, kt as Fragment$1, l as createDocFromMarkdown, lt as joinPoint, m as htmlHandler, mt as decodeRPrFromMarks, n as kebabCase$1, nt as RemoveMarkStep, o as helpers_exports, ot as canJoin, p as handleClipboardPaste, pt as generateRandomSigned32BitIntStrId, q as EditorState, r as insertNewRelationship, rt as ReplaceAroundStep$1, s as updateDOMAttributes, st as canSplit, t as SuperConverter, tt as Mapping, u as createDocFromHTML, ut as liftTarget, v as changeListLevel, vt as resolveDocxFontFamily, w as generateOrderedListIndex, wt as TrackFormatMarkName, x as calculateResolvedParagraphProperties, xt as resolveTableCellProperties, y as updateNumberingProperties, yt as resolveParagraphProperties, z as findParentNodeClosestToPos } from "./SuperConverter-CznIudSr.es.js";
|
|
3
3
|
import { a as init_dist$2, i as global, n as init_dist, o as Buffer$3, r as process$1, s as init_dist$1 } from "./jszip-ChlR43oI.es.js";
|
|
4
4
|
import { t as v4_default } from "./uuid-2IzDu5nl.es.js";
|
|
5
5
|
import { A as resolveOpcTargetPath, E as pixelsToTwips, F as twipsToLines, I as twipsToPixels, P as twipsToInches, _ as halfPointToPoints, c as convertSizeToCSS, k as ptToTwips, p as getArrayBufferFromUrl, t as COMMENT_FILE_BASENAMES, v as inchesToPixels, x as linesToTwips, y as inchesToTwips } from "./constants-DBKi0Amm.es.js";
|
|
@@ -260,7 +260,7 @@ var v_click_outside_default = {
|
|
|
260
260
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
261
261
|
function getSuperdocVersion() {
|
|
262
262
|
try {
|
|
263
|
-
return "1.16.0-next.
|
|
263
|
+
return "1.16.0-next.7";
|
|
264
264
|
} catch {
|
|
265
265
|
return "unknown";
|
|
266
266
|
}
|
|
@@ -11125,11 +11125,14 @@ const insertContentAt = (position, value, options) => ({ tr, dispatch, editor })
|
|
|
11125
11125
|
});
|
|
11126
11126
|
return true;
|
|
11127
11127
|
};
|
|
11128
|
-
const insertParagraphAt = ({ pos, text = "", sdBlockId, tracked }) => ({ state, dispatch }) => {
|
|
11128
|
+
const insertParagraphAt = ({ pos, text = "", sdBlockId, paraId, tracked }) => ({ state, dispatch }) => {
|
|
11129
11129
|
const paragraphType = state.schema.nodes.paragraph;
|
|
11130
11130
|
if (!paragraphType) return false;
|
|
11131
11131
|
if (!Number.isInteger(pos) || pos < 0 || pos > state.doc.content.size) return false;
|
|
11132
|
-
const attrs =
|
|
11132
|
+
const attrs = {
|
|
11133
|
+
...sdBlockId ? { sdBlockId } : void 0,
|
|
11134
|
+
...paraId ? { paraId } : void 0
|
|
11135
|
+
};
|
|
11133
11136
|
const normalizedText = typeof text === "string" ? text : "";
|
|
11134
11137
|
const textNode = normalizedText.length > 0 ? state.schema.text(normalizedText) : null;
|
|
11135
11138
|
let paragraphNode;
|
|
@@ -11151,13 +11154,14 @@ const insertParagraphAt = ({ pos, text = "", sdBlockId, tracked }) => ({ state,
|
|
|
11151
11154
|
return false;
|
|
11152
11155
|
}
|
|
11153
11156
|
};
|
|
11154
|
-
const insertHeadingAt = ({ pos, level, text = "", sdBlockId, tracked }) => ({ state, dispatch }) => {
|
|
11157
|
+
const insertHeadingAt = ({ pos, level, text = "", sdBlockId, paraId, tracked }) => ({ state, dispatch }) => {
|
|
11155
11158
|
const paragraphType = state.schema.nodes.paragraph;
|
|
11156
11159
|
if (!paragraphType) return false;
|
|
11157
11160
|
if (!Number.isInteger(pos) || pos < 0 || pos > state.doc.content.size) return false;
|
|
11158
11161
|
if (!Number.isInteger(level) || level < 1 || level > 6) return false;
|
|
11159
11162
|
const attrs = {
|
|
11160
11163
|
...sdBlockId ? { sdBlockId } : void 0,
|
|
11164
|
+
...paraId ? { paraId } : void 0,
|
|
11161
11165
|
paragraphProperties: { styleId: `Heading${level}` }
|
|
11162
11166
|
};
|
|
11163
11167
|
const normalizedText = typeof text === "string" ? text : "";
|
|
@@ -20711,7 +20715,7 @@ const canUseDOM = () => {
|
|
|
20711
20715
|
return false;
|
|
20712
20716
|
}
|
|
20713
20717
|
};
|
|
20714
|
-
var summaryVersion = "1.16.0-next.
|
|
20718
|
+
var summaryVersion = "1.16.0-next.7";
|
|
20715
20719
|
var nodeKeys = [
|
|
20716
20720
|
"group",
|
|
20717
20721
|
"content",
|
|
@@ -23681,8 +23685,13 @@ function toBlockAddress(candidate) {
|
|
|
23681
23685
|
nodeId: candidate.nodeId
|
|
23682
23686
|
};
|
|
23683
23687
|
}
|
|
23684
|
-
|
|
23685
|
-
|
|
23688
|
+
var ALIAS_ELIGIBLE_TYPES = new Set([
|
|
23689
|
+
"paragraph",
|
|
23690
|
+
"heading",
|
|
23691
|
+
"listItem"
|
|
23692
|
+
]);
|
|
23693
|
+
function resolveBlockAliasId(node, nodeType, primaryId) {
|
|
23694
|
+
if (!ALIAS_ELIGIBLE_TYPES.has(nodeType)) return void 0;
|
|
23686
23695
|
const attrs = node.attrs;
|
|
23687
23696
|
const sdBlockId = toId(attrs?.sdBlockId);
|
|
23688
23697
|
if (sdBlockId && sdBlockId !== primaryId) return sdBlockId;
|
|
@@ -23711,7 +23720,7 @@ function buildBlockIndex(editor) {
|
|
|
23711
23720
|
};
|
|
23712
23721
|
candidates.push(candidate);
|
|
23713
23722
|
registerKey(`${nodeType}:${nodeId}`, candidate);
|
|
23714
|
-
const aliasId =
|
|
23723
|
+
const aliasId = resolveBlockAliasId(node, nodeType, nodeId);
|
|
23715
23724
|
if (aliasId) registerKey(`${nodeType}:${aliasId}`, candidate);
|
|
23716
23725
|
});
|
|
23717
23726
|
return {
|
|
@@ -23730,7 +23739,20 @@ function findBlockByNodeIdOnly(index, nodeId) {
|
|
|
23730
23739
|
nodeId,
|
|
23731
23740
|
count: matches.length
|
|
23732
23741
|
});
|
|
23733
|
-
|
|
23742
|
+
const aliasMatches = /* @__PURE__ */ new Map();
|
|
23743
|
+
for (const [key$1, candidate] of index.byId) {
|
|
23744
|
+
if (!key$1.endsWith(`:${nodeId}`)) continue;
|
|
23745
|
+
aliasMatches.set(`${candidate.nodeType}:${candidate.nodeId}`, candidate);
|
|
23746
|
+
}
|
|
23747
|
+
if (aliasMatches.size === 1) return Array.from(aliasMatches.values())[0];
|
|
23748
|
+
if (aliasMatches.size > 1) throw new DocumentApiAdapterError("AMBIGUOUS_TARGET", `Multiple blocks share nodeId "${nodeId}" via aliases.`, {
|
|
23749
|
+
nodeId,
|
|
23750
|
+
count: aliasMatches.size,
|
|
23751
|
+
matches: Array.from(aliasMatches.values()).map((candidate) => ({
|
|
23752
|
+
nodeType: candidate.nodeType,
|
|
23753
|
+
nodeId: candidate.nodeId
|
|
23754
|
+
}))
|
|
23755
|
+
});
|
|
23734
23756
|
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", `Block with nodeId "${nodeId}" was not found.`, { nodeId });
|
|
23735
23757
|
}
|
|
23736
23758
|
function isTextBlockCandidate(candidate) {
|
|
@@ -24724,19 +24746,17 @@ function resolveParagraphInsertPosition(editor, input) {
|
|
|
24724
24746
|
if (!target) throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Create paragraph target block was not found.", { target: hasTarget ? location$1.target : location$1.nodeId });
|
|
24725
24747
|
return location$1.kind === "before" ? target.pos : target.end;
|
|
24726
24748
|
}
|
|
24727
|
-
function resolveCreatedParagraph(editor,
|
|
24749
|
+
function resolveCreatedParagraph(editor, paraId) {
|
|
24728
24750
|
const index = getBlockIndex(editor);
|
|
24729
|
-
const resolved = index.byId.get(`paragraph:${
|
|
24751
|
+
const resolved = index.byId.get(`paragraph:${paraId}`);
|
|
24730
24752
|
if (resolved) return resolved;
|
|
24731
|
-
const
|
|
24753
|
+
const byAttr = index.candidates.find((candidate) => {
|
|
24732
24754
|
if (candidate.nodeType !== "paragraph") return false;
|
|
24733
24755
|
const attrs = candidate.node.attrs;
|
|
24734
|
-
return typeof attrs?.
|
|
24756
|
+
return typeof attrs?.paraId === "string" && attrs.paraId === paraId;
|
|
24735
24757
|
});
|
|
24736
|
-
if (
|
|
24737
|
-
|
|
24738
|
-
if (fallback) return fallback;
|
|
24739
|
-
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Created paragraph could not be resolved after insertion.", { paragraphId });
|
|
24758
|
+
if (byAttr) return byAttr;
|
|
24759
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Created paragraph could not be resolved after insertion.", { paraId });
|
|
24740
24760
|
}
|
|
24741
24761
|
function buildParagraphCreateSuccess(paragraphNodeId, trackedChangeRefs) {
|
|
24742
24762
|
return {
|
|
@@ -24791,11 +24811,13 @@ function createParagraphAdapter(editor, input, options) {
|
|
|
24791
24811
|
}
|
|
24792
24812
|
};
|
|
24793
24813
|
}
|
|
24794
|
-
const
|
|
24814
|
+
const sdBlockId = v4_default();
|
|
24815
|
+
const paraId = generateDocxRandomId();
|
|
24795
24816
|
if (!insertParagraphAt$1({
|
|
24796
24817
|
pos: insertAt,
|
|
24797
24818
|
text: input.text,
|
|
24798
|
-
sdBlockId
|
|
24819
|
+
sdBlockId,
|
|
24820
|
+
paraId,
|
|
24799
24821
|
tracked: mode === "tracked"
|
|
24800
24822
|
})) return {
|
|
24801
24823
|
success: false,
|
|
@@ -24806,10 +24828,10 @@ function createParagraphAdapter(editor, input, options) {
|
|
|
24806
24828
|
};
|
|
24807
24829
|
clearIndexCache(editor);
|
|
24808
24830
|
try {
|
|
24809
|
-
const paragraph = resolveCreatedParagraph(editor,
|
|
24810
|
-
return buildParagraphCreateSuccess(
|
|
24831
|
+
const paragraph = resolveCreatedParagraph(editor, paraId);
|
|
24832
|
+
return buildParagraphCreateSuccess(paraId, mode === "tracked" ? collectTrackInsertRefsInRange(editor, paragraph.pos, paragraph.end) : void 0);
|
|
24811
24833
|
} catch {
|
|
24812
|
-
return buildParagraphCreateSuccess(
|
|
24834
|
+
return buildParagraphCreateSuccess(paraId);
|
|
24813
24835
|
}
|
|
24814
24836
|
}
|
|
24815
24837
|
function resolveHeadingInsertPosition(editor, input) {
|
|
@@ -24822,19 +24844,17 @@ function resolveHeadingInsertPosition(editor, input) {
|
|
|
24822
24844
|
if (!target) throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Create heading target block was not found.", { target: hasTarget ? location$1.target : location$1.nodeId });
|
|
24823
24845
|
return location$1.kind === "before" ? target.pos : target.end;
|
|
24824
24846
|
}
|
|
24825
|
-
function resolveCreatedHeading(editor,
|
|
24847
|
+
function resolveCreatedHeading(editor, paraId) {
|
|
24826
24848
|
const index = getBlockIndex(editor);
|
|
24827
|
-
const resolved = index.byId.get(`heading:${
|
|
24849
|
+
const resolved = index.byId.get(`heading:${paraId}`);
|
|
24828
24850
|
if (resolved) return resolved;
|
|
24829
|
-
const
|
|
24851
|
+
const byAttr = index.candidates.find((candidate) => {
|
|
24830
24852
|
if (candidate.nodeType !== "heading") return false;
|
|
24831
24853
|
const attrs = candidate.node.attrs;
|
|
24832
|
-
return typeof attrs?.
|
|
24854
|
+
return typeof attrs?.paraId === "string" && attrs.paraId === paraId;
|
|
24833
24855
|
});
|
|
24834
|
-
if (
|
|
24835
|
-
|
|
24836
|
-
if (fallback) return fallback;
|
|
24837
|
-
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Created heading could not be resolved after insertion.", { headingId });
|
|
24856
|
+
if (byAttr) return byAttr;
|
|
24857
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Created heading could not be resolved after insertion.", { paraId });
|
|
24838
24858
|
}
|
|
24839
24859
|
function buildHeadingCreateSuccess(headingNodeId, trackedChangeRefs) {
|
|
24840
24860
|
return {
|
|
@@ -24890,12 +24910,14 @@ function createHeadingAdapter(editor, input, options) {
|
|
|
24890
24910
|
}
|
|
24891
24911
|
};
|
|
24892
24912
|
}
|
|
24893
|
-
const
|
|
24913
|
+
const sdBlockId = v4_default();
|
|
24914
|
+
const paraId = generateDocxRandomId();
|
|
24894
24915
|
if (!insertHeadingAt$1({
|
|
24895
24916
|
pos: insertAt,
|
|
24896
24917
|
level: input.level,
|
|
24897
24918
|
text: input.text,
|
|
24898
|
-
sdBlockId
|
|
24919
|
+
sdBlockId,
|
|
24920
|
+
paraId,
|
|
24899
24921
|
tracked: mode === "tracked"
|
|
24900
24922
|
})) return {
|
|
24901
24923
|
success: false,
|
|
@@ -24906,10 +24928,10 @@ function createHeadingAdapter(editor, input, options) {
|
|
|
24906
24928
|
};
|
|
24907
24929
|
clearIndexCache(editor);
|
|
24908
24930
|
try {
|
|
24909
|
-
const heading = resolveCreatedHeading(editor,
|
|
24910
|
-
return buildHeadingCreateSuccess(
|
|
24931
|
+
const heading = resolveCreatedHeading(editor, paraId);
|
|
24932
|
+
return buildHeadingCreateSuccess(paraId, mode === "tracked" ? collectTrackInsertRefsInRange(editor, heading.pos, heading.end) : void 0);
|
|
24911
24933
|
} catch {
|
|
24912
|
-
return buildHeadingCreateSuccess(
|
|
24934
|
+
return buildHeadingCreateSuccess(paraId);
|
|
24913
24935
|
}
|
|
24914
24936
|
}
|
|
24915
24937
|
function resolveMeasurement(value) {
|
|
@@ -25322,7 +25344,7 @@ var KNOWN_INLINE_PM_NODE_TYPES = new Set([
|
|
|
25322
25344
|
]);
|
|
25323
25345
|
function resolveUnknownBlockId(attrs) {
|
|
25324
25346
|
if (!attrs) return void 0;
|
|
25325
|
-
return toId(attrs.
|
|
25347
|
+
return toId(attrs.paraId) ?? toId(attrs.sdBlockId) ?? toId(attrs.blockId) ?? toId(attrs.id) ?? toId(attrs.uuid);
|
|
25326
25348
|
}
|
|
25327
25349
|
function isDualKindType(nodeType) {
|
|
25328
25350
|
return Boolean(nodeType && DUAL_KIND_TYPES.has(nodeType));
|
|
@@ -27893,7 +27915,7 @@ var Editor = class Editor extends EventEmitter$1 {
|
|
|
27893
27915
|
return migrations.length > 0;
|
|
27894
27916
|
}
|
|
27895
27917
|
processCollaborationMigrations() {
|
|
27896
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.16.0-next.
|
|
27918
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.16.0-next.7");
|
|
27897
27919
|
if (!this.options.ydoc) return;
|
|
27898
27920
|
let docVersion = this.options.ydoc.getMap("meta").get("version");
|
|
27899
27921
|
if (!docVersion) docVersion = "initial";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("../chunks/rolldown-runtime-Dp2H1eGw.cjs");
|
|
3
|
-
const require_SuperConverter = require("../chunks/SuperConverter-
|
|
3
|
+
const require_SuperConverter = require("../chunks/SuperConverter-B48kaj_H.cjs");
|
|
4
4
|
require("../chunks/jszip-DCT9QYaK.cjs");
|
|
5
5
|
require("../chunks/xml-js--DznO7Gk.cjs");
|
|
6
6
|
require("../chunks/constants-CpniKo9Z.cjs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as SuperConverter } from "../chunks/SuperConverter-
|
|
1
|
+
import { t as SuperConverter } from "../chunks/SuperConverter-CznIudSr.es.js";
|
|
2
2
|
import "../chunks/jszip-ChlR43oI.es.js";
|
|
3
3
|
import "../chunks/xml-js-DLE8mr0n.es.js";
|
|
4
4
|
import "../chunks/constants-DBKi0Amm.es.js";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export function insertHeadingAt({ pos, level, text, sdBlockId, tracked }: {
|
|
1
|
+
export function insertHeadingAt({ pos, level, text, sdBlockId, paraId, tracked }: {
|
|
2
2
|
pos: number;
|
|
3
3
|
level: number;
|
|
4
4
|
text?: string;
|
|
5
5
|
sdBlockId?: string;
|
|
6
|
+
paraId?: string;
|
|
6
7
|
tracked?: boolean;
|
|
7
8
|
}): import('./types/index.js').Command;
|
|
8
9
|
//# sourceMappingURL=insertHeadingAt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insertHeadingAt.d.ts","sourceRoot":"","sources":["../../../../../../super-editor/src/core/commands/insertHeadingAt.js"],"names":[],"mappings":"AAYO,
|
|
1
|
+
{"version":3,"file":"insertHeadingAt.d.ts","sourceRoot":"","sources":["../../../../../../super-editor/src/core/commands/insertHeadingAt.js"],"names":[],"mappings":"AAYO,kFAHI;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GACnG,OAAO,kBAAkB,EAAE,OAAO,CAwC5C"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export function insertParagraphAt({ pos, text, sdBlockId, tracked }: {
|
|
1
|
+
export function insertParagraphAt({ pos, text, sdBlockId, paraId, tracked }: {
|
|
2
2
|
pos: number;
|
|
3
3
|
text?: string;
|
|
4
4
|
sdBlockId?: string;
|
|
5
|
+
paraId?: string;
|
|
5
6
|
tracked?: boolean;
|
|
6
7
|
}): import('./types/index.js').Command;
|
|
7
8
|
//# sourceMappingURL=insertParagraphAt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insertParagraphAt.d.ts","sourceRoot":"","sources":["../../../../../../super-editor/src/core/commands/insertParagraphAt.js"],"names":[],"mappings":"AASO,
|
|
1
|
+
{"version":3,"file":"insertParagraphAt.d.ts","sourceRoot":"","sources":["../../../../../../super-editor/src/core/commands/insertParagraphAt.js"],"names":[],"mappings":"AASO,6EAHI;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GACpF,OAAO,kBAAkB,EAAE,OAAO,CAwC5C"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generate a string ID following docx ID format (see: paraId, rsidR etc.)
|
|
3
|
-
*
|
|
3
|
+
* Returns uppercase hex to match the OOXML spec (e.g. w14:paraId values).
|
|
4
|
+
* @returns {string} - 8 character uppercase hex string
|
|
4
5
|
*/
|
|
5
6
|
export function generateDocxRandomId(length?: number): string;
|
|
6
7
|
/**
|
|
@@ -8,5 +9,4 @@ export function generateDocxRandomId(length?: number): string;
|
|
|
8
9
|
* @returns {string} A random signed 32-bit integer as a string
|
|
9
10
|
*/
|
|
10
11
|
export function generateRandomSigned32BitIntStrId(): string;
|
|
11
|
-
export function generateRandom32BitHex(): string;
|
|
12
12
|
//# sourceMappingURL=generateDocxRandomId.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateDocxRandomId.d.ts","sourceRoot":"","sources":["../../../../../../super-editor/src/core/helpers/generateDocxRandomId.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"generateDocxRandomId.d.ts","sourceRoot":"","sources":["../../../../../../super-editor/src/core/helpers/generateDocxRandomId.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,uDAFa,MAAM,CAMlB;AAED;;;GAGG;AACH,qDAFa,MAAM,CAKlB"}
|