oasis-editor 0.0.96 → 0.0.98
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/{OasisEditorApp-CMTq6BTy.js → OasisEditorApp-QVHCHhPa.js} +91 -4
- package/dist/assets/{importDocxWorker-M34STPYy.js → importDocxWorker-BulqJDJj.js} +1 -1
- package/dist/core/model/index.d.ts +1 -1
- package/dist/core/model/types/documentComments.d.ts +5 -0
- package/dist/core/model/types/primitives.d.ts +23 -0
- package/dist/core/model/types/styles.d.ts +18 -1
- package/dist/import/docx/commentsXml.d.ts +2 -0
- package/dist/{index-D0bOD23M.js → index-DBzN897A.js} +168 -4
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/ui/canvas/canvasFontResolution.d.ts +28 -0
- package/dist/ui/canvas/canvasParagraphPainter.d.ts +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* statements that pointed there continue to work via the barrel
|
|
7
7
|
* re-export in `src/core/model.ts`.
|
|
8
8
|
*/
|
|
9
|
-
export type { EditorUnderlineStyle, EditorLigatures, EditorNumberSpacing, EditorNumberForm, EditorTextLanguage, EditorBorderStyle, EditorEmphasisMark, EditorTabStop, EditorParagraphListStyle, EditorImageCrop, EditorImageFillMode, EditorImageFloatingPosition, EditorImageFloatingLayout, EditorImageRunData, EditorWrapPolygonPoint, EditorFieldData, EditorFieldChar, EditorFootnoteReferenceData, EditorEndnoteReferenceData, EditorRevision, EditorRevisionMetadata, EditorStructuralRevision, EditorPropertyRevision, EditorAsset, EditorFootnoteNumberFormat, EditorFootnoteRestart, EditorDocxWidthValue, EditorTableLayout, EditorTableRowHeightRule, EditorGradientStop, EditorTextFill, EditorTextOutline, } from './types/primitives.js';
|
|
9
|
+
export type { EditorUnderlineStyle, EditorLigatures, EditorNumberSpacing, EditorNumberForm, EditorTextLanguage, EditorBorderStyle, EditorEmphasisMark, EditorTabStop, EditorParagraphListStyle, EditorImageCrop, EditorImageFillMode, EditorImageFloatingPosition, EditorImageFloatingLayout, EditorImageRunData, EditorWrapPolygonPoint, EditorFieldData, EditorFieldChar, EditorFootnoteReferenceData, EditorEndnoteReferenceData, EditorRevision, EditorRevisionMetadata, EditorStructuralRevision, EditorPropertyRevision, EditorAsset, EditorFootnoteNumberFormat, EditorFootnoteRestart, EditorDocxWidthValue, EditorTableLayout, EditorTableRowHeightRule, EditorGradientStop, EditorTextFill, EditorTextOutline, EditorTextShadow, EditorGlow, EditorReflection, } from './types/primitives.js';
|
|
10
10
|
export type { EditorTextStyle, EditorParagraphStyle, EditorTableStyle, EditorTableFloatingLayout, EditorTableConditionalFormat, EditorConditionalRowStyle, EditorTableConditionalType, EditorTableConditionalFlags, EditorTableCellStyle, EditorNamedStyle, } from './types/styles.js';
|
|
11
11
|
export type { EditorRunBase, EditorTextRun, EditorTextBoxShape, EditorTextBoxBody, EditorTextBoxData, EditorDropCap, EditorParagraphNode, EditorTableCellNode, EditorTableRowStyle, EditorTableRowNode, EditorTableNode, EditorBlockNode, } from './types/nodes.js';
|
|
12
12
|
export type { RunKind, RunOfKind, RunVisitor } from './runKind.js';
|
|
@@ -34,6 +34,11 @@ export interface EditorComment {
|
|
|
34
34
|
initials?: string;
|
|
35
35
|
/** `w:comment/@w:date` as an epoch millisecond timestamp. */
|
|
36
36
|
date?: number;
|
|
37
|
+
/**
|
|
38
|
+
* `w16du:dateUtc` companion UTC timestamp (epoch ms). Round-trip metadata
|
|
39
|
+
* only — preserved verbatim so the UTC date survives export.
|
|
40
|
+
*/
|
|
41
|
+
dateUtc?: number;
|
|
37
42
|
/** Resolved/"done" state (`w15:commentEx/@w15:done`). */
|
|
38
43
|
resolved?: boolean;
|
|
39
44
|
/** Flattened comment body text (bodies in scope are single paragraphs). */
|
|
@@ -44,6 +44,29 @@ export interface EditorTextOutline {
|
|
|
44
44
|
color?: string;
|
|
45
45
|
fill?: EditorTextFill;
|
|
46
46
|
}
|
|
47
|
+
/** `w14:shadow` — text shadow with blur, distance, direction, and color. */
|
|
48
|
+
export interface EditorTextShadow {
|
|
49
|
+
color: string;
|
|
50
|
+
alpha?: number;
|
|
51
|
+
blurPt: number;
|
|
52
|
+
distPt: number;
|
|
53
|
+
dirDeg: number;
|
|
54
|
+
}
|
|
55
|
+
/** `w14:glow` — glow halo radiating from glyphs. */
|
|
56
|
+
export interface EditorGlow {
|
|
57
|
+
color: string;
|
|
58
|
+
alpha?: number;
|
|
59
|
+
radiusPt: number;
|
|
60
|
+
}
|
|
61
|
+
/** `w14:reflection` — mirrored copy of glyphs fading below the baseline. */
|
|
62
|
+
export interface EditorReflection {
|
|
63
|
+
blurPt: number;
|
|
64
|
+
startAlpha: number;
|
|
65
|
+
startPos: number;
|
|
66
|
+
endAlpha: number;
|
|
67
|
+
endPos: number;
|
|
68
|
+
distPt: number;
|
|
69
|
+
}
|
|
47
70
|
export interface EditorTabStop {
|
|
48
71
|
position: number;
|
|
49
72
|
type: "left" | "center" | "right" | "decimal" | "bar" | "clear";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorBorderStyle, EditorDocxWidthValue, EditorEmphasisMark, EditorLigatures, EditorNumberForm, EditorNumberSpacing, EditorPropertyRevision, EditorStructuralRevision, EditorTabStop, EditorTextFill, EditorTextLanguage, EditorTextOutline, EditorUnderlineStyle } from './primitives.js';
|
|
1
|
+
import { EditorBorderStyle, EditorDocxWidthValue, EditorEmphasisMark, EditorGlow, EditorLigatures, EditorNumberForm, EditorNumberSpacing, EditorPropertyRevision, EditorReflection, EditorStructuralRevision, EditorTabStop, EditorTextFill, EditorTextLanguage, EditorTextOutline, EditorTextShadow, EditorUnderlineStyle } from './primitives.js';
|
|
2
2
|
|
|
3
3
|
export interface EditorTextStyle {
|
|
4
4
|
styleId?: string;
|
|
@@ -54,6 +54,23 @@ export interface EditorTextStyle {
|
|
|
54
54
|
textFill?: EditorTextFill | null;
|
|
55
55
|
/** `w14:textOutline` — real stroke on glyphs, supersedes the boolean `outline` when present. */
|
|
56
56
|
textOutline?: EditorTextOutline | null;
|
|
57
|
+
/** `w14:shadow` — text shadow with blur, distance, direction, and color. */
|
|
58
|
+
textShadow?: EditorTextShadow | null;
|
|
59
|
+
/** `w14:glow` — glow halo radiating from glyphs. */
|
|
60
|
+
glow?: EditorGlow | null;
|
|
61
|
+
/** `w14:reflection` — mirrored copy of glyphs fading below the baseline. */
|
|
62
|
+
reflection?: EditorReflection | null;
|
|
63
|
+
/**
|
|
64
|
+
* `w14:scene3d` — opaque serialized XML preserved verbatim for round-trip.
|
|
65
|
+
* 3D scene/camera is not rendered on any surface; the blob is re-emitted so
|
|
66
|
+
* the property is never silently dropped.
|
|
67
|
+
*/
|
|
68
|
+
scene3dXml?: string | null;
|
|
69
|
+
/**
|
|
70
|
+
* `w14:props3d` — opaque serialized XML preserved verbatim for round-trip.
|
|
71
|
+
* 3D extrusion/bevel material is not rendered; re-emitted to avoid data loss.
|
|
72
|
+
*/
|
|
73
|
+
props3dXml?: string | null;
|
|
57
74
|
highlight?: string | null;
|
|
58
75
|
shading?: string | null;
|
|
59
76
|
language?: EditorTextLanguage | null;
|
|
@@ -2,6 +2,8 @@ export interface ParsedCommentBody {
|
|
|
2
2
|
author: string;
|
|
3
3
|
initials?: string;
|
|
4
4
|
date?: number;
|
|
5
|
+
/** `w16du:dateUtc` companion UTC timestamp (epoch ms). */
|
|
6
|
+
dateUtc?: number;
|
|
5
7
|
text: string;
|
|
6
8
|
resolved?: boolean;
|
|
7
9
|
/** `w14:paraId` of the comment's (first) paragraph — links to commentsEx. */
|
|
@@ -2519,7 +2519,7 @@ function OasisEditorAppLazy(props = {}) {
|
|
|
2519
2519
|
onCleanup(() => {
|
|
2520
2520
|
cancelled = true;
|
|
2521
2521
|
});
|
|
2522
|
-
import("./OasisEditorApp-
|
|
2522
|
+
import("./OasisEditorApp-QVHCHhPa.js").then((m) => {
|
|
2523
2523
|
cancelled = true;
|
|
2524
2524
|
setProgress(1);
|
|
2525
2525
|
setTimeout(() => setApp(() => m.OasisEditorApp), 180);
|
|
@@ -15222,6 +15222,17 @@ function resolveCanvasTextRenderMetrics(styles, fontSize) {
|
|
|
15222
15222
|
baselineOffset: -explicitBaselineShift
|
|
15223
15223
|
};
|
|
15224
15224
|
}
|
|
15225
|
+
function applyCanvasTextFeatureHints(ctx, styles, fontSizePx) {
|
|
15226
|
+
const featureCtx = ctx;
|
|
15227
|
+
const threshold = styles == null ? void 0 : styles.kerningThreshold;
|
|
15228
|
+
const kerningActive = threshold !== void 0 && threshold !== null && Number.isFinite(threshold) && fontSizePx / PX_PER_POINT >= threshold;
|
|
15229
|
+
if ("fontKerning" in featureCtx) {
|
|
15230
|
+
featureCtx.fontKerning = kerningActive ? "normal" : "none";
|
|
15231
|
+
}
|
|
15232
|
+
if ("textRendering" in featureCtx) {
|
|
15233
|
+
featureCtx.textRendering = (styles == null ? void 0 : styles.ligatures) && styles.ligatures !== "none" ? "optimizeLegibility" : "optimizeSpeed";
|
|
15234
|
+
}
|
|
15235
|
+
}
|
|
15225
15236
|
function resolveVerticalMode(direction) {
|
|
15226
15237
|
switch (direction) {
|
|
15227
15238
|
case "tbRl":
|
|
@@ -21200,6 +21211,7 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
|
|
|
21200
21211
|
const renderMetrics = resolveCanvasTextRenderMetrics(styles, fontSize);
|
|
21201
21212
|
ctx.save();
|
|
21202
21213
|
ctx.font = `${fontStyle} ${fontWeight} ${renderMetrics.fontSize}px ${fontFamily}`;
|
|
21214
|
+
applyCanvasTextFeatureHints(ctx, styles, fontSize);
|
|
21203
21215
|
logCanvasFontUse({
|
|
21204
21216
|
requestedFamily: styles.fontFamily,
|
|
21205
21217
|
metricFamily,
|
|
@@ -21295,6 +21307,17 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
|
|
|
21295
21307
|
originX,
|
|
21296
21308
|
baselineY + renderMetrics.baselineOffset
|
|
21297
21309
|
);
|
|
21310
|
+
if (styles.reflection) {
|
|
21311
|
+
drawFragmentReflection(
|
|
21312
|
+
ctx,
|
|
21313
|
+
fragment,
|
|
21314
|
+
slotByOffset,
|
|
21315
|
+
styles,
|
|
21316
|
+
originX,
|
|
21317
|
+
baselineY + renderMetrics.baselineOffset,
|
|
21318
|
+
styles.reflection
|
|
21319
|
+
);
|
|
21320
|
+
}
|
|
21298
21321
|
}
|
|
21299
21322
|
if (styles.underline) {
|
|
21300
21323
|
drawTextDecoration(
|
|
@@ -21476,7 +21499,7 @@ function resolveCanvasTextFill(ctx, styles, line, fragment, originX, originY) {
|
|
|
21476
21499
|
return gradient;
|
|
21477
21500
|
}
|
|
21478
21501
|
function drawStyledText(ctx, text, x, y, scale, styles) {
|
|
21479
|
-
const hasEffects = styles.outline || styles.shadow || styles.emboss || styles.imprint || styles.textOutline;
|
|
21502
|
+
const hasEffects = styles.outline || styles.shadow || styles.textShadow || styles.glow || styles.emboss || styles.imprint || styles.textOutline;
|
|
21480
21503
|
if (!hasEffects) {
|
|
21481
21504
|
drawScaledText(ctx, text, x, y, scale);
|
|
21482
21505
|
return;
|
|
@@ -21490,7 +21513,29 @@ function drawStyledText(ctx, text, x, y, scale, styles) {
|
|
|
21490
21513
|
ctx.restore();
|
|
21491
21514
|
}
|
|
21492
21515
|
ctx.save();
|
|
21493
|
-
if (styles.
|
|
21516
|
+
if (styles.textShadow) {
|
|
21517
|
+
const ts = styles.textShadow;
|
|
21518
|
+
const dirRad = ts.dirDeg * Math.PI / 180;
|
|
21519
|
+
const distPx = ts.distPt * PX_PER_POINT;
|
|
21520
|
+
const alpha = ts.alpha ?? 1;
|
|
21521
|
+
const r = Number.parseInt(ts.color.slice(1, 3), 16);
|
|
21522
|
+
const g2 = Number.parseInt(ts.color.slice(3, 5), 16);
|
|
21523
|
+
const b = Number.parseInt(ts.color.slice(5, 7), 16);
|
|
21524
|
+
ctx.shadowColor = `rgba(${r},${g2},${b},${alpha})`;
|
|
21525
|
+
ctx.shadowBlur = ts.blurPt * PX_PER_POINT;
|
|
21526
|
+
ctx.shadowOffsetX = Math.cos(dirRad) * distPx;
|
|
21527
|
+
ctx.shadowOffsetY = Math.sin(dirRad) * distPx;
|
|
21528
|
+
} else if (styles.glow) {
|
|
21529
|
+
const gl = styles.glow;
|
|
21530
|
+
const alpha = gl.alpha ?? 0.7;
|
|
21531
|
+
const r = Number.parseInt(gl.color.slice(1, 3), 16);
|
|
21532
|
+
const g2 = Number.parseInt(gl.color.slice(3, 5), 16);
|
|
21533
|
+
const b = Number.parseInt(gl.color.slice(5, 7), 16);
|
|
21534
|
+
ctx.shadowColor = `rgba(${r},${g2},${b},${alpha})`;
|
|
21535
|
+
ctx.shadowBlur = gl.radiusPt * PX_PER_POINT;
|
|
21536
|
+
ctx.shadowOffsetX = 0;
|
|
21537
|
+
ctx.shadowOffsetY = 0;
|
|
21538
|
+
} else if (styles.shadow) {
|
|
21494
21539
|
ctx.shadowColor = "rgba(0,0,0,0.45)";
|
|
21495
21540
|
ctx.shadowOffsetX = 1;
|
|
21496
21541
|
ctx.shadowOffsetY = 1;
|
|
@@ -21639,6 +21684,39 @@ function drawTextFragment(ctx, paragraph, line, fragment, slotByOffset, state, s
|
|
|
21639
21684
|
}
|
|
21640
21685
|
flushSegment();
|
|
21641
21686
|
}
|
|
21687
|
+
function drawFragmentReflection(ctx, fragment, slotByOffset, styles, originX, baselineY, reflection) {
|
|
21688
|
+
const firstChar = fragment.chars.find(
|
|
21689
|
+
(c) => c.char !== "\n" && c.char !== " "
|
|
21690
|
+
);
|
|
21691
|
+
if (!firstChar) return;
|
|
21692
|
+
const firstSlot = slotByOffset.get(firstChar.paragraphOffset);
|
|
21693
|
+
if (!firstSlot) return;
|
|
21694
|
+
const text = fragment.chars.filter((c) => c.char !== "\n" && c.char !== " ").map((c) => styles.allCaps ? c.char.toUpperCase() : c.char).join("");
|
|
21695
|
+
if (!text) return;
|
|
21696
|
+
const scale = styles.characterScale && styles.characterScale > 0 ? styles.characterScale / 100 : 1;
|
|
21697
|
+
const avgAlpha = (reflection.startAlpha + reflection.endAlpha) / 2;
|
|
21698
|
+
const distPx = reflection.distPt * PX_PER_POINT;
|
|
21699
|
+
const reflectY = baselineY + distPx;
|
|
21700
|
+
ctx.save();
|
|
21701
|
+
ctx.globalAlpha = (ctx.globalAlpha ?? 1) * avgAlpha;
|
|
21702
|
+
ctx.shadowColor = "transparent";
|
|
21703
|
+
ctx.shadowBlur = 0;
|
|
21704
|
+
ctx.shadowOffsetX = 0;
|
|
21705
|
+
ctx.shadowOffsetY = 0;
|
|
21706
|
+
ctx.translate(0, 2 * reflectY);
|
|
21707
|
+
ctx.scale(1, -1);
|
|
21708
|
+
const x = originX + firstSlot.left;
|
|
21709
|
+
if (scale === 1) {
|
|
21710
|
+
ctx.fillText(text, x, baselineY);
|
|
21711
|
+
} else {
|
|
21712
|
+
ctx.save();
|
|
21713
|
+
ctx.translate(x, baselineY);
|
|
21714
|
+
ctx.scale(scale, 1);
|
|
21715
|
+
ctx.fillText(text, 0, 0);
|
|
21716
|
+
ctx.restore();
|
|
21717
|
+
}
|
|
21718
|
+
ctx.restore();
|
|
21719
|
+
}
|
|
21642
21720
|
function drawTextDecoration(ctx, line, fragment, originX, originY, kind, underlineStyle, underlineColor) {
|
|
21643
21721
|
const bounds = resolveFragmentPaintBounds(line, fragment);
|
|
21644
21722
|
if (!bounds) return;
|
|
@@ -33340,6 +33418,61 @@ function parseW14TextFill(fillEl) {
|
|
|
33340
33418
|
}
|
|
33341
33419
|
return null;
|
|
33342
33420
|
}
|
|
33421
|
+
function parseW14ColorEl(el) {
|
|
33422
|
+
const srgbClr = getFirstChildByTagNameNS(el, WORD14_NS, "srgbClr");
|
|
33423
|
+
if (!srgbClr) return null;
|
|
33424
|
+
const val = getAttributeValue(srgbClr, "val");
|
|
33425
|
+
const color = val ? normalizeImportedHexColor(val) ?? null : null;
|
|
33426
|
+
if (!color) return null;
|
|
33427
|
+
const alphaEl = getFirstChildByTagNameNS(srgbClr, WORD14_NS, "alpha");
|
|
33428
|
+
const alphaRaw = alphaEl ? getAttributeValue(alphaEl, "val") : null;
|
|
33429
|
+
const alpha = alphaRaw !== null && Number.isFinite(Number(alphaRaw)) ? Number(alphaRaw) / 1e5 : void 0;
|
|
33430
|
+
return { color, ...alpha !== void 0 ? { alpha } : {} };
|
|
33431
|
+
}
|
|
33432
|
+
function parseW14Shadow(el) {
|
|
33433
|
+
const colorData = parseW14ColorEl(el);
|
|
33434
|
+
if (!colorData) return null;
|
|
33435
|
+
const blurRaw = el.getAttributeNS(WORD14_NS, "blurRad");
|
|
33436
|
+
const distRaw = el.getAttributeNS(WORD14_NS, "dist");
|
|
33437
|
+
const dirRaw = el.getAttributeNS(WORD14_NS, "dir");
|
|
33438
|
+
const blurPt = blurRaw ? Number(blurRaw) / 12700 : 0;
|
|
33439
|
+
const distPt = distRaw ? Number(distRaw) / 12700 : 0;
|
|
33440
|
+
const dirDeg = dirRaw ? Number(dirRaw) / 6e4 : 0;
|
|
33441
|
+
return {
|
|
33442
|
+
color: colorData.color,
|
|
33443
|
+
...colorData.alpha !== void 0 ? { alpha: colorData.alpha } : {},
|
|
33444
|
+
blurPt,
|
|
33445
|
+
distPt,
|
|
33446
|
+
dirDeg
|
|
33447
|
+
};
|
|
33448
|
+
}
|
|
33449
|
+
function parseW14Glow(el) {
|
|
33450
|
+
const colorData = parseW14ColorEl(el);
|
|
33451
|
+
if (!colorData) return null;
|
|
33452
|
+
const radRaw = el.getAttributeNS(WORD14_NS, "rad");
|
|
33453
|
+
const radiusPt = radRaw ? Number(radRaw) / 12700 : 0;
|
|
33454
|
+
return {
|
|
33455
|
+
color: colorData.color,
|
|
33456
|
+
...colorData.alpha !== void 0 ? { alpha: colorData.alpha } : {},
|
|
33457
|
+
radiusPt
|
|
33458
|
+
};
|
|
33459
|
+
}
|
|
33460
|
+
function parseW14Reflection(el) {
|
|
33461
|
+
const blurRaw = el.getAttributeNS(WORD14_NS, "blurRad");
|
|
33462
|
+
const stARaw = el.getAttributeNS(WORD14_NS, "stA");
|
|
33463
|
+
const stPosRaw = el.getAttributeNS(WORD14_NS, "stPos");
|
|
33464
|
+
const endARaw = el.getAttributeNS(WORD14_NS, "endA");
|
|
33465
|
+
const endPosRaw = el.getAttributeNS(WORD14_NS, "endPos");
|
|
33466
|
+
const distRaw = el.getAttributeNS(WORD14_NS, "dist");
|
|
33467
|
+
return {
|
|
33468
|
+
blurPt: blurRaw ? Number(blurRaw) / 12700 : 0,
|
|
33469
|
+
startAlpha: stARaw !== null ? Number(stARaw) / 1e5 : 0.55,
|
|
33470
|
+
startPos: stPosRaw !== null ? Number(stPosRaw) / 1e5 : 0,
|
|
33471
|
+
endAlpha: endARaw !== null ? Number(endARaw) / 1e5 : 0,
|
|
33472
|
+
endPos: endPosRaw !== null ? Number(endPosRaw) / 1e5 : 1,
|
|
33473
|
+
distPt: distRaw ? Number(distRaw) / 12700 : 0
|
|
33474
|
+
};
|
|
33475
|
+
}
|
|
33343
33476
|
function normalizeImportedRunStyle(style2, paragraphStyleId) {
|
|
33344
33477
|
if (!style2) {
|
|
33345
33478
|
return void 0;
|
|
@@ -33444,6 +33577,11 @@ function normalizeImportedRunStyle(style2, paragraphStyleId) {
|
|
|
33444
33577
|
color: dd(effective.color, defaultEffective.color),
|
|
33445
33578
|
textFill: dd(effective.textFill, defaultEffective.textFill),
|
|
33446
33579
|
textOutline: dd(effective.textOutline, defaultEffective.textOutline),
|
|
33580
|
+
textShadow: dd(effective.textShadow, defaultEffective.textShadow),
|
|
33581
|
+
glow: dd(effective.glow, defaultEffective.glow),
|
|
33582
|
+
reflection: dd(effective.reflection, defaultEffective.reflection),
|
|
33583
|
+
scene3dXml: dd(effective.scene3dXml, defaultEffective.scene3dXml),
|
|
33584
|
+
props3dXml: dd(effective.props3dXml, defaultEffective.props3dXml),
|
|
33447
33585
|
highlight: dd(effective.highlight, defaultEffective.highlight),
|
|
33448
33586
|
shading: dd(effective.shading, defaultEffective.shading),
|
|
33449
33587
|
language: dd(effective.language, defaultEffective.language),
|
|
@@ -33715,6 +33853,28 @@ function parseRunStyle(runProperties, theme) {
|
|
|
33715
33853
|
}
|
|
33716
33854
|
styles.textOutline = textOutline;
|
|
33717
33855
|
}
|
|
33856
|
+
const shadowEl = getFirstW14Child(runProperties, "shadow");
|
|
33857
|
+
if (shadowEl) {
|
|
33858
|
+
const textShadow = parseW14Shadow(shadowEl);
|
|
33859
|
+
if (textShadow) styles.textShadow = textShadow;
|
|
33860
|
+
}
|
|
33861
|
+
const glowEl = getFirstW14Child(runProperties, "glow");
|
|
33862
|
+
if (glowEl) {
|
|
33863
|
+
const glow = parseW14Glow(glowEl);
|
|
33864
|
+
if (glow) styles.glow = glow;
|
|
33865
|
+
}
|
|
33866
|
+
const reflectionEl = getFirstW14Child(runProperties, "reflection");
|
|
33867
|
+
if (reflectionEl) {
|
|
33868
|
+
styles.reflection = parseW14Reflection(reflectionEl);
|
|
33869
|
+
}
|
|
33870
|
+
const scene3dEl = getFirstW14Child(runProperties, "scene3d");
|
|
33871
|
+
if (scene3dEl) {
|
|
33872
|
+
styles.scene3dXml = new XMLSerializer().serializeToString(scene3dEl);
|
|
33873
|
+
}
|
|
33874
|
+
const props3dEl = getFirstW14Child(runProperties, "props3d");
|
|
33875
|
+
if (props3dEl) {
|
|
33876
|
+
styles.props3dXml = new XMLSerializer().serializeToString(props3dEl);
|
|
33877
|
+
}
|
|
33718
33878
|
const highlight = getFirstChildByTagNameNS(
|
|
33719
33879
|
runProperties,
|
|
33720
33880
|
WORD_NS,
|
|
@@ -36699,6 +36859,7 @@ function extractCommentRangesFromSections(sections) {
|
|
|
36699
36859
|
return ranges;
|
|
36700
36860
|
}
|
|
36701
36861
|
const WORD15_NS = "http://schemas.microsoft.com/office/word/2012/wordml";
|
|
36862
|
+
const WORD16DU_NS = "http://schemas.microsoft.com/office/word/2023/wordml/word16du";
|
|
36702
36863
|
function flattenCommentText(element) {
|
|
36703
36864
|
let out = "";
|
|
36704
36865
|
for (let index = 0; index < element.childNodes.length; index += 1) {
|
|
@@ -36771,6 +36932,7 @@ function parseCommentsXml(commentsXml, commentsExtendedXml) {
|
|
|
36771
36932
|
const author = getAttributeValue(comment, "author") ?? "";
|
|
36772
36933
|
const initials = getAttributeValue(comment, "initials") ?? void 0;
|
|
36773
36934
|
const date = parseDate(getAttributeValue(comment, "date"));
|
|
36935
|
+
const dateUtc = parseDate(comment.getAttributeNS(WORD16DU_NS, "dateUtc"));
|
|
36774
36936
|
const paragraphs = getChildrenByTagNameNS(comment, WORD_NS, "p");
|
|
36775
36937
|
const text = paragraphs.map((p) => flattenCommentText(p)).join("\n").trim();
|
|
36776
36938
|
const paraId = paragraphs.length > 0 ? getAttributeValue(paragraphs[0], "paraId") ?? void 0 : void 0;
|
|
@@ -36779,6 +36941,7 @@ function parseCommentsXml(commentsXml, commentsExtendedXml) {
|
|
|
36779
36941
|
author,
|
|
36780
36942
|
...initials ? { initials } : {},
|
|
36781
36943
|
...date !== void 0 ? { date } : {},
|
|
36944
|
+
...dateUtc !== void 0 ? { dateUtc } : {},
|
|
36782
36945
|
text,
|
|
36783
36946
|
...resolved ? { resolved } : {},
|
|
36784
36947
|
...paraId ? { paraId } : {}
|
|
@@ -37174,6 +37337,7 @@ function buildEditorComments(ranges, bodies) {
|
|
|
37174
37337
|
author: (body == null ? void 0 : body.author) ?? "",
|
|
37175
37338
|
...(body == null ? void 0 : body.initials) ? { initials: body.initials } : {},
|
|
37176
37339
|
...(body == null ? void 0 : body.date) !== void 0 ? { date: body.date } : {},
|
|
37340
|
+
...(body == null ? void 0 : body.dateUtc) !== void 0 ? { dateUtc: body.dateUtc } : {},
|
|
37177
37341
|
...(body == null ? void 0 : body.resolved) ? { resolved: body.resolved } : {},
|
|
37178
37342
|
text: (body == null ? void 0 : body.text) ?? "",
|
|
37179
37343
|
...(range == null ? void 0 : range.start) ? { start: range.start } : {},
|
|
@@ -37288,7 +37452,7 @@ function importDocxInWorker(buffer, options = {}) {
|
|
|
37288
37452
|
const worker = new Worker(
|
|
37289
37453
|
new URL(
|
|
37290
37454
|
/* @vite-ignore */
|
|
37291
|
-
"" + new URL("assets/importDocxWorker-
|
|
37455
|
+
"" + new URL("assets/importDocxWorker-BulqJDJj.js", import.meta.url).href,
|
|
37292
37456
|
import.meta.url
|
|
37293
37457
|
),
|
|
37294
37458
|
{
|
package/dist/oasis-editor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O, c6, c7, c8, c9, ca, a8, cb, Q, bR, cc, cd, ce, N, cf, bP, cg, ch, ci, cj, ck, c1, cl, cm, cn, co, cp, cq, cr, cs, ct, cu, cv, cw, ad, cx, c0, cy, c8 as c82, cd as cd2, cf as cf2, co as co2, cq as cq2, cv as cv2, cz, bT, bO, cA, cB, cC, bQ, cD, cE, bS } from "./index-
|
|
1
|
+
import { O, c6, c7, c8, c9, ca, a8, cb, Q, bR, cc, cd, ce, N, cf, bP, cg, ch, ci, cj, ck, c1, cl, cm, cn, co, cp, cq, cr, cs, ct, cu, cv, cw, ad, cx, c0, cy, c8 as c82, cd as cd2, cf as cf2, co as co2, cq as cq2, cv as cv2, cz, bT, bO, cA, cB, cC, bQ, cD, cE, bS } from "./index-DBzN897A.js";
|
|
2
2
|
export {
|
|
3
3
|
O as BalloonShell,
|
|
4
4
|
c6 as Button,
|