@superdoc-dev/cli 0.4.0-next.6 → 0.4.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/index.js +149 -63
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -25713,9 +25713,9 @@ var init_jszip_ChlR43oI_es = __esm(() => {
|
|
|
25713
25713
|
});
|
|
25714
25714
|
});
|
|
25715
25715
|
|
|
25716
|
-
// ../../packages/superdoc/dist/chunks/xml-js-
|
|
25716
|
+
// ../../packages/superdoc/dist/chunks/xml-js-40FWvL78.es.js
|
|
25717
25717
|
var require_events, require_inherits_browser, require_stream_browser, require_dist, require_shams$1, require_shams, require_es_object_atoms, require_es_errors, require_eval, require_range, require_ref, require_syntax, require_type, require_uri, require_abs, require_floor, require_max, require_min, require_pow, require_round, require_isNaN, require_sign, require_gOPD, require_gopd, require_es_define_property, require_has_symbols, require_Reflect_getPrototypeOf, require_Object_getPrototypeOf, require_implementation, require_function_bind, require_functionCall, require_functionApply, require_reflectApply, require_actualApply, require_call_bind_apply_helpers, require_get, require_get_proto, require_hasown, require_get_intrinsic, require_call_bound, require_is_arguments, require_is_regex, require_safe_regex_test, require_generator_function, require_is_generator_function, require_is_callable, require_for_each, require_possible_typed_array_names, require_available_typed_arrays, require_define_data_property, require_has_property_descriptors, require_set_function_length, require_applyBind, require_call_bind, require_which_typed_array, require_is_typed_array, require_types, require_isBufferBrowser, require_util, require_buffer_list, require_destroy, require_errors_browser, require_state, require_browser, require__stream_writable, require__stream_duplex, require_safe_buffer, require_string_decoder, require_end_of_stream, require_async_iterator, require_from_browser, require__stream_readable, require__stream_transform, require__stream_passthrough, require_pipeline, require_stream_browserify, require_sax, require_array_helper, require_options_helper, require_xml2js, require_xml2json, require_js2xml, require_json2xml, require_lib;
|
|
25718
|
-
var
|
|
25718
|
+
var init_xml_js_40FWvL78_es = __esm(() => {
|
|
25719
25719
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
25720
25720
|
init_jszip_ChlR43oI_es();
|
|
25721
25721
|
require_events = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
@@ -32263,9 +32263,13 @@ var init_xml_js_DLE8mr0n_es = __esm(() => {
|
|
|
32263
32263
|
clearBuffers(parser);
|
|
32264
32264
|
parser.q = parser.c = "";
|
|
32265
32265
|
parser.bufferCheckPosition = sax$1.MAX_BUFFER_LENGTH;
|
|
32266
|
+
parser.encoding = null;
|
|
32266
32267
|
parser.opt = opt || {};
|
|
32267
32268
|
parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags;
|
|
32268
32269
|
parser.looseCase = parser.opt.lowercase ? "toLowerCase" : "toUpperCase";
|
|
32270
|
+
parser.opt.maxEntityCount = parser.opt.maxEntityCount || 512;
|
|
32271
|
+
parser.opt.maxEntityDepth = parser.opt.maxEntityDepth || 4;
|
|
32272
|
+
parser.entityCount = parser.entityDepth = 0;
|
|
32269
32273
|
parser.tags = [];
|
|
32270
32274
|
parser.closed = parser.closedRoot = parser.sawRoot = false;
|
|
32271
32275
|
parser.tag = parser.error = null;
|
|
@@ -32368,6 +32372,24 @@ var init_xml_js_DLE8mr0n_es = __esm(() => {
|
|
|
32368
32372
|
function createStream(strict, opt) {
|
|
32369
32373
|
return new SAXStream(strict, opt);
|
|
32370
32374
|
}
|
|
32375
|
+
function determineBufferEncoding(data, isEnd) {
|
|
32376
|
+
if (data.length >= 2) {
|
|
32377
|
+
if (data[0] === 255 && data[1] === 254)
|
|
32378
|
+
return "utf-16le";
|
|
32379
|
+
if (data[0] === 254 && data[1] === 255)
|
|
32380
|
+
return "utf-16be";
|
|
32381
|
+
}
|
|
32382
|
+
if (data.length >= 3 && data[0] === 239 && data[1] === 187 && data[2] === 191)
|
|
32383
|
+
return "utf8";
|
|
32384
|
+
if (data.length >= 4) {
|
|
32385
|
+
if (data[0] === 60 && data[1] === 0 && data[2] === 63 && data[3] === 0)
|
|
32386
|
+
return "utf-16le";
|
|
32387
|
+
if (data[0] === 0 && data[1] === 60 && data[2] === 0 && data[3] === 63)
|
|
32388
|
+
return "utf-16be";
|
|
32389
|
+
return "utf8";
|
|
32390
|
+
}
|
|
32391
|
+
return isEnd ? "utf8" : null;
|
|
32392
|
+
}
|
|
32371
32393
|
function SAXStream(strict, opt) {
|
|
32372
32394
|
if (!(this instanceof SAXStream))
|
|
32373
32395
|
return new SAXStream(strict, opt);
|
|
@@ -32384,6 +32406,7 @@ var init_xml_js_DLE8mr0n_es = __esm(() => {
|
|
|
32384
32406
|
me._parser.error = null;
|
|
32385
32407
|
};
|
|
32386
32408
|
this._decoder = null;
|
|
32409
|
+
this._decoderBuffer = null;
|
|
32387
32410
|
streamWraps.forEach(function(ev) {
|
|
32388
32411
|
Object.defineProperty(me, "on" + ev, {
|
|
32389
32412
|
get: function() {
|
|
@@ -32403,11 +32426,31 @@ var init_xml_js_DLE8mr0n_es = __esm(() => {
|
|
|
32403
32426
|
});
|
|
32404
32427
|
}
|
|
32405
32428
|
SAXStream.prototype = Object.create(Stream$3.prototype, { constructor: { value: SAXStream } });
|
|
32429
|
+
SAXStream.prototype._decodeBuffer = function(data, isEnd) {
|
|
32430
|
+
if (this._decoderBuffer) {
|
|
32431
|
+
data = Buffer2.concat([this._decoderBuffer, data]);
|
|
32432
|
+
this._decoderBuffer = null;
|
|
32433
|
+
}
|
|
32434
|
+
if (!this._decoder) {
|
|
32435
|
+
var encoding = determineBufferEncoding(data, isEnd);
|
|
32436
|
+
if (!encoding) {
|
|
32437
|
+
this._decoderBuffer = data;
|
|
32438
|
+
return "";
|
|
32439
|
+
}
|
|
32440
|
+
this._parser.encoding = encoding;
|
|
32441
|
+
this._decoder = new TextDecoder(encoding);
|
|
32442
|
+
}
|
|
32443
|
+
return this._decoder.decode(data, { stream: !isEnd });
|
|
32444
|
+
};
|
|
32406
32445
|
SAXStream.prototype.write = function(data) {
|
|
32407
|
-
if (typeof Buffer2 === "function" && typeof Buffer2.isBuffer === "function" && Buffer2.isBuffer(data))
|
|
32408
|
-
|
|
32409
|
-
|
|
32410
|
-
|
|
32446
|
+
if (typeof Buffer2 === "function" && typeof Buffer2.isBuffer === "function" && Buffer2.isBuffer(data))
|
|
32447
|
+
data = this._decodeBuffer(data, false);
|
|
32448
|
+
else if (this._decoderBuffer) {
|
|
32449
|
+
var remaining = this._decodeBuffer(Buffer2.alloc(0), true);
|
|
32450
|
+
if (remaining) {
|
|
32451
|
+
this._parser.write(remaining);
|
|
32452
|
+
this.emit("data", remaining);
|
|
32453
|
+
}
|
|
32411
32454
|
}
|
|
32412
32455
|
this._parser.write(data.toString());
|
|
32413
32456
|
this.emit("data", data);
|
|
@@ -32416,7 +32459,13 @@ var init_xml_js_DLE8mr0n_es = __esm(() => {
|
|
|
32416
32459
|
SAXStream.prototype.end = function(chunk) {
|
|
32417
32460
|
if (chunk && chunk.length)
|
|
32418
32461
|
this.write(chunk);
|
|
32419
|
-
if (this.
|
|
32462
|
+
if (this._decoderBuffer) {
|
|
32463
|
+
var finalChunk = this._decodeBuffer(Buffer2.alloc(0), true);
|
|
32464
|
+
if (finalChunk) {
|
|
32465
|
+
this._parser.write(finalChunk);
|
|
32466
|
+
this.emit("data", finalChunk);
|
|
32467
|
+
}
|
|
32468
|
+
} else if (this._decoder) {
|
|
32420
32469
|
var remaining = this._decoder.decode();
|
|
32421
32470
|
if (remaining) {
|
|
32422
32471
|
this._parser.write(remaining);
|
|
@@ -32776,6 +32825,31 @@ var init_xml_js_DLE8mr0n_es = __esm(() => {
|
|
|
32776
32825
|
function emit(parser, event, data) {
|
|
32777
32826
|
parser[event] && parser[event](data);
|
|
32778
32827
|
}
|
|
32828
|
+
function getDeclaredEncoding(body) {
|
|
32829
|
+
var match = body && body.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);
|
|
32830
|
+
return match ? match[2] : null;
|
|
32831
|
+
}
|
|
32832
|
+
function normalizeEncodingName(encoding) {
|
|
32833
|
+
if (!encoding)
|
|
32834
|
+
return null;
|
|
32835
|
+
return encoding.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
32836
|
+
}
|
|
32837
|
+
function encodingsMatch(detectedEncoding, declaredEncoding) {
|
|
32838
|
+
const detected = normalizeEncodingName(detectedEncoding);
|
|
32839
|
+
const declared = normalizeEncodingName(declaredEncoding);
|
|
32840
|
+
if (!detected || !declared)
|
|
32841
|
+
return true;
|
|
32842
|
+
if (declared === "utf16")
|
|
32843
|
+
return detected === "utf16le" || detected === "utf16be";
|
|
32844
|
+
return detected === declared;
|
|
32845
|
+
}
|
|
32846
|
+
function validateXmlDeclarationEncoding(parser, data) {
|
|
32847
|
+
if (!parser.strict || !parser.encoding || !data || data.name !== "xml")
|
|
32848
|
+
return;
|
|
32849
|
+
var declaredEncoding = getDeclaredEncoding(data.body);
|
|
32850
|
+
if (declaredEncoding && !encodingsMatch(parser.encoding, declaredEncoding))
|
|
32851
|
+
strictFail(parser, "XML declaration encoding " + declaredEncoding + " does not match detected stream encoding " + parser.encoding.toUpperCase());
|
|
32852
|
+
}
|
|
32779
32853
|
function emitNode(parser, nodeType, data) {
|
|
32780
32854
|
if (parser.textNode)
|
|
32781
32855
|
closeText(parser);
|
|
@@ -33314,10 +33388,12 @@ Actual: ` + parser.attribValue);
|
|
|
33314
33388
|
continue;
|
|
33315
33389
|
case S.PROC_INST_ENDING:
|
|
33316
33390
|
if (c === ">") {
|
|
33317
|
-
|
|
33391
|
+
const procInstEndData = {
|
|
33318
33392
|
name: parser.procInstName,
|
|
33319
33393
|
body: parser.procInstBody
|
|
33320
|
-
}
|
|
33394
|
+
};
|
|
33395
|
+
validateXmlDeclarationEncoding(parser, procInstEndData);
|
|
33396
|
+
emitNode(parser, "onprocessinginstruction", procInstEndData);
|
|
33321
33397
|
parser.procInstName = parser.procInstBody = "";
|
|
33322
33398
|
parser.state = S.TEXT;
|
|
33323
33399
|
} else {
|
|
@@ -33514,9 +33590,14 @@ Actual: ` + parser.attribValue);
|
|
|
33514
33590
|
if (c === ";") {
|
|
33515
33591
|
var parsedEntity = parseEntity(parser);
|
|
33516
33592
|
if (parser.opt.unparsedEntities && !Object.values(sax$1.XML_ENTITIES).includes(parsedEntity)) {
|
|
33593
|
+
if ((parser.entityCount += 1) > parser.opt.maxEntityCount)
|
|
33594
|
+
error(parser, "Parsed entity count exceeds max entity count");
|
|
33595
|
+
if ((parser.entityDepth += 1) > parser.opt.maxEntityDepth)
|
|
33596
|
+
error(parser, "Parsed entity depth exceeds max entity depth");
|
|
33517
33597
|
parser.entity = "";
|
|
33518
33598
|
parser.state = returnState;
|
|
33519
33599
|
parser.write(parsedEntity);
|
|
33600
|
+
parser.entityDepth -= 1;
|
|
33520
33601
|
} else {
|
|
33521
33602
|
parser[buffer$2] += parsedEntity;
|
|
33522
33603
|
parser.entity = "";
|
|
@@ -34459,7 +34540,7 @@ var init_uuid_qzgm05fK_es = __esm(() => {
|
|
|
34459
34540
|
v5_default = v35("v5", 80, sha1);
|
|
34460
34541
|
});
|
|
34461
34542
|
|
|
34462
|
-
// ../../packages/superdoc/dist/chunks/constants-
|
|
34543
|
+
// ../../packages/superdoc/dist/chunks/constants-Qqwopz80.es.js
|
|
34463
34544
|
function computeCrc32Hex(data) {
|
|
34464
34545
|
let crc = 4294967295;
|
|
34465
34546
|
for (let i2 = 0;i2 < data.length; i2++)
|
|
@@ -34851,8 +34932,8 @@ var import_lib, CRC32_TABLE, REMOTE_RESOURCE_PATTERN, DATA_URI_PATTERN, getArray
|
|
|
34851
34932
|
return "webp";
|
|
34852
34933
|
return null;
|
|
34853
34934
|
}, COMMENT_FILE_BASENAMES, COMMENT_RELATIONSHIP_TYPES;
|
|
34854
|
-
var
|
|
34855
|
-
|
|
34935
|
+
var init_constants_Qqwopz80_es = __esm(() => {
|
|
34936
|
+
init_xml_js_40FWvL78_es();
|
|
34856
34937
|
import_lib = require_lib();
|
|
34857
34938
|
CRC32_TABLE = new Uint32Array(256);
|
|
34858
34939
|
for (let i2 = 0;i2 < 256; i2++) {
|
|
@@ -41059,7 +41140,7 @@ var init_remark_gfm_z_sDF4ss_es = __esm(() => {
|
|
|
41059
41140
|
emptyOptions2 = {};
|
|
41060
41141
|
});
|
|
41061
41142
|
|
|
41062
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
41143
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-Cqf2W6iO.es.js
|
|
41063
41144
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
41064
41145
|
const fieldValue = extension$1.config[field];
|
|
41065
41146
|
if (typeof fieldValue === "function")
|
|
@@ -91290,12 +91371,12 @@ var isRegExp = (value) => {
|
|
|
91290
91371
|
state.kern = kernNode.attributes["w:val"];
|
|
91291
91372
|
}
|
|
91292
91373
|
}, SuperConverter;
|
|
91293
|
-
var
|
|
91374
|
+
var init_SuperConverter_Cqf2W6iO_es = __esm(() => {
|
|
91294
91375
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
91295
91376
|
init_jszip_ChlR43oI_es();
|
|
91296
|
-
|
|
91377
|
+
init_xml_js_40FWvL78_es();
|
|
91297
91378
|
init_uuid_qzgm05fK_es();
|
|
91298
|
-
|
|
91379
|
+
init_constants_Qqwopz80_es();
|
|
91299
91380
|
init_unified_BRHLwnjP_es();
|
|
91300
91381
|
init_lib_HnbxUP96_es();
|
|
91301
91382
|
init_lib_DAB30bX1_es();
|
|
@@ -128663,7 +128744,7 @@ var init_remark_stringify_D8vxv_XI_es = __esm(() => {
|
|
|
128663
128744
|
eol = /\r?\n|\r/g;
|
|
128664
128745
|
});
|
|
128665
128746
|
|
|
128666
|
-
// ../../packages/superdoc/dist/chunks/DocxZipper-
|
|
128747
|
+
// ../../packages/superdoc/dist/chunks/DocxZipper-gWkmvJfR.es.js
|
|
128667
128748
|
function getLens2(b64) {
|
|
128668
128749
|
var len$1 = b64.length;
|
|
128669
128750
|
if (len$1 % 4 > 0)
|
|
@@ -129358,11 +129439,11 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
|
|
|
129358
129439
|
return `image/${MIME_TYPE_FOR_EXT[detectedType] || detectedType}`;
|
|
129359
129440
|
}
|
|
129360
129441
|
}, DocxZipper_default;
|
|
129361
|
-
var
|
|
129442
|
+
var init_DocxZipper_gWkmvJfR_es = __esm(() => {
|
|
129362
129443
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
129363
129444
|
init_jszip_ChlR43oI_es();
|
|
129364
|
-
|
|
129365
|
-
|
|
129445
|
+
init_xml_js_40FWvL78_es();
|
|
129446
|
+
init_constants_Qqwopz80_es();
|
|
129366
129447
|
buffer2 = {};
|
|
129367
129448
|
base64Js2 = {};
|
|
129368
129449
|
base64Js2.byteLength = byteLength2;
|
|
@@ -154516,7 +154597,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
|
|
|
154516
154597
|
init_remark_gfm_z_sDF4ss_es();
|
|
154517
154598
|
});
|
|
154518
154599
|
|
|
154519
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
154600
|
+
// ../../packages/superdoc/dist/chunks/src-Bfppcrj5.es.js
|
|
154520
154601
|
function deleteProps(obj, propOrProps) {
|
|
154521
154602
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
154522
154603
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -221596,7 +221677,25 @@ var Node$13 = class Node$14 {
|
|
|
221596
221677
|
this.onMouseLeave = null;
|
|
221597
221678
|
this.hoveredSdtId = null;
|
|
221598
221679
|
}
|
|
221599
|
-
},
|
|
221680
|
+
}, isRtlParagraph = (attrs) => attrs?.direction === "rtl" || attrs?.rtl === true, resolveTextAlign = (alignment$1, isRtl) => {
|
|
221681
|
+
switch (alignment$1) {
|
|
221682
|
+
case "center":
|
|
221683
|
+
case "right":
|
|
221684
|
+
case "left":
|
|
221685
|
+
return alignment$1;
|
|
221686
|
+
case "justify":
|
|
221687
|
+
default:
|
|
221688
|
+
return isRtl ? "right" : "left";
|
|
221689
|
+
}
|
|
221690
|
+
}, applyRtlStyles = (element3, attrs) => {
|
|
221691
|
+
const rtl = isRtlParagraph(attrs);
|
|
221692
|
+
if (rtl) {
|
|
221693
|
+
element3.setAttribute("dir", "rtl");
|
|
221694
|
+
element3.style.direction = "rtl";
|
|
221695
|
+
}
|
|
221696
|
+
element3.style.textAlign = resolveTextAlign(attrs?.alignment, rtl);
|
|
221697
|
+
return rtl;
|
|
221698
|
+
}, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, cssToken = (varName, fallback) => ({
|
|
221600
221699
|
css: `var(${varName}, ${fallback})`,
|
|
221601
221700
|
fallback
|
|
221602
221701
|
}), LIST_MARKER_GAP = 8, DEFAULT_PAGE_HEIGHT_PX = 1056, DEFAULT_VIRTUALIZED_PAGE_GAP = 72, COMMENT_HIGHLIGHT_EXTERNAL, COMMENT_HIGHLIGHT_EXTERNAL_ACTIVE, COMMENT_HIGHLIGHT_EXTERNAL_FADED, COMMENT_HIGHLIGHT_INTERNAL, COMMENT_HIGHLIGHT_INTERNAL_ACTIVE, COMMENT_HIGHLIGHT_INTERNAL_FADED, COMMENT_HIGHLIGHT_EXTERNAL_NESTED_BORDER, COMMENT_HIGHLIGHT_INTERNAL_NESTED_BORDER, LINK_DATASET_KEYS, MAX_HREF_LENGTH = 2048, SAFE_ANCHOR_PATTERN, MAX_DATA_URL_LENGTH, VALID_IMAGE_DATA_URL, MAX_RESIZE_MULTIPLIER = 3, FALLBACK_MAX_DIMENSION = 1000, MIN_IMAGE_DIMENSION = 20, AMBIGUOUS_LINK_PATTERNS, linkMetrics, TRACK_CHANGE_BASE_CLASS, TRACK_CHANGE_FOCUSED_CLASS = "track-change-focused", TRACK_CHANGE_MODIFIER_CLASS, LINK_TARGET_SET, normalizeAnchor$1 = (value) => {
|
|
@@ -222263,27 +222362,12 @@ var Node$13 = class Node$14 {
|
|
|
222263
222362
|
console.warn(`[DomPainter] Failed to set data attribute "${key$1}":`, error);
|
|
222264
222363
|
}
|
|
222265
222364
|
});
|
|
222266
|
-
}, resolveParagraphDirection = (attrs) => {
|
|
222267
|
-
if (attrs?.direction)
|
|
222268
|
-
return attrs.direction;
|
|
222269
|
-
if (attrs?.rtl === true)
|
|
222270
|
-
return "rtl";
|
|
222271
|
-
if (attrs?.rtl === false)
|
|
222272
|
-
return "ltr";
|
|
222273
|
-
}, applyParagraphDirection = (element3, attrs) => {
|
|
222274
|
-
const direction = resolveParagraphDirection(attrs);
|
|
222275
|
-
if (!direction)
|
|
222276
|
-
return;
|
|
222277
|
-
element3.setAttribute("dir", direction);
|
|
222278
|
-
element3.style.direction = direction;
|
|
222279
222365
|
}, applyParagraphBlockStyles = (element3, attrs) => {
|
|
222280
222366
|
if (!attrs)
|
|
222281
222367
|
return;
|
|
222282
222368
|
if (attrs.styleId)
|
|
222283
222369
|
element3.setAttribute("styleid", attrs.styleId);
|
|
222284
|
-
|
|
222285
|
-
if (attrs.alignment)
|
|
222286
|
-
element3.style.textAlign = attrs.alignment === "justify" ? "left" : attrs.alignment;
|
|
222370
|
+
applyRtlStyles(element3, attrs);
|
|
222287
222371
|
if (attrs.dropCap)
|
|
222288
222372
|
element3.classList.add("sd-editor-dropcap");
|
|
222289
222373
|
const indent2 = attrs.indent;
|
|
@@ -226150,7 +226234,7 @@ var Node$13 = class Node$14 {
|
|
|
226150
226234
|
return;
|
|
226151
226235
|
const trimmed = value.trim();
|
|
226152
226236
|
return trimmed ? trimmed : undefined;
|
|
226153
|
-
}, AUTO_SPACING_DEFAULT_MULTIPLIER = 1.15, AUTO_SPACING_LINE_DEFAULT = 240, normalizeAlignment = (value) => {
|
|
226237
|
+
}, AUTO_SPACING_DEFAULT_MULTIPLIER = 1.15, AUTO_SPACING_LINE_DEFAULT = 240, normalizeAlignment = (value, isRtl = false) => {
|
|
226154
226238
|
switch (value) {
|
|
226155
226239
|
case "center":
|
|
226156
226240
|
case "right":
|
|
@@ -226161,11 +226245,14 @@ var Node$13 = class Node$14 {
|
|
|
226161
226245
|
case "distribute":
|
|
226162
226246
|
case "numTab":
|
|
226163
226247
|
case "thaiDistribute":
|
|
226248
|
+
case "lowKashida":
|
|
226249
|
+
case "mediumKashida":
|
|
226250
|
+
case "highKashida":
|
|
226164
226251
|
return "justify";
|
|
226165
226252
|
case "end":
|
|
226166
|
-
return "right";
|
|
226253
|
+
return isRtl ? "left" : "right";
|
|
226167
226254
|
case "start":
|
|
226168
|
-
return "left";
|
|
226255
|
+
return isRtl ? "right" : "left";
|
|
226169
226256
|
default:
|
|
226170
226257
|
return;
|
|
226171
226258
|
}
|
|
@@ -226425,10 +226512,11 @@ var Node$13 = class Node$14 {
|
|
|
226425
226512
|
resolvedParagraphProperties = paragraphProperties;
|
|
226426
226513
|
else
|
|
226427
226514
|
resolvedParagraphProperties = resolveParagraphProperties(converterContext, paragraphProperties, converterContext.tableInfo);
|
|
226515
|
+
const isRtl = resolvedParagraphProperties.rightToLeft === true;
|
|
226428
226516
|
const normalizedSpacing = normalizeParagraphSpacing(resolvedParagraphProperties.spacing, Boolean(resolvedParagraphProperties.numberingProperties));
|
|
226429
226517
|
const normalizedIndent = normalizeIndentTwipsToPx(resolvedParagraphProperties.indent);
|
|
226430
226518
|
const normalizedTabStops = normalizeOoxmlTabs(resolvedParagraphProperties.tabStops);
|
|
226431
|
-
const normalizedAlignment = normalizeAlignment(resolvedParagraphProperties.justification);
|
|
226519
|
+
const normalizedAlignment = normalizeAlignment(resolvedParagraphProperties.justification, isRtl);
|
|
226432
226520
|
const normalizedBorders = normalizeParagraphBorders(resolvedParagraphProperties.borders);
|
|
226433
226521
|
const normalizedShading = normalizeParagraphShading(resolvedParagraphProperties.shading);
|
|
226434
226522
|
const paragraphDecimalSeparator = DEFAULT_DECIMAL_SEPARATOR;
|
|
@@ -226457,8 +226545,10 @@ var Node$13 = class Node$14 {
|
|
|
226457
226545
|
keepLines: resolvedParagraphProperties.keepLines,
|
|
226458
226546
|
floatAlignment,
|
|
226459
226547
|
pageBreakBefore: resolvedParagraphProperties.pageBreakBefore,
|
|
226460
|
-
|
|
226461
|
-
|
|
226548
|
+
...normalizedDirection ? {
|
|
226549
|
+
direction: normalizedDirection,
|
|
226550
|
+
rtl: isRtl
|
|
226551
|
+
} : {}
|
|
226462
226552
|
};
|
|
226463
226553
|
if (normalizedNumberingProperties && normalizedListRendering) {
|
|
226464
226554
|
const markerRunAttrs = computeRunAttrs(resolveRunProperties(converterContext, resolvedParagraphProperties.runProperties, resolvedParagraphProperties, converterContext.tableInfo, true, Boolean(paragraphProperties.numberingProperties)), converterContext);
|
|
@@ -234085,16 +234175,16 @@ var Node$13 = class Node$14 {
|
|
|
234085
234175
|
return;
|
|
234086
234176
|
console.log(...args$1);
|
|
234087
234177
|
}, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
|
|
234088
|
-
var
|
|
234178
|
+
var init_src_Bfppcrj5_es = __esm(() => {
|
|
234089
234179
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
234090
|
-
|
|
234180
|
+
init_SuperConverter_Cqf2W6iO_es();
|
|
234091
234181
|
init_jszip_ChlR43oI_es();
|
|
234092
234182
|
init_uuid_qzgm05fK_es();
|
|
234093
|
-
|
|
234183
|
+
init_constants_Qqwopz80_es();
|
|
234094
234184
|
init_unified_BRHLwnjP_es();
|
|
234095
234185
|
init_remark_gfm_z_sDF4ss_es();
|
|
234096
234186
|
init_remark_stringify_D8vxv_XI_es();
|
|
234097
|
-
|
|
234187
|
+
init_DocxZipper_gWkmvJfR_es();
|
|
234098
234188
|
init_vue_LcaAh_pz_es();
|
|
234099
234189
|
init__plugin_vue_export_helper_DBsdbQXw_es();
|
|
234100
234190
|
init_eventemitter3_C8I7im8Y_es();
|
|
@@ -254720,16 +254810,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
254720
254810
|
el.classList.add(CLASS_NAMES$1.line);
|
|
254721
254811
|
applyStyles(el, lineStyles(line.lineHeight));
|
|
254722
254812
|
el.dataset.layoutEpoch = String(this.layoutEpoch);
|
|
254723
|
-
const
|
|
254724
|
-
const styleId = paragraphAttrs.styleId;
|
|
254813
|
+
const styleId = (block.attrs ?? {}).styleId;
|
|
254725
254814
|
if (styleId)
|
|
254726
254815
|
el.setAttribute("styleid", styleId);
|
|
254727
|
-
|
|
254728
|
-
const
|
|
254729
|
-
if (alignment$1 === "center" || alignment$1 === "right")
|
|
254730
|
-
el.style.textAlign = alignment$1;
|
|
254731
|
-
else
|
|
254732
|
-
el.style.textAlign = "left";
|
|
254816
|
+
const pAttrs = block.attrs;
|
|
254817
|
+
const isRtl = applyRtlStyles(el, pAttrs);
|
|
254733
254818
|
if (lineRange.pmStart != null)
|
|
254734
254819
|
el.dataset.pmStart = String(lineRange.pmStart);
|
|
254735
254820
|
if (lineRange.pmEnd != null)
|
|
@@ -254927,7 +255012,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
254927
255012
|
});
|
|
254928
255013
|
if (spacingPerSpace !== 0)
|
|
254929
255014
|
el.style.wordSpacing = `${spacingPerSpace}px`;
|
|
254930
|
-
if (hasExplicitPositioning
|
|
255015
|
+
if (shouldUseSegmentPositioning(hasExplicitPositioning ?? false, Boolean(line.segments), isRtl)) {
|
|
254931
255016
|
const paraIndent = block.attrs?.indent;
|
|
254932
255017
|
const indentLeft = paraIndent?.left ?? 0;
|
|
254933
255018
|
const firstLine = paraIndent?.firstLine ?? 0;
|
|
@@ -254940,8 +255025,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
254940
255025
|
const fallbackListTextStartPx = typeof wordLayout?.marker?.textStartX === "number" && Number.isFinite(wordLayout.marker.textStartX) ? wordLayout.marker.textStartX : typeof wordLayout?.textStartPx === "number" && Number.isFinite(wordLayout.textStartPx) ? wordLayout.textStartPx : undefined;
|
|
254941
255026
|
const indentOffset = isListParagraph ? isFirstLineOfPara ? resolvedListTextStartPx ?? fallbackListTextStartPx ?? indentLeft : indentLeft : indentLeft + firstLineOffsetForCumX;
|
|
254942
255027
|
let cumulativeX = 0;
|
|
255028
|
+
const segments = line.segments;
|
|
254943
255029
|
const segmentsByRun = /* @__PURE__ */ new Map;
|
|
254944
|
-
|
|
255030
|
+
segments.forEach((segment) => {
|
|
254945
255031
|
const list5 = segmentsByRun.get(segment.runIndex);
|
|
254946
255032
|
if (list5)
|
|
254947
255033
|
list5.push(segment);
|
|
@@ -267408,13 +267494,13 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
|
|
|
267408
267494
|
|
|
267409
267495
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
267410
267496
|
var init_super_editor_es = __esm(() => {
|
|
267411
|
-
|
|
267412
|
-
|
|
267497
|
+
init_src_Bfppcrj5_es();
|
|
267498
|
+
init_SuperConverter_Cqf2W6iO_es();
|
|
267413
267499
|
init_jszip_ChlR43oI_es();
|
|
267414
|
-
|
|
267415
|
-
|
|
267500
|
+
init_xml_js_40FWvL78_es();
|
|
267501
|
+
init_constants_Qqwopz80_es();
|
|
267416
267502
|
init_unified_BRHLwnjP_es();
|
|
267417
|
-
|
|
267503
|
+
init_DocxZipper_gWkmvJfR_es();
|
|
267418
267504
|
init_vue_LcaAh_pz_es();
|
|
267419
267505
|
init_eventemitter3_C8I7im8Y_es();
|
|
267420
267506
|
init_zipper_DqXT7uTa_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.4.0-next.
|
|
3
|
+
"version": "0.4.0-next.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -21,20 +21,20 @@
|
|
|
21
21
|
"@types/node": "22.19.2",
|
|
22
22
|
"typescript": "^5.9.2",
|
|
23
23
|
"@superdoc/document-api": "0.0.1",
|
|
24
|
+
"@superdoc/pm-adapter": "0.0.0",
|
|
24
25
|
"superdoc": "1.21.0",
|
|
25
|
-
"@superdoc/super-editor": "0.0.1"
|
|
26
|
-
"@superdoc/pm-adapter": "0.0.0"
|
|
26
|
+
"@superdoc/super-editor": "0.0.1"
|
|
27
27
|
},
|
|
28
28
|
"module": "src/index.ts",
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@superdoc-dev/cli-darwin-arm64": "0.4.0-next.
|
|
34
|
-
"@superdoc-dev/cli-darwin-x64": "0.4.0-next.
|
|
35
|
-
"@superdoc-dev/cli-linux-x64": "0.4.0-next.
|
|
36
|
-
"@superdoc-dev/cli-
|
|
37
|
-
"@superdoc-dev/cli-
|
|
33
|
+
"@superdoc-dev/cli-darwin-arm64": "0.4.0-next.7",
|
|
34
|
+
"@superdoc-dev/cli-darwin-x64": "0.4.0-next.7",
|
|
35
|
+
"@superdoc-dev/cli-linux-x64": "0.4.0-next.7",
|
|
36
|
+
"@superdoc-dev/cli-linux-arm64": "0.4.0-next.7",
|
|
37
|
+
"@superdoc-dev/cli-windows-x64": "0.4.0-next.7"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"predev": "node scripts/ensure-superdoc-build.js",
|